1// Copyright 2020 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package run provides access to the Cloud Run Admin API. 8// 9// For product documentation, see: https://cloud.google.com/run/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/run/v1alpha1" 16// ... 17// ctx := context.Background() 18// runService, err := run.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// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 27// 28// runService, err := run.NewService(ctx, option.WithAPIKey("AIza...")) 29// 30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 31// 32// config := &oauth2.Config{...} 33// // ... 34// token, err := config.Exchange(ctx, ...) 35// runService, err := run.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package run // import "google.golang.org/api/run/v1alpha1" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 internaloption "google.golang.org/api/option/internaloption" 56 htransport "google.golang.org/api/transport/http" 57) 58 59// Always reference these packages, just in case the auto-generated code 60// below doesn't. 61var _ = bytes.NewBuffer 62var _ = strconv.Itoa 63var _ = fmt.Sprintf 64var _ = json.NewDecoder 65var _ = io.Copy 66var _ = url.Parse 67var _ = gensupport.MarshalJSON 68var _ = googleapi.Version 69var _ = errors.New 70var _ = strings.Replace 71var _ = context.Canceled 72var _ = internaloption.WithDefaultEndpoint 73 74const apiId = "run:v1alpha1" 75const apiName = "run" 76const apiVersion = "v1alpha1" 77const basePath = "https://run.googleapis.com/" 78const mtlsBasePath = "https://run.mtls.googleapis.com/" 79 80// OAuth2 scopes used by this API. 81const ( 82 // View and manage your data across Google Cloud Platform services 83 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 84) 85 86// NewService creates a new APIService. 87func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 88 scopesOption := option.WithScopes( 89 "https://www.googleapis.com/auth/cloud-platform", 90 ) 91 // NOTE: prepend, so we don't override user-specified scopes. 92 opts = append([]option.ClientOption{scopesOption}, opts...) 93 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 94 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 95 client, endpoint, err := htransport.NewClient(ctx, opts...) 96 if err != nil { 97 return nil, err 98 } 99 s, err := New(client) 100 if err != nil { 101 return nil, err 102 } 103 if endpoint != "" { 104 s.BasePath = endpoint 105 } 106 return s, nil 107} 108 109// New creates a new APIService. It uses the provided http.Client for requests. 110// 111// Deprecated: please use NewService instead. 112// To provide a custom HTTP client, use option.WithHTTPClient. 113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 114func New(client *http.Client) (*APIService, error) { 115 if client == nil { 116 return nil, errors.New("client is nil") 117 } 118 s := &APIService{client: client, BasePath: basePath} 119 s.Namespaces = NewNamespacesService(s) 120 s.Projects = NewProjectsService(s) 121 return s, nil 122} 123 124type APIService struct { 125 client *http.Client 126 BasePath string // API endpoint base URL 127 UserAgent string // optional additional User-Agent fragment 128 129 Namespaces *NamespacesService 130 131 Projects *ProjectsService 132} 133 134func (s *APIService) userAgent() string { 135 if s.UserAgent == "" { 136 return googleapi.UserAgent 137 } 138 return googleapi.UserAgent + " " + s.UserAgent 139} 140 141func NewNamespacesService(s *APIService) *NamespacesService { 142 rs := &NamespacesService{s: s} 143 rs.Authorizeddomains = NewNamespacesAuthorizeddomainsService(s) 144 rs.Cloudauditlogssources = NewNamespacesCloudauditlogssourcesService(s) 145 rs.Cloudpubsubsources = NewNamespacesCloudpubsubsourcesService(s) 146 rs.Cloudschedulersources = NewNamespacesCloudschedulersourcesService(s) 147 rs.Cloudstoragesources = NewNamespacesCloudstoragesourcesService(s) 148 rs.Configurations = NewNamespacesConfigurationsService(s) 149 rs.Domainmappings = NewNamespacesDomainmappingsService(s) 150 rs.Revisions = NewNamespacesRevisionsService(s) 151 rs.Routes = NewNamespacesRoutesService(s) 152 rs.Services = NewNamespacesServicesService(s) 153 rs.Triggers = NewNamespacesTriggersService(s) 154 return rs 155} 156 157type NamespacesService struct { 158 s *APIService 159 160 Authorizeddomains *NamespacesAuthorizeddomainsService 161 162 Cloudauditlogssources *NamespacesCloudauditlogssourcesService 163 164 Cloudpubsubsources *NamespacesCloudpubsubsourcesService 165 166 Cloudschedulersources *NamespacesCloudschedulersourcesService 167 168 Cloudstoragesources *NamespacesCloudstoragesourcesService 169 170 Configurations *NamespacesConfigurationsService 171 172 Domainmappings *NamespacesDomainmappingsService 173 174 Revisions *NamespacesRevisionsService 175 176 Routes *NamespacesRoutesService 177 178 Services *NamespacesServicesService 179 180 Triggers *NamespacesTriggersService 181} 182 183func NewNamespacesAuthorizeddomainsService(s *APIService) *NamespacesAuthorizeddomainsService { 184 rs := &NamespacesAuthorizeddomainsService{s: s} 185 return rs 186} 187 188type NamespacesAuthorizeddomainsService struct { 189 s *APIService 190} 191 192func NewNamespacesCloudauditlogssourcesService(s *APIService) *NamespacesCloudauditlogssourcesService { 193 rs := &NamespacesCloudauditlogssourcesService{s: s} 194 return rs 195} 196 197type NamespacesCloudauditlogssourcesService struct { 198 s *APIService 199} 200 201func NewNamespacesCloudpubsubsourcesService(s *APIService) *NamespacesCloudpubsubsourcesService { 202 rs := &NamespacesCloudpubsubsourcesService{s: s} 203 return rs 204} 205 206type NamespacesCloudpubsubsourcesService struct { 207 s *APIService 208} 209 210func NewNamespacesCloudschedulersourcesService(s *APIService) *NamespacesCloudschedulersourcesService { 211 rs := &NamespacesCloudschedulersourcesService{s: s} 212 return rs 213} 214 215type NamespacesCloudschedulersourcesService struct { 216 s *APIService 217} 218 219func NewNamespacesCloudstoragesourcesService(s *APIService) *NamespacesCloudstoragesourcesService { 220 rs := &NamespacesCloudstoragesourcesService{s: s} 221 return rs 222} 223 224type NamespacesCloudstoragesourcesService struct { 225 s *APIService 226} 227 228func NewNamespacesConfigurationsService(s *APIService) *NamespacesConfigurationsService { 229 rs := &NamespacesConfigurationsService{s: s} 230 return rs 231} 232 233type NamespacesConfigurationsService struct { 234 s *APIService 235} 236 237func NewNamespacesDomainmappingsService(s *APIService) *NamespacesDomainmappingsService { 238 rs := &NamespacesDomainmappingsService{s: s} 239 return rs 240} 241 242type NamespacesDomainmappingsService struct { 243 s *APIService 244} 245 246func NewNamespacesRevisionsService(s *APIService) *NamespacesRevisionsService { 247 rs := &NamespacesRevisionsService{s: s} 248 return rs 249} 250 251type NamespacesRevisionsService struct { 252 s *APIService 253} 254 255func NewNamespacesRoutesService(s *APIService) *NamespacesRoutesService { 256 rs := &NamespacesRoutesService{s: s} 257 return rs 258} 259 260type NamespacesRoutesService struct { 261 s *APIService 262} 263 264func NewNamespacesServicesService(s *APIService) *NamespacesServicesService { 265 rs := &NamespacesServicesService{s: s} 266 return rs 267} 268 269type NamespacesServicesService struct { 270 s *APIService 271} 272 273func NewNamespacesTriggersService(s *APIService) *NamespacesTriggersService { 274 rs := &NamespacesTriggersService{s: s} 275 return rs 276} 277 278type NamespacesTriggersService struct { 279 s *APIService 280} 281 282func NewProjectsService(s *APIService) *ProjectsService { 283 rs := &ProjectsService{s: s} 284 rs.Locations = NewProjectsLocationsService(s) 285 return rs 286} 287 288type ProjectsService struct { 289 s *APIService 290 291 Locations *ProjectsLocationsService 292} 293 294func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService { 295 rs := &ProjectsLocationsService{s: s} 296 rs.Authorizeddomains = NewProjectsLocationsAuthorizeddomainsService(s) 297 rs.Cloudauditlogssources = NewProjectsLocationsCloudauditlogssourcesService(s) 298 rs.Cloudpubsubsources = NewProjectsLocationsCloudpubsubsourcesService(s) 299 rs.Cloudschedulersources = NewProjectsLocationsCloudschedulersourcesService(s) 300 rs.Cloudstoragesources = NewProjectsLocationsCloudstoragesourcesService(s) 301 rs.Configurations = NewProjectsLocationsConfigurationsService(s) 302 rs.Domainmappings = NewProjectsLocationsDomainmappingsService(s) 303 rs.Revisions = NewProjectsLocationsRevisionsService(s) 304 rs.Routes = NewProjectsLocationsRoutesService(s) 305 rs.Services = NewProjectsLocationsServicesService(s) 306 rs.Triggers = NewProjectsLocationsTriggersService(s) 307 return rs 308} 309 310type ProjectsLocationsService struct { 311 s *APIService 312 313 Authorizeddomains *ProjectsLocationsAuthorizeddomainsService 314 315 Cloudauditlogssources *ProjectsLocationsCloudauditlogssourcesService 316 317 Cloudpubsubsources *ProjectsLocationsCloudpubsubsourcesService 318 319 Cloudschedulersources *ProjectsLocationsCloudschedulersourcesService 320 321 Cloudstoragesources *ProjectsLocationsCloudstoragesourcesService 322 323 Configurations *ProjectsLocationsConfigurationsService 324 325 Domainmappings *ProjectsLocationsDomainmappingsService 326 327 Revisions *ProjectsLocationsRevisionsService 328 329 Routes *ProjectsLocationsRoutesService 330 331 Services *ProjectsLocationsServicesService 332 333 Triggers *ProjectsLocationsTriggersService 334} 335 336func NewProjectsLocationsAuthorizeddomainsService(s *APIService) *ProjectsLocationsAuthorizeddomainsService { 337 rs := &ProjectsLocationsAuthorizeddomainsService{s: s} 338 return rs 339} 340 341type ProjectsLocationsAuthorizeddomainsService struct { 342 s *APIService 343} 344 345func NewProjectsLocationsCloudauditlogssourcesService(s *APIService) *ProjectsLocationsCloudauditlogssourcesService { 346 rs := &ProjectsLocationsCloudauditlogssourcesService{s: s} 347 return rs 348} 349 350type ProjectsLocationsCloudauditlogssourcesService struct { 351 s *APIService 352} 353 354func NewProjectsLocationsCloudpubsubsourcesService(s *APIService) *ProjectsLocationsCloudpubsubsourcesService { 355 rs := &ProjectsLocationsCloudpubsubsourcesService{s: s} 356 return rs 357} 358 359type ProjectsLocationsCloudpubsubsourcesService struct { 360 s *APIService 361} 362 363func NewProjectsLocationsCloudschedulersourcesService(s *APIService) *ProjectsLocationsCloudschedulersourcesService { 364 rs := &ProjectsLocationsCloudschedulersourcesService{s: s} 365 return rs 366} 367 368type ProjectsLocationsCloudschedulersourcesService struct { 369 s *APIService 370} 371 372func NewProjectsLocationsCloudstoragesourcesService(s *APIService) *ProjectsLocationsCloudstoragesourcesService { 373 rs := &ProjectsLocationsCloudstoragesourcesService{s: s} 374 return rs 375} 376 377type ProjectsLocationsCloudstoragesourcesService struct { 378 s *APIService 379} 380 381func NewProjectsLocationsConfigurationsService(s *APIService) *ProjectsLocationsConfigurationsService { 382 rs := &ProjectsLocationsConfigurationsService{s: s} 383 return rs 384} 385 386type ProjectsLocationsConfigurationsService struct { 387 s *APIService 388} 389 390func NewProjectsLocationsDomainmappingsService(s *APIService) *ProjectsLocationsDomainmappingsService { 391 rs := &ProjectsLocationsDomainmappingsService{s: s} 392 return rs 393} 394 395type ProjectsLocationsDomainmappingsService struct { 396 s *APIService 397} 398 399func NewProjectsLocationsRevisionsService(s *APIService) *ProjectsLocationsRevisionsService { 400 rs := &ProjectsLocationsRevisionsService{s: s} 401 return rs 402} 403 404type ProjectsLocationsRevisionsService struct { 405 s *APIService 406} 407 408func NewProjectsLocationsRoutesService(s *APIService) *ProjectsLocationsRoutesService { 409 rs := &ProjectsLocationsRoutesService{s: s} 410 return rs 411} 412 413type ProjectsLocationsRoutesService struct { 414 s *APIService 415} 416 417func NewProjectsLocationsServicesService(s *APIService) *ProjectsLocationsServicesService { 418 rs := &ProjectsLocationsServicesService{s: s} 419 return rs 420} 421 422type ProjectsLocationsServicesService struct { 423 s *APIService 424} 425 426func NewProjectsLocationsTriggersService(s *APIService) *ProjectsLocationsTriggersService { 427 rs := &ProjectsLocationsTriggersService{s: s} 428 return rs 429} 430 431type ProjectsLocationsTriggersService struct { 432 s *APIService 433} 434 435// Addressable: Information for connecting over HTTP(s). 436type Addressable struct { 437 // Hostname: Deprecated - use url instead. 438 Hostname string `json:"hostname,omitempty"` 439 440 Url string `json:"url,omitempty"` 441 442 // ForceSendFields is a list of field names (e.g. "Hostname") to 443 // unconditionally include in API requests. By default, fields with 444 // empty values are omitted from API requests. However, any non-pointer, 445 // non-interface field appearing in ForceSendFields will be sent to the 446 // server regardless of whether the field is empty or not. This may be 447 // used to include empty fields in Patch requests. 448 ForceSendFields []string `json:"-"` 449 450 // NullFields is a list of field names (e.g. "Hostname") to include in 451 // API requests with the JSON null value. By default, fields with empty 452 // values are omitted from API requests. However, any field with an 453 // empty value appearing in NullFields will be sent to the server as 454 // null. It is an error if a field in this list has a non-empty value. 455 // This may be used to include null fields in Patch requests. 456 NullFields []string `json:"-"` 457} 458 459func (s *Addressable) MarshalJSON() ([]byte, error) { 460 type NoMethod Addressable 461 raw := NoMethod(*s) 462 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 463} 464 465// AuditConfig: Specifies the audit configuration for a service. The 466// configuration determines which permission types are logged, and what 467// identities, if any, are exempted from logging. An AuditConfig must 468// have one or more AuditLogConfigs. If there are AuditConfigs for both 469// `allServices` and a specific service, the union of the two 470// AuditConfigs is used for that service: the log_types specified in 471// each AuditConfig are enabled, and the exempted_members in each 472// AuditLogConfig are exempted. Example Policy with multiple 473// AuditConfigs: { "audit_configs": [ { "service": "allServices", 474// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": 475// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { 476// "log_type": "ADMIN_READ" } ] }, { "service": 477// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": 478// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ 479// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy 480// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts 481// jose@example.com from DATA_READ logging, and aliya@example.com from 482// DATA_WRITE logging. 483type AuditConfig struct { 484 // AuditLogConfigs: The configuration for logging of each type of 485 // permission. 486 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 487 488 // Service: Specifies a service that will be enabled for audit logging. 489 // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. 490 // `allServices` is a special value that covers all services. 491 Service string `json:"service,omitempty"` 492 493 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 494 // unconditionally include in API requests. By default, fields with 495 // empty values are omitted from API requests. However, any non-pointer, 496 // non-interface field appearing in ForceSendFields will be sent to the 497 // server regardless of whether the field is empty or not. This may be 498 // used to include empty fields in Patch requests. 499 ForceSendFields []string `json:"-"` 500 501 // NullFields is a list of field names (e.g. "AuditLogConfigs") to 502 // include in API requests with the JSON null value. By default, fields 503 // with empty values are omitted from API requests. However, any field 504 // with an empty value appearing in NullFields will be sent to the 505 // server as null. It is an error if a field in this list has a 506 // non-empty value. This may be used to include null fields in Patch 507 // requests. 508 NullFields []string `json:"-"` 509} 510 511func (s *AuditConfig) MarshalJSON() ([]byte, error) { 512 type NoMethod AuditConfig 513 raw := NoMethod(*s) 514 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 515} 516 517// AuditLogConfig: Provides the configuration for logging a type of 518// permissions. Example: { "audit_log_configs": [ { "log_type": 519// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { 520// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 521// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ 522// logging. 523type AuditLogConfig struct { 524 // ExemptedMembers: Specifies the identities that do not cause logging 525 // for this type of permission. Follows the same format of 526 // Binding.members. 527 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 528 529 // LogType: The log type that this config enables. 530 // 531 // Possible values: 532 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 533 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 534 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 535 // "DATA_READ" - Data reads. Example: CloudSQL Users list 536 LogType string `json:"logType,omitempty"` 537 538 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 539 // unconditionally include in API requests. By default, fields with 540 // empty values are omitted from API requests. However, any non-pointer, 541 // non-interface field appearing in ForceSendFields will be sent to the 542 // server regardless of whether the field is empty or not. This may be 543 // used to include empty fields in Patch requests. 544 ForceSendFields []string `json:"-"` 545 546 // NullFields is a list of field names (e.g. "ExemptedMembers") to 547 // include in API requests with the JSON null value. By default, fields 548 // with empty values are omitted from API requests. However, any field 549 // with an empty value appearing in NullFields will be sent to the 550 // server as null. It is an error if a field in this list has a 551 // non-empty value. This may be used to include null fields in Patch 552 // requests. 553 NullFields []string `json:"-"` 554} 555 556func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 557 type NoMethod AuditLogConfig 558 raw := NoMethod(*s) 559 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 560} 561 562// AuthorizedDomain: A domain that a user has been authorized to 563// administer. To authorize use of a domain, verify ownership via 564// [Webmaster 565// Central](https://www.google.com/webmasters/verification/home). 566type AuthorizedDomain struct { 567 // Id: Relative name of the domain authorized for use. Example: 568 // `example.com`. 569 Id string `json:"id,omitempty"` 570 571 // Name: Read only. Full path to the `AuthorizedDomain` resource in the 572 // API. Example: `apps/myapp/authorizedDomains/example.com`. 573 Name string `json:"name,omitempty"` 574 575 // ForceSendFields is a list of field names (e.g. "Id") to 576 // unconditionally include in API requests. By default, fields with 577 // empty values are omitted from API requests. However, any non-pointer, 578 // non-interface field appearing in ForceSendFields will be sent to the 579 // server regardless of whether the field is empty or not. This may be 580 // used to include empty fields in Patch requests. 581 ForceSendFields []string `json:"-"` 582 583 // NullFields is a list of field names (e.g. "Id") to include in API 584 // requests with the JSON null value. By default, fields with empty 585 // values are omitted from API requests. However, any field with an 586 // empty value appearing in NullFields will be sent to the server as 587 // null. It is an error if a field in this list has a non-empty value. 588 // This may be used to include null fields in Patch requests. 589 NullFields []string `json:"-"` 590} 591 592func (s *AuthorizedDomain) MarshalJSON() ([]byte, error) { 593 type NoMethod AuthorizedDomain 594 raw := NoMethod(*s) 595 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 596} 597 598// Binding: Associates `members` with a `role`. 599type Binding struct { 600 // Condition: The condition that is associated with this binding. If the 601 // condition evaluates to `true`, then this binding applies to the 602 // current request. If the condition evaluates to `false`, then this 603 // binding does not apply to the current request. However, a different 604 // role binding might grant the same role to one or more of the members 605 // in this binding. To learn which resources support conditions in their 606 // IAM policies, see the [IAM 607 // documentation](https://cloud.google.com/iam/help/conditions/resource-p 608 // olicies). 609 Condition *Expr `json:"condition,omitempty"` 610 611 // Members: Specifies the identities requesting access for a Cloud 612 // Platform resource. `members` can have the following values: * 613 // `allUsers`: A special identifier that represents anyone who is on the 614 // internet; with or without a Google account. * 615 // `allAuthenticatedUsers`: A special identifier that represents anyone 616 // who is authenticated with a Google account or a service account. * 617 // `user:{emailid}`: An email address that represents a specific Google 618 // account. For example, `alice@example.com` . * 619 // `serviceAccount:{emailid}`: An email address that represents a 620 // service account. For example, 621 // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An 622 // email address that represents a Google group. For example, 623 // `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An 624 // email address (plus unique identifier) representing a user that has 625 // been recently deleted. For example, 626 // `alice@example.com?uid=123456789012345678901`. If the user is 627 // recovered, this value reverts to `user:{emailid}` and the recovered 628 // user retains the role in the binding. * 629 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address 630 // (plus unique identifier) representing a service account that has been 631 // recently deleted. For example, 632 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. 633 // If the service account is undeleted, this value reverts to 634 // `serviceAccount:{emailid}` and the undeleted service account retains 635 // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: 636 // An email address (plus unique identifier) representing a Google group 637 // that has been recently deleted. For example, 638 // `admins@example.com?uid=123456789012345678901`. If the group is 639 // recovered, this value reverts to `group:{emailid}` and the recovered 640 // group retains the role in the binding. * `domain:{domain}`: The G 641 // Suite domain (primary) that represents all the users of that domain. 642 // For example, `google.com` or `example.com`. 643 Members []string `json:"members,omitempty"` 644 645 // Role: Role that is assigned to `members`. For example, 646 // `roles/viewer`, `roles/editor`, or `roles/owner`. 647 Role string `json:"role,omitempty"` 648 649 // ForceSendFields is a list of field names (e.g. "Condition") to 650 // unconditionally include in API requests. By default, fields with 651 // empty values are omitted from API requests. However, any non-pointer, 652 // non-interface field appearing in ForceSendFields will be sent to the 653 // server regardless of whether the field is empty or not. This may be 654 // used to include empty fields in Patch requests. 655 ForceSendFields []string `json:"-"` 656 657 // NullFields is a list of field names (e.g. "Condition") to include in 658 // API requests with the JSON null value. By default, fields with empty 659 // values are omitted from API requests. However, any field with an 660 // empty value appearing in NullFields will be sent to the server as 661 // null. It is an error if a field in this list has a non-empty value. 662 // This may be used to include null fields in Patch requests. 663 NullFields []string `json:"-"` 664} 665 666func (s *Binding) MarshalJSON() ([]byte, error) { 667 type NoMethod Binding 668 raw := NoMethod(*s) 669 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 670} 671 672// Capabilities: Adds and removes POSIX capabilities from running 673// containers. 674type Capabilities struct { 675 // Add: Added capabilities +optional 676 Add []string `json:"add,omitempty"` 677 678 // Drop: Removed capabilities +optional 679 Drop []string `json:"drop,omitempty"` 680 681 // ForceSendFields is a list of field names (e.g. "Add") to 682 // unconditionally include in API requests. By default, fields with 683 // empty values are omitted from API requests. However, any non-pointer, 684 // non-interface field appearing in ForceSendFields will be sent to the 685 // server regardless of whether the field is empty or not. This may be 686 // used to include empty fields in Patch requests. 687 ForceSendFields []string `json:"-"` 688 689 // NullFields is a list of field names (e.g. "Add") to include in API 690 // requests with the JSON null value. By default, fields with empty 691 // values are omitted from API requests. However, any field with an 692 // empty value appearing in NullFields will be sent to the server as 693 // null. It is an error if a field in this list has a non-empty value. 694 // This may be used to include null fields in Patch requests. 695 NullFields []string `json:"-"` 696} 697 698func (s *Capabilities) MarshalJSON() ([]byte, error) { 699 type NoMethod Capabilities 700 raw := NoMethod(*s) 701 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 702} 703 704type CloudAuditLogsSource struct { 705 // ApiVersion: The API version for this call such as 706 // "events.cloud.google.com/v1alpha1". 707 ApiVersion string `json:"apiVersion,omitempty"` 708 709 // Kind: The kind of resource, in this case "CloudAuditLogsSource". 710 Kind string `json:"kind,omitempty"` 711 712 // Metadata: Metadata associated with this CloudAuditLogsSource. 713 Metadata *ObjectMeta `json:"metadata,omitempty"` 714 715 // Spec: Spec defines the desired state of the CloudAuditLogsSource. 716 Spec *CloudAuditLogsSourceSpec `json:"spec,omitempty"` 717 718 // Status: Status represents the current state of the 719 // CloudAuditLogsSource. This data may be out of date. +optional 720 Status *CloudAuditLogsSourceStatus `json:"status,omitempty"` 721 722 // ServerResponse contains the HTTP response code and headers from the 723 // server. 724 googleapi.ServerResponse `json:"-"` 725 726 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 727 // unconditionally include in API requests. By default, fields with 728 // empty values are omitted from API requests. However, any non-pointer, 729 // non-interface field appearing in ForceSendFields will be sent to the 730 // server regardless of whether the field is empty or not. This may be 731 // used to include empty fields in Patch requests. 732 ForceSendFields []string `json:"-"` 733 734 // NullFields is a list of field names (e.g. "ApiVersion") to include in 735 // API requests with the JSON null value. By default, fields with empty 736 // values are omitted from API requests. However, any field with an 737 // empty value appearing in NullFields will be sent to the server as 738 // null. It is an error if a field in this list has a non-empty value. 739 // This may be used to include null fields in Patch requests. 740 NullFields []string `json:"-"` 741} 742 743func (s *CloudAuditLogsSource) MarshalJSON() ([]byte, error) { 744 type NoMethod CloudAuditLogsSource 745 raw := NoMethod(*s) 746 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 747} 748 749// CloudAuditLogsSourceSpec: The desired state of the 750// CloudAuditLogsSource. 751type CloudAuditLogsSourceSpec struct { 752 // CeOverrides: CloudEventOverrides defines overrides to control the 753 // output format and modifications of the event sent to the sink. 754 // +optional 755 CeOverrides *CloudEventOverrides `json:"ceOverrides,omitempty"` 756 757 // MethodName: Required. The method name at the service API. This must 758 // match "methodName" in Cloud Audit Logs. Regex or Wildcards (*) are 759 // not supported. Example: "google.cloud.bigquery.job.create". 760 MethodName string `json:"methodName,omitempty"` 761 762 // ResourceName: Optional. The resource specification. This must match 763 // "methodName" in Cloud Audit Logs. Regex or Wildcards (*) are not 764 // supported. Example: "projects/my-project/jobs/foo". 765 ResourceName string `json:"resourceName,omitempty"` 766 767 // ServiceAccountName: Optional. Email address of the IAM service 768 // account associated with the source. The service account represents 769 // the identity of the source, and determines what permissions the 770 // source has. If not provided, the source will use the project's 771 // default service account. 772 ServiceAccountName string `json:"serviceAccountName,omitempty"` 773 774 // ServiceName: Required. The GCP service name. This must match 775 // "serviceName" in Cloud Audit Logs. Regex or Wildcards (*) are not 776 // supported. Example: "bigquery.googleapis.com". 777 ServiceName string `json:"serviceName,omitempty"` 778 779 // Sink: Sink is a reference to an object that will resolve to a domain 780 // name or a URI directly to use as the sink. 781 Sink *Destination `json:"sink,omitempty"` 782 783 // ForceSendFields is a list of field names (e.g. "CeOverrides") to 784 // unconditionally include in API requests. By default, fields with 785 // empty values are omitted from API requests. However, any non-pointer, 786 // non-interface field appearing in ForceSendFields will be sent to the 787 // server regardless of whether the field is empty or not. This may be 788 // used to include empty fields in Patch requests. 789 ForceSendFields []string `json:"-"` 790 791 // NullFields is a list of field names (e.g. "CeOverrides") to include 792 // in API requests with the JSON null value. By default, fields with 793 // empty values are omitted from API requests. However, any field with 794 // an empty value appearing in NullFields will be sent to the server as 795 // null. It is an error if a field in this list has a non-empty value. 796 // This may be used to include null fields in Patch requests. 797 NullFields []string `json:"-"` 798} 799 800func (s *CloudAuditLogsSourceSpec) MarshalJSON() ([]byte, error) { 801 type NoMethod CloudAuditLogsSourceSpec 802 raw := NoMethod(*s) 803 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 804} 805 806// CloudAuditLogsSourceStatus: CloudAuditLogsSourceStatus represents the 807// current state of a CloudAuditLogsSource. 808type CloudAuditLogsSourceStatus struct { 809 // Conditions: Array of observed CloudAuditLogsSourceConditions, 810 // indicating the current state of the CloudAuditLogsSource. 811 Conditions []*Condition `json:"conditions,omitempty"` 812 813 // ObservedGeneration: ObservedGeneration is the 'Generation' of the 814 // CloudAuditLogsSource that was last processed by the controller. 815 ObservedGeneration int64 `json:"observedGeneration,omitempty"` 816 817 // SinkUri: SinkURI is the current active sink URI that has been 818 // configured for the Source. +optional 819 SinkUri string `json:"sinkUri,omitempty"` 820 821 // ForceSendFields is a list of field names (e.g. "Conditions") to 822 // unconditionally include in API requests. By default, fields with 823 // empty values are omitted from API requests. However, any non-pointer, 824 // non-interface field appearing in ForceSendFields will be sent to the 825 // server regardless of whether the field is empty or not. This may be 826 // used to include empty fields in Patch requests. 827 ForceSendFields []string `json:"-"` 828 829 // NullFields is a list of field names (e.g. "Conditions") to include in 830 // API requests with the JSON null value. By default, fields with empty 831 // values are omitted from API requests. However, any field with an 832 // empty value appearing in NullFields will be sent to the server as 833 // null. It is an error if a field in this list has a non-empty value. 834 // This may be used to include null fields in Patch requests. 835 NullFields []string `json:"-"` 836} 837 838func (s *CloudAuditLogsSourceStatus) MarshalJSON() ([]byte, error) { 839 type NoMethod CloudAuditLogsSourceStatus 840 raw := NoMethod(*s) 841 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 842} 843 844// CloudEventOverrides: CloudEventOverrides defines arguments for a 845// Source that control the output format of the CloudEvents produced by 846// the Source. 847type CloudEventOverrides struct { 848 // Extensions: Extensions specify what attribute are added or overridden 849 // on the outbound event. Each `Extensions` key-value pair are set on 850 // the event as an attribute extension independently. +optional 851 Extensions map[string]string `json:"extensions,omitempty"` 852 853 // ForceSendFields is a list of field names (e.g. "Extensions") to 854 // unconditionally include in API requests. By default, fields with 855 // empty values are omitted from API requests. However, any non-pointer, 856 // non-interface field appearing in ForceSendFields will be sent to the 857 // server regardless of whether the field is empty or not. This may be 858 // used to include empty fields in Patch requests. 859 ForceSendFields []string `json:"-"` 860 861 // NullFields is a list of field names (e.g. "Extensions") to include in 862 // API requests with the JSON null value. By default, fields with empty 863 // values are omitted from API requests. However, any field with an 864 // empty value appearing in NullFields will be sent to the server as 865 // null. It is an error if a field in this list has a non-empty value. 866 // This may be used to include null fields in Patch requests. 867 NullFields []string `json:"-"` 868} 869 870func (s *CloudEventOverrides) MarshalJSON() ([]byte, error) { 871 type NoMethod CloudEventOverrides 872 raw := NoMethod(*s) 873 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 874} 875 876type CloudPubSubSource struct { 877 // ApiVersion: The API version for this call such as 878 // "events.cloud.google.com/v1alpha1". 879 ApiVersion string `json:"apiVersion,omitempty"` 880 881 // Kind: The kind of resource, in this case "CloudPubSubSource". 882 Kind string `json:"kind,omitempty"` 883 884 // Metadata: Metadata associated with this CloudPubSubSource. 885 Metadata *ObjectMeta `json:"metadata,omitempty"` 886 887 // Spec: Spec defines the desired state of the CloudPubSubSource. 888 Spec *CloudPubSubSourceSpec `json:"spec,omitempty"` 889 890 // Status: Status represents the current state of the CloudPubSubSource. 891 // This data may be out of date. +optional 892 Status *CloudPubSubSourceStatus `json:"status,omitempty"` 893 894 // ServerResponse contains the HTTP response code and headers from the 895 // server. 896 googleapi.ServerResponse `json:"-"` 897 898 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 899 // unconditionally include in API requests. By default, fields with 900 // empty values are omitted from API requests. However, any non-pointer, 901 // non-interface field appearing in ForceSendFields will be sent to the 902 // server regardless of whether the field is empty or not. This may be 903 // used to include empty fields in Patch requests. 904 ForceSendFields []string `json:"-"` 905 906 // NullFields is a list of field names (e.g. "ApiVersion") to include in 907 // API requests with the JSON null value. By default, fields with empty 908 // values are omitted from API requests. However, any field with an 909 // empty value appearing in NullFields will be sent to the server as 910 // null. It is an error if a field in this list has a non-empty value. 911 // This may be used to include null fields in Patch requests. 912 NullFields []string `json:"-"` 913} 914 915func (s *CloudPubSubSource) MarshalJSON() ([]byte, error) { 916 type NoMethod CloudPubSubSource 917 raw := NoMethod(*s) 918 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 919} 920 921// CloudPubSubSourceSpec: The desired state of the CloudPubSubSource. 922type CloudPubSubSourceSpec struct { 923 // AckDeadline: AckDeadline is the default maximum time after a 924 // subscriber receives a message before the subscriber should 925 // acknowledge the message. Defaults to 30 seconds ('30s'). +optional 926 AckDeadline string `json:"ackDeadline,omitempty"` 927 928 // CeOverrides: CloudEventOverrides defines overrides to control the 929 // output format and modifications of the event sent to the sink. 930 // +optional 931 CeOverrides *CloudEventOverrides `json:"ceOverrides,omitempty"` 932 933 // Project: Project is the ID of the Google Cloud Project that the 934 // CloudPubSubSource Topic exists in. If omitted, defaults to same as 935 // the cluster. +optional 936 Project string `json:"project,omitempty"` 937 938 // PubsubSecret: CloudPubSubSourceSecret is the credential to use to 939 // create Topic / PullSubscription resources. If omitted, uses Secret. 940 PubsubSecret *SecretKeySelector `json:"pubsubSecret,omitempty"` 941 942 // RetainAckedMessages: RetainAckedMessages defines whether to retain 943 // acknowledged messages. If true, acknowledged messages will not be 944 // expunged until they fall out of the RetentionDuration window. 945 RetainAckedMessages bool `json:"retainAckedMessages,omitempty"` 946 947 // RetentionDuration: RetentionDuration defines how long to retain 948 // messages in backlog, from the time of publish. If RetainAckedMessages 949 // is true, this duration affects the retention of acknowledged 950 // messages, otherwise only unacknowledged messages are retained. Cannot 951 // be longer than 7 days or shorter than 10 minutes. Defaults to 7 days 952 // ('7d'). +optional 953 RetentionDuration string `json:"retentionDuration,omitempty"` 954 955 // Secret: Secret is the credential to use to create the Scheduler Job. 956 // If not specified, defaults to: Name: google-cloud-key Key: key.json 957 // +optional 958 Secret *SecretKeySelector `json:"secret,omitempty"` 959 960 // Sink: Sink is a reference to an object that will resolve to a domain 961 // name or a URI directly to use as the sink. 962 Sink *Destination `json:"sink,omitempty"` 963 964 // Topic: Topic is the ID of the CloudPubSubSource Topic to Subscribe 965 // to. It must be in the form of the unique identifier within the 966 // project, not the entire name. E.g. it must be 'laconia', not 967 // 'projects/my-proj/topics/laconia'. 968 Topic string `json:"topic,omitempty"` 969 970 // ForceSendFields is a list of field names (e.g. "AckDeadline") to 971 // unconditionally include in API requests. By default, fields with 972 // empty values are omitted from API requests. However, any non-pointer, 973 // non-interface field appearing in ForceSendFields will be sent to the 974 // server regardless of whether the field is empty or not. This may be 975 // used to include empty fields in Patch requests. 976 ForceSendFields []string `json:"-"` 977 978 // NullFields is a list of field names (e.g. "AckDeadline") to include 979 // in API requests with the JSON null value. By default, fields with 980 // empty values are omitted from API requests. However, any field with 981 // an empty value appearing in NullFields will be sent to the server as 982 // null. It is an error if a field in this list has a non-empty value. 983 // This may be used to include null fields in Patch requests. 984 NullFields []string `json:"-"` 985} 986 987func (s *CloudPubSubSourceSpec) MarshalJSON() ([]byte, error) { 988 type NoMethod CloudPubSubSourceSpec 989 raw := NoMethod(*s) 990 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 991} 992 993// CloudPubSubSourceStatus: CloudPubSubSourceStatus represents the 994// current state of a CloudPubSubSource. 995type CloudPubSubSourceStatus struct { 996 // Conditions: Array of observed CloudPubSubSourceConditions, indicating 997 // the current state of the CloudPubSubSource. 998 Conditions []*Condition `json:"conditions,omitempty"` 999 1000 // ObservedGeneration: ObservedGeneration is the 'Generation' of the 1001 // CloudPubSubSource that was last processed by the controller. 1002 ObservedGeneration int64 `json:"observedGeneration,omitempty"` 1003 1004 // SinkUri: SinkURI is the current active sink URI that has been 1005 // configured for the Source. +optional 1006 SinkUri string `json:"sinkUri,omitempty"` 1007 1008 // ForceSendFields is a list of field names (e.g. "Conditions") to 1009 // unconditionally include in API requests. By default, fields with 1010 // empty values are omitted from API requests. However, any non-pointer, 1011 // non-interface field appearing in ForceSendFields will be sent to the 1012 // server regardless of whether the field is empty or not. This may be 1013 // used to include empty fields in Patch requests. 1014 ForceSendFields []string `json:"-"` 1015 1016 // NullFields is a list of field names (e.g. "Conditions") to include in 1017 // API requests with the JSON null value. By default, fields with empty 1018 // values are omitted from API requests. However, any field with an 1019 // empty value appearing in NullFields will be sent to the server as 1020 // null. It is an error if a field in this list has a non-empty value. 1021 // This may be used to include null fields in Patch requests. 1022 NullFields []string `json:"-"` 1023} 1024 1025func (s *CloudPubSubSourceStatus) MarshalJSON() ([]byte, error) { 1026 type NoMethod CloudPubSubSourceStatus 1027 raw := NoMethod(*s) 1028 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1029} 1030 1031// CloudSchedulerSource: The CloudSchedulerSource resource. 1032type CloudSchedulerSource struct { 1033 // ApiVersion: The API version for this call such as 1034 // "events.cloud.google.com/v1alpha1". 1035 ApiVersion string `json:"apiVersion,omitempty"` 1036 1037 // Kind: The kind of resource, in this case "CloudSchedulerSource". 1038 Kind string `json:"kind,omitempty"` 1039 1040 // Metadata: Metadata associated with this CloudSchedulerSource. 1041 Metadata *ObjectMeta `json:"metadata,omitempty"` 1042 1043 // Spec: Spec defines the desired state of the CloudSchedulerSource. 1044 Spec *CloudSchedulerSourceSpec `json:"spec,omitempty"` 1045 1046 // Status: Status represents the current state of the 1047 // CloudSchedulerSource. This data may be out of date. 1048 Status *CloudSchedulerSourceStatus `json:"status,omitempty"` 1049 1050 // ServerResponse contains the HTTP response code and headers from the 1051 // server. 1052 googleapi.ServerResponse `json:"-"` 1053 1054 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1055 // unconditionally include in API requests. By default, fields with 1056 // empty values are omitted from API requests. However, any non-pointer, 1057 // non-interface field appearing in ForceSendFields will be sent to the 1058 // server regardless of whether the field is empty or not. This may be 1059 // used to include empty fields in Patch requests. 1060 ForceSendFields []string `json:"-"` 1061 1062 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1063 // API requests with the JSON null value. By default, fields with empty 1064 // values are omitted from API requests. However, any field with an 1065 // empty value appearing in NullFields will be sent to the server as 1066 // null. It is an error if a field in this list has a non-empty value. 1067 // This may be used to include null fields in Patch requests. 1068 NullFields []string `json:"-"` 1069} 1070 1071func (s *CloudSchedulerSource) MarshalJSON() ([]byte, error) { 1072 type NoMethod CloudSchedulerSource 1073 raw := NoMethod(*s) 1074 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1075} 1076 1077// CloudSchedulerSourceSpec: The desired state of the 1078// CloudSchedulerSource. 1079type CloudSchedulerSourceSpec struct { 1080 // CeOverrides: CloudEventOverrides defines overrides to control the 1081 // output format and modifications of the event sent to the sink. 1082 CeOverrides *CloudEventOverrides `json:"ceOverrides,omitempty"` 1083 1084 // Data: Data to send in the payload of the Event. 1085 Data string `json:"data,omitempty"` 1086 1087 // Location: Location to create the Scheduler job in. 1088 Location string `json:"location,omitempty"` 1089 1090 // Project: Project is the ID of the Google Cloud Project that the 1091 // CloudPubSubSource Topic exists in. If omitted, defaults to same as 1092 // the cluster. 1093 Project string `json:"project,omitempty"` 1094 1095 // PubsubSecret: CloudPubSubSourceSecret is the credential to use to 1096 // create Topic / PullSubscription resources. If omitted, uses Secret. 1097 PubsubSecret *SecretKeySelector `json:"pubsubSecret,omitempty"` 1098 1099 // Schedule: Schedule in cron format, for example: "* * * * *" would be 1100 // run every minute. 1101 Schedule string `json:"schedule,omitempty"` 1102 1103 // Secret: Secret is the credential to use to create the Scheduler Job. 1104 // If not specified, defaults to: Name: google-cloud-key Key: key.json 1105 Secret *SecretKeySelector `json:"secret,omitempty"` 1106 1107 // Sink: Sink is a reference to an object that will resolve to a domain 1108 // name or a URI directly to use as the sink. 1109 Sink *Destination `json:"sink,omitempty"` 1110 1111 // ForceSendFields is a list of field names (e.g. "CeOverrides") to 1112 // unconditionally include in API requests. By default, fields with 1113 // empty values are omitted from API requests. However, any non-pointer, 1114 // non-interface field appearing in ForceSendFields will be sent to the 1115 // server regardless of whether the field is empty or not. This may be 1116 // used to include empty fields in Patch requests. 1117 ForceSendFields []string `json:"-"` 1118 1119 // NullFields is a list of field names (e.g. "CeOverrides") to include 1120 // in API requests with the JSON null value. By default, fields with 1121 // empty values are omitted from API requests. However, any field with 1122 // an empty value appearing in NullFields will be sent to the server as 1123 // null. It is an error if a field in this list has a non-empty value. 1124 // This may be used to include null fields in Patch requests. 1125 NullFields []string `json:"-"` 1126} 1127 1128func (s *CloudSchedulerSourceSpec) MarshalJSON() ([]byte, error) { 1129 type NoMethod CloudSchedulerSourceSpec 1130 raw := NoMethod(*s) 1131 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1132} 1133 1134// CloudSchedulerSourceStatus: CloudSchedulerSourceStatus represents the 1135// current state of a CloudSchedulerSource. 1136type CloudSchedulerSourceStatus struct { 1137 // Conditions: Array of observed CloudSchedulerSourceConditions, 1138 // indicating the current state of the CloudSchedulerSource. 1139 Conditions []*Condition `json:"conditions,omitempty"` 1140 1141 // ObservedGeneration: ObservedGeneration is the 'Generation' of the 1142 // CloudSchedulerSource that was last processed by the controller. 1143 ObservedGeneration int64 `json:"observedGeneration,omitempty"` 1144 1145 // SinkUri: SinkURI is the current active sink URI that has been 1146 // configured for the Source. 1147 SinkUri string `json:"sinkUri,omitempty"` 1148 1149 // ForceSendFields is a list of field names (e.g. "Conditions") to 1150 // unconditionally include in API requests. By default, fields with 1151 // empty values are omitted from API requests. However, any non-pointer, 1152 // non-interface field appearing in ForceSendFields will be sent to the 1153 // server regardless of whether the field is empty or not. This may be 1154 // used to include empty fields in Patch requests. 1155 ForceSendFields []string `json:"-"` 1156 1157 // NullFields is a list of field names (e.g. "Conditions") to include in 1158 // API requests with the JSON null value. By default, fields with empty 1159 // values are omitted from API requests. However, any field with an 1160 // empty value appearing in NullFields will be sent to the server as 1161 // null. It is an error if a field in this list has a non-empty value. 1162 // This may be used to include null fields in Patch requests. 1163 NullFields []string `json:"-"` 1164} 1165 1166func (s *CloudSchedulerSourceStatus) MarshalJSON() ([]byte, error) { 1167 type NoMethod CloudSchedulerSourceStatus 1168 raw := NoMethod(*s) 1169 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1170} 1171 1172// CloudStorageSource: The CloudStorageSource resource. 1173type CloudStorageSource struct { 1174 // ApiVersion: The API version for this call such as 1175 // "events.cloud.google.com/v1alpha1". 1176 ApiVersion string `json:"apiVersion,omitempty"` 1177 1178 // Kind: The kind of resource, in this case "CloudStorageSource". 1179 Kind string `json:"kind,omitempty"` 1180 1181 // Metadata: Metadata associated with this CloudStorageSource. 1182 Metadata *ObjectMeta `json:"metadata,omitempty"` 1183 1184 // Spec: Spec defines the desired state of the CloudStorageSource. 1185 Spec *CloudStorageSourceSpec `json:"spec,omitempty"` 1186 1187 // Status: Status represents the current state of the 1188 // CloudStorageSource. This data may be out of date. 1189 Status *CloudStorageSourceStatus `json:"status,omitempty"` 1190 1191 // ServerResponse contains the HTTP response code and headers from the 1192 // server. 1193 googleapi.ServerResponse `json:"-"` 1194 1195 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1196 // unconditionally include in API requests. By default, fields with 1197 // empty values are omitted from API requests. However, any non-pointer, 1198 // non-interface field appearing in ForceSendFields will be sent to the 1199 // server regardless of whether the field is empty or not. This may be 1200 // used to include empty fields in Patch requests. 1201 ForceSendFields []string `json:"-"` 1202 1203 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1204 // API requests with the JSON null value. By default, fields with empty 1205 // values are omitted from API requests. However, any field with an 1206 // empty value appearing in NullFields will be sent to the server as 1207 // null. It is an error if a field in this list has a non-empty value. 1208 // This may be used to include null fields in Patch requests. 1209 NullFields []string `json:"-"` 1210} 1211 1212func (s *CloudStorageSource) MarshalJSON() ([]byte, error) { 1213 type NoMethod CloudStorageSource 1214 raw := NoMethod(*s) 1215 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1216} 1217 1218// CloudStorageSourceSpec: The desired state of the CloudStorageSource. 1219type CloudStorageSourceSpec struct { 1220 // Bucket: Bucket to subscribe to. 1221 Bucket string `json:"bucket,omitempty"` 1222 1223 // CeOverrides: CloudEventOverrides defines overrides to control the 1224 // output format and modifications of the event sent to the sink. 1225 CeOverrides *CloudEventOverrides `json:"ceOverrides,omitempty"` 1226 1227 // EventTypes: EventTypes to subscribe to. If unspecified, then 1228 // subscribe to all events. 1229 EventTypes []string `json:"eventTypes,omitempty"` 1230 1231 // ObjectNamePrefix: ObjectNamePrefix limits the notifications to 1232 // objects with this prefix. 1233 ObjectNamePrefix string `json:"objectNamePrefix,omitempty"` 1234 1235 // PayloadFormat: PayloadFormat specifies the contents of the message 1236 // payload. See 1237 // https://cloud.google.com/storage/docs/pubsub-notifications#payload. 1238 PayloadFormat string `json:"payloadFormat,omitempty"` 1239 1240 // Project: Project is the ID of the Google Cloud Project that the 1241 // PubSub Topic exists in. If omitted, defaults to same as the cluster. 1242 Project string `json:"project,omitempty"` 1243 1244 // PubsubSecret: PubSubSecret is the credential to use to create Topic / 1245 // PullSubscription resources. If omitted, uses Secret. 1246 PubsubSecret *SecretKeySelector `json:"pubsubSecret,omitempty"` 1247 1248 // Secret: Secret is the credential to use to create the Scheduler Job. 1249 // If not specified, defaults to: Name: google-cloud-key Key: key.json 1250 Secret *SecretKeySelector `json:"secret,omitempty"` 1251 1252 // ServiceAccountName: ServiceAccountName holds the name of the 1253 // Kubernetes service account as which the underlying K8s resources 1254 // should be run. If unspecified this will default to the "default" 1255 // service account for the namespace in which the GCS exists. 1256 ServiceAccountName string `json:"serviceAccountName,omitempty"` 1257 1258 // Sink: Sink is a reference to an object that will resolve to a domain 1259 // name or a URI directly to use as the sink. 1260 Sink *Destination `json:"sink,omitempty"` 1261 1262 // ForceSendFields is a list of field names (e.g. "Bucket") to 1263 // unconditionally include in API requests. By default, fields with 1264 // empty values are omitted from API requests. However, any non-pointer, 1265 // non-interface field appearing in ForceSendFields will be sent to the 1266 // server regardless of whether the field is empty or not. This may be 1267 // used to include empty fields in Patch requests. 1268 ForceSendFields []string `json:"-"` 1269 1270 // NullFields is a list of field names (e.g. "Bucket") to include in API 1271 // requests with the JSON null value. By default, fields with empty 1272 // values are omitted from API requests. However, any field with an 1273 // empty value appearing in NullFields will be sent to the server as 1274 // null. It is an error if a field in this list has a non-empty value. 1275 // This may be used to include null fields in Patch requests. 1276 NullFields []string `json:"-"` 1277} 1278 1279func (s *CloudStorageSourceSpec) MarshalJSON() ([]byte, error) { 1280 type NoMethod CloudStorageSourceSpec 1281 raw := NoMethod(*s) 1282 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1283} 1284 1285// CloudStorageSourceStatus: CloudStorageSourceStatus represents the 1286// current state of a CloudStorageSource. 1287type CloudStorageSourceStatus struct { 1288 // Conditions: Array of observed CloudStorageSourceConditions, 1289 // indicating the current state of the CloudStorageSource. 1290 Conditions []*Condition `json:"conditions,omitempty"` 1291 1292 // ObservedGeneration: ObservedGeneration is the 'Generation' of the 1293 // CloudStorageSource that was last processed by the controller. 1294 ObservedGeneration int64 `json:"observedGeneration,omitempty"` 1295 1296 // SinkUri: SinkURI is the current active sink URI that has been 1297 // configured for the Source. 1298 SinkUri string `json:"sinkUri,omitempty"` 1299 1300 // ForceSendFields is a list of field names (e.g. "Conditions") to 1301 // unconditionally include in API requests. By default, fields with 1302 // empty values are omitted from API requests. However, any non-pointer, 1303 // non-interface field appearing in ForceSendFields will be sent to the 1304 // server regardless of whether the field is empty or not. This may be 1305 // used to include empty fields in Patch requests. 1306 ForceSendFields []string `json:"-"` 1307 1308 // NullFields is a list of field names (e.g. "Conditions") to include in 1309 // API requests with the JSON null value. By default, fields with empty 1310 // values are omitted from API requests. However, any field with an 1311 // empty value appearing in NullFields will be sent to the server as 1312 // null. It is an error if a field in this list has a non-empty value. 1313 // This may be used to include null fields in Patch requests. 1314 NullFields []string `json:"-"` 1315} 1316 1317func (s *CloudStorageSourceStatus) MarshalJSON() ([]byte, error) { 1318 type NoMethod CloudStorageSourceStatus 1319 raw := NoMethod(*s) 1320 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1321} 1322 1323// Condition: Condition defines a generic condition for a Resource 1324type Condition struct { 1325 // LastTransitionTime: Optional. Last time the condition transitioned 1326 // from one status to another. 1327 LastTransitionTime string `json:"lastTransitionTime,omitempty"` 1328 1329 // Message: Optional. Human readable message indicating details about 1330 // the current status. 1331 Message string `json:"message,omitempty"` 1332 1333 // Reason: Optional. One-word CamelCase reason for the condition's last 1334 // transition. 1335 Reason string `json:"reason,omitempty"` 1336 1337 // Severity: Optional. How to interpret failures of this condition, one 1338 // of Error, Warning, Info 1339 Severity string `json:"severity,omitempty"` 1340 1341 // Status: Status of the condition, one of True, False, Unknown. 1342 Status string `json:"status,omitempty"` 1343 1344 // Type: type is used to communicate the status of the reconciliation 1345 // process. See also: 1346 // https://github.com/knative/serving/blob/master/docs/spec/errors.md#error-conditions-and-reporting Types common to all resources include: * "Ready": True when the Resource is 1347 // ready. 1348 Type string `json:"type,omitempty"` 1349 1350 // ForceSendFields is a list of field names (e.g. "LastTransitionTime") 1351 // to unconditionally include in API requests. By default, fields with 1352 // empty values are omitted from API requests. However, any non-pointer, 1353 // non-interface field appearing in ForceSendFields will be sent to the 1354 // server regardless of whether the field is empty or not. This may be 1355 // used to include empty fields in Patch requests. 1356 ForceSendFields []string `json:"-"` 1357 1358 // NullFields is a list of field names (e.g. "LastTransitionTime") to 1359 // include in API requests with the JSON null value. By default, fields 1360 // with empty values are omitted from API requests. However, any field 1361 // with an empty value appearing in NullFields will be sent to the 1362 // server as null. It is an error if a field in this list has a 1363 // non-empty value. This may be used to include null fields in Patch 1364 // requests. 1365 NullFields []string `json:"-"` 1366} 1367 1368func (s *Condition) MarshalJSON() ([]byte, error) { 1369 type NoMethod Condition 1370 raw := NoMethod(*s) 1371 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1372} 1373 1374// ConfigMapEnvSource: ConfigMapEnvSource selects a ConfigMap to 1375// populate the environment variables with. The contents of the target 1376// ConfigMap's Data field will represent the key-value pairs as 1377// environment variables. 1378type ConfigMapEnvSource struct { 1379 // LocalObjectReference: This field should not be used directly as it is 1380 // meant to be inlined directly into the message. Use the "name" field 1381 // instead. 1382 LocalObjectReference *LocalObjectReference `json:"localObjectReference,omitempty"` 1383 1384 // Name: Cloud Run fully managed: not supported Cloud Run for Anthos: 1385 // supported The ConfigMap to select from. 1386 Name string `json:"name,omitempty"` 1387 1388 // Optional: Cloud Run fully managed: not supported Cloud Run for 1389 // Anthos: supported Specify whether the ConfigMap must be defined 1390 // +optional 1391 Optional bool `json:"optional,omitempty"` 1392 1393 // ForceSendFields is a list of field names (e.g. 1394 // "LocalObjectReference") to unconditionally include in API requests. 1395 // By default, fields with empty values are omitted from API requests. 1396 // However, any non-pointer, non-interface field appearing in 1397 // ForceSendFields will be sent to the server regardless of whether the 1398 // field is empty or not. This may be used to include empty fields in 1399 // Patch requests. 1400 ForceSendFields []string `json:"-"` 1401 1402 // NullFields is a list of field names (e.g. "LocalObjectReference") to 1403 // include in API requests with the JSON null value. By default, fields 1404 // with empty values are omitted from API requests. However, any field 1405 // with an empty value appearing in NullFields will be sent to the 1406 // server as null. It is an error if a field in this list has a 1407 // non-empty value. This may be used to include null fields in Patch 1408 // requests. 1409 NullFields []string `json:"-"` 1410} 1411 1412func (s *ConfigMapEnvSource) MarshalJSON() ([]byte, error) { 1413 type NoMethod ConfigMapEnvSource 1414 raw := NoMethod(*s) 1415 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1416} 1417 1418// ConfigMapKeySelector: Cloud Run fully managed: not supported Cloud 1419// Run on GKE: supported Selects a key from a ConfigMap. 1420type ConfigMapKeySelector struct { 1421 // Key: Cloud Run fully managed: not supported Cloud Run on GKE: 1422 // supported The key to select. 1423 Key string `json:"key,omitempty"` 1424 1425 // LocalObjectReference: This field should not be used directly as it is 1426 // meant to be inlined directly into the message. Use the "name" field 1427 // instead. 1428 LocalObjectReference *LocalObjectReference `json:"localObjectReference,omitempty"` 1429 1430 // Name: Cloud Run fully managed: not supported Cloud Run on GKE: 1431 // supported The ConfigMap to select from. 1432 Name string `json:"name,omitempty"` 1433 1434 // Optional: Cloud Run fully managed: not supported Cloud Run on GKE: 1435 // supported Specify whether the ConfigMap or its key must be defined 1436 // +optional 1437 Optional bool `json:"optional,omitempty"` 1438 1439 // ForceSendFields is a list of field names (e.g. "Key") to 1440 // unconditionally include in API requests. By default, fields with 1441 // empty values are omitted from API requests. However, any non-pointer, 1442 // non-interface field appearing in ForceSendFields will be sent to the 1443 // server regardless of whether the field is empty or not. This may be 1444 // used to include empty fields in Patch requests. 1445 ForceSendFields []string `json:"-"` 1446 1447 // NullFields is a list of field names (e.g. "Key") to include in API 1448 // requests with the JSON null value. By default, fields with empty 1449 // values are omitted from API requests. However, any field with an 1450 // empty value appearing in NullFields will be sent to the server as 1451 // null. It is an error if a field in this list has a non-empty value. 1452 // This may be used to include null fields in Patch requests. 1453 NullFields []string `json:"-"` 1454} 1455 1456func (s *ConfigMapKeySelector) MarshalJSON() ([]byte, error) { 1457 type NoMethod ConfigMapKeySelector 1458 raw := NoMethod(*s) 1459 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1460} 1461 1462// ConfigMapVolumeSource: Adapts a ConfigMap into a volume. The contents 1463// of the target ConfigMap's Data field will be presented in a volume as 1464// files using the keys in the Data field as the file names, unless the 1465// items element is populated with specific mappings of keys to paths. 1466type ConfigMapVolumeSource struct { 1467 // DefaultMode: Mode bits to use on created files by default. Must be a 1468 // value between 0 and 0777. Defaults to 0644. Directories within the 1469 // path are not affected by this setting. This might be in conflict with 1470 // other options that affect the file mode, like fsGroup, and the result 1471 // can be other mode bits set. 1472 DefaultMode int64 `json:"defaultMode,omitempty"` 1473 1474 // Items: If unspecified, each key-value pair in the Data field of the 1475 // referenced Secret will be projected into the volume as a file whose 1476 // name is the key and content is the value. If specified, the listed 1477 // keys will be projected into the specified paths, and unlisted keys 1478 // will not be present. If a key is specified which is not present in 1479 // the Secret, the volume setup will error unless it is marked optional. 1480 Items []*KeyToPath `json:"items,omitempty"` 1481 1482 // Name: Name of the config. 1483 Name string `json:"name,omitempty"` 1484 1485 // Optional: Specify whether the Secret or its keys must be defined. 1486 Optional bool `json:"optional,omitempty"` 1487 1488 // ForceSendFields is a list of field names (e.g. "DefaultMode") to 1489 // unconditionally include in API requests. By default, fields with 1490 // empty values are omitted from API requests. However, any non-pointer, 1491 // non-interface field appearing in ForceSendFields will be sent to the 1492 // server regardless of whether the field is empty or not. This may be 1493 // used to include empty fields in Patch requests. 1494 ForceSendFields []string `json:"-"` 1495 1496 // NullFields is a list of field names (e.g. "DefaultMode") to include 1497 // in API requests with the JSON null value. By default, fields with 1498 // empty values are omitted from API requests. However, any field with 1499 // an empty value appearing in NullFields will be sent to the server as 1500 // null. It is an error if a field in this list has a non-empty value. 1501 // This may be used to include null fields in Patch requests. 1502 NullFields []string `json:"-"` 1503} 1504 1505func (s *ConfigMapVolumeSource) MarshalJSON() ([]byte, error) { 1506 type NoMethod ConfigMapVolumeSource 1507 raw := NoMethod(*s) 1508 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1509} 1510 1511// Configuration: Configuration represents the "floating HEAD" of a 1512// linear history of Revisions, and optionally how the containers those 1513// revisions reference are built. Users create new Revisions by updating 1514// the Configuration's spec. The "latest created" revision's name is 1515// available under status, as is the "latest ready" revision's name. See 1516// also: 1517// https://github.com/knative/serving/blob/master/docs/spec/overview.md#configuration 1518type Configuration struct { 1519 // ApiVersion: The API version for this call such as 1520 // "serving.knative.dev/v1alpha1". 1521 ApiVersion string `json:"apiVersion,omitempty"` 1522 1523 // Kind: The kind of resource, in this case always "Configuration". 1524 Kind string `json:"kind,omitempty"` 1525 1526 // Metadata: Metadata associated with this Configuration, including 1527 // name, namespace, labels, and annotations. 1528 Metadata *ObjectMeta `json:"metadata,omitempty"` 1529 1530 // Spec: Spec holds the desired state of the Configuration (from the 1531 // client). 1532 Spec *ConfigurationSpec `json:"spec,omitempty"` 1533 1534 // Status: Status communicates the observed state of the Configuration 1535 // (from the controller). 1536 Status *ConfigurationStatus `json:"status,omitempty"` 1537 1538 // ServerResponse contains the HTTP response code and headers from the 1539 // server. 1540 googleapi.ServerResponse `json:"-"` 1541 1542 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1543 // unconditionally include in API requests. By default, fields with 1544 // empty values are omitted from API requests. However, any non-pointer, 1545 // non-interface field appearing in ForceSendFields will be sent to the 1546 // server regardless of whether the field is empty or not. This may be 1547 // used to include empty fields in Patch requests. 1548 ForceSendFields []string `json:"-"` 1549 1550 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1551 // API requests with the JSON null value. By default, fields with empty 1552 // values are omitted from API requests. However, any field with an 1553 // empty value appearing in NullFields will be sent to the server as 1554 // null. It is an error if a field in this list has a non-empty value. 1555 // This may be used to include null fields in Patch requests. 1556 NullFields []string `json:"-"` 1557} 1558 1559func (s *Configuration) MarshalJSON() ([]byte, error) { 1560 type NoMethod Configuration 1561 raw := NoMethod(*s) 1562 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1563} 1564 1565// ConfigurationCondition: ConfigurationCondition defines a readiness 1566// condition for a Configuration. 1567type ConfigurationCondition struct { 1568 // LastTransitionTime: Last time the condition transitioned from one 1569 // status to another. +optional 1570 LastTransitionTime string `json:"lastTransitionTime,omitempty"` 1571 1572 // Message: Human-readable message indicating details about last 1573 // transition. +optional 1574 Message string `json:"message,omitempty"` 1575 1576 // Reason: One-word CamelCase reason for the condition's last 1577 // transition. +optional 1578 Reason string `json:"reason,omitempty"` 1579 1580 // Severity: How to interpret failures of this condition, one of Error, 1581 // Warning, Info +optional 1582 Severity string `json:"severity,omitempty"` 1583 1584 // Status: Status of the condition, one of True, False, Unknown. 1585 Status string `json:"status,omitempty"` 1586 1587 // Type: ConfigurationConditionType is used to communicate the status of 1588 // the reconciliation process. See also: 1589 // https://github.com/knative/serving/blob/master/docs/spec/errors.md#error-conditions-and-reporting Types 1590 // include:"Ready" 1591 Type string `json:"type,omitempty"` 1592 1593 // ForceSendFields is a list of field names (e.g. "LastTransitionTime") 1594 // to unconditionally include in API requests. By default, fields with 1595 // empty values are omitted from API requests. However, any non-pointer, 1596 // non-interface field appearing in ForceSendFields will be sent to the 1597 // server regardless of whether the field is empty or not. This may be 1598 // used to include empty fields in Patch requests. 1599 ForceSendFields []string `json:"-"` 1600 1601 // NullFields is a list of field names (e.g. "LastTransitionTime") to 1602 // include in API requests with the JSON null value. By default, fields 1603 // with empty values are omitted from API requests. However, any field 1604 // with an empty value appearing in NullFields will be sent to the 1605 // server as null. It is an error if a field in this list has a 1606 // non-empty value. This may be used to include null fields in Patch 1607 // requests. 1608 NullFields []string `json:"-"` 1609} 1610 1611func (s *ConfigurationCondition) MarshalJSON() ([]byte, error) { 1612 type NoMethod ConfigurationCondition 1613 raw := NoMethod(*s) 1614 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1615} 1616 1617// ConfigurationSpec: ConfigurationSpec holds the desired state of the 1618// Configuration (from the client). 1619type ConfigurationSpec struct { 1620 // Generation: Deprecated and not currently populated by Cloud Run. See 1621 // metadata.generation instead, which is the sequence number containing 1622 // the latest generation of the desired state. Read-only. 1623 Generation int64 `json:"generation,omitempty"` 1624 1625 // RevisionTemplate: RevisionTemplate holds the latest specification for 1626 // the Revision to be stamped out. The template references the container 1627 // image, and may also include labels and annotations that should be 1628 // attached to the Revision. To correlate a Revision, and/or to force a 1629 // Revision to be created when the spec doesn't otherwise change, a 1630 // nonce label may be provided in the template metadata. For more 1631 // details, see: 1632 // https://github.com/knative/serving/blob/master/docs/client-conventions.md#associate-modifications-with-revisions Cloud Run does not currently support referencing a build that is responsible for materializing the container image from 1633 // source. 1634 RevisionTemplate *RevisionTemplate `json:"revisionTemplate,omitempty"` 1635 1636 // Template: Template holds the latest specification for the Revision to 1637 // be stamped out. 1638 Template *RevisionTemplate `json:"template,omitempty"` 1639 1640 // ForceSendFields is a list of field names (e.g. "Generation") to 1641 // unconditionally include in API requests. By default, fields with 1642 // empty values are omitted from API requests. However, any non-pointer, 1643 // non-interface field appearing in ForceSendFields will be sent to the 1644 // server regardless of whether the field is empty or not. This may be 1645 // used to include empty fields in Patch requests. 1646 ForceSendFields []string `json:"-"` 1647 1648 // NullFields is a list of field names (e.g. "Generation") to include in 1649 // API requests with the JSON null value. By default, fields with empty 1650 // values are omitted from API requests. However, any field with an 1651 // empty value appearing in NullFields will be sent to the server as 1652 // null. It is an error if a field in this list has a non-empty value. 1653 // This may be used to include null fields in Patch requests. 1654 NullFields []string `json:"-"` 1655} 1656 1657func (s *ConfigurationSpec) MarshalJSON() ([]byte, error) { 1658 type NoMethod ConfigurationSpec 1659 raw := NoMethod(*s) 1660 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1661} 1662 1663// ConfigurationStatus: ConfigurationStatus communicates the observed 1664// state of the Configuration (from the controller). 1665type ConfigurationStatus struct { 1666 // Conditions: Conditions communicates information about 1667 // ongoing/complete reconciliation processes that bring the "spec" 1668 // inline with the observed state of the world. 1669 Conditions []*ConfigurationCondition `json:"conditions,omitempty"` 1670 1671 // LatestCreatedRevisionName: LatestCreatedRevisionName is the last 1672 // revision that was created from this Configuration. It might not be 1673 // ready yet, for that use LatestReadyRevisionName. 1674 LatestCreatedRevisionName string `json:"latestCreatedRevisionName,omitempty"` 1675 1676 // LatestReadyRevisionName: LatestReadyRevisionName holds the name of 1677 // the latest Revision stamped out from this Configuration that has had 1678 // its "Ready" condition become "True". 1679 LatestReadyRevisionName string `json:"latestReadyRevisionName,omitempty"` 1680 1681 // ObservedGeneration: ObservedGeneration is the 'Generation' of the 1682 // Configuration that was last processed by the controller. The observed 1683 // generation is updated even if the controller failed to process the 1684 // spec and create the Revision. Clients polling for completed 1685 // reconciliation should poll until observedGeneration = 1686 // metadata.generation, and the Ready condition's status is True or 1687 // False. 1688 ObservedGeneration int64 `json:"observedGeneration,omitempty"` 1689 1690 // ForceSendFields is a list of field names (e.g. "Conditions") to 1691 // unconditionally include in API requests. By default, fields with 1692 // empty values are omitted from API requests. However, any non-pointer, 1693 // non-interface field appearing in ForceSendFields will be sent to the 1694 // server regardless of whether the field is empty or not. This may be 1695 // used to include empty fields in Patch requests. 1696 ForceSendFields []string `json:"-"` 1697 1698 // NullFields is a list of field names (e.g. "Conditions") to include in 1699 // API requests with the JSON null value. By default, fields with empty 1700 // values are omitted from API requests. However, any field with an 1701 // empty value appearing in NullFields will be sent to the server as 1702 // null. It is an error if a field in this list has a non-empty value. 1703 // This may be used to include null fields in Patch requests. 1704 NullFields []string `json:"-"` 1705} 1706 1707func (s *ConfigurationStatus) MarshalJSON() ([]byte, error) { 1708 type NoMethod ConfigurationStatus 1709 raw := NoMethod(*s) 1710 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1711} 1712 1713// Container: A single application container. This specifies both the 1714// container to run, the command to run in the container and the 1715// arguments to supply to it. Note that additional arguments may be 1716// supplied by the system to the container at runtime. 1717type Container struct { 1718 // Args: Arguments to the entrypoint. The docker image's CMD is used if 1719 // this is not provided. Variable references $(VAR_NAME) are expanded 1720 // using the container's environment. If a variable cannot be resolved, 1721 // the reference in the input string will be unchanged. The $(VAR_NAME) 1722 // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped 1723 // references will never be expanded, regardless of whether the variable 1724 // exists or not. Cannot be updated. More info: 1725 // https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell 1726 // +optional 1727 Args []string `json:"args,omitempty"` 1728 1729 // Command: Entrypoint array. Not executed within a shell. The docker 1730 // image's ENTRYPOINT is used if this is not provided. Variable 1731 // references $(VAR_NAME) are expanded using the container's 1732 // environment. If a variable cannot be resolved, the reference in the 1733 // input string will be unchanged. The $(VAR_NAME) syntax can be escaped 1734 // with a double $$, ie: $$(VAR_NAME). Escaped references will never be 1735 // expanded, regardless of whether the variable exists or not. Cannot be 1736 // updated. More info: 1737 // https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell 1738 // +optional 1739 Command []string `json:"command,omitempty"` 1740 1741 // Env: List of environment variables to set in the container. Cannot be 1742 // updated. +optional 1743 Env []*EnvVar `json:"env,omitempty"` 1744 1745 // EnvFrom: List of sources to populate environment variables in the 1746 // container. The keys defined within a source must be a C_IDENTIFIER. 1747 // All invalid keys will be reported as an event when the container is 1748 // starting. When a key exists in multiple sources, the value associated 1749 // with the last source will take precedence. Values defined by an Env 1750 // with a duplicate key will take precedence. Cannot be updated. 1751 // +optional 1752 EnvFrom []*EnvFromSource `json:"envFrom,omitempty"` 1753 1754 // Image: Docker image name. More info: 1755 // https://kubernetes.io/docs/concepts/containers/images 1756 Image string `json:"image,omitempty"` 1757 1758 // ImagePullPolicy: Image pull policy. One of Always, Never, 1759 // IfNotPresent. Defaults to Always if :latest tag is specified, or 1760 // IfNotPresent otherwise. Cannot be updated. More info: 1761 // https://kubernetes.io/docs/concepts/containers/images#updating-images 1762 // +optional 1763 ImagePullPolicy string `json:"imagePullPolicy,omitempty"` 1764 1765 // Lifecycle: Actions that the management system should take in response 1766 // to container lifecycle events. Cannot be updated. +optional 1767 Lifecycle *Lifecycle `json:"lifecycle,omitempty"` 1768 1769 // LivenessProbe: Periodic probe of container liveness. Container will 1770 // be restarted if the probe fails. Cannot be updated. More info: 1771 // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 1772 // +optional 1773 LivenessProbe *Probe `json:"livenessProbe,omitempty"` 1774 1775 // Name: Name of the container specified as a DNS_LABEL. Each container 1776 // must have a unique name (DNS_LABEL). Cannot be updated. 1777 Name string `json:"name,omitempty"` 1778 1779 // Ports: List of ports to expose from the container. Exposing a port 1780 // here gives the system additional information about the network 1781 // connections a container uses, but is primarily informational. Not 1782 // specifying a port here DOES NOT prevent that port from being exposed. 1783 // Any port which is listening on the default "0.0.0.0" address inside a 1784 // container will be accessible from the network. Cannot be updated. 1785 // +optional 1786 Ports []*ContainerPort `json:"ports,omitempty"` 1787 1788 // ReadinessProbe: Periodic probe of container service readiness. 1789 // Container will be removed from service endpoints if the probe fails. 1790 // Cannot be updated. More info: 1791 // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 1792 // +optional 1793 ReadinessProbe *Probe `json:"readinessProbe,omitempty"` 1794 1795 // Resources: Compute Resources required by this container. Cannot be 1796 // updated. More info: 1797 // https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources 1798 // +optional 1799 Resources *ResourceRequirements `json:"resources,omitempty"` 1800 1801 // SecurityContext: Security options the pod should run with. More info: 1802 // https://kubernetes.io/docs/concepts/policy/security-context/ More 1803 // info: 1804 // https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ 1805 // +optional 1806 SecurityContext *SecurityContext `json:"securityContext,omitempty"` 1807 1808 // Stdin: Whether this container should allocate a buffer for stdin in 1809 // the container runtime. If this is not set, reads from stdin in the 1810 // container will always result in EOF. Default is false. +optional 1811 Stdin bool `json:"stdin,omitempty"` 1812 1813 // StdinOnce: Whether the container runtime should close the stdin 1814 // channel after it has been opened by a single attach. When stdin is 1815 // true the stdin stream will remain open across multiple attach 1816 // sessions. If stdinOnce is set to true, stdin is opened on container 1817 // start, is empty until the first client attaches to stdin, and then 1818 // remains open and accepts data until the client disconnects, at which 1819 // time stdin is closed and remains closed until the container is 1820 // restarted. If this flag is false, a container processes that reads 1821 // from stdin will never receive an EOF. Default is false +optional 1822 StdinOnce bool `json:"stdinOnce,omitempty"` 1823 1824 // TerminationMessagePath: Optional: Path at which the file to which the 1825 // container's termination message will be written is mounted into the 1826 // container's filesystem. Message written is intended to be brief final 1827 // status, such as an assertion failure message. Will be truncated by 1828 // the node if greater than 4096 bytes. The total message length across 1829 // all containers will be limited to 12kb. Defaults to 1830 // /dev/termination-log. Cannot be updated. +optional 1831 TerminationMessagePath string `json:"terminationMessagePath,omitempty"` 1832 1833 // TerminationMessagePolicy: Indicate how the termination message should 1834 // be populated. File will use the contents of terminationMessagePath to 1835 // populate the container status message on both success and failure. 1836 // FallbackToLogsOnError will use the last chunk of container log output 1837 // if the termination message file is empty and the container exited 1838 // with an error. The log output is limited to 2048 bytes or 80 lines, 1839 // whichever is smaller. Defaults to File. Cannot be updated. +optional 1840 TerminationMessagePolicy string `json:"terminationMessagePolicy,omitempty"` 1841 1842 // Tty: Whether this container should allocate a TTY for itself, also 1843 // requires 'stdin' to be true. Default is false. +optional 1844 Tty bool `json:"tty,omitempty"` 1845 1846 // VolumeDevices: volumeDevices is the list of block devices to be used 1847 // by the container. This is an alpha feature and may change in the 1848 // future. +optional 1849 VolumeDevices []*VolumeDevice `json:"volumeDevices,omitempty"` 1850 1851 // VolumeMounts: Pod volumes to mount into the container's filesystem. 1852 // Cannot be updated. +optional 1853 VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"` 1854 1855 // WorkingDir: Container's working directory. If not specified, the 1856 // container runtime's default will be used, which might be configured 1857 // in the container image. Cannot be updated. +optional 1858 WorkingDir string `json:"workingDir,omitempty"` 1859 1860 // ForceSendFields is a list of field names (e.g. "Args") to 1861 // unconditionally include in API requests. By default, fields with 1862 // empty values are omitted from API requests. However, any non-pointer, 1863 // non-interface field appearing in ForceSendFields will be sent to the 1864 // server regardless of whether the field is empty or not. This may be 1865 // used to include empty fields in Patch requests. 1866 ForceSendFields []string `json:"-"` 1867 1868 // NullFields is a list of field names (e.g. "Args") to include in API 1869 // requests with the JSON null value. By default, fields with empty 1870 // values are omitted from API requests. However, any field with an 1871 // empty value appearing in NullFields will be sent to the server as 1872 // null. It is an error if a field in this list has a non-empty value. 1873 // This may be used to include null fields in Patch requests. 1874 NullFields []string `json:"-"` 1875} 1876 1877func (s *Container) MarshalJSON() ([]byte, error) { 1878 type NoMethod Container 1879 raw := NoMethod(*s) 1880 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1881} 1882 1883// ContainerPort: ContainerPort represents a network port in a single 1884// container. 1885type ContainerPort struct { 1886 // ContainerPort: Number of port to expose on the pod's IP address. This 1887 // must be a valid port number, 0 < x < 65536. 1888 ContainerPort int64 `json:"containerPort,omitempty"` 1889 1890 // HostIP: What host IP to bind the external port to. +optional 1891 HostIP string `json:"hostIP,omitempty"` 1892 1893 // HostPort: Number of port to expose on the host. If specified, this 1894 // must be a valid port number, 0 < x < 65536. If HostNetwork is 1895 // specified, this must match ContainerPort. Most containers do not need 1896 // this. +optional 1897 HostPort int64 `json:"hostPort,omitempty"` 1898 1899 // Name: If specified, this must be an IANA_SVC_NAME and unique within 1900 // the pod. Each named port in a pod must have a unique name. Name for 1901 // the port that can be referred to by services. +optional 1902 Name string `json:"name,omitempty"` 1903 1904 // Protocol: Protocol for port. Must be UDP or TCP. Defaults to "TCP". 1905 // +optional 1906 Protocol string `json:"protocol,omitempty"` 1907 1908 // ForceSendFields is a list of field names (e.g. "ContainerPort") to 1909 // unconditionally include in API requests. By default, fields with 1910 // empty values are omitted from API requests. However, any non-pointer, 1911 // non-interface field appearing in ForceSendFields will be sent to the 1912 // server regardless of whether the field is empty or not. This may be 1913 // used to include empty fields in Patch requests. 1914 ForceSendFields []string `json:"-"` 1915 1916 // NullFields is a list of field names (e.g. "ContainerPort") to include 1917 // in API requests with the JSON null value. By default, fields with 1918 // empty values are omitted from API requests. However, any field with 1919 // an empty value appearing in NullFields will be sent to the server as 1920 // null. It is an error if a field in this list has a non-empty value. 1921 // This may be used to include null fields in Patch requests. 1922 NullFields []string `json:"-"` 1923} 1924 1925func (s *ContainerPort) MarshalJSON() ([]byte, error) { 1926 type NoMethod ContainerPort 1927 raw := NoMethod(*s) 1928 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1929} 1930 1931type Destination struct { 1932 // Ref: ObjectReference points to an Addressable. + optional 1933 Ref *ObjectReference `json:"ref,omitempty"` 1934 1935 // Uri: URI is for direct URI Designations or used with the resulting 1936 // URL from Addressable ObjectReference. If used with an 1937 // ObjectReference, will be appended to the path of the resulting URL 1938 // from the Addressable. + optional 1939 Uri string `json:"uri,omitempty"` 1940 1941 // ForceSendFields is a list of field names (e.g. "Ref") to 1942 // unconditionally include in API requests. By default, fields with 1943 // empty values are omitted from API requests. However, any non-pointer, 1944 // non-interface field appearing in ForceSendFields will be sent to the 1945 // server regardless of whether the field is empty or not. This may be 1946 // used to include empty fields in Patch requests. 1947 ForceSendFields []string `json:"-"` 1948 1949 // NullFields is a list of field names (e.g. "Ref") to include in API 1950 // requests with the JSON null value. By default, fields with empty 1951 // values are omitted from API requests. However, any field with an 1952 // empty value appearing in NullFields will be sent to the server as 1953 // null. It is an error if a field in this list has a non-empty value. 1954 // This may be used to include null fields in Patch requests. 1955 NullFields []string `json:"-"` 1956} 1957 1958func (s *Destination) MarshalJSON() ([]byte, error) { 1959 type NoMethod Destination 1960 raw := NoMethod(*s) 1961 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1962} 1963 1964// DomainMapping: Resource to hold the state and status of a user's 1965// domain mapping. NOTE: This resource is currently in Beta. 1966type DomainMapping struct { 1967 // ApiVersion: The API version for this call such as 1968 // "domains.cloudrun.com/v1alpha1". 1969 ApiVersion string `json:"apiVersion,omitempty"` 1970 1971 // Kind: The kind of resource, in this case "DomainMapping". 1972 Kind string `json:"kind,omitempty"` 1973 1974 // Metadata: Metadata associated with this BuildTemplate. 1975 Metadata *ObjectMeta `json:"metadata,omitempty"` 1976 1977 // Spec: The spec for this DomainMapping. 1978 Spec *DomainMappingSpec `json:"spec,omitempty"` 1979 1980 // Status: The current status of the DomainMapping. 1981 Status *DomainMappingStatus `json:"status,omitempty"` 1982 1983 // ServerResponse contains the HTTP response code and headers from the 1984 // server. 1985 googleapi.ServerResponse `json:"-"` 1986 1987 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1988 // unconditionally include in API requests. By default, fields with 1989 // empty values are omitted from API requests. However, any non-pointer, 1990 // non-interface field appearing in ForceSendFields will be sent to the 1991 // server regardless of whether the field is empty or not. This may be 1992 // used to include empty fields in Patch requests. 1993 ForceSendFields []string `json:"-"` 1994 1995 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1996 // API requests with the JSON null value. By default, fields with empty 1997 // values are omitted from API requests. However, any field with an 1998 // empty value appearing in NullFields will be sent to the server as 1999 // null. It is an error if a field in this list has a non-empty value. 2000 // This may be used to include null fields in Patch requests. 2001 NullFields []string `json:"-"` 2002} 2003 2004func (s *DomainMapping) MarshalJSON() ([]byte, error) { 2005 type NoMethod DomainMapping 2006 raw := NoMethod(*s) 2007 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2008} 2009 2010// DomainMappingCondition: DomainMappingCondition contains state 2011// information for a DomainMapping. 2012type DomainMappingCondition struct { 2013 // LastTransitionTime: Last time the condition transitioned from one 2014 // status to another. +optional 2015 LastTransitionTime string `json:"lastTransitionTime,omitempty"` 2016 2017 // Message: Human readable message indicating details about the current 2018 // status. +optional 2019 Message string `json:"message,omitempty"` 2020 2021 // Reason: One-word CamelCase reason for the condition's current status. 2022 // +optional 2023 Reason string `json:"reason,omitempty"` 2024 2025 // Severity: How to interpret failures of this condition, one of Error, 2026 // Warning, Info +optional 2027 Severity string `json:"severity,omitempty"` 2028 2029 // Status: Status of the condition, one of True, False, Unknown. 2030 Status string `json:"status,omitempty"` 2031 2032 // Type: Type of domain mapping condition. 2033 Type string `json:"type,omitempty"` 2034 2035 // ForceSendFields is a list of field names (e.g. "LastTransitionTime") 2036 // to unconditionally include in API requests. By default, fields with 2037 // empty values are omitted from API requests. However, any non-pointer, 2038 // non-interface field appearing in ForceSendFields will be sent to the 2039 // server regardless of whether the field is empty or not. This may be 2040 // used to include empty fields in Patch requests. 2041 ForceSendFields []string `json:"-"` 2042 2043 // NullFields is a list of field names (e.g. "LastTransitionTime") to 2044 // include in API requests with the JSON null value. By default, fields 2045 // with empty values are omitted from API requests. However, any field 2046 // with an empty value appearing in NullFields will be sent to the 2047 // server as null. It is an error if a field in this list has a 2048 // non-empty value. This may be used to include null fields in Patch 2049 // requests. 2050 NullFields []string `json:"-"` 2051} 2052 2053func (s *DomainMappingCondition) MarshalJSON() ([]byte, error) { 2054 type NoMethod DomainMappingCondition 2055 raw := NoMethod(*s) 2056 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2057} 2058 2059// DomainMappingSpec: The desired state of the Domain Mapping. 2060type DomainMappingSpec struct { 2061 // CertificateMode: The mode of the certificate. 2062 // 2063 // Possible values: 2064 // "CERTIFICATE_MODE_UNSPECIFIED" 2065 // "NONE" - Do not provision an HTTPS certificate. 2066 // "AUTOMATIC" - Automatically provisions an HTTPS certificate via 2067 // GoogleCA or LetsEncrypt. 2068 CertificateMode string `json:"certificateMode,omitempty"` 2069 2070 // ForceOverride: If set, the mapping will override any mapping set 2071 // before this spec was set. It is recommended that the user leaves this 2072 // empty to receive an error warning about a potential conflict and only 2073 // set it once the respective UI has given such a warning. 2074 ForceOverride bool `json:"forceOverride,omitempty"` 2075 2076 // RouteName: The name of the Knative Route that this DomainMapping 2077 // applies to. The route must exist. 2078 RouteName string `json:"routeName,omitempty"` 2079 2080 // ForceSendFields is a list of field names (e.g. "CertificateMode") to 2081 // unconditionally include in API requests. By default, fields with 2082 // empty values are omitted from API requests. However, any non-pointer, 2083 // non-interface field appearing in ForceSendFields will be sent to the 2084 // server regardless of whether the field is empty or not. This may be 2085 // used to include empty fields in Patch requests. 2086 ForceSendFields []string `json:"-"` 2087 2088 // NullFields is a list of field names (e.g. "CertificateMode") to 2089 // include in API requests with the JSON null value. By default, fields 2090 // with empty values are omitted from API requests. However, any field 2091 // with an empty value appearing in NullFields will be sent to the 2092 // server as null. It is an error if a field in this list has a 2093 // non-empty value. This may be used to include null fields in Patch 2094 // requests. 2095 NullFields []string `json:"-"` 2096} 2097 2098func (s *DomainMappingSpec) MarshalJSON() ([]byte, error) { 2099 type NoMethod DomainMappingSpec 2100 raw := NoMethod(*s) 2101 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2102} 2103 2104// DomainMappingStatus: The current state of the Domain Mapping. 2105type DomainMappingStatus struct { 2106 // Conditions: Array of observed DomainMappingConditions, indicating the 2107 // current state of the DomainMapping. 2108 Conditions []*DomainMappingCondition `json:"conditions,omitempty"` 2109 2110 // MappedRouteName: The name of the route that the mapping currently 2111 // points to. 2112 MappedRouteName string `json:"mappedRouteName,omitempty"` 2113 2114 // ObservedGeneration: ObservedGeneration is the 'Generation' of the 2115 // DomainMapping that was last processed by the controller. Clients 2116 // polling for completed reconciliation should poll until 2117 // observedGeneration = metadata.generation and the Ready condition's 2118 // status is True or False. 2119 ObservedGeneration int64 `json:"observedGeneration,omitempty"` 2120 2121 // ResourceRecords: The resource records required to configure this 2122 // domain mapping. These records must be added to the domain's DNS 2123 // configuration in order to serve the application via this domain 2124 // mapping. 2125 ResourceRecords []*ResourceRecord `json:"resourceRecords,omitempty"` 2126 2127 // Url: Cloud Run fully managed: not supported Cloud Run on GKE: 2128 // supported Holds the URL that will serve the traffic of the 2129 // DomainMapping. +optional 2130 Url string `json:"url,omitempty"` 2131 2132 // ForceSendFields is a list of field names (e.g. "Conditions") to 2133 // unconditionally include in API requests. By default, fields with 2134 // empty values are omitted from API requests. However, any non-pointer, 2135 // non-interface field appearing in ForceSendFields will be sent to the 2136 // server regardless of whether the field is empty or not. This may be 2137 // used to include empty fields in Patch requests. 2138 ForceSendFields []string `json:"-"` 2139 2140 // NullFields is a list of field names (e.g. "Conditions") to include in 2141 // API requests with the JSON null value. By default, fields with empty 2142 // values are omitted from API requests. However, any field with an 2143 // empty value appearing in NullFields will be sent to the server as 2144 // null. It is an error if a field in this list has a non-empty value. 2145 // This may be used to include null fields in Patch requests. 2146 NullFields []string `json:"-"` 2147} 2148 2149func (s *DomainMappingStatus) MarshalJSON() ([]byte, error) { 2150 type NoMethod DomainMappingStatus 2151 raw := NoMethod(*s) 2152 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2153} 2154 2155// Empty: A generic empty message that you can re-use to avoid defining 2156// duplicated empty messages in your APIs. A typical example is to use 2157// it as the request or the response type of an API method. For 2158// instance: service Foo { rpc Bar(google.protobuf.Empty) returns 2159// (google.protobuf.Empty); } The JSON representation for `Empty` is 2160// empty JSON object `{}`. 2161type Empty struct { 2162 // ServerResponse contains the HTTP response code and headers from the 2163 // server. 2164 googleapi.ServerResponse `json:"-"` 2165} 2166 2167// EnvFromSource: EnvFromSource represents the source of a set of 2168// ConfigMaps 2169type EnvFromSource struct { 2170 // ConfigMapRef: The ConfigMap to select from +optional 2171 ConfigMapRef *ConfigMapEnvSource `json:"configMapRef,omitempty"` 2172 2173 // Prefix: An optional identifier to prepend to each key in the 2174 // ConfigMap. Must be a C_IDENTIFIER. +optional 2175 Prefix string `json:"prefix,omitempty"` 2176 2177 // SecretRef: The Secret to select from +optional 2178 SecretRef *SecretEnvSource `json:"secretRef,omitempty"` 2179 2180 // ForceSendFields is a list of field names (e.g. "ConfigMapRef") to 2181 // unconditionally include in API requests. By default, fields with 2182 // empty values are omitted from API requests. However, any non-pointer, 2183 // non-interface field appearing in ForceSendFields will be sent to the 2184 // server regardless of whether the field is empty or not. This may be 2185 // used to include empty fields in Patch requests. 2186 ForceSendFields []string `json:"-"` 2187 2188 // NullFields is a list of field names (e.g. "ConfigMapRef") to include 2189 // in API requests with the JSON null value. By default, fields with 2190 // empty values are omitted from API requests. However, any field with 2191 // an empty value appearing in NullFields will be sent to the server as 2192 // null. It is an error if a field in this list has a non-empty value. 2193 // This may be used to include null fields in Patch requests. 2194 NullFields []string `json:"-"` 2195} 2196 2197func (s *EnvFromSource) MarshalJSON() ([]byte, error) { 2198 type NoMethod EnvFromSource 2199 raw := NoMethod(*s) 2200 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2201} 2202 2203// EnvVar: EnvVar represents an environment variable present in a 2204// Container. 2205type EnvVar struct { 2206 // Name: Name of the environment variable. Must be a C_IDENTIFIER. 2207 Name string `json:"name,omitempty"` 2208 2209 // Value: Variable references $(VAR_NAME) are expanded using the 2210 // previous defined environment variables in the container and any route 2211 // environment variables. If a variable cannot be resolved, the 2212 // reference in the input string will be unchanged. The $(VAR_NAME) 2213 // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped 2214 // references will never be expanded, regardless of whether the variable 2215 // exists or not. Defaults to "". +optional 2216 Value string `json:"value,omitempty"` 2217 2218 // ValueFrom: Cloud Run fully managed: not supported Cloud Run on GKE: 2219 // supported Source for the environment variable's value. Cannot be used 2220 // if value is not empty. +optional 2221 ValueFrom *EnvVarSource `json:"valueFrom,omitempty"` 2222 2223 // ForceSendFields is a list of field names (e.g. "Name") to 2224 // unconditionally include in API requests. By default, fields with 2225 // empty values are omitted from API requests. However, any non-pointer, 2226 // non-interface field appearing in ForceSendFields will be sent to the 2227 // server regardless of whether the field is empty or not. This may be 2228 // used to include empty fields in Patch requests. 2229 ForceSendFields []string `json:"-"` 2230 2231 // NullFields is a list of field names (e.g. "Name") to include in API 2232 // requests with the JSON null value. By default, fields with empty 2233 // values are omitted from API requests. However, any field with an 2234 // empty value appearing in NullFields will be sent to the server as 2235 // null. It is an error if a field in this list has a non-empty value. 2236 // This may be used to include null fields in Patch requests. 2237 NullFields []string `json:"-"` 2238} 2239 2240func (s *EnvVar) MarshalJSON() ([]byte, error) { 2241 type NoMethod EnvVar 2242 raw := NoMethod(*s) 2243 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2244} 2245 2246// EnvVarSource: Cloud Run fully managed: not supported Cloud Run on 2247// GKE: supported EnvVarSource represents a source for the value of an 2248// EnvVar. 2249type EnvVarSource struct { 2250 // ConfigMapKeyRef: Cloud Run fully managed: not supported Cloud Run on 2251 // GKE: supported Selects a key of a ConfigMap. +optional 2252 ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty"` 2253 2254 // SecretKeyRef: Cloud Run fully managed: not supported Cloud Run on 2255 // GKE: supported Selects a key of a secret in the pod's namespace 2256 // +optional 2257 SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty"` 2258 2259 // ForceSendFields is a list of field names (e.g. "ConfigMapKeyRef") to 2260 // unconditionally include in API requests. By default, fields with 2261 // empty values are omitted from API requests. However, any non-pointer, 2262 // non-interface field appearing in ForceSendFields will be sent to the 2263 // server regardless of whether the field is empty or not. This may be 2264 // used to include empty fields in Patch requests. 2265 ForceSendFields []string `json:"-"` 2266 2267 // NullFields is a list of field names (e.g. "ConfigMapKeyRef") to 2268 // include in API requests with the JSON null value. By default, fields 2269 // with empty values are omitted from API requests. However, any field 2270 // with an empty value appearing in NullFields will be sent to the 2271 // server as null. It is an error if a field in this list has a 2272 // non-empty value. This may be used to include null fields in Patch 2273 // requests. 2274 NullFields []string `json:"-"` 2275} 2276 2277func (s *EnvVarSource) MarshalJSON() ([]byte, error) { 2278 type NoMethod EnvVarSource 2279 raw := NoMethod(*s) 2280 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2281} 2282 2283// ExecAction: ExecAction describes a "run in container" action. 2284type ExecAction struct { 2285 // Command: Command is the command line to execute inside the container, 2286 // the working directory for the command is root ('/') in the 2287 // container's filesystem. The command is simply exec'd, it is not run 2288 // inside a shell, so traditional shell instructions ('|', etc) won't 2289 // work. To use a shell, you need to explicitly call out to that shell. 2290 // Exit status of 0 is treated as live/healthy and non-zero is 2291 // unhealthy. +optional 2292 Command []string `json:"command,omitempty"` 2293 2294 // ForceSendFields is a list of field names (e.g. "Command") to 2295 // unconditionally include in API requests. By default, fields with 2296 // empty values are omitted from API requests. However, any non-pointer, 2297 // non-interface field appearing in ForceSendFields will be sent to the 2298 // server regardless of whether the field is empty or not. This may be 2299 // used to include empty fields in Patch requests. 2300 ForceSendFields []string `json:"-"` 2301 2302 // NullFields is a list of field names (e.g. "Command") to include in 2303 // API requests with the JSON null value. By default, fields with empty 2304 // values are omitted from API requests. However, any field with an 2305 // empty value appearing in NullFields will be sent to the server as 2306 // null. It is an error if a field in this list has a non-empty value. 2307 // This may be used to include null fields in Patch requests. 2308 NullFields []string `json:"-"` 2309} 2310 2311func (s *ExecAction) MarshalJSON() ([]byte, error) { 2312 type NoMethod ExecAction 2313 raw := NoMethod(*s) 2314 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2315} 2316 2317// Expr: Represents a textual expression in the Common Expression 2318// Language (CEL) syntax. CEL is a C-like expression language. The 2319// syntax and semantics of CEL are documented at 2320// https://github.com/google/cel-spec. Example (Comparison): title: 2321// "Summary size limit" description: "Determines if a summary is less 2322// than 100 chars" expression: "document.summary.size() < 100" Example 2323// (Equality): title: "Requestor is owner" description: "Determines if 2324// requestor is the document owner" expression: "document.owner == 2325// request.auth.claims.email" Example (Logic): title: "Public documents" 2326// description: "Determine whether the document should be publicly 2327// visible" expression: "document.type != 'private' && document.type != 2328// 'internal'" Example (Data Manipulation): title: "Notification string" 2329// description: "Create a notification string with a timestamp." 2330// expression: "'New message received at ' + 2331// string(document.create_time)" The exact variables and functions that 2332// may be referenced within an expression are determined by the service 2333// that evaluates it. See the service documentation for additional 2334// information. 2335type Expr struct { 2336 // Description: Optional. Description of the expression. This is a 2337 // longer text which describes the expression, e.g. when hovered over it 2338 // in a UI. 2339 Description string `json:"description,omitempty"` 2340 2341 // Expression: Textual representation of an expression in Common 2342 // Expression Language syntax. 2343 Expression string `json:"expression,omitempty"` 2344 2345 // Location: Optional. String indicating the location of the expression 2346 // for error reporting, e.g. a file name and a position in the file. 2347 Location string `json:"location,omitempty"` 2348 2349 // Title: Optional. Title for the expression, i.e. a short string 2350 // describing its purpose. This can be used e.g. in UIs which allow to 2351 // enter the expression. 2352 Title string `json:"title,omitempty"` 2353 2354 // ForceSendFields is a list of field names (e.g. "Description") to 2355 // unconditionally include in API requests. By default, fields with 2356 // empty values are omitted from API requests. However, any non-pointer, 2357 // non-interface field appearing in ForceSendFields will be sent to the 2358 // server regardless of whether the field is empty or not. This may be 2359 // used to include empty fields in Patch requests. 2360 ForceSendFields []string `json:"-"` 2361 2362 // NullFields is a list of field names (e.g. "Description") to include 2363 // in API requests with the JSON null value. By default, fields with 2364 // empty values are omitted from API requests. However, any field with 2365 // an empty value appearing in NullFields will be sent to the server as 2366 // null. It is an error if a field in this list has a non-empty value. 2367 // This may be used to include null fields in Patch requests. 2368 NullFields []string `json:"-"` 2369} 2370 2371func (s *Expr) MarshalJSON() ([]byte, error) { 2372 type NoMethod Expr 2373 raw := NoMethod(*s) 2374 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2375} 2376 2377// HTTPGetAction: HTTPGetAction describes an action based on HTTP Get 2378// requests. 2379type HTTPGetAction struct { 2380 // Host: Host name to connect to, defaults to the pod IP. You probably 2381 // want to set "Host" in httpHeaders instead. +optional 2382 Host string `json:"host,omitempty"` 2383 2384 // HttpHeaders: Custom headers to set in the request. HTTP allows 2385 // repeated headers. +optional 2386 HttpHeaders []*HTTPHeader `json:"httpHeaders,omitempty"` 2387 2388 // Path: Path to access on the HTTP server. +optional 2389 Path string `json:"path,omitempty"` 2390 2391 // Port: Name or number of the port to access on the container. Number 2392 // must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. 2393 Port *IntOrString `json:"port,omitempty"` 2394 2395 // Scheme: Scheme to use for connecting to the host. Defaults to HTTP. 2396 // +optional 2397 Scheme string `json:"scheme,omitempty"` 2398 2399 // ForceSendFields is a list of field names (e.g. "Host") to 2400 // unconditionally include in API requests. By default, fields with 2401 // empty values are omitted from API requests. However, any non-pointer, 2402 // non-interface field appearing in ForceSendFields will be sent to the 2403 // server regardless of whether the field is empty or not. This may be 2404 // used to include empty fields in Patch requests. 2405 ForceSendFields []string `json:"-"` 2406 2407 // NullFields is a list of field names (e.g. "Host") to include in API 2408 // requests with the JSON null value. By default, fields with empty 2409 // values are omitted from API requests. However, any field with an 2410 // empty value appearing in NullFields will be sent to the server as 2411 // null. It is an error if a field in this list has a non-empty value. 2412 // This may be used to include null fields in Patch requests. 2413 NullFields []string `json:"-"` 2414} 2415 2416func (s *HTTPGetAction) MarshalJSON() ([]byte, error) { 2417 type NoMethod HTTPGetAction 2418 raw := NoMethod(*s) 2419 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2420} 2421 2422// HTTPHeader: HTTPHeader describes a custom header to be used in HTTP 2423// probes 2424type HTTPHeader struct { 2425 // Name: The header field name 2426 Name string `json:"name,omitempty"` 2427 2428 // Value: The header field value 2429 Value string `json:"value,omitempty"` 2430 2431 // ForceSendFields is a list of field names (e.g. "Name") to 2432 // unconditionally include in API requests. By default, fields with 2433 // empty values are omitted from API requests. However, any non-pointer, 2434 // non-interface field appearing in ForceSendFields will be sent to the 2435 // server regardless of whether the field is empty or not. This may be 2436 // used to include empty fields in Patch requests. 2437 ForceSendFields []string `json:"-"` 2438 2439 // NullFields is a list of field names (e.g. "Name") to include in API 2440 // requests with the JSON null value. By default, fields with empty 2441 // values are omitted from API requests. However, any field with an 2442 // empty value appearing in NullFields will be sent to the server as 2443 // null. It is an error if a field in this list has a non-empty value. 2444 // This may be used to include null fields in Patch requests. 2445 NullFields []string `json:"-"` 2446} 2447 2448func (s *HTTPHeader) MarshalJSON() ([]byte, error) { 2449 type NoMethod HTTPHeader 2450 raw := NoMethod(*s) 2451 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2452} 2453 2454// Handler: Handler defines a specific action that should be taken 2455type Handler struct { 2456 // Exec: One and only one of the following should be specified. Exec 2457 // specifies the action to take. +optional 2458 Exec *ExecAction `json:"exec,omitempty"` 2459 2460 // HttpGet: HTTPGet specifies the http request to perform. +optional 2461 HttpGet *HTTPGetAction `json:"httpGet,omitempty"` 2462 2463 // TcpSocket: TCPSocket specifies an action involving a TCP port. TCP 2464 // hooks not yet supported 2465 TcpSocket *TCPSocketAction `json:"tcpSocket,omitempty"` 2466 2467 // ForceSendFields is a list of field names (e.g. "Exec") to 2468 // unconditionally include in API requests. By default, fields with 2469 // empty values are omitted from API requests. However, any non-pointer, 2470 // non-interface field appearing in ForceSendFields will be sent to the 2471 // server regardless of whether the field is empty or not. This may be 2472 // used to include empty fields in Patch requests. 2473 ForceSendFields []string `json:"-"` 2474 2475 // NullFields is a list of field names (e.g. "Exec") to include in API 2476 // requests with the JSON null value. By default, fields with empty 2477 // values are omitted from API requests. However, any field with an 2478 // empty value appearing in NullFields will be sent to the server as 2479 // null. It is an error if a field in this list has a non-empty value. 2480 // This may be used to include null fields in Patch requests. 2481 NullFields []string `json:"-"` 2482} 2483 2484func (s *Handler) MarshalJSON() ([]byte, error) { 2485 type NoMethod Handler 2486 raw := NoMethod(*s) 2487 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2488} 2489 2490// IntOrString: IntOrString is a type that can hold an int32 or a 2491// string. When used in JSON or YAML marshalling and unmarshalling, it 2492// produces or consumes the inner type. This allows you to have, for 2493// example, a JSON field that can accept a name or number. 2494type IntOrString struct { 2495 // IntVal: The int value. 2496 IntVal int64 `json:"intVal,omitempty"` 2497 2498 // StrVal: The string value. 2499 StrVal string `json:"strVal,omitempty"` 2500 2501 // Type: The type of the value. 2502 Type int64 `json:"type,omitempty"` 2503 2504 // ForceSendFields is a list of field names (e.g. "IntVal") to 2505 // unconditionally include in API requests. By default, fields with 2506 // empty values are omitted from API requests. However, any non-pointer, 2507 // non-interface field appearing in ForceSendFields will be sent to the 2508 // server regardless of whether the field is empty or not. This may be 2509 // used to include empty fields in Patch requests. 2510 ForceSendFields []string `json:"-"` 2511 2512 // NullFields is a list of field names (e.g. "IntVal") to include in API 2513 // requests with the JSON null value. By default, fields with empty 2514 // values are omitted from API requests. However, any field with an 2515 // empty value appearing in NullFields will be sent to the server as 2516 // null. It is an error if a field in this list has a non-empty value. 2517 // This may be used to include null fields in Patch requests. 2518 NullFields []string `json:"-"` 2519} 2520 2521func (s *IntOrString) MarshalJSON() ([]byte, error) { 2522 type NoMethod IntOrString 2523 raw := NoMethod(*s) 2524 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2525} 2526 2527// KeyToPath: Maps a string key to a path within a volume. 2528type KeyToPath struct { 2529 // Key: The key to project. 2530 Key string `json:"key,omitempty"` 2531 2532 // Mode: Mode bits to use on this file, must be a value between 0 and 2533 // 0777. If not specified, the volume defaultMode will be used. This 2534 // might be in conflict with other options that affect the file mode, 2535 // like fsGroup, and the result can be other mode bits set. +optional 2536 Mode int64 `json:"mode,omitempty"` 2537 2538 // Path: The relative path of the file to map the key to. May not be an 2539 // absolute path. May not contain the path element '..'. May not start 2540 // with the string '..'. 2541 Path string `json:"path,omitempty"` 2542 2543 // ForceSendFields is a list of field names (e.g. "Key") to 2544 // unconditionally include in API requests. By default, fields with 2545 // empty values are omitted from API requests. However, any non-pointer, 2546 // non-interface field appearing in ForceSendFields will be sent to the 2547 // server regardless of whether the field is empty or not. This may be 2548 // used to include empty fields in Patch requests. 2549 ForceSendFields []string `json:"-"` 2550 2551 // NullFields is a list of field names (e.g. "Key") to include in API 2552 // requests with the JSON null value. By default, fields with empty 2553 // values are omitted from API requests. However, any field with an 2554 // empty value appearing in NullFields will be sent to the server as 2555 // null. It is an error if a field in this list has a non-empty value. 2556 // This may be used to include null fields in Patch requests. 2557 NullFields []string `json:"-"` 2558} 2559 2560func (s *KeyToPath) MarshalJSON() ([]byte, error) { 2561 type NoMethod KeyToPath 2562 raw := NoMethod(*s) 2563 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2564} 2565 2566// Lifecycle: Lifecycle describes actions that the management system 2567// should take in response to container lifecycle events. For the 2568// PostStart and PreStop lifecycle handlers, management of the container 2569// blocks until the action is complete, unless the container process 2570// fails, in which case the handler is aborted. 2571type Lifecycle struct { 2572 // PostStart: PostStart is called immediately after a container is 2573 // created. If the handler fails, the container is terminated and 2574 // restarted according to its restart policy. Other management of the 2575 // container blocks until the hook completes. More info: 2576 // https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks 2577 // +optional 2578 PostStart *Handler `json:"postStart,omitempty"` 2579 2580 // PreStop: PreStop is called immediately before a container is 2581 // terminated. The container is terminated after the handler completes. 2582 // The reason for termination is passed to the handler. Regardless of 2583 // the outcome of the handler, the container is eventually terminated. 2584 // Other management of the container blocks until the hook completes. 2585 // More info: 2586 // https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks 2587 // +optional 2588 PreStop *Handler `json:"preStop,omitempty"` 2589 2590 // ForceSendFields is a list of field names (e.g. "PostStart") to 2591 // unconditionally include in API requests. By default, fields with 2592 // empty values are omitted from API requests. However, any non-pointer, 2593 // non-interface field appearing in ForceSendFields will be sent to the 2594 // server regardless of whether the field is empty or not. This may be 2595 // used to include empty fields in Patch requests. 2596 ForceSendFields []string `json:"-"` 2597 2598 // NullFields is a list of field names (e.g. "PostStart") to include in 2599 // API requests with the JSON null value. By default, fields with empty 2600 // values are omitted from API requests. However, any field with an 2601 // empty value appearing in NullFields will be sent to the server as 2602 // null. It is an error if a field in this list has a non-empty value. 2603 // This may be used to include null fields in Patch requests. 2604 NullFields []string `json:"-"` 2605} 2606 2607func (s *Lifecycle) MarshalJSON() ([]byte, error) { 2608 type NoMethod Lifecycle 2609 raw := NoMethod(*s) 2610 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2611} 2612 2613// ListAuthorizedDomainsResponse: A list of Authorized Domains. 2614type ListAuthorizedDomainsResponse struct { 2615 // Domains: The authorized domains belonging to the user. 2616 Domains []*AuthorizedDomain `json:"domains,omitempty"` 2617 2618 // NextPageToken: Continuation token for fetching the next page of 2619 // results. 2620 NextPageToken string `json:"nextPageToken,omitempty"` 2621 2622 // ServerResponse contains the HTTP response code and headers from the 2623 // server. 2624 googleapi.ServerResponse `json:"-"` 2625 2626 // ForceSendFields is a list of field names (e.g. "Domains") to 2627 // unconditionally include in API requests. By default, fields with 2628 // empty values are omitted from API requests. However, any non-pointer, 2629 // non-interface field appearing in ForceSendFields will be sent to the 2630 // server regardless of whether the field is empty or not. This may be 2631 // used to include empty fields in Patch requests. 2632 ForceSendFields []string `json:"-"` 2633 2634 // NullFields is a list of field names (e.g. "Domains") to include in 2635 // API requests with the JSON null value. By default, fields with empty 2636 // values are omitted from API requests. However, any field with an 2637 // empty value appearing in NullFields will be sent to the server as 2638 // null. It is an error if a field in this list has a non-empty value. 2639 // This may be used to include null fields in Patch requests. 2640 NullFields []string `json:"-"` 2641} 2642 2643func (s *ListAuthorizedDomainsResponse) MarshalJSON() ([]byte, error) { 2644 type NoMethod ListAuthorizedDomainsResponse 2645 raw := NoMethod(*s) 2646 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2647} 2648 2649// ListCloudAuditLogsSourcesResponse: ListCloudAuditLogsSourcesResponse 2650// is a list of CloudAuditLogsSource resources. 2651type ListCloudAuditLogsSourcesResponse struct { 2652 // ApiVersion: The API version for this call such as 2653 // "events.cloud.google.com/v1alpha1". 2654 ApiVersion string `json:"apiVersion,omitempty"` 2655 2656 // Items: List of CloudAuditLogsSources. 2657 Items []*CloudAuditLogsSource `json:"items,omitempty"` 2658 2659 // Kind: The kind of this resource, in this case 2660 // "CloudAuditLogsSourceList". 2661 Kind string `json:"kind,omitempty"` 2662 2663 // Metadata: Metadata associated with this CloudAuditLogsSource list. 2664 Metadata *ListMeta `json:"metadata,omitempty"` 2665 2666 // Unreachable: Locations that could not be reached. 2667 Unreachable []string `json:"unreachable,omitempty"` 2668 2669 // ServerResponse contains the HTTP response code and headers from the 2670 // server. 2671 googleapi.ServerResponse `json:"-"` 2672 2673 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 2674 // unconditionally include in API requests. By default, fields with 2675 // empty values are omitted from API requests. However, any non-pointer, 2676 // non-interface field appearing in ForceSendFields will be sent to the 2677 // server regardless of whether the field is empty or not. This may be 2678 // used to include empty fields in Patch requests. 2679 ForceSendFields []string `json:"-"` 2680 2681 // NullFields is a list of field names (e.g. "ApiVersion") to include in 2682 // API requests with the JSON null value. By default, fields with empty 2683 // values are omitted from API requests. However, any field with an 2684 // empty value appearing in NullFields will be sent to the server as 2685 // null. It is an error if a field in this list has a non-empty value. 2686 // This may be used to include null fields in Patch requests. 2687 NullFields []string `json:"-"` 2688} 2689 2690func (s *ListCloudAuditLogsSourcesResponse) MarshalJSON() ([]byte, error) { 2691 type NoMethod ListCloudAuditLogsSourcesResponse 2692 raw := NoMethod(*s) 2693 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2694} 2695 2696// ListCloudPubSubSourcesResponse: ListCloudPubSubSourcesResponse is a 2697// list of CloudPubSubSource resources. 2698type ListCloudPubSubSourcesResponse struct { 2699 // ApiVersion: The API version for this call such as 2700 // "events.cloud.google.com/v1alpha1". 2701 ApiVersion string `json:"apiVersion,omitempty"` 2702 2703 // Items: List of CloudPubSubSources. 2704 Items []*CloudPubSubSource `json:"items,omitempty"` 2705 2706 // Kind: The kind of this resource, in this case 2707 // "CloudPubSubSourceList". 2708 Kind string `json:"kind,omitempty"` 2709 2710 // Metadata: Metadata associated with this CloudPubSubSource list. 2711 Metadata *ListMeta `json:"metadata,omitempty"` 2712 2713 // Unreachable: Locations that could not be reached. 2714 Unreachable []string `json:"unreachable,omitempty"` 2715 2716 // ServerResponse contains the HTTP response code and headers from the 2717 // server. 2718 googleapi.ServerResponse `json:"-"` 2719 2720 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 2721 // unconditionally include in API requests. By default, fields with 2722 // empty values are omitted from API requests. However, any non-pointer, 2723 // non-interface field appearing in ForceSendFields will be sent to the 2724 // server regardless of whether the field is empty or not. This may be 2725 // used to include empty fields in Patch requests. 2726 ForceSendFields []string `json:"-"` 2727 2728 // NullFields is a list of field names (e.g. "ApiVersion") to include in 2729 // API requests with the JSON null value. By default, fields with empty 2730 // values are omitted from API requests. However, any field with an 2731 // empty value appearing in NullFields will be sent to the server as 2732 // null. It is an error if a field in this list has a non-empty value. 2733 // This may be used to include null fields in Patch requests. 2734 NullFields []string `json:"-"` 2735} 2736 2737func (s *ListCloudPubSubSourcesResponse) MarshalJSON() ([]byte, error) { 2738 type NoMethod ListCloudPubSubSourcesResponse 2739 raw := NoMethod(*s) 2740 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2741} 2742 2743// ListCloudSchedulerSourcesResponse: ListCloudSchedulerSourcesResponse 2744// is a list of CloudSchedulerSource resources. 2745type ListCloudSchedulerSourcesResponse struct { 2746 // ApiVersion: The API version for this call such as 2747 // "events.cloud.google.com/v1alpha1". 2748 ApiVersion string `json:"apiVersion,omitempty"` 2749 2750 // Items: List of CloudSchedulerSources. 2751 Items []*CloudSchedulerSource `json:"items,omitempty"` 2752 2753 // Kind: The kind of this resource, in this case 2754 // "CloudSchedulerSourceList". 2755 Kind string `json:"kind,omitempty"` 2756 2757 // Metadata: Metadata associated with this CloudSchedulerSource list. 2758 Metadata *ListMeta `json:"metadata,omitempty"` 2759 2760 // Unreachable: Locations that could not be reached. 2761 Unreachable []string `json:"unreachable,omitempty"` 2762 2763 // ServerResponse contains the HTTP response code and headers from the 2764 // server. 2765 googleapi.ServerResponse `json:"-"` 2766 2767 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 2768 // unconditionally include in API requests. By default, fields with 2769 // empty values are omitted from API requests. However, any non-pointer, 2770 // non-interface field appearing in ForceSendFields will be sent to the 2771 // server regardless of whether the field is empty or not. This may be 2772 // used to include empty fields in Patch requests. 2773 ForceSendFields []string `json:"-"` 2774 2775 // NullFields is a list of field names (e.g. "ApiVersion") to include in 2776 // API requests with the JSON null value. By default, fields with empty 2777 // values are omitted from API requests. However, any field with an 2778 // empty value appearing in NullFields will be sent to the server as 2779 // null. It is an error if a field in this list has a non-empty value. 2780 // This may be used to include null fields in Patch requests. 2781 NullFields []string `json:"-"` 2782} 2783 2784func (s *ListCloudSchedulerSourcesResponse) MarshalJSON() ([]byte, error) { 2785 type NoMethod ListCloudSchedulerSourcesResponse 2786 raw := NoMethod(*s) 2787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2788} 2789 2790// ListCloudStorageSourcesResponse: ListCloudStorageSourcesResponse is a 2791// list of CloudStorageSource resources. 2792type ListCloudStorageSourcesResponse struct { 2793 // ApiVersion: The API version for this call such as 2794 // "events.cloud.google.com/v1alpha1". 2795 ApiVersion string `json:"apiVersion,omitempty"` 2796 2797 // Items: List of CloudStorageSources. 2798 Items []*CloudStorageSource `json:"items,omitempty"` 2799 2800 // Kind: The kind of this resource, in this case 2801 // "CloudStorageSourceList". 2802 Kind string `json:"kind,omitempty"` 2803 2804 // Metadata: Metadata associated with this CloudStorageSource list. 2805 Metadata *ListMeta `json:"metadata,omitempty"` 2806 2807 // Unreachable: Locations that could not be reached. 2808 Unreachable []string `json:"unreachable,omitempty"` 2809 2810 // ServerResponse contains the HTTP response code and headers from the 2811 // server. 2812 googleapi.ServerResponse `json:"-"` 2813 2814 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 2815 // unconditionally include in API requests. By default, fields with 2816 // empty values are omitted from API requests. However, any non-pointer, 2817 // non-interface field appearing in ForceSendFields will be sent to the 2818 // server regardless of whether the field is empty or not. This may be 2819 // used to include empty fields in Patch requests. 2820 ForceSendFields []string `json:"-"` 2821 2822 // NullFields is a list of field names (e.g. "ApiVersion") to include in 2823 // API requests with the JSON null value. By default, fields with empty 2824 // values are omitted from API requests. However, any field with an 2825 // empty value appearing in NullFields will be sent to the server as 2826 // null. It is an error if a field in this list has a non-empty value. 2827 // This may be used to include null fields in Patch requests. 2828 NullFields []string `json:"-"` 2829} 2830 2831func (s *ListCloudStorageSourcesResponse) MarshalJSON() ([]byte, error) { 2832 type NoMethod ListCloudStorageSourcesResponse 2833 raw := NoMethod(*s) 2834 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2835} 2836 2837// ListConfigurationsResponse: ListConfigurationsResponse is a list of 2838// Configuration resources. 2839type ListConfigurationsResponse struct { 2840 // ApiVersion: The API version for this call such as 2841 // "serving.knative.dev/v1alpha1". 2842 ApiVersion string `json:"apiVersion,omitempty"` 2843 2844 // Items: List of Configurations. 2845 Items []*Configuration `json:"items,omitempty"` 2846 2847 // Kind: The kind of this resource, in this case "ConfigurationList". 2848 Kind string `json:"kind,omitempty"` 2849 2850 // Metadata: Metadata associated with this Configuration list. 2851 Metadata *ListMeta `json:"metadata,omitempty"` 2852 2853 // Unreachable: Locations that could not be reached. 2854 Unreachable []string `json:"unreachable,omitempty"` 2855 2856 // ServerResponse contains the HTTP response code and headers from the 2857 // server. 2858 googleapi.ServerResponse `json:"-"` 2859 2860 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 2861 // unconditionally include in API requests. By default, fields with 2862 // empty values are omitted from API requests. However, any non-pointer, 2863 // non-interface field appearing in ForceSendFields will be sent to the 2864 // server regardless of whether the field is empty or not. This may be 2865 // used to include empty fields in Patch requests. 2866 ForceSendFields []string `json:"-"` 2867 2868 // NullFields is a list of field names (e.g. "ApiVersion") to include in 2869 // API requests with the JSON null value. By default, fields with empty 2870 // values are omitted from API requests. However, any field with an 2871 // empty value appearing in NullFields will be sent to the server as 2872 // null. It is an error if a field in this list has a non-empty value. 2873 // This may be used to include null fields in Patch requests. 2874 NullFields []string `json:"-"` 2875} 2876 2877func (s *ListConfigurationsResponse) MarshalJSON() ([]byte, error) { 2878 type NoMethod ListConfigurationsResponse 2879 raw := NoMethod(*s) 2880 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2881} 2882 2883// ListDomainMappingsResponse: ListDomainMappingsResponse is a list of 2884// DomainMapping resources. 2885type ListDomainMappingsResponse struct { 2886 // ApiVersion: The API version for this call such as 2887 // "domains.cloudrun.com/v1alpha1". 2888 ApiVersion string `json:"apiVersion,omitempty"` 2889 2890 // Items: List of DomainMappings. 2891 Items []*DomainMapping `json:"items,omitempty"` 2892 2893 // Kind: The kind of this resource, in this case "DomainMappingList". 2894 Kind string `json:"kind,omitempty"` 2895 2896 // Metadata: Metadata associated with this DomainMapping list. 2897 Metadata *ListMeta `json:"metadata,omitempty"` 2898 2899 // Unreachable: Locations that could not be reached. 2900 Unreachable []string `json:"unreachable,omitempty"` 2901 2902 // ServerResponse contains the HTTP response code and headers from the 2903 // server. 2904 googleapi.ServerResponse `json:"-"` 2905 2906 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 2907 // unconditionally include in API requests. By default, fields with 2908 // empty values are omitted from API requests. However, any non-pointer, 2909 // non-interface field appearing in ForceSendFields will be sent to the 2910 // server regardless of whether the field is empty or not. This may be 2911 // used to include empty fields in Patch requests. 2912 ForceSendFields []string `json:"-"` 2913 2914 // NullFields is a list of field names (e.g. "ApiVersion") to include in 2915 // API requests with the JSON null value. By default, fields with empty 2916 // values are omitted from API requests. However, any field with an 2917 // empty value appearing in NullFields will be sent to the server as 2918 // null. It is an error if a field in this list has a non-empty value. 2919 // This may be used to include null fields in Patch requests. 2920 NullFields []string `json:"-"` 2921} 2922 2923func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) { 2924 type NoMethod ListDomainMappingsResponse 2925 raw := NoMethod(*s) 2926 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2927} 2928 2929// ListLocationsResponse: The response message for 2930// Locations.ListLocations. 2931type ListLocationsResponse struct { 2932 // Locations: A list of locations that matches the specified filter in 2933 // the request. 2934 Locations []*Location `json:"locations,omitempty"` 2935 2936 // NextPageToken: The standard List next-page token. 2937 NextPageToken string `json:"nextPageToken,omitempty"` 2938 2939 // ServerResponse contains the HTTP response code and headers from the 2940 // server. 2941 googleapi.ServerResponse `json:"-"` 2942 2943 // ForceSendFields is a list of field names (e.g. "Locations") to 2944 // unconditionally include in API requests. By default, fields with 2945 // empty values are omitted from API requests. However, any non-pointer, 2946 // non-interface field appearing in ForceSendFields will be sent to the 2947 // server regardless of whether the field is empty or not. This may be 2948 // used to include empty fields in Patch requests. 2949 ForceSendFields []string `json:"-"` 2950 2951 // NullFields is a list of field names (e.g. "Locations") to include in 2952 // API requests with the JSON null value. By default, fields with empty 2953 // values are omitted from API requests. However, any field with an 2954 // empty value appearing in NullFields will be sent to the server as 2955 // null. It is an error if a field in this list has a non-empty value. 2956 // This may be used to include null fields in Patch requests. 2957 NullFields []string `json:"-"` 2958} 2959 2960func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 2961 type NoMethod ListLocationsResponse 2962 raw := NoMethod(*s) 2963 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2964} 2965 2966// ListMeta: ListMeta describes metadata that synthetic resources must 2967// have, including lists and various status objects. A resource may have 2968// only one of {ObjectMeta, ListMeta}. 2969type ListMeta struct { 2970 // Continue: continue may be set if the user set a limit on the number 2971 // of items returned, and indicates that the server has more data 2972 // available. The value is opaque and may be used to issue another 2973 // request to the endpoint that served this list to retrieve the next 2974 // set of available objects. Continuing a list may not be possible if 2975 // the server configuration has changed or more than a few minutes have 2976 // passed. The resourceVersion field returned when using this continue 2977 // value will be identical to the value in the first response. 2978 Continue string `json:"continue,omitempty"` 2979 2980 // ResourceVersion: String that identifies the server's internal version 2981 // of this object that can be used by clients to determine when objects 2982 // have changed. Value must be treated as opaque by clients and passed 2983 // unmodified back to the server. Populated by the system. Read-only. 2984 // More info: 2985 // https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency 2986 // +optional 2987 ResourceVersion string `json:"resourceVersion,omitempty"` 2988 2989 // SelfLink: SelfLink is a URL representing this object. Populated by 2990 // the system. Read-only. +optional 2991 SelfLink string `json:"selfLink,omitempty"` 2992 2993 // ForceSendFields is a list of field names (e.g. "Continue") to 2994 // unconditionally include in API requests. By default, fields with 2995 // empty values are omitted from API requests. However, any non-pointer, 2996 // non-interface field appearing in ForceSendFields will be sent to the 2997 // server regardless of whether the field is empty or not. This may be 2998 // used to include empty fields in Patch requests. 2999 ForceSendFields []string `json:"-"` 3000 3001 // NullFields is a list of field names (e.g. "Continue") to include in 3002 // API requests with the JSON null value. By default, fields with empty 3003 // values are omitted from API requests. However, any field with an 3004 // empty value appearing in NullFields will be sent to the server as 3005 // null. It is an error if a field in this list has a non-empty value. 3006 // This may be used to include null fields in Patch requests. 3007 NullFields []string `json:"-"` 3008} 3009 3010func (s *ListMeta) MarshalJSON() ([]byte, error) { 3011 type NoMethod ListMeta 3012 raw := NoMethod(*s) 3013 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3014} 3015 3016// ListRevisionsResponse: ListRevisionsResponse is a list of Revision 3017// resources. 3018type ListRevisionsResponse struct { 3019 // ApiVersion: The API version for this call such as 3020 // "serving.knative.dev/v1alpha1". 3021 ApiVersion string `json:"apiVersion,omitempty"` 3022 3023 // Items: List of Revisions. 3024 Items []*Revision `json:"items,omitempty"` 3025 3026 // Kind: The kind of this resource, in this case "RevisionList". 3027 Kind string `json:"kind,omitempty"` 3028 3029 // Metadata: Metadata associated with this revision list. 3030 Metadata *ListMeta `json:"metadata,omitempty"` 3031 3032 // Unreachable: Locations that could not be reached. 3033 Unreachable []string `json:"unreachable,omitempty"` 3034 3035 // ServerResponse contains the HTTP response code and headers from the 3036 // server. 3037 googleapi.ServerResponse `json:"-"` 3038 3039 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 3040 // unconditionally include in API requests. By default, fields with 3041 // empty values are omitted from API requests. However, any non-pointer, 3042 // non-interface field appearing in ForceSendFields will be sent to the 3043 // server regardless of whether the field is empty or not. This may be 3044 // used to include empty fields in Patch requests. 3045 ForceSendFields []string `json:"-"` 3046 3047 // NullFields is a list of field names (e.g. "ApiVersion") to include in 3048 // API requests with the JSON null value. By default, fields with empty 3049 // values are omitted from API requests. However, any field with an 3050 // empty value appearing in NullFields will be sent to the server as 3051 // null. It is an error if a field in this list has a non-empty value. 3052 // This may be used to include null fields in Patch requests. 3053 NullFields []string `json:"-"` 3054} 3055 3056func (s *ListRevisionsResponse) MarshalJSON() ([]byte, error) { 3057 type NoMethod ListRevisionsResponse 3058 raw := NoMethod(*s) 3059 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3060} 3061 3062// ListRoutesResponse: ListRoutesResponse is a list of Route resources. 3063type ListRoutesResponse struct { 3064 // ApiVersion: The API version for this call such as 3065 // "serving.knative.dev/v1alpha1". 3066 ApiVersion string `json:"apiVersion,omitempty"` 3067 3068 // Items: List of Routes. 3069 Items []*Route `json:"items,omitempty"` 3070 3071 // Kind: The kind of this resource, in this case always "RouteList". 3072 Kind string `json:"kind,omitempty"` 3073 3074 // Metadata: Metadata associated with this Route list. 3075 Metadata *ListMeta `json:"metadata,omitempty"` 3076 3077 // Unreachable: Locations that could not be reached. 3078 Unreachable []string `json:"unreachable,omitempty"` 3079 3080 // ServerResponse contains the HTTP response code and headers from the 3081 // server. 3082 googleapi.ServerResponse `json:"-"` 3083 3084 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 3085 // unconditionally include in API requests. By default, fields with 3086 // empty values are omitted from API requests. However, any non-pointer, 3087 // non-interface field appearing in ForceSendFields will be sent to the 3088 // server regardless of whether the field is empty or not. This may be 3089 // used to include empty fields in Patch requests. 3090 ForceSendFields []string `json:"-"` 3091 3092 // NullFields is a list of field names (e.g. "ApiVersion") to include in 3093 // API requests with the JSON null value. By default, fields with empty 3094 // values are omitted from API requests. However, any field with an 3095 // empty value appearing in NullFields will be sent to the server as 3096 // null. It is an error if a field in this list has a non-empty value. 3097 // This may be used to include null fields in Patch requests. 3098 NullFields []string `json:"-"` 3099} 3100 3101func (s *ListRoutesResponse) MarshalJSON() ([]byte, error) { 3102 type NoMethod ListRoutesResponse 3103 raw := NoMethod(*s) 3104 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3105} 3106 3107// ListServicesResponse: A list of Service resources. 3108type ListServicesResponse struct { 3109 // ApiVersion: The API version for this call such as 3110 // "serving.knative.dev/v1alpha1". 3111 ApiVersion string `json:"apiVersion,omitempty"` 3112 3113 // Items: List of Services. 3114 Items []*Service `json:"items,omitempty"` 3115 3116 // Kind: The kind of this resource, in this case "ServiceList". 3117 Kind string `json:"kind,omitempty"` 3118 3119 // Metadata: Metadata associated with this Service list. 3120 Metadata *ListMeta `json:"metadata,omitempty"` 3121 3122 // Unreachable: Locations that could not be reached. 3123 Unreachable []string `json:"unreachable,omitempty"` 3124 3125 // ServerResponse contains the HTTP response code and headers from the 3126 // server. 3127 googleapi.ServerResponse `json:"-"` 3128 3129 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 3130 // unconditionally include in API requests. By default, fields with 3131 // empty values are omitted from API requests. However, any non-pointer, 3132 // non-interface field appearing in ForceSendFields will be sent to the 3133 // server regardless of whether the field is empty or not. This may be 3134 // used to include empty fields in Patch requests. 3135 ForceSendFields []string `json:"-"` 3136 3137 // NullFields is a list of field names (e.g. "ApiVersion") to include in 3138 // API requests with the JSON null value. By default, fields with empty 3139 // values are omitted from API requests. However, any field with an 3140 // empty value appearing in NullFields will be sent to the server as 3141 // null. It is an error if a field in this list has a non-empty value. 3142 // This may be used to include null fields in Patch requests. 3143 NullFields []string `json:"-"` 3144} 3145 3146func (s *ListServicesResponse) MarshalJSON() ([]byte, error) { 3147 type NoMethod ListServicesResponse 3148 raw := NoMethod(*s) 3149 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3150} 3151 3152// ListTriggersResponse: ListTriggersResponse is a list of Trigger 3153// resources. 3154type ListTriggersResponse struct { 3155 // ApiVersion: The API version for this call such as 3156 // "eventing.knative.dev/v1alpha1". 3157 ApiVersion string `json:"apiVersion,omitempty"` 3158 3159 // Items: List of Triggers. 3160 Items []*Trigger `json:"items,omitempty"` 3161 3162 // Kind: The kind of this resource, in this case "TriggerList". 3163 Kind string `json:"kind,omitempty"` 3164 3165 // Metadata: Metadata associated with this Trigger list. 3166 Metadata *ListMeta `json:"metadata,omitempty"` 3167 3168 // Unreachable: Locations that could not be reached. 3169 Unreachable []string `json:"unreachable,omitempty"` 3170 3171 // ServerResponse contains the HTTP response code and headers from the 3172 // server. 3173 googleapi.ServerResponse `json:"-"` 3174 3175 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 3176 // unconditionally include in API requests. By default, fields with 3177 // empty values are omitted from API requests. However, any non-pointer, 3178 // non-interface field appearing in ForceSendFields will be sent to the 3179 // server regardless of whether the field is empty or not. This may be 3180 // used to include empty fields in Patch requests. 3181 ForceSendFields []string `json:"-"` 3182 3183 // NullFields is a list of field names (e.g. "ApiVersion") to include in 3184 // API requests with the JSON null value. By default, fields with empty 3185 // values are omitted from API requests. However, any field with an 3186 // empty value appearing in NullFields will be sent to the server as 3187 // null. It is an error if a field in this list has a non-empty value. 3188 // This may be used to include null fields in Patch requests. 3189 NullFields []string `json:"-"` 3190} 3191 3192func (s *ListTriggersResponse) MarshalJSON() ([]byte, error) { 3193 type NoMethod ListTriggersResponse 3194 raw := NoMethod(*s) 3195 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3196} 3197 3198// LocalObjectReference: LocalObjectReference contains enough 3199// information to let you locate the referenced object inside the same 3200// namespace. 3201type LocalObjectReference struct { 3202 // Name: Name of the referent. More info: 3203 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 3204 Name string `json:"name,omitempty"` 3205 3206 // ForceSendFields is a list of field names (e.g. "Name") to 3207 // unconditionally include in API requests. By default, fields with 3208 // empty values are omitted from API requests. However, any non-pointer, 3209 // non-interface field appearing in ForceSendFields will be sent to the 3210 // server regardless of whether the field is empty or not. This may be 3211 // used to include empty fields in Patch requests. 3212 ForceSendFields []string `json:"-"` 3213 3214 // NullFields is a list of field names (e.g. "Name") to include in API 3215 // requests with the JSON null value. By default, fields with empty 3216 // values are omitted from API requests. However, any field with an 3217 // empty value appearing in NullFields will be sent to the server as 3218 // null. It is an error if a field in this list has a non-empty value. 3219 // This may be used to include null fields in Patch requests. 3220 NullFields []string `json:"-"` 3221} 3222 3223func (s *LocalObjectReference) MarshalJSON() ([]byte, error) { 3224 type NoMethod LocalObjectReference 3225 raw := NoMethod(*s) 3226 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3227} 3228 3229// Location: A resource that represents Google Cloud Platform location. 3230type Location struct { 3231 // DisplayName: The friendly name for this location, typically a nearby 3232 // city name. For example, "Tokyo". 3233 DisplayName string `json:"displayName,omitempty"` 3234 3235 // Labels: Cross-service attributes for the location. For example 3236 // {"cloud.googleapis.com/region": "us-east1"} 3237 Labels map[string]string `json:"labels,omitempty"` 3238 3239 // LocationId: The canonical id for this location. For example: 3240 // "us-east1". 3241 LocationId string `json:"locationId,omitempty"` 3242 3243 // Metadata: Service-specific metadata. For example the available 3244 // capacity at the given location. 3245 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3246 3247 // Name: Resource name for the location, which may vary between 3248 // implementations. For example: 3249 // "projects/example-project/locations/us-east1" 3250 Name string `json:"name,omitempty"` 3251 3252 // ForceSendFields is a list of field names (e.g. "DisplayName") to 3253 // unconditionally include in API requests. By default, fields with 3254 // empty values are omitted from API requests. However, any non-pointer, 3255 // non-interface field appearing in ForceSendFields will be sent to the 3256 // server regardless of whether the field is empty or not. This may be 3257 // used to include empty fields in Patch requests. 3258 ForceSendFields []string `json:"-"` 3259 3260 // NullFields is a list of field names (e.g. "DisplayName") to include 3261 // in API requests with the JSON null value. By default, fields with 3262 // empty values are omitted from API requests. However, any field with 3263 // an empty value appearing in NullFields will be sent to the server as 3264 // null. It is an error if a field in this list has a non-empty value. 3265 // This may be used to include null fields in Patch requests. 3266 NullFields []string `json:"-"` 3267} 3268 3269func (s *Location) MarshalJSON() ([]byte, error) { 3270 type NoMethod Location 3271 raw := NoMethod(*s) 3272 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3273} 3274 3275// ObjectMeta: ObjectMeta is metadata that all persisted resources must 3276// have, which includes all objects users must create. 3277type ObjectMeta struct { 3278 // Annotations: Annotations is an unstructured key value map stored with 3279 // a resource that may be set by external tools to store and retrieve 3280 // arbitrary metadata. They are not queryable and should be preserved 3281 // when modifying objects. More info: 3282 // http://kubernetes.io/docs/user-guide/annotations +optional 3283 Annotations map[string]string `json:"annotations,omitempty"` 3284 3285 // ClusterName: Not currently supported by Cloud Run. The name of the 3286 // cluster which the object belongs to. This is used to distinguish 3287 // resources with same name and namespace in different clusters. This 3288 // field is not set anywhere right now and apiserver is going to ignore 3289 // it if set in create or update request. +optional 3290 ClusterName string `json:"clusterName,omitempty"` 3291 3292 // CreationTimestamp: CreationTimestamp is a timestamp representing the 3293 // server time when this object was created. It is not guaranteed to be 3294 // set in happens-before order across separate operations. Clients may 3295 // not set this value. It is represented in RFC3339 form and is in UTC. 3296 // Populated by the system. Read-only. Null for lists. More info: 3297 // https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 3298 // +optional 3299 CreationTimestamp string `json:"creationTimestamp,omitempty"` 3300 3301 // DeletionGracePeriodSeconds: Not currently supported by Cloud Run. 3302 // Number of seconds allowed for this object to gracefully terminate 3303 // before it will be removed from the system. Only set when 3304 // deletionTimestamp is also set. May only be shortened. Read-only. 3305 // +optional 3306 DeletionGracePeriodSeconds int64 `json:"deletionGracePeriodSeconds,omitempty"` 3307 3308 // DeletionTimestamp: DeletionTimestamp is RFC 3339 date and time at 3309 // which this resource will be deleted. This field is set by the server 3310 // when a graceful deletion is requested by the user, and is not 3311 // directly settable by a client. The resource is expected to be deleted 3312 // (no longer visible from resource lists, and not reachable by name) 3313 // after the time in this field, once the finalizers list is empty. As 3314 // long as the finalizers list contains items, deletion is blocked. Once 3315 // the deletionTimestamp is set, this value may not be unset or be set 3316 // further into the future, although it may be shortened or the resource 3317 // may be deleted prior to this time. For example, a user may request 3318 // that a pod is deleted in 30 seconds. The Kubelet will react by 3319 // sending a graceful termination signal to the containers in the pod. 3320 // After that 30 seconds, the Kubelet will send a hard termination 3321 // signal (SIGKILL) to the container and after cleanup, remove the pod 3322 // from the API. In the presence of network partitions, this object may 3323 // still exist after this timestamp, until an administrator or automated 3324 // process can determine the resource is fully terminated. If not set, 3325 // graceful deletion of the object has not been requested. Populated by 3326 // the system when a graceful deletion is requested. Read-only. More 3327 // info: 3328 // https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 3329 // +optional 3330 DeletionTimestamp string `json:"deletionTimestamp,omitempty"` 3331 3332 // Finalizers: Not currently supported by Cloud Run. Must be empty 3333 // before the object is deleted from the registry. Each entry is an 3334 // identifier for the responsible component that will remove the entry 3335 // from the list. If the deletionTimestamp of the object is non-nil, 3336 // entries in this list can only be removed. +optional 3337 // +patchStrategy=merge 3338 Finalizers []string `json:"finalizers,omitempty"` 3339 3340 // GenerateName: Not currently supported by Cloud Run. GenerateName is 3341 // an optional prefix, used by the server, to generate a unique name 3342 // ONLY IF the Name field has not been provided. If this field is used, 3343 // the name returned to the client will be different than the name 3344 // passed. This value will also be combined with a unique suffix. The 3345 // provided value has the same validation rules as the Name field, and 3346 // may be truncated by the length of the suffix required to make the 3347 // value unique on the server. If this field is specified and the 3348 // generated name exists, the server will NOT return a 409 - instead, it 3349 // will either return 201 Created or 500 with Reason ServerTimeout 3350 // indicating a unique name could not be found in the time allotted, and 3351 // the client should retry (optionally after the time indicated in the 3352 // Retry-After header). Applied only if Name is not specified. More 3353 // info: 3354 // https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency +optional string generateName = 3355 // 2; 3356 GenerateName string `json:"generateName,omitempty"` 3357 3358 // Generation: A sequence number representing a specific generation of 3359 // the desired state. Populated by the system. Read-only. +optional 3360 Generation int64 `json:"generation,omitempty"` 3361 3362 // Labels: Map of string keys and values that can be used to organize 3363 // and categorize (scope and select) objects. May match selectors of 3364 // replication controllers and routes. More info: 3365 // http://kubernetes.io/docs/user-guide/labels +optional 3366 Labels map[string]string `json:"labels,omitempty"` 3367 3368 // Name: Name must be unique within a namespace, within a Cloud Run 3369 // region. Is required when creating resources, although some resources 3370 // may allow a client to request the generation of an appropriate name 3371 // automatically. Name is primarily intended for creation idempotence 3372 // and configuration definition. Cannot be updated. More info: 3373 // http://kubernetes.io/docs/user-guide/identifiers#names +optional 3374 Name string `json:"name,omitempty"` 3375 3376 // Namespace: Namespace defines the space within each name must be 3377 // unique, within a Cloud Run region. In Cloud Run the namespace must be 3378 // equal to either the project ID or project number. 3379 Namespace string `json:"namespace,omitempty"` 3380 3381 // OwnerReferences: List of objects that own this object. If ALL objects 3382 // in the list have been deleted, this object will be garbage collected. 3383 // +optional 3384 OwnerReferences []*OwnerReference `json:"ownerReferences,omitempty"` 3385 3386 // ResourceVersion: An opaque value that represents the internal version 3387 // of this object that can be used by clients to determine when objects 3388 // have changed. May be used for optimistic concurrency, change 3389 // detection, and the watch operation on a resource or set of resources. 3390 // Clients must treat these values as opaque and passed unmodified back 3391 // to the server. They may only be valid for a particular resource or 3392 // set of resources. Populated by the system. Read-only. Value must be 3393 // treated as opaque by clients and . More info: 3394 // https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency 3395 // +optional 3396 ResourceVersion string `json:"resourceVersion,omitempty"` 3397 3398 // SelfLink: SelfLink is a URL representing this object. Populated by 3399 // the system. Read-only. +optional string selfLink = 4; 3400 SelfLink string `json:"selfLink,omitempty"` 3401 3402 // Uid: UID is the unique in time and space value for this object. It is 3403 // typically generated by the server on successful creation of a 3404 // resource and is not allowed to change on PUT operations. Populated by 3405 // the system. Read-only. More info: 3406 // http://kubernetes.io/docs/user-guide/identifiers#uids +optional 3407 Uid string `json:"uid,omitempty"` 3408 3409 // ForceSendFields is a list of field names (e.g. "Annotations") to 3410 // unconditionally include in API requests. By default, fields with 3411 // empty values are omitted from API requests. However, any non-pointer, 3412 // non-interface field appearing in ForceSendFields will be sent to the 3413 // server regardless of whether the field is empty or not. This may be 3414 // used to include empty fields in Patch requests. 3415 ForceSendFields []string `json:"-"` 3416 3417 // NullFields is a list of field names (e.g. "Annotations") to include 3418 // in API requests with the JSON null value. By default, fields with 3419 // empty values are omitted from API requests. However, any field with 3420 // an empty value appearing in NullFields will be sent to the server as 3421 // null. It is an error if a field in this list has a non-empty value. 3422 // This may be used to include null fields in Patch requests. 3423 NullFields []string `json:"-"` 3424} 3425 3426func (s *ObjectMeta) MarshalJSON() ([]byte, error) { 3427 type NoMethod ObjectMeta 3428 raw := NoMethod(*s) 3429 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3430} 3431 3432// ObjectReference: ObjectReference contains enough information to let 3433// you inspect or modify the referred object. 3434type ObjectReference struct { 3435 // ApiVersion: API version of the referent. +optional 3436 ApiVersion string `json:"apiVersion,omitempty"` 3437 3438 // FieldPath: If referring to a piece of an object instead of an entire 3439 // object, this string should contain a valid JSON/Go field access 3440 // statement, such as desiredState.manifest.containers[2]. For example, 3441 // if the object reference is to a container within a pod, this would 3442 // take on a value like: "spec.containers{name}" (where "name" refers to 3443 // the name of the container that triggered the event) or if no 3444 // container name is specified "spec.containers[2]" (container with 3445 // index 2 in this pod). This syntax is chosen only to have some 3446 // well-defined way of referencing a part of an object. 3447 FieldPath string `json:"fieldPath,omitempty"` 3448 3449 // Kind: Kind of the referent. More info: 3450 // https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 3451 // +optional 3452 Kind string `json:"kind,omitempty"` 3453 3454 // Name: Name of the referent. More info: 3455 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 3456 // +optional 3457 Name string `json:"name,omitempty"` 3458 3459 // Namespace: Namespace of the referent. More info: 3460 // https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ 3461 // +optional 3462 Namespace string `json:"namespace,omitempty"` 3463 3464 // ResourceVersion: Specific resourceVersion to which this reference is 3465 // made, if any. More info: 3466 // https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency 3467 // +optional 3468 ResourceVersion string `json:"resourceVersion,omitempty"` 3469 3470 // Uid: UID of the referent. More info: 3471 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids 3472 // +optional 3473 Uid string `json:"uid,omitempty"` 3474 3475 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 3476 // unconditionally include in API requests. By default, fields with 3477 // empty values are omitted from API requests. However, any non-pointer, 3478 // non-interface field appearing in ForceSendFields will be sent to the 3479 // server regardless of whether the field is empty or not. This may be 3480 // used to include empty fields in Patch requests. 3481 ForceSendFields []string `json:"-"` 3482 3483 // NullFields is a list of field names (e.g. "ApiVersion") to include in 3484 // API requests with the JSON null value. By default, fields with empty 3485 // values are omitted from API requests. However, any field with an 3486 // empty value appearing in NullFields will be sent to the server as 3487 // null. It is an error if a field in this list has a non-empty value. 3488 // This may be used to include null fields in Patch requests. 3489 NullFields []string `json:"-"` 3490} 3491 3492func (s *ObjectReference) MarshalJSON() ([]byte, error) { 3493 type NoMethod ObjectReference 3494 raw := NoMethod(*s) 3495 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3496} 3497 3498// OwnerReference: OwnerReference contains enough information to let you 3499// identify an owning object. Currently, an owning object must be in the 3500// same namespace, so there is no namespace field. 3501type OwnerReference struct { 3502 // ApiVersion: API version of the referent. 3503 ApiVersion string `json:"apiVersion,omitempty"` 3504 3505 // BlockOwnerDeletion: If true, AND if the owner has the 3506 // "foregroundDeletion" finalizer, then the owner cannot be deleted from 3507 // the key-value store until this reference is removed. Defaults to 3508 // false. To set this field, a user needs "delete" permission of the 3509 // owner, otherwise 422 (Unprocessable Entity) will be returned. 3510 // +optional 3511 BlockOwnerDeletion bool `json:"blockOwnerDeletion,omitempty"` 3512 3513 // Controller: If true, this reference points to the managing 3514 // controller. +optional 3515 Controller bool `json:"controller,omitempty"` 3516 3517 // Kind: Kind of the referent. More info: 3518 // https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 3519 Kind string `json:"kind,omitempty"` 3520 3521 // Name: Name of the referent. More info: 3522 // http://kubernetes.io/docs/user-guide/identifiers#names 3523 Name string `json:"name,omitempty"` 3524 3525 // Uid: UID of the referent. More info: 3526 // http://kubernetes.io/docs/user-guide/identifiers#uids 3527 Uid string `json:"uid,omitempty"` 3528 3529 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 3530 // unconditionally include in API requests. By default, fields with 3531 // empty values are omitted from API requests. However, any non-pointer, 3532 // non-interface field appearing in ForceSendFields will be sent to the 3533 // server regardless of whether the field is empty or not. This may be 3534 // used to include empty fields in Patch requests. 3535 ForceSendFields []string `json:"-"` 3536 3537 // NullFields is a list of field names (e.g. "ApiVersion") to include in 3538 // API requests with the JSON null value. By default, fields with empty 3539 // values are omitted from API requests. However, any field with an 3540 // empty value appearing in NullFields will be sent to the server as 3541 // null. It is an error if a field in this list has a non-empty value. 3542 // This may be used to include null fields in Patch requests. 3543 NullFields []string `json:"-"` 3544} 3545 3546func (s *OwnerReference) MarshalJSON() ([]byte, error) { 3547 type NoMethod OwnerReference 3548 raw := NoMethod(*s) 3549 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3550} 3551 3552// Policy: An Identity and Access Management (IAM) policy, which 3553// specifies access controls for Google Cloud resources. A `Policy` is a 3554// collection of `bindings`. A `binding` binds one or more `members` to 3555// a single `role`. Members can be user accounts, service accounts, 3556// Google groups, and domains (such as G Suite). A `role` is a named 3557// list of permissions; each `role` can be an IAM predefined role or a 3558// user-created custom role. For some types of Google Cloud resources, a 3559// `binding` can also specify a `condition`, which is a logical 3560// expression that allows access to a resource only if the expression 3561// evaluates to `true`. A condition can add constraints based on 3562// attributes of the request, the resource, or both. To learn which 3563// resources support conditions in their IAM policies, see the [IAM 3564// documentation](https://cloud.google.com/iam/help/conditions/resource-p 3565// olicies). **JSON example:** { "bindings": [ { "role": 3566// "roles/resourcemanager.organizationAdmin", "members": [ 3567// "user:mike@example.com", "group:admins@example.com", 3568// "domain:google.com", 3569// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { 3570// "role": "roles/resourcemanager.organizationViewer", "members": [ 3571// "user:eve@example.com" ], "condition": { "title": "expirable access", 3572// "description": "Does not grant access after Sep 2020", "expression": 3573// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], 3574// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - 3575// members: - user:mike@example.com - group:admins@example.com - 3576// domain:google.com - 3577// serviceAccount:my-project-id@appspot.gserviceaccount.com role: 3578// roles/resourcemanager.organizationAdmin - members: - 3579// user:eve@example.com role: roles/resourcemanager.organizationViewer 3580// condition: title: expirable access description: Does not grant access 3581// after Sep 2020 expression: request.time < 3582// timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3583// 3 For a description of IAM and its features, see the [IAM 3584// documentation](https://cloud.google.com/iam/docs/). 3585type Policy struct { 3586 // AuditConfigs: Specifies cloud audit logging configuration for this 3587 // policy. 3588 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 3589 3590 // Bindings: Associates a list of `members` to a `role`. Optionally, may 3591 // specify a `condition` that determines how and when the `bindings` are 3592 // applied. Each of the `bindings` must contain at least one member. 3593 Bindings []*Binding `json:"bindings,omitempty"` 3594 3595 // Etag: `etag` is used for optimistic concurrency control as a way to 3596 // help prevent simultaneous updates of a policy from overwriting each 3597 // other. It is strongly suggested that systems make use of the `etag` 3598 // in the read-modify-write cycle to perform policy updates in order to 3599 // avoid race conditions: An `etag` is returned in the response to 3600 // `getIamPolicy`, and systems are expected to put that etag in the 3601 // request to `setIamPolicy` to ensure that their change will be applied 3602 // to the same version of the policy. **Important:** If you use IAM 3603 // Conditions, you must include the `etag` field whenever you call 3604 // `setIamPolicy`. If you omit this field, then IAM allows you to 3605 // overwrite a version `3` policy with a version `1` policy, and all of 3606 // the conditions in the version `3` policy are lost. 3607 Etag string `json:"etag,omitempty"` 3608 3609 // Version: Specifies the format of the policy. Valid values are `0`, 3610 // `1`, and `3`. Requests that specify an invalid value are rejected. 3611 // Any operation that affects conditional role bindings must specify 3612 // version `3`. This requirement applies to the following operations: * 3613 // Getting a policy that includes a conditional role binding * Adding a 3614 // conditional role binding to a policy * Changing a conditional role 3615 // binding in a policy * Removing any role binding, with or without a 3616 // condition, from a policy that includes conditions **Important:** If 3617 // you use IAM Conditions, you must include the `etag` field whenever 3618 // you call `setIamPolicy`. If you omit this field, then IAM allows you 3619 // to overwrite a version `3` policy with a version `1` policy, and all 3620 // of the conditions in the version `3` policy are lost. If a policy 3621 // does not include any conditions, operations on that policy may 3622 // specify any valid version or leave the field unset. To learn which 3623 // resources support conditions in their IAM policies, see the [IAM 3624 // documentation](https://cloud.google.com/iam/help/conditions/resource-p 3625 // olicies). 3626 Version int64 `json:"version,omitempty"` 3627 3628 // ServerResponse contains the HTTP response code and headers from the 3629 // server. 3630 googleapi.ServerResponse `json:"-"` 3631 3632 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 3633 // unconditionally include in API requests. By default, fields with 3634 // empty values are omitted from API requests. However, any non-pointer, 3635 // non-interface field appearing in ForceSendFields will be sent to the 3636 // server regardless of whether the field is empty or not. This may be 3637 // used to include empty fields in Patch requests. 3638 ForceSendFields []string `json:"-"` 3639 3640 // NullFields is a list of field names (e.g. "AuditConfigs") to include 3641 // in API requests with the JSON null value. By default, fields with 3642 // empty values are omitted from API requests. However, any field with 3643 // an empty value appearing in NullFields will be sent to the server as 3644 // null. It is an error if a field in this list has a non-empty value. 3645 // This may be used to include null fields in Patch requests. 3646 NullFields []string `json:"-"` 3647} 3648 3649func (s *Policy) MarshalJSON() ([]byte, error) { 3650 type NoMethod Policy 3651 raw := NoMethod(*s) 3652 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3653} 3654 3655// Probe: Probe describes a health check to be performed against a 3656// container to determine whether it is alive or ready to receive 3657// traffic. 3658type Probe struct { 3659 // FailureThreshold: Minimum consecutive failures for the probe to be 3660 // considered failed after having succeeded. Defaults to 3. Minimum 3661 // value is 1. +optional 3662 FailureThreshold int64 `json:"failureThreshold,omitempty"` 3663 3664 // Handler: The action taken to determine the health of a container 3665 Handler *Handler `json:"handler,omitempty"` 3666 3667 // InitialDelaySeconds: Number of seconds after the container has 3668 // started before liveness probes are initiated. More info: 3669 // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 3670 // +optional 3671 InitialDelaySeconds int64 `json:"initialDelaySeconds,omitempty"` 3672 3673 // PeriodSeconds: How often (in seconds) to perform the probe. Default 3674 // to 10 seconds. Minimum value is 1. +optional 3675 PeriodSeconds int64 `json:"periodSeconds,omitempty"` 3676 3677 // SuccessThreshold: Minimum consecutive successes for the probe to be 3678 // considered successful after having failed. Defaults to 1. Must be 1 3679 // for liveness. Minimum value is 1. +optional 3680 SuccessThreshold int64 `json:"successThreshold,omitempty"` 3681 3682 // TimeoutSeconds: Number of seconds after which the probe times out. 3683 // Defaults to 1 second. Minimum value is 1. More info: 3684 // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 3685 // +optional 3686 TimeoutSeconds int64 `json:"timeoutSeconds,omitempty"` 3687 3688 // ForceSendFields is a list of field names (e.g. "FailureThreshold") to 3689 // unconditionally include in API requests. By default, fields with 3690 // empty values are omitted from API requests. However, any non-pointer, 3691 // non-interface field appearing in ForceSendFields will be sent to the 3692 // server regardless of whether the field is empty or not. This may be 3693 // used to include empty fields in Patch requests. 3694 ForceSendFields []string `json:"-"` 3695 3696 // NullFields is a list of field names (e.g. "FailureThreshold") to 3697 // include in API requests with the JSON null value. By default, fields 3698 // with empty values are omitted from API requests. However, any field 3699 // with an empty value appearing in NullFields will be sent to the 3700 // server as null. It is an error if a field in this list has a 3701 // non-empty value. This may be used to include null fields in Patch 3702 // requests. 3703 NullFields []string `json:"-"` 3704} 3705 3706func (s *Probe) MarshalJSON() ([]byte, error) { 3707 type NoMethod Probe 3708 raw := NoMethod(*s) 3709 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3710} 3711 3712// Quantity: The view model of a single quantity, e.g. "800 MiB". 3713// Corresponds to 3714// https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/generated.proto 3715type Quantity struct { 3716 // String: Stringified version of the quantity, e.g., "800 MiB". 3717 String string `json:"string,omitempty"` 3718 3719 // ForceSendFields is a list of field names (e.g. "String") to 3720 // unconditionally include in API requests. By default, fields with 3721 // empty values are omitted from API requests. However, any non-pointer, 3722 // non-interface field appearing in ForceSendFields will be sent to the 3723 // server regardless of whether the field is empty or not. This may be 3724 // used to include empty fields in Patch requests. 3725 ForceSendFields []string `json:"-"` 3726 3727 // NullFields is a list of field names (e.g. "String") to include in API 3728 // requests with the JSON null value. By default, fields with empty 3729 // values are omitted from API requests. However, any field with an 3730 // empty value appearing in NullFields will be sent to the server as 3731 // null. It is an error if a field in this list has a non-empty value. 3732 // This may be used to include null fields in Patch requests. 3733 NullFields []string `json:"-"` 3734} 3735 3736func (s *Quantity) MarshalJSON() ([]byte, error) { 3737 type NoMethod Quantity 3738 raw := NoMethod(*s) 3739 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3740} 3741 3742// ResourceRecord: A DNS resource record. 3743type ResourceRecord struct { 3744 // Name: Relative name of the object affected by this record. Only 3745 // applicable for `CNAME` records. Example: 'www'. 3746 Name string `json:"name,omitempty"` 3747 3748 // Rrdata: Data for this record. Values vary by record type, as defined 3749 // in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). 3750 Rrdata string `json:"rrdata,omitempty"` 3751 3752 // Type: Resource record type. Example: `AAAA`. 3753 // 3754 // Possible values: 3755 // "RECORD_TYPE_UNSPECIFIED" - An unknown resource record. 3756 // "A" - An A resource record. Data is an IPv4 address. 3757 // "AAAA" - An AAAA resource record. Data is an IPv6 address. 3758 // "CNAME" - A CNAME resource record. Data is a domain name to be 3759 // aliased. 3760 Type string `json:"type,omitempty"` 3761 3762 // ForceSendFields is a list of field names (e.g. "Name") to 3763 // unconditionally include in API requests. By default, fields with 3764 // empty values are omitted from API requests. However, any non-pointer, 3765 // non-interface field appearing in ForceSendFields will be sent to the 3766 // server regardless of whether the field is empty or not. This may be 3767 // used to include empty fields in Patch requests. 3768 ForceSendFields []string `json:"-"` 3769 3770 // NullFields is a list of field names (e.g. "Name") to include in API 3771 // requests with the JSON null value. By default, fields with empty 3772 // values are omitted from API requests. However, any field with an 3773 // empty value appearing in NullFields will be sent to the server as 3774 // null. It is an error if a field in this list has a non-empty value. 3775 // This may be used to include null fields in Patch requests. 3776 NullFields []string `json:"-"` 3777} 3778 3779func (s *ResourceRecord) MarshalJSON() ([]byte, error) { 3780 type NoMethod ResourceRecord 3781 raw := NoMethod(*s) 3782 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3783} 3784 3785// ResourceRequirements: ResourceRequirements describes the compute 3786// resource requirements. 3787type ResourceRequirements struct { 3788 // Limits: Limits describes the maximum amount of compute resources 3789 // allowed. The values of the map is string form of the 'quantity' k8s 3790 // type: 3791 // https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go 3792 Limits map[string]string `json:"limits,omitempty"` 3793 3794 // LimitsInMap: Limits describes the maximum amount of compute resources 3795 // allowed. This is a temporary field created to migrate away from the 3796 // map limits field. This is done to become compliant with k8s style 3797 // API. This field is deprecated in favor of limits field. 3798 LimitsInMap map[string]Quantity `json:"limitsInMap,omitempty"` 3799 3800 // Requests: Requests describes the minimum amount of compute resources 3801 // required. If Requests is omitted for a container, it defaults to 3802 // Limits if that is explicitly specified, otherwise to an 3803 // implementation-defined value. The values of the map is string form of 3804 // the 'quantity' k8s type: 3805 // https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go 3806 Requests map[string]string `json:"requests,omitempty"` 3807 3808 // RequestsInMap: Requests describes the minimum amount of compute 3809 // resources required. If Requests is omitted for a container, it 3810 // defaults to Limits if that is explicitly specified, otherwise to an 3811 // implementation-defined value. This is a temporary field created to 3812 // migrate away from the map requests field. This is done to become 3813 // compliant with k8s style API. This field is deprecated in favor of 3814 // requests field. 3815 RequestsInMap map[string]Quantity `json:"requestsInMap,omitempty"` 3816 3817 // ForceSendFields is a list of field names (e.g. "Limits") to 3818 // unconditionally include in API requests. By default, fields with 3819 // empty values are omitted from API requests. However, any non-pointer, 3820 // non-interface field appearing in ForceSendFields will be sent to the 3821 // server regardless of whether the field is empty or not. This may be 3822 // used to include empty fields in Patch requests. 3823 ForceSendFields []string `json:"-"` 3824 3825 // NullFields is a list of field names (e.g. "Limits") to include in API 3826 // requests with the JSON null value. By default, fields with empty 3827 // values are omitted from API requests. However, any field with an 3828 // empty value appearing in NullFields will be sent to the server as 3829 // null. It is an error if a field in this list has a non-empty value. 3830 // This may be used to include null fields in Patch requests. 3831 NullFields []string `json:"-"` 3832} 3833 3834func (s *ResourceRequirements) MarshalJSON() ([]byte, error) { 3835 type NoMethod ResourceRequirements 3836 raw := NoMethod(*s) 3837 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3838} 3839 3840// Revision: Revision is an immutable snapshot of code and 3841// configuration. A revision references a container image. Revisions are 3842// created by updates to a Configuration. Cloud Run does not currently 3843// support referencing a build that is responsible for materializing the 3844// container image from source. See also: 3845// https://github.com/knative/serving/blob/master/docs/spec/overview.md#revision 3846type Revision struct { 3847 // ApiVersion: The API version for this call such as 3848 // "serving.knative.dev/v1alpha1". 3849 ApiVersion string `json:"apiVersion,omitempty"` 3850 3851 // Kind: The kind of this resource, in this case "Revision". 3852 Kind string `json:"kind,omitempty"` 3853 3854 // Metadata: Metadata associated with this Revision, including name, 3855 // namespace, labels, and annotations. 3856 Metadata *ObjectMeta `json:"metadata,omitempty"` 3857 3858 // Spec: Spec holds the desired state of the Revision (from the client). 3859 Spec *RevisionSpec `json:"spec,omitempty"` 3860 3861 // Status: Status communicates the observed state of the Revision (from 3862 // the controller). 3863 Status *RevisionStatus `json:"status,omitempty"` 3864 3865 // ServerResponse contains the HTTP response code and headers from the 3866 // server. 3867 googleapi.ServerResponse `json:"-"` 3868 3869 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 3870 // unconditionally include in API requests. By default, fields with 3871 // empty values are omitted from API requests. However, any non-pointer, 3872 // non-interface field appearing in ForceSendFields will be sent to the 3873 // server regardless of whether the field is empty or not. This may be 3874 // used to include empty fields in Patch requests. 3875 ForceSendFields []string `json:"-"` 3876 3877 // NullFields is a list of field names (e.g. "ApiVersion") to include in 3878 // API requests with the JSON null value. By default, fields with empty 3879 // values are omitted from API requests. However, any field with an 3880 // empty value appearing in NullFields will be sent to the server as 3881 // null. It is an error if a field in this list has a non-empty value. 3882 // This may be used to include null fields in Patch requests. 3883 NullFields []string `json:"-"` 3884} 3885 3886func (s *Revision) MarshalJSON() ([]byte, error) { 3887 type NoMethod Revision 3888 raw := NoMethod(*s) 3889 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3890} 3891 3892// RevisionCondition: RevisionCondition defines a readiness condition 3893// for a Revision. 3894type RevisionCondition struct { 3895 // LastTransitionTime: Last time the condition transitioned from one 3896 // status to another. +optional 3897 LastTransitionTime string `json:"lastTransitionTime,omitempty"` 3898 3899 // Message: Human readable message indicating details about the current 3900 // status. +optional 3901 Message string `json:"message,omitempty"` 3902 3903 // Reason: One-word CamelCase reason for the condition's last 3904 // transition. +optional 3905 Reason string `json:"reason,omitempty"` 3906 3907 // Severity: How to interpret failures of this condition, one of Error, 3908 // Warning, Info +optional 3909 Severity string `json:"severity,omitempty"` 3910 3911 // Status: Status of the condition, one of True, False, Unknown. 3912 Status string `json:"status,omitempty"` 3913 3914 // Type: RevisionConditionType is used to communicate the status of the 3915 // reconciliation process. See also: 3916 // https://github.com/knative/serving/blob/master/docs/spec/errors.md#error-conditions-and-reporting Types include: * "Ready": True when the Revision is ready. * "ResourcesAvailable": True when underlying resources have been provisioned. * "ContainerHealthy": True when the Revision readiness check completes. * "Active": True when the Revision may receive 3917 // traffic. 3918 Type string `json:"type,omitempty"` 3919 3920 // ForceSendFields is a list of field names (e.g. "LastTransitionTime") 3921 // to unconditionally include in API requests. By default, fields with 3922 // empty values are omitted from API requests. However, any non-pointer, 3923 // non-interface field appearing in ForceSendFields will be sent to the 3924 // server regardless of whether the field is empty or not. This may be 3925 // used to include empty fields in Patch requests. 3926 ForceSendFields []string `json:"-"` 3927 3928 // NullFields is a list of field names (e.g. "LastTransitionTime") to 3929 // include in API requests with the JSON null value. By default, fields 3930 // with empty values are omitted from API requests. However, any field 3931 // with an empty value appearing in NullFields will be sent to the 3932 // server as null. It is an error if a field in this list has a 3933 // non-empty value. This may be used to include null fields in Patch 3934 // requests. 3935 NullFields []string `json:"-"` 3936} 3937 3938func (s *RevisionCondition) MarshalJSON() ([]byte, error) { 3939 type NoMethod RevisionCondition 3940 raw := NoMethod(*s) 3941 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3942} 3943 3944// RevisionSpec: RevisionSpec holds the desired state of the Revision 3945// (from the client). 3946type RevisionSpec struct { 3947 // ConcurrencyModel: ConcurrencyModel specifies the desired concurrency 3948 // model (Single or Multi) for the Revision. Defaults to Multi. 3949 // Deprecated in favor of ContainerConcurrency. +optional 3950 ConcurrencyModel string `json:"concurrencyModel,omitempty"` 3951 3952 // Container: Container defines the unit of execution for this Revision. 3953 // In the context of a Revision, we disallow a number of the fields of 3954 // this Container, including: name, ports, and volumeMounts. The runtime 3955 // contract is documented here: 3956 // https://github.com/knative/serving/blob/master/docs/runtime-contract.md 3957 Container *Container `json:"container,omitempty"` 3958 3959 // ContainerConcurrency: (Optional) ContainerConcurrency specifies the 3960 // maximum allowed in-flight (concurrent) requests per container 3961 // instance of the Revision. Cloud Run fully managed: supported, 3962 // defaults to 80 Cloud Run on GKE: supported, defaults to 0, which 3963 // means concurrency to the application is not limited, and the system 3964 // decides the target concurrency for the autoscaler. 3965 ContainerConcurrency int64 `json:"containerConcurrency,omitempty"` 3966 3967 // Containers: Containers holds the single container that defines the 3968 // unit of execution for this Revision. In the context of a Revision, we 3969 // disallow a number of fields on this Container, including: name and 3970 // lifecycle. In Cloud Run, only a single container may be provided. 3971 Containers []*Container `json:"containers,omitempty"` 3972 3973 // Generation: Deprecated and not currently populated by Cloud Run. See 3974 // metadata.generation instead, which is the sequence number containing 3975 // the latest generation of the desired state. Read-only. 3976 Generation int64 `json:"generation,omitempty"` 3977 3978 // ServiceAccountName: Email address of the IAM service account 3979 // associated with the revision of the service. The service account 3980 // represents the identity of the running revision, and determines what 3981 // permissions the revision has. If not provided, the revision will use 3982 // the project's default service account. 3983 ServiceAccountName string `json:"serviceAccountName,omitempty"` 3984 3985 // ServingState: ServingState holds a value describing the state the 3986 // resources are in for this Revision. Users must not specify this when 3987 // creating a revision. It is expected that the system will manipulate 3988 // this based on routability and load. Populated by the system. 3989 // Read-only. 3990 // 3991 // Possible values: 3992 // "REVISION_SERVING_STATE_UNSPECIFIED" - The revision serving state 3993 // hasn't been specified. 3994 // "ACTIVE" - The revision is ready to serve traffic. 3995 // "RESERVE" - The revision is not currently serving traffic, but 3996 // could be made to serve traffic quickly. Not currently used by Cloud 3997 // Run. 3998 // "RETIRED" - The revision has been decommissioned and is not needed 3999 // to serve traffic anymore. A Revision may be brought out of 4000 // retirement, but it may take longer than it would from a "Reserve" 4001 // state. 4002 ServingState string `json:"servingState,omitempty"` 4003 4004 // TimeoutSeconds: TimeoutSeconds holds the max duration the instance is 4005 // allowed for responding to a request. Not currently used by Cloud Run. 4006 TimeoutSeconds int64 `json:"timeoutSeconds,omitempty"` 4007 4008 Volumes []*Volume `json:"volumes,omitempty"` 4009 4010 // ForceSendFields is a list of field names (e.g. "ConcurrencyModel") to 4011 // unconditionally include in API requests. By default, fields with 4012 // empty values are omitted from API requests. However, any non-pointer, 4013 // non-interface field appearing in ForceSendFields will be sent to the 4014 // server regardless of whether the field is empty or not. This may be 4015 // used to include empty fields in Patch requests. 4016 ForceSendFields []string `json:"-"` 4017 4018 // NullFields is a list of field names (e.g. "ConcurrencyModel") to 4019 // include in API requests with the JSON null value. By default, fields 4020 // with empty values are omitted from API requests. However, any field 4021 // with an empty value appearing in NullFields will be sent to the 4022 // server as null. It is an error if a field in this list has a 4023 // non-empty value. This may be used to include null fields in Patch 4024 // requests. 4025 NullFields []string `json:"-"` 4026} 4027 4028func (s *RevisionSpec) MarshalJSON() ([]byte, error) { 4029 type NoMethod RevisionSpec 4030 raw := NoMethod(*s) 4031 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4032} 4033 4034// RevisionStatus: RevisionStatus communicates the observed state of the 4035// Revision (from the controller). 4036type RevisionStatus struct { 4037 // Conditions: Conditions communicates information about 4038 // ongoing/complete reconciliation processes that bring the "spec" 4039 // inline with the observed state of the world. As a Revision is being 4040 // prepared, it will incrementally update conditions 4041 // "ResourcesAvailable", "ContainerHealthy", and "Active", which 4042 // contribute to the overall "Ready" condition. 4043 Conditions []*RevisionCondition `json:"conditions,omitempty"` 4044 4045 // ImageDigest: ImageDigest holds the resolved digest for the image 4046 // specified within .Spec.Container.Image. The digest is resolved during 4047 // the creation of Revision. This field holds the digest value 4048 // regardless of whether a tag or digest was originally specified in the 4049 // Container object. 4050 ImageDigest string `json:"imageDigest,omitempty"` 4051 4052 // LogUrl: Specifies the generated logging url for this particular 4053 // revision based on the revision url template specified in the 4054 // controller's config. +optional 4055 LogUrl string `json:"logUrl,omitempty"` 4056 4057 // ObservedGeneration: ObservedGeneration is the 'Generation' of the 4058 // Revision that was last processed by the controller. Clients polling 4059 // for completed reconciliation should poll until observedGeneration = 4060 // metadata.generation, and the Ready condition's status is True or 4061 // False. 4062 ObservedGeneration int64 `json:"observedGeneration,omitempty"` 4063 4064 // ServiceName: Not currently used by Cloud Run. 4065 ServiceName string `json:"serviceName,omitempty"` 4066 4067 // ForceSendFields is a list of field names (e.g. "Conditions") to 4068 // unconditionally include in API requests. By default, fields with 4069 // empty values are omitted from API requests. However, any non-pointer, 4070 // non-interface field appearing in ForceSendFields will be sent to the 4071 // server regardless of whether the field is empty or not. This may be 4072 // used to include empty fields in Patch requests. 4073 ForceSendFields []string `json:"-"` 4074 4075 // NullFields is a list of field names (e.g. "Conditions") to include in 4076 // API requests with the JSON null value. By default, fields with empty 4077 // values are omitted from API requests. However, any field with an 4078 // empty value appearing in NullFields will be sent to the server as 4079 // null. It is an error if a field in this list has a non-empty value. 4080 // This may be used to include null fields in Patch requests. 4081 NullFields []string `json:"-"` 4082} 4083 4084func (s *RevisionStatus) MarshalJSON() ([]byte, error) { 4085 type NoMethod RevisionStatus 4086 raw := NoMethod(*s) 4087 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4088} 4089 4090// RevisionTemplate: RevisionTemplateSpec describes the data a revision 4091// should have when created from a template. Based on: 4092// https://github.com/kubernetes/api/blob/e771f807/core/v1/types.go#L3179-L3190 4093type RevisionTemplate struct { 4094 // Metadata: Optional metadata for this Revision, including labels and 4095 // annotations. Name will be generated by the Configuration. To set 4096 // minimum instances for this revision, use the 4097 // "autoscaling.knative.dev/minScale" annotation key. (Cloud Run on GKE 4098 // only). To set maximum instances for this revision, use the 4099 // "autoscaling.knative.dev/maxScale" annotation key. To set Cloud SQL 4100 // connections for the revision, use the 4101 // "run.googleapis.com/cloudsql-instances" annotation key. Values should 4102 // be comma separated. 4103 Metadata *ObjectMeta `json:"metadata,omitempty"` 4104 4105 // Spec: RevisionSpec holds the desired state of the Revision (from the 4106 // client). 4107 Spec *RevisionSpec `json:"spec,omitempty"` 4108 4109 // ForceSendFields is a list of field names (e.g. "Metadata") to 4110 // unconditionally include in API requests. By default, fields with 4111 // empty values are omitted from API requests. However, any non-pointer, 4112 // non-interface field appearing in ForceSendFields will be sent to the 4113 // server regardless of whether the field is empty or not. This may be 4114 // used to include empty fields in Patch requests. 4115 ForceSendFields []string `json:"-"` 4116 4117 // NullFields is a list of field names (e.g. "Metadata") to include in 4118 // API requests with the JSON null value. By default, fields with empty 4119 // values are omitted from API requests. However, any field with an 4120 // empty value appearing in NullFields will be sent to the server as 4121 // null. It is an error if a field in this list has a non-empty value. 4122 // This may be used to include null fields in Patch requests. 4123 NullFields []string `json:"-"` 4124} 4125 4126func (s *RevisionTemplate) MarshalJSON() ([]byte, error) { 4127 type NoMethod RevisionTemplate 4128 raw := NoMethod(*s) 4129 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4130} 4131 4132// Route: Route is responsible for configuring ingress over a collection 4133// of Revisions. Some of the Revisions a Route distributes traffic over 4134// may be specified by referencing the Configuration responsible for 4135// creating them; in these cases the Route is additionally responsible 4136// for monitoring the Configuration for "latest ready" revision changes, 4137// and smoothly rolling out latest revisions. See also: 4138// https://github.com/knative/serving/blob/master/docs/spec/overview.md#route Cloud Run currently supports referencing a single Configuration to automatically deploy the "latest ready" Revision from that 4139// Configuration. 4140type Route struct { 4141 // ApiVersion: The API version for this call such as 4142 // "serving.knative.dev/v1alpha1". 4143 ApiVersion string `json:"apiVersion,omitempty"` 4144 4145 // Kind: The kind of this resource, in this case always "Route". 4146 Kind string `json:"kind,omitempty"` 4147 4148 // Metadata: Metadata associated with this Route, including name, 4149 // namespace, labels, and annotations. 4150 Metadata *ObjectMeta `json:"metadata,omitempty"` 4151 4152 // Spec: Spec holds the desired state of the Route (from the client). 4153 Spec *RouteSpec `json:"spec,omitempty"` 4154 4155 // Status: Status communicates the observed state of the Route (from the 4156 // controller). 4157 Status *RouteStatus `json:"status,omitempty"` 4158 4159 // ServerResponse contains the HTTP response code and headers from the 4160 // server. 4161 googleapi.ServerResponse `json:"-"` 4162 4163 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 4164 // unconditionally include in API requests. By default, fields with 4165 // empty values are omitted from API requests. However, any non-pointer, 4166 // non-interface field appearing in ForceSendFields will be sent to the 4167 // server regardless of whether the field is empty or not. This may be 4168 // used to include empty fields in Patch requests. 4169 ForceSendFields []string `json:"-"` 4170 4171 // NullFields is a list of field names (e.g. "ApiVersion") to include in 4172 // API requests with the JSON null value. By default, fields with empty 4173 // values are omitted from API requests. However, any field with an 4174 // empty value appearing in NullFields will be sent to the server as 4175 // null. It is an error if a field in this list has a non-empty value. 4176 // This may be used to include null fields in Patch requests. 4177 NullFields []string `json:"-"` 4178} 4179 4180func (s *Route) MarshalJSON() ([]byte, error) { 4181 type NoMethod Route 4182 raw := NoMethod(*s) 4183 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4184} 4185 4186// RouteCondition: RouteCondition defines a readiness condition for a 4187// Route. 4188type RouteCondition struct { 4189 // LastTransitionTime: Last time the condition transitioned from one 4190 // status to another. +optional 4191 LastTransitionTime string `json:"lastTransitionTime,omitempty"` 4192 4193 // Message: Human-readable message indicating details about last 4194 // transition. +optional 4195 Message string `json:"message,omitempty"` 4196 4197 // Reason: One-word CamelCase reason for the condition's last 4198 // transition. +optional 4199 Reason string `json:"reason,omitempty"` 4200 4201 // Severity: How to interpret failures of this condition, one of Error, 4202 // Warning, Info +optional 4203 Severity string `json:"severity,omitempty"` 4204 4205 // Status: Status of the condition, one of "True", "False", "Unknown". 4206 Status string `json:"status,omitempty"` 4207 4208 // Type: RouteConditionType is used to communicate the status of the 4209 // reconciliation process. See also: 4210 // https://github.com/knative/serving/blob/master/docs/spec/errors.md#error-conditions-and-reporting Types include: 4211 // "Ready". 4212 Type string `json:"type,omitempty"` 4213 4214 // ForceSendFields is a list of field names (e.g. "LastTransitionTime") 4215 // to unconditionally include in API requests. By default, fields with 4216 // empty values are omitted from API requests. However, any non-pointer, 4217 // non-interface field appearing in ForceSendFields will be sent to the 4218 // server regardless of whether the field is empty or not. This may be 4219 // used to include empty fields in Patch requests. 4220 ForceSendFields []string `json:"-"` 4221 4222 // NullFields is a list of field names (e.g. "LastTransitionTime") to 4223 // include in API requests with the JSON null value. By default, fields 4224 // with empty values are omitted from API requests. However, any field 4225 // with an empty value appearing in NullFields will be sent to the 4226 // server as null. It is an error if a field in this list has a 4227 // non-empty value. This may be used to include null fields in Patch 4228 // requests. 4229 NullFields []string `json:"-"` 4230} 4231 4232func (s *RouteCondition) MarshalJSON() ([]byte, error) { 4233 type NoMethod RouteCondition 4234 raw := NoMethod(*s) 4235 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4236} 4237 4238// RouteSpec: RouteSpec holds the desired state of the Route (from the 4239// client). 4240type RouteSpec struct { 4241 // Generation: Deprecated and not currently populated by Cloud Run. See 4242 // metadata.generation instead, which is the sequence number containing 4243 // the latest generation of the desired state. Read-only. 4244 Generation int64 `json:"generation,omitempty"` 4245 4246 // Traffic: Traffic specifies how to distribute traffic over a 4247 // collection of Knative Revisions and Configurations. Cloud Run 4248 // currently supports a single configurationName. 4249 Traffic []*TrafficTarget `json:"traffic,omitempty"` 4250 4251 // ForceSendFields is a list of field names (e.g. "Generation") to 4252 // unconditionally include in API requests. By default, fields with 4253 // empty values are omitted from API requests. However, any non-pointer, 4254 // non-interface field appearing in ForceSendFields will be sent to the 4255 // server regardless of whether the field is empty or not. This may be 4256 // used to include empty fields in Patch requests. 4257 ForceSendFields []string `json:"-"` 4258 4259 // NullFields is a list of field names (e.g. "Generation") to include in 4260 // API requests with the JSON null value. By default, fields with empty 4261 // values are omitted from API requests. However, any field with an 4262 // empty value appearing in NullFields will be sent to the server as 4263 // null. It is an error if a field in this list has a non-empty value. 4264 // This may be used to include null fields in Patch requests. 4265 NullFields []string `json:"-"` 4266} 4267 4268func (s *RouteSpec) MarshalJSON() ([]byte, error) { 4269 type NoMethod RouteSpec 4270 raw := NoMethod(*s) 4271 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4272} 4273 4274// RouteStatus: RouteStatus communicates the observed state of the Route 4275// (from the controller). 4276type RouteStatus struct { 4277 // Address: Similar to url, information on where the service is 4278 // available on HTTP. 4279 Address *Addressable `json:"address,omitempty"` 4280 4281 // Conditions: Conditions communicates information about 4282 // ongoing/complete reconciliation processes that bring the "spec" 4283 // inline with the observed state of the world. 4284 Conditions []*RouteCondition `json:"conditions,omitempty"` 4285 4286 // Domain: Deprecated - use url instead. Domain holds the top-level 4287 // domain that will distribute traffic over the provided targets. 4288 Domain string `json:"domain,omitempty"` 4289 4290 // DomainInternal: Deprecated - use address instead. For Cloud Run, 4291 // identifical to domain. 4292 DomainInternal string `json:"domainInternal,omitempty"` 4293 4294 // ObservedGeneration: ObservedGeneration is the 'Generation' of the 4295 // Route that was last processed by the controller. Clients polling for 4296 // completed reconciliation should poll until observedGeneration = 4297 // metadata.generation and the Ready condition's status is True or 4298 // False. Note that providing a trafficTarget that only has a 4299 // configurationName will result in a Route that does not increment 4300 // either its metadata.generation or its observedGeneration, as new 4301 // "latest ready" revisions from the Configuration are processed without 4302 // an update to the Route's spec. 4303 ObservedGeneration int64 `json:"observedGeneration,omitempty"` 4304 4305 // Traffic: Traffic holds the configured traffic distribution. These 4306 // entries will always contain RevisionName references. When 4307 // ConfigurationName appears in the spec, this will hold the 4308 // LatestReadyRevisionName that we last observed. 4309 Traffic []*TrafficTarget `json:"traffic,omitempty"` 4310 4311 // Url: URL holds the url that will distribute traffic over the provided 4312 // traffic targets. It generally has the form 4313 // https://{route-hash}-{project-hash}-{cluster-level-suffix}.a.run.app 4314 Url string `json:"url,omitempty"` 4315 4316 // ForceSendFields is a list of field names (e.g. "Address") to 4317 // unconditionally include in API requests. By default, fields with 4318 // empty values are omitted from API requests. However, any non-pointer, 4319 // non-interface field appearing in ForceSendFields will be sent to the 4320 // server regardless of whether the field is empty or not. This may be 4321 // used to include empty fields in Patch requests. 4322 ForceSendFields []string `json:"-"` 4323 4324 // NullFields is a list of field names (e.g. "Address") to include in 4325 // API requests with the JSON null value. By default, fields with empty 4326 // values are omitted from API requests. However, any field with an 4327 // empty value appearing in NullFields will be sent to the server as 4328 // null. It is an error if a field in this list has a non-empty value. 4329 // This may be used to include null fields in Patch requests. 4330 NullFields []string `json:"-"` 4331} 4332 4333func (s *RouteStatus) MarshalJSON() ([]byte, error) { 4334 type NoMethod RouteStatus 4335 raw := NoMethod(*s) 4336 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4337} 4338 4339// SELinuxOptions: SELinuxOptions are the labels to be applied to the 4340// container 4341type SELinuxOptions struct { 4342 // Level: Level is SELinux level label that applies to the container. 4343 // +optional 4344 Level string `json:"level,omitempty"` 4345 4346 // Role: Role is a SELinux role label that applies to the container. 4347 // +optional 4348 Role string `json:"role,omitempty"` 4349 4350 // Type: Type is a SELinux type label that applies to the container. 4351 // +optional 4352 Type string `json:"type,omitempty"` 4353 4354 // User: User is a SELinux user label that applies to the container. 4355 // +optional 4356 User string `json:"user,omitempty"` 4357 4358 // ForceSendFields is a list of field names (e.g. "Level") to 4359 // unconditionally include in API requests. By default, fields with 4360 // empty values are omitted from API requests. However, any non-pointer, 4361 // non-interface field appearing in ForceSendFields will be sent to the 4362 // server regardless of whether the field is empty or not. This may be 4363 // used to include empty fields in Patch requests. 4364 ForceSendFields []string `json:"-"` 4365 4366 // NullFields is a list of field names (e.g. "Level") to include in API 4367 // requests with the JSON null value. By default, fields with empty 4368 // values are omitted from API requests. However, any field with an 4369 // empty value appearing in NullFields will be sent to the server as 4370 // null. It is an error if a field in this list has a non-empty value. 4371 // This may be used to include null fields in Patch requests. 4372 NullFields []string `json:"-"` 4373} 4374 4375func (s *SELinuxOptions) MarshalJSON() ([]byte, error) { 4376 type NoMethod SELinuxOptions 4377 raw := NoMethod(*s) 4378 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4379} 4380 4381// SecretEnvSource: SecretEnvSource selects a Secret to populate the 4382// environment variables with. The contents of the target Secret's Data 4383// field will represent the key-value pairs as environment variables. 4384type SecretEnvSource struct { 4385 // LocalObjectReference: This field should not be used directly as it is 4386 // meant to be inlined directly into the message. Use the "name" field 4387 // instead. 4388 LocalObjectReference *LocalObjectReference `json:"localObjectReference,omitempty"` 4389 4390 // Name: Cloud Run fully managed: not supported Cloud Run for Anthos: 4391 // supported The Secret to select from. 4392 Name string `json:"name,omitempty"` 4393 4394 // Optional: Cloud Run fully managed: not supported Cloud Run for 4395 // Anthos: supported Specify whether the Secret must be defined 4396 // +optional 4397 Optional bool `json:"optional,omitempty"` 4398 4399 // ForceSendFields is a list of field names (e.g. 4400 // "LocalObjectReference") to unconditionally include in API requests. 4401 // By default, fields with empty values are omitted from API requests. 4402 // However, any non-pointer, non-interface field appearing in 4403 // ForceSendFields will be sent to the server regardless of whether the 4404 // field is empty or not. This may be used to include empty fields in 4405 // Patch requests. 4406 ForceSendFields []string `json:"-"` 4407 4408 // NullFields is a list of field names (e.g. "LocalObjectReference") to 4409 // include in API requests with the JSON null value. By default, fields 4410 // with empty values are omitted from API requests. However, any field 4411 // with an empty value appearing in NullFields will be sent to the 4412 // server as null. It is an error if a field in this list has a 4413 // non-empty value. This may be used to include null fields in Patch 4414 // requests. 4415 NullFields []string `json:"-"` 4416} 4417 4418func (s *SecretEnvSource) MarshalJSON() ([]byte, error) { 4419 type NoMethod SecretEnvSource 4420 raw := NoMethod(*s) 4421 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4422} 4423 4424// SecretKeySelector: Cloud Run fully managed: not supported Cloud Run 4425// on GKE: supported SecretKeySelector selects a key of a Secret. 4426type SecretKeySelector struct { 4427 // Key: Cloud Run fully managed: not supported Cloud Run on GKE: 4428 // supported The key of the secret to select from. Must be a valid 4429 // secret key. 4430 Key string `json:"key,omitempty"` 4431 4432 // LocalObjectReference: This field should not be used directly as it is 4433 // meant to be inlined directly into the message. Use the "name" field 4434 // instead. 4435 LocalObjectReference *LocalObjectReference `json:"localObjectReference,omitempty"` 4436 4437 // Name: Cloud Run fully managed: not supported Cloud Run on GKE: 4438 // supported The name of the secret in the pod's namespace to select 4439 // from. 4440 Name string `json:"name,omitempty"` 4441 4442 // Optional: Cloud Run fully managed: not supported Cloud Run on GKE: 4443 // supported Specify whether the Secret or its key must be defined 4444 // +optional 4445 Optional bool `json:"optional,omitempty"` 4446 4447 // ForceSendFields is a list of field names (e.g. "Key") to 4448 // unconditionally include in API requests. By default, fields with 4449 // empty values are omitted from API requests. However, any non-pointer, 4450 // non-interface field appearing in ForceSendFields will be sent to the 4451 // server regardless of whether the field is empty or not. This may be 4452 // used to include empty fields in Patch requests. 4453 ForceSendFields []string `json:"-"` 4454 4455 // NullFields is a list of field names (e.g. "Key") to include in API 4456 // requests with the JSON null value. By default, fields with empty 4457 // values are omitted from API requests. However, any field with an 4458 // empty value appearing in NullFields will be sent to the server as 4459 // null. It is an error if a field in this list has a non-empty value. 4460 // This may be used to include null fields in Patch requests. 4461 NullFields []string `json:"-"` 4462} 4463 4464func (s *SecretKeySelector) MarshalJSON() ([]byte, error) { 4465 type NoMethod SecretKeySelector 4466 raw := NoMethod(*s) 4467 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4468} 4469 4470// SecretVolumeSource: The contents of the target Secret's Data field 4471// will be presented in a volume as files using the keys in the Data 4472// field as the file names. 4473type SecretVolumeSource struct { 4474 // DefaultMode: Mode bits to use on created files by default. Must be a 4475 // value between 0 and 0777. Defaults to 0644. Directories within the 4476 // path are not affected by this setting. This might be in conflict with 4477 // other options that affect the file mode, like fsGroup, and the result 4478 // can be other mode bits set. 4479 DefaultMode int64 `json:"defaultMode,omitempty"` 4480 4481 // Items: If unspecified, each key-value pair in the Data field of the 4482 // referenced Secret will be projected into the volume as a file whose 4483 // name is the key and content is the value. If specified, the listed 4484 // keys will be projected into the specified paths, and unlisted keys 4485 // will not be present. If a key is specified which is not present in 4486 // the Secret, the volume setup will error unless it is marked optional. 4487 Items []*KeyToPath `json:"items,omitempty"` 4488 4489 // Optional: Specify whether the Secret or its keys must be defined. 4490 Optional bool `json:"optional,omitempty"` 4491 4492 // SecretName: Name of the secret in the container's namespace to use. 4493 SecretName string `json:"secretName,omitempty"` 4494 4495 // ForceSendFields is a list of field names (e.g. "DefaultMode") to 4496 // unconditionally include in API requests. By default, fields with 4497 // empty values are omitted from API requests. However, any non-pointer, 4498 // non-interface field appearing in ForceSendFields will be sent to the 4499 // server regardless of whether the field is empty or not. This may be 4500 // used to include empty fields in Patch requests. 4501 ForceSendFields []string `json:"-"` 4502 4503 // NullFields is a list of field names (e.g. "DefaultMode") to include 4504 // in API requests with the JSON null value. By default, fields with 4505 // empty values are omitted from API requests. However, any field with 4506 // an empty value appearing in NullFields will be sent to the server as 4507 // null. It is an error if a field in this list has a non-empty value. 4508 // This may be used to include null fields in Patch requests. 4509 NullFields []string `json:"-"` 4510} 4511 4512func (s *SecretVolumeSource) MarshalJSON() ([]byte, error) { 4513 type NoMethod SecretVolumeSource 4514 raw := NoMethod(*s) 4515 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4516} 4517 4518// SecurityContext: SecurityContext holds security configuration that 4519// will be applied to a container. Some fields are present in both 4520// SecurityContext and PodSecurityContext. When both are set, the values 4521// in SecurityContext take precedence. 4522type SecurityContext struct { 4523 // AllowPrivilegeEscalation: AllowPrivilegeEscalation controls whether a 4524 // process can gain more privileges than its parent process. This bool 4525 // directly controls if the no_new_privs flag will be set on the 4526 // container process. AllowPrivilegeEscalation is true always when the 4527 // container is: 1) run as Privileged 2) has CAP_SYS_ADMIN +optional 4528 AllowPrivilegeEscalation bool `json:"allowPrivilegeEscalation,omitempty"` 4529 4530 // Capabilities: The capabilities to add/drop when running containers. 4531 // Defaults to the default set of capabilities granted by the container 4532 // runtime. +optional 4533 Capabilities *Capabilities `json:"capabilities,omitempty"` 4534 4535 // Privileged: Run container in privileged mode. Processes in privileged 4536 // containers are essentially equivalent to root on the host. Defaults 4537 // to false. +optional 4538 Privileged bool `json:"privileged,omitempty"` 4539 4540 // ReadOnlyRootFilesystem: Whether this container has a read-only root 4541 // filesystem. Default is false. +optional 4542 ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"` 4543 4544 // RunAsGroup: The GID to run the entrypoint of the container process. 4545 // Uses runtime default if unset. May also be set in PodSecurityContext. 4546 // If set in both SecurityContext and PodSecurityContext, the value 4547 // specified in SecurityContext takes precedence. +optional 4548 RunAsGroup int64 `json:"runAsGroup,omitempty"` 4549 4550 // RunAsNonRoot: Indicates that the container must run as a non-root 4551 // user. If true, the Kubelet will validate the image at runtime to 4552 // ensure that it does not run as UID 0 (root) and fail to start the 4553 // container if it does. If unset or false, no such validation will be 4554 // performed. May also be set in PodSecurityContext. If set in both 4555 // SecurityContext and PodSecurityContext, the value specified in 4556 // SecurityContext takes precedence. +optional 4557 RunAsNonRoot bool `json:"runAsNonRoot,omitempty"` 4558 4559 // RunAsUser: The UID to run the entrypoint of the container process. 4560 // Defaults to user specified in image metadata if unspecified. May also 4561 // be set in PodSecurityContext. If set in both SecurityContext and 4562 // PodSecurityContext, the value specified in SecurityContext takes 4563 // precedence. +optional 4564 RunAsUser int64 `json:"runAsUser,omitempty"` 4565 4566 // SeLinuxOptions: The SELinux context to be applied to the container. 4567 // If unspecified, the container runtime will allocate a random SELinux 4568 // context for each container. May also be set in PodSecurityContext. If 4569 // set in both SecurityContext and PodSecurityContext, the value 4570 // specified in SecurityContext takes precedence. +optional 4571 SeLinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty"` 4572 4573 // ForceSendFields is a list of field names (e.g. 4574 // "AllowPrivilegeEscalation") to unconditionally include in API 4575 // requests. By default, fields with empty values are omitted from API 4576 // requests. However, any non-pointer, non-interface field appearing in 4577 // ForceSendFields will be sent to the server regardless of whether the 4578 // field is empty or not. This may be used to include empty fields in 4579 // Patch requests. 4580 ForceSendFields []string `json:"-"` 4581 4582 // NullFields is a list of field names (e.g. "AllowPrivilegeEscalation") 4583 // to include in API requests with the JSON null value. By default, 4584 // fields with empty values are omitted from API requests. However, any 4585 // field with an empty value appearing in NullFields will be sent to the 4586 // server as null. It is an error if a field in this list has a 4587 // non-empty value. This may be used to include null fields in Patch 4588 // requests. 4589 NullFields []string `json:"-"` 4590} 4591 4592func (s *SecurityContext) MarshalJSON() ([]byte, error) { 4593 type NoMethod SecurityContext 4594 raw := NoMethod(*s) 4595 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4596} 4597 4598// Service: Service acts as a top-level container that manages a set of 4599// Routes and Configurations which implement a network service. Service 4600// exists to provide a singular abstraction which can be access 4601// controlled, reasoned about, and which encapsulates software lifecycle 4602// decisions such as rollout policy and team resource ownership. Service 4603// acts only as an orchestrator of the underlying Routes and 4604// Configurations (much as a kubernetes Deployment orchestrates 4605// ReplicaSets). The Service's controller will track the statuses of its 4606// owned Configuration and Route, reflecting their statuses and 4607// conditions as its own. See also: 4608// https://github.com/knative/serving/blob/master/docs/spec/overview.md#service 4609type Service struct { 4610 // ApiVersion: The API version for this call such as 4611 // "serving.knative.dev/v1alpha1". 4612 ApiVersion string `json:"apiVersion,omitempty"` 4613 4614 // Kind: The kind of resource, in this case "Service". 4615 Kind string `json:"kind,omitempty"` 4616 4617 // Metadata: Metadata associated with this Service, including name, 4618 // namespace, labels, and annotations. 4619 Metadata *ObjectMeta `json:"metadata,omitempty"` 4620 4621 // Spec: Spec holds the desired state of the Service (from the client). 4622 Spec *ServiceSpec `json:"spec,omitempty"` 4623 4624 // Status: Status communicates the observed state of the Service (from 4625 // the controller). 4626 Status *ServiceStatus `json:"status,omitempty"` 4627 4628 // ServerResponse contains the HTTP response code and headers from the 4629 // server. 4630 googleapi.ServerResponse `json:"-"` 4631 4632 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 4633 // unconditionally include in API requests. By default, fields with 4634 // empty values are omitted from API requests. However, any non-pointer, 4635 // non-interface field appearing in ForceSendFields will be sent to the 4636 // server regardless of whether the field is empty or not. This may be 4637 // used to include empty fields in Patch requests. 4638 ForceSendFields []string `json:"-"` 4639 4640 // NullFields is a list of field names (e.g. "ApiVersion") to include in 4641 // API requests with the JSON null value. By default, fields with empty 4642 // values are omitted from API requests. However, any field with an 4643 // empty value appearing in NullFields will be sent to the server as 4644 // null. It is an error if a field in this list has a non-empty value. 4645 // This may be used to include null fields in Patch requests. 4646 NullFields []string `json:"-"` 4647} 4648 4649func (s *Service) MarshalJSON() ([]byte, error) { 4650 type NoMethod Service 4651 raw := NoMethod(*s) 4652 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4653} 4654 4655// ServiceCondition: ServiceCondition defines a readiness condition for 4656// a Service. 4657type ServiceCondition struct { 4658 // LastTransitionTime: Last time the condition transitioned from one 4659 // status to another. +optional 4660 LastTransitionTime string `json:"lastTransitionTime,omitempty"` 4661 4662 // Message: Human-readable message indicating details about last 4663 // transition. +optional 4664 Message string `json:"message,omitempty"` 4665 4666 // Reason: One-word CamelCase reason for the condition's last 4667 // transition. +optional 4668 Reason string `json:"reason,omitempty"` 4669 4670 // Severity: How to interpret failures of this condition, one of Error, 4671 // Warning, Info +optional 4672 Severity string `json:"severity,omitempty"` 4673 4674 // Status: Status of the condition, one of True, False, Unknown. 4675 Status string `json:"status,omitempty"` 4676 4677 // Type: ServiceConditionType is used to communicate the status of the 4678 // reconciliation process. See also: 4679 // https://github.com/knative/serving/blob/master/docs/spec/errors.md#error-conditions-and-reporting Types include: "Ready", "ConfigurationsReady", and "RoutesReady". "Ready" will be true when the underlying Route and Configuration are 4680 // ready. 4681 Type string `json:"type,omitempty"` 4682 4683 // ForceSendFields is a list of field names (e.g. "LastTransitionTime") 4684 // to unconditionally include in API requests. By default, fields with 4685 // empty values are omitted from API requests. However, any non-pointer, 4686 // non-interface field appearing in ForceSendFields will be sent to the 4687 // server regardless of whether the field is empty or not. This may be 4688 // used to include empty fields in Patch requests. 4689 ForceSendFields []string `json:"-"` 4690 4691 // NullFields is a list of field names (e.g. "LastTransitionTime") to 4692 // include in API requests with the JSON null value. By default, fields 4693 // with empty values are omitted from API requests. However, any field 4694 // with an empty value appearing in NullFields will be sent to the 4695 // server as null. It is an error if a field in this list has a 4696 // non-empty value. This may be used to include null fields in Patch 4697 // requests. 4698 NullFields []string `json:"-"` 4699} 4700 4701func (s *ServiceCondition) MarshalJSON() ([]byte, error) { 4702 type NoMethod ServiceCondition 4703 raw := NoMethod(*s) 4704 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4705} 4706 4707// ServiceSpec: ServiceSpec holds the desired state of the Route (from 4708// the client), which is used to manipulate the underlying Route and 4709// Configuration(s). 4710type ServiceSpec struct { 4711 // Generation: Deprecated and not currently populated by Cloud Run. See 4712 // metadata.generation instead, which is the sequence number containing 4713 // the latest generation of the desired state. Read-only. 4714 Generation int64 `json:"generation,omitempty"` 4715 4716 // Manual: Manual contains the options for configuring a manual service. 4717 // See ServiceSpec for more details. Not currently supported by Cloud 4718 // Run. 4719 Manual *ServiceSpecManualType `json:"manual,omitempty"` 4720 4721 // Pinned: Pins this service to a specific revision name. The revision 4722 // must be owned by the configuration provided. Deprecated and not 4723 // supported by Cloud Run. +optional 4724 Pinned *ServiceSpecPinnedType `json:"pinned,omitempty"` 4725 4726 // Release: Release enables gradual promotion of new revisions by 4727 // allowing traffic to be split between two revisions. This type 4728 // replaces the deprecated Pinned type. Not currently supported by Cloud 4729 // Run. 4730 Release *ServiceSpecReleaseType `json:"release,omitempty"` 4731 4732 // RunLatest: RunLatest defines a simple Service. It will automatically 4733 // configure a route that keeps the latest ready revision from the 4734 // supplied configuration running. +optional 4735 RunLatest *ServiceSpecRunLatest `json:"runLatest,omitempty"` 4736 4737 // Template: Template holds the latest specification for the Revision to 4738 // be stamped out. 4739 Template *RevisionTemplate `json:"template,omitempty"` 4740 4741 // Traffic: Traffic specifies how to distribute traffic over a 4742 // collection of Knative Revisions and Configurations. 4743 Traffic []*TrafficTarget `json:"traffic,omitempty"` 4744 4745 // ForceSendFields is a list of field names (e.g. "Generation") to 4746 // unconditionally include in API requests. By default, fields with 4747 // empty values are omitted from API requests. However, any non-pointer, 4748 // non-interface field appearing in ForceSendFields will be sent to the 4749 // server regardless of whether the field is empty or not. This may be 4750 // used to include empty fields in Patch requests. 4751 ForceSendFields []string `json:"-"` 4752 4753 // NullFields is a list of field names (e.g. "Generation") to include in 4754 // API requests with the JSON null value. By default, fields with empty 4755 // values are omitted from API requests. However, any field with an 4756 // empty value appearing in NullFields will be sent to the server as 4757 // null. It is an error if a field in this list has a non-empty value. 4758 // This may be used to include null fields in Patch requests. 4759 NullFields []string `json:"-"` 4760} 4761 4762func (s *ServiceSpec) MarshalJSON() ([]byte, error) { 4763 type NoMethod ServiceSpec 4764 raw := NoMethod(*s) 4765 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4766} 4767 4768// ServiceSpecManualType: ServiceSpecManualType contains the options for 4769// configuring a manual service. See ServiceSpec for more details. Not 4770// currently supported by Cloud Run. 4771type ServiceSpecManualType struct { 4772} 4773 4774// ServiceSpecPinnedType: ServiceSpecPinnedType Pins this service to a 4775// specific revision name. The revision must be owned by the 4776// configuration provided. Deprecated and not supported by Cloud Run. 4777type ServiceSpecPinnedType struct { 4778 // Configuration: The configuration for this service. 4779 Configuration *ConfigurationSpec `json:"configuration,omitempty"` 4780 4781 // RevisionName: The revision name to pin this service to until changed 4782 // to a different service type. 4783 RevisionName string `json:"revisionName,omitempty"` 4784 4785 // ForceSendFields is a list of field names (e.g. "Configuration") to 4786 // unconditionally include in API requests. By default, fields with 4787 // empty values are omitted from API requests. However, any non-pointer, 4788 // non-interface field appearing in ForceSendFields will be sent to the 4789 // server regardless of whether the field is empty or not. This may be 4790 // used to include empty fields in Patch requests. 4791 ForceSendFields []string `json:"-"` 4792 4793 // NullFields is a list of field names (e.g. "Configuration") to include 4794 // in API requests with the JSON null value. By default, fields with 4795 // empty values are omitted from API requests. However, any field with 4796 // an empty value appearing in NullFields will be sent to the server as 4797 // null. It is an error if a field in this list has a non-empty value. 4798 // This may be used to include null fields in Patch requests. 4799 NullFields []string `json:"-"` 4800} 4801 4802func (s *ServiceSpecPinnedType) MarshalJSON() ([]byte, error) { 4803 type NoMethod ServiceSpecPinnedType 4804 raw := NoMethod(*s) 4805 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4806} 4807 4808// ServiceSpecReleaseType: ServiceSpecReleaseType contains the options 4809// for slowly releasing revisions. See ServiceSpec for more details. Not 4810// currently supported by Cloud Run. 4811type ServiceSpecReleaseType struct { 4812 // Configuration: The configuration for this service. All revisions from 4813 // this service must come from a single configuration. 4814 Configuration *ConfigurationSpec `json:"configuration,omitempty"` 4815 4816 // Revisions: Revisions is an ordered list of 1 or 2 revisions. The 4817 // first is the current revision, and the second is the candidate 4818 // revision. If a single revision is provided, traffic will be pinned at 4819 // that revision. "@latest" is a shortcut for usage that refers to the 4820 // latest created revision by the configuration. 4821 Revisions []string `json:"revisions,omitempty"` 4822 4823 // RolloutPercent: RolloutPercent is the percent of traffic that should 4824 // be sent to the candidate revision, i.e. the 2nd revision in the 4825 // revisions list. Valid values are between 0 and 99 inclusive. 4826 RolloutPercent int64 `json:"rolloutPercent,omitempty"` 4827 4828 // ForceSendFields is a list of field names (e.g. "Configuration") to 4829 // unconditionally include in API requests. By default, fields with 4830 // empty values are omitted from API requests. However, any non-pointer, 4831 // non-interface field appearing in ForceSendFields will be sent to the 4832 // server regardless of whether the field is empty or not. This may be 4833 // used to include empty fields in Patch requests. 4834 ForceSendFields []string `json:"-"` 4835 4836 // NullFields is a list of field names (e.g. "Configuration") to include 4837 // in API requests with the JSON null value. By default, fields with 4838 // empty values are omitted from API requests. However, any field with 4839 // an empty value appearing in NullFields will be sent to the server as 4840 // null. It is an error if a field in this list has a non-empty value. 4841 // This may be used to include null fields in Patch requests. 4842 NullFields []string `json:"-"` 4843} 4844 4845func (s *ServiceSpecReleaseType) MarshalJSON() ([]byte, error) { 4846 type NoMethod ServiceSpecReleaseType 4847 raw := NoMethod(*s) 4848 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4849} 4850 4851// ServiceSpecRunLatest: ServiceSpecRunLatest contains the options for 4852// always having a route to the latest configuration. See ServiceSpec 4853// for more details. 4854type ServiceSpecRunLatest struct { 4855 // Configuration: The configuration for this service. 4856 Configuration *ConfigurationSpec `json:"configuration,omitempty"` 4857 4858 // ForceSendFields is a list of field names (e.g. "Configuration") to 4859 // unconditionally include in API requests. By default, fields with 4860 // empty values are omitted from API requests. However, any non-pointer, 4861 // non-interface field appearing in ForceSendFields will be sent to the 4862 // server regardless of whether the field is empty or not. This may be 4863 // used to include empty fields in Patch requests. 4864 ForceSendFields []string `json:"-"` 4865 4866 // NullFields is a list of field names (e.g. "Configuration") to include 4867 // in API requests with the JSON null value. By default, fields with 4868 // empty values are omitted from API requests. However, any field with 4869 // an empty value appearing in NullFields will be sent to the server as 4870 // null. It is an error if a field in this list has a non-empty value. 4871 // This may be used to include null fields in Patch requests. 4872 NullFields []string `json:"-"` 4873} 4874 4875func (s *ServiceSpecRunLatest) MarshalJSON() ([]byte, error) { 4876 type NoMethod ServiceSpecRunLatest 4877 raw := NoMethod(*s) 4878 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4879} 4880 4881// ServiceStatus: The current state of the Service. Output only. 4882type ServiceStatus struct { 4883 // Address: From RouteStatus. Similar to url, information on where the 4884 // service is available on HTTP. 4885 Address *Addressable `json:"address,omitempty"` 4886 4887 // Conditions: Conditions communicates information about 4888 // ongoing/complete reconciliation processes that bring the "spec" 4889 // inline with the observed state of the world. 4890 Conditions []*ServiceCondition `json:"conditions,omitempty"` 4891 4892 // Domain: From RouteStatus. Domain holds the top-level domain that will 4893 // distribute traffic over the provided targets. It generally has the 4894 // form 4895 // https://{route-hash}-{project-hash}-{cluster-level-suffix}.a.run.app 4896 Domain string `json:"domain,omitempty"` 4897 4898 // LatestCreatedRevisionName: From ConfigurationStatus. 4899 // LatestCreatedRevisionName is the last revision that was created from 4900 // this Service's Configuration. It might not be ready yet, for that use 4901 // LatestReadyRevisionName. 4902 LatestCreatedRevisionName string `json:"latestCreatedRevisionName,omitempty"` 4903 4904 // LatestReadyRevisionName: From ConfigurationStatus. 4905 // LatestReadyRevisionName holds the name of the latest Revision stamped 4906 // out from this Service's Configuration that has had its "Ready" 4907 // condition become "True". 4908 LatestReadyRevisionName string `json:"latestReadyRevisionName,omitempty"` 4909 4910 // ObservedGeneration: ObservedGeneration is the 'Generation' of the 4911 // Route that was last processed by the controller. Clients polling for 4912 // completed reconciliation should poll until observedGeneration = 4913 // metadata.generation and the Ready condition's status is True or 4914 // False. 4915 ObservedGeneration int64 `json:"observedGeneration,omitempty"` 4916 4917 // Traffic: From RouteStatus. Traffic holds the configured traffic 4918 // distribution. These entries will always contain RevisionName 4919 // references. When ConfigurationName appears in the spec, this will 4920 // hold the LatestReadyRevisionName that we last observed. 4921 Traffic []*TrafficTarget `json:"traffic,omitempty"` 4922 4923 // Url: From RouteStatus. URL holds the url that will distribute traffic 4924 // over the provided traffic targets. It generally has the form 4925 // https://{route-hash}-{project-hash}-{cluster-level-suffix}.a.run.app 4926 Url string `json:"url,omitempty"` 4927 4928 // ForceSendFields is a list of field names (e.g. "Address") to 4929 // unconditionally include in API requests. By default, fields with 4930 // empty values are omitted from API requests. However, any non-pointer, 4931 // non-interface field appearing in ForceSendFields will be sent to the 4932 // server regardless of whether the field is empty or not. This may be 4933 // used to include empty fields in Patch requests. 4934 ForceSendFields []string `json:"-"` 4935 4936 // NullFields is a list of field names (e.g. "Address") to include in 4937 // API requests with the JSON null value. By default, fields with empty 4938 // values are omitted from API requests. However, any field with an 4939 // empty value appearing in NullFields will be sent to the server as 4940 // null. It is an error if a field in this list has a non-empty value. 4941 // This may be used to include null fields in Patch requests. 4942 NullFields []string `json:"-"` 4943} 4944 4945func (s *ServiceStatus) MarshalJSON() ([]byte, error) { 4946 type NoMethod ServiceStatus 4947 raw := NoMethod(*s) 4948 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4949} 4950 4951// SetIamPolicyRequest: Request message for `SetIamPolicy` method. 4952type SetIamPolicyRequest struct { 4953 // Policy: REQUIRED: The complete policy to be applied to the 4954 // `resource`. The size of the policy is limited to a few 10s of KB. An 4955 // empty policy is a valid policy but certain Cloud Platform services 4956 // (such as Projects) might reject them. 4957 Policy *Policy `json:"policy,omitempty"` 4958 4959 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the 4960 // policy to modify. Only the fields in the mask will be modified. If no 4961 // mask is provided, the following default mask is used: `paths: 4962 // "bindings, etag" 4963 UpdateMask string `json:"updateMask,omitempty"` 4964 4965 // ForceSendFields is a list of field names (e.g. "Policy") to 4966 // unconditionally include in API requests. By default, fields with 4967 // empty values are omitted from API requests. However, any non-pointer, 4968 // non-interface field appearing in ForceSendFields will be sent to the 4969 // server regardless of whether the field is empty or not. This may be 4970 // used to include empty fields in Patch requests. 4971 ForceSendFields []string `json:"-"` 4972 4973 // NullFields is a list of field names (e.g. "Policy") to include in API 4974 // requests with the JSON null value. By default, fields with empty 4975 // values are omitted from API requests. However, any field with an 4976 // empty value appearing in NullFields will be sent to the server as 4977 // null. It is an error if a field in this list has a non-empty value. 4978 // This may be used to include null fields in Patch requests. 4979 NullFields []string `json:"-"` 4980} 4981 4982func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 4983 type NoMethod SetIamPolicyRequest 4984 raw := NoMethod(*s) 4985 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4986} 4987 4988// TCPSocketAction: TCPSocketAction describes an action based on opening 4989// a socket 4990type TCPSocketAction struct { 4991 // Host: Optional: Host name to connect to, defaults to the pod IP. 4992 // +optional 4993 Host string `json:"host,omitempty"` 4994 4995 // Port: Number or name of the port to access on the container. Number 4996 // must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. 4997 Port *IntOrString `json:"port,omitempty"` 4998 4999 // ForceSendFields is a list of field names (e.g. "Host") to 5000 // unconditionally include in API requests. By default, fields with 5001 // empty values are omitted from API requests. However, any non-pointer, 5002 // non-interface field appearing in ForceSendFields will be sent to the 5003 // server regardless of whether the field is empty or not. This may be 5004 // used to include empty fields in Patch requests. 5005 ForceSendFields []string `json:"-"` 5006 5007 // NullFields is a list of field names (e.g. "Host") to include in API 5008 // requests with the JSON null value. By default, fields with empty 5009 // values are omitted from API requests. However, any field with an 5010 // empty value appearing in NullFields will be sent to the server as 5011 // null. It is an error if a field in this list has a non-empty value. 5012 // This may be used to include null fields in Patch requests. 5013 NullFields []string `json:"-"` 5014} 5015 5016func (s *TCPSocketAction) MarshalJSON() ([]byte, error) { 5017 type NoMethod TCPSocketAction 5018 raw := NoMethod(*s) 5019 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5020} 5021 5022// TestIamPermissionsRequest: Request message for `TestIamPermissions` 5023// method. 5024type TestIamPermissionsRequest struct { 5025 // Permissions: The set of permissions to check for the `resource`. 5026 // Permissions with wildcards (such as '*' or 'storage.*') are not 5027 // allowed. For more information see [IAM 5028 // Overview](https://cloud.google.com/iam/docs/overview#permissions). 5029 Permissions []string `json:"permissions,omitempty"` 5030 5031 // ForceSendFields is a list of field names (e.g. "Permissions") to 5032 // unconditionally include in API requests. By default, fields with 5033 // empty values are omitted from API requests. However, any non-pointer, 5034 // non-interface field appearing in ForceSendFields will be sent to the 5035 // server regardless of whether the field is empty or not. This may be 5036 // used to include empty fields in Patch requests. 5037 ForceSendFields []string `json:"-"` 5038 5039 // NullFields is a list of field names (e.g. "Permissions") to include 5040 // in API requests with the JSON null value. By default, fields with 5041 // empty values are omitted from API requests. However, any field with 5042 // an empty value appearing in NullFields will be sent to the server as 5043 // null. It is an error if a field in this list has a non-empty value. 5044 // This may be used to include null fields in Patch requests. 5045 NullFields []string `json:"-"` 5046} 5047 5048func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 5049 type NoMethod TestIamPermissionsRequest 5050 raw := NoMethod(*s) 5051 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5052} 5053 5054// TestIamPermissionsResponse: Response message for `TestIamPermissions` 5055// method. 5056type TestIamPermissionsResponse struct { 5057 // Permissions: A subset of `TestPermissionsRequest.permissions` that 5058 // the caller is allowed. 5059 Permissions []string `json:"permissions,omitempty"` 5060 5061 // ServerResponse contains the HTTP response code and headers from the 5062 // server. 5063 googleapi.ServerResponse `json:"-"` 5064 5065 // ForceSendFields is a list of field names (e.g. "Permissions") to 5066 // unconditionally include in API requests. By default, fields with 5067 // empty values are omitted from API requests. However, any non-pointer, 5068 // non-interface field appearing in ForceSendFields will be sent to the 5069 // server regardless of whether the field is empty or not. This may be 5070 // used to include empty fields in Patch requests. 5071 ForceSendFields []string `json:"-"` 5072 5073 // NullFields is a list of field names (e.g. "Permissions") to include 5074 // in API requests with the JSON null value. By default, fields with 5075 // empty values are omitted from API requests. However, any field with 5076 // an empty value appearing in NullFields will be sent to the server as 5077 // null. It is an error if a field in this list has a non-empty value. 5078 // This may be used to include null fields in Patch requests. 5079 NullFields []string `json:"-"` 5080} 5081 5082func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 5083 type NoMethod TestIamPermissionsResponse 5084 raw := NoMethod(*s) 5085 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5086} 5087 5088// TrafficTarget: TrafficTarget holds a single entry of the routing 5089// table for a Route. 5090type TrafficTarget struct { 5091 // ConfigurationName: ConfigurationName of a configuration to whose 5092 // latest revision we will send this portion of traffic. When the 5093 // "status.latestReadyRevisionName" of the referenced configuration 5094 // changes, we will automatically migrate traffic from the prior "latest 5095 // ready" revision to the new one. This field is never set in Route's 5096 // status, only its spec. This is mutually exclusive with RevisionName. 5097 // Cloud Run currently supports a single ConfigurationName. 5098 ConfigurationName string `json:"configurationName,omitempty"` 5099 5100 // LatestRevision: LatestRevision may be optionally provided to indicate 5101 // that the latest ready Revision of the Configuration should be used 5102 // for this traffic target. When provided LatestRevision must be true if 5103 // RevisionName is empty; it must be false when RevisionName is 5104 // non-empty. +optional 5105 LatestRevision bool `json:"latestRevision,omitempty"` 5106 5107 // Name: Name is optionally used to expose a dedicated hostname for 5108 // referencing this target exclusively. Not currently supported by Cloud 5109 // Run. +optional 5110 Name string `json:"name,omitempty"` 5111 5112 // Percent: Percent specifies percent of the traffic to this Revision or 5113 // Configuration. This defaults to zero if unspecified. Cloud Run 5114 // currently requires 100 percent for a single ConfigurationName 5115 // TrafficTarget entry. 5116 Percent int64 `json:"percent,omitempty"` 5117 5118 // RevisionName: RevisionName of a specific revision to which to send 5119 // this portion of traffic. This is mutually exclusive with 5120 // ConfigurationName. Providing RevisionName in spec is not currently 5121 // supported by Cloud Run. 5122 RevisionName string `json:"revisionName,omitempty"` 5123 5124 // Tag: Tag is optionally used to expose a dedicated url for referencing 5125 // this target exclusively. Not currently supported in Cloud Run. 5126 // +optional 5127 Tag string `json:"tag,omitempty"` 5128 5129 // Url: Output only. URL displays the URL for accessing named traffic 5130 // targets. URL is displayed in status, and is disallowed on spec. URL 5131 // must contain a scheme (e.g. http://) and a hostname, but may not 5132 // contain anything else (e.g. basic auth, url path, etc. Not currently 5133 // supported in Cloud Run. 5134 Url string `json:"url,omitempty"` 5135 5136 // ForceSendFields is a list of field names (e.g. "ConfigurationName") 5137 // to unconditionally include in API requests. By default, fields with 5138 // empty values are omitted from API requests. However, any non-pointer, 5139 // non-interface field appearing in ForceSendFields will be sent to the 5140 // server regardless of whether the field is empty or not. This may be 5141 // used to include empty fields in Patch requests. 5142 ForceSendFields []string `json:"-"` 5143 5144 // NullFields is a list of field names (e.g. "ConfigurationName") to 5145 // include in API requests with the JSON null value. By default, fields 5146 // with empty values are omitted from API requests. However, any field 5147 // with an empty value appearing in NullFields will be sent to the 5148 // server as null. It is an error if a field in this list has a 5149 // non-empty value. This may be used to include null fields in Patch 5150 // requests. 5151 NullFields []string `json:"-"` 5152} 5153 5154func (s *TrafficTarget) MarshalJSON() ([]byte, error) { 5155 type NoMethod TrafficTarget 5156 raw := NoMethod(*s) 5157 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5158} 5159 5160type Trigger struct { 5161 // ApiVersion: The API version for this call such as 5162 // "eventing.knative.dev/v1alpha1". 5163 ApiVersion string `json:"apiVersion,omitempty"` 5164 5165 // Kind: The kind of resource, in this case "Trigger". 5166 Kind string `json:"kind,omitempty"` 5167 5168 // Metadata: Metadata associated with this Trigger. 5169 Metadata *ObjectMeta `json:"metadata,omitempty"` 5170 5171 // Spec: Spec defines the desired state of the Trigger. 5172 Spec *TriggerSpec `json:"spec,omitempty"` 5173 5174 // Status: Optional. Status represents the current state of the Trigger. 5175 // This data may be out of date. 5176 Status *TriggerStatus `json:"status,omitempty"` 5177 5178 // ServerResponse contains the HTTP response code and headers from the 5179 // server. 5180 googleapi.ServerResponse `json:"-"` 5181 5182 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 5183 // unconditionally include in API requests. By default, fields with 5184 // empty values are omitted from API requests. However, any non-pointer, 5185 // non-interface field appearing in ForceSendFields will be sent to the 5186 // server regardless of whether the field is empty or not. This may be 5187 // used to include empty fields in Patch requests. 5188 ForceSendFields []string `json:"-"` 5189 5190 // NullFields is a list of field names (e.g. "ApiVersion") to include in 5191 // API requests with the JSON null value. By default, fields with empty 5192 // values are omitted from API requests. However, any field with an 5193 // empty value appearing in NullFields will be sent to the server as 5194 // null. It is an error if a field in this list has a non-empty value. 5195 // This may be used to include null fields in Patch requests. 5196 NullFields []string `json:"-"` 5197} 5198 5199func (s *Trigger) MarshalJSON() ([]byte, error) { 5200 type NoMethod Trigger 5201 raw := NoMethod(*s) 5202 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5203} 5204 5205// TriggerCondition: TriggerCondition contains state information for an 5206// Trigger. 5207type TriggerCondition struct { 5208 // LastTransitionTime: Optional. Last time the condition transitioned 5209 // from one status to another. 5210 LastTransitionTime string `json:"lastTransitionTime,omitempty"` 5211 5212 // Message: Optional. Human readable message indicating details about 5213 // the current status. 5214 Message string `json:"message,omitempty"` 5215 5216 // Reason: Optional. One-word CamelCase reason for the condition's 5217 // current status. 5218 Reason string `json:"reason,omitempty"` 5219 5220 // Severity: Optional. How to interpret failures of this condition, one 5221 // of Error, Warning, Info 5222 Severity string `json:"severity,omitempty"` 5223 5224 // Status: Status of the condition, one of True, False, Unknown. 5225 Status string `json:"status,omitempty"` 5226 5227 // Type: Type of Trigger condition. 5228 Type string `json:"type,omitempty"` 5229 5230 // ForceSendFields is a list of field names (e.g. "LastTransitionTime") 5231 // to unconditionally include in API requests. By default, fields with 5232 // empty values are omitted from API requests. However, any non-pointer, 5233 // non-interface field appearing in ForceSendFields will be sent to the 5234 // server regardless of whether the field is empty or not. This may be 5235 // used to include empty fields in Patch requests. 5236 ForceSendFields []string `json:"-"` 5237 5238 // NullFields is a list of field names (e.g. "LastTransitionTime") to 5239 // include in API requests with the JSON null value. By default, fields 5240 // with empty values are omitted from API requests. However, any field 5241 // with an empty value appearing in NullFields will be sent to the 5242 // server as null. It is an error if a field in this list has a 5243 // non-empty value. This may be used to include null fields in Patch 5244 // requests. 5245 NullFields []string `json:"-"` 5246} 5247 5248func (s *TriggerCondition) MarshalJSON() ([]byte, error) { 5249 type NoMethod TriggerCondition 5250 raw := NoMethod(*s) 5251 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5252} 5253 5254type TriggerFilter struct { 5255 // Attributes: Optional. Attributes filters events by exact match on 5256 // event context attributes. Each key in the map is compared with the 5257 // equivalent key in the event context. An event passes the filter if 5258 // all values are equal to the specified values. Nested context 5259 // attributes are not supported as keys. Only string values are 5260 // supported. Note that this field is optional in knative. In fully 5261 // managed, 'type' attribute is required due to different broker 5262 // implementation. 5263 Attributes map[string]string `json:"attributes,omitempty"` 5264 5265 // ForceSendFields is a list of field names (e.g. "Attributes") to 5266 // unconditionally include in API requests. By default, fields with 5267 // empty values are omitted from API requests. However, any non-pointer, 5268 // non-interface field appearing in ForceSendFields will be sent to the 5269 // server regardless of whether the field is empty or not. This may be 5270 // used to include empty fields in Patch requests. 5271 ForceSendFields []string `json:"-"` 5272 5273 // NullFields is a list of field names (e.g. "Attributes") to include in 5274 // API requests with the JSON null value. By default, fields with empty 5275 // values are omitted from API requests. However, any field with an 5276 // empty value appearing in NullFields will be sent to the server as 5277 // null. It is an error if a field in this list has a non-empty value. 5278 // This may be used to include null fields in Patch requests. 5279 NullFields []string `json:"-"` 5280} 5281 5282func (s *TriggerFilter) MarshalJSON() ([]byte, error) { 5283 type NoMethod TriggerFilter 5284 raw := NoMethod(*s) 5285 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5286} 5287 5288// TriggerSpec: The desired state of the Trigger. 5289type TriggerSpec struct { 5290 // Broker: Broker is the broker that this trigger receives events from. 5291 // If not specified, will default to 'default'. Not currently supported 5292 // by Cloud Run. 5293 Broker string `json:"broker,omitempty"` 5294 5295 // Filter: Optional. Filter is the filter to apply against all events 5296 // from the Broker. Only events that pass this filter will be sent to 5297 // the Subscriber. Note that filter is optional in knative and is only 5298 // required in fully managed due to different broker implementation. 5299 Filter *TriggerFilter `json:"filter,omitempty"` 5300 5301 // Subscriber: Sink is the addressable that will receive events. 5302 Subscriber *Destination `json:"subscriber,omitempty"` 5303 5304 // ForceSendFields is a list of field names (e.g. "Broker") to 5305 // unconditionally include in API requests. By default, fields with 5306 // empty values are omitted from API requests. However, any non-pointer, 5307 // non-interface field appearing in ForceSendFields will be sent to the 5308 // server regardless of whether the field is empty or not. This may be 5309 // used to include empty fields in Patch requests. 5310 ForceSendFields []string `json:"-"` 5311 5312 // NullFields is a list of field names (e.g. "Broker") to include in API 5313 // requests with the JSON null value. By default, fields with empty 5314 // values are omitted from API requests. However, any field with an 5315 // empty value appearing in NullFields will be sent to the server as 5316 // null. It is an error if a field in this list has a non-empty value. 5317 // This may be used to include null fields in Patch requests. 5318 NullFields []string `json:"-"` 5319} 5320 5321func (s *TriggerSpec) MarshalJSON() ([]byte, error) { 5322 type NoMethod TriggerSpec 5323 raw := NoMethod(*s) 5324 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5325} 5326 5327// TriggerStatus: TriggerStatus represents the current state of a 5328// Trigger. 5329type TriggerStatus struct { 5330 // Conditions: Array of observed TriggerConditions, indicating the 5331 // current state of the Trigger. 5332 Conditions []*TriggerCondition `json:"conditions,omitempty"` 5333 5334 // ObservedGeneration: ObservedGeneration is the 'Generation' of the 5335 // Trigger that was last processed by the controller. 5336 ObservedGeneration int64 `json:"observedGeneration,omitempty"` 5337 5338 // SubscriberUri: SubscriberURI is the resolved URI of the receiver for 5339 // this Trigger. 5340 SubscriberUri string `json:"subscriberUri,omitempty"` 5341 5342 // ForceSendFields is a list of field names (e.g. "Conditions") to 5343 // unconditionally include in API requests. By default, fields with 5344 // empty values are omitted from API requests. However, any non-pointer, 5345 // non-interface field appearing in ForceSendFields will be sent to the 5346 // server regardless of whether the field is empty or not. This may be 5347 // used to include empty fields in Patch requests. 5348 ForceSendFields []string `json:"-"` 5349 5350 // NullFields is a list of field names (e.g. "Conditions") to include in 5351 // API requests with the JSON null value. By default, fields with empty 5352 // values are omitted from API requests. However, any field with an 5353 // empty value appearing in NullFields will be sent to the server as 5354 // null. It is an error if a field in this list has a non-empty value. 5355 // This may be used to include null fields in Patch requests. 5356 NullFields []string `json:"-"` 5357} 5358 5359func (s *TriggerStatus) MarshalJSON() ([]byte, error) { 5360 type NoMethod TriggerStatus 5361 raw := NoMethod(*s) 5362 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5363} 5364 5365// Volume: Volume represents a named volume in a container. 5366type Volume struct { 5367 ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"` 5368 5369 // Name: Volume's name. 5370 Name string `json:"name,omitempty"` 5371 5372 Secret *SecretVolumeSource `json:"secret,omitempty"` 5373 5374 // ForceSendFields is a list of field names (e.g. "ConfigMap") to 5375 // unconditionally include in API requests. By default, fields with 5376 // empty values are omitted from API requests. However, any non-pointer, 5377 // non-interface field appearing in ForceSendFields will be sent to the 5378 // server regardless of whether the field is empty or not. This may be 5379 // used to include empty fields in Patch requests. 5380 ForceSendFields []string `json:"-"` 5381 5382 // NullFields is a list of field names (e.g. "ConfigMap") to include in 5383 // API requests with the JSON null value. By default, fields with empty 5384 // values are omitted from API requests. However, any field with an 5385 // empty value appearing in NullFields will be sent to the server as 5386 // null. It is an error if a field in this list has a non-empty value. 5387 // This may be used to include null fields in Patch requests. 5388 NullFields []string `json:"-"` 5389} 5390 5391func (s *Volume) MarshalJSON() ([]byte, error) { 5392 type NoMethod Volume 5393 raw := NoMethod(*s) 5394 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5395} 5396 5397// VolumeDevice: volumeDevice describes a mapping of a raw block device 5398// within a container. 5399type VolumeDevice struct { 5400 // DevicePath: devicePath is the path inside of the container that the 5401 // device will be mapped to. 5402 DevicePath string `json:"devicePath,omitempty"` 5403 5404 // Name: name must match the name of a persistentVolumeClaim in the pod 5405 Name string `json:"name,omitempty"` 5406 5407 // ForceSendFields is a list of field names (e.g. "DevicePath") to 5408 // unconditionally include in API requests. By default, fields with 5409 // empty values are omitted from API requests. However, any non-pointer, 5410 // non-interface field appearing in ForceSendFields will be sent to the 5411 // server regardless of whether the field is empty or not. This may be 5412 // used to include empty fields in Patch requests. 5413 ForceSendFields []string `json:"-"` 5414 5415 // NullFields is a list of field names (e.g. "DevicePath") to include in 5416 // API requests with the JSON null value. By default, fields with empty 5417 // values are omitted from API requests. However, any field with an 5418 // empty value appearing in NullFields will be sent to the server as 5419 // null. It is an error if a field in this list has a non-empty value. 5420 // This may be used to include null fields in Patch requests. 5421 NullFields []string `json:"-"` 5422} 5423 5424func (s *VolumeDevice) MarshalJSON() ([]byte, error) { 5425 type NoMethod VolumeDevice 5426 raw := NoMethod(*s) 5427 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5428} 5429 5430// VolumeMount: VolumeMount describes a mounting of a Volume within a 5431// container. 5432type VolumeMount struct { 5433 // MountPath: Path within the container at which the volume should be 5434 // mounted. Must not contain ':'. 5435 MountPath string `json:"mountPath,omitempty"` 5436 5437 // MountPropagation: mountPropagation determines how mounts are 5438 // propagated from the host to container and the other way around. When 5439 // not set, MountPropagationHostToContainer is used. This field is beta 5440 // in 1.10. +optional 5441 MountPropagation string `json:"mountPropagation,omitempty"` 5442 5443 // Name: This must match the Name of a Volume. 5444 Name string `json:"name,omitempty"` 5445 5446 // ReadOnly: Mounted read-only if true, read-write otherwise (false or 5447 // unspecified). Defaults to false. +optional 5448 ReadOnly bool `json:"readOnly,omitempty"` 5449 5450 // SubPath: Path within the volume from which the container's volume 5451 // should be mounted. Defaults to "" (volume's root). +optional 5452 SubPath string `json:"subPath,omitempty"` 5453 5454 // ForceSendFields is a list of field names (e.g. "MountPath") to 5455 // unconditionally include in API requests. By default, fields with 5456 // empty values are omitted from API requests. However, any non-pointer, 5457 // non-interface field appearing in ForceSendFields will be sent to the 5458 // server regardless of whether the field is empty or not. This may be 5459 // used to include empty fields in Patch requests. 5460 ForceSendFields []string `json:"-"` 5461 5462 // NullFields is a list of field names (e.g. "MountPath") to include in 5463 // API requests with the JSON null value. By default, fields with empty 5464 // values are omitted from API requests. However, any field with an 5465 // empty value appearing in NullFields will be sent to the server as 5466 // null. It is an error if a field in this list has a non-empty value. 5467 // This may be used to include null fields in Patch requests. 5468 NullFields []string `json:"-"` 5469} 5470 5471func (s *VolumeMount) MarshalJSON() ([]byte, error) { 5472 type NoMethod VolumeMount 5473 raw := NoMethod(*s) 5474 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5475} 5476 5477// method id "run.namespaces.authorizeddomains.list": 5478 5479type NamespacesAuthorizeddomainsListCall struct { 5480 s *APIService 5481 parent string 5482 urlParams_ gensupport.URLParams 5483 ifNoneMatch_ string 5484 ctx_ context.Context 5485 header_ http.Header 5486} 5487 5488// List: RPC to list authorized domains. 5489func (r *NamespacesAuthorizeddomainsService) List(parent string) *NamespacesAuthorizeddomainsListCall { 5490 c := &NamespacesAuthorizeddomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5491 c.parent = parent 5492 return c 5493} 5494 5495// PageSize sets the optional parameter "pageSize": Maximum results to 5496// return per page. 5497func (c *NamespacesAuthorizeddomainsListCall) PageSize(pageSize int64) *NamespacesAuthorizeddomainsListCall { 5498 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5499 return c 5500} 5501 5502// PageToken sets the optional parameter "pageToken": Continuation token 5503// for fetching the next page of results. 5504func (c *NamespacesAuthorizeddomainsListCall) PageToken(pageToken string) *NamespacesAuthorizeddomainsListCall { 5505 c.urlParams_.Set("pageToken", pageToken) 5506 return c 5507} 5508 5509// Fields allows partial responses to be retrieved. See 5510// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5511// for more information. 5512func (c *NamespacesAuthorizeddomainsListCall) Fields(s ...googleapi.Field) *NamespacesAuthorizeddomainsListCall { 5513 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5514 return c 5515} 5516 5517// IfNoneMatch sets the optional parameter which makes the operation 5518// fail if the object's ETag matches the given value. This is useful for 5519// getting updates only after the object has changed since the last 5520// request. Use googleapi.IsNotModified to check whether the response 5521// error from Do is the result of In-None-Match. 5522func (c *NamespacesAuthorizeddomainsListCall) IfNoneMatch(entityTag string) *NamespacesAuthorizeddomainsListCall { 5523 c.ifNoneMatch_ = entityTag 5524 return c 5525} 5526 5527// Context sets the context to be used in this call's Do method. Any 5528// pending HTTP request will be aborted if the provided context is 5529// canceled. 5530func (c *NamespacesAuthorizeddomainsListCall) Context(ctx context.Context) *NamespacesAuthorizeddomainsListCall { 5531 c.ctx_ = ctx 5532 return c 5533} 5534 5535// Header returns an http.Header that can be modified by the caller to 5536// add HTTP headers to the request. 5537func (c *NamespacesAuthorizeddomainsListCall) Header() http.Header { 5538 if c.header_ == nil { 5539 c.header_ = make(http.Header) 5540 } 5541 return c.header_ 5542} 5543 5544func (c *NamespacesAuthorizeddomainsListCall) doRequest(alt string) (*http.Response, error) { 5545 reqHeaders := make(http.Header) 5546 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5547 for k, v := range c.header_ { 5548 reqHeaders[k] = v 5549 } 5550 reqHeaders.Set("User-Agent", c.s.userAgent()) 5551 if c.ifNoneMatch_ != "" { 5552 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5553 } 5554 var body io.Reader = nil 5555 c.urlParams_.Set("alt", alt) 5556 c.urlParams_.Set("prettyPrint", "false") 5557 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/domains.cloudrun.com/v1alpha1/{+parent}/authorizeddomains") 5558 urls += "?" + c.urlParams_.Encode() 5559 req, err := http.NewRequest("GET", urls, body) 5560 if err != nil { 5561 return nil, err 5562 } 5563 req.Header = reqHeaders 5564 googleapi.Expand(req.URL, map[string]string{ 5565 "parent": c.parent, 5566 }) 5567 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5568} 5569 5570// Do executes the "run.namespaces.authorizeddomains.list" call. 5571// Exactly one of *ListAuthorizedDomainsResponse or error will be 5572// non-nil. Any non-2xx status code is an error. Response headers are in 5573// either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a 5574// response was returned at all) in error.(*googleapi.Error).Header. Use 5575// googleapi.IsNotModified to check whether the returned error was 5576// because http.StatusNotModified was returned. 5577func (c *NamespacesAuthorizeddomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, error) { 5578 gensupport.SetOptions(c.urlParams_, opts...) 5579 res, err := c.doRequest("json") 5580 if res != nil && res.StatusCode == http.StatusNotModified { 5581 if res.Body != nil { 5582 res.Body.Close() 5583 } 5584 return nil, &googleapi.Error{ 5585 Code: res.StatusCode, 5586 Header: res.Header, 5587 } 5588 } 5589 if err != nil { 5590 return nil, err 5591 } 5592 defer googleapi.CloseBody(res) 5593 if err := googleapi.CheckResponse(res); err != nil { 5594 return nil, err 5595 } 5596 ret := &ListAuthorizedDomainsResponse{ 5597 ServerResponse: googleapi.ServerResponse{ 5598 Header: res.Header, 5599 HTTPStatusCode: res.StatusCode, 5600 }, 5601 } 5602 target := &ret 5603 if err := gensupport.DecodeResponse(target, res); err != nil { 5604 return nil, err 5605 } 5606 return ret, nil 5607 // { 5608 // "description": "RPC to list authorized domains.", 5609 // "flatPath": "apis/domains.cloudrun.com/v1alpha1/namespaces/{namespacesId}/authorizeddomains", 5610 // "httpMethod": "GET", 5611 // "id": "run.namespaces.authorizeddomains.list", 5612 // "parameterOrder": [ 5613 // "parent" 5614 // ], 5615 // "parameters": { 5616 // "pageSize": { 5617 // "description": "Maximum results to return per page.", 5618 // "format": "int32", 5619 // "location": "query", 5620 // "type": "integer" 5621 // }, 5622 // "pageToken": { 5623 // "description": "Continuation token for fetching the next page of results.", 5624 // "location": "query", 5625 // "type": "string" 5626 // }, 5627 // "parent": { 5628 // "description": "Name of the parent Application resource. Example: `apps/myapp`.", 5629 // "location": "path", 5630 // "pattern": "^namespaces/[^/]+$", 5631 // "required": true, 5632 // "type": "string" 5633 // } 5634 // }, 5635 // "path": "apis/domains.cloudrun.com/v1alpha1/{+parent}/authorizeddomains", 5636 // "response": { 5637 // "$ref": "ListAuthorizedDomainsResponse" 5638 // }, 5639 // "scopes": [ 5640 // "https://www.googleapis.com/auth/cloud-platform" 5641 // ] 5642 // } 5643 5644} 5645 5646// Pages invokes f for each page of results. 5647// A non-nil error returned from f will halt the iteration. 5648// The provided context supersedes any context provided to the Context method. 5649func (c *NamespacesAuthorizeddomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) error) error { 5650 c.ctx_ = ctx 5651 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5652 for { 5653 x, err := c.Do() 5654 if err != nil { 5655 return err 5656 } 5657 if err := f(x); err != nil { 5658 return err 5659 } 5660 if x.NextPageToken == "" { 5661 return nil 5662 } 5663 c.PageToken(x.NextPageToken) 5664 } 5665} 5666 5667// method id "run.namespaces.cloudauditlogssources.create": 5668 5669type NamespacesCloudauditlogssourcesCreateCall struct { 5670 s *APIService 5671 parent string 5672 cloudauditlogssource *CloudAuditLogsSource 5673 urlParams_ gensupport.URLParams 5674 ctx_ context.Context 5675 header_ http.Header 5676} 5677 5678// Create: Creates a new cloudauditlogssource. 5679func (r *NamespacesCloudauditlogssourcesService) Create(parent string, cloudauditlogssource *CloudAuditLogsSource) *NamespacesCloudauditlogssourcesCreateCall { 5680 c := &NamespacesCloudauditlogssourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5681 c.parent = parent 5682 c.cloudauditlogssource = cloudauditlogssource 5683 return c 5684} 5685 5686// Fields allows partial responses to be retrieved. See 5687// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5688// for more information. 5689func (c *NamespacesCloudauditlogssourcesCreateCall) Fields(s ...googleapi.Field) *NamespacesCloudauditlogssourcesCreateCall { 5690 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5691 return c 5692} 5693 5694// Context sets the context to be used in this call's Do method. Any 5695// pending HTTP request will be aborted if the provided context is 5696// canceled. 5697func (c *NamespacesCloudauditlogssourcesCreateCall) Context(ctx context.Context) *NamespacesCloudauditlogssourcesCreateCall { 5698 c.ctx_ = ctx 5699 return c 5700} 5701 5702// Header returns an http.Header that can be modified by the caller to 5703// add HTTP headers to the request. 5704func (c *NamespacesCloudauditlogssourcesCreateCall) Header() http.Header { 5705 if c.header_ == nil { 5706 c.header_ = make(http.Header) 5707 } 5708 return c.header_ 5709} 5710 5711func (c *NamespacesCloudauditlogssourcesCreateCall) doRequest(alt string) (*http.Response, error) { 5712 reqHeaders := make(http.Header) 5713 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5714 for k, v := range c.header_ { 5715 reqHeaders[k] = v 5716 } 5717 reqHeaders.Set("User-Agent", c.s.userAgent()) 5718 var body io.Reader = nil 5719 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudauditlogssource) 5720 if err != nil { 5721 return nil, err 5722 } 5723 reqHeaders.Set("Content-Type", "application/json") 5724 c.urlParams_.Set("alt", alt) 5725 c.urlParams_.Set("prettyPrint", "false") 5726 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudauditlogssources") 5727 urls += "?" + c.urlParams_.Encode() 5728 req, err := http.NewRequest("POST", urls, body) 5729 if err != nil { 5730 return nil, err 5731 } 5732 req.Header = reqHeaders 5733 googleapi.Expand(req.URL, map[string]string{ 5734 "parent": c.parent, 5735 }) 5736 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5737} 5738 5739// Do executes the "run.namespaces.cloudauditlogssources.create" call. 5740// Exactly one of *CloudAuditLogsSource or error will be non-nil. Any 5741// non-2xx status code is an error. Response headers are in either 5742// *CloudAuditLogsSource.ServerResponse.Header or (if a response was 5743// returned at all) in error.(*googleapi.Error).Header. Use 5744// googleapi.IsNotModified to check whether the returned error was 5745// because http.StatusNotModified was returned. 5746func (c *NamespacesCloudauditlogssourcesCreateCall) Do(opts ...googleapi.CallOption) (*CloudAuditLogsSource, error) { 5747 gensupport.SetOptions(c.urlParams_, opts...) 5748 res, err := c.doRequest("json") 5749 if res != nil && res.StatusCode == http.StatusNotModified { 5750 if res.Body != nil { 5751 res.Body.Close() 5752 } 5753 return nil, &googleapi.Error{ 5754 Code: res.StatusCode, 5755 Header: res.Header, 5756 } 5757 } 5758 if err != nil { 5759 return nil, err 5760 } 5761 defer googleapi.CloseBody(res) 5762 if err := googleapi.CheckResponse(res); err != nil { 5763 return nil, err 5764 } 5765 ret := &CloudAuditLogsSource{ 5766 ServerResponse: googleapi.ServerResponse{ 5767 Header: res.Header, 5768 HTTPStatusCode: res.StatusCode, 5769 }, 5770 } 5771 target := &ret 5772 if err := gensupport.DecodeResponse(target, res); err != nil { 5773 return nil, err 5774 } 5775 return ret, nil 5776 // { 5777 // "description": "Creates a new cloudauditlogssource.", 5778 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudauditlogssources", 5779 // "httpMethod": "POST", 5780 // "id": "run.namespaces.cloudauditlogssources.create", 5781 // "parameterOrder": [ 5782 // "parent" 5783 // ], 5784 // "parameters": { 5785 // "parent": { 5786 // "description": "The project ID or project number in which this cloudauditlogssource should be created.", 5787 // "location": "path", 5788 // "pattern": "^namespaces/[^/]+$", 5789 // "required": true, 5790 // "type": "string" 5791 // } 5792 // }, 5793 // "path": "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudauditlogssources", 5794 // "request": { 5795 // "$ref": "CloudAuditLogsSource" 5796 // }, 5797 // "response": { 5798 // "$ref": "CloudAuditLogsSource" 5799 // }, 5800 // "scopes": [ 5801 // "https://www.googleapis.com/auth/cloud-platform" 5802 // ] 5803 // } 5804 5805} 5806 5807// method id "run.namespaces.cloudauditlogssources.delete": 5808 5809type NamespacesCloudauditlogssourcesDeleteCall struct { 5810 s *APIService 5811 name string 5812 urlParams_ gensupport.URLParams 5813 ctx_ context.Context 5814 header_ http.Header 5815} 5816 5817// Delete: Rpc to delete a cloudauditlogssource. 5818func (r *NamespacesCloudauditlogssourcesService) Delete(name string) *NamespacesCloudauditlogssourcesDeleteCall { 5819 c := &NamespacesCloudauditlogssourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5820 c.name = name 5821 return c 5822} 5823 5824// ApiVersion sets the optional parameter "apiVersion": Cloud Run 5825// currently ignores this parameter. 5826func (c *NamespacesCloudauditlogssourcesDeleteCall) ApiVersion(apiVersion string) *NamespacesCloudauditlogssourcesDeleteCall { 5827 c.urlParams_.Set("apiVersion", apiVersion) 5828 return c 5829} 5830 5831// Kind sets the optional parameter "kind": Cloud Run currently ignores 5832// this parameter. 5833func (c *NamespacesCloudauditlogssourcesDeleteCall) Kind(kind string) *NamespacesCloudauditlogssourcesDeleteCall { 5834 c.urlParams_.Set("kind", kind) 5835 return c 5836} 5837 5838// PropagationPolicy sets the optional parameter "propagationPolicy": 5839// Specifies the propagation policy of delete. Cloud Run currently 5840// ignores this setting, and deletes in the background. Please see 5841// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 5842// for more information. 5843func (c *NamespacesCloudauditlogssourcesDeleteCall) PropagationPolicy(propagationPolicy string) *NamespacesCloudauditlogssourcesDeleteCall { 5844 c.urlParams_.Set("propagationPolicy", propagationPolicy) 5845 return c 5846} 5847 5848// Fields allows partial responses to be retrieved. See 5849// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5850// for more information. 5851func (c *NamespacesCloudauditlogssourcesDeleteCall) Fields(s ...googleapi.Field) *NamespacesCloudauditlogssourcesDeleteCall { 5852 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5853 return c 5854} 5855 5856// Context sets the context to be used in this call's Do method. Any 5857// pending HTTP request will be aborted if the provided context is 5858// canceled. 5859func (c *NamespacesCloudauditlogssourcesDeleteCall) Context(ctx context.Context) *NamespacesCloudauditlogssourcesDeleteCall { 5860 c.ctx_ = ctx 5861 return c 5862} 5863 5864// Header returns an http.Header that can be modified by the caller to 5865// add HTTP headers to the request. 5866func (c *NamespacesCloudauditlogssourcesDeleteCall) Header() http.Header { 5867 if c.header_ == nil { 5868 c.header_ = make(http.Header) 5869 } 5870 return c.header_ 5871} 5872 5873func (c *NamespacesCloudauditlogssourcesDeleteCall) doRequest(alt string) (*http.Response, error) { 5874 reqHeaders := make(http.Header) 5875 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5876 for k, v := range c.header_ { 5877 reqHeaders[k] = v 5878 } 5879 reqHeaders.Set("User-Agent", c.s.userAgent()) 5880 var body io.Reader = nil 5881 c.urlParams_.Set("alt", alt) 5882 c.urlParams_.Set("prettyPrint", "false") 5883 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+name}") 5884 urls += "?" + c.urlParams_.Encode() 5885 req, err := http.NewRequest("DELETE", urls, body) 5886 if err != nil { 5887 return nil, err 5888 } 5889 req.Header = reqHeaders 5890 googleapi.Expand(req.URL, map[string]string{ 5891 "name": c.name, 5892 }) 5893 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5894} 5895 5896// Do executes the "run.namespaces.cloudauditlogssources.delete" call. 5897// Exactly one of *Empty or error will be non-nil. Any non-2xx status 5898// code is an error. Response headers are in either 5899// *Empty.ServerResponse.Header or (if a response was returned at all) 5900// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5901// check whether the returned error was because http.StatusNotModified 5902// was returned. 5903func (c *NamespacesCloudauditlogssourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 5904 gensupport.SetOptions(c.urlParams_, opts...) 5905 res, err := c.doRequest("json") 5906 if res != nil && res.StatusCode == http.StatusNotModified { 5907 if res.Body != nil { 5908 res.Body.Close() 5909 } 5910 return nil, &googleapi.Error{ 5911 Code: res.StatusCode, 5912 Header: res.Header, 5913 } 5914 } 5915 if err != nil { 5916 return nil, err 5917 } 5918 defer googleapi.CloseBody(res) 5919 if err := googleapi.CheckResponse(res); err != nil { 5920 return nil, err 5921 } 5922 ret := &Empty{ 5923 ServerResponse: googleapi.ServerResponse{ 5924 Header: res.Header, 5925 HTTPStatusCode: res.StatusCode, 5926 }, 5927 } 5928 target := &ret 5929 if err := gensupport.DecodeResponse(target, res); err != nil { 5930 return nil, err 5931 } 5932 return ret, nil 5933 // { 5934 // "description": "Rpc to delete a cloudauditlogssource.", 5935 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudauditlogssources/{cloudauditlogssourcesId}", 5936 // "httpMethod": "DELETE", 5937 // "id": "run.namespaces.cloudauditlogssources.delete", 5938 // "parameterOrder": [ 5939 // "name" 5940 // ], 5941 // "parameters": { 5942 // "apiVersion": { 5943 // "description": "Cloud Run currently ignores this parameter.", 5944 // "location": "query", 5945 // "type": "string" 5946 // }, 5947 // "kind": { 5948 // "description": "Cloud Run currently ignores this parameter.", 5949 // "location": "query", 5950 // "type": "string" 5951 // }, 5952 // "name": { 5953 // "description": "The name of the cloudauditlogssource being deleted. If needed, replace {namespace_id} with the project ID.", 5954 // "location": "path", 5955 // "pattern": "^namespaces/[^/]+/cloudauditlogssources/[^/]+$", 5956 // "required": true, 5957 // "type": "string" 5958 // }, 5959 // "propagationPolicy": { 5960 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 5961 // "location": "query", 5962 // "type": "string" 5963 // } 5964 // }, 5965 // "path": "apis/events.cloud.google.com/v1alpha1/{+name}", 5966 // "response": { 5967 // "$ref": "Empty" 5968 // }, 5969 // "scopes": [ 5970 // "https://www.googleapis.com/auth/cloud-platform" 5971 // ] 5972 // } 5973 5974} 5975 5976// method id "run.namespaces.cloudauditlogssources.get": 5977 5978type NamespacesCloudauditlogssourcesGetCall struct { 5979 s *APIService 5980 name string 5981 urlParams_ gensupport.URLParams 5982 ifNoneMatch_ string 5983 ctx_ context.Context 5984 header_ http.Header 5985} 5986 5987// Get: Rpc to get information about a cloudauditlogssource. 5988func (r *NamespacesCloudauditlogssourcesService) Get(name string) *NamespacesCloudauditlogssourcesGetCall { 5989 c := &NamespacesCloudauditlogssourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5990 c.name = name 5991 return c 5992} 5993 5994// Fields allows partial responses to be retrieved. See 5995// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5996// for more information. 5997func (c *NamespacesCloudauditlogssourcesGetCall) Fields(s ...googleapi.Field) *NamespacesCloudauditlogssourcesGetCall { 5998 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5999 return c 6000} 6001 6002// IfNoneMatch sets the optional parameter which makes the operation 6003// fail if the object's ETag matches the given value. This is useful for 6004// getting updates only after the object has changed since the last 6005// request. Use googleapi.IsNotModified to check whether the response 6006// error from Do is the result of In-None-Match. 6007func (c *NamespacesCloudauditlogssourcesGetCall) IfNoneMatch(entityTag string) *NamespacesCloudauditlogssourcesGetCall { 6008 c.ifNoneMatch_ = entityTag 6009 return c 6010} 6011 6012// Context sets the context to be used in this call's Do method. Any 6013// pending HTTP request will be aborted if the provided context is 6014// canceled. 6015func (c *NamespacesCloudauditlogssourcesGetCall) Context(ctx context.Context) *NamespacesCloudauditlogssourcesGetCall { 6016 c.ctx_ = ctx 6017 return c 6018} 6019 6020// Header returns an http.Header that can be modified by the caller to 6021// add HTTP headers to the request. 6022func (c *NamespacesCloudauditlogssourcesGetCall) Header() http.Header { 6023 if c.header_ == nil { 6024 c.header_ = make(http.Header) 6025 } 6026 return c.header_ 6027} 6028 6029func (c *NamespacesCloudauditlogssourcesGetCall) doRequest(alt string) (*http.Response, error) { 6030 reqHeaders := make(http.Header) 6031 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6032 for k, v := range c.header_ { 6033 reqHeaders[k] = v 6034 } 6035 reqHeaders.Set("User-Agent", c.s.userAgent()) 6036 if c.ifNoneMatch_ != "" { 6037 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6038 } 6039 var body io.Reader = nil 6040 c.urlParams_.Set("alt", alt) 6041 c.urlParams_.Set("prettyPrint", "false") 6042 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+name}") 6043 urls += "?" + c.urlParams_.Encode() 6044 req, err := http.NewRequest("GET", urls, body) 6045 if err != nil { 6046 return nil, err 6047 } 6048 req.Header = reqHeaders 6049 googleapi.Expand(req.URL, map[string]string{ 6050 "name": c.name, 6051 }) 6052 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6053} 6054 6055// Do executes the "run.namespaces.cloudauditlogssources.get" call. 6056// Exactly one of *CloudAuditLogsSource or error will be non-nil. Any 6057// non-2xx status code is an error. Response headers are in either 6058// *CloudAuditLogsSource.ServerResponse.Header or (if a response was 6059// returned at all) in error.(*googleapi.Error).Header. Use 6060// googleapi.IsNotModified to check whether the returned error was 6061// because http.StatusNotModified was returned. 6062func (c *NamespacesCloudauditlogssourcesGetCall) Do(opts ...googleapi.CallOption) (*CloudAuditLogsSource, error) { 6063 gensupport.SetOptions(c.urlParams_, opts...) 6064 res, err := c.doRequest("json") 6065 if res != nil && res.StatusCode == http.StatusNotModified { 6066 if res.Body != nil { 6067 res.Body.Close() 6068 } 6069 return nil, &googleapi.Error{ 6070 Code: res.StatusCode, 6071 Header: res.Header, 6072 } 6073 } 6074 if err != nil { 6075 return nil, err 6076 } 6077 defer googleapi.CloseBody(res) 6078 if err := googleapi.CheckResponse(res); err != nil { 6079 return nil, err 6080 } 6081 ret := &CloudAuditLogsSource{ 6082 ServerResponse: googleapi.ServerResponse{ 6083 Header: res.Header, 6084 HTTPStatusCode: res.StatusCode, 6085 }, 6086 } 6087 target := &ret 6088 if err := gensupport.DecodeResponse(target, res); err != nil { 6089 return nil, err 6090 } 6091 return ret, nil 6092 // { 6093 // "description": "Rpc to get information about a cloudauditlogssource.", 6094 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudauditlogssources/{cloudauditlogssourcesId}", 6095 // "httpMethod": "GET", 6096 // "id": "run.namespaces.cloudauditlogssources.get", 6097 // "parameterOrder": [ 6098 // "name" 6099 // ], 6100 // "parameters": { 6101 // "name": { 6102 // "description": "The name of the cloudauditlogssource being retrieved. If needed, replace {namespace_id} with the project ID.", 6103 // "location": "path", 6104 // "pattern": "^namespaces/[^/]+/cloudauditlogssources/[^/]+$", 6105 // "required": true, 6106 // "type": "string" 6107 // } 6108 // }, 6109 // "path": "apis/events.cloud.google.com/v1alpha1/{+name}", 6110 // "response": { 6111 // "$ref": "CloudAuditLogsSource" 6112 // }, 6113 // "scopes": [ 6114 // "https://www.googleapis.com/auth/cloud-platform" 6115 // ] 6116 // } 6117 6118} 6119 6120// method id "run.namespaces.cloudauditlogssources.list": 6121 6122type NamespacesCloudauditlogssourcesListCall struct { 6123 s *APIService 6124 parent string 6125 urlParams_ gensupport.URLParams 6126 ifNoneMatch_ string 6127 ctx_ context.Context 6128 header_ http.Header 6129} 6130 6131// List: Rpc to list cloudauditlogssources. 6132func (r *NamespacesCloudauditlogssourcesService) List(parent string) *NamespacesCloudauditlogssourcesListCall { 6133 c := &NamespacesCloudauditlogssourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6134 c.parent = parent 6135 return c 6136} 6137 6138// Continue sets the optional parameter "continue": Optional encoded 6139// string to continue paging. 6140func (c *NamespacesCloudauditlogssourcesListCall) Continue(continue_ string) *NamespacesCloudauditlogssourcesListCall { 6141 c.urlParams_.Set("continue", continue_) 6142 return c 6143} 6144 6145// FieldSelector sets the optional parameter "fieldSelector": Allows to 6146// filter resources based on a specific value for a field name. Send 6147// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 6148// currently used by Cloud Run. 6149func (c *NamespacesCloudauditlogssourcesListCall) FieldSelector(fieldSelector string) *NamespacesCloudauditlogssourcesListCall { 6150 c.urlParams_.Set("fieldSelector", fieldSelector) 6151 return c 6152} 6153 6154// IncludeUninitialized sets the optional parameter 6155// "includeUninitialized": Not currently used by Cloud Run. 6156func (c *NamespacesCloudauditlogssourcesListCall) IncludeUninitialized(includeUninitialized bool) *NamespacesCloudauditlogssourcesListCall { 6157 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 6158 return c 6159} 6160 6161// LabelSelector sets the optional parameter "labelSelector": Allows to 6162// filter resources based on a label. Supported operations are =, !=, 6163// exists, in, and notIn. 6164func (c *NamespacesCloudauditlogssourcesListCall) LabelSelector(labelSelector string) *NamespacesCloudauditlogssourcesListCall { 6165 c.urlParams_.Set("labelSelector", labelSelector) 6166 return c 6167} 6168 6169// Limit sets the optional parameter "limit": The maximum number of 6170// records that should be returned. 6171func (c *NamespacesCloudauditlogssourcesListCall) Limit(limit int64) *NamespacesCloudauditlogssourcesListCall { 6172 c.urlParams_.Set("limit", fmt.Sprint(limit)) 6173 return c 6174} 6175 6176// ResourceVersion sets the optional parameter "resourceVersion": The 6177// baseline resource version from which the list or watch operation 6178// should start. Not currently used by Cloud Run. 6179func (c *NamespacesCloudauditlogssourcesListCall) ResourceVersion(resourceVersion string) *NamespacesCloudauditlogssourcesListCall { 6180 c.urlParams_.Set("resourceVersion", resourceVersion) 6181 return c 6182} 6183 6184// Watch sets the optional parameter "watch": Flag that indicates that 6185// the client expects to watch this resource as well. Not currently used 6186// by Cloud Run. 6187func (c *NamespacesCloudauditlogssourcesListCall) Watch(watch bool) *NamespacesCloudauditlogssourcesListCall { 6188 c.urlParams_.Set("watch", fmt.Sprint(watch)) 6189 return c 6190} 6191 6192// Fields allows partial responses to be retrieved. See 6193// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6194// for more information. 6195func (c *NamespacesCloudauditlogssourcesListCall) Fields(s ...googleapi.Field) *NamespacesCloudauditlogssourcesListCall { 6196 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6197 return c 6198} 6199 6200// IfNoneMatch sets the optional parameter which makes the operation 6201// fail if the object's ETag matches the given value. This is useful for 6202// getting updates only after the object has changed since the last 6203// request. Use googleapi.IsNotModified to check whether the response 6204// error from Do is the result of In-None-Match. 6205func (c *NamespacesCloudauditlogssourcesListCall) IfNoneMatch(entityTag string) *NamespacesCloudauditlogssourcesListCall { 6206 c.ifNoneMatch_ = entityTag 6207 return c 6208} 6209 6210// Context sets the context to be used in this call's Do method. Any 6211// pending HTTP request will be aborted if the provided context is 6212// canceled. 6213func (c *NamespacesCloudauditlogssourcesListCall) Context(ctx context.Context) *NamespacesCloudauditlogssourcesListCall { 6214 c.ctx_ = ctx 6215 return c 6216} 6217 6218// Header returns an http.Header that can be modified by the caller to 6219// add HTTP headers to the request. 6220func (c *NamespacesCloudauditlogssourcesListCall) Header() http.Header { 6221 if c.header_ == nil { 6222 c.header_ = make(http.Header) 6223 } 6224 return c.header_ 6225} 6226 6227func (c *NamespacesCloudauditlogssourcesListCall) doRequest(alt string) (*http.Response, error) { 6228 reqHeaders := make(http.Header) 6229 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6230 for k, v := range c.header_ { 6231 reqHeaders[k] = v 6232 } 6233 reqHeaders.Set("User-Agent", c.s.userAgent()) 6234 if c.ifNoneMatch_ != "" { 6235 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6236 } 6237 var body io.Reader = nil 6238 c.urlParams_.Set("alt", alt) 6239 c.urlParams_.Set("prettyPrint", "false") 6240 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudauditlogssources") 6241 urls += "?" + c.urlParams_.Encode() 6242 req, err := http.NewRequest("GET", urls, body) 6243 if err != nil { 6244 return nil, err 6245 } 6246 req.Header = reqHeaders 6247 googleapi.Expand(req.URL, map[string]string{ 6248 "parent": c.parent, 6249 }) 6250 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6251} 6252 6253// Do executes the "run.namespaces.cloudauditlogssources.list" call. 6254// Exactly one of *ListCloudAuditLogsSourcesResponse or error will be 6255// non-nil. Any non-2xx status code is an error. Response headers are in 6256// either *ListCloudAuditLogsSourcesResponse.ServerResponse.Header or 6257// (if a response was returned at all) in 6258// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6259// whether the returned error was because http.StatusNotModified was 6260// returned. 6261func (c *NamespacesCloudauditlogssourcesListCall) Do(opts ...googleapi.CallOption) (*ListCloudAuditLogsSourcesResponse, error) { 6262 gensupport.SetOptions(c.urlParams_, opts...) 6263 res, err := c.doRequest("json") 6264 if res != nil && res.StatusCode == http.StatusNotModified { 6265 if res.Body != nil { 6266 res.Body.Close() 6267 } 6268 return nil, &googleapi.Error{ 6269 Code: res.StatusCode, 6270 Header: res.Header, 6271 } 6272 } 6273 if err != nil { 6274 return nil, err 6275 } 6276 defer googleapi.CloseBody(res) 6277 if err := googleapi.CheckResponse(res); err != nil { 6278 return nil, err 6279 } 6280 ret := &ListCloudAuditLogsSourcesResponse{ 6281 ServerResponse: googleapi.ServerResponse{ 6282 Header: res.Header, 6283 HTTPStatusCode: res.StatusCode, 6284 }, 6285 } 6286 target := &ret 6287 if err := gensupport.DecodeResponse(target, res); err != nil { 6288 return nil, err 6289 } 6290 return ret, nil 6291 // { 6292 // "description": "Rpc to list cloudauditlogssources.", 6293 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudauditlogssources", 6294 // "httpMethod": "GET", 6295 // "id": "run.namespaces.cloudauditlogssources.list", 6296 // "parameterOrder": [ 6297 // "parent" 6298 // ], 6299 // "parameters": { 6300 // "continue": { 6301 // "description": "Optional encoded string to continue paging.", 6302 // "location": "query", 6303 // "type": "string" 6304 // }, 6305 // "fieldSelector": { 6306 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 6307 // "location": "query", 6308 // "type": "string" 6309 // }, 6310 // "includeUninitialized": { 6311 // "description": "Not currently used by Cloud Run.", 6312 // "location": "query", 6313 // "type": "boolean" 6314 // }, 6315 // "labelSelector": { 6316 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 6317 // "location": "query", 6318 // "type": "string" 6319 // }, 6320 // "limit": { 6321 // "description": "The maximum number of records that should be returned.", 6322 // "format": "int32", 6323 // "location": "query", 6324 // "type": "integer" 6325 // }, 6326 // "parent": { 6327 // "description": "The project ID or project number from which the cloudauditlogssources should be listed.", 6328 // "location": "path", 6329 // "pattern": "^namespaces/[^/]+$", 6330 // "required": true, 6331 // "type": "string" 6332 // }, 6333 // "resourceVersion": { 6334 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 6335 // "location": "query", 6336 // "type": "string" 6337 // }, 6338 // "watch": { 6339 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 6340 // "location": "query", 6341 // "type": "boolean" 6342 // } 6343 // }, 6344 // "path": "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudauditlogssources", 6345 // "response": { 6346 // "$ref": "ListCloudAuditLogsSourcesResponse" 6347 // }, 6348 // "scopes": [ 6349 // "https://www.googleapis.com/auth/cloud-platform" 6350 // ] 6351 // } 6352 6353} 6354 6355// method id "run.namespaces.cloudpubsubsources.create": 6356 6357type NamespacesCloudpubsubsourcesCreateCall struct { 6358 s *APIService 6359 parent string 6360 cloudpubsubsource *CloudPubSubSource 6361 urlParams_ gensupport.URLParams 6362 ctx_ context.Context 6363 header_ http.Header 6364} 6365 6366// Create: Creates a new cloudpubsubsource. 6367func (r *NamespacesCloudpubsubsourcesService) Create(parent string, cloudpubsubsource *CloudPubSubSource) *NamespacesCloudpubsubsourcesCreateCall { 6368 c := &NamespacesCloudpubsubsourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6369 c.parent = parent 6370 c.cloudpubsubsource = cloudpubsubsource 6371 return c 6372} 6373 6374// Fields allows partial responses to be retrieved. See 6375// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6376// for more information. 6377func (c *NamespacesCloudpubsubsourcesCreateCall) Fields(s ...googleapi.Field) *NamespacesCloudpubsubsourcesCreateCall { 6378 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6379 return c 6380} 6381 6382// Context sets the context to be used in this call's Do method. Any 6383// pending HTTP request will be aborted if the provided context is 6384// canceled. 6385func (c *NamespacesCloudpubsubsourcesCreateCall) Context(ctx context.Context) *NamespacesCloudpubsubsourcesCreateCall { 6386 c.ctx_ = ctx 6387 return c 6388} 6389 6390// Header returns an http.Header that can be modified by the caller to 6391// add HTTP headers to the request. 6392func (c *NamespacesCloudpubsubsourcesCreateCall) Header() http.Header { 6393 if c.header_ == nil { 6394 c.header_ = make(http.Header) 6395 } 6396 return c.header_ 6397} 6398 6399func (c *NamespacesCloudpubsubsourcesCreateCall) doRequest(alt string) (*http.Response, error) { 6400 reqHeaders := make(http.Header) 6401 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6402 for k, v := range c.header_ { 6403 reqHeaders[k] = v 6404 } 6405 reqHeaders.Set("User-Agent", c.s.userAgent()) 6406 var body io.Reader = nil 6407 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudpubsubsource) 6408 if err != nil { 6409 return nil, err 6410 } 6411 reqHeaders.Set("Content-Type", "application/json") 6412 c.urlParams_.Set("alt", alt) 6413 c.urlParams_.Set("prettyPrint", "false") 6414 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudpubsubsources") 6415 urls += "?" + c.urlParams_.Encode() 6416 req, err := http.NewRequest("POST", urls, body) 6417 if err != nil { 6418 return nil, err 6419 } 6420 req.Header = reqHeaders 6421 googleapi.Expand(req.URL, map[string]string{ 6422 "parent": c.parent, 6423 }) 6424 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6425} 6426 6427// Do executes the "run.namespaces.cloudpubsubsources.create" call. 6428// Exactly one of *CloudPubSubSource or error will be non-nil. Any 6429// non-2xx status code is an error. Response headers are in either 6430// *CloudPubSubSource.ServerResponse.Header or (if a response was 6431// returned at all) in error.(*googleapi.Error).Header. Use 6432// googleapi.IsNotModified to check whether the returned error was 6433// because http.StatusNotModified was returned. 6434func (c *NamespacesCloudpubsubsourcesCreateCall) Do(opts ...googleapi.CallOption) (*CloudPubSubSource, error) { 6435 gensupport.SetOptions(c.urlParams_, opts...) 6436 res, err := c.doRequest("json") 6437 if res != nil && res.StatusCode == http.StatusNotModified { 6438 if res.Body != nil { 6439 res.Body.Close() 6440 } 6441 return nil, &googleapi.Error{ 6442 Code: res.StatusCode, 6443 Header: res.Header, 6444 } 6445 } 6446 if err != nil { 6447 return nil, err 6448 } 6449 defer googleapi.CloseBody(res) 6450 if err := googleapi.CheckResponse(res); err != nil { 6451 return nil, err 6452 } 6453 ret := &CloudPubSubSource{ 6454 ServerResponse: googleapi.ServerResponse{ 6455 Header: res.Header, 6456 HTTPStatusCode: res.StatusCode, 6457 }, 6458 } 6459 target := &ret 6460 if err := gensupport.DecodeResponse(target, res); err != nil { 6461 return nil, err 6462 } 6463 return ret, nil 6464 // { 6465 // "description": "Creates a new cloudpubsubsource.", 6466 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudpubsubsources", 6467 // "httpMethod": "POST", 6468 // "id": "run.namespaces.cloudpubsubsources.create", 6469 // "parameterOrder": [ 6470 // "parent" 6471 // ], 6472 // "parameters": { 6473 // "parent": { 6474 // "description": "The project ID or project number in which this cloudpubsubsource should be created.", 6475 // "location": "path", 6476 // "pattern": "^namespaces/[^/]+$", 6477 // "required": true, 6478 // "type": "string" 6479 // } 6480 // }, 6481 // "path": "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudpubsubsources", 6482 // "request": { 6483 // "$ref": "CloudPubSubSource" 6484 // }, 6485 // "response": { 6486 // "$ref": "CloudPubSubSource" 6487 // }, 6488 // "scopes": [ 6489 // "https://www.googleapis.com/auth/cloud-platform" 6490 // ] 6491 // } 6492 6493} 6494 6495// method id "run.namespaces.cloudpubsubsources.delete": 6496 6497type NamespacesCloudpubsubsourcesDeleteCall struct { 6498 s *APIService 6499 name string 6500 urlParams_ gensupport.URLParams 6501 ctx_ context.Context 6502 header_ http.Header 6503} 6504 6505// Delete: Rpc to delete a cloudpubsubsource. 6506func (r *NamespacesCloudpubsubsourcesService) Delete(name string) *NamespacesCloudpubsubsourcesDeleteCall { 6507 c := &NamespacesCloudpubsubsourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6508 c.name = name 6509 return c 6510} 6511 6512// ApiVersion sets the optional parameter "apiVersion": Cloud Run 6513// currently ignores this parameter. 6514func (c *NamespacesCloudpubsubsourcesDeleteCall) ApiVersion(apiVersion string) *NamespacesCloudpubsubsourcesDeleteCall { 6515 c.urlParams_.Set("apiVersion", apiVersion) 6516 return c 6517} 6518 6519// Kind sets the optional parameter "kind": Cloud Run currently ignores 6520// this parameter. 6521func (c *NamespacesCloudpubsubsourcesDeleteCall) Kind(kind string) *NamespacesCloudpubsubsourcesDeleteCall { 6522 c.urlParams_.Set("kind", kind) 6523 return c 6524} 6525 6526// PropagationPolicy sets the optional parameter "propagationPolicy": 6527// Specifies the propagation policy of delete. Cloud Run currently 6528// ignores this setting, and deletes in the background. Please see 6529// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 6530// for more information. 6531func (c *NamespacesCloudpubsubsourcesDeleteCall) PropagationPolicy(propagationPolicy string) *NamespacesCloudpubsubsourcesDeleteCall { 6532 c.urlParams_.Set("propagationPolicy", propagationPolicy) 6533 return c 6534} 6535 6536// Fields allows partial responses to be retrieved. See 6537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6538// for more information. 6539func (c *NamespacesCloudpubsubsourcesDeleteCall) Fields(s ...googleapi.Field) *NamespacesCloudpubsubsourcesDeleteCall { 6540 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6541 return c 6542} 6543 6544// Context sets the context to be used in this call's Do method. Any 6545// pending HTTP request will be aborted if the provided context is 6546// canceled. 6547func (c *NamespacesCloudpubsubsourcesDeleteCall) Context(ctx context.Context) *NamespacesCloudpubsubsourcesDeleteCall { 6548 c.ctx_ = ctx 6549 return c 6550} 6551 6552// Header returns an http.Header that can be modified by the caller to 6553// add HTTP headers to the request. 6554func (c *NamespacesCloudpubsubsourcesDeleteCall) Header() http.Header { 6555 if c.header_ == nil { 6556 c.header_ = make(http.Header) 6557 } 6558 return c.header_ 6559} 6560 6561func (c *NamespacesCloudpubsubsourcesDeleteCall) doRequest(alt string) (*http.Response, error) { 6562 reqHeaders := make(http.Header) 6563 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6564 for k, v := range c.header_ { 6565 reqHeaders[k] = v 6566 } 6567 reqHeaders.Set("User-Agent", c.s.userAgent()) 6568 var body io.Reader = nil 6569 c.urlParams_.Set("alt", alt) 6570 c.urlParams_.Set("prettyPrint", "false") 6571 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+name}") 6572 urls += "?" + c.urlParams_.Encode() 6573 req, err := http.NewRequest("DELETE", urls, body) 6574 if err != nil { 6575 return nil, err 6576 } 6577 req.Header = reqHeaders 6578 googleapi.Expand(req.URL, map[string]string{ 6579 "name": c.name, 6580 }) 6581 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6582} 6583 6584// Do executes the "run.namespaces.cloudpubsubsources.delete" call. 6585// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6586// code is an error. Response headers are in either 6587// *Empty.ServerResponse.Header or (if a response was returned at all) 6588// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6589// check whether the returned error was because http.StatusNotModified 6590// was returned. 6591func (c *NamespacesCloudpubsubsourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6592 gensupport.SetOptions(c.urlParams_, opts...) 6593 res, err := c.doRequest("json") 6594 if res != nil && res.StatusCode == http.StatusNotModified { 6595 if res.Body != nil { 6596 res.Body.Close() 6597 } 6598 return nil, &googleapi.Error{ 6599 Code: res.StatusCode, 6600 Header: res.Header, 6601 } 6602 } 6603 if err != nil { 6604 return nil, err 6605 } 6606 defer googleapi.CloseBody(res) 6607 if err := googleapi.CheckResponse(res); err != nil { 6608 return nil, err 6609 } 6610 ret := &Empty{ 6611 ServerResponse: googleapi.ServerResponse{ 6612 Header: res.Header, 6613 HTTPStatusCode: res.StatusCode, 6614 }, 6615 } 6616 target := &ret 6617 if err := gensupport.DecodeResponse(target, res); err != nil { 6618 return nil, err 6619 } 6620 return ret, nil 6621 // { 6622 // "description": "Rpc to delete a cloudpubsubsource.", 6623 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudpubsubsources/{cloudpubsubsourcesId}", 6624 // "httpMethod": "DELETE", 6625 // "id": "run.namespaces.cloudpubsubsources.delete", 6626 // "parameterOrder": [ 6627 // "name" 6628 // ], 6629 // "parameters": { 6630 // "apiVersion": { 6631 // "description": "Cloud Run currently ignores this parameter.", 6632 // "location": "query", 6633 // "type": "string" 6634 // }, 6635 // "kind": { 6636 // "description": "Cloud Run currently ignores this parameter.", 6637 // "location": "query", 6638 // "type": "string" 6639 // }, 6640 // "name": { 6641 // "description": "The name of the cloudpubsubsource being deleted. If needed, replace {namespace_id} with the project ID.", 6642 // "location": "path", 6643 // "pattern": "^namespaces/[^/]+/cloudpubsubsources/[^/]+$", 6644 // "required": true, 6645 // "type": "string" 6646 // }, 6647 // "propagationPolicy": { 6648 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 6649 // "location": "query", 6650 // "type": "string" 6651 // } 6652 // }, 6653 // "path": "apis/events.cloud.google.com/v1alpha1/{+name}", 6654 // "response": { 6655 // "$ref": "Empty" 6656 // }, 6657 // "scopes": [ 6658 // "https://www.googleapis.com/auth/cloud-platform" 6659 // ] 6660 // } 6661 6662} 6663 6664// method id "run.namespaces.cloudpubsubsources.get": 6665 6666type NamespacesCloudpubsubsourcesGetCall struct { 6667 s *APIService 6668 name string 6669 urlParams_ gensupport.URLParams 6670 ifNoneMatch_ string 6671 ctx_ context.Context 6672 header_ http.Header 6673} 6674 6675// Get: Rpc to get information about a cloudpubsubsource. 6676func (r *NamespacesCloudpubsubsourcesService) Get(name string) *NamespacesCloudpubsubsourcesGetCall { 6677 c := &NamespacesCloudpubsubsourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6678 c.name = name 6679 return c 6680} 6681 6682// Fields allows partial responses to be retrieved. See 6683// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6684// for more information. 6685func (c *NamespacesCloudpubsubsourcesGetCall) Fields(s ...googleapi.Field) *NamespacesCloudpubsubsourcesGetCall { 6686 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6687 return c 6688} 6689 6690// IfNoneMatch sets the optional parameter which makes the operation 6691// fail if the object's ETag matches the given value. This is useful for 6692// getting updates only after the object has changed since the last 6693// request. Use googleapi.IsNotModified to check whether the response 6694// error from Do is the result of In-None-Match. 6695func (c *NamespacesCloudpubsubsourcesGetCall) IfNoneMatch(entityTag string) *NamespacesCloudpubsubsourcesGetCall { 6696 c.ifNoneMatch_ = entityTag 6697 return c 6698} 6699 6700// Context sets the context to be used in this call's Do method. Any 6701// pending HTTP request will be aborted if the provided context is 6702// canceled. 6703func (c *NamespacesCloudpubsubsourcesGetCall) Context(ctx context.Context) *NamespacesCloudpubsubsourcesGetCall { 6704 c.ctx_ = ctx 6705 return c 6706} 6707 6708// Header returns an http.Header that can be modified by the caller to 6709// add HTTP headers to the request. 6710func (c *NamespacesCloudpubsubsourcesGetCall) Header() http.Header { 6711 if c.header_ == nil { 6712 c.header_ = make(http.Header) 6713 } 6714 return c.header_ 6715} 6716 6717func (c *NamespacesCloudpubsubsourcesGetCall) doRequest(alt string) (*http.Response, error) { 6718 reqHeaders := make(http.Header) 6719 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6720 for k, v := range c.header_ { 6721 reqHeaders[k] = v 6722 } 6723 reqHeaders.Set("User-Agent", c.s.userAgent()) 6724 if c.ifNoneMatch_ != "" { 6725 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6726 } 6727 var body io.Reader = nil 6728 c.urlParams_.Set("alt", alt) 6729 c.urlParams_.Set("prettyPrint", "false") 6730 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+name}") 6731 urls += "?" + c.urlParams_.Encode() 6732 req, err := http.NewRequest("GET", urls, body) 6733 if err != nil { 6734 return nil, err 6735 } 6736 req.Header = reqHeaders 6737 googleapi.Expand(req.URL, map[string]string{ 6738 "name": c.name, 6739 }) 6740 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6741} 6742 6743// Do executes the "run.namespaces.cloudpubsubsources.get" call. 6744// Exactly one of *CloudPubSubSource or error will be non-nil. Any 6745// non-2xx status code is an error. Response headers are in either 6746// *CloudPubSubSource.ServerResponse.Header or (if a response was 6747// returned at all) in error.(*googleapi.Error).Header. Use 6748// googleapi.IsNotModified to check whether the returned error was 6749// because http.StatusNotModified was returned. 6750func (c *NamespacesCloudpubsubsourcesGetCall) Do(opts ...googleapi.CallOption) (*CloudPubSubSource, error) { 6751 gensupport.SetOptions(c.urlParams_, opts...) 6752 res, err := c.doRequest("json") 6753 if res != nil && res.StatusCode == http.StatusNotModified { 6754 if res.Body != nil { 6755 res.Body.Close() 6756 } 6757 return nil, &googleapi.Error{ 6758 Code: res.StatusCode, 6759 Header: res.Header, 6760 } 6761 } 6762 if err != nil { 6763 return nil, err 6764 } 6765 defer googleapi.CloseBody(res) 6766 if err := googleapi.CheckResponse(res); err != nil { 6767 return nil, err 6768 } 6769 ret := &CloudPubSubSource{ 6770 ServerResponse: googleapi.ServerResponse{ 6771 Header: res.Header, 6772 HTTPStatusCode: res.StatusCode, 6773 }, 6774 } 6775 target := &ret 6776 if err := gensupport.DecodeResponse(target, res); err != nil { 6777 return nil, err 6778 } 6779 return ret, nil 6780 // { 6781 // "description": "Rpc to get information about a cloudpubsubsource.", 6782 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudpubsubsources/{cloudpubsubsourcesId}", 6783 // "httpMethod": "GET", 6784 // "id": "run.namespaces.cloudpubsubsources.get", 6785 // "parameterOrder": [ 6786 // "name" 6787 // ], 6788 // "parameters": { 6789 // "name": { 6790 // "description": "The name of the cloudpubsubsource being retrieved. If needed, replace {namespace_id} with the project ID.", 6791 // "location": "path", 6792 // "pattern": "^namespaces/[^/]+/cloudpubsubsources/[^/]+$", 6793 // "required": true, 6794 // "type": "string" 6795 // } 6796 // }, 6797 // "path": "apis/events.cloud.google.com/v1alpha1/{+name}", 6798 // "response": { 6799 // "$ref": "CloudPubSubSource" 6800 // }, 6801 // "scopes": [ 6802 // "https://www.googleapis.com/auth/cloud-platform" 6803 // ] 6804 // } 6805 6806} 6807 6808// method id "run.namespaces.cloudpubsubsources.list": 6809 6810type NamespacesCloudpubsubsourcesListCall struct { 6811 s *APIService 6812 parent string 6813 urlParams_ gensupport.URLParams 6814 ifNoneMatch_ string 6815 ctx_ context.Context 6816 header_ http.Header 6817} 6818 6819// List: Rpc to list cloudpubsubsources. 6820func (r *NamespacesCloudpubsubsourcesService) List(parent string) *NamespacesCloudpubsubsourcesListCall { 6821 c := &NamespacesCloudpubsubsourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6822 c.parent = parent 6823 return c 6824} 6825 6826// Continue sets the optional parameter "continue": Optional encoded 6827// string to continue paging. 6828func (c *NamespacesCloudpubsubsourcesListCall) Continue(continue_ string) *NamespacesCloudpubsubsourcesListCall { 6829 c.urlParams_.Set("continue", continue_) 6830 return c 6831} 6832 6833// FieldSelector sets the optional parameter "fieldSelector": Allows to 6834// filter resources based on a specific value for a field name. Send 6835// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 6836// currently used by Cloud Run. 6837func (c *NamespacesCloudpubsubsourcesListCall) FieldSelector(fieldSelector string) *NamespacesCloudpubsubsourcesListCall { 6838 c.urlParams_.Set("fieldSelector", fieldSelector) 6839 return c 6840} 6841 6842// IncludeUninitialized sets the optional parameter 6843// "includeUninitialized": Not currently used by Cloud Run. 6844func (c *NamespacesCloudpubsubsourcesListCall) IncludeUninitialized(includeUninitialized bool) *NamespacesCloudpubsubsourcesListCall { 6845 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 6846 return c 6847} 6848 6849// LabelSelector sets the optional parameter "labelSelector": Allows to 6850// filter resources based on a label. Supported operations are =, !=, 6851// exists, in, and notIn. 6852func (c *NamespacesCloudpubsubsourcesListCall) LabelSelector(labelSelector string) *NamespacesCloudpubsubsourcesListCall { 6853 c.urlParams_.Set("labelSelector", labelSelector) 6854 return c 6855} 6856 6857// Limit sets the optional parameter "limit": The maximum number of 6858// records that should be returned. 6859func (c *NamespacesCloudpubsubsourcesListCall) Limit(limit int64) *NamespacesCloudpubsubsourcesListCall { 6860 c.urlParams_.Set("limit", fmt.Sprint(limit)) 6861 return c 6862} 6863 6864// ResourceVersion sets the optional parameter "resourceVersion": The 6865// baseline resource version from which the list or watch operation 6866// should start. Not currently used by Cloud Run. 6867func (c *NamespacesCloudpubsubsourcesListCall) ResourceVersion(resourceVersion string) *NamespacesCloudpubsubsourcesListCall { 6868 c.urlParams_.Set("resourceVersion", resourceVersion) 6869 return c 6870} 6871 6872// Watch sets the optional parameter "watch": Flag that indicates that 6873// the client expects to watch this resource as well. Not currently used 6874// by Cloud Run. 6875func (c *NamespacesCloudpubsubsourcesListCall) Watch(watch bool) *NamespacesCloudpubsubsourcesListCall { 6876 c.urlParams_.Set("watch", fmt.Sprint(watch)) 6877 return c 6878} 6879 6880// Fields allows partial responses to be retrieved. See 6881// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6882// for more information. 6883func (c *NamespacesCloudpubsubsourcesListCall) Fields(s ...googleapi.Field) *NamespacesCloudpubsubsourcesListCall { 6884 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6885 return c 6886} 6887 6888// IfNoneMatch sets the optional parameter which makes the operation 6889// fail if the object's ETag matches the given value. This is useful for 6890// getting updates only after the object has changed since the last 6891// request. Use googleapi.IsNotModified to check whether the response 6892// error from Do is the result of In-None-Match. 6893func (c *NamespacesCloudpubsubsourcesListCall) IfNoneMatch(entityTag string) *NamespacesCloudpubsubsourcesListCall { 6894 c.ifNoneMatch_ = entityTag 6895 return c 6896} 6897 6898// Context sets the context to be used in this call's Do method. Any 6899// pending HTTP request will be aborted if the provided context is 6900// canceled. 6901func (c *NamespacesCloudpubsubsourcesListCall) Context(ctx context.Context) *NamespacesCloudpubsubsourcesListCall { 6902 c.ctx_ = ctx 6903 return c 6904} 6905 6906// Header returns an http.Header that can be modified by the caller to 6907// add HTTP headers to the request. 6908func (c *NamespacesCloudpubsubsourcesListCall) Header() http.Header { 6909 if c.header_ == nil { 6910 c.header_ = make(http.Header) 6911 } 6912 return c.header_ 6913} 6914 6915func (c *NamespacesCloudpubsubsourcesListCall) doRequest(alt string) (*http.Response, error) { 6916 reqHeaders := make(http.Header) 6917 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6918 for k, v := range c.header_ { 6919 reqHeaders[k] = v 6920 } 6921 reqHeaders.Set("User-Agent", c.s.userAgent()) 6922 if c.ifNoneMatch_ != "" { 6923 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6924 } 6925 var body io.Reader = nil 6926 c.urlParams_.Set("alt", alt) 6927 c.urlParams_.Set("prettyPrint", "false") 6928 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudpubsubsources") 6929 urls += "?" + c.urlParams_.Encode() 6930 req, err := http.NewRequest("GET", urls, body) 6931 if err != nil { 6932 return nil, err 6933 } 6934 req.Header = reqHeaders 6935 googleapi.Expand(req.URL, map[string]string{ 6936 "parent": c.parent, 6937 }) 6938 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6939} 6940 6941// Do executes the "run.namespaces.cloudpubsubsources.list" call. 6942// Exactly one of *ListCloudPubSubSourcesResponse or error will be 6943// non-nil. Any non-2xx status code is an error. Response headers are in 6944// either *ListCloudPubSubSourcesResponse.ServerResponse.Header or (if a 6945// response was returned at all) in error.(*googleapi.Error).Header. Use 6946// googleapi.IsNotModified to check whether the returned error was 6947// because http.StatusNotModified was returned. 6948func (c *NamespacesCloudpubsubsourcesListCall) Do(opts ...googleapi.CallOption) (*ListCloudPubSubSourcesResponse, error) { 6949 gensupport.SetOptions(c.urlParams_, opts...) 6950 res, err := c.doRequest("json") 6951 if res != nil && res.StatusCode == http.StatusNotModified { 6952 if res.Body != nil { 6953 res.Body.Close() 6954 } 6955 return nil, &googleapi.Error{ 6956 Code: res.StatusCode, 6957 Header: res.Header, 6958 } 6959 } 6960 if err != nil { 6961 return nil, err 6962 } 6963 defer googleapi.CloseBody(res) 6964 if err := googleapi.CheckResponse(res); err != nil { 6965 return nil, err 6966 } 6967 ret := &ListCloudPubSubSourcesResponse{ 6968 ServerResponse: googleapi.ServerResponse{ 6969 Header: res.Header, 6970 HTTPStatusCode: res.StatusCode, 6971 }, 6972 } 6973 target := &ret 6974 if err := gensupport.DecodeResponse(target, res); err != nil { 6975 return nil, err 6976 } 6977 return ret, nil 6978 // { 6979 // "description": "Rpc to list cloudpubsubsources.", 6980 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudpubsubsources", 6981 // "httpMethod": "GET", 6982 // "id": "run.namespaces.cloudpubsubsources.list", 6983 // "parameterOrder": [ 6984 // "parent" 6985 // ], 6986 // "parameters": { 6987 // "continue": { 6988 // "description": "Optional encoded string to continue paging.", 6989 // "location": "query", 6990 // "type": "string" 6991 // }, 6992 // "fieldSelector": { 6993 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 6994 // "location": "query", 6995 // "type": "string" 6996 // }, 6997 // "includeUninitialized": { 6998 // "description": "Not currently used by Cloud Run.", 6999 // "location": "query", 7000 // "type": "boolean" 7001 // }, 7002 // "labelSelector": { 7003 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 7004 // "location": "query", 7005 // "type": "string" 7006 // }, 7007 // "limit": { 7008 // "description": "The maximum number of records that should be returned.", 7009 // "format": "int32", 7010 // "location": "query", 7011 // "type": "integer" 7012 // }, 7013 // "parent": { 7014 // "description": "The project ID or project number from which the cloudpubsubsources should be listed.", 7015 // "location": "path", 7016 // "pattern": "^namespaces/[^/]+$", 7017 // "required": true, 7018 // "type": "string" 7019 // }, 7020 // "resourceVersion": { 7021 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 7022 // "location": "query", 7023 // "type": "string" 7024 // }, 7025 // "watch": { 7026 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 7027 // "location": "query", 7028 // "type": "boolean" 7029 // } 7030 // }, 7031 // "path": "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudpubsubsources", 7032 // "response": { 7033 // "$ref": "ListCloudPubSubSourcesResponse" 7034 // }, 7035 // "scopes": [ 7036 // "https://www.googleapis.com/auth/cloud-platform" 7037 // ] 7038 // } 7039 7040} 7041 7042// method id "run.namespaces.cloudschedulersources.create": 7043 7044type NamespacesCloudschedulersourcesCreateCall struct { 7045 s *APIService 7046 parent string 7047 cloudschedulersource *CloudSchedulerSource 7048 urlParams_ gensupport.URLParams 7049 ctx_ context.Context 7050 header_ http.Header 7051} 7052 7053// Create: Creates a new cloudschedulersource. 7054func (r *NamespacesCloudschedulersourcesService) Create(parent string, cloudschedulersource *CloudSchedulerSource) *NamespacesCloudschedulersourcesCreateCall { 7055 c := &NamespacesCloudschedulersourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7056 c.parent = parent 7057 c.cloudschedulersource = cloudschedulersource 7058 return c 7059} 7060 7061// Fields allows partial responses to be retrieved. See 7062// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7063// for more information. 7064func (c *NamespacesCloudschedulersourcesCreateCall) Fields(s ...googleapi.Field) *NamespacesCloudschedulersourcesCreateCall { 7065 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7066 return c 7067} 7068 7069// Context sets the context to be used in this call's Do method. Any 7070// pending HTTP request will be aborted if the provided context is 7071// canceled. 7072func (c *NamespacesCloudschedulersourcesCreateCall) Context(ctx context.Context) *NamespacesCloudschedulersourcesCreateCall { 7073 c.ctx_ = ctx 7074 return c 7075} 7076 7077// Header returns an http.Header that can be modified by the caller to 7078// add HTTP headers to the request. 7079func (c *NamespacesCloudschedulersourcesCreateCall) Header() http.Header { 7080 if c.header_ == nil { 7081 c.header_ = make(http.Header) 7082 } 7083 return c.header_ 7084} 7085 7086func (c *NamespacesCloudschedulersourcesCreateCall) doRequest(alt string) (*http.Response, error) { 7087 reqHeaders := make(http.Header) 7088 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7089 for k, v := range c.header_ { 7090 reqHeaders[k] = v 7091 } 7092 reqHeaders.Set("User-Agent", c.s.userAgent()) 7093 var body io.Reader = nil 7094 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudschedulersource) 7095 if err != nil { 7096 return nil, err 7097 } 7098 reqHeaders.Set("Content-Type", "application/json") 7099 c.urlParams_.Set("alt", alt) 7100 c.urlParams_.Set("prettyPrint", "false") 7101 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudschedulersources") 7102 urls += "?" + c.urlParams_.Encode() 7103 req, err := http.NewRequest("POST", urls, body) 7104 if err != nil { 7105 return nil, err 7106 } 7107 req.Header = reqHeaders 7108 googleapi.Expand(req.URL, map[string]string{ 7109 "parent": c.parent, 7110 }) 7111 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7112} 7113 7114// Do executes the "run.namespaces.cloudschedulersources.create" call. 7115// Exactly one of *CloudSchedulerSource or error will be non-nil. Any 7116// non-2xx status code is an error. Response headers are in either 7117// *CloudSchedulerSource.ServerResponse.Header or (if a response was 7118// returned at all) in error.(*googleapi.Error).Header. Use 7119// googleapi.IsNotModified to check whether the returned error was 7120// because http.StatusNotModified was returned. 7121func (c *NamespacesCloudschedulersourcesCreateCall) Do(opts ...googleapi.CallOption) (*CloudSchedulerSource, error) { 7122 gensupport.SetOptions(c.urlParams_, opts...) 7123 res, err := c.doRequest("json") 7124 if res != nil && res.StatusCode == http.StatusNotModified { 7125 if res.Body != nil { 7126 res.Body.Close() 7127 } 7128 return nil, &googleapi.Error{ 7129 Code: res.StatusCode, 7130 Header: res.Header, 7131 } 7132 } 7133 if err != nil { 7134 return nil, err 7135 } 7136 defer googleapi.CloseBody(res) 7137 if err := googleapi.CheckResponse(res); err != nil { 7138 return nil, err 7139 } 7140 ret := &CloudSchedulerSource{ 7141 ServerResponse: googleapi.ServerResponse{ 7142 Header: res.Header, 7143 HTTPStatusCode: res.StatusCode, 7144 }, 7145 } 7146 target := &ret 7147 if err := gensupport.DecodeResponse(target, res); err != nil { 7148 return nil, err 7149 } 7150 return ret, nil 7151 // { 7152 // "description": "Creates a new cloudschedulersource.", 7153 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudschedulersources", 7154 // "httpMethod": "POST", 7155 // "id": "run.namespaces.cloudschedulersources.create", 7156 // "parameterOrder": [ 7157 // "parent" 7158 // ], 7159 // "parameters": { 7160 // "parent": { 7161 // "description": "Required. The project ID or project number in which this cloudschedulersource should be created.", 7162 // "location": "path", 7163 // "pattern": "^namespaces/[^/]+$", 7164 // "required": true, 7165 // "type": "string" 7166 // } 7167 // }, 7168 // "path": "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudschedulersources", 7169 // "request": { 7170 // "$ref": "CloudSchedulerSource" 7171 // }, 7172 // "response": { 7173 // "$ref": "CloudSchedulerSource" 7174 // }, 7175 // "scopes": [ 7176 // "https://www.googleapis.com/auth/cloud-platform" 7177 // ] 7178 // } 7179 7180} 7181 7182// method id "run.namespaces.cloudschedulersources.delete": 7183 7184type NamespacesCloudschedulersourcesDeleteCall struct { 7185 s *APIService 7186 name string 7187 urlParams_ gensupport.URLParams 7188 ctx_ context.Context 7189 header_ http.Header 7190} 7191 7192// Delete: Rpc to delete a cloudschedulersource. 7193func (r *NamespacesCloudschedulersourcesService) Delete(name string) *NamespacesCloudschedulersourcesDeleteCall { 7194 c := &NamespacesCloudschedulersourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7195 c.name = name 7196 return c 7197} 7198 7199// ApiVersion sets the optional parameter "apiVersion": Cloud Run 7200// currently ignores this parameter. 7201func (c *NamespacesCloudschedulersourcesDeleteCall) ApiVersion(apiVersion string) *NamespacesCloudschedulersourcesDeleteCall { 7202 c.urlParams_.Set("apiVersion", apiVersion) 7203 return c 7204} 7205 7206// Kind sets the optional parameter "kind": Cloud Run currently ignores 7207// this parameter. 7208func (c *NamespacesCloudschedulersourcesDeleteCall) Kind(kind string) *NamespacesCloudschedulersourcesDeleteCall { 7209 c.urlParams_.Set("kind", kind) 7210 return c 7211} 7212 7213// PropagationPolicy sets the optional parameter "propagationPolicy": 7214// Specifies the propagation policy of delete. Cloud Run currently 7215// ignores this setting, and deletes in the background. Please see 7216// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 7217// for more information. 7218func (c *NamespacesCloudschedulersourcesDeleteCall) PropagationPolicy(propagationPolicy string) *NamespacesCloudschedulersourcesDeleteCall { 7219 c.urlParams_.Set("propagationPolicy", propagationPolicy) 7220 return c 7221} 7222 7223// Fields allows partial responses to be retrieved. See 7224// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7225// for more information. 7226func (c *NamespacesCloudschedulersourcesDeleteCall) Fields(s ...googleapi.Field) *NamespacesCloudschedulersourcesDeleteCall { 7227 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7228 return c 7229} 7230 7231// Context sets the context to be used in this call's Do method. Any 7232// pending HTTP request will be aborted if the provided context is 7233// canceled. 7234func (c *NamespacesCloudschedulersourcesDeleteCall) Context(ctx context.Context) *NamespacesCloudschedulersourcesDeleteCall { 7235 c.ctx_ = ctx 7236 return c 7237} 7238 7239// Header returns an http.Header that can be modified by the caller to 7240// add HTTP headers to the request. 7241func (c *NamespacesCloudschedulersourcesDeleteCall) Header() http.Header { 7242 if c.header_ == nil { 7243 c.header_ = make(http.Header) 7244 } 7245 return c.header_ 7246} 7247 7248func (c *NamespacesCloudschedulersourcesDeleteCall) doRequest(alt string) (*http.Response, error) { 7249 reqHeaders := make(http.Header) 7250 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7251 for k, v := range c.header_ { 7252 reqHeaders[k] = v 7253 } 7254 reqHeaders.Set("User-Agent", c.s.userAgent()) 7255 var body io.Reader = nil 7256 c.urlParams_.Set("alt", alt) 7257 c.urlParams_.Set("prettyPrint", "false") 7258 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+name}") 7259 urls += "?" + c.urlParams_.Encode() 7260 req, err := http.NewRequest("DELETE", urls, body) 7261 if err != nil { 7262 return nil, err 7263 } 7264 req.Header = reqHeaders 7265 googleapi.Expand(req.URL, map[string]string{ 7266 "name": c.name, 7267 }) 7268 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7269} 7270 7271// Do executes the "run.namespaces.cloudschedulersources.delete" call. 7272// Exactly one of *Empty or error will be non-nil. Any non-2xx status 7273// code is an error. Response headers are in either 7274// *Empty.ServerResponse.Header or (if a response was returned at all) 7275// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7276// check whether the returned error was because http.StatusNotModified 7277// was returned. 7278func (c *NamespacesCloudschedulersourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7279 gensupport.SetOptions(c.urlParams_, opts...) 7280 res, err := c.doRequest("json") 7281 if res != nil && res.StatusCode == http.StatusNotModified { 7282 if res.Body != nil { 7283 res.Body.Close() 7284 } 7285 return nil, &googleapi.Error{ 7286 Code: res.StatusCode, 7287 Header: res.Header, 7288 } 7289 } 7290 if err != nil { 7291 return nil, err 7292 } 7293 defer googleapi.CloseBody(res) 7294 if err := googleapi.CheckResponse(res); err != nil { 7295 return nil, err 7296 } 7297 ret := &Empty{ 7298 ServerResponse: googleapi.ServerResponse{ 7299 Header: res.Header, 7300 HTTPStatusCode: res.StatusCode, 7301 }, 7302 } 7303 target := &ret 7304 if err := gensupport.DecodeResponse(target, res); err != nil { 7305 return nil, err 7306 } 7307 return ret, nil 7308 // { 7309 // "description": "Rpc to delete a cloudschedulersource.", 7310 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudschedulersources/{cloudschedulersourcesId}", 7311 // "httpMethod": "DELETE", 7312 // "id": "run.namespaces.cloudschedulersources.delete", 7313 // "parameterOrder": [ 7314 // "name" 7315 // ], 7316 // "parameters": { 7317 // "apiVersion": { 7318 // "description": "Cloud Run currently ignores this parameter.", 7319 // "location": "query", 7320 // "type": "string" 7321 // }, 7322 // "kind": { 7323 // "description": "Cloud Run currently ignores this parameter.", 7324 // "location": "query", 7325 // "type": "string" 7326 // }, 7327 // "name": { 7328 // "description": "Required. The name of the cloudschedulersource being deleted. If needed, replace {namespace_id} with the project ID.", 7329 // "location": "path", 7330 // "pattern": "^namespaces/[^/]+/cloudschedulersources/[^/]+$", 7331 // "required": true, 7332 // "type": "string" 7333 // }, 7334 // "propagationPolicy": { 7335 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 7336 // "location": "query", 7337 // "type": "string" 7338 // } 7339 // }, 7340 // "path": "apis/events.cloud.google.com/v1alpha1/{+name}", 7341 // "response": { 7342 // "$ref": "Empty" 7343 // }, 7344 // "scopes": [ 7345 // "https://www.googleapis.com/auth/cloud-platform" 7346 // ] 7347 // } 7348 7349} 7350 7351// method id "run.namespaces.cloudschedulersources.get": 7352 7353type NamespacesCloudschedulersourcesGetCall struct { 7354 s *APIService 7355 name string 7356 urlParams_ gensupport.URLParams 7357 ifNoneMatch_ string 7358 ctx_ context.Context 7359 header_ http.Header 7360} 7361 7362// Get: Rpc to get information about a cloudschedulersource. 7363func (r *NamespacesCloudschedulersourcesService) Get(name string) *NamespacesCloudschedulersourcesGetCall { 7364 c := &NamespacesCloudschedulersourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7365 c.name = name 7366 return c 7367} 7368 7369// Fields allows partial responses to be retrieved. See 7370// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7371// for more information. 7372func (c *NamespacesCloudschedulersourcesGetCall) Fields(s ...googleapi.Field) *NamespacesCloudschedulersourcesGetCall { 7373 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7374 return c 7375} 7376 7377// IfNoneMatch sets the optional parameter which makes the operation 7378// fail if the object's ETag matches the given value. This is useful for 7379// getting updates only after the object has changed since the last 7380// request. Use googleapi.IsNotModified to check whether the response 7381// error from Do is the result of In-None-Match. 7382func (c *NamespacesCloudschedulersourcesGetCall) IfNoneMatch(entityTag string) *NamespacesCloudschedulersourcesGetCall { 7383 c.ifNoneMatch_ = entityTag 7384 return c 7385} 7386 7387// Context sets the context to be used in this call's Do method. Any 7388// pending HTTP request will be aborted if the provided context is 7389// canceled. 7390func (c *NamespacesCloudschedulersourcesGetCall) Context(ctx context.Context) *NamespacesCloudschedulersourcesGetCall { 7391 c.ctx_ = ctx 7392 return c 7393} 7394 7395// Header returns an http.Header that can be modified by the caller to 7396// add HTTP headers to the request. 7397func (c *NamespacesCloudschedulersourcesGetCall) Header() http.Header { 7398 if c.header_ == nil { 7399 c.header_ = make(http.Header) 7400 } 7401 return c.header_ 7402} 7403 7404func (c *NamespacesCloudschedulersourcesGetCall) doRequest(alt string) (*http.Response, error) { 7405 reqHeaders := make(http.Header) 7406 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7407 for k, v := range c.header_ { 7408 reqHeaders[k] = v 7409 } 7410 reqHeaders.Set("User-Agent", c.s.userAgent()) 7411 if c.ifNoneMatch_ != "" { 7412 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7413 } 7414 var body io.Reader = nil 7415 c.urlParams_.Set("alt", alt) 7416 c.urlParams_.Set("prettyPrint", "false") 7417 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+name}") 7418 urls += "?" + c.urlParams_.Encode() 7419 req, err := http.NewRequest("GET", urls, body) 7420 if err != nil { 7421 return nil, err 7422 } 7423 req.Header = reqHeaders 7424 googleapi.Expand(req.URL, map[string]string{ 7425 "name": c.name, 7426 }) 7427 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7428} 7429 7430// Do executes the "run.namespaces.cloudschedulersources.get" call. 7431// Exactly one of *CloudSchedulerSource or error will be non-nil. Any 7432// non-2xx status code is an error. Response headers are in either 7433// *CloudSchedulerSource.ServerResponse.Header or (if a response was 7434// returned at all) in error.(*googleapi.Error).Header. Use 7435// googleapi.IsNotModified to check whether the returned error was 7436// because http.StatusNotModified was returned. 7437func (c *NamespacesCloudschedulersourcesGetCall) Do(opts ...googleapi.CallOption) (*CloudSchedulerSource, error) { 7438 gensupport.SetOptions(c.urlParams_, opts...) 7439 res, err := c.doRequest("json") 7440 if res != nil && res.StatusCode == http.StatusNotModified { 7441 if res.Body != nil { 7442 res.Body.Close() 7443 } 7444 return nil, &googleapi.Error{ 7445 Code: res.StatusCode, 7446 Header: res.Header, 7447 } 7448 } 7449 if err != nil { 7450 return nil, err 7451 } 7452 defer googleapi.CloseBody(res) 7453 if err := googleapi.CheckResponse(res); err != nil { 7454 return nil, err 7455 } 7456 ret := &CloudSchedulerSource{ 7457 ServerResponse: googleapi.ServerResponse{ 7458 Header: res.Header, 7459 HTTPStatusCode: res.StatusCode, 7460 }, 7461 } 7462 target := &ret 7463 if err := gensupport.DecodeResponse(target, res); err != nil { 7464 return nil, err 7465 } 7466 return ret, nil 7467 // { 7468 // "description": "Rpc to get information about a cloudschedulersource.", 7469 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudschedulersources/{cloudschedulersourcesId}", 7470 // "httpMethod": "GET", 7471 // "id": "run.namespaces.cloudschedulersources.get", 7472 // "parameterOrder": [ 7473 // "name" 7474 // ], 7475 // "parameters": { 7476 // "name": { 7477 // "description": "Required. The name of the cloudschedulersource being retrieved. If needed, replace {namespace_id} with the project ID.", 7478 // "location": "path", 7479 // "pattern": "^namespaces/[^/]+/cloudschedulersources/[^/]+$", 7480 // "required": true, 7481 // "type": "string" 7482 // } 7483 // }, 7484 // "path": "apis/events.cloud.google.com/v1alpha1/{+name}", 7485 // "response": { 7486 // "$ref": "CloudSchedulerSource" 7487 // }, 7488 // "scopes": [ 7489 // "https://www.googleapis.com/auth/cloud-platform" 7490 // ] 7491 // } 7492 7493} 7494 7495// method id "run.namespaces.cloudschedulersources.list": 7496 7497type NamespacesCloudschedulersourcesListCall struct { 7498 s *APIService 7499 parent string 7500 urlParams_ gensupport.URLParams 7501 ifNoneMatch_ string 7502 ctx_ context.Context 7503 header_ http.Header 7504} 7505 7506// List: Rpc to list cloudschedulersources. 7507func (r *NamespacesCloudschedulersourcesService) List(parent string) *NamespacesCloudschedulersourcesListCall { 7508 c := &NamespacesCloudschedulersourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7509 c.parent = parent 7510 return c 7511} 7512 7513// Continue sets the optional parameter "continue": Optional encoded 7514// string to continue paging. 7515func (c *NamespacesCloudschedulersourcesListCall) Continue(continue_ string) *NamespacesCloudschedulersourcesListCall { 7516 c.urlParams_.Set("continue", continue_) 7517 return c 7518} 7519 7520// FieldSelector sets the optional parameter "fieldSelector": Allows to 7521// filter resources based on a specific value for a field name. Send 7522// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 7523// currently used by Cloud Run. 7524func (c *NamespacesCloudschedulersourcesListCall) FieldSelector(fieldSelector string) *NamespacesCloudschedulersourcesListCall { 7525 c.urlParams_.Set("fieldSelector", fieldSelector) 7526 return c 7527} 7528 7529// IncludeUninitialized sets the optional parameter 7530// "includeUninitialized": Not currently used by Cloud Run. 7531func (c *NamespacesCloudschedulersourcesListCall) IncludeUninitialized(includeUninitialized bool) *NamespacesCloudschedulersourcesListCall { 7532 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 7533 return c 7534} 7535 7536// LabelSelector sets the optional parameter "labelSelector": Allows to 7537// filter resources based on a label. Supported operations are =, !=, 7538// exists, in, and notIn. 7539func (c *NamespacesCloudschedulersourcesListCall) LabelSelector(labelSelector string) *NamespacesCloudschedulersourcesListCall { 7540 c.urlParams_.Set("labelSelector", labelSelector) 7541 return c 7542} 7543 7544// Limit sets the optional parameter "limit": The maximum number of 7545// records that should be returned. 7546func (c *NamespacesCloudschedulersourcesListCall) Limit(limit int64) *NamespacesCloudschedulersourcesListCall { 7547 c.urlParams_.Set("limit", fmt.Sprint(limit)) 7548 return c 7549} 7550 7551// ResourceVersion sets the optional parameter "resourceVersion": The 7552// baseline resource version from which the list or watch operation 7553// should start. Not currently used by Cloud Run. 7554func (c *NamespacesCloudschedulersourcesListCall) ResourceVersion(resourceVersion string) *NamespacesCloudschedulersourcesListCall { 7555 c.urlParams_.Set("resourceVersion", resourceVersion) 7556 return c 7557} 7558 7559// Watch sets the optional parameter "watch": Flag that indicates that 7560// the client expects to watch this resource as well. Not currently used 7561// by Cloud Run. 7562func (c *NamespacesCloudschedulersourcesListCall) Watch(watch bool) *NamespacesCloudschedulersourcesListCall { 7563 c.urlParams_.Set("watch", fmt.Sprint(watch)) 7564 return c 7565} 7566 7567// Fields allows partial responses to be retrieved. See 7568// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7569// for more information. 7570func (c *NamespacesCloudschedulersourcesListCall) Fields(s ...googleapi.Field) *NamespacesCloudschedulersourcesListCall { 7571 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7572 return c 7573} 7574 7575// IfNoneMatch sets the optional parameter which makes the operation 7576// fail if the object's ETag matches the given value. This is useful for 7577// getting updates only after the object has changed since the last 7578// request. Use googleapi.IsNotModified to check whether the response 7579// error from Do is the result of In-None-Match. 7580func (c *NamespacesCloudschedulersourcesListCall) IfNoneMatch(entityTag string) *NamespacesCloudschedulersourcesListCall { 7581 c.ifNoneMatch_ = entityTag 7582 return c 7583} 7584 7585// Context sets the context to be used in this call's Do method. Any 7586// pending HTTP request will be aborted if the provided context is 7587// canceled. 7588func (c *NamespacesCloudschedulersourcesListCall) Context(ctx context.Context) *NamespacesCloudschedulersourcesListCall { 7589 c.ctx_ = ctx 7590 return c 7591} 7592 7593// Header returns an http.Header that can be modified by the caller to 7594// add HTTP headers to the request. 7595func (c *NamespacesCloudschedulersourcesListCall) Header() http.Header { 7596 if c.header_ == nil { 7597 c.header_ = make(http.Header) 7598 } 7599 return c.header_ 7600} 7601 7602func (c *NamespacesCloudschedulersourcesListCall) doRequest(alt string) (*http.Response, error) { 7603 reqHeaders := make(http.Header) 7604 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7605 for k, v := range c.header_ { 7606 reqHeaders[k] = v 7607 } 7608 reqHeaders.Set("User-Agent", c.s.userAgent()) 7609 if c.ifNoneMatch_ != "" { 7610 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7611 } 7612 var body io.Reader = nil 7613 c.urlParams_.Set("alt", alt) 7614 c.urlParams_.Set("prettyPrint", "false") 7615 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudschedulersources") 7616 urls += "?" + c.urlParams_.Encode() 7617 req, err := http.NewRequest("GET", urls, body) 7618 if err != nil { 7619 return nil, err 7620 } 7621 req.Header = reqHeaders 7622 googleapi.Expand(req.URL, map[string]string{ 7623 "parent": c.parent, 7624 }) 7625 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7626} 7627 7628// Do executes the "run.namespaces.cloudschedulersources.list" call. 7629// Exactly one of *ListCloudSchedulerSourcesResponse or error will be 7630// non-nil. Any non-2xx status code is an error. Response headers are in 7631// either *ListCloudSchedulerSourcesResponse.ServerResponse.Header or 7632// (if a response was returned at all) in 7633// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7634// whether the returned error was because http.StatusNotModified was 7635// returned. 7636func (c *NamespacesCloudschedulersourcesListCall) Do(opts ...googleapi.CallOption) (*ListCloudSchedulerSourcesResponse, error) { 7637 gensupport.SetOptions(c.urlParams_, opts...) 7638 res, err := c.doRequest("json") 7639 if res != nil && res.StatusCode == http.StatusNotModified { 7640 if res.Body != nil { 7641 res.Body.Close() 7642 } 7643 return nil, &googleapi.Error{ 7644 Code: res.StatusCode, 7645 Header: res.Header, 7646 } 7647 } 7648 if err != nil { 7649 return nil, err 7650 } 7651 defer googleapi.CloseBody(res) 7652 if err := googleapi.CheckResponse(res); err != nil { 7653 return nil, err 7654 } 7655 ret := &ListCloudSchedulerSourcesResponse{ 7656 ServerResponse: googleapi.ServerResponse{ 7657 Header: res.Header, 7658 HTTPStatusCode: res.StatusCode, 7659 }, 7660 } 7661 target := &ret 7662 if err := gensupport.DecodeResponse(target, res); err != nil { 7663 return nil, err 7664 } 7665 return ret, nil 7666 // { 7667 // "description": "Rpc to list cloudschedulersources.", 7668 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudschedulersources", 7669 // "httpMethod": "GET", 7670 // "id": "run.namespaces.cloudschedulersources.list", 7671 // "parameterOrder": [ 7672 // "parent" 7673 // ], 7674 // "parameters": { 7675 // "continue": { 7676 // "description": "Optional encoded string to continue paging.", 7677 // "location": "query", 7678 // "type": "string" 7679 // }, 7680 // "fieldSelector": { 7681 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 7682 // "location": "query", 7683 // "type": "string" 7684 // }, 7685 // "includeUninitialized": { 7686 // "description": "Not currently used by Cloud Run.", 7687 // "location": "query", 7688 // "type": "boolean" 7689 // }, 7690 // "labelSelector": { 7691 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 7692 // "location": "query", 7693 // "type": "string" 7694 // }, 7695 // "limit": { 7696 // "description": "The maximum number of records that should be returned.", 7697 // "format": "int32", 7698 // "location": "query", 7699 // "type": "integer" 7700 // }, 7701 // "parent": { 7702 // "description": "Required. The project ID or project number from which the cloudschedulersources should be listed.", 7703 // "location": "path", 7704 // "pattern": "^namespaces/[^/]+$", 7705 // "required": true, 7706 // "type": "string" 7707 // }, 7708 // "resourceVersion": { 7709 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 7710 // "location": "query", 7711 // "type": "string" 7712 // }, 7713 // "watch": { 7714 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 7715 // "location": "query", 7716 // "type": "boolean" 7717 // } 7718 // }, 7719 // "path": "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudschedulersources", 7720 // "response": { 7721 // "$ref": "ListCloudSchedulerSourcesResponse" 7722 // }, 7723 // "scopes": [ 7724 // "https://www.googleapis.com/auth/cloud-platform" 7725 // ] 7726 // } 7727 7728} 7729 7730// method id "run.namespaces.cloudschedulersources.replaceCloudSchedulerSource": 7731 7732type NamespacesCloudschedulersourcesReplaceCloudSchedulerSourceCall struct { 7733 s *APIService 7734 name string 7735 cloudschedulersource *CloudSchedulerSource 7736 urlParams_ gensupport.URLParams 7737 ctx_ context.Context 7738 header_ http.Header 7739} 7740 7741// ReplaceCloudSchedulerSource: Rpc to replace a cloudschedulersource. 7742// Only the spec and metadata labels and annotations are modifiable. 7743// After the Update request, Cloud Run will work to make the 'status' 7744// match the requested 'spec'. May provide metadata.resourceVersion to 7745// enforce update from last read for optimistic concurrency control. 7746func (r *NamespacesCloudschedulersourcesService) ReplaceCloudSchedulerSource(name string, cloudschedulersource *CloudSchedulerSource) *NamespacesCloudschedulersourcesReplaceCloudSchedulerSourceCall { 7747 c := &NamespacesCloudschedulersourcesReplaceCloudSchedulerSourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7748 c.name = name 7749 c.cloudschedulersource = cloudschedulersource 7750 return c 7751} 7752 7753// Fields allows partial responses to be retrieved. See 7754// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7755// for more information. 7756func (c *NamespacesCloudschedulersourcesReplaceCloudSchedulerSourceCall) Fields(s ...googleapi.Field) *NamespacesCloudschedulersourcesReplaceCloudSchedulerSourceCall { 7757 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7758 return c 7759} 7760 7761// Context sets the context to be used in this call's Do method. Any 7762// pending HTTP request will be aborted if the provided context is 7763// canceled. 7764func (c *NamespacesCloudschedulersourcesReplaceCloudSchedulerSourceCall) Context(ctx context.Context) *NamespacesCloudschedulersourcesReplaceCloudSchedulerSourceCall { 7765 c.ctx_ = ctx 7766 return c 7767} 7768 7769// Header returns an http.Header that can be modified by the caller to 7770// add HTTP headers to the request. 7771func (c *NamespacesCloudschedulersourcesReplaceCloudSchedulerSourceCall) Header() http.Header { 7772 if c.header_ == nil { 7773 c.header_ = make(http.Header) 7774 } 7775 return c.header_ 7776} 7777 7778func (c *NamespacesCloudschedulersourcesReplaceCloudSchedulerSourceCall) doRequest(alt string) (*http.Response, error) { 7779 reqHeaders := make(http.Header) 7780 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7781 for k, v := range c.header_ { 7782 reqHeaders[k] = v 7783 } 7784 reqHeaders.Set("User-Agent", c.s.userAgent()) 7785 var body io.Reader = nil 7786 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudschedulersource) 7787 if err != nil { 7788 return nil, err 7789 } 7790 reqHeaders.Set("Content-Type", "application/json") 7791 c.urlParams_.Set("alt", alt) 7792 c.urlParams_.Set("prettyPrint", "false") 7793 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+name}") 7794 urls += "?" + c.urlParams_.Encode() 7795 req, err := http.NewRequest("PUT", urls, body) 7796 if err != nil { 7797 return nil, err 7798 } 7799 req.Header = reqHeaders 7800 googleapi.Expand(req.URL, map[string]string{ 7801 "name": c.name, 7802 }) 7803 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7804} 7805 7806// Do executes the "run.namespaces.cloudschedulersources.replaceCloudSchedulerSource" call. 7807// Exactly one of *CloudSchedulerSource or error will be non-nil. Any 7808// non-2xx status code is an error. Response headers are in either 7809// *CloudSchedulerSource.ServerResponse.Header or (if a response was 7810// returned at all) in error.(*googleapi.Error).Header. Use 7811// googleapi.IsNotModified to check whether the returned error was 7812// because http.StatusNotModified was returned. 7813func (c *NamespacesCloudschedulersourcesReplaceCloudSchedulerSourceCall) Do(opts ...googleapi.CallOption) (*CloudSchedulerSource, error) { 7814 gensupport.SetOptions(c.urlParams_, opts...) 7815 res, err := c.doRequest("json") 7816 if res != nil && res.StatusCode == http.StatusNotModified { 7817 if res.Body != nil { 7818 res.Body.Close() 7819 } 7820 return nil, &googleapi.Error{ 7821 Code: res.StatusCode, 7822 Header: res.Header, 7823 } 7824 } 7825 if err != nil { 7826 return nil, err 7827 } 7828 defer googleapi.CloseBody(res) 7829 if err := googleapi.CheckResponse(res); err != nil { 7830 return nil, err 7831 } 7832 ret := &CloudSchedulerSource{ 7833 ServerResponse: googleapi.ServerResponse{ 7834 Header: res.Header, 7835 HTTPStatusCode: res.StatusCode, 7836 }, 7837 } 7838 target := &ret 7839 if err := gensupport.DecodeResponse(target, res); err != nil { 7840 return nil, err 7841 } 7842 return ret, nil 7843 // { 7844 // "description": "Rpc to replace a cloudschedulersource. Only the spec and metadata labels and annotations are modifiable. After the Update request, Cloud Run will work to make the 'status' match the requested 'spec'. May provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.", 7845 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudschedulersources/{cloudschedulersourcesId}", 7846 // "httpMethod": "PUT", 7847 // "id": "run.namespaces.cloudschedulersources.replaceCloudSchedulerSource", 7848 // "parameterOrder": [ 7849 // "name" 7850 // ], 7851 // "parameters": { 7852 // "name": { 7853 // "description": "Required. The name of the cloudschedulersource being retrieved. If needed, replace {namespace_id} with the project ID.", 7854 // "location": "path", 7855 // "pattern": "^namespaces/[^/]+/cloudschedulersources/[^/]+$", 7856 // "required": true, 7857 // "type": "string" 7858 // } 7859 // }, 7860 // "path": "apis/events.cloud.google.com/v1alpha1/{+name}", 7861 // "request": { 7862 // "$ref": "CloudSchedulerSource" 7863 // }, 7864 // "response": { 7865 // "$ref": "CloudSchedulerSource" 7866 // }, 7867 // "scopes": [ 7868 // "https://www.googleapis.com/auth/cloud-platform" 7869 // ] 7870 // } 7871 7872} 7873 7874// method id "run.namespaces.cloudstoragesources.create": 7875 7876type NamespacesCloudstoragesourcesCreateCall struct { 7877 s *APIService 7878 parent string 7879 cloudstoragesource *CloudStorageSource 7880 urlParams_ gensupport.URLParams 7881 ctx_ context.Context 7882 header_ http.Header 7883} 7884 7885// Create: Creates a new cloudstoragesource. 7886func (r *NamespacesCloudstoragesourcesService) Create(parent string, cloudstoragesource *CloudStorageSource) *NamespacesCloudstoragesourcesCreateCall { 7887 c := &NamespacesCloudstoragesourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7888 c.parent = parent 7889 c.cloudstoragesource = cloudstoragesource 7890 return c 7891} 7892 7893// Fields allows partial responses to be retrieved. See 7894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7895// for more information. 7896func (c *NamespacesCloudstoragesourcesCreateCall) Fields(s ...googleapi.Field) *NamespacesCloudstoragesourcesCreateCall { 7897 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7898 return c 7899} 7900 7901// Context sets the context to be used in this call's Do method. Any 7902// pending HTTP request will be aborted if the provided context is 7903// canceled. 7904func (c *NamespacesCloudstoragesourcesCreateCall) Context(ctx context.Context) *NamespacesCloudstoragesourcesCreateCall { 7905 c.ctx_ = ctx 7906 return c 7907} 7908 7909// Header returns an http.Header that can be modified by the caller to 7910// add HTTP headers to the request. 7911func (c *NamespacesCloudstoragesourcesCreateCall) Header() http.Header { 7912 if c.header_ == nil { 7913 c.header_ = make(http.Header) 7914 } 7915 return c.header_ 7916} 7917 7918func (c *NamespacesCloudstoragesourcesCreateCall) doRequest(alt string) (*http.Response, error) { 7919 reqHeaders := make(http.Header) 7920 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7921 for k, v := range c.header_ { 7922 reqHeaders[k] = v 7923 } 7924 reqHeaders.Set("User-Agent", c.s.userAgent()) 7925 var body io.Reader = nil 7926 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudstoragesource) 7927 if err != nil { 7928 return nil, err 7929 } 7930 reqHeaders.Set("Content-Type", "application/json") 7931 c.urlParams_.Set("alt", alt) 7932 c.urlParams_.Set("prettyPrint", "false") 7933 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudstoragesources") 7934 urls += "?" + c.urlParams_.Encode() 7935 req, err := http.NewRequest("POST", urls, body) 7936 if err != nil { 7937 return nil, err 7938 } 7939 req.Header = reqHeaders 7940 googleapi.Expand(req.URL, map[string]string{ 7941 "parent": c.parent, 7942 }) 7943 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7944} 7945 7946// Do executes the "run.namespaces.cloudstoragesources.create" call. 7947// Exactly one of *CloudStorageSource or error will be non-nil. Any 7948// non-2xx status code is an error. Response headers are in either 7949// *CloudStorageSource.ServerResponse.Header or (if a response was 7950// returned at all) in error.(*googleapi.Error).Header. Use 7951// googleapi.IsNotModified to check whether the returned error was 7952// because http.StatusNotModified was returned. 7953func (c *NamespacesCloudstoragesourcesCreateCall) Do(opts ...googleapi.CallOption) (*CloudStorageSource, error) { 7954 gensupport.SetOptions(c.urlParams_, opts...) 7955 res, err := c.doRequest("json") 7956 if res != nil && res.StatusCode == http.StatusNotModified { 7957 if res.Body != nil { 7958 res.Body.Close() 7959 } 7960 return nil, &googleapi.Error{ 7961 Code: res.StatusCode, 7962 Header: res.Header, 7963 } 7964 } 7965 if err != nil { 7966 return nil, err 7967 } 7968 defer googleapi.CloseBody(res) 7969 if err := googleapi.CheckResponse(res); err != nil { 7970 return nil, err 7971 } 7972 ret := &CloudStorageSource{ 7973 ServerResponse: googleapi.ServerResponse{ 7974 Header: res.Header, 7975 HTTPStatusCode: res.StatusCode, 7976 }, 7977 } 7978 target := &ret 7979 if err := gensupport.DecodeResponse(target, res); err != nil { 7980 return nil, err 7981 } 7982 return ret, nil 7983 // { 7984 // "description": "Creates a new cloudstoragesource.", 7985 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudstoragesources", 7986 // "httpMethod": "POST", 7987 // "id": "run.namespaces.cloudstoragesources.create", 7988 // "parameterOrder": [ 7989 // "parent" 7990 // ], 7991 // "parameters": { 7992 // "parent": { 7993 // "description": "Required. The project ID or project number in which this cloudstoragesource should be created.", 7994 // "location": "path", 7995 // "pattern": "^namespaces/[^/]+$", 7996 // "required": true, 7997 // "type": "string" 7998 // } 7999 // }, 8000 // "path": "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudstoragesources", 8001 // "request": { 8002 // "$ref": "CloudStorageSource" 8003 // }, 8004 // "response": { 8005 // "$ref": "CloudStorageSource" 8006 // }, 8007 // "scopes": [ 8008 // "https://www.googleapis.com/auth/cloud-platform" 8009 // ] 8010 // } 8011 8012} 8013 8014// method id "run.namespaces.cloudstoragesources.delete": 8015 8016type NamespacesCloudstoragesourcesDeleteCall struct { 8017 s *APIService 8018 name string 8019 urlParams_ gensupport.URLParams 8020 ctx_ context.Context 8021 header_ http.Header 8022} 8023 8024// Delete: Rpc to delete a cloudstoragesource. 8025func (r *NamespacesCloudstoragesourcesService) Delete(name string) *NamespacesCloudstoragesourcesDeleteCall { 8026 c := &NamespacesCloudstoragesourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8027 c.name = name 8028 return c 8029} 8030 8031// ApiVersion sets the optional parameter "apiVersion": Cloud Run 8032// currently ignores this parameter. 8033func (c *NamespacesCloudstoragesourcesDeleteCall) ApiVersion(apiVersion string) *NamespacesCloudstoragesourcesDeleteCall { 8034 c.urlParams_.Set("apiVersion", apiVersion) 8035 return c 8036} 8037 8038// Kind sets the optional parameter "kind": Cloud Run currently ignores 8039// this parameter. 8040func (c *NamespacesCloudstoragesourcesDeleteCall) Kind(kind string) *NamespacesCloudstoragesourcesDeleteCall { 8041 c.urlParams_.Set("kind", kind) 8042 return c 8043} 8044 8045// PropagationPolicy sets the optional parameter "propagationPolicy": 8046// Specifies the propagation policy of delete. Cloud Run currently 8047// ignores this setting, and deletes in the background. Please see 8048// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 8049// for more information. 8050func (c *NamespacesCloudstoragesourcesDeleteCall) PropagationPolicy(propagationPolicy string) *NamespacesCloudstoragesourcesDeleteCall { 8051 c.urlParams_.Set("propagationPolicy", propagationPolicy) 8052 return c 8053} 8054 8055// Fields allows partial responses to be retrieved. See 8056// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8057// for more information. 8058func (c *NamespacesCloudstoragesourcesDeleteCall) Fields(s ...googleapi.Field) *NamespacesCloudstoragesourcesDeleteCall { 8059 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8060 return c 8061} 8062 8063// Context sets the context to be used in this call's Do method. Any 8064// pending HTTP request will be aborted if the provided context is 8065// canceled. 8066func (c *NamespacesCloudstoragesourcesDeleteCall) Context(ctx context.Context) *NamespacesCloudstoragesourcesDeleteCall { 8067 c.ctx_ = ctx 8068 return c 8069} 8070 8071// Header returns an http.Header that can be modified by the caller to 8072// add HTTP headers to the request. 8073func (c *NamespacesCloudstoragesourcesDeleteCall) Header() http.Header { 8074 if c.header_ == nil { 8075 c.header_ = make(http.Header) 8076 } 8077 return c.header_ 8078} 8079 8080func (c *NamespacesCloudstoragesourcesDeleteCall) doRequest(alt string) (*http.Response, error) { 8081 reqHeaders := make(http.Header) 8082 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8083 for k, v := range c.header_ { 8084 reqHeaders[k] = v 8085 } 8086 reqHeaders.Set("User-Agent", c.s.userAgent()) 8087 var body io.Reader = nil 8088 c.urlParams_.Set("alt", alt) 8089 c.urlParams_.Set("prettyPrint", "false") 8090 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+name}") 8091 urls += "?" + c.urlParams_.Encode() 8092 req, err := http.NewRequest("DELETE", urls, body) 8093 if err != nil { 8094 return nil, err 8095 } 8096 req.Header = reqHeaders 8097 googleapi.Expand(req.URL, map[string]string{ 8098 "name": c.name, 8099 }) 8100 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8101} 8102 8103// Do executes the "run.namespaces.cloudstoragesources.delete" call. 8104// Exactly one of *Empty or error will be non-nil. Any non-2xx status 8105// code is an error. Response headers are in either 8106// *Empty.ServerResponse.Header or (if a response was returned at all) 8107// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8108// check whether the returned error was because http.StatusNotModified 8109// was returned. 8110func (c *NamespacesCloudstoragesourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8111 gensupport.SetOptions(c.urlParams_, opts...) 8112 res, err := c.doRequest("json") 8113 if res != nil && res.StatusCode == http.StatusNotModified { 8114 if res.Body != nil { 8115 res.Body.Close() 8116 } 8117 return nil, &googleapi.Error{ 8118 Code: res.StatusCode, 8119 Header: res.Header, 8120 } 8121 } 8122 if err != nil { 8123 return nil, err 8124 } 8125 defer googleapi.CloseBody(res) 8126 if err := googleapi.CheckResponse(res); err != nil { 8127 return nil, err 8128 } 8129 ret := &Empty{ 8130 ServerResponse: googleapi.ServerResponse{ 8131 Header: res.Header, 8132 HTTPStatusCode: res.StatusCode, 8133 }, 8134 } 8135 target := &ret 8136 if err := gensupport.DecodeResponse(target, res); err != nil { 8137 return nil, err 8138 } 8139 return ret, nil 8140 // { 8141 // "description": "Rpc to delete a cloudstoragesource.", 8142 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudstoragesources/{cloudstoragesourcesId}", 8143 // "httpMethod": "DELETE", 8144 // "id": "run.namespaces.cloudstoragesources.delete", 8145 // "parameterOrder": [ 8146 // "name" 8147 // ], 8148 // "parameters": { 8149 // "apiVersion": { 8150 // "description": "Cloud Run currently ignores this parameter.", 8151 // "location": "query", 8152 // "type": "string" 8153 // }, 8154 // "kind": { 8155 // "description": "Cloud Run currently ignores this parameter.", 8156 // "location": "query", 8157 // "type": "string" 8158 // }, 8159 // "name": { 8160 // "description": "Required. The name of the cloudstoragesource being deleted. If needed, replace {namespace_id} with the project ID.", 8161 // "location": "path", 8162 // "pattern": "^namespaces/[^/]+/cloudstoragesources/[^/]+$", 8163 // "required": true, 8164 // "type": "string" 8165 // }, 8166 // "propagationPolicy": { 8167 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 8168 // "location": "query", 8169 // "type": "string" 8170 // } 8171 // }, 8172 // "path": "apis/events.cloud.google.com/v1alpha1/{+name}", 8173 // "response": { 8174 // "$ref": "Empty" 8175 // }, 8176 // "scopes": [ 8177 // "https://www.googleapis.com/auth/cloud-platform" 8178 // ] 8179 // } 8180 8181} 8182 8183// method id "run.namespaces.cloudstoragesources.get": 8184 8185type NamespacesCloudstoragesourcesGetCall struct { 8186 s *APIService 8187 name string 8188 urlParams_ gensupport.URLParams 8189 ifNoneMatch_ string 8190 ctx_ context.Context 8191 header_ http.Header 8192} 8193 8194// Get: Rpc to get information about a cloudstoragesource. 8195func (r *NamespacesCloudstoragesourcesService) Get(name string) *NamespacesCloudstoragesourcesGetCall { 8196 c := &NamespacesCloudstoragesourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8197 c.name = name 8198 return c 8199} 8200 8201// Fields allows partial responses to be retrieved. See 8202// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8203// for more information. 8204func (c *NamespacesCloudstoragesourcesGetCall) Fields(s ...googleapi.Field) *NamespacesCloudstoragesourcesGetCall { 8205 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8206 return c 8207} 8208 8209// IfNoneMatch sets the optional parameter which makes the operation 8210// fail if the object's ETag matches the given value. This is useful for 8211// getting updates only after the object has changed since the last 8212// request. Use googleapi.IsNotModified to check whether the response 8213// error from Do is the result of In-None-Match. 8214func (c *NamespacesCloudstoragesourcesGetCall) IfNoneMatch(entityTag string) *NamespacesCloudstoragesourcesGetCall { 8215 c.ifNoneMatch_ = entityTag 8216 return c 8217} 8218 8219// Context sets the context to be used in this call's Do method. Any 8220// pending HTTP request will be aborted if the provided context is 8221// canceled. 8222func (c *NamespacesCloudstoragesourcesGetCall) Context(ctx context.Context) *NamespacesCloudstoragesourcesGetCall { 8223 c.ctx_ = ctx 8224 return c 8225} 8226 8227// Header returns an http.Header that can be modified by the caller to 8228// add HTTP headers to the request. 8229func (c *NamespacesCloudstoragesourcesGetCall) Header() http.Header { 8230 if c.header_ == nil { 8231 c.header_ = make(http.Header) 8232 } 8233 return c.header_ 8234} 8235 8236func (c *NamespacesCloudstoragesourcesGetCall) doRequest(alt string) (*http.Response, error) { 8237 reqHeaders := make(http.Header) 8238 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8239 for k, v := range c.header_ { 8240 reqHeaders[k] = v 8241 } 8242 reqHeaders.Set("User-Agent", c.s.userAgent()) 8243 if c.ifNoneMatch_ != "" { 8244 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8245 } 8246 var body io.Reader = nil 8247 c.urlParams_.Set("alt", alt) 8248 c.urlParams_.Set("prettyPrint", "false") 8249 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+name}") 8250 urls += "?" + c.urlParams_.Encode() 8251 req, err := http.NewRequest("GET", urls, body) 8252 if err != nil { 8253 return nil, err 8254 } 8255 req.Header = reqHeaders 8256 googleapi.Expand(req.URL, map[string]string{ 8257 "name": c.name, 8258 }) 8259 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8260} 8261 8262// Do executes the "run.namespaces.cloudstoragesources.get" call. 8263// Exactly one of *CloudStorageSource or error will be non-nil. Any 8264// non-2xx status code is an error. Response headers are in either 8265// *CloudStorageSource.ServerResponse.Header or (if a response was 8266// returned at all) in error.(*googleapi.Error).Header. Use 8267// googleapi.IsNotModified to check whether the returned error was 8268// because http.StatusNotModified was returned. 8269func (c *NamespacesCloudstoragesourcesGetCall) Do(opts ...googleapi.CallOption) (*CloudStorageSource, error) { 8270 gensupport.SetOptions(c.urlParams_, opts...) 8271 res, err := c.doRequest("json") 8272 if res != nil && res.StatusCode == http.StatusNotModified { 8273 if res.Body != nil { 8274 res.Body.Close() 8275 } 8276 return nil, &googleapi.Error{ 8277 Code: res.StatusCode, 8278 Header: res.Header, 8279 } 8280 } 8281 if err != nil { 8282 return nil, err 8283 } 8284 defer googleapi.CloseBody(res) 8285 if err := googleapi.CheckResponse(res); err != nil { 8286 return nil, err 8287 } 8288 ret := &CloudStorageSource{ 8289 ServerResponse: googleapi.ServerResponse{ 8290 Header: res.Header, 8291 HTTPStatusCode: res.StatusCode, 8292 }, 8293 } 8294 target := &ret 8295 if err := gensupport.DecodeResponse(target, res); err != nil { 8296 return nil, err 8297 } 8298 return ret, nil 8299 // { 8300 // "description": "Rpc to get information about a cloudstoragesource.", 8301 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudstoragesources/{cloudstoragesourcesId}", 8302 // "httpMethod": "GET", 8303 // "id": "run.namespaces.cloudstoragesources.get", 8304 // "parameterOrder": [ 8305 // "name" 8306 // ], 8307 // "parameters": { 8308 // "name": { 8309 // "description": "Required. The name of the cloudstoragesource being retrieved. If needed, replace {namespace_id} with the project ID.", 8310 // "location": "path", 8311 // "pattern": "^namespaces/[^/]+/cloudstoragesources/[^/]+$", 8312 // "required": true, 8313 // "type": "string" 8314 // } 8315 // }, 8316 // "path": "apis/events.cloud.google.com/v1alpha1/{+name}", 8317 // "response": { 8318 // "$ref": "CloudStorageSource" 8319 // }, 8320 // "scopes": [ 8321 // "https://www.googleapis.com/auth/cloud-platform" 8322 // ] 8323 // } 8324 8325} 8326 8327// method id "run.namespaces.cloudstoragesources.list": 8328 8329type NamespacesCloudstoragesourcesListCall struct { 8330 s *APIService 8331 parent string 8332 urlParams_ gensupport.URLParams 8333 ifNoneMatch_ string 8334 ctx_ context.Context 8335 header_ http.Header 8336} 8337 8338// List: Rpc to list cloudstoragesources. 8339func (r *NamespacesCloudstoragesourcesService) List(parent string) *NamespacesCloudstoragesourcesListCall { 8340 c := &NamespacesCloudstoragesourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8341 c.parent = parent 8342 return c 8343} 8344 8345// Continue sets the optional parameter "continue": Optional encoded 8346// string to continue paging. 8347func (c *NamespacesCloudstoragesourcesListCall) Continue(continue_ string) *NamespacesCloudstoragesourcesListCall { 8348 c.urlParams_.Set("continue", continue_) 8349 return c 8350} 8351 8352// FieldSelector sets the optional parameter "fieldSelector": Allows to 8353// filter resources based on a specific value for a field name. Send 8354// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 8355// currently used by Cloud Run. 8356func (c *NamespacesCloudstoragesourcesListCall) FieldSelector(fieldSelector string) *NamespacesCloudstoragesourcesListCall { 8357 c.urlParams_.Set("fieldSelector", fieldSelector) 8358 return c 8359} 8360 8361// IncludeUninitialized sets the optional parameter 8362// "includeUninitialized": Not currently used by Cloud Run. 8363func (c *NamespacesCloudstoragesourcesListCall) IncludeUninitialized(includeUninitialized bool) *NamespacesCloudstoragesourcesListCall { 8364 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 8365 return c 8366} 8367 8368// LabelSelector sets the optional parameter "labelSelector": Allows to 8369// filter resources based on a label. Supported operations are =, !=, 8370// exists, in, and notIn. 8371func (c *NamespacesCloudstoragesourcesListCall) LabelSelector(labelSelector string) *NamespacesCloudstoragesourcesListCall { 8372 c.urlParams_.Set("labelSelector", labelSelector) 8373 return c 8374} 8375 8376// Limit sets the optional parameter "limit": The maximum number of 8377// records that should be returned. 8378func (c *NamespacesCloudstoragesourcesListCall) Limit(limit int64) *NamespacesCloudstoragesourcesListCall { 8379 c.urlParams_.Set("limit", fmt.Sprint(limit)) 8380 return c 8381} 8382 8383// ResourceVersion sets the optional parameter "resourceVersion": The 8384// baseline resource version from which the list or watch operation 8385// should start. Not currently used by Cloud Run. 8386func (c *NamespacesCloudstoragesourcesListCall) ResourceVersion(resourceVersion string) *NamespacesCloudstoragesourcesListCall { 8387 c.urlParams_.Set("resourceVersion", resourceVersion) 8388 return c 8389} 8390 8391// Watch sets the optional parameter "watch": Flag that indicates that 8392// the client expects to watch this resource as well. Not currently used 8393// by Cloud Run. 8394func (c *NamespacesCloudstoragesourcesListCall) Watch(watch bool) *NamespacesCloudstoragesourcesListCall { 8395 c.urlParams_.Set("watch", fmt.Sprint(watch)) 8396 return c 8397} 8398 8399// Fields allows partial responses to be retrieved. See 8400// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8401// for more information. 8402func (c *NamespacesCloudstoragesourcesListCall) Fields(s ...googleapi.Field) *NamespacesCloudstoragesourcesListCall { 8403 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8404 return c 8405} 8406 8407// IfNoneMatch sets the optional parameter which makes the operation 8408// fail if the object's ETag matches the given value. This is useful for 8409// getting updates only after the object has changed since the last 8410// request. Use googleapi.IsNotModified to check whether the response 8411// error from Do is the result of In-None-Match. 8412func (c *NamespacesCloudstoragesourcesListCall) IfNoneMatch(entityTag string) *NamespacesCloudstoragesourcesListCall { 8413 c.ifNoneMatch_ = entityTag 8414 return c 8415} 8416 8417// Context sets the context to be used in this call's Do method. Any 8418// pending HTTP request will be aborted if the provided context is 8419// canceled. 8420func (c *NamespacesCloudstoragesourcesListCall) Context(ctx context.Context) *NamespacesCloudstoragesourcesListCall { 8421 c.ctx_ = ctx 8422 return c 8423} 8424 8425// Header returns an http.Header that can be modified by the caller to 8426// add HTTP headers to the request. 8427func (c *NamespacesCloudstoragesourcesListCall) Header() http.Header { 8428 if c.header_ == nil { 8429 c.header_ = make(http.Header) 8430 } 8431 return c.header_ 8432} 8433 8434func (c *NamespacesCloudstoragesourcesListCall) doRequest(alt string) (*http.Response, error) { 8435 reqHeaders := make(http.Header) 8436 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8437 for k, v := range c.header_ { 8438 reqHeaders[k] = v 8439 } 8440 reqHeaders.Set("User-Agent", c.s.userAgent()) 8441 if c.ifNoneMatch_ != "" { 8442 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8443 } 8444 var body io.Reader = nil 8445 c.urlParams_.Set("alt", alt) 8446 c.urlParams_.Set("prettyPrint", "false") 8447 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudstoragesources") 8448 urls += "?" + c.urlParams_.Encode() 8449 req, err := http.NewRequest("GET", urls, body) 8450 if err != nil { 8451 return nil, err 8452 } 8453 req.Header = reqHeaders 8454 googleapi.Expand(req.URL, map[string]string{ 8455 "parent": c.parent, 8456 }) 8457 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8458} 8459 8460// Do executes the "run.namespaces.cloudstoragesources.list" call. 8461// Exactly one of *ListCloudStorageSourcesResponse or error will be 8462// non-nil. Any non-2xx status code is an error. Response headers are in 8463// either *ListCloudStorageSourcesResponse.ServerResponse.Header or (if 8464// a response was returned at all) in error.(*googleapi.Error).Header. 8465// Use googleapi.IsNotModified to check whether the returned error was 8466// because http.StatusNotModified was returned. 8467func (c *NamespacesCloudstoragesourcesListCall) Do(opts ...googleapi.CallOption) (*ListCloudStorageSourcesResponse, error) { 8468 gensupport.SetOptions(c.urlParams_, opts...) 8469 res, err := c.doRequest("json") 8470 if res != nil && res.StatusCode == http.StatusNotModified { 8471 if res.Body != nil { 8472 res.Body.Close() 8473 } 8474 return nil, &googleapi.Error{ 8475 Code: res.StatusCode, 8476 Header: res.Header, 8477 } 8478 } 8479 if err != nil { 8480 return nil, err 8481 } 8482 defer googleapi.CloseBody(res) 8483 if err := googleapi.CheckResponse(res); err != nil { 8484 return nil, err 8485 } 8486 ret := &ListCloudStorageSourcesResponse{ 8487 ServerResponse: googleapi.ServerResponse{ 8488 Header: res.Header, 8489 HTTPStatusCode: res.StatusCode, 8490 }, 8491 } 8492 target := &ret 8493 if err := gensupport.DecodeResponse(target, res); err != nil { 8494 return nil, err 8495 } 8496 return ret, nil 8497 // { 8498 // "description": "Rpc to list cloudstoragesources.", 8499 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudstoragesources", 8500 // "httpMethod": "GET", 8501 // "id": "run.namespaces.cloudstoragesources.list", 8502 // "parameterOrder": [ 8503 // "parent" 8504 // ], 8505 // "parameters": { 8506 // "continue": { 8507 // "description": "Optional encoded string to continue paging.", 8508 // "location": "query", 8509 // "type": "string" 8510 // }, 8511 // "fieldSelector": { 8512 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 8513 // "location": "query", 8514 // "type": "string" 8515 // }, 8516 // "includeUninitialized": { 8517 // "description": "Not currently used by Cloud Run.", 8518 // "location": "query", 8519 // "type": "boolean" 8520 // }, 8521 // "labelSelector": { 8522 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 8523 // "location": "query", 8524 // "type": "string" 8525 // }, 8526 // "limit": { 8527 // "description": "The maximum number of records that should be returned.", 8528 // "format": "int32", 8529 // "location": "query", 8530 // "type": "integer" 8531 // }, 8532 // "parent": { 8533 // "description": "Required. The project ID or project number from which the cloudstoragesources should be listed.", 8534 // "location": "path", 8535 // "pattern": "^namespaces/[^/]+$", 8536 // "required": true, 8537 // "type": "string" 8538 // }, 8539 // "resourceVersion": { 8540 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 8541 // "location": "query", 8542 // "type": "string" 8543 // }, 8544 // "watch": { 8545 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 8546 // "location": "query", 8547 // "type": "boolean" 8548 // } 8549 // }, 8550 // "path": "apis/events.cloud.google.com/v1alpha1/{+parent}/cloudstoragesources", 8551 // "response": { 8552 // "$ref": "ListCloudStorageSourcesResponse" 8553 // }, 8554 // "scopes": [ 8555 // "https://www.googleapis.com/auth/cloud-platform" 8556 // ] 8557 // } 8558 8559} 8560 8561// method id "run.namespaces.cloudstoragesources.replaceCloudStorageSource": 8562 8563type NamespacesCloudstoragesourcesReplaceCloudStorageSourceCall struct { 8564 s *APIService 8565 name string 8566 cloudstoragesource *CloudStorageSource 8567 urlParams_ gensupport.URLParams 8568 ctx_ context.Context 8569 header_ http.Header 8570} 8571 8572// ReplaceCloudStorageSource: Rpc to replace a cloudstoragesource. Only 8573// the spec and metadata labels and annotations are modifiable. After 8574// the Update request, Cloud Run will work to make the 'status' match 8575// the requested 'spec'. May provide metadata.resourceVersion to enforce 8576// update from last read for optimistic concurrency control. 8577func (r *NamespacesCloudstoragesourcesService) ReplaceCloudStorageSource(name string, cloudstoragesource *CloudStorageSource) *NamespacesCloudstoragesourcesReplaceCloudStorageSourceCall { 8578 c := &NamespacesCloudstoragesourcesReplaceCloudStorageSourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8579 c.name = name 8580 c.cloudstoragesource = cloudstoragesource 8581 return c 8582} 8583 8584// Fields allows partial responses to be retrieved. See 8585// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8586// for more information. 8587func (c *NamespacesCloudstoragesourcesReplaceCloudStorageSourceCall) Fields(s ...googleapi.Field) *NamespacesCloudstoragesourcesReplaceCloudStorageSourceCall { 8588 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8589 return c 8590} 8591 8592// Context sets the context to be used in this call's Do method. Any 8593// pending HTTP request will be aborted if the provided context is 8594// canceled. 8595func (c *NamespacesCloudstoragesourcesReplaceCloudStorageSourceCall) Context(ctx context.Context) *NamespacesCloudstoragesourcesReplaceCloudStorageSourceCall { 8596 c.ctx_ = ctx 8597 return c 8598} 8599 8600// Header returns an http.Header that can be modified by the caller to 8601// add HTTP headers to the request. 8602func (c *NamespacesCloudstoragesourcesReplaceCloudStorageSourceCall) Header() http.Header { 8603 if c.header_ == nil { 8604 c.header_ = make(http.Header) 8605 } 8606 return c.header_ 8607} 8608 8609func (c *NamespacesCloudstoragesourcesReplaceCloudStorageSourceCall) doRequest(alt string) (*http.Response, error) { 8610 reqHeaders := make(http.Header) 8611 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8612 for k, v := range c.header_ { 8613 reqHeaders[k] = v 8614 } 8615 reqHeaders.Set("User-Agent", c.s.userAgent()) 8616 var body io.Reader = nil 8617 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudstoragesource) 8618 if err != nil { 8619 return nil, err 8620 } 8621 reqHeaders.Set("Content-Type", "application/json") 8622 c.urlParams_.Set("alt", alt) 8623 c.urlParams_.Set("prettyPrint", "false") 8624 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/events.cloud.google.com/v1alpha1/{+name}") 8625 urls += "?" + c.urlParams_.Encode() 8626 req, err := http.NewRequest("PUT", urls, body) 8627 if err != nil { 8628 return nil, err 8629 } 8630 req.Header = reqHeaders 8631 googleapi.Expand(req.URL, map[string]string{ 8632 "name": c.name, 8633 }) 8634 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8635} 8636 8637// Do executes the "run.namespaces.cloudstoragesources.replaceCloudStorageSource" call. 8638// Exactly one of *CloudStorageSource or error will be non-nil. Any 8639// non-2xx status code is an error. Response headers are in either 8640// *CloudStorageSource.ServerResponse.Header or (if a response was 8641// returned at all) in error.(*googleapi.Error).Header. Use 8642// googleapi.IsNotModified to check whether the returned error was 8643// because http.StatusNotModified was returned. 8644func (c *NamespacesCloudstoragesourcesReplaceCloudStorageSourceCall) Do(opts ...googleapi.CallOption) (*CloudStorageSource, error) { 8645 gensupport.SetOptions(c.urlParams_, opts...) 8646 res, err := c.doRequest("json") 8647 if res != nil && res.StatusCode == http.StatusNotModified { 8648 if res.Body != nil { 8649 res.Body.Close() 8650 } 8651 return nil, &googleapi.Error{ 8652 Code: res.StatusCode, 8653 Header: res.Header, 8654 } 8655 } 8656 if err != nil { 8657 return nil, err 8658 } 8659 defer googleapi.CloseBody(res) 8660 if err := googleapi.CheckResponse(res); err != nil { 8661 return nil, err 8662 } 8663 ret := &CloudStorageSource{ 8664 ServerResponse: googleapi.ServerResponse{ 8665 Header: res.Header, 8666 HTTPStatusCode: res.StatusCode, 8667 }, 8668 } 8669 target := &ret 8670 if err := gensupport.DecodeResponse(target, res); err != nil { 8671 return nil, err 8672 } 8673 return ret, nil 8674 // { 8675 // "description": "Rpc to replace a cloudstoragesource. Only the spec and metadata labels and annotations are modifiable. After the Update request, Cloud Run will work to make the 'status' match the requested 'spec'. May provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.", 8676 // "flatPath": "apis/events.cloud.google.com/v1alpha1/namespaces/{namespacesId}/cloudstoragesources/{cloudstoragesourcesId}", 8677 // "httpMethod": "PUT", 8678 // "id": "run.namespaces.cloudstoragesources.replaceCloudStorageSource", 8679 // "parameterOrder": [ 8680 // "name" 8681 // ], 8682 // "parameters": { 8683 // "name": { 8684 // "description": "Required. The name of the cloudstoragesource being retrieved. If needed, replace {namespace_id} with the project ID.", 8685 // "location": "path", 8686 // "pattern": "^namespaces/[^/]+/cloudstoragesources/[^/]+$", 8687 // "required": true, 8688 // "type": "string" 8689 // } 8690 // }, 8691 // "path": "apis/events.cloud.google.com/v1alpha1/{+name}", 8692 // "request": { 8693 // "$ref": "CloudStorageSource" 8694 // }, 8695 // "response": { 8696 // "$ref": "CloudStorageSource" 8697 // }, 8698 // "scopes": [ 8699 // "https://www.googleapis.com/auth/cloud-platform" 8700 // ] 8701 // } 8702 8703} 8704 8705// method id "run.namespaces.configurations.get": 8706 8707type NamespacesConfigurationsGetCall struct { 8708 s *APIService 8709 name string 8710 urlParams_ gensupport.URLParams 8711 ifNoneMatch_ string 8712 ctx_ context.Context 8713 header_ http.Header 8714} 8715 8716// Get: Rpc to get information about a configuration. 8717func (r *NamespacesConfigurationsService) Get(name string) *NamespacesConfigurationsGetCall { 8718 c := &NamespacesConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8719 c.name = name 8720 return c 8721} 8722 8723// Fields allows partial responses to be retrieved. See 8724// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8725// for more information. 8726func (c *NamespacesConfigurationsGetCall) Fields(s ...googleapi.Field) *NamespacesConfigurationsGetCall { 8727 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8728 return c 8729} 8730 8731// IfNoneMatch sets the optional parameter which makes the operation 8732// fail if the object's ETag matches the given value. This is useful for 8733// getting updates only after the object has changed since the last 8734// request. Use googleapi.IsNotModified to check whether the response 8735// error from Do is the result of In-None-Match. 8736func (c *NamespacesConfigurationsGetCall) IfNoneMatch(entityTag string) *NamespacesConfigurationsGetCall { 8737 c.ifNoneMatch_ = entityTag 8738 return c 8739} 8740 8741// Context sets the context to be used in this call's Do method. Any 8742// pending HTTP request will be aborted if the provided context is 8743// canceled. 8744func (c *NamespacesConfigurationsGetCall) Context(ctx context.Context) *NamespacesConfigurationsGetCall { 8745 c.ctx_ = ctx 8746 return c 8747} 8748 8749// Header returns an http.Header that can be modified by the caller to 8750// add HTTP headers to the request. 8751func (c *NamespacesConfigurationsGetCall) Header() http.Header { 8752 if c.header_ == nil { 8753 c.header_ = make(http.Header) 8754 } 8755 return c.header_ 8756} 8757 8758func (c *NamespacesConfigurationsGetCall) doRequest(alt string) (*http.Response, error) { 8759 reqHeaders := make(http.Header) 8760 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8761 for k, v := range c.header_ { 8762 reqHeaders[k] = v 8763 } 8764 reqHeaders.Set("User-Agent", c.s.userAgent()) 8765 if c.ifNoneMatch_ != "" { 8766 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8767 } 8768 var body io.Reader = nil 8769 c.urlParams_.Set("alt", alt) 8770 c.urlParams_.Set("prettyPrint", "false") 8771 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+name}") 8772 urls += "?" + c.urlParams_.Encode() 8773 req, err := http.NewRequest("GET", urls, body) 8774 if err != nil { 8775 return nil, err 8776 } 8777 req.Header = reqHeaders 8778 googleapi.Expand(req.URL, map[string]string{ 8779 "name": c.name, 8780 }) 8781 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8782} 8783 8784// Do executes the "run.namespaces.configurations.get" call. 8785// Exactly one of *Configuration or error will be non-nil. Any non-2xx 8786// status code is an error. Response headers are in either 8787// *Configuration.ServerResponse.Header or (if a response was returned 8788// at all) in error.(*googleapi.Error).Header. Use 8789// googleapi.IsNotModified to check whether the returned error was 8790// because http.StatusNotModified was returned. 8791func (c *NamespacesConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*Configuration, error) { 8792 gensupport.SetOptions(c.urlParams_, opts...) 8793 res, err := c.doRequest("json") 8794 if res != nil && res.StatusCode == http.StatusNotModified { 8795 if res.Body != nil { 8796 res.Body.Close() 8797 } 8798 return nil, &googleapi.Error{ 8799 Code: res.StatusCode, 8800 Header: res.Header, 8801 } 8802 } 8803 if err != nil { 8804 return nil, err 8805 } 8806 defer googleapi.CloseBody(res) 8807 if err := googleapi.CheckResponse(res); err != nil { 8808 return nil, err 8809 } 8810 ret := &Configuration{ 8811 ServerResponse: googleapi.ServerResponse{ 8812 Header: res.Header, 8813 HTTPStatusCode: res.StatusCode, 8814 }, 8815 } 8816 target := &ret 8817 if err := gensupport.DecodeResponse(target, res); err != nil { 8818 return nil, err 8819 } 8820 return ret, nil 8821 // { 8822 // "description": "Rpc to get information about a configuration.", 8823 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/configurations/{configurationsId}", 8824 // "httpMethod": "GET", 8825 // "id": "run.namespaces.configurations.get", 8826 // "parameterOrder": [ 8827 // "name" 8828 // ], 8829 // "parameters": { 8830 // "name": { 8831 // "description": "The name of the configuration being retrieved. If needed, replace {namespace_id} with the project ID.", 8832 // "location": "path", 8833 // "pattern": "^namespaces/[^/]+/configurations/[^/]+$", 8834 // "required": true, 8835 // "type": "string" 8836 // } 8837 // }, 8838 // "path": "apis/serving.knative.dev/v1alpha1/{+name}", 8839 // "response": { 8840 // "$ref": "Configuration" 8841 // }, 8842 // "scopes": [ 8843 // "https://www.googleapis.com/auth/cloud-platform" 8844 // ] 8845 // } 8846 8847} 8848 8849// method id "run.namespaces.configurations.list": 8850 8851type NamespacesConfigurationsListCall struct { 8852 s *APIService 8853 parent string 8854 urlParams_ gensupport.URLParams 8855 ifNoneMatch_ string 8856 ctx_ context.Context 8857 header_ http.Header 8858} 8859 8860// List: Rpc to list configurations. 8861func (r *NamespacesConfigurationsService) List(parent string) *NamespacesConfigurationsListCall { 8862 c := &NamespacesConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8863 c.parent = parent 8864 return c 8865} 8866 8867// Continue sets the optional parameter "continue": Optional encoded 8868// string to continue paging. 8869func (c *NamespacesConfigurationsListCall) Continue(continue_ string) *NamespacesConfigurationsListCall { 8870 c.urlParams_.Set("continue", continue_) 8871 return c 8872} 8873 8874// FieldSelector sets the optional parameter "fieldSelector": Allows to 8875// filter resources based on a specific value for a field name. Send 8876// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 8877// currently used by Cloud Run. 8878func (c *NamespacesConfigurationsListCall) FieldSelector(fieldSelector string) *NamespacesConfigurationsListCall { 8879 c.urlParams_.Set("fieldSelector", fieldSelector) 8880 return c 8881} 8882 8883// IncludeUninitialized sets the optional parameter 8884// "includeUninitialized": Not currently used by Cloud Run. 8885func (c *NamespacesConfigurationsListCall) IncludeUninitialized(includeUninitialized bool) *NamespacesConfigurationsListCall { 8886 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 8887 return c 8888} 8889 8890// LabelSelector sets the optional parameter "labelSelector": Allows to 8891// filter resources based on a label. Supported operations are =, !=, 8892// exists, in, and notIn. 8893func (c *NamespacesConfigurationsListCall) LabelSelector(labelSelector string) *NamespacesConfigurationsListCall { 8894 c.urlParams_.Set("labelSelector", labelSelector) 8895 return c 8896} 8897 8898// Limit sets the optional parameter "limit": The maximum number of 8899// records that should be returned. 8900func (c *NamespacesConfigurationsListCall) Limit(limit int64) *NamespacesConfigurationsListCall { 8901 c.urlParams_.Set("limit", fmt.Sprint(limit)) 8902 return c 8903} 8904 8905// ResourceVersion sets the optional parameter "resourceVersion": The 8906// baseline resource version from which the list or watch operation 8907// should start. Not currently used by Cloud Run. 8908func (c *NamespacesConfigurationsListCall) ResourceVersion(resourceVersion string) *NamespacesConfigurationsListCall { 8909 c.urlParams_.Set("resourceVersion", resourceVersion) 8910 return c 8911} 8912 8913// Watch sets the optional parameter "watch": Flag that indicates that 8914// the client expects to watch this resource as well. Not currently used 8915// by Cloud Run. 8916func (c *NamespacesConfigurationsListCall) Watch(watch bool) *NamespacesConfigurationsListCall { 8917 c.urlParams_.Set("watch", fmt.Sprint(watch)) 8918 return c 8919} 8920 8921// Fields allows partial responses to be retrieved. See 8922// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8923// for more information. 8924func (c *NamespacesConfigurationsListCall) Fields(s ...googleapi.Field) *NamespacesConfigurationsListCall { 8925 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8926 return c 8927} 8928 8929// IfNoneMatch sets the optional parameter which makes the operation 8930// fail if the object's ETag matches the given value. This is useful for 8931// getting updates only after the object has changed since the last 8932// request. Use googleapi.IsNotModified to check whether the response 8933// error from Do is the result of In-None-Match. 8934func (c *NamespacesConfigurationsListCall) IfNoneMatch(entityTag string) *NamespacesConfigurationsListCall { 8935 c.ifNoneMatch_ = entityTag 8936 return c 8937} 8938 8939// Context sets the context to be used in this call's Do method. Any 8940// pending HTTP request will be aborted if the provided context is 8941// canceled. 8942func (c *NamespacesConfigurationsListCall) Context(ctx context.Context) *NamespacesConfigurationsListCall { 8943 c.ctx_ = ctx 8944 return c 8945} 8946 8947// Header returns an http.Header that can be modified by the caller to 8948// add HTTP headers to the request. 8949func (c *NamespacesConfigurationsListCall) Header() http.Header { 8950 if c.header_ == nil { 8951 c.header_ = make(http.Header) 8952 } 8953 return c.header_ 8954} 8955 8956func (c *NamespacesConfigurationsListCall) doRequest(alt string) (*http.Response, error) { 8957 reqHeaders := make(http.Header) 8958 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8959 for k, v := range c.header_ { 8960 reqHeaders[k] = v 8961 } 8962 reqHeaders.Set("User-Agent", c.s.userAgent()) 8963 if c.ifNoneMatch_ != "" { 8964 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8965 } 8966 var body io.Reader = nil 8967 c.urlParams_.Set("alt", alt) 8968 c.urlParams_.Set("prettyPrint", "false") 8969 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+parent}/configurations") 8970 urls += "?" + c.urlParams_.Encode() 8971 req, err := http.NewRequest("GET", urls, body) 8972 if err != nil { 8973 return nil, err 8974 } 8975 req.Header = reqHeaders 8976 googleapi.Expand(req.URL, map[string]string{ 8977 "parent": c.parent, 8978 }) 8979 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8980} 8981 8982// Do executes the "run.namespaces.configurations.list" call. 8983// Exactly one of *ListConfigurationsResponse or error will be non-nil. 8984// Any non-2xx status code is an error. Response headers are in either 8985// *ListConfigurationsResponse.ServerResponse.Header or (if a response 8986// was returned at all) in error.(*googleapi.Error).Header. Use 8987// googleapi.IsNotModified to check whether the returned error was 8988// because http.StatusNotModified was returned. 8989func (c *NamespacesConfigurationsListCall) Do(opts ...googleapi.CallOption) (*ListConfigurationsResponse, error) { 8990 gensupport.SetOptions(c.urlParams_, opts...) 8991 res, err := c.doRequest("json") 8992 if res != nil && res.StatusCode == http.StatusNotModified { 8993 if res.Body != nil { 8994 res.Body.Close() 8995 } 8996 return nil, &googleapi.Error{ 8997 Code: res.StatusCode, 8998 Header: res.Header, 8999 } 9000 } 9001 if err != nil { 9002 return nil, err 9003 } 9004 defer googleapi.CloseBody(res) 9005 if err := googleapi.CheckResponse(res); err != nil { 9006 return nil, err 9007 } 9008 ret := &ListConfigurationsResponse{ 9009 ServerResponse: googleapi.ServerResponse{ 9010 Header: res.Header, 9011 HTTPStatusCode: res.StatusCode, 9012 }, 9013 } 9014 target := &ret 9015 if err := gensupport.DecodeResponse(target, res); err != nil { 9016 return nil, err 9017 } 9018 return ret, nil 9019 // { 9020 // "description": "Rpc to list configurations.", 9021 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/configurations", 9022 // "httpMethod": "GET", 9023 // "id": "run.namespaces.configurations.list", 9024 // "parameterOrder": [ 9025 // "parent" 9026 // ], 9027 // "parameters": { 9028 // "continue": { 9029 // "description": "Optional encoded string to continue paging.", 9030 // "location": "query", 9031 // "type": "string" 9032 // }, 9033 // "fieldSelector": { 9034 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 9035 // "location": "query", 9036 // "type": "string" 9037 // }, 9038 // "includeUninitialized": { 9039 // "description": "Not currently used by Cloud Run.", 9040 // "location": "query", 9041 // "type": "boolean" 9042 // }, 9043 // "labelSelector": { 9044 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 9045 // "location": "query", 9046 // "type": "string" 9047 // }, 9048 // "limit": { 9049 // "description": "The maximum number of records that should be returned.", 9050 // "format": "int32", 9051 // "location": "query", 9052 // "type": "integer" 9053 // }, 9054 // "parent": { 9055 // "description": "The project ID or project number from which the configurations should be listed.", 9056 // "location": "path", 9057 // "pattern": "^namespaces/[^/]+$", 9058 // "required": true, 9059 // "type": "string" 9060 // }, 9061 // "resourceVersion": { 9062 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 9063 // "location": "query", 9064 // "type": "string" 9065 // }, 9066 // "watch": { 9067 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 9068 // "location": "query", 9069 // "type": "boolean" 9070 // } 9071 // }, 9072 // "path": "apis/serving.knative.dev/v1alpha1/{+parent}/configurations", 9073 // "response": { 9074 // "$ref": "ListConfigurationsResponse" 9075 // }, 9076 // "scopes": [ 9077 // "https://www.googleapis.com/auth/cloud-platform" 9078 // ] 9079 // } 9080 9081} 9082 9083// method id "run.namespaces.domainmappings.create": 9084 9085type NamespacesDomainmappingsCreateCall struct { 9086 s *APIService 9087 parent string 9088 domainmapping *DomainMapping 9089 urlParams_ gensupport.URLParams 9090 ctx_ context.Context 9091 header_ http.Header 9092} 9093 9094// Create: Creates a new domain mapping. 9095func (r *NamespacesDomainmappingsService) Create(parent string, domainmapping *DomainMapping) *NamespacesDomainmappingsCreateCall { 9096 c := &NamespacesDomainmappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9097 c.parent = parent 9098 c.domainmapping = domainmapping 9099 return c 9100} 9101 9102// Fields allows partial responses to be retrieved. See 9103// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9104// for more information. 9105func (c *NamespacesDomainmappingsCreateCall) Fields(s ...googleapi.Field) *NamespacesDomainmappingsCreateCall { 9106 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9107 return c 9108} 9109 9110// Context sets the context to be used in this call's Do method. Any 9111// pending HTTP request will be aborted if the provided context is 9112// canceled. 9113func (c *NamespacesDomainmappingsCreateCall) Context(ctx context.Context) *NamespacesDomainmappingsCreateCall { 9114 c.ctx_ = ctx 9115 return c 9116} 9117 9118// Header returns an http.Header that can be modified by the caller to 9119// add HTTP headers to the request. 9120func (c *NamespacesDomainmappingsCreateCall) Header() http.Header { 9121 if c.header_ == nil { 9122 c.header_ = make(http.Header) 9123 } 9124 return c.header_ 9125} 9126 9127func (c *NamespacesDomainmappingsCreateCall) doRequest(alt string) (*http.Response, error) { 9128 reqHeaders := make(http.Header) 9129 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9130 for k, v := range c.header_ { 9131 reqHeaders[k] = v 9132 } 9133 reqHeaders.Set("User-Agent", c.s.userAgent()) 9134 var body io.Reader = nil 9135 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping) 9136 if err != nil { 9137 return nil, err 9138 } 9139 reqHeaders.Set("Content-Type", "application/json") 9140 c.urlParams_.Set("alt", alt) 9141 c.urlParams_.Set("prettyPrint", "false") 9142 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/domains.cloudrun.com/v1alpha1/{+parent}/domainmappings") 9143 urls += "?" + c.urlParams_.Encode() 9144 req, err := http.NewRequest("POST", urls, body) 9145 if err != nil { 9146 return nil, err 9147 } 9148 req.Header = reqHeaders 9149 googleapi.Expand(req.URL, map[string]string{ 9150 "parent": c.parent, 9151 }) 9152 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9153} 9154 9155// Do executes the "run.namespaces.domainmappings.create" call. 9156// Exactly one of *DomainMapping or error will be non-nil. Any non-2xx 9157// status code is an error. Response headers are in either 9158// *DomainMapping.ServerResponse.Header or (if a response was returned 9159// at all) in error.(*googleapi.Error).Header. Use 9160// googleapi.IsNotModified to check whether the returned error was 9161// because http.StatusNotModified was returned. 9162func (c *NamespacesDomainmappingsCreateCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) { 9163 gensupport.SetOptions(c.urlParams_, opts...) 9164 res, err := c.doRequest("json") 9165 if res != nil && res.StatusCode == http.StatusNotModified { 9166 if res.Body != nil { 9167 res.Body.Close() 9168 } 9169 return nil, &googleapi.Error{ 9170 Code: res.StatusCode, 9171 Header: res.Header, 9172 } 9173 } 9174 if err != nil { 9175 return nil, err 9176 } 9177 defer googleapi.CloseBody(res) 9178 if err := googleapi.CheckResponse(res); err != nil { 9179 return nil, err 9180 } 9181 ret := &DomainMapping{ 9182 ServerResponse: googleapi.ServerResponse{ 9183 Header: res.Header, 9184 HTTPStatusCode: res.StatusCode, 9185 }, 9186 } 9187 target := &ret 9188 if err := gensupport.DecodeResponse(target, res); err != nil { 9189 return nil, err 9190 } 9191 return ret, nil 9192 // { 9193 // "description": "Creates a new domain mapping.", 9194 // "flatPath": "apis/domains.cloudrun.com/v1alpha1/namespaces/{namespacesId}/domainmappings", 9195 // "httpMethod": "POST", 9196 // "id": "run.namespaces.domainmappings.create", 9197 // "parameterOrder": [ 9198 // "parent" 9199 // ], 9200 // "parameters": { 9201 // "parent": { 9202 // "description": "The project ID or project number in which this domain mapping should be created.", 9203 // "location": "path", 9204 // "pattern": "^namespaces/[^/]+$", 9205 // "required": true, 9206 // "type": "string" 9207 // } 9208 // }, 9209 // "path": "apis/domains.cloudrun.com/v1alpha1/{+parent}/domainmappings", 9210 // "request": { 9211 // "$ref": "DomainMapping" 9212 // }, 9213 // "response": { 9214 // "$ref": "DomainMapping" 9215 // }, 9216 // "scopes": [ 9217 // "https://www.googleapis.com/auth/cloud-platform" 9218 // ] 9219 // } 9220 9221} 9222 9223// method id "run.namespaces.domainmappings.delete": 9224 9225type NamespacesDomainmappingsDeleteCall struct { 9226 s *APIService 9227 name string 9228 urlParams_ gensupport.URLParams 9229 ctx_ context.Context 9230 header_ http.Header 9231} 9232 9233// Delete: Rpc to delete a domain mapping. 9234func (r *NamespacesDomainmappingsService) Delete(name string) *NamespacesDomainmappingsDeleteCall { 9235 c := &NamespacesDomainmappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9236 c.name = name 9237 return c 9238} 9239 9240// ApiVersion sets the optional parameter "apiVersion": Cloud Run 9241// currently ignores this parameter. 9242func (c *NamespacesDomainmappingsDeleteCall) ApiVersion(apiVersion string) *NamespacesDomainmappingsDeleteCall { 9243 c.urlParams_.Set("apiVersion", apiVersion) 9244 return c 9245} 9246 9247// Kind sets the optional parameter "kind": Cloud Run currently ignores 9248// this parameter. 9249func (c *NamespacesDomainmappingsDeleteCall) Kind(kind string) *NamespacesDomainmappingsDeleteCall { 9250 c.urlParams_.Set("kind", kind) 9251 return c 9252} 9253 9254// OrphanDependents sets the optional parameter "orphanDependents": 9255// Deprecated. Specifies the cascade behavior on delete. Cloud Run only 9256// supports cascading behavior, so this must be false. This attribute is 9257// deprecated, and is now replaced with PropagationPolicy See 9258// https://github.com/kubernetes/kubernetes/issues/46659 for more info. 9259func (c *NamespacesDomainmappingsDeleteCall) OrphanDependents(orphanDependents bool) *NamespacesDomainmappingsDeleteCall { 9260 c.urlParams_.Set("orphanDependents", fmt.Sprint(orphanDependents)) 9261 return c 9262} 9263 9264// PropagationPolicy sets the optional parameter "propagationPolicy": 9265// Specifies the propagation policy of delete. Cloud Run currently 9266// ignores this setting, and deletes in the background. Please see 9267// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 9268// for more information. 9269func (c *NamespacesDomainmappingsDeleteCall) PropagationPolicy(propagationPolicy string) *NamespacesDomainmappingsDeleteCall { 9270 c.urlParams_.Set("propagationPolicy", propagationPolicy) 9271 return c 9272} 9273 9274// Fields allows partial responses to be retrieved. See 9275// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9276// for more information. 9277func (c *NamespacesDomainmappingsDeleteCall) Fields(s ...googleapi.Field) *NamespacesDomainmappingsDeleteCall { 9278 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9279 return c 9280} 9281 9282// Context sets the context to be used in this call's Do method. Any 9283// pending HTTP request will be aborted if the provided context is 9284// canceled. 9285func (c *NamespacesDomainmappingsDeleteCall) Context(ctx context.Context) *NamespacesDomainmappingsDeleteCall { 9286 c.ctx_ = ctx 9287 return c 9288} 9289 9290// Header returns an http.Header that can be modified by the caller to 9291// add HTTP headers to the request. 9292func (c *NamespacesDomainmappingsDeleteCall) Header() http.Header { 9293 if c.header_ == nil { 9294 c.header_ = make(http.Header) 9295 } 9296 return c.header_ 9297} 9298 9299func (c *NamespacesDomainmappingsDeleteCall) doRequest(alt string) (*http.Response, error) { 9300 reqHeaders := make(http.Header) 9301 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9302 for k, v := range c.header_ { 9303 reqHeaders[k] = v 9304 } 9305 reqHeaders.Set("User-Agent", c.s.userAgent()) 9306 var body io.Reader = nil 9307 c.urlParams_.Set("alt", alt) 9308 c.urlParams_.Set("prettyPrint", "false") 9309 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/domains.cloudrun.com/v1alpha1/{+name}") 9310 urls += "?" + c.urlParams_.Encode() 9311 req, err := http.NewRequest("DELETE", urls, body) 9312 if err != nil { 9313 return nil, err 9314 } 9315 req.Header = reqHeaders 9316 googleapi.Expand(req.URL, map[string]string{ 9317 "name": c.name, 9318 }) 9319 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9320} 9321 9322// Do executes the "run.namespaces.domainmappings.delete" call. 9323// Exactly one of *Empty or error will be non-nil. Any non-2xx status 9324// code is an error. Response headers are in either 9325// *Empty.ServerResponse.Header or (if a response was returned at all) 9326// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9327// check whether the returned error was because http.StatusNotModified 9328// was returned. 9329func (c *NamespacesDomainmappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 9330 gensupport.SetOptions(c.urlParams_, opts...) 9331 res, err := c.doRequest("json") 9332 if res != nil && res.StatusCode == http.StatusNotModified { 9333 if res.Body != nil { 9334 res.Body.Close() 9335 } 9336 return nil, &googleapi.Error{ 9337 Code: res.StatusCode, 9338 Header: res.Header, 9339 } 9340 } 9341 if err != nil { 9342 return nil, err 9343 } 9344 defer googleapi.CloseBody(res) 9345 if err := googleapi.CheckResponse(res); err != nil { 9346 return nil, err 9347 } 9348 ret := &Empty{ 9349 ServerResponse: googleapi.ServerResponse{ 9350 Header: res.Header, 9351 HTTPStatusCode: res.StatusCode, 9352 }, 9353 } 9354 target := &ret 9355 if err := gensupport.DecodeResponse(target, res); err != nil { 9356 return nil, err 9357 } 9358 return ret, nil 9359 // { 9360 // "description": "Rpc to delete a domain mapping.", 9361 // "flatPath": "apis/domains.cloudrun.com/v1alpha1/namespaces/{namespacesId}/domainmappings/{domainmappingsId}", 9362 // "httpMethod": "DELETE", 9363 // "id": "run.namespaces.domainmappings.delete", 9364 // "parameterOrder": [ 9365 // "name" 9366 // ], 9367 // "parameters": { 9368 // "apiVersion": { 9369 // "description": "Cloud Run currently ignores this parameter.", 9370 // "location": "query", 9371 // "type": "string" 9372 // }, 9373 // "kind": { 9374 // "description": "Cloud Run currently ignores this parameter.", 9375 // "location": "query", 9376 // "type": "string" 9377 // }, 9378 // "name": { 9379 // "description": "The name of the domain mapping being deleted. If needed, replace {namespace_id} with the project ID.", 9380 // "location": "path", 9381 // "pattern": "^namespaces/[^/]+/domainmappings/[^/]+$", 9382 // "required": true, 9383 // "type": "string" 9384 // }, 9385 // "orphanDependents": { 9386 // "description": "Deprecated. Specifies the cascade behavior on delete. Cloud Run only supports cascading behavior, so this must be false. This attribute is deprecated, and is now replaced with PropagationPolicy See https://github.com/kubernetes/kubernetes/issues/46659 for more info.", 9387 // "location": "query", 9388 // "type": "boolean" 9389 // }, 9390 // "propagationPolicy": { 9391 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 9392 // "location": "query", 9393 // "type": "string" 9394 // } 9395 // }, 9396 // "path": "apis/domains.cloudrun.com/v1alpha1/{+name}", 9397 // "response": { 9398 // "$ref": "Empty" 9399 // }, 9400 // "scopes": [ 9401 // "https://www.googleapis.com/auth/cloud-platform" 9402 // ] 9403 // } 9404 9405} 9406 9407// method id "run.namespaces.domainmappings.get": 9408 9409type NamespacesDomainmappingsGetCall struct { 9410 s *APIService 9411 name string 9412 urlParams_ gensupport.URLParams 9413 ifNoneMatch_ string 9414 ctx_ context.Context 9415 header_ http.Header 9416} 9417 9418// Get: Rpc to get information about a domain mapping. 9419func (r *NamespacesDomainmappingsService) Get(name string) *NamespacesDomainmappingsGetCall { 9420 c := &NamespacesDomainmappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9421 c.name = name 9422 return c 9423} 9424 9425// Fields allows partial responses to be retrieved. See 9426// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9427// for more information. 9428func (c *NamespacesDomainmappingsGetCall) Fields(s ...googleapi.Field) *NamespacesDomainmappingsGetCall { 9429 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9430 return c 9431} 9432 9433// IfNoneMatch sets the optional parameter which makes the operation 9434// fail if the object's ETag matches the given value. This is useful for 9435// getting updates only after the object has changed since the last 9436// request. Use googleapi.IsNotModified to check whether the response 9437// error from Do is the result of In-None-Match. 9438func (c *NamespacesDomainmappingsGetCall) IfNoneMatch(entityTag string) *NamespacesDomainmappingsGetCall { 9439 c.ifNoneMatch_ = entityTag 9440 return c 9441} 9442 9443// Context sets the context to be used in this call's Do method. Any 9444// pending HTTP request will be aborted if the provided context is 9445// canceled. 9446func (c *NamespacesDomainmappingsGetCall) Context(ctx context.Context) *NamespacesDomainmappingsGetCall { 9447 c.ctx_ = ctx 9448 return c 9449} 9450 9451// Header returns an http.Header that can be modified by the caller to 9452// add HTTP headers to the request. 9453func (c *NamespacesDomainmappingsGetCall) Header() http.Header { 9454 if c.header_ == nil { 9455 c.header_ = make(http.Header) 9456 } 9457 return c.header_ 9458} 9459 9460func (c *NamespacesDomainmappingsGetCall) doRequest(alt string) (*http.Response, error) { 9461 reqHeaders := make(http.Header) 9462 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9463 for k, v := range c.header_ { 9464 reqHeaders[k] = v 9465 } 9466 reqHeaders.Set("User-Agent", c.s.userAgent()) 9467 if c.ifNoneMatch_ != "" { 9468 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9469 } 9470 var body io.Reader = nil 9471 c.urlParams_.Set("alt", alt) 9472 c.urlParams_.Set("prettyPrint", "false") 9473 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/domains.cloudrun.com/v1alpha1/{+name}") 9474 urls += "?" + c.urlParams_.Encode() 9475 req, err := http.NewRequest("GET", urls, body) 9476 if err != nil { 9477 return nil, err 9478 } 9479 req.Header = reqHeaders 9480 googleapi.Expand(req.URL, map[string]string{ 9481 "name": c.name, 9482 }) 9483 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9484} 9485 9486// Do executes the "run.namespaces.domainmappings.get" call. 9487// Exactly one of *DomainMapping or error will be non-nil. Any non-2xx 9488// status code is an error. Response headers are in either 9489// *DomainMapping.ServerResponse.Header or (if a response was returned 9490// at all) in error.(*googleapi.Error).Header. Use 9491// googleapi.IsNotModified to check whether the returned error was 9492// because http.StatusNotModified was returned. 9493func (c *NamespacesDomainmappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) { 9494 gensupport.SetOptions(c.urlParams_, opts...) 9495 res, err := c.doRequest("json") 9496 if res != nil && res.StatusCode == http.StatusNotModified { 9497 if res.Body != nil { 9498 res.Body.Close() 9499 } 9500 return nil, &googleapi.Error{ 9501 Code: res.StatusCode, 9502 Header: res.Header, 9503 } 9504 } 9505 if err != nil { 9506 return nil, err 9507 } 9508 defer googleapi.CloseBody(res) 9509 if err := googleapi.CheckResponse(res); err != nil { 9510 return nil, err 9511 } 9512 ret := &DomainMapping{ 9513 ServerResponse: googleapi.ServerResponse{ 9514 Header: res.Header, 9515 HTTPStatusCode: res.StatusCode, 9516 }, 9517 } 9518 target := &ret 9519 if err := gensupport.DecodeResponse(target, res); err != nil { 9520 return nil, err 9521 } 9522 return ret, nil 9523 // { 9524 // "description": "Rpc to get information about a domain mapping.", 9525 // "flatPath": "apis/domains.cloudrun.com/v1alpha1/namespaces/{namespacesId}/domainmappings/{domainmappingsId}", 9526 // "httpMethod": "GET", 9527 // "id": "run.namespaces.domainmappings.get", 9528 // "parameterOrder": [ 9529 // "name" 9530 // ], 9531 // "parameters": { 9532 // "name": { 9533 // "description": "The name of the domain mapping being retrieved. If needed, replace {namespace_id} with the project ID.", 9534 // "location": "path", 9535 // "pattern": "^namespaces/[^/]+/domainmappings/[^/]+$", 9536 // "required": true, 9537 // "type": "string" 9538 // } 9539 // }, 9540 // "path": "apis/domains.cloudrun.com/v1alpha1/{+name}", 9541 // "response": { 9542 // "$ref": "DomainMapping" 9543 // }, 9544 // "scopes": [ 9545 // "https://www.googleapis.com/auth/cloud-platform" 9546 // ] 9547 // } 9548 9549} 9550 9551// method id "run.namespaces.domainmappings.list": 9552 9553type NamespacesDomainmappingsListCall struct { 9554 s *APIService 9555 parent string 9556 urlParams_ gensupport.URLParams 9557 ifNoneMatch_ string 9558 ctx_ context.Context 9559 header_ http.Header 9560} 9561 9562// List: Rpc to list domain mappings. 9563func (r *NamespacesDomainmappingsService) List(parent string) *NamespacesDomainmappingsListCall { 9564 c := &NamespacesDomainmappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9565 c.parent = parent 9566 return c 9567} 9568 9569// Continue sets the optional parameter "continue": Optional encoded 9570// string to continue paging. 9571func (c *NamespacesDomainmappingsListCall) Continue(continue_ string) *NamespacesDomainmappingsListCall { 9572 c.urlParams_.Set("continue", continue_) 9573 return c 9574} 9575 9576// FieldSelector sets the optional parameter "fieldSelector": Allows to 9577// filter resources based on a specific value for a field name. Send 9578// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 9579// currently used by Cloud Run. 9580func (c *NamespacesDomainmappingsListCall) FieldSelector(fieldSelector string) *NamespacesDomainmappingsListCall { 9581 c.urlParams_.Set("fieldSelector", fieldSelector) 9582 return c 9583} 9584 9585// IncludeUninitialized sets the optional parameter 9586// "includeUninitialized": Not currently used by Cloud Run. 9587func (c *NamespacesDomainmappingsListCall) IncludeUninitialized(includeUninitialized bool) *NamespacesDomainmappingsListCall { 9588 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 9589 return c 9590} 9591 9592// LabelSelector sets the optional parameter "labelSelector": Allows to 9593// filter resources based on a label. Supported operations are =, !=, 9594// exists, in, and notIn. 9595func (c *NamespacesDomainmappingsListCall) LabelSelector(labelSelector string) *NamespacesDomainmappingsListCall { 9596 c.urlParams_.Set("labelSelector", labelSelector) 9597 return c 9598} 9599 9600// Limit sets the optional parameter "limit": The maximum number of 9601// records that should be returned. 9602func (c *NamespacesDomainmappingsListCall) Limit(limit int64) *NamespacesDomainmappingsListCall { 9603 c.urlParams_.Set("limit", fmt.Sprint(limit)) 9604 return c 9605} 9606 9607// ResourceVersion sets the optional parameter "resourceVersion": The 9608// baseline resource version from which the list or watch operation 9609// should start. Not currently used by Cloud Run. 9610func (c *NamespacesDomainmappingsListCall) ResourceVersion(resourceVersion string) *NamespacesDomainmappingsListCall { 9611 c.urlParams_.Set("resourceVersion", resourceVersion) 9612 return c 9613} 9614 9615// Watch sets the optional parameter "watch": Flag that indicates that 9616// the client expects to watch this resource as well. Not currently used 9617// by Cloud Run. 9618func (c *NamespacesDomainmappingsListCall) Watch(watch bool) *NamespacesDomainmappingsListCall { 9619 c.urlParams_.Set("watch", fmt.Sprint(watch)) 9620 return c 9621} 9622 9623// Fields allows partial responses to be retrieved. See 9624// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9625// for more information. 9626func (c *NamespacesDomainmappingsListCall) Fields(s ...googleapi.Field) *NamespacesDomainmappingsListCall { 9627 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9628 return c 9629} 9630 9631// IfNoneMatch sets the optional parameter which makes the operation 9632// fail if the object's ETag matches the given value. This is useful for 9633// getting updates only after the object has changed since the last 9634// request. Use googleapi.IsNotModified to check whether the response 9635// error from Do is the result of In-None-Match. 9636func (c *NamespacesDomainmappingsListCall) IfNoneMatch(entityTag string) *NamespacesDomainmappingsListCall { 9637 c.ifNoneMatch_ = entityTag 9638 return c 9639} 9640 9641// Context sets the context to be used in this call's Do method. Any 9642// pending HTTP request will be aborted if the provided context is 9643// canceled. 9644func (c *NamespacesDomainmappingsListCall) Context(ctx context.Context) *NamespacesDomainmappingsListCall { 9645 c.ctx_ = ctx 9646 return c 9647} 9648 9649// Header returns an http.Header that can be modified by the caller to 9650// add HTTP headers to the request. 9651func (c *NamespacesDomainmappingsListCall) Header() http.Header { 9652 if c.header_ == nil { 9653 c.header_ = make(http.Header) 9654 } 9655 return c.header_ 9656} 9657 9658func (c *NamespacesDomainmappingsListCall) doRequest(alt string) (*http.Response, error) { 9659 reqHeaders := make(http.Header) 9660 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9661 for k, v := range c.header_ { 9662 reqHeaders[k] = v 9663 } 9664 reqHeaders.Set("User-Agent", c.s.userAgent()) 9665 if c.ifNoneMatch_ != "" { 9666 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9667 } 9668 var body io.Reader = nil 9669 c.urlParams_.Set("alt", alt) 9670 c.urlParams_.Set("prettyPrint", "false") 9671 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/domains.cloudrun.com/v1alpha1/{+parent}/domainmappings") 9672 urls += "?" + c.urlParams_.Encode() 9673 req, err := http.NewRequest("GET", urls, body) 9674 if err != nil { 9675 return nil, err 9676 } 9677 req.Header = reqHeaders 9678 googleapi.Expand(req.URL, map[string]string{ 9679 "parent": c.parent, 9680 }) 9681 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9682} 9683 9684// Do executes the "run.namespaces.domainmappings.list" call. 9685// Exactly one of *ListDomainMappingsResponse or error will be non-nil. 9686// Any non-2xx status code is an error. Response headers are in either 9687// *ListDomainMappingsResponse.ServerResponse.Header or (if a response 9688// was returned at all) in error.(*googleapi.Error).Header. Use 9689// googleapi.IsNotModified to check whether the returned error was 9690// because http.StatusNotModified was returned. 9691func (c *NamespacesDomainmappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, error) { 9692 gensupport.SetOptions(c.urlParams_, opts...) 9693 res, err := c.doRequest("json") 9694 if res != nil && res.StatusCode == http.StatusNotModified { 9695 if res.Body != nil { 9696 res.Body.Close() 9697 } 9698 return nil, &googleapi.Error{ 9699 Code: res.StatusCode, 9700 Header: res.Header, 9701 } 9702 } 9703 if err != nil { 9704 return nil, err 9705 } 9706 defer googleapi.CloseBody(res) 9707 if err := googleapi.CheckResponse(res); err != nil { 9708 return nil, err 9709 } 9710 ret := &ListDomainMappingsResponse{ 9711 ServerResponse: googleapi.ServerResponse{ 9712 Header: res.Header, 9713 HTTPStatusCode: res.StatusCode, 9714 }, 9715 } 9716 target := &ret 9717 if err := gensupport.DecodeResponse(target, res); err != nil { 9718 return nil, err 9719 } 9720 return ret, nil 9721 // { 9722 // "description": "Rpc to list domain mappings.", 9723 // "flatPath": "apis/domains.cloudrun.com/v1alpha1/namespaces/{namespacesId}/domainmappings", 9724 // "httpMethod": "GET", 9725 // "id": "run.namespaces.domainmappings.list", 9726 // "parameterOrder": [ 9727 // "parent" 9728 // ], 9729 // "parameters": { 9730 // "continue": { 9731 // "description": "Optional encoded string to continue paging.", 9732 // "location": "query", 9733 // "type": "string" 9734 // }, 9735 // "fieldSelector": { 9736 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 9737 // "location": "query", 9738 // "type": "string" 9739 // }, 9740 // "includeUninitialized": { 9741 // "description": "Not currently used by Cloud Run.", 9742 // "location": "query", 9743 // "type": "boolean" 9744 // }, 9745 // "labelSelector": { 9746 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 9747 // "location": "query", 9748 // "type": "string" 9749 // }, 9750 // "limit": { 9751 // "description": "The maximum number of records that should be returned.", 9752 // "format": "int32", 9753 // "location": "query", 9754 // "type": "integer" 9755 // }, 9756 // "parent": { 9757 // "description": "The project ID or project number from which the domain mappings should be listed.", 9758 // "location": "path", 9759 // "pattern": "^namespaces/[^/]+$", 9760 // "required": true, 9761 // "type": "string" 9762 // }, 9763 // "resourceVersion": { 9764 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 9765 // "location": "query", 9766 // "type": "string" 9767 // }, 9768 // "watch": { 9769 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 9770 // "location": "query", 9771 // "type": "boolean" 9772 // } 9773 // }, 9774 // "path": "apis/domains.cloudrun.com/v1alpha1/{+parent}/domainmappings", 9775 // "response": { 9776 // "$ref": "ListDomainMappingsResponse" 9777 // }, 9778 // "scopes": [ 9779 // "https://www.googleapis.com/auth/cloud-platform" 9780 // ] 9781 // } 9782 9783} 9784 9785// method id "run.namespaces.revisions.delete": 9786 9787type NamespacesRevisionsDeleteCall struct { 9788 s *APIService 9789 name string 9790 urlParams_ gensupport.URLParams 9791 ctx_ context.Context 9792 header_ http.Header 9793} 9794 9795// Delete: Rpc to delete a revision. 9796func (r *NamespacesRevisionsService) Delete(name string) *NamespacesRevisionsDeleteCall { 9797 c := &NamespacesRevisionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9798 c.name = name 9799 return c 9800} 9801 9802// ApiVersion sets the optional parameter "apiVersion": Cloud Run 9803// currently ignores this parameter. 9804func (c *NamespacesRevisionsDeleteCall) ApiVersion(apiVersion string) *NamespacesRevisionsDeleteCall { 9805 c.urlParams_.Set("apiVersion", apiVersion) 9806 return c 9807} 9808 9809// Kind sets the optional parameter "kind": Cloud Run currently ignores 9810// this parameter. 9811func (c *NamespacesRevisionsDeleteCall) Kind(kind string) *NamespacesRevisionsDeleteCall { 9812 c.urlParams_.Set("kind", kind) 9813 return c 9814} 9815 9816// OrphanDependents sets the optional parameter "orphanDependents": 9817// Deprecated. Specifies the cascade behavior on delete. Cloud Run only 9818// supports cascading behavior, so this must be false. This attribute is 9819// deprecated, and is now replaced with PropagationPolicy See 9820// https://github.com/kubernetes/kubernetes/issues/46659 for more info. 9821func (c *NamespacesRevisionsDeleteCall) OrphanDependents(orphanDependents bool) *NamespacesRevisionsDeleteCall { 9822 c.urlParams_.Set("orphanDependents", fmt.Sprint(orphanDependents)) 9823 return c 9824} 9825 9826// PropagationPolicy sets the optional parameter "propagationPolicy": 9827// Specifies the propagation policy of delete. Cloud Run currently 9828// ignores this setting, and deletes in the background. Please see 9829// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 9830// for more information. 9831func (c *NamespacesRevisionsDeleteCall) PropagationPolicy(propagationPolicy string) *NamespacesRevisionsDeleteCall { 9832 c.urlParams_.Set("propagationPolicy", propagationPolicy) 9833 return c 9834} 9835 9836// Fields allows partial responses to be retrieved. See 9837// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9838// for more information. 9839func (c *NamespacesRevisionsDeleteCall) Fields(s ...googleapi.Field) *NamespacesRevisionsDeleteCall { 9840 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9841 return c 9842} 9843 9844// Context sets the context to be used in this call's Do method. Any 9845// pending HTTP request will be aborted if the provided context is 9846// canceled. 9847func (c *NamespacesRevisionsDeleteCall) Context(ctx context.Context) *NamespacesRevisionsDeleteCall { 9848 c.ctx_ = ctx 9849 return c 9850} 9851 9852// Header returns an http.Header that can be modified by the caller to 9853// add HTTP headers to the request. 9854func (c *NamespacesRevisionsDeleteCall) Header() http.Header { 9855 if c.header_ == nil { 9856 c.header_ = make(http.Header) 9857 } 9858 return c.header_ 9859} 9860 9861func (c *NamespacesRevisionsDeleteCall) doRequest(alt string) (*http.Response, error) { 9862 reqHeaders := make(http.Header) 9863 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9864 for k, v := range c.header_ { 9865 reqHeaders[k] = v 9866 } 9867 reqHeaders.Set("User-Agent", c.s.userAgent()) 9868 var body io.Reader = nil 9869 c.urlParams_.Set("alt", alt) 9870 c.urlParams_.Set("prettyPrint", "false") 9871 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+name}") 9872 urls += "?" + c.urlParams_.Encode() 9873 req, err := http.NewRequest("DELETE", urls, body) 9874 if err != nil { 9875 return nil, err 9876 } 9877 req.Header = reqHeaders 9878 googleapi.Expand(req.URL, map[string]string{ 9879 "name": c.name, 9880 }) 9881 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9882} 9883 9884// Do executes the "run.namespaces.revisions.delete" call. 9885// Exactly one of *Empty or error will be non-nil. Any non-2xx status 9886// code is an error. Response headers are in either 9887// *Empty.ServerResponse.Header or (if a response was returned at all) 9888// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9889// check whether the returned error was because http.StatusNotModified 9890// was returned. 9891func (c *NamespacesRevisionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 9892 gensupport.SetOptions(c.urlParams_, opts...) 9893 res, err := c.doRequest("json") 9894 if res != nil && res.StatusCode == http.StatusNotModified { 9895 if res.Body != nil { 9896 res.Body.Close() 9897 } 9898 return nil, &googleapi.Error{ 9899 Code: res.StatusCode, 9900 Header: res.Header, 9901 } 9902 } 9903 if err != nil { 9904 return nil, err 9905 } 9906 defer googleapi.CloseBody(res) 9907 if err := googleapi.CheckResponse(res); err != nil { 9908 return nil, err 9909 } 9910 ret := &Empty{ 9911 ServerResponse: googleapi.ServerResponse{ 9912 Header: res.Header, 9913 HTTPStatusCode: res.StatusCode, 9914 }, 9915 } 9916 target := &ret 9917 if err := gensupport.DecodeResponse(target, res); err != nil { 9918 return nil, err 9919 } 9920 return ret, nil 9921 // { 9922 // "description": "Rpc to delete a revision.", 9923 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/revisions/{revisionsId}", 9924 // "httpMethod": "DELETE", 9925 // "id": "run.namespaces.revisions.delete", 9926 // "parameterOrder": [ 9927 // "name" 9928 // ], 9929 // "parameters": { 9930 // "apiVersion": { 9931 // "description": "Cloud Run currently ignores this parameter.", 9932 // "location": "query", 9933 // "type": "string" 9934 // }, 9935 // "kind": { 9936 // "description": "Cloud Run currently ignores this parameter.", 9937 // "location": "query", 9938 // "type": "string" 9939 // }, 9940 // "name": { 9941 // "description": "The name of the revision being deleted. If needed, replace {namespace_id} with the project ID.", 9942 // "location": "path", 9943 // "pattern": "^namespaces/[^/]+/revisions/[^/]+$", 9944 // "required": true, 9945 // "type": "string" 9946 // }, 9947 // "orphanDependents": { 9948 // "description": "Deprecated. Specifies the cascade behavior on delete. Cloud Run only supports cascading behavior, so this must be false. This attribute is deprecated, and is now replaced with PropagationPolicy See https://github.com/kubernetes/kubernetes/issues/46659 for more info.", 9949 // "location": "query", 9950 // "type": "boolean" 9951 // }, 9952 // "propagationPolicy": { 9953 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 9954 // "location": "query", 9955 // "type": "string" 9956 // } 9957 // }, 9958 // "path": "apis/serving.knative.dev/v1alpha1/{+name}", 9959 // "response": { 9960 // "$ref": "Empty" 9961 // }, 9962 // "scopes": [ 9963 // "https://www.googleapis.com/auth/cloud-platform" 9964 // ] 9965 // } 9966 9967} 9968 9969// method id "run.namespaces.revisions.get": 9970 9971type NamespacesRevisionsGetCall struct { 9972 s *APIService 9973 name string 9974 urlParams_ gensupport.URLParams 9975 ifNoneMatch_ string 9976 ctx_ context.Context 9977 header_ http.Header 9978} 9979 9980// Get: Rpc to get information about a revision. 9981func (r *NamespacesRevisionsService) Get(name string) *NamespacesRevisionsGetCall { 9982 c := &NamespacesRevisionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9983 c.name = name 9984 return c 9985} 9986 9987// Fields allows partial responses to be retrieved. See 9988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9989// for more information. 9990func (c *NamespacesRevisionsGetCall) Fields(s ...googleapi.Field) *NamespacesRevisionsGetCall { 9991 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9992 return c 9993} 9994 9995// IfNoneMatch sets the optional parameter which makes the operation 9996// fail if the object's ETag matches the given value. This is useful for 9997// getting updates only after the object has changed since the last 9998// request. Use googleapi.IsNotModified to check whether the response 9999// error from Do is the result of In-None-Match. 10000func (c *NamespacesRevisionsGetCall) IfNoneMatch(entityTag string) *NamespacesRevisionsGetCall { 10001 c.ifNoneMatch_ = entityTag 10002 return c 10003} 10004 10005// Context sets the context to be used in this call's Do method. Any 10006// pending HTTP request will be aborted if the provided context is 10007// canceled. 10008func (c *NamespacesRevisionsGetCall) Context(ctx context.Context) *NamespacesRevisionsGetCall { 10009 c.ctx_ = ctx 10010 return c 10011} 10012 10013// Header returns an http.Header that can be modified by the caller to 10014// add HTTP headers to the request. 10015func (c *NamespacesRevisionsGetCall) Header() http.Header { 10016 if c.header_ == nil { 10017 c.header_ = make(http.Header) 10018 } 10019 return c.header_ 10020} 10021 10022func (c *NamespacesRevisionsGetCall) doRequest(alt string) (*http.Response, error) { 10023 reqHeaders := make(http.Header) 10024 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10025 for k, v := range c.header_ { 10026 reqHeaders[k] = v 10027 } 10028 reqHeaders.Set("User-Agent", c.s.userAgent()) 10029 if c.ifNoneMatch_ != "" { 10030 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10031 } 10032 var body io.Reader = nil 10033 c.urlParams_.Set("alt", alt) 10034 c.urlParams_.Set("prettyPrint", "false") 10035 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+name}") 10036 urls += "?" + c.urlParams_.Encode() 10037 req, err := http.NewRequest("GET", urls, body) 10038 if err != nil { 10039 return nil, err 10040 } 10041 req.Header = reqHeaders 10042 googleapi.Expand(req.URL, map[string]string{ 10043 "name": c.name, 10044 }) 10045 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10046} 10047 10048// Do executes the "run.namespaces.revisions.get" call. 10049// Exactly one of *Revision or error will be non-nil. Any non-2xx status 10050// code is an error. Response headers are in either 10051// *Revision.ServerResponse.Header or (if a response was returned at 10052// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10053// to check whether the returned error was because 10054// http.StatusNotModified was returned. 10055func (c *NamespacesRevisionsGetCall) Do(opts ...googleapi.CallOption) (*Revision, error) { 10056 gensupport.SetOptions(c.urlParams_, opts...) 10057 res, err := c.doRequest("json") 10058 if res != nil && res.StatusCode == http.StatusNotModified { 10059 if res.Body != nil { 10060 res.Body.Close() 10061 } 10062 return nil, &googleapi.Error{ 10063 Code: res.StatusCode, 10064 Header: res.Header, 10065 } 10066 } 10067 if err != nil { 10068 return nil, err 10069 } 10070 defer googleapi.CloseBody(res) 10071 if err := googleapi.CheckResponse(res); err != nil { 10072 return nil, err 10073 } 10074 ret := &Revision{ 10075 ServerResponse: googleapi.ServerResponse{ 10076 Header: res.Header, 10077 HTTPStatusCode: res.StatusCode, 10078 }, 10079 } 10080 target := &ret 10081 if err := gensupport.DecodeResponse(target, res); err != nil { 10082 return nil, err 10083 } 10084 return ret, nil 10085 // { 10086 // "description": "Rpc to get information about a revision.", 10087 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/revisions/{revisionsId}", 10088 // "httpMethod": "GET", 10089 // "id": "run.namespaces.revisions.get", 10090 // "parameterOrder": [ 10091 // "name" 10092 // ], 10093 // "parameters": { 10094 // "name": { 10095 // "description": "The name of the revision being retrieved. If needed, replace {namespace_id} with the project ID.", 10096 // "location": "path", 10097 // "pattern": "^namespaces/[^/]+/revisions/[^/]+$", 10098 // "required": true, 10099 // "type": "string" 10100 // } 10101 // }, 10102 // "path": "apis/serving.knative.dev/v1alpha1/{+name}", 10103 // "response": { 10104 // "$ref": "Revision" 10105 // }, 10106 // "scopes": [ 10107 // "https://www.googleapis.com/auth/cloud-platform" 10108 // ] 10109 // } 10110 10111} 10112 10113// method id "run.namespaces.revisions.list": 10114 10115type NamespacesRevisionsListCall struct { 10116 s *APIService 10117 parent string 10118 urlParams_ gensupport.URLParams 10119 ifNoneMatch_ string 10120 ctx_ context.Context 10121 header_ http.Header 10122} 10123 10124// List: Rpc to list revisions. 10125func (r *NamespacesRevisionsService) List(parent string) *NamespacesRevisionsListCall { 10126 c := &NamespacesRevisionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10127 c.parent = parent 10128 return c 10129} 10130 10131// Continue sets the optional parameter "continue": Optional encoded 10132// string to continue paging. 10133func (c *NamespacesRevisionsListCall) Continue(continue_ string) *NamespacesRevisionsListCall { 10134 c.urlParams_.Set("continue", continue_) 10135 return c 10136} 10137 10138// FieldSelector sets the optional parameter "fieldSelector": Allows to 10139// filter resources based on a specific value for a field name. Send 10140// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 10141// currently used by Cloud Run. 10142func (c *NamespacesRevisionsListCall) FieldSelector(fieldSelector string) *NamespacesRevisionsListCall { 10143 c.urlParams_.Set("fieldSelector", fieldSelector) 10144 return c 10145} 10146 10147// IncludeUninitialized sets the optional parameter 10148// "includeUninitialized": Not currently used by Cloud Run. 10149func (c *NamespacesRevisionsListCall) IncludeUninitialized(includeUninitialized bool) *NamespacesRevisionsListCall { 10150 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 10151 return c 10152} 10153 10154// LabelSelector sets the optional parameter "labelSelector": Allows to 10155// filter resources based on a label. Supported operations are =, !=, 10156// exists, in, and notIn. 10157func (c *NamespacesRevisionsListCall) LabelSelector(labelSelector string) *NamespacesRevisionsListCall { 10158 c.urlParams_.Set("labelSelector", labelSelector) 10159 return c 10160} 10161 10162// Limit sets the optional parameter "limit": The maximum number of 10163// records that should be returned. 10164func (c *NamespacesRevisionsListCall) Limit(limit int64) *NamespacesRevisionsListCall { 10165 c.urlParams_.Set("limit", fmt.Sprint(limit)) 10166 return c 10167} 10168 10169// ResourceVersion sets the optional parameter "resourceVersion": The 10170// baseline resource version from which the list or watch operation 10171// should start. Not currently used by Cloud Run. 10172func (c *NamespacesRevisionsListCall) ResourceVersion(resourceVersion string) *NamespacesRevisionsListCall { 10173 c.urlParams_.Set("resourceVersion", resourceVersion) 10174 return c 10175} 10176 10177// Watch sets the optional parameter "watch": Flag that indicates that 10178// the client expects to watch this resource as well. Not currently used 10179// by Cloud Run. 10180func (c *NamespacesRevisionsListCall) Watch(watch bool) *NamespacesRevisionsListCall { 10181 c.urlParams_.Set("watch", fmt.Sprint(watch)) 10182 return c 10183} 10184 10185// Fields allows partial responses to be retrieved. See 10186// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10187// for more information. 10188func (c *NamespacesRevisionsListCall) Fields(s ...googleapi.Field) *NamespacesRevisionsListCall { 10189 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10190 return c 10191} 10192 10193// IfNoneMatch sets the optional parameter which makes the operation 10194// fail if the object's ETag matches the given value. This is useful for 10195// getting updates only after the object has changed since the last 10196// request. Use googleapi.IsNotModified to check whether the response 10197// error from Do is the result of In-None-Match. 10198func (c *NamespacesRevisionsListCall) IfNoneMatch(entityTag string) *NamespacesRevisionsListCall { 10199 c.ifNoneMatch_ = entityTag 10200 return c 10201} 10202 10203// Context sets the context to be used in this call's Do method. Any 10204// pending HTTP request will be aborted if the provided context is 10205// canceled. 10206func (c *NamespacesRevisionsListCall) Context(ctx context.Context) *NamespacesRevisionsListCall { 10207 c.ctx_ = ctx 10208 return c 10209} 10210 10211// Header returns an http.Header that can be modified by the caller to 10212// add HTTP headers to the request. 10213func (c *NamespacesRevisionsListCall) Header() http.Header { 10214 if c.header_ == nil { 10215 c.header_ = make(http.Header) 10216 } 10217 return c.header_ 10218} 10219 10220func (c *NamespacesRevisionsListCall) doRequest(alt string) (*http.Response, error) { 10221 reqHeaders := make(http.Header) 10222 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10223 for k, v := range c.header_ { 10224 reqHeaders[k] = v 10225 } 10226 reqHeaders.Set("User-Agent", c.s.userAgent()) 10227 if c.ifNoneMatch_ != "" { 10228 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10229 } 10230 var body io.Reader = nil 10231 c.urlParams_.Set("alt", alt) 10232 c.urlParams_.Set("prettyPrint", "false") 10233 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+parent}/revisions") 10234 urls += "?" + c.urlParams_.Encode() 10235 req, err := http.NewRequest("GET", urls, body) 10236 if err != nil { 10237 return nil, err 10238 } 10239 req.Header = reqHeaders 10240 googleapi.Expand(req.URL, map[string]string{ 10241 "parent": c.parent, 10242 }) 10243 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10244} 10245 10246// Do executes the "run.namespaces.revisions.list" call. 10247// Exactly one of *ListRevisionsResponse or error will be non-nil. Any 10248// non-2xx status code is an error. Response headers are in either 10249// *ListRevisionsResponse.ServerResponse.Header or (if a response was 10250// returned at all) in error.(*googleapi.Error).Header. Use 10251// googleapi.IsNotModified to check whether the returned error was 10252// because http.StatusNotModified was returned. 10253func (c *NamespacesRevisionsListCall) Do(opts ...googleapi.CallOption) (*ListRevisionsResponse, error) { 10254 gensupport.SetOptions(c.urlParams_, opts...) 10255 res, err := c.doRequest("json") 10256 if res != nil && res.StatusCode == http.StatusNotModified { 10257 if res.Body != nil { 10258 res.Body.Close() 10259 } 10260 return nil, &googleapi.Error{ 10261 Code: res.StatusCode, 10262 Header: res.Header, 10263 } 10264 } 10265 if err != nil { 10266 return nil, err 10267 } 10268 defer googleapi.CloseBody(res) 10269 if err := googleapi.CheckResponse(res); err != nil { 10270 return nil, err 10271 } 10272 ret := &ListRevisionsResponse{ 10273 ServerResponse: googleapi.ServerResponse{ 10274 Header: res.Header, 10275 HTTPStatusCode: res.StatusCode, 10276 }, 10277 } 10278 target := &ret 10279 if err := gensupport.DecodeResponse(target, res); err != nil { 10280 return nil, err 10281 } 10282 return ret, nil 10283 // { 10284 // "description": "Rpc to list revisions.", 10285 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/revisions", 10286 // "httpMethod": "GET", 10287 // "id": "run.namespaces.revisions.list", 10288 // "parameterOrder": [ 10289 // "parent" 10290 // ], 10291 // "parameters": { 10292 // "continue": { 10293 // "description": "Optional encoded string to continue paging.", 10294 // "location": "query", 10295 // "type": "string" 10296 // }, 10297 // "fieldSelector": { 10298 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 10299 // "location": "query", 10300 // "type": "string" 10301 // }, 10302 // "includeUninitialized": { 10303 // "description": "Not currently used by Cloud Run.", 10304 // "location": "query", 10305 // "type": "boolean" 10306 // }, 10307 // "labelSelector": { 10308 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 10309 // "location": "query", 10310 // "type": "string" 10311 // }, 10312 // "limit": { 10313 // "description": "The maximum number of records that should be returned.", 10314 // "format": "int32", 10315 // "location": "query", 10316 // "type": "integer" 10317 // }, 10318 // "parent": { 10319 // "description": "The project ID or project number from which the revisions should be listed.", 10320 // "location": "path", 10321 // "pattern": "^namespaces/[^/]+$", 10322 // "required": true, 10323 // "type": "string" 10324 // }, 10325 // "resourceVersion": { 10326 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 10327 // "location": "query", 10328 // "type": "string" 10329 // }, 10330 // "watch": { 10331 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 10332 // "location": "query", 10333 // "type": "boolean" 10334 // } 10335 // }, 10336 // "path": "apis/serving.knative.dev/v1alpha1/{+parent}/revisions", 10337 // "response": { 10338 // "$ref": "ListRevisionsResponse" 10339 // }, 10340 // "scopes": [ 10341 // "https://www.googleapis.com/auth/cloud-platform" 10342 // ] 10343 // } 10344 10345} 10346 10347// method id "run.namespaces.routes.get": 10348 10349type NamespacesRoutesGetCall struct { 10350 s *APIService 10351 name string 10352 urlParams_ gensupport.URLParams 10353 ifNoneMatch_ string 10354 ctx_ context.Context 10355 header_ http.Header 10356} 10357 10358// Get: Rpc to get information about a route. 10359func (r *NamespacesRoutesService) Get(name string) *NamespacesRoutesGetCall { 10360 c := &NamespacesRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10361 c.name = name 10362 return c 10363} 10364 10365// Fields allows partial responses to be retrieved. See 10366// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10367// for more information. 10368func (c *NamespacesRoutesGetCall) Fields(s ...googleapi.Field) *NamespacesRoutesGetCall { 10369 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10370 return c 10371} 10372 10373// IfNoneMatch sets the optional parameter which makes the operation 10374// fail if the object's ETag matches the given value. This is useful for 10375// getting updates only after the object has changed since the last 10376// request. Use googleapi.IsNotModified to check whether the response 10377// error from Do is the result of In-None-Match. 10378func (c *NamespacesRoutesGetCall) IfNoneMatch(entityTag string) *NamespacesRoutesGetCall { 10379 c.ifNoneMatch_ = entityTag 10380 return c 10381} 10382 10383// Context sets the context to be used in this call's Do method. Any 10384// pending HTTP request will be aborted if the provided context is 10385// canceled. 10386func (c *NamespacesRoutesGetCall) Context(ctx context.Context) *NamespacesRoutesGetCall { 10387 c.ctx_ = ctx 10388 return c 10389} 10390 10391// Header returns an http.Header that can be modified by the caller to 10392// add HTTP headers to the request. 10393func (c *NamespacesRoutesGetCall) Header() http.Header { 10394 if c.header_ == nil { 10395 c.header_ = make(http.Header) 10396 } 10397 return c.header_ 10398} 10399 10400func (c *NamespacesRoutesGetCall) doRequest(alt string) (*http.Response, error) { 10401 reqHeaders := make(http.Header) 10402 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10403 for k, v := range c.header_ { 10404 reqHeaders[k] = v 10405 } 10406 reqHeaders.Set("User-Agent", c.s.userAgent()) 10407 if c.ifNoneMatch_ != "" { 10408 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10409 } 10410 var body io.Reader = nil 10411 c.urlParams_.Set("alt", alt) 10412 c.urlParams_.Set("prettyPrint", "false") 10413 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+name}") 10414 urls += "?" + c.urlParams_.Encode() 10415 req, err := http.NewRequest("GET", urls, body) 10416 if err != nil { 10417 return nil, err 10418 } 10419 req.Header = reqHeaders 10420 googleapi.Expand(req.URL, map[string]string{ 10421 "name": c.name, 10422 }) 10423 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10424} 10425 10426// Do executes the "run.namespaces.routes.get" call. 10427// Exactly one of *Route or error will be non-nil. Any non-2xx status 10428// code is an error. Response headers are in either 10429// *Route.ServerResponse.Header or (if a response was returned at all) 10430// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10431// check whether the returned error was because http.StatusNotModified 10432// was returned. 10433func (c *NamespacesRoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) { 10434 gensupport.SetOptions(c.urlParams_, opts...) 10435 res, err := c.doRequest("json") 10436 if res != nil && res.StatusCode == http.StatusNotModified { 10437 if res.Body != nil { 10438 res.Body.Close() 10439 } 10440 return nil, &googleapi.Error{ 10441 Code: res.StatusCode, 10442 Header: res.Header, 10443 } 10444 } 10445 if err != nil { 10446 return nil, err 10447 } 10448 defer googleapi.CloseBody(res) 10449 if err := googleapi.CheckResponse(res); err != nil { 10450 return nil, err 10451 } 10452 ret := &Route{ 10453 ServerResponse: googleapi.ServerResponse{ 10454 Header: res.Header, 10455 HTTPStatusCode: res.StatusCode, 10456 }, 10457 } 10458 target := &ret 10459 if err := gensupport.DecodeResponse(target, res); err != nil { 10460 return nil, err 10461 } 10462 return ret, nil 10463 // { 10464 // "description": "Rpc to get information about a route.", 10465 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/routes/{routesId}", 10466 // "httpMethod": "GET", 10467 // "id": "run.namespaces.routes.get", 10468 // "parameterOrder": [ 10469 // "name" 10470 // ], 10471 // "parameters": { 10472 // "name": { 10473 // "description": "The name of the route being retrieved. If needed, replace {namespace_id} with the project ID.", 10474 // "location": "path", 10475 // "pattern": "^namespaces/[^/]+/routes/[^/]+$", 10476 // "required": true, 10477 // "type": "string" 10478 // } 10479 // }, 10480 // "path": "apis/serving.knative.dev/v1alpha1/{+name}", 10481 // "response": { 10482 // "$ref": "Route" 10483 // }, 10484 // "scopes": [ 10485 // "https://www.googleapis.com/auth/cloud-platform" 10486 // ] 10487 // } 10488 10489} 10490 10491// method id "run.namespaces.routes.list": 10492 10493type NamespacesRoutesListCall struct { 10494 s *APIService 10495 parent string 10496 urlParams_ gensupport.URLParams 10497 ifNoneMatch_ string 10498 ctx_ context.Context 10499 header_ http.Header 10500} 10501 10502// List: Rpc to list routes. 10503func (r *NamespacesRoutesService) List(parent string) *NamespacesRoutesListCall { 10504 c := &NamespacesRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10505 c.parent = parent 10506 return c 10507} 10508 10509// Continue sets the optional parameter "continue": Optional encoded 10510// string to continue paging. 10511func (c *NamespacesRoutesListCall) Continue(continue_ string) *NamespacesRoutesListCall { 10512 c.urlParams_.Set("continue", continue_) 10513 return c 10514} 10515 10516// FieldSelector sets the optional parameter "fieldSelector": Allows to 10517// filter resources based on a specific value for a field name. Send 10518// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 10519// currently used by Cloud Run. 10520func (c *NamespacesRoutesListCall) FieldSelector(fieldSelector string) *NamespacesRoutesListCall { 10521 c.urlParams_.Set("fieldSelector", fieldSelector) 10522 return c 10523} 10524 10525// IncludeUninitialized sets the optional parameter 10526// "includeUninitialized": Not currently used by Cloud Run. 10527func (c *NamespacesRoutesListCall) IncludeUninitialized(includeUninitialized bool) *NamespacesRoutesListCall { 10528 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 10529 return c 10530} 10531 10532// LabelSelector sets the optional parameter "labelSelector": Allows to 10533// filter resources based on a label. Supported operations are =, !=, 10534// exists, in, and notIn. 10535func (c *NamespacesRoutesListCall) LabelSelector(labelSelector string) *NamespacesRoutesListCall { 10536 c.urlParams_.Set("labelSelector", labelSelector) 10537 return c 10538} 10539 10540// Limit sets the optional parameter "limit": The maximum number of 10541// records that should be returned. 10542func (c *NamespacesRoutesListCall) Limit(limit int64) *NamespacesRoutesListCall { 10543 c.urlParams_.Set("limit", fmt.Sprint(limit)) 10544 return c 10545} 10546 10547// ResourceVersion sets the optional parameter "resourceVersion": The 10548// baseline resource version from which the list or watch operation 10549// should start. Not currently used by Cloud Run. 10550func (c *NamespacesRoutesListCall) ResourceVersion(resourceVersion string) *NamespacesRoutesListCall { 10551 c.urlParams_.Set("resourceVersion", resourceVersion) 10552 return c 10553} 10554 10555// Watch sets the optional parameter "watch": Flag that indicates that 10556// the client expects to watch this resource as well. Not currently used 10557// by Cloud Run. 10558func (c *NamespacesRoutesListCall) Watch(watch bool) *NamespacesRoutesListCall { 10559 c.urlParams_.Set("watch", fmt.Sprint(watch)) 10560 return c 10561} 10562 10563// Fields allows partial responses to be retrieved. See 10564// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10565// for more information. 10566func (c *NamespacesRoutesListCall) Fields(s ...googleapi.Field) *NamespacesRoutesListCall { 10567 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10568 return c 10569} 10570 10571// IfNoneMatch sets the optional parameter which makes the operation 10572// fail if the object's ETag matches the given value. This is useful for 10573// getting updates only after the object has changed since the last 10574// request. Use googleapi.IsNotModified to check whether the response 10575// error from Do is the result of In-None-Match. 10576func (c *NamespacesRoutesListCall) IfNoneMatch(entityTag string) *NamespacesRoutesListCall { 10577 c.ifNoneMatch_ = entityTag 10578 return c 10579} 10580 10581// Context sets the context to be used in this call's Do method. Any 10582// pending HTTP request will be aborted if the provided context is 10583// canceled. 10584func (c *NamespacesRoutesListCall) Context(ctx context.Context) *NamespacesRoutesListCall { 10585 c.ctx_ = ctx 10586 return c 10587} 10588 10589// Header returns an http.Header that can be modified by the caller to 10590// add HTTP headers to the request. 10591func (c *NamespacesRoutesListCall) Header() http.Header { 10592 if c.header_ == nil { 10593 c.header_ = make(http.Header) 10594 } 10595 return c.header_ 10596} 10597 10598func (c *NamespacesRoutesListCall) doRequest(alt string) (*http.Response, error) { 10599 reqHeaders := make(http.Header) 10600 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10601 for k, v := range c.header_ { 10602 reqHeaders[k] = v 10603 } 10604 reqHeaders.Set("User-Agent", c.s.userAgent()) 10605 if c.ifNoneMatch_ != "" { 10606 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10607 } 10608 var body io.Reader = nil 10609 c.urlParams_.Set("alt", alt) 10610 c.urlParams_.Set("prettyPrint", "false") 10611 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+parent}/routes") 10612 urls += "?" + c.urlParams_.Encode() 10613 req, err := http.NewRequest("GET", urls, body) 10614 if err != nil { 10615 return nil, err 10616 } 10617 req.Header = reqHeaders 10618 googleapi.Expand(req.URL, map[string]string{ 10619 "parent": c.parent, 10620 }) 10621 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10622} 10623 10624// Do executes the "run.namespaces.routes.list" call. 10625// Exactly one of *ListRoutesResponse or error will be non-nil. Any 10626// non-2xx status code is an error. Response headers are in either 10627// *ListRoutesResponse.ServerResponse.Header or (if a response was 10628// returned at all) in error.(*googleapi.Error).Header. Use 10629// googleapi.IsNotModified to check whether the returned error was 10630// because http.StatusNotModified was returned. 10631func (c *NamespacesRoutesListCall) Do(opts ...googleapi.CallOption) (*ListRoutesResponse, error) { 10632 gensupport.SetOptions(c.urlParams_, opts...) 10633 res, err := c.doRequest("json") 10634 if res != nil && res.StatusCode == http.StatusNotModified { 10635 if res.Body != nil { 10636 res.Body.Close() 10637 } 10638 return nil, &googleapi.Error{ 10639 Code: res.StatusCode, 10640 Header: res.Header, 10641 } 10642 } 10643 if err != nil { 10644 return nil, err 10645 } 10646 defer googleapi.CloseBody(res) 10647 if err := googleapi.CheckResponse(res); err != nil { 10648 return nil, err 10649 } 10650 ret := &ListRoutesResponse{ 10651 ServerResponse: googleapi.ServerResponse{ 10652 Header: res.Header, 10653 HTTPStatusCode: res.StatusCode, 10654 }, 10655 } 10656 target := &ret 10657 if err := gensupport.DecodeResponse(target, res); err != nil { 10658 return nil, err 10659 } 10660 return ret, nil 10661 // { 10662 // "description": "Rpc to list routes.", 10663 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/routes", 10664 // "httpMethod": "GET", 10665 // "id": "run.namespaces.routes.list", 10666 // "parameterOrder": [ 10667 // "parent" 10668 // ], 10669 // "parameters": { 10670 // "continue": { 10671 // "description": "Optional encoded string to continue paging.", 10672 // "location": "query", 10673 // "type": "string" 10674 // }, 10675 // "fieldSelector": { 10676 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 10677 // "location": "query", 10678 // "type": "string" 10679 // }, 10680 // "includeUninitialized": { 10681 // "description": "Not currently used by Cloud Run.", 10682 // "location": "query", 10683 // "type": "boolean" 10684 // }, 10685 // "labelSelector": { 10686 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 10687 // "location": "query", 10688 // "type": "string" 10689 // }, 10690 // "limit": { 10691 // "description": "The maximum number of records that should be returned.", 10692 // "format": "int32", 10693 // "location": "query", 10694 // "type": "integer" 10695 // }, 10696 // "parent": { 10697 // "description": "The project ID or project number from which the routes should be listed.", 10698 // "location": "path", 10699 // "pattern": "^namespaces/[^/]+$", 10700 // "required": true, 10701 // "type": "string" 10702 // }, 10703 // "resourceVersion": { 10704 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 10705 // "location": "query", 10706 // "type": "string" 10707 // }, 10708 // "watch": { 10709 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 10710 // "location": "query", 10711 // "type": "boolean" 10712 // } 10713 // }, 10714 // "path": "apis/serving.knative.dev/v1alpha1/{+parent}/routes", 10715 // "response": { 10716 // "$ref": "ListRoutesResponse" 10717 // }, 10718 // "scopes": [ 10719 // "https://www.googleapis.com/auth/cloud-platform" 10720 // ] 10721 // } 10722 10723} 10724 10725// method id "run.namespaces.services.create": 10726 10727type NamespacesServicesCreateCall struct { 10728 s *APIService 10729 parent string 10730 service *Service 10731 urlParams_ gensupport.URLParams 10732 ctx_ context.Context 10733 header_ http.Header 10734} 10735 10736// Create: Rpc to create a service. 10737func (r *NamespacesServicesService) Create(parent string, service *Service) *NamespacesServicesCreateCall { 10738 c := &NamespacesServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10739 c.parent = parent 10740 c.service = service 10741 return c 10742} 10743 10744// Fields allows partial responses to be retrieved. See 10745// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10746// for more information. 10747func (c *NamespacesServicesCreateCall) Fields(s ...googleapi.Field) *NamespacesServicesCreateCall { 10748 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10749 return c 10750} 10751 10752// Context sets the context to be used in this call's Do method. Any 10753// pending HTTP request will be aborted if the provided context is 10754// canceled. 10755func (c *NamespacesServicesCreateCall) Context(ctx context.Context) *NamespacesServicesCreateCall { 10756 c.ctx_ = ctx 10757 return c 10758} 10759 10760// Header returns an http.Header that can be modified by the caller to 10761// add HTTP headers to the request. 10762func (c *NamespacesServicesCreateCall) Header() http.Header { 10763 if c.header_ == nil { 10764 c.header_ = make(http.Header) 10765 } 10766 return c.header_ 10767} 10768 10769func (c *NamespacesServicesCreateCall) doRequest(alt string) (*http.Response, error) { 10770 reqHeaders := make(http.Header) 10771 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10772 for k, v := range c.header_ { 10773 reqHeaders[k] = v 10774 } 10775 reqHeaders.Set("User-Agent", c.s.userAgent()) 10776 var body io.Reader = nil 10777 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) 10778 if err != nil { 10779 return nil, err 10780 } 10781 reqHeaders.Set("Content-Type", "application/json") 10782 c.urlParams_.Set("alt", alt) 10783 c.urlParams_.Set("prettyPrint", "false") 10784 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+parent}/services") 10785 urls += "?" + c.urlParams_.Encode() 10786 req, err := http.NewRequest("POST", urls, body) 10787 if err != nil { 10788 return nil, err 10789 } 10790 req.Header = reqHeaders 10791 googleapi.Expand(req.URL, map[string]string{ 10792 "parent": c.parent, 10793 }) 10794 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10795} 10796 10797// Do executes the "run.namespaces.services.create" call. 10798// Exactly one of *Service or error will be non-nil. Any non-2xx status 10799// code is an error. Response headers are in either 10800// *Service.ServerResponse.Header or (if a response was returned at all) 10801// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10802// check whether the returned error was because http.StatusNotModified 10803// was returned. 10804func (c *NamespacesServicesCreateCall) Do(opts ...googleapi.CallOption) (*Service, error) { 10805 gensupport.SetOptions(c.urlParams_, opts...) 10806 res, err := c.doRequest("json") 10807 if res != nil && res.StatusCode == http.StatusNotModified { 10808 if res.Body != nil { 10809 res.Body.Close() 10810 } 10811 return nil, &googleapi.Error{ 10812 Code: res.StatusCode, 10813 Header: res.Header, 10814 } 10815 } 10816 if err != nil { 10817 return nil, err 10818 } 10819 defer googleapi.CloseBody(res) 10820 if err := googleapi.CheckResponse(res); err != nil { 10821 return nil, err 10822 } 10823 ret := &Service{ 10824 ServerResponse: googleapi.ServerResponse{ 10825 Header: res.Header, 10826 HTTPStatusCode: res.StatusCode, 10827 }, 10828 } 10829 target := &ret 10830 if err := gensupport.DecodeResponse(target, res); err != nil { 10831 return nil, err 10832 } 10833 return ret, nil 10834 // { 10835 // "description": "Rpc to create a service.", 10836 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/services", 10837 // "httpMethod": "POST", 10838 // "id": "run.namespaces.services.create", 10839 // "parameterOrder": [ 10840 // "parent" 10841 // ], 10842 // "parameters": { 10843 // "parent": { 10844 // "description": "The project ID or project number in which this service should be created.", 10845 // "location": "path", 10846 // "pattern": "^namespaces/[^/]+$", 10847 // "required": true, 10848 // "type": "string" 10849 // } 10850 // }, 10851 // "path": "apis/serving.knative.dev/v1alpha1/{+parent}/services", 10852 // "request": { 10853 // "$ref": "Service" 10854 // }, 10855 // "response": { 10856 // "$ref": "Service" 10857 // }, 10858 // "scopes": [ 10859 // "https://www.googleapis.com/auth/cloud-platform" 10860 // ] 10861 // } 10862 10863} 10864 10865// method id "run.namespaces.services.delete": 10866 10867type NamespacesServicesDeleteCall struct { 10868 s *APIService 10869 name string 10870 urlParams_ gensupport.URLParams 10871 ctx_ context.Context 10872 header_ http.Header 10873} 10874 10875// Delete: Rpc to delete a service. This will cause the Service to stop 10876// serving traffic and will delete the child entities like Routes, 10877// Configurations and Revisions. 10878func (r *NamespacesServicesService) Delete(name string) *NamespacesServicesDeleteCall { 10879 c := &NamespacesServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10880 c.name = name 10881 return c 10882} 10883 10884// ApiVersion sets the optional parameter "apiVersion": Cloud Run 10885// currently ignores this parameter. 10886func (c *NamespacesServicesDeleteCall) ApiVersion(apiVersion string) *NamespacesServicesDeleteCall { 10887 c.urlParams_.Set("apiVersion", apiVersion) 10888 return c 10889} 10890 10891// Kind sets the optional parameter "kind": Cloud Run currently ignores 10892// this parameter. 10893func (c *NamespacesServicesDeleteCall) Kind(kind string) *NamespacesServicesDeleteCall { 10894 c.urlParams_.Set("kind", kind) 10895 return c 10896} 10897 10898// OrphanDependents sets the optional parameter "orphanDependents": 10899// Deprecated. Specifies the cascade behavior on delete. Cloud Run only 10900// supports cascading behavior, so this must be false. This attribute is 10901// deprecated, and is now replaced with PropagationPolicy See 10902// https://github.com/kubernetes/kubernetes/issues/46659 for more info. 10903func (c *NamespacesServicesDeleteCall) OrphanDependents(orphanDependents bool) *NamespacesServicesDeleteCall { 10904 c.urlParams_.Set("orphanDependents", fmt.Sprint(orphanDependents)) 10905 return c 10906} 10907 10908// PropagationPolicy sets the optional parameter "propagationPolicy": 10909// Specifies the propagation policy of delete. Cloud Run currently 10910// ignores this setting, and deletes in the background. Please see 10911// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 10912// for more information. 10913func (c *NamespacesServicesDeleteCall) PropagationPolicy(propagationPolicy string) *NamespacesServicesDeleteCall { 10914 c.urlParams_.Set("propagationPolicy", propagationPolicy) 10915 return c 10916} 10917 10918// Fields allows partial responses to be retrieved. See 10919// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10920// for more information. 10921func (c *NamespacesServicesDeleteCall) Fields(s ...googleapi.Field) *NamespacesServicesDeleteCall { 10922 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10923 return c 10924} 10925 10926// Context sets the context to be used in this call's Do method. Any 10927// pending HTTP request will be aborted if the provided context is 10928// canceled. 10929func (c *NamespacesServicesDeleteCall) Context(ctx context.Context) *NamespacesServicesDeleteCall { 10930 c.ctx_ = ctx 10931 return c 10932} 10933 10934// Header returns an http.Header that can be modified by the caller to 10935// add HTTP headers to the request. 10936func (c *NamespacesServicesDeleteCall) Header() http.Header { 10937 if c.header_ == nil { 10938 c.header_ = make(http.Header) 10939 } 10940 return c.header_ 10941} 10942 10943func (c *NamespacesServicesDeleteCall) doRequest(alt string) (*http.Response, error) { 10944 reqHeaders := make(http.Header) 10945 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10946 for k, v := range c.header_ { 10947 reqHeaders[k] = v 10948 } 10949 reqHeaders.Set("User-Agent", c.s.userAgent()) 10950 var body io.Reader = nil 10951 c.urlParams_.Set("alt", alt) 10952 c.urlParams_.Set("prettyPrint", "false") 10953 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+name}") 10954 urls += "?" + c.urlParams_.Encode() 10955 req, err := http.NewRequest("DELETE", urls, body) 10956 if err != nil { 10957 return nil, err 10958 } 10959 req.Header = reqHeaders 10960 googleapi.Expand(req.URL, map[string]string{ 10961 "name": c.name, 10962 }) 10963 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10964} 10965 10966// Do executes the "run.namespaces.services.delete" call. 10967// Exactly one of *Empty or error will be non-nil. Any non-2xx status 10968// code is an error. Response headers are in either 10969// *Empty.ServerResponse.Header or (if a response was returned at all) 10970// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10971// check whether the returned error was because http.StatusNotModified 10972// was returned. 10973func (c *NamespacesServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 10974 gensupport.SetOptions(c.urlParams_, opts...) 10975 res, err := c.doRequest("json") 10976 if res != nil && res.StatusCode == http.StatusNotModified { 10977 if res.Body != nil { 10978 res.Body.Close() 10979 } 10980 return nil, &googleapi.Error{ 10981 Code: res.StatusCode, 10982 Header: res.Header, 10983 } 10984 } 10985 if err != nil { 10986 return nil, err 10987 } 10988 defer googleapi.CloseBody(res) 10989 if err := googleapi.CheckResponse(res); err != nil { 10990 return nil, err 10991 } 10992 ret := &Empty{ 10993 ServerResponse: googleapi.ServerResponse{ 10994 Header: res.Header, 10995 HTTPStatusCode: res.StatusCode, 10996 }, 10997 } 10998 target := &ret 10999 if err := gensupport.DecodeResponse(target, res); err != nil { 11000 return nil, err 11001 } 11002 return ret, nil 11003 // { 11004 // "description": "Rpc to delete a service. This will cause the Service to stop serving traffic and will delete the child entities like Routes, Configurations and Revisions.", 11005 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/services/{servicesId}", 11006 // "httpMethod": "DELETE", 11007 // "id": "run.namespaces.services.delete", 11008 // "parameterOrder": [ 11009 // "name" 11010 // ], 11011 // "parameters": { 11012 // "apiVersion": { 11013 // "description": "Cloud Run currently ignores this parameter.", 11014 // "location": "query", 11015 // "type": "string" 11016 // }, 11017 // "kind": { 11018 // "description": "Cloud Run currently ignores this parameter.", 11019 // "location": "query", 11020 // "type": "string" 11021 // }, 11022 // "name": { 11023 // "description": "The name of the service being deleted. If needed, replace {namespace_id} with the project ID.", 11024 // "location": "path", 11025 // "pattern": "^namespaces/[^/]+/services/[^/]+$", 11026 // "required": true, 11027 // "type": "string" 11028 // }, 11029 // "orphanDependents": { 11030 // "description": "Deprecated. Specifies the cascade behavior on delete. Cloud Run only supports cascading behavior, so this must be false. This attribute is deprecated, and is now replaced with PropagationPolicy See https://github.com/kubernetes/kubernetes/issues/46659 for more info.", 11031 // "location": "query", 11032 // "type": "boolean" 11033 // }, 11034 // "propagationPolicy": { 11035 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 11036 // "location": "query", 11037 // "type": "string" 11038 // } 11039 // }, 11040 // "path": "apis/serving.knative.dev/v1alpha1/{+name}", 11041 // "response": { 11042 // "$ref": "Empty" 11043 // }, 11044 // "scopes": [ 11045 // "https://www.googleapis.com/auth/cloud-platform" 11046 // ] 11047 // } 11048 11049} 11050 11051// method id "run.namespaces.services.get": 11052 11053type NamespacesServicesGetCall struct { 11054 s *APIService 11055 name string 11056 urlParams_ gensupport.URLParams 11057 ifNoneMatch_ string 11058 ctx_ context.Context 11059 header_ http.Header 11060} 11061 11062// Get: Rpc to get information about a service. 11063func (r *NamespacesServicesService) Get(name string) *NamespacesServicesGetCall { 11064 c := &NamespacesServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11065 c.name = name 11066 return c 11067} 11068 11069// Fields allows partial responses to be retrieved. See 11070// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11071// for more information. 11072func (c *NamespacesServicesGetCall) Fields(s ...googleapi.Field) *NamespacesServicesGetCall { 11073 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11074 return c 11075} 11076 11077// IfNoneMatch sets the optional parameter which makes the operation 11078// fail if the object's ETag matches the given value. This is useful for 11079// getting updates only after the object has changed since the last 11080// request. Use googleapi.IsNotModified to check whether the response 11081// error from Do is the result of In-None-Match. 11082func (c *NamespacesServicesGetCall) IfNoneMatch(entityTag string) *NamespacesServicesGetCall { 11083 c.ifNoneMatch_ = entityTag 11084 return c 11085} 11086 11087// Context sets the context to be used in this call's Do method. Any 11088// pending HTTP request will be aborted if the provided context is 11089// canceled. 11090func (c *NamespacesServicesGetCall) Context(ctx context.Context) *NamespacesServicesGetCall { 11091 c.ctx_ = ctx 11092 return c 11093} 11094 11095// Header returns an http.Header that can be modified by the caller to 11096// add HTTP headers to the request. 11097func (c *NamespacesServicesGetCall) Header() http.Header { 11098 if c.header_ == nil { 11099 c.header_ = make(http.Header) 11100 } 11101 return c.header_ 11102} 11103 11104func (c *NamespacesServicesGetCall) doRequest(alt string) (*http.Response, error) { 11105 reqHeaders := make(http.Header) 11106 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11107 for k, v := range c.header_ { 11108 reqHeaders[k] = v 11109 } 11110 reqHeaders.Set("User-Agent", c.s.userAgent()) 11111 if c.ifNoneMatch_ != "" { 11112 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11113 } 11114 var body io.Reader = nil 11115 c.urlParams_.Set("alt", alt) 11116 c.urlParams_.Set("prettyPrint", "false") 11117 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+name}") 11118 urls += "?" + c.urlParams_.Encode() 11119 req, err := http.NewRequest("GET", urls, body) 11120 if err != nil { 11121 return nil, err 11122 } 11123 req.Header = reqHeaders 11124 googleapi.Expand(req.URL, map[string]string{ 11125 "name": c.name, 11126 }) 11127 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11128} 11129 11130// Do executes the "run.namespaces.services.get" call. 11131// Exactly one of *Service or error will be non-nil. Any non-2xx status 11132// code is an error. Response headers are in either 11133// *Service.ServerResponse.Header or (if a response was returned at all) 11134// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11135// check whether the returned error was because http.StatusNotModified 11136// was returned. 11137func (c *NamespacesServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) { 11138 gensupport.SetOptions(c.urlParams_, opts...) 11139 res, err := c.doRequest("json") 11140 if res != nil && res.StatusCode == http.StatusNotModified { 11141 if res.Body != nil { 11142 res.Body.Close() 11143 } 11144 return nil, &googleapi.Error{ 11145 Code: res.StatusCode, 11146 Header: res.Header, 11147 } 11148 } 11149 if err != nil { 11150 return nil, err 11151 } 11152 defer googleapi.CloseBody(res) 11153 if err := googleapi.CheckResponse(res); err != nil { 11154 return nil, err 11155 } 11156 ret := &Service{ 11157 ServerResponse: googleapi.ServerResponse{ 11158 Header: res.Header, 11159 HTTPStatusCode: res.StatusCode, 11160 }, 11161 } 11162 target := &ret 11163 if err := gensupport.DecodeResponse(target, res); err != nil { 11164 return nil, err 11165 } 11166 return ret, nil 11167 // { 11168 // "description": "Rpc to get information about a service.", 11169 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/services/{servicesId}", 11170 // "httpMethod": "GET", 11171 // "id": "run.namespaces.services.get", 11172 // "parameterOrder": [ 11173 // "name" 11174 // ], 11175 // "parameters": { 11176 // "name": { 11177 // "description": "The name of the service being retrieved. If needed, replace {namespace_id} with the project ID.", 11178 // "location": "path", 11179 // "pattern": "^namespaces/[^/]+/services/[^/]+$", 11180 // "required": true, 11181 // "type": "string" 11182 // } 11183 // }, 11184 // "path": "apis/serving.knative.dev/v1alpha1/{+name}", 11185 // "response": { 11186 // "$ref": "Service" 11187 // }, 11188 // "scopes": [ 11189 // "https://www.googleapis.com/auth/cloud-platform" 11190 // ] 11191 // } 11192 11193} 11194 11195// method id "run.namespaces.services.list": 11196 11197type NamespacesServicesListCall struct { 11198 s *APIService 11199 parent string 11200 urlParams_ gensupport.URLParams 11201 ifNoneMatch_ string 11202 ctx_ context.Context 11203 header_ http.Header 11204} 11205 11206// List: Rpc to list services. 11207func (r *NamespacesServicesService) List(parent string) *NamespacesServicesListCall { 11208 c := &NamespacesServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11209 c.parent = parent 11210 return c 11211} 11212 11213// Continue sets the optional parameter "continue": Optional encoded 11214// string to continue paging. 11215func (c *NamespacesServicesListCall) Continue(continue_ string) *NamespacesServicesListCall { 11216 c.urlParams_.Set("continue", continue_) 11217 return c 11218} 11219 11220// FieldSelector sets the optional parameter "fieldSelector": Allows to 11221// filter resources based on a specific value for a field name. Send 11222// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 11223// currently used by Cloud Run. 11224func (c *NamespacesServicesListCall) FieldSelector(fieldSelector string) *NamespacesServicesListCall { 11225 c.urlParams_.Set("fieldSelector", fieldSelector) 11226 return c 11227} 11228 11229// IncludeUninitialized sets the optional parameter 11230// "includeUninitialized": Not currently used by Cloud Run. 11231func (c *NamespacesServicesListCall) IncludeUninitialized(includeUninitialized bool) *NamespacesServicesListCall { 11232 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 11233 return c 11234} 11235 11236// LabelSelector sets the optional parameter "labelSelector": Allows to 11237// filter resources based on a label. Supported operations are =, !=, 11238// exists, in, and notIn. 11239func (c *NamespacesServicesListCall) LabelSelector(labelSelector string) *NamespacesServicesListCall { 11240 c.urlParams_.Set("labelSelector", labelSelector) 11241 return c 11242} 11243 11244// Limit sets the optional parameter "limit": The maximum number of 11245// records that should be returned. 11246func (c *NamespacesServicesListCall) Limit(limit int64) *NamespacesServicesListCall { 11247 c.urlParams_.Set("limit", fmt.Sprint(limit)) 11248 return c 11249} 11250 11251// ResourceVersion sets the optional parameter "resourceVersion": The 11252// baseline resource version from which the list or watch operation 11253// should start. Not currently used by Cloud Run. 11254func (c *NamespacesServicesListCall) ResourceVersion(resourceVersion string) *NamespacesServicesListCall { 11255 c.urlParams_.Set("resourceVersion", resourceVersion) 11256 return c 11257} 11258 11259// Watch sets the optional parameter "watch": Flag that indicates that 11260// the client expects to watch this resource as well. Not currently used 11261// by Cloud Run. 11262func (c *NamespacesServicesListCall) Watch(watch bool) *NamespacesServicesListCall { 11263 c.urlParams_.Set("watch", fmt.Sprint(watch)) 11264 return c 11265} 11266 11267// Fields allows partial responses to be retrieved. See 11268// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11269// for more information. 11270func (c *NamespacesServicesListCall) Fields(s ...googleapi.Field) *NamespacesServicesListCall { 11271 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11272 return c 11273} 11274 11275// IfNoneMatch sets the optional parameter which makes the operation 11276// fail if the object's ETag matches the given value. This is useful for 11277// getting updates only after the object has changed since the last 11278// request. Use googleapi.IsNotModified to check whether the response 11279// error from Do is the result of In-None-Match. 11280func (c *NamespacesServicesListCall) IfNoneMatch(entityTag string) *NamespacesServicesListCall { 11281 c.ifNoneMatch_ = entityTag 11282 return c 11283} 11284 11285// Context sets the context to be used in this call's Do method. Any 11286// pending HTTP request will be aborted if the provided context is 11287// canceled. 11288func (c *NamespacesServicesListCall) Context(ctx context.Context) *NamespacesServicesListCall { 11289 c.ctx_ = ctx 11290 return c 11291} 11292 11293// Header returns an http.Header that can be modified by the caller to 11294// add HTTP headers to the request. 11295func (c *NamespacesServicesListCall) Header() http.Header { 11296 if c.header_ == nil { 11297 c.header_ = make(http.Header) 11298 } 11299 return c.header_ 11300} 11301 11302func (c *NamespacesServicesListCall) doRequest(alt string) (*http.Response, error) { 11303 reqHeaders := make(http.Header) 11304 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11305 for k, v := range c.header_ { 11306 reqHeaders[k] = v 11307 } 11308 reqHeaders.Set("User-Agent", c.s.userAgent()) 11309 if c.ifNoneMatch_ != "" { 11310 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11311 } 11312 var body io.Reader = nil 11313 c.urlParams_.Set("alt", alt) 11314 c.urlParams_.Set("prettyPrint", "false") 11315 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+parent}/services") 11316 urls += "?" + c.urlParams_.Encode() 11317 req, err := http.NewRequest("GET", urls, body) 11318 if err != nil { 11319 return nil, err 11320 } 11321 req.Header = reqHeaders 11322 googleapi.Expand(req.URL, map[string]string{ 11323 "parent": c.parent, 11324 }) 11325 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11326} 11327 11328// Do executes the "run.namespaces.services.list" call. 11329// Exactly one of *ListServicesResponse or error will be non-nil. Any 11330// non-2xx status code is an error. Response headers are in either 11331// *ListServicesResponse.ServerResponse.Header or (if a response was 11332// returned at all) in error.(*googleapi.Error).Header. Use 11333// googleapi.IsNotModified to check whether the returned error was 11334// because http.StatusNotModified was returned. 11335func (c *NamespacesServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) { 11336 gensupport.SetOptions(c.urlParams_, opts...) 11337 res, err := c.doRequest("json") 11338 if res != nil && res.StatusCode == http.StatusNotModified { 11339 if res.Body != nil { 11340 res.Body.Close() 11341 } 11342 return nil, &googleapi.Error{ 11343 Code: res.StatusCode, 11344 Header: res.Header, 11345 } 11346 } 11347 if err != nil { 11348 return nil, err 11349 } 11350 defer googleapi.CloseBody(res) 11351 if err := googleapi.CheckResponse(res); err != nil { 11352 return nil, err 11353 } 11354 ret := &ListServicesResponse{ 11355 ServerResponse: googleapi.ServerResponse{ 11356 Header: res.Header, 11357 HTTPStatusCode: res.StatusCode, 11358 }, 11359 } 11360 target := &ret 11361 if err := gensupport.DecodeResponse(target, res); err != nil { 11362 return nil, err 11363 } 11364 return ret, nil 11365 // { 11366 // "description": "Rpc to list services.", 11367 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/services", 11368 // "httpMethod": "GET", 11369 // "id": "run.namespaces.services.list", 11370 // "parameterOrder": [ 11371 // "parent" 11372 // ], 11373 // "parameters": { 11374 // "continue": { 11375 // "description": "Optional encoded string to continue paging.", 11376 // "location": "query", 11377 // "type": "string" 11378 // }, 11379 // "fieldSelector": { 11380 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 11381 // "location": "query", 11382 // "type": "string" 11383 // }, 11384 // "includeUninitialized": { 11385 // "description": "Not currently used by Cloud Run.", 11386 // "location": "query", 11387 // "type": "boolean" 11388 // }, 11389 // "labelSelector": { 11390 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 11391 // "location": "query", 11392 // "type": "string" 11393 // }, 11394 // "limit": { 11395 // "description": "The maximum number of records that should be returned.", 11396 // "format": "int32", 11397 // "location": "query", 11398 // "type": "integer" 11399 // }, 11400 // "parent": { 11401 // "description": "The project ID or project number from which the services should be listed.", 11402 // "location": "path", 11403 // "pattern": "^namespaces/[^/]+$", 11404 // "required": true, 11405 // "type": "string" 11406 // }, 11407 // "resourceVersion": { 11408 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 11409 // "location": "query", 11410 // "type": "string" 11411 // }, 11412 // "watch": { 11413 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 11414 // "location": "query", 11415 // "type": "boolean" 11416 // } 11417 // }, 11418 // "path": "apis/serving.knative.dev/v1alpha1/{+parent}/services", 11419 // "response": { 11420 // "$ref": "ListServicesResponse" 11421 // }, 11422 // "scopes": [ 11423 // "https://www.googleapis.com/auth/cloud-platform" 11424 // ] 11425 // } 11426 11427} 11428 11429// method id "run.namespaces.services.replaceService": 11430 11431type NamespacesServicesReplaceServiceCall struct { 11432 s *APIService 11433 name string 11434 service *Service 11435 urlParams_ gensupport.URLParams 11436 ctx_ context.Context 11437 header_ http.Header 11438} 11439 11440// ReplaceService: Rpc to replace a service. Only the spec and metadata 11441// labels and annotations are modifiable. After the Update request, 11442// Cloud Run will work to make the 'status' match the requested 'spec'. 11443// May provide metadata.resourceVersion to enforce update from last read 11444// for optimistic concurrency control. 11445func (r *NamespacesServicesService) ReplaceService(name string, service *Service) *NamespacesServicesReplaceServiceCall { 11446 c := &NamespacesServicesReplaceServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11447 c.name = name 11448 c.service = service 11449 return c 11450} 11451 11452// Fields allows partial responses to be retrieved. See 11453// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11454// for more information. 11455func (c *NamespacesServicesReplaceServiceCall) Fields(s ...googleapi.Field) *NamespacesServicesReplaceServiceCall { 11456 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11457 return c 11458} 11459 11460// Context sets the context to be used in this call's Do method. Any 11461// pending HTTP request will be aborted if the provided context is 11462// canceled. 11463func (c *NamespacesServicesReplaceServiceCall) Context(ctx context.Context) *NamespacesServicesReplaceServiceCall { 11464 c.ctx_ = ctx 11465 return c 11466} 11467 11468// Header returns an http.Header that can be modified by the caller to 11469// add HTTP headers to the request. 11470func (c *NamespacesServicesReplaceServiceCall) Header() http.Header { 11471 if c.header_ == nil { 11472 c.header_ = make(http.Header) 11473 } 11474 return c.header_ 11475} 11476 11477func (c *NamespacesServicesReplaceServiceCall) doRequest(alt string) (*http.Response, error) { 11478 reqHeaders := make(http.Header) 11479 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11480 for k, v := range c.header_ { 11481 reqHeaders[k] = v 11482 } 11483 reqHeaders.Set("User-Agent", c.s.userAgent()) 11484 var body io.Reader = nil 11485 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) 11486 if err != nil { 11487 return nil, err 11488 } 11489 reqHeaders.Set("Content-Type", "application/json") 11490 c.urlParams_.Set("alt", alt) 11491 c.urlParams_.Set("prettyPrint", "false") 11492 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/serving.knative.dev/v1alpha1/{+name}") 11493 urls += "?" + c.urlParams_.Encode() 11494 req, err := http.NewRequest("PUT", urls, body) 11495 if err != nil { 11496 return nil, err 11497 } 11498 req.Header = reqHeaders 11499 googleapi.Expand(req.URL, map[string]string{ 11500 "name": c.name, 11501 }) 11502 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11503} 11504 11505// Do executes the "run.namespaces.services.replaceService" call. 11506// Exactly one of *Service or error will be non-nil. Any non-2xx status 11507// code is an error. Response headers are in either 11508// *Service.ServerResponse.Header or (if a response was returned at all) 11509// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11510// check whether the returned error was because http.StatusNotModified 11511// was returned. 11512func (c *NamespacesServicesReplaceServiceCall) Do(opts ...googleapi.CallOption) (*Service, error) { 11513 gensupport.SetOptions(c.urlParams_, opts...) 11514 res, err := c.doRequest("json") 11515 if res != nil && res.StatusCode == http.StatusNotModified { 11516 if res.Body != nil { 11517 res.Body.Close() 11518 } 11519 return nil, &googleapi.Error{ 11520 Code: res.StatusCode, 11521 Header: res.Header, 11522 } 11523 } 11524 if err != nil { 11525 return nil, err 11526 } 11527 defer googleapi.CloseBody(res) 11528 if err := googleapi.CheckResponse(res); err != nil { 11529 return nil, err 11530 } 11531 ret := &Service{ 11532 ServerResponse: googleapi.ServerResponse{ 11533 Header: res.Header, 11534 HTTPStatusCode: res.StatusCode, 11535 }, 11536 } 11537 target := &ret 11538 if err := gensupport.DecodeResponse(target, res); err != nil { 11539 return nil, err 11540 } 11541 return ret, nil 11542 // { 11543 // "description": "Rpc to replace a service. Only the spec and metadata labels and annotations are modifiable. After the Update request, Cloud Run will work to make the 'status' match the requested 'spec'. May provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.", 11544 // "flatPath": "apis/serving.knative.dev/v1alpha1/namespaces/{namespacesId}/services/{servicesId}", 11545 // "httpMethod": "PUT", 11546 // "id": "run.namespaces.services.replaceService", 11547 // "parameterOrder": [ 11548 // "name" 11549 // ], 11550 // "parameters": { 11551 // "name": { 11552 // "description": "The name of the service being replaced. If needed, replace {namespace_id} with the project ID.", 11553 // "location": "path", 11554 // "pattern": "^namespaces/[^/]+/services/[^/]+$", 11555 // "required": true, 11556 // "type": "string" 11557 // } 11558 // }, 11559 // "path": "apis/serving.knative.dev/v1alpha1/{+name}", 11560 // "request": { 11561 // "$ref": "Service" 11562 // }, 11563 // "response": { 11564 // "$ref": "Service" 11565 // }, 11566 // "scopes": [ 11567 // "https://www.googleapis.com/auth/cloud-platform" 11568 // ] 11569 // } 11570 11571} 11572 11573// method id "run.namespaces.triggers.create": 11574 11575type NamespacesTriggersCreateCall struct { 11576 s *APIService 11577 parent string 11578 trigger *Trigger 11579 urlParams_ gensupport.URLParams 11580 ctx_ context.Context 11581 header_ http.Header 11582} 11583 11584// Create: Creates a new trigger. 11585func (r *NamespacesTriggersService) Create(parent string, trigger *Trigger) *NamespacesTriggersCreateCall { 11586 c := &NamespacesTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11587 c.parent = parent 11588 c.trigger = trigger 11589 return c 11590} 11591 11592// Fields allows partial responses to be retrieved. See 11593// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11594// for more information. 11595func (c *NamespacesTriggersCreateCall) Fields(s ...googleapi.Field) *NamespacesTriggersCreateCall { 11596 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11597 return c 11598} 11599 11600// Context sets the context to be used in this call's Do method. Any 11601// pending HTTP request will be aborted if the provided context is 11602// canceled. 11603func (c *NamespacesTriggersCreateCall) Context(ctx context.Context) *NamespacesTriggersCreateCall { 11604 c.ctx_ = ctx 11605 return c 11606} 11607 11608// Header returns an http.Header that can be modified by the caller to 11609// add HTTP headers to the request. 11610func (c *NamespacesTriggersCreateCall) Header() http.Header { 11611 if c.header_ == nil { 11612 c.header_ = make(http.Header) 11613 } 11614 return c.header_ 11615} 11616 11617func (c *NamespacesTriggersCreateCall) doRequest(alt string) (*http.Response, error) { 11618 reqHeaders := make(http.Header) 11619 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11620 for k, v := range c.header_ { 11621 reqHeaders[k] = v 11622 } 11623 reqHeaders.Set("User-Agent", c.s.userAgent()) 11624 var body io.Reader = nil 11625 body, err := googleapi.WithoutDataWrapper.JSONReader(c.trigger) 11626 if err != nil { 11627 return nil, err 11628 } 11629 reqHeaders.Set("Content-Type", "application/json") 11630 c.urlParams_.Set("alt", alt) 11631 c.urlParams_.Set("prettyPrint", "false") 11632 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/eventing.knative.dev/v1alpha1/{+parent}/triggers") 11633 urls += "?" + c.urlParams_.Encode() 11634 req, err := http.NewRequest("POST", urls, body) 11635 if err != nil { 11636 return nil, err 11637 } 11638 req.Header = reqHeaders 11639 googleapi.Expand(req.URL, map[string]string{ 11640 "parent": c.parent, 11641 }) 11642 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11643} 11644 11645// Do executes the "run.namespaces.triggers.create" call. 11646// Exactly one of *Trigger or error will be non-nil. Any non-2xx status 11647// code is an error. Response headers are in either 11648// *Trigger.ServerResponse.Header or (if a response was returned at all) 11649// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11650// check whether the returned error was because http.StatusNotModified 11651// was returned. 11652func (c *NamespacesTriggersCreateCall) Do(opts ...googleapi.CallOption) (*Trigger, error) { 11653 gensupport.SetOptions(c.urlParams_, opts...) 11654 res, err := c.doRequest("json") 11655 if res != nil && res.StatusCode == http.StatusNotModified { 11656 if res.Body != nil { 11657 res.Body.Close() 11658 } 11659 return nil, &googleapi.Error{ 11660 Code: res.StatusCode, 11661 Header: res.Header, 11662 } 11663 } 11664 if err != nil { 11665 return nil, err 11666 } 11667 defer googleapi.CloseBody(res) 11668 if err := googleapi.CheckResponse(res); err != nil { 11669 return nil, err 11670 } 11671 ret := &Trigger{ 11672 ServerResponse: googleapi.ServerResponse{ 11673 Header: res.Header, 11674 HTTPStatusCode: res.StatusCode, 11675 }, 11676 } 11677 target := &ret 11678 if err := gensupport.DecodeResponse(target, res); err != nil { 11679 return nil, err 11680 } 11681 return ret, nil 11682 // { 11683 // "description": "Creates a new trigger.", 11684 // "flatPath": "apis/eventing.knative.dev/v1alpha1/namespaces/{namespacesId}/triggers", 11685 // "httpMethod": "POST", 11686 // "id": "run.namespaces.triggers.create", 11687 // "parameterOrder": [ 11688 // "parent" 11689 // ], 11690 // "parameters": { 11691 // "parent": { 11692 // "description": "The project ID or project number in which this trigger should be created.", 11693 // "location": "path", 11694 // "pattern": "^namespaces/[^/]+$", 11695 // "required": true, 11696 // "type": "string" 11697 // } 11698 // }, 11699 // "path": "apis/eventing.knative.dev/v1alpha1/{+parent}/triggers", 11700 // "request": { 11701 // "$ref": "Trigger" 11702 // }, 11703 // "response": { 11704 // "$ref": "Trigger" 11705 // }, 11706 // "scopes": [ 11707 // "https://www.googleapis.com/auth/cloud-platform" 11708 // ] 11709 // } 11710 11711} 11712 11713// method id "run.namespaces.triggers.delete": 11714 11715type NamespacesTriggersDeleteCall struct { 11716 s *APIService 11717 name string 11718 urlParams_ gensupport.URLParams 11719 ctx_ context.Context 11720 header_ http.Header 11721} 11722 11723// Delete: Rpc to delete a trigger. 11724func (r *NamespacesTriggersService) Delete(name string) *NamespacesTriggersDeleteCall { 11725 c := &NamespacesTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11726 c.name = name 11727 return c 11728} 11729 11730// ApiVersion sets the optional parameter "apiVersion": Cloud Run 11731// currently ignores this parameter. 11732func (c *NamespacesTriggersDeleteCall) ApiVersion(apiVersion string) *NamespacesTriggersDeleteCall { 11733 c.urlParams_.Set("apiVersion", apiVersion) 11734 return c 11735} 11736 11737// Kind sets the optional parameter "kind": Cloud Run currently ignores 11738// this parameter. 11739func (c *NamespacesTriggersDeleteCall) Kind(kind string) *NamespacesTriggersDeleteCall { 11740 c.urlParams_.Set("kind", kind) 11741 return c 11742} 11743 11744// PropagationPolicy sets the optional parameter "propagationPolicy": 11745// Specifies the propagation policy of delete. Cloud Run currently 11746// ignores this setting, and deletes in the background. Please see 11747// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 11748// for more information. 11749func (c *NamespacesTriggersDeleteCall) PropagationPolicy(propagationPolicy string) *NamespacesTriggersDeleteCall { 11750 c.urlParams_.Set("propagationPolicy", propagationPolicy) 11751 return c 11752} 11753 11754// Fields allows partial responses to be retrieved. See 11755// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11756// for more information. 11757func (c *NamespacesTriggersDeleteCall) Fields(s ...googleapi.Field) *NamespacesTriggersDeleteCall { 11758 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11759 return c 11760} 11761 11762// Context sets the context to be used in this call's Do method. Any 11763// pending HTTP request will be aborted if the provided context is 11764// canceled. 11765func (c *NamespacesTriggersDeleteCall) Context(ctx context.Context) *NamespacesTriggersDeleteCall { 11766 c.ctx_ = ctx 11767 return c 11768} 11769 11770// Header returns an http.Header that can be modified by the caller to 11771// add HTTP headers to the request. 11772func (c *NamespacesTriggersDeleteCall) Header() http.Header { 11773 if c.header_ == nil { 11774 c.header_ = make(http.Header) 11775 } 11776 return c.header_ 11777} 11778 11779func (c *NamespacesTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { 11780 reqHeaders := make(http.Header) 11781 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11782 for k, v := range c.header_ { 11783 reqHeaders[k] = v 11784 } 11785 reqHeaders.Set("User-Agent", c.s.userAgent()) 11786 var body io.Reader = nil 11787 c.urlParams_.Set("alt", alt) 11788 c.urlParams_.Set("prettyPrint", "false") 11789 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/eventing.knative.dev/v1alpha1/{+name}") 11790 urls += "?" + c.urlParams_.Encode() 11791 req, err := http.NewRequest("DELETE", urls, body) 11792 if err != nil { 11793 return nil, err 11794 } 11795 req.Header = reqHeaders 11796 googleapi.Expand(req.URL, map[string]string{ 11797 "name": c.name, 11798 }) 11799 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11800} 11801 11802// Do executes the "run.namespaces.triggers.delete" call. 11803// Exactly one of *Empty or error will be non-nil. Any non-2xx status 11804// code is an error. Response headers are in either 11805// *Empty.ServerResponse.Header or (if a response was returned at all) 11806// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11807// check whether the returned error was because http.StatusNotModified 11808// was returned. 11809func (c *NamespacesTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 11810 gensupport.SetOptions(c.urlParams_, opts...) 11811 res, err := c.doRequest("json") 11812 if res != nil && res.StatusCode == http.StatusNotModified { 11813 if res.Body != nil { 11814 res.Body.Close() 11815 } 11816 return nil, &googleapi.Error{ 11817 Code: res.StatusCode, 11818 Header: res.Header, 11819 } 11820 } 11821 if err != nil { 11822 return nil, err 11823 } 11824 defer googleapi.CloseBody(res) 11825 if err := googleapi.CheckResponse(res); err != nil { 11826 return nil, err 11827 } 11828 ret := &Empty{ 11829 ServerResponse: googleapi.ServerResponse{ 11830 Header: res.Header, 11831 HTTPStatusCode: res.StatusCode, 11832 }, 11833 } 11834 target := &ret 11835 if err := gensupport.DecodeResponse(target, res); err != nil { 11836 return nil, err 11837 } 11838 return ret, nil 11839 // { 11840 // "description": "Rpc to delete a trigger.", 11841 // "flatPath": "apis/eventing.knative.dev/v1alpha1/namespaces/{namespacesId}/triggers/{triggersId}", 11842 // "httpMethod": "DELETE", 11843 // "id": "run.namespaces.triggers.delete", 11844 // "parameterOrder": [ 11845 // "name" 11846 // ], 11847 // "parameters": { 11848 // "apiVersion": { 11849 // "description": "Cloud Run currently ignores this parameter.", 11850 // "location": "query", 11851 // "type": "string" 11852 // }, 11853 // "kind": { 11854 // "description": "Cloud Run currently ignores this parameter.", 11855 // "location": "query", 11856 // "type": "string" 11857 // }, 11858 // "name": { 11859 // "description": "The name of the trigger being deleted. If needed, replace {namespace_id} with the project ID.", 11860 // "location": "path", 11861 // "pattern": "^namespaces/[^/]+/triggers/[^/]+$", 11862 // "required": true, 11863 // "type": "string" 11864 // }, 11865 // "propagationPolicy": { 11866 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 11867 // "location": "query", 11868 // "type": "string" 11869 // } 11870 // }, 11871 // "path": "apis/eventing.knative.dev/v1alpha1/{+name}", 11872 // "response": { 11873 // "$ref": "Empty" 11874 // }, 11875 // "scopes": [ 11876 // "https://www.googleapis.com/auth/cloud-platform" 11877 // ] 11878 // } 11879 11880} 11881 11882// method id "run.namespaces.triggers.get": 11883 11884type NamespacesTriggersGetCall struct { 11885 s *APIService 11886 name string 11887 urlParams_ gensupport.URLParams 11888 ifNoneMatch_ string 11889 ctx_ context.Context 11890 header_ http.Header 11891} 11892 11893// Get: Rpc to get information about a trigger. 11894func (r *NamespacesTriggersService) Get(name string) *NamespacesTriggersGetCall { 11895 c := &NamespacesTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11896 c.name = name 11897 return c 11898} 11899 11900// Fields allows partial responses to be retrieved. See 11901// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11902// for more information. 11903func (c *NamespacesTriggersGetCall) Fields(s ...googleapi.Field) *NamespacesTriggersGetCall { 11904 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11905 return c 11906} 11907 11908// IfNoneMatch sets the optional parameter which makes the operation 11909// fail if the object's ETag matches the given value. This is useful for 11910// getting updates only after the object has changed since the last 11911// request. Use googleapi.IsNotModified to check whether the response 11912// error from Do is the result of In-None-Match. 11913func (c *NamespacesTriggersGetCall) IfNoneMatch(entityTag string) *NamespacesTriggersGetCall { 11914 c.ifNoneMatch_ = entityTag 11915 return c 11916} 11917 11918// Context sets the context to be used in this call's Do method. Any 11919// pending HTTP request will be aborted if the provided context is 11920// canceled. 11921func (c *NamespacesTriggersGetCall) Context(ctx context.Context) *NamespacesTriggersGetCall { 11922 c.ctx_ = ctx 11923 return c 11924} 11925 11926// Header returns an http.Header that can be modified by the caller to 11927// add HTTP headers to the request. 11928func (c *NamespacesTriggersGetCall) Header() http.Header { 11929 if c.header_ == nil { 11930 c.header_ = make(http.Header) 11931 } 11932 return c.header_ 11933} 11934 11935func (c *NamespacesTriggersGetCall) doRequest(alt string) (*http.Response, error) { 11936 reqHeaders := make(http.Header) 11937 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11938 for k, v := range c.header_ { 11939 reqHeaders[k] = v 11940 } 11941 reqHeaders.Set("User-Agent", c.s.userAgent()) 11942 if c.ifNoneMatch_ != "" { 11943 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11944 } 11945 var body io.Reader = nil 11946 c.urlParams_.Set("alt", alt) 11947 c.urlParams_.Set("prettyPrint", "false") 11948 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/eventing.knative.dev/v1alpha1/{+name}") 11949 urls += "?" + c.urlParams_.Encode() 11950 req, err := http.NewRequest("GET", urls, body) 11951 if err != nil { 11952 return nil, err 11953 } 11954 req.Header = reqHeaders 11955 googleapi.Expand(req.URL, map[string]string{ 11956 "name": c.name, 11957 }) 11958 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11959} 11960 11961// Do executes the "run.namespaces.triggers.get" call. 11962// Exactly one of *Trigger or error will be non-nil. Any non-2xx status 11963// code is an error. Response headers are in either 11964// *Trigger.ServerResponse.Header or (if a response was returned at all) 11965// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11966// check whether the returned error was because http.StatusNotModified 11967// was returned. 11968func (c *NamespacesTriggersGetCall) Do(opts ...googleapi.CallOption) (*Trigger, error) { 11969 gensupport.SetOptions(c.urlParams_, opts...) 11970 res, err := c.doRequest("json") 11971 if res != nil && res.StatusCode == http.StatusNotModified { 11972 if res.Body != nil { 11973 res.Body.Close() 11974 } 11975 return nil, &googleapi.Error{ 11976 Code: res.StatusCode, 11977 Header: res.Header, 11978 } 11979 } 11980 if err != nil { 11981 return nil, err 11982 } 11983 defer googleapi.CloseBody(res) 11984 if err := googleapi.CheckResponse(res); err != nil { 11985 return nil, err 11986 } 11987 ret := &Trigger{ 11988 ServerResponse: googleapi.ServerResponse{ 11989 Header: res.Header, 11990 HTTPStatusCode: res.StatusCode, 11991 }, 11992 } 11993 target := &ret 11994 if err := gensupport.DecodeResponse(target, res); err != nil { 11995 return nil, err 11996 } 11997 return ret, nil 11998 // { 11999 // "description": "Rpc to get information about a trigger.", 12000 // "flatPath": "apis/eventing.knative.dev/v1alpha1/namespaces/{namespacesId}/triggers/{triggersId}", 12001 // "httpMethod": "GET", 12002 // "id": "run.namespaces.triggers.get", 12003 // "parameterOrder": [ 12004 // "name" 12005 // ], 12006 // "parameters": { 12007 // "name": { 12008 // "description": "The name of the trigger being retrieved. If needed, replace {namespace_id} with the project ID.", 12009 // "location": "path", 12010 // "pattern": "^namespaces/[^/]+/triggers/[^/]+$", 12011 // "required": true, 12012 // "type": "string" 12013 // } 12014 // }, 12015 // "path": "apis/eventing.knative.dev/v1alpha1/{+name}", 12016 // "response": { 12017 // "$ref": "Trigger" 12018 // }, 12019 // "scopes": [ 12020 // "https://www.googleapis.com/auth/cloud-platform" 12021 // ] 12022 // } 12023 12024} 12025 12026// method id "run.namespaces.triggers.list": 12027 12028type NamespacesTriggersListCall struct { 12029 s *APIService 12030 parent string 12031 urlParams_ gensupport.URLParams 12032 ifNoneMatch_ string 12033 ctx_ context.Context 12034 header_ http.Header 12035} 12036 12037// List: Rpc to list triggers. 12038func (r *NamespacesTriggersService) List(parent string) *NamespacesTriggersListCall { 12039 c := &NamespacesTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12040 c.parent = parent 12041 return c 12042} 12043 12044// Continue sets the optional parameter "continue": Encoded string to 12045// continue paging. 12046func (c *NamespacesTriggersListCall) Continue(continue_ string) *NamespacesTriggersListCall { 12047 c.urlParams_.Set("continue", continue_) 12048 return c 12049} 12050 12051// FieldSelector sets the optional parameter "fieldSelector": Allows to 12052// filter resources based on a specific value for a field name. Send 12053// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 12054// currently used by Cloud Run. 12055func (c *NamespacesTriggersListCall) FieldSelector(fieldSelector string) *NamespacesTriggersListCall { 12056 c.urlParams_.Set("fieldSelector", fieldSelector) 12057 return c 12058} 12059 12060// IncludeUninitialized sets the optional parameter 12061// "includeUninitialized": Not currently used by Cloud Run. 12062func (c *NamespacesTriggersListCall) IncludeUninitialized(includeUninitialized bool) *NamespacesTriggersListCall { 12063 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 12064 return c 12065} 12066 12067// LabelSelector sets the optional parameter "labelSelector": Allows to 12068// filter resources based on a label. Supported operations are =, !=, 12069// exists, in, and notIn. 12070func (c *NamespacesTriggersListCall) LabelSelector(labelSelector string) *NamespacesTriggersListCall { 12071 c.urlParams_.Set("labelSelector", labelSelector) 12072 return c 12073} 12074 12075// Limit sets the optional parameter "limit": The maximum number of 12076// records that should be returned. 12077func (c *NamespacesTriggersListCall) Limit(limit int64) *NamespacesTriggersListCall { 12078 c.urlParams_.Set("limit", fmt.Sprint(limit)) 12079 return c 12080} 12081 12082// ResourceVersion sets the optional parameter "resourceVersion": The 12083// baseline resource version from which the list or watch operation 12084// should start. Not currently used by Cloud Run. 12085func (c *NamespacesTriggersListCall) ResourceVersion(resourceVersion string) *NamespacesTriggersListCall { 12086 c.urlParams_.Set("resourceVersion", resourceVersion) 12087 return c 12088} 12089 12090// Watch sets the optional parameter "watch": Flag that indicates that 12091// the client expects to watch this resource as well. Not currently used 12092// by Cloud Run. 12093func (c *NamespacesTriggersListCall) Watch(watch bool) *NamespacesTriggersListCall { 12094 c.urlParams_.Set("watch", fmt.Sprint(watch)) 12095 return c 12096} 12097 12098// Fields allows partial responses to be retrieved. See 12099// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12100// for more information. 12101func (c *NamespacesTriggersListCall) Fields(s ...googleapi.Field) *NamespacesTriggersListCall { 12102 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12103 return c 12104} 12105 12106// IfNoneMatch sets the optional parameter which makes the operation 12107// fail if the object's ETag matches the given value. This is useful for 12108// getting updates only after the object has changed since the last 12109// request. Use googleapi.IsNotModified to check whether the response 12110// error from Do is the result of In-None-Match. 12111func (c *NamespacesTriggersListCall) IfNoneMatch(entityTag string) *NamespacesTriggersListCall { 12112 c.ifNoneMatch_ = entityTag 12113 return c 12114} 12115 12116// Context sets the context to be used in this call's Do method. Any 12117// pending HTTP request will be aborted if the provided context is 12118// canceled. 12119func (c *NamespacesTriggersListCall) Context(ctx context.Context) *NamespacesTriggersListCall { 12120 c.ctx_ = ctx 12121 return c 12122} 12123 12124// Header returns an http.Header that can be modified by the caller to 12125// add HTTP headers to the request. 12126func (c *NamespacesTriggersListCall) Header() http.Header { 12127 if c.header_ == nil { 12128 c.header_ = make(http.Header) 12129 } 12130 return c.header_ 12131} 12132 12133func (c *NamespacesTriggersListCall) doRequest(alt string) (*http.Response, error) { 12134 reqHeaders := make(http.Header) 12135 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12136 for k, v := range c.header_ { 12137 reqHeaders[k] = v 12138 } 12139 reqHeaders.Set("User-Agent", c.s.userAgent()) 12140 if c.ifNoneMatch_ != "" { 12141 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12142 } 12143 var body io.Reader = nil 12144 c.urlParams_.Set("alt", alt) 12145 c.urlParams_.Set("prettyPrint", "false") 12146 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/eventing.knative.dev/v1alpha1/{+parent}/triggers") 12147 urls += "?" + c.urlParams_.Encode() 12148 req, err := http.NewRequest("GET", urls, body) 12149 if err != nil { 12150 return nil, err 12151 } 12152 req.Header = reqHeaders 12153 googleapi.Expand(req.URL, map[string]string{ 12154 "parent": c.parent, 12155 }) 12156 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12157} 12158 12159// Do executes the "run.namespaces.triggers.list" call. 12160// Exactly one of *ListTriggersResponse or error will be non-nil. Any 12161// non-2xx status code is an error. Response headers are in either 12162// *ListTriggersResponse.ServerResponse.Header or (if a response was 12163// returned at all) in error.(*googleapi.Error).Header. Use 12164// googleapi.IsNotModified to check whether the returned error was 12165// because http.StatusNotModified was returned. 12166func (c *NamespacesTriggersListCall) Do(opts ...googleapi.CallOption) (*ListTriggersResponse, error) { 12167 gensupport.SetOptions(c.urlParams_, opts...) 12168 res, err := c.doRequest("json") 12169 if res != nil && res.StatusCode == http.StatusNotModified { 12170 if res.Body != nil { 12171 res.Body.Close() 12172 } 12173 return nil, &googleapi.Error{ 12174 Code: res.StatusCode, 12175 Header: res.Header, 12176 } 12177 } 12178 if err != nil { 12179 return nil, err 12180 } 12181 defer googleapi.CloseBody(res) 12182 if err := googleapi.CheckResponse(res); err != nil { 12183 return nil, err 12184 } 12185 ret := &ListTriggersResponse{ 12186 ServerResponse: googleapi.ServerResponse{ 12187 Header: res.Header, 12188 HTTPStatusCode: res.StatusCode, 12189 }, 12190 } 12191 target := &ret 12192 if err := gensupport.DecodeResponse(target, res); err != nil { 12193 return nil, err 12194 } 12195 return ret, nil 12196 // { 12197 // "description": "Rpc to list triggers.", 12198 // "flatPath": "apis/eventing.knative.dev/v1alpha1/namespaces/{namespacesId}/triggers", 12199 // "httpMethod": "GET", 12200 // "id": "run.namespaces.triggers.list", 12201 // "parameterOrder": [ 12202 // "parent" 12203 // ], 12204 // "parameters": { 12205 // "continue": { 12206 // "description": "Optional. Encoded string to continue paging.", 12207 // "location": "query", 12208 // "type": "string" 12209 // }, 12210 // "fieldSelector": { 12211 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 12212 // "location": "query", 12213 // "type": "string" 12214 // }, 12215 // "includeUninitialized": { 12216 // "description": "Not currently used by Cloud Run.", 12217 // "location": "query", 12218 // "type": "boolean" 12219 // }, 12220 // "labelSelector": { 12221 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 12222 // "location": "query", 12223 // "type": "string" 12224 // }, 12225 // "limit": { 12226 // "description": "The maximum number of records that should be returned.", 12227 // "format": "int32", 12228 // "location": "query", 12229 // "type": "integer" 12230 // }, 12231 // "parent": { 12232 // "description": "The project ID or project number from which the triggers should be listed.", 12233 // "location": "path", 12234 // "pattern": "^namespaces/[^/]+$", 12235 // "required": true, 12236 // "type": "string" 12237 // }, 12238 // "resourceVersion": { 12239 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 12240 // "location": "query", 12241 // "type": "string" 12242 // }, 12243 // "watch": { 12244 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 12245 // "location": "query", 12246 // "type": "boolean" 12247 // } 12248 // }, 12249 // "path": "apis/eventing.knative.dev/v1alpha1/{+parent}/triggers", 12250 // "response": { 12251 // "$ref": "ListTriggersResponse" 12252 // }, 12253 // "scopes": [ 12254 // "https://www.googleapis.com/auth/cloud-platform" 12255 // ] 12256 // } 12257 12258} 12259 12260// method id "run.projects.locations.list": 12261 12262type ProjectsLocationsListCall struct { 12263 s *APIService 12264 name string 12265 urlParams_ gensupport.URLParams 12266 ifNoneMatch_ string 12267 ctx_ context.Context 12268 header_ http.Header 12269} 12270 12271// List: Lists information about the supported locations for this 12272// service. 12273func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 12274 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12275 c.name = name 12276 return c 12277} 12278 12279// Filter sets the optional parameter "filter": The standard list 12280// filter. 12281func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 12282 c.urlParams_.Set("filter", filter) 12283 return c 12284} 12285 12286// PageSize sets the optional parameter "pageSize": The standard list 12287// page size. 12288func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 12289 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12290 return c 12291} 12292 12293// PageToken sets the optional parameter "pageToken": The standard list 12294// page token. 12295func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 12296 c.urlParams_.Set("pageToken", pageToken) 12297 return c 12298} 12299 12300// Fields allows partial responses to be retrieved. See 12301// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12302// for more information. 12303func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 12304 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12305 return c 12306} 12307 12308// IfNoneMatch sets the optional parameter which makes the operation 12309// fail if the object's ETag matches the given value. This is useful for 12310// getting updates only after the object has changed since the last 12311// request. Use googleapi.IsNotModified to check whether the response 12312// error from Do is the result of In-None-Match. 12313func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 12314 c.ifNoneMatch_ = entityTag 12315 return c 12316} 12317 12318// Context sets the context to be used in this call's Do method. Any 12319// pending HTTP request will be aborted if the provided context is 12320// canceled. 12321func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 12322 c.ctx_ = ctx 12323 return c 12324} 12325 12326// Header returns an http.Header that can be modified by the caller to 12327// add HTTP headers to the request. 12328func (c *ProjectsLocationsListCall) Header() http.Header { 12329 if c.header_ == nil { 12330 c.header_ = make(http.Header) 12331 } 12332 return c.header_ 12333} 12334 12335func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 12336 reqHeaders := make(http.Header) 12337 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12338 for k, v := range c.header_ { 12339 reqHeaders[k] = v 12340 } 12341 reqHeaders.Set("User-Agent", c.s.userAgent()) 12342 if c.ifNoneMatch_ != "" { 12343 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12344 } 12345 var body io.Reader = nil 12346 c.urlParams_.Set("alt", alt) 12347 c.urlParams_.Set("prettyPrint", "false") 12348 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/locations") 12349 urls += "?" + c.urlParams_.Encode() 12350 req, err := http.NewRequest("GET", urls, body) 12351 if err != nil { 12352 return nil, err 12353 } 12354 req.Header = reqHeaders 12355 googleapi.Expand(req.URL, map[string]string{ 12356 "name": c.name, 12357 }) 12358 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12359} 12360 12361// Do executes the "run.projects.locations.list" call. 12362// Exactly one of *ListLocationsResponse or error will be non-nil. Any 12363// non-2xx status code is an error. Response headers are in either 12364// *ListLocationsResponse.ServerResponse.Header or (if a response was 12365// returned at all) in error.(*googleapi.Error).Header. Use 12366// googleapi.IsNotModified to check whether the returned error was 12367// because http.StatusNotModified was returned. 12368func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 12369 gensupport.SetOptions(c.urlParams_, opts...) 12370 res, err := c.doRequest("json") 12371 if res != nil && res.StatusCode == http.StatusNotModified { 12372 if res.Body != nil { 12373 res.Body.Close() 12374 } 12375 return nil, &googleapi.Error{ 12376 Code: res.StatusCode, 12377 Header: res.Header, 12378 } 12379 } 12380 if err != nil { 12381 return nil, err 12382 } 12383 defer googleapi.CloseBody(res) 12384 if err := googleapi.CheckResponse(res); err != nil { 12385 return nil, err 12386 } 12387 ret := &ListLocationsResponse{ 12388 ServerResponse: googleapi.ServerResponse{ 12389 Header: res.Header, 12390 HTTPStatusCode: res.StatusCode, 12391 }, 12392 } 12393 target := &ret 12394 if err := gensupport.DecodeResponse(target, res); err != nil { 12395 return nil, err 12396 } 12397 return ret, nil 12398 // { 12399 // "description": "Lists information about the supported locations for this service.", 12400 // "flatPath": "v1alpha1/projects/{projectsId}/locations", 12401 // "httpMethod": "GET", 12402 // "id": "run.projects.locations.list", 12403 // "parameterOrder": [ 12404 // "name" 12405 // ], 12406 // "parameters": { 12407 // "filter": { 12408 // "description": "The standard list filter.", 12409 // "location": "query", 12410 // "type": "string" 12411 // }, 12412 // "name": { 12413 // "description": "The resource that owns the locations collection, if applicable.", 12414 // "location": "path", 12415 // "pattern": "^projects/[^/]+$", 12416 // "required": true, 12417 // "type": "string" 12418 // }, 12419 // "pageSize": { 12420 // "description": "The standard list page size.", 12421 // "format": "int32", 12422 // "location": "query", 12423 // "type": "integer" 12424 // }, 12425 // "pageToken": { 12426 // "description": "The standard list page token.", 12427 // "location": "query", 12428 // "type": "string" 12429 // } 12430 // }, 12431 // "path": "v1alpha1/{+name}/locations", 12432 // "response": { 12433 // "$ref": "ListLocationsResponse" 12434 // }, 12435 // "scopes": [ 12436 // "https://www.googleapis.com/auth/cloud-platform" 12437 // ] 12438 // } 12439 12440} 12441 12442// Pages invokes f for each page of results. 12443// A non-nil error returned from f will halt the iteration. 12444// The provided context supersedes any context provided to the Context method. 12445func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 12446 c.ctx_ = ctx 12447 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12448 for { 12449 x, err := c.Do() 12450 if err != nil { 12451 return err 12452 } 12453 if err := f(x); err != nil { 12454 return err 12455 } 12456 if x.NextPageToken == "" { 12457 return nil 12458 } 12459 c.PageToken(x.NextPageToken) 12460 } 12461} 12462 12463// method id "run.projects.locations.authorizeddomains.list": 12464 12465type ProjectsLocationsAuthorizeddomainsListCall struct { 12466 s *APIService 12467 parent string 12468 urlParams_ gensupport.URLParams 12469 ifNoneMatch_ string 12470 ctx_ context.Context 12471 header_ http.Header 12472} 12473 12474// List: RPC to list authorized domains. 12475func (r *ProjectsLocationsAuthorizeddomainsService) List(parent string) *ProjectsLocationsAuthorizeddomainsListCall { 12476 c := &ProjectsLocationsAuthorizeddomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12477 c.parent = parent 12478 return c 12479} 12480 12481// PageSize sets the optional parameter "pageSize": Maximum results to 12482// return per page. 12483func (c *ProjectsLocationsAuthorizeddomainsListCall) PageSize(pageSize int64) *ProjectsLocationsAuthorizeddomainsListCall { 12484 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12485 return c 12486} 12487 12488// PageToken sets the optional parameter "pageToken": Continuation token 12489// for fetching the next page of results. 12490func (c *ProjectsLocationsAuthorizeddomainsListCall) PageToken(pageToken string) *ProjectsLocationsAuthorizeddomainsListCall { 12491 c.urlParams_.Set("pageToken", pageToken) 12492 return c 12493} 12494 12495// Fields allows partial responses to be retrieved. See 12496// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12497// for more information. 12498func (c *ProjectsLocationsAuthorizeddomainsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthorizeddomainsListCall { 12499 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12500 return c 12501} 12502 12503// IfNoneMatch sets the optional parameter which makes the operation 12504// fail if the object's ETag matches the given value. This is useful for 12505// getting updates only after the object has changed since the last 12506// request. Use googleapi.IsNotModified to check whether the response 12507// error from Do is the result of In-None-Match. 12508func (c *ProjectsLocationsAuthorizeddomainsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAuthorizeddomainsListCall { 12509 c.ifNoneMatch_ = entityTag 12510 return c 12511} 12512 12513// Context sets the context to be used in this call's Do method. Any 12514// pending HTTP request will be aborted if the provided context is 12515// canceled. 12516func (c *ProjectsLocationsAuthorizeddomainsListCall) Context(ctx context.Context) *ProjectsLocationsAuthorizeddomainsListCall { 12517 c.ctx_ = ctx 12518 return c 12519} 12520 12521// Header returns an http.Header that can be modified by the caller to 12522// add HTTP headers to the request. 12523func (c *ProjectsLocationsAuthorizeddomainsListCall) Header() http.Header { 12524 if c.header_ == nil { 12525 c.header_ = make(http.Header) 12526 } 12527 return c.header_ 12528} 12529 12530func (c *ProjectsLocationsAuthorizeddomainsListCall) doRequest(alt string) (*http.Response, error) { 12531 reqHeaders := make(http.Header) 12532 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12533 for k, v := range c.header_ { 12534 reqHeaders[k] = v 12535 } 12536 reqHeaders.Set("User-Agent", c.s.userAgent()) 12537 if c.ifNoneMatch_ != "" { 12538 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12539 } 12540 var body io.Reader = nil 12541 c.urlParams_.Set("alt", alt) 12542 c.urlParams_.Set("prettyPrint", "false") 12543 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/authorizeddomains") 12544 urls += "?" + c.urlParams_.Encode() 12545 req, err := http.NewRequest("GET", urls, body) 12546 if err != nil { 12547 return nil, err 12548 } 12549 req.Header = reqHeaders 12550 googleapi.Expand(req.URL, map[string]string{ 12551 "parent": c.parent, 12552 }) 12553 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12554} 12555 12556// Do executes the "run.projects.locations.authorizeddomains.list" call. 12557// Exactly one of *ListAuthorizedDomainsResponse or error will be 12558// non-nil. Any non-2xx status code is an error. Response headers are in 12559// either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a 12560// response was returned at all) in error.(*googleapi.Error).Header. Use 12561// googleapi.IsNotModified to check whether the returned error was 12562// because http.StatusNotModified was returned. 12563func (c *ProjectsLocationsAuthorizeddomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, error) { 12564 gensupport.SetOptions(c.urlParams_, opts...) 12565 res, err := c.doRequest("json") 12566 if res != nil && res.StatusCode == http.StatusNotModified { 12567 if res.Body != nil { 12568 res.Body.Close() 12569 } 12570 return nil, &googleapi.Error{ 12571 Code: res.StatusCode, 12572 Header: res.Header, 12573 } 12574 } 12575 if err != nil { 12576 return nil, err 12577 } 12578 defer googleapi.CloseBody(res) 12579 if err := googleapi.CheckResponse(res); err != nil { 12580 return nil, err 12581 } 12582 ret := &ListAuthorizedDomainsResponse{ 12583 ServerResponse: googleapi.ServerResponse{ 12584 Header: res.Header, 12585 HTTPStatusCode: res.StatusCode, 12586 }, 12587 } 12588 target := &ret 12589 if err := gensupport.DecodeResponse(target, res); err != nil { 12590 return nil, err 12591 } 12592 return ret, nil 12593 // { 12594 // "description": "RPC to list authorized domains.", 12595 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/authorizeddomains", 12596 // "httpMethod": "GET", 12597 // "id": "run.projects.locations.authorizeddomains.list", 12598 // "parameterOrder": [ 12599 // "parent" 12600 // ], 12601 // "parameters": { 12602 // "pageSize": { 12603 // "description": "Maximum results to return per page.", 12604 // "format": "int32", 12605 // "location": "query", 12606 // "type": "integer" 12607 // }, 12608 // "pageToken": { 12609 // "description": "Continuation token for fetching the next page of results.", 12610 // "location": "query", 12611 // "type": "string" 12612 // }, 12613 // "parent": { 12614 // "description": "Name of the parent Application resource. Example: `apps/myapp`.", 12615 // "location": "path", 12616 // "pattern": "^projects/[^/]+/locations/[^/]+$", 12617 // "required": true, 12618 // "type": "string" 12619 // } 12620 // }, 12621 // "path": "v1alpha1/{+parent}/authorizeddomains", 12622 // "response": { 12623 // "$ref": "ListAuthorizedDomainsResponse" 12624 // }, 12625 // "scopes": [ 12626 // "https://www.googleapis.com/auth/cloud-platform" 12627 // ] 12628 // } 12629 12630} 12631 12632// Pages invokes f for each page of results. 12633// A non-nil error returned from f will halt the iteration. 12634// The provided context supersedes any context provided to the Context method. 12635func (c *ProjectsLocationsAuthorizeddomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) error) error { 12636 c.ctx_ = ctx 12637 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12638 for { 12639 x, err := c.Do() 12640 if err != nil { 12641 return err 12642 } 12643 if err := f(x); err != nil { 12644 return err 12645 } 12646 if x.NextPageToken == "" { 12647 return nil 12648 } 12649 c.PageToken(x.NextPageToken) 12650 } 12651} 12652 12653// method id "run.projects.locations.cloudauditlogssources.create": 12654 12655type ProjectsLocationsCloudauditlogssourcesCreateCall struct { 12656 s *APIService 12657 parent string 12658 cloudauditlogssource *CloudAuditLogsSource 12659 urlParams_ gensupport.URLParams 12660 ctx_ context.Context 12661 header_ http.Header 12662} 12663 12664// Create: Creates a new cloudauditlogssource. 12665func (r *ProjectsLocationsCloudauditlogssourcesService) Create(parent string, cloudauditlogssource *CloudAuditLogsSource) *ProjectsLocationsCloudauditlogssourcesCreateCall { 12666 c := &ProjectsLocationsCloudauditlogssourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12667 c.parent = parent 12668 c.cloudauditlogssource = cloudauditlogssource 12669 return c 12670} 12671 12672// Fields allows partial responses to be retrieved. See 12673// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12674// for more information. 12675func (c *ProjectsLocationsCloudauditlogssourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudauditlogssourcesCreateCall { 12676 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12677 return c 12678} 12679 12680// Context sets the context to be used in this call's Do method. Any 12681// pending HTTP request will be aborted if the provided context is 12682// canceled. 12683func (c *ProjectsLocationsCloudauditlogssourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsCloudauditlogssourcesCreateCall { 12684 c.ctx_ = ctx 12685 return c 12686} 12687 12688// Header returns an http.Header that can be modified by the caller to 12689// add HTTP headers to the request. 12690func (c *ProjectsLocationsCloudauditlogssourcesCreateCall) Header() http.Header { 12691 if c.header_ == nil { 12692 c.header_ = make(http.Header) 12693 } 12694 return c.header_ 12695} 12696 12697func (c *ProjectsLocationsCloudauditlogssourcesCreateCall) doRequest(alt string) (*http.Response, error) { 12698 reqHeaders := make(http.Header) 12699 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12700 for k, v := range c.header_ { 12701 reqHeaders[k] = v 12702 } 12703 reqHeaders.Set("User-Agent", c.s.userAgent()) 12704 var body io.Reader = nil 12705 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudauditlogssource) 12706 if err != nil { 12707 return nil, err 12708 } 12709 reqHeaders.Set("Content-Type", "application/json") 12710 c.urlParams_.Set("alt", alt) 12711 c.urlParams_.Set("prettyPrint", "false") 12712 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cloudauditlogssources") 12713 urls += "?" + c.urlParams_.Encode() 12714 req, err := http.NewRequest("POST", urls, body) 12715 if err != nil { 12716 return nil, err 12717 } 12718 req.Header = reqHeaders 12719 googleapi.Expand(req.URL, map[string]string{ 12720 "parent": c.parent, 12721 }) 12722 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12723} 12724 12725// Do executes the "run.projects.locations.cloudauditlogssources.create" call. 12726// Exactly one of *CloudAuditLogsSource or error will be non-nil. Any 12727// non-2xx status code is an error. Response headers are in either 12728// *CloudAuditLogsSource.ServerResponse.Header or (if a response was 12729// returned at all) in error.(*googleapi.Error).Header. Use 12730// googleapi.IsNotModified to check whether the returned error was 12731// because http.StatusNotModified was returned. 12732func (c *ProjectsLocationsCloudauditlogssourcesCreateCall) Do(opts ...googleapi.CallOption) (*CloudAuditLogsSource, error) { 12733 gensupport.SetOptions(c.urlParams_, opts...) 12734 res, err := c.doRequest("json") 12735 if res != nil && res.StatusCode == http.StatusNotModified { 12736 if res.Body != nil { 12737 res.Body.Close() 12738 } 12739 return nil, &googleapi.Error{ 12740 Code: res.StatusCode, 12741 Header: res.Header, 12742 } 12743 } 12744 if err != nil { 12745 return nil, err 12746 } 12747 defer googleapi.CloseBody(res) 12748 if err := googleapi.CheckResponse(res); err != nil { 12749 return nil, err 12750 } 12751 ret := &CloudAuditLogsSource{ 12752 ServerResponse: googleapi.ServerResponse{ 12753 Header: res.Header, 12754 HTTPStatusCode: res.StatusCode, 12755 }, 12756 } 12757 target := &ret 12758 if err := gensupport.DecodeResponse(target, res); err != nil { 12759 return nil, err 12760 } 12761 return ret, nil 12762 // { 12763 // "description": "Creates a new cloudauditlogssource.", 12764 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudauditlogssources", 12765 // "httpMethod": "POST", 12766 // "id": "run.projects.locations.cloudauditlogssources.create", 12767 // "parameterOrder": [ 12768 // "parent" 12769 // ], 12770 // "parameters": { 12771 // "parent": { 12772 // "description": "The project ID or project number in which this cloudauditlogssource should be created.", 12773 // "location": "path", 12774 // "pattern": "^projects/[^/]+/locations/[^/]+$", 12775 // "required": true, 12776 // "type": "string" 12777 // } 12778 // }, 12779 // "path": "v1alpha1/{+parent}/cloudauditlogssources", 12780 // "request": { 12781 // "$ref": "CloudAuditLogsSource" 12782 // }, 12783 // "response": { 12784 // "$ref": "CloudAuditLogsSource" 12785 // }, 12786 // "scopes": [ 12787 // "https://www.googleapis.com/auth/cloud-platform" 12788 // ] 12789 // } 12790 12791} 12792 12793// method id "run.projects.locations.cloudauditlogssources.delete": 12794 12795type ProjectsLocationsCloudauditlogssourcesDeleteCall struct { 12796 s *APIService 12797 name string 12798 urlParams_ gensupport.URLParams 12799 ctx_ context.Context 12800 header_ http.Header 12801} 12802 12803// Delete: Rpc to delete a cloudauditlogssource. 12804func (r *ProjectsLocationsCloudauditlogssourcesService) Delete(name string) *ProjectsLocationsCloudauditlogssourcesDeleteCall { 12805 c := &ProjectsLocationsCloudauditlogssourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12806 c.name = name 12807 return c 12808} 12809 12810// ApiVersion sets the optional parameter "apiVersion": Cloud Run 12811// currently ignores this parameter. 12812func (c *ProjectsLocationsCloudauditlogssourcesDeleteCall) ApiVersion(apiVersion string) *ProjectsLocationsCloudauditlogssourcesDeleteCall { 12813 c.urlParams_.Set("apiVersion", apiVersion) 12814 return c 12815} 12816 12817// Kind sets the optional parameter "kind": Cloud Run currently ignores 12818// this parameter. 12819func (c *ProjectsLocationsCloudauditlogssourcesDeleteCall) Kind(kind string) *ProjectsLocationsCloudauditlogssourcesDeleteCall { 12820 c.urlParams_.Set("kind", kind) 12821 return c 12822} 12823 12824// PropagationPolicy sets the optional parameter "propagationPolicy": 12825// Specifies the propagation policy of delete. Cloud Run currently 12826// ignores this setting, and deletes in the background. Please see 12827// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 12828// for more information. 12829func (c *ProjectsLocationsCloudauditlogssourcesDeleteCall) PropagationPolicy(propagationPolicy string) *ProjectsLocationsCloudauditlogssourcesDeleteCall { 12830 c.urlParams_.Set("propagationPolicy", propagationPolicy) 12831 return c 12832} 12833 12834// Fields allows partial responses to be retrieved. See 12835// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12836// for more information. 12837func (c *ProjectsLocationsCloudauditlogssourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudauditlogssourcesDeleteCall { 12838 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12839 return c 12840} 12841 12842// Context sets the context to be used in this call's Do method. Any 12843// pending HTTP request will be aborted if the provided context is 12844// canceled. 12845func (c *ProjectsLocationsCloudauditlogssourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCloudauditlogssourcesDeleteCall { 12846 c.ctx_ = ctx 12847 return c 12848} 12849 12850// Header returns an http.Header that can be modified by the caller to 12851// add HTTP headers to the request. 12852func (c *ProjectsLocationsCloudauditlogssourcesDeleteCall) Header() http.Header { 12853 if c.header_ == nil { 12854 c.header_ = make(http.Header) 12855 } 12856 return c.header_ 12857} 12858 12859func (c *ProjectsLocationsCloudauditlogssourcesDeleteCall) doRequest(alt string) (*http.Response, error) { 12860 reqHeaders := make(http.Header) 12861 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12862 for k, v := range c.header_ { 12863 reqHeaders[k] = v 12864 } 12865 reqHeaders.Set("User-Agent", c.s.userAgent()) 12866 var body io.Reader = nil 12867 c.urlParams_.Set("alt", alt) 12868 c.urlParams_.Set("prettyPrint", "false") 12869 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 12870 urls += "?" + c.urlParams_.Encode() 12871 req, err := http.NewRequest("DELETE", urls, body) 12872 if err != nil { 12873 return nil, err 12874 } 12875 req.Header = reqHeaders 12876 googleapi.Expand(req.URL, map[string]string{ 12877 "name": c.name, 12878 }) 12879 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12880} 12881 12882// Do executes the "run.projects.locations.cloudauditlogssources.delete" call. 12883// Exactly one of *Empty or error will be non-nil. Any non-2xx status 12884// code is an error. Response headers are in either 12885// *Empty.ServerResponse.Header or (if a response was returned at all) 12886// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12887// check whether the returned error was because http.StatusNotModified 12888// was returned. 12889func (c *ProjectsLocationsCloudauditlogssourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 12890 gensupport.SetOptions(c.urlParams_, opts...) 12891 res, err := c.doRequest("json") 12892 if res != nil && res.StatusCode == http.StatusNotModified { 12893 if res.Body != nil { 12894 res.Body.Close() 12895 } 12896 return nil, &googleapi.Error{ 12897 Code: res.StatusCode, 12898 Header: res.Header, 12899 } 12900 } 12901 if err != nil { 12902 return nil, err 12903 } 12904 defer googleapi.CloseBody(res) 12905 if err := googleapi.CheckResponse(res); err != nil { 12906 return nil, err 12907 } 12908 ret := &Empty{ 12909 ServerResponse: googleapi.ServerResponse{ 12910 Header: res.Header, 12911 HTTPStatusCode: res.StatusCode, 12912 }, 12913 } 12914 target := &ret 12915 if err := gensupport.DecodeResponse(target, res); err != nil { 12916 return nil, err 12917 } 12918 return ret, nil 12919 // { 12920 // "description": "Rpc to delete a cloudauditlogssource.", 12921 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudauditlogssources/{cloudauditlogssourcesId}", 12922 // "httpMethod": "DELETE", 12923 // "id": "run.projects.locations.cloudauditlogssources.delete", 12924 // "parameterOrder": [ 12925 // "name" 12926 // ], 12927 // "parameters": { 12928 // "apiVersion": { 12929 // "description": "Cloud Run currently ignores this parameter.", 12930 // "location": "query", 12931 // "type": "string" 12932 // }, 12933 // "kind": { 12934 // "description": "Cloud Run currently ignores this parameter.", 12935 // "location": "query", 12936 // "type": "string" 12937 // }, 12938 // "name": { 12939 // "description": "The name of the cloudauditlogssource being deleted. If needed, replace {namespace_id} with the project ID.", 12940 // "location": "path", 12941 // "pattern": "^projects/[^/]+/locations/[^/]+/cloudauditlogssources/[^/]+$", 12942 // "required": true, 12943 // "type": "string" 12944 // }, 12945 // "propagationPolicy": { 12946 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 12947 // "location": "query", 12948 // "type": "string" 12949 // } 12950 // }, 12951 // "path": "v1alpha1/{+name}", 12952 // "response": { 12953 // "$ref": "Empty" 12954 // }, 12955 // "scopes": [ 12956 // "https://www.googleapis.com/auth/cloud-platform" 12957 // ] 12958 // } 12959 12960} 12961 12962// method id "run.projects.locations.cloudauditlogssources.get": 12963 12964type ProjectsLocationsCloudauditlogssourcesGetCall struct { 12965 s *APIService 12966 name string 12967 urlParams_ gensupport.URLParams 12968 ifNoneMatch_ string 12969 ctx_ context.Context 12970 header_ http.Header 12971} 12972 12973// Get: Rpc to get information about a cloudauditlogssource. 12974func (r *ProjectsLocationsCloudauditlogssourcesService) Get(name string) *ProjectsLocationsCloudauditlogssourcesGetCall { 12975 c := &ProjectsLocationsCloudauditlogssourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12976 c.name = name 12977 return c 12978} 12979 12980// Fields allows partial responses to be retrieved. See 12981// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12982// for more information. 12983func (c *ProjectsLocationsCloudauditlogssourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudauditlogssourcesGetCall { 12984 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12985 return c 12986} 12987 12988// IfNoneMatch sets the optional parameter which makes the operation 12989// fail if the object's ETag matches the given value. This is useful for 12990// getting updates only after the object has changed since the last 12991// request. Use googleapi.IsNotModified to check whether the response 12992// error from Do is the result of In-None-Match. 12993func (c *ProjectsLocationsCloudauditlogssourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudauditlogssourcesGetCall { 12994 c.ifNoneMatch_ = entityTag 12995 return c 12996} 12997 12998// Context sets the context to be used in this call's Do method. Any 12999// pending HTTP request will be aborted if the provided context is 13000// canceled. 13001func (c *ProjectsLocationsCloudauditlogssourcesGetCall) Context(ctx context.Context) *ProjectsLocationsCloudauditlogssourcesGetCall { 13002 c.ctx_ = ctx 13003 return c 13004} 13005 13006// Header returns an http.Header that can be modified by the caller to 13007// add HTTP headers to the request. 13008func (c *ProjectsLocationsCloudauditlogssourcesGetCall) Header() http.Header { 13009 if c.header_ == nil { 13010 c.header_ = make(http.Header) 13011 } 13012 return c.header_ 13013} 13014 13015func (c *ProjectsLocationsCloudauditlogssourcesGetCall) doRequest(alt string) (*http.Response, error) { 13016 reqHeaders := make(http.Header) 13017 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13018 for k, v := range c.header_ { 13019 reqHeaders[k] = v 13020 } 13021 reqHeaders.Set("User-Agent", c.s.userAgent()) 13022 if c.ifNoneMatch_ != "" { 13023 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13024 } 13025 var body io.Reader = nil 13026 c.urlParams_.Set("alt", alt) 13027 c.urlParams_.Set("prettyPrint", "false") 13028 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 13029 urls += "?" + c.urlParams_.Encode() 13030 req, err := http.NewRequest("GET", urls, body) 13031 if err != nil { 13032 return nil, err 13033 } 13034 req.Header = reqHeaders 13035 googleapi.Expand(req.URL, map[string]string{ 13036 "name": c.name, 13037 }) 13038 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13039} 13040 13041// Do executes the "run.projects.locations.cloudauditlogssources.get" call. 13042// Exactly one of *CloudAuditLogsSource or error will be non-nil. Any 13043// non-2xx status code is an error. Response headers are in either 13044// *CloudAuditLogsSource.ServerResponse.Header or (if a response was 13045// returned at all) in error.(*googleapi.Error).Header. Use 13046// googleapi.IsNotModified to check whether the returned error was 13047// because http.StatusNotModified was returned. 13048func (c *ProjectsLocationsCloudauditlogssourcesGetCall) Do(opts ...googleapi.CallOption) (*CloudAuditLogsSource, error) { 13049 gensupport.SetOptions(c.urlParams_, opts...) 13050 res, err := c.doRequest("json") 13051 if res != nil && res.StatusCode == http.StatusNotModified { 13052 if res.Body != nil { 13053 res.Body.Close() 13054 } 13055 return nil, &googleapi.Error{ 13056 Code: res.StatusCode, 13057 Header: res.Header, 13058 } 13059 } 13060 if err != nil { 13061 return nil, err 13062 } 13063 defer googleapi.CloseBody(res) 13064 if err := googleapi.CheckResponse(res); err != nil { 13065 return nil, err 13066 } 13067 ret := &CloudAuditLogsSource{ 13068 ServerResponse: googleapi.ServerResponse{ 13069 Header: res.Header, 13070 HTTPStatusCode: res.StatusCode, 13071 }, 13072 } 13073 target := &ret 13074 if err := gensupport.DecodeResponse(target, res); err != nil { 13075 return nil, err 13076 } 13077 return ret, nil 13078 // { 13079 // "description": "Rpc to get information about a cloudauditlogssource.", 13080 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudauditlogssources/{cloudauditlogssourcesId}", 13081 // "httpMethod": "GET", 13082 // "id": "run.projects.locations.cloudauditlogssources.get", 13083 // "parameterOrder": [ 13084 // "name" 13085 // ], 13086 // "parameters": { 13087 // "name": { 13088 // "description": "The name of the cloudauditlogssource being retrieved. If needed, replace {namespace_id} with the project ID.", 13089 // "location": "path", 13090 // "pattern": "^projects/[^/]+/locations/[^/]+/cloudauditlogssources/[^/]+$", 13091 // "required": true, 13092 // "type": "string" 13093 // } 13094 // }, 13095 // "path": "v1alpha1/{+name}", 13096 // "response": { 13097 // "$ref": "CloudAuditLogsSource" 13098 // }, 13099 // "scopes": [ 13100 // "https://www.googleapis.com/auth/cloud-platform" 13101 // ] 13102 // } 13103 13104} 13105 13106// method id "run.projects.locations.cloudauditlogssources.list": 13107 13108type ProjectsLocationsCloudauditlogssourcesListCall struct { 13109 s *APIService 13110 parent string 13111 urlParams_ gensupport.URLParams 13112 ifNoneMatch_ string 13113 ctx_ context.Context 13114 header_ http.Header 13115} 13116 13117// List: Rpc to list cloudauditlogssources. 13118func (r *ProjectsLocationsCloudauditlogssourcesService) List(parent string) *ProjectsLocationsCloudauditlogssourcesListCall { 13119 c := &ProjectsLocationsCloudauditlogssourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13120 c.parent = parent 13121 return c 13122} 13123 13124// Continue sets the optional parameter "continue": Optional encoded 13125// string to continue paging. 13126func (c *ProjectsLocationsCloudauditlogssourcesListCall) Continue(continue_ string) *ProjectsLocationsCloudauditlogssourcesListCall { 13127 c.urlParams_.Set("continue", continue_) 13128 return c 13129} 13130 13131// FieldSelector sets the optional parameter "fieldSelector": Allows to 13132// filter resources based on a specific value for a field name. Send 13133// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 13134// currently used by Cloud Run. 13135func (c *ProjectsLocationsCloudauditlogssourcesListCall) FieldSelector(fieldSelector string) *ProjectsLocationsCloudauditlogssourcesListCall { 13136 c.urlParams_.Set("fieldSelector", fieldSelector) 13137 return c 13138} 13139 13140// IncludeUninitialized sets the optional parameter 13141// "includeUninitialized": Not currently used by Cloud Run. 13142func (c *ProjectsLocationsCloudauditlogssourcesListCall) IncludeUninitialized(includeUninitialized bool) *ProjectsLocationsCloudauditlogssourcesListCall { 13143 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 13144 return c 13145} 13146 13147// LabelSelector sets the optional parameter "labelSelector": Allows to 13148// filter resources based on a label. Supported operations are =, !=, 13149// exists, in, and notIn. 13150func (c *ProjectsLocationsCloudauditlogssourcesListCall) LabelSelector(labelSelector string) *ProjectsLocationsCloudauditlogssourcesListCall { 13151 c.urlParams_.Set("labelSelector", labelSelector) 13152 return c 13153} 13154 13155// Limit sets the optional parameter "limit": The maximum number of 13156// records that should be returned. 13157func (c *ProjectsLocationsCloudauditlogssourcesListCall) Limit(limit int64) *ProjectsLocationsCloudauditlogssourcesListCall { 13158 c.urlParams_.Set("limit", fmt.Sprint(limit)) 13159 return c 13160} 13161 13162// ResourceVersion sets the optional parameter "resourceVersion": The 13163// baseline resource version from which the list or watch operation 13164// should start. Not currently used by Cloud Run. 13165func (c *ProjectsLocationsCloudauditlogssourcesListCall) ResourceVersion(resourceVersion string) *ProjectsLocationsCloudauditlogssourcesListCall { 13166 c.urlParams_.Set("resourceVersion", resourceVersion) 13167 return c 13168} 13169 13170// Watch sets the optional parameter "watch": Flag that indicates that 13171// the client expects to watch this resource as well. Not currently used 13172// by Cloud Run. 13173func (c *ProjectsLocationsCloudauditlogssourcesListCall) Watch(watch bool) *ProjectsLocationsCloudauditlogssourcesListCall { 13174 c.urlParams_.Set("watch", fmt.Sprint(watch)) 13175 return c 13176} 13177 13178// Fields allows partial responses to be retrieved. See 13179// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13180// for more information. 13181func (c *ProjectsLocationsCloudauditlogssourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudauditlogssourcesListCall { 13182 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13183 return c 13184} 13185 13186// IfNoneMatch sets the optional parameter which makes the operation 13187// fail if the object's ETag matches the given value. This is useful for 13188// getting updates only after the object has changed since the last 13189// request. Use googleapi.IsNotModified to check whether the response 13190// error from Do is the result of In-None-Match. 13191func (c *ProjectsLocationsCloudauditlogssourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudauditlogssourcesListCall { 13192 c.ifNoneMatch_ = entityTag 13193 return c 13194} 13195 13196// Context sets the context to be used in this call's Do method. Any 13197// pending HTTP request will be aborted if the provided context is 13198// canceled. 13199func (c *ProjectsLocationsCloudauditlogssourcesListCall) Context(ctx context.Context) *ProjectsLocationsCloudauditlogssourcesListCall { 13200 c.ctx_ = ctx 13201 return c 13202} 13203 13204// Header returns an http.Header that can be modified by the caller to 13205// add HTTP headers to the request. 13206func (c *ProjectsLocationsCloudauditlogssourcesListCall) Header() http.Header { 13207 if c.header_ == nil { 13208 c.header_ = make(http.Header) 13209 } 13210 return c.header_ 13211} 13212 13213func (c *ProjectsLocationsCloudauditlogssourcesListCall) doRequest(alt string) (*http.Response, error) { 13214 reqHeaders := make(http.Header) 13215 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13216 for k, v := range c.header_ { 13217 reqHeaders[k] = v 13218 } 13219 reqHeaders.Set("User-Agent", c.s.userAgent()) 13220 if c.ifNoneMatch_ != "" { 13221 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13222 } 13223 var body io.Reader = nil 13224 c.urlParams_.Set("alt", alt) 13225 c.urlParams_.Set("prettyPrint", "false") 13226 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cloudauditlogssources") 13227 urls += "?" + c.urlParams_.Encode() 13228 req, err := http.NewRequest("GET", urls, body) 13229 if err != nil { 13230 return nil, err 13231 } 13232 req.Header = reqHeaders 13233 googleapi.Expand(req.URL, map[string]string{ 13234 "parent": c.parent, 13235 }) 13236 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13237} 13238 13239// Do executes the "run.projects.locations.cloudauditlogssources.list" call. 13240// Exactly one of *ListCloudAuditLogsSourcesResponse or error will be 13241// non-nil. Any non-2xx status code is an error. Response headers are in 13242// either *ListCloudAuditLogsSourcesResponse.ServerResponse.Header or 13243// (if a response was returned at all) in 13244// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13245// whether the returned error was because http.StatusNotModified was 13246// returned. 13247func (c *ProjectsLocationsCloudauditlogssourcesListCall) Do(opts ...googleapi.CallOption) (*ListCloudAuditLogsSourcesResponse, error) { 13248 gensupport.SetOptions(c.urlParams_, opts...) 13249 res, err := c.doRequest("json") 13250 if res != nil && res.StatusCode == http.StatusNotModified { 13251 if res.Body != nil { 13252 res.Body.Close() 13253 } 13254 return nil, &googleapi.Error{ 13255 Code: res.StatusCode, 13256 Header: res.Header, 13257 } 13258 } 13259 if err != nil { 13260 return nil, err 13261 } 13262 defer googleapi.CloseBody(res) 13263 if err := googleapi.CheckResponse(res); err != nil { 13264 return nil, err 13265 } 13266 ret := &ListCloudAuditLogsSourcesResponse{ 13267 ServerResponse: googleapi.ServerResponse{ 13268 Header: res.Header, 13269 HTTPStatusCode: res.StatusCode, 13270 }, 13271 } 13272 target := &ret 13273 if err := gensupport.DecodeResponse(target, res); err != nil { 13274 return nil, err 13275 } 13276 return ret, nil 13277 // { 13278 // "description": "Rpc to list cloudauditlogssources.", 13279 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudauditlogssources", 13280 // "httpMethod": "GET", 13281 // "id": "run.projects.locations.cloudauditlogssources.list", 13282 // "parameterOrder": [ 13283 // "parent" 13284 // ], 13285 // "parameters": { 13286 // "continue": { 13287 // "description": "Optional encoded string to continue paging.", 13288 // "location": "query", 13289 // "type": "string" 13290 // }, 13291 // "fieldSelector": { 13292 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 13293 // "location": "query", 13294 // "type": "string" 13295 // }, 13296 // "includeUninitialized": { 13297 // "description": "Not currently used by Cloud Run.", 13298 // "location": "query", 13299 // "type": "boolean" 13300 // }, 13301 // "labelSelector": { 13302 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 13303 // "location": "query", 13304 // "type": "string" 13305 // }, 13306 // "limit": { 13307 // "description": "The maximum number of records that should be returned.", 13308 // "format": "int32", 13309 // "location": "query", 13310 // "type": "integer" 13311 // }, 13312 // "parent": { 13313 // "description": "The project ID or project number from which the cloudauditlogssources should be listed.", 13314 // "location": "path", 13315 // "pattern": "^projects/[^/]+/locations/[^/]+$", 13316 // "required": true, 13317 // "type": "string" 13318 // }, 13319 // "resourceVersion": { 13320 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 13321 // "location": "query", 13322 // "type": "string" 13323 // }, 13324 // "watch": { 13325 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 13326 // "location": "query", 13327 // "type": "boolean" 13328 // } 13329 // }, 13330 // "path": "v1alpha1/{+parent}/cloudauditlogssources", 13331 // "response": { 13332 // "$ref": "ListCloudAuditLogsSourcesResponse" 13333 // }, 13334 // "scopes": [ 13335 // "https://www.googleapis.com/auth/cloud-platform" 13336 // ] 13337 // } 13338 13339} 13340 13341// method id "run.projects.locations.cloudpubsubsources.create": 13342 13343type ProjectsLocationsCloudpubsubsourcesCreateCall struct { 13344 s *APIService 13345 parent string 13346 cloudpubsubsource *CloudPubSubSource 13347 urlParams_ gensupport.URLParams 13348 ctx_ context.Context 13349 header_ http.Header 13350} 13351 13352// Create: Creates a new cloudpubsubsource. 13353func (r *ProjectsLocationsCloudpubsubsourcesService) Create(parent string, cloudpubsubsource *CloudPubSubSource) *ProjectsLocationsCloudpubsubsourcesCreateCall { 13354 c := &ProjectsLocationsCloudpubsubsourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13355 c.parent = parent 13356 c.cloudpubsubsource = cloudpubsubsource 13357 return c 13358} 13359 13360// Fields allows partial responses to be retrieved. See 13361// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13362// for more information. 13363func (c *ProjectsLocationsCloudpubsubsourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudpubsubsourcesCreateCall { 13364 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13365 return c 13366} 13367 13368// Context sets the context to be used in this call's Do method. Any 13369// pending HTTP request will be aborted if the provided context is 13370// canceled. 13371func (c *ProjectsLocationsCloudpubsubsourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsCloudpubsubsourcesCreateCall { 13372 c.ctx_ = ctx 13373 return c 13374} 13375 13376// Header returns an http.Header that can be modified by the caller to 13377// add HTTP headers to the request. 13378func (c *ProjectsLocationsCloudpubsubsourcesCreateCall) Header() http.Header { 13379 if c.header_ == nil { 13380 c.header_ = make(http.Header) 13381 } 13382 return c.header_ 13383} 13384 13385func (c *ProjectsLocationsCloudpubsubsourcesCreateCall) doRequest(alt string) (*http.Response, error) { 13386 reqHeaders := make(http.Header) 13387 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13388 for k, v := range c.header_ { 13389 reqHeaders[k] = v 13390 } 13391 reqHeaders.Set("User-Agent", c.s.userAgent()) 13392 var body io.Reader = nil 13393 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudpubsubsource) 13394 if err != nil { 13395 return nil, err 13396 } 13397 reqHeaders.Set("Content-Type", "application/json") 13398 c.urlParams_.Set("alt", alt) 13399 c.urlParams_.Set("prettyPrint", "false") 13400 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cloudpubsubsources") 13401 urls += "?" + c.urlParams_.Encode() 13402 req, err := http.NewRequest("POST", urls, body) 13403 if err != nil { 13404 return nil, err 13405 } 13406 req.Header = reqHeaders 13407 googleapi.Expand(req.URL, map[string]string{ 13408 "parent": c.parent, 13409 }) 13410 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13411} 13412 13413// Do executes the "run.projects.locations.cloudpubsubsources.create" call. 13414// Exactly one of *CloudPubSubSource or error will be non-nil. Any 13415// non-2xx status code is an error. Response headers are in either 13416// *CloudPubSubSource.ServerResponse.Header or (if a response was 13417// returned at all) in error.(*googleapi.Error).Header. Use 13418// googleapi.IsNotModified to check whether the returned error was 13419// because http.StatusNotModified was returned. 13420func (c *ProjectsLocationsCloudpubsubsourcesCreateCall) Do(opts ...googleapi.CallOption) (*CloudPubSubSource, error) { 13421 gensupport.SetOptions(c.urlParams_, opts...) 13422 res, err := c.doRequest("json") 13423 if res != nil && res.StatusCode == http.StatusNotModified { 13424 if res.Body != nil { 13425 res.Body.Close() 13426 } 13427 return nil, &googleapi.Error{ 13428 Code: res.StatusCode, 13429 Header: res.Header, 13430 } 13431 } 13432 if err != nil { 13433 return nil, err 13434 } 13435 defer googleapi.CloseBody(res) 13436 if err := googleapi.CheckResponse(res); err != nil { 13437 return nil, err 13438 } 13439 ret := &CloudPubSubSource{ 13440 ServerResponse: googleapi.ServerResponse{ 13441 Header: res.Header, 13442 HTTPStatusCode: res.StatusCode, 13443 }, 13444 } 13445 target := &ret 13446 if err := gensupport.DecodeResponse(target, res); err != nil { 13447 return nil, err 13448 } 13449 return ret, nil 13450 // { 13451 // "description": "Creates a new cloudpubsubsource.", 13452 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudpubsubsources", 13453 // "httpMethod": "POST", 13454 // "id": "run.projects.locations.cloudpubsubsources.create", 13455 // "parameterOrder": [ 13456 // "parent" 13457 // ], 13458 // "parameters": { 13459 // "parent": { 13460 // "description": "The project ID or project number in which this cloudpubsubsource should be created.", 13461 // "location": "path", 13462 // "pattern": "^projects/[^/]+/locations/[^/]+$", 13463 // "required": true, 13464 // "type": "string" 13465 // } 13466 // }, 13467 // "path": "v1alpha1/{+parent}/cloudpubsubsources", 13468 // "request": { 13469 // "$ref": "CloudPubSubSource" 13470 // }, 13471 // "response": { 13472 // "$ref": "CloudPubSubSource" 13473 // }, 13474 // "scopes": [ 13475 // "https://www.googleapis.com/auth/cloud-platform" 13476 // ] 13477 // } 13478 13479} 13480 13481// method id "run.projects.locations.cloudpubsubsources.delete": 13482 13483type ProjectsLocationsCloudpubsubsourcesDeleteCall struct { 13484 s *APIService 13485 name string 13486 urlParams_ gensupport.URLParams 13487 ctx_ context.Context 13488 header_ http.Header 13489} 13490 13491// Delete: Rpc to delete a cloudpubsubsource. 13492func (r *ProjectsLocationsCloudpubsubsourcesService) Delete(name string) *ProjectsLocationsCloudpubsubsourcesDeleteCall { 13493 c := &ProjectsLocationsCloudpubsubsourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13494 c.name = name 13495 return c 13496} 13497 13498// ApiVersion sets the optional parameter "apiVersion": Cloud Run 13499// currently ignores this parameter. 13500func (c *ProjectsLocationsCloudpubsubsourcesDeleteCall) ApiVersion(apiVersion string) *ProjectsLocationsCloudpubsubsourcesDeleteCall { 13501 c.urlParams_.Set("apiVersion", apiVersion) 13502 return c 13503} 13504 13505// Kind sets the optional parameter "kind": Cloud Run currently ignores 13506// this parameter. 13507func (c *ProjectsLocationsCloudpubsubsourcesDeleteCall) Kind(kind string) *ProjectsLocationsCloudpubsubsourcesDeleteCall { 13508 c.urlParams_.Set("kind", kind) 13509 return c 13510} 13511 13512// PropagationPolicy sets the optional parameter "propagationPolicy": 13513// Specifies the propagation policy of delete. Cloud Run currently 13514// ignores this setting, and deletes in the background. Please see 13515// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 13516// for more information. 13517func (c *ProjectsLocationsCloudpubsubsourcesDeleteCall) PropagationPolicy(propagationPolicy string) *ProjectsLocationsCloudpubsubsourcesDeleteCall { 13518 c.urlParams_.Set("propagationPolicy", propagationPolicy) 13519 return c 13520} 13521 13522// Fields allows partial responses to be retrieved. See 13523// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13524// for more information. 13525func (c *ProjectsLocationsCloudpubsubsourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudpubsubsourcesDeleteCall { 13526 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13527 return c 13528} 13529 13530// Context sets the context to be used in this call's Do method. Any 13531// pending HTTP request will be aborted if the provided context is 13532// canceled. 13533func (c *ProjectsLocationsCloudpubsubsourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCloudpubsubsourcesDeleteCall { 13534 c.ctx_ = ctx 13535 return c 13536} 13537 13538// Header returns an http.Header that can be modified by the caller to 13539// add HTTP headers to the request. 13540func (c *ProjectsLocationsCloudpubsubsourcesDeleteCall) Header() http.Header { 13541 if c.header_ == nil { 13542 c.header_ = make(http.Header) 13543 } 13544 return c.header_ 13545} 13546 13547func (c *ProjectsLocationsCloudpubsubsourcesDeleteCall) doRequest(alt string) (*http.Response, error) { 13548 reqHeaders := make(http.Header) 13549 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13550 for k, v := range c.header_ { 13551 reqHeaders[k] = v 13552 } 13553 reqHeaders.Set("User-Agent", c.s.userAgent()) 13554 var body io.Reader = nil 13555 c.urlParams_.Set("alt", alt) 13556 c.urlParams_.Set("prettyPrint", "false") 13557 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 13558 urls += "?" + c.urlParams_.Encode() 13559 req, err := http.NewRequest("DELETE", urls, body) 13560 if err != nil { 13561 return nil, err 13562 } 13563 req.Header = reqHeaders 13564 googleapi.Expand(req.URL, map[string]string{ 13565 "name": c.name, 13566 }) 13567 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13568} 13569 13570// Do executes the "run.projects.locations.cloudpubsubsources.delete" call. 13571// Exactly one of *Empty or error will be non-nil. Any non-2xx status 13572// code is an error. Response headers are in either 13573// *Empty.ServerResponse.Header or (if a response was returned at all) 13574// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13575// check whether the returned error was because http.StatusNotModified 13576// was returned. 13577func (c *ProjectsLocationsCloudpubsubsourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 13578 gensupport.SetOptions(c.urlParams_, opts...) 13579 res, err := c.doRequest("json") 13580 if res != nil && res.StatusCode == http.StatusNotModified { 13581 if res.Body != nil { 13582 res.Body.Close() 13583 } 13584 return nil, &googleapi.Error{ 13585 Code: res.StatusCode, 13586 Header: res.Header, 13587 } 13588 } 13589 if err != nil { 13590 return nil, err 13591 } 13592 defer googleapi.CloseBody(res) 13593 if err := googleapi.CheckResponse(res); err != nil { 13594 return nil, err 13595 } 13596 ret := &Empty{ 13597 ServerResponse: googleapi.ServerResponse{ 13598 Header: res.Header, 13599 HTTPStatusCode: res.StatusCode, 13600 }, 13601 } 13602 target := &ret 13603 if err := gensupport.DecodeResponse(target, res); err != nil { 13604 return nil, err 13605 } 13606 return ret, nil 13607 // { 13608 // "description": "Rpc to delete a cloudpubsubsource.", 13609 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudpubsubsources/{cloudpubsubsourcesId}", 13610 // "httpMethod": "DELETE", 13611 // "id": "run.projects.locations.cloudpubsubsources.delete", 13612 // "parameterOrder": [ 13613 // "name" 13614 // ], 13615 // "parameters": { 13616 // "apiVersion": { 13617 // "description": "Cloud Run currently ignores this parameter.", 13618 // "location": "query", 13619 // "type": "string" 13620 // }, 13621 // "kind": { 13622 // "description": "Cloud Run currently ignores this parameter.", 13623 // "location": "query", 13624 // "type": "string" 13625 // }, 13626 // "name": { 13627 // "description": "The name of the cloudpubsubsource being deleted. If needed, replace {namespace_id} with the project ID.", 13628 // "location": "path", 13629 // "pattern": "^projects/[^/]+/locations/[^/]+/cloudpubsubsources/[^/]+$", 13630 // "required": true, 13631 // "type": "string" 13632 // }, 13633 // "propagationPolicy": { 13634 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 13635 // "location": "query", 13636 // "type": "string" 13637 // } 13638 // }, 13639 // "path": "v1alpha1/{+name}", 13640 // "response": { 13641 // "$ref": "Empty" 13642 // }, 13643 // "scopes": [ 13644 // "https://www.googleapis.com/auth/cloud-platform" 13645 // ] 13646 // } 13647 13648} 13649 13650// method id "run.projects.locations.cloudpubsubsources.get": 13651 13652type ProjectsLocationsCloudpubsubsourcesGetCall struct { 13653 s *APIService 13654 name string 13655 urlParams_ gensupport.URLParams 13656 ifNoneMatch_ string 13657 ctx_ context.Context 13658 header_ http.Header 13659} 13660 13661// Get: Rpc to get information about a cloudpubsubsource. 13662func (r *ProjectsLocationsCloudpubsubsourcesService) Get(name string) *ProjectsLocationsCloudpubsubsourcesGetCall { 13663 c := &ProjectsLocationsCloudpubsubsourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13664 c.name = name 13665 return c 13666} 13667 13668// Fields allows partial responses to be retrieved. See 13669// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13670// for more information. 13671func (c *ProjectsLocationsCloudpubsubsourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudpubsubsourcesGetCall { 13672 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13673 return c 13674} 13675 13676// IfNoneMatch sets the optional parameter which makes the operation 13677// fail if the object's ETag matches the given value. This is useful for 13678// getting updates only after the object has changed since the last 13679// request. Use googleapi.IsNotModified to check whether the response 13680// error from Do is the result of In-None-Match. 13681func (c *ProjectsLocationsCloudpubsubsourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudpubsubsourcesGetCall { 13682 c.ifNoneMatch_ = entityTag 13683 return c 13684} 13685 13686// Context sets the context to be used in this call's Do method. Any 13687// pending HTTP request will be aborted if the provided context is 13688// canceled. 13689func (c *ProjectsLocationsCloudpubsubsourcesGetCall) Context(ctx context.Context) *ProjectsLocationsCloudpubsubsourcesGetCall { 13690 c.ctx_ = ctx 13691 return c 13692} 13693 13694// Header returns an http.Header that can be modified by the caller to 13695// add HTTP headers to the request. 13696func (c *ProjectsLocationsCloudpubsubsourcesGetCall) Header() http.Header { 13697 if c.header_ == nil { 13698 c.header_ = make(http.Header) 13699 } 13700 return c.header_ 13701} 13702 13703func (c *ProjectsLocationsCloudpubsubsourcesGetCall) doRequest(alt string) (*http.Response, error) { 13704 reqHeaders := make(http.Header) 13705 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13706 for k, v := range c.header_ { 13707 reqHeaders[k] = v 13708 } 13709 reqHeaders.Set("User-Agent", c.s.userAgent()) 13710 if c.ifNoneMatch_ != "" { 13711 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13712 } 13713 var body io.Reader = nil 13714 c.urlParams_.Set("alt", alt) 13715 c.urlParams_.Set("prettyPrint", "false") 13716 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 13717 urls += "?" + c.urlParams_.Encode() 13718 req, err := http.NewRequest("GET", urls, body) 13719 if err != nil { 13720 return nil, err 13721 } 13722 req.Header = reqHeaders 13723 googleapi.Expand(req.URL, map[string]string{ 13724 "name": c.name, 13725 }) 13726 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13727} 13728 13729// Do executes the "run.projects.locations.cloudpubsubsources.get" call. 13730// Exactly one of *CloudPubSubSource or error will be non-nil. Any 13731// non-2xx status code is an error. Response headers are in either 13732// *CloudPubSubSource.ServerResponse.Header or (if a response was 13733// returned at all) in error.(*googleapi.Error).Header. Use 13734// googleapi.IsNotModified to check whether the returned error was 13735// because http.StatusNotModified was returned. 13736func (c *ProjectsLocationsCloudpubsubsourcesGetCall) Do(opts ...googleapi.CallOption) (*CloudPubSubSource, error) { 13737 gensupport.SetOptions(c.urlParams_, opts...) 13738 res, err := c.doRequest("json") 13739 if res != nil && res.StatusCode == http.StatusNotModified { 13740 if res.Body != nil { 13741 res.Body.Close() 13742 } 13743 return nil, &googleapi.Error{ 13744 Code: res.StatusCode, 13745 Header: res.Header, 13746 } 13747 } 13748 if err != nil { 13749 return nil, err 13750 } 13751 defer googleapi.CloseBody(res) 13752 if err := googleapi.CheckResponse(res); err != nil { 13753 return nil, err 13754 } 13755 ret := &CloudPubSubSource{ 13756 ServerResponse: googleapi.ServerResponse{ 13757 Header: res.Header, 13758 HTTPStatusCode: res.StatusCode, 13759 }, 13760 } 13761 target := &ret 13762 if err := gensupport.DecodeResponse(target, res); err != nil { 13763 return nil, err 13764 } 13765 return ret, nil 13766 // { 13767 // "description": "Rpc to get information about a cloudpubsubsource.", 13768 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudpubsubsources/{cloudpubsubsourcesId}", 13769 // "httpMethod": "GET", 13770 // "id": "run.projects.locations.cloudpubsubsources.get", 13771 // "parameterOrder": [ 13772 // "name" 13773 // ], 13774 // "parameters": { 13775 // "name": { 13776 // "description": "The name of the cloudpubsubsource being retrieved. If needed, replace {namespace_id} with the project ID.", 13777 // "location": "path", 13778 // "pattern": "^projects/[^/]+/locations/[^/]+/cloudpubsubsources/[^/]+$", 13779 // "required": true, 13780 // "type": "string" 13781 // } 13782 // }, 13783 // "path": "v1alpha1/{+name}", 13784 // "response": { 13785 // "$ref": "CloudPubSubSource" 13786 // }, 13787 // "scopes": [ 13788 // "https://www.googleapis.com/auth/cloud-platform" 13789 // ] 13790 // } 13791 13792} 13793 13794// method id "run.projects.locations.cloudpubsubsources.list": 13795 13796type ProjectsLocationsCloudpubsubsourcesListCall struct { 13797 s *APIService 13798 parent string 13799 urlParams_ gensupport.URLParams 13800 ifNoneMatch_ string 13801 ctx_ context.Context 13802 header_ http.Header 13803} 13804 13805// List: Rpc to list cloudpubsubsources. 13806func (r *ProjectsLocationsCloudpubsubsourcesService) List(parent string) *ProjectsLocationsCloudpubsubsourcesListCall { 13807 c := &ProjectsLocationsCloudpubsubsourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13808 c.parent = parent 13809 return c 13810} 13811 13812// Continue sets the optional parameter "continue": Optional encoded 13813// string to continue paging. 13814func (c *ProjectsLocationsCloudpubsubsourcesListCall) Continue(continue_ string) *ProjectsLocationsCloudpubsubsourcesListCall { 13815 c.urlParams_.Set("continue", continue_) 13816 return c 13817} 13818 13819// FieldSelector sets the optional parameter "fieldSelector": Allows to 13820// filter resources based on a specific value for a field name. Send 13821// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 13822// currently used by Cloud Run. 13823func (c *ProjectsLocationsCloudpubsubsourcesListCall) FieldSelector(fieldSelector string) *ProjectsLocationsCloudpubsubsourcesListCall { 13824 c.urlParams_.Set("fieldSelector", fieldSelector) 13825 return c 13826} 13827 13828// IncludeUninitialized sets the optional parameter 13829// "includeUninitialized": Not currently used by Cloud Run. 13830func (c *ProjectsLocationsCloudpubsubsourcesListCall) IncludeUninitialized(includeUninitialized bool) *ProjectsLocationsCloudpubsubsourcesListCall { 13831 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 13832 return c 13833} 13834 13835// LabelSelector sets the optional parameter "labelSelector": Allows to 13836// filter resources based on a label. Supported operations are =, !=, 13837// exists, in, and notIn. 13838func (c *ProjectsLocationsCloudpubsubsourcesListCall) LabelSelector(labelSelector string) *ProjectsLocationsCloudpubsubsourcesListCall { 13839 c.urlParams_.Set("labelSelector", labelSelector) 13840 return c 13841} 13842 13843// Limit sets the optional parameter "limit": The maximum number of 13844// records that should be returned. 13845func (c *ProjectsLocationsCloudpubsubsourcesListCall) Limit(limit int64) *ProjectsLocationsCloudpubsubsourcesListCall { 13846 c.urlParams_.Set("limit", fmt.Sprint(limit)) 13847 return c 13848} 13849 13850// ResourceVersion sets the optional parameter "resourceVersion": The 13851// baseline resource version from which the list or watch operation 13852// should start. Not currently used by Cloud Run. 13853func (c *ProjectsLocationsCloudpubsubsourcesListCall) ResourceVersion(resourceVersion string) *ProjectsLocationsCloudpubsubsourcesListCall { 13854 c.urlParams_.Set("resourceVersion", resourceVersion) 13855 return c 13856} 13857 13858// Watch sets the optional parameter "watch": Flag that indicates that 13859// the client expects to watch this resource as well. Not currently used 13860// by Cloud Run. 13861func (c *ProjectsLocationsCloudpubsubsourcesListCall) Watch(watch bool) *ProjectsLocationsCloudpubsubsourcesListCall { 13862 c.urlParams_.Set("watch", fmt.Sprint(watch)) 13863 return c 13864} 13865 13866// Fields allows partial responses to be retrieved. See 13867// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13868// for more information. 13869func (c *ProjectsLocationsCloudpubsubsourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudpubsubsourcesListCall { 13870 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13871 return c 13872} 13873 13874// IfNoneMatch sets the optional parameter which makes the operation 13875// fail if the object's ETag matches the given value. This is useful for 13876// getting updates only after the object has changed since the last 13877// request. Use googleapi.IsNotModified to check whether the response 13878// error from Do is the result of In-None-Match. 13879func (c *ProjectsLocationsCloudpubsubsourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudpubsubsourcesListCall { 13880 c.ifNoneMatch_ = entityTag 13881 return c 13882} 13883 13884// Context sets the context to be used in this call's Do method. Any 13885// pending HTTP request will be aborted if the provided context is 13886// canceled. 13887func (c *ProjectsLocationsCloudpubsubsourcesListCall) Context(ctx context.Context) *ProjectsLocationsCloudpubsubsourcesListCall { 13888 c.ctx_ = ctx 13889 return c 13890} 13891 13892// Header returns an http.Header that can be modified by the caller to 13893// add HTTP headers to the request. 13894func (c *ProjectsLocationsCloudpubsubsourcesListCall) Header() http.Header { 13895 if c.header_ == nil { 13896 c.header_ = make(http.Header) 13897 } 13898 return c.header_ 13899} 13900 13901func (c *ProjectsLocationsCloudpubsubsourcesListCall) doRequest(alt string) (*http.Response, error) { 13902 reqHeaders := make(http.Header) 13903 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13904 for k, v := range c.header_ { 13905 reqHeaders[k] = v 13906 } 13907 reqHeaders.Set("User-Agent", c.s.userAgent()) 13908 if c.ifNoneMatch_ != "" { 13909 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13910 } 13911 var body io.Reader = nil 13912 c.urlParams_.Set("alt", alt) 13913 c.urlParams_.Set("prettyPrint", "false") 13914 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cloudpubsubsources") 13915 urls += "?" + c.urlParams_.Encode() 13916 req, err := http.NewRequest("GET", urls, body) 13917 if err != nil { 13918 return nil, err 13919 } 13920 req.Header = reqHeaders 13921 googleapi.Expand(req.URL, map[string]string{ 13922 "parent": c.parent, 13923 }) 13924 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13925} 13926 13927// Do executes the "run.projects.locations.cloudpubsubsources.list" call. 13928// Exactly one of *ListCloudPubSubSourcesResponse or error will be 13929// non-nil. Any non-2xx status code is an error. Response headers are in 13930// either *ListCloudPubSubSourcesResponse.ServerResponse.Header or (if a 13931// response was returned at all) in error.(*googleapi.Error).Header. Use 13932// googleapi.IsNotModified to check whether the returned error was 13933// because http.StatusNotModified was returned. 13934func (c *ProjectsLocationsCloudpubsubsourcesListCall) Do(opts ...googleapi.CallOption) (*ListCloudPubSubSourcesResponse, error) { 13935 gensupport.SetOptions(c.urlParams_, opts...) 13936 res, err := c.doRequest("json") 13937 if res != nil && res.StatusCode == http.StatusNotModified { 13938 if res.Body != nil { 13939 res.Body.Close() 13940 } 13941 return nil, &googleapi.Error{ 13942 Code: res.StatusCode, 13943 Header: res.Header, 13944 } 13945 } 13946 if err != nil { 13947 return nil, err 13948 } 13949 defer googleapi.CloseBody(res) 13950 if err := googleapi.CheckResponse(res); err != nil { 13951 return nil, err 13952 } 13953 ret := &ListCloudPubSubSourcesResponse{ 13954 ServerResponse: googleapi.ServerResponse{ 13955 Header: res.Header, 13956 HTTPStatusCode: res.StatusCode, 13957 }, 13958 } 13959 target := &ret 13960 if err := gensupport.DecodeResponse(target, res); err != nil { 13961 return nil, err 13962 } 13963 return ret, nil 13964 // { 13965 // "description": "Rpc to list cloudpubsubsources.", 13966 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudpubsubsources", 13967 // "httpMethod": "GET", 13968 // "id": "run.projects.locations.cloudpubsubsources.list", 13969 // "parameterOrder": [ 13970 // "parent" 13971 // ], 13972 // "parameters": { 13973 // "continue": { 13974 // "description": "Optional encoded string to continue paging.", 13975 // "location": "query", 13976 // "type": "string" 13977 // }, 13978 // "fieldSelector": { 13979 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 13980 // "location": "query", 13981 // "type": "string" 13982 // }, 13983 // "includeUninitialized": { 13984 // "description": "Not currently used by Cloud Run.", 13985 // "location": "query", 13986 // "type": "boolean" 13987 // }, 13988 // "labelSelector": { 13989 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 13990 // "location": "query", 13991 // "type": "string" 13992 // }, 13993 // "limit": { 13994 // "description": "The maximum number of records that should be returned.", 13995 // "format": "int32", 13996 // "location": "query", 13997 // "type": "integer" 13998 // }, 13999 // "parent": { 14000 // "description": "The project ID or project number from which the cloudpubsubsources should be listed.", 14001 // "location": "path", 14002 // "pattern": "^projects/[^/]+/locations/[^/]+$", 14003 // "required": true, 14004 // "type": "string" 14005 // }, 14006 // "resourceVersion": { 14007 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 14008 // "location": "query", 14009 // "type": "string" 14010 // }, 14011 // "watch": { 14012 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 14013 // "location": "query", 14014 // "type": "boolean" 14015 // } 14016 // }, 14017 // "path": "v1alpha1/{+parent}/cloudpubsubsources", 14018 // "response": { 14019 // "$ref": "ListCloudPubSubSourcesResponse" 14020 // }, 14021 // "scopes": [ 14022 // "https://www.googleapis.com/auth/cloud-platform" 14023 // ] 14024 // } 14025 14026} 14027 14028// method id "run.projects.locations.cloudschedulersources.create": 14029 14030type ProjectsLocationsCloudschedulersourcesCreateCall struct { 14031 s *APIService 14032 parent string 14033 cloudschedulersource *CloudSchedulerSource 14034 urlParams_ gensupport.URLParams 14035 ctx_ context.Context 14036 header_ http.Header 14037} 14038 14039// Create: Creates a new cloudschedulersource. 14040func (r *ProjectsLocationsCloudschedulersourcesService) Create(parent string, cloudschedulersource *CloudSchedulerSource) *ProjectsLocationsCloudschedulersourcesCreateCall { 14041 c := &ProjectsLocationsCloudschedulersourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14042 c.parent = parent 14043 c.cloudschedulersource = cloudschedulersource 14044 return c 14045} 14046 14047// Fields allows partial responses to be retrieved. See 14048// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14049// for more information. 14050func (c *ProjectsLocationsCloudschedulersourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudschedulersourcesCreateCall { 14051 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14052 return c 14053} 14054 14055// Context sets the context to be used in this call's Do method. Any 14056// pending HTTP request will be aborted if the provided context is 14057// canceled. 14058func (c *ProjectsLocationsCloudschedulersourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsCloudschedulersourcesCreateCall { 14059 c.ctx_ = ctx 14060 return c 14061} 14062 14063// Header returns an http.Header that can be modified by the caller to 14064// add HTTP headers to the request. 14065func (c *ProjectsLocationsCloudschedulersourcesCreateCall) Header() http.Header { 14066 if c.header_ == nil { 14067 c.header_ = make(http.Header) 14068 } 14069 return c.header_ 14070} 14071 14072func (c *ProjectsLocationsCloudschedulersourcesCreateCall) doRequest(alt string) (*http.Response, error) { 14073 reqHeaders := make(http.Header) 14074 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14075 for k, v := range c.header_ { 14076 reqHeaders[k] = v 14077 } 14078 reqHeaders.Set("User-Agent", c.s.userAgent()) 14079 var body io.Reader = nil 14080 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudschedulersource) 14081 if err != nil { 14082 return nil, err 14083 } 14084 reqHeaders.Set("Content-Type", "application/json") 14085 c.urlParams_.Set("alt", alt) 14086 c.urlParams_.Set("prettyPrint", "false") 14087 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cloudschedulersources") 14088 urls += "?" + c.urlParams_.Encode() 14089 req, err := http.NewRequest("POST", urls, body) 14090 if err != nil { 14091 return nil, err 14092 } 14093 req.Header = reqHeaders 14094 googleapi.Expand(req.URL, map[string]string{ 14095 "parent": c.parent, 14096 }) 14097 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14098} 14099 14100// Do executes the "run.projects.locations.cloudschedulersources.create" call. 14101// Exactly one of *CloudSchedulerSource or error will be non-nil. Any 14102// non-2xx status code is an error. Response headers are in either 14103// *CloudSchedulerSource.ServerResponse.Header or (if a response was 14104// returned at all) in error.(*googleapi.Error).Header. Use 14105// googleapi.IsNotModified to check whether the returned error was 14106// because http.StatusNotModified was returned. 14107func (c *ProjectsLocationsCloudschedulersourcesCreateCall) Do(opts ...googleapi.CallOption) (*CloudSchedulerSource, error) { 14108 gensupport.SetOptions(c.urlParams_, opts...) 14109 res, err := c.doRequest("json") 14110 if res != nil && res.StatusCode == http.StatusNotModified { 14111 if res.Body != nil { 14112 res.Body.Close() 14113 } 14114 return nil, &googleapi.Error{ 14115 Code: res.StatusCode, 14116 Header: res.Header, 14117 } 14118 } 14119 if err != nil { 14120 return nil, err 14121 } 14122 defer googleapi.CloseBody(res) 14123 if err := googleapi.CheckResponse(res); err != nil { 14124 return nil, err 14125 } 14126 ret := &CloudSchedulerSource{ 14127 ServerResponse: googleapi.ServerResponse{ 14128 Header: res.Header, 14129 HTTPStatusCode: res.StatusCode, 14130 }, 14131 } 14132 target := &ret 14133 if err := gensupport.DecodeResponse(target, res); err != nil { 14134 return nil, err 14135 } 14136 return ret, nil 14137 // { 14138 // "description": "Creates a new cloudschedulersource.", 14139 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudschedulersources", 14140 // "httpMethod": "POST", 14141 // "id": "run.projects.locations.cloudschedulersources.create", 14142 // "parameterOrder": [ 14143 // "parent" 14144 // ], 14145 // "parameters": { 14146 // "parent": { 14147 // "description": "Required. The project ID or project number in which this cloudschedulersource should be created.", 14148 // "location": "path", 14149 // "pattern": "^projects/[^/]+/locations/[^/]+$", 14150 // "required": true, 14151 // "type": "string" 14152 // } 14153 // }, 14154 // "path": "v1alpha1/{+parent}/cloudschedulersources", 14155 // "request": { 14156 // "$ref": "CloudSchedulerSource" 14157 // }, 14158 // "response": { 14159 // "$ref": "CloudSchedulerSource" 14160 // }, 14161 // "scopes": [ 14162 // "https://www.googleapis.com/auth/cloud-platform" 14163 // ] 14164 // } 14165 14166} 14167 14168// method id "run.projects.locations.cloudschedulersources.delete": 14169 14170type ProjectsLocationsCloudschedulersourcesDeleteCall struct { 14171 s *APIService 14172 name string 14173 urlParams_ gensupport.URLParams 14174 ctx_ context.Context 14175 header_ http.Header 14176} 14177 14178// Delete: Rpc to delete a cloudschedulersource. 14179func (r *ProjectsLocationsCloudschedulersourcesService) Delete(name string) *ProjectsLocationsCloudschedulersourcesDeleteCall { 14180 c := &ProjectsLocationsCloudschedulersourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14181 c.name = name 14182 return c 14183} 14184 14185// ApiVersion sets the optional parameter "apiVersion": Cloud Run 14186// currently ignores this parameter. 14187func (c *ProjectsLocationsCloudschedulersourcesDeleteCall) ApiVersion(apiVersion string) *ProjectsLocationsCloudschedulersourcesDeleteCall { 14188 c.urlParams_.Set("apiVersion", apiVersion) 14189 return c 14190} 14191 14192// Kind sets the optional parameter "kind": Cloud Run currently ignores 14193// this parameter. 14194func (c *ProjectsLocationsCloudschedulersourcesDeleteCall) Kind(kind string) *ProjectsLocationsCloudschedulersourcesDeleteCall { 14195 c.urlParams_.Set("kind", kind) 14196 return c 14197} 14198 14199// PropagationPolicy sets the optional parameter "propagationPolicy": 14200// Specifies the propagation policy of delete. Cloud Run currently 14201// ignores this setting, and deletes in the background. Please see 14202// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 14203// for more information. 14204func (c *ProjectsLocationsCloudschedulersourcesDeleteCall) PropagationPolicy(propagationPolicy string) *ProjectsLocationsCloudschedulersourcesDeleteCall { 14205 c.urlParams_.Set("propagationPolicy", propagationPolicy) 14206 return c 14207} 14208 14209// Fields allows partial responses to be retrieved. See 14210// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14211// for more information. 14212func (c *ProjectsLocationsCloudschedulersourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudschedulersourcesDeleteCall { 14213 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14214 return c 14215} 14216 14217// Context sets the context to be used in this call's Do method. Any 14218// pending HTTP request will be aborted if the provided context is 14219// canceled. 14220func (c *ProjectsLocationsCloudschedulersourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCloudschedulersourcesDeleteCall { 14221 c.ctx_ = ctx 14222 return c 14223} 14224 14225// Header returns an http.Header that can be modified by the caller to 14226// add HTTP headers to the request. 14227func (c *ProjectsLocationsCloudschedulersourcesDeleteCall) Header() http.Header { 14228 if c.header_ == nil { 14229 c.header_ = make(http.Header) 14230 } 14231 return c.header_ 14232} 14233 14234func (c *ProjectsLocationsCloudschedulersourcesDeleteCall) doRequest(alt string) (*http.Response, error) { 14235 reqHeaders := make(http.Header) 14236 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14237 for k, v := range c.header_ { 14238 reqHeaders[k] = v 14239 } 14240 reqHeaders.Set("User-Agent", c.s.userAgent()) 14241 var body io.Reader = nil 14242 c.urlParams_.Set("alt", alt) 14243 c.urlParams_.Set("prettyPrint", "false") 14244 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 14245 urls += "?" + c.urlParams_.Encode() 14246 req, err := http.NewRequest("DELETE", urls, body) 14247 if err != nil { 14248 return nil, err 14249 } 14250 req.Header = reqHeaders 14251 googleapi.Expand(req.URL, map[string]string{ 14252 "name": c.name, 14253 }) 14254 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14255} 14256 14257// Do executes the "run.projects.locations.cloudschedulersources.delete" call. 14258// Exactly one of *Empty or error will be non-nil. Any non-2xx status 14259// code is an error. Response headers are in either 14260// *Empty.ServerResponse.Header or (if a response was returned at all) 14261// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 14262// check whether the returned error was because http.StatusNotModified 14263// was returned. 14264func (c *ProjectsLocationsCloudschedulersourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 14265 gensupport.SetOptions(c.urlParams_, opts...) 14266 res, err := c.doRequest("json") 14267 if res != nil && res.StatusCode == http.StatusNotModified { 14268 if res.Body != nil { 14269 res.Body.Close() 14270 } 14271 return nil, &googleapi.Error{ 14272 Code: res.StatusCode, 14273 Header: res.Header, 14274 } 14275 } 14276 if err != nil { 14277 return nil, err 14278 } 14279 defer googleapi.CloseBody(res) 14280 if err := googleapi.CheckResponse(res); err != nil { 14281 return nil, err 14282 } 14283 ret := &Empty{ 14284 ServerResponse: googleapi.ServerResponse{ 14285 Header: res.Header, 14286 HTTPStatusCode: res.StatusCode, 14287 }, 14288 } 14289 target := &ret 14290 if err := gensupport.DecodeResponse(target, res); err != nil { 14291 return nil, err 14292 } 14293 return ret, nil 14294 // { 14295 // "description": "Rpc to delete a cloudschedulersource.", 14296 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudschedulersources/{cloudschedulersourcesId}", 14297 // "httpMethod": "DELETE", 14298 // "id": "run.projects.locations.cloudschedulersources.delete", 14299 // "parameterOrder": [ 14300 // "name" 14301 // ], 14302 // "parameters": { 14303 // "apiVersion": { 14304 // "description": "Cloud Run currently ignores this parameter.", 14305 // "location": "query", 14306 // "type": "string" 14307 // }, 14308 // "kind": { 14309 // "description": "Cloud Run currently ignores this parameter.", 14310 // "location": "query", 14311 // "type": "string" 14312 // }, 14313 // "name": { 14314 // "description": "Required. The name of the cloudschedulersource being deleted. If needed, replace {namespace_id} with the project ID.", 14315 // "location": "path", 14316 // "pattern": "^projects/[^/]+/locations/[^/]+/cloudschedulersources/[^/]+$", 14317 // "required": true, 14318 // "type": "string" 14319 // }, 14320 // "propagationPolicy": { 14321 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 14322 // "location": "query", 14323 // "type": "string" 14324 // } 14325 // }, 14326 // "path": "v1alpha1/{+name}", 14327 // "response": { 14328 // "$ref": "Empty" 14329 // }, 14330 // "scopes": [ 14331 // "https://www.googleapis.com/auth/cloud-platform" 14332 // ] 14333 // } 14334 14335} 14336 14337// method id "run.projects.locations.cloudschedulersources.get": 14338 14339type ProjectsLocationsCloudschedulersourcesGetCall struct { 14340 s *APIService 14341 name string 14342 urlParams_ gensupport.URLParams 14343 ifNoneMatch_ string 14344 ctx_ context.Context 14345 header_ http.Header 14346} 14347 14348// Get: Rpc to get information about a cloudschedulersource. 14349func (r *ProjectsLocationsCloudschedulersourcesService) Get(name string) *ProjectsLocationsCloudschedulersourcesGetCall { 14350 c := &ProjectsLocationsCloudschedulersourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14351 c.name = name 14352 return c 14353} 14354 14355// Fields allows partial responses to be retrieved. See 14356// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14357// for more information. 14358func (c *ProjectsLocationsCloudschedulersourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudschedulersourcesGetCall { 14359 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14360 return c 14361} 14362 14363// IfNoneMatch sets the optional parameter which makes the operation 14364// fail if the object's ETag matches the given value. This is useful for 14365// getting updates only after the object has changed since the last 14366// request. Use googleapi.IsNotModified to check whether the response 14367// error from Do is the result of In-None-Match. 14368func (c *ProjectsLocationsCloudschedulersourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudschedulersourcesGetCall { 14369 c.ifNoneMatch_ = entityTag 14370 return c 14371} 14372 14373// Context sets the context to be used in this call's Do method. Any 14374// pending HTTP request will be aborted if the provided context is 14375// canceled. 14376func (c *ProjectsLocationsCloudschedulersourcesGetCall) Context(ctx context.Context) *ProjectsLocationsCloudschedulersourcesGetCall { 14377 c.ctx_ = ctx 14378 return c 14379} 14380 14381// Header returns an http.Header that can be modified by the caller to 14382// add HTTP headers to the request. 14383func (c *ProjectsLocationsCloudschedulersourcesGetCall) Header() http.Header { 14384 if c.header_ == nil { 14385 c.header_ = make(http.Header) 14386 } 14387 return c.header_ 14388} 14389 14390func (c *ProjectsLocationsCloudschedulersourcesGetCall) doRequest(alt string) (*http.Response, error) { 14391 reqHeaders := make(http.Header) 14392 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14393 for k, v := range c.header_ { 14394 reqHeaders[k] = v 14395 } 14396 reqHeaders.Set("User-Agent", c.s.userAgent()) 14397 if c.ifNoneMatch_ != "" { 14398 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14399 } 14400 var body io.Reader = nil 14401 c.urlParams_.Set("alt", alt) 14402 c.urlParams_.Set("prettyPrint", "false") 14403 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 14404 urls += "?" + c.urlParams_.Encode() 14405 req, err := http.NewRequest("GET", urls, body) 14406 if err != nil { 14407 return nil, err 14408 } 14409 req.Header = reqHeaders 14410 googleapi.Expand(req.URL, map[string]string{ 14411 "name": c.name, 14412 }) 14413 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14414} 14415 14416// Do executes the "run.projects.locations.cloudschedulersources.get" call. 14417// Exactly one of *CloudSchedulerSource or error will be non-nil. Any 14418// non-2xx status code is an error. Response headers are in either 14419// *CloudSchedulerSource.ServerResponse.Header or (if a response was 14420// returned at all) in error.(*googleapi.Error).Header. Use 14421// googleapi.IsNotModified to check whether the returned error was 14422// because http.StatusNotModified was returned. 14423func (c *ProjectsLocationsCloudschedulersourcesGetCall) Do(opts ...googleapi.CallOption) (*CloudSchedulerSource, error) { 14424 gensupport.SetOptions(c.urlParams_, opts...) 14425 res, err := c.doRequest("json") 14426 if res != nil && res.StatusCode == http.StatusNotModified { 14427 if res.Body != nil { 14428 res.Body.Close() 14429 } 14430 return nil, &googleapi.Error{ 14431 Code: res.StatusCode, 14432 Header: res.Header, 14433 } 14434 } 14435 if err != nil { 14436 return nil, err 14437 } 14438 defer googleapi.CloseBody(res) 14439 if err := googleapi.CheckResponse(res); err != nil { 14440 return nil, err 14441 } 14442 ret := &CloudSchedulerSource{ 14443 ServerResponse: googleapi.ServerResponse{ 14444 Header: res.Header, 14445 HTTPStatusCode: res.StatusCode, 14446 }, 14447 } 14448 target := &ret 14449 if err := gensupport.DecodeResponse(target, res); err != nil { 14450 return nil, err 14451 } 14452 return ret, nil 14453 // { 14454 // "description": "Rpc to get information about a cloudschedulersource.", 14455 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudschedulersources/{cloudschedulersourcesId}", 14456 // "httpMethod": "GET", 14457 // "id": "run.projects.locations.cloudschedulersources.get", 14458 // "parameterOrder": [ 14459 // "name" 14460 // ], 14461 // "parameters": { 14462 // "name": { 14463 // "description": "Required. The name of the cloudschedulersource being retrieved. If needed, replace {namespace_id} with the project ID.", 14464 // "location": "path", 14465 // "pattern": "^projects/[^/]+/locations/[^/]+/cloudschedulersources/[^/]+$", 14466 // "required": true, 14467 // "type": "string" 14468 // } 14469 // }, 14470 // "path": "v1alpha1/{+name}", 14471 // "response": { 14472 // "$ref": "CloudSchedulerSource" 14473 // }, 14474 // "scopes": [ 14475 // "https://www.googleapis.com/auth/cloud-platform" 14476 // ] 14477 // } 14478 14479} 14480 14481// method id "run.projects.locations.cloudschedulersources.list": 14482 14483type ProjectsLocationsCloudschedulersourcesListCall struct { 14484 s *APIService 14485 parent string 14486 urlParams_ gensupport.URLParams 14487 ifNoneMatch_ string 14488 ctx_ context.Context 14489 header_ http.Header 14490} 14491 14492// List: Rpc to list cloudschedulersources. 14493func (r *ProjectsLocationsCloudschedulersourcesService) List(parent string) *ProjectsLocationsCloudschedulersourcesListCall { 14494 c := &ProjectsLocationsCloudschedulersourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14495 c.parent = parent 14496 return c 14497} 14498 14499// Continue sets the optional parameter "continue": Optional encoded 14500// string to continue paging. 14501func (c *ProjectsLocationsCloudschedulersourcesListCall) Continue(continue_ string) *ProjectsLocationsCloudschedulersourcesListCall { 14502 c.urlParams_.Set("continue", continue_) 14503 return c 14504} 14505 14506// FieldSelector sets the optional parameter "fieldSelector": Allows to 14507// filter resources based on a specific value for a field name. Send 14508// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 14509// currently used by Cloud Run. 14510func (c *ProjectsLocationsCloudschedulersourcesListCall) FieldSelector(fieldSelector string) *ProjectsLocationsCloudschedulersourcesListCall { 14511 c.urlParams_.Set("fieldSelector", fieldSelector) 14512 return c 14513} 14514 14515// IncludeUninitialized sets the optional parameter 14516// "includeUninitialized": Not currently used by Cloud Run. 14517func (c *ProjectsLocationsCloudschedulersourcesListCall) IncludeUninitialized(includeUninitialized bool) *ProjectsLocationsCloudschedulersourcesListCall { 14518 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 14519 return c 14520} 14521 14522// LabelSelector sets the optional parameter "labelSelector": Allows to 14523// filter resources based on a label. Supported operations are =, !=, 14524// exists, in, and notIn. 14525func (c *ProjectsLocationsCloudschedulersourcesListCall) LabelSelector(labelSelector string) *ProjectsLocationsCloudschedulersourcesListCall { 14526 c.urlParams_.Set("labelSelector", labelSelector) 14527 return c 14528} 14529 14530// Limit sets the optional parameter "limit": The maximum number of 14531// records that should be returned. 14532func (c *ProjectsLocationsCloudschedulersourcesListCall) Limit(limit int64) *ProjectsLocationsCloudschedulersourcesListCall { 14533 c.urlParams_.Set("limit", fmt.Sprint(limit)) 14534 return c 14535} 14536 14537// ResourceVersion sets the optional parameter "resourceVersion": The 14538// baseline resource version from which the list or watch operation 14539// should start. Not currently used by Cloud Run. 14540func (c *ProjectsLocationsCloudschedulersourcesListCall) ResourceVersion(resourceVersion string) *ProjectsLocationsCloudschedulersourcesListCall { 14541 c.urlParams_.Set("resourceVersion", resourceVersion) 14542 return c 14543} 14544 14545// Watch sets the optional parameter "watch": Flag that indicates that 14546// the client expects to watch this resource as well. Not currently used 14547// by Cloud Run. 14548func (c *ProjectsLocationsCloudschedulersourcesListCall) Watch(watch bool) *ProjectsLocationsCloudschedulersourcesListCall { 14549 c.urlParams_.Set("watch", fmt.Sprint(watch)) 14550 return c 14551} 14552 14553// Fields allows partial responses to be retrieved. See 14554// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14555// for more information. 14556func (c *ProjectsLocationsCloudschedulersourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudschedulersourcesListCall { 14557 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14558 return c 14559} 14560 14561// IfNoneMatch sets the optional parameter which makes the operation 14562// fail if the object's ETag matches the given value. This is useful for 14563// getting updates only after the object has changed since the last 14564// request. Use googleapi.IsNotModified to check whether the response 14565// error from Do is the result of In-None-Match. 14566func (c *ProjectsLocationsCloudschedulersourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudschedulersourcesListCall { 14567 c.ifNoneMatch_ = entityTag 14568 return c 14569} 14570 14571// Context sets the context to be used in this call's Do method. Any 14572// pending HTTP request will be aborted if the provided context is 14573// canceled. 14574func (c *ProjectsLocationsCloudschedulersourcesListCall) Context(ctx context.Context) *ProjectsLocationsCloudschedulersourcesListCall { 14575 c.ctx_ = ctx 14576 return c 14577} 14578 14579// Header returns an http.Header that can be modified by the caller to 14580// add HTTP headers to the request. 14581func (c *ProjectsLocationsCloudschedulersourcesListCall) Header() http.Header { 14582 if c.header_ == nil { 14583 c.header_ = make(http.Header) 14584 } 14585 return c.header_ 14586} 14587 14588func (c *ProjectsLocationsCloudschedulersourcesListCall) doRequest(alt string) (*http.Response, error) { 14589 reqHeaders := make(http.Header) 14590 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14591 for k, v := range c.header_ { 14592 reqHeaders[k] = v 14593 } 14594 reqHeaders.Set("User-Agent", c.s.userAgent()) 14595 if c.ifNoneMatch_ != "" { 14596 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14597 } 14598 var body io.Reader = nil 14599 c.urlParams_.Set("alt", alt) 14600 c.urlParams_.Set("prettyPrint", "false") 14601 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cloudschedulersources") 14602 urls += "?" + c.urlParams_.Encode() 14603 req, err := http.NewRequest("GET", urls, body) 14604 if err != nil { 14605 return nil, err 14606 } 14607 req.Header = reqHeaders 14608 googleapi.Expand(req.URL, map[string]string{ 14609 "parent": c.parent, 14610 }) 14611 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14612} 14613 14614// Do executes the "run.projects.locations.cloudschedulersources.list" call. 14615// Exactly one of *ListCloudSchedulerSourcesResponse or error will be 14616// non-nil. Any non-2xx status code is an error. Response headers are in 14617// either *ListCloudSchedulerSourcesResponse.ServerResponse.Header or 14618// (if a response was returned at all) in 14619// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14620// whether the returned error was because http.StatusNotModified was 14621// returned. 14622func (c *ProjectsLocationsCloudschedulersourcesListCall) Do(opts ...googleapi.CallOption) (*ListCloudSchedulerSourcesResponse, error) { 14623 gensupport.SetOptions(c.urlParams_, opts...) 14624 res, err := c.doRequest("json") 14625 if res != nil && res.StatusCode == http.StatusNotModified { 14626 if res.Body != nil { 14627 res.Body.Close() 14628 } 14629 return nil, &googleapi.Error{ 14630 Code: res.StatusCode, 14631 Header: res.Header, 14632 } 14633 } 14634 if err != nil { 14635 return nil, err 14636 } 14637 defer googleapi.CloseBody(res) 14638 if err := googleapi.CheckResponse(res); err != nil { 14639 return nil, err 14640 } 14641 ret := &ListCloudSchedulerSourcesResponse{ 14642 ServerResponse: googleapi.ServerResponse{ 14643 Header: res.Header, 14644 HTTPStatusCode: res.StatusCode, 14645 }, 14646 } 14647 target := &ret 14648 if err := gensupport.DecodeResponse(target, res); err != nil { 14649 return nil, err 14650 } 14651 return ret, nil 14652 // { 14653 // "description": "Rpc to list cloudschedulersources.", 14654 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudschedulersources", 14655 // "httpMethod": "GET", 14656 // "id": "run.projects.locations.cloudschedulersources.list", 14657 // "parameterOrder": [ 14658 // "parent" 14659 // ], 14660 // "parameters": { 14661 // "continue": { 14662 // "description": "Optional encoded string to continue paging.", 14663 // "location": "query", 14664 // "type": "string" 14665 // }, 14666 // "fieldSelector": { 14667 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 14668 // "location": "query", 14669 // "type": "string" 14670 // }, 14671 // "includeUninitialized": { 14672 // "description": "Not currently used by Cloud Run.", 14673 // "location": "query", 14674 // "type": "boolean" 14675 // }, 14676 // "labelSelector": { 14677 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 14678 // "location": "query", 14679 // "type": "string" 14680 // }, 14681 // "limit": { 14682 // "description": "The maximum number of records that should be returned.", 14683 // "format": "int32", 14684 // "location": "query", 14685 // "type": "integer" 14686 // }, 14687 // "parent": { 14688 // "description": "Required. The project ID or project number from which the cloudschedulersources should be listed.", 14689 // "location": "path", 14690 // "pattern": "^projects/[^/]+/locations/[^/]+$", 14691 // "required": true, 14692 // "type": "string" 14693 // }, 14694 // "resourceVersion": { 14695 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 14696 // "location": "query", 14697 // "type": "string" 14698 // }, 14699 // "watch": { 14700 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 14701 // "location": "query", 14702 // "type": "boolean" 14703 // } 14704 // }, 14705 // "path": "v1alpha1/{+parent}/cloudschedulersources", 14706 // "response": { 14707 // "$ref": "ListCloudSchedulerSourcesResponse" 14708 // }, 14709 // "scopes": [ 14710 // "https://www.googleapis.com/auth/cloud-platform" 14711 // ] 14712 // } 14713 14714} 14715 14716// method id "run.projects.locations.cloudschedulersources.replaceCloudSchedulerSource": 14717 14718type ProjectsLocationsCloudschedulersourcesReplaceCloudSchedulerSourceCall struct { 14719 s *APIService 14720 name string 14721 cloudschedulersource *CloudSchedulerSource 14722 urlParams_ gensupport.URLParams 14723 ctx_ context.Context 14724 header_ http.Header 14725} 14726 14727// ReplaceCloudSchedulerSource: Rpc to replace a cloudschedulersource. 14728// Only the spec and metadata labels and annotations are modifiable. 14729// After the Update request, Cloud Run will work to make the 'status' 14730// match the requested 'spec'. May provide metadata.resourceVersion to 14731// enforce update from last read for optimistic concurrency control. 14732func (r *ProjectsLocationsCloudschedulersourcesService) ReplaceCloudSchedulerSource(name string, cloudschedulersource *CloudSchedulerSource) *ProjectsLocationsCloudschedulersourcesReplaceCloudSchedulerSourceCall { 14733 c := &ProjectsLocationsCloudschedulersourcesReplaceCloudSchedulerSourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14734 c.name = name 14735 c.cloudschedulersource = cloudschedulersource 14736 return c 14737} 14738 14739// Fields allows partial responses to be retrieved. See 14740// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14741// for more information. 14742func (c *ProjectsLocationsCloudschedulersourcesReplaceCloudSchedulerSourceCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudschedulersourcesReplaceCloudSchedulerSourceCall { 14743 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14744 return c 14745} 14746 14747// Context sets the context to be used in this call's Do method. Any 14748// pending HTTP request will be aborted if the provided context is 14749// canceled. 14750func (c *ProjectsLocationsCloudschedulersourcesReplaceCloudSchedulerSourceCall) Context(ctx context.Context) *ProjectsLocationsCloudschedulersourcesReplaceCloudSchedulerSourceCall { 14751 c.ctx_ = ctx 14752 return c 14753} 14754 14755// Header returns an http.Header that can be modified by the caller to 14756// add HTTP headers to the request. 14757func (c *ProjectsLocationsCloudschedulersourcesReplaceCloudSchedulerSourceCall) Header() http.Header { 14758 if c.header_ == nil { 14759 c.header_ = make(http.Header) 14760 } 14761 return c.header_ 14762} 14763 14764func (c *ProjectsLocationsCloudschedulersourcesReplaceCloudSchedulerSourceCall) doRequest(alt string) (*http.Response, error) { 14765 reqHeaders := make(http.Header) 14766 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14767 for k, v := range c.header_ { 14768 reqHeaders[k] = v 14769 } 14770 reqHeaders.Set("User-Agent", c.s.userAgent()) 14771 var body io.Reader = nil 14772 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudschedulersource) 14773 if err != nil { 14774 return nil, err 14775 } 14776 reqHeaders.Set("Content-Type", "application/json") 14777 c.urlParams_.Set("alt", alt) 14778 c.urlParams_.Set("prettyPrint", "false") 14779 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 14780 urls += "?" + c.urlParams_.Encode() 14781 req, err := http.NewRequest("PUT", urls, body) 14782 if err != nil { 14783 return nil, err 14784 } 14785 req.Header = reqHeaders 14786 googleapi.Expand(req.URL, map[string]string{ 14787 "name": c.name, 14788 }) 14789 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14790} 14791 14792// Do executes the "run.projects.locations.cloudschedulersources.replaceCloudSchedulerSource" call. 14793// Exactly one of *CloudSchedulerSource or error will be non-nil. Any 14794// non-2xx status code is an error. Response headers are in either 14795// *CloudSchedulerSource.ServerResponse.Header or (if a response was 14796// returned at all) in error.(*googleapi.Error).Header. Use 14797// googleapi.IsNotModified to check whether the returned error was 14798// because http.StatusNotModified was returned. 14799func (c *ProjectsLocationsCloudschedulersourcesReplaceCloudSchedulerSourceCall) Do(opts ...googleapi.CallOption) (*CloudSchedulerSource, error) { 14800 gensupport.SetOptions(c.urlParams_, opts...) 14801 res, err := c.doRequest("json") 14802 if res != nil && res.StatusCode == http.StatusNotModified { 14803 if res.Body != nil { 14804 res.Body.Close() 14805 } 14806 return nil, &googleapi.Error{ 14807 Code: res.StatusCode, 14808 Header: res.Header, 14809 } 14810 } 14811 if err != nil { 14812 return nil, err 14813 } 14814 defer googleapi.CloseBody(res) 14815 if err := googleapi.CheckResponse(res); err != nil { 14816 return nil, err 14817 } 14818 ret := &CloudSchedulerSource{ 14819 ServerResponse: googleapi.ServerResponse{ 14820 Header: res.Header, 14821 HTTPStatusCode: res.StatusCode, 14822 }, 14823 } 14824 target := &ret 14825 if err := gensupport.DecodeResponse(target, res); err != nil { 14826 return nil, err 14827 } 14828 return ret, nil 14829 // { 14830 // "description": "Rpc to replace a cloudschedulersource. Only the spec and metadata labels and annotations are modifiable. After the Update request, Cloud Run will work to make the 'status' match the requested 'spec'. May provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.", 14831 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudschedulersources/{cloudschedulersourcesId}", 14832 // "httpMethod": "PUT", 14833 // "id": "run.projects.locations.cloudschedulersources.replaceCloudSchedulerSource", 14834 // "parameterOrder": [ 14835 // "name" 14836 // ], 14837 // "parameters": { 14838 // "name": { 14839 // "description": "Required. The name of the cloudschedulersource being retrieved. If needed, replace {namespace_id} with the project ID.", 14840 // "location": "path", 14841 // "pattern": "^projects/[^/]+/locations/[^/]+/cloudschedulersources/[^/]+$", 14842 // "required": true, 14843 // "type": "string" 14844 // } 14845 // }, 14846 // "path": "v1alpha1/{+name}", 14847 // "request": { 14848 // "$ref": "CloudSchedulerSource" 14849 // }, 14850 // "response": { 14851 // "$ref": "CloudSchedulerSource" 14852 // }, 14853 // "scopes": [ 14854 // "https://www.googleapis.com/auth/cloud-platform" 14855 // ] 14856 // } 14857 14858} 14859 14860// method id "run.projects.locations.cloudstoragesources.create": 14861 14862type ProjectsLocationsCloudstoragesourcesCreateCall struct { 14863 s *APIService 14864 parent string 14865 cloudstoragesource *CloudStorageSource 14866 urlParams_ gensupport.URLParams 14867 ctx_ context.Context 14868 header_ http.Header 14869} 14870 14871// Create: Creates a new cloudstoragesource. 14872func (r *ProjectsLocationsCloudstoragesourcesService) Create(parent string, cloudstoragesource *CloudStorageSource) *ProjectsLocationsCloudstoragesourcesCreateCall { 14873 c := &ProjectsLocationsCloudstoragesourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14874 c.parent = parent 14875 c.cloudstoragesource = cloudstoragesource 14876 return c 14877} 14878 14879// Fields allows partial responses to be retrieved. See 14880// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14881// for more information. 14882func (c *ProjectsLocationsCloudstoragesourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudstoragesourcesCreateCall { 14883 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14884 return c 14885} 14886 14887// Context sets the context to be used in this call's Do method. Any 14888// pending HTTP request will be aborted if the provided context is 14889// canceled. 14890func (c *ProjectsLocationsCloudstoragesourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsCloudstoragesourcesCreateCall { 14891 c.ctx_ = ctx 14892 return c 14893} 14894 14895// Header returns an http.Header that can be modified by the caller to 14896// add HTTP headers to the request. 14897func (c *ProjectsLocationsCloudstoragesourcesCreateCall) Header() http.Header { 14898 if c.header_ == nil { 14899 c.header_ = make(http.Header) 14900 } 14901 return c.header_ 14902} 14903 14904func (c *ProjectsLocationsCloudstoragesourcesCreateCall) doRequest(alt string) (*http.Response, error) { 14905 reqHeaders := make(http.Header) 14906 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14907 for k, v := range c.header_ { 14908 reqHeaders[k] = v 14909 } 14910 reqHeaders.Set("User-Agent", c.s.userAgent()) 14911 var body io.Reader = nil 14912 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudstoragesource) 14913 if err != nil { 14914 return nil, err 14915 } 14916 reqHeaders.Set("Content-Type", "application/json") 14917 c.urlParams_.Set("alt", alt) 14918 c.urlParams_.Set("prettyPrint", "false") 14919 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cloudstoragesources") 14920 urls += "?" + c.urlParams_.Encode() 14921 req, err := http.NewRequest("POST", urls, body) 14922 if err != nil { 14923 return nil, err 14924 } 14925 req.Header = reqHeaders 14926 googleapi.Expand(req.URL, map[string]string{ 14927 "parent": c.parent, 14928 }) 14929 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14930} 14931 14932// Do executes the "run.projects.locations.cloudstoragesources.create" call. 14933// Exactly one of *CloudStorageSource or error will be non-nil. Any 14934// non-2xx status code is an error. Response headers are in either 14935// *CloudStorageSource.ServerResponse.Header or (if a response was 14936// returned at all) in error.(*googleapi.Error).Header. Use 14937// googleapi.IsNotModified to check whether the returned error was 14938// because http.StatusNotModified was returned. 14939func (c *ProjectsLocationsCloudstoragesourcesCreateCall) Do(opts ...googleapi.CallOption) (*CloudStorageSource, error) { 14940 gensupport.SetOptions(c.urlParams_, opts...) 14941 res, err := c.doRequest("json") 14942 if res != nil && res.StatusCode == http.StatusNotModified { 14943 if res.Body != nil { 14944 res.Body.Close() 14945 } 14946 return nil, &googleapi.Error{ 14947 Code: res.StatusCode, 14948 Header: res.Header, 14949 } 14950 } 14951 if err != nil { 14952 return nil, err 14953 } 14954 defer googleapi.CloseBody(res) 14955 if err := googleapi.CheckResponse(res); err != nil { 14956 return nil, err 14957 } 14958 ret := &CloudStorageSource{ 14959 ServerResponse: googleapi.ServerResponse{ 14960 Header: res.Header, 14961 HTTPStatusCode: res.StatusCode, 14962 }, 14963 } 14964 target := &ret 14965 if err := gensupport.DecodeResponse(target, res); err != nil { 14966 return nil, err 14967 } 14968 return ret, nil 14969 // { 14970 // "description": "Creates a new cloudstoragesource.", 14971 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudstoragesources", 14972 // "httpMethod": "POST", 14973 // "id": "run.projects.locations.cloudstoragesources.create", 14974 // "parameterOrder": [ 14975 // "parent" 14976 // ], 14977 // "parameters": { 14978 // "parent": { 14979 // "description": "Required. The project ID or project number in which this cloudstoragesource should be created.", 14980 // "location": "path", 14981 // "pattern": "^projects/[^/]+/locations/[^/]+$", 14982 // "required": true, 14983 // "type": "string" 14984 // } 14985 // }, 14986 // "path": "v1alpha1/{+parent}/cloudstoragesources", 14987 // "request": { 14988 // "$ref": "CloudStorageSource" 14989 // }, 14990 // "response": { 14991 // "$ref": "CloudStorageSource" 14992 // }, 14993 // "scopes": [ 14994 // "https://www.googleapis.com/auth/cloud-platform" 14995 // ] 14996 // } 14997 14998} 14999 15000// method id "run.projects.locations.cloudstoragesources.delete": 15001 15002type ProjectsLocationsCloudstoragesourcesDeleteCall struct { 15003 s *APIService 15004 name string 15005 urlParams_ gensupport.URLParams 15006 ctx_ context.Context 15007 header_ http.Header 15008} 15009 15010// Delete: Rpc to delete a cloudstoragesource. 15011func (r *ProjectsLocationsCloudstoragesourcesService) Delete(name string) *ProjectsLocationsCloudstoragesourcesDeleteCall { 15012 c := &ProjectsLocationsCloudstoragesourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15013 c.name = name 15014 return c 15015} 15016 15017// ApiVersion sets the optional parameter "apiVersion": Cloud Run 15018// currently ignores this parameter. 15019func (c *ProjectsLocationsCloudstoragesourcesDeleteCall) ApiVersion(apiVersion string) *ProjectsLocationsCloudstoragesourcesDeleteCall { 15020 c.urlParams_.Set("apiVersion", apiVersion) 15021 return c 15022} 15023 15024// Kind sets the optional parameter "kind": Cloud Run currently ignores 15025// this parameter. 15026func (c *ProjectsLocationsCloudstoragesourcesDeleteCall) Kind(kind string) *ProjectsLocationsCloudstoragesourcesDeleteCall { 15027 c.urlParams_.Set("kind", kind) 15028 return c 15029} 15030 15031// PropagationPolicy sets the optional parameter "propagationPolicy": 15032// Specifies the propagation policy of delete. Cloud Run currently 15033// ignores this setting, and deletes in the background. Please see 15034// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 15035// for more information. 15036func (c *ProjectsLocationsCloudstoragesourcesDeleteCall) PropagationPolicy(propagationPolicy string) *ProjectsLocationsCloudstoragesourcesDeleteCall { 15037 c.urlParams_.Set("propagationPolicy", propagationPolicy) 15038 return c 15039} 15040 15041// Fields allows partial responses to be retrieved. See 15042// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15043// for more information. 15044func (c *ProjectsLocationsCloudstoragesourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudstoragesourcesDeleteCall { 15045 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15046 return c 15047} 15048 15049// Context sets the context to be used in this call's Do method. Any 15050// pending HTTP request will be aborted if the provided context is 15051// canceled. 15052func (c *ProjectsLocationsCloudstoragesourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCloudstoragesourcesDeleteCall { 15053 c.ctx_ = ctx 15054 return c 15055} 15056 15057// Header returns an http.Header that can be modified by the caller to 15058// add HTTP headers to the request. 15059func (c *ProjectsLocationsCloudstoragesourcesDeleteCall) Header() http.Header { 15060 if c.header_ == nil { 15061 c.header_ = make(http.Header) 15062 } 15063 return c.header_ 15064} 15065 15066func (c *ProjectsLocationsCloudstoragesourcesDeleteCall) doRequest(alt string) (*http.Response, error) { 15067 reqHeaders := make(http.Header) 15068 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15069 for k, v := range c.header_ { 15070 reqHeaders[k] = v 15071 } 15072 reqHeaders.Set("User-Agent", c.s.userAgent()) 15073 var body io.Reader = nil 15074 c.urlParams_.Set("alt", alt) 15075 c.urlParams_.Set("prettyPrint", "false") 15076 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 15077 urls += "?" + c.urlParams_.Encode() 15078 req, err := http.NewRequest("DELETE", urls, body) 15079 if err != nil { 15080 return nil, err 15081 } 15082 req.Header = reqHeaders 15083 googleapi.Expand(req.URL, map[string]string{ 15084 "name": c.name, 15085 }) 15086 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15087} 15088 15089// Do executes the "run.projects.locations.cloudstoragesources.delete" call. 15090// Exactly one of *Empty or error will be non-nil. Any non-2xx status 15091// code is an error. Response headers are in either 15092// *Empty.ServerResponse.Header or (if a response was returned at all) 15093// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 15094// check whether the returned error was because http.StatusNotModified 15095// was returned. 15096func (c *ProjectsLocationsCloudstoragesourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 15097 gensupport.SetOptions(c.urlParams_, opts...) 15098 res, err := c.doRequest("json") 15099 if res != nil && res.StatusCode == http.StatusNotModified { 15100 if res.Body != nil { 15101 res.Body.Close() 15102 } 15103 return nil, &googleapi.Error{ 15104 Code: res.StatusCode, 15105 Header: res.Header, 15106 } 15107 } 15108 if err != nil { 15109 return nil, err 15110 } 15111 defer googleapi.CloseBody(res) 15112 if err := googleapi.CheckResponse(res); err != nil { 15113 return nil, err 15114 } 15115 ret := &Empty{ 15116 ServerResponse: googleapi.ServerResponse{ 15117 Header: res.Header, 15118 HTTPStatusCode: res.StatusCode, 15119 }, 15120 } 15121 target := &ret 15122 if err := gensupport.DecodeResponse(target, res); err != nil { 15123 return nil, err 15124 } 15125 return ret, nil 15126 // { 15127 // "description": "Rpc to delete a cloudstoragesource.", 15128 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudstoragesources/{cloudstoragesourcesId}", 15129 // "httpMethod": "DELETE", 15130 // "id": "run.projects.locations.cloudstoragesources.delete", 15131 // "parameterOrder": [ 15132 // "name" 15133 // ], 15134 // "parameters": { 15135 // "apiVersion": { 15136 // "description": "Cloud Run currently ignores this parameter.", 15137 // "location": "query", 15138 // "type": "string" 15139 // }, 15140 // "kind": { 15141 // "description": "Cloud Run currently ignores this parameter.", 15142 // "location": "query", 15143 // "type": "string" 15144 // }, 15145 // "name": { 15146 // "description": "Required. The name of the cloudstoragesource being deleted. If needed, replace {namespace_id} with the project ID.", 15147 // "location": "path", 15148 // "pattern": "^projects/[^/]+/locations/[^/]+/cloudstoragesources/[^/]+$", 15149 // "required": true, 15150 // "type": "string" 15151 // }, 15152 // "propagationPolicy": { 15153 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 15154 // "location": "query", 15155 // "type": "string" 15156 // } 15157 // }, 15158 // "path": "v1alpha1/{+name}", 15159 // "response": { 15160 // "$ref": "Empty" 15161 // }, 15162 // "scopes": [ 15163 // "https://www.googleapis.com/auth/cloud-platform" 15164 // ] 15165 // } 15166 15167} 15168 15169// method id "run.projects.locations.cloudstoragesources.get": 15170 15171type ProjectsLocationsCloudstoragesourcesGetCall struct { 15172 s *APIService 15173 name string 15174 urlParams_ gensupport.URLParams 15175 ifNoneMatch_ string 15176 ctx_ context.Context 15177 header_ http.Header 15178} 15179 15180// Get: Rpc to get information about a cloudstoragesource. 15181func (r *ProjectsLocationsCloudstoragesourcesService) Get(name string) *ProjectsLocationsCloudstoragesourcesGetCall { 15182 c := &ProjectsLocationsCloudstoragesourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15183 c.name = name 15184 return c 15185} 15186 15187// Fields allows partial responses to be retrieved. See 15188// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15189// for more information. 15190func (c *ProjectsLocationsCloudstoragesourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudstoragesourcesGetCall { 15191 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15192 return c 15193} 15194 15195// IfNoneMatch sets the optional parameter which makes the operation 15196// fail if the object's ETag matches the given value. This is useful for 15197// getting updates only after the object has changed since the last 15198// request. Use googleapi.IsNotModified to check whether the response 15199// error from Do is the result of In-None-Match. 15200func (c *ProjectsLocationsCloudstoragesourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudstoragesourcesGetCall { 15201 c.ifNoneMatch_ = entityTag 15202 return c 15203} 15204 15205// Context sets the context to be used in this call's Do method. Any 15206// pending HTTP request will be aborted if the provided context is 15207// canceled. 15208func (c *ProjectsLocationsCloudstoragesourcesGetCall) Context(ctx context.Context) *ProjectsLocationsCloudstoragesourcesGetCall { 15209 c.ctx_ = ctx 15210 return c 15211} 15212 15213// Header returns an http.Header that can be modified by the caller to 15214// add HTTP headers to the request. 15215func (c *ProjectsLocationsCloudstoragesourcesGetCall) Header() http.Header { 15216 if c.header_ == nil { 15217 c.header_ = make(http.Header) 15218 } 15219 return c.header_ 15220} 15221 15222func (c *ProjectsLocationsCloudstoragesourcesGetCall) doRequest(alt string) (*http.Response, error) { 15223 reqHeaders := make(http.Header) 15224 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15225 for k, v := range c.header_ { 15226 reqHeaders[k] = v 15227 } 15228 reqHeaders.Set("User-Agent", c.s.userAgent()) 15229 if c.ifNoneMatch_ != "" { 15230 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15231 } 15232 var body io.Reader = nil 15233 c.urlParams_.Set("alt", alt) 15234 c.urlParams_.Set("prettyPrint", "false") 15235 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 15236 urls += "?" + c.urlParams_.Encode() 15237 req, err := http.NewRequest("GET", urls, body) 15238 if err != nil { 15239 return nil, err 15240 } 15241 req.Header = reqHeaders 15242 googleapi.Expand(req.URL, map[string]string{ 15243 "name": c.name, 15244 }) 15245 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15246} 15247 15248// Do executes the "run.projects.locations.cloudstoragesources.get" call. 15249// Exactly one of *CloudStorageSource or error will be non-nil. Any 15250// non-2xx status code is an error. Response headers are in either 15251// *CloudStorageSource.ServerResponse.Header or (if a response was 15252// returned at all) in error.(*googleapi.Error).Header. Use 15253// googleapi.IsNotModified to check whether the returned error was 15254// because http.StatusNotModified was returned. 15255func (c *ProjectsLocationsCloudstoragesourcesGetCall) Do(opts ...googleapi.CallOption) (*CloudStorageSource, error) { 15256 gensupport.SetOptions(c.urlParams_, opts...) 15257 res, err := c.doRequest("json") 15258 if res != nil && res.StatusCode == http.StatusNotModified { 15259 if res.Body != nil { 15260 res.Body.Close() 15261 } 15262 return nil, &googleapi.Error{ 15263 Code: res.StatusCode, 15264 Header: res.Header, 15265 } 15266 } 15267 if err != nil { 15268 return nil, err 15269 } 15270 defer googleapi.CloseBody(res) 15271 if err := googleapi.CheckResponse(res); err != nil { 15272 return nil, err 15273 } 15274 ret := &CloudStorageSource{ 15275 ServerResponse: googleapi.ServerResponse{ 15276 Header: res.Header, 15277 HTTPStatusCode: res.StatusCode, 15278 }, 15279 } 15280 target := &ret 15281 if err := gensupport.DecodeResponse(target, res); err != nil { 15282 return nil, err 15283 } 15284 return ret, nil 15285 // { 15286 // "description": "Rpc to get information about a cloudstoragesource.", 15287 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudstoragesources/{cloudstoragesourcesId}", 15288 // "httpMethod": "GET", 15289 // "id": "run.projects.locations.cloudstoragesources.get", 15290 // "parameterOrder": [ 15291 // "name" 15292 // ], 15293 // "parameters": { 15294 // "name": { 15295 // "description": "Required. The name of the cloudstoragesource being retrieved. If needed, replace {namespace_id} with the project ID.", 15296 // "location": "path", 15297 // "pattern": "^projects/[^/]+/locations/[^/]+/cloudstoragesources/[^/]+$", 15298 // "required": true, 15299 // "type": "string" 15300 // } 15301 // }, 15302 // "path": "v1alpha1/{+name}", 15303 // "response": { 15304 // "$ref": "CloudStorageSource" 15305 // }, 15306 // "scopes": [ 15307 // "https://www.googleapis.com/auth/cloud-platform" 15308 // ] 15309 // } 15310 15311} 15312 15313// method id "run.projects.locations.cloudstoragesources.list": 15314 15315type ProjectsLocationsCloudstoragesourcesListCall struct { 15316 s *APIService 15317 parent string 15318 urlParams_ gensupport.URLParams 15319 ifNoneMatch_ string 15320 ctx_ context.Context 15321 header_ http.Header 15322} 15323 15324// List: Rpc to list cloudstoragesources. 15325func (r *ProjectsLocationsCloudstoragesourcesService) List(parent string) *ProjectsLocationsCloudstoragesourcesListCall { 15326 c := &ProjectsLocationsCloudstoragesourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15327 c.parent = parent 15328 return c 15329} 15330 15331// Continue sets the optional parameter "continue": Optional encoded 15332// string to continue paging. 15333func (c *ProjectsLocationsCloudstoragesourcesListCall) Continue(continue_ string) *ProjectsLocationsCloudstoragesourcesListCall { 15334 c.urlParams_.Set("continue", continue_) 15335 return c 15336} 15337 15338// FieldSelector sets the optional parameter "fieldSelector": Allows to 15339// filter resources based on a specific value for a field name. Send 15340// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 15341// currently used by Cloud Run. 15342func (c *ProjectsLocationsCloudstoragesourcesListCall) FieldSelector(fieldSelector string) *ProjectsLocationsCloudstoragesourcesListCall { 15343 c.urlParams_.Set("fieldSelector", fieldSelector) 15344 return c 15345} 15346 15347// IncludeUninitialized sets the optional parameter 15348// "includeUninitialized": Not currently used by Cloud Run. 15349func (c *ProjectsLocationsCloudstoragesourcesListCall) IncludeUninitialized(includeUninitialized bool) *ProjectsLocationsCloudstoragesourcesListCall { 15350 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 15351 return c 15352} 15353 15354// LabelSelector sets the optional parameter "labelSelector": Allows to 15355// filter resources based on a label. Supported operations are =, !=, 15356// exists, in, and notIn. 15357func (c *ProjectsLocationsCloudstoragesourcesListCall) LabelSelector(labelSelector string) *ProjectsLocationsCloudstoragesourcesListCall { 15358 c.urlParams_.Set("labelSelector", labelSelector) 15359 return c 15360} 15361 15362// Limit sets the optional parameter "limit": The maximum number of 15363// records that should be returned. 15364func (c *ProjectsLocationsCloudstoragesourcesListCall) Limit(limit int64) *ProjectsLocationsCloudstoragesourcesListCall { 15365 c.urlParams_.Set("limit", fmt.Sprint(limit)) 15366 return c 15367} 15368 15369// ResourceVersion sets the optional parameter "resourceVersion": The 15370// baseline resource version from which the list or watch operation 15371// should start. Not currently used by Cloud Run. 15372func (c *ProjectsLocationsCloudstoragesourcesListCall) ResourceVersion(resourceVersion string) *ProjectsLocationsCloudstoragesourcesListCall { 15373 c.urlParams_.Set("resourceVersion", resourceVersion) 15374 return c 15375} 15376 15377// Watch sets the optional parameter "watch": Flag that indicates that 15378// the client expects to watch this resource as well. Not currently used 15379// by Cloud Run. 15380func (c *ProjectsLocationsCloudstoragesourcesListCall) Watch(watch bool) *ProjectsLocationsCloudstoragesourcesListCall { 15381 c.urlParams_.Set("watch", fmt.Sprint(watch)) 15382 return c 15383} 15384 15385// Fields allows partial responses to be retrieved. See 15386// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15387// for more information. 15388func (c *ProjectsLocationsCloudstoragesourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudstoragesourcesListCall { 15389 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15390 return c 15391} 15392 15393// IfNoneMatch sets the optional parameter which makes the operation 15394// fail if the object's ETag matches the given value. This is useful for 15395// getting updates only after the object has changed since the last 15396// request. Use googleapi.IsNotModified to check whether the response 15397// error from Do is the result of In-None-Match. 15398func (c *ProjectsLocationsCloudstoragesourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudstoragesourcesListCall { 15399 c.ifNoneMatch_ = entityTag 15400 return c 15401} 15402 15403// Context sets the context to be used in this call's Do method. Any 15404// pending HTTP request will be aborted if the provided context is 15405// canceled. 15406func (c *ProjectsLocationsCloudstoragesourcesListCall) Context(ctx context.Context) *ProjectsLocationsCloudstoragesourcesListCall { 15407 c.ctx_ = ctx 15408 return c 15409} 15410 15411// Header returns an http.Header that can be modified by the caller to 15412// add HTTP headers to the request. 15413func (c *ProjectsLocationsCloudstoragesourcesListCall) Header() http.Header { 15414 if c.header_ == nil { 15415 c.header_ = make(http.Header) 15416 } 15417 return c.header_ 15418} 15419 15420func (c *ProjectsLocationsCloudstoragesourcesListCall) doRequest(alt string) (*http.Response, error) { 15421 reqHeaders := make(http.Header) 15422 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15423 for k, v := range c.header_ { 15424 reqHeaders[k] = v 15425 } 15426 reqHeaders.Set("User-Agent", c.s.userAgent()) 15427 if c.ifNoneMatch_ != "" { 15428 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15429 } 15430 var body io.Reader = nil 15431 c.urlParams_.Set("alt", alt) 15432 c.urlParams_.Set("prettyPrint", "false") 15433 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cloudstoragesources") 15434 urls += "?" + c.urlParams_.Encode() 15435 req, err := http.NewRequest("GET", urls, body) 15436 if err != nil { 15437 return nil, err 15438 } 15439 req.Header = reqHeaders 15440 googleapi.Expand(req.URL, map[string]string{ 15441 "parent": c.parent, 15442 }) 15443 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15444} 15445 15446// Do executes the "run.projects.locations.cloudstoragesources.list" call. 15447// Exactly one of *ListCloudStorageSourcesResponse or error will be 15448// non-nil. Any non-2xx status code is an error. Response headers are in 15449// either *ListCloudStorageSourcesResponse.ServerResponse.Header or (if 15450// a response was returned at all) in error.(*googleapi.Error).Header. 15451// Use googleapi.IsNotModified to check whether the returned error was 15452// because http.StatusNotModified was returned. 15453func (c *ProjectsLocationsCloudstoragesourcesListCall) Do(opts ...googleapi.CallOption) (*ListCloudStorageSourcesResponse, error) { 15454 gensupport.SetOptions(c.urlParams_, opts...) 15455 res, err := c.doRequest("json") 15456 if res != nil && res.StatusCode == http.StatusNotModified { 15457 if res.Body != nil { 15458 res.Body.Close() 15459 } 15460 return nil, &googleapi.Error{ 15461 Code: res.StatusCode, 15462 Header: res.Header, 15463 } 15464 } 15465 if err != nil { 15466 return nil, err 15467 } 15468 defer googleapi.CloseBody(res) 15469 if err := googleapi.CheckResponse(res); err != nil { 15470 return nil, err 15471 } 15472 ret := &ListCloudStorageSourcesResponse{ 15473 ServerResponse: googleapi.ServerResponse{ 15474 Header: res.Header, 15475 HTTPStatusCode: res.StatusCode, 15476 }, 15477 } 15478 target := &ret 15479 if err := gensupport.DecodeResponse(target, res); err != nil { 15480 return nil, err 15481 } 15482 return ret, nil 15483 // { 15484 // "description": "Rpc to list cloudstoragesources.", 15485 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudstoragesources", 15486 // "httpMethod": "GET", 15487 // "id": "run.projects.locations.cloudstoragesources.list", 15488 // "parameterOrder": [ 15489 // "parent" 15490 // ], 15491 // "parameters": { 15492 // "continue": { 15493 // "description": "Optional encoded string to continue paging.", 15494 // "location": "query", 15495 // "type": "string" 15496 // }, 15497 // "fieldSelector": { 15498 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 15499 // "location": "query", 15500 // "type": "string" 15501 // }, 15502 // "includeUninitialized": { 15503 // "description": "Not currently used by Cloud Run.", 15504 // "location": "query", 15505 // "type": "boolean" 15506 // }, 15507 // "labelSelector": { 15508 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 15509 // "location": "query", 15510 // "type": "string" 15511 // }, 15512 // "limit": { 15513 // "description": "The maximum number of records that should be returned.", 15514 // "format": "int32", 15515 // "location": "query", 15516 // "type": "integer" 15517 // }, 15518 // "parent": { 15519 // "description": "Required. The project ID or project number from which the cloudstoragesources should be listed.", 15520 // "location": "path", 15521 // "pattern": "^projects/[^/]+/locations/[^/]+$", 15522 // "required": true, 15523 // "type": "string" 15524 // }, 15525 // "resourceVersion": { 15526 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 15527 // "location": "query", 15528 // "type": "string" 15529 // }, 15530 // "watch": { 15531 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 15532 // "location": "query", 15533 // "type": "boolean" 15534 // } 15535 // }, 15536 // "path": "v1alpha1/{+parent}/cloudstoragesources", 15537 // "response": { 15538 // "$ref": "ListCloudStorageSourcesResponse" 15539 // }, 15540 // "scopes": [ 15541 // "https://www.googleapis.com/auth/cloud-platform" 15542 // ] 15543 // } 15544 15545} 15546 15547// method id "run.projects.locations.cloudstoragesources.replaceCloudStorageSource": 15548 15549type ProjectsLocationsCloudstoragesourcesReplaceCloudStorageSourceCall struct { 15550 s *APIService 15551 name string 15552 cloudstoragesource *CloudStorageSource 15553 urlParams_ gensupport.URLParams 15554 ctx_ context.Context 15555 header_ http.Header 15556} 15557 15558// ReplaceCloudStorageSource: Rpc to replace a cloudstoragesource. Only 15559// the spec and metadata labels and annotations are modifiable. After 15560// the Update request, Cloud Run will work to make the 'status' match 15561// the requested 'spec'. May provide metadata.resourceVersion to enforce 15562// update from last read for optimistic concurrency control. 15563func (r *ProjectsLocationsCloudstoragesourcesService) ReplaceCloudStorageSource(name string, cloudstoragesource *CloudStorageSource) *ProjectsLocationsCloudstoragesourcesReplaceCloudStorageSourceCall { 15564 c := &ProjectsLocationsCloudstoragesourcesReplaceCloudStorageSourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15565 c.name = name 15566 c.cloudstoragesource = cloudstoragesource 15567 return c 15568} 15569 15570// Fields allows partial responses to be retrieved. See 15571// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15572// for more information. 15573func (c *ProjectsLocationsCloudstoragesourcesReplaceCloudStorageSourceCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudstoragesourcesReplaceCloudStorageSourceCall { 15574 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15575 return c 15576} 15577 15578// Context sets the context to be used in this call's Do method. Any 15579// pending HTTP request will be aborted if the provided context is 15580// canceled. 15581func (c *ProjectsLocationsCloudstoragesourcesReplaceCloudStorageSourceCall) Context(ctx context.Context) *ProjectsLocationsCloudstoragesourcesReplaceCloudStorageSourceCall { 15582 c.ctx_ = ctx 15583 return c 15584} 15585 15586// Header returns an http.Header that can be modified by the caller to 15587// add HTTP headers to the request. 15588func (c *ProjectsLocationsCloudstoragesourcesReplaceCloudStorageSourceCall) Header() http.Header { 15589 if c.header_ == nil { 15590 c.header_ = make(http.Header) 15591 } 15592 return c.header_ 15593} 15594 15595func (c *ProjectsLocationsCloudstoragesourcesReplaceCloudStorageSourceCall) doRequest(alt string) (*http.Response, error) { 15596 reqHeaders := make(http.Header) 15597 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15598 for k, v := range c.header_ { 15599 reqHeaders[k] = v 15600 } 15601 reqHeaders.Set("User-Agent", c.s.userAgent()) 15602 var body io.Reader = nil 15603 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudstoragesource) 15604 if err != nil { 15605 return nil, err 15606 } 15607 reqHeaders.Set("Content-Type", "application/json") 15608 c.urlParams_.Set("alt", alt) 15609 c.urlParams_.Set("prettyPrint", "false") 15610 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 15611 urls += "?" + c.urlParams_.Encode() 15612 req, err := http.NewRequest("PUT", urls, body) 15613 if err != nil { 15614 return nil, err 15615 } 15616 req.Header = reqHeaders 15617 googleapi.Expand(req.URL, map[string]string{ 15618 "name": c.name, 15619 }) 15620 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15621} 15622 15623// Do executes the "run.projects.locations.cloudstoragesources.replaceCloudStorageSource" call. 15624// Exactly one of *CloudStorageSource or error will be non-nil. Any 15625// non-2xx status code is an error. Response headers are in either 15626// *CloudStorageSource.ServerResponse.Header or (if a response was 15627// returned at all) in error.(*googleapi.Error).Header. Use 15628// googleapi.IsNotModified to check whether the returned error was 15629// because http.StatusNotModified was returned. 15630func (c *ProjectsLocationsCloudstoragesourcesReplaceCloudStorageSourceCall) Do(opts ...googleapi.CallOption) (*CloudStorageSource, error) { 15631 gensupport.SetOptions(c.urlParams_, opts...) 15632 res, err := c.doRequest("json") 15633 if res != nil && res.StatusCode == http.StatusNotModified { 15634 if res.Body != nil { 15635 res.Body.Close() 15636 } 15637 return nil, &googleapi.Error{ 15638 Code: res.StatusCode, 15639 Header: res.Header, 15640 } 15641 } 15642 if err != nil { 15643 return nil, err 15644 } 15645 defer googleapi.CloseBody(res) 15646 if err := googleapi.CheckResponse(res); err != nil { 15647 return nil, err 15648 } 15649 ret := &CloudStorageSource{ 15650 ServerResponse: googleapi.ServerResponse{ 15651 Header: res.Header, 15652 HTTPStatusCode: res.StatusCode, 15653 }, 15654 } 15655 target := &ret 15656 if err := gensupport.DecodeResponse(target, res); err != nil { 15657 return nil, err 15658 } 15659 return ret, nil 15660 // { 15661 // "description": "Rpc to replace a cloudstoragesource. Only the spec and metadata labels and annotations are modifiable. After the Update request, Cloud Run will work to make the 'status' match the requested 'spec'. May provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.", 15662 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/cloudstoragesources/{cloudstoragesourcesId}", 15663 // "httpMethod": "PUT", 15664 // "id": "run.projects.locations.cloudstoragesources.replaceCloudStorageSource", 15665 // "parameterOrder": [ 15666 // "name" 15667 // ], 15668 // "parameters": { 15669 // "name": { 15670 // "description": "Required. The name of the cloudstoragesource being retrieved. If needed, replace {namespace_id} with the project ID.", 15671 // "location": "path", 15672 // "pattern": "^projects/[^/]+/locations/[^/]+/cloudstoragesources/[^/]+$", 15673 // "required": true, 15674 // "type": "string" 15675 // } 15676 // }, 15677 // "path": "v1alpha1/{+name}", 15678 // "request": { 15679 // "$ref": "CloudStorageSource" 15680 // }, 15681 // "response": { 15682 // "$ref": "CloudStorageSource" 15683 // }, 15684 // "scopes": [ 15685 // "https://www.googleapis.com/auth/cloud-platform" 15686 // ] 15687 // } 15688 15689} 15690 15691// method id "run.projects.locations.configurations.get": 15692 15693type ProjectsLocationsConfigurationsGetCall struct { 15694 s *APIService 15695 name string 15696 urlParams_ gensupport.URLParams 15697 ifNoneMatch_ string 15698 ctx_ context.Context 15699 header_ http.Header 15700} 15701 15702// Get: Rpc to get information about a configuration. 15703func (r *ProjectsLocationsConfigurationsService) Get(name string) *ProjectsLocationsConfigurationsGetCall { 15704 c := &ProjectsLocationsConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15705 c.name = name 15706 return c 15707} 15708 15709// Fields allows partial responses to be retrieved. See 15710// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15711// for more information. 15712func (c *ProjectsLocationsConfigurationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConfigurationsGetCall { 15713 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15714 return c 15715} 15716 15717// IfNoneMatch sets the optional parameter which makes the operation 15718// fail if the object's ETag matches the given value. This is useful for 15719// getting updates only after the object has changed since the last 15720// request. Use googleapi.IsNotModified to check whether the response 15721// error from Do is the result of In-None-Match. 15722func (c *ProjectsLocationsConfigurationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConfigurationsGetCall { 15723 c.ifNoneMatch_ = entityTag 15724 return c 15725} 15726 15727// Context sets the context to be used in this call's Do method. Any 15728// pending HTTP request will be aborted if the provided context is 15729// canceled. 15730func (c *ProjectsLocationsConfigurationsGetCall) Context(ctx context.Context) *ProjectsLocationsConfigurationsGetCall { 15731 c.ctx_ = ctx 15732 return c 15733} 15734 15735// Header returns an http.Header that can be modified by the caller to 15736// add HTTP headers to the request. 15737func (c *ProjectsLocationsConfigurationsGetCall) Header() http.Header { 15738 if c.header_ == nil { 15739 c.header_ = make(http.Header) 15740 } 15741 return c.header_ 15742} 15743 15744func (c *ProjectsLocationsConfigurationsGetCall) doRequest(alt string) (*http.Response, error) { 15745 reqHeaders := make(http.Header) 15746 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15747 for k, v := range c.header_ { 15748 reqHeaders[k] = v 15749 } 15750 reqHeaders.Set("User-Agent", c.s.userAgent()) 15751 if c.ifNoneMatch_ != "" { 15752 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15753 } 15754 var body io.Reader = nil 15755 c.urlParams_.Set("alt", alt) 15756 c.urlParams_.Set("prettyPrint", "false") 15757 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 15758 urls += "?" + c.urlParams_.Encode() 15759 req, err := http.NewRequest("GET", urls, body) 15760 if err != nil { 15761 return nil, err 15762 } 15763 req.Header = reqHeaders 15764 googleapi.Expand(req.URL, map[string]string{ 15765 "name": c.name, 15766 }) 15767 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15768} 15769 15770// Do executes the "run.projects.locations.configurations.get" call. 15771// Exactly one of *Configuration or error will be non-nil. Any non-2xx 15772// status code is an error. Response headers are in either 15773// *Configuration.ServerResponse.Header or (if a response was returned 15774// at all) in error.(*googleapi.Error).Header. Use 15775// googleapi.IsNotModified to check whether the returned error was 15776// because http.StatusNotModified was returned. 15777func (c *ProjectsLocationsConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*Configuration, error) { 15778 gensupport.SetOptions(c.urlParams_, opts...) 15779 res, err := c.doRequest("json") 15780 if res != nil && res.StatusCode == http.StatusNotModified { 15781 if res.Body != nil { 15782 res.Body.Close() 15783 } 15784 return nil, &googleapi.Error{ 15785 Code: res.StatusCode, 15786 Header: res.Header, 15787 } 15788 } 15789 if err != nil { 15790 return nil, err 15791 } 15792 defer googleapi.CloseBody(res) 15793 if err := googleapi.CheckResponse(res); err != nil { 15794 return nil, err 15795 } 15796 ret := &Configuration{ 15797 ServerResponse: googleapi.ServerResponse{ 15798 Header: res.Header, 15799 HTTPStatusCode: res.StatusCode, 15800 }, 15801 } 15802 target := &ret 15803 if err := gensupport.DecodeResponse(target, res); err != nil { 15804 return nil, err 15805 } 15806 return ret, nil 15807 // { 15808 // "description": "Rpc to get information about a configuration.", 15809 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/configurations/{configurationsId}", 15810 // "httpMethod": "GET", 15811 // "id": "run.projects.locations.configurations.get", 15812 // "parameterOrder": [ 15813 // "name" 15814 // ], 15815 // "parameters": { 15816 // "name": { 15817 // "description": "The name of the configuration being retrieved. If needed, replace {namespace_id} with the project ID.", 15818 // "location": "path", 15819 // "pattern": "^projects/[^/]+/locations/[^/]+/configurations/[^/]+$", 15820 // "required": true, 15821 // "type": "string" 15822 // } 15823 // }, 15824 // "path": "v1alpha1/{+name}", 15825 // "response": { 15826 // "$ref": "Configuration" 15827 // }, 15828 // "scopes": [ 15829 // "https://www.googleapis.com/auth/cloud-platform" 15830 // ] 15831 // } 15832 15833} 15834 15835// method id "run.projects.locations.configurations.list": 15836 15837type ProjectsLocationsConfigurationsListCall struct { 15838 s *APIService 15839 parent string 15840 urlParams_ gensupport.URLParams 15841 ifNoneMatch_ string 15842 ctx_ context.Context 15843 header_ http.Header 15844} 15845 15846// List: Rpc to list configurations. 15847func (r *ProjectsLocationsConfigurationsService) List(parent string) *ProjectsLocationsConfigurationsListCall { 15848 c := &ProjectsLocationsConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15849 c.parent = parent 15850 return c 15851} 15852 15853// Continue sets the optional parameter "continue": Optional encoded 15854// string to continue paging. 15855func (c *ProjectsLocationsConfigurationsListCall) Continue(continue_ string) *ProjectsLocationsConfigurationsListCall { 15856 c.urlParams_.Set("continue", continue_) 15857 return c 15858} 15859 15860// FieldSelector sets the optional parameter "fieldSelector": Allows to 15861// filter resources based on a specific value for a field name. Send 15862// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 15863// currently used by Cloud Run. 15864func (c *ProjectsLocationsConfigurationsListCall) FieldSelector(fieldSelector string) *ProjectsLocationsConfigurationsListCall { 15865 c.urlParams_.Set("fieldSelector", fieldSelector) 15866 return c 15867} 15868 15869// IncludeUninitialized sets the optional parameter 15870// "includeUninitialized": Not currently used by Cloud Run. 15871func (c *ProjectsLocationsConfigurationsListCall) IncludeUninitialized(includeUninitialized bool) *ProjectsLocationsConfigurationsListCall { 15872 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 15873 return c 15874} 15875 15876// LabelSelector sets the optional parameter "labelSelector": Allows to 15877// filter resources based on a label. Supported operations are =, !=, 15878// exists, in, and notIn. 15879func (c *ProjectsLocationsConfigurationsListCall) LabelSelector(labelSelector string) *ProjectsLocationsConfigurationsListCall { 15880 c.urlParams_.Set("labelSelector", labelSelector) 15881 return c 15882} 15883 15884// Limit sets the optional parameter "limit": The maximum number of 15885// records that should be returned. 15886func (c *ProjectsLocationsConfigurationsListCall) Limit(limit int64) *ProjectsLocationsConfigurationsListCall { 15887 c.urlParams_.Set("limit", fmt.Sprint(limit)) 15888 return c 15889} 15890 15891// ResourceVersion sets the optional parameter "resourceVersion": The 15892// baseline resource version from which the list or watch operation 15893// should start. Not currently used by Cloud Run. 15894func (c *ProjectsLocationsConfigurationsListCall) ResourceVersion(resourceVersion string) *ProjectsLocationsConfigurationsListCall { 15895 c.urlParams_.Set("resourceVersion", resourceVersion) 15896 return c 15897} 15898 15899// Watch sets the optional parameter "watch": Flag that indicates that 15900// the client expects to watch this resource as well. Not currently used 15901// by Cloud Run. 15902func (c *ProjectsLocationsConfigurationsListCall) Watch(watch bool) *ProjectsLocationsConfigurationsListCall { 15903 c.urlParams_.Set("watch", fmt.Sprint(watch)) 15904 return c 15905} 15906 15907// Fields allows partial responses to be retrieved. See 15908// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15909// for more information. 15910func (c *ProjectsLocationsConfigurationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConfigurationsListCall { 15911 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15912 return c 15913} 15914 15915// IfNoneMatch sets the optional parameter which makes the operation 15916// fail if the object's ETag matches the given value. This is useful for 15917// getting updates only after the object has changed since the last 15918// request. Use googleapi.IsNotModified to check whether the response 15919// error from Do is the result of In-None-Match. 15920func (c *ProjectsLocationsConfigurationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConfigurationsListCall { 15921 c.ifNoneMatch_ = entityTag 15922 return c 15923} 15924 15925// Context sets the context to be used in this call's Do method. Any 15926// pending HTTP request will be aborted if the provided context is 15927// canceled. 15928func (c *ProjectsLocationsConfigurationsListCall) Context(ctx context.Context) *ProjectsLocationsConfigurationsListCall { 15929 c.ctx_ = ctx 15930 return c 15931} 15932 15933// Header returns an http.Header that can be modified by the caller to 15934// add HTTP headers to the request. 15935func (c *ProjectsLocationsConfigurationsListCall) Header() http.Header { 15936 if c.header_ == nil { 15937 c.header_ = make(http.Header) 15938 } 15939 return c.header_ 15940} 15941 15942func (c *ProjectsLocationsConfigurationsListCall) doRequest(alt string) (*http.Response, error) { 15943 reqHeaders := make(http.Header) 15944 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15945 for k, v := range c.header_ { 15946 reqHeaders[k] = v 15947 } 15948 reqHeaders.Set("User-Agent", c.s.userAgent()) 15949 if c.ifNoneMatch_ != "" { 15950 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15951 } 15952 var body io.Reader = nil 15953 c.urlParams_.Set("alt", alt) 15954 c.urlParams_.Set("prettyPrint", "false") 15955 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/configurations") 15956 urls += "?" + c.urlParams_.Encode() 15957 req, err := http.NewRequest("GET", urls, body) 15958 if err != nil { 15959 return nil, err 15960 } 15961 req.Header = reqHeaders 15962 googleapi.Expand(req.URL, map[string]string{ 15963 "parent": c.parent, 15964 }) 15965 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15966} 15967 15968// Do executes the "run.projects.locations.configurations.list" call. 15969// Exactly one of *ListConfigurationsResponse or error will be non-nil. 15970// Any non-2xx status code is an error. Response headers are in either 15971// *ListConfigurationsResponse.ServerResponse.Header or (if a response 15972// was returned at all) in error.(*googleapi.Error).Header. Use 15973// googleapi.IsNotModified to check whether the returned error was 15974// because http.StatusNotModified was returned. 15975func (c *ProjectsLocationsConfigurationsListCall) Do(opts ...googleapi.CallOption) (*ListConfigurationsResponse, error) { 15976 gensupport.SetOptions(c.urlParams_, opts...) 15977 res, err := c.doRequest("json") 15978 if res != nil && res.StatusCode == http.StatusNotModified { 15979 if res.Body != nil { 15980 res.Body.Close() 15981 } 15982 return nil, &googleapi.Error{ 15983 Code: res.StatusCode, 15984 Header: res.Header, 15985 } 15986 } 15987 if err != nil { 15988 return nil, err 15989 } 15990 defer googleapi.CloseBody(res) 15991 if err := googleapi.CheckResponse(res); err != nil { 15992 return nil, err 15993 } 15994 ret := &ListConfigurationsResponse{ 15995 ServerResponse: googleapi.ServerResponse{ 15996 Header: res.Header, 15997 HTTPStatusCode: res.StatusCode, 15998 }, 15999 } 16000 target := &ret 16001 if err := gensupport.DecodeResponse(target, res); err != nil { 16002 return nil, err 16003 } 16004 return ret, nil 16005 // { 16006 // "description": "Rpc to list configurations.", 16007 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/configurations", 16008 // "httpMethod": "GET", 16009 // "id": "run.projects.locations.configurations.list", 16010 // "parameterOrder": [ 16011 // "parent" 16012 // ], 16013 // "parameters": { 16014 // "continue": { 16015 // "description": "Optional encoded string to continue paging.", 16016 // "location": "query", 16017 // "type": "string" 16018 // }, 16019 // "fieldSelector": { 16020 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 16021 // "location": "query", 16022 // "type": "string" 16023 // }, 16024 // "includeUninitialized": { 16025 // "description": "Not currently used by Cloud Run.", 16026 // "location": "query", 16027 // "type": "boolean" 16028 // }, 16029 // "labelSelector": { 16030 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 16031 // "location": "query", 16032 // "type": "string" 16033 // }, 16034 // "limit": { 16035 // "description": "The maximum number of records that should be returned.", 16036 // "format": "int32", 16037 // "location": "query", 16038 // "type": "integer" 16039 // }, 16040 // "parent": { 16041 // "description": "The project ID or project number from which the configurations should be listed.", 16042 // "location": "path", 16043 // "pattern": "^projects/[^/]+/locations/[^/]+$", 16044 // "required": true, 16045 // "type": "string" 16046 // }, 16047 // "resourceVersion": { 16048 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 16049 // "location": "query", 16050 // "type": "string" 16051 // }, 16052 // "watch": { 16053 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 16054 // "location": "query", 16055 // "type": "boolean" 16056 // } 16057 // }, 16058 // "path": "v1alpha1/{+parent}/configurations", 16059 // "response": { 16060 // "$ref": "ListConfigurationsResponse" 16061 // }, 16062 // "scopes": [ 16063 // "https://www.googleapis.com/auth/cloud-platform" 16064 // ] 16065 // } 16066 16067} 16068 16069// method id "run.projects.locations.domainmappings.create": 16070 16071type ProjectsLocationsDomainmappingsCreateCall struct { 16072 s *APIService 16073 parent string 16074 domainmapping *DomainMapping 16075 urlParams_ gensupport.URLParams 16076 ctx_ context.Context 16077 header_ http.Header 16078} 16079 16080// Create: Creates a new domain mapping. 16081func (r *ProjectsLocationsDomainmappingsService) Create(parent string, domainmapping *DomainMapping) *ProjectsLocationsDomainmappingsCreateCall { 16082 c := &ProjectsLocationsDomainmappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16083 c.parent = parent 16084 c.domainmapping = domainmapping 16085 return c 16086} 16087 16088// Fields allows partial responses to be retrieved. See 16089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16090// for more information. 16091func (c *ProjectsLocationsDomainmappingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDomainmappingsCreateCall { 16092 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16093 return c 16094} 16095 16096// Context sets the context to be used in this call's Do method. Any 16097// pending HTTP request will be aborted if the provided context is 16098// canceled. 16099func (c *ProjectsLocationsDomainmappingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDomainmappingsCreateCall { 16100 c.ctx_ = ctx 16101 return c 16102} 16103 16104// Header returns an http.Header that can be modified by the caller to 16105// add HTTP headers to the request. 16106func (c *ProjectsLocationsDomainmappingsCreateCall) Header() http.Header { 16107 if c.header_ == nil { 16108 c.header_ = make(http.Header) 16109 } 16110 return c.header_ 16111} 16112 16113func (c *ProjectsLocationsDomainmappingsCreateCall) doRequest(alt string) (*http.Response, error) { 16114 reqHeaders := make(http.Header) 16115 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 16116 for k, v := range c.header_ { 16117 reqHeaders[k] = v 16118 } 16119 reqHeaders.Set("User-Agent", c.s.userAgent()) 16120 var body io.Reader = nil 16121 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping) 16122 if err != nil { 16123 return nil, err 16124 } 16125 reqHeaders.Set("Content-Type", "application/json") 16126 c.urlParams_.Set("alt", alt) 16127 c.urlParams_.Set("prettyPrint", "false") 16128 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/domainmappings") 16129 urls += "?" + c.urlParams_.Encode() 16130 req, err := http.NewRequest("POST", urls, body) 16131 if err != nil { 16132 return nil, err 16133 } 16134 req.Header = reqHeaders 16135 googleapi.Expand(req.URL, map[string]string{ 16136 "parent": c.parent, 16137 }) 16138 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16139} 16140 16141// Do executes the "run.projects.locations.domainmappings.create" call. 16142// Exactly one of *DomainMapping or error will be non-nil. Any non-2xx 16143// status code is an error. Response headers are in either 16144// *DomainMapping.ServerResponse.Header or (if a response was returned 16145// at all) in error.(*googleapi.Error).Header. Use 16146// googleapi.IsNotModified to check whether the returned error was 16147// because http.StatusNotModified was returned. 16148func (c *ProjectsLocationsDomainmappingsCreateCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) { 16149 gensupport.SetOptions(c.urlParams_, opts...) 16150 res, err := c.doRequest("json") 16151 if res != nil && res.StatusCode == http.StatusNotModified { 16152 if res.Body != nil { 16153 res.Body.Close() 16154 } 16155 return nil, &googleapi.Error{ 16156 Code: res.StatusCode, 16157 Header: res.Header, 16158 } 16159 } 16160 if err != nil { 16161 return nil, err 16162 } 16163 defer googleapi.CloseBody(res) 16164 if err := googleapi.CheckResponse(res); err != nil { 16165 return nil, err 16166 } 16167 ret := &DomainMapping{ 16168 ServerResponse: googleapi.ServerResponse{ 16169 Header: res.Header, 16170 HTTPStatusCode: res.StatusCode, 16171 }, 16172 } 16173 target := &ret 16174 if err := gensupport.DecodeResponse(target, res); err != nil { 16175 return nil, err 16176 } 16177 return ret, nil 16178 // { 16179 // "description": "Creates a new domain mapping.", 16180 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/domainmappings", 16181 // "httpMethod": "POST", 16182 // "id": "run.projects.locations.domainmappings.create", 16183 // "parameterOrder": [ 16184 // "parent" 16185 // ], 16186 // "parameters": { 16187 // "parent": { 16188 // "description": "The project ID or project number in which this domain mapping should be created.", 16189 // "location": "path", 16190 // "pattern": "^projects/[^/]+/locations/[^/]+$", 16191 // "required": true, 16192 // "type": "string" 16193 // } 16194 // }, 16195 // "path": "v1alpha1/{+parent}/domainmappings", 16196 // "request": { 16197 // "$ref": "DomainMapping" 16198 // }, 16199 // "response": { 16200 // "$ref": "DomainMapping" 16201 // }, 16202 // "scopes": [ 16203 // "https://www.googleapis.com/auth/cloud-platform" 16204 // ] 16205 // } 16206 16207} 16208 16209// method id "run.projects.locations.domainmappings.delete": 16210 16211type ProjectsLocationsDomainmappingsDeleteCall struct { 16212 s *APIService 16213 name string 16214 urlParams_ gensupport.URLParams 16215 ctx_ context.Context 16216 header_ http.Header 16217} 16218 16219// Delete: Rpc to delete a domain mapping. 16220func (r *ProjectsLocationsDomainmappingsService) Delete(name string) *ProjectsLocationsDomainmappingsDeleteCall { 16221 c := &ProjectsLocationsDomainmappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16222 c.name = name 16223 return c 16224} 16225 16226// ApiVersion sets the optional parameter "apiVersion": Cloud Run 16227// currently ignores this parameter. 16228func (c *ProjectsLocationsDomainmappingsDeleteCall) ApiVersion(apiVersion string) *ProjectsLocationsDomainmappingsDeleteCall { 16229 c.urlParams_.Set("apiVersion", apiVersion) 16230 return c 16231} 16232 16233// Kind sets the optional parameter "kind": Cloud Run currently ignores 16234// this parameter. 16235func (c *ProjectsLocationsDomainmappingsDeleteCall) Kind(kind string) *ProjectsLocationsDomainmappingsDeleteCall { 16236 c.urlParams_.Set("kind", kind) 16237 return c 16238} 16239 16240// OrphanDependents sets the optional parameter "orphanDependents": 16241// Deprecated. Specifies the cascade behavior on delete. Cloud Run only 16242// supports cascading behavior, so this must be false. This attribute is 16243// deprecated, and is now replaced with PropagationPolicy See 16244// https://github.com/kubernetes/kubernetes/issues/46659 for more info. 16245func (c *ProjectsLocationsDomainmappingsDeleteCall) OrphanDependents(orphanDependents bool) *ProjectsLocationsDomainmappingsDeleteCall { 16246 c.urlParams_.Set("orphanDependents", fmt.Sprint(orphanDependents)) 16247 return c 16248} 16249 16250// PropagationPolicy sets the optional parameter "propagationPolicy": 16251// Specifies the propagation policy of delete. Cloud Run currently 16252// ignores this setting, and deletes in the background. Please see 16253// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 16254// for more information. 16255func (c *ProjectsLocationsDomainmappingsDeleteCall) PropagationPolicy(propagationPolicy string) *ProjectsLocationsDomainmappingsDeleteCall { 16256 c.urlParams_.Set("propagationPolicy", propagationPolicy) 16257 return c 16258} 16259 16260// Fields allows partial responses to be retrieved. See 16261// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16262// for more information. 16263func (c *ProjectsLocationsDomainmappingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDomainmappingsDeleteCall { 16264 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16265 return c 16266} 16267 16268// Context sets the context to be used in this call's Do method. Any 16269// pending HTTP request will be aborted if the provided context is 16270// canceled. 16271func (c *ProjectsLocationsDomainmappingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDomainmappingsDeleteCall { 16272 c.ctx_ = ctx 16273 return c 16274} 16275 16276// Header returns an http.Header that can be modified by the caller to 16277// add HTTP headers to the request. 16278func (c *ProjectsLocationsDomainmappingsDeleteCall) Header() http.Header { 16279 if c.header_ == nil { 16280 c.header_ = make(http.Header) 16281 } 16282 return c.header_ 16283} 16284 16285func (c *ProjectsLocationsDomainmappingsDeleteCall) doRequest(alt string) (*http.Response, error) { 16286 reqHeaders := make(http.Header) 16287 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 16288 for k, v := range c.header_ { 16289 reqHeaders[k] = v 16290 } 16291 reqHeaders.Set("User-Agent", c.s.userAgent()) 16292 var body io.Reader = nil 16293 c.urlParams_.Set("alt", alt) 16294 c.urlParams_.Set("prettyPrint", "false") 16295 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 16296 urls += "?" + c.urlParams_.Encode() 16297 req, err := http.NewRequest("DELETE", urls, body) 16298 if err != nil { 16299 return nil, err 16300 } 16301 req.Header = reqHeaders 16302 googleapi.Expand(req.URL, map[string]string{ 16303 "name": c.name, 16304 }) 16305 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16306} 16307 16308// Do executes the "run.projects.locations.domainmappings.delete" call. 16309// Exactly one of *Empty or error will be non-nil. Any non-2xx status 16310// code is an error. Response headers are in either 16311// *Empty.ServerResponse.Header or (if a response was returned at all) 16312// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 16313// check whether the returned error was because http.StatusNotModified 16314// was returned. 16315func (c *ProjectsLocationsDomainmappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 16316 gensupport.SetOptions(c.urlParams_, opts...) 16317 res, err := c.doRequest("json") 16318 if res != nil && res.StatusCode == http.StatusNotModified { 16319 if res.Body != nil { 16320 res.Body.Close() 16321 } 16322 return nil, &googleapi.Error{ 16323 Code: res.StatusCode, 16324 Header: res.Header, 16325 } 16326 } 16327 if err != nil { 16328 return nil, err 16329 } 16330 defer googleapi.CloseBody(res) 16331 if err := googleapi.CheckResponse(res); err != nil { 16332 return nil, err 16333 } 16334 ret := &Empty{ 16335 ServerResponse: googleapi.ServerResponse{ 16336 Header: res.Header, 16337 HTTPStatusCode: res.StatusCode, 16338 }, 16339 } 16340 target := &ret 16341 if err := gensupport.DecodeResponse(target, res); err != nil { 16342 return nil, err 16343 } 16344 return ret, nil 16345 // { 16346 // "description": "Rpc to delete a domain mapping.", 16347 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/domainmappings/{domainmappingsId}", 16348 // "httpMethod": "DELETE", 16349 // "id": "run.projects.locations.domainmappings.delete", 16350 // "parameterOrder": [ 16351 // "name" 16352 // ], 16353 // "parameters": { 16354 // "apiVersion": { 16355 // "description": "Cloud Run currently ignores this parameter.", 16356 // "location": "query", 16357 // "type": "string" 16358 // }, 16359 // "kind": { 16360 // "description": "Cloud Run currently ignores this parameter.", 16361 // "location": "query", 16362 // "type": "string" 16363 // }, 16364 // "name": { 16365 // "description": "The name of the domain mapping being deleted. If needed, replace {namespace_id} with the project ID.", 16366 // "location": "path", 16367 // "pattern": "^projects/[^/]+/locations/[^/]+/domainmappings/[^/]+$", 16368 // "required": true, 16369 // "type": "string" 16370 // }, 16371 // "orphanDependents": { 16372 // "description": "Deprecated. Specifies the cascade behavior on delete. Cloud Run only supports cascading behavior, so this must be false. This attribute is deprecated, and is now replaced with PropagationPolicy See https://github.com/kubernetes/kubernetes/issues/46659 for more info.", 16373 // "location": "query", 16374 // "type": "boolean" 16375 // }, 16376 // "propagationPolicy": { 16377 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 16378 // "location": "query", 16379 // "type": "string" 16380 // } 16381 // }, 16382 // "path": "v1alpha1/{+name}", 16383 // "response": { 16384 // "$ref": "Empty" 16385 // }, 16386 // "scopes": [ 16387 // "https://www.googleapis.com/auth/cloud-platform" 16388 // ] 16389 // } 16390 16391} 16392 16393// method id "run.projects.locations.domainmappings.get": 16394 16395type ProjectsLocationsDomainmappingsGetCall struct { 16396 s *APIService 16397 name string 16398 urlParams_ gensupport.URLParams 16399 ifNoneMatch_ string 16400 ctx_ context.Context 16401 header_ http.Header 16402} 16403 16404// Get: Rpc to get information about a domain mapping. 16405func (r *ProjectsLocationsDomainmappingsService) Get(name string) *ProjectsLocationsDomainmappingsGetCall { 16406 c := &ProjectsLocationsDomainmappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16407 c.name = name 16408 return c 16409} 16410 16411// Fields allows partial responses to be retrieved. See 16412// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16413// for more information. 16414func (c *ProjectsLocationsDomainmappingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDomainmappingsGetCall { 16415 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16416 return c 16417} 16418 16419// IfNoneMatch sets the optional parameter which makes the operation 16420// fail if the object's ETag matches the given value. This is useful for 16421// getting updates only after the object has changed since the last 16422// request. Use googleapi.IsNotModified to check whether the response 16423// error from Do is the result of In-None-Match. 16424func (c *ProjectsLocationsDomainmappingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDomainmappingsGetCall { 16425 c.ifNoneMatch_ = entityTag 16426 return c 16427} 16428 16429// Context sets the context to be used in this call's Do method. Any 16430// pending HTTP request will be aborted if the provided context is 16431// canceled. 16432func (c *ProjectsLocationsDomainmappingsGetCall) Context(ctx context.Context) *ProjectsLocationsDomainmappingsGetCall { 16433 c.ctx_ = ctx 16434 return c 16435} 16436 16437// Header returns an http.Header that can be modified by the caller to 16438// add HTTP headers to the request. 16439func (c *ProjectsLocationsDomainmappingsGetCall) Header() http.Header { 16440 if c.header_ == nil { 16441 c.header_ = make(http.Header) 16442 } 16443 return c.header_ 16444} 16445 16446func (c *ProjectsLocationsDomainmappingsGetCall) doRequest(alt string) (*http.Response, error) { 16447 reqHeaders := make(http.Header) 16448 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 16449 for k, v := range c.header_ { 16450 reqHeaders[k] = v 16451 } 16452 reqHeaders.Set("User-Agent", c.s.userAgent()) 16453 if c.ifNoneMatch_ != "" { 16454 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16455 } 16456 var body io.Reader = nil 16457 c.urlParams_.Set("alt", alt) 16458 c.urlParams_.Set("prettyPrint", "false") 16459 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 16460 urls += "?" + c.urlParams_.Encode() 16461 req, err := http.NewRequest("GET", urls, body) 16462 if err != nil { 16463 return nil, err 16464 } 16465 req.Header = reqHeaders 16466 googleapi.Expand(req.URL, map[string]string{ 16467 "name": c.name, 16468 }) 16469 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16470} 16471 16472// Do executes the "run.projects.locations.domainmappings.get" call. 16473// Exactly one of *DomainMapping or error will be non-nil. Any non-2xx 16474// status code is an error. Response headers are in either 16475// *DomainMapping.ServerResponse.Header or (if a response was returned 16476// at all) in error.(*googleapi.Error).Header. Use 16477// googleapi.IsNotModified to check whether the returned error was 16478// because http.StatusNotModified was returned. 16479func (c *ProjectsLocationsDomainmappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) { 16480 gensupport.SetOptions(c.urlParams_, opts...) 16481 res, err := c.doRequest("json") 16482 if res != nil && res.StatusCode == http.StatusNotModified { 16483 if res.Body != nil { 16484 res.Body.Close() 16485 } 16486 return nil, &googleapi.Error{ 16487 Code: res.StatusCode, 16488 Header: res.Header, 16489 } 16490 } 16491 if err != nil { 16492 return nil, err 16493 } 16494 defer googleapi.CloseBody(res) 16495 if err := googleapi.CheckResponse(res); err != nil { 16496 return nil, err 16497 } 16498 ret := &DomainMapping{ 16499 ServerResponse: googleapi.ServerResponse{ 16500 Header: res.Header, 16501 HTTPStatusCode: res.StatusCode, 16502 }, 16503 } 16504 target := &ret 16505 if err := gensupport.DecodeResponse(target, res); err != nil { 16506 return nil, err 16507 } 16508 return ret, nil 16509 // { 16510 // "description": "Rpc to get information about a domain mapping.", 16511 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/domainmappings/{domainmappingsId}", 16512 // "httpMethod": "GET", 16513 // "id": "run.projects.locations.domainmappings.get", 16514 // "parameterOrder": [ 16515 // "name" 16516 // ], 16517 // "parameters": { 16518 // "name": { 16519 // "description": "The name of the domain mapping being retrieved. If needed, replace {namespace_id} with the project ID.", 16520 // "location": "path", 16521 // "pattern": "^projects/[^/]+/locations/[^/]+/domainmappings/[^/]+$", 16522 // "required": true, 16523 // "type": "string" 16524 // } 16525 // }, 16526 // "path": "v1alpha1/{+name}", 16527 // "response": { 16528 // "$ref": "DomainMapping" 16529 // }, 16530 // "scopes": [ 16531 // "https://www.googleapis.com/auth/cloud-platform" 16532 // ] 16533 // } 16534 16535} 16536 16537// method id "run.projects.locations.domainmappings.list": 16538 16539type ProjectsLocationsDomainmappingsListCall struct { 16540 s *APIService 16541 parent string 16542 urlParams_ gensupport.URLParams 16543 ifNoneMatch_ string 16544 ctx_ context.Context 16545 header_ http.Header 16546} 16547 16548// List: Rpc to list domain mappings. 16549func (r *ProjectsLocationsDomainmappingsService) List(parent string) *ProjectsLocationsDomainmappingsListCall { 16550 c := &ProjectsLocationsDomainmappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16551 c.parent = parent 16552 return c 16553} 16554 16555// Continue sets the optional parameter "continue": Optional encoded 16556// string to continue paging. 16557func (c *ProjectsLocationsDomainmappingsListCall) Continue(continue_ string) *ProjectsLocationsDomainmappingsListCall { 16558 c.urlParams_.Set("continue", continue_) 16559 return c 16560} 16561 16562// FieldSelector sets the optional parameter "fieldSelector": Allows to 16563// filter resources based on a specific value for a field name. Send 16564// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 16565// currently used by Cloud Run. 16566func (c *ProjectsLocationsDomainmappingsListCall) FieldSelector(fieldSelector string) *ProjectsLocationsDomainmappingsListCall { 16567 c.urlParams_.Set("fieldSelector", fieldSelector) 16568 return c 16569} 16570 16571// IncludeUninitialized sets the optional parameter 16572// "includeUninitialized": Not currently used by Cloud Run. 16573func (c *ProjectsLocationsDomainmappingsListCall) IncludeUninitialized(includeUninitialized bool) *ProjectsLocationsDomainmappingsListCall { 16574 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 16575 return c 16576} 16577 16578// LabelSelector sets the optional parameter "labelSelector": Allows to 16579// filter resources based on a label. Supported operations are =, !=, 16580// exists, in, and notIn. 16581func (c *ProjectsLocationsDomainmappingsListCall) LabelSelector(labelSelector string) *ProjectsLocationsDomainmappingsListCall { 16582 c.urlParams_.Set("labelSelector", labelSelector) 16583 return c 16584} 16585 16586// Limit sets the optional parameter "limit": The maximum number of 16587// records that should be returned. 16588func (c *ProjectsLocationsDomainmappingsListCall) Limit(limit int64) *ProjectsLocationsDomainmappingsListCall { 16589 c.urlParams_.Set("limit", fmt.Sprint(limit)) 16590 return c 16591} 16592 16593// ResourceVersion sets the optional parameter "resourceVersion": The 16594// baseline resource version from which the list or watch operation 16595// should start. Not currently used by Cloud Run. 16596func (c *ProjectsLocationsDomainmappingsListCall) ResourceVersion(resourceVersion string) *ProjectsLocationsDomainmappingsListCall { 16597 c.urlParams_.Set("resourceVersion", resourceVersion) 16598 return c 16599} 16600 16601// Watch sets the optional parameter "watch": Flag that indicates that 16602// the client expects to watch this resource as well. Not currently used 16603// by Cloud Run. 16604func (c *ProjectsLocationsDomainmappingsListCall) Watch(watch bool) *ProjectsLocationsDomainmappingsListCall { 16605 c.urlParams_.Set("watch", fmt.Sprint(watch)) 16606 return c 16607} 16608 16609// Fields allows partial responses to be retrieved. See 16610// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16611// for more information. 16612func (c *ProjectsLocationsDomainmappingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDomainmappingsListCall { 16613 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16614 return c 16615} 16616 16617// IfNoneMatch sets the optional parameter which makes the operation 16618// fail if the object's ETag matches the given value. This is useful for 16619// getting updates only after the object has changed since the last 16620// request. Use googleapi.IsNotModified to check whether the response 16621// error from Do is the result of In-None-Match. 16622func (c *ProjectsLocationsDomainmappingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDomainmappingsListCall { 16623 c.ifNoneMatch_ = entityTag 16624 return c 16625} 16626 16627// Context sets the context to be used in this call's Do method. Any 16628// pending HTTP request will be aborted if the provided context is 16629// canceled. 16630func (c *ProjectsLocationsDomainmappingsListCall) Context(ctx context.Context) *ProjectsLocationsDomainmappingsListCall { 16631 c.ctx_ = ctx 16632 return c 16633} 16634 16635// Header returns an http.Header that can be modified by the caller to 16636// add HTTP headers to the request. 16637func (c *ProjectsLocationsDomainmappingsListCall) Header() http.Header { 16638 if c.header_ == nil { 16639 c.header_ = make(http.Header) 16640 } 16641 return c.header_ 16642} 16643 16644func (c *ProjectsLocationsDomainmappingsListCall) doRequest(alt string) (*http.Response, error) { 16645 reqHeaders := make(http.Header) 16646 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 16647 for k, v := range c.header_ { 16648 reqHeaders[k] = v 16649 } 16650 reqHeaders.Set("User-Agent", c.s.userAgent()) 16651 if c.ifNoneMatch_ != "" { 16652 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16653 } 16654 var body io.Reader = nil 16655 c.urlParams_.Set("alt", alt) 16656 c.urlParams_.Set("prettyPrint", "false") 16657 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/domainmappings") 16658 urls += "?" + c.urlParams_.Encode() 16659 req, err := http.NewRequest("GET", urls, body) 16660 if err != nil { 16661 return nil, err 16662 } 16663 req.Header = reqHeaders 16664 googleapi.Expand(req.URL, map[string]string{ 16665 "parent": c.parent, 16666 }) 16667 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16668} 16669 16670// Do executes the "run.projects.locations.domainmappings.list" call. 16671// Exactly one of *ListDomainMappingsResponse or error will be non-nil. 16672// Any non-2xx status code is an error. Response headers are in either 16673// *ListDomainMappingsResponse.ServerResponse.Header or (if a response 16674// was returned at all) in error.(*googleapi.Error).Header. Use 16675// googleapi.IsNotModified to check whether the returned error was 16676// because http.StatusNotModified was returned. 16677func (c *ProjectsLocationsDomainmappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, error) { 16678 gensupport.SetOptions(c.urlParams_, opts...) 16679 res, err := c.doRequest("json") 16680 if res != nil && res.StatusCode == http.StatusNotModified { 16681 if res.Body != nil { 16682 res.Body.Close() 16683 } 16684 return nil, &googleapi.Error{ 16685 Code: res.StatusCode, 16686 Header: res.Header, 16687 } 16688 } 16689 if err != nil { 16690 return nil, err 16691 } 16692 defer googleapi.CloseBody(res) 16693 if err := googleapi.CheckResponse(res); err != nil { 16694 return nil, err 16695 } 16696 ret := &ListDomainMappingsResponse{ 16697 ServerResponse: googleapi.ServerResponse{ 16698 Header: res.Header, 16699 HTTPStatusCode: res.StatusCode, 16700 }, 16701 } 16702 target := &ret 16703 if err := gensupport.DecodeResponse(target, res); err != nil { 16704 return nil, err 16705 } 16706 return ret, nil 16707 // { 16708 // "description": "Rpc to list domain mappings.", 16709 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/domainmappings", 16710 // "httpMethod": "GET", 16711 // "id": "run.projects.locations.domainmappings.list", 16712 // "parameterOrder": [ 16713 // "parent" 16714 // ], 16715 // "parameters": { 16716 // "continue": { 16717 // "description": "Optional encoded string to continue paging.", 16718 // "location": "query", 16719 // "type": "string" 16720 // }, 16721 // "fieldSelector": { 16722 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 16723 // "location": "query", 16724 // "type": "string" 16725 // }, 16726 // "includeUninitialized": { 16727 // "description": "Not currently used by Cloud Run.", 16728 // "location": "query", 16729 // "type": "boolean" 16730 // }, 16731 // "labelSelector": { 16732 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 16733 // "location": "query", 16734 // "type": "string" 16735 // }, 16736 // "limit": { 16737 // "description": "The maximum number of records that should be returned.", 16738 // "format": "int32", 16739 // "location": "query", 16740 // "type": "integer" 16741 // }, 16742 // "parent": { 16743 // "description": "The project ID or project number from which the domain mappings should be listed.", 16744 // "location": "path", 16745 // "pattern": "^projects/[^/]+/locations/[^/]+$", 16746 // "required": true, 16747 // "type": "string" 16748 // }, 16749 // "resourceVersion": { 16750 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 16751 // "location": "query", 16752 // "type": "string" 16753 // }, 16754 // "watch": { 16755 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 16756 // "location": "query", 16757 // "type": "boolean" 16758 // } 16759 // }, 16760 // "path": "v1alpha1/{+parent}/domainmappings", 16761 // "response": { 16762 // "$ref": "ListDomainMappingsResponse" 16763 // }, 16764 // "scopes": [ 16765 // "https://www.googleapis.com/auth/cloud-platform" 16766 // ] 16767 // } 16768 16769} 16770 16771// method id "run.projects.locations.revisions.delete": 16772 16773type ProjectsLocationsRevisionsDeleteCall struct { 16774 s *APIService 16775 name string 16776 urlParams_ gensupport.URLParams 16777 ctx_ context.Context 16778 header_ http.Header 16779} 16780 16781// Delete: Rpc to delete a revision. 16782func (r *ProjectsLocationsRevisionsService) Delete(name string) *ProjectsLocationsRevisionsDeleteCall { 16783 c := &ProjectsLocationsRevisionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16784 c.name = name 16785 return c 16786} 16787 16788// ApiVersion sets the optional parameter "apiVersion": Cloud Run 16789// currently ignores this parameter. 16790func (c *ProjectsLocationsRevisionsDeleteCall) ApiVersion(apiVersion string) *ProjectsLocationsRevisionsDeleteCall { 16791 c.urlParams_.Set("apiVersion", apiVersion) 16792 return c 16793} 16794 16795// Kind sets the optional parameter "kind": Cloud Run currently ignores 16796// this parameter. 16797func (c *ProjectsLocationsRevisionsDeleteCall) Kind(kind string) *ProjectsLocationsRevisionsDeleteCall { 16798 c.urlParams_.Set("kind", kind) 16799 return c 16800} 16801 16802// OrphanDependents sets the optional parameter "orphanDependents": 16803// Deprecated. Specifies the cascade behavior on delete. Cloud Run only 16804// supports cascading behavior, so this must be false. This attribute is 16805// deprecated, and is now replaced with PropagationPolicy See 16806// https://github.com/kubernetes/kubernetes/issues/46659 for more info. 16807func (c *ProjectsLocationsRevisionsDeleteCall) OrphanDependents(orphanDependents bool) *ProjectsLocationsRevisionsDeleteCall { 16808 c.urlParams_.Set("orphanDependents", fmt.Sprint(orphanDependents)) 16809 return c 16810} 16811 16812// PropagationPolicy sets the optional parameter "propagationPolicy": 16813// Specifies the propagation policy of delete. Cloud Run currently 16814// ignores this setting, and deletes in the background. Please see 16815// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 16816// for more information. 16817func (c *ProjectsLocationsRevisionsDeleteCall) PropagationPolicy(propagationPolicy string) *ProjectsLocationsRevisionsDeleteCall { 16818 c.urlParams_.Set("propagationPolicy", propagationPolicy) 16819 return c 16820} 16821 16822// Fields allows partial responses to be retrieved. See 16823// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16824// for more information. 16825func (c *ProjectsLocationsRevisionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRevisionsDeleteCall { 16826 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16827 return c 16828} 16829 16830// Context sets the context to be used in this call's Do method. Any 16831// pending HTTP request will be aborted if the provided context is 16832// canceled. 16833func (c *ProjectsLocationsRevisionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRevisionsDeleteCall { 16834 c.ctx_ = ctx 16835 return c 16836} 16837 16838// Header returns an http.Header that can be modified by the caller to 16839// add HTTP headers to the request. 16840func (c *ProjectsLocationsRevisionsDeleteCall) Header() http.Header { 16841 if c.header_ == nil { 16842 c.header_ = make(http.Header) 16843 } 16844 return c.header_ 16845} 16846 16847func (c *ProjectsLocationsRevisionsDeleteCall) doRequest(alt string) (*http.Response, error) { 16848 reqHeaders := make(http.Header) 16849 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 16850 for k, v := range c.header_ { 16851 reqHeaders[k] = v 16852 } 16853 reqHeaders.Set("User-Agent", c.s.userAgent()) 16854 var body io.Reader = nil 16855 c.urlParams_.Set("alt", alt) 16856 c.urlParams_.Set("prettyPrint", "false") 16857 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 16858 urls += "?" + c.urlParams_.Encode() 16859 req, err := http.NewRequest("DELETE", urls, body) 16860 if err != nil { 16861 return nil, err 16862 } 16863 req.Header = reqHeaders 16864 googleapi.Expand(req.URL, map[string]string{ 16865 "name": c.name, 16866 }) 16867 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16868} 16869 16870// Do executes the "run.projects.locations.revisions.delete" call. 16871// Exactly one of *Empty or error will be non-nil. Any non-2xx status 16872// code is an error. Response headers are in either 16873// *Empty.ServerResponse.Header or (if a response was returned at all) 16874// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 16875// check whether the returned error was because http.StatusNotModified 16876// was returned. 16877func (c *ProjectsLocationsRevisionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 16878 gensupport.SetOptions(c.urlParams_, opts...) 16879 res, err := c.doRequest("json") 16880 if res != nil && res.StatusCode == http.StatusNotModified { 16881 if res.Body != nil { 16882 res.Body.Close() 16883 } 16884 return nil, &googleapi.Error{ 16885 Code: res.StatusCode, 16886 Header: res.Header, 16887 } 16888 } 16889 if err != nil { 16890 return nil, err 16891 } 16892 defer googleapi.CloseBody(res) 16893 if err := googleapi.CheckResponse(res); err != nil { 16894 return nil, err 16895 } 16896 ret := &Empty{ 16897 ServerResponse: googleapi.ServerResponse{ 16898 Header: res.Header, 16899 HTTPStatusCode: res.StatusCode, 16900 }, 16901 } 16902 target := &ret 16903 if err := gensupport.DecodeResponse(target, res); err != nil { 16904 return nil, err 16905 } 16906 return ret, nil 16907 // { 16908 // "description": "Rpc to delete a revision.", 16909 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/revisions/{revisionsId}", 16910 // "httpMethod": "DELETE", 16911 // "id": "run.projects.locations.revisions.delete", 16912 // "parameterOrder": [ 16913 // "name" 16914 // ], 16915 // "parameters": { 16916 // "apiVersion": { 16917 // "description": "Cloud Run currently ignores this parameter.", 16918 // "location": "query", 16919 // "type": "string" 16920 // }, 16921 // "kind": { 16922 // "description": "Cloud Run currently ignores this parameter.", 16923 // "location": "query", 16924 // "type": "string" 16925 // }, 16926 // "name": { 16927 // "description": "The name of the revision being deleted. If needed, replace {namespace_id} with the project ID.", 16928 // "location": "path", 16929 // "pattern": "^projects/[^/]+/locations/[^/]+/revisions/[^/]+$", 16930 // "required": true, 16931 // "type": "string" 16932 // }, 16933 // "orphanDependents": { 16934 // "description": "Deprecated. Specifies the cascade behavior on delete. Cloud Run only supports cascading behavior, so this must be false. This attribute is deprecated, and is now replaced with PropagationPolicy See https://github.com/kubernetes/kubernetes/issues/46659 for more info.", 16935 // "location": "query", 16936 // "type": "boolean" 16937 // }, 16938 // "propagationPolicy": { 16939 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 16940 // "location": "query", 16941 // "type": "string" 16942 // } 16943 // }, 16944 // "path": "v1alpha1/{+name}", 16945 // "response": { 16946 // "$ref": "Empty" 16947 // }, 16948 // "scopes": [ 16949 // "https://www.googleapis.com/auth/cloud-platform" 16950 // ] 16951 // } 16952 16953} 16954 16955// method id "run.projects.locations.revisions.get": 16956 16957type ProjectsLocationsRevisionsGetCall struct { 16958 s *APIService 16959 name string 16960 urlParams_ gensupport.URLParams 16961 ifNoneMatch_ string 16962 ctx_ context.Context 16963 header_ http.Header 16964} 16965 16966// Get: Rpc to get information about a revision. 16967func (r *ProjectsLocationsRevisionsService) Get(name string) *ProjectsLocationsRevisionsGetCall { 16968 c := &ProjectsLocationsRevisionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16969 c.name = name 16970 return c 16971} 16972 16973// Fields allows partial responses to be retrieved. See 16974// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16975// for more information. 16976func (c *ProjectsLocationsRevisionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRevisionsGetCall { 16977 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16978 return c 16979} 16980 16981// IfNoneMatch sets the optional parameter which makes the operation 16982// fail if the object's ETag matches the given value. This is useful for 16983// getting updates only after the object has changed since the last 16984// request. Use googleapi.IsNotModified to check whether the response 16985// error from Do is the result of In-None-Match. 16986func (c *ProjectsLocationsRevisionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRevisionsGetCall { 16987 c.ifNoneMatch_ = entityTag 16988 return c 16989} 16990 16991// Context sets the context to be used in this call's Do method. Any 16992// pending HTTP request will be aborted if the provided context is 16993// canceled. 16994func (c *ProjectsLocationsRevisionsGetCall) Context(ctx context.Context) *ProjectsLocationsRevisionsGetCall { 16995 c.ctx_ = ctx 16996 return c 16997} 16998 16999// Header returns an http.Header that can be modified by the caller to 17000// add HTTP headers to the request. 17001func (c *ProjectsLocationsRevisionsGetCall) Header() http.Header { 17002 if c.header_ == nil { 17003 c.header_ = make(http.Header) 17004 } 17005 return c.header_ 17006} 17007 17008func (c *ProjectsLocationsRevisionsGetCall) doRequest(alt string) (*http.Response, error) { 17009 reqHeaders := make(http.Header) 17010 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17011 for k, v := range c.header_ { 17012 reqHeaders[k] = v 17013 } 17014 reqHeaders.Set("User-Agent", c.s.userAgent()) 17015 if c.ifNoneMatch_ != "" { 17016 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17017 } 17018 var body io.Reader = nil 17019 c.urlParams_.Set("alt", alt) 17020 c.urlParams_.Set("prettyPrint", "false") 17021 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 17022 urls += "?" + c.urlParams_.Encode() 17023 req, err := http.NewRequest("GET", urls, body) 17024 if err != nil { 17025 return nil, err 17026 } 17027 req.Header = reqHeaders 17028 googleapi.Expand(req.URL, map[string]string{ 17029 "name": c.name, 17030 }) 17031 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17032} 17033 17034// Do executes the "run.projects.locations.revisions.get" call. 17035// Exactly one of *Revision or error will be non-nil. Any non-2xx status 17036// code is an error. Response headers are in either 17037// *Revision.ServerResponse.Header or (if a response was returned at 17038// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 17039// to check whether the returned error was because 17040// http.StatusNotModified was returned. 17041func (c *ProjectsLocationsRevisionsGetCall) Do(opts ...googleapi.CallOption) (*Revision, error) { 17042 gensupport.SetOptions(c.urlParams_, opts...) 17043 res, err := c.doRequest("json") 17044 if res != nil && res.StatusCode == http.StatusNotModified { 17045 if res.Body != nil { 17046 res.Body.Close() 17047 } 17048 return nil, &googleapi.Error{ 17049 Code: res.StatusCode, 17050 Header: res.Header, 17051 } 17052 } 17053 if err != nil { 17054 return nil, err 17055 } 17056 defer googleapi.CloseBody(res) 17057 if err := googleapi.CheckResponse(res); err != nil { 17058 return nil, err 17059 } 17060 ret := &Revision{ 17061 ServerResponse: googleapi.ServerResponse{ 17062 Header: res.Header, 17063 HTTPStatusCode: res.StatusCode, 17064 }, 17065 } 17066 target := &ret 17067 if err := gensupport.DecodeResponse(target, res); err != nil { 17068 return nil, err 17069 } 17070 return ret, nil 17071 // { 17072 // "description": "Rpc to get information about a revision.", 17073 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/revisions/{revisionsId}", 17074 // "httpMethod": "GET", 17075 // "id": "run.projects.locations.revisions.get", 17076 // "parameterOrder": [ 17077 // "name" 17078 // ], 17079 // "parameters": { 17080 // "name": { 17081 // "description": "The name of the revision being retrieved. If needed, replace {namespace_id} with the project ID.", 17082 // "location": "path", 17083 // "pattern": "^projects/[^/]+/locations/[^/]+/revisions/[^/]+$", 17084 // "required": true, 17085 // "type": "string" 17086 // } 17087 // }, 17088 // "path": "v1alpha1/{+name}", 17089 // "response": { 17090 // "$ref": "Revision" 17091 // }, 17092 // "scopes": [ 17093 // "https://www.googleapis.com/auth/cloud-platform" 17094 // ] 17095 // } 17096 17097} 17098 17099// method id "run.projects.locations.revisions.list": 17100 17101type ProjectsLocationsRevisionsListCall struct { 17102 s *APIService 17103 parent string 17104 urlParams_ gensupport.URLParams 17105 ifNoneMatch_ string 17106 ctx_ context.Context 17107 header_ http.Header 17108} 17109 17110// List: Rpc to list revisions. 17111func (r *ProjectsLocationsRevisionsService) List(parent string) *ProjectsLocationsRevisionsListCall { 17112 c := &ProjectsLocationsRevisionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17113 c.parent = parent 17114 return c 17115} 17116 17117// Continue sets the optional parameter "continue": Optional encoded 17118// string to continue paging. 17119func (c *ProjectsLocationsRevisionsListCall) Continue(continue_ string) *ProjectsLocationsRevisionsListCall { 17120 c.urlParams_.Set("continue", continue_) 17121 return c 17122} 17123 17124// FieldSelector sets the optional parameter "fieldSelector": Allows to 17125// filter resources based on a specific value for a field name. Send 17126// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 17127// currently used by Cloud Run. 17128func (c *ProjectsLocationsRevisionsListCall) FieldSelector(fieldSelector string) *ProjectsLocationsRevisionsListCall { 17129 c.urlParams_.Set("fieldSelector", fieldSelector) 17130 return c 17131} 17132 17133// IncludeUninitialized sets the optional parameter 17134// "includeUninitialized": Not currently used by Cloud Run. 17135func (c *ProjectsLocationsRevisionsListCall) IncludeUninitialized(includeUninitialized bool) *ProjectsLocationsRevisionsListCall { 17136 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 17137 return c 17138} 17139 17140// LabelSelector sets the optional parameter "labelSelector": Allows to 17141// filter resources based on a label. Supported operations are =, !=, 17142// exists, in, and notIn. 17143func (c *ProjectsLocationsRevisionsListCall) LabelSelector(labelSelector string) *ProjectsLocationsRevisionsListCall { 17144 c.urlParams_.Set("labelSelector", labelSelector) 17145 return c 17146} 17147 17148// Limit sets the optional parameter "limit": The maximum number of 17149// records that should be returned. 17150func (c *ProjectsLocationsRevisionsListCall) Limit(limit int64) *ProjectsLocationsRevisionsListCall { 17151 c.urlParams_.Set("limit", fmt.Sprint(limit)) 17152 return c 17153} 17154 17155// ResourceVersion sets the optional parameter "resourceVersion": The 17156// baseline resource version from which the list or watch operation 17157// should start. Not currently used by Cloud Run. 17158func (c *ProjectsLocationsRevisionsListCall) ResourceVersion(resourceVersion string) *ProjectsLocationsRevisionsListCall { 17159 c.urlParams_.Set("resourceVersion", resourceVersion) 17160 return c 17161} 17162 17163// Watch sets the optional parameter "watch": Flag that indicates that 17164// the client expects to watch this resource as well. Not currently used 17165// by Cloud Run. 17166func (c *ProjectsLocationsRevisionsListCall) Watch(watch bool) *ProjectsLocationsRevisionsListCall { 17167 c.urlParams_.Set("watch", fmt.Sprint(watch)) 17168 return c 17169} 17170 17171// Fields allows partial responses to be retrieved. See 17172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17173// for more information. 17174func (c *ProjectsLocationsRevisionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRevisionsListCall { 17175 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17176 return c 17177} 17178 17179// IfNoneMatch sets the optional parameter which makes the operation 17180// fail if the object's ETag matches the given value. This is useful for 17181// getting updates only after the object has changed since the last 17182// request. Use googleapi.IsNotModified to check whether the response 17183// error from Do is the result of In-None-Match. 17184func (c *ProjectsLocationsRevisionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRevisionsListCall { 17185 c.ifNoneMatch_ = entityTag 17186 return c 17187} 17188 17189// Context sets the context to be used in this call's Do method. Any 17190// pending HTTP request will be aborted if the provided context is 17191// canceled. 17192func (c *ProjectsLocationsRevisionsListCall) Context(ctx context.Context) *ProjectsLocationsRevisionsListCall { 17193 c.ctx_ = ctx 17194 return c 17195} 17196 17197// Header returns an http.Header that can be modified by the caller to 17198// add HTTP headers to the request. 17199func (c *ProjectsLocationsRevisionsListCall) Header() http.Header { 17200 if c.header_ == nil { 17201 c.header_ = make(http.Header) 17202 } 17203 return c.header_ 17204} 17205 17206func (c *ProjectsLocationsRevisionsListCall) doRequest(alt string) (*http.Response, error) { 17207 reqHeaders := make(http.Header) 17208 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17209 for k, v := range c.header_ { 17210 reqHeaders[k] = v 17211 } 17212 reqHeaders.Set("User-Agent", c.s.userAgent()) 17213 if c.ifNoneMatch_ != "" { 17214 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17215 } 17216 var body io.Reader = nil 17217 c.urlParams_.Set("alt", alt) 17218 c.urlParams_.Set("prettyPrint", "false") 17219 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/revisions") 17220 urls += "?" + c.urlParams_.Encode() 17221 req, err := http.NewRequest("GET", urls, body) 17222 if err != nil { 17223 return nil, err 17224 } 17225 req.Header = reqHeaders 17226 googleapi.Expand(req.URL, map[string]string{ 17227 "parent": c.parent, 17228 }) 17229 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17230} 17231 17232// Do executes the "run.projects.locations.revisions.list" call. 17233// Exactly one of *ListRevisionsResponse or error will be non-nil. Any 17234// non-2xx status code is an error. Response headers are in either 17235// *ListRevisionsResponse.ServerResponse.Header or (if a response was 17236// returned at all) in error.(*googleapi.Error).Header. Use 17237// googleapi.IsNotModified to check whether the returned error was 17238// because http.StatusNotModified was returned. 17239func (c *ProjectsLocationsRevisionsListCall) Do(opts ...googleapi.CallOption) (*ListRevisionsResponse, error) { 17240 gensupport.SetOptions(c.urlParams_, opts...) 17241 res, err := c.doRequest("json") 17242 if res != nil && res.StatusCode == http.StatusNotModified { 17243 if res.Body != nil { 17244 res.Body.Close() 17245 } 17246 return nil, &googleapi.Error{ 17247 Code: res.StatusCode, 17248 Header: res.Header, 17249 } 17250 } 17251 if err != nil { 17252 return nil, err 17253 } 17254 defer googleapi.CloseBody(res) 17255 if err := googleapi.CheckResponse(res); err != nil { 17256 return nil, err 17257 } 17258 ret := &ListRevisionsResponse{ 17259 ServerResponse: googleapi.ServerResponse{ 17260 Header: res.Header, 17261 HTTPStatusCode: res.StatusCode, 17262 }, 17263 } 17264 target := &ret 17265 if err := gensupport.DecodeResponse(target, res); err != nil { 17266 return nil, err 17267 } 17268 return ret, nil 17269 // { 17270 // "description": "Rpc to list revisions.", 17271 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/revisions", 17272 // "httpMethod": "GET", 17273 // "id": "run.projects.locations.revisions.list", 17274 // "parameterOrder": [ 17275 // "parent" 17276 // ], 17277 // "parameters": { 17278 // "continue": { 17279 // "description": "Optional encoded string to continue paging.", 17280 // "location": "query", 17281 // "type": "string" 17282 // }, 17283 // "fieldSelector": { 17284 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 17285 // "location": "query", 17286 // "type": "string" 17287 // }, 17288 // "includeUninitialized": { 17289 // "description": "Not currently used by Cloud Run.", 17290 // "location": "query", 17291 // "type": "boolean" 17292 // }, 17293 // "labelSelector": { 17294 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 17295 // "location": "query", 17296 // "type": "string" 17297 // }, 17298 // "limit": { 17299 // "description": "The maximum number of records that should be returned.", 17300 // "format": "int32", 17301 // "location": "query", 17302 // "type": "integer" 17303 // }, 17304 // "parent": { 17305 // "description": "The project ID or project number from which the revisions should be listed.", 17306 // "location": "path", 17307 // "pattern": "^projects/[^/]+/locations/[^/]+$", 17308 // "required": true, 17309 // "type": "string" 17310 // }, 17311 // "resourceVersion": { 17312 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 17313 // "location": "query", 17314 // "type": "string" 17315 // }, 17316 // "watch": { 17317 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 17318 // "location": "query", 17319 // "type": "boolean" 17320 // } 17321 // }, 17322 // "path": "v1alpha1/{+parent}/revisions", 17323 // "response": { 17324 // "$ref": "ListRevisionsResponse" 17325 // }, 17326 // "scopes": [ 17327 // "https://www.googleapis.com/auth/cloud-platform" 17328 // ] 17329 // } 17330 17331} 17332 17333// method id "run.projects.locations.routes.get": 17334 17335type ProjectsLocationsRoutesGetCall struct { 17336 s *APIService 17337 name string 17338 urlParams_ gensupport.URLParams 17339 ifNoneMatch_ string 17340 ctx_ context.Context 17341 header_ http.Header 17342} 17343 17344// Get: Rpc to get information about a route. 17345func (r *ProjectsLocationsRoutesService) Get(name string) *ProjectsLocationsRoutesGetCall { 17346 c := &ProjectsLocationsRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17347 c.name = name 17348 return c 17349} 17350 17351// Fields allows partial responses to be retrieved. See 17352// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17353// for more information. 17354func (c *ProjectsLocationsRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRoutesGetCall { 17355 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17356 return c 17357} 17358 17359// IfNoneMatch sets the optional parameter which makes the operation 17360// fail if the object's ETag matches the given value. This is useful for 17361// getting updates only after the object has changed since the last 17362// request. Use googleapi.IsNotModified to check whether the response 17363// error from Do is the result of In-None-Match. 17364func (c *ProjectsLocationsRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRoutesGetCall { 17365 c.ifNoneMatch_ = entityTag 17366 return c 17367} 17368 17369// Context sets the context to be used in this call's Do method. Any 17370// pending HTTP request will be aborted if the provided context is 17371// canceled. 17372func (c *ProjectsLocationsRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsRoutesGetCall { 17373 c.ctx_ = ctx 17374 return c 17375} 17376 17377// Header returns an http.Header that can be modified by the caller to 17378// add HTTP headers to the request. 17379func (c *ProjectsLocationsRoutesGetCall) Header() http.Header { 17380 if c.header_ == nil { 17381 c.header_ = make(http.Header) 17382 } 17383 return c.header_ 17384} 17385 17386func (c *ProjectsLocationsRoutesGetCall) doRequest(alt string) (*http.Response, error) { 17387 reqHeaders := make(http.Header) 17388 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17389 for k, v := range c.header_ { 17390 reqHeaders[k] = v 17391 } 17392 reqHeaders.Set("User-Agent", c.s.userAgent()) 17393 if c.ifNoneMatch_ != "" { 17394 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17395 } 17396 var body io.Reader = nil 17397 c.urlParams_.Set("alt", alt) 17398 c.urlParams_.Set("prettyPrint", "false") 17399 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 17400 urls += "?" + c.urlParams_.Encode() 17401 req, err := http.NewRequest("GET", urls, body) 17402 if err != nil { 17403 return nil, err 17404 } 17405 req.Header = reqHeaders 17406 googleapi.Expand(req.URL, map[string]string{ 17407 "name": c.name, 17408 }) 17409 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17410} 17411 17412// Do executes the "run.projects.locations.routes.get" call. 17413// Exactly one of *Route or error will be non-nil. Any non-2xx status 17414// code is an error. Response headers are in either 17415// *Route.ServerResponse.Header or (if a response was returned at all) 17416// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 17417// check whether the returned error was because http.StatusNotModified 17418// was returned. 17419func (c *ProjectsLocationsRoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) { 17420 gensupport.SetOptions(c.urlParams_, opts...) 17421 res, err := c.doRequest("json") 17422 if res != nil && res.StatusCode == http.StatusNotModified { 17423 if res.Body != nil { 17424 res.Body.Close() 17425 } 17426 return nil, &googleapi.Error{ 17427 Code: res.StatusCode, 17428 Header: res.Header, 17429 } 17430 } 17431 if err != nil { 17432 return nil, err 17433 } 17434 defer googleapi.CloseBody(res) 17435 if err := googleapi.CheckResponse(res); err != nil { 17436 return nil, err 17437 } 17438 ret := &Route{ 17439 ServerResponse: googleapi.ServerResponse{ 17440 Header: res.Header, 17441 HTTPStatusCode: res.StatusCode, 17442 }, 17443 } 17444 target := &ret 17445 if err := gensupport.DecodeResponse(target, res); err != nil { 17446 return nil, err 17447 } 17448 return ret, nil 17449 // { 17450 // "description": "Rpc to get information about a route.", 17451 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/routes/{routesId}", 17452 // "httpMethod": "GET", 17453 // "id": "run.projects.locations.routes.get", 17454 // "parameterOrder": [ 17455 // "name" 17456 // ], 17457 // "parameters": { 17458 // "name": { 17459 // "description": "The name of the route being retrieved. If needed, replace {namespace_id} with the project ID.", 17460 // "location": "path", 17461 // "pattern": "^projects/[^/]+/locations/[^/]+/routes/[^/]+$", 17462 // "required": true, 17463 // "type": "string" 17464 // } 17465 // }, 17466 // "path": "v1alpha1/{+name}", 17467 // "response": { 17468 // "$ref": "Route" 17469 // }, 17470 // "scopes": [ 17471 // "https://www.googleapis.com/auth/cloud-platform" 17472 // ] 17473 // } 17474 17475} 17476 17477// method id "run.projects.locations.routes.list": 17478 17479type ProjectsLocationsRoutesListCall struct { 17480 s *APIService 17481 parent string 17482 urlParams_ gensupport.URLParams 17483 ifNoneMatch_ string 17484 ctx_ context.Context 17485 header_ http.Header 17486} 17487 17488// List: Rpc to list routes. 17489func (r *ProjectsLocationsRoutesService) List(parent string) *ProjectsLocationsRoutesListCall { 17490 c := &ProjectsLocationsRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17491 c.parent = parent 17492 return c 17493} 17494 17495// Continue sets the optional parameter "continue": Optional encoded 17496// string to continue paging. 17497func (c *ProjectsLocationsRoutesListCall) Continue(continue_ string) *ProjectsLocationsRoutesListCall { 17498 c.urlParams_.Set("continue", continue_) 17499 return c 17500} 17501 17502// FieldSelector sets the optional parameter "fieldSelector": Allows to 17503// filter resources based on a specific value for a field name. Send 17504// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 17505// currently used by Cloud Run. 17506func (c *ProjectsLocationsRoutesListCall) FieldSelector(fieldSelector string) *ProjectsLocationsRoutesListCall { 17507 c.urlParams_.Set("fieldSelector", fieldSelector) 17508 return c 17509} 17510 17511// IncludeUninitialized sets the optional parameter 17512// "includeUninitialized": Not currently used by Cloud Run. 17513func (c *ProjectsLocationsRoutesListCall) IncludeUninitialized(includeUninitialized bool) *ProjectsLocationsRoutesListCall { 17514 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 17515 return c 17516} 17517 17518// LabelSelector sets the optional parameter "labelSelector": Allows to 17519// filter resources based on a label. Supported operations are =, !=, 17520// exists, in, and notIn. 17521func (c *ProjectsLocationsRoutesListCall) LabelSelector(labelSelector string) *ProjectsLocationsRoutesListCall { 17522 c.urlParams_.Set("labelSelector", labelSelector) 17523 return c 17524} 17525 17526// Limit sets the optional parameter "limit": The maximum number of 17527// records that should be returned. 17528func (c *ProjectsLocationsRoutesListCall) Limit(limit int64) *ProjectsLocationsRoutesListCall { 17529 c.urlParams_.Set("limit", fmt.Sprint(limit)) 17530 return c 17531} 17532 17533// ResourceVersion sets the optional parameter "resourceVersion": The 17534// baseline resource version from which the list or watch operation 17535// should start. Not currently used by Cloud Run. 17536func (c *ProjectsLocationsRoutesListCall) ResourceVersion(resourceVersion string) *ProjectsLocationsRoutesListCall { 17537 c.urlParams_.Set("resourceVersion", resourceVersion) 17538 return c 17539} 17540 17541// Watch sets the optional parameter "watch": Flag that indicates that 17542// the client expects to watch this resource as well. Not currently used 17543// by Cloud Run. 17544func (c *ProjectsLocationsRoutesListCall) Watch(watch bool) *ProjectsLocationsRoutesListCall { 17545 c.urlParams_.Set("watch", fmt.Sprint(watch)) 17546 return c 17547} 17548 17549// Fields allows partial responses to be retrieved. See 17550// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17551// for more information. 17552func (c *ProjectsLocationsRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRoutesListCall { 17553 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17554 return c 17555} 17556 17557// IfNoneMatch sets the optional parameter which makes the operation 17558// fail if the object's ETag matches the given value. This is useful for 17559// getting updates only after the object has changed since the last 17560// request. Use googleapi.IsNotModified to check whether the response 17561// error from Do is the result of In-None-Match. 17562func (c *ProjectsLocationsRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRoutesListCall { 17563 c.ifNoneMatch_ = entityTag 17564 return c 17565} 17566 17567// Context sets the context to be used in this call's Do method. Any 17568// pending HTTP request will be aborted if the provided context is 17569// canceled. 17570func (c *ProjectsLocationsRoutesListCall) Context(ctx context.Context) *ProjectsLocationsRoutesListCall { 17571 c.ctx_ = ctx 17572 return c 17573} 17574 17575// Header returns an http.Header that can be modified by the caller to 17576// add HTTP headers to the request. 17577func (c *ProjectsLocationsRoutesListCall) Header() http.Header { 17578 if c.header_ == nil { 17579 c.header_ = make(http.Header) 17580 } 17581 return c.header_ 17582} 17583 17584func (c *ProjectsLocationsRoutesListCall) doRequest(alt string) (*http.Response, error) { 17585 reqHeaders := make(http.Header) 17586 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17587 for k, v := range c.header_ { 17588 reqHeaders[k] = v 17589 } 17590 reqHeaders.Set("User-Agent", c.s.userAgent()) 17591 if c.ifNoneMatch_ != "" { 17592 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17593 } 17594 var body io.Reader = nil 17595 c.urlParams_.Set("alt", alt) 17596 c.urlParams_.Set("prettyPrint", "false") 17597 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/routes") 17598 urls += "?" + c.urlParams_.Encode() 17599 req, err := http.NewRequest("GET", urls, body) 17600 if err != nil { 17601 return nil, err 17602 } 17603 req.Header = reqHeaders 17604 googleapi.Expand(req.URL, map[string]string{ 17605 "parent": c.parent, 17606 }) 17607 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17608} 17609 17610// Do executes the "run.projects.locations.routes.list" call. 17611// Exactly one of *ListRoutesResponse or error will be non-nil. Any 17612// non-2xx status code is an error. Response headers are in either 17613// *ListRoutesResponse.ServerResponse.Header or (if a response was 17614// returned at all) in error.(*googleapi.Error).Header. Use 17615// googleapi.IsNotModified to check whether the returned error was 17616// because http.StatusNotModified was returned. 17617func (c *ProjectsLocationsRoutesListCall) Do(opts ...googleapi.CallOption) (*ListRoutesResponse, error) { 17618 gensupport.SetOptions(c.urlParams_, opts...) 17619 res, err := c.doRequest("json") 17620 if res != nil && res.StatusCode == http.StatusNotModified { 17621 if res.Body != nil { 17622 res.Body.Close() 17623 } 17624 return nil, &googleapi.Error{ 17625 Code: res.StatusCode, 17626 Header: res.Header, 17627 } 17628 } 17629 if err != nil { 17630 return nil, err 17631 } 17632 defer googleapi.CloseBody(res) 17633 if err := googleapi.CheckResponse(res); err != nil { 17634 return nil, err 17635 } 17636 ret := &ListRoutesResponse{ 17637 ServerResponse: googleapi.ServerResponse{ 17638 Header: res.Header, 17639 HTTPStatusCode: res.StatusCode, 17640 }, 17641 } 17642 target := &ret 17643 if err := gensupport.DecodeResponse(target, res); err != nil { 17644 return nil, err 17645 } 17646 return ret, nil 17647 // { 17648 // "description": "Rpc to list routes.", 17649 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/routes", 17650 // "httpMethod": "GET", 17651 // "id": "run.projects.locations.routes.list", 17652 // "parameterOrder": [ 17653 // "parent" 17654 // ], 17655 // "parameters": { 17656 // "continue": { 17657 // "description": "Optional encoded string to continue paging.", 17658 // "location": "query", 17659 // "type": "string" 17660 // }, 17661 // "fieldSelector": { 17662 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 17663 // "location": "query", 17664 // "type": "string" 17665 // }, 17666 // "includeUninitialized": { 17667 // "description": "Not currently used by Cloud Run.", 17668 // "location": "query", 17669 // "type": "boolean" 17670 // }, 17671 // "labelSelector": { 17672 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 17673 // "location": "query", 17674 // "type": "string" 17675 // }, 17676 // "limit": { 17677 // "description": "The maximum number of records that should be returned.", 17678 // "format": "int32", 17679 // "location": "query", 17680 // "type": "integer" 17681 // }, 17682 // "parent": { 17683 // "description": "The project ID or project number from which the routes should be listed.", 17684 // "location": "path", 17685 // "pattern": "^projects/[^/]+/locations/[^/]+$", 17686 // "required": true, 17687 // "type": "string" 17688 // }, 17689 // "resourceVersion": { 17690 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 17691 // "location": "query", 17692 // "type": "string" 17693 // }, 17694 // "watch": { 17695 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 17696 // "location": "query", 17697 // "type": "boolean" 17698 // } 17699 // }, 17700 // "path": "v1alpha1/{+parent}/routes", 17701 // "response": { 17702 // "$ref": "ListRoutesResponse" 17703 // }, 17704 // "scopes": [ 17705 // "https://www.googleapis.com/auth/cloud-platform" 17706 // ] 17707 // } 17708 17709} 17710 17711// method id "run.projects.locations.services.create": 17712 17713type ProjectsLocationsServicesCreateCall struct { 17714 s *APIService 17715 parent string 17716 service *Service 17717 urlParams_ gensupport.URLParams 17718 ctx_ context.Context 17719 header_ http.Header 17720} 17721 17722// Create: Rpc to create a service. 17723func (r *ProjectsLocationsServicesService) Create(parent string, service *Service) *ProjectsLocationsServicesCreateCall { 17724 c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17725 c.parent = parent 17726 c.service = service 17727 return c 17728} 17729 17730// Fields allows partial responses to be retrieved. See 17731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17732// for more information. 17733func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall { 17734 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17735 return c 17736} 17737 17738// Context sets the context to be used in this call's Do method. Any 17739// pending HTTP request will be aborted if the provided context is 17740// canceled. 17741func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall { 17742 c.ctx_ = ctx 17743 return c 17744} 17745 17746// Header returns an http.Header that can be modified by the caller to 17747// add HTTP headers to the request. 17748func (c *ProjectsLocationsServicesCreateCall) Header() http.Header { 17749 if c.header_ == nil { 17750 c.header_ = make(http.Header) 17751 } 17752 return c.header_ 17753} 17754 17755func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) { 17756 reqHeaders := make(http.Header) 17757 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17758 for k, v := range c.header_ { 17759 reqHeaders[k] = v 17760 } 17761 reqHeaders.Set("User-Agent", c.s.userAgent()) 17762 var body io.Reader = nil 17763 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) 17764 if err != nil { 17765 return nil, err 17766 } 17767 reqHeaders.Set("Content-Type", "application/json") 17768 c.urlParams_.Set("alt", alt) 17769 c.urlParams_.Set("prettyPrint", "false") 17770 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/services") 17771 urls += "?" + c.urlParams_.Encode() 17772 req, err := http.NewRequest("POST", urls, body) 17773 if err != nil { 17774 return nil, err 17775 } 17776 req.Header = reqHeaders 17777 googleapi.Expand(req.URL, map[string]string{ 17778 "parent": c.parent, 17779 }) 17780 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17781} 17782 17783// Do executes the "run.projects.locations.services.create" call. 17784// Exactly one of *Service or error will be non-nil. Any non-2xx status 17785// code is an error. Response headers are in either 17786// *Service.ServerResponse.Header or (if a response was returned at all) 17787// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 17788// check whether the returned error was because http.StatusNotModified 17789// was returned. 17790func (c *ProjectsLocationsServicesCreateCall) Do(opts ...googleapi.CallOption) (*Service, error) { 17791 gensupport.SetOptions(c.urlParams_, opts...) 17792 res, err := c.doRequest("json") 17793 if res != nil && res.StatusCode == http.StatusNotModified { 17794 if res.Body != nil { 17795 res.Body.Close() 17796 } 17797 return nil, &googleapi.Error{ 17798 Code: res.StatusCode, 17799 Header: res.Header, 17800 } 17801 } 17802 if err != nil { 17803 return nil, err 17804 } 17805 defer googleapi.CloseBody(res) 17806 if err := googleapi.CheckResponse(res); err != nil { 17807 return nil, err 17808 } 17809 ret := &Service{ 17810 ServerResponse: googleapi.ServerResponse{ 17811 Header: res.Header, 17812 HTTPStatusCode: res.StatusCode, 17813 }, 17814 } 17815 target := &ret 17816 if err := gensupport.DecodeResponse(target, res); err != nil { 17817 return nil, err 17818 } 17819 return ret, nil 17820 // { 17821 // "description": "Rpc to create a service.", 17822 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/services", 17823 // "httpMethod": "POST", 17824 // "id": "run.projects.locations.services.create", 17825 // "parameterOrder": [ 17826 // "parent" 17827 // ], 17828 // "parameters": { 17829 // "parent": { 17830 // "description": "The project ID or project number in which this service should be created.", 17831 // "location": "path", 17832 // "pattern": "^projects/[^/]+/locations/[^/]+$", 17833 // "required": true, 17834 // "type": "string" 17835 // } 17836 // }, 17837 // "path": "v1alpha1/{+parent}/services", 17838 // "request": { 17839 // "$ref": "Service" 17840 // }, 17841 // "response": { 17842 // "$ref": "Service" 17843 // }, 17844 // "scopes": [ 17845 // "https://www.googleapis.com/auth/cloud-platform" 17846 // ] 17847 // } 17848 17849} 17850 17851// method id "run.projects.locations.services.delete": 17852 17853type ProjectsLocationsServicesDeleteCall struct { 17854 s *APIService 17855 name string 17856 urlParams_ gensupport.URLParams 17857 ctx_ context.Context 17858 header_ http.Header 17859} 17860 17861// Delete: Rpc to delete a service. This will cause the Service to stop 17862// serving traffic and will delete the child entities like Routes, 17863// Configurations and Revisions. 17864func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall { 17865 c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17866 c.name = name 17867 return c 17868} 17869 17870// ApiVersion sets the optional parameter "apiVersion": Cloud Run 17871// currently ignores this parameter. 17872func (c *ProjectsLocationsServicesDeleteCall) ApiVersion(apiVersion string) *ProjectsLocationsServicesDeleteCall { 17873 c.urlParams_.Set("apiVersion", apiVersion) 17874 return c 17875} 17876 17877// Kind sets the optional parameter "kind": Cloud Run currently ignores 17878// this parameter. 17879func (c *ProjectsLocationsServicesDeleteCall) Kind(kind string) *ProjectsLocationsServicesDeleteCall { 17880 c.urlParams_.Set("kind", kind) 17881 return c 17882} 17883 17884// OrphanDependents sets the optional parameter "orphanDependents": 17885// Deprecated. Specifies the cascade behavior on delete. Cloud Run only 17886// supports cascading behavior, so this must be false. This attribute is 17887// deprecated, and is now replaced with PropagationPolicy See 17888// https://github.com/kubernetes/kubernetes/issues/46659 for more info. 17889func (c *ProjectsLocationsServicesDeleteCall) OrphanDependents(orphanDependents bool) *ProjectsLocationsServicesDeleteCall { 17890 c.urlParams_.Set("orphanDependents", fmt.Sprint(orphanDependents)) 17891 return c 17892} 17893 17894// PropagationPolicy sets the optional parameter "propagationPolicy": 17895// Specifies the propagation policy of delete. Cloud Run currently 17896// ignores this setting, and deletes in the background. Please see 17897// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 17898// for more information. 17899func (c *ProjectsLocationsServicesDeleteCall) PropagationPolicy(propagationPolicy string) *ProjectsLocationsServicesDeleteCall { 17900 c.urlParams_.Set("propagationPolicy", propagationPolicy) 17901 return c 17902} 17903 17904// Fields allows partial responses to be retrieved. See 17905// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17906// for more information. 17907func (c *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall { 17908 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17909 return c 17910} 17911 17912// Context sets the context to be used in this call's Do method. Any 17913// pending HTTP request will be aborted if the provided context is 17914// canceled. 17915func (c *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall { 17916 c.ctx_ = ctx 17917 return c 17918} 17919 17920// Header returns an http.Header that can be modified by the caller to 17921// add HTTP headers to the request. 17922func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header { 17923 if c.header_ == nil { 17924 c.header_ = make(http.Header) 17925 } 17926 return c.header_ 17927} 17928 17929func (c *ProjectsLocationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { 17930 reqHeaders := make(http.Header) 17931 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17932 for k, v := range c.header_ { 17933 reqHeaders[k] = v 17934 } 17935 reqHeaders.Set("User-Agent", c.s.userAgent()) 17936 var body io.Reader = nil 17937 c.urlParams_.Set("alt", alt) 17938 c.urlParams_.Set("prettyPrint", "false") 17939 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 17940 urls += "?" + c.urlParams_.Encode() 17941 req, err := http.NewRequest("DELETE", urls, body) 17942 if err != nil { 17943 return nil, err 17944 } 17945 req.Header = reqHeaders 17946 googleapi.Expand(req.URL, map[string]string{ 17947 "name": c.name, 17948 }) 17949 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17950} 17951 17952// Do executes the "run.projects.locations.services.delete" call. 17953// Exactly one of *Empty or error will be non-nil. Any non-2xx status 17954// code is an error. Response headers are in either 17955// *Empty.ServerResponse.Header or (if a response was returned at all) 17956// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 17957// check whether the returned error was because http.StatusNotModified 17958// was returned. 17959func (c *ProjectsLocationsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 17960 gensupport.SetOptions(c.urlParams_, opts...) 17961 res, err := c.doRequest("json") 17962 if res != nil && res.StatusCode == http.StatusNotModified { 17963 if res.Body != nil { 17964 res.Body.Close() 17965 } 17966 return nil, &googleapi.Error{ 17967 Code: res.StatusCode, 17968 Header: res.Header, 17969 } 17970 } 17971 if err != nil { 17972 return nil, err 17973 } 17974 defer googleapi.CloseBody(res) 17975 if err := googleapi.CheckResponse(res); err != nil { 17976 return nil, err 17977 } 17978 ret := &Empty{ 17979 ServerResponse: googleapi.ServerResponse{ 17980 Header: res.Header, 17981 HTTPStatusCode: res.StatusCode, 17982 }, 17983 } 17984 target := &ret 17985 if err := gensupport.DecodeResponse(target, res); err != nil { 17986 return nil, err 17987 } 17988 return ret, nil 17989 // { 17990 // "description": "Rpc to delete a service. This will cause the Service to stop serving traffic and will delete the child entities like Routes, Configurations and Revisions.", 17991 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", 17992 // "httpMethod": "DELETE", 17993 // "id": "run.projects.locations.services.delete", 17994 // "parameterOrder": [ 17995 // "name" 17996 // ], 17997 // "parameters": { 17998 // "apiVersion": { 17999 // "description": "Cloud Run currently ignores this parameter.", 18000 // "location": "query", 18001 // "type": "string" 18002 // }, 18003 // "kind": { 18004 // "description": "Cloud Run currently ignores this parameter.", 18005 // "location": "query", 18006 // "type": "string" 18007 // }, 18008 // "name": { 18009 // "description": "The name of the service being deleted. If needed, replace {namespace_id} with the project ID.", 18010 // "location": "path", 18011 // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", 18012 // "required": true, 18013 // "type": "string" 18014 // }, 18015 // "orphanDependents": { 18016 // "description": "Deprecated. Specifies the cascade behavior on delete. Cloud Run only supports cascading behavior, so this must be false. This attribute is deprecated, and is now replaced with PropagationPolicy See https://github.com/kubernetes/kubernetes/issues/46659 for more info.", 18017 // "location": "query", 18018 // "type": "boolean" 18019 // }, 18020 // "propagationPolicy": { 18021 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 18022 // "location": "query", 18023 // "type": "string" 18024 // } 18025 // }, 18026 // "path": "v1alpha1/{+name}", 18027 // "response": { 18028 // "$ref": "Empty" 18029 // }, 18030 // "scopes": [ 18031 // "https://www.googleapis.com/auth/cloud-platform" 18032 // ] 18033 // } 18034 18035} 18036 18037// method id "run.projects.locations.services.get": 18038 18039type ProjectsLocationsServicesGetCall struct { 18040 s *APIService 18041 name string 18042 urlParams_ gensupport.URLParams 18043 ifNoneMatch_ string 18044 ctx_ context.Context 18045 header_ http.Header 18046} 18047 18048// Get: Rpc to get information about a service. 18049func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall { 18050 c := &ProjectsLocationsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18051 c.name = name 18052 return c 18053} 18054 18055// Fields allows partial responses to be retrieved. See 18056// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18057// for more information. 18058func (c *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall { 18059 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18060 return c 18061} 18062 18063// IfNoneMatch sets the optional parameter which makes the operation 18064// fail if the object's ETag matches the given value. This is useful for 18065// getting updates only after the object has changed since the last 18066// request. Use googleapi.IsNotModified to check whether the response 18067// error from Do is the result of In-None-Match. 18068func (c *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall { 18069 c.ifNoneMatch_ = entityTag 18070 return c 18071} 18072 18073// Context sets the context to be used in this call's Do method. Any 18074// pending HTTP request will be aborted if the provided context is 18075// canceled. 18076func (c *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall { 18077 c.ctx_ = ctx 18078 return c 18079} 18080 18081// Header returns an http.Header that can be modified by the caller to 18082// add HTTP headers to the request. 18083func (c *ProjectsLocationsServicesGetCall) Header() http.Header { 18084 if c.header_ == nil { 18085 c.header_ = make(http.Header) 18086 } 18087 return c.header_ 18088} 18089 18090func (c *ProjectsLocationsServicesGetCall) doRequest(alt string) (*http.Response, error) { 18091 reqHeaders := make(http.Header) 18092 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18093 for k, v := range c.header_ { 18094 reqHeaders[k] = v 18095 } 18096 reqHeaders.Set("User-Agent", c.s.userAgent()) 18097 if c.ifNoneMatch_ != "" { 18098 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18099 } 18100 var body io.Reader = nil 18101 c.urlParams_.Set("alt", alt) 18102 c.urlParams_.Set("prettyPrint", "false") 18103 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 18104 urls += "?" + c.urlParams_.Encode() 18105 req, err := http.NewRequest("GET", urls, body) 18106 if err != nil { 18107 return nil, err 18108 } 18109 req.Header = reqHeaders 18110 googleapi.Expand(req.URL, map[string]string{ 18111 "name": c.name, 18112 }) 18113 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18114} 18115 18116// Do executes the "run.projects.locations.services.get" call. 18117// Exactly one of *Service or error will be non-nil. Any non-2xx status 18118// code is an error. Response headers are in either 18119// *Service.ServerResponse.Header or (if a response was returned at all) 18120// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 18121// check whether the returned error was because http.StatusNotModified 18122// was returned. 18123func (c *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) { 18124 gensupport.SetOptions(c.urlParams_, opts...) 18125 res, err := c.doRequest("json") 18126 if res != nil && res.StatusCode == http.StatusNotModified { 18127 if res.Body != nil { 18128 res.Body.Close() 18129 } 18130 return nil, &googleapi.Error{ 18131 Code: res.StatusCode, 18132 Header: res.Header, 18133 } 18134 } 18135 if err != nil { 18136 return nil, err 18137 } 18138 defer googleapi.CloseBody(res) 18139 if err := googleapi.CheckResponse(res); err != nil { 18140 return nil, err 18141 } 18142 ret := &Service{ 18143 ServerResponse: googleapi.ServerResponse{ 18144 Header: res.Header, 18145 HTTPStatusCode: res.StatusCode, 18146 }, 18147 } 18148 target := &ret 18149 if err := gensupport.DecodeResponse(target, res); err != nil { 18150 return nil, err 18151 } 18152 return ret, nil 18153 // { 18154 // "description": "Rpc to get information about a service.", 18155 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", 18156 // "httpMethod": "GET", 18157 // "id": "run.projects.locations.services.get", 18158 // "parameterOrder": [ 18159 // "name" 18160 // ], 18161 // "parameters": { 18162 // "name": { 18163 // "description": "The name of the service being retrieved. If needed, replace {namespace_id} with the project ID.", 18164 // "location": "path", 18165 // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", 18166 // "required": true, 18167 // "type": "string" 18168 // } 18169 // }, 18170 // "path": "v1alpha1/{+name}", 18171 // "response": { 18172 // "$ref": "Service" 18173 // }, 18174 // "scopes": [ 18175 // "https://www.googleapis.com/auth/cloud-platform" 18176 // ] 18177 // } 18178 18179} 18180 18181// method id "run.projects.locations.services.getIamPolicy": 18182 18183type ProjectsLocationsServicesGetIamPolicyCall struct { 18184 s *APIService 18185 resource string 18186 urlParams_ gensupport.URLParams 18187 ifNoneMatch_ string 18188 ctx_ context.Context 18189 header_ http.Header 18190} 18191 18192// GetIamPolicy: Get the IAM Access Control policy currently in effect 18193// for the given Cloud Run service. This result does not include any 18194// inherited policies. 18195func (r *ProjectsLocationsServicesService) GetIamPolicy(resource string) *ProjectsLocationsServicesGetIamPolicyCall { 18196 c := &ProjectsLocationsServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18197 c.resource = resource 18198 return c 18199} 18200 18201// OptionsRequestedPolicyVersion sets the optional parameter 18202// "options.requestedPolicyVersion": The policy format version to be 18203// returned. Valid values are 0, 1, and 3. Requests specifying an 18204// invalid value will be rejected. Requests for policies with any 18205// conditional bindings must specify version 3. Policies without any 18206// conditional bindings may specify any valid value or leave the field 18207// unset. To learn which resources support conditions in their IAM 18208// policies, see the [IAM 18209// documentation](https://cloud.google.com/iam/help/conditions/resource-p 18210// olicies). 18211func (c *ProjectsLocationsServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServicesGetIamPolicyCall { 18212 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 18213 return c 18214} 18215 18216// Fields allows partial responses to be retrieved. See 18217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18218// for more information. 18219func (c *ProjectsLocationsServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetIamPolicyCall { 18220 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18221 return c 18222} 18223 18224// IfNoneMatch sets the optional parameter which makes the operation 18225// fail if the object's ETag matches the given value. This is useful for 18226// getting updates only after the object has changed since the last 18227// request. Use googleapi.IsNotModified to check whether the response 18228// error from Do is the result of In-None-Match. 18229func (c *ProjectsLocationsServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetIamPolicyCall { 18230 c.ifNoneMatch_ = entityTag 18231 return c 18232} 18233 18234// Context sets the context to be used in this call's Do method. Any 18235// pending HTTP request will be aborted if the provided context is 18236// canceled. 18237func (c *ProjectsLocationsServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesGetIamPolicyCall { 18238 c.ctx_ = ctx 18239 return c 18240} 18241 18242// Header returns an http.Header that can be modified by the caller to 18243// add HTTP headers to the request. 18244func (c *ProjectsLocationsServicesGetIamPolicyCall) Header() http.Header { 18245 if c.header_ == nil { 18246 c.header_ = make(http.Header) 18247 } 18248 return c.header_ 18249} 18250 18251func (c *ProjectsLocationsServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 18252 reqHeaders := make(http.Header) 18253 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18254 for k, v := range c.header_ { 18255 reqHeaders[k] = v 18256 } 18257 reqHeaders.Set("User-Agent", c.s.userAgent()) 18258 if c.ifNoneMatch_ != "" { 18259 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18260 } 18261 var body io.Reader = nil 18262 c.urlParams_.Set("alt", alt) 18263 c.urlParams_.Set("prettyPrint", "false") 18264 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:getIamPolicy") 18265 urls += "?" + c.urlParams_.Encode() 18266 req, err := http.NewRequest("GET", urls, body) 18267 if err != nil { 18268 return nil, err 18269 } 18270 req.Header = reqHeaders 18271 googleapi.Expand(req.URL, map[string]string{ 18272 "resource": c.resource, 18273 }) 18274 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18275} 18276 18277// Do executes the "run.projects.locations.services.getIamPolicy" call. 18278// Exactly one of *Policy or error will be non-nil. Any non-2xx status 18279// code is an error. Response headers are in either 18280// *Policy.ServerResponse.Header or (if a response was returned at all) 18281// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 18282// check whether the returned error was because http.StatusNotModified 18283// was returned. 18284func (c *ProjectsLocationsServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 18285 gensupport.SetOptions(c.urlParams_, opts...) 18286 res, err := c.doRequest("json") 18287 if res != nil && res.StatusCode == http.StatusNotModified { 18288 if res.Body != nil { 18289 res.Body.Close() 18290 } 18291 return nil, &googleapi.Error{ 18292 Code: res.StatusCode, 18293 Header: res.Header, 18294 } 18295 } 18296 if err != nil { 18297 return nil, err 18298 } 18299 defer googleapi.CloseBody(res) 18300 if err := googleapi.CheckResponse(res); err != nil { 18301 return nil, err 18302 } 18303 ret := &Policy{ 18304 ServerResponse: googleapi.ServerResponse{ 18305 Header: res.Header, 18306 HTTPStatusCode: res.StatusCode, 18307 }, 18308 } 18309 target := &ret 18310 if err := gensupport.DecodeResponse(target, res); err != nil { 18311 return nil, err 18312 } 18313 return ret, nil 18314 // { 18315 // "description": "Get the IAM Access Control policy currently in effect for the given Cloud Run service. This result does not include any inherited policies.", 18316 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:getIamPolicy", 18317 // "httpMethod": "GET", 18318 // "id": "run.projects.locations.services.getIamPolicy", 18319 // "parameterOrder": [ 18320 // "resource" 18321 // ], 18322 // "parameters": { 18323 // "options.requestedPolicyVersion": { 18324 // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", 18325 // "format": "int32", 18326 // "location": "query", 18327 // "type": "integer" 18328 // }, 18329 // "resource": { 18330 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 18331 // "location": "path", 18332 // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", 18333 // "required": true, 18334 // "type": "string" 18335 // } 18336 // }, 18337 // "path": "v1alpha1/{+resource}:getIamPolicy", 18338 // "response": { 18339 // "$ref": "Policy" 18340 // }, 18341 // "scopes": [ 18342 // "https://www.googleapis.com/auth/cloud-platform" 18343 // ] 18344 // } 18345 18346} 18347 18348// method id "run.projects.locations.services.list": 18349 18350type ProjectsLocationsServicesListCall struct { 18351 s *APIService 18352 parent string 18353 urlParams_ gensupport.URLParams 18354 ifNoneMatch_ string 18355 ctx_ context.Context 18356 header_ http.Header 18357} 18358 18359// List: Rpc to list services. 18360func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall { 18361 c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18362 c.parent = parent 18363 return c 18364} 18365 18366// Continue sets the optional parameter "continue": Optional encoded 18367// string to continue paging. 18368func (c *ProjectsLocationsServicesListCall) Continue(continue_ string) *ProjectsLocationsServicesListCall { 18369 c.urlParams_.Set("continue", continue_) 18370 return c 18371} 18372 18373// FieldSelector sets the optional parameter "fieldSelector": Allows to 18374// filter resources based on a specific value for a field name. Send 18375// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 18376// currently used by Cloud Run. 18377func (c *ProjectsLocationsServicesListCall) FieldSelector(fieldSelector string) *ProjectsLocationsServicesListCall { 18378 c.urlParams_.Set("fieldSelector", fieldSelector) 18379 return c 18380} 18381 18382// IncludeUninitialized sets the optional parameter 18383// "includeUninitialized": Not currently used by Cloud Run. 18384func (c *ProjectsLocationsServicesListCall) IncludeUninitialized(includeUninitialized bool) *ProjectsLocationsServicesListCall { 18385 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 18386 return c 18387} 18388 18389// LabelSelector sets the optional parameter "labelSelector": Allows to 18390// filter resources based on a label. Supported operations are =, !=, 18391// exists, in, and notIn. 18392func (c *ProjectsLocationsServicesListCall) LabelSelector(labelSelector string) *ProjectsLocationsServicesListCall { 18393 c.urlParams_.Set("labelSelector", labelSelector) 18394 return c 18395} 18396 18397// Limit sets the optional parameter "limit": The maximum number of 18398// records that should be returned. 18399func (c *ProjectsLocationsServicesListCall) Limit(limit int64) *ProjectsLocationsServicesListCall { 18400 c.urlParams_.Set("limit", fmt.Sprint(limit)) 18401 return c 18402} 18403 18404// ResourceVersion sets the optional parameter "resourceVersion": The 18405// baseline resource version from which the list or watch operation 18406// should start. Not currently used by Cloud Run. 18407func (c *ProjectsLocationsServicesListCall) ResourceVersion(resourceVersion string) *ProjectsLocationsServicesListCall { 18408 c.urlParams_.Set("resourceVersion", resourceVersion) 18409 return c 18410} 18411 18412// Watch sets the optional parameter "watch": Flag that indicates that 18413// the client expects to watch this resource as well. Not currently used 18414// by Cloud Run. 18415func (c *ProjectsLocationsServicesListCall) Watch(watch bool) *ProjectsLocationsServicesListCall { 18416 c.urlParams_.Set("watch", fmt.Sprint(watch)) 18417 return c 18418} 18419 18420// Fields allows partial responses to be retrieved. See 18421// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18422// for more information. 18423func (c *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall { 18424 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18425 return c 18426} 18427 18428// IfNoneMatch sets the optional parameter which makes the operation 18429// fail if the object's ETag matches the given value. This is useful for 18430// getting updates only after the object has changed since the last 18431// request. Use googleapi.IsNotModified to check whether the response 18432// error from Do is the result of In-None-Match. 18433func (c *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall { 18434 c.ifNoneMatch_ = entityTag 18435 return c 18436} 18437 18438// Context sets the context to be used in this call's Do method. Any 18439// pending HTTP request will be aborted if the provided context is 18440// canceled. 18441func (c *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall { 18442 c.ctx_ = ctx 18443 return c 18444} 18445 18446// Header returns an http.Header that can be modified by the caller to 18447// add HTTP headers to the request. 18448func (c *ProjectsLocationsServicesListCall) Header() http.Header { 18449 if c.header_ == nil { 18450 c.header_ = make(http.Header) 18451 } 18452 return c.header_ 18453} 18454 18455func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) { 18456 reqHeaders := make(http.Header) 18457 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18458 for k, v := range c.header_ { 18459 reqHeaders[k] = v 18460 } 18461 reqHeaders.Set("User-Agent", c.s.userAgent()) 18462 if c.ifNoneMatch_ != "" { 18463 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18464 } 18465 var body io.Reader = nil 18466 c.urlParams_.Set("alt", alt) 18467 c.urlParams_.Set("prettyPrint", "false") 18468 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/services") 18469 urls += "?" + c.urlParams_.Encode() 18470 req, err := http.NewRequest("GET", urls, body) 18471 if err != nil { 18472 return nil, err 18473 } 18474 req.Header = reqHeaders 18475 googleapi.Expand(req.URL, map[string]string{ 18476 "parent": c.parent, 18477 }) 18478 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18479} 18480 18481// Do executes the "run.projects.locations.services.list" call. 18482// Exactly one of *ListServicesResponse or error will be non-nil. Any 18483// non-2xx status code is an error. Response headers are in either 18484// *ListServicesResponse.ServerResponse.Header or (if a response was 18485// returned at all) in error.(*googleapi.Error).Header. Use 18486// googleapi.IsNotModified to check whether the returned error was 18487// because http.StatusNotModified was returned. 18488func (c *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) { 18489 gensupport.SetOptions(c.urlParams_, opts...) 18490 res, err := c.doRequest("json") 18491 if res != nil && res.StatusCode == http.StatusNotModified { 18492 if res.Body != nil { 18493 res.Body.Close() 18494 } 18495 return nil, &googleapi.Error{ 18496 Code: res.StatusCode, 18497 Header: res.Header, 18498 } 18499 } 18500 if err != nil { 18501 return nil, err 18502 } 18503 defer googleapi.CloseBody(res) 18504 if err := googleapi.CheckResponse(res); err != nil { 18505 return nil, err 18506 } 18507 ret := &ListServicesResponse{ 18508 ServerResponse: googleapi.ServerResponse{ 18509 Header: res.Header, 18510 HTTPStatusCode: res.StatusCode, 18511 }, 18512 } 18513 target := &ret 18514 if err := gensupport.DecodeResponse(target, res); err != nil { 18515 return nil, err 18516 } 18517 return ret, nil 18518 // { 18519 // "description": "Rpc to list services.", 18520 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/services", 18521 // "httpMethod": "GET", 18522 // "id": "run.projects.locations.services.list", 18523 // "parameterOrder": [ 18524 // "parent" 18525 // ], 18526 // "parameters": { 18527 // "continue": { 18528 // "description": "Optional encoded string to continue paging.", 18529 // "location": "query", 18530 // "type": "string" 18531 // }, 18532 // "fieldSelector": { 18533 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 18534 // "location": "query", 18535 // "type": "string" 18536 // }, 18537 // "includeUninitialized": { 18538 // "description": "Not currently used by Cloud Run.", 18539 // "location": "query", 18540 // "type": "boolean" 18541 // }, 18542 // "labelSelector": { 18543 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 18544 // "location": "query", 18545 // "type": "string" 18546 // }, 18547 // "limit": { 18548 // "description": "The maximum number of records that should be returned.", 18549 // "format": "int32", 18550 // "location": "query", 18551 // "type": "integer" 18552 // }, 18553 // "parent": { 18554 // "description": "The project ID or project number from which the services should be listed.", 18555 // "location": "path", 18556 // "pattern": "^projects/[^/]+/locations/[^/]+$", 18557 // "required": true, 18558 // "type": "string" 18559 // }, 18560 // "resourceVersion": { 18561 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 18562 // "location": "query", 18563 // "type": "string" 18564 // }, 18565 // "watch": { 18566 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 18567 // "location": "query", 18568 // "type": "boolean" 18569 // } 18570 // }, 18571 // "path": "v1alpha1/{+parent}/services", 18572 // "response": { 18573 // "$ref": "ListServicesResponse" 18574 // }, 18575 // "scopes": [ 18576 // "https://www.googleapis.com/auth/cloud-platform" 18577 // ] 18578 // } 18579 18580} 18581 18582// method id "run.projects.locations.services.replaceService": 18583 18584type ProjectsLocationsServicesReplaceServiceCall struct { 18585 s *APIService 18586 name string 18587 service *Service 18588 urlParams_ gensupport.URLParams 18589 ctx_ context.Context 18590 header_ http.Header 18591} 18592 18593// ReplaceService: Rpc to replace a service. Only the spec and metadata 18594// labels and annotations are modifiable. After the Update request, 18595// Cloud Run will work to make the 'status' match the requested 'spec'. 18596// May provide metadata.resourceVersion to enforce update from last read 18597// for optimistic concurrency control. 18598func (r *ProjectsLocationsServicesService) ReplaceService(name string, service *Service) *ProjectsLocationsServicesReplaceServiceCall { 18599 c := &ProjectsLocationsServicesReplaceServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18600 c.name = name 18601 c.service = service 18602 return c 18603} 18604 18605// Fields allows partial responses to be retrieved. See 18606// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18607// for more information. 18608func (c *ProjectsLocationsServicesReplaceServiceCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesReplaceServiceCall { 18609 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18610 return c 18611} 18612 18613// Context sets the context to be used in this call's Do method. Any 18614// pending HTTP request will be aborted if the provided context is 18615// canceled. 18616func (c *ProjectsLocationsServicesReplaceServiceCall) Context(ctx context.Context) *ProjectsLocationsServicesReplaceServiceCall { 18617 c.ctx_ = ctx 18618 return c 18619} 18620 18621// Header returns an http.Header that can be modified by the caller to 18622// add HTTP headers to the request. 18623func (c *ProjectsLocationsServicesReplaceServiceCall) Header() http.Header { 18624 if c.header_ == nil { 18625 c.header_ = make(http.Header) 18626 } 18627 return c.header_ 18628} 18629 18630func (c *ProjectsLocationsServicesReplaceServiceCall) doRequest(alt string) (*http.Response, error) { 18631 reqHeaders := make(http.Header) 18632 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18633 for k, v := range c.header_ { 18634 reqHeaders[k] = v 18635 } 18636 reqHeaders.Set("User-Agent", c.s.userAgent()) 18637 var body io.Reader = nil 18638 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) 18639 if err != nil { 18640 return nil, err 18641 } 18642 reqHeaders.Set("Content-Type", "application/json") 18643 c.urlParams_.Set("alt", alt) 18644 c.urlParams_.Set("prettyPrint", "false") 18645 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 18646 urls += "?" + c.urlParams_.Encode() 18647 req, err := http.NewRequest("PUT", urls, body) 18648 if err != nil { 18649 return nil, err 18650 } 18651 req.Header = reqHeaders 18652 googleapi.Expand(req.URL, map[string]string{ 18653 "name": c.name, 18654 }) 18655 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18656} 18657 18658// Do executes the "run.projects.locations.services.replaceService" call. 18659// Exactly one of *Service or error will be non-nil. Any non-2xx status 18660// code is an error. Response headers are in either 18661// *Service.ServerResponse.Header or (if a response was returned at all) 18662// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 18663// check whether the returned error was because http.StatusNotModified 18664// was returned. 18665func (c *ProjectsLocationsServicesReplaceServiceCall) Do(opts ...googleapi.CallOption) (*Service, error) { 18666 gensupport.SetOptions(c.urlParams_, opts...) 18667 res, err := c.doRequest("json") 18668 if res != nil && res.StatusCode == http.StatusNotModified { 18669 if res.Body != nil { 18670 res.Body.Close() 18671 } 18672 return nil, &googleapi.Error{ 18673 Code: res.StatusCode, 18674 Header: res.Header, 18675 } 18676 } 18677 if err != nil { 18678 return nil, err 18679 } 18680 defer googleapi.CloseBody(res) 18681 if err := googleapi.CheckResponse(res); err != nil { 18682 return nil, err 18683 } 18684 ret := &Service{ 18685 ServerResponse: googleapi.ServerResponse{ 18686 Header: res.Header, 18687 HTTPStatusCode: res.StatusCode, 18688 }, 18689 } 18690 target := &ret 18691 if err := gensupport.DecodeResponse(target, res); err != nil { 18692 return nil, err 18693 } 18694 return ret, nil 18695 // { 18696 // "description": "Rpc to replace a service. Only the spec and metadata labels and annotations are modifiable. After the Update request, Cloud Run will work to make the 'status' match the requested 'spec'. May provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.", 18697 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", 18698 // "httpMethod": "PUT", 18699 // "id": "run.projects.locations.services.replaceService", 18700 // "parameterOrder": [ 18701 // "name" 18702 // ], 18703 // "parameters": { 18704 // "name": { 18705 // "description": "The name of the service being replaced. If needed, replace {namespace_id} with the project ID.", 18706 // "location": "path", 18707 // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", 18708 // "required": true, 18709 // "type": "string" 18710 // } 18711 // }, 18712 // "path": "v1alpha1/{+name}", 18713 // "request": { 18714 // "$ref": "Service" 18715 // }, 18716 // "response": { 18717 // "$ref": "Service" 18718 // }, 18719 // "scopes": [ 18720 // "https://www.googleapis.com/auth/cloud-platform" 18721 // ] 18722 // } 18723 18724} 18725 18726// method id "run.projects.locations.services.setIamPolicy": 18727 18728type ProjectsLocationsServicesSetIamPolicyCall struct { 18729 s *APIService 18730 resource string 18731 setiampolicyrequest *SetIamPolicyRequest 18732 urlParams_ gensupport.URLParams 18733 ctx_ context.Context 18734 header_ http.Header 18735} 18736 18737// SetIamPolicy: Sets the IAM Access control policy for the specified 18738// Service. Overwrites any existing policy. 18739func (r *ProjectsLocationsServicesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServicesSetIamPolicyCall { 18740 c := &ProjectsLocationsServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18741 c.resource = resource 18742 c.setiampolicyrequest = setiampolicyrequest 18743 return c 18744} 18745 18746// Fields allows partial responses to be retrieved. See 18747// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18748// for more information. 18749func (c *ProjectsLocationsServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesSetIamPolicyCall { 18750 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18751 return c 18752} 18753 18754// Context sets the context to be used in this call's Do method. Any 18755// pending HTTP request will be aborted if the provided context is 18756// canceled. 18757func (c *ProjectsLocationsServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesSetIamPolicyCall { 18758 c.ctx_ = ctx 18759 return c 18760} 18761 18762// Header returns an http.Header that can be modified by the caller to 18763// add HTTP headers to the request. 18764func (c *ProjectsLocationsServicesSetIamPolicyCall) Header() http.Header { 18765 if c.header_ == nil { 18766 c.header_ = make(http.Header) 18767 } 18768 return c.header_ 18769} 18770 18771func (c *ProjectsLocationsServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 18772 reqHeaders := make(http.Header) 18773 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18774 for k, v := range c.header_ { 18775 reqHeaders[k] = v 18776 } 18777 reqHeaders.Set("User-Agent", c.s.userAgent()) 18778 var body io.Reader = nil 18779 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 18780 if err != nil { 18781 return nil, err 18782 } 18783 reqHeaders.Set("Content-Type", "application/json") 18784 c.urlParams_.Set("alt", alt) 18785 c.urlParams_.Set("prettyPrint", "false") 18786 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:setIamPolicy") 18787 urls += "?" + c.urlParams_.Encode() 18788 req, err := http.NewRequest("POST", urls, body) 18789 if err != nil { 18790 return nil, err 18791 } 18792 req.Header = reqHeaders 18793 googleapi.Expand(req.URL, map[string]string{ 18794 "resource": c.resource, 18795 }) 18796 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18797} 18798 18799// Do executes the "run.projects.locations.services.setIamPolicy" call. 18800// Exactly one of *Policy or error will be non-nil. Any non-2xx status 18801// code is an error. Response headers are in either 18802// *Policy.ServerResponse.Header or (if a response was returned at all) 18803// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 18804// check whether the returned error was because http.StatusNotModified 18805// was returned. 18806func (c *ProjectsLocationsServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 18807 gensupport.SetOptions(c.urlParams_, opts...) 18808 res, err := c.doRequest("json") 18809 if res != nil && res.StatusCode == http.StatusNotModified { 18810 if res.Body != nil { 18811 res.Body.Close() 18812 } 18813 return nil, &googleapi.Error{ 18814 Code: res.StatusCode, 18815 Header: res.Header, 18816 } 18817 } 18818 if err != nil { 18819 return nil, err 18820 } 18821 defer googleapi.CloseBody(res) 18822 if err := googleapi.CheckResponse(res); err != nil { 18823 return nil, err 18824 } 18825 ret := &Policy{ 18826 ServerResponse: googleapi.ServerResponse{ 18827 Header: res.Header, 18828 HTTPStatusCode: res.StatusCode, 18829 }, 18830 } 18831 target := &ret 18832 if err := gensupport.DecodeResponse(target, res); err != nil { 18833 return nil, err 18834 } 18835 return ret, nil 18836 // { 18837 // "description": "Sets the IAM Access control policy for the specified Service. Overwrites any existing policy.", 18838 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:setIamPolicy", 18839 // "httpMethod": "POST", 18840 // "id": "run.projects.locations.services.setIamPolicy", 18841 // "parameterOrder": [ 18842 // "resource" 18843 // ], 18844 // "parameters": { 18845 // "resource": { 18846 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 18847 // "location": "path", 18848 // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", 18849 // "required": true, 18850 // "type": "string" 18851 // } 18852 // }, 18853 // "path": "v1alpha1/{+resource}:setIamPolicy", 18854 // "request": { 18855 // "$ref": "SetIamPolicyRequest" 18856 // }, 18857 // "response": { 18858 // "$ref": "Policy" 18859 // }, 18860 // "scopes": [ 18861 // "https://www.googleapis.com/auth/cloud-platform" 18862 // ] 18863 // } 18864 18865} 18866 18867// method id "run.projects.locations.services.testIamPermissions": 18868 18869type ProjectsLocationsServicesTestIamPermissionsCall struct { 18870 s *APIService 18871 resource string 18872 testiampermissionsrequest *TestIamPermissionsRequest 18873 urlParams_ gensupport.URLParams 18874 ctx_ context.Context 18875 header_ http.Header 18876} 18877 18878// TestIamPermissions: Returns permissions that a caller has on the 18879// specified Project. There are no permissions required for making this 18880// API call. 18881func (r *ProjectsLocationsServicesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServicesTestIamPermissionsCall { 18882 c := &ProjectsLocationsServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18883 c.resource = resource 18884 c.testiampermissionsrequest = testiampermissionsrequest 18885 return c 18886} 18887 18888// Fields allows partial responses to be retrieved. See 18889// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18890// for more information. 18891func (c *ProjectsLocationsServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesTestIamPermissionsCall { 18892 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18893 return c 18894} 18895 18896// Context sets the context to be used in this call's Do method. Any 18897// pending HTTP request will be aborted if the provided context is 18898// canceled. 18899func (c *ProjectsLocationsServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServicesTestIamPermissionsCall { 18900 c.ctx_ = ctx 18901 return c 18902} 18903 18904// Header returns an http.Header that can be modified by the caller to 18905// add HTTP headers to the request. 18906func (c *ProjectsLocationsServicesTestIamPermissionsCall) Header() http.Header { 18907 if c.header_ == nil { 18908 c.header_ = make(http.Header) 18909 } 18910 return c.header_ 18911} 18912 18913func (c *ProjectsLocationsServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 18914 reqHeaders := make(http.Header) 18915 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18916 for k, v := range c.header_ { 18917 reqHeaders[k] = v 18918 } 18919 reqHeaders.Set("User-Agent", c.s.userAgent()) 18920 var body io.Reader = nil 18921 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 18922 if err != nil { 18923 return nil, err 18924 } 18925 reqHeaders.Set("Content-Type", "application/json") 18926 c.urlParams_.Set("alt", alt) 18927 c.urlParams_.Set("prettyPrint", "false") 18928 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:testIamPermissions") 18929 urls += "?" + c.urlParams_.Encode() 18930 req, err := http.NewRequest("POST", urls, body) 18931 if err != nil { 18932 return nil, err 18933 } 18934 req.Header = reqHeaders 18935 googleapi.Expand(req.URL, map[string]string{ 18936 "resource": c.resource, 18937 }) 18938 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18939} 18940 18941// Do executes the "run.projects.locations.services.testIamPermissions" call. 18942// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 18943// Any non-2xx status code is an error. Response headers are in either 18944// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 18945// was returned at all) in error.(*googleapi.Error).Header. Use 18946// googleapi.IsNotModified to check whether the returned error was 18947// because http.StatusNotModified was returned. 18948func (c *ProjectsLocationsServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 18949 gensupport.SetOptions(c.urlParams_, opts...) 18950 res, err := c.doRequest("json") 18951 if res != nil && res.StatusCode == http.StatusNotModified { 18952 if res.Body != nil { 18953 res.Body.Close() 18954 } 18955 return nil, &googleapi.Error{ 18956 Code: res.StatusCode, 18957 Header: res.Header, 18958 } 18959 } 18960 if err != nil { 18961 return nil, err 18962 } 18963 defer googleapi.CloseBody(res) 18964 if err := googleapi.CheckResponse(res); err != nil { 18965 return nil, err 18966 } 18967 ret := &TestIamPermissionsResponse{ 18968 ServerResponse: googleapi.ServerResponse{ 18969 Header: res.Header, 18970 HTTPStatusCode: res.StatusCode, 18971 }, 18972 } 18973 target := &ret 18974 if err := gensupport.DecodeResponse(target, res); err != nil { 18975 return nil, err 18976 } 18977 return ret, nil 18978 // { 18979 // "description": "Returns permissions that a caller has on the specified Project. There are no permissions required for making this API call.", 18980 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:testIamPermissions", 18981 // "httpMethod": "POST", 18982 // "id": "run.projects.locations.services.testIamPermissions", 18983 // "parameterOrder": [ 18984 // "resource" 18985 // ], 18986 // "parameters": { 18987 // "resource": { 18988 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 18989 // "location": "path", 18990 // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", 18991 // "required": true, 18992 // "type": "string" 18993 // } 18994 // }, 18995 // "path": "v1alpha1/{+resource}:testIamPermissions", 18996 // "request": { 18997 // "$ref": "TestIamPermissionsRequest" 18998 // }, 18999 // "response": { 19000 // "$ref": "TestIamPermissionsResponse" 19001 // }, 19002 // "scopes": [ 19003 // "https://www.googleapis.com/auth/cloud-platform" 19004 // ] 19005 // } 19006 19007} 19008 19009// method id "run.projects.locations.triggers.create": 19010 19011type ProjectsLocationsTriggersCreateCall struct { 19012 s *APIService 19013 parent string 19014 trigger *Trigger 19015 urlParams_ gensupport.URLParams 19016 ctx_ context.Context 19017 header_ http.Header 19018} 19019 19020// Create: Creates a new trigger. 19021func (r *ProjectsLocationsTriggersService) Create(parent string, trigger *Trigger) *ProjectsLocationsTriggersCreateCall { 19022 c := &ProjectsLocationsTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19023 c.parent = parent 19024 c.trigger = trigger 19025 return c 19026} 19027 19028// Fields allows partial responses to be retrieved. See 19029// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19030// for more information. 19031func (c *ProjectsLocationsTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersCreateCall { 19032 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19033 return c 19034} 19035 19036// Context sets the context to be used in this call's Do method. Any 19037// pending HTTP request will be aborted if the provided context is 19038// canceled. 19039func (c *ProjectsLocationsTriggersCreateCall) Context(ctx context.Context) *ProjectsLocationsTriggersCreateCall { 19040 c.ctx_ = ctx 19041 return c 19042} 19043 19044// Header returns an http.Header that can be modified by the caller to 19045// add HTTP headers to the request. 19046func (c *ProjectsLocationsTriggersCreateCall) Header() http.Header { 19047 if c.header_ == nil { 19048 c.header_ = make(http.Header) 19049 } 19050 return c.header_ 19051} 19052 19053func (c *ProjectsLocationsTriggersCreateCall) doRequest(alt string) (*http.Response, error) { 19054 reqHeaders := make(http.Header) 19055 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 19056 for k, v := range c.header_ { 19057 reqHeaders[k] = v 19058 } 19059 reqHeaders.Set("User-Agent", c.s.userAgent()) 19060 var body io.Reader = nil 19061 body, err := googleapi.WithoutDataWrapper.JSONReader(c.trigger) 19062 if err != nil { 19063 return nil, err 19064 } 19065 reqHeaders.Set("Content-Type", "application/json") 19066 c.urlParams_.Set("alt", alt) 19067 c.urlParams_.Set("prettyPrint", "false") 19068 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/triggers") 19069 urls += "?" + c.urlParams_.Encode() 19070 req, err := http.NewRequest("POST", urls, body) 19071 if err != nil { 19072 return nil, err 19073 } 19074 req.Header = reqHeaders 19075 googleapi.Expand(req.URL, map[string]string{ 19076 "parent": c.parent, 19077 }) 19078 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19079} 19080 19081// Do executes the "run.projects.locations.triggers.create" call. 19082// Exactly one of *Trigger or error will be non-nil. Any non-2xx status 19083// code is an error. Response headers are in either 19084// *Trigger.ServerResponse.Header or (if a response was returned at all) 19085// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 19086// check whether the returned error was because http.StatusNotModified 19087// was returned. 19088func (c *ProjectsLocationsTriggersCreateCall) Do(opts ...googleapi.CallOption) (*Trigger, error) { 19089 gensupport.SetOptions(c.urlParams_, opts...) 19090 res, err := c.doRequest("json") 19091 if res != nil && res.StatusCode == http.StatusNotModified { 19092 if res.Body != nil { 19093 res.Body.Close() 19094 } 19095 return nil, &googleapi.Error{ 19096 Code: res.StatusCode, 19097 Header: res.Header, 19098 } 19099 } 19100 if err != nil { 19101 return nil, err 19102 } 19103 defer googleapi.CloseBody(res) 19104 if err := googleapi.CheckResponse(res); err != nil { 19105 return nil, err 19106 } 19107 ret := &Trigger{ 19108 ServerResponse: googleapi.ServerResponse{ 19109 Header: res.Header, 19110 HTTPStatusCode: res.StatusCode, 19111 }, 19112 } 19113 target := &ret 19114 if err := gensupport.DecodeResponse(target, res); err != nil { 19115 return nil, err 19116 } 19117 return ret, nil 19118 // { 19119 // "description": "Creates a new trigger.", 19120 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/triggers", 19121 // "httpMethod": "POST", 19122 // "id": "run.projects.locations.triggers.create", 19123 // "parameterOrder": [ 19124 // "parent" 19125 // ], 19126 // "parameters": { 19127 // "parent": { 19128 // "description": "The project ID or project number in which this trigger should be created.", 19129 // "location": "path", 19130 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19131 // "required": true, 19132 // "type": "string" 19133 // } 19134 // }, 19135 // "path": "v1alpha1/{+parent}/triggers", 19136 // "request": { 19137 // "$ref": "Trigger" 19138 // }, 19139 // "response": { 19140 // "$ref": "Trigger" 19141 // }, 19142 // "scopes": [ 19143 // "https://www.googleapis.com/auth/cloud-platform" 19144 // ] 19145 // } 19146 19147} 19148 19149// method id "run.projects.locations.triggers.delete": 19150 19151type ProjectsLocationsTriggersDeleteCall struct { 19152 s *APIService 19153 name string 19154 urlParams_ gensupport.URLParams 19155 ctx_ context.Context 19156 header_ http.Header 19157} 19158 19159// Delete: Rpc to delete a trigger. 19160func (r *ProjectsLocationsTriggersService) Delete(name string) *ProjectsLocationsTriggersDeleteCall { 19161 c := &ProjectsLocationsTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19162 c.name = name 19163 return c 19164} 19165 19166// ApiVersion sets the optional parameter "apiVersion": Cloud Run 19167// currently ignores this parameter. 19168func (c *ProjectsLocationsTriggersDeleteCall) ApiVersion(apiVersion string) *ProjectsLocationsTriggersDeleteCall { 19169 c.urlParams_.Set("apiVersion", apiVersion) 19170 return c 19171} 19172 19173// Kind sets the optional parameter "kind": Cloud Run currently ignores 19174// this parameter. 19175func (c *ProjectsLocationsTriggersDeleteCall) Kind(kind string) *ProjectsLocationsTriggersDeleteCall { 19176 c.urlParams_.Set("kind", kind) 19177 return c 19178} 19179 19180// PropagationPolicy sets the optional parameter "propagationPolicy": 19181// Specifies the propagation policy of delete. Cloud Run currently 19182// ignores this setting, and deletes in the background. Please see 19183// kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 19184// for more information. 19185func (c *ProjectsLocationsTriggersDeleteCall) PropagationPolicy(propagationPolicy string) *ProjectsLocationsTriggersDeleteCall { 19186 c.urlParams_.Set("propagationPolicy", propagationPolicy) 19187 return c 19188} 19189 19190// Fields allows partial responses to be retrieved. See 19191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19192// for more information. 19193func (c *ProjectsLocationsTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersDeleteCall { 19194 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19195 return c 19196} 19197 19198// Context sets the context to be used in this call's Do method. Any 19199// pending HTTP request will be aborted if the provided context is 19200// canceled. 19201func (c *ProjectsLocationsTriggersDeleteCall) Context(ctx context.Context) *ProjectsLocationsTriggersDeleteCall { 19202 c.ctx_ = ctx 19203 return c 19204} 19205 19206// Header returns an http.Header that can be modified by the caller to 19207// add HTTP headers to the request. 19208func (c *ProjectsLocationsTriggersDeleteCall) Header() http.Header { 19209 if c.header_ == nil { 19210 c.header_ = make(http.Header) 19211 } 19212 return c.header_ 19213} 19214 19215func (c *ProjectsLocationsTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { 19216 reqHeaders := make(http.Header) 19217 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 19218 for k, v := range c.header_ { 19219 reqHeaders[k] = v 19220 } 19221 reqHeaders.Set("User-Agent", c.s.userAgent()) 19222 var body io.Reader = nil 19223 c.urlParams_.Set("alt", alt) 19224 c.urlParams_.Set("prettyPrint", "false") 19225 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 19226 urls += "?" + c.urlParams_.Encode() 19227 req, err := http.NewRequest("DELETE", urls, body) 19228 if err != nil { 19229 return nil, err 19230 } 19231 req.Header = reqHeaders 19232 googleapi.Expand(req.URL, map[string]string{ 19233 "name": c.name, 19234 }) 19235 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19236} 19237 19238// Do executes the "run.projects.locations.triggers.delete" call. 19239// Exactly one of *Empty or error will be non-nil. Any non-2xx status 19240// code is an error. Response headers are in either 19241// *Empty.ServerResponse.Header or (if a response was returned at all) 19242// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 19243// check whether the returned error was because http.StatusNotModified 19244// was returned. 19245func (c *ProjectsLocationsTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 19246 gensupport.SetOptions(c.urlParams_, opts...) 19247 res, err := c.doRequest("json") 19248 if res != nil && res.StatusCode == http.StatusNotModified { 19249 if res.Body != nil { 19250 res.Body.Close() 19251 } 19252 return nil, &googleapi.Error{ 19253 Code: res.StatusCode, 19254 Header: res.Header, 19255 } 19256 } 19257 if err != nil { 19258 return nil, err 19259 } 19260 defer googleapi.CloseBody(res) 19261 if err := googleapi.CheckResponse(res); err != nil { 19262 return nil, err 19263 } 19264 ret := &Empty{ 19265 ServerResponse: googleapi.ServerResponse{ 19266 Header: res.Header, 19267 HTTPStatusCode: res.StatusCode, 19268 }, 19269 } 19270 target := &ret 19271 if err := gensupport.DecodeResponse(target, res); err != nil { 19272 return nil, err 19273 } 19274 return ret, nil 19275 // { 19276 // "description": "Rpc to delete a trigger.", 19277 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}", 19278 // "httpMethod": "DELETE", 19279 // "id": "run.projects.locations.triggers.delete", 19280 // "parameterOrder": [ 19281 // "name" 19282 // ], 19283 // "parameters": { 19284 // "apiVersion": { 19285 // "description": "Cloud Run currently ignores this parameter.", 19286 // "location": "query", 19287 // "type": "string" 19288 // }, 19289 // "kind": { 19290 // "description": "Cloud Run currently ignores this parameter.", 19291 // "location": "query", 19292 // "type": "string" 19293 // }, 19294 // "name": { 19295 // "description": "The name of the trigger being deleted. If needed, replace {namespace_id} with the project ID.", 19296 // "location": "path", 19297 // "pattern": "^projects/[^/]+/locations/[^/]+/triggers/[^/]+$", 19298 // "required": true, 19299 // "type": "string" 19300 // }, 19301 // "propagationPolicy": { 19302 // "description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", 19303 // "location": "query", 19304 // "type": "string" 19305 // } 19306 // }, 19307 // "path": "v1alpha1/{+name}", 19308 // "response": { 19309 // "$ref": "Empty" 19310 // }, 19311 // "scopes": [ 19312 // "https://www.googleapis.com/auth/cloud-platform" 19313 // ] 19314 // } 19315 19316} 19317 19318// method id "run.projects.locations.triggers.get": 19319 19320type ProjectsLocationsTriggersGetCall struct { 19321 s *APIService 19322 name string 19323 urlParams_ gensupport.URLParams 19324 ifNoneMatch_ string 19325 ctx_ context.Context 19326 header_ http.Header 19327} 19328 19329// Get: Rpc to get information about a trigger. 19330func (r *ProjectsLocationsTriggersService) Get(name string) *ProjectsLocationsTriggersGetCall { 19331 c := &ProjectsLocationsTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19332 c.name = name 19333 return c 19334} 19335 19336// Fields allows partial responses to be retrieved. See 19337// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19338// for more information. 19339func (c *ProjectsLocationsTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersGetCall { 19340 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19341 return c 19342} 19343 19344// IfNoneMatch sets the optional parameter which makes the operation 19345// fail if the object's ETag matches the given value. This is useful for 19346// getting updates only after the object has changed since the last 19347// request. Use googleapi.IsNotModified to check whether the response 19348// error from Do is the result of In-None-Match. 19349func (c *ProjectsLocationsTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTriggersGetCall { 19350 c.ifNoneMatch_ = entityTag 19351 return c 19352} 19353 19354// Context sets the context to be used in this call's Do method. Any 19355// pending HTTP request will be aborted if the provided context is 19356// canceled. 19357func (c *ProjectsLocationsTriggersGetCall) Context(ctx context.Context) *ProjectsLocationsTriggersGetCall { 19358 c.ctx_ = ctx 19359 return c 19360} 19361 19362// Header returns an http.Header that can be modified by the caller to 19363// add HTTP headers to the request. 19364func (c *ProjectsLocationsTriggersGetCall) Header() http.Header { 19365 if c.header_ == nil { 19366 c.header_ = make(http.Header) 19367 } 19368 return c.header_ 19369} 19370 19371func (c *ProjectsLocationsTriggersGetCall) doRequest(alt string) (*http.Response, error) { 19372 reqHeaders := make(http.Header) 19373 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 19374 for k, v := range c.header_ { 19375 reqHeaders[k] = v 19376 } 19377 reqHeaders.Set("User-Agent", c.s.userAgent()) 19378 if c.ifNoneMatch_ != "" { 19379 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19380 } 19381 var body io.Reader = nil 19382 c.urlParams_.Set("alt", alt) 19383 c.urlParams_.Set("prettyPrint", "false") 19384 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 19385 urls += "?" + c.urlParams_.Encode() 19386 req, err := http.NewRequest("GET", urls, body) 19387 if err != nil { 19388 return nil, err 19389 } 19390 req.Header = reqHeaders 19391 googleapi.Expand(req.URL, map[string]string{ 19392 "name": c.name, 19393 }) 19394 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19395} 19396 19397// Do executes the "run.projects.locations.triggers.get" call. 19398// Exactly one of *Trigger or error will be non-nil. Any non-2xx status 19399// code is an error. Response headers are in either 19400// *Trigger.ServerResponse.Header or (if a response was returned at all) 19401// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 19402// check whether the returned error was because http.StatusNotModified 19403// was returned. 19404func (c *ProjectsLocationsTriggersGetCall) Do(opts ...googleapi.CallOption) (*Trigger, error) { 19405 gensupport.SetOptions(c.urlParams_, opts...) 19406 res, err := c.doRequest("json") 19407 if res != nil && res.StatusCode == http.StatusNotModified { 19408 if res.Body != nil { 19409 res.Body.Close() 19410 } 19411 return nil, &googleapi.Error{ 19412 Code: res.StatusCode, 19413 Header: res.Header, 19414 } 19415 } 19416 if err != nil { 19417 return nil, err 19418 } 19419 defer googleapi.CloseBody(res) 19420 if err := googleapi.CheckResponse(res); err != nil { 19421 return nil, err 19422 } 19423 ret := &Trigger{ 19424 ServerResponse: googleapi.ServerResponse{ 19425 Header: res.Header, 19426 HTTPStatusCode: res.StatusCode, 19427 }, 19428 } 19429 target := &ret 19430 if err := gensupport.DecodeResponse(target, res); err != nil { 19431 return nil, err 19432 } 19433 return ret, nil 19434 // { 19435 // "description": "Rpc to get information about a trigger.", 19436 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}", 19437 // "httpMethod": "GET", 19438 // "id": "run.projects.locations.triggers.get", 19439 // "parameterOrder": [ 19440 // "name" 19441 // ], 19442 // "parameters": { 19443 // "name": { 19444 // "description": "The name of the trigger being retrieved. If needed, replace {namespace_id} with the project ID.", 19445 // "location": "path", 19446 // "pattern": "^projects/[^/]+/locations/[^/]+/triggers/[^/]+$", 19447 // "required": true, 19448 // "type": "string" 19449 // } 19450 // }, 19451 // "path": "v1alpha1/{+name}", 19452 // "response": { 19453 // "$ref": "Trigger" 19454 // }, 19455 // "scopes": [ 19456 // "https://www.googleapis.com/auth/cloud-platform" 19457 // ] 19458 // } 19459 19460} 19461 19462// method id "run.projects.locations.triggers.list": 19463 19464type ProjectsLocationsTriggersListCall struct { 19465 s *APIService 19466 parent string 19467 urlParams_ gensupport.URLParams 19468 ifNoneMatch_ string 19469 ctx_ context.Context 19470 header_ http.Header 19471} 19472 19473// List: Rpc to list triggers. 19474func (r *ProjectsLocationsTriggersService) List(parent string) *ProjectsLocationsTriggersListCall { 19475 c := &ProjectsLocationsTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19476 c.parent = parent 19477 return c 19478} 19479 19480// Continue sets the optional parameter "continue": Encoded string to 19481// continue paging. 19482func (c *ProjectsLocationsTriggersListCall) Continue(continue_ string) *ProjectsLocationsTriggersListCall { 19483 c.urlParams_.Set("continue", continue_) 19484 return c 19485} 19486 19487// FieldSelector sets the optional parameter "fieldSelector": Allows to 19488// filter resources based on a specific value for a field name. Send 19489// this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 19490// currently used by Cloud Run. 19491func (c *ProjectsLocationsTriggersListCall) FieldSelector(fieldSelector string) *ProjectsLocationsTriggersListCall { 19492 c.urlParams_.Set("fieldSelector", fieldSelector) 19493 return c 19494} 19495 19496// IncludeUninitialized sets the optional parameter 19497// "includeUninitialized": Not currently used by Cloud Run. 19498func (c *ProjectsLocationsTriggersListCall) IncludeUninitialized(includeUninitialized bool) *ProjectsLocationsTriggersListCall { 19499 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 19500 return c 19501} 19502 19503// LabelSelector sets the optional parameter "labelSelector": Allows to 19504// filter resources based on a label. Supported operations are =, !=, 19505// exists, in, and notIn. 19506func (c *ProjectsLocationsTriggersListCall) LabelSelector(labelSelector string) *ProjectsLocationsTriggersListCall { 19507 c.urlParams_.Set("labelSelector", labelSelector) 19508 return c 19509} 19510 19511// Limit sets the optional parameter "limit": The maximum number of 19512// records that should be returned. 19513func (c *ProjectsLocationsTriggersListCall) Limit(limit int64) *ProjectsLocationsTriggersListCall { 19514 c.urlParams_.Set("limit", fmt.Sprint(limit)) 19515 return c 19516} 19517 19518// ResourceVersion sets the optional parameter "resourceVersion": The 19519// baseline resource version from which the list or watch operation 19520// should start. Not currently used by Cloud Run. 19521func (c *ProjectsLocationsTriggersListCall) ResourceVersion(resourceVersion string) *ProjectsLocationsTriggersListCall { 19522 c.urlParams_.Set("resourceVersion", resourceVersion) 19523 return c 19524} 19525 19526// Watch sets the optional parameter "watch": Flag that indicates that 19527// the client expects to watch this resource as well. Not currently used 19528// by Cloud Run. 19529func (c *ProjectsLocationsTriggersListCall) Watch(watch bool) *ProjectsLocationsTriggersListCall { 19530 c.urlParams_.Set("watch", fmt.Sprint(watch)) 19531 return c 19532} 19533 19534// Fields allows partial responses to be retrieved. See 19535// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19536// for more information. 19537func (c *ProjectsLocationsTriggersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersListCall { 19538 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19539 return c 19540} 19541 19542// IfNoneMatch sets the optional parameter which makes the operation 19543// fail if the object's ETag matches the given value. This is useful for 19544// getting updates only after the object has changed since the last 19545// request. Use googleapi.IsNotModified to check whether the response 19546// error from Do is the result of In-None-Match. 19547func (c *ProjectsLocationsTriggersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTriggersListCall { 19548 c.ifNoneMatch_ = entityTag 19549 return c 19550} 19551 19552// Context sets the context to be used in this call's Do method. Any 19553// pending HTTP request will be aborted if the provided context is 19554// canceled. 19555func (c *ProjectsLocationsTriggersListCall) Context(ctx context.Context) *ProjectsLocationsTriggersListCall { 19556 c.ctx_ = ctx 19557 return c 19558} 19559 19560// Header returns an http.Header that can be modified by the caller to 19561// add HTTP headers to the request. 19562func (c *ProjectsLocationsTriggersListCall) Header() http.Header { 19563 if c.header_ == nil { 19564 c.header_ = make(http.Header) 19565 } 19566 return c.header_ 19567} 19568 19569func (c *ProjectsLocationsTriggersListCall) doRequest(alt string) (*http.Response, error) { 19570 reqHeaders := make(http.Header) 19571 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 19572 for k, v := range c.header_ { 19573 reqHeaders[k] = v 19574 } 19575 reqHeaders.Set("User-Agent", c.s.userAgent()) 19576 if c.ifNoneMatch_ != "" { 19577 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19578 } 19579 var body io.Reader = nil 19580 c.urlParams_.Set("alt", alt) 19581 c.urlParams_.Set("prettyPrint", "false") 19582 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/triggers") 19583 urls += "?" + c.urlParams_.Encode() 19584 req, err := http.NewRequest("GET", urls, body) 19585 if err != nil { 19586 return nil, err 19587 } 19588 req.Header = reqHeaders 19589 googleapi.Expand(req.URL, map[string]string{ 19590 "parent": c.parent, 19591 }) 19592 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19593} 19594 19595// Do executes the "run.projects.locations.triggers.list" call. 19596// Exactly one of *ListTriggersResponse or error will be non-nil. Any 19597// non-2xx status code is an error. Response headers are in either 19598// *ListTriggersResponse.ServerResponse.Header or (if a response was 19599// returned at all) in error.(*googleapi.Error).Header. Use 19600// googleapi.IsNotModified to check whether the returned error was 19601// because http.StatusNotModified was returned. 19602func (c *ProjectsLocationsTriggersListCall) Do(opts ...googleapi.CallOption) (*ListTriggersResponse, error) { 19603 gensupport.SetOptions(c.urlParams_, opts...) 19604 res, err := c.doRequest("json") 19605 if res != nil && res.StatusCode == http.StatusNotModified { 19606 if res.Body != nil { 19607 res.Body.Close() 19608 } 19609 return nil, &googleapi.Error{ 19610 Code: res.StatusCode, 19611 Header: res.Header, 19612 } 19613 } 19614 if err != nil { 19615 return nil, err 19616 } 19617 defer googleapi.CloseBody(res) 19618 if err := googleapi.CheckResponse(res); err != nil { 19619 return nil, err 19620 } 19621 ret := &ListTriggersResponse{ 19622 ServerResponse: googleapi.ServerResponse{ 19623 Header: res.Header, 19624 HTTPStatusCode: res.StatusCode, 19625 }, 19626 } 19627 target := &ret 19628 if err := gensupport.DecodeResponse(target, res); err != nil { 19629 return nil, err 19630 } 19631 return ret, nil 19632 // { 19633 // "description": "Rpc to list triggers.", 19634 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/triggers", 19635 // "httpMethod": "GET", 19636 // "id": "run.projects.locations.triggers.list", 19637 // "parameterOrder": [ 19638 // "parent" 19639 // ], 19640 // "parameters": { 19641 // "continue": { 19642 // "description": "Optional. Encoded string to continue paging.", 19643 // "location": "query", 19644 // "type": "string" 19645 // }, 19646 // "fieldSelector": { 19647 // "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", 19648 // "location": "query", 19649 // "type": "string" 19650 // }, 19651 // "includeUninitialized": { 19652 // "description": "Not currently used by Cloud Run.", 19653 // "location": "query", 19654 // "type": "boolean" 19655 // }, 19656 // "labelSelector": { 19657 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 19658 // "location": "query", 19659 // "type": "string" 19660 // }, 19661 // "limit": { 19662 // "description": "The maximum number of records that should be returned.", 19663 // "format": "int32", 19664 // "location": "query", 19665 // "type": "integer" 19666 // }, 19667 // "parent": { 19668 // "description": "The project ID or project number from which the triggers should be listed.", 19669 // "location": "path", 19670 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19671 // "required": true, 19672 // "type": "string" 19673 // }, 19674 // "resourceVersion": { 19675 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 19676 // "location": "query", 19677 // "type": "string" 19678 // }, 19679 // "watch": { 19680 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 19681 // "location": "query", 19682 // "type": "boolean" 19683 // } 19684 // }, 19685 // "path": "v1alpha1/{+parent}/triggers", 19686 // "response": { 19687 // "$ref": "ListTriggersResponse" 19688 // }, 19689 // "scopes": [ 19690 // "https://www.googleapis.com/auth/cloud-platform" 19691 // ] 19692 // } 19693 19694} 19695