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 Platform data 90 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 91 92 // View your data across Google Cloud Platform services 93 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" 94) 95 96// NewService creates a new APIService. 97func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 98 scopesOption := option.WithScopes( 99 "https://www.googleapis.com/auth/appengine.admin", 100 "https://www.googleapis.com/auth/cloud-platform", 101 "https://www.googleapis.com/auth/cloud-platform.read-only", 102 ) 103 // NOTE: prepend, so we don't override user-specified scopes. 104 opts = append([]option.ClientOption{scopesOption}, opts...) 105 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 106 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 107 client, endpoint, err := htransport.NewClient(ctx, opts...) 108 if err != nil { 109 return nil, err 110 } 111 s, err := New(client) 112 if err != nil { 113 return nil, err 114 } 115 if endpoint != "" { 116 s.BasePath = endpoint 117 } 118 return s, nil 119} 120 121// New creates a new APIService. It uses the provided http.Client for requests. 122// 123// Deprecated: please use NewService instead. 124// To provide a custom HTTP client, use option.WithHTTPClient. 125// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 126func New(client *http.Client) (*APIService, error) { 127 if client == nil { 128 return nil, errors.New("client is nil") 129 } 130 s := &APIService{client: client, BasePath: basePath} 131 s.Apps = NewAppsService(s) 132 return s, nil 133} 134 135type APIService struct { 136 client *http.Client 137 BasePath string // API endpoint base URL 138 UserAgent string // optional additional User-Agent fragment 139 140 Apps *AppsService 141} 142 143func (s *APIService) userAgent() string { 144 if s.UserAgent == "" { 145 return googleapi.UserAgent 146 } 147 return googleapi.UserAgent + " " + s.UserAgent 148} 149 150func NewAppsService(s *APIService) *AppsService { 151 rs := &AppsService{s: s} 152 rs.AuthorizedCertificates = NewAppsAuthorizedCertificatesService(s) 153 rs.AuthorizedDomains = NewAppsAuthorizedDomainsService(s) 154 rs.DomainMappings = NewAppsDomainMappingsService(s) 155 rs.Firewall = NewAppsFirewallService(s) 156 rs.Locations = NewAppsLocationsService(s) 157 rs.Operations = NewAppsOperationsService(s) 158 rs.Services = NewAppsServicesService(s) 159 return rs 160} 161 162type AppsService struct { 163 s *APIService 164 165 AuthorizedCertificates *AppsAuthorizedCertificatesService 166 167 AuthorizedDomains *AppsAuthorizedDomainsService 168 169 DomainMappings *AppsDomainMappingsService 170 171 Firewall *AppsFirewallService 172 173 Locations *AppsLocationsService 174 175 Operations *AppsOperationsService 176 177 Services *AppsServicesService 178} 179 180func NewAppsAuthorizedCertificatesService(s *APIService) *AppsAuthorizedCertificatesService { 181 rs := &AppsAuthorizedCertificatesService{s: s} 182 return rs 183} 184 185type AppsAuthorizedCertificatesService struct { 186 s *APIService 187} 188 189func NewAppsAuthorizedDomainsService(s *APIService) *AppsAuthorizedDomainsService { 190 rs := &AppsAuthorizedDomainsService{s: s} 191 return rs 192} 193 194type AppsAuthorizedDomainsService struct { 195 s *APIService 196} 197 198func NewAppsDomainMappingsService(s *APIService) *AppsDomainMappingsService { 199 rs := &AppsDomainMappingsService{s: s} 200 return rs 201} 202 203type AppsDomainMappingsService struct { 204 s *APIService 205} 206 207func NewAppsFirewallService(s *APIService) *AppsFirewallService { 208 rs := &AppsFirewallService{s: s} 209 rs.IngressRules = NewAppsFirewallIngressRulesService(s) 210 return rs 211} 212 213type AppsFirewallService struct { 214 s *APIService 215 216 IngressRules *AppsFirewallIngressRulesService 217} 218 219func NewAppsFirewallIngressRulesService(s *APIService) *AppsFirewallIngressRulesService { 220 rs := &AppsFirewallIngressRulesService{s: s} 221 return rs 222} 223 224type AppsFirewallIngressRulesService struct { 225 s *APIService 226} 227 228func NewAppsLocationsService(s *APIService) *AppsLocationsService { 229 rs := &AppsLocationsService{s: s} 230 return rs 231} 232 233type AppsLocationsService struct { 234 s *APIService 235} 236 237func NewAppsOperationsService(s *APIService) *AppsOperationsService { 238 rs := &AppsOperationsService{s: s} 239 return rs 240} 241 242type AppsOperationsService struct { 243 s *APIService 244} 245 246func NewAppsServicesService(s *APIService) *AppsServicesService { 247 rs := &AppsServicesService{s: s} 248 rs.Versions = NewAppsServicesVersionsService(s) 249 return rs 250} 251 252type AppsServicesService struct { 253 s *APIService 254 255 Versions *AppsServicesVersionsService 256} 257 258func NewAppsServicesVersionsService(s *APIService) *AppsServicesVersionsService { 259 rs := &AppsServicesVersionsService{s: s} 260 rs.Instances = NewAppsServicesVersionsInstancesService(s) 261 return rs 262} 263 264type AppsServicesVersionsService struct { 265 s *APIService 266 267 Instances *AppsServicesVersionsInstancesService 268} 269 270func NewAppsServicesVersionsInstancesService(s *APIService) *AppsServicesVersionsInstancesService { 271 rs := &AppsServicesVersionsInstancesService{s: s} 272 return rs 273} 274 275type AppsServicesVersionsInstancesService struct { 276 s *APIService 277} 278 279// ApiConfigHandler: Google Cloud Endpoints 280// (https://cloud.google.com/appengine/docs/python/endpoints/) 281// configuration for API handlers. 282type ApiConfigHandler struct { 283 // AuthFailAction: Action to take when users access resources that 284 // require authentication. Defaults to redirect. 285 // 286 // Possible values: 287 // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified. 288 // AUTH_FAIL_ACTION_REDIRECT is assumed. 289 // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to 290 // "accounts.google.com". The user is redirected back to the application 291 // URL after signing in or creating an account. 292 // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP 293 // status code and an error message. 294 AuthFailAction string `json:"authFailAction,omitempty"` 295 296 // Login: Level of login required to access this resource. Defaults to 297 // optional. 298 // 299 // Possible values: 300 // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed. 301 // "LOGIN_OPTIONAL" - Does not require that the user is signed in. 302 // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action 303 // is taken. In addition, if the user is not an administrator for the 304 // application, they are given an error message regardless of 305 // auth_fail_action. If the user is an administrator, the handler 306 // proceeds. 307 // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds 308 // normally. Otherwise, the auth_fail_action is taken. 309 Login string `json:"login,omitempty"` 310 311 // Script: Path to the script from the application root directory. 312 Script string `json:"script,omitempty"` 313 314 // SecurityLevel: Security (HTTPS) enforcement for this URL. 315 // 316 // Possible values: 317 // "SECURE_UNSPECIFIED" - Not specified. 318 // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that 319 // match the handler succeed without redirects. The application can 320 // examine the request to determine which protocol was used, and respond 321 // accordingly. 322 // "SECURE_NEVER" - Requests for a URL that match this handler that 323 // use HTTPS are automatically redirected to the HTTP equivalent URL. 324 // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that 325 // match the handler succeed without redirects. The application can 326 // examine the request to determine which protocol was used and respond 327 // accordingly. 328 // "SECURE_ALWAYS" - Requests for a URL that match this handler that 329 // do not use HTTPS are automatically redirected to the HTTPS URL with 330 // the same path. Query parameters are reserved for the redirect. 331 SecurityLevel string `json:"securityLevel,omitempty"` 332 333 // Url: URL to serve the endpoint at. 334 Url string `json:"url,omitempty"` 335 336 // ForceSendFields is a list of field names (e.g. "AuthFailAction") to 337 // unconditionally include in API requests. By default, fields with 338 // empty values are omitted from API requests. However, any non-pointer, 339 // non-interface field appearing in ForceSendFields will be sent to the 340 // server regardless of whether the field is empty or not. This may be 341 // used to include empty fields in Patch requests. 342 ForceSendFields []string `json:"-"` 343 344 // NullFields is a list of field names (e.g. "AuthFailAction") to 345 // include in API requests with the JSON null value. By default, fields 346 // with empty values are omitted from API requests. However, any field 347 // with an empty value appearing in NullFields will be sent to the 348 // server as null. It is an error if a field in this list has a 349 // non-empty value. This may be used to include null fields in Patch 350 // requests. 351 NullFields []string `json:"-"` 352} 353 354func (s *ApiConfigHandler) MarshalJSON() ([]byte, error) { 355 type NoMethod ApiConfigHandler 356 raw := NoMethod(*s) 357 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 358} 359 360// ApiEndpointHandler: Uses Google Cloud Endpoints to handle requests. 361type ApiEndpointHandler struct { 362 // ScriptPath: Path to the script from the application root directory. 363 ScriptPath string `json:"scriptPath,omitempty"` 364 365 // ForceSendFields is a list of field names (e.g. "ScriptPath") to 366 // unconditionally include in API requests. By default, fields with 367 // empty values are omitted from API requests. However, any non-pointer, 368 // non-interface field appearing in ForceSendFields will be sent to the 369 // server regardless of whether the field is empty or not. This may be 370 // used to include empty fields in Patch requests. 371 ForceSendFields []string `json:"-"` 372 373 // NullFields is a list of field names (e.g. "ScriptPath") to include in 374 // API requests with the JSON null value. By default, fields with empty 375 // values are omitted from API requests. However, any field with an 376 // empty value appearing in NullFields will be sent to the server as 377 // null. It is an error if a field in this list has a non-empty value. 378 // This may be used to include null fields in Patch requests. 379 NullFields []string `json:"-"` 380} 381 382func (s *ApiEndpointHandler) MarshalJSON() ([]byte, error) { 383 type NoMethod ApiEndpointHandler 384 raw := NoMethod(*s) 385 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 386} 387 388// Application: An Application resource contains the top-level 389// configuration of an App Engine application. 390type Application struct { 391 // AuthDomain: Google Apps authentication domain that controls which 392 // users can access this application.Defaults to open access for any 393 // Google Account. 394 AuthDomain string `json:"authDomain,omitempty"` 395 396 // CodeBucket: Google Cloud Storage bucket that can be used for storing 397 // files associated with this application. This bucket is associated 398 // with the application and can be used by the gcloud deployment 399 // commands.@OutputOnly 400 CodeBucket string `json:"codeBucket,omitempty"` 401 402 // DatabaseType: The type of the Cloud Firestore or Cloud Datastore 403 // database associated with this application. 404 // 405 // Possible values: 406 // "DATABASE_TYPE_UNSPECIFIED" - Database type is unspecified. 407 // "CLOUD_DATASTORE" - Cloud Datastore 408 // "CLOUD_FIRESTORE" - Cloud Firestore Native 409 // "CLOUD_DATASTORE_COMPATIBILITY" - Cloud Firestore in Datastore Mode 410 DatabaseType string `json:"databaseType,omitempty"` 411 412 // DefaultBucket: Google Cloud Storage bucket that can be used by this 413 // application to store content.@OutputOnly 414 DefaultBucket string `json:"defaultBucket,omitempty"` 415 416 // DefaultCookieExpiration: Cookie expiration policy for this 417 // application. 418 DefaultCookieExpiration string `json:"defaultCookieExpiration,omitempty"` 419 420 // DefaultHostname: Hostname used to reach this application, as resolved 421 // by App Engine.@OutputOnly 422 DefaultHostname string `json:"defaultHostname,omitempty"` 423 424 // DispatchRules: HTTP path dispatch rules for requests to the 425 // application that do not explicitly target a service or version. Rules 426 // are order-dependent. Up to 20 dispatch rules can be supported. 427 DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"` 428 429 // FeatureSettings: The feature specific settings to be used in the 430 // application. 431 FeatureSettings *FeatureSettings `json:"featureSettings,omitempty"` 432 433 // GcrDomain: The Google Container Registry domain used for storing 434 // managed build docker images for this application. 435 GcrDomain string `json:"gcrDomain,omitempty"` 436 437 Iap *IdentityAwareProxy `json:"iap,omitempty"` 438 439 // Id: Identifier of the Application resource. This identifier is 440 // equivalent to the project ID of the Google Cloud Platform project 441 // where you want to deploy your application. Example: myapp. 442 Id string `json:"id,omitempty"` 443 444 // LocationId: Location from which this application runs. Application 445 // instances run out of the data centers in the specified location, 446 // which is also where all of the application's end user content is 447 // stored.Defaults to us-central.View the list of supported locations 448 // (https://cloud.google.com/appengine/docs/locations). 449 LocationId string `json:"locationId,omitempty"` 450 451 // Name: Full path to the Application resource in the API. Example: 452 // apps/myapp.@OutputOnly 453 Name string `json:"name,omitempty"` 454 455 // ServingStatus: Serving status of this application. 456 // 457 // Possible values: 458 // "UNSPECIFIED" - Serving status is unspecified. 459 // "SERVING" - Application is serving. 460 // "USER_DISABLED" - Application has been disabled by the user. 461 // "SYSTEM_DISABLED" - Application has been disabled by the system. 462 ServingStatus string `json:"servingStatus,omitempty"` 463 464 // ServerResponse contains the HTTP response code and headers from the 465 // server. 466 googleapi.ServerResponse `json:"-"` 467 468 // ForceSendFields is a list of field names (e.g. "AuthDomain") to 469 // unconditionally include in API requests. By default, fields with 470 // empty values are omitted from API requests. However, any non-pointer, 471 // non-interface field appearing in ForceSendFields will be sent to the 472 // server regardless of whether the field is empty or not. This may be 473 // used to include empty fields in Patch requests. 474 ForceSendFields []string `json:"-"` 475 476 // NullFields is a list of field names (e.g. "AuthDomain") to include in 477 // API requests with the JSON null value. By default, fields with empty 478 // values are omitted from API requests. However, any field with an 479 // empty value appearing in NullFields will be sent to the server as 480 // null. It is an error if a field in this list has a non-empty value. 481 // This may be used to include null fields in Patch requests. 482 NullFields []string `json:"-"` 483} 484 485func (s *Application) MarshalJSON() ([]byte, error) { 486 type NoMethod Application 487 raw := NoMethod(*s) 488 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 489} 490 491// AuthorizedCertificate: An SSL certificate that a user has been 492// authorized to administer. A user is authorized to administer any 493// certificate that applies to one of their authorized domains. 494type AuthorizedCertificate struct { 495 // CertificateRawData: The SSL certificate serving the 496 // AuthorizedCertificate resource. This must be obtained independently 497 // from a certificate authority. 498 CertificateRawData *CertificateRawData `json:"certificateRawData,omitempty"` 499 500 // DisplayName: The user-specified display name of the certificate. This 501 // is not guaranteed to be unique. Example: My Certificate. 502 DisplayName string `json:"displayName,omitempty"` 503 504 // DomainMappingsCount: Aggregate count of the domain mappings with this 505 // certificate mapped. This count includes domain mappings on 506 // applications for which the user does not have VIEWER permissions.Only 507 // returned by GET or LIST requests when specifically requested by the 508 // view=FULL_CERTIFICATE option.@OutputOnly 509 DomainMappingsCount int64 `json:"domainMappingsCount,omitempty"` 510 511 // DomainNames: Topmost applicable domains of this certificate. This 512 // certificate applies to these domains and their subdomains. Example: 513 // example.com.@OutputOnly 514 DomainNames []string `json:"domainNames,omitempty"` 515 516 // ExpireTime: The time when this certificate expires. To update the 517 // renewal time on this certificate, upload an SSL certificate with a 518 // different expiration time using 519 // AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly 520 ExpireTime string `json:"expireTime,omitempty"` 521 522 // Id: Relative name of the certificate. This is a unique value 523 // autogenerated on AuthorizedCertificate resource creation. Example: 524 // 12345.@OutputOnly 525 Id string `json:"id,omitempty"` 526 527 // ManagedCertificate: Only applicable if this certificate is managed by 528 // App Engine. Managed certificates are tied to the lifecycle of a 529 // DomainMapping and cannot be updated or deleted via the 530 // AuthorizedCertificates API. If this certificate is manually 531 // administered by the user, this field will be empty.@OutputOnly 532 ManagedCertificate *ManagedCertificate `json:"managedCertificate,omitempty"` 533 534 // Name: Full path to the AuthorizedCertificate resource in the API. 535 // Example: apps/myapp/authorizedCertificates/12345.@OutputOnly 536 Name string `json:"name,omitempty"` 537 538 // VisibleDomainMappings: The full paths to user visible Domain Mapping 539 // resources that have this certificate mapped. Example: 540 // apps/myapp/domainMappings/example.com.This may not represent the full 541 // list of mapped domain mappings if the user does not have VIEWER 542 // permissions on all of the applications that have this certificate 543 // mapped. See domain_mappings_count for a complete count.Only returned 544 // by GET or LIST requests when specifically requested by the 545 // view=FULL_CERTIFICATE option.@OutputOnly 546 VisibleDomainMappings []string `json:"visibleDomainMappings,omitempty"` 547 548 // ServerResponse contains the HTTP response code and headers from the 549 // server. 550 googleapi.ServerResponse `json:"-"` 551 552 // ForceSendFields is a list of field names (e.g. "CertificateRawData") 553 // to unconditionally include in API requests. By default, fields with 554 // empty values are omitted from API requests. However, any non-pointer, 555 // non-interface field appearing in ForceSendFields will be sent to the 556 // server regardless of whether the field is empty or not. This may be 557 // used to include empty fields in Patch requests. 558 ForceSendFields []string `json:"-"` 559 560 // NullFields is a list of field names (e.g. "CertificateRawData") to 561 // include in API requests with the JSON null value. By default, fields 562 // with empty values are omitted from API requests. However, any field 563 // with an empty value appearing in NullFields will be sent to the 564 // server as null. It is an error if a field in this list has a 565 // non-empty value. This may be used to include null fields in Patch 566 // requests. 567 NullFields []string `json:"-"` 568} 569 570func (s *AuthorizedCertificate) MarshalJSON() ([]byte, error) { 571 type NoMethod AuthorizedCertificate 572 raw := NoMethod(*s) 573 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 574} 575 576// AuthorizedDomain: A domain that a user has been authorized to 577// administer. To authorize use of a domain, verify ownership via 578// Webmaster Central 579// (https://www.google.com/webmasters/verification/home). 580type AuthorizedDomain struct { 581 // Id: Fully qualified domain name of the domain authorized for use. 582 // Example: example.com. 583 Id string `json:"id,omitempty"` 584 585 // Name: Full path to the AuthorizedDomain resource in the API. Example: 586 // apps/myapp/authorizedDomains/example.com.@OutputOnly 587 Name string `json:"name,omitempty"` 588 589 // ForceSendFields is a list of field names (e.g. "Id") to 590 // unconditionally include in API requests. By default, fields with 591 // empty values are omitted from API requests. However, any non-pointer, 592 // non-interface field appearing in ForceSendFields will be sent to the 593 // server regardless of whether the field is empty or not. This may be 594 // used to include empty fields in Patch requests. 595 ForceSendFields []string `json:"-"` 596 597 // NullFields is a list of field names (e.g. "Id") to include in API 598 // requests with the JSON null value. By default, fields with empty 599 // values are omitted from API requests. However, any field with an 600 // empty value appearing in NullFields will be sent to the server as 601 // null. It is an error if a field in this list has a non-empty value. 602 // This may be used to include null fields in Patch requests. 603 NullFields []string `json:"-"` 604} 605 606func (s *AuthorizedDomain) MarshalJSON() ([]byte, error) { 607 type NoMethod AuthorizedDomain 608 raw := NoMethod(*s) 609 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 610} 611 612// AutomaticScaling: Automatic scaling is based on request rate, 613// response latencies, and other application metrics. 614type AutomaticScaling struct { 615 // CoolDownPeriod: The time period that the Autoscaler 616 // (https://cloud.google.com/compute/docs/autoscaler/) should wait 617 // before it starts collecting information from a new instance. This 618 // prevents the autoscaler from collecting information when the instance 619 // is initializing, during which the collected usage would not be 620 // reliable. Only applicable in the App Engine flexible environment. 621 CoolDownPeriod string `json:"coolDownPeriod,omitempty"` 622 623 // CpuUtilization: Target scaling by CPU usage. 624 CpuUtilization *CpuUtilization `json:"cpuUtilization,omitempty"` 625 626 // DiskUtilization: Target scaling by disk usage. 627 DiskUtilization *DiskUtilization `json:"diskUtilization,omitempty"` 628 629 // MaxConcurrentRequests: Number of concurrent requests an automatic 630 // scaling instance can accept before the scheduler spawns a new 631 // instance.Defaults to a runtime-specific value. 632 MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"` 633 634 // MaxIdleInstances: Maximum number of idle instances that should be 635 // maintained for this version. 636 MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"` 637 638 // MaxPendingLatency: Maximum amount of time that a request should wait 639 // in the pending queue before starting a new instance to handle it. 640 MaxPendingLatency string `json:"maxPendingLatency,omitempty"` 641 642 // MaxTotalInstances: Maximum number of instances that should be started 643 // to handle requests for this version. 644 MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"` 645 646 // MinIdleInstances: Minimum number of idle instances that should be 647 // maintained for this version. Only applicable for the default version 648 // of a service. 649 MinIdleInstances int64 `json:"minIdleInstances,omitempty"` 650 651 // MinPendingLatency: Minimum amount of time a request should wait in 652 // the pending queue before starting a new instance to handle it. 653 MinPendingLatency string `json:"minPendingLatency,omitempty"` 654 655 // MinTotalInstances: Minimum number of running instances that should be 656 // maintained for this version. 657 MinTotalInstances int64 `json:"minTotalInstances,omitempty"` 658 659 // NetworkUtilization: Target scaling by network usage. 660 NetworkUtilization *NetworkUtilization `json:"networkUtilization,omitempty"` 661 662 // RequestUtilization: Target scaling by request utilization. 663 RequestUtilization *RequestUtilization `json:"requestUtilization,omitempty"` 664 665 // StandardSchedulerSettings: Scheduler settings for standard 666 // environment. 667 StandardSchedulerSettings *StandardSchedulerSettings `json:"standardSchedulerSettings,omitempty"` 668 669 // ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to 670 // unconditionally include in API requests. By default, fields with 671 // empty values are omitted from API requests. However, any non-pointer, 672 // non-interface field appearing in ForceSendFields will be sent to the 673 // server regardless of whether the field is empty or not. This may be 674 // used to include empty fields in Patch requests. 675 ForceSendFields []string `json:"-"` 676 677 // NullFields is a list of field names (e.g. "CoolDownPeriod") to 678 // include in API requests with the JSON null value. By default, fields 679 // with empty values are omitted from API requests. However, any field 680 // with an empty value appearing in NullFields will be sent to the 681 // server as null. It is an error if a field in this list has a 682 // non-empty value. This may be used to include null fields in Patch 683 // requests. 684 NullFields []string `json:"-"` 685} 686 687func (s *AutomaticScaling) MarshalJSON() ([]byte, error) { 688 type NoMethod AutomaticScaling 689 raw := NoMethod(*s) 690 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 691} 692 693// BasicScaling: A service with basic scaling will create an instance 694// when the application receives a request. The instance will be turned 695// down when the app becomes idle. Basic scaling is ideal for work that 696// is intermittent or driven by user activity. 697type BasicScaling struct { 698 // IdleTimeout: Duration of time after the last request that an instance 699 // must wait before the instance is shut down. 700 IdleTimeout string `json:"idleTimeout,omitempty"` 701 702 // MaxInstances: Maximum number of instances to create for this version. 703 MaxInstances int64 `json:"maxInstances,omitempty"` 704 705 // ForceSendFields is a list of field names (e.g. "IdleTimeout") to 706 // unconditionally include in API requests. By default, fields with 707 // empty values are omitted from API requests. However, any non-pointer, 708 // non-interface field appearing in ForceSendFields will be sent to the 709 // server regardless of whether the field is empty or not. This may be 710 // used to include empty fields in Patch requests. 711 ForceSendFields []string `json:"-"` 712 713 // NullFields is a list of field names (e.g. "IdleTimeout") to include 714 // in API requests with the JSON null value. By default, fields with 715 // empty values are omitted from API requests. However, any field with 716 // an empty value appearing in NullFields will be sent to the server as 717 // null. It is an error if a field in this list has a non-empty value. 718 // This may be used to include null fields in Patch requests. 719 NullFields []string `json:"-"` 720} 721 722func (s *BasicScaling) MarshalJSON() ([]byte, error) { 723 type NoMethod BasicScaling 724 raw := NoMethod(*s) 725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 726} 727 728// BatchUpdateIngressRulesRequest: Request message for 729// Firewall.BatchUpdateIngressRules. 730type BatchUpdateIngressRulesRequest struct { 731 // IngressRules: A list of FirewallRules to replace the existing set. 732 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 733 734 // ForceSendFields is a list of field names (e.g. "IngressRules") to 735 // unconditionally include in API requests. By default, fields with 736 // empty values are omitted from API requests. However, any non-pointer, 737 // non-interface field appearing in ForceSendFields will be sent to the 738 // server regardless of whether the field is empty or not. This may be 739 // used to include empty fields in Patch requests. 740 ForceSendFields []string `json:"-"` 741 742 // NullFields is a list of field names (e.g. "IngressRules") to include 743 // in API requests with the JSON null value. By default, fields with 744 // empty values are omitted from API requests. However, any field with 745 // an empty value appearing in NullFields will be sent to the server as 746 // null. It is an error if a field in this list has a non-empty value. 747 // This may be used to include null fields in Patch requests. 748 NullFields []string `json:"-"` 749} 750 751func (s *BatchUpdateIngressRulesRequest) MarshalJSON() ([]byte, error) { 752 type NoMethod BatchUpdateIngressRulesRequest 753 raw := NoMethod(*s) 754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 755} 756 757// BatchUpdateIngressRulesResponse: Response message for 758// Firewall.UpdateAllIngressRules. 759type BatchUpdateIngressRulesResponse struct { 760 // IngressRules: The full list of ingress FirewallRules for this 761 // application. 762 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 763 764 // ServerResponse contains the HTTP response code and headers from the 765 // server. 766 googleapi.ServerResponse `json:"-"` 767 768 // ForceSendFields is a list of field names (e.g. "IngressRules") to 769 // unconditionally include in API requests. By default, fields with 770 // empty values are omitted from API requests. However, any non-pointer, 771 // non-interface field appearing in ForceSendFields will be sent to the 772 // server regardless of whether the field is empty or not. This may be 773 // used to include empty fields in Patch requests. 774 ForceSendFields []string `json:"-"` 775 776 // NullFields is a list of field names (e.g. "IngressRules") to include 777 // in API requests with the JSON null value. By default, fields with 778 // empty values are omitted from API requests. However, any field with 779 // an empty value appearing in NullFields will be sent to the server as 780 // null. It is an error if a field in this list has a non-empty value. 781 // This may be used to include null fields in Patch requests. 782 NullFields []string `json:"-"` 783} 784 785func (s *BatchUpdateIngressRulesResponse) MarshalJSON() ([]byte, error) { 786 type NoMethod BatchUpdateIngressRulesResponse 787 raw := NoMethod(*s) 788 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 789} 790 791// CertificateRawData: An SSL certificate obtained from a certificate 792// authority. 793type CertificateRawData struct { 794 // PrivateKey: Unencrypted PEM encoded RSA private key. This field is 795 // set once on certificate creation and then encrypted. The key size 796 // must be 2048 bits or fewer. Must include the header and footer. 797 // Example: -----BEGIN RSA PRIVATE KEY----- -----END RSA PRIVATE 798 // KEY----- @InputOnly 799 PrivateKey string `json:"privateKey,omitempty"` 800 801 // PublicCertificate: PEM encoded x.509 public key certificate. This 802 // field is set once on certificate creation. Must include the header 803 // and footer. Example: -----BEGIN CERTIFICATE----- -----END 804 // CERTIFICATE----- 805 PublicCertificate string `json:"publicCertificate,omitempty"` 806 807 // ForceSendFields is a list of field names (e.g. "PrivateKey") to 808 // unconditionally include in API requests. By default, fields with 809 // empty values are omitted from API requests. However, any non-pointer, 810 // non-interface field appearing in ForceSendFields will be sent to the 811 // server regardless of whether the field is empty or not. This may be 812 // used to include empty fields in Patch requests. 813 ForceSendFields []string `json:"-"` 814 815 // NullFields is a list of field names (e.g. "PrivateKey") to include in 816 // API requests with the JSON null value. By default, fields with empty 817 // values are omitted from API requests. However, any field with an 818 // empty value appearing in NullFields will be sent to the server as 819 // null. It is an error if a field in this list has a non-empty value. 820 // This may be used to include null fields in Patch requests. 821 NullFields []string `json:"-"` 822} 823 824func (s *CertificateRawData) MarshalJSON() ([]byte, error) { 825 type NoMethod CertificateRawData 826 raw := NoMethod(*s) 827 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 828} 829 830// CloudBuildOptions: Options for the build operations performed as a 831// part of the version deployment. Only applicable for App Engine 832// flexible environment when creating a version using source code 833// directly. 834type CloudBuildOptions struct { 835 // AppYamlPath: Path to the yaml file used in deployment, used to 836 // determine runtime configuration details.Required for flexible 837 // environment builds.See 838 // https://cloud.google.com/appengine/docs/standard/python/config/appref 839 // for more details. 840 AppYamlPath string `json:"appYamlPath,omitempty"` 841 842 // CloudBuildTimeout: The Cloud Build timeout used as part of any 843 // dependent builds performed by version creation. Defaults to 10 844 // minutes. 845 CloudBuildTimeout string `json:"cloudBuildTimeout,omitempty"` 846 847 // ForceSendFields is a list of field names (e.g. "AppYamlPath") to 848 // unconditionally include in API requests. By default, fields with 849 // empty values are omitted from API requests. However, any non-pointer, 850 // non-interface field appearing in ForceSendFields will be sent to the 851 // server regardless of whether the field is empty or not. This may be 852 // used to include empty fields in Patch requests. 853 ForceSendFields []string `json:"-"` 854 855 // NullFields is a list of field names (e.g. "AppYamlPath") to include 856 // in API requests with the JSON null value. By default, fields with 857 // empty values are omitted from API requests. However, any field with 858 // an empty value appearing in NullFields will be sent to the server as 859 // null. It is an error if a field in this list has a non-empty value. 860 // This may be used to include null fields in Patch requests. 861 NullFields []string `json:"-"` 862} 863 864func (s *CloudBuildOptions) MarshalJSON() ([]byte, error) { 865 type NoMethod CloudBuildOptions 866 raw := NoMethod(*s) 867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 868} 869 870// ContainerInfo: Docker image that is used to create a container and 871// start a VM instance for the version that you deploy. Only applicable 872// for instances running in the App Engine flexible environment. 873type ContainerInfo struct { 874 // Image: URI to the hosted container image in Google Container 875 // Registry. The URI must be fully qualified and include a tag or 876 // digest. Examples: "gcr.io/my-project/image:tag" or 877 // "gcr.io/my-project/image@digest" 878 Image string `json:"image,omitempty"` 879 880 // ForceSendFields is a list of field names (e.g. "Image") to 881 // unconditionally include in API requests. By default, fields with 882 // empty values are omitted from API requests. However, any non-pointer, 883 // non-interface field appearing in ForceSendFields will be sent to the 884 // server regardless of whether the field is empty or not. This may be 885 // used to include empty fields in Patch requests. 886 ForceSendFields []string `json:"-"` 887 888 // NullFields is a list of field names (e.g. "Image") to include in API 889 // requests with the JSON null value. By default, fields with empty 890 // values are omitted from API requests. However, any field with an 891 // empty value appearing in NullFields will be sent to the server as 892 // null. It is an error if a field in this list has a non-empty value. 893 // This may be used to include null fields in Patch requests. 894 NullFields []string `json:"-"` 895} 896 897func (s *ContainerInfo) MarshalJSON() ([]byte, error) { 898 type NoMethod ContainerInfo 899 raw := NoMethod(*s) 900 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 901} 902 903// CpuUtilization: Target scaling by CPU usage. 904type CpuUtilization struct { 905 // AggregationWindowLength: Period of time over which CPU utilization is 906 // calculated. 907 AggregationWindowLength string `json:"aggregationWindowLength,omitempty"` 908 909 // TargetUtilization: Target CPU utilization ratio to maintain when 910 // scaling. Must be between 0 and 1. 911 TargetUtilization float64 `json:"targetUtilization,omitempty"` 912 913 // ForceSendFields is a list of field names (e.g. 914 // "AggregationWindowLength") to unconditionally include in API 915 // requests. By default, fields with empty values are omitted from API 916 // requests. However, any non-pointer, non-interface field appearing in 917 // ForceSendFields will be sent to the server regardless of whether the 918 // field is empty or not. This may be used to include empty fields in 919 // Patch requests. 920 ForceSendFields []string `json:"-"` 921 922 // NullFields is a list of field names (e.g. "AggregationWindowLength") 923 // to include in API requests with the JSON null value. By default, 924 // fields with empty values are omitted from API requests. However, any 925 // field with an empty value appearing in NullFields will be sent to the 926 // server as null. It is an error if a field in this list has a 927 // non-empty value. This may be used to include null fields in Patch 928 // requests. 929 NullFields []string `json:"-"` 930} 931 932func (s *CpuUtilization) MarshalJSON() ([]byte, error) { 933 type NoMethod CpuUtilization 934 raw := NoMethod(*s) 935 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 936} 937 938func (s *CpuUtilization) UnmarshalJSON(data []byte) error { 939 type NoMethod CpuUtilization 940 var s1 struct { 941 TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"` 942 *NoMethod 943 } 944 s1.NoMethod = (*NoMethod)(s) 945 if err := json.Unmarshal(data, &s1); err != nil { 946 return err 947 } 948 s.TargetUtilization = float64(s1.TargetUtilization) 949 return nil 950} 951 952// CreateVersionMetadataV1: Metadata for the given 953// google.longrunning.Operation during a 954// google.appengine.v1.CreateVersionRequest. 955type CreateVersionMetadataV1 struct { 956 // CloudBuildId: The Cloud Build ID if one was created as part of the 957 // version create. @OutputOnly 958 CloudBuildId string `json:"cloudBuildId,omitempty"` 959 960 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 961 // unconditionally include in API requests. By default, fields with 962 // empty values are omitted from API requests. However, any non-pointer, 963 // non-interface field appearing in ForceSendFields will be sent to the 964 // server regardless of whether the field is empty or not. This may be 965 // used to include empty fields in Patch requests. 966 ForceSendFields []string `json:"-"` 967 968 // NullFields is a list of field names (e.g. "CloudBuildId") to include 969 // in API requests with the JSON null value. By default, fields with 970 // empty values are omitted from API requests. However, any field with 971 // an empty value appearing in NullFields will be sent to the server as 972 // null. It is an error if a field in this list has a non-empty value. 973 // This may be used to include null fields in Patch requests. 974 NullFields []string `json:"-"` 975} 976 977func (s *CreateVersionMetadataV1) MarshalJSON() ([]byte, error) { 978 type NoMethod CreateVersionMetadataV1 979 raw := NoMethod(*s) 980 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 981} 982 983// CreateVersionMetadataV1Alpha: Metadata for the given 984// google.longrunning.Operation during a 985// google.appengine.v1alpha.CreateVersionRequest. 986type CreateVersionMetadataV1Alpha struct { 987 // CloudBuildId: The Cloud Build ID if one was created as part of the 988 // version create. @OutputOnly 989 CloudBuildId string `json:"cloudBuildId,omitempty"` 990 991 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 992 // unconditionally include in API requests. By default, fields with 993 // empty values are omitted from API requests. However, any non-pointer, 994 // non-interface field appearing in ForceSendFields will be sent to the 995 // server regardless of whether the field is empty or not. This may be 996 // used to include empty fields in Patch requests. 997 ForceSendFields []string `json:"-"` 998 999 // NullFields is a list of field names (e.g. "CloudBuildId") to include 1000 // in API requests with the JSON null value. By default, fields with 1001 // empty values are omitted from API requests. However, any field with 1002 // an empty value appearing in NullFields will be sent to the server as 1003 // null. It is an error if a field in this list has a non-empty value. 1004 // This may be used to include null fields in Patch requests. 1005 NullFields []string `json:"-"` 1006} 1007 1008func (s *CreateVersionMetadataV1Alpha) MarshalJSON() ([]byte, error) { 1009 type NoMethod CreateVersionMetadataV1Alpha 1010 raw := NoMethod(*s) 1011 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1012} 1013 1014// CreateVersionMetadataV1Beta: Metadata for the given 1015// google.longrunning.Operation during a 1016// google.appengine.v1beta.CreateVersionRequest. 1017type CreateVersionMetadataV1Beta struct { 1018 // CloudBuildId: The Cloud Build ID if one was created as part of the 1019 // version create. @OutputOnly 1020 CloudBuildId string `json:"cloudBuildId,omitempty"` 1021 1022 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 1023 // unconditionally include in API requests. By default, fields with 1024 // empty values are omitted from API requests. However, any non-pointer, 1025 // non-interface field appearing in ForceSendFields will be sent to the 1026 // server regardless of whether the field is empty or not. This may be 1027 // used to include empty fields in Patch requests. 1028 ForceSendFields []string `json:"-"` 1029 1030 // NullFields is a list of field names (e.g. "CloudBuildId") to include 1031 // in API requests with the JSON null value. By default, fields with 1032 // empty values are omitted from API requests. However, any field with 1033 // an empty value appearing in NullFields will be sent to the server as 1034 // null. It is an error if a field in this list has a non-empty value. 1035 // This may be used to include null fields in Patch requests. 1036 NullFields []string `json:"-"` 1037} 1038 1039func (s *CreateVersionMetadataV1Beta) MarshalJSON() ([]byte, error) { 1040 type NoMethod CreateVersionMetadataV1Beta 1041 raw := NoMethod(*s) 1042 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1043} 1044 1045// DebugInstanceRequest: Request message for Instances.DebugInstance. 1046type DebugInstanceRequest struct { 1047 // SshKey: Public SSH key to add to the instance. Examples: 1048 // [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] [USERNAME]:ssh-rsa 1049 // [KEY_VALUE] google-ssh 1050 // {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more 1051 // information, see Adding and Removing SSH Keys 1052 // (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). 1053 SshKey string `json:"sshKey,omitempty"` 1054 1055 // ForceSendFields is a list of field names (e.g. "SshKey") to 1056 // unconditionally include in API requests. By default, fields with 1057 // empty values are omitted from API requests. However, any non-pointer, 1058 // non-interface field appearing in ForceSendFields will be sent to the 1059 // server regardless of whether the field is empty or not. This may be 1060 // used to include empty fields in Patch requests. 1061 ForceSendFields []string `json:"-"` 1062 1063 // NullFields is a list of field names (e.g. "SshKey") to include in API 1064 // requests with the JSON null value. By default, fields with empty 1065 // values are omitted from API requests. However, any field with an 1066 // empty value appearing in NullFields will be sent to the server as 1067 // null. It is an error if a field in this list has a non-empty value. 1068 // This may be used to include null fields in Patch requests. 1069 NullFields []string `json:"-"` 1070} 1071 1072func (s *DebugInstanceRequest) MarshalJSON() ([]byte, error) { 1073 type NoMethod DebugInstanceRequest 1074 raw := NoMethod(*s) 1075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1076} 1077 1078// Deployment: Code and application artifacts used to deploy a version 1079// to App Engine. 1080type Deployment struct { 1081 // CloudBuildOptions: Options for any Google Cloud Build builds created 1082 // as a part of this deployment.These options will only be used if a new 1083 // build is created, such as when deploying to the App Engine flexible 1084 // environment using files or zip. 1085 CloudBuildOptions *CloudBuildOptions `json:"cloudBuildOptions,omitempty"` 1086 1087 // Container: The Docker image for the container that runs the version. 1088 // Only applicable for instances running in the App Engine flexible 1089 // environment. 1090 Container *ContainerInfo `json:"container,omitempty"` 1091 1092 // Files: Manifest of the files stored in Google Cloud Storage that are 1093 // included as part of this version. All files must be readable using 1094 // the credentials supplied with this call. 1095 Files map[string]FileInfo `json:"files,omitempty"` 1096 1097 // Zip: The zip file for this deployment, if this is a zip deployment. 1098 Zip *ZipInfo `json:"zip,omitempty"` 1099 1100 // ForceSendFields is a list of field names (e.g. "CloudBuildOptions") 1101 // to unconditionally include in API requests. By default, fields with 1102 // empty values are omitted from API requests. However, any non-pointer, 1103 // non-interface field appearing in ForceSendFields will be sent to the 1104 // server regardless of whether the field is empty or not. This may be 1105 // used to include empty fields in Patch requests. 1106 ForceSendFields []string `json:"-"` 1107 1108 // NullFields is a list of field names (e.g. "CloudBuildOptions") to 1109 // include in API requests with the JSON null value. By default, fields 1110 // with empty values are omitted from API requests. However, any field 1111 // with an empty value appearing in NullFields will be sent to the 1112 // server as null. It is an error if a field in this list has a 1113 // non-empty value. This may be used to include null fields in Patch 1114 // requests. 1115 NullFields []string `json:"-"` 1116} 1117 1118func (s *Deployment) MarshalJSON() ([]byte, error) { 1119 type NoMethod Deployment 1120 raw := NoMethod(*s) 1121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1122} 1123 1124// DiskUtilization: Target scaling by disk usage. Only applicable in the 1125// App Engine flexible environment. 1126type DiskUtilization struct { 1127 // TargetReadBytesPerSecond: Target bytes read per second. 1128 TargetReadBytesPerSecond int64 `json:"targetReadBytesPerSecond,omitempty"` 1129 1130 // TargetReadOpsPerSecond: Target ops read per seconds. 1131 TargetReadOpsPerSecond int64 `json:"targetReadOpsPerSecond,omitempty"` 1132 1133 // TargetWriteBytesPerSecond: Target bytes written per second. 1134 TargetWriteBytesPerSecond int64 `json:"targetWriteBytesPerSecond,omitempty"` 1135 1136 // TargetWriteOpsPerSecond: Target ops written per second. 1137 TargetWriteOpsPerSecond int64 `json:"targetWriteOpsPerSecond,omitempty"` 1138 1139 // ForceSendFields is a list of field names (e.g. 1140 // "TargetReadBytesPerSecond") to unconditionally include in API 1141 // requests. By default, fields with empty values are omitted from API 1142 // requests. However, any non-pointer, non-interface field appearing in 1143 // ForceSendFields will be sent to the server regardless of whether the 1144 // field is empty or not. This may be used to include empty fields in 1145 // Patch requests. 1146 ForceSendFields []string `json:"-"` 1147 1148 // NullFields is a list of field names (e.g. "TargetReadBytesPerSecond") 1149 // to include in API requests with the JSON null value. By default, 1150 // fields with empty values are omitted from API requests. However, any 1151 // field with an empty value appearing in NullFields will be sent to the 1152 // server as null. It is an error if a field in this list has a 1153 // non-empty value. This may be used to include null fields in Patch 1154 // requests. 1155 NullFields []string `json:"-"` 1156} 1157 1158func (s *DiskUtilization) MarshalJSON() ([]byte, error) { 1159 type NoMethod DiskUtilization 1160 raw := NoMethod(*s) 1161 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1162} 1163 1164// DomainMapping: A domain serving an App Engine application. 1165type DomainMapping struct { 1166 // Id: Relative name of the domain serving the application. Example: 1167 // example.com. 1168 Id string `json:"id,omitempty"` 1169 1170 // Name: Full path to the DomainMapping resource in the API. Example: 1171 // apps/myapp/domainMapping/example.com.@OutputOnly 1172 Name string `json:"name,omitempty"` 1173 1174 // ResourceRecords: The resource records required to configure this 1175 // domain mapping. These records must be added to the domain's DNS 1176 // configuration in order to serve the application via this domain 1177 // mapping.@OutputOnly 1178 ResourceRecords []*ResourceRecord `json:"resourceRecords,omitempty"` 1179 1180 // SslSettings: SSL configuration for this domain. If unconfigured, this 1181 // domain will not serve with SSL. 1182 SslSettings *SslSettings `json:"sslSettings,omitempty"` 1183 1184 // ServerResponse contains the HTTP response code and headers from the 1185 // server. 1186 googleapi.ServerResponse `json:"-"` 1187 1188 // ForceSendFields is a list of field names (e.g. "Id") to 1189 // unconditionally include in API requests. By default, fields with 1190 // empty values are omitted from API requests. However, any non-pointer, 1191 // non-interface field appearing in ForceSendFields will be sent to the 1192 // server regardless of whether the field is empty or not. This may be 1193 // used to include empty fields in Patch requests. 1194 ForceSendFields []string `json:"-"` 1195 1196 // NullFields is a list of field names (e.g. "Id") to include in API 1197 // requests with the JSON null value. By default, fields with empty 1198 // values are omitted from API requests. However, any field with an 1199 // empty value appearing in NullFields will be sent to the server as 1200 // null. It is an error if a field in this list has a non-empty value. 1201 // This may be used to include null fields in Patch requests. 1202 NullFields []string `json:"-"` 1203} 1204 1205func (s *DomainMapping) MarshalJSON() ([]byte, error) { 1206 type NoMethod DomainMapping 1207 raw := NoMethod(*s) 1208 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1209} 1210 1211// Empty: A generic empty message that you can re-use to avoid defining 1212// duplicated empty messages in your APIs. A typical example is to use 1213// it as the request or the response type of an API method. For 1214// instance: service Foo { rpc Bar(google.protobuf.Empty) returns 1215// (google.protobuf.Empty); } The JSON representation for Empty is empty 1216// JSON object {}. 1217type Empty struct { 1218 // ServerResponse contains the HTTP response code and headers from the 1219 // server. 1220 googleapi.ServerResponse `json:"-"` 1221} 1222 1223// EndpointsApiService: Cloud Endpoints 1224// (https://cloud.google.com/endpoints) configuration. The Endpoints API 1225// Service provides tooling for serving Open API and gRPC endpoints via 1226// an NGINX proxy. Only valid for App Engine Flexible environment 1227// deployments.The fields here refer to the name and configuration ID of 1228// a "service" resource in the Service Management API 1229// (https://cloud.google.com/service-management/overview). 1230type EndpointsApiService struct { 1231 // ConfigId: Endpoints service configuration ID as specified by the 1232 // Service Management API. For example "2016-09-19r1".By default, the 1233 // rollout strategy for Endpoints is RolloutStrategy.FIXED. This means 1234 // that Endpoints starts up with a particular configuration ID. When a 1235 // new configuration is rolled out, Endpoints must be given the new 1236 // configuration ID. The config_id field is used to give the 1237 // configuration ID and is required in this case.Endpoints also has a 1238 // rollout strategy called RolloutStrategy.MANAGED. When using this, 1239 // Endpoints fetches the latest configuration and does not need the 1240 // configuration ID. In this case, config_id must be omitted. 1241 ConfigId string `json:"configId,omitempty"` 1242 1243 // DisableTraceSampling: Enable or disable trace sampling. By default, 1244 // this is set to false for enabled. 1245 DisableTraceSampling bool `json:"disableTraceSampling,omitempty"` 1246 1247 // Name: Endpoints service name which is the name of the "service" 1248 // resource in the Service Management API. For example 1249 // "myapi.endpoints.myproject.cloud.goog" 1250 Name string `json:"name,omitempty"` 1251 1252 // RolloutStrategy: Endpoints rollout strategy. If FIXED, config_id must 1253 // be specified. If MANAGED, config_id must be omitted. 1254 // 1255 // Possible values: 1256 // "UNSPECIFIED_ROLLOUT_STRATEGY" - Not specified. Defaults to FIXED. 1257 // "FIXED" - Endpoints service configuration ID will be fixed to the 1258 // configuration ID specified by config_id. 1259 // "MANAGED" - Endpoints service configuration ID will be updated with 1260 // each rollout. 1261 RolloutStrategy string `json:"rolloutStrategy,omitempty"` 1262 1263 // ForceSendFields is a list of field names (e.g. "ConfigId") to 1264 // unconditionally include in API requests. By default, fields with 1265 // empty values are omitted from API requests. However, any non-pointer, 1266 // non-interface field appearing in ForceSendFields will be sent to the 1267 // server regardless of whether the field is empty or not. This may be 1268 // used to include empty fields in Patch requests. 1269 ForceSendFields []string `json:"-"` 1270 1271 // NullFields is a list of field names (e.g. "ConfigId") to include in 1272 // API requests with the JSON null value. By default, fields with empty 1273 // values are omitted from API requests. However, any field with an 1274 // empty value appearing in NullFields will be sent to the server as 1275 // null. It is an error if a field in this list has a non-empty value. 1276 // This may be used to include null fields in Patch requests. 1277 NullFields []string `json:"-"` 1278} 1279 1280func (s *EndpointsApiService) MarshalJSON() ([]byte, error) { 1281 type NoMethod EndpointsApiService 1282 raw := NoMethod(*s) 1283 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1284} 1285 1286// Entrypoint: The entrypoint for the application. 1287type Entrypoint struct { 1288 // Shell: The format should be a shell command that can be fed to bash 1289 // -c. 1290 Shell string `json:"shell,omitempty"` 1291 1292 // ForceSendFields is a list of field names (e.g. "Shell") to 1293 // unconditionally include in API requests. By default, fields with 1294 // empty values are omitted from API requests. However, any non-pointer, 1295 // non-interface field appearing in ForceSendFields will be sent to the 1296 // server regardless of whether the field is empty or not. This may be 1297 // used to include empty fields in Patch requests. 1298 ForceSendFields []string `json:"-"` 1299 1300 // NullFields is a list of field names (e.g. "Shell") to include in API 1301 // requests with the JSON null value. By default, fields with empty 1302 // values are omitted from API requests. However, any field with an 1303 // empty value appearing in NullFields will be sent to the server as 1304 // null. It is an error if a field in this list has a non-empty value. 1305 // This may be used to include null fields in Patch requests. 1306 NullFields []string `json:"-"` 1307} 1308 1309func (s *Entrypoint) MarshalJSON() ([]byte, error) { 1310 type NoMethod Entrypoint 1311 raw := NoMethod(*s) 1312 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1313} 1314 1315// ErrorHandler: Custom static error page to be served when an error 1316// occurs. 1317type ErrorHandler struct { 1318 // ErrorCode: Error condition this handler applies to. 1319 // 1320 // Possible values: 1321 // "ERROR_CODE_UNSPECIFIED" - Not specified. ERROR_CODE_DEFAULT is 1322 // assumed. 1323 // "ERROR_CODE_DEFAULT" - All other error types. 1324 // "ERROR_CODE_OVER_QUOTA" - Application has exceeded a resource 1325 // quota. 1326 // "ERROR_CODE_DOS_API_DENIAL" - Client blocked by the application's 1327 // Denial of Service protection configuration. 1328 // "ERROR_CODE_TIMEOUT" - Deadline reached before the application 1329 // responds. 1330 ErrorCode string `json:"errorCode,omitempty"` 1331 1332 // MimeType: MIME type of file. Defaults to text/html. 1333 MimeType string `json:"mimeType,omitempty"` 1334 1335 // StaticFile: Static file content to be served for this error. 1336 StaticFile string `json:"staticFile,omitempty"` 1337 1338 // ForceSendFields is a list of field names (e.g. "ErrorCode") to 1339 // unconditionally include in API requests. By default, fields with 1340 // empty values are omitted from API requests. However, any non-pointer, 1341 // non-interface field appearing in ForceSendFields will be sent to the 1342 // server regardless of whether the field is empty or not. This may be 1343 // used to include empty fields in Patch requests. 1344 ForceSendFields []string `json:"-"` 1345 1346 // NullFields is a list of field names (e.g. "ErrorCode") to include in 1347 // API requests with the JSON null value. By default, fields with empty 1348 // values are omitted from API requests. However, any field with an 1349 // empty value appearing in NullFields will be sent to the server as 1350 // null. It is an error if a field in this list has a non-empty value. 1351 // This may be used to include null fields in Patch requests. 1352 NullFields []string `json:"-"` 1353} 1354 1355func (s *ErrorHandler) MarshalJSON() ([]byte, error) { 1356 type NoMethod ErrorHandler 1357 raw := NoMethod(*s) 1358 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1359} 1360 1361// FeatureSettings: The feature specific settings to be used in the 1362// application. These define behaviors that are user configurable. 1363type FeatureSettings struct { 1364 // SplitHealthChecks: Boolean value indicating if split health checks 1365 // should be used instead of the legacy health checks. At an app.yaml 1366 // level, this means defaulting to 'readiness_check' and 1367 // 'liveness_check' values instead of 'health_check' ones. Once the 1368 // legacy 'health_check' behavior is deprecated, and this value is 1369 // always true, this setting can be removed. 1370 SplitHealthChecks bool `json:"splitHealthChecks,omitempty"` 1371 1372 // UseContainerOptimizedOs: If true, use Container-Optimized OS 1373 // (https://cloud.google.com/container-optimized-os/) base image for 1374 // VMs, rather than a base Debian image. 1375 UseContainerOptimizedOs bool `json:"useContainerOptimizedOs,omitempty"` 1376 1377 // ForceSendFields is a list of field names (e.g. "SplitHealthChecks") 1378 // to unconditionally include in API requests. By default, fields with 1379 // empty values are omitted from API requests. However, any non-pointer, 1380 // non-interface field appearing in ForceSendFields will be sent to the 1381 // server regardless of whether the field is empty or not. This may be 1382 // used to include empty fields in Patch requests. 1383 ForceSendFields []string `json:"-"` 1384 1385 // NullFields is a list of field names (e.g. "SplitHealthChecks") to 1386 // include in API requests with the JSON null value. By default, fields 1387 // with empty values are omitted from API requests. However, any field 1388 // with an empty value appearing in NullFields will be sent to the 1389 // server as null. It is an error if a field in this list has a 1390 // non-empty value. This may be used to include null fields in Patch 1391 // requests. 1392 NullFields []string `json:"-"` 1393} 1394 1395func (s *FeatureSettings) MarshalJSON() ([]byte, error) { 1396 type NoMethod FeatureSettings 1397 raw := NoMethod(*s) 1398 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1399} 1400 1401// FileInfo: Single source file that is part of the version to be 1402// deployed. Each source file that is deployed must be specified 1403// separately. 1404type FileInfo struct { 1405 // MimeType: The MIME type of the file.Defaults to the value from Google 1406 // Cloud Storage. 1407 MimeType string `json:"mimeType,omitempty"` 1408 1409 // Sha1Sum: The SHA1 hash of the file, in hex. 1410 Sha1Sum string `json:"sha1Sum,omitempty"` 1411 1412 // SourceUrl: URL source to use to fetch this file. Must be a URL to a 1413 // resource in Google Cloud Storage in the form 1414 // 'http(s)://storage.googleapis.com//'. 1415 SourceUrl string `json:"sourceUrl,omitempty"` 1416 1417 // ForceSendFields is a list of field names (e.g. "MimeType") to 1418 // unconditionally include in API requests. By default, fields with 1419 // empty values are omitted from API requests. However, any non-pointer, 1420 // non-interface field appearing in ForceSendFields will be sent to the 1421 // server regardless of whether the field is empty or not. This may be 1422 // used to include empty fields in Patch requests. 1423 ForceSendFields []string `json:"-"` 1424 1425 // NullFields is a list of field names (e.g. "MimeType") to include in 1426 // API requests with the JSON null value. By default, fields with empty 1427 // values are omitted from API requests. However, any field with an 1428 // empty value appearing in NullFields will be sent to the server as 1429 // null. It is an error if a field in this list has a non-empty value. 1430 // This may be used to include null fields in Patch requests. 1431 NullFields []string `json:"-"` 1432} 1433 1434func (s *FileInfo) MarshalJSON() ([]byte, error) { 1435 type NoMethod FileInfo 1436 raw := NoMethod(*s) 1437 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1438} 1439 1440// FirewallRule: A single firewall rule that is evaluated against 1441// incoming traffic and provides an action to take on matched requests. 1442type FirewallRule struct { 1443 // Action: The action to take on matched requests. 1444 // 1445 // Possible values: 1446 // "UNSPECIFIED_ACTION" 1447 // "ALLOW" - Matching requests are allowed. 1448 // "DENY" - Matching requests are denied. 1449 Action string `json:"action,omitempty"` 1450 1451 // Description: An optional string description of this rule. This field 1452 // has a maximum length of 100 characters. 1453 Description string `json:"description,omitempty"` 1454 1455 // Priority: A positive integer between 1, Int32.MaxValue-1 that defines 1456 // the order of rule evaluation. Rules with the lowest priority are 1457 // evaluated first.A default rule at priority Int32.MaxValue matches all 1458 // IPv4 and IPv6 traffic when no previous rule matches. Only the action 1459 // of this rule can be modified by the user. 1460 Priority int64 `json:"priority,omitempty"` 1461 1462 // SourceRange: IP address or range, defined using CIDR notation, of 1463 // requests that this rule applies to. You can use the wildcard 1464 // character "*" to match all IPs equivalent to "0/0" and "::/0" 1465 // together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32 or 1466 // 2001:0db8:0000:0042:0000:8a2e:0370:7334. Truncation will be silently 1467 // performed on addresses which are not properly truncated. For example, 1468 // 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24. Similarly, 1469 // for IPv6, 2001:db8::1/32 is accepted as the same address as 1470 // 2001:db8::/32. 1471 SourceRange string `json:"sourceRange,omitempty"` 1472 1473 // ServerResponse contains the HTTP response code and headers from the 1474 // server. 1475 googleapi.ServerResponse `json:"-"` 1476 1477 // ForceSendFields is a list of field names (e.g. "Action") to 1478 // unconditionally include in API requests. By default, fields with 1479 // empty values are omitted from API requests. However, any non-pointer, 1480 // non-interface field appearing in ForceSendFields will be sent to the 1481 // server regardless of whether the field is empty or not. This may be 1482 // used to include empty fields in Patch requests. 1483 ForceSendFields []string `json:"-"` 1484 1485 // NullFields is a list of field names (e.g. "Action") to include in API 1486 // requests with the JSON null value. By default, fields with empty 1487 // values are omitted from API requests. However, any field with an 1488 // empty value appearing in NullFields will be sent to the server as 1489 // null. It is an error if a field in this list has a non-empty value. 1490 // This may be used to include null fields in Patch requests. 1491 NullFields []string `json:"-"` 1492} 1493 1494func (s *FirewallRule) MarshalJSON() ([]byte, error) { 1495 type NoMethod FirewallRule 1496 raw := NoMethod(*s) 1497 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1498} 1499 1500// GoogleAppengineV1betaLocationMetadata: Metadata for the given 1501// google.cloud.location.Location. 1502type GoogleAppengineV1betaLocationMetadata struct { 1503 // FlexibleEnvironmentAvailable: App Engine flexible environment is 1504 // available in the given location.@OutputOnly 1505 FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"` 1506 1507 // SearchApiAvailable: Output only. Search API 1508 // (https://cloud.google.com/appengine/docs/standard/python/search) is 1509 // available in the given location. 1510 SearchApiAvailable bool `json:"searchApiAvailable,omitempty"` 1511 1512 // StandardEnvironmentAvailable: App Engine standard environment is 1513 // available in the given location.@OutputOnly 1514 StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"` 1515 1516 // ForceSendFields is a list of field names (e.g. 1517 // "FlexibleEnvironmentAvailable") to unconditionally include in API 1518 // requests. By default, fields with empty values are omitted from API 1519 // requests. However, any non-pointer, non-interface field appearing in 1520 // ForceSendFields will be sent to the server regardless of whether the 1521 // field is empty or not. This may be used to include empty fields in 1522 // Patch requests. 1523 ForceSendFields []string `json:"-"` 1524 1525 // NullFields is a list of field names (e.g. 1526 // "FlexibleEnvironmentAvailable") to include in API requests with the 1527 // JSON null value. By default, fields with empty values are omitted 1528 // from API requests. However, any field with an empty value appearing 1529 // in NullFields will be sent to the server as null. It is an error if a 1530 // field in this list has a non-empty value. This may be used to include 1531 // null fields in Patch requests. 1532 NullFields []string `json:"-"` 1533} 1534 1535func (s *GoogleAppengineV1betaLocationMetadata) MarshalJSON() ([]byte, error) { 1536 type NoMethod GoogleAppengineV1betaLocationMetadata 1537 raw := NoMethod(*s) 1538 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1539} 1540 1541// HealthCheck: Health checking configuration for VM instances. 1542// Unhealthy instances are killed and replaced with new instances. Only 1543// applicable for instances in App Engine flexible environment. 1544type HealthCheck struct { 1545 // CheckInterval: Interval between health checks. 1546 CheckInterval string `json:"checkInterval,omitempty"` 1547 1548 // DisableHealthCheck: Whether to explicitly disable health checks for 1549 // this instance. 1550 DisableHealthCheck bool `json:"disableHealthCheck,omitempty"` 1551 1552 // HealthyThreshold: Number of consecutive successful health checks 1553 // required before receiving traffic. 1554 HealthyThreshold int64 `json:"healthyThreshold,omitempty"` 1555 1556 // Host: Host header to send when performing an HTTP health check. 1557 // Example: "myapp.appspot.com" 1558 Host string `json:"host,omitempty"` 1559 1560 // RestartThreshold: Number of consecutive failed health checks required 1561 // before an instance is restarted. 1562 RestartThreshold int64 `json:"restartThreshold,omitempty"` 1563 1564 // Timeout: Time before the health check is considered failed. 1565 Timeout string `json:"timeout,omitempty"` 1566 1567 // UnhealthyThreshold: Number of consecutive failed health checks 1568 // required before removing traffic. 1569 UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` 1570 1571 // ForceSendFields is a list of field names (e.g. "CheckInterval") to 1572 // unconditionally include in API requests. By default, fields with 1573 // empty values are omitted from API requests. However, any non-pointer, 1574 // non-interface field appearing in ForceSendFields will be sent to the 1575 // server regardless of whether the field is empty or not. This may be 1576 // used to include empty fields in Patch requests. 1577 ForceSendFields []string `json:"-"` 1578 1579 // NullFields is a list of field names (e.g. "CheckInterval") to include 1580 // in API requests with the JSON null value. By default, fields with 1581 // empty values are omitted from API requests. However, any field with 1582 // an empty value appearing in NullFields will be sent to the server as 1583 // null. It is an error if a field in this list has a non-empty value. 1584 // This may be used to include null fields in Patch requests. 1585 NullFields []string `json:"-"` 1586} 1587 1588func (s *HealthCheck) MarshalJSON() ([]byte, error) { 1589 type NoMethod HealthCheck 1590 raw := NoMethod(*s) 1591 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1592} 1593 1594// IdentityAwareProxy: Identity-Aware Proxy 1595type IdentityAwareProxy struct { 1596 // Enabled: Whether the serving infrastructure will authenticate and 1597 // authorize all incoming requests.If true, the oauth2_client_id and 1598 // oauth2_client_secret fields must be non-empty. 1599 Enabled bool `json:"enabled,omitempty"` 1600 1601 // Oauth2ClientId: OAuth2 client ID to use for the authentication flow. 1602 Oauth2ClientId string `json:"oauth2ClientId,omitempty"` 1603 1604 // Oauth2ClientSecret: OAuth2 client secret to use for the 1605 // authentication flow.For security reasons, this value cannot be 1606 // retrieved via the API. Instead, the SHA-256 hash of the value is 1607 // returned in the oauth2_client_secret_sha256 field.@InputOnly 1608 Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"` 1609 1610 // Oauth2ClientSecretSha256: Hex-encoded SHA-256 hash of the client 1611 // secret.@OutputOnly 1612 Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"` 1613 1614 // ForceSendFields is a list of field names (e.g. "Enabled") to 1615 // unconditionally include in API requests. By default, fields with 1616 // empty values are omitted from API requests. However, any non-pointer, 1617 // non-interface field appearing in ForceSendFields will be sent to the 1618 // server regardless of whether the field is empty or not. This may be 1619 // used to include empty fields in Patch requests. 1620 ForceSendFields []string `json:"-"` 1621 1622 // NullFields is a list of field names (e.g. "Enabled") to include in 1623 // API requests with the JSON null value. By default, fields with empty 1624 // values are omitted from API requests. However, any field with an 1625 // empty value appearing in NullFields will be sent to the server as 1626 // null. It is an error if a field in this list has a non-empty value. 1627 // This may be used to include null fields in Patch requests. 1628 NullFields []string `json:"-"` 1629} 1630 1631func (s *IdentityAwareProxy) MarshalJSON() ([]byte, error) { 1632 type NoMethod IdentityAwareProxy 1633 raw := NoMethod(*s) 1634 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1635} 1636 1637// Instance: An Instance resource is the computing unit that App Engine 1638// uses to automatically scale an application. 1639type Instance struct { 1640 // AppEngineRelease: Output only. App Engine release this instance is 1641 // running on. 1642 AppEngineRelease string `json:"appEngineRelease,omitempty"` 1643 1644 // Availability: Output only. Availability of the instance. 1645 // 1646 // Possible values: 1647 // "UNSPECIFIED" 1648 // "RESIDENT" 1649 // "DYNAMIC" 1650 Availability string `json:"availability,omitempty"` 1651 1652 // AverageLatency: Output only. Average latency (ms) over the last 1653 // minute. 1654 AverageLatency int64 `json:"averageLatency,omitempty"` 1655 1656 // Errors: Output only. Number of errors since this instance was 1657 // started. 1658 Errors int64 `json:"errors,omitempty"` 1659 1660 // Id: Output only. Relative name of the instance within the version. 1661 // Example: instance-1. 1662 Id string `json:"id,omitempty"` 1663 1664 // MemoryUsage: Output only. Total memory in use (bytes). 1665 MemoryUsage int64 `json:"memoryUsage,omitempty,string"` 1666 1667 // Name: Output only. Full path to the Instance resource in the API. 1668 // Example: 1669 // apps/myapp/services/default/versions/v1/instances/instance-1. 1670 Name string `json:"name,omitempty"` 1671 1672 // Qps: Output only. Average queries per second (QPS) over the last 1673 // minute. 1674 Qps float64 `json:"qps,omitempty"` 1675 1676 // Requests: Output only. Number of requests since this instance was 1677 // started. 1678 Requests int64 `json:"requests,omitempty"` 1679 1680 // StartTime: Output only. Time that this instance was 1681 // started.@OutputOnly 1682 StartTime string `json:"startTime,omitempty"` 1683 1684 // VmDebugEnabled: Output only. Whether this instance is in debug mode. 1685 // Only applicable for instances in App Engine flexible environment. 1686 VmDebugEnabled bool `json:"vmDebugEnabled,omitempty"` 1687 1688 // VmId: Output only. Virtual machine ID of this instance. Only 1689 // applicable for instances in App Engine flexible environment. 1690 VmId string `json:"vmId,omitempty"` 1691 1692 // VmIp: Output only. The IP address of this instance. Only applicable 1693 // for instances in App Engine flexible environment. 1694 VmIp string `json:"vmIp,omitempty"` 1695 1696 // VmLiveness: Output only. The liveness health check of this instance. 1697 // Only applicable for instances in App Engine flexible environment. 1698 // 1699 // Possible values: 1700 // "LIVENESS_STATE_UNSPECIFIED" - There is no liveness health check 1701 // for the instance. Only applicable for instances in App Engine 1702 // standard environment. 1703 // "UNKNOWN" - The health checking system is aware of the instance but 1704 // its health is not known at the moment. 1705 // "HEALTHY" - The instance is reachable i.e. a connection to the 1706 // application health checking endpoint can be established, and conforms 1707 // to the requirements defined by the health check. 1708 // "UNHEALTHY" - The instance is reachable, but does not conform to 1709 // the requirements defined by the health check. 1710 // "DRAINING" - The instance is being drained. The existing 1711 // connections to the instance have time to complete, but the new ones 1712 // are being refused. 1713 // "TIMEOUT" - The instance is unreachable i.e. a connection to the 1714 // application health checking endpoint cannot be established, or the 1715 // server does not respond within the specified timeout. 1716 VmLiveness string `json:"vmLiveness,omitempty"` 1717 1718 // VmName: Output only. Name of the virtual machine where this instance 1719 // lives. Only applicable for instances in App Engine flexible 1720 // environment. 1721 VmName string `json:"vmName,omitempty"` 1722 1723 // VmStatus: Output only. Status of the virtual machine where this 1724 // instance lives. Only applicable for instances in App Engine flexible 1725 // environment. 1726 VmStatus string `json:"vmStatus,omitempty"` 1727 1728 // VmZoneName: Output only. Zone where the virtual machine is located. 1729 // Only applicable for instances in App Engine flexible environment. 1730 VmZoneName string `json:"vmZoneName,omitempty"` 1731 1732 // ServerResponse contains the HTTP response code and headers from the 1733 // server. 1734 googleapi.ServerResponse `json:"-"` 1735 1736 // ForceSendFields is a list of field names (e.g. "AppEngineRelease") to 1737 // unconditionally include in API requests. By default, fields with 1738 // empty values are omitted from API requests. However, any non-pointer, 1739 // non-interface field appearing in ForceSendFields will be sent to the 1740 // server regardless of whether the field is empty or not. This may be 1741 // used to include empty fields in Patch requests. 1742 ForceSendFields []string `json:"-"` 1743 1744 // NullFields is a list of field names (e.g. "AppEngineRelease") to 1745 // include in API requests with the JSON null value. By default, fields 1746 // with empty values are omitted from API requests. However, any field 1747 // with an empty value appearing in NullFields will be sent to the 1748 // server as null. It is an error if a field in this list has a 1749 // non-empty value. This may be used to include null fields in Patch 1750 // requests. 1751 NullFields []string `json:"-"` 1752} 1753 1754func (s *Instance) MarshalJSON() ([]byte, error) { 1755 type NoMethod Instance 1756 raw := NoMethod(*s) 1757 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1758} 1759 1760func (s *Instance) UnmarshalJSON(data []byte) error { 1761 type NoMethod Instance 1762 var s1 struct { 1763 Qps gensupport.JSONFloat64 `json:"qps"` 1764 *NoMethod 1765 } 1766 s1.NoMethod = (*NoMethod)(s) 1767 if err := json.Unmarshal(data, &s1); err != nil { 1768 return err 1769 } 1770 s.Qps = float64(s1.Qps) 1771 return nil 1772} 1773 1774// Library: Third-party Python runtime library that is required by the 1775// application. 1776type Library struct { 1777 // Name: Name of the library. Example: "django". 1778 Name string `json:"name,omitempty"` 1779 1780 // Version: Version of the library to select, or "latest". 1781 Version string `json:"version,omitempty"` 1782 1783 // ForceSendFields is a list of field names (e.g. "Name") to 1784 // unconditionally include in API requests. By default, fields with 1785 // empty values are omitted from API requests. However, any non-pointer, 1786 // non-interface field appearing in ForceSendFields will be sent to the 1787 // server regardless of whether the field is empty or not. This may be 1788 // used to include empty fields in Patch requests. 1789 ForceSendFields []string `json:"-"` 1790 1791 // NullFields is a list of field names (e.g. "Name") to include in API 1792 // requests with the JSON null value. By default, fields with empty 1793 // values are omitted from API requests. However, any field with an 1794 // empty value appearing in NullFields will be sent to the server as 1795 // null. It is an error if a field in this list has a non-empty value. 1796 // This may be used to include null fields in Patch requests. 1797 NullFields []string `json:"-"` 1798} 1799 1800func (s *Library) MarshalJSON() ([]byte, error) { 1801 type NoMethod Library 1802 raw := NoMethod(*s) 1803 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1804} 1805 1806// ListAuthorizedCertificatesResponse: Response message for 1807// AuthorizedCertificates.ListAuthorizedCertificates. 1808type ListAuthorizedCertificatesResponse struct { 1809 // Certificates: The SSL certificates the user is authorized to 1810 // administer. 1811 Certificates []*AuthorizedCertificate `json:"certificates,omitempty"` 1812 1813 // NextPageToken: Continuation token for fetching the next page of 1814 // results. 1815 NextPageToken string `json:"nextPageToken,omitempty"` 1816 1817 // ServerResponse contains the HTTP response code and headers from the 1818 // server. 1819 googleapi.ServerResponse `json:"-"` 1820 1821 // ForceSendFields is a list of field names (e.g. "Certificates") to 1822 // unconditionally include in API requests. By default, fields with 1823 // empty values are omitted from API requests. However, any non-pointer, 1824 // non-interface field appearing in ForceSendFields will be sent to the 1825 // server regardless of whether the field is empty or not. This may be 1826 // used to include empty fields in Patch requests. 1827 ForceSendFields []string `json:"-"` 1828 1829 // NullFields is a list of field names (e.g. "Certificates") to include 1830 // in API requests with the JSON null value. By default, fields with 1831 // empty values are omitted from API requests. However, any field with 1832 // an empty value appearing in NullFields will be sent to the server as 1833 // null. It is an error if a field in this list has a non-empty value. 1834 // This may be used to include null fields in Patch requests. 1835 NullFields []string `json:"-"` 1836} 1837 1838func (s *ListAuthorizedCertificatesResponse) MarshalJSON() ([]byte, error) { 1839 type NoMethod ListAuthorizedCertificatesResponse 1840 raw := NoMethod(*s) 1841 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1842} 1843 1844// ListAuthorizedDomainsResponse: Response message for 1845// AuthorizedDomains.ListAuthorizedDomains. 1846type ListAuthorizedDomainsResponse struct { 1847 // Domains: The authorized domains belonging to the user. 1848 Domains []*AuthorizedDomain `json:"domains,omitempty"` 1849 1850 // NextPageToken: Continuation token for fetching the next page of 1851 // results. 1852 NextPageToken string `json:"nextPageToken,omitempty"` 1853 1854 // ServerResponse contains the HTTP response code and headers from the 1855 // server. 1856 googleapi.ServerResponse `json:"-"` 1857 1858 // ForceSendFields is a list of field names (e.g. "Domains") to 1859 // unconditionally include in API requests. By default, fields with 1860 // empty values are omitted from API requests. However, any non-pointer, 1861 // non-interface field appearing in ForceSendFields will be sent to the 1862 // server regardless of whether the field is empty or not. This may be 1863 // used to include empty fields in Patch requests. 1864 ForceSendFields []string `json:"-"` 1865 1866 // NullFields is a list of field names (e.g. "Domains") to include in 1867 // API requests with the JSON null value. By default, fields with empty 1868 // values are omitted from API requests. However, any field with an 1869 // empty value appearing in NullFields will be sent to the server as 1870 // null. It is an error if a field in this list has a non-empty value. 1871 // This may be used to include null fields in Patch requests. 1872 NullFields []string `json:"-"` 1873} 1874 1875func (s *ListAuthorizedDomainsResponse) MarshalJSON() ([]byte, error) { 1876 type NoMethod ListAuthorizedDomainsResponse 1877 raw := NoMethod(*s) 1878 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1879} 1880 1881// ListDomainMappingsResponse: Response message for 1882// DomainMappings.ListDomainMappings. 1883type ListDomainMappingsResponse struct { 1884 // DomainMappings: The domain mappings for the application. 1885 DomainMappings []*DomainMapping `json:"domainMappings,omitempty"` 1886 1887 // NextPageToken: Continuation token for fetching the next page of 1888 // results. 1889 NextPageToken string `json:"nextPageToken,omitempty"` 1890 1891 // ServerResponse contains the HTTP response code and headers from the 1892 // server. 1893 googleapi.ServerResponse `json:"-"` 1894 1895 // ForceSendFields is a list of field names (e.g. "DomainMappings") to 1896 // unconditionally include in API requests. By default, fields with 1897 // empty values are omitted from API requests. However, any non-pointer, 1898 // non-interface field appearing in ForceSendFields will be sent to the 1899 // server regardless of whether the field is empty or not. This may be 1900 // used to include empty fields in Patch requests. 1901 ForceSendFields []string `json:"-"` 1902 1903 // NullFields is a list of field names (e.g. "DomainMappings") to 1904 // include in API requests with the JSON null value. By default, fields 1905 // with empty values are omitted from API requests. However, any field 1906 // with an empty value appearing in NullFields will be sent to the 1907 // server as null. It is an error if a field in this list has a 1908 // non-empty value. This may be used to include null fields in Patch 1909 // requests. 1910 NullFields []string `json:"-"` 1911} 1912 1913func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) { 1914 type NoMethod ListDomainMappingsResponse 1915 raw := NoMethod(*s) 1916 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1917} 1918 1919// ListIngressRulesResponse: Response message for 1920// Firewall.ListIngressRules. 1921type ListIngressRulesResponse struct { 1922 // IngressRules: The ingress FirewallRules for this application. 1923 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 1924 1925 // NextPageToken: Continuation token for fetching the next page of 1926 // results. 1927 NextPageToken string `json:"nextPageToken,omitempty"` 1928 1929 // ServerResponse contains the HTTP response code and headers from the 1930 // server. 1931 googleapi.ServerResponse `json:"-"` 1932 1933 // ForceSendFields is a list of field names (e.g. "IngressRules") to 1934 // unconditionally include in API requests. By default, fields with 1935 // empty values are omitted from API requests. However, any non-pointer, 1936 // non-interface field appearing in ForceSendFields will be sent to the 1937 // server regardless of whether the field is empty or not. This may be 1938 // used to include empty fields in Patch requests. 1939 ForceSendFields []string `json:"-"` 1940 1941 // NullFields is a list of field names (e.g. "IngressRules") to include 1942 // in API requests with the JSON null value. By default, fields with 1943 // empty values are omitted from API requests. However, any field with 1944 // an empty value appearing in NullFields will be sent to the server as 1945 // null. It is an error if a field in this list has a non-empty value. 1946 // This may be used to include null fields in Patch requests. 1947 NullFields []string `json:"-"` 1948} 1949 1950func (s *ListIngressRulesResponse) MarshalJSON() ([]byte, error) { 1951 type NoMethod ListIngressRulesResponse 1952 raw := NoMethod(*s) 1953 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1954} 1955 1956// ListInstancesResponse: Response message for Instances.ListInstances. 1957type ListInstancesResponse struct { 1958 // Instances: The instances belonging to the requested version. 1959 Instances []*Instance `json:"instances,omitempty"` 1960 1961 // NextPageToken: Continuation token for fetching the next page of 1962 // results. 1963 NextPageToken string `json:"nextPageToken,omitempty"` 1964 1965 // ServerResponse contains the HTTP response code and headers from the 1966 // server. 1967 googleapi.ServerResponse `json:"-"` 1968 1969 // ForceSendFields is a list of field names (e.g. "Instances") to 1970 // unconditionally include in API requests. By default, fields with 1971 // empty values are omitted from API requests. However, any non-pointer, 1972 // non-interface field appearing in ForceSendFields will be sent to the 1973 // server regardless of whether the field is empty or not. This may be 1974 // used to include empty fields in Patch requests. 1975 ForceSendFields []string `json:"-"` 1976 1977 // NullFields is a list of field names (e.g. "Instances") to include in 1978 // API requests with the JSON null value. By default, fields with empty 1979 // values are omitted from API requests. However, any field with an 1980 // empty value appearing in NullFields will be sent to the server as 1981 // null. It is an error if a field in this list has a non-empty value. 1982 // This may be used to include null fields in Patch requests. 1983 NullFields []string `json:"-"` 1984} 1985 1986func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) { 1987 type NoMethod ListInstancesResponse 1988 raw := NoMethod(*s) 1989 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1990} 1991 1992// ListLocationsResponse: The response message for 1993// Locations.ListLocations. 1994type ListLocationsResponse struct { 1995 // Locations: A list of locations that matches the specified filter in 1996 // the request. 1997 Locations []*Location `json:"locations,omitempty"` 1998 1999 // NextPageToken: The standard List next-page token. 2000 NextPageToken string `json:"nextPageToken,omitempty"` 2001 2002 // ServerResponse contains the HTTP response code and headers from the 2003 // server. 2004 googleapi.ServerResponse `json:"-"` 2005 2006 // ForceSendFields is a list of field names (e.g. "Locations") to 2007 // unconditionally include in API requests. By default, fields with 2008 // empty values are omitted from API requests. However, any non-pointer, 2009 // non-interface field appearing in ForceSendFields will be sent to the 2010 // server regardless of whether the field is empty or not. This may be 2011 // used to include empty fields in Patch requests. 2012 ForceSendFields []string `json:"-"` 2013 2014 // NullFields is a list of field names (e.g. "Locations") to include in 2015 // API requests with the JSON null value. By default, fields with empty 2016 // values are omitted from API requests. However, any field with an 2017 // empty value appearing in NullFields will be sent to the server as 2018 // null. It is an error if a field in this list has a non-empty value. 2019 // This may be used to include null fields in Patch requests. 2020 NullFields []string `json:"-"` 2021} 2022 2023func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 2024 type NoMethod ListLocationsResponse 2025 raw := NoMethod(*s) 2026 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2027} 2028 2029// ListOperationsResponse: The response message for 2030// Operations.ListOperations. 2031type ListOperationsResponse struct { 2032 // NextPageToken: The standard List next-page token. 2033 NextPageToken string `json:"nextPageToken,omitempty"` 2034 2035 // Operations: A list of operations that matches the specified filter in 2036 // the request. 2037 Operations []*Operation `json:"operations,omitempty"` 2038 2039 // ServerResponse contains the HTTP response code and headers from the 2040 // server. 2041 googleapi.ServerResponse `json:"-"` 2042 2043 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2044 // unconditionally include in API requests. By default, fields with 2045 // empty values are omitted from API requests. However, any non-pointer, 2046 // non-interface field appearing in ForceSendFields will be sent to the 2047 // server regardless of whether the field is empty or not. This may be 2048 // used to include empty fields in Patch requests. 2049 ForceSendFields []string `json:"-"` 2050 2051 // NullFields is a list of field names (e.g. "NextPageToken") to include 2052 // in API requests with the JSON null value. By default, fields with 2053 // empty values are omitted from API requests. However, any field with 2054 // an empty value appearing in NullFields will be sent to the server as 2055 // null. It is an error if a field in this list has a non-empty value. 2056 // This may be used to include null fields in Patch requests. 2057 NullFields []string `json:"-"` 2058} 2059 2060func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 2061 type NoMethod ListOperationsResponse 2062 raw := NoMethod(*s) 2063 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2064} 2065 2066// ListServicesResponse: Response message for Services.ListServices. 2067type ListServicesResponse struct { 2068 // NextPageToken: Continuation token for fetching the next page of 2069 // results. 2070 NextPageToken string `json:"nextPageToken,omitempty"` 2071 2072 // Services: The services belonging to the requested application. 2073 Services []*Service `json:"services,omitempty"` 2074 2075 // ServerResponse contains the HTTP response code and headers from the 2076 // server. 2077 googleapi.ServerResponse `json:"-"` 2078 2079 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2080 // unconditionally include in API requests. By default, fields with 2081 // empty values are omitted from API requests. However, any non-pointer, 2082 // non-interface field appearing in ForceSendFields will be sent to the 2083 // server regardless of whether the field is empty or not. This may be 2084 // used to include empty fields in Patch requests. 2085 ForceSendFields []string `json:"-"` 2086 2087 // NullFields is a list of field names (e.g. "NextPageToken") to include 2088 // in API requests with the JSON null value. By default, fields with 2089 // empty values are omitted from API requests. However, any field with 2090 // an empty value appearing in NullFields will be sent to the server as 2091 // null. It is an error if a field in this list has a non-empty value. 2092 // This may be used to include null fields in Patch requests. 2093 NullFields []string `json:"-"` 2094} 2095 2096func (s *ListServicesResponse) MarshalJSON() ([]byte, error) { 2097 type NoMethod ListServicesResponse 2098 raw := NoMethod(*s) 2099 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2100} 2101 2102// ListVersionsResponse: Response message for Versions.ListVersions. 2103type ListVersionsResponse struct { 2104 // NextPageToken: Continuation token for fetching the next page of 2105 // results. 2106 NextPageToken string `json:"nextPageToken,omitempty"` 2107 2108 // Versions: The versions belonging to the requested service. 2109 Versions []*Version `json:"versions,omitempty"` 2110 2111 // ServerResponse contains the HTTP response code and headers from the 2112 // server. 2113 googleapi.ServerResponse `json:"-"` 2114 2115 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2116 // unconditionally include in API requests. By default, fields with 2117 // empty values are omitted from API requests. However, any non-pointer, 2118 // non-interface field appearing in ForceSendFields will be sent to the 2119 // server regardless of whether the field is empty or not. This may be 2120 // used to include empty fields in Patch requests. 2121 ForceSendFields []string `json:"-"` 2122 2123 // NullFields is a list of field names (e.g. "NextPageToken") to include 2124 // in API requests with the JSON null value. By default, fields with 2125 // empty values are omitted from API requests. However, any field with 2126 // an empty value appearing in NullFields will be sent to the server as 2127 // null. It is an error if a field in this list has a non-empty value. 2128 // This may be used to include null fields in Patch requests. 2129 NullFields []string `json:"-"` 2130} 2131 2132func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) { 2133 type NoMethod ListVersionsResponse 2134 raw := NoMethod(*s) 2135 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2136} 2137 2138// LivenessCheck: Health checking configuration for VM instances. 2139// Unhealthy instances are killed and replaced with new instances. 2140type LivenessCheck struct { 2141 // CheckInterval: Interval between health checks. 2142 CheckInterval string `json:"checkInterval,omitempty"` 2143 2144 // FailureThreshold: Number of consecutive failed checks required before 2145 // considering the VM unhealthy. 2146 FailureThreshold int64 `json:"failureThreshold,omitempty"` 2147 2148 // Host: Host header to send when performing a HTTP Liveness check. 2149 // Example: "myapp.appspot.com" 2150 Host string `json:"host,omitempty"` 2151 2152 // InitialDelay: The initial delay before starting to execute the 2153 // checks. 2154 InitialDelay string `json:"initialDelay,omitempty"` 2155 2156 // Path: The request path. 2157 Path string `json:"path,omitempty"` 2158 2159 // SuccessThreshold: Number of consecutive successful checks required 2160 // before considering the VM healthy. 2161 SuccessThreshold int64 `json:"successThreshold,omitempty"` 2162 2163 // Timeout: Time before the check is considered failed. 2164 Timeout string `json:"timeout,omitempty"` 2165 2166 // ForceSendFields is a list of field names (e.g. "CheckInterval") to 2167 // unconditionally include in API requests. By default, fields with 2168 // empty values are omitted from API requests. However, any non-pointer, 2169 // non-interface field appearing in ForceSendFields will be sent to the 2170 // server regardless of whether the field is empty or not. This may be 2171 // used to include empty fields in Patch requests. 2172 ForceSendFields []string `json:"-"` 2173 2174 // NullFields is a list of field names (e.g. "CheckInterval") to include 2175 // in API requests with the JSON null value. By default, fields with 2176 // empty values are omitted from API requests. However, any field with 2177 // an empty value appearing in NullFields will be sent to the server as 2178 // null. It is an error if a field in this list has a non-empty value. 2179 // This may be used to include null fields in Patch requests. 2180 NullFields []string `json:"-"` 2181} 2182 2183func (s *LivenessCheck) MarshalJSON() ([]byte, error) { 2184 type NoMethod LivenessCheck 2185 raw := NoMethod(*s) 2186 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2187} 2188 2189// Location: A resource that represents Google Cloud Platform location. 2190type Location struct { 2191 // DisplayName: The friendly name for this location, typically a nearby 2192 // city name. For example, "Tokyo". 2193 DisplayName string `json:"displayName,omitempty"` 2194 2195 // Labels: Cross-service attributes for the location. For example 2196 // {"cloud.googleapis.com/region": "us-east1"} 2197 Labels map[string]string `json:"labels,omitempty"` 2198 2199 // LocationId: The canonical id for this location. For example: 2200 // "us-east1". 2201 LocationId string `json:"locationId,omitempty"` 2202 2203 // Metadata: Service-specific metadata. For example the available 2204 // capacity at the given location. 2205 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 2206 2207 // Name: Resource name for the location, which may vary between 2208 // implementations. For example: 2209 // "projects/example-project/locations/us-east1" 2210 Name string `json:"name,omitempty"` 2211 2212 // ServerResponse contains the HTTP response code and headers from the 2213 // server. 2214 googleapi.ServerResponse `json:"-"` 2215 2216 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2217 // unconditionally include in API requests. By default, fields with 2218 // empty values are omitted from API requests. However, any non-pointer, 2219 // non-interface field appearing in ForceSendFields will be sent to the 2220 // server regardless of whether the field is empty or not. This may be 2221 // used to include empty fields in Patch requests. 2222 ForceSendFields []string `json:"-"` 2223 2224 // NullFields is a list of field names (e.g. "DisplayName") to include 2225 // in API requests with the JSON null value. By default, fields with 2226 // empty values are omitted from API requests. However, any field with 2227 // an empty value appearing in NullFields will be sent to the server as 2228 // null. It is an error if a field in this list has a non-empty value. 2229 // This may be used to include null fields in Patch requests. 2230 NullFields []string `json:"-"` 2231} 2232 2233func (s *Location) MarshalJSON() ([]byte, error) { 2234 type NoMethod Location 2235 raw := NoMethod(*s) 2236 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2237} 2238 2239// LocationMetadata: Metadata for the given 2240// google.cloud.location.Location. 2241type LocationMetadata struct { 2242 // FlexibleEnvironmentAvailable: App Engine flexible environment is 2243 // available in the given location.@OutputOnly 2244 FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"` 2245 2246 // SearchApiAvailable: Output only. Search API 2247 // (https://cloud.google.com/appengine/docs/standard/python/search) is 2248 // available in the given location. 2249 SearchApiAvailable bool `json:"searchApiAvailable,omitempty"` 2250 2251 // StandardEnvironmentAvailable: App Engine standard environment is 2252 // available in the given location.@OutputOnly 2253 StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"` 2254 2255 // ForceSendFields is a list of field names (e.g. 2256 // "FlexibleEnvironmentAvailable") to unconditionally include in API 2257 // requests. By default, fields with empty values are omitted from API 2258 // requests. However, any non-pointer, non-interface field appearing in 2259 // ForceSendFields will be sent to the server regardless of whether the 2260 // field is empty or not. This may be used to include empty fields in 2261 // Patch requests. 2262 ForceSendFields []string `json:"-"` 2263 2264 // NullFields is a list of field names (e.g. 2265 // "FlexibleEnvironmentAvailable") to include in API requests with the 2266 // JSON null value. By default, fields with empty values are omitted 2267 // from API requests. However, any field with an empty value appearing 2268 // in NullFields will be sent to the server as null. It is an error if a 2269 // field in this list has a non-empty value. This may be used to include 2270 // null fields in Patch requests. 2271 NullFields []string `json:"-"` 2272} 2273 2274func (s *LocationMetadata) MarshalJSON() ([]byte, error) { 2275 type NoMethod LocationMetadata 2276 raw := NoMethod(*s) 2277 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2278} 2279 2280// ManagedCertificate: A certificate managed by App Engine. 2281type ManagedCertificate struct { 2282 // LastRenewalTime: Time at which the certificate was last renewed. The 2283 // renewal process is fully managed. Certificate renewal will 2284 // automatically occur before the certificate expires. Renewal errors 2285 // can be tracked via ManagementStatus.@OutputOnly 2286 LastRenewalTime string `json:"lastRenewalTime,omitempty"` 2287 2288 // Status: Status of certificate management. Refers to the most recent 2289 // certificate acquisition or renewal attempt.@OutputOnly 2290 // 2291 // Possible values: 2292 // "MANAGEMENT_STATUS_UNSPECIFIED" 2293 // "OK" - Certificate was successfully obtained and inserted into the 2294 // serving system. 2295 // "PENDING" - Certificate is under active attempts to acquire or 2296 // renew. 2297 // "FAILED_RETRYING_NOT_VISIBLE" - Most recent renewal failed due to 2298 // an invalid DNS setup and will be retried. Renewal attempts will 2299 // continue to fail until the certificate domain's DNS configuration is 2300 // fixed. The last successfully provisioned certificate may still be 2301 // serving. 2302 // "FAILED_PERMANENT" - All renewal attempts have been exhausted, 2303 // likely due to an invalid DNS setup. 2304 // "FAILED_RETRYING_CAA_FORBIDDEN" - Most recent renewal failed due to 2305 // an explicit CAA record that does not include one of the in-use CAs 2306 // (Google CA and Let's Encrypt). Renewals will continue to fail until 2307 // the CAA is reconfigured. The last successfully provisioned 2308 // certificate may still be serving. 2309 // "FAILED_RETRYING_CAA_CHECKING" - Most recent renewal failed due to 2310 // a CAA retrieval failure. This means that the domain's DNS provider 2311 // does not properly handle CAA records, failing requests for CAA 2312 // records when no CAA records are defined. Renewals will continue to 2313 // fail until the DNS provider is changed or a CAA record is added for 2314 // the given domain. The last successfully provisioned certificate may 2315 // still be serving. 2316 Status string `json:"status,omitempty"` 2317 2318 // ForceSendFields is a list of field names (e.g. "LastRenewalTime") to 2319 // unconditionally include in API requests. By default, fields with 2320 // empty values are omitted from API requests. However, any non-pointer, 2321 // non-interface field appearing in ForceSendFields will be sent to the 2322 // server regardless of whether the field is empty or not. This may be 2323 // used to include empty fields in Patch requests. 2324 ForceSendFields []string `json:"-"` 2325 2326 // NullFields is a list of field names (e.g. "LastRenewalTime") to 2327 // include in API requests with the JSON null value. By default, fields 2328 // with empty values are omitted from API requests. However, any field 2329 // with an empty value appearing in NullFields will be sent to the 2330 // server as null. It is an error if a field in this list has a 2331 // non-empty value. This may be used to include null fields in Patch 2332 // requests. 2333 NullFields []string `json:"-"` 2334} 2335 2336func (s *ManagedCertificate) MarshalJSON() ([]byte, error) { 2337 type NoMethod ManagedCertificate 2338 raw := NoMethod(*s) 2339 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2340} 2341 2342// ManualScaling: A service with manual scaling runs continuously, 2343// allowing you to perform complex initialization and rely on the state 2344// of its memory over time. 2345type ManualScaling struct { 2346 // Instances: Number of instances to assign to the service at the start. 2347 // This number can later be altered by using the Modules API 2348 // (https://cloud.google.com/appengine/docs/python/modules/functions) 2349 // set_num_instances() function. 2350 Instances int64 `json:"instances,omitempty"` 2351 2352 // ForceSendFields is a list of field names (e.g. "Instances") to 2353 // unconditionally include in API requests. By default, fields with 2354 // empty values are omitted from API requests. However, any non-pointer, 2355 // non-interface field appearing in ForceSendFields will be sent to the 2356 // server regardless of whether the field is empty or not. This may be 2357 // used to include empty fields in Patch requests. 2358 ForceSendFields []string `json:"-"` 2359 2360 // NullFields is a list of field names (e.g. "Instances") to include in 2361 // API requests with the JSON null value. By default, fields with empty 2362 // values are omitted from API requests. However, any field with an 2363 // empty value appearing in NullFields will be sent to the server as 2364 // null. It is an error if a field in this list has a non-empty value. 2365 // This may be used to include null fields in Patch requests. 2366 NullFields []string `json:"-"` 2367} 2368 2369func (s *ManualScaling) MarshalJSON() ([]byte, error) { 2370 type NoMethod ManualScaling 2371 raw := NoMethod(*s) 2372 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2373} 2374 2375// Network: Extra network settings. Only applicable in the App Engine 2376// flexible environment. 2377type Network struct { 2378 // ForwardedPorts: List of ports, or port pairs, to forward from the 2379 // virtual machine to the application container. Only applicable in the 2380 // App Engine flexible environment. 2381 ForwardedPorts []string `json:"forwardedPorts,omitempty"` 2382 2383 // InstanceTag: Tag to apply to the instance during creation. Only 2384 // applicable in the App Engine flexible environment. 2385 InstanceTag string `json:"instanceTag,omitempty"` 2386 2387 // Name: Google Compute Engine network where the virtual machines are 2388 // created. Specify the short name, not the resource path.Defaults to 2389 // default. 2390 Name string `json:"name,omitempty"` 2391 2392 // SessionAffinity: Enable session affinity. Only applicable in the App 2393 // Engine flexible environment. 2394 SessionAffinity bool `json:"sessionAffinity,omitempty"` 2395 2396 // SubnetworkName: Google Cloud Platform sub-network where the virtual 2397 // machines are created. Specify the short name, not the resource 2398 // path.If a subnetwork name is specified, a network name will also be 2399 // required unless it is for the default network. If the network that 2400 // the instance is being created in is a Legacy network, then the IP 2401 // address is allocated from the IPv4Range. If the network that the 2402 // instance is being created in is an auto Subnet Mode Network, then 2403 // only network name should be specified (not the subnetwork_name) and 2404 // the IP address is created from the IPCidrRange of the subnetwork that 2405 // exists in that zone for that network. If the network that the 2406 // instance is being created in is a custom Subnet Mode Network, then 2407 // the subnetwork_name must be specified and the IP address is created 2408 // from the IPCidrRange of the subnetwork.If specified, the subnetwork 2409 // must exist in the same region as the App Engine flexible environment 2410 // application. 2411 SubnetworkName string `json:"subnetworkName,omitempty"` 2412 2413 // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to 2414 // unconditionally include in API requests. By default, fields with 2415 // empty values are omitted from API requests. However, any non-pointer, 2416 // non-interface field appearing in ForceSendFields will be sent to the 2417 // server regardless of whether the field is empty or not. This may be 2418 // used to include empty fields in Patch requests. 2419 ForceSendFields []string `json:"-"` 2420 2421 // NullFields is a list of field names (e.g. "ForwardedPorts") to 2422 // include in API requests with the JSON null value. By default, fields 2423 // with empty values are omitted from API requests. However, any field 2424 // with an empty value appearing in NullFields will be sent to the 2425 // server as null. It is an error if a field in this list has a 2426 // non-empty value. This may be used to include null fields in Patch 2427 // requests. 2428 NullFields []string `json:"-"` 2429} 2430 2431func (s *Network) MarshalJSON() ([]byte, error) { 2432 type NoMethod Network 2433 raw := NoMethod(*s) 2434 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2435} 2436 2437// NetworkSettings: A NetworkSettings resource is a container for 2438// ingress settings for a version or service. 2439type NetworkSettings struct { 2440 // IngressTrafficAllowed: The ingress settings for version or service. 2441 // 2442 // Possible values: 2443 // "INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED" - Unspecified 2444 // "INGRESS_TRAFFIC_ALLOWED_ALL" - Allow HTTP traffic from public and 2445 // private sources. 2446 // "INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY" - Allow HTTP traffic from 2447 // only private VPC sources. 2448 // "INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB" - Allow HTTP traffic from 2449 // private VPC sources and through load balancers. 2450 IngressTrafficAllowed string `json:"ingressTrafficAllowed,omitempty"` 2451 2452 // ForceSendFields is a list of field names (e.g. 2453 // "IngressTrafficAllowed") to unconditionally include in API requests. 2454 // By default, fields with empty values are omitted from API requests. 2455 // However, any non-pointer, non-interface field appearing in 2456 // ForceSendFields will be sent to the server regardless of whether the 2457 // field is empty or not. This may be used to include empty fields in 2458 // Patch requests. 2459 ForceSendFields []string `json:"-"` 2460 2461 // NullFields is a list of field names (e.g. "IngressTrafficAllowed") to 2462 // include in API requests with the JSON null value. By default, fields 2463 // with empty values are omitted from API requests. However, any field 2464 // with an empty value appearing in NullFields will be sent to the 2465 // server as null. It is an error if a field in this list has a 2466 // non-empty value. This may be used to include null fields in Patch 2467 // requests. 2468 NullFields []string `json:"-"` 2469} 2470 2471func (s *NetworkSettings) MarshalJSON() ([]byte, error) { 2472 type NoMethod NetworkSettings 2473 raw := NoMethod(*s) 2474 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2475} 2476 2477// NetworkUtilization: Target scaling by network usage. Only applicable 2478// in the App Engine flexible environment. 2479type NetworkUtilization struct { 2480 // TargetReceivedBytesPerSecond: Target bytes received per second. 2481 TargetReceivedBytesPerSecond int64 `json:"targetReceivedBytesPerSecond,omitempty"` 2482 2483 // TargetReceivedPacketsPerSecond: Target packets received per second. 2484 TargetReceivedPacketsPerSecond int64 `json:"targetReceivedPacketsPerSecond,omitempty"` 2485 2486 // TargetSentBytesPerSecond: Target bytes sent per second. 2487 TargetSentBytesPerSecond int64 `json:"targetSentBytesPerSecond,omitempty"` 2488 2489 // TargetSentPacketsPerSecond: Target packets sent per second. 2490 TargetSentPacketsPerSecond int64 `json:"targetSentPacketsPerSecond,omitempty"` 2491 2492 // ForceSendFields is a list of field names (e.g. 2493 // "TargetReceivedBytesPerSecond") to unconditionally include in API 2494 // requests. By default, fields with empty values are omitted from API 2495 // requests. However, any non-pointer, non-interface field appearing in 2496 // ForceSendFields will be sent to the server regardless of whether the 2497 // field is empty or not. This may be used to include empty fields in 2498 // Patch requests. 2499 ForceSendFields []string `json:"-"` 2500 2501 // NullFields is a list of field names (e.g. 2502 // "TargetReceivedBytesPerSecond") to include in API requests with the 2503 // JSON null value. By default, fields with empty values are omitted 2504 // from API requests. However, any field with an empty value appearing 2505 // in NullFields will be sent to the server as null. It is an error if a 2506 // field in this list has a non-empty value. This may be used to include 2507 // null fields in Patch requests. 2508 NullFields []string `json:"-"` 2509} 2510 2511func (s *NetworkUtilization) MarshalJSON() ([]byte, error) { 2512 type NoMethod NetworkUtilization 2513 raw := NoMethod(*s) 2514 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2515} 2516 2517// Operation: This resource represents a long-running operation that is 2518// the result of a network API call. 2519type Operation struct { 2520 // Done: If the value is false, it means the operation is still in 2521 // progress. If true, the operation is completed, and either error or 2522 // response is available. 2523 Done bool `json:"done,omitempty"` 2524 2525 // Error: The error result of the operation in case of failure or 2526 // cancellation. 2527 Error *Status `json:"error,omitempty"` 2528 2529 // Metadata: Service-specific metadata associated with the operation. It 2530 // typically contains progress information and common metadata such as 2531 // create time. Some services might not provide such metadata. Any 2532 // method that returns a long-running operation should document the 2533 // metadata type, if any. 2534 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 2535 2536 // Name: The server-assigned name, which is only unique within the same 2537 // service that originally returns it. If you use the default HTTP 2538 // mapping, the name should be a resource name ending with 2539 // operations/{unique_id}. 2540 Name string `json:"name,omitempty"` 2541 2542 // Response: The normal response of the operation in case of success. If 2543 // the original method returns no data on success, such as Delete, the 2544 // response is google.protobuf.Empty. If the original method is standard 2545 // Get/Create/Update, the response should be the resource. For other 2546 // methods, the response should have the type XxxResponse, where Xxx is 2547 // the original method name. For example, if the original method name is 2548 // TakeSnapshot(), the inferred response type is TakeSnapshotResponse. 2549 Response googleapi.RawMessage `json:"response,omitempty"` 2550 2551 // ServerResponse contains the HTTP response code and headers from the 2552 // server. 2553 googleapi.ServerResponse `json:"-"` 2554 2555 // ForceSendFields is a list of field names (e.g. "Done") to 2556 // unconditionally include in API requests. By default, fields with 2557 // empty values are omitted from API requests. However, any non-pointer, 2558 // non-interface field appearing in ForceSendFields will be sent to the 2559 // server regardless of whether the field is empty or not. This may be 2560 // used to include empty fields in Patch requests. 2561 ForceSendFields []string `json:"-"` 2562 2563 // NullFields is a list of field names (e.g. "Done") to include in API 2564 // requests with the JSON null value. By default, fields with empty 2565 // values are omitted from API requests. However, any field with an 2566 // empty value appearing in NullFields will be sent to the server as 2567 // null. It is an error if a field in this list has a non-empty value. 2568 // This may be used to include null fields in Patch requests. 2569 NullFields []string `json:"-"` 2570} 2571 2572func (s *Operation) MarshalJSON() ([]byte, error) { 2573 type NoMethod Operation 2574 raw := NoMethod(*s) 2575 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2576} 2577 2578// OperationMetadataV1: Metadata for the given 2579// google.longrunning.Operation. 2580type OperationMetadataV1 struct { 2581 CreateVersionMetadata *CreateVersionMetadataV1 `json:"createVersionMetadata,omitempty"` 2582 2583 // EndTime: Time that this operation completed.@OutputOnly 2584 EndTime string `json:"endTime,omitempty"` 2585 2586 // EphemeralMessage: Ephemeral message that may change every time the 2587 // operation is polled. @OutputOnly 2588 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2589 2590 // InsertTime: Time that this operation was created.@OutputOnly 2591 InsertTime string `json:"insertTime,omitempty"` 2592 2593 // Method: API method that initiated this operation. Example: 2594 // google.appengine.v1.Versions.CreateVersion.@OutputOnly 2595 Method string `json:"method,omitempty"` 2596 2597 // Target: Name of the resource that this operation is acting on. 2598 // Example: apps/myapp/services/default.@OutputOnly 2599 Target string `json:"target,omitempty"` 2600 2601 // User: User who requested this operation.@OutputOnly 2602 User string `json:"user,omitempty"` 2603 2604 // Warning: Durable messages that persist on every operation poll. 2605 // @OutputOnly 2606 Warning []string `json:"warning,omitempty"` 2607 2608 // ForceSendFields is a list of field names (e.g. 2609 // "CreateVersionMetadata") to unconditionally include in API requests. 2610 // By default, fields with empty values are omitted from API requests. 2611 // However, any non-pointer, non-interface field appearing in 2612 // ForceSendFields will be sent to the server regardless of whether the 2613 // field is empty or not. This may be used to include empty fields in 2614 // Patch requests. 2615 ForceSendFields []string `json:"-"` 2616 2617 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2618 // include in API requests with the JSON null value. By default, fields 2619 // with empty values are omitted from API requests. However, any field 2620 // with an empty value appearing in NullFields will be sent to the 2621 // server as null. It is an error if a field in this list has a 2622 // non-empty value. This may be used to include null fields in Patch 2623 // requests. 2624 NullFields []string `json:"-"` 2625} 2626 2627func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) { 2628 type NoMethod OperationMetadataV1 2629 raw := NoMethod(*s) 2630 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2631} 2632 2633// OperationMetadataV1Alpha: Metadata for the given 2634// google.longrunning.Operation. 2635type OperationMetadataV1Alpha struct { 2636 CreateVersionMetadata *CreateVersionMetadataV1Alpha `json:"createVersionMetadata,omitempty"` 2637 2638 // EndTime: Time that this operation completed.@OutputOnly 2639 EndTime string `json:"endTime,omitempty"` 2640 2641 // EphemeralMessage: Ephemeral message that may change every time the 2642 // operation is polled. @OutputOnly 2643 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2644 2645 // InsertTime: Time that this operation was created.@OutputOnly 2646 InsertTime string `json:"insertTime,omitempty"` 2647 2648 // Method: API method that initiated this operation. Example: 2649 // google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly 2650 Method string `json:"method,omitempty"` 2651 2652 // Target: Name of the resource that this operation is acting on. 2653 // Example: apps/myapp/services/default.@OutputOnly 2654 Target string `json:"target,omitempty"` 2655 2656 // User: User who requested this operation.@OutputOnly 2657 User string `json:"user,omitempty"` 2658 2659 // Warning: Durable messages that persist on every operation poll. 2660 // @OutputOnly 2661 Warning []string `json:"warning,omitempty"` 2662 2663 // ForceSendFields is a list of field names (e.g. 2664 // "CreateVersionMetadata") to unconditionally include in API requests. 2665 // By default, fields with empty values are omitted from API requests. 2666 // However, any non-pointer, non-interface field appearing in 2667 // ForceSendFields will be sent to the server regardless of whether the 2668 // field is empty or not. This may be used to include empty fields in 2669 // Patch requests. 2670 ForceSendFields []string `json:"-"` 2671 2672 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2673 // include in API requests with the JSON null value. By default, fields 2674 // with empty values are omitted from API requests. However, any field 2675 // with an empty value appearing in NullFields will be sent to the 2676 // server as null. It is an error if a field in this list has a 2677 // non-empty value. This may be used to include null fields in Patch 2678 // requests. 2679 NullFields []string `json:"-"` 2680} 2681 2682func (s *OperationMetadataV1Alpha) MarshalJSON() ([]byte, error) { 2683 type NoMethod OperationMetadataV1Alpha 2684 raw := NoMethod(*s) 2685 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2686} 2687 2688// OperationMetadataV1Beta: Metadata for the given 2689// google.longrunning.Operation. 2690type OperationMetadataV1Beta struct { 2691 CreateVersionMetadata *CreateVersionMetadataV1Beta `json:"createVersionMetadata,omitempty"` 2692 2693 // EndTime: Time that this operation completed.@OutputOnly 2694 EndTime string `json:"endTime,omitempty"` 2695 2696 // EphemeralMessage: Ephemeral message that may change every time the 2697 // operation is polled. @OutputOnly 2698 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2699 2700 // InsertTime: Time that this operation was created.@OutputOnly 2701 InsertTime string `json:"insertTime,omitempty"` 2702 2703 // Method: API method that initiated this operation. Example: 2704 // google.appengine.v1beta.Versions.CreateVersion.@OutputOnly 2705 Method string `json:"method,omitempty"` 2706 2707 // Target: Name of the resource that this operation is acting on. 2708 // Example: apps/myapp/services/default.@OutputOnly 2709 Target string `json:"target,omitempty"` 2710 2711 // User: User who requested this operation.@OutputOnly 2712 User string `json:"user,omitempty"` 2713 2714 // Warning: Durable messages that persist on every operation poll. 2715 // @OutputOnly 2716 Warning []string `json:"warning,omitempty"` 2717 2718 // ForceSendFields is a list of field names (e.g. 2719 // "CreateVersionMetadata") to unconditionally include in API requests. 2720 // By default, fields with empty values are omitted from API requests. 2721 // However, any non-pointer, non-interface field appearing in 2722 // ForceSendFields will be sent to the server regardless of whether the 2723 // field is empty or not. This may be used to include empty fields in 2724 // Patch requests. 2725 ForceSendFields []string `json:"-"` 2726 2727 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2728 // include in API requests with the JSON null value. By default, fields 2729 // with empty values are omitted from API requests. However, any field 2730 // with an empty value appearing in NullFields will be sent to the 2731 // server as null. It is an error if a field in this list has a 2732 // non-empty value. This may be used to include null fields in Patch 2733 // requests. 2734 NullFields []string `json:"-"` 2735} 2736 2737func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) { 2738 type NoMethod OperationMetadataV1Beta 2739 raw := NoMethod(*s) 2740 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2741} 2742 2743// ReadinessCheck: Readiness checking configuration for VM instances. 2744// Unhealthy instances are removed from traffic rotation. 2745type ReadinessCheck struct { 2746 // AppStartTimeout: A maximum time limit on application initialization, 2747 // measured from moment the application successfully replies to a 2748 // healthcheck until it is ready to serve traffic. 2749 AppStartTimeout string `json:"appStartTimeout,omitempty"` 2750 2751 // CheckInterval: Interval between health checks. 2752 CheckInterval string `json:"checkInterval,omitempty"` 2753 2754 // FailureThreshold: Number of consecutive failed checks required before 2755 // removing traffic. 2756 FailureThreshold int64 `json:"failureThreshold,omitempty"` 2757 2758 // Host: Host header to send when performing a HTTP Readiness check. 2759 // Example: "myapp.appspot.com" 2760 Host string `json:"host,omitempty"` 2761 2762 // Path: The request path. 2763 Path string `json:"path,omitempty"` 2764 2765 // SuccessThreshold: Number of consecutive successful checks required 2766 // before receiving traffic. 2767 SuccessThreshold int64 `json:"successThreshold,omitempty"` 2768 2769 // Timeout: Time before the check is considered failed. 2770 Timeout string `json:"timeout,omitempty"` 2771 2772 // ForceSendFields is a list of field names (e.g. "AppStartTimeout") to 2773 // unconditionally include in API requests. By default, fields with 2774 // empty values are omitted from API requests. However, any non-pointer, 2775 // non-interface field appearing in ForceSendFields will be sent to the 2776 // server regardless of whether the field is empty or not. This may be 2777 // used to include empty fields in Patch requests. 2778 ForceSendFields []string `json:"-"` 2779 2780 // NullFields is a list of field names (e.g. "AppStartTimeout") to 2781 // include in API requests with the JSON null value. By default, fields 2782 // with empty values are omitted from API requests. However, any field 2783 // with an empty value appearing in NullFields will be sent to the 2784 // server as null. It is an error if a field in this list has a 2785 // non-empty value. This may be used to include null fields in Patch 2786 // requests. 2787 NullFields []string `json:"-"` 2788} 2789 2790func (s *ReadinessCheck) MarshalJSON() ([]byte, error) { 2791 type NoMethod ReadinessCheck 2792 raw := NoMethod(*s) 2793 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2794} 2795 2796// RepairApplicationRequest: Request message for 2797// 'Applications.RepairApplication'. 2798type RepairApplicationRequest struct { 2799} 2800 2801// RequestUtilization: Target scaling by request utilization. Only 2802// applicable in the App Engine flexible environment. 2803type RequestUtilization struct { 2804 // TargetConcurrentRequests: Target number of concurrent requests. 2805 TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"` 2806 2807 // TargetRequestCountPerSecond: Target requests per second. 2808 TargetRequestCountPerSecond int64 `json:"targetRequestCountPerSecond,omitempty"` 2809 2810 // ForceSendFields is a list of field names (e.g. 2811 // "TargetConcurrentRequests") to unconditionally include in API 2812 // requests. By default, fields with empty values are omitted from API 2813 // requests. However, any non-pointer, non-interface field appearing in 2814 // ForceSendFields will be sent to the server regardless of whether the 2815 // field is empty or not. This may be used to include empty fields in 2816 // Patch requests. 2817 ForceSendFields []string `json:"-"` 2818 2819 // NullFields is a list of field names (e.g. "TargetConcurrentRequests") 2820 // to include in API requests with the JSON null value. By default, 2821 // fields with empty values are omitted from API requests. However, any 2822 // field with an empty value appearing in NullFields will be sent to the 2823 // server as null. It is an error if a field in this list has a 2824 // non-empty value. This may be used to include null fields in Patch 2825 // requests. 2826 NullFields []string `json:"-"` 2827} 2828 2829func (s *RequestUtilization) MarshalJSON() ([]byte, error) { 2830 type NoMethod RequestUtilization 2831 raw := NoMethod(*s) 2832 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2833} 2834 2835// ResourceRecord: A DNS resource record. 2836type ResourceRecord struct { 2837 // Name: Relative name of the object affected by this record. Only 2838 // applicable for CNAME records. Example: 'www'. 2839 Name string `json:"name,omitempty"` 2840 2841 // Rrdata: Data for this record. Values vary by record type, as defined 2842 // in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). 2843 Rrdata string `json:"rrdata,omitempty"` 2844 2845 // Type: Resource record type. Example: AAAA. 2846 // 2847 // Possible values: 2848 // "RECORD_TYPE_UNSPECIFIED" - An unknown resource record. 2849 // "A" - An A resource record. Data is an IPv4 address. 2850 // "AAAA" - An AAAA resource record. Data is an IPv6 address. 2851 // "CNAME" - A CNAME resource record. Data is a domain name to be 2852 // aliased. 2853 Type string `json:"type,omitempty"` 2854 2855 // ForceSendFields is a list of field names (e.g. "Name") to 2856 // unconditionally include in API requests. By default, fields with 2857 // empty values are omitted from API requests. However, any non-pointer, 2858 // non-interface field appearing in ForceSendFields will be sent to the 2859 // server regardless of whether the field is empty or not. This may be 2860 // used to include empty fields in Patch requests. 2861 ForceSendFields []string `json:"-"` 2862 2863 // NullFields is a list of field names (e.g. "Name") to include in API 2864 // requests with the JSON null value. By default, fields with empty 2865 // values are omitted from API requests. However, any field with an 2866 // empty value appearing in NullFields will be sent to the server as 2867 // null. It is an error if a field in this list has a non-empty value. 2868 // This may be used to include null fields in Patch requests. 2869 NullFields []string `json:"-"` 2870} 2871 2872func (s *ResourceRecord) MarshalJSON() ([]byte, error) { 2873 type NoMethod ResourceRecord 2874 raw := NoMethod(*s) 2875 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2876} 2877 2878// Resources: Machine resources for a version. 2879type Resources struct { 2880 // Cpu: Number of CPU cores needed. 2881 Cpu float64 `json:"cpu,omitempty"` 2882 2883 // DiskGb: Disk size (GB) needed. 2884 DiskGb float64 `json:"diskGb,omitempty"` 2885 2886 // KmsKeyReference: The name of the encryption key that is stored in 2887 // Google Cloud KMS. Only should be used by Cloud Composer to encrypt 2888 // the vm disk 2889 KmsKeyReference string `json:"kmsKeyReference,omitempty"` 2890 2891 // MemoryGb: Memory (GB) needed. 2892 MemoryGb float64 `json:"memoryGb,omitempty"` 2893 2894 // Volumes: User specified volumes. 2895 Volumes []*Volume `json:"volumes,omitempty"` 2896 2897 // ForceSendFields is a list of field names (e.g. "Cpu") to 2898 // unconditionally include in API requests. By default, fields with 2899 // empty values are omitted from API requests. However, any non-pointer, 2900 // non-interface field appearing in ForceSendFields will be sent to the 2901 // server regardless of whether the field is empty or not. This may be 2902 // used to include empty fields in Patch requests. 2903 ForceSendFields []string `json:"-"` 2904 2905 // NullFields is a list of field names (e.g. "Cpu") to include in API 2906 // requests with the JSON null value. By default, fields with empty 2907 // values are omitted from API requests. However, any field with an 2908 // empty value appearing in NullFields will be sent to the server as 2909 // null. It is an error if a field in this list has a non-empty value. 2910 // This may be used to include null fields in Patch requests. 2911 NullFields []string `json:"-"` 2912} 2913 2914func (s *Resources) MarshalJSON() ([]byte, error) { 2915 type NoMethod Resources 2916 raw := NoMethod(*s) 2917 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2918} 2919 2920func (s *Resources) UnmarshalJSON(data []byte) error { 2921 type NoMethod Resources 2922 var s1 struct { 2923 Cpu gensupport.JSONFloat64 `json:"cpu"` 2924 DiskGb gensupport.JSONFloat64 `json:"diskGb"` 2925 MemoryGb gensupport.JSONFloat64 `json:"memoryGb"` 2926 *NoMethod 2927 } 2928 s1.NoMethod = (*NoMethod)(s) 2929 if err := json.Unmarshal(data, &s1); err != nil { 2930 return err 2931 } 2932 s.Cpu = float64(s1.Cpu) 2933 s.DiskGb = float64(s1.DiskGb) 2934 s.MemoryGb = float64(s1.MemoryGb) 2935 return nil 2936} 2937 2938// ScriptHandler: Executes a script to handle the request that matches 2939// the URL pattern. 2940type ScriptHandler struct { 2941 // ScriptPath: Path to the script from the application root directory. 2942 ScriptPath string `json:"scriptPath,omitempty"` 2943 2944 // ForceSendFields is a list of field names (e.g. "ScriptPath") to 2945 // unconditionally include in API requests. By default, fields with 2946 // empty values are omitted from API requests. However, any non-pointer, 2947 // non-interface field appearing in ForceSendFields will be sent to the 2948 // server regardless of whether the field is empty or not. This may be 2949 // used to include empty fields in Patch requests. 2950 ForceSendFields []string `json:"-"` 2951 2952 // NullFields is a list of field names (e.g. "ScriptPath") to include in 2953 // API requests with the JSON null value. By default, fields with empty 2954 // values are omitted from API requests. However, any field with an 2955 // empty value appearing in NullFields will be sent to the server as 2956 // null. It is an error if a field in this list has a non-empty value. 2957 // This may be used to include null fields in Patch requests. 2958 NullFields []string `json:"-"` 2959} 2960 2961func (s *ScriptHandler) MarshalJSON() ([]byte, error) { 2962 type NoMethod ScriptHandler 2963 raw := NoMethod(*s) 2964 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2965} 2966 2967// Service: A Service resource is a logical component of an application 2968// that can share state and communicate in a secure fashion with other 2969// services. For example, an application that handles customer requests 2970// might include separate services to handle tasks such as backend data 2971// analysis or API requests from mobile devices. Each service has a 2972// collection of versions that define a specific set of code used to 2973// implement the functionality of that service. 2974type Service struct { 2975 // Id: Relative name of the service within the application. Example: 2976 // default.@OutputOnly 2977 Id string `json:"id,omitempty"` 2978 2979 // Name: Full path to the Service resource in the API. Example: 2980 // apps/myapp/services/default.@OutputOnly 2981 Name string `json:"name,omitempty"` 2982 2983 // NetworkSettings: Ingress settings for this service. Will apply to all 2984 // versions. 2985 NetworkSettings *NetworkSettings `json:"networkSettings,omitempty"` 2986 2987 // Split: Mapping that defines fractional HTTP traffic diversion to 2988 // different versions within the service. 2989 Split *TrafficSplit `json:"split,omitempty"` 2990 2991 // ServerResponse contains the HTTP response code and headers from the 2992 // server. 2993 googleapi.ServerResponse `json:"-"` 2994 2995 // ForceSendFields is a list of field names (e.g. "Id") to 2996 // unconditionally include in API requests. By default, fields with 2997 // empty values are omitted from API requests. However, any non-pointer, 2998 // non-interface field appearing in ForceSendFields will be sent to the 2999 // server regardless of whether the field is empty or not. This may be 3000 // used to include empty fields in Patch requests. 3001 ForceSendFields []string `json:"-"` 3002 3003 // NullFields is a list of field names (e.g. "Id") to include in API 3004 // requests with the JSON null value. By default, fields with empty 3005 // values are omitted from API requests. However, any field with an 3006 // empty value appearing in NullFields will be sent to the server as 3007 // null. It is an error if a field in this list has a non-empty value. 3008 // This may be used to include null fields in Patch requests. 3009 NullFields []string `json:"-"` 3010} 3011 3012func (s *Service) MarshalJSON() ([]byte, error) { 3013 type NoMethod Service 3014 raw := NoMethod(*s) 3015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3016} 3017 3018// SslSettings: SSL configuration for a DomainMapping resource. 3019type SslSettings struct { 3020 // CertificateId: ID of the AuthorizedCertificate resource configuring 3021 // SSL for the application. Clearing this field will remove SSL 3022 // support.By default, a managed certificate is automatically created 3023 // for every domain mapping. To omit SSL support or to configure SSL 3024 // manually, specify SslManagementType.MANUAL on a CREATE or UPDATE 3025 // request. You must be authorized to administer the 3026 // AuthorizedCertificate resource to manually map it to a DomainMapping 3027 // resource. Example: 12345. 3028 CertificateId string `json:"certificateId,omitempty"` 3029 3030 // PendingManagedCertificateId: ID of the managed AuthorizedCertificate 3031 // resource currently being provisioned, if applicable. Until the new 3032 // managed certificate has been successfully provisioned, the previous 3033 // SSL state will be preserved. Once the provisioning process completes, 3034 // the certificate_id field will reflect the new managed certificate and 3035 // this field will be left empty. To remove SSL support while there is 3036 // still a pending managed certificate, clear the certificate_id field 3037 // with an UpdateDomainMappingRequest.@OutputOnly 3038 PendingManagedCertificateId string `json:"pendingManagedCertificateId,omitempty"` 3039 3040 // SslManagementType: SSL management type for this domain. If AUTOMATIC, 3041 // a managed certificate is automatically provisioned. If MANUAL, 3042 // certificate_id must be manually specified in order to configure SSL 3043 // for this domain. 3044 // 3045 // Possible values: 3046 // "SSL_MANAGEMENT_TYPE_UNSPECIFIED" - Defaults to AUTOMATIC. 3047 // "AUTOMATIC" - SSL support for this domain is configured 3048 // automatically. The mapped SSL certificate will be automatically 3049 // renewed. 3050 // "MANUAL" - SSL support for this domain is configured manually by 3051 // the user. Either the domain has no SSL support or a user-obtained SSL 3052 // certificate has been explictly mapped to this domain. 3053 SslManagementType string `json:"sslManagementType,omitempty"` 3054 3055 // ForceSendFields is a list of field names (e.g. "CertificateId") to 3056 // unconditionally include in API requests. By default, fields with 3057 // empty values are omitted from API requests. However, any non-pointer, 3058 // non-interface field appearing in ForceSendFields will be sent to the 3059 // server regardless of whether the field is empty or not. This may be 3060 // used to include empty fields in Patch requests. 3061 ForceSendFields []string `json:"-"` 3062 3063 // NullFields is a list of field names (e.g. "CertificateId") to include 3064 // in API requests with the JSON null value. By default, fields with 3065 // empty values are omitted from API requests. However, any field with 3066 // an empty value appearing in NullFields will be sent to the server as 3067 // null. It is an error if a field in this list has a non-empty value. 3068 // This may be used to include null fields in Patch requests. 3069 NullFields []string `json:"-"` 3070} 3071 3072func (s *SslSettings) MarshalJSON() ([]byte, error) { 3073 type NoMethod SslSettings 3074 raw := NoMethod(*s) 3075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3076} 3077 3078// StandardSchedulerSettings: Scheduler settings for standard 3079// environment. 3080type StandardSchedulerSettings struct { 3081 // MaxInstances: Maximum number of instances to run for this version. 3082 // Set to zero to disable max_instances configuration. 3083 MaxInstances int64 `json:"maxInstances,omitempty"` 3084 3085 // MinInstances: Minimum number of instances to run for this version. 3086 // Set to zero to disable min_instances configuration. 3087 MinInstances int64 `json:"minInstances,omitempty"` 3088 3089 // TargetCpuUtilization: Target CPU utilization ratio to maintain when 3090 // scaling. 3091 TargetCpuUtilization float64 `json:"targetCpuUtilization,omitempty"` 3092 3093 // TargetThroughputUtilization: Target throughput utilization ratio to 3094 // maintain when scaling 3095 TargetThroughputUtilization float64 `json:"targetThroughputUtilization,omitempty"` 3096 3097 // ForceSendFields is a list of field names (e.g. "MaxInstances") to 3098 // unconditionally include in API requests. By default, fields with 3099 // empty values are omitted from API requests. However, any non-pointer, 3100 // non-interface field appearing in ForceSendFields will be sent to the 3101 // server regardless of whether the field is empty or not. This may be 3102 // used to include empty fields in Patch requests. 3103 ForceSendFields []string `json:"-"` 3104 3105 // NullFields is a list of field names (e.g. "MaxInstances") to include 3106 // in API requests with the JSON null value. By default, fields with 3107 // empty values are omitted from API requests. However, any field with 3108 // an empty value appearing in NullFields will be sent to the server as 3109 // null. It is an error if a field in this list has a non-empty value. 3110 // This may be used to include null fields in Patch requests. 3111 NullFields []string `json:"-"` 3112} 3113 3114func (s *StandardSchedulerSettings) MarshalJSON() ([]byte, error) { 3115 type NoMethod StandardSchedulerSettings 3116 raw := NoMethod(*s) 3117 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3118} 3119 3120func (s *StandardSchedulerSettings) UnmarshalJSON(data []byte) error { 3121 type NoMethod StandardSchedulerSettings 3122 var s1 struct { 3123 TargetCpuUtilization gensupport.JSONFloat64 `json:"targetCpuUtilization"` 3124 TargetThroughputUtilization gensupport.JSONFloat64 `json:"targetThroughputUtilization"` 3125 *NoMethod 3126 } 3127 s1.NoMethod = (*NoMethod)(s) 3128 if err := json.Unmarshal(data, &s1); err != nil { 3129 return err 3130 } 3131 s.TargetCpuUtilization = float64(s1.TargetCpuUtilization) 3132 s.TargetThroughputUtilization = float64(s1.TargetThroughputUtilization) 3133 return nil 3134} 3135 3136// StaticFilesHandler: Files served directly to the user for a given 3137// URL, such as images, CSS stylesheets, or JavaScript source files. 3138// Static file handlers describe which files in the application 3139// directory are static files, and which URLs serve them. 3140type StaticFilesHandler struct { 3141 // ApplicationReadable: Whether files should also be uploaded as code 3142 // data. By default, files declared in static file handlers are uploaded 3143 // as static data and are only served to end users; they cannot be read 3144 // by the application. If enabled, uploads are charged against both your 3145 // code and static data storage resource quotas. 3146 ApplicationReadable bool `json:"applicationReadable,omitempty"` 3147 3148 // Expiration: Time a static file served by this handler should be 3149 // cached by web proxies and browsers. 3150 Expiration string `json:"expiration,omitempty"` 3151 3152 // HttpHeaders: HTTP headers to use for all responses from these URLs. 3153 HttpHeaders map[string]string `json:"httpHeaders,omitempty"` 3154 3155 // MimeType: MIME type used to serve all files served by this 3156 // handler.Defaults to file-specific MIME types, which are derived from 3157 // each file's filename extension. 3158 MimeType string `json:"mimeType,omitempty"` 3159 3160 // Path: Path to the static files matched by the URL pattern, from the 3161 // application root directory. The path can refer to text matched in 3162 // groupings in the URL pattern. 3163 Path string `json:"path,omitempty"` 3164 3165 // RequireMatchingFile: Whether this handler should match the request if 3166 // the file referenced by the handler does not exist. 3167 RequireMatchingFile bool `json:"requireMatchingFile,omitempty"` 3168 3169 // UploadPathRegex: Regular expression that matches the file paths for 3170 // all files that should be referenced by this handler. 3171 UploadPathRegex string `json:"uploadPathRegex,omitempty"` 3172 3173 // ForceSendFields is a list of field names (e.g. "ApplicationReadable") 3174 // to unconditionally include in API requests. By default, fields with 3175 // empty values are omitted from API requests. However, any non-pointer, 3176 // non-interface field appearing in ForceSendFields will be sent to the 3177 // server regardless of whether the field is empty or not. This may be 3178 // used to include empty fields in Patch requests. 3179 ForceSendFields []string `json:"-"` 3180 3181 // NullFields is a list of field names (e.g. "ApplicationReadable") to 3182 // include in API requests with the JSON null value. By default, fields 3183 // with empty values are omitted from API requests. However, any field 3184 // with an empty value appearing in NullFields will be sent to the 3185 // server as null. It is an error if a field in this list has a 3186 // non-empty value. This may be used to include null fields in Patch 3187 // requests. 3188 NullFields []string `json:"-"` 3189} 3190 3191func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) { 3192 type NoMethod StaticFilesHandler 3193 raw := NoMethod(*s) 3194 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3195} 3196 3197// Status: The Status type defines a logical error model that is 3198// suitable for different programming environments, including REST APIs 3199// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 3200// Status message contains three pieces of data: error code, error 3201// message, and error details.You can find out more about this error 3202// model and how to work with it in the API Design Guide 3203// (https://cloud.google.com/apis/design/errors). 3204type Status struct { 3205 // Code: The status code, which should be an enum value of 3206 // google.rpc.Code. 3207 Code int64 `json:"code,omitempty"` 3208 3209 // Details: A list of messages that carry the error details. There is a 3210 // common set of message types for APIs to use. 3211 Details []googleapi.RawMessage `json:"details,omitempty"` 3212 3213 // Message: A developer-facing error message, which should be in 3214 // English. Any user-facing error message should be localized and sent 3215 // in the google.rpc.Status.details field, or localized by the client. 3216 Message string `json:"message,omitempty"` 3217 3218 // ForceSendFields is a list of field names (e.g. "Code") to 3219 // unconditionally include in API requests. By default, fields with 3220 // empty values are omitted from API requests. However, any non-pointer, 3221 // non-interface field appearing in ForceSendFields will be sent to the 3222 // server regardless of whether the field is empty or not. This may be 3223 // used to include empty fields in Patch requests. 3224 ForceSendFields []string `json:"-"` 3225 3226 // NullFields is a list of field names (e.g. "Code") to include in API 3227 // requests with the JSON null value. By default, fields with empty 3228 // values are omitted from API requests. However, any field with an 3229 // empty value appearing in NullFields will be sent to the server as 3230 // null. It is an error if a field in this list has a non-empty value. 3231 // This may be used to include null fields in Patch requests. 3232 NullFields []string `json:"-"` 3233} 3234 3235func (s *Status) MarshalJSON() ([]byte, error) { 3236 type NoMethod Status 3237 raw := NoMethod(*s) 3238 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3239} 3240 3241// TrafficSplit: Traffic routing configuration for versions within a 3242// single service. Traffic splits define how traffic directed to the 3243// service is assigned to versions. 3244type TrafficSplit struct { 3245 // Allocations: Mapping from version IDs within the service to 3246 // fractional (0.000, 1] allocations of traffic for that version. Each 3247 // version can be specified only once, but some versions in the service 3248 // may not have any traffic allocation. Services that have traffic 3249 // allocated cannot be deleted until either the service is deleted or 3250 // their traffic allocation is removed. Allocations must sum to 1. Up to 3251 // two decimal place precision is supported for IP-based splits and up 3252 // to three decimal places is supported for cookie-based splits. 3253 Allocations map[string]float64 `json:"allocations,omitempty"` 3254 3255 // ShardBy: Mechanism used to determine which version a request is sent 3256 // to. The traffic selection algorithm will be stable for either type 3257 // until allocations are changed. 3258 // 3259 // Possible values: 3260 // "UNSPECIFIED" - Diversion method unspecified. 3261 // "COOKIE" - Diversion based on a specially named cookie, 3262 // "GOOGAPPUID." The cookie must be set by the application itself or no 3263 // diversion will occur. 3264 // "IP" - Diversion based on applying the modulus operation to a 3265 // fingerprint of the IP address. 3266 // "RANDOM" - Diversion based on weighted random assignment. An 3267 // incoming request is randomly routed to a version in the traffic 3268 // split, with probability proportional to the version's traffic share. 3269 ShardBy string `json:"shardBy,omitempty"` 3270 3271 // ForceSendFields is a list of field names (e.g. "Allocations") to 3272 // unconditionally include in API requests. By default, fields with 3273 // empty values are omitted from API requests. However, any non-pointer, 3274 // non-interface field appearing in ForceSendFields will be sent to the 3275 // server regardless of whether the field is empty or not. This may be 3276 // used to include empty fields in Patch requests. 3277 ForceSendFields []string `json:"-"` 3278 3279 // NullFields is a list of field names (e.g. "Allocations") to include 3280 // in API requests with the JSON null value. By default, fields with 3281 // empty values are omitted from API requests. However, any field with 3282 // an empty value appearing in NullFields will be sent to the server as 3283 // null. It is an error if a field in this list has a non-empty value. 3284 // This may be used to include null fields in Patch requests. 3285 NullFields []string `json:"-"` 3286} 3287 3288func (s *TrafficSplit) MarshalJSON() ([]byte, error) { 3289 type NoMethod TrafficSplit 3290 raw := NoMethod(*s) 3291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3292} 3293 3294// UrlDispatchRule: Rules to match an HTTP request and dispatch that 3295// request to a service. 3296type UrlDispatchRule struct { 3297 // Domain: Domain name to match against. The wildcard "*" is supported 3298 // if specified before a period: "*.".Defaults to matching all domains: 3299 // "*". 3300 Domain string `json:"domain,omitempty"` 3301 3302 // Path: Pathname within the host. Must start with a "/". A single "*" 3303 // can be included at the end of the path.The sum of the lengths of the 3304 // domain and path may not exceed 100 characters. 3305 Path string `json:"path,omitempty"` 3306 3307 // Service: Resource ID of a service in this application that should 3308 // serve the matched request. The service must already exist. Example: 3309 // default. 3310 Service string `json:"service,omitempty"` 3311 3312 // ForceSendFields is a list of field names (e.g. "Domain") to 3313 // unconditionally include in API requests. By default, fields with 3314 // empty values are omitted from API requests. However, any non-pointer, 3315 // non-interface field appearing in ForceSendFields will be sent to the 3316 // server regardless of whether the field is empty or not. This may be 3317 // used to include empty fields in Patch requests. 3318 ForceSendFields []string `json:"-"` 3319 3320 // NullFields is a list of field names (e.g. "Domain") to include in API 3321 // requests with the JSON null value. By default, fields with empty 3322 // values are omitted from API requests. However, any field with an 3323 // empty value appearing in NullFields will be sent to the server as 3324 // null. It is an error if a field in this list has a non-empty value. 3325 // This may be used to include null fields in Patch requests. 3326 NullFields []string `json:"-"` 3327} 3328 3329func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) { 3330 type NoMethod UrlDispatchRule 3331 raw := NoMethod(*s) 3332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3333} 3334 3335// UrlMap: URL pattern and description of how the URL should be handled. 3336// App Engine can handle URLs by executing application code or by 3337// serving static files uploaded with the version, such as images, CSS, 3338// or JavaScript. 3339type UrlMap struct { 3340 // ApiEndpoint: Uses API Endpoints to handle requests. 3341 ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"` 3342 3343 // AuthFailAction: Action to take when users access resources that 3344 // require authentication. Defaults to redirect. 3345 // 3346 // Possible values: 3347 // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified. 3348 // AUTH_FAIL_ACTION_REDIRECT is assumed. 3349 // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to 3350 // "accounts.google.com". The user is redirected back to the application 3351 // URL after signing in or creating an account. 3352 // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP 3353 // status code and an error message. 3354 AuthFailAction string `json:"authFailAction,omitempty"` 3355 3356 // Login: Level of login required to access this resource. Not supported 3357 // for Node.js in the App Engine standard environment. 3358 // 3359 // Possible values: 3360 // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed. 3361 // "LOGIN_OPTIONAL" - Does not require that the user is signed in. 3362 // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action 3363 // is taken. In addition, if the user is not an administrator for the 3364 // application, they are given an error message regardless of 3365 // auth_fail_action. If the user is an administrator, the handler 3366 // proceeds. 3367 // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds 3368 // normally. Otherwise, the auth_fail_action is taken. 3369 Login string `json:"login,omitempty"` 3370 3371 // RedirectHttpResponseCode: 30x code to use when performing redirects 3372 // for the secure field. Defaults to 302. 3373 // 3374 // Possible values: 3375 // "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" - Not specified. 302 is 3376 // assumed. 3377 // "REDIRECT_HTTP_RESPONSE_CODE_301" - 301 Moved Permanently code. 3378 // "REDIRECT_HTTP_RESPONSE_CODE_302" - 302 Moved Temporarily code. 3379 // "REDIRECT_HTTP_RESPONSE_CODE_303" - 303 See Other code. 3380 // "REDIRECT_HTTP_RESPONSE_CODE_307" - 307 Temporary Redirect code. 3381 RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"` 3382 3383 // Script: Executes a script to handle the requests that match this URL 3384 // pattern. Only the auto value is supported for Node.js in the App 3385 // Engine standard environment, for example "script": "auto". 3386 Script *ScriptHandler `json:"script,omitempty"` 3387 3388 // SecurityLevel: Security (HTTPS) enforcement for this URL. 3389 // 3390 // Possible values: 3391 // "SECURE_UNSPECIFIED" - Not specified. 3392 // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that 3393 // match the handler succeed without redirects. The application can 3394 // examine the request to determine which protocol was used, and respond 3395 // accordingly. 3396 // "SECURE_NEVER" - Requests for a URL that match this handler that 3397 // use HTTPS are automatically redirected to the HTTP equivalent URL. 3398 // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that 3399 // match the handler succeed without redirects. The application can 3400 // examine the request to determine which protocol was used and respond 3401 // accordingly. 3402 // "SECURE_ALWAYS" - Requests for a URL that match this handler that 3403 // do not use HTTPS are automatically redirected to the HTTPS URL with 3404 // the same path. Query parameters are reserved for the redirect. 3405 SecurityLevel string `json:"securityLevel,omitempty"` 3406 3407 // StaticFiles: Returns the contents of a file, such as an image, as the 3408 // response. 3409 StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"` 3410 3411 // UrlRegex: URL prefix. Uses regular expression syntax, which means 3412 // regexp special characters must be escaped, but should not contain 3413 // groupings. All URLs that begin with this prefix are handled by this 3414 // handler, using the portion of the URL after the prefix as part of the 3415 // file path. 3416 UrlRegex string `json:"urlRegex,omitempty"` 3417 3418 // ForceSendFields is a list of field names (e.g. "ApiEndpoint") to 3419 // unconditionally include in API requests. By default, fields with 3420 // empty values are omitted from API requests. However, any non-pointer, 3421 // non-interface field appearing in ForceSendFields will be sent to the 3422 // server regardless of whether the field is empty or not. This may be 3423 // used to include empty fields in Patch requests. 3424 ForceSendFields []string `json:"-"` 3425 3426 // NullFields is a list of field names (e.g. "ApiEndpoint") to include 3427 // in API requests with the JSON null value. By default, fields with 3428 // empty values are omitted from API requests. However, any field with 3429 // an empty value appearing in NullFields will be sent to the server as 3430 // null. It is an error if a field in this list has a non-empty value. 3431 // This may be used to include null fields in Patch requests. 3432 NullFields []string `json:"-"` 3433} 3434 3435func (s *UrlMap) MarshalJSON() ([]byte, error) { 3436 type NoMethod UrlMap 3437 raw := NoMethod(*s) 3438 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3439} 3440 3441// Version: A Version resource is a specific set of source code and 3442// configuration files that are deployed into a service. 3443type Version struct { 3444 // ApiConfig: Serving configuration for Google Cloud Endpoints 3445 // (https://cloud.google.com/appengine/docs/python/endpoints/).Only 3446 // returned in GET requests if view=FULL is set. 3447 ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"` 3448 3449 // AutomaticScaling: Automatic scaling is based on request rate, 3450 // response latencies, and other application metrics. Instances are 3451 // dynamically created and destroyed as needed in order to handle 3452 // traffic. 3453 AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"` 3454 3455 // BasicScaling: A service with basic scaling will create an instance 3456 // when the application receives a request. The instance will be turned 3457 // down when the app becomes idle. Basic scaling is ideal for work that 3458 // is intermittent or driven by user activity. 3459 BasicScaling *BasicScaling `json:"basicScaling,omitempty"` 3460 3461 // BetaSettings: Metadata settings that are supplied to this version to 3462 // enable beta runtime features. 3463 BetaSettings map[string]string `json:"betaSettings,omitempty"` 3464 3465 // BuildEnvVariables: Environment variables available to the build 3466 // environment.Only returned in GET requests if view=FULL is set. 3467 BuildEnvVariables map[string]string `json:"buildEnvVariables,omitempty"` 3468 3469 // CreateTime: Time that this version was created.@OutputOnly 3470 CreateTime string `json:"createTime,omitempty"` 3471 3472 // CreatedBy: Email address of the user who created this 3473 // version.@OutputOnly 3474 CreatedBy string `json:"createdBy,omitempty"` 3475 3476 // DefaultExpiration: Duration that static files should be cached by web 3477 // proxies and browsers. Only applicable if the corresponding 3478 // StaticFilesHandler 3479 // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler) 3480 // does not specify its own expiration time.Only returned in GET 3481 // requests if view=FULL is set. 3482 DefaultExpiration string `json:"defaultExpiration,omitempty"` 3483 3484 // Deployment: Code and application artifacts that make up this 3485 // version.Only returned in GET requests if view=FULL is set. 3486 Deployment *Deployment `json:"deployment,omitempty"` 3487 3488 // DiskUsageBytes: Total size in bytes of all the files that are 3489 // included in this version and currently hosted on the App Engine 3490 // disk.@OutputOnly 3491 DiskUsageBytes int64 `json:"diskUsageBytes,omitempty,string"` 3492 3493 // EndpointsApiService: Cloud Endpoints configuration.If 3494 // endpoints_api_service is set, the Cloud Endpoints Extensible Service 3495 // Proxy will be provided to serve the API implemented by the app. 3496 EndpointsApiService *EndpointsApiService `json:"endpointsApiService,omitempty"` 3497 3498 // Entrypoint: The entrypoint for the application. 3499 Entrypoint *Entrypoint `json:"entrypoint,omitempty"` 3500 3501 // Env: App Engine execution environment for this version.Defaults to 3502 // standard. 3503 Env string `json:"env,omitempty"` 3504 3505 // EnvVariables: Environment variables available to the application.Only 3506 // returned in GET requests if view=FULL is set. 3507 EnvVariables map[string]string `json:"envVariables,omitempty"` 3508 3509 // ErrorHandlers: Custom static error pages. Limited to 10KB per 3510 // page.Only returned in GET requests if view=FULL is set. 3511 ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"` 3512 3513 // Handlers: An ordered list of URL-matching patterns that should be 3514 // applied to incoming requests. The first matching URL handles the 3515 // request and other request handlers are not attempted.Only returned in 3516 // GET requests if view=FULL is set. 3517 Handlers []*UrlMap `json:"handlers,omitempty"` 3518 3519 // HealthCheck: Configures health checking for instances. Unhealthy 3520 // instances are stopped and replaced with new instances. Only 3521 // applicable in the App Engine flexible environment.Only returned in 3522 // GET requests if view=FULL is set. 3523 HealthCheck *HealthCheck `json:"healthCheck,omitempty"` 3524 3525 // Id: Relative name of the version within the service. Example: v1. 3526 // Version names can contain only lowercase letters, numbers, or 3527 // hyphens. Reserved names: "default", "latest", and any name with the 3528 // prefix "ah-". 3529 Id string `json:"id,omitempty"` 3530 3531 // InboundServices: Before an application can receive email or XMPP 3532 // messages, the application must be configured to enable the service. 3533 // 3534 // Possible values: 3535 // "INBOUND_SERVICE_UNSPECIFIED" - Not specified. 3536 // "INBOUND_SERVICE_MAIL" - Allows an application to receive mail. 3537 // "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application to receive 3538 // email-bound notifications. 3539 // "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive 3540 // error stanzas. 3541 // "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive 3542 // instant messages. 3543 // "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive 3544 // user subscription POSTs. 3545 // "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive 3546 // a user's chat presence. 3547 // "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for 3548 // notifications when a client connects or disconnects from a channel. 3549 // "INBOUND_SERVICE_WARMUP" - Enables warmup requests. 3550 InboundServices []string `json:"inboundServices,omitempty"` 3551 3552 // InstanceClass: Instance class that is used to run this version. Valid 3553 // values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or 3554 // BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for 3555 // AutomaticScaling and B1 for ManualScaling or BasicScaling. 3556 InstanceClass string `json:"instanceClass,omitempty"` 3557 3558 // Libraries: Configuration for third-party Python runtime libraries 3559 // that are required by the application.Only returned in GET requests if 3560 // view=FULL is set. 3561 Libraries []*Library `json:"libraries,omitempty"` 3562 3563 // LivenessCheck: Configures liveness health checking for instances. 3564 // Unhealthy instances are stopped and replaced with new instancesOnly 3565 // returned in GET requests if view=FULL is set. 3566 LivenessCheck *LivenessCheck `json:"livenessCheck,omitempty"` 3567 3568 // ManualScaling: A service with manual scaling runs continuously, 3569 // allowing you to perform complex initialization and rely on the state 3570 // of its memory over time. Manually scaled versions are sometimes 3571 // referred to as "backends". 3572 ManualScaling *ManualScaling `json:"manualScaling,omitempty"` 3573 3574 // Name: Full path to the Version resource in the API. Example: 3575 // apps/myapp/services/default/versions/v1.@OutputOnly 3576 Name string `json:"name,omitempty"` 3577 3578 // Network: Extra network settings. Only applicable in the App Engine 3579 // flexible environment. 3580 Network *Network `json:"network,omitempty"` 3581 3582 // NobuildFilesRegex: Files that match this pattern will not be built 3583 // into this version. Only applicable for Go runtimes.Only returned in 3584 // GET requests if view=FULL is set. 3585 NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"` 3586 3587 // ReadinessCheck: Configures readiness health checking for instances. 3588 // Unhealthy instances are not put into the backend traffic 3589 // rotation.Only returned in GET requests if view=FULL is set. 3590 ReadinessCheck *ReadinessCheck `json:"readinessCheck,omitempty"` 3591 3592 // Resources: Machine resources for this version. Only applicable in the 3593 // App Engine flexible environment. 3594 Resources *Resources `json:"resources,omitempty"` 3595 3596 // Runtime: Desired runtime. Example: python27. 3597 Runtime string `json:"runtime,omitempty"` 3598 3599 // RuntimeApiVersion: The version of the API in the given runtime 3600 // environment. Please see the app.yaml reference for valid values at 3601 // https://cloud.google.com/appengine/docs/standard//config/appref 3602 RuntimeApiVersion string `json:"runtimeApiVersion,omitempty"` 3603 3604 // RuntimeChannel: The channel of the runtime to use. Only available for 3605 // some runtimes. Defaults to the default channel. 3606 RuntimeChannel string `json:"runtimeChannel,omitempty"` 3607 3608 // RuntimeMainExecutablePath: The path or name of the app's main 3609 // executable. 3610 RuntimeMainExecutablePath string `json:"runtimeMainExecutablePath,omitempty"` 3611 3612 // ServiceAccount: The identity that the deployed version will run as. 3613 // Admin API will use the App Engine Appspot service account as default 3614 // if this field is neither provided in app.yaml file nor through CLI 3615 // flag. 3616 ServiceAccount string `json:"serviceAccount,omitempty"` 3617 3618 // ServingStatus: Current serving status of this version. Only the 3619 // versions with a SERVING status create instances and can be 3620 // billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to 3621 // SERVING. 3622 // 3623 // Possible values: 3624 // "SERVING_STATUS_UNSPECIFIED" - Not specified. 3625 // "SERVING" - Currently serving. Instances are created according to 3626 // the scaling settings of the version. 3627 // "STOPPED" - Disabled. No instances will be created and the scaling 3628 // settings are ignored until the state of the version changes to 3629 // SERVING. 3630 ServingStatus string `json:"servingStatus,omitempty"` 3631 3632 // Threadsafe: Whether multiple requests can be dispatched to this 3633 // version at once. 3634 Threadsafe bool `json:"threadsafe,omitempty"` 3635 3636 // VersionUrl: Serving URL for this version. Example: 3637 // "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly 3638 VersionUrl string `json:"versionUrl,omitempty"` 3639 3640 // Vm: Whether to deploy this version in a container on a virtual 3641 // machine. 3642 Vm bool `json:"vm,omitempty"` 3643 3644 // VpcAccessConnector: Enables VPC connectivity for standard apps. 3645 VpcAccessConnector *VpcAccessConnector `json:"vpcAccessConnector,omitempty"` 3646 3647 // Zones: The Google Compute Engine zones that are supported by this 3648 // version in the App Engine flexible environment. Deprecated. 3649 Zones []string `json:"zones,omitempty"` 3650 3651 // ServerResponse contains the HTTP response code and headers from the 3652 // server. 3653 googleapi.ServerResponse `json:"-"` 3654 3655 // ForceSendFields is a list of field names (e.g. "ApiConfig") to 3656 // unconditionally include in API requests. By default, fields with 3657 // empty values are omitted from API requests. However, any non-pointer, 3658 // non-interface field appearing in ForceSendFields will be sent to the 3659 // server regardless of whether the field is empty or not. This may be 3660 // used to include empty fields in Patch requests. 3661 ForceSendFields []string `json:"-"` 3662 3663 // NullFields is a list of field names (e.g. "ApiConfig") to include in 3664 // API requests with the JSON null value. By default, fields with empty 3665 // values are omitted from API requests. However, any field with an 3666 // empty value appearing in NullFields will be sent to the server as 3667 // null. It is an error if a field in this list has a non-empty value. 3668 // This may be used to include null fields in Patch requests. 3669 NullFields []string `json:"-"` 3670} 3671 3672func (s *Version) MarshalJSON() ([]byte, error) { 3673 type NoMethod Version 3674 raw := NoMethod(*s) 3675 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3676} 3677 3678// Volume: Volumes mounted within the app container. Only applicable in 3679// the App Engine flexible environment. 3680type Volume struct { 3681 // Name: Unique name for the volume. 3682 Name string `json:"name,omitempty"` 3683 3684 // SizeGb: Volume size in gigabytes. 3685 SizeGb float64 `json:"sizeGb,omitempty"` 3686 3687 // VolumeType: Underlying volume type, e.g. 'tmpfs'. 3688 VolumeType string `json:"volumeType,omitempty"` 3689 3690 // ForceSendFields is a list of field names (e.g. "Name") to 3691 // unconditionally include in API requests. By default, fields with 3692 // empty values are omitted from API requests. However, any non-pointer, 3693 // non-interface field appearing in ForceSendFields will be sent to the 3694 // server regardless of whether the field is empty or not. This may be 3695 // used to include empty fields in Patch requests. 3696 ForceSendFields []string `json:"-"` 3697 3698 // NullFields is a list of field names (e.g. "Name") to include in API 3699 // requests with the JSON null value. By default, fields with empty 3700 // values are omitted from API requests. However, any field with an 3701 // empty value appearing in NullFields will be sent to the server as 3702 // null. It is an error if a field in this list has a non-empty value. 3703 // This may be used to include null fields in Patch requests. 3704 NullFields []string `json:"-"` 3705} 3706 3707func (s *Volume) MarshalJSON() ([]byte, error) { 3708 type NoMethod Volume 3709 raw := NoMethod(*s) 3710 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3711} 3712 3713func (s *Volume) UnmarshalJSON(data []byte) error { 3714 type NoMethod Volume 3715 var s1 struct { 3716 SizeGb gensupport.JSONFloat64 `json:"sizeGb"` 3717 *NoMethod 3718 } 3719 s1.NoMethod = (*NoMethod)(s) 3720 if err := json.Unmarshal(data, &s1); err != nil { 3721 return err 3722 } 3723 s.SizeGb = float64(s1.SizeGb) 3724 return nil 3725} 3726 3727// VpcAccessConnector: VPC access connector specification. 3728type VpcAccessConnector struct { 3729 // EgressSetting: The egress setting for the connector, controlling what 3730 // traffic is diverted through it. 3731 // 3732 // Possible values: 3733 // "EGRESS_SETTING_UNSPECIFIED" 3734 // "ALL_TRAFFIC" - Force the use of VPC Access for all egress traffic 3735 // from the function. 3736 // "PRIVATE_IP_RANGES" - Use the VPC Access Connector for private IP 3737 // space from RFC1918. 3738 EgressSetting string `json:"egressSetting,omitempty"` 3739 3740 // Name: Full Serverless VPC Access Connector name e.g. 3741 // /projects/my-project/locations/us-central1/connectors/c1. 3742 Name string `json:"name,omitempty"` 3743 3744 // ForceSendFields is a list of field names (e.g. "EgressSetting") to 3745 // unconditionally include in API requests. By default, fields with 3746 // empty values are omitted from API requests. However, any non-pointer, 3747 // non-interface field appearing in ForceSendFields will be sent to the 3748 // server regardless of whether the field is empty or not. This may be 3749 // used to include empty fields in Patch requests. 3750 ForceSendFields []string `json:"-"` 3751 3752 // NullFields is a list of field names (e.g. "EgressSetting") to include 3753 // in API requests with the JSON null value. By default, fields with 3754 // empty values are omitted from API requests. However, any field with 3755 // an empty value appearing in NullFields will be sent to the server as 3756 // null. It is an error if a field in this list has a non-empty value. 3757 // This may be used to include null fields in Patch requests. 3758 NullFields []string `json:"-"` 3759} 3760 3761func (s *VpcAccessConnector) MarshalJSON() ([]byte, error) { 3762 type NoMethod VpcAccessConnector 3763 raw := NoMethod(*s) 3764 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3765} 3766 3767// ZipInfo: The zip file information for a zip deployment. 3768type ZipInfo struct { 3769 // FilesCount: An estimate of the number of files in a zip for a zip 3770 // deployment. If set, must be greater than or equal to the actual 3771 // number of files. Used for optimizing performance; if not provided, 3772 // deployment may be slow. 3773 FilesCount int64 `json:"filesCount,omitempty"` 3774 3775 // SourceUrl: URL of the zip file to deploy from. Must be a URL to a 3776 // resource in Google Cloud Storage in the form 3777 // 'http(s)://storage.googleapis.com//'. 3778 SourceUrl string `json:"sourceUrl,omitempty"` 3779 3780 // ForceSendFields is a list of field names (e.g. "FilesCount") to 3781 // unconditionally include in API requests. By default, fields with 3782 // empty values are omitted from API requests. However, any non-pointer, 3783 // non-interface field appearing in ForceSendFields will be sent to the 3784 // server regardless of whether the field is empty or not. This may be 3785 // used to include empty fields in Patch requests. 3786 ForceSendFields []string `json:"-"` 3787 3788 // NullFields is a list of field names (e.g. "FilesCount") to include in 3789 // API requests with the JSON null value. By default, fields with empty 3790 // values are omitted from API requests. However, any field with an 3791 // empty value appearing in NullFields will be sent to the server as 3792 // null. It is an error if a field in this list has a non-empty value. 3793 // This may be used to include null fields in Patch requests. 3794 NullFields []string `json:"-"` 3795} 3796 3797func (s *ZipInfo) MarshalJSON() ([]byte, error) { 3798 type NoMethod ZipInfo 3799 raw := NoMethod(*s) 3800 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3801} 3802 3803// method id "appengine.apps.create": 3804 3805type AppsCreateCall struct { 3806 s *APIService 3807 application *Application 3808 urlParams_ gensupport.URLParams 3809 ctx_ context.Context 3810 header_ http.Header 3811} 3812 3813// Create: Creates an App Engine application for a Google Cloud Platform 3814// project. Required fields: id - The ID of the target Cloud Platform 3815// project. location - The region 3816// (https://cloud.google.com/appengine/docs/locations) where you want 3817// the App Engine application located.For more information about App 3818// Engine applications, see Managing Projects, Applications, and Billing 3819// (https://cloud.google.com/appengine/docs/standard/python/console/). 3820func (r *AppsService) Create(application *Application) *AppsCreateCall { 3821 c := &AppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3822 c.application = application 3823 return c 3824} 3825 3826// Fields allows partial responses to be retrieved. See 3827// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3828// for more information. 3829func (c *AppsCreateCall) Fields(s ...googleapi.Field) *AppsCreateCall { 3830 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3831 return c 3832} 3833 3834// Context sets the context to be used in this call's Do method. Any 3835// pending HTTP request will be aborted if the provided context is 3836// canceled. 3837func (c *AppsCreateCall) Context(ctx context.Context) *AppsCreateCall { 3838 c.ctx_ = ctx 3839 return c 3840} 3841 3842// Header returns an http.Header that can be modified by the caller to 3843// add HTTP headers to the request. 3844func (c *AppsCreateCall) Header() http.Header { 3845 if c.header_ == nil { 3846 c.header_ = make(http.Header) 3847 } 3848 return c.header_ 3849} 3850 3851func (c *AppsCreateCall) doRequest(alt string) (*http.Response, error) { 3852 reqHeaders := make(http.Header) 3853 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3854 for k, v := range c.header_ { 3855 reqHeaders[k] = v 3856 } 3857 reqHeaders.Set("User-Agent", c.s.userAgent()) 3858 var body io.Reader = nil 3859 body, err := googleapi.WithoutDataWrapper.JSONReader(c.application) 3860 if err != nil { 3861 return nil, err 3862 } 3863 reqHeaders.Set("Content-Type", "application/json") 3864 c.urlParams_.Set("alt", alt) 3865 c.urlParams_.Set("prettyPrint", "false") 3866 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps") 3867 urls += "?" + c.urlParams_.Encode() 3868 req, err := http.NewRequest("POST", urls, body) 3869 if err != nil { 3870 return nil, err 3871 } 3872 req.Header = reqHeaders 3873 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3874} 3875 3876// Do executes the "appengine.apps.create" call. 3877// Exactly one of *Operation or error will be non-nil. Any non-2xx 3878// status code is an error. Response headers are in either 3879// *Operation.ServerResponse.Header or (if a response was returned at 3880// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3881// to check whether the returned error was because 3882// http.StatusNotModified was returned. 3883func (c *AppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3884 gensupport.SetOptions(c.urlParams_, opts...) 3885 res, err := c.doRequest("json") 3886 if res != nil && res.StatusCode == http.StatusNotModified { 3887 if res.Body != nil { 3888 res.Body.Close() 3889 } 3890 return nil, &googleapi.Error{ 3891 Code: res.StatusCode, 3892 Header: res.Header, 3893 } 3894 } 3895 if err != nil { 3896 return nil, err 3897 } 3898 defer googleapi.CloseBody(res) 3899 if err := googleapi.CheckResponse(res); err != nil { 3900 return nil, err 3901 } 3902 ret := &Operation{ 3903 ServerResponse: googleapi.ServerResponse{ 3904 Header: res.Header, 3905 HTTPStatusCode: res.StatusCode, 3906 }, 3907 } 3908 target := &ret 3909 if err := gensupport.DecodeResponse(target, res); err != nil { 3910 return nil, err 3911 } 3912 return ret, nil 3913 // { 3914 // "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/).", 3915 // "flatPath": "v1/apps", 3916 // "httpMethod": "POST", 3917 // "id": "appengine.apps.create", 3918 // "parameterOrder": [], 3919 // "parameters": {}, 3920 // "path": "v1/apps", 3921 // "request": { 3922 // "$ref": "Application" 3923 // }, 3924 // "response": { 3925 // "$ref": "Operation" 3926 // }, 3927 // "scopes": [ 3928 // "https://www.googleapis.com/auth/cloud-platform" 3929 // ] 3930 // } 3931 3932} 3933 3934// method id "appengine.apps.get": 3935 3936type AppsGetCall struct { 3937 s *APIService 3938 appsId string 3939 urlParams_ gensupport.URLParams 3940 ifNoneMatch_ string 3941 ctx_ context.Context 3942 header_ http.Header 3943} 3944 3945// Get: Gets information about an application. 3946// 3947// - appsId: Part of `name`. Name of the Application resource to get. 3948// Example: apps/myapp. 3949func (r *AppsService) Get(appsId string) *AppsGetCall { 3950 c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3951 c.appsId = appsId 3952 return c 3953} 3954 3955// Fields allows partial responses to be retrieved. See 3956// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3957// for more information. 3958func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall { 3959 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3960 return c 3961} 3962 3963// IfNoneMatch sets the optional parameter which makes the operation 3964// fail if the object's ETag matches the given value. This is useful for 3965// getting updates only after the object has changed since the last 3966// request. Use googleapi.IsNotModified to check whether the response 3967// error from Do is the result of In-None-Match. 3968func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall { 3969 c.ifNoneMatch_ = entityTag 3970 return c 3971} 3972 3973// Context sets the context to be used in this call's Do method. Any 3974// pending HTTP request will be aborted if the provided context is 3975// canceled. 3976func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall { 3977 c.ctx_ = ctx 3978 return c 3979} 3980 3981// Header returns an http.Header that can be modified by the caller to 3982// add HTTP headers to the request. 3983func (c *AppsGetCall) Header() http.Header { 3984 if c.header_ == nil { 3985 c.header_ = make(http.Header) 3986 } 3987 return c.header_ 3988} 3989 3990func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) { 3991 reqHeaders := make(http.Header) 3992 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3993 for k, v := range c.header_ { 3994 reqHeaders[k] = v 3995 } 3996 reqHeaders.Set("User-Agent", c.s.userAgent()) 3997 if c.ifNoneMatch_ != "" { 3998 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3999 } 4000 var body io.Reader = nil 4001 c.urlParams_.Set("alt", alt) 4002 c.urlParams_.Set("prettyPrint", "false") 4003 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}") 4004 urls += "?" + c.urlParams_.Encode() 4005 req, err := http.NewRequest("GET", urls, body) 4006 if err != nil { 4007 return nil, err 4008 } 4009 req.Header = reqHeaders 4010 googleapi.Expand(req.URL, map[string]string{ 4011 "appsId": c.appsId, 4012 }) 4013 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4014} 4015 4016// Do executes the "appengine.apps.get" call. 4017// Exactly one of *Application or error will be non-nil. Any non-2xx 4018// status code is an error. Response headers are in either 4019// *Application.ServerResponse.Header or (if a response was returned at 4020// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4021// to check whether the returned error was because 4022// http.StatusNotModified was returned. 4023func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) { 4024 gensupport.SetOptions(c.urlParams_, opts...) 4025 res, err := c.doRequest("json") 4026 if res != nil && res.StatusCode == http.StatusNotModified { 4027 if res.Body != nil { 4028 res.Body.Close() 4029 } 4030 return nil, &googleapi.Error{ 4031 Code: res.StatusCode, 4032 Header: res.Header, 4033 } 4034 } 4035 if err != nil { 4036 return nil, err 4037 } 4038 defer googleapi.CloseBody(res) 4039 if err := googleapi.CheckResponse(res); err != nil { 4040 return nil, err 4041 } 4042 ret := &Application{ 4043 ServerResponse: googleapi.ServerResponse{ 4044 Header: res.Header, 4045 HTTPStatusCode: res.StatusCode, 4046 }, 4047 } 4048 target := &ret 4049 if err := gensupport.DecodeResponse(target, res); err != nil { 4050 return nil, err 4051 } 4052 return ret, nil 4053 // { 4054 // "description": "Gets information about an application.", 4055 // "flatPath": "v1/apps/{appsId}", 4056 // "httpMethod": "GET", 4057 // "id": "appengine.apps.get", 4058 // "parameterOrder": [ 4059 // "appsId" 4060 // ], 4061 // "parameters": { 4062 // "appsId": { 4063 // "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.", 4064 // "location": "path", 4065 // "required": true, 4066 // "type": "string" 4067 // } 4068 // }, 4069 // "path": "v1/apps/{appsId}", 4070 // "response": { 4071 // "$ref": "Application" 4072 // }, 4073 // "scopes": [ 4074 // "https://www.googleapis.com/auth/appengine.admin", 4075 // "https://www.googleapis.com/auth/cloud-platform", 4076 // "https://www.googleapis.com/auth/cloud-platform.read-only" 4077 // ] 4078 // } 4079 4080} 4081 4082// method id "appengine.apps.patch": 4083 4084type AppsPatchCall struct { 4085 s *APIService 4086 appsId string 4087 application *Application 4088 urlParams_ gensupport.URLParams 4089 ctx_ context.Context 4090 header_ http.Header 4091} 4092 4093// Patch: Updates the specified Application resource. You can update the 4094// following fields: auth_domain - Google authentication domain for 4095// controlling user access to the application. default_cookie_expiration 4096// - Cookie expiration policy for the application. iap - Identity-Aware 4097// Proxy properties for the application. 4098// 4099// - appsId: Part of `name`. Name of the Application resource to update. 4100// Example: apps/myapp. 4101func (r *AppsService) Patch(appsId string, application *Application) *AppsPatchCall { 4102 c := &AppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4103 c.appsId = appsId 4104 c.application = application 4105 return c 4106} 4107 4108// UpdateMask sets the optional parameter "updateMask": Required. 4109// Standard field mask for the set of fields to be updated. 4110func (c *AppsPatchCall) UpdateMask(updateMask string) *AppsPatchCall { 4111 c.urlParams_.Set("updateMask", updateMask) 4112 return c 4113} 4114 4115// Fields allows partial responses to be retrieved. See 4116// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4117// for more information. 4118func (c *AppsPatchCall) Fields(s ...googleapi.Field) *AppsPatchCall { 4119 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4120 return c 4121} 4122 4123// Context sets the context to be used in this call's Do method. Any 4124// pending HTTP request will be aborted if the provided context is 4125// canceled. 4126func (c *AppsPatchCall) Context(ctx context.Context) *AppsPatchCall { 4127 c.ctx_ = ctx 4128 return c 4129} 4130 4131// Header returns an http.Header that can be modified by the caller to 4132// add HTTP headers to the request. 4133func (c *AppsPatchCall) Header() http.Header { 4134 if c.header_ == nil { 4135 c.header_ = make(http.Header) 4136 } 4137 return c.header_ 4138} 4139 4140func (c *AppsPatchCall) doRequest(alt string) (*http.Response, error) { 4141 reqHeaders := make(http.Header) 4142 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4143 for k, v := range c.header_ { 4144 reqHeaders[k] = v 4145 } 4146 reqHeaders.Set("User-Agent", c.s.userAgent()) 4147 var body io.Reader = nil 4148 body, err := googleapi.WithoutDataWrapper.JSONReader(c.application) 4149 if err != nil { 4150 return nil, err 4151 } 4152 reqHeaders.Set("Content-Type", "application/json") 4153 c.urlParams_.Set("alt", alt) 4154 c.urlParams_.Set("prettyPrint", "false") 4155 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}") 4156 urls += "?" + c.urlParams_.Encode() 4157 req, err := http.NewRequest("PATCH", urls, body) 4158 if err != nil { 4159 return nil, err 4160 } 4161 req.Header = reqHeaders 4162 googleapi.Expand(req.URL, map[string]string{ 4163 "appsId": c.appsId, 4164 }) 4165 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4166} 4167 4168// Do executes the "appengine.apps.patch" call. 4169// Exactly one of *Operation or error will be non-nil. Any non-2xx 4170// status code is an error. Response headers are in either 4171// *Operation.ServerResponse.Header or (if a response was returned at 4172// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4173// to check whether the returned error was because 4174// http.StatusNotModified was returned. 4175func (c *AppsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4176 gensupport.SetOptions(c.urlParams_, opts...) 4177 res, err := c.doRequest("json") 4178 if res != nil && res.StatusCode == http.StatusNotModified { 4179 if res.Body != nil { 4180 res.Body.Close() 4181 } 4182 return nil, &googleapi.Error{ 4183 Code: res.StatusCode, 4184 Header: res.Header, 4185 } 4186 } 4187 if err != nil { 4188 return nil, err 4189 } 4190 defer googleapi.CloseBody(res) 4191 if err := googleapi.CheckResponse(res); err != nil { 4192 return nil, err 4193 } 4194 ret := &Operation{ 4195 ServerResponse: googleapi.ServerResponse{ 4196 Header: res.Header, 4197 HTTPStatusCode: res.StatusCode, 4198 }, 4199 } 4200 target := &ret 4201 if err := gensupport.DecodeResponse(target, res); err != nil { 4202 return nil, err 4203 } 4204 return ret, nil 4205 // { 4206 // "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.", 4207 // "flatPath": "v1/apps/{appsId}", 4208 // "httpMethod": "PATCH", 4209 // "id": "appengine.apps.patch", 4210 // "parameterOrder": [ 4211 // "appsId" 4212 // ], 4213 // "parameters": { 4214 // "appsId": { 4215 // "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", 4216 // "location": "path", 4217 // "required": true, 4218 // "type": "string" 4219 // }, 4220 // "updateMask": { 4221 // "description": "Required. Standard field mask for the set of fields to be updated.", 4222 // "format": "google-fieldmask", 4223 // "location": "query", 4224 // "type": "string" 4225 // } 4226 // }, 4227 // "path": "v1/apps/{appsId}", 4228 // "request": { 4229 // "$ref": "Application" 4230 // }, 4231 // "response": { 4232 // "$ref": "Operation" 4233 // }, 4234 // "scopes": [ 4235 // "https://www.googleapis.com/auth/cloud-platform" 4236 // ] 4237 // } 4238 4239} 4240 4241// method id "appengine.apps.repair": 4242 4243type AppsRepairCall struct { 4244 s *APIService 4245 appsId string 4246 repairapplicationrequest *RepairApplicationRequest 4247 urlParams_ gensupport.URLParams 4248 ctx_ context.Context 4249 header_ http.Header 4250} 4251 4252// Repair: Recreates the required App Engine features for the specified 4253// App Engine application, for example a Cloud Storage bucket or App 4254// Engine service account. Use this method if you receive an error 4255// message about a missing feature, for example, Error retrieving the 4256// App Engine service account. If you have deleted your App Engine 4257// service account, this will not be able to recreate it. Instead, you 4258// should attempt to use the IAM undelete API if possible at 4259// 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 4260// . If the deletion was recent, the numeric ID can be found in the 4261// Cloud Console Activity Log. 4262// 4263// - appsId: Part of `name`. Name of the application to repair. Example: 4264// apps/myapp. 4265func (r *AppsService) Repair(appsId string, repairapplicationrequest *RepairApplicationRequest) *AppsRepairCall { 4266 c := &AppsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4267 c.appsId = appsId 4268 c.repairapplicationrequest = repairapplicationrequest 4269 return c 4270} 4271 4272// Fields allows partial responses to be retrieved. See 4273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4274// for more information. 4275func (c *AppsRepairCall) Fields(s ...googleapi.Field) *AppsRepairCall { 4276 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4277 return c 4278} 4279 4280// Context sets the context to be used in this call's Do method. Any 4281// pending HTTP request will be aborted if the provided context is 4282// canceled. 4283func (c *AppsRepairCall) Context(ctx context.Context) *AppsRepairCall { 4284 c.ctx_ = ctx 4285 return c 4286} 4287 4288// Header returns an http.Header that can be modified by the caller to 4289// add HTTP headers to the request. 4290func (c *AppsRepairCall) Header() http.Header { 4291 if c.header_ == nil { 4292 c.header_ = make(http.Header) 4293 } 4294 return c.header_ 4295} 4296 4297func (c *AppsRepairCall) doRequest(alt string) (*http.Response, error) { 4298 reqHeaders := make(http.Header) 4299 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4300 for k, v := range c.header_ { 4301 reqHeaders[k] = v 4302 } 4303 reqHeaders.Set("User-Agent", c.s.userAgent()) 4304 var body io.Reader = nil 4305 body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairapplicationrequest) 4306 if err != nil { 4307 return nil, err 4308 } 4309 reqHeaders.Set("Content-Type", "application/json") 4310 c.urlParams_.Set("alt", alt) 4311 c.urlParams_.Set("prettyPrint", "false") 4312 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}:repair") 4313 urls += "?" + c.urlParams_.Encode() 4314 req, err := http.NewRequest("POST", urls, body) 4315 if err != nil { 4316 return nil, err 4317 } 4318 req.Header = reqHeaders 4319 googleapi.Expand(req.URL, map[string]string{ 4320 "appsId": c.appsId, 4321 }) 4322 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4323} 4324 4325// Do executes the "appengine.apps.repair" call. 4326// Exactly one of *Operation or error will be non-nil. Any non-2xx 4327// status code is an error. Response headers are in either 4328// *Operation.ServerResponse.Header or (if a response was returned at 4329// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4330// to check whether the returned error was because 4331// http.StatusNotModified was returned. 4332func (c *AppsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4333 gensupport.SetOptions(c.urlParams_, opts...) 4334 res, err := c.doRequest("json") 4335 if res != nil && res.StatusCode == http.StatusNotModified { 4336 if res.Body != nil { 4337 res.Body.Close() 4338 } 4339 return nil, &googleapi.Error{ 4340 Code: res.StatusCode, 4341 Header: res.Header, 4342 } 4343 } 4344 if err != nil { 4345 return nil, err 4346 } 4347 defer googleapi.CloseBody(res) 4348 if err := googleapi.CheckResponse(res); err != nil { 4349 return nil, err 4350 } 4351 ret := &Operation{ 4352 ServerResponse: googleapi.ServerResponse{ 4353 Header: res.Header, 4354 HTTPStatusCode: res.StatusCode, 4355 }, 4356 } 4357 target := &ret 4358 if err := gensupport.DecodeResponse(target, res); err != nil { 4359 return nil, err 4360 } 4361 return ret, nil 4362 // { 4363 // "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.", 4364 // "flatPath": "v1/apps/{appsId}:repair", 4365 // "httpMethod": "POST", 4366 // "id": "appengine.apps.repair", 4367 // "parameterOrder": [ 4368 // "appsId" 4369 // ], 4370 // "parameters": { 4371 // "appsId": { 4372 // "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", 4373 // "location": "path", 4374 // "required": true, 4375 // "type": "string" 4376 // } 4377 // }, 4378 // "path": "v1/apps/{appsId}:repair", 4379 // "request": { 4380 // "$ref": "RepairApplicationRequest" 4381 // }, 4382 // "response": { 4383 // "$ref": "Operation" 4384 // }, 4385 // "scopes": [ 4386 // "https://www.googleapis.com/auth/cloud-platform" 4387 // ] 4388 // } 4389 4390} 4391 4392// method id "appengine.apps.authorizedCertificates.create": 4393 4394type AppsAuthorizedCertificatesCreateCall struct { 4395 s *APIService 4396 appsId string 4397 authorizedcertificate *AuthorizedCertificate 4398 urlParams_ gensupport.URLParams 4399 ctx_ context.Context 4400 header_ http.Header 4401} 4402 4403// Create: Uploads the specified SSL certificate. 4404// 4405// - appsId: Part of `parent`. Name of the parent Application resource. 4406// Example: apps/myapp. 4407func (r *AppsAuthorizedCertificatesService) Create(appsId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesCreateCall { 4408 c := &AppsAuthorizedCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4409 c.appsId = appsId 4410 c.authorizedcertificate = authorizedcertificate 4411 return c 4412} 4413 4414// Fields allows partial responses to be retrieved. See 4415// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4416// for more information. 4417func (c *AppsAuthorizedCertificatesCreateCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesCreateCall { 4418 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4419 return c 4420} 4421 4422// Context sets the context to be used in this call's Do method. Any 4423// pending HTTP request will be aborted if the provided context is 4424// canceled. 4425func (c *AppsAuthorizedCertificatesCreateCall) Context(ctx context.Context) *AppsAuthorizedCertificatesCreateCall { 4426 c.ctx_ = ctx 4427 return c 4428} 4429 4430// Header returns an http.Header that can be modified by the caller to 4431// add HTTP headers to the request. 4432func (c *AppsAuthorizedCertificatesCreateCall) Header() http.Header { 4433 if c.header_ == nil { 4434 c.header_ = make(http.Header) 4435 } 4436 return c.header_ 4437} 4438 4439func (c *AppsAuthorizedCertificatesCreateCall) doRequest(alt string) (*http.Response, error) { 4440 reqHeaders := make(http.Header) 4441 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4442 for k, v := range c.header_ { 4443 reqHeaders[k] = v 4444 } 4445 reqHeaders.Set("User-Agent", c.s.userAgent()) 4446 var body io.Reader = nil 4447 body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate) 4448 if err != nil { 4449 return nil, err 4450 } 4451 reqHeaders.Set("Content-Type", "application/json") 4452 c.urlParams_.Set("alt", alt) 4453 c.urlParams_.Set("prettyPrint", "false") 4454 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates") 4455 urls += "?" + c.urlParams_.Encode() 4456 req, err := http.NewRequest("POST", urls, body) 4457 if err != nil { 4458 return nil, err 4459 } 4460 req.Header = reqHeaders 4461 googleapi.Expand(req.URL, map[string]string{ 4462 "appsId": c.appsId, 4463 }) 4464 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4465} 4466 4467// Do executes the "appengine.apps.authorizedCertificates.create" call. 4468// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 4469// non-2xx status code is an error. Response headers are in either 4470// *AuthorizedCertificate.ServerResponse.Header or (if a response was 4471// returned at all) in error.(*googleapi.Error).Header. Use 4472// googleapi.IsNotModified to check whether the returned error was 4473// because http.StatusNotModified was returned. 4474func (c *AppsAuthorizedCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 4475 gensupport.SetOptions(c.urlParams_, opts...) 4476 res, err := c.doRequest("json") 4477 if res != nil && res.StatusCode == http.StatusNotModified { 4478 if res.Body != nil { 4479 res.Body.Close() 4480 } 4481 return nil, &googleapi.Error{ 4482 Code: res.StatusCode, 4483 Header: res.Header, 4484 } 4485 } 4486 if err != nil { 4487 return nil, err 4488 } 4489 defer googleapi.CloseBody(res) 4490 if err := googleapi.CheckResponse(res); err != nil { 4491 return nil, err 4492 } 4493 ret := &AuthorizedCertificate{ 4494 ServerResponse: googleapi.ServerResponse{ 4495 Header: res.Header, 4496 HTTPStatusCode: res.StatusCode, 4497 }, 4498 } 4499 target := &ret 4500 if err := gensupport.DecodeResponse(target, res); err != nil { 4501 return nil, err 4502 } 4503 return ret, nil 4504 // { 4505 // "description": "Uploads the specified SSL certificate.", 4506 // "flatPath": "v1/apps/{appsId}/authorizedCertificates", 4507 // "httpMethod": "POST", 4508 // "id": "appengine.apps.authorizedCertificates.create", 4509 // "parameterOrder": [ 4510 // "appsId" 4511 // ], 4512 // "parameters": { 4513 // "appsId": { 4514 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 4515 // "location": "path", 4516 // "required": true, 4517 // "type": "string" 4518 // } 4519 // }, 4520 // "path": "v1/apps/{appsId}/authorizedCertificates", 4521 // "request": { 4522 // "$ref": "AuthorizedCertificate" 4523 // }, 4524 // "response": { 4525 // "$ref": "AuthorizedCertificate" 4526 // }, 4527 // "scopes": [ 4528 // "https://www.googleapis.com/auth/cloud-platform" 4529 // ] 4530 // } 4531 4532} 4533 4534// method id "appengine.apps.authorizedCertificates.delete": 4535 4536type AppsAuthorizedCertificatesDeleteCall struct { 4537 s *APIService 4538 appsId string 4539 authorizedCertificatesId string 4540 urlParams_ gensupport.URLParams 4541 ctx_ context.Context 4542 header_ http.Header 4543} 4544 4545// Delete: Deletes the specified SSL certificate. 4546// 4547// - appsId: Part of `name`. Name of the resource to delete. Example: 4548// apps/myapp/authorizedCertificates/12345. 4549// - authorizedCertificatesId: Part of `name`. See documentation of 4550// `appsId`. 4551func (r *AppsAuthorizedCertificatesService) Delete(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesDeleteCall { 4552 c := &AppsAuthorizedCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4553 c.appsId = appsId 4554 c.authorizedCertificatesId = authorizedCertificatesId 4555 return c 4556} 4557 4558// Fields allows partial responses to be retrieved. See 4559// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4560// for more information. 4561func (c *AppsAuthorizedCertificatesDeleteCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesDeleteCall { 4562 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4563 return c 4564} 4565 4566// Context sets the context to be used in this call's Do method. Any 4567// pending HTTP request will be aborted if the provided context is 4568// canceled. 4569func (c *AppsAuthorizedCertificatesDeleteCall) Context(ctx context.Context) *AppsAuthorizedCertificatesDeleteCall { 4570 c.ctx_ = ctx 4571 return c 4572} 4573 4574// Header returns an http.Header that can be modified by the caller to 4575// add HTTP headers to the request. 4576func (c *AppsAuthorizedCertificatesDeleteCall) Header() http.Header { 4577 if c.header_ == nil { 4578 c.header_ = make(http.Header) 4579 } 4580 return c.header_ 4581} 4582 4583func (c *AppsAuthorizedCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { 4584 reqHeaders := make(http.Header) 4585 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4586 for k, v := range c.header_ { 4587 reqHeaders[k] = v 4588 } 4589 reqHeaders.Set("User-Agent", c.s.userAgent()) 4590 var body io.Reader = nil 4591 c.urlParams_.Set("alt", alt) 4592 c.urlParams_.Set("prettyPrint", "false") 4593 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 4594 urls += "?" + c.urlParams_.Encode() 4595 req, err := http.NewRequest("DELETE", urls, body) 4596 if err != nil { 4597 return nil, err 4598 } 4599 req.Header = reqHeaders 4600 googleapi.Expand(req.URL, map[string]string{ 4601 "appsId": c.appsId, 4602 "authorizedCertificatesId": c.authorizedCertificatesId, 4603 }) 4604 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4605} 4606 4607// Do executes the "appengine.apps.authorizedCertificates.delete" call. 4608// Exactly one of *Empty or error will be non-nil. Any non-2xx status 4609// code is an error. Response headers are in either 4610// *Empty.ServerResponse.Header or (if a response was returned at all) 4611// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4612// check whether the returned error was because http.StatusNotModified 4613// was returned. 4614func (c *AppsAuthorizedCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4615 gensupport.SetOptions(c.urlParams_, opts...) 4616 res, err := c.doRequest("json") 4617 if res != nil && res.StatusCode == http.StatusNotModified { 4618 if res.Body != nil { 4619 res.Body.Close() 4620 } 4621 return nil, &googleapi.Error{ 4622 Code: res.StatusCode, 4623 Header: res.Header, 4624 } 4625 } 4626 if err != nil { 4627 return nil, err 4628 } 4629 defer googleapi.CloseBody(res) 4630 if err := googleapi.CheckResponse(res); err != nil { 4631 return nil, err 4632 } 4633 ret := &Empty{ 4634 ServerResponse: googleapi.ServerResponse{ 4635 Header: res.Header, 4636 HTTPStatusCode: res.StatusCode, 4637 }, 4638 } 4639 target := &ret 4640 if err := gensupport.DecodeResponse(target, res); err != nil { 4641 return nil, err 4642 } 4643 return ret, nil 4644 // { 4645 // "description": "Deletes the specified SSL certificate.", 4646 // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4647 // "httpMethod": "DELETE", 4648 // "id": "appengine.apps.authorizedCertificates.delete", 4649 // "parameterOrder": [ 4650 // "appsId", 4651 // "authorizedCertificatesId" 4652 // ], 4653 // "parameters": { 4654 // "appsId": { 4655 // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", 4656 // "location": "path", 4657 // "required": true, 4658 // "type": "string" 4659 // }, 4660 // "authorizedCertificatesId": { 4661 // "description": "Part of `name`. See documentation of `appsId`.", 4662 // "location": "path", 4663 // "required": true, 4664 // "type": "string" 4665 // } 4666 // }, 4667 // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4668 // "response": { 4669 // "$ref": "Empty" 4670 // }, 4671 // "scopes": [ 4672 // "https://www.googleapis.com/auth/cloud-platform" 4673 // ] 4674 // } 4675 4676} 4677 4678// method id "appengine.apps.authorizedCertificates.get": 4679 4680type AppsAuthorizedCertificatesGetCall struct { 4681 s *APIService 4682 appsId string 4683 authorizedCertificatesId string 4684 urlParams_ gensupport.URLParams 4685 ifNoneMatch_ string 4686 ctx_ context.Context 4687 header_ http.Header 4688} 4689 4690// Get: Gets the specified SSL certificate. 4691// 4692// - appsId: Part of `name`. Name of the resource requested. Example: 4693// apps/myapp/authorizedCertificates/12345. 4694// - authorizedCertificatesId: Part of `name`. See documentation of 4695// `appsId`. 4696func (r *AppsAuthorizedCertificatesService) Get(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesGetCall { 4697 c := &AppsAuthorizedCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4698 c.appsId = appsId 4699 c.authorizedCertificatesId = authorizedCertificatesId 4700 return c 4701} 4702 4703// View sets the optional parameter "view": Controls the set of fields 4704// returned in the GET response. 4705// 4706// Possible values: 4707// "BASIC_CERTIFICATE" - Basic certificate information, including 4708// applicable domains and expiration date. 4709// "FULL_CERTIFICATE" - The information from BASIC_CERTIFICATE, plus 4710// detailed information on the domain mappings that have this 4711// certificate mapped. 4712func (c *AppsAuthorizedCertificatesGetCall) View(view string) *AppsAuthorizedCertificatesGetCall { 4713 c.urlParams_.Set("view", view) 4714 return c 4715} 4716 4717// Fields allows partial responses to be retrieved. See 4718// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4719// for more information. 4720func (c *AppsAuthorizedCertificatesGetCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesGetCall { 4721 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4722 return c 4723} 4724 4725// IfNoneMatch sets the optional parameter which makes the operation 4726// fail if the object's ETag matches the given value. This is useful for 4727// getting updates only after the object has changed since the last 4728// request. Use googleapi.IsNotModified to check whether the response 4729// error from Do is the result of In-None-Match. 4730func (c *AppsAuthorizedCertificatesGetCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesGetCall { 4731 c.ifNoneMatch_ = entityTag 4732 return c 4733} 4734 4735// Context sets the context to be used in this call's Do method. Any 4736// pending HTTP request will be aborted if the provided context is 4737// canceled. 4738func (c *AppsAuthorizedCertificatesGetCall) Context(ctx context.Context) *AppsAuthorizedCertificatesGetCall { 4739 c.ctx_ = ctx 4740 return c 4741} 4742 4743// Header returns an http.Header that can be modified by the caller to 4744// add HTTP headers to the request. 4745func (c *AppsAuthorizedCertificatesGetCall) Header() http.Header { 4746 if c.header_ == nil { 4747 c.header_ = make(http.Header) 4748 } 4749 return c.header_ 4750} 4751 4752func (c *AppsAuthorizedCertificatesGetCall) doRequest(alt string) (*http.Response, error) { 4753 reqHeaders := make(http.Header) 4754 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4755 for k, v := range c.header_ { 4756 reqHeaders[k] = v 4757 } 4758 reqHeaders.Set("User-Agent", c.s.userAgent()) 4759 if c.ifNoneMatch_ != "" { 4760 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4761 } 4762 var body io.Reader = nil 4763 c.urlParams_.Set("alt", alt) 4764 c.urlParams_.Set("prettyPrint", "false") 4765 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 4766 urls += "?" + c.urlParams_.Encode() 4767 req, err := http.NewRequest("GET", urls, body) 4768 if err != nil { 4769 return nil, err 4770 } 4771 req.Header = reqHeaders 4772 googleapi.Expand(req.URL, map[string]string{ 4773 "appsId": c.appsId, 4774 "authorizedCertificatesId": c.authorizedCertificatesId, 4775 }) 4776 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4777} 4778 4779// Do executes the "appengine.apps.authorizedCertificates.get" call. 4780// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 4781// non-2xx status code is an error. Response headers are in either 4782// *AuthorizedCertificate.ServerResponse.Header or (if a response was 4783// returned at all) in error.(*googleapi.Error).Header. Use 4784// googleapi.IsNotModified to check whether the returned error was 4785// because http.StatusNotModified was returned. 4786func (c *AppsAuthorizedCertificatesGetCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 4787 gensupport.SetOptions(c.urlParams_, opts...) 4788 res, err := c.doRequest("json") 4789 if res != nil && res.StatusCode == http.StatusNotModified { 4790 if res.Body != nil { 4791 res.Body.Close() 4792 } 4793 return nil, &googleapi.Error{ 4794 Code: res.StatusCode, 4795 Header: res.Header, 4796 } 4797 } 4798 if err != nil { 4799 return nil, err 4800 } 4801 defer googleapi.CloseBody(res) 4802 if err := googleapi.CheckResponse(res); err != nil { 4803 return nil, err 4804 } 4805 ret := &AuthorizedCertificate{ 4806 ServerResponse: googleapi.ServerResponse{ 4807 Header: res.Header, 4808 HTTPStatusCode: res.StatusCode, 4809 }, 4810 } 4811 target := &ret 4812 if err := gensupport.DecodeResponse(target, res); err != nil { 4813 return nil, err 4814 } 4815 return ret, nil 4816 // { 4817 // "description": "Gets the specified SSL certificate.", 4818 // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4819 // "httpMethod": "GET", 4820 // "id": "appengine.apps.authorizedCertificates.get", 4821 // "parameterOrder": [ 4822 // "appsId", 4823 // "authorizedCertificatesId" 4824 // ], 4825 // "parameters": { 4826 // "appsId": { 4827 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", 4828 // "location": "path", 4829 // "required": true, 4830 // "type": "string" 4831 // }, 4832 // "authorizedCertificatesId": { 4833 // "description": "Part of `name`. See documentation of `appsId`.", 4834 // "location": "path", 4835 // "required": true, 4836 // "type": "string" 4837 // }, 4838 // "view": { 4839 // "description": "Controls the set of fields returned in the GET response.", 4840 // "enum": [ 4841 // "BASIC_CERTIFICATE", 4842 // "FULL_CERTIFICATE" 4843 // ], 4844 // "enumDescriptions": [ 4845 // "Basic certificate information, including applicable domains and expiration date.", 4846 // "The information from BASIC_CERTIFICATE, plus detailed information on the domain mappings that have this certificate mapped." 4847 // ], 4848 // "location": "query", 4849 // "type": "string" 4850 // } 4851 // }, 4852 // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4853 // "response": { 4854 // "$ref": "AuthorizedCertificate" 4855 // }, 4856 // "scopes": [ 4857 // "https://www.googleapis.com/auth/appengine.admin", 4858 // "https://www.googleapis.com/auth/cloud-platform", 4859 // "https://www.googleapis.com/auth/cloud-platform.read-only" 4860 // ] 4861 // } 4862 4863} 4864 4865// method id "appengine.apps.authorizedCertificates.list": 4866 4867type AppsAuthorizedCertificatesListCall struct { 4868 s *APIService 4869 appsId string 4870 urlParams_ gensupport.URLParams 4871 ifNoneMatch_ string 4872 ctx_ context.Context 4873 header_ http.Header 4874} 4875 4876// List: Lists all SSL certificates the user is authorized to 4877// administer. 4878// 4879// - appsId: Part of `parent`. Name of the parent Application resource. 4880// Example: apps/myapp. 4881func (r *AppsAuthorizedCertificatesService) List(appsId string) *AppsAuthorizedCertificatesListCall { 4882 c := &AppsAuthorizedCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4883 c.appsId = appsId 4884 return c 4885} 4886 4887// PageSize sets the optional parameter "pageSize": Maximum results to 4888// return per page. 4889func (c *AppsAuthorizedCertificatesListCall) PageSize(pageSize int64) *AppsAuthorizedCertificatesListCall { 4890 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4891 return c 4892} 4893 4894// PageToken sets the optional parameter "pageToken": Continuation token 4895// for fetching the next page of results. 4896func (c *AppsAuthorizedCertificatesListCall) PageToken(pageToken string) *AppsAuthorizedCertificatesListCall { 4897 c.urlParams_.Set("pageToken", pageToken) 4898 return c 4899} 4900 4901// View sets the optional parameter "view": Controls the set of fields 4902// returned in the LIST response. 4903// 4904// Possible values: 4905// "BASIC_CERTIFICATE" - Basic certificate information, including 4906// applicable domains and expiration date. 4907// "FULL_CERTIFICATE" - The information from BASIC_CERTIFICATE, plus 4908// detailed information on the domain mappings that have this 4909// certificate mapped. 4910func (c *AppsAuthorizedCertificatesListCall) View(view string) *AppsAuthorizedCertificatesListCall { 4911 c.urlParams_.Set("view", view) 4912 return c 4913} 4914 4915// Fields allows partial responses to be retrieved. See 4916// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4917// for more information. 4918func (c *AppsAuthorizedCertificatesListCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesListCall { 4919 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4920 return c 4921} 4922 4923// IfNoneMatch sets the optional parameter which makes the operation 4924// fail if the object's ETag matches the given value. This is useful for 4925// getting updates only after the object has changed since the last 4926// request. Use googleapi.IsNotModified to check whether the response 4927// error from Do is the result of In-None-Match. 4928func (c *AppsAuthorizedCertificatesListCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesListCall { 4929 c.ifNoneMatch_ = entityTag 4930 return c 4931} 4932 4933// Context sets the context to be used in this call's Do method. Any 4934// pending HTTP request will be aborted if the provided context is 4935// canceled. 4936func (c *AppsAuthorizedCertificatesListCall) Context(ctx context.Context) *AppsAuthorizedCertificatesListCall { 4937 c.ctx_ = ctx 4938 return c 4939} 4940 4941// Header returns an http.Header that can be modified by the caller to 4942// add HTTP headers to the request. 4943func (c *AppsAuthorizedCertificatesListCall) Header() http.Header { 4944 if c.header_ == nil { 4945 c.header_ = make(http.Header) 4946 } 4947 return c.header_ 4948} 4949 4950func (c *AppsAuthorizedCertificatesListCall) doRequest(alt string) (*http.Response, error) { 4951 reqHeaders := make(http.Header) 4952 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4953 for k, v := range c.header_ { 4954 reqHeaders[k] = v 4955 } 4956 reqHeaders.Set("User-Agent", c.s.userAgent()) 4957 if c.ifNoneMatch_ != "" { 4958 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4959 } 4960 var body io.Reader = nil 4961 c.urlParams_.Set("alt", alt) 4962 c.urlParams_.Set("prettyPrint", "false") 4963 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates") 4964 urls += "?" + c.urlParams_.Encode() 4965 req, err := http.NewRequest("GET", urls, body) 4966 if err != nil { 4967 return nil, err 4968 } 4969 req.Header = reqHeaders 4970 googleapi.Expand(req.URL, map[string]string{ 4971 "appsId": c.appsId, 4972 }) 4973 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4974} 4975 4976// Do executes the "appengine.apps.authorizedCertificates.list" call. 4977// Exactly one of *ListAuthorizedCertificatesResponse or error will be 4978// non-nil. Any non-2xx status code is an error. Response headers are in 4979// either *ListAuthorizedCertificatesResponse.ServerResponse.Header or 4980// (if a response was returned at all) in 4981// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4982// whether the returned error was because http.StatusNotModified was 4983// returned. 4984func (c *AppsAuthorizedCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedCertificatesResponse, error) { 4985 gensupport.SetOptions(c.urlParams_, opts...) 4986 res, err := c.doRequest("json") 4987 if res != nil && res.StatusCode == http.StatusNotModified { 4988 if res.Body != nil { 4989 res.Body.Close() 4990 } 4991 return nil, &googleapi.Error{ 4992 Code: res.StatusCode, 4993 Header: res.Header, 4994 } 4995 } 4996 if err != nil { 4997 return nil, err 4998 } 4999 defer googleapi.CloseBody(res) 5000 if err := googleapi.CheckResponse(res); err != nil { 5001 return nil, err 5002 } 5003 ret := &ListAuthorizedCertificatesResponse{ 5004 ServerResponse: googleapi.ServerResponse{ 5005 Header: res.Header, 5006 HTTPStatusCode: res.StatusCode, 5007 }, 5008 } 5009 target := &ret 5010 if err := gensupport.DecodeResponse(target, res); err != nil { 5011 return nil, err 5012 } 5013 return ret, nil 5014 // { 5015 // "description": "Lists all SSL certificates the user is authorized to administer.", 5016 // "flatPath": "v1/apps/{appsId}/authorizedCertificates", 5017 // "httpMethod": "GET", 5018 // "id": "appengine.apps.authorizedCertificates.list", 5019 // "parameterOrder": [ 5020 // "appsId" 5021 // ], 5022 // "parameters": { 5023 // "appsId": { 5024 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5025 // "location": "path", 5026 // "required": true, 5027 // "type": "string" 5028 // }, 5029 // "pageSize": { 5030 // "description": "Maximum results to return per page.", 5031 // "format": "int32", 5032 // "location": "query", 5033 // "type": "integer" 5034 // }, 5035 // "pageToken": { 5036 // "description": "Continuation token for fetching the next page of results.", 5037 // "location": "query", 5038 // "type": "string" 5039 // }, 5040 // "view": { 5041 // "description": "Controls the set of fields returned in the LIST response.", 5042 // "enum": [ 5043 // "BASIC_CERTIFICATE", 5044 // "FULL_CERTIFICATE" 5045 // ], 5046 // "enumDescriptions": [ 5047 // "Basic certificate information, including applicable domains and expiration date.", 5048 // "The information from BASIC_CERTIFICATE, plus detailed information on the domain mappings that have this certificate mapped." 5049 // ], 5050 // "location": "query", 5051 // "type": "string" 5052 // } 5053 // }, 5054 // "path": "v1/apps/{appsId}/authorizedCertificates", 5055 // "response": { 5056 // "$ref": "ListAuthorizedCertificatesResponse" 5057 // }, 5058 // "scopes": [ 5059 // "https://www.googleapis.com/auth/appengine.admin", 5060 // "https://www.googleapis.com/auth/cloud-platform", 5061 // "https://www.googleapis.com/auth/cloud-platform.read-only" 5062 // ] 5063 // } 5064 5065} 5066 5067// Pages invokes f for each page of results. 5068// A non-nil error returned from f will halt the iteration. 5069// The provided context supersedes any context provided to the Context method. 5070func (c *AppsAuthorizedCertificatesListCall) Pages(ctx context.Context, f func(*ListAuthorizedCertificatesResponse) error) error { 5071 c.ctx_ = ctx 5072 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5073 for { 5074 x, err := c.Do() 5075 if err != nil { 5076 return err 5077 } 5078 if err := f(x); err != nil { 5079 return err 5080 } 5081 if x.NextPageToken == "" { 5082 return nil 5083 } 5084 c.PageToken(x.NextPageToken) 5085 } 5086} 5087 5088// method id "appengine.apps.authorizedCertificates.patch": 5089 5090type AppsAuthorizedCertificatesPatchCall struct { 5091 s *APIService 5092 appsId string 5093 authorizedCertificatesId string 5094 authorizedcertificate *AuthorizedCertificate 5095 urlParams_ gensupport.URLParams 5096 ctx_ context.Context 5097 header_ http.Header 5098} 5099 5100// Patch: Updates the specified SSL certificate. To renew a certificate 5101// and maintain its existing domain mappings, update certificate_data 5102// with a new certificate. The new certificate must be applicable to the 5103// same domains as the original certificate. The certificate 5104// display_name may also be updated. 5105// 5106// - appsId: Part of `name`. Name of the resource to update. Example: 5107// apps/myapp/authorizedCertificates/12345. 5108// - authorizedCertificatesId: Part of `name`. See documentation of 5109// `appsId`. 5110func (r *AppsAuthorizedCertificatesService) Patch(appsId string, authorizedCertificatesId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesPatchCall { 5111 c := &AppsAuthorizedCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5112 c.appsId = appsId 5113 c.authorizedCertificatesId = authorizedCertificatesId 5114 c.authorizedcertificate = authorizedcertificate 5115 return c 5116} 5117 5118// UpdateMask sets the optional parameter "updateMask": Standard field 5119// mask for the set of fields to be updated. Updates are only supported 5120// on the certificate_raw_data and display_name fields. 5121func (c *AppsAuthorizedCertificatesPatchCall) UpdateMask(updateMask string) *AppsAuthorizedCertificatesPatchCall { 5122 c.urlParams_.Set("updateMask", updateMask) 5123 return c 5124} 5125 5126// Fields allows partial responses to be retrieved. See 5127// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5128// for more information. 5129func (c *AppsAuthorizedCertificatesPatchCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesPatchCall { 5130 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5131 return c 5132} 5133 5134// Context sets the context to be used in this call's Do method. Any 5135// pending HTTP request will be aborted if the provided context is 5136// canceled. 5137func (c *AppsAuthorizedCertificatesPatchCall) Context(ctx context.Context) *AppsAuthorizedCertificatesPatchCall { 5138 c.ctx_ = ctx 5139 return c 5140} 5141 5142// Header returns an http.Header that can be modified by the caller to 5143// add HTTP headers to the request. 5144func (c *AppsAuthorizedCertificatesPatchCall) Header() http.Header { 5145 if c.header_ == nil { 5146 c.header_ = make(http.Header) 5147 } 5148 return c.header_ 5149} 5150 5151func (c *AppsAuthorizedCertificatesPatchCall) doRequest(alt string) (*http.Response, error) { 5152 reqHeaders := make(http.Header) 5153 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5154 for k, v := range c.header_ { 5155 reqHeaders[k] = v 5156 } 5157 reqHeaders.Set("User-Agent", c.s.userAgent()) 5158 var body io.Reader = nil 5159 body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate) 5160 if err != nil { 5161 return nil, err 5162 } 5163 reqHeaders.Set("Content-Type", "application/json") 5164 c.urlParams_.Set("alt", alt) 5165 c.urlParams_.Set("prettyPrint", "false") 5166 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 5167 urls += "?" + c.urlParams_.Encode() 5168 req, err := http.NewRequest("PATCH", urls, body) 5169 if err != nil { 5170 return nil, err 5171 } 5172 req.Header = reqHeaders 5173 googleapi.Expand(req.URL, map[string]string{ 5174 "appsId": c.appsId, 5175 "authorizedCertificatesId": c.authorizedCertificatesId, 5176 }) 5177 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5178} 5179 5180// Do executes the "appengine.apps.authorizedCertificates.patch" call. 5181// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 5182// non-2xx status code is an error. Response headers are in either 5183// *AuthorizedCertificate.ServerResponse.Header or (if a response was 5184// returned at all) in error.(*googleapi.Error).Header. Use 5185// googleapi.IsNotModified to check whether the returned error was 5186// because http.StatusNotModified was returned. 5187func (c *AppsAuthorizedCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 5188 gensupport.SetOptions(c.urlParams_, opts...) 5189 res, err := c.doRequest("json") 5190 if res != nil && res.StatusCode == http.StatusNotModified { 5191 if res.Body != nil { 5192 res.Body.Close() 5193 } 5194 return nil, &googleapi.Error{ 5195 Code: res.StatusCode, 5196 Header: res.Header, 5197 } 5198 } 5199 if err != nil { 5200 return nil, err 5201 } 5202 defer googleapi.CloseBody(res) 5203 if err := googleapi.CheckResponse(res); err != nil { 5204 return nil, err 5205 } 5206 ret := &AuthorizedCertificate{ 5207 ServerResponse: googleapi.ServerResponse{ 5208 Header: res.Header, 5209 HTTPStatusCode: res.StatusCode, 5210 }, 5211 } 5212 target := &ret 5213 if err := gensupport.DecodeResponse(target, res); err != nil { 5214 return nil, err 5215 } 5216 return ret, nil 5217 // { 5218 // "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.", 5219 // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 5220 // "httpMethod": "PATCH", 5221 // "id": "appengine.apps.authorizedCertificates.patch", 5222 // "parameterOrder": [ 5223 // "appsId", 5224 // "authorizedCertificatesId" 5225 // ], 5226 // "parameters": { 5227 // "appsId": { 5228 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", 5229 // "location": "path", 5230 // "required": true, 5231 // "type": "string" 5232 // }, 5233 // "authorizedCertificatesId": { 5234 // "description": "Part of `name`. See documentation of `appsId`.", 5235 // "location": "path", 5236 // "required": true, 5237 // "type": "string" 5238 // }, 5239 // "updateMask": { 5240 // "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.", 5241 // "format": "google-fieldmask", 5242 // "location": "query", 5243 // "type": "string" 5244 // } 5245 // }, 5246 // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 5247 // "request": { 5248 // "$ref": "AuthorizedCertificate" 5249 // }, 5250 // "response": { 5251 // "$ref": "AuthorizedCertificate" 5252 // }, 5253 // "scopes": [ 5254 // "https://www.googleapis.com/auth/cloud-platform" 5255 // ] 5256 // } 5257 5258} 5259 5260// method id "appengine.apps.authorizedDomains.list": 5261 5262type AppsAuthorizedDomainsListCall struct { 5263 s *APIService 5264 appsId string 5265 urlParams_ gensupport.URLParams 5266 ifNoneMatch_ string 5267 ctx_ context.Context 5268 header_ http.Header 5269} 5270 5271// List: Lists all domains the user is authorized to administer. 5272// 5273// - appsId: Part of `parent`. Name of the parent Application resource. 5274// Example: apps/myapp. 5275func (r *AppsAuthorizedDomainsService) List(appsId string) *AppsAuthorizedDomainsListCall { 5276 c := &AppsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5277 c.appsId = appsId 5278 return c 5279} 5280 5281// PageSize sets the optional parameter "pageSize": Maximum results to 5282// return per page. 5283func (c *AppsAuthorizedDomainsListCall) PageSize(pageSize int64) *AppsAuthorizedDomainsListCall { 5284 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5285 return c 5286} 5287 5288// PageToken sets the optional parameter "pageToken": Continuation token 5289// for fetching the next page of results. 5290func (c *AppsAuthorizedDomainsListCall) PageToken(pageToken string) *AppsAuthorizedDomainsListCall { 5291 c.urlParams_.Set("pageToken", pageToken) 5292 return c 5293} 5294 5295// Fields allows partial responses to be retrieved. See 5296// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5297// for more information. 5298func (c *AppsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *AppsAuthorizedDomainsListCall { 5299 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5300 return c 5301} 5302 5303// IfNoneMatch sets the optional parameter which makes the operation 5304// fail if the object's ETag matches the given value. This is useful for 5305// getting updates only after the object has changed since the last 5306// request. Use googleapi.IsNotModified to check whether the response 5307// error from Do is the result of In-None-Match. 5308func (c *AppsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *AppsAuthorizedDomainsListCall { 5309 c.ifNoneMatch_ = entityTag 5310 return c 5311} 5312 5313// Context sets the context to be used in this call's Do method. Any 5314// pending HTTP request will be aborted if the provided context is 5315// canceled. 5316func (c *AppsAuthorizedDomainsListCall) Context(ctx context.Context) *AppsAuthorizedDomainsListCall { 5317 c.ctx_ = ctx 5318 return c 5319} 5320 5321// Header returns an http.Header that can be modified by the caller to 5322// add HTTP headers to the request. 5323func (c *AppsAuthorizedDomainsListCall) Header() http.Header { 5324 if c.header_ == nil { 5325 c.header_ = make(http.Header) 5326 } 5327 return c.header_ 5328} 5329 5330func (c *AppsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) { 5331 reqHeaders := make(http.Header) 5332 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5333 for k, v := range c.header_ { 5334 reqHeaders[k] = v 5335 } 5336 reqHeaders.Set("User-Agent", c.s.userAgent()) 5337 if c.ifNoneMatch_ != "" { 5338 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5339 } 5340 var body io.Reader = nil 5341 c.urlParams_.Set("alt", alt) 5342 c.urlParams_.Set("prettyPrint", "false") 5343 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedDomains") 5344 urls += "?" + c.urlParams_.Encode() 5345 req, err := http.NewRequest("GET", urls, body) 5346 if err != nil { 5347 return nil, err 5348 } 5349 req.Header = reqHeaders 5350 googleapi.Expand(req.URL, map[string]string{ 5351 "appsId": c.appsId, 5352 }) 5353 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5354} 5355 5356// Do executes the "appengine.apps.authorizedDomains.list" call. 5357// Exactly one of *ListAuthorizedDomainsResponse or error will be 5358// non-nil. Any non-2xx status code is an error. Response headers are in 5359// either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a 5360// response was returned at all) in error.(*googleapi.Error).Header. Use 5361// googleapi.IsNotModified to check whether the returned error was 5362// because http.StatusNotModified was returned. 5363func (c *AppsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, error) { 5364 gensupport.SetOptions(c.urlParams_, opts...) 5365 res, err := c.doRequest("json") 5366 if res != nil && res.StatusCode == http.StatusNotModified { 5367 if res.Body != nil { 5368 res.Body.Close() 5369 } 5370 return nil, &googleapi.Error{ 5371 Code: res.StatusCode, 5372 Header: res.Header, 5373 } 5374 } 5375 if err != nil { 5376 return nil, err 5377 } 5378 defer googleapi.CloseBody(res) 5379 if err := googleapi.CheckResponse(res); err != nil { 5380 return nil, err 5381 } 5382 ret := &ListAuthorizedDomainsResponse{ 5383 ServerResponse: googleapi.ServerResponse{ 5384 Header: res.Header, 5385 HTTPStatusCode: res.StatusCode, 5386 }, 5387 } 5388 target := &ret 5389 if err := gensupport.DecodeResponse(target, res); err != nil { 5390 return nil, err 5391 } 5392 return ret, nil 5393 // { 5394 // "description": "Lists all domains the user is authorized to administer.", 5395 // "flatPath": "v1/apps/{appsId}/authorizedDomains", 5396 // "httpMethod": "GET", 5397 // "id": "appengine.apps.authorizedDomains.list", 5398 // "parameterOrder": [ 5399 // "appsId" 5400 // ], 5401 // "parameters": { 5402 // "appsId": { 5403 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5404 // "location": "path", 5405 // "required": true, 5406 // "type": "string" 5407 // }, 5408 // "pageSize": { 5409 // "description": "Maximum results to return per page.", 5410 // "format": "int32", 5411 // "location": "query", 5412 // "type": "integer" 5413 // }, 5414 // "pageToken": { 5415 // "description": "Continuation token for fetching the next page of results.", 5416 // "location": "query", 5417 // "type": "string" 5418 // } 5419 // }, 5420 // "path": "v1/apps/{appsId}/authorizedDomains", 5421 // "response": { 5422 // "$ref": "ListAuthorizedDomainsResponse" 5423 // }, 5424 // "scopes": [ 5425 // "https://www.googleapis.com/auth/appengine.admin", 5426 // "https://www.googleapis.com/auth/cloud-platform", 5427 // "https://www.googleapis.com/auth/cloud-platform.read-only" 5428 // ] 5429 // } 5430 5431} 5432 5433// Pages invokes f for each page of results. 5434// A non-nil error returned from f will halt the iteration. 5435// The provided context supersedes any context provided to the Context method. 5436func (c *AppsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) error) error { 5437 c.ctx_ = ctx 5438 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5439 for { 5440 x, err := c.Do() 5441 if err != nil { 5442 return err 5443 } 5444 if err := f(x); err != nil { 5445 return err 5446 } 5447 if x.NextPageToken == "" { 5448 return nil 5449 } 5450 c.PageToken(x.NextPageToken) 5451 } 5452} 5453 5454// method id "appengine.apps.domainMappings.create": 5455 5456type AppsDomainMappingsCreateCall struct { 5457 s *APIService 5458 appsId string 5459 domainmapping *DomainMapping 5460 urlParams_ gensupport.URLParams 5461 ctx_ context.Context 5462 header_ http.Header 5463} 5464 5465// Create: Maps a domain to an application. A user must be authorized to 5466// administer a domain in order to map it to an application. For a list 5467// of available authorized domains, see 5468// AuthorizedDomains.ListAuthorizedDomains. 5469// 5470// - appsId: Part of `parent`. Name of the parent Application resource. 5471// Example: apps/myapp. 5472func (r *AppsDomainMappingsService) Create(appsId string, domainmapping *DomainMapping) *AppsDomainMappingsCreateCall { 5473 c := &AppsDomainMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5474 c.appsId = appsId 5475 c.domainmapping = domainmapping 5476 return c 5477} 5478 5479// OverrideStrategy sets the optional parameter "overrideStrategy": 5480// Whether the domain creation should override any existing mappings for 5481// this domain. By default, overrides are rejected. 5482// 5483// Possible values: 5484// "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY" - Strategy unspecified. 5485// Defaults to STRICT. 5486// "STRICT" - Overrides not allowed. If a mapping already exists for 5487// the specified domain, the request will return an ALREADY_EXISTS 5488// (409). 5489// "OVERRIDE" - Overrides allowed. If a mapping already exists for the 5490// specified domain, the request will overwrite it. Note that this might 5491// stop another Google product from serving. For example, if the domain 5492// is mapped to another App Engine application, that app will no longer 5493// serve from that domain. 5494func (c *AppsDomainMappingsCreateCall) OverrideStrategy(overrideStrategy string) *AppsDomainMappingsCreateCall { 5495 c.urlParams_.Set("overrideStrategy", overrideStrategy) 5496 return c 5497} 5498 5499// Fields allows partial responses to be retrieved. See 5500// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5501// for more information. 5502func (c *AppsDomainMappingsCreateCall) Fields(s ...googleapi.Field) *AppsDomainMappingsCreateCall { 5503 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5504 return c 5505} 5506 5507// Context sets the context to be used in this call's Do method. Any 5508// pending HTTP request will be aborted if the provided context is 5509// canceled. 5510func (c *AppsDomainMappingsCreateCall) Context(ctx context.Context) *AppsDomainMappingsCreateCall { 5511 c.ctx_ = ctx 5512 return c 5513} 5514 5515// Header returns an http.Header that can be modified by the caller to 5516// add HTTP headers to the request. 5517func (c *AppsDomainMappingsCreateCall) Header() http.Header { 5518 if c.header_ == nil { 5519 c.header_ = make(http.Header) 5520 } 5521 return c.header_ 5522} 5523 5524func (c *AppsDomainMappingsCreateCall) doRequest(alt string) (*http.Response, error) { 5525 reqHeaders := make(http.Header) 5526 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5527 for k, v := range c.header_ { 5528 reqHeaders[k] = v 5529 } 5530 reqHeaders.Set("User-Agent", c.s.userAgent()) 5531 var body io.Reader = nil 5532 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping) 5533 if err != nil { 5534 return nil, err 5535 } 5536 reqHeaders.Set("Content-Type", "application/json") 5537 c.urlParams_.Set("alt", alt) 5538 c.urlParams_.Set("prettyPrint", "false") 5539 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings") 5540 urls += "?" + c.urlParams_.Encode() 5541 req, err := http.NewRequest("POST", urls, body) 5542 if err != nil { 5543 return nil, err 5544 } 5545 req.Header = reqHeaders 5546 googleapi.Expand(req.URL, map[string]string{ 5547 "appsId": c.appsId, 5548 }) 5549 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5550} 5551 5552// Do executes the "appengine.apps.domainMappings.create" call. 5553// Exactly one of *Operation or error will be non-nil. Any non-2xx 5554// status code is an error. Response headers are in either 5555// *Operation.ServerResponse.Header or (if a response was returned at 5556// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5557// to check whether the returned error was because 5558// http.StatusNotModified was returned. 5559func (c *AppsDomainMappingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5560 gensupport.SetOptions(c.urlParams_, opts...) 5561 res, err := c.doRequest("json") 5562 if res != nil && res.StatusCode == http.StatusNotModified { 5563 if res.Body != nil { 5564 res.Body.Close() 5565 } 5566 return nil, &googleapi.Error{ 5567 Code: res.StatusCode, 5568 Header: res.Header, 5569 } 5570 } 5571 if err != nil { 5572 return nil, err 5573 } 5574 defer googleapi.CloseBody(res) 5575 if err := googleapi.CheckResponse(res); err != nil { 5576 return nil, err 5577 } 5578 ret := &Operation{ 5579 ServerResponse: googleapi.ServerResponse{ 5580 Header: res.Header, 5581 HTTPStatusCode: res.StatusCode, 5582 }, 5583 } 5584 target := &ret 5585 if err := gensupport.DecodeResponse(target, res); err != nil { 5586 return nil, err 5587 } 5588 return ret, nil 5589 // { 5590 // "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.", 5591 // "flatPath": "v1/apps/{appsId}/domainMappings", 5592 // "httpMethod": "POST", 5593 // "id": "appengine.apps.domainMappings.create", 5594 // "parameterOrder": [ 5595 // "appsId" 5596 // ], 5597 // "parameters": { 5598 // "appsId": { 5599 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5600 // "location": "path", 5601 // "required": true, 5602 // "type": "string" 5603 // }, 5604 // "overrideStrategy": { 5605 // "description": "Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.", 5606 // "enum": [ 5607 // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY", 5608 // "STRICT", 5609 // "OVERRIDE" 5610 // ], 5611 // "enumDescriptions": [ 5612 // "Strategy unspecified. Defaults to STRICT.", 5613 // "Overrides not allowed. If a mapping already exists for the specified domain, the request will return an ALREADY_EXISTS (409).", 5614 // "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." 5615 // ], 5616 // "location": "query", 5617 // "type": "string" 5618 // } 5619 // }, 5620 // "path": "v1/apps/{appsId}/domainMappings", 5621 // "request": { 5622 // "$ref": "DomainMapping" 5623 // }, 5624 // "response": { 5625 // "$ref": "Operation" 5626 // }, 5627 // "scopes": [ 5628 // "https://www.googleapis.com/auth/cloud-platform" 5629 // ] 5630 // } 5631 5632} 5633 5634// method id "appengine.apps.domainMappings.delete": 5635 5636type AppsDomainMappingsDeleteCall struct { 5637 s *APIService 5638 appsId string 5639 domainMappingsId string 5640 urlParams_ gensupport.URLParams 5641 ctx_ context.Context 5642 header_ http.Header 5643} 5644 5645// Delete: Deletes the specified domain mapping. A user must be 5646// authorized to administer the associated domain in order to delete a 5647// DomainMapping resource. 5648// 5649// - appsId: Part of `name`. Name of the resource to delete. Example: 5650// apps/myapp/domainMappings/example.com. 5651// - domainMappingsId: Part of `name`. See documentation of `appsId`. 5652func (r *AppsDomainMappingsService) Delete(appsId string, domainMappingsId string) *AppsDomainMappingsDeleteCall { 5653 c := &AppsDomainMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5654 c.appsId = appsId 5655 c.domainMappingsId = domainMappingsId 5656 return c 5657} 5658 5659// Fields allows partial responses to be retrieved. See 5660// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5661// for more information. 5662func (c *AppsDomainMappingsDeleteCall) Fields(s ...googleapi.Field) *AppsDomainMappingsDeleteCall { 5663 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5664 return c 5665} 5666 5667// Context sets the context to be used in this call's Do method. Any 5668// pending HTTP request will be aborted if the provided context is 5669// canceled. 5670func (c *AppsDomainMappingsDeleteCall) Context(ctx context.Context) *AppsDomainMappingsDeleteCall { 5671 c.ctx_ = ctx 5672 return c 5673} 5674 5675// Header returns an http.Header that can be modified by the caller to 5676// add HTTP headers to the request. 5677func (c *AppsDomainMappingsDeleteCall) Header() http.Header { 5678 if c.header_ == nil { 5679 c.header_ = make(http.Header) 5680 } 5681 return c.header_ 5682} 5683 5684func (c *AppsDomainMappingsDeleteCall) doRequest(alt string) (*http.Response, error) { 5685 reqHeaders := make(http.Header) 5686 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5687 for k, v := range c.header_ { 5688 reqHeaders[k] = v 5689 } 5690 reqHeaders.Set("User-Agent", c.s.userAgent()) 5691 var body io.Reader = nil 5692 c.urlParams_.Set("alt", alt) 5693 c.urlParams_.Set("prettyPrint", "false") 5694 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") 5695 urls += "?" + c.urlParams_.Encode() 5696 req, err := http.NewRequest("DELETE", urls, body) 5697 if err != nil { 5698 return nil, err 5699 } 5700 req.Header = reqHeaders 5701 googleapi.Expand(req.URL, map[string]string{ 5702 "appsId": c.appsId, 5703 "domainMappingsId": c.domainMappingsId, 5704 }) 5705 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5706} 5707 5708// Do executes the "appengine.apps.domainMappings.delete" call. 5709// Exactly one of *Operation or error will be non-nil. Any non-2xx 5710// status code is an error. Response headers are in either 5711// *Operation.ServerResponse.Header or (if a response was returned at 5712// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5713// to check whether the returned error was because 5714// http.StatusNotModified was returned. 5715func (c *AppsDomainMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5716 gensupport.SetOptions(c.urlParams_, opts...) 5717 res, err := c.doRequest("json") 5718 if res != nil && res.StatusCode == http.StatusNotModified { 5719 if res.Body != nil { 5720 res.Body.Close() 5721 } 5722 return nil, &googleapi.Error{ 5723 Code: res.StatusCode, 5724 Header: res.Header, 5725 } 5726 } 5727 if err != nil { 5728 return nil, err 5729 } 5730 defer googleapi.CloseBody(res) 5731 if err := googleapi.CheckResponse(res); err != nil { 5732 return nil, err 5733 } 5734 ret := &Operation{ 5735 ServerResponse: googleapi.ServerResponse{ 5736 Header: res.Header, 5737 HTTPStatusCode: res.StatusCode, 5738 }, 5739 } 5740 target := &ret 5741 if err := gensupport.DecodeResponse(target, res); err != nil { 5742 return nil, err 5743 } 5744 return ret, nil 5745 // { 5746 // "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", 5747 // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 5748 // "httpMethod": "DELETE", 5749 // "id": "appengine.apps.domainMappings.delete", 5750 // "parameterOrder": [ 5751 // "appsId", 5752 // "domainMappingsId" 5753 // ], 5754 // "parameters": { 5755 // "appsId": { 5756 // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", 5757 // "location": "path", 5758 // "required": true, 5759 // "type": "string" 5760 // }, 5761 // "domainMappingsId": { 5762 // "description": "Part of `name`. See documentation of `appsId`.", 5763 // "location": "path", 5764 // "required": true, 5765 // "type": "string" 5766 // } 5767 // }, 5768 // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 5769 // "response": { 5770 // "$ref": "Operation" 5771 // }, 5772 // "scopes": [ 5773 // "https://www.googleapis.com/auth/cloud-platform" 5774 // ] 5775 // } 5776 5777} 5778 5779// method id "appengine.apps.domainMappings.get": 5780 5781type AppsDomainMappingsGetCall struct { 5782 s *APIService 5783 appsId string 5784 domainMappingsId string 5785 urlParams_ gensupport.URLParams 5786 ifNoneMatch_ string 5787 ctx_ context.Context 5788 header_ http.Header 5789} 5790 5791// Get: Gets the specified domain mapping. 5792// 5793// - appsId: Part of `name`. Name of the resource requested. Example: 5794// apps/myapp/domainMappings/example.com. 5795// - domainMappingsId: Part of `name`. See documentation of `appsId`. 5796func (r *AppsDomainMappingsService) Get(appsId string, domainMappingsId string) *AppsDomainMappingsGetCall { 5797 c := &AppsDomainMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5798 c.appsId = appsId 5799 c.domainMappingsId = domainMappingsId 5800 return c 5801} 5802 5803// Fields allows partial responses to be retrieved. See 5804// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5805// for more information. 5806func (c *AppsDomainMappingsGetCall) Fields(s ...googleapi.Field) *AppsDomainMappingsGetCall { 5807 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5808 return c 5809} 5810 5811// IfNoneMatch sets the optional parameter which makes the operation 5812// fail if the object's ETag matches the given value. This is useful for 5813// getting updates only after the object has changed since the last 5814// request. Use googleapi.IsNotModified to check whether the response 5815// error from Do is the result of In-None-Match. 5816func (c *AppsDomainMappingsGetCall) IfNoneMatch(entityTag string) *AppsDomainMappingsGetCall { 5817 c.ifNoneMatch_ = entityTag 5818 return c 5819} 5820 5821// Context sets the context to be used in this call's Do method. Any 5822// pending HTTP request will be aborted if the provided context is 5823// canceled. 5824func (c *AppsDomainMappingsGetCall) Context(ctx context.Context) *AppsDomainMappingsGetCall { 5825 c.ctx_ = ctx 5826 return c 5827} 5828 5829// Header returns an http.Header that can be modified by the caller to 5830// add HTTP headers to the request. 5831func (c *AppsDomainMappingsGetCall) Header() http.Header { 5832 if c.header_ == nil { 5833 c.header_ = make(http.Header) 5834 } 5835 return c.header_ 5836} 5837 5838func (c *AppsDomainMappingsGetCall) doRequest(alt string) (*http.Response, error) { 5839 reqHeaders := make(http.Header) 5840 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5841 for k, v := range c.header_ { 5842 reqHeaders[k] = v 5843 } 5844 reqHeaders.Set("User-Agent", c.s.userAgent()) 5845 if c.ifNoneMatch_ != "" { 5846 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5847 } 5848 var body io.Reader = nil 5849 c.urlParams_.Set("alt", alt) 5850 c.urlParams_.Set("prettyPrint", "false") 5851 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") 5852 urls += "?" + c.urlParams_.Encode() 5853 req, err := http.NewRequest("GET", urls, body) 5854 if err != nil { 5855 return nil, err 5856 } 5857 req.Header = reqHeaders 5858 googleapi.Expand(req.URL, map[string]string{ 5859 "appsId": c.appsId, 5860 "domainMappingsId": c.domainMappingsId, 5861 }) 5862 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5863} 5864 5865// Do executes the "appengine.apps.domainMappings.get" call. 5866// Exactly one of *DomainMapping or error will be non-nil. Any non-2xx 5867// status code is an error. Response headers are in either 5868// *DomainMapping.ServerResponse.Header or (if a response was returned 5869// at all) in error.(*googleapi.Error).Header. Use 5870// googleapi.IsNotModified to check whether the returned error was 5871// because http.StatusNotModified was returned. 5872func (c *AppsDomainMappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) { 5873 gensupport.SetOptions(c.urlParams_, opts...) 5874 res, err := c.doRequest("json") 5875 if res != nil && res.StatusCode == http.StatusNotModified { 5876 if res.Body != nil { 5877 res.Body.Close() 5878 } 5879 return nil, &googleapi.Error{ 5880 Code: res.StatusCode, 5881 Header: res.Header, 5882 } 5883 } 5884 if err != nil { 5885 return nil, err 5886 } 5887 defer googleapi.CloseBody(res) 5888 if err := googleapi.CheckResponse(res); err != nil { 5889 return nil, err 5890 } 5891 ret := &DomainMapping{ 5892 ServerResponse: googleapi.ServerResponse{ 5893 Header: res.Header, 5894 HTTPStatusCode: res.StatusCode, 5895 }, 5896 } 5897 target := &ret 5898 if err := gensupport.DecodeResponse(target, res); err != nil { 5899 return nil, err 5900 } 5901 return ret, nil 5902 // { 5903 // "description": "Gets the specified domain mapping.", 5904 // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 5905 // "httpMethod": "GET", 5906 // "id": "appengine.apps.domainMappings.get", 5907 // "parameterOrder": [ 5908 // "appsId", 5909 // "domainMappingsId" 5910 // ], 5911 // "parameters": { 5912 // "appsId": { 5913 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", 5914 // "location": "path", 5915 // "required": true, 5916 // "type": "string" 5917 // }, 5918 // "domainMappingsId": { 5919 // "description": "Part of `name`. See documentation of `appsId`.", 5920 // "location": "path", 5921 // "required": true, 5922 // "type": "string" 5923 // } 5924 // }, 5925 // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 5926 // "response": { 5927 // "$ref": "DomainMapping" 5928 // }, 5929 // "scopes": [ 5930 // "https://www.googleapis.com/auth/appengine.admin", 5931 // "https://www.googleapis.com/auth/cloud-platform", 5932 // "https://www.googleapis.com/auth/cloud-platform.read-only" 5933 // ] 5934 // } 5935 5936} 5937 5938// method id "appengine.apps.domainMappings.list": 5939 5940type AppsDomainMappingsListCall struct { 5941 s *APIService 5942 appsId string 5943 urlParams_ gensupport.URLParams 5944 ifNoneMatch_ string 5945 ctx_ context.Context 5946 header_ http.Header 5947} 5948 5949// List: Lists the domain mappings on an application. 5950// 5951// - appsId: Part of `parent`. Name of the parent Application resource. 5952// Example: apps/myapp. 5953func (r *AppsDomainMappingsService) List(appsId string) *AppsDomainMappingsListCall { 5954 c := &AppsDomainMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5955 c.appsId = appsId 5956 return c 5957} 5958 5959// PageSize sets the optional parameter "pageSize": Maximum results to 5960// return per page. 5961func (c *AppsDomainMappingsListCall) PageSize(pageSize int64) *AppsDomainMappingsListCall { 5962 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5963 return c 5964} 5965 5966// PageToken sets the optional parameter "pageToken": Continuation token 5967// for fetching the next page of results. 5968func (c *AppsDomainMappingsListCall) PageToken(pageToken string) *AppsDomainMappingsListCall { 5969 c.urlParams_.Set("pageToken", pageToken) 5970 return c 5971} 5972 5973// Fields allows partial responses to be retrieved. See 5974// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5975// for more information. 5976func (c *AppsDomainMappingsListCall) Fields(s ...googleapi.Field) *AppsDomainMappingsListCall { 5977 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5978 return c 5979} 5980 5981// IfNoneMatch sets the optional parameter which makes the operation 5982// fail if the object's ETag matches the given value. This is useful for 5983// getting updates only after the object has changed since the last 5984// request. Use googleapi.IsNotModified to check whether the response 5985// error from Do is the result of In-None-Match. 5986func (c *AppsDomainMappingsListCall) IfNoneMatch(entityTag string) *AppsDomainMappingsListCall { 5987 c.ifNoneMatch_ = entityTag 5988 return c 5989} 5990 5991// Context sets the context to be used in this call's Do method. Any 5992// pending HTTP request will be aborted if the provided context is 5993// canceled. 5994func (c *AppsDomainMappingsListCall) Context(ctx context.Context) *AppsDomainMappingsListCall { 5995 c.ctx_ = ctx 5996 return c 5997} 5998 5999// Header returns an http.Header that can be modified by the caller to 6000// add HTTP headers to the request. 6001func (c *AppsDomainMappingsListCall) Header() http.Header { 6002 if c.header_ == nil { 6003 c.header_ = make(http.Header) 6004 } 6005 return c.header_ 6006} 6007 6008func (c *AppsDomainMappingsListCall) doRequest(alt string) (*http.Response, error) { 6009 reqHeaders := make(http.Header) 6010 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6011 for k, v := range c.header_ { 6012 reqHeaders[k] = v 6013 } 6014 reqHeaders.Set("User-Agent", c.s.userAgent()) 6015 if c.ifNoneMatch_ != "" { 6016 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6017 } 6018 var body io.Reader = nil 6019 c.urlParams_.Set("alt", alt) 6020 c.urlParams_.Set("prettyPrint", "false") 6021 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings") 6022 urls += "?" + c.urlParams_.Encode() 6023 req, err := http.NewRequest("GET", urls, body) 6024 if err != nil { 6025 return nil, err 6026 } 6027 req.Header = reqHeaders 6028 googleapi.Expand(req.URL, map[string]string{ 6029 "appsId": c.appsId, 6030 }) 6031 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6032} 6033 6034// Do executes the "appengine.apps.domainMappings.list" call. 6035// Exactly one of *ListDomainMappingsResponse or error will be non-nil. 6036// Any non-2xx status code is an error. Response headers are in either 6037// *ListDomainMappingsResponse.ServerResponse.Header or (if a response 6038// was returned at all) in error.(*googleapi.Error).Header. Use 6039// googleapi.IsNotModified to check whether the returned error was 6040// because http.StatusNotModified was returned. 6041func (c *AppsDomainMappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, error) { 6042 gensupport.SetOptions(c.urlParams_, opts...) 6043 res, err := c.doRequest("json") 6044 if res != nil && res.StatusCode == http.StatusNotModified { 6045 if res.Body != nil { 6046 res.Body.Close() 6047 } 6048 return nil, &googleapi.Error{ 6049 Code: res.StatusCode, 6050 Header: res.Header, 6051 } 6052 } 6053 if err != nil { 6054 return nil, err 6055 } 6056 defer googleapi.CloseBody(res) 6057 if err := googleapi.CheckResponse(res); err != nil { 6058 return nil, err 6059 } 6060 ret := &ListDomainMappingsResponse{ 6061 ServerResponse: googleapi.ServerResponse{ 6062 Header: res.Header, 6063 HTTPStatusCode: res.StatusCode, 6064 }, 6065 } 6066 target := &ret 6067 if err := gensupport.DecodeResponse(target, res); err != nil { 6068 return nil, err 6069 } 6070 return ret, nil 6071 // { 6072 // "description": "Lists the domain mappings on an application.", 6073 // "flatPath": "v1/apps/{appsId}/domainMappings", 6074 // "httpMethod": "GET", 6075 // "id": "appengine.apps.domainMappings.list", 6076 // "parameterOrder": [ 6077 // "appsId" 6078 // ], 6079 // "parameters": { 6080 // "appsId": { 6081 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 6082 // "location": "path", 6083 // "required": true, 6084 // "type": "string" 6085 // }, 6086 // "pageSize": { 6087 // "description": "Maximum results to return per page.", 6088 // "format": "int32", 6089 // "location": "query", 6090 // "type": "integer" 6091 // }, 6092 // "pageToken": { 6093 // "description": "Continuation token for fetching the next page of results.", 6094 // "location": "query", 6095 // "type": "string" 6096 // } 6097 // }, 6098 // "path": "v1/apps/{appsId}/domainMappings", 6099 // "response": { 6100 // "$ref": "ListDomainMappingsResponse" 6101 // }, 6102 // "scopes": [ 6103 // "https://www.googleapis.com/auth/appengine.admin", 6104 // "https://www.googleapis.com/auth/cloud-platform", 6105 // "https://www.googleapis.com/auth/cloud-platform.read-only" 6106 // ] 6107 // } 6108 6109} 6110 6111// Pages invokes f for each page of results. 6112// A non-nil error returned from f will halt the iteration. 6113// The provided context supersedes any context provided to the Context method. 6114func (c *AppsDomainMappingsListCall) Pages(ctx context.Context, f func(*ListDomainMappingsResponse) error) error { 6115 c.ctx_ = ctx 6116 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6117 for { 6118 x, err := c.Do() 6119 if err != nil { 6120 return err 6121 } 6122 if err := f(x); err != nil { 6123 return err 6124 } 6125 if x.NextPageToken == "" { 6126 return nil 6127 } 6128 c.PageToken(x.NextPageToken) 6129 } 6130} 6131 6132// method id "appengine.apps.domainMappings.patch": 6133 6134type AppsDomainMappingsPatchCall struct { 6135 s *APIService 6136 appsId string 6137 domainMappingsId string 6138 domainmapping *DomainMapping 6139 urlParams_ gensupport.URLParams 6140 ctx_ context.Context 6141 header_ http.Header 6142} 6143 6144// Patch: Updates the specified domain mapping. To map an SSL 6145// certificate to a domain mapping, update certificate_id to point to an 6146// AuthorizedCertificate resource. A user must be authorized to 6147// administer the associated domain in order to update a DomainMapping 6148// resource. 6149// 6150// - appsId: Part of `name`. Name of the resource to update. Example: 6151// apps/myapp/domainMappings/example.com. 6152// - domainMappingsId: Part of `name`. See documentation of `appsId`. 6153func (r *AppsDomainMappingsService) Patch(appsId string, domainMappingsId string, domainmapping *DomainMapping) *AppsDomainMappingsPatchCall { 6154 c := &AppsDomainMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6155 c.appsId = appsId 6156 c.domainMappingsId = domainMappingsId 6157 c.domainmapping = domainmapping 6158 return c 6159} 6160 6161// UpdateMask sets the optional parameter "updateMask": Required. 6162// Standard field mask for the set of fields to be updated. 6163func (c *AppsDomainMappingsPatchCall) UpdateMask(updateMask string) *AppsDomainMappingsPatchCall { 6164 c.urlParams_.Set("updateMask", updateMask) 6165 return c 6166} 6167 6168// Fields allows partial responses to be retrieved. See 6169// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6170// for more information. 6171func (c *AppsDomainMappingsPatchCall) Fields(s ...googleapi.Field) *AppsDomainMappingsPatchCall { 6172 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6173 return c 6174} 6175 6176// Context sets the context to be used in this call's Do method. Any 6177// pending HTTP request will be aborted if the provided context is 6178// canceled. 6179func (c *AppsDomainMappingsPatchCall) Context(ctx context.Context) *AppsDomainMappingsPatchCall { 6180 c.ctx_ = ctx 6181 return c 6182} 6183 6184// Header returns an http.Header that can be modified by the caller to 6185// add HTTP headers to the request. 6186func (c *AppsDomainMappingsPatchCall) Header() http.Header { 6187 if c.header_ == nil { 6188 c.header_ = make(http.Header) 6189 } 6190 return c.header_ 6191} 6192 6193func (c *AppsDomainMappingsPatchCall) doRequest(alt string) (*http.Response, error) { 6194 reqHeaders := make(http.Header) 6195 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6196 for k, v := range c.header_ { 6197 reqHeaders[k] = v 6198 } 6199 reqHeaders.Set("User-Agent", c.s.userAgent()) 6200 var body io.Reader = nil 6201 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping) 6202 if err != nil { 6203 return nil, err 6204 } 6205 reqHeaders.Set("Content-Type", "application/json") 6206 c.urlParams_.Set("alt", alt) 6207 c.urlParams_.Set("prettyPrint", "false") 6208 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") 6209 urls += "?" + c.urlParams_.Encode() 6210 req, err := http.NewRequest("PATCH", urls, body) 6211 if err != nil { 6212 return nil, err 6213 } 6214 req.Header = reqHeaders 6215 googleapi.Expand(req.URL, map[string]string{ 6216 "appsId": c.appsId, 6217 "domainMappingsId": c.domainMappingsId, 6218 }) 6219 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6220} 6221 6222// Do executes the "appengine.apps.domainMappings.patch" call. 6223// Exactly one of *Operation or error will be non-nil. Any non-2xx 6224// status code is an error. Response headers are in either 6225// *Operation.ServerResponse.Header or (if a response was returned at 6226// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6227// to check whether the returned error was because 6228// http.StatusNotModified was returned. 6229func (c *AppsDomainMappingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6230 gensupport.SetOptions(c.urlParams_, opts...) 6231 res, err := c.doRequest("json") 6232 if res != nil && res.StatusCode == http.StatusNotModified { 6233 if res.Body != nil { 6234 res.Body.Close() 6235 } 6236 return nil, &googleapi.Error{ 6237 Code: res.StatusCode, 6238 Header: res.Header, 6239 } 6240 } 6241 if err != nil { 6242 return nil, err 6243 } 6244 defer googleapi.CloseBody(res) 6245 if err := googleapi.CheckResponse(res); err != nil { 6246 return nil, err 6247 } 6248 ret := &Operation{ 6249 ServerResponse: googleapi.ServerResponse{ 6250 Header: res.Header, 6251 HTTPStatusCode: res.StatusCode, 6252 }, 6253 } 6254 target := &ret 6255 if err := gensupport.DecodeResponse(target, res); err != nil { 6256 return nil, err 6257 } 6258 return ret, nil 6259 // { 6260 // "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.", 6261 // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 6262 // "httpMethod": "PATCH", 6263 // "id": "appengine.apps.domainMappings.patch", 6264 // "parameterOrder": [ 6265 // "appsId", 6266 // "domainMappingsId" 6267 // ], 6268 // "parameters": { 6269 // "appsId": { 6270 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", 6271 // "location": "path", 6272 // "required": true, 6273 // "type": "string" 6274 // }, 6275 // "domainMappingsId": { 6276 // "description": "Part of `name`. See documentation of `appsId`.", 6277 // "location": "path", 6278 // "required": true, 6279 // "type": "string" 6280 // }, 6281 // "updateMask": { 6282 // "description": "Required. Standard field mask for the set of fields to be updated.", 6283 // "format": "google-fieldmask", 6284 // "location": "query", 6285 // "type": "string" 6286 // } 6287 // }, 6288 // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 6289 // "request": { 6290 // "$ref": "DomainMapping" 6291 // }, 6292 // "response": { 6293 // "$ref": "Operation" 6294 // }, 6295 // "scopes": [ 6296 // "https://www.googleapis.com/auth/cloud-platform" 6297 // ] 6298 // } 6299 6300} 6301 6302// method id "appengine.apps.firewall.ingressRules.batchUpdate": 6303 6304type AppsFirewallIngressRulesBatchUpdateCall struct { 6305 s *APIService 6306 appsId string 6307 batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest 6308 urlParams_ gensupport.URLParams 6309 ctx_ context.Context 6310 header_ http.Header 6311} 6312 6313// BatchUpdate: Replaces the entire firewall ruleset in one bulk 6314// operation. This overrides and replaces the rules of an existing 6315// firewall with the new rules.If the final rule does not match traffic 6316// with the '*' wildcard IP range, then an "allow all" rule is 6317// explicitly added to the end of the list. 6318// 6319// - appsId: Part of `name`. Name of the Firewall collection to set. 6320// Example: apps/myapp/firewall/ingressRules. 6321func (r *AppsFirewallIngressRulesService) BatchUpdate(appsId string, batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest) *AppsFirewallIngressRulesBatchUpdateCall { 6322 c := &AppsFirewallIngressRulesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6323 c.appsId = appsId 6324 c.batchupdateingressrulesrequest = batchupdateingressrulesrequest 6325 return c 6326} 6327 6328// Fields allows partial responses to be retrieved. See 6329// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6330// for more information. 6331func (c *AppsFirewallIngressRulesBatchUpdateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesBatchUpdateCall { 6332 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6333 return c 6334} 6335 6336// Context sets the context to be used in this call's Do method. Any 6337// pending HTTP request will be aborted if the provided context is 6338// canceled. 6339func (c *AppsFirewallIngressRulesBatchUpdateCall) Context(ctx context.Context) *AppsFirewallIngressRulesBatchUpdateCall { 6340 c.ctx_ = ctx 6341 return c 6342} 6343 6344// Header returns an http.Header that can be modified by the caller to 6345// add HTTP headers to the request. 6346func (c *AppsFirewallIngressRulesBatchUpdateCall) Header() http.Header { 6347 if c.header_ == nil { 6348 c.header_ = make(http.Header) 6349 } 6350 return c.header_ 6351} 6352 6353func (c *AppsFirewallIngressRulesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 6354 reqHeaders := make(http.Header) 6355 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6356 for k, v := range c.header_ { 6357 reqHeaders[k] = v 6358 } 6359 reqHeaders.Set("User-Agent", c.s.userAgent()) 6360 var body io.Reader = nil 6361 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdateingressrulesrequest) 6362 if err != nil { 6363 return nil, err 6364 } 6365 reqHeaders.Set("Content-Type", "application/json") 6366 c.urlParams_.Set("alt", alt) 6367 c.urlParams_.Set("prettyPrint", "false") 6368 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules:batchUpdate") 6369 urls += "?" + c.urlParams_.Encode() 6370 req, err := http.NewRequest("POST", urls, body) 6371 if err != nil { 6372 return nil, err 6373 } 6374 req.Header = reqHeaders 6375 googleapi.Expand(req.URL, map[string]string{ 6376 "appsId": c.appsId, 6377 }) 6378 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6379} 6380 6381// Do executes the "appengine.apps.firewall.ingressRules.batchUpdate" call. 6382// Exactly one of *BatchUpdateIngressRulesResponse or error will be 6383// non-nil. Any non-2xx status code is an error. Response headers are in 6384// either *BatchUpdateIngressRulesResponse.ServerResponse.Header or (if 6385// a response was returned at all) in error.(*googleapi.Error).Header. 6386// Use googleapi.IsNotModified to check whether the returned error was 6387// because http.StatusNotModified was returned. 6388func (c *AppsFirewallIngressRulesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateIngressRulesResponse, error) { 6389 gensupport.SetOptions(c.urlParams_, opts...) 6390 res, err := c.doRequest("json") 6391 if res != nil && res.StatusCode == http.StatusNotModified { 6392 if res.Body != nil { 6393 res.Body.Close() 6394 } 6395 return nil, &googleapi.Error{ 6396 Code: res.StatusCode, 6397 Header: res.Header, 6398 } 6399 } 6400 if err != nil { 6401 return nil, err 6402 } 6403 defer googleapi.CloseBody(res) 6404 if err := googleapi.CheckResponse(res); err != nil { 6405 return nil, err 6406 } 6407 ret := &BatchUpdateIngressRulesResponse{ 6408 ServerResponse: googleapi.ServerResponse{ 6409 Header: res.Header, 6410 HTTPStatusCode: res.StatusCode, 6411 }, 6412 } 6413 target := &ret 6414 if err := gensupport.DecodeResponse(target, res); err != nil { 6415 return nil, err 6416 } 6417 return ret, nil 6418 // { 6419 // "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.", 6420 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate", 6421 // "httpMethod": "POST", 6422 // "id": "appengine.apps.firewall.ingressRules.batchUpdate", 6423 // "parameterOrder": [ 6424 // "appsId" 6425 // ], 6426 // "parameters": { 6427 // "appsId": { 6428 // "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.", 6429 // "location": "path", 6430 // "required": true, 6431 // "type": "string" 6432 // } 6433 // }, 6434 // "path": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate", 6435 // "request": { 6436 // "$ref": "BatchUpdateIngressRulesRequest" 6437 // }, 6438 // "response": { 6439 // "$ref": "BatchUpdateIngressRulesResponse" 6440 // }, 6441 // "scopes": [ 6442 // "https://www.googleapis.com/auth/cloud-platform" 6443 // ] 6444 // } 6445 6446} 6447 6448// method id "appengine.apps.firewall.ingressRules.create": 6449 6450type AppsFirewallIngressRulesCreateCall struct { 6451 s *APIService 6452 appsId string 6453 firewallrule *FirewallRule 6454 urlParams_ gensupport.URLParams 6455 ctx_ context.Context 6456 header_ http.Header 6457} 6458 6459// Create: Creates a firewall rule for the application. 6460// 6461// - appsId: Part of `parent`. Name of the parent Firewall collection in 6462// which to create a new rule. Example: 6463// apps/myapp/firewall/ingressRules. 6464func (r *AppsFirewallIngressRulesService) Create(appsId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesCreateCall { 6465 c := &AppsFirewallIngressRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6466 c.appsId = appsId 6467 c.firewallrule = firewallrule 6468 return c 6469} 6470 6471// Fields allows partial responses to be retrieved. See 6472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6473// for more information. 6474func (c *AppsFirewallIngressRulesCreateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesCreateCall { 6475 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6476 return c 6477} 6478 6479// Context sets the context to be used in this call's Do method. Any 6480// pending HTTP request will be aborted if the provided context is 6481// canceled. 6482func (c *AppsFirewallIngressRulesCreateCall) Context(ctx context.Context) *AppsFirewallIngressRulesCreateCall { 6483 c.ctx_ = ctx 6484 return c 6485} 6486 6487// Header returns an http.Header that can be modified by the caller to 6488// add HTTP headers to the request. 6489func (c *AppsFirewallIngressRulesCreateCall) Header() http.Header { 6490 if c.header_ == nil { 6491 c.header_ = make(http.Header) 6492 } 6493 return c.header_ 6494} 6495 6496func (c *AppsFirewallIngressRulesCreateCall) doRequest(alt string) (*http.Response, error) { 6497 reqHeaders := make(http.Header) 6498 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6499 for k, v := range c.header_ { 6500 reqHeaders[k] = v 6501 } 6502 reqHeaders.Set("User-Agent", c.s.userAgent()) 6503 var body io.Reader = nil 6504 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule) 6505 if err != nil { 6506 return nil, err 6507 } 6508 reqHeaders.Set("Content-Type", "application/json") 6509 c.urlParams_.Set("alt", alt) 6510 c.urlParams_.Set("prettyPrint", "false") 6511 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules") 6512 urls += "?" + c.urlParams_.Encode() 6513 req, err := http.NewRequest("POST", urls, body) 6514 if err != nil { 6515 return nil, err 6516 } 6517 req.Header = reqHeaders 6518 googleapi.Expand(req.URL, map[string]string{ 6519 "appsId": c.appsId, 6520 }) 6521 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6522} 6523 6524// Do executes the "appengine.apps.firewall.ingressRules.create" call. 6525// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 6526// status code is an error. Response headers are in either 6527// *FirewallRule.ServerResponse.Header or (if a response was returned at 6528// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6529// to check whether the returned error was because 6530// http.StatusNotModified was returned. 6531func (c *AppsFirewallIngressRulesCreateCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 6532 gensupport.SetOptions(c.urlParams_, opts...) 6533 res, err := c.doRequest("json") 6534 if res != nil && res.StatusCode == http.StatusNotModified { 6535 if res.Body != nil { 6536 res.Body.Close() 6537 } 6538 return nil, &googleapi.Error{ 6539 Code: res.StatusCode, 6540 Header: res.Header, 6541 } 6542 } 6543 if err != nil { 6544 return nil, err 6545 } 6546 defer googleapi.CloseBody(res) 6547 if err := googleapi.CheckResponse(res); err != nil { 6548 return nil, err 6549 } 6550 ret := &FirewallRule{ 6551 ServerResponse: googleapi.ServerResponse{ 6552 Header: res.Header, 6553 HTTPStatusCode: res.StatusCode, 6554 }, 6555 } 6556 target := &ret 6557 if err := gensupport.DecodeResponse(target, res); err != nil { 6558 return nil, err 6559 } 6560 return ret, nil 6561 // { 6562 // "description": "Creates a firewall rule for the application.", 6563 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules", 6564 // "httpMethod": "POST", 6565 // "id": "appengine.apps.firewall.ingressRules.create", 6566 // "parameterOrder": [ 6567 // "appsId" 6568 // ], 6569 // "parameters": { 6570 // "appsId": { 6571 // "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.", 6572 // "location": "path", 6573 // "required": true, 6574 // "type": "string" 6575 // } 6576 // }, 6577 // "path": "v1/apps/{appsId}/firewall/ingressRules", 6578 // "request": { 6579 // "$ref": "FirewallRule" 6580 // }, 6581 // "response": { 6582 // "$ref": "FirewallRule" 6583 // }, 6584 // "scopes": [ 6585 // "https://www.googleapis.com/auth/cloud-platform" 6586 // ] 6587 // } 6588 6589} 6590 6591// method id "appengine.apps.firewall.ingressRules.delete": 6592 6593type AppsFirewallIngressRulesDeleteCall struct { 6594 s *APIService 6595 appsId string 6596 ingressRulesId string 6597 urlParams_ gensupport.URLParams 6598 ctx_ context.Context 6599 header_ http.Header 6600} 6601 6602// Delete: Deletes the specified firewall rule. 6603// 6604// - appsId: Part of `name`. Name of the Firewall resource to delete. 6605// Example: apps/myapp/firewall/ingressRules/100. 6606// - ingressRulesId: Part of `name`. See documentation of `appsId`. 6607func (r *AppsFirewallIngressRulesService) Delete(appsId string, ingressRulesId string) *AppsFirewallIngressRulesDeleteCall { 6608 c := &AppsFirewallIngressRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6609 c.appsId = appsId 6610 c.ingressRulesId = ingressRulesId 6611 return c 6612} 6613 6614// Fields allows partial responses to be retrieved. See 6615// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6616// for more information. 6617func (c *AppsFirewallIngressRulesDeleteCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesDeleteCall { 6618 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6619 return c 6620} 6621 6622// Context sets the context to be used in this call's Do method. Any 6623// pending HTTP request will be aborted if the provided context is 6624// canceled. 6625func (c *AppsFirewallIngressRulesDeleteCall) Context(ctx context.Context) *AppsFirewallIngressRulesDeleteCall { 6626 c.ctx_ = ctx 6627 return c 6628} 6629 6630// Header returns an http.Header that can be modified by the caller to 6631// add HTTP headers to the request. 6632func (c *AppsFirewallIngressRulesDeleteCall) Header() http.Header { 6633 if c.header_ == nil { 6634 c.header_ = make(http.Header) 6635 } 6636 return c.header_ 6637} 6638 6639func (c *AppsFirewallIngressRulesDeleteCall) doRequest(alt string) (*http.Response, error) { 6640 reqHeaders := make(http.Header) 6641 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6642 for k, v := range c.header_ { 6643 reqHeaders[k] = v 6644 } 6645 reqHeaders.Set("User-Agent", c.s.userAgent()) 6646 var body io.Reader = nil 6647 c.urlParams_.Set("alt", alt) 6648 c.urlParams_.Set("prettyPrint", "false") 6649 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 6650 urls += "?" + c.urlParams_.Encode() 6651 req, err := http.NewRequest("DELETE", urls, body) 6652 if err != nil { 6653 return nil, err 6654 } 6655 req.Header = reqHeaders 6656 googleapi.Expand(req.URL, map[string]string{ 6657 "appsId": c.appsId, 6658 "ingressRulesId": c.ingressRulesId, 6659 }) 6660 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6661} 6662 6663// Do executes the "appengine.apps.firewall.ingressRules.delete" call. 6664// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6665// code is an error. Response headers are in either 6666// *Empty.ServerResponse.Header or (if a response was returned at all) 6667// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6668// check whether the returned error was because http.StatusNotModified 6669// was returned. 6670func (c *AppsFirewallIngressRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6671 gensupport.SetOptions(c.urlParams_, opts...) 6672 res, err := c.doRequest("json") 6673 if res != nil && res.StatusCode == http.StatusNotModified { 6674 if res.Body != nil { 6675 res.Body.Close() 6676 } 6677 return nil, &googleapi.Error{ 6678 Code: res.StatusCode, 6679 Header: res.Header, 6680 } 6681 } 6682 if err != nil { 6683 return nil, err 6684 } 6685 defer googleapi.CloseBody(res) 6686 if err := googleapi.CheckResponse(res); err != nil { 6687 return nil, err 6688 } 6689 ret := &Empty{ 6690 ServerResponse: googleapi.ServerResponse{ 6691 Header: res.Header, 6692 HTTPStatusCode: res.StatusCode, 6693 }, 6694 } 6695 target := &ret 6696 if err := gensupport.DecodeResponse(target, res); err != nil { 6697 return nil, err 6698 } 6699 return ret, nil 6700 // { 6701 // "description": "Deletes the specified firewall rule.", 6702 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6703 // "httpMethod": "DELETE", 6704 // "id": "appengine.apps.firewall.ingressRules.delete", 6705 // "parameterOrder": [ 6706 // "appsId", 6707 // "ingressRulesId" 6708 // ], 6709 // "parameters": { 6710 // "appsId": { 6711 // "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.", 6712 // "location": "path", 6713 // "required": true, 6714 // "type": "string" 6715 // }, 6716 // "ingressRulesId": { 6717 // "description": "Part of `name`. See documentation of `appsId`.", 6718 // "location": "path", 6719 // "required": true, 6720 // "type": "string" 6721 // } 6722 // }, 6723 // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6724 // "response": { 6725 // "$ref": "Empty" 6726 // }, 6727 // "scopes": [ 6728 // "https://www.googleapis.com/auth/cloud-platform" 6729 // ] 6730 // } 6731 6732} 6733 6734// method id "appengine.apps.firewall.ingressRules.get": 6735 6736type AppsFirewallIngressRulesGetCall struct { 6737 s *APIService 6738 appsId string 6739 ingressRulesId string 6740 urlParams_ gensupport.URLParams 6741 ifNoneMatch_ string 6742 ctx_ context.Context 6743 header_ http.Header 6744} 6745 6746// Get: Gets the specified firewall rule. 6747// 6748// - appsId: Part of `name`. Name of the Firewall resource to retrieve. 6749// Example: apps/myapp/firewall/ingressRules/100. 6750// - ingressRulesId: Part of `name`. See documentation of `appsId`. 6751func (r *AppsFirewallIngressRulesService) Get(appsId string, ingressRulesId string) *AppsFirewallIngressRulesGetCall { 6752 c := &AppsFirewallIngressRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6753 c.appsId = appsId 6754 c.ingressRulesId = ingressRulesId 6755 return c 6756} 6757 6758// Fields allows partial responses to be retrieved. See 6759// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6760// for more information. 6761func (c *AppsFirewallIngressRulesGetCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesGetCall { 6762 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6763 return c 6764} 6765 6766// IfNoneMatch sets the optional parameter which makes the operation 6767// fail if the object's ETag matches the given value. This is useful for 6768// getting updates only after the object has changed since the last 6769// request. Use googleapi.IsNotModified to check whether the response 6770// error from Do is the result of In-None-Match. 6771func (c *AppsFirewallIngressRulesGetCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesGetCall { 6772 c.ifNoneMatch_ = entityTag 6773 return c 6774} 6775 6776// Context sets the context to be used in this call's Do method. Any 6777// pending HTTP request will be aborted if the provided context is 6778// canceled. 6779func (c *AppsFirewallIngressRulesGetCall) Context(ctx context.Context) *AppsFirewallIngressRulesGetCall { 6780 c.ctx_ = ctx 6781 return c 6782} 6783 6784// Header returns an http.Header that can be modified by the caller to 6785// add HTTP headers to the request. 6786func (c *AppsFirewallIngressRulesGetCall) Header() http.Header { 6787 if c.header_ == nil { 6788 c.header_ = make(http.Header) 6789 } 6790 return c.header_ 6791} 6792 6793func (c *AppsFirewallIngressRulesGetCall) doRequest(alt string) (*http.Response, error) { 6794 reqHeaders := make(http.Header) 6795 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6796 for k, v := range c.header_ { 6797 reqHeaders[k] = v 6798 } 6799 reqHeaders.Set("User-Agent", c.s.userAgent()) 6800 if c.ifNoneMatch_ != "" { 6801 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6802 } 6803 var body io.Reader = nil 6804 c.urlParams_.Set("alt", alt) 6805 c.urlParams_.Set("prettyPrint", "false") 6806 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 6807 urls += "?" + c.urlParams_.Encode() 6808 req, err := http.NewRequest("GET", urls, body) 6809 if err != nil { 6810 return nil, err 6811 } 6812 req.Header = reqHeaders 6813 googleapi.Expand(req.URL, map[string]string{ 6814 "appsId": c.appsId, 6815 "ingressRulesId": c.ingressRulesId, 6816 }) 6817 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6818} 6819 6820// Do executes the "appengine.apps.firewall.ingressRules.get" call. 6821// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 6822// status code is an error. Response headers are in either 6823// *FirewallRule.ServerResponse.Header or (if a response was returned at 6824// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6825// to check whether the returned error was because 6826// http.StatusNotModified was returned. 6827func (c *AppsFirewallIngressRulesGetCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 6828 gensupport.SetOptions(c.urlParams_, opts...) 6829 res, err := c.doRequest("json") 6830 if res != nil && res.StatusCode == http.StatusNotModified { 6831 if res.Body != nil { 6832 res.Body.Close() 6833 } 6834 return nil, &googleapi.Error{ 6835 Code: res.StatusCode, 6836 Header: res.Header, 6837 } 6838 } 6839 if err != nil { 6840 return nil, err 6841 } 6842 defer googleapi.CloseBody(res) 6843 if err := googleapi.CheckResponse(res); err != nil { 6844 return nil, err 6845 } 6846 ret := &FirewallRule{ 6847 ServerResponse: googleapi.ServerResponse{ 6848 Header: res.Header, 6849 HTTPStatusCode: res.StatusCode, 6850 }, 6851 } 6852 target := &ret 6853 if err := gensupport.DecodeResponse(target, res); err != nil { 6854 return nil, err 6855 } 6856 return ret, nil 6857 // { 6858 // "description": "Gets the specified firewall rule.", 6859 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6860 // "httpMethod": "GET", 6861 // "id": "appengine.apps.firewall.ingressRules.get", 6862 // "parameterOrder": [ 6863 // "appsId", 6864 // "ingressRulesId" 6865 // ], 6866 // "parameters": { 6867 // "appsId": { 6868 // "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.", 6869 // "location": "path", 6870 // "required": true, 6871 // "type": "string" 6872 // }, 6873 // "ingressRulesId": { 6874 // "description": "Part of `name`. See documentation of `appsId`.", 6875 // "location": "path", 6876 // "required": true, 6877 // "type": "string" 6878 // } 6879 // }, 6880 // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6881 // "response": { 6882 // "$ref": "FirewallRule" 6883 // }, 6884 // "scopes": [ 6885 // "https://www.googleapis.com/auth/appengine.admin", 6886 // "https://www.googleapis.com/auth/cloud-platform", 6887 // "https://www.googleapis.com/auth/cloud-platform.read-only" 6888 // ] 6889 // } 6890 6891} 6892 6893// method id "appengine.apps.firewall.ingressRules.list": 6894 6895type AppsFirewallIngressRulesListCall struct { 6896 s *APIService 6897 appsId string 6898 urlParams_ gensupport.URLParams 6899 ifNoneMatch_ string 6900 ctx_ context.Context 6901 header_ http.Header 6902} 6903 6904// List: Lists the firewall rules of an application. 6905// 6906// - appsId: Part of `parent`. Name of the Firewall collection to 6907// retrieve. Example: apps/myapp/firewall/ingressRules. 6908func (r *AppsFirewallIngressRulesService) List(appsId string) *AppsFirewallIngressRulesListCall { 6909 c := &AppsFirewallIngressRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6910 c.appsId = appsId 6911 return c 6912} 6913 6914// MatchingAddress sets the optional parameter "matchingAddress": A 6915// valid IP Address. If set, only rules matching this address will be 6916// returned. The first returned rule will be the rule that fires on 6917// requests from this IP. 6918func (c *AppsFirewallIngressRulesListCall) MatchingAddress(matchingAddress string) *AppsFirewallIngressRulesListCall { 6919 c.urlParams_.Set("matchingAddress", matchingAddress) 6920 return c 6921} 6922 6923// PageSize sets the optional parameter "pageSize": Maximum results to 6924// return per page. 6925func (c *AppsFirewallIngressRulesListCall) PageSize(pageSize int64) *AppsFirewallIngressRulesListCall { 6926 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6927 return c 6928} 6929 6930// PageToken sets the optional parameter "pageToken": Continuation token 6931// for fetching the next page of results. 6932func (c *AppsFirewallIngressRulesListCall) PageToken(pageToken string) *AppsFirewallIngressRulesListCall { 6933 c.urlParams_.Set("pageToken", pageToken) 6934 return c 6935} 6936 6937// Fields allows partial responses to be retrieved. See 6938// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6939// for more information. 6940func (c *AppsFirewallIngressRulesListCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesListCall { 6941 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6942 return c 6943} 6944 6945// IfNoneMatch sets the optional parameter which makes the operation 6946// fail if the object's ETag matches the given value. This is useful for 6947// getting updates only after the object has changed since the last 6948// request. Use googleapi.IsNotModified to check whether the response 6949// error from Do is the result of In-None-Match. 6950func (c *AppsFirewallIngressRulesListCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesListCall { 6951 c.ifNoneMatch_ = entityTag 6952 return c 6953} 6954 6955// Context sets the context to be used in this call's Do method. Any 6956// pending HTTP request will be aborted if the provided context is 6957// canceled. 6958func (c *AppsFirewallIngressRulesListCall) Context(ctx context.Context) *AppsFirewallIngressRulesListCall { 6959 c.ctx_ = ctx 6960 return c 6961} 6962 6963// Header returns an http.Header that can be modified by the caller to 6964// add HTTP headers to the request. 6965func (c *AppsFirewallIngressRulesListCall) Header() http.Header { 6966 if c.header_ == nil { 6967 c.header_ = make(http.Header) 6968 } 6969 return c.header_ 6970} 6971 6972func (c *AppsFirewallIngressRulesListCall) doRequest(alt string) (*http.Response, error) { 6973 reqHeaders := make(http.Header) 6974 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6975 for k, v := range c.header_ { 6976 reqHeaders[k] = v 6977 } 6978 reqHeaders.Set("User-Agent", c.s.userAgent()) 6979 if c.ifNoneMatch_ != "" { 6980 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6981 } 6982 var body io.Reader = nil 6983 c.urlParams_.Set("alt", alt) 6984 c.urlParams_.Set("prettyPrint", "false") 6985 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules") 6986 urls += "?" + c.urlParams_.Encode() 6987 req, err := http.NewRequest("GET", urls, body) 6988 if err != nil { 6989 return nil, err 6990 } 6991 req.Header = reqHeaders 6992 googleapi.Expand(req.URL, map[string]string{ 6993 "appsId": c.appsId, 6994 }) 6995 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6996} 6997 6998// Do executes the "appengine.apps.firewall.ingressRules.list" call. 6999// Exactly one of *ListIngressRulesResponse or error will be non-nil. 7000// Any non-2xx status code is an error. Response headers are in either 7001// *ListIngressRulesResponse.ServerResponse.Header or (if a response was 7002// returned at all) in error.(*googleapi.Error).Header. Use 7003// googleapi.IsNotModified to check whether the returned error was 7004// because http.StatusNotModified was returned. 7005func (c *AppsFirewallIngressRulesListCall) Do(opts ...googleapi.CallOption) (*ListIngressRulesResponse, error) { 7006 gensupport.SetOptions(c.urlParams_, opts...) 7007 res, err := c.doRequest("json") 7008 if res != nil && res.StatusCode == http.StatusNotModified { 7009 if res.Body != nil { 7010 res.Body.Close() 7011 } 7012 return nil, &googleapi.Error{ 7013 Code: res.StatusCode, 7014 Header: res.Header, 7015 } 7016 } 7017 if err != nil { 7018 return nil, err 7019 } 7020 defer googleapi.CloseBody(res) 7021 if err := googleapi.CheckResponse(res); err != nil { 7022 return nil, err 7023 } 7024 ret := &ListIngressRulesResponse{ 7025 ServerResponse: googleapi.ServerResponse{ 7026 Header: res.Header, 7027 HTTPStatusCode: res.StatusCode, 7028 }, 7029 } 7030 target := &ret 7031 if err := gensupport.DecodeResponse(target, res); err != nil { 7032 return nil, err 7033 } 7034 return ret, nil 7035 // { 7036 // "description": "Lists the firewall rules of an application.", 7037 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules", 7038 // "httpMethod": "GET", 7039 // "id": "appengine.apps.firewall.ingressRules.list", 7040 // "parameterOrder": [ 7041 // "appsId" 7042 // ], 7043 // "parameters": { 7044 // "appsId": { 7045 // "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.", 7046 // "location": "path", 7047 // "required": true, 7048 // "type": "string" 7049 // }, 7050 // "matchingAddress": { 7051 // "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.", 7052 // "location": "query", 7053 // "type": "string" 7054 // }, 7055 // "pageSize": { 7056 // "description": "Maximum results to return per page.", 7057 // "format": "int32", 7058 // "location": "query", 7059 // "type": "integer" 7060 // }, 7061 // "pageToken": { 7062 // "description": "Continuation token for fetching the next page of results.", 7063 // "location": "query", 7064 // "type": "string" 7065 // } 7066 // }, 7067 // "path": "v1/apps/{appsId}/firewall/ingressRules", 7068 // "response": { 7069 // "$ref": "ListIngressRulesResponse" 7070 // }, 7071 // "scopes": [ 7072 // "https://www.googleapis.com/auth/appengine.admin", 7073 // "https://www.googleapis.com/auth/cloud-platform", 7074 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7075 // ] 7076 // } 7077 7078} 7079 7080// Pages invokes f for each page of results. 7081// A non-nil error returned from f will halt the iteration. 7082// The provided context supersedes any context provided to the Context method. 7083func (c *AppsFirewallIngressRulesListCall) Pages(ctx context.Context, f func(*ListIngressRulesResponse) error) error { 7084 c.ctx_ = ctx 7085 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7086 for { 7087 x, err := c.Do() 7088 if err != nil { 7089 return err 7090 } 7091 if err := f(x); err != nil { 7092 return err 7093 } 7094 if x.NextPageToken == "" { 7095 return nil 7096 } 7097 c.PageToken(x.NextPageToken) 7098 } 7099} 7100 7101// method id "appengine.apps.firewall.ingressRules.patch": 7102 7103type AppsFirewallIngressRulesPatchCall struct { 7104 s *APIService 7105 appsId string 7106 ingressRulesId string 7107 firewallrule *FirewallRule 7108 urlParams_ gensupport.URLParams 7109 ctx_ context.Context 7110 header_ http.Header 7111} 7112 7113// Patch: Updates the specified firewall rule. 7114// 7115// - appsId: Part of `name`. Name of the Firewall resource to update. 7116// Example: apps/myapp/firewall/ingressRules/100. 7117// - ingressRulesId: Part of `name`. See documentation of `appsId`. 7118func (r *AppsFirewallIngressRulesService) Patch(appsId string, ingressRulesId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesPatchCall { 7119 c := &AppsFirewallIngressRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7120 c.appsId = appsId 7121 c.ingressRulesId = ingressRulesId 7122 c.firewallrule = firewallrule 7123 return c 7124} 7125 7126// UpdateMask sets the optional parameter "updateMask": Standard field 7127// mask for the set of fields to be updated. 7128func (c *AppsFirewallIngressRulesPatchCall) UpdateMask(updateMask string) *AppsFirewallIngressRulesPatchCall { 7129 c.urlParams_.Set("updateMask", updateMask) 7130 return c 7131} 7132 7133// Fields allows partial responses to be retrieved. See 7134// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7135// for more information. 7136func (c *AppsFirewallIngressRulesPatchCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesPatchCall { 7137 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7138 return c 7139} 7140 7141// Context sets the context to be used in this call's Do method. Any 7142// pending HTTP request will be aborted if the provided context is 7143// canceled. 7144func (c *AppsFirewallIngressRulesPatchCall) Context(ctx context.Context) *AppsFirewallIngressRulesPatchCall { 7145 c.ctx_ = ctx 7146 return c 7147} 7148 7149// Header returns an http.Header that can be modified by the caller to 7150// add HTTP headers to the request. 7151func (c *AppsFirewallIngressRulesPatchCall) Header() http.Header { 7152 if c.header_ == nil { 7153 c.header_ = make(http.Header) 7154 } 7155 return c.header_ 7156} 7157 7158func (c *AppsFirewallIngressRulesPatchCall) doRequest(alt string) (*http.Response, error) { 7159 reqHeaders := make(http.Header) 7160 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7161 for k, v := range c.header_ { 7162 reqHeaders[k] = v 7163 } 7164 reqHeaders.Set("User-Agent", c.s.userAgent()) 7165 var body io.Reader = nil 7166 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule) 7167 if err != nil { 7168 return nil, err 7169 } 7170 reqHeaders.Set("Content-Type", "application/json") 7171 c.urlParams_.Set("alt", alt) 7172 c.urlParams_.Set("prettyPrint", "false") 7173 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 7174 urls += "?" + c.urlParams_.Encode() 7175 req, err := http.NewRequest("PATCH", urls, body) 7176 if err != nil { 7177 return nil, err 7178 } 7179 req.Header = reqHeaders 7180 googleapi.Expand(req.URL, map[string]string{ 7181 "appsId": c.appsId, 7182 "ingressRulesId": c.ingressRulesId, 7183 }) 7184 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7185} 7186 7187// Do executes the "appengine.apps.firewall.ingressRules.patch" call. 7188// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 7189// status code is an error. Response headers are in either 7190// *FirewallRule.ServerResponse.Header or (if a response was returned at 7191// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7192// to check whether the returned error was because 7193// http.StatusNotModified was returned. 7194func (c *AppsFirewallIngressRulesPatchCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 7195 gensupport.SetOptions(c.urlParams_, opts...) 7196 res, err := c.doRequest("json") 7197 if res != nil && res.StatusCode == http.StatusNotModified { 7198 if res.Body != nil { 7199 res.Body.Close() 7200 } 7201 return nil, &googleapi.Error{ 7202 Code: res.StatusCode, 7203 Header: res.Header, 7204 } 7205 } 7206 if err != nil { 7207 return nil, err 7208 } 7209 defer googleapi.CloseBody(res) 7210 if err := googleapi.CheckResponse(res); err != nil { 7211 return nil, err 7212 } 7213 ret := &FirewallRule{ 7214 ServerResponse: googleapi.ServerResponse{ 7215 Header: res.Header, 7216 HTTPStatusCode: res.StatusCode, 7217 }, 7218 } 7219 target := &ret 7220 if err := gensupport.DecodeResponse(target, res); err != nil { 7221 return nil, err 7222 } 7223 return ret, nil 7224 // { 7225 // "description": "Updates the specified firewall rule.", 7226 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 7227 // "httpMethod": "PATCH", 7228 // "id": "appengine.apps.firewall.ingressRules.patch", 7229 // "parameterOrder": [ 7230 // "appsId", 7231 // "ingressRulesId" 7232 // ], 7233 // "parameters": { 7234 // "appsId": { 7235 // "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.", 7236 // "location": "path", 7237 // "required": true, 7238 // "type": "string" 7239 // }, 7240 // "ingressRulesId": { 7241 // "description": "Part of `name`. See documentation of `appsId`.", 7242 // "location": "path", 7243 // "required": true, 7244 // "type": "string" 7245 // }, 7246 // "updateMask": { 7247 // "description": "Standard field mask for the set of fields to be updated.", 7248 // "format": "google-fieldmask", 7249 // "location": "query", 7250 // "type": "string" 7251 // } 7252 // }, 7253 // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 7254 // "request": { 7255 // "$ref": "FirewallRule" 7256 // }, 7257 // "response": { 7258 // "$ref": "FirewallRule" 7259 // }, 7260 // "scopes": [ 7261 // "https://www.googleapis.com/auth/cloud-platform" 7262 // ] 7263 // } 7264 7265} 7266 7267// method id "appengine.apps.locations.get": 7268 7269type AppsLocationsGetCall struct { 7270 s *APIService 7271 appsId string 7272 locationsId string 7273 urlParams_ gensupport.URLParams 7274 ifNoneMatch_ string 7275 ctx_ context.Context 7276 header_ http.Header 7277} 7278 7279// Get: Gets information about a location. 7280// 7281// - appsId: Part of `name`. Resource name for the location. 7282// - locationsId: Part of `name`. See documentation of `appsId`. 7283func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall { 7284 c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7285 c.appsId = appsId 7286 c.locationsId = locationsId 7287 return c 7288} 7289 7290// Fields allows partial responses to be retrieved. See 7291// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7292// for more information. 7293func (c *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall { 7294 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7295 return c 7296} 7297 7298// IfNoneMatch sets the optional parameter which makes the operation 7299// fail if the object's ETag matches the given value. This is useful for 7300// getting updates only after the object has changed since the last 7301// request. Use googleapi.IsNotModified to check whether the response 7302// error from Do is the result of In-None-Match. 7303func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall { 7304 c.ifNoneMatch_ = entityTag 7305 return c 7306} 7307 7308// Context sets the context to be used in this call's Do method. Any 7309// pending HTTP request will be aborted if the provided context is 7310// canceled. 7311func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall { 7312 c.ctx_ = ctx 7313 return c 7314} 7315 7316// Header returns an http.Header that can be modified by the caller to 7317// add HTTP headers to the request. 7318func (c *AppsLocationsGetCall) Header() http.Header { 7319 if c.header_ == nil { 7320 c.header_ = make(http.Header) 7321 } 7322 return c.header_ 7323} 7324 7325func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 7326 reqHeaders := make(http.Header) 7327 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7328 for k, v := range c.header_ { 7329 reqHeaders[k] = v 7330 } 7331 reqHeaders.Set("User-Agent", c.s.userAgent()) 7332 if c.ifNoneMatch_ != "" { 7333 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7334 } 7335 var body io.Reader = nil 7336 c.urlParams_.Set("alt", alt) 7337 c.urlParams_.Set("prettyPrint", "false") 7338 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/locations/{locationsId}") 7339 urls += "?" + c.urlParams_.Encode() 7340 req, err := http.NewRequest("GET", urls, body) 7341 if err != nil { 7342 return nil, err 7343 } 7344 req.Header = reqHeaders 7345 googleapi.Expand(req.URL, map[string]string{ 7346 "appsId": c.appsId, 7347 "locationsId": c.locationsId, 7348 }) 7349 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7350} 7351 7352// Do executes the "appengine.apps.locations.get" call. 7353// Exactly one of *Location or error will be non-nil. Any non-2xx status 7354// code is an error. Response headers are in either 7355// *Location.ServerResponse.Header or (if a response was returned at 7356// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7357// to check whether the returned error was because 7358// http.StatusNotModified was returned. 7359func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 7360 gensupport.SetOptions(c.urlParams_, opts...) 7361 res, err := c.doRequest("json") 7362 if res != nil && res.StatusCode == http.StatusNotModified { 7363 if res.Body != nil { 7364 res.Body.Close() 7365 } 7366 return nil, &googleapi.Error{ 7367 Code: res.StatusCode, 7368 Header: res.Header, 7369 } 7370 } 7371 if err != nil { 7372 return nil, err 7373 } 7374 defer googleapi.CloseBody(res) 7375 if err := googleapi.CheckResponse(res); err != nil { 7376 return nil, err 7377 } 7378 ret := &Location{ 7379 ServerResponse: googleapi.ServerResponse{ 7380 Header: res.Header, 7381 HTTPStatusCode: res.StatusCode, 7382 }, 7383 } 7384 target := &ret 7385 if err := gensupport.DecodeResponse(target, res); err != nil { 7386 return nil, err 7387 } 7388 return ret, nil 7389 // { 7390 // "description": "Gets information about a location.", 7391 // "flatPath": "v1/apps/{appsId}/locations/{locationsId}", 7392 // "httpMethod": "GET", 7393 // "id": "appengine.apps.locations.get", 7394 // "parameterOrder": [ 7395 // "appsId", 7396 // "locationsId" 7397 // ], 7398 // "parameters": { 7399 // "appsId": { 7400 // "description": "Part of `name`. Resource name for the location.", 7401 // "location": "path", 7402 // "required": true, 7403 // "type": "string" 7404 // }, 7405 // "locationsId": { 7406 // "description": "Part of `name`. See documentation of `appsId`.", 7407 // "location": "path", 7408 // "required": true, 7409 // "type": "string" 7410 // } 7411 // }, 7412 // "path": "v1/apps/{appsId}/locations/{locationsId}", 7413 // "response": { 7414 // "$ref": "Location" 7415 // }, 7416 // "scopes": [ 7417 // "https://www.googleapis.com/auth/appengine.admin", 7418 // "https://www.googleapis.com/auth/cloud-platform", 7419 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7420 // ] 7421 // } 7422 7423} 7424 7425// method id "appengine.apps.locations.list": 7426 7427type AppsLocationsListCall struct { 7428 s *APIService 7429 appsId string 7430 urlParams_ gensupport.URLParams 7431 ifNoneMatch_ string 7432 ctx_ context.Context 7433 header_ http.Header 7434} 7435 7436// List: Lists information about the supported locations for this 7437// service. 7438// 7439// - appsId: Part of `name`. The resource that owns the locations 7440// collection, if applicable. 7441func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall { 7442 c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7443 c.appsId = appsId 7444 return c 7445} 7446 7447// Filter sets the optional parameter "filter": A filter to narrow down 7448// results to a preferred subset. The filtering language accepts strings 7449// like "displayName=tokyo", and is documented in more detail in AIP-160 7450// (https://google.aip.dev/160). 7451func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall { 7452 c.urlParams_.Set("filter", filter) 7453 return c 7454} 7455 7456// PageSize sets the optional parameter "pageSize": The maximum number 7457// of results to return. If not set, the service selects a default. 7458func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall { 7459 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7460 return c 7461} 7462 7463// PageToken sets the optional parameter "pageToken": A page token 7464// received from the next_page_token field in the response. Send that 7465// page token to receive the subsequent page. 7466func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall { 7467 c.urlParams_.Set("pageToken", pageToken) 7468 return c 7469} 7470 7471// Fields allows partial responses to be retrieved. See 7472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7473// for more information. 7474func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall { 7475 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7476 return c 7477} 7478 7479// IfNoneMatch sets the optional parameter which makes the operation 7480// fail if the object's ETag matches the given value. This is useful for 7481// getting updates only after the object has changed since the last 7482// request. Use googleapi.IsNotModified to check whether the response 7483// error from Do is the result of In-None-Match. 7484func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall { 7485 c.ifNoneMatch_ = entityTag 7486 return c 7487} 7488 7489// Context sets the context to be used in this call's Do method. Any 7490// pending HTTP request will be aborted if the provided context is 7491// canceled. 7492func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall { 7493 c.ctx_ = ctx 7494 return c 7495} 7496 7497// Header returns an http.Header that can be modified by the caller to 7498// add HTTP headers to the request. 7499func (c *AppsLocationsListCall) Header() http.Header { 7500 if c.header_ == nil { 7501 c.header_ = make(http.Header) 7502 } 7503 return c.header_ 7504} 7505 7506func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) { 7507 reqHeaders := make(http.Header) 7508 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7509 for k, v := range c.header_ { 7510 reqHeaders[k] = v 7511 } 7512 reqHeaders.Set("User-Agent", c.s.userAgent()) 7513 if c.ifNoneMatch_ != "" { 7514 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7515 } 7516 var body io.Reader = nil 7517 c.urlParams_.Set("alt", alt) 7518 c.urlParams_.Set("prettyPrint", "false") 7519 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/locations") 7520 urls += "?" + c.urlParams_.Encode() 7521 req, err := http.NewRequest("GET", urls, body) 7522 if err != nil { 7523 return nil, err 7524 } 7525 req.Header = reqHeaders 7526 googleapi.Expand(req.URL, map[string]string{ 7527 "appsId": c.appsId, 7528 }) 7529 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7530} 7531 7532// Do executes the "appengine.apps.locations.list" call. 7533// Exactly one of *ListLocationsResponse or error will be non-nil. Any 7534// non-2xx status code is an error. Response headers are in either 7535// *ListLocationsResponse.ServerResponse.Header or (if a response was 7536// returned at all) in error.(*googleapi.Error).Header. Use 7537// googleapi.IsNotModified to check whether the returned error was 7538// because http.StatusNotModified was returned. 7539func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 7540 gensupport.SetOptions(c.urlParams_, opts...) 7541 res, err := c.doRequest("json") 7542 if res != nil && res.StatusCode == http.StatusNotModified { 7543 if res.Body != nil { 7544 res.Body.Close() 7545 } 7546 return nil, &googleapi.Error{ 7547 Code: res.StatusCode, 7548 Header: res.Header, 7549 } 7550 } 7551 if err != nil { 7552 return nil, err 7553 } 7554 defer googleapi.CloseBody(res) 7555 if err := googleapi.CheckResponse(res); err != nil { 7556 return nil, err 7557 } 7558 ret := &ListLocationsResponse{ 7559 ServerResponse: googleapi.ServerResponse{ 7560 Header: res.Header, 7561 HTTPStatusCode: res.StatusCode, 7562 }, 7563 } 7564 target := &ret 7565 if err := gensupport.DecodeResponse(target, res); err != nil { 7566 return nil, err 7567 } 7568 return ret, nil 7569 // { 7570 // "description": "Lists information about the supported locations for this service.", 7571 // "flatPath": "v1/apps/{appsId}/locations", 7572 // "httpMethod": "GET", 7573 // "id": "appengine.apps.locations.list", 7574 // "parameterOrder": [ 7575 // "appsId" 7576 // ], 7577 // "parameters": { 7578 // "appsId": { 7579 // "description": "Part of `name`. The resource that owns the locations collection, if applicable.", 7580 // "location": "path", 7581 // "required": true, 7582 // "type": "string" 7583 // }, 7584 // "filter": { 7585 // "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).", 7586 // "location": "query", 7587 // "type": "string" 7588 // }, 7589 // "pageSize": { 7590 // "description": "The maximum number of results to return. If not set, the service selects a default.", 7591 // "format": "int32", 7592 // "location": "query", 7593 // "type": "integer" 7594 // }, 7595 // "pageToken": { 7596 // "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.", 7597 // "location": "query", 7598 // "type": "string" 7599 // } 7600 // }, 7601 // "path": "v1/apps/{appsId}/locations", 7602 // "response": { 7603 // "$ref": "ListLocationsResponse" 7604 // }, 7605 // "scopes": [ 7606 // "https://www.googleapis.com/auth/appengine.admin", 7607 // "https://www.googleapis.com/auth/cloud-platform", 7608 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7609 // ] 7610 // } 7611 7612} 7613 7614// Pages invokes f for each page of results. 7615// A non-nil error returned from f will halt the iteration. 7616// The provided context supersedes any context provided to the Context method. 7617func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 7618 c.ctx_ = ctx 7619 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7620 for { 7621 x, err := c.Do() 7622 if err != nil { 7623 return err 7624 } 7625 if err := f(x); err != nil { 7626 return err 7627 } 7628 if x.NextPageToken == "" { 7629 return nil 7630 } 7631 c.PageToken(x.NextPageToken) 7632 } 7633} 7634 7635// method id "appengine.apps.operations.get": 7636 7637type AppsOperationsGetCall struct { 7638 s *APIService 7639 appsId string 7640 operationsId string 7641 urlParams_ gensupport.URLParams 7642 ifNoneMatch_ string 7643 ctx_ context.Context 7644 header_ http.Header 7645} 7646 7647// Get: Gets the latest state of a long-running operation. Clients can 7648// use this method to poll the operation result at intervals as 7649// recommended by the API service. 7650// 7651// - appsId: Part of `name`. The name of the operation resource. 7652// - operationsId: Part of `name`. See documentation of `appsId`. 7653func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall { 7654 c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7655 c.appsId = appsId 7656 c.operationsId = operationsId 7657 return c 7658} 7659 7660// Fields allows partial responses to be retrieved. See 7661// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7662// for more information. 7663func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall { 7664 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7665 return c 7666} 7667 7668// IfNoneMatch sets the optional parameter which makes the operation 7669// fail if the object's ETag matches the given value. This is useful for 7670// getting updates only after the object has changed since the last 7671// request. Use googleapi.IsNotModified to check whether the response 7672// error from Do is the result of In-None-Match. 7673func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall { 7674 c.ifNoneMatch_ = entityTag 7675 return c 7676} 7677 7678// Context sets the context to be used in this call's Do method. Any 7679// pending HTTP request will be aborted if the provided context is 7680// canceled. 7681func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall { 7682 c.ctx_ = ctx 7683 return c 7684} 7685 7686// Header returns an http.Header that can be modified by the caller to 7687// add HTTP headers to the request. 7688func (c *AppsOperationsGetCall) Header() http.Header { 7689 if c.header_ == nil { 7690 c.header_ = make(http.Header) 7691 } 7692 return c.header_ 7693} 7694 7695func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 7696 reqHeaders := make(http.Header) 7697 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7698 for k, v := range c.header_ { 7699 reqHeaders[k] = v 7700 } 7701 reqHeaders.Set("User-Agent", c.s.userAgent()) 7702 if c.ifNoneMatch_ != "" { 7703 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7704 } 7705 var body io.Reader = nil 7706 c.urlParams_.Set("alt", alt) 7707 c.urlParams_.Set("prettyPrint", "false") 7708 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/operations/{operationsId}") 7709 urls += "?" + c.urlParams_.Encode() 7710 req, err := http.NewRequest("GET", urls, body) 7711 if err != nil { 7712 return nil, err 7713 } 7714 req.Header = reqHeaders 7715 googleapi.Expand(req.URL, map[string]string{ 7716 "appsId": c.appsId, 7717 "operationsId": c.operationsId, 7718 }) 7719 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7720} 7721 7722// Do executes the "appengine.apps.operations.get" call. 7723// Exactly one of *Operation or error will be non-nil. Any non-2xx 7724// status code is an error. Response headers are in either 7725// *Operation.ServerResponse.Header or (if a response was returned at 7726// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7727// to check whether the returned error was because 7728// http.StatusNotModified was returned. 7729func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7730 gensupport.SetOptions(c.urlParams_, opts...) 7731 res, err := c.doRequest("json") 7732 if res != nil && res.StatusCode == http.StatusNotModified { 7733 if res.Body != nil { 7734 res.Body.Close() 7735 } 7736 return nil, &googleapi.Error{ 7737 Code: res.StatusCode, 7738 Header: res.Header, 7739 } 7740 } 7741 if err != nil { 7742 return nil, err 7743 } 7744 defer googleapi.CloseBody(res) 7745 if err := googleapi.CheckResponse(res); err != nil { 7746 return nil, err 7747 } 7748 ret := &Operation{ 7749 ServerResponse: googleapi.ServerResponse{ 7750 Header: res.Header, 7751 HTTPStatusCode: res.StatusCode, 7752 }, 7753 } 7754 target := &ret 7755 if err := gensupport.DecodeResponse(target, res); err != nil { 7756 return nil, err 7757 } 7758 return ret, nil 7759 // { 7760 // "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.", 7761 // "flatPath": "v1/apps/{appsId}/operations/{operationsId}", 7762 // "httpMethod": "GET", 7763 // "id": "appengine.apps.operations.get", 7764 // "parameterOrder": [ 7765 // "appsId", 7766 // "operationsId" 7767 // ], 7768 // "parameters": { 7769 // "appsId": { 7770 // "description": "Part of `name`. The name of the operation resource.", 7771 // "location": "path", 7772 // "required": true, 7773 // "type": "string" 7774 // }, 7775 // "operationsId": { 7776 // "description": "Part of `name`. See documentation of `appsId`.", 7777 // "location": "path", 7778 // "required": true, 7779 // "type": "string" 7780 // } 7781 // }, 7782 // "path": "v1/apps/{appsId}/operations/{operationsId}", 7783 // "response": { 7784 // "$ref": "Operation" 7785 // }, 7786 // "scopes": [ 7787 // "https://www.googleapis.com/auth/appengine.admin", 7788 // "https://www.googleapis.com/auth/cloud-platform", 7789 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7790 // ] 7791 // } 7792 7793} 7794 7795// method id "appengine.apps.operations.list": 7796 7797type AppsOperationsListCall struct { 7798 s *APIService 7799 appsId string 7800 urlParams_ gensupport.URLParams 7801 ifNoneMatch_ string 7802 ctx_ context.Context 7803 header_ http.Header 7804} 7805 7806// List: Lists operations that match the specified filter in the 7807// request. If the server doesn't support this method, it returns 7808// UNIMPLEMENTED.NOTE: the name binding allows API services to override 7809// the binding to use different resource name schemes, such as 7810// users/*/operations. To override the binding, API services can add a 7811// binding such as "/v1/{name=users/*}/operations" to their service 7812// configuration. For backwards compatibility, the default name includes 7813// the operations collection id, however overriding users must ensure 7814// the name binding is the parent resource, without the operations 7815// collection id. 7816// 7817// - appsId: Part of `name`. The name of the operation's parent 7818// resource. 7819func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall { 7820 c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7821 c.appsId = appsId 7822 return c 7823} 7824 7825// Filter sets the optional parameter "filter": The standard list 7826// filter. 7827func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall { 7828 c.urlParams_.Set("filter", filter) 7829 return c 7830} 7831 7832// PageSize sets the optional parameter "pageSize": The standard list 7833// page size. 7834func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall { 7835 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7836 return c 7837} 7838 7839// PageToken sets the optional parameter "pageToken": The standard list 7840// page token. 7841func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall { 7842 c.urlParams_.Set("pageToken", pageToken) 7843 return c 7844} 7845 7846// Fields allows partial responses to be retrieved. See 7847// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7848// for more information. 7849func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall { 7850 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7851 return c 7852} 7853 7854// IfNoneMatch sets the optional parameter which makes the operation 7855// fail if the object's ETag matches the given value. This is useful for 7856// getting updates only after the object has changed since the last 7857// request. Use googleapi.IsNotModified to check whether the response 7858// error from Do is the result of In-None-Match. 7859func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall { 7860 c.ifNoneMatch_ = entityTag 7861 return c 7862} 7863 7864// Context sets the context to be used in this call's Do method. Any 7865// pending HTTP request will be aborted if the provided context is 7866// canceled. 7867func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall { 7868 c.ctx_ = ctx 7869 return c 7870} 7871 7872// Header returns an http.Header that can be modified by the caller to 7873// add HTTP headers to the request. 7874func (c *AppsOperationsListCall) Header() http.Header { 7875 if c.header_ == nil { 7876 c.header_ = make(http.Header) 7877 } 7878 return c.header_ 7879} 7880 7881func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) { 7882 reqHeaders := make(http.Header) 7883 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7884 for k, v := range c.header_ { 7885 reqHeaders[k] = v 7886 } 7887 reqHeaders.Set("User-Agent", c.s.userAgent()) 7888 if c.ifNoneMatch_ != "" { 7889 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7890 } 7891 var body io.Reader = nil 7892 c.urlParams_.Set("alt", alt) 7893 c.urlParams_.Set("prettyPrint", "false") 7894 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/operations") 7895 urls += "?" + c.urlParams_.Encode() 7896 req, err := http.NewRequest("GET", urls, body) 7897 if err != nil { 7898 return nil, err 7899 } 7900 req.Header = reqHeaders 7901 googleapi.Expand(req.URL, map[string]string{ 7902 "appsId": c.appsId, 7903 }) 7904 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7905} 7906 7907// Do executes the "appengine.apps.operations.list" call. 7908// Exactly one of *ListOperationsResponse or error will be non-nil. Any 7909// non-2xx status code is an error. Response headers are in either 7910// *ListOperationsResponse.ServerResponse.Header or (if a response was 7911// returned at all) in error.(*googleapi.Error).Header. Use 7912// googleapi.IsNotModified to check whether the returned error was 7913// because http.StatusNotModified was returned. 7914func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 7915 gensupport.SetOptions(c.urlParams_, opts...) 7916 res, err := c.doRequest("json") 7917 if res != nil && res.StatusCode == http.StatusNotModified { 7918 if res.Body != nil { 7919 res.Body.Close() 7920 } 7921 return nil, &googleapi.Error{ 7922 Code: res.StatusCode, 7923 Header: res.Header, 7924 } 7925 } 7926 if err != nil { 7927 return nil, err 7928 } 7929 defer googleapi.CloseBody(res) 7930 if err := googleapi.CheckResponse(res); err != nil { 7931 return nil, err 7932 } 7933 ret := &ListOperationsResponse{ 7934 ServerResponse: googleapi.ServerResponse{ 7935 Header: res.Header, 7936 HTTPStatusCode: res.StatusCode, 7937 }, 7938 } 7939 target := &ret 7940 if err := gensupport.DecodeResponse(target, res); err != nil { 7941 return nil, err 7942 } 7943 return ret, nil 7944 // { 7945 // "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.", 7946 // "flatPath": "v1/apps/{appsId}/operations", 7947 // "httpMethod": "GET", 7948 // "id": "appengine.apps.operations.list", 7949 // "parameterOrder": [ 7950 // "appsId" 7951 // ], 7952 // "parameters": { 7953 // "appsId": { 7954 // "description": "Part of `name`. The name of the operation's parent resource.", 7955 // "location": "path", 7956 // "required": true, 7957 // "type": "string" 7958 // }, 7959 // "filter": { 7960 // "description": "The standard list filter.", 7961 // "location": "query", 7962 // "type": "string" 7963 // }, 7964 // "pageSize": { 7965 // "description": "The standard list page size.", 7966 // "format": "int32", 7967 // "location": "query", 7968 // "type": "integer" 7969 // }, 7970 // "pageToken": { 7971 // "description": "The standard list page token.", 7972 // "location": "query", 7973 // "type": "string" 7974 // } 7975 // }, 7976 // "path": "v1/apps/{appsId}/operations", 7977 // "response": { 7978 // "$ref": "ListOperationsResponse" 7979 // }, 7980 // "scopes": [ 7981 // "https://www.googleapis.com/auth/appengine.admin", 7982 // "https://www.googleapis.com/auth/cloud-platform", 7983 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7984 // ] 7985 // } 7986 7987} 7988 7989// Pages invokes f for each page of results. 7990// A non-nil error returned from f will halt the iteration. 7991// The provided context supersedes any context provided to the Context method. 7992func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 7993 c.ctx_ = ctx 7994 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7995 for { 7996 x, err := c.Do() 7997 if err != nil { 7998 return err 7999 } 8000 if err := f(x); err != nil { 8001 return err 8002 } 8003 if x.NextPageToken == "" { 8004 return nil 8005 } 8006 c.PageToken(x.NextPageToken) 8007 } 8008} 8009 8010// method id "appengine.apps.services.delete": 8011 8012type AppsServicesDeleteCall struct { 8013 s *APIService 8014 appsId string 8015 servicesId string 8016 urlParams_ gensupport.URLParams 8017 ctx_ context.Context 8018 header_ http.Header 8019} 8020 8021// Delete: Deletes the specified service and all enclosed versions. 8022// 8023// - appsId: Part of `name`. Name of the resource requested. Example: 8024// apps/myapp/services/default. 8025// - servicesId: Part of `name`. See documentation of `appsId`. 8026func (r *AppsServicesService) Delete(appsId string, servicesId string) *AppsServicesDeleteCall { 8027 c := &AppsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8028 c.appsId = appsId 8029 c.servicesId = servicesId 8030 return c 8031} 8032 8033// Fields allows partial responses to be retrieved. See 8034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8035// for more information. 8036func (c *AppsServicesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesDeleteCall { 8037 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8038 return c 8039} 8040 8041// Context sets the context to be used in this call's Do method. Any 8042// pending HTTP request will be aborted if the provided context is 8043// canceled. 8044func (c *AppsServicesDeleteCall) Context(ctx context.Context) *AppsServicesDeleteCall { 8045 c.ctx_ = ctx 8046 return c 8047} 8048 8049// Header returns an http.Header that can be modified by the caller to 8050// add HTTP headers to the request. 8051func (c *AppsServicesDeleteCall) Header() http.Header { 8052 if c.header_ == nil { 8053 c.header_ = make(http.Header) 8054 } 8055 return c.header_ 8056} 8057 8058func (c *AppsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { 8059 reqHeaders := make(http.Header) 8060 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8061 for k, v := range c.header_ { 8062 reqHeaders[k] = v 8063 } 8064 reqHeaders.Set("User-Agent", c.s.userAgent()) 8065 var body io.Reader = nil 8066 c.urlParams_.Set("alt", alt) 8067 c.urlParams_.Set("prettyPrint", "false") 8068 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}") 8069 urls += "?" + c.urlParams_.Encode() 8070 req, err := http.NewRequest("DELETE", urls, body) 8071 if err != nil { 8072 return nil, err 8073 } 8074 req.Header = reqHeaders 8075 googleapi.Expand(req.URL, map[string]string{ 8076 "appsId": c.appsId, 8077 "servicesId": c.servicesId, 8078 }) 8079 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8080} 8081 8082// Do executes the "appengine.apps.services.delete" call. 8083// Exactly one of *Operation or error will be non-nil. Any non-2xx 8084// status code is an error. Response headers are in either 8085// *Operation.ServerResponse.Header or (if a response was returned at 8086// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8087// to check whether the returned error was because 8088// http.StatusNotModified was returned. 8089func (c *AppsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8090 gensupport.SetOptions(c.urlParams_, opts...) 8091 res, err := c.doRequest("json") 8092 if res != nil && res.StatusCode == http.StatusNotModified { 8093 if res.Body != nil { 8094 res.Body.Close() 8095 } 8096 return nil, &googleapi.Error{ 8097 Code: res.StatusCode, 8098 Header: res.Header, 8099 } 8100 } 8101 if err != nil { 8102 return nil, err 8103 } 8104 defer googleapi.CloseBody(res) 8105 if err := googleapi.CheckResponse(res); err != nil { 8106 return nil, err 8107 } 8108 ret := &Operation{ 8109 ServerResponse: googleapi.ServerResponse{ 8110 Header: res.Header, 8111 HTTPStatusCode: res.StatusCode, 8112 }, 8113 } 8114 target := &ret 8115 if err := gensupport.DecodeResponse(target, res); err != nil { 8116 return nil, err 8117 } 8118 return ret, nil 8119 // { 8120 // "description": "Deletes the specified service and all enclosed versions.", 8121 // "flatPath": "v1/apps/{appsId}/services/{servicesId}", 8122 // "httpMethod": "DELETE", 8123 // "id": "appengine.apps.services.delete", 8124 // "parameterOrder": [ 8125 // "appsId", 8126 // "servicesId" 8127 // ], 8128 // "parameters": { 8129 // "appsId": { 8130 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", 8131 // "location": "path", 8132 // "required": true, 8133 // "type": "string" 8134 // }, 8135 // "servicesId": { 8136 // "description": "Part of `name`. See documentation of `appsId`.", 8137 // "location": "path", 8138 // "required": true, 8139 // "type": "string" 8140 // } 8141 // }, 8142 // "path": "v1/apps/{appsId}/services/{servicesId}", 8143 // "response": { 8144 // "$ref": "Operation" 8145 // }, 8146 // "scopes": [ 8147 // "https://www.googleapis.com/auth/cloud-platform" 8148 // ] 8149 // } 8150 8151} 8152 8153// method id "appengine.apps.services.get": 8154 8155type AppsServicesGetCall struct { 8156 s *APIService 8157 appsId string 8158 servicesId string 8159 urlParams_ gensupport.URLParams 8160 ifNoneMatch_ string 8161 ctx_ context.Context 8162 header_ http.Header 8163} 8164 8165// Get: Gets the current configuration of the specified service. 8166// 8167// - appsId: Part of `name`. Name of the resource requested. Example: 8168// apps/myapp/services/default. 8169// - servicesId: Part of `name`. See documentation of `appsId`. 8170func (r *AppsServicesService) Get(appsId string, servicesId string) *AppsServicesGetCall { 8171 c := &AppsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8172 c.appsId = appsId 8173 c.servicesId = servicesId 8174 return c 8175} 8176 8177// Fields allows partial responses to be retrieved. See 8178// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8179// for more information. 8180func (c *AppsServicesGetCall) Fields(s ...googleapi.Field) *AppsServicesGetCall { 8181 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8182 return c 8183} 8184 8185// IfNoneMatch sets the optional parameter which makes the operation 8186// fail if the object's ETag matches the given value. This is useful for 8187// getting updates only after the object has changed since the last 8188// request. Use googleapi.IsNotModified to check whether the response 8189// error from Do is the result of In-None-Match. 8190func (c *AppsServicesGetCall) IfNoneMatch(entityTag string) *AppsServicesGetCall { 8191 c.ifNoneMatch_ = entityTag 8192 return c 8193} 8194 8195// Context sets the context to be used in this call's Do method. Any 8196// pending HTTP request will be aborted if the provided context is 8197// canceled. 8198func (c *AppsServicesGetCall) Context(ctx context.Context) *AppsServicesGetCall { 8199 c.ctx_ = ctx 8200 return c 8201} 8202 8203// Header returns an http.Header that can be modified by the caller to 8204// add HTTP headers to the request. 8205func (c *AppsServicesGetCall) Header() http.Header { 8206 if c.header_ == nil { 8207 c.header_ = make(http.Header) 8208 } 8209 return c.header_ 8210} 8211 8212func (c *AppsServicesGetCall) doRequest(alt string) (*http.Response, error) { 8213 reqHeaders := make(http.Header) 8214 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8215 for k, v := range c.header_ { 8216 reqHeaders[k] = v 8217 } 8218 reqHeaders.Set("User-Agent", c.s.userAgent()) 8219 if c.ifNoneMatch_ != "" { 8220 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8221 } 8222 var body io.Reader = nil 8223 c.urlParams_.Set("alt", alt) 8224 c.urlParams_.Set("prettyPrint", "false") 8225 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}") 8226 urls += "?" + c.urlParams_.Encode() 8227 req, err := http.NewRequest("GET", urls, body) 8228 if err != nil { 8229 return nil, err 8230 } 8231 req.Header = reqHeaders 8232 googleapi.Expand(req.URL, map[string]string{ 8233 "appsId": c.appsId, 8234 "servicesId": c.servicesId, 8235 }) 8236 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8237} 8238 8239// Do executes the "appengine.apps.services.get" call. 8240// Exactly one of *Service or error will be non-nil. Any non-2xx status 8241// code is an error. Response headers are in either 8242// *Service.ServerResponse.Header or (if a response was returned at all) 8243// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8244// check whether the returned error was because http.StatusNotModified 8245// was returned. 8246func (c *AppsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) { 8247 gensupport.SetOptions(c.urlParams_, opts...) 8248 res, err := c.doRequest("json") 8249 if res != nil && res.StatusCode == http.StatusNotModified { 8250 if res.Body != nil { 8251 res.Body.Close() 8252 } 8253 return nil, &googleapi.Error{ 8254 Code: res.StatusCode, 8255 Header: res.Header, 8256 } 8257 } 8258 if err != nil { 8259 return nil, err 8260 } 8261 defer googleapi.CloseBody(res) 8262 if err := googleapi.CheckResponse(res); err != nil { 8263 return nil, err 8264 } 8265 ret := &Service{ 8266 ServerResponse: googleapi.ServerResponse{ 8267 Header: res.Header, 8268 HTTPStatusCode: res.StatusCode, 8269 }, 8270 } 8271 target := &ret 8272 if err := gensupport.DecodeResponse(target, res); err != nil { 8273 return nil, err 8274 } 8275 return ret, nil 8276 // { 8277 // "description": "Gets the current configuration of the specified service.", 8278 // "flatPath": "v1/apps/{appsId}/services/{servicesId}", 8279 // "httpMethod": "GET", 8280 // "id": "appengine.apps.services.get", 8281 // "parameterOrder": [ 8282 // "appsId", 8283 // "servicesId" 8284 // ], 8285 // "parameters": { 8286 // "appsId": { 8287 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", 8288 // "location": "path", 8289 // "required": true, 8290 // "type": "string" 8291 // }, 8292 // "servicesId": { 8293 // "description": "Part of `name`. See documentation of `appsId`.", 8294 // "location": "path", 8295 // "required": true, 8296 // "type": "string" 8297 // } 8298 // }, 8299 // "path": "v1/apps/{appsId}/services/{servicesId}", 8300 // "response": { 8301 // "$ref": "Service" 8302 // }, 8303 // "scopes": [ 8304 // "https://www.googleapis.com/auth/appengine.admin", 8305 // "https://www.googleapis.com/auth/cloud-platform", 8306 // "https://www.googleapis.com/auth/cloud-platform.read-only" 8307 // ] 8308 // } 8309 8310} 8311 8312// method id "appengine.apps.services.list": 8313 8314type AppsServicesListCall struct { 8315 s *APIService 8316 appsId string 8317 urlParams_ gensupport.URLParams 8318 ifNoneMatch_ string 8319 ctx_ context.Context 8320 header_ http.Header 8321} 8322 8323// List: Lists all the services in the application. 8324// 8325// - appsId: Part of `parent`. Name of the parent Application resource. 8326// Example: apps/myapp. 8327func (r *AppsServicesService) List(appsId string) *AppsServicesListCall { 8328 c := &AppsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8329 c.appsId = appsId 8330 return c 8331} 8332 8333// PageSize sets the optional parameter "pageSize": Maximum results to 8334// return per page. 8335func (c *AppsServicesListCall) PageSize(pageSize int64) *AppsServicesListCall { 8336 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8337 return c 8338} 8339 8340// PageToken sets the optional parameter "pageToken": Continuation token 8341// for fetching the next page of results. 8342func (c *AppsServicesListCall) PageToken(pageToken string) *AppsServicesListCall { 8343 c.urlParams_.Set("pageToken", pageToken) 8344 return c 8345} 8346 8347// Fields allows partial responses to be retrieved. See 8348// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8349// for more information. 8350func (c *AppsServicesListCall) Fields(s ...googleapi.Field) *AppsServicesListCall { 8351 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8352 return c 8353} 8354 8355// IfNoneMatch sets the optional parameter which makes the operation 8356// fail if the object's ETag matches the given value. This is useful for 8357// getting updates only after the object has changed since the last 8358// request. Use googleapi.IsNotModified to check whether the response 8359// error from Do is the result of In-None-Match. 8360func (c *AppsServicesListCall) IfNoneMatch(entityTag string) *AppsServicesListCall { 8361 c.ifNoneMatch_ = entityTag 8362 return c 8363} 8364 8365// Context sets the context to be used in this call's Do method. Any 8366// pending HTTP request will be aborted if the provided context is 8367// canceled. 8368func (c *AppsServicesListCall) Context(ctx context.Context) *AppsServicesListCall { 8369 c.ctx_ = ctx 8370 return c 8371} 8372 8373// Header returns an http.Header that can be modified by the caller to 8374// add HTTP headers to the request. 8375func (c *AppsServicesListCall) Header() http.Header { 8376 if c.header_ == nil { 8377 c.header_ = make(http.Header) 8378 } 8379 return c.header_ 8380} 8381 8382func (c *AppsServicesListCall) doRequest(alt string) (*http.Response, error) { 8383 reqHeaders := make(http.Header) 8384 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8385 for k, v := range c.header_ { 8386 reqHeaders[k] = v 8387 } 8388 reqHeaders.Set("User-Agent", c.s.userAgent()) 8389 if c.ifNoneMatch_ != "" { 8390 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8391 } 8392 var body io.Reader = nil 8393 c.urlParams_.Set("alt", alt) 8394 c.urlParams_.Set("prettyPrint", "false") 8395 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services") 8396 urls += "?" + c.urlParams_.Encode() 8397 req, err := http.NewRequest("GET", urls, body) 8398 if err != nil { 8399 return nil, err 8400 } 8401 req.Header = reqHeaders 8402 googleapi.Expand(req.URL, map[string]string{ 8403 "appsId": c.appsId, 8404 }) 8405 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8406} 8407 8408// Do executes the "appengine.apps.services.list" call. 8409// Exactly one of *ListServicesResponse or error will be non-nil. Any 8410// non-2xx status code is an error. Response headers are in either 8411// *ListServicesResponse.ServerResponse.Header or (if a response was 8412// returned at all) in error.(*googleapi.Error).Header. Use 8413// googleapi.IsNotModified to check whether the returned error was 8414// because http.StatusNotModified was returned. 8415func (c *AppsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) { 8416 gensupport.SetOptions(c.urlParams_, opts...) 8417 res, err := c.doRequest("json") 8418 if res != nil && res.StatusCode == http.StatusNotModified { 8419 if res.Body != nil { 8420 res.Body.Close() 8421 } 8422 return nil, &googleapi.Error{ 8423 Code: res.StatusCode, 8424 Header: res.Header, 8425 } 8426 } 8427 if err != nil { 8428 return nil, err 8429 } 8430 defer googleapi.CloseBody(res) 8431 if err := googleapi.CheckResponse(res); err != nil { 8432 return nil, err 8433 } 8434 ret := &ListServicesResponse{ 8435 ServerResponse: googleapi.ServerResponse{ 8436 Header: res.Header, 8437 HTTPStatusCode: res.StatusCode, 8438 }, 8439 } 8440 target := &ret 8441 if err := gensupport.DecodeResponse(target, res); err != nil { 8442 return nil, err 8443 } 8444 return ret, nil 8445 // { 8446 // "description": "Lists all the services in the application.", 8447 // "flatPath": "v1/apps/{appsId}/services", 8448 // "httpMethod": "GET", 8449 // "id": "appengine.apps.services.list", 8450 // "parameterOrder": [ 8451 // "appsId" 8452 // ], 8453 // "parameters": { 8454 // "appsId": { 8455 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 8456 // "location": "path", 8457 // "required": true, 8458 // "type": "string" 8459 // }, 8460 // "pageSize": { 8461 // "description": "Maximum results to return per page.", 8462 // "format": "int32", 8463 // "location": "query", 8464 // "type": "integer" 8465 // }, 8466 // "pageToken": { 8467 // "description": "Continuation token for fetching the next page of results.", 8468 // "location": "query", 8469 // "type": "string" 8470 // } 8471 // }, 8472 // "path": "v1/apps/{appsId}/services", 8473 // "response": { 8474 // "$ref": "ListServicesResponse" 8475 // }, 8476 // "scopes": [ 8477 // "https://www.googleapis.com/auth/appengine.admin", 8478 // "https://www.googleapis.com/auth/cloud-platform", 8479 // "https://www.googleapis.com/auth/cloud-platform.read-only" 8480 // ] 8481 // } 8482 8483} 8484 8485// Pages invokes f for each page of results. 8486// A non-nil error returned from f will halt the iteration. 8487// The provided context supersedes any context provided to the Context method. 8488func (c *AppsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error { 8489 c.ctx_ = ctx 8490 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8491 for { 8492 x, err := c.Do() 8493 if err != nil { 8494 return err 8495 } 8496 if err := f(x); err != nil { 8497 return err 8498 } 8499 if x.NextPageToken == "" { 8500 return nil 8501 } 8502 c.PageToken(x.NextPageToken) 8503 } 8504} 8505 8506// method id "appengine.apps.services.patch": 8507 8508type AppsServicesPatchCall struct { 8509 s *APIService 8510 appsId string 8511 servicesId string 8512 service *Service 8513 urlParams_ gensupport.URLParams 8514 ctx_ context.Context 8515 header_ http.Header 8516} 8517 8518// Patch: Updates the configuration of the specified service. 8519// 8520// - appsId: Part of `name`. Name of the resource to update. Example: 8521// apps/myapp/services/default. 8522// - servicesId: Part of `name`. See documentation of `appsId`. 8523func (r *AppsServicesService) Patch(appsId string, servicesId string, service *Service) *AppsServicesPatchCall { 8524 c := &AppsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8525 c.appsId = appsId 8526 c.servicesId = servicesId 8527 c.service = service 8528 return c 8529} 8530 8531// MigrateTraffic sets the optional parameter "migrateTraffic": Set to 8532// true to gradually shift traffic to one or more versions that you 8533// specify. By default, traffic is shifted immediately. For gradual 8534// traffic migration, the target versions must be located within 8535// instances that are configured for both warmup requests 8536// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) 8537// and automatic scaling 8538// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). 8539// You must specify the shardBy 8540// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) 8541// field in the Service resource. Gradual traffic migration is not 8542// supported in the App Engine flexible environment. For examples, see 8543// Migrating and Splitting Traffic 8544// (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). 8545func (c *AppsServicesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsServicesPatchCall { 8546 c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic)) 8547 return c 8548} 8549 8550// UpdateMask sets the optional parameter "updateMask": Required. 8551// Standard field mask for the set of fields to be updated. 8552func (c *AppsServicesPatchCall) UpdateMask(updateMask string) *AppsServicesPatchCall { 8553 c.urlParams_.Set("updateMask", updateMask) 8554 return c 8555} 8556 8557// Fields allows partial responses to be retrieved. See 8558// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8559// for more information. 8560func (c *AppsServicesPatchCall) Fields(s ...googleapi.Field) *AppsServicesPatchCall { 8561 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8562 return c 8563} 8564 8565// Context sets the context to be used in this call's Do method. Any 8566// pending HTTP request will be aborted if the provided context is 8567// canceled. 8568func (c *AppsServicesPatchCall) Context(ctx context.Context) *AppsServicesPatchCall { 8569 c.ctx_ = ctx 8570 return c 8571} 8572 8573// Header returns an http.Header that can be modified by the caller to 8574// add HTTP headers to the request. 8575func (c *AppsServicesPatchCall) Header() http.Header { 8576 if c.header_ == nil { 8577 c.header_ = make(http.Header) 8578 } 8579 return c.header_ 8580} 8581 8582func (c *AppsServicesPatchCall) doRequest(alt string) (*http.Response, error) { 8583 reqHeaders := make(http.Header) 8584 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8585 for k, v := range c.header_ { 8586 reqHeaders[k] = v 8587 } 8588 reqHeaders.Set("User-Agent", c.s.userAgent()) 8589 var body io.Reader = nil 8590 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) 8591 if err != nil { 8592 return nil, err 8593 } 8594 reqHeaders.Set("Content-Type", "application/json") 8595 c.urlParams_.Set("alt", alt) 8596 c.urlParams_.Set("prettyPrint", "false") 8597 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}") 8598 urls += "?" + c.urlParams_.Encode() 8599 req, err := http.NewRequest("PATCH", urls, body) 8600 if err != nil { 8601 return nil, err 8602 } 8603 req.Header = reqHeaders 8604 googleapi.Expand(req.URL, map[string]string{ 8605 "appsId": c.appsId, 8606 "servicesId": c.servicesId, 8607 }) 8608 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8609} 8610 8611// Do executes the "appengine.apps.services.patch" call. 8612// Exactly one of *Operation or error will be non-nil. Any non-2xx 8613// status code is an error. Response headers are in either 8614// *Operation.ServerResponse.Header or (if a response was returned at 8615// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8616// to check whether the returned error was because 8617// http.StatusNotModified was returned. 8618func (c *AppsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8619 gensupport.SetOptions(c.urlParams_, opts...) 8620 res, err := c.doRequest("json") 8621 if res != nil && res.StatusCode == http.StatusNotModified { 8622 if res.Body != nil { 8623 res.Body.Close() 8624 } 8625 return nil, &googleapi.Error{ 8626 Code: res.StatusCode, 8627 Header: res.Header, 8628 } 8629 } 8630 if err != nil { 8631 return nil, err 8632 } 8633 defer googleapi.CloseBody(res) 8634 if err := googleapi.CheckResponse(res); err != nil { 8635 return nil, err 8636 } 8637 ret := &Operation{ 8638 ServerResponse: googleapi.ServerResponse{ 8639 Header: res.Header, 8640 HTTPStatusCode: res.StatusCode, 8641 }, 8642 } 8643 target := &ret 8644 if err := gensupport.DecodeResponse(target, res); err != nil { 8645 return nil, err 8646 } 8647 return ret, nil 8648 // { 8649 // "description": "Updates the configuration of the specified service.", 8650 // "flatPath": "v1/apps/{appsId}/services/{servicesId}", 8651 // "httpMethod": "PATCH", 8652 // "id": "appengine.apps.services.patch", 8653 // "parameterOrder": [ 8654 // "appsId", 8655 // "servicesId" 8656 // ], 8657 // "parameters": { 8658 // "appsId": { 8659 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", 8660 // "location": "path", 8661 // "required": true, 8662 // "type": "string" 8663 // }, 8664 // "migrateTraffic": { 8665 // "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).", 8666 // "location": "query", 8667 // "type": "boolean" 8668 // }, 8669 // "servicesId": { 8670 // "description": "Part of `name`. See documentation of `appsId`.", 8671 // "location": "path", 8672 // "required": true, 8673 // "type": "string" 8674 // }, 8675 // "updateMask": { 8676 // "description": "Required. Standard field mask for the set of fields to be updated.", 8677 // "format": "google-fieldmask", 8678 // "location": "query", 8679 // "type": "string" 8680 // } 8681 // }, 8682 // "path": "v1/apps/{appsId}/services/{servicesId}", 8683 // "request": { 8684 // "$ref": "Service" 8685 // }, 8686 // "response": { 8687 // "$ref": "Operation" 8688 // }, 8689 // "scopes": [ 8690 // "https://www.googleapis.com/auth/cloud-platform" 8691 // ] 8692 // } 8693 8694} 8695 8696// method id "appengine.apps.services.versions.create": 8697 8698type AppsServicesVersionsCreateCall struct { 8699 s *APIService 8700 appsId string 8701 servicesId string 8702 version *Version 8703 urlParams_ gensupport.URLParams 8704 ctx_ context.Context 8705 header_ http.Header 8706} 8707 8708// Create: Deploys code and resource files to a new version. 8709// 8710// - appsId: Part of `parent`. Name of the parent resource to create 8711// this version under. Example: apps/myapp/services/default. 8712// - servicesId: Part of `parent`. See documentation of `appsId`. 8713func (r *AppsServicesVersionsService) Create(appsId string, servicesId string, version *Version) *AppsServicesVersionsCreateCall { 8714 c := &AppsServicesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8715 c.appsId = appsId 8716 c.servicesId = servicesId 8717 c.version = version 8718 return c 8719} 8720 8721// Fields allows partial responses to be retrieved. See 8722// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8723// for more information. 8724func (c *AppsServicesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsServicesVersionsCreateCall { 8725 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8726 return c 8727} 8728 8729// Context sets the context to be used in this call's Do method. Any 8730// pending HTTP request will be aborted if the provided context is 8731// canceled. 8732func (c *AppsServicesVersionsCreateCall) Context(ctx context.Context) *AppsServicesVersionsCreateCall { 8733 c.ctx_ = ctx 8734 return c 8735} 8736 8737// Header returns an http.Header that can be modified by the caller to 8738// add HTTP headers to the request. 8739func (c *AppsServicesVersionsCreateCall) Header() http.Header { 8740 if c.header_ == nil { 8741 c.header_ = make(http.Header) 8742 } 8743 return c.header_ 8744} 8745 8746func (c *AppsServicesVersionsCreateCall) doRequest(alt string) (*http.Response, error) { 8747 reqHeaders := make(http.Header) 8748 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8749 for k, v := range c.header_ { 8750 reqHeaders[k] = v 8751 } 8752 reqHeaders.Set("User-Agent", c.s.userAgent()) 8753 var body io.Reader = nil 8754 body, err := googleapi.WithoutDataWrapper.JSONReader(c.version) 8755 if err != nil { 8756 return nil, err 8757 } 8758 reqHeaders.Set("Content-Type", "application/json") 8759 c.urlParams_.Set("alt", alt) 8760 c.urlParams_.Set("prettyPrint", "false") 8761 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions") 8762 urls += "?" + c.urlParams_.Encode() 8763 req, err := http.NewRequest("POST", urls, body) 8764 if err != nil { 8765 return nil, err 8766 } 8767 req.Header = reqHeaders 8768 googleapi.Expand(req.URL, map[string]string{ 8769 "appsId": c.appsId, 8770 "servicesId": c.servicesId, 8771 }) 8772 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8773} 8774 8775// Do executes the "appengine.apps.services.versions.create" call. 8776// Exactly one of *Operation or error will be non-nil. Any non-2xx 8777// status code is an error. Response headers are in either 8778// *Operation.ServerResponse.Header or (if a response was returned at 8779// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8780// to check whether the returned error was because 8781// http.StatusNotModified was returned. 8782func (c *AppsServicesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8783 gensupport.SetOptions(c.urlParams_, opts...) 8784 res, err := c.doRequest("json") 8785 if res != nil && res.StatusCode == http.StatusNotModified { 8786 if res.Body != nil { 8787 res.Body.Close() 8788 } 8789 return nil, &googleapi.Error{ 8790 Code: res.StatusCode, 8791 Header: res.Header, 8792 } 8793 } 8794 if err != nil { 8795 return nil, err 8796 } 8797 defer googleapi.CloseBody(res) 8798 if err := googleapi.CheckResponse(res); err != nil { 8799 return nil, err 8800 } 8801 ret := &Operation{ 8802 ServerResponse: googleapi.ServerResponse{ 8803 Header: res.Header, 8804 HTTPStatusCode: res.StatusCode, 8805 }, 8806 } 8807 target := &ret 8808 if err := gensupport.DecodeResponse(target, res); err != nil { 8809 return nil, err 8810 } 8811 return ret, nil 8812 // { 8813 // "description": "Deploys code and resource files to a new version.", 8814 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions", 8815 // "httpMethod": "POST", 8816 // "id": "appengine.apps.services.versions.create", 8817 // "parameterOrder": [ 8818 // "appsId", 8819 // "servicesId" 8820 // ], 8821 // "parameters": { 8822 // "appsId": { 8823 // "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", 8824 // "location": "path", 8825 // "required": true, 8826 // "type": "string" 8827 // }, 8828 // "servicesId": { 8829 // "description": "Part of `parent`. See documentation of `appsId`.", 8830 // "location": "path", 8831 // "required": true, 8832 // "type": "string" 8833 // } 8834 // }, 8835 // "path": "v1/apps/{appsId}/services/{servicesId}/versions", 8836 // "request": { 8837 // "$ref": "Version" 8838 // }, 8839 // "response": { 8840 // "$ref": "Operation" 8841 // }, 8842 // "scopes": [ 8843 // "https://www.googleapis.com/auth/cloud-platform" 8844 // ] 8845 // } 8846 8847} 8848 8849// method id "appengine.apps.services.versions.delete": 8850 8851type AppsServicesVersionsDeleteCall struct { 8852 s *APIService 8853 appsId string 8854 servicesId string 8855 versionsId string 8856 urlParams_ gensupport.URLParams 8857 ctx_ context.Context 8858 header_ http.Header 8859} 8860 8861// Delete: Deletes an existing Version resource. 8862// 8863// - appsId: Part of `name`. Name of the resource requested. Example: 8864// apps/myapp/services/default/versions/v1. 8865// - servicesId: Part of `name`. See documentation of `appsId`. 8866// - versionsId: Part of `name`. See documentation of `appsId`. 8867func (r *AppsServicesVersionsService) Delete(appsId string, servicesId string, versionsId string) *AppsServicesVersionsDeleteCall { 8868 c := &AppsServicesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8869 c.appsId = appsId 8870 c.servicesId = servicesId 8871 c.versionsId = versionsId 8872 return c 8873} 8874 8875// Fields allows partial responses to be retrieved. See 8876// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8877// for more information. 8878func (c *AppsServicesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsDeleteCall { 8879 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8880 return c 8881} 8882 8883// Context sets the context to be used in this call's Do method. Any 8884// pending HTTP request will be aborted if the provided context is 8885// canceled. 8886func (c *AppsServicesVersionsDeleteCall) Context(ctx context.Context) *AppsServicesVersionsDeleteCall { 8887 c.ctx_ = ctx 8888 return c 8889} 8890 8891// Header returns an http.Header that can be modified by the caller to 8892// add HTTP headers to the request. 8893func (c *AppsServicesVersionsDeleteCall) Header() http.Header { 8894 if c.header_ == nil { 8895 c.header_ = make(http.Header) 8896 } 8897 return c.header_ 8898} 8899 8900func (c *AppsServicesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { 8901 reqHeaders := make(http.Header) 8902 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8903 for k, v := range c.header_ { 8904 reqHeaders[k] = v 8905 } 8906 reqHeaders.Set("User-Agent", c.s.userAgent()) 8907 var body io.Reader = nil 8908 c.urlParams_.Set("alt", alt) 8909 c.urlParams_.Set("prettyPrint", "false") 8910 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 8911 urls += "?" + c.urlParams_.Encode() 8912 req, err := http.NewRequest("DELETE", urls, body) 8913 if err != nil { 8914 return nil, err 8915 } 8916 req.Header = reqHeaders 8917 googleapi.Expand(req.URL, map[string]string{ 8918 "appsId": c.appsId, 8919 "servicesId": c.servicesId, 8920 "versionsId": c.versionsId, 8921 }) 8922 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8923} 8924 8925// Do executes the "appengine.apps.services.versions.delete" call. 8926// Exactly one of *Operation or error will be non-nil. Any non-2xx 8927// status code is an error. Response headers are in either 8928// *Operation.ServerResponse.Header or (if a response was returned at 8929// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8930// to check whether the returned error was because 8931// http.StatusNotModified was returned. 8932func (c *AppsServicesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8933 gensupport.SetOptions(c.urlParams_, opts...) 8934 res, err := c.doRequest("json") 8935 if res != nil && res.StatusCode == http.StatusNotModified { 8936 if res.Body != nil { 8937 res.Body.Close() 8938 } 8939 return nil, &googleapi.Error{ 8940 Code: res.StatusCode, 8941 Header: res.Header, 8942 } 8943 } 8944 if err != nil { 8945 return nil, err 8946 } 8947 defer googleapi.CloseBody(res) 8948 if err := googleapi.CheckResponse(res); err != nil { 8949 return nil, err 8950 } 8951 ret := &Operation{ 8952 ServerResponse: googleapi.ServerResponse{ 8953 Header: res.Header, 8954 HTTPStatusCode: res.StatusCode, 8955 }, 8956 } 8957 target := &ret 8958 if err := gensupport.DecodeResponse(target, res); err != nil { 8959 return nil, err 8960 } 8961 return ret, nil 8962 // { 8963 // "description": "Deletes an existing Version resource.", 8964 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 8965 // "httpMethod": "DELETE", 8966 // "id": "appengine.apps.services.versions.delete", 8967 // "parameterOrder": [ 8968 // "appsId", 8969 // "servicesId", 8970 // "versionsId" 8971 // ], 8972 // "parameters": { 8973 // "appsId": { 8974 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", 8975 // "location": "path", 8976 // "required": true, 8977 // "type": "string" 8978 // }, 8979 // "servicesId": { 8980 // "description": "Part of `name`. See documentation of `appsId`.", 8981 // "location": "path", 8982 // "required": true, 8983 // "type": "string" 8984 // }, 8985 // "versionsId": { 8986 // "description": "Part of `name`. See documentation of `appsId`.", 8987 // "location": "path", 8988 // "required": true, 8989 // "type": "string" 8990 // } 8991 // }, 8992 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 8993 // "response": { 8994 // "$ref": "Operation" 8995 // }, 8996 // "scopes": [ 8997 // "https://www.googleapis.com/auth/cloud-platform" 8998 // ] 8999 // } 9000 9001} 9002 9003// method id "appengine.apps.services.versions.get": 9004 9005type AppsServicesVersionsGetCall struct { 9006 s *APIService 9007 appsId string 9008 servicesId string 9009 versionsId string 9010 urlParams_ gensupport.URLParams 9011 ifNoneMatch_ string 9012 ctx_ context.Context 9013 header_ http.Header 9014} 9015 9016// Get: Gets the specified Version resource. By default, only a 9017// BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get 9018// the full resource. 9019// 9020// - appsId: Part of `name`. Name of the resource requested. Example: 9021// apps/myapp/services/default/versions/v1. 9022// - servicesId: Part of `name`. See documentation of `appsId`. 9023// - versionsId: Part of `name`. See documentation of `appsId`. 9024func (r *AppsServicesVersionsService) Get(appsId string, servicesId string, versionsId string) *AppsServicesVersionsGetCall { 9025 c := &AppsServicesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9026 c.appsId = appsId 9027 c.servicesId = servicesId 9028 c.versionsId = versionsId 9029 return c 9030} 9031 9032// View sets the optional parameter "view": Controls the set of fields 9033// returned in the Get response. 9034// 9035// Possible values: 9036// "BASIC" - Basic version information including scaling and inbound 9037// services, but not detailed deployment information. 9038// "FULL" - The information from BASIC, plus detailed information 9039// about the deployment. This format is required when creating 9040// resources, but is not returned in Get or List by default. 9041func (c *AppsServicesVersionsGetCall) View(view string) *AppsServicesVersionsGetCall { 9042 c.urlParams_.Set("view", view) 9043 return c 9044} 9045 9046// Fields allows partial responses to be retrieved. See 9047// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9048// for more information. 9049func (c *AppsServicesVersionsGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsGetCall { 9050 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9051 return c 9052} 9053 9054// IfNoneMatch sets the optional parameter which makes the operation 9055// fail if the object's ETag matches the given value. This is useful for 9056// getting updates only after the object has changed since the last 9057// request. Use googleapi.IsNotModified to check whether the response 9058// error from Do is the result of In-None-Match. 9059func (c *AppsServicesVersionsGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsGetCall { 9060 c.ifNoneMatch_ = entityTag 9061 return c 9062} 9063 9064// Context sets the context to be used in this call's Do method. Any 9065// pending HTTP request will be aborted if the provided context is 9066// canceled. 9067func (c *AppsServicesVersionsGetCall) Context(ctx context.Context) *AppsServicesVersionsGetCall { 9068 c.ctx_ = ctx 9069 return c 9070} 9071 9072// Header returns an http.Header that can be modified by the caller to 9073// add HTTP headers to the request. 9074func (c *AppsServicesVersionsGetCall) Header() http.Header { 9075 if c.header_ == nil { 9076 c.header_ = make(http.Header) 9077 } 9078 return c.header_ 9079} 9080 9081func (c *AppsServicesVersionsGetCall) doRequest(alt string) (*http.Response, error) { 9082 reqHeaders := make(http.Header) 9083 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9084 for k, v := range c.header_ { 9085 reqHeaders[k] = v 9086 } 9087 reqHeaders.Set("User-Agent", c.s.userAgent()) 9088 if c.ifNoneMatch_ != "" { 9089 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9090 } 9091 var body io.Reader = nil 9092 c.urlParams_.Set("alt", alt) 9093 c.urlParams_.Set("prettyPrint", "false") 9094 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 9095 urls += "?" + c.urlParams_.Encode() 9096 req, err := http.NewRequest("GET", urls, body) 9097 if err != nil { 9098 return nil, err 9099 } 9100 req.Header = reqHeaders 9101 googleapi.Expand(req.URL, map[string]string{ 9102 "appsId": c.appsId, 9103 "servicesId": c.servicesId, 9104 "versionsId": c.versionsId, 9105 }) 9106 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9107} 9108 9109// Do executes the "appengine.apps.services.versions.get" call. 9110// Exactly one of *Version or error will be non-nil. Any non-2xx status 9111// code is an error. Response headers are in either 9112// *Version.ServerResponse.Header or (if a response was returned at all) 9113// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9114// check whether the returned error was because http.StatusNotModified 9115// was returned. 9116func (c *AppsServicesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) { 9117 gensupport.SetOptions(c.urlParams_, opts...) 9118 res, err := c.doRequest("json") 9119 if res != nil && res.StatusCode == http.StatusNotModified { 9120 if res.Body != nil { 9121 res.Body.Close() 9122 } 9123 return nil, &googleapi.Error{ 9124 Code: res.StatusCode, 9125 Header: res.Header, 9126 } 9127 } 9128 if err != nil { 9129 return nil, err 9130 } 9131 defer googleapi.CloseBody(res) 9132 if err := googleapi.CheckResponse(res); err != nil { 9133 return nil, err 9134 } 9135 ret := &Version{ 9136 ServerResponse: googleapi.ServerResponse{ 9137 Header: res.Header, 9138 HTTPStatusCode: res.StatusCode, 9139 }, 9140 } 9141 target := &ret 9142 if err := gensupport.DecodeResponse(target, res); err != nil { 9143 return nil, err 9144 } 9145 return ret, nil 9146 // { 9147 // "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.", 9148 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9149 // "httpMethod": "GET", 9150 // "id": "appengine.apps.services.versions.get", 9151 // "parameterOrder": [ 9152 // "appsId", 9153 // "servicesId", 9154 // "versionsId" 9155 // ], 9156 // "parameters": { 9157 // "appsId": { 9158 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", 9159 // "location": "path", 9160 // "required": true, 9161 // "type": "string" 9162 // }, 9163 // "servicesId": { 9164 // "description": "Part of `name`. See documentation of `appsId`.", 9165 // "location": "path", 9166 // "required": true, 9167 // "type": "string" 9168 // }, 9169 // "versionsId": { 9170 // "description": "Part of `name`. See documentation of `appsId`.", 9171 // "location": "path", 9172 // "required": true, 9173 // "type": "string" 9174 // }, 9175 // "view": { 9176 // "description": "Controls the set of fields returned in the Get response.", 9177 // "enum": [ 9178 // "BASIC", 9179 // "FULL" 9180 // ], 9181 // "enumDescriptions": [ 9182 // "Basic version information including scaling and inbound services, but not detailed deployment information.", 9183 // "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." 9184 // ], 9185 // "location": "query", 9186 // "type": "string" 9187 // } 9188 // }, 9189 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9190 // "response": { 9191 // "$ref": "Version" 9192 // }, 9193 // "scopes": [ 9194 // "https://www.googleapis.com/auth/appengine.admin", 9195 // "https://www.googleapis.com/auth/cloud-platform", 9196 // "https://www.googleapis.com/auth/cloud-platform.read-only" 9197 // ] 9198 // } 9199 9200} 9201 9202// method id "appengine.apps.services.versions.list": 9203 9204type AppsServicesVersionsListCall struct { 9205 s *APIService 9206 appsId string 9207 servicesId string 9208 urlParams_ gensupport.URLParams 9209 ifNoneMatch_ string 9210 ctx_ context.Context 9211 header_ http.Header 9212} 9213 9214// List: Lists the versions of a service. 9215// 9216// - appsId: Part of `parent`. Name of the parent Service resource. 9217// Example: apps/myapp/services/default. 9218// - servicesId: Part of `parent`. See documentation of `appsId`. 9219func (r *AppsServicesVersionsService) List(appsId string, servicesId string) *AppsServicesVersionsListCall { 9220 c := &AppsServicesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9221 c.appsId = appsId 9222 c.servicesId = servicesId 9223 return c 9224} 9225 9226// PageSize sets the optional parameter "pageSize": Maximum results to 9227// return per page. 9228func (c *AppsServicesVersionsListCall) PageSize(pageSize int64) *AppsServicesVersionsListCall { 9229 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9230 return c 9231} 9232 9233// PageToken sets the optional parameter "pageToken": Continuation token 9234// for fetching the next page of results. 9235func (c *AppsServicesVersionsListCall) PageToken(pageToken string) *AppsServicesVersionsListCall { 9236 c.urlParams_.Set("pageToken", pageToken) 9237 return c 9238} 9239 9240// View sets the optional parameter "view": Controls the set of fields 9241// returned in the List response. 9242// 9243// Possible values: 9244// "BASIC" - Basic version information including scaling and inbound 9245// services, but not detailed deployment information. 9246// "FULL" - The information from BASIC, plus detailed information 9247// about the deployment. This format is required when creating 9248// resources, but is not returned in Get or List by default. 9249func (c *AppsServicesVersionsListCall) View(view string) *AppsServicesVersionsListCall { 9250 c.urlParams_.Set("view", view) 9251 return c 9252} 9253 9254// Fields allows partial responses to be retrieved. See 9255// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9256// for more information. 9257func (c *AppsServicesVersionsListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsListCall { 9258 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9259 return c 9260} 9261 9262// IfNoneMatch sets the optional parameter which makes the operation 9263// fail if the object's ETag matches the given value. This is useful for 9264// getting updates only after the object has changed since the last 9265// request. Use googleapi.IsNotModified to check whether the response 9266// error from Do is the result of In-None-Match. 9267func (c *AppsServicesVersionsListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsListCall { 9268 c.ifNoneMatch_ = entityTag 9269 return c 9270} 9271 9272// Context sets the context to be used in this call's Do method. Any 9273// pending HTTP request will be aborted if the provided context is 9274// canceled. 9275func (c *AppsServicesVersionsListCall) Context(ctx context.Context) *AppsServicesVersionsListCall { 9276 c.ctx_ = ctx 9277 return c 9278} 9279 9280// Header returns an http.Header that can be modified by the caller to 9281// add HTTP headers to the request. 9282func (c *AppsServicesVersionsListCall) Header() http.Header { 9283 if c.header_ == nil { 9284 c.header_ = make(http.Header) 9285 } 9286 return c.header_ 9287} 9288 9289func (c *AppsServicesVersionsListCall) doRequest(alt string) (*http.Response, error) { 9290 reqHeaders := make(http.Header) 9291 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9292 for k, v := range c.header_ { 9293 reqHeaders[k] = v 9294 } 9295 reqHeaders.Set("User-Agent", c.s.userAgent()) 9296 if c.ifNoneMatch_ != "" { 9297 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9298 } 9299 var body io.Reader = nil 9300 c.urlParams_.Set("alt", alt) 9301 c.urlParams_.Set("prettyPrint", "false") 9302 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions") 9303 urls += "?" + c.urlParams_.Encode() 9304 req, err := http.NewRequest("GET", urls, body) 9305 if err != nil { 9306 return nil, err 9307 } 9308 req.Header = reqHeaders 9309 googleapi.Expand(req.URL, map[string]string{ 9310 "appsId": c.appsId, 9311 "servicesId": c.servicesId, 9312 }) 9313 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9314} 9315 9316// Do executes the "appengine.apps.services.versions.list" call. 9317// Exactly one of *ListVersionsResponse or error will be non-nil. Any 9318// non-2xx status code is an error. Response headers are in either 9319// *ListVersionsResponse.ServerResponse.Header or (if a response was 9320// returned at all) in error.(*googleapi.Error).Header. Use 9321// googleapi.IsNotModified to check whether the returned error was 9322// because http.StatusNotModified was returned. 9323func (c *AppsServicesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) { 9324 gensupport.SetOptions(c.urlParams_, opts...) 9325 res, err := c.doRequest("json") 9326 if res != nil && res.StatusCode == http.StatusNotModified { 9327 if res.Body != nil { 9328 res.Body.Close() 9329 } 9330 return nil, &googleapi.Error{ 9331 Code: res.StatusCode, 9332 Header: res.Header, 9333 } 9334 } 9335 if err != nil { 9336 return nil, err 9337 } 9338 defer googleapi.CloseBody(res) 9339 if err := googleapi.CheckResponse(res); err != nil { 9340 return nil, err 9341 } 9342 ret := &ListVersionsResponse{ 9343 ServerResponse: googleapi.ServerResponse{ 9344 Header: res.Header, 9345 HTTPStatusCode: res.StatusCode, 9346 }, 9347 } 9348 target := &ret 9349 if err := gensupport.DecodeResponse(target, res); err != nil { 9350 return nil, err 9351 } 9352 return ret, nil 9353 // { 9354 // "description": "Lists the versions of a service.", 9355 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions", 9356 // "httpMethod": "GET", 9357 // "id": "appengine.apps.services.versions.list", 9358 // "parameterOrder": [ 9359 // "appsId", 9360 // "servicesId" 9361 // ], 9362 // "parameters": { 9363 // "appsId": { 9364 // "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.", 9365 // "location": "path", 9366 // "required": true, 9367 // "type": "string" 9368 // }, 9369 // "pageSize": { 9370 // "description": "Maximum results to return per page.", 9371 // "format": "int32", 9372 // "location": "query", 9373 // "type": "integer" 9374 // }, 9375 // "pageToken": { 9376 // "description": "Continuation token for fetching the next page of results.", 9377 // "location": "query", 9378 // "type": "string" 9379 // }, 9380 // "servicesId": { 9381 // "description": "Part of `parent`. See documentation of `appsId`.", 9382 // "location": "path", 9383 // "required": true, 9384 // "type": "string" 9385 // }, 9386 // "view": { 9387 // "description": "Controls the set of fields returned in the List response.", 9388 // "enum": [ 9389 // "BASIC", 9390 // "FULL" 9391 // ], 9392 // "enumDescriptions": [ 9393 // "Basic version information including scaling and inbound services, but not detailed deployment information.", 9394 // "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." 9395 // ], 9396 // "location": "query", 9397 // "type": "string" 9398 // } 9399 // }, 9400 // "path": "v1/apps/{appsId}/services/{servicesId}/versions", 9401 // "response": { 9402 // "$ref": "ListVersionsResponse" 9403 // }, 9404 // "scopes": [ 9405 // "https://www.googleapis.com/auth/appengine.admin", 9406 // "https://www.googleapis.com/auth/cloud-platform", 9407 // "https://www.googleapis.com/auth/cloud-platform.read-only" 9408 // ] 9409 // } 9410 9411} 9412 9413// Pages invokes f for each page of results. 9414// A non-nil error returned from f will halt the iteration. 9415// The provided context supersedes any context provided to the Context method. 9416func (c *AppsServicesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error { 9417 c.ctx_ = ctx 9418 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9419 for { 9420 x, err := c.Do() 9421 if err != nil { 9422 return err 9423 } 9424 if err := f(x); err != nil { 9425 return err 9426 } 9427 if x.NextPageToken == "" { 9428 return nil 9429 } 9430 c.PageToken(x.NextPageToken) 9431 } 9432} 9433 9434// method id "appengine.apps.services.versions.patch": 9435 9436type AppsServicesVersionsPatchCall struct { 9437 s *APIService 9438 appsId string 9439 servicesId string 9440 versionsId string 9441 version *Version 9442 urlParams_ gensupport.URLParams 9443 ctx_ context.Context 9444 header_ http.Header 9445} 9446 9447// Patch: Updates the specified Version resource. You can specify the 9448// following fields depending on the App Engine environment and type of 9449// scaling that the version resource uses:Standard environment 9450// instance_class 9451// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)automatic 9452// scaling in the standard environment: 9453// automatic_scaling.min_idle_instances 9454// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) 9455// automatic_scaling.max_idle_instances 9456// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) 9457// automaticScaling.standard_scheduler_settings.max_instances 9458// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) 9459// automaticScaling.standard_scheduler_settings.min_instances 9460// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) 9461// automaticScaling.standard_scheduler_settings.target_cpu_utilization 9462// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) 9463// automaticScaling.standard_scheduler_settings.target_throughput_utiliza 9464// tion 9465// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)basic 9466// scaling or manual scaling in the standard environment: serving_status 9467// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) 9468// manual_scaling.instances 9469// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)Flexible 9470// environment serving_status 9471// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)automatic 9472// scaling in the flexible environment: 9473// automatic_scaling.min_total_instances 9474// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) 9475// automatic_scaling.max_total_instances 9476// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) 9477// automatic_scaling.cool_down_period_sec 9478// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) 9479// automatic_scaling.cpu_utilization.target_utilization 9480// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)manual 9481// scaling in the flexible environment: manual_scaling.instances 9482// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) 9483// 9484// - appsId: Part of `name`. Name of the resource to update. Example: 9485// apps/myapp/services/default/versions/1. 9486// - servicesId: Part of `name`. See documentation of `appsId`. 9487// - versionsId: Part of `name`. See documentation of `appsId`. 9488func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall { 9489 c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9490 c.appsId = appsId 9491 c.servicesId = servicesId 9492 c.versionsId = versionsId 9493 c.version = version 9494 return c 9495} 9496 9497// UpdateMask sets the optional parameter "updateMask": Standard field 9498// mask for the set of fields to be updated. 9499func (c *AppsServicesVersionsPatchCall) UpdateMask(updateMask string) *AppsServicesVersionsPatchCall { 9500 c.urlParams_.Set("updateMask", updateMask) 9501 return c 9502} 9503 9504// Fields allows partial responses to be retrieved. See 9505// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9506// for more information. 9507func (c *AppsServicesVersionsPatchCall) Fields(s ...googleapi.Field) *AppsServicesVersionsPatchCall { 9508 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9509 return c 9510} 9511 9512// Context sets the context to be used in this call's Do method. Any 9513// pending HTTP request will be aborted if the provided context is 9514// canceled. 9515func (c *AppsServicesVersionsPatchCall) Context(ctx context.Context) *AppsServicesVersionsPatchCall { 9516 c.ctx_ = ctx 9517 return c 9518} 9519 9520// Header returns an http.Header that can be modified by the caller to 9521// add HTTP headers to the request. 9522func (c *AppsServicesVersionsPatchCall) Header() http.Header { 9523 if c.header_ == nil { 9524 c.header_ = make(http.Header) 9525 } 9526 return c.header_ 9527} 9528 9529func (c *AppsServicesVersionsPatchCall) doRequest(alt string) (*http.Response, error) { 9530 reqHeaders := make(http.Header) 9531 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9532 for k, v := range c.header_ { 9533 reqHeaders[k] = v 9534 } 9535 reqHeaders.Set("User-Agent", c.s.userAgent()) 9536 var body io.Reader = nil 9537 body, err := googleapi.WithoutDataWrapper.JSONReader(c.version) 9538 if err != nil { 9539 return nil, err 9540 } 9541 reqHeaders.Set("Content-Type", "application/json") 9542 c.urlParams_.Set("alt", alt) 9543 c.urlParams_.Set("prettyPrint", "false") 9544 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 9545 urls += "?" + c.urlParams_.Encode() 9546 req, err := http.NewRequest("PATCH", urls, body) 9547 if err != nil { 9548 return nil, err 9549 } 9550 req.Header = reqHeaders 9551 googleapi.Expand(req.URL, map[string]string{ 9552 "appsId": c.appsId, 9553 "servicesId": c.servicesId, 9554 "versionsId": c.versionsId, 9555 }) 9556 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9557} 9558 9559// Do executes the "appengine.apps.services.versions.patch" call. 9560// Exactly one of *Operation or error will be non-nil. Any non-2xx 9561// status code is an error. Response headers are in either 9562// *Operation.ServerResponse.Header or (if a response was returned at 9563// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9564// to check whether the returned error was because 9565// http.StatusNotModified was returned. 9566func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9567 gensupport.SetOptions(c.urlParams_, opts...) 9568 res, err := c.doRequest("json") 9569 if res != nil && res.StatusCode == http.StatusNotModified { 9570 if res.Body != nil { 9571 res.Body.Close() 9572 } 9573 return nil, &googleapi.Error{ 9574 Code: res.StatusCode, 9575 Header: res.Header, 9576 } 9577 } 9578 if err != nil { 9579 return nil, err 9580 } 9581 defer googleapi.CloseBody(res) 9582 if err := googleapi.CheckResponse(res); err != nil { 9583 return nil, err 9584 } 9585 ret := &Operation{ 9586 ServerResponse: googleapi.ServerResponse{ 9587 Header: res.Header, 9588 HTTPStatusCode: res.StatusCode, 9589 }, 9590 } 9591 target := &ret 9592 if err := gensupport.DecodeResponse(target, res); err != nil { 9593 return nil, err 9594 } 9595 return ret, nil 9596 // { 9597 // "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)", 9598 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9599 // "httpMethod": "PATCH", 9600 // "id": "appengine.apps.services.versions.patch", 9601 // "parameterOrder": [ 9602 // "appsId", 9603 // "servicesId", 9604 // "versionsId" 9605 // ], 9606 // "parameters": { 9607 // "appsId": { 9608 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", 9609 // "location": "path", 9610 // "required": true, 9611 // "type": "string" 9612 // }, 9613 // "servicesId": { 9614 // "description": "Part of `name`. See documentation of `appsId`.", 9615 // "location": "path", 9616 // "required": true, 9617 // "type": "string" 9618 // }, 9619 // "updateMask": { 9620 // "description": "Standard field mask for the set of fields to be updated.", 9621 // "format": "google-fieldmask", 9622 // "location": "query", 9623 // "type": "string" 9624 // }, 9625 // "versionsId": { 9626 // "description": "Part of `name`. See documentation of `appsId`.", 9627 // "location": "path", 9628 // "required": true, 9629 // "type": "string" 9630 // } 9631 // }, 9632 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9633 // "request": { 9634 // "$ref": "Version" 9635 // }, 9636 // "response": { 9637 // "$ref": "Operation" 9638 // }, 9639 // "scopes": [ 9640 // "https://www.googleapis.com/auth/cloud-platform" 9641 // ] 9642 // } 9643 9644} 9645 9646// method id "appengine.apps.services.versions.instances.debug": 9647 9648type AppsServicesVersionsInstancesDebugCall struct { 9649 s *APIService 9650 appsId string 9651 servicesId string 9652 versionsId string 9653 instancesId string 9654 debuginstancerequest *DebugInstanceRequest 9655 urlParams_ gensupport.URLParams 9656 ctx_ context.Context 9657 header_ http.Header 9658} 9659 9660// Debug: Enables debugging on a VM instance. This allows you to use the 9661// SSH command to connect to the virtual machine where the instance 9662// lives. While in "debug mode", the instance continues to serve live 9663// traffic. You should delete the instance when you are done debugging 9664// and then allow the system to take over and determine if another 9665// instance should be started.Only applicable for instances in App 9666// Engine flexible environment. 9667// 9668// - appsId: Part of `name`. Name of the resource requested. Example: 9669// apps/myapp/services/default/versions/v1/instances/instance-1. 9670// - instancesId: Part of `name`. See documentation of `appsId`. 9671// - servicesId: Part of `name`. See documentation of `appsId`. 9672// - versionsId: Part of `name`. See documentation of `appsId`. 9673func (r *AppsServicesVersionsInstancesService) Debug(appsId string, servicesId string, versionsId string, instancesId string, debuginstancerequest *DebugInstanceRequest) *AppsServicesVersionsInstancesDebugCall { 9674 c := &AppsServicesVersionsInstancesDebugCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9675 c.appsId = appsId 9676 c.servicesId = servicesId 9677 c.versionsId = versionsId 9678 c.instancesId = instancesId 9679 c.debuginstancerequest = debuginstancerequest 9680 return c 9681} 9682 9683// Fields allows partial responses to be retrieved. See 9684// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9685// for more information. 9686func (c *AppsServicesVersionsInstancesDebugCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDebugCall { 9687 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9688 return c 9689} 9690 9691// Context sets the context to be used in this call's Do method. Any 9692// pending HTTP request will be aborted if the provided context is 9693// canceled. 9694func (c *AppsServicesVersionsInstancesDebugCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDebugCall { 9695 c.ctx_ = ctx 9696 return c 9697} 9698 9699// Header returns an http.Header that can be modified by the caller to 9700// add HTTP headers to the request. 9701func (c *AppsServicesVersionsInstancesDebugCall) Header() http.Header { 9702 if c.header_ == nil { 9703 c.header_ = make(http.Header) 9704 } 9705 return c.header_ 9706} 9707 9708func (c *AppsServicesVersionsInstancesDebugCall) doRequest(alt string) (*http.Response, error) { 9709 reqHeaders := make(http.Header) 9710 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9711 for k, v := range c.header_ { 9712 reqHeaders[k] = v 9713 } 9714 reqHeaders.Set("User-Agent", c.s.userAgent()) 9715 var body io.Reader = nil 9716 body, err := googleapi.WithoutDataWrapper.JSONReader(c.debuginstancerequest) 9717 if err != nil { 9718 return nil, err 9719 } 9720 reqHeaders.Set("Content-Type", "application/json") 9721 c.urlParams_.Set("alt", alt) 9722 c.urlParams_.Set("prettyPrint", "false") 9723 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug") 9724 urls += "?" + c.urlParams_.Encode() 9725 req, err := http.NewRequest("POST", urls, body) 9726 if err != nil { 9727 return nil, err 9728 } 9729 req.Header = reqHeaders 9730 googleapi.Expand(req.URL, map[string]string{ 9731 "appsId": c.appsId, 9732 "servicesId": c.servicesId, 9733 "versionsId": c.versionsId, 9734 "instancesId": c.instancesId, 9735 }) 9736 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9737} 9738 9739// Do executes the "appengine.apps.services.versions.instances.debug" call. 9740// Exactly one of *Operation or error will be non-nil. Any non-2xx 9741// status code is an error. Response headers are in either 9742// *Operation.ServerResponse.Header or (if a response was returned at 9743// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9744// to check whether the returned error was because 9745// http.StatusNotModified was returned. 9746func (c *AppsServicesVersionsInstancesDebugCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9747 gensupport.SetOptions(c.urlParams_, opts...) 9748 res, err := c.doRequest("json") 9749 if res != nil && res.StatusCode == http.StatusNotModified { 9750 if res.Body != nil { 9751 res.Body.Close() 9752 } 9753 return nil, &googleapi.Error{ 9754 Code: res.StatusCode, 9755 Header: res.Header, 9756 } 9757 } 9758 if err != nil { 9759 return nil, err 9760 } 9761 defer googleapi.CloseBody(res) 9762 if err := googleapi.CheckResponse(res); err != nil { 9763 return nil, err 9764 } 9765 ret := &Operation{ 9766 ServerResponse: googleapi.ServerResponse{ 9767 Header: res.Header, 9768 HTTPStatusCode: res.StatusCode, 9769 }, 9770 } 9771 target := &ret 9772 if err := gensupport.DecodeResponse(target, res); err != nil { 9773 return nil, err 9774 } 9775 return ret, nil 9776 // { 9777 // "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.", 9778 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", 9779 // "httpMethod": "POST", 9780 // "id": "appengine.apps.services.versions.instances.debug", 9781 // "parameterOrder": [ 9782 // "appsId", 9783 // "servicesId", 9784 // "versionsId", 9785 // "instancesId" 9786 // ], 9787 // "parameters": { 9788 // "appsId": { 9789 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 9790 // "location": "path", 9791 // "required": true, 9792 // "type": "string" 9793 // }, 9794 // "instancesId": { 9795 // "description": "Part of `name`. See documentation of `appsId`.", 9796 // "location": "path", 9797 // "required": true, 9798 // "type": "string" 9799 // }, 9800 // "servicesId": { 9801 // "description": "Part of `name`. See documentation of `appsId`.", 9802 // "location": "path", 9803 // "required": true, 9804 // "type": "string" 9805 // }, 9806 // "versionsId": { 9807 // "description": "Part of `name`. See documentation of `appsId`.", 9808 // "location": "path", 9809 // "required": true, 9810 // "type": "string" 9811 // } 9812 // }, 9813 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", 9814 // "request": { 9815 // "$ref": "DebugInstanceRequest" 9816 // }, 9817 // "response": { 9818 // "$ref": "Operation" 9819 // }, 9820 // "scopes": [ 9821 // "https://www.googleapis.com/auth/cloud-platform" 9822 // ] 9823 // } 9824 9825} 9826 9827// method id "appengine.apps.services.versions.instances.delete": 9828 9829type AppsServicesVersionsInstancesDeleteCall struct { 9830 s *APIService 9831 appsId string 9832 servicesId string 9833 versionsId string 9834 instancesId string 9835 urlParams_ gensupport.URLParams 9836 ctx_ context.Context 9837 header_ http.Header 9838} 9839 9840// Delete: Stops a running instance.The instance might be automatically 9841// recreated based on the scaling settings of the version. For more 9842// information, see "How Instances are Managed" (standard environment 9843// (https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) 9844// | flexible environment 9845// (https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).To 9846// ensure that instances are not re-created and avoid getting billed, 9847// you can stop all instances within the target version by changing the 9848// serving status of the version to STOPPED with the 9849// apps.services.versions.patch 9850// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) 9851// method. 9852// 9853// - appsId: Part of `name`. Name of the resource requested. Example: 9854// apps/myapp/services/default/versions/v1/instances/instance-1. 9855// - instancesId: Part of `name`. See documentation of `appsId`. 9856// - servicesId: Part of `name`. See documentation of `appsId`. 9857// - versionsId: Part of `name`. See documentation of `appsId`. 9858func (r *AppsServicesVersionsInstancesService) Delete(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesDeleteCall { 9859 c := &AppsServicesVersionsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9860 c.appsId = appsId 9861 c.servicesId = servicesId 9862 c.versionsId = versionsId 9863 c.instancesId = instancesId 9864 return c 9865} 9866 9867// Fields allows partial responses to be retrieved. See 9868// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9869// for more information. 9870func (c *AppsServicesVersionsInstancesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDeleteCall { 9871 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9872 return c 9873} 9874 9875// Context sets the context to be used in this call's Do method. Any 9876// pending HTTP request will be aborted if the provided context is 9877// canceled. 9878func (c *AppsServicesVersionsInstancesDeleteCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDeleteCall { 9879 c.ctx_ = ctx 9880 return c 9881} 9882 9883// Header returns an http.Header that can be modified by the caller to 9884// add HTTP headers to the request. 9885func (c *AppsServicesVersionsInstancesDeleteCall) Header() http.Header { 9886 if c.header_ == nil { 9887 c.header_ = make(http.Header) 9888 } 9889 return c.header_ 9890} 9891 9892func (c *AppsServicesVersionsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 9893 reqHeaders := make(http.Header) 9894 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9895 for k, v := range c.header_ { 9896 reqHeaders[k] = v 9897 } 9898 reqHeaders.Set("User-Agent", c.s.userAgent()) 9899 var body io.Reader = nil 9900 c.urlParams_.Set("alt", alt) 9901 c.urlParams_.Set("prettyPrint", "false") 9902 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}") 9903 urls += "?" + c.urlParams_.Encode() 9904 req, err := http.NewRequest("DELETE", urls, body) 9905 if err != nil { 9906 return nil, err 9907 } 9908 req.Header = reqHeaders 9909 googleapi.Expand(req.URL, map[string]string{ 9910 "appsId": c.appsId, 9911 "servicesId": c.servicesId, 9912 "versionsId": c.versionsId, 9913 "instancesId": c.instancesId, 9914 }) 9915 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9916} 9917 9918// Do executes the "appengine.apps.services.versions.instances.delete" call. 9919// Exactly one of *Operation or error will be non-nil. Any non-2xx 9920// status code is an error. Response headers are in either 9921// *Operation.ServerResponse.Header or (if a response was returned at 9922// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9923// to check whether the returned error was because 9924// http.StatusNotModified was returned. 9925func (c *AppsServicesVersionsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9926 gensupport.SetOptions(c.urlParams_, opts...) 9927 res, err := c.doRequest("json") 9928 if res != nil && res.StatusCode == http.StatusNotModified { 9929 if res.Body != nil { 9930 res.Body.Close() 9931 } 9932 return nil, &googleapi.Error{ 9933 Code: res.StatusCode, 9934 Header: res.Header, 9935 } 9936 } 9937 if err != nil { 9938 return nil, err 9939 } 9940 defer googleapi.CloseBody(res) 9941 if err := googleapi.CheckResponse(res); err != nil { 9942 return nil, err 9943 } 9944 ret := &Operation{ 9945 ServerResponse: googleapi.ServerResponse{ 9946 Header: res.Header, 9947 HTTPStatusCode: res.StatusCode, 9948 }, 9949 } 9950 target := &ret 9951 if err := gensupport.DecodeResponse(target, res); err != nil { 9952 return nil, err 9953 } 9954 return ret, nil 9955 // { 9956 // "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.", 9957 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 9958 // "httpMethod": "DELETE", 9959 // "id": "appengine.apps.services.versions.instances.delete", 9960 // "parameterOrder": [ 9961 // "appsId", 9962 // "servicesId", 9963 // "versionsId", 9964 // "instancesId" 9965 // ], 9966 // "parameters": { 9967 // "appsId": { 9968 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 9969 // "location": "path", 9970 // "required": true, 9971 // "type": "string" 9972 // }, 9973 // "instancesId": { 9974 // "description": "Part of `name`. See documentation of `appsId`.", 9975 // "location": "path", 9976 // "required": true, 9977 // "type": "string" 9978 // }, 9979 // "servicesId": { 9980 // "description": "Part of `name`. See documentation of `appsId`.", 9981 // "location": "path", 9982 // "required": true, 9983 // "type": "string" 9984 // }, 9985 // "versionsId": { 9986 // "description": "Part of `name`. See documentation of `appsId`.", 9987 // "location": "path", 9988 // "required": true, 9989 // "type": "string" 9990 // } 9991 // }, 9992 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 9993 // "response": { 9994 // "$ref": "Operation" 9995 // }, 9996 // "scopes": [ 9997 // "https://www.googleapis.com/auth/cloud-platform" 9998 // ] 9999 // } 10000 10001} 10002 10003// method id "appengine.apps.services.versions.instances.get": 10004 10005type AppsServicesVersionsInstancesGetCall struct { 10006 s *APIService 10007 appsId string 10008 servicesId string 10009 versionsId string 10010 instancesId string 10011 urlParams_ gensupport.URLParams 10012 ifNoneMatch_ string 10013 ctx_ context.Context 10014 header_ http.Header 10015} 10016 10017// Get: Gets instance information. 10018// 10019// - appsId: Part of `name`. Name of the resource requested. Example: 10020// apps/myapp/services/default/versions/v1/instances/instance-1. 10021// - instancesId: Part of `name`. See documentation of `appsId`. 10022// - servicesId: Part of `name`. See documentation of `appsId`. 10023// - versionsId: Part of `name`. See documentation of `appsId`. 10024func (r *AppsServicesVersionsInstancesService) Get(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesGetCall { 10025 c := &AppsServicesVersionsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10026 c.appsId = appsId 10027 c.servicesId = servicesId 10028 c.versionsId = versionsId 10029 c.instancesId = instancesId 10030 return c 10031} 10032 10033// Fields allows partial responses to be retrieved. See 10034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10035// for more information. 10036func (c *AppsServicesVersionsInstancesGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesGetCall { 10037 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10038 return c 10039} 10040 10041// IfNoneMatch sets the optional parameter which makes the operation 10042// fail if the object's ETag matches the given value. This is useful for 10043// getting updates only after the object has changed since the last 10044// request. Use googleapi.IsNotModified to check whether the response 10045// error from Do is the result of In-None-Match. 10046func (c *AppsServicesVersionsInstancesGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesGetCall { 10047 c.ifNoneMatch_ = entityTag 10048 return c 10049} 10050 10051// Context sets the context to be used in this call's Do method. Any 10052// pending HTTP request will be aborted if the provided context is 10053// canceled. 10054func (c *AppsServicesVersionsInstancesGetCall) Context(ctx context.Context) *AppsServicesVersionsInstancesGetCall { 10055 c.ctx_ = ctx 10056 return c 10057} 10058 10059// Header returns an http.Header that can be modified by the caller to 10060// add HTTP headers to the request. 10061func (c *AppsServicesVersionsInstancesGetCall) Header() http.Header { 10062 if c.header_ == nil { 10063 c.header_ = make(http.Header) 10064 } 10065 return c.header_ 10066} 10067 10068func (c *AppsServicesVersionsInstancesGetCall) doRequest(alt string) (*http.Response, error) { 10069 reqHeaders := make(http.Header) 10070 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10071 for k, v := range c.header_ { 10072 reqHeaders[k] = v 10073 } 10074 reqHeaders.Set("User-Agent", c.s.userAgent()) 10075 if c.ifNoneMatch_ != "" { 10076 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10077 } 10078 var body io.Reader = nil 10079 c.urlParams_.Set("alt", alt) 10080 c.urlParams_.Set("prettyPrint", "false") 10081 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}") 10082 urls += "?" + c.urlParams_.Encode() 10083 req, err := http.NewRequest("GET", urls, body) 10084 if err != nil { 10085 return nil, err 10086 } 10087 req.Header = reqHeaders 10088 googleapi.Expand(req.URL, map[string]string{ 10089 "appsId": c.appsId, 10090 "servicesId": c.servicesId, 10091 "versionsId": c.versionsId, 10092 "instancesId": c.instancesId, 10093 }) 10094 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10095} 10096 10097// Do executes the "appengine.apps.services.versions.instances.get" call. 10098// Exactly one of *Instance or error will be non-nil. Any non-2xx status 10099// code is an error. Response headers are in either 10100// *Instance.ServerResponse.Header or (if a response was returned at 10101// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10102// to check whether the returned error was because 10103// http.StatusNotModified was returned. 10104func (c *AppsServicesVersionsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { 10105 gensupport.SetOptions(c.urlParams_, opts...) 10106 res, err := c.doRequest("json") 10107 if res != nil && res.StatusCode == http.StatusNotModified { 10108 if res.Body != nil { 10109 res.Body.Close() 10110 } 10111 return nil, &googleapi.Error{ 10112 Code: res.StatusCode, 10113 Header: res.Header, 10114 } 10115 } 10116 if err != nil { 10117 return nil, err 10118 } 10119 defer googleapi.CloseBody(res) 10120 if err := googleapi.CheckResponse(res); err != nil { 10121 return nil, err 10122 } 10123 ret := &Instance{ 10124 ServerResponse: googleapi.ServerResponse{ 10125 Header: res.Header, 10126 HTTPStatusCode: res.StatusCode, 10127 }, 10128 } 10129 target := &ret 10130 if err := gensupport.DecodeResponse(target, res); err != nil { 10131 return nil, err 10132 } 10133 return ret, nil 10134 // { 10135 // "description": "Gets instance information.", 10136 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 10137 // "httpMethod": "GET", 10138 // "id": "appengine.apps.services.versions.instances.get", 10139 // "parameterOrder": [ 10140 // "appsId", 10141 // "servicesId", 10142 // "versionsId", 10143 // "instancesId" 10144 // ], 10145 // "parameters": { 10146 // "appsId": { 10147 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 10148 // "location": "path", 10149 // "required": true, 10150 // "type": "string" 10151 // }, 10152 // "instancesId": { 10153 // "description": "Part of `name`. See documentation of `appsId`.", 10154 // "location": "path", 10155 // "required": true, 10156 // "type": "string" 10157 // }, 10158 // "servicesId": { 10159 // "description": "Part of `name`. See documentation of `appsId`.", 10160 // "location": "path", 10161 // "required": true, 10162 // "type": "string" 10163 // }, 10164 // "versionsId": { 10165 // "description": "Part of `name`. See documentation of `appsId`.", 10166 // "location": "path", 10167 // "required": true, 10168 // "type": "string" 10169 // } 10170 // }, 10171 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 10172 // "response": { 10173 // "$ref": "Instance" 10174 // }, 10175 // "scopes": [ 10176 // "https://www.googleapis.com/auth/appengine.admin", 10177 // "https://www.googleapis.com/auth/cloud-platform", 10178 // "https://www.googleapis.com/auth/cloud-platform.read-only" 10179 // ] 10180 // } 10181 10182} 10183 10184// method id "appengine.apps.services.versions.instances.list": 10185 10186type AppsServicesVersionsInstancesListCall struct { 10187 s *APIService 10188 appsId string 10189 servicesId string 10190 versionsId string 10191 urlParams_ gensupport.URLParams 10192 ifNoneMatch_ string 10193 ctx_ context.Context 10194 header_ http.Header 10195} 10196 10197// List: Lists the instances of a version.Tip: To aggregate details 10198// about instances over time, see the Stackdriver Monitoring API 10199// (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). 10200// 10201// - appsId: Part of `parent`. Name of the parent Version resource. 10202// Example: apps/myapp/services/default/versions/v1. 10203// - servicesId: Part of `parent`. See documentation of `appsId`. 10204// - versionsId: Part of `parent`. See documentation of `appsId`. 10205func (r *AppsServicesVersionsInstancesService) List(appsId string, servicesId string, versionsId string) *AppsServicesVersionsInstancesListCall { 10206 c := &AppsServicesVersionsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10207 c.appsId = appsId 10208 c.servicesId = servicesId 10209 c.versionsId = versionsId 10210 return c 10211} 10212 10213// PageSize sets the optional parameter "pageSize": Maximum results to 10214// return per page. 10215func (c *AppsServicesVersionsInstancesListCall) PageSize(pageSize int64) *AppsServicesVersionsInstancesListCall { 10216 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10217 return c 10218} 10219 10220// PageToken sets the optional parameter "pageToken": Continuation token 10221// for fetching the next page of results. 10222func (c *AppsServicesVersionsInstancesListCall) PageToken(pageToken string) *AppsServicesVersionsInstancesListCall { 10223 c.urlParams_.Set("pageToken", pageToken) 10224 return c 10225} 10226 10227// Fields allows partial responses to be retrieved. See 10228// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10229// for more information. 10230func (c *AppsServicesVersionsInstancesListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesListCall { 10231 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10232 return c 10233} 10234 10235// IfNoneMatch sets the optional parameter which makes the operation 10236// fail if the object's ETag matches the given value. This is useful for 10237// getting updates only after the object has changed since the last 10238// request. Use googleapi.IsNotModified to check whether the response 10239// error from Do is the result of In-None-Match. 10240func (c *AppsServicesVersionsInstancesListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesListCall { 10241 c.ifNoneMatch_ = entityTag 10242 return c 10243} 10244 10245// Context sets the context to be used in this call's Do method. Any 10246// pending HTTP request will be aborted if the provided context is 10247// canceled. 10248func (c *AppsServicesVersionsInstancesListCall) Context(ctx context.Context) *AppsServicesVersionsInstancesListCall { 10249 c.ctx_ = ctx 10250 return c 10251} 10252 10253// Header returns an http.Header that can be modified by the caller to 10254// add HTTP headers to the request. 10255func (c *AppsServicesVersionsInstancesListCall) Header() http.Header { 10256 if c.header_ == nil { 10257 c.header_ = make(http.Header) 10258 } 10259 return c.header_ 10260} 10261 10262func (c *AppsServicesVersionsInstancesListCall) doRequest(alt string) (*http.Response, error) { 10263 reqHeaders := make(http.Header) 10264 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10265 for k, v := range c.header_ { 10266 reqHeaders[k] = v 10267 } 10268 reqHeaders.Set("User-Agent", c.s.userAgent()) 10269 if c.ifNoneMatch_ != "" { 10270 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10271 } 10272 var body io.Reader = nil 10273 c.urlParams_.Set("alt", alt) 10274 c.urlParams_.Set("prettyPrint", "false") 10275 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances") 10276 urls += "?" + c.urlParams_.Encode() 10277 req, err := http.NewRequest("GET", urls, body) 10278 if err != nil { 10279 return nil, err 10280 } 10281 req.Header = reqHeaders 10282 googleapi.Expand(req.URL, map[string]string{ 10283 "appsId": c.appsId, 10284 "servicesId": c.servicesId, 10285 "versionsId": c.versionsId, 10286 }) 10287 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10288} 10289 10290// Do executes the "appengine.apps.services.versions.instances.list" call. 10291// Exactly one of *ListInstancesResponse or error will be non-nil. Any 10292// non-2xx status code is an error. Response headers are in either 10293// *ListInstancesResponse.ServerResponse.Header or (if a response was 10294// returned at all) in error.(*googleapi.Error).Header. Use 10295// googleapi.IsNotModified to check whether the returned error was 10296// because http.StatusNotModified was returned. 10297func (c *AppsServicesVersionsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) { 10298 gensupport.SetOptions(c.urlParams_, opts...) 10299 res, err := c.doRequest("json") 10300 if res != nil && res.StatusCode == http.StatusNotModified { 10301 if res.Body != nil { 10302 res.Body.Close() 10303 } 10304 return nil, &googleapi.Error{ 10305 Code: res.StatusCode, 10306 Header: res.Header, 10307 } 10308 } 10309 if err != nil { 10310 return nil, err 10311 } 10312 defer googleapi.CloseBody(res) 10313 if err := googleapi.CheckResponse(res); err != nil { 10314 return nil, err 10315 } 10316 ret := &ListInstancesResponse{ 10317 ServerResponse: googleapi.ServerResponse{ 10318 Header: res.Header, 10319 HTTPStatusCode: res.StatusCode, 10320 }, 10321 } 10322 target := &ret 10323 if err := gensupport.DecodeResponse(target, res); err != nil { 10324 return nil, err 10325 } 10326 return ret, nil 10327 // { 10328 // "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).", 10329 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", 10330 // "httpMethod": "GET", 10331 // "id": "appengine.apps.services.versions.instances.list", 10332 // "parameterOrder": [ 10333 // "appsId", 10334 // "servicesId", 10335 // "versionsId" 10336 // ], 10337 // "parameters": { 10338 // "appsId": { 10339 // "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", 10340 // "location": "path", 10341 // "required": true, 10342 // "type": "string" 10343 // }, 10344 // "pageSize": { 10345 // "description": "Maximum results to return per page.", 10346 // "format": "int32", 10347 // "location": "query", 10348 // "type": "integer" 10349 // }, 10350 // "pageToken": { 10351 // "description": "Continuation token for fetching the next page of results.", 10352 // "location": "query", 10353 // "type": "string" 10354 // }, 10355 // "servicesId": { 10356 // "description": "Part of `parent`. See documentation of `appsId`.", 10357 // "location": "path", 10358 // "required": true, 10359 // "type": "string" 10360 // }, 10361 // "versionsId": { 10362 // "description": "Part of `parent`. See documentation of `appsId`.", 10363 // "location": "path", 10364 // "required": true, 10365 // "type": "string" 10366 // } 10367 // }, 10368 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", 10369 // "response": { 10370 // "$ref": "ListInstancesResponse" 10371 // }, 10372 // "scopes": [ 10373 // "https://www.googleapis.com/auth/appengine.admin", 10374 // "https://www.googleapis.com/auth/cloud-platform", 10375 // "https://www.googleapis.com/auth/cloud-platform.read-only" 10376 // ] 10377 // } 10378 10379} 10380 10381// Pages invokes f for each page of results. 10382// A non-nil error returned from f will halt the iteration. 10383// The provided context supersedes any context provided to the Context method. 10384func (c *AppsServicesVersionsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error { 10385 c.ctx_ = ctx 10386 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10387 for { 10388 x, err := c.Do() 10389 if err != nil { 10390 return err 10391 } 10392 if err := f(x); err != nil { 10393 return err 10394 } 10395 if x.NextPageToken == "" { 10396 return nil 10397 } 10398 c.PageToken(x.NextPageToken) 10399 } 10400} 10401