1 // Copyright 2021 Google LLC. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated file. DO NOT EDIT. 6 7 // Package 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/v1beta1" 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. 38 package run // import "google.golang.org/api/run/v1beta1" 39 40 import ( 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. 61 var _ = bytes.NewBuffer 62 var _ = strconv.Itoa 63 var _ = fmt.Sprintf 64 var _ = json.NewDecoder 65 var _ = io.Copy 66 var _ = url.Parse 67 var _ = gensupport.MarshalJSON 68 var _ = googleapi.Version 69 var _ = errors.New 70 var _ = strings.Replace 71 var _ = context.Canceled 72 var _ = internaloption.WithDefaultEndpoint 73 74 const apiId = "run:v1beta1" 75 const apiName = "run" 76 const apiVersion = "v1beta1" 77 const basePath = "https://run.googleapis.com/" 78 const mtlsBasePath = "https://run.mtls.googleapis.com/" 79 80 // OAuth2 scopes used by this API. 81 const ( 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 Service. 87 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, 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 Service. 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. 114 func New(client *http.Client) (*Service, error) { 115 if client == nil { 116 return nil, errors.New("client is nil") 117 } 118 s := &Service{client: client, BasePath: basePath} 119 s.Customresourcedefinitions = NewCustomresourcedefinitionsService(s) 120 s.Namespaces = NewNamespacesService(s) 121 s.Projects = NewProjectsService(s) 122 return s, nil 123 } 124 125 type Service struct { 126 client *http.Client 127 BasePath string // API endpoint base URL 128 UserAgent string // optional additional User-Agent fragment 129 130 Customresourcedefinitions *CustomresourcedefinitionsService 131 132 Namespaces *NamespacesService 133 134 Projects *ProjectsService 135 } 136 137 func (s *Service) userAgent() string { 138 if s.UserAgent == "" { 139 return googleapi.UserAgent 140 } 141 return googleapi.UserAgent + " " + s.UserAgent 142 } 143 144 func NewCustomresourcedefinitionsService(s *Service) *CustomresourcedefinitionsService { 145 rs := &CustomresourcedefinitionsService{s: s} 146 return rs 147 } 148 149 type CustomresourcedefinitionsService struct { 150 s *Service 151 } 152 153 func NewNamespacesService(s *Service) *NamespacesService { 154 rs := &NamespacesService{s: s} 155 rs.Customresourcedefinitions = NewNamespacesCustomresourcedefinitionsService(s) 156 return rs 157 } 158 159 type NamespacesService struct { 160 s *Service 161 162 Customresourcedefinitions *NamespacesCustomresourcedefinitionsService 163 } 164 165 func NewNamespacesCustomresourcedefinitionsService(s *Service) *NamespacesCustomresourcedefinitionsService { 166 rs := &NamespacesCustomresourcedefinitionsService{s: s} 167 return rs 168 } 169 170 type NamespacesCustomresourcedefinitionsService struct { 171 s *Service 172 } 173 174 func NewProjectsService(s *Service) *ProjectsService { 175 rs := &ProjectsService{s: s} 176 rs.Locations = NewProjectsLocationsService(s) 177 return rs 178 } 179 180 type ProjectsService struct { 181 s *Service 182 183 Locations *ProjectsLocationsService 184 } 185 186 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 187 rs := &ProjectsLocationsService{s: s} 188 rs.Customresourcedefinitions = NewProjectsLocationsCustomresourcedefinitionsService(s) 189 return rs 190 } 191 192 type ProjectsLocationsService struct { 193 s *Service 194 195 Customresourcedefinitions *ProjectsLocationsCustomresourcedefinitionsService 196 } 197 198 func NewProjectsLocationsCustomresourcedefinitionsService(s *Service) *ProjectsLocationsCustomresourcedefinitionsService { 199 rs := &ProjectsLocationsCustomresourcedefinitionsService{s: s} 200 return rs 201 } 202 203 type ProjectsLocationsCustomresourcedefinitionsService struct { 204 s *Service 205 } 206 207 // CustomResourceColumnDefinition: CustomResourceColumnDefinition 208 // specifies a column for server side printing. 209 type CustomResourceColumnDefinition struct { 210 // Description: description is a human readable description of this 211 // column. +optional 212 Description string `json:"description,omitempty"` 213 214 // Format: format is an optional OpenAPI type definition for this 215 // column. The 'name' format is applied to the primary identifier column 216 // to assist in clients identifying column is the resource name. See 217 // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types 218 // for more. +optional 219 Format string `json:"format,omitempty"` 220 221 // JsonPath: JSONPath is a simple JSON path, i.e. with array notation. 222 JsonPath string `json:"jsonPath,omitempty"` 223 224 // Name: name is a human readable name for the column. 225 Name string `json:"name,omitempty"` 226 227 // Priority: priority is an integer defining the relative importance of 228 // this column compared to others. Lower numbers are considered higher 229 // priority. Columns that may be omitted in limited space scenarios 230 // should be given a higher priority. +optional 231 Priority int64 `json:"priority,omitempty"` 232 233 // Type: type is an OpenAPI type definition for this column. See 234 // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types 235 // for more. 236 Type string `json:"type,omitempty"` 237 238 // ForceSendFields is a list of field names (e.g. "Description") to 239 // unconditionally include in API requests. By default, fields with 240 // empty values are omitted from API requests. However, any non-pointer, 241 // non-interface field appearing in ForceSendFields will be sent to the 242 // server regardless of whether the field is empty or not. This may be 243 // used to include empty fields in Patch requests. 244 ForceSendFields []string `json:"-"` 245 246 // NullFields is a list of field names (e.g. "Description") to include 247 // in API requests with the JSON null value. By default, fields with 248 // empty values are omitted from API requests. However, any field with 249 // an empty value appearing in NullFields will be sent to the server as 250 // null. It is an error if a field in this list has a non-empty value. 251 // This may be used to include null fields in Patch requests. 252 NullFields []string `json:"-"` 253 } 254 255 func (s *CustomResourceColumnDefinition) MarshalJSON() ([]byte, error) { 256 type NoMethod CustomResourceColumnDefinition 257 raw := NoMethod(*s) 258 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 259 } 260 261 // CustomResourceDefinition: CustomResourceDefinition represents a 262 // resource that should be exposed on the API server. Its name MUST be 263 // in the format <.spec.name>.<.spec.group>. 264 type CustomResourceDefinition struct { 265 // ApiVersion: The API version for this call such as 266 // "k8s.apiextensions.io/v1beta1". 267 ApiVersion string `json:"apiVersion,omitempty"` 268 269 // Kind: The kind of resource, in this case always 270 // "CustomResourceDefinition". 271 Kind string `json:"kind,omitempty"` 272 273 // Metadata: Metadata associated with this CustomResourceDefinition. 274 Metadata *ObjectMeta `json:"metadata,omitempty"` 275 276 // Spec: Spec describes how the user wants the resources to appear 277 Spec *CustomResourceDefinitionSpec `json:"spec,omitempty"` 278 279 // ServerResponse contains the HTTP response code and headers from the 280 // server. 281 googleapi.ServerResponse `json:"-"` 282 283 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 284 // unconditionally include in API requests. By default, fields with 285 // empty values are omitted from API requests. However, any non-pointer, 286 // non-interface field appearing in ForceSendFields will be sent to the 287 // server regardless of whether the field is empty or not. This may be 288 // used to include empty fields in Patch requests. 289 ForceSendFields []string `json:"-"` 290 291 // NullFields is a list of field names (e.g. "ApiVersion") to include in 292 // API requests with the JSON null value. By default, fields with empty 293 // values are omitted from API requests. However, any field with an 294 // empty value appearing in NullFields will be sent to the server as 295 // null. It is an error if a field in this list has a non-empty value. 296 // This may be used to include null fields in Patch requests. 297 NullFields []string `json:"-"` 298 } 299 300 func (s *CustomResourceDefinition) MarshalJSON() ([]byte, error) { 301 type NoMethod CustomResourceDefinition 302 raw := NoMethod(*s) 303 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 304 } 305 306 // CustomResourceDefinitionNames: CustomResourceDefinitionNames 307 // indicates the names to serve this CustomResourceDefinition 308 type CustomResourceDefinitionNames struct { 309 // Categories: Categories is a list of grouped resources custom 310 // resources belong to (e.g. 'all') +optional 311 Categories []string `json:"categories,omitempty"` 312 313 // Kind: Kind is the serialized kind of the resource. It is normally 314 // CamelCase and singular. 315 Kind string `json:"kind,omitempty"` 316 317 // ListKind: ListKind is the serialized kind of the list for this 318 // resource. Defaults to List. +optional 319 ListKind string `json:"listKind,omitempty"` 320 321 // Plural: Plural is the plural name of the resource to serve. It must 322 // match the name of the CustomResourceDefinition-registration too: 323 // plural.group and it must be all lowercase. 324 Plural string `json:"plural,omitempty"` 325 326 // ShortNames: ShortNames are short names for the resource. It must be 327 // all lowercase. +optional 328 ShortNames []string `json:"shortNames,omitempty"` 329 330 // Singular: Singular is the singular name of the resource. It must be 331 // all lowercase Defaults to lowercased +optional 332 Singular string `json:"singular,omitempty"` 333 334 // ForceSendFields is a list of field names (e.g. "Categories") to 335 // unconditionally include in API requests. By default, fields with 336 // empty values are omitted from API requests. However, any non-pointer, 337 // non-interface field appearing in ForceSendFields will be sent to the 338 // server regardless of whether the field is empty or not. This may be 339 // used to include empty fields in Patch requests. 340 ForceSendFields []string `json:"-"` 341 342 // NullFields is a list of field names (e.g. "Categories") to include in 343 // API requests with the JSON null value. By default, fields with empty 344 // values are omitted from API requests. However, any field with an 345 // empty value appearing in NullFields will be sent to the server as 346 // null. It is an error if a field in this list has a non-empty value. 347 // This may be used to include null fields in Patch requests. 348 NullFields []string `json:"-"` 349 } 350 351 func (s *CustomResourceDefinitionNames) MarshalJSON() ([]byte, error) { 352 type NoMethod CustomResourceDefinitionNames 353 raw := NoMethod(*s) 354 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 355 } 356 357 // CustomResourceDefinitionSpec: CustomResourceDefinitionSpec describes 358 // how a user wants their resource to appear 359 type CustomResourceDefinitionSpec struct { 360 // AdditionalPrinterColumns: AdditionalPrinterColumns are additional 361 // columns shown e.g. in kubectl next to the name. Defaults to a 362 // created-at column. +optional 363 AdditionalPrinterColumns []*CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty"` 364 365 // Group: Group is the group this resource belongs in 366 Group string `json:"group,omitempty"` 367 368 // Names: Names are the names used to describe this custom resource 369 Names *CustomResourceDefinitionNames `json:"names,omitempty"` 370 371 // Scope: Scope indicates whether this resource is cluster or namespace 372 // scoped. Default is namespaced 373 Scope string `json:"scope,omitempty"` 374 375 // Subresources: Subresources describes the subresources for 376 // CustomResources +optional 377 Subresources *CustomResourceSubresources `json:"subresources,omitempty"` 378 379 // Validation: Validation describes the validation methods for 380 // CustomResources +optional 381 Validation *CustomResourceValidation `json:"validation,omitempty"` 382 383 // Version: Version is the version this resource belongs in Should be 384 // always first item in Versions field if provided. Optional, but at 385 // least one of Version or Versions must be set. Deprecated: Please use 386 // `Versions`. +optional 387 Version string `json:"version,omitempty"` 388 389 // Versions: Versions is the list of all supported versions for this 390 // resource. If Version field is provided, this field is optional. 391 // Validation: All versions must use the same validation schema for now. 392 // i.e., top level Validation field is applied to all of these versions. 393 // Order: The version name will be used to compute the order. If the 394 // version string is "kube-like", it will sort above non "kube-like" 395 // version strings, which are ordered lexicographically. "Kube-like" 396 // versions start with a "v", then are followed by a number (the major 397 // version), then optionally the string "alpha" or "beta" and another 398 // number (the minor version). These are sorted first by GA > beta > 399 // alpha (where GA is a version with no suffix such as beta or alpha), 400 // and then by comparing major version, then minor version. An example 401 // sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, 402 // v12alpha1, v11alpha2, foo1, foo10. +optional 403 Versions []*CustomResourceDefinitionVersion `json:"versions,omitempty"` 404 405 // ForceSendFields is a list of field names (e.g. 406 // "AdditionalPrinterColumns") to unconditionally include in API 407 // requests. By default, fields with empty values are omitted from API 408 // requests. However, any non-pointer, non-interface field appearing in 409 // ForceSendFields will be sent to the server regardless of whether the 410 // field is empty or not. This may be used to include empty fields in 411 // Patch requests. 412 ForceSendFields []string `json:"-"` 413 414 // NullFields is a list of field names (e.g. "AdditionalPrinterColumns") 415 // to include in API requests with the JSON null value. By default, 416 // fields with empty values are omitted from API requests. However, any 417 // field with an empty value appearing in NullFields will be sent to the 418 // server as null. It is an error if a field in this list has a 419 // non-empty value. This may be used to include null fields in Patch 420 // requests. 421 NullFields []string `json:"-"` 422 } 423 424 func (s *CustomResourceDefinitionSpec) MarshalJSON() ([]byte, error) { 425 type NoMethod CustomResourceDefinitionSpec 426 raw := NoMethod(*s) 427 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 428 } 429 430 type CustomResourceDefinitionVersion struct { 431 // Name: Name is the version name, e.g. “v1”, “v2beta1”, etc. 432 Name string `json:"name,omitempty"` 433 434 // Served: Served is a flag enabling/disabling this version from being 435 // served via REST APIs 436 Served bool `json:"served,omitempty"` 437 438 // Storage: Storage flags the version as storage version. There must be 439 // exactly one flagged as storage version. 440 Storage bool `json:"storage,omitempty"` 441 442 // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") to include in API 451 // 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 459 func (s *CustomResourceDefinitionVersion) MarshalJSON() ([]byte, error) { 460 type NoMethod CustomResourceDefinitionVersion 461 raw := NoMethod(*s) 462 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 463 } 464 465 // CustomResourceSubresourceScale: CustomResourceSubresourceScale 466 // defines how to serve the scale subresource for CustomResources. 467 type CustomResourceSubresourceScale struct { 468 // LabelSelectorPath: LabelSelectorPath defines the JSON path inside of 469 // a CustomResource that corresponds to Scale.Status.Selector. Only JSON 470 // paths without the array notation are allowed. Must be a JSON Path 471 // under .status. Must be set to work with HPA. If there is no value 472 // under the given path in the CustomResource, the status label selector 473 // value in the /scale subresource will default to the empty string. 474 // +optional 475 LabelSelectorPath string `json:"labelSelectorPath,omitempty"` 476 477 // SpecReplicasPath: SpecReplicasPath defines the JSON path inside of a 478 // CustomResource that corresponds to Scale.Spec.Replicas. Only JSON 479 // paths without the array notation are allowed. Must be a JSON Path 480 // under .spec. If there is no value under the given path in the 481 // CustomResource, the /scale subresource will return an error on GET. 482 SpecReplicasPath string `json:"specReplicasPath,omitempty"` 483 484 // StatusReplicasPath: StatusReplicasPath defines the JSON path inside 485 // of a CustomResource that corresponds to Scale.Status.Replicas. Only 486 // JSON paths without the array notation are allowed. Must be a JSON 487 // Path under .status. If there is no value under the given path in the 488 // CustomResource, the status replica value in the /scale subresource 489 // will default to 0. 490 StatusReplicasPath string `json:"statusReplicasPath,omitempty"` 491 492 // ForceSendFields is a list of field names (e.g. "LabelSelectorPath") 493 // to unconditionally include in API requests. By default, fields with 494 // empty values are omitted from API requests. However, any non-pointer, 495 // non-interface field appearing in ForceSendFields will be sent to the 496 // server regardless of whether the field is empty or not. This may be 497 // used to include empty fields in Patch requests. 498 ForceSendFields []string `json:"-"` 499 500 // NullFields is a list of field names (e.g. "LabelSelectorPath") to 501 // include in API requests with the JSON null value. By default, fields 502 // with empty values are omitted from API requests. However, any field 503 // with an empty value appearing in NullFields will be sent to the 504 // server as null. It is an error if a field in this list has a 505 // non-empty value. This may be used to include null fields in Patch 506 // requests. 507 NullFields []string `json:"-"` 508 } 509 510 func (s *CustomResourceSubresourceScale) MarshalJSON() ([]byte, error) { 511 type NoMethod CustomResourceSubresourceScale 512 raw := NoMethod(*s) 513 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 514 } 515 516 // CustomResourceSubresourceStatus: CustomResourceSubresourceStatus 517 // defines how to serve the status subresource for CustomResources. 518 // Status is represented by the `.status` JSON path inside of a 519 // CustomResource. When set, * exposes a /status subresource for the 520 // custom resource * PUT requests to the /status subresource take a 521 // custom resource object, and ignore changes to anything except the 522 // status stanza * PUT/POST/PATCH requests to the custom resource ignore 523 // changes to the status stanza 524 type CustomResourceSubresourceStatus struct { 525 } 526 527 // CustomResourceSubresources: CustomResourceSubresources defines the 528 // status and scale subresources for CustomResources. 529 type CustomResourceSubresources struct { 530 // Scale: Scale denotes the scale subresource for CustomResources 531 // +optional 532 Scale *CustomResourceSubresourceScale `json:"scale,omitempty"` 533 534 // Status: Status denotes the status subresource for CustomResources 535 // +optional 536 Status *CustomResourceSubresourceStatus `json:"status,omitempty"` 537 538 // ForceSendFields is a list of field names (e.g. "Scale") 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. "Scale") to include in API 547 // requests with the JSON null value. By default, fields with empty 548 // values are omitted from API requests. However, any field with an 549 // empty value appearing in NullFields will be sent to the server as 550 // null. It is an error if a field in this list has a non-empty value. 551 // This may be used to include null fields in Patch requests. 552 NullFields []string `json:"-"` 553 } 554 555 func (s *CustomResourceSubresources) MarshalJSON() ([]byte, error) { 556 type NoMethod CustomResourceSubresources 557 raw := NoMethod(*s) 558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 559 } 560 561 // CustomResourceValidation: CustomResourceValidation is a list of 562 // validation methods for CustomResources. 563 type CustomResourceValidation struct { 564 // OpenAPIV3Schema: OpenAPIV3Schema is the OpenAPI v3 schema to be 565 // validated against. +optional 566 OpenAPIV3Schema *JSONSchemaProps `json:"openAPIV3Schema,omitempty"` 567 568 // ForceSendFields is a list of field names (e.g. "OpenAPIV3Schema") to 569 // unconditionally include in API requests. By default, fields with 570 // empty values are omitted from API requests. However, any non-pointer, 571 // non-interface field appearing in ForceSendFields will be sent to the 572 // server regardless of whether the field is empty or not. This may be 573 // used to include empty fields in Patch requests. 574 ForceSendFields []string `json:"-"` 575 576 // NullFields is a list of field names (e.g. "OpenAPIV3Schema") to 577 // include in API requests with the JSON null value. By default, fields 578 // with empty values are omitted from API requests. However, any field 579 // with an empty value appearing in NullFields will be sent to the 580 // server as null. It is an error if a field in this list has a 581 // non-empty value. This may be used to include null fields in Patch 582 // requests. 583 NullFields []string `json:"-"` 584 } 585 586 func (s *CustomResourceValidation) MarshalJSON() ([]byte, error) { 587 type NoMethod CustomResourceValidation 588 raw := NoMethod(*s) 589 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 590 } 591 592 // ExternalDocumentation: ExternalDocumentation allows referencing an 593 // external resource for extended documentation. 594 type ExternalDocumentation struct { 595 Description string `json:"description,omitempty"` 596 597 Url string `json:"url,omitempty"` 598 599 // ForceSendFields is a list of field names (e.g. "Description") to 600 // unconditionally include in API requests. By default, fields with 601 // empty values are omitted from API requests. However, any non-pointer, 602 // non-interface field appearing in ForceSendFields will be sent to the 603 // server regardless of whether the field is empty or not. This may be 604 // used to include empty fields in Patch requests. 605 ForceSendFields []string `json:"-"` 606 607 // NullFields is a list of field names (e.g. "Description") to include 608 // in API requests with the JSON null value. By default, fields with 609 // empty values are omitted from API requests. However, any field with 610 // an empty value appearing in NullFields will be sent to the server as 611 // null. It is an error if a field in this list has a non-empty value. 612 // This may be used to include null fields in Patch requests. 613 NullFields []string `json:"-"` 614 } 615 616 func (s *ExternalDocumentation) MarshalJSON() ([]byte, error) { 617 type NoMethod ExternalDocumentation 618 raw := NoMethod(*s) 619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 620 } 621 622 // JSON: JSON represents any valid JSON value. These types are 623 // supported: bool, int64, float64, string, []interface{}, 624 // map[string]interface{} and nil. 625 type JSON struct { 626 Raw string `json:"raw,omitempty"` 627 628 // ForceSendFields is a list of field names (e.g. "Raw") to 629 // unconditionally include in API requests. By default, fields with 630 // empty values are omitted from API requests. However, any non-pointer, 631 // non-interface field appearing in ForceSendFields will be sent to the 632 // server regardless of whether the field is empty or not. This may be 633 // used to include empty fields in Patch requests. 634 ForceSendFields []string `json:"-"` 635 636 // NullFields is a list of field names (e.g. "Raw") to include in API 637 // requests with the JSON null value. By default, fields with empty 638 // values are omitted from API requests. However, any field with an 639 // empty value appearing in NullFields will be sent to the server as 640 // null. It is an error if a field in this list has a non-empty value. 641 // This may be used to include null fields in Patch requests. 642 NullFields []string `json:"-"` 643 } 644 645 func (s *JSON) MarshalJSON() ([]byte, error) { 646 type NoMethod JSON 647 raw := NoMethod(*s) 648 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 649 } 650 651 // JSONSchemaProps: JSONSchemaProps is a JSON-Schema following 652 // Specification Draft 4 (http://json-schema.org/). 653 type JSONSchemaProps struct { 654 AdditionalItems *JSONSchemaPropsOrBool `json:"additionalItems,omitempty"` 655 656 AdditionalProperties *JSONSchemaPropsOrBool `json:"additionalProperties,omitempty"` 657 658 AllOf []*JSONSchemaProps `json:"allOf,omitempty"` 659 660 AnyOf []*JSONSchemaProps `json:"anyOf,omitempty"` 661 662 Default *JSON `json:"default,omitempty"` 663 664 Definitions map[string]JSONSchemaProps `json:"definitions,omitempty"` 665 666 Dependencies map[string]JSONSchemaPropsOrStringArray `json:"dependencies,omitempty"` 667 668 Description string `json:"description,omitempty"` 669 670 Enum []string `json:"enum,omitempty"` 671 672 Example *JSON `json:"example,omitempty"` 673 674 ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"` 675 676 ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"` 677 678 ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"` 679 680 Format string `json:"format,omitempty"` 681 682 Id string `json:"id,omitempty"` 683 684 Items *JSONSchemaPropsOrArray `json:"items,omitempty"` 685 686 MaxItems int64 `json:"maxItems,omitempty,string"` 687 688 MaxLength int64 `json:"maxLength,omitempty,string"` 689 690 MaxProperties int64 `json:"maxProperties,omitempty,string"` 691 692 Maximum float64 `json:"maximum,omitempty"` 693 694 MinItems int64 `json:"minItems,omitempty,string"` 695 696 MinLength int64 `json:"minLength,omitempty,string"` 697 698 MinProperties int64 `json:"minProperties,omitempty,string"` 699 700 Minimum float64 `json:"minimum,omitempty"` 701 702 MultipleOf float64 `json:"multipleOf,omitempty"` 703 704 Not *JSONSchemaProps `json:"not,omitempty"` 705 706 OneOf []*JSONSchemaProps `json:"oneOf,omitempty"` 707 708 Pattern string `json:"pattern,omitempty"` 709 710 PatternProperties map[string]JSONSchemaProps `json:"patternProperties,omitempty"` 711 712 Properties map[string]JSONSchemaProps `json:"properties,omitempty"` 713 714 Ref string `json:"ref,omitempty"` 715 716 Required []string `json:"required,omitempty"` 717 718 Schema string `json:"schema,omitempty"` 719 720 Title string `json:"title,omitempty"` 721 722 Type string `json:"type,omitempty"` 723 724 UniqueItems bool `json:"uniqueItems,omitempty"` 725 726 // ForceSendFields is a list of field names (e.g. "AdditionalItems") 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. "AdditionalItems") to 735 // include in API requests with the JSON null value. By default, fields 736 // with empty values are omitted from API requests. However, any field 737 // with an empty value appearing in NullFields will be sent to the 738 // server as null. It is an error if a field in this list has a 739 // non-empty value. This may be used to include null fields in Patch 740 // requests. 741 NullFields []string `json:"-"` 742 } 743 744 func (s *JSONSchemaProps) MarshalJSON() ([]byte, error) { 745 type NoMethod JSONSchemaProps 746 raw := NoMethod(*s) 747 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 748 } 749 750 func (s *JSONSchemaProps) UnmarshalJSON(data []byte) error { 751 type NoMethod JSONSchemaProps 752 var s1 struct { 753 Maximum gensupport.JSONFloat64 `json:"maximum"` 754 Minimum gensupport.JSONFloat64 `json:"minimum"` 755 MultipleOf gensupport.JSONFloat64 `json:"multipleOf"` 756 *NoMethod 757 } 758 s1.NoMethod = (*NoMethod)(s) 759 if err := json.Unmarshal(data, &s1); err != nil { 760 return err 761 } 762 s.Maximum = float64(s1.Maximum) 763 s.Minimum = float64(s1.Minimum) 764 s.MultipleOf = float64(s1.MultipleOf) 765 return nil 766 } 767 768 // JSONSchemaPropsOrArray: JSONSchemaPropsOrArray represents a value 769 // that can either be a JSONSchemaProps or an array of JSONSchemaProps. 770 // Mainly here for serialization purposes. 771 type JSONSchemaPropsOrArray struct { 772 JsonSchemas []*JSONSchemaProps `json:"jsonSchemas,omitempty"` 773 774 Schema *JSONSchemaProps `json:"schema,omitempty"` 775 776 // ForceSendFields is a list of field names (e.g. "JsonSchemas") to 777 // unconditionally include in API requests. By default, fields with 778 // empty values are omitted from API requests. However, any non-pointer, 779 // non-interface field appearing in ForceSendFields will be sent to the 780 // server regardless of whether the field is empty or not. This may be 781 // used to include empty fields in Patch requests. 782 ForceSendFields []string `json:"-"` 783 784 // NullFields is a list of field names (e.g. "JsonSchemas") to include 785 // in API requests with the JSON null value. By default, fields with 786 // empty values are omitted from API requests. However, any field with 787 // an empty value appearing in NullFields will be sent to the server as 788 // null. It is an error if a field in this list has a non-empty value. 789 // This may be used to include null fields in Patch requests. 790 NullFields []string `json:"-"` 791 } 792 793 func (s *JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) { 794 type NoMethod JSONSchemaPropsOrArray 795 raw := NoMethod(*s) 796 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 797 } 798 799 // JSONSchemaPropsOrBool: JSONSchemaPropsOrBool represents 800 // JSONSchemaProps or a boolean value. Defaults to true for the boolean 801 // property. 802 type JSONSchemaPropsOrBool struct { 803 Allows bool `json:"allows,omitempty"` 804 805 Schema *JSONSchemaProps `json:"schema,omitempty"` 806 807 // ForceSendFields is a list of field names (e.g. "Allows") to 808 // unconditionally include in API requests. By default, fields with 809 // empty values are omitted from API requests. However, any non-pointer, 810 // non-interface field appearing in ForceSendFields will be sent to the 811 // server regardless of whether the field is empty or not. This may be 812 // used to include empty fields in Patch requests. 813 ForceSendFields []string `json:"-"` 814 815 // NullFields is a list of field names (e.g. "Allows") to include in API 816 // requests with the JSON null value. By default, fields with empty 817 // values are omitted from API requests. However, any field with an 818 // empty value appearing in NullFields will be sent to the server as 819 // null. It is an error if a field in this list has a non-empty value. 820 // This may be used to include null fields in Patch requests. 821 NullFields []string `json:"-"` 822 } 823 824 func (s *JSONSchemaPropsOrBool) MarshalJSON() ([]byte, error) { 825 type NoMethod JSONSchemaPropsOrBool 826 raw := NoMethod(*s) 827 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 828 } 829 830 // JSONSchemaPropsOrStringArray: JSONSchemaPropsOrStringArray represents 831 // a JSONSchemaProps or a string array. 832 type JSONSchemaPropsOrStringArray struct { 833 Property []string `json:"property,omitempty"` 834 835 Schema *JSONSchemaProps `json:"schema,omitempty"` 836 837 // ForceSendFields is a list of field names (e.g. "Property") to 838 // unconditionally include in API requests. By default, fields with 839 // empty values are omitted from API requests. However, any non-pointer, 840 // non-interface field appearing in ForceSendFields will be sent to the 841 // server regardless of whether the field is empty or not. This may be 842 // used to include empty fields in Patch requests. 843 ForceSendFields []string `json:"-"` 844 845 // NullFields is a list of field names (e.g. "Property") to include in 846 // API requests with the JSON null value. By default, fields with empty 847 // values are omitted from API requests. However, any field with an 848 // empty value appearing in NullFields will be sent to the server as 849 // null. It is an error if a field in this list has a non-empty value. 850 // This may be used to include null fields in Patch requests. 851 NullFields []string `json:"-"` 852 } 853 854 func (s *JSONSchemaPropsOrStringArray) MarshalJSON() ([]byte, error) { 855 type NoMethod JSONSchemaPropsOrStringArray 856 raw := NoMethod(*s) 857 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 858 } 859 860 type ListCustomResourceDefinitionsResponse struct { 861 // ApiVersion: The API version for this call such as 862 // "k8s.apiextensions.io/v1beta1". 863 ApiVersion string `json:"apiVersion,omitempty"` 864 865 // Items: List of CustomResourceDefinitions. 866 Items []*CustomResourceDefinition `json:"items,omitempty"` 867 868 // Kind: The kind of this resource, in this case 869 // "CustomResourceDefinitionList". 870 Kind string `json:"kind,omitempty"` 871 872 // Metadata: Metadata associated with this CustomResourceDefinition 873 // list. 874 Metadata *ListMeta `json:"metadata,omitempty"` 875 876 // Unreachable: Locations that could not be reached. 877 Unreachable []string `json:"unreachable,omitempty"` 878 879 // ServerResponse contains the HTTP response code and headers from the 880 // server. 881 googleapi.ServerResponse `json:"-"` 882 883 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 884 // unconditionally include in API requests. By default, fields with 885 // empty values are omitted from API requests. However, any non-pointer, 886 // non-interface field appearing in ForceSendFields will be sent to the 887 // server regardless of whether the field is empty or not. This may be 888 // used to include empty fields in Patch requests. 889 ForceSendFields []string `json:"-"` 890 891 // NullFields is a list of field names (e.g. "ApiVersion") to include in 892 // API requests with the JSON null value. By default, fields with empty 893 // values are omitted from API requests. However, any field with an 894 // empty value appearing in NullFields will be sent to the server as 895 // null. It is an error if a field in this list has a non-empty value. 896 // This may be used to include null fields in Patch requests. 897 NullFields []string `json:"-"` 898 } 899 900 func (s *ListCustomResourceDefinitionsResponse) MarshalJSON() ([]byte, error) { 901 type NoMethod ListCustomResourceDefinitionsResponse 902 raw := NoMethod(*s) 903 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 904 } 905 906 // ListMeta: ListMeta describes metadata that synthetic resources must 907 // have, including lists and various status objects. A resource may have 908 // only one of {ObjectMeta, ListMeta}. 909 type ListMeta struct { 910 // Continue: continue may be set if the user set a limit on the number 911 // of items returned, and indicates that the server has more data 912 // available. The value is opaque and may be used to issue another 913 // request to the endpoint that served this list to retrieve the next 914 // set of available objects. Continuing a list may not be possible if 915 // the server configuration has changed or more than a few minutes have 916 // passed. The resourceVersion field returned when using this continue 917 // value will be identical to the value in the first response. 918 Continue string `json:"continue,omitempty"` 919 920 // ResourceVersion: String that identifies the server's internal version 921 // of this object that can be used by clients to determine when objects 922 // have changed. Value must be treated as opaque by clients and passed 923 // unmodified back to the server. Populated by the system. Read-only. 924 // More info: 925 // https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency 926 // +optional 927 ResourceVersion string `json:"resourceVersion,omitempty"` 928 929 // SelfLink: SelfLink is a URL representing this object. Populated by 930 // the system. Read-only. +optional 931 SelfLink string `json:"selfLink,omitempty"` 932 933 // ForceSendFields is a list of field names (e.g. "Continue") to 934 // unconditionally include in API requests. By default, fields with 935 // empty values are omitted from API requests. However, any non-pointer, 936 // non-interface field appearing in ForceSendFields will be sent to the 937 // server regardless of whether the field is empty or not. This may be 938 // used to include empty fields in Patch requests. 939 ForceSendFields []string `json:"-"` 940 941 // NullFields is a list of field names (e.g. "Continue") to include in 942 // API requests with the JSON null value. By default, fields with empty 943 // values are omitted from API requests. However, any field with an 944 // empty value appearing in NullFields will be sent to the server as 945 // null. It is an error if a field in this list has a non-empty value. 946 // This may be used to include null fields in Patch requests. 947 NullFields []string `json:"-"` 948 } 949 950 func (s *ListMeta) MarshalJSON() ([]byte, error) { 951 type NoMethod ListMeta 952 raw := NoMethod(*s) 953 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 954 } 955 956 // ObjectMeta: k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta is 957 // metadata that all persisted resources must have, which includes all 958 // objects users must create. 959 type ObjectMeta struct { 960 // Annotations: (Optional) Annotations is an unstructured key value map 961 // stored with a resource that may be set by external tools to store and 962 // retrieve arbitrary metadata. They are not queryable and should be 963 // preserved when modifying objects. More info: 964 // http://kubernetes.io/docs/user-guide/annotations 965 Annotations map[string]string `json:"annotations,omitempty"` 966 967 // ClusterName: (Optional) Cloud Run fully managed: not supported Cloud 968 // Run for Anthos: supported The name of the cluster which the object 969 // belongs to. This is used to distinguish resources with same name and 970 // namespace in different clusters. This field is not set anywhere right 971 // now and apiserver is going to ignore it if set in create or update 972 // request. 973 ClusterName string `json:"clusterName,omitempty"` 974 975 // CreationTimestamp: (Optional) CreationTimestamp is a timestamp 976 // representing the server time when this object was created. It is not 977 // guaranteed to be set in happens-before order across separate 978 // operations. Clients may not set this value. It is represented in 979 // RFC3339 form and is in UTC. Populated by the system. Read-only. Null 980 // for lists. More info: 981 // https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 982 CreationTimestamp string `json:"creationTimestamp,omitempty"` 983 984 // DeletionGracePeriodSeconds: (Optional) Cloud Run fully managed: not 985 // supported Cloud Run for Anthos: supported Number of seconds allowed 986 // for this object to gracefully terminate before it will be removed 987 // from the system. Only set when deletionTimestamp is also set. May 988 // only be shortened. Read-only. 989 DeletionGracePeriodSeconds int64 `json:"deletionGracePeriodSeconds,omitempty"` 990 991 // DeletionTimestamp: (Optional) Cloud Run fully managed: not supported 992 // Cloud Run for Anthos: supported DeletionTimestamp is RFC 3339 date 993 // and time at which this resource will be deleted. This field is set by 994 // the server when a graceful deletion is requested by the user, and is 995 // not directly settable by a client. The resource is expected to be 996 // deleted (no longer visible from resource lists, and not reachable by 997 // name) after the time in this field, once the finalizers list is 998 // empty. As long as the finalizers list contains items, deletion is 999 // blocked. Once the deletionTimestamp is set, this value may not be 1000 // unset or be set further into the future, although it may be shortened 1001 // or the resource may be deleted prior to this time. For example, a 1002 // user may request that a pod is deleted in 30 seconds. The Kubelet 1003 // will react by sending a graceful termination signal to the containers 1004 // in the pod. After that 30 seconds, the Kubelet will send a hard 1005 // termination signal (SIGKILL) to the container and after cleanup, 1006 // remove the pod from the API. In the presence of network partitions, 1007 // this object may still exist after this timestamp, until an 1008 // administrator or automated process can determine the resource is 1009 // fully terminated. If not set, graceful deletion of the object has not 1010 // been requested. Populated by the system when a graceful deletion is 1011 // requested. Read-only. More info: 1012 // https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 1013 DeletionTimestamp string `json:"deletionTimestamp,omitempty"` 1014 1015 // Finalizers: (Optional) Cloud Run fully managed: not supported Cloud 1016 // Run for Anthos: supported Must be empty before the object is deleted 1017 // from the registry. Each entry is an identifier for the responsible 1018 // component that will remove the entry from the list. If the 1019 // deletionTimestamp of the object is non-nil, entries in this list can 1020 // only be removed. +patchStrategy=merge 1021 Finalizers []string `json:"finalizers,omitempty"` 1022 1023 // GenerateName: (Optional) Cloud Run fully managed: not supported Cloud 1024 // Run for Anthos: supported GenerateName is an optional prefix, used by 1025 // the server, to generate a unique name ONLY IF the Name field has not 1026 // been provided. If this field is used, the name returned to the client 1027 // will be different than the name passed. This value will also be 1028 // combined with a unique suffix. The provided value has the same 1029 // validation rules as the Name field, and may be truncated by the 1030 // length of the suffix required to make the value unique on the server. 1031 // If this field is specified and the generated name exists, the server 1032 // will NOT return a 409 - instead, it will either return 201 Created or 1033 // 500 with Reason ServerTimeout indicating a unique name could not be 1034 // found in the time allotted, and the client should retry (optionally 1035 // after the time indicated in the Retry-After header). Applied only if 1036 // Name is not specified. More info: 1037 // https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency 1038 // string generateName = 2; 1039 GenerateName string `json:"generateName,omitempty"` 1040 1041 // Generation: (Optional) A sequence number representing a specific 1042 // generation of the desired state. Populated by the system. Read-only. 1043 Generation int64 `json:"generation,omitempty"` 1044 1045 // Labels: (Optional) Map of string keys and values that can be used to 1046 // organize and categorize (scope and select) objects. May match 1047 // selectors of replication controllers and routes. More info: 1048 // http://kubernetes.io/docs/user-guide/labels 1049 Labels map[string]string `json:"labels,omitempty"` 1050 1051 // Name: Name must be unique within a namespace, within a Cloud Run 1052 // region. Is required when creating resources, although some resources 1053 // may allow a client to request the generation of an appropriate name 1054 // automatically. Name is primarily intended for creation idempotence 1055 // and configuration definition. Cannot be updated. More info: 1056 // http://kubernetes.io/docs/user-guide/identifiers#names +optional 1057 Name string `json:"name,omitempty"` 1058 1059 // Namespace: Namespace defines the space within each name must be 1060 // unique, within a Cloud Run region. In Cloud Run the namespace must be 1061 // equal to either the project ID or project number. 1062 Namespace string `json:"namespace,omitempty"` 1063 1064 // OwnerReferences: (Optional) Cloud Run fully managed: not supported 1065 // Cloud Run for Anthos: supported List of objects that own this object. 1066 // If ALL objects in the list have been deleted, this object will be 1067 // garbage collected. 1068 OwnerReferences []*OwnerReference `json:"ownerReferences,omitempty"` 1069 1070 // ResourceVersion: (Optional) An opaque value that represents the 1071 // internal version of this object that can be used by clients to 1072 // determine when objects have changed. May be used for optimistic 1073 // concurrency, change detection, and the watch operation on a resource 1074 // or set of resources. Clients must treat these values as opaque and 1075 // passed unmodified back to the server. They may only be valid for a 1076 // particular resource or set of resources. Populated by the system. 1077 // Read-only. Value must be treated as opaque by clients. More info: 1078 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency 1079 ResourceVersion string `json:"resourceVersion,omitempty"` 1080 1081 // SelfLink: (Optional) SelfLink is a URL representing this object. 1082 // Populated by the system. Read-only. string selfLink = 4; 1083 SelfLink string `json:"selfLink,omitempty"` 1084 1085 // Uid: (Optional) UID is the unique in time and space value for this 1086 // object. It is typically generated by the server on successful 1087 // creation of a resource and is not allowed to change on PUT 1088 // operations. Populated by the system. Read-only. More info: 1089 // http://kubernetes.io/docs/user-guide/identifiers#uids 1090 Uid string `json:"uid,omitempty"` 1091 1092 // ForceSendFields is a list of field names (e.g. "Annotations") to 1093 // unconditionally include in API requests. By default, fields with 1094 // empty values are omitted from API requests. However, any non-pointer, 1095 // non-interface field appearing in ForceSendFields will be sent to the 1096 // server regardless of whether the field is empty or not. This may be 1097 // used to include empty fields in Patch requests. 1098 ForceSendFields []string `json:"-"` 1099 1100 // NullFields is a list of field names (e.g. "Annotations") to include 1101 // in API requests with the JSON null value. By default, fields with 1102 // empty values are omitted from API requests. However, any field with 1103 // an empty value appearing in NullFields will be sent to the server as 1104 // null. It is an error if a field in this list has a non-empty value. 1105 // This may be used to include null fields in Patch requests. 1106 NullFields []string `json:"-"` 1107 } 1108 1109 func (s *ObjectMeta) MarshalJSON() ([]byte, error) { 1110 type NoMethod ObjectMeta 1111 raw := NoMethod(*s) 1112 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1113 } 1114 1115 // OwnerReference: OwnerReference contains enough information to let you 1116 // identify an owning object. Currently, an owning object must be in the 1117 // same namespace, so there is no namespace field. 1118 type OwnerReference struct { 1119 // ApiVersion: API version of the referent. 1120 ApiVersion string `json:"apiVersion,omitempty"` 1121 1122 // BlockOwnerDeletion: If true, AND if the owner has the 1123 // "foregroundDeletion" finalizer, then the owner cannot be deleted from 1124 // the key-value store until this reference is removed. Defaults to 1125 // false. To set this field, a user needs "delete" permission of the 1126 // owner, otherwise 422 (Unprocessable Entity) will be returned. 1127 // +optional 1128 BlockOwnerDeletion bool `json:"blockOwnerDeletion,omitempty"` 1129 1130 // Controller: If true, this reference points to the managing 1131 // controller. +optional 1132 Controller bool `json:"controller,omitempty"` 1133 1134 // Kind: Kind of the referent. More info: 1135 // https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 1136 Kind string `json:"kind,omitempty"` 1137 1138 // Name: Name of the referent. More info: 1139 // http://kubernetes.io/docs/user-guide/identifiers#names 1140 Name string `json:"name,omitempty"` 1141 1142 // Uid: UID of the referent. More info: 1143 // http://kubernetes.io/docs/user-guide/identifiers#uids 1144 Uid string `json:"uid,omitempty"` 1145 1146 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1147 // unconditionally include in API requests. By default, fields with 1148 // empty values are omitted from API requests. However, any non-pointer, 1149 // non-interface field appearing in ForceSendFields will be sent to the 1150 // server regardless of whether the field is empty or not. This may be 1151 // used to include empty fields in Patch requests. 1152 ForceSendFields []string `json:"-"` 1153 1154 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1155 // API requests with the JSON null value. By default, fields with empty 1156 // values are omitted from API requests. However, any field with an 1157 // empty value appearing in NullFields will be sent to the server as 1158 // null. It is an error if a field in this list has a non-empty value. 1159 // This may be used to include null fields in Patch requests. 1160 NullFields []string `json:"-"` 1161 } 1162 1163 func (s *OwnerReference) MarshalJSON() ([]byte, error) { 1164 type NoMethod OwnerReference 1165 raw := NoMethod(*s) 1166 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1167 } 1168 1169 // method id "run.customresourcedefinitions.list": 1170 1171 type CustomresourcedefinitionsListCall struct { 1172 s *Service 1173 urlParams_ gensupport.URLParams 1174 ifNoneMatch_ string 1175 ctx_ context.Context 1176 header_ http.Header 1177 } 1178 1179 // List: Rpc to list custom resource definitions. 1180 func (r *CustomresourcedefinitionsService) List() *CustomresourcedefinitionsListCall { 1181 c := &CustomresourcedefinitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1182 return c 1183 } 1184 1185 // Continue sets the optional parameter "continue": Optional encoded 1186 // string to continue paging. 1187 func (c *CustomresourcedefinitionsListCall) Continue(continue_ string) *CustomresourcedefinitionsListCall { 1188 c.urlParams_.Set("continue", continue_) 1189 return c 1190 } 1191 1192 // FieldSelector sets the optional parameter "fieldSelector": Allows to 1193 // filter resources based on a specific value for a field name. Send 1194 // this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 1195 // currently used by Cloud Run. 1196 func (c *CustomresourcedefinitionsListCall) FieldSelector(fieldSelector string) *CustomresourcedefinitionsListCall { 1197 c.urlParams_.Set("fieldSelector", fieldSelector) 1198 return c 1199 } 1200 1201 // IncludeUninitialized sets the optional parameter 1202 // "includeUninitialized": Not currently used by Cloud Run. 1203 func (c *CustomresourcedefinitionsListCall) IncludeUninitialized(includeUninitialized bool) *CustomresourcedefinitionsListCall { 1204 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 1205 return c 1206 } 1207 1208 // LabelSelector sets the optional parameter "labelSelector": Allows to 1209 // filter resources based on a label. Supported operations are =, !=, 1210 // exists, in, and notIn. 1211 func (c *CustomresourcedefinitionsListCall) LabelSelector(labelSelector string) *CustomresourcedefinitionsListCall { 1212 c.urlParams_.Set("labelSelector", labelSelector) 1213 return c 1214 } 1215 1216 // Limit sets the optional parameter "limit": 1217 func (c *CustomresourcedefinitionsListCall) Limit(limit int64) *CustomresourcedefinitionsListCall { 1218 c.urlParams_.Set("limit", fmt.Sprint(limit)) 1219 return c 1220 } 1221 1222 // Parent sets the optional parameter "parent": The project ID or 1223 // project number from which the storages should be listed. 1224 func (c *CustomresourcedefinitionsListCall) Parent(parent string) *CustomresourcedefinitionsListCall { 1225 c.urlParams_.Set("parent", parent) 1226 return c 1227 } 1228 1229 // ResourceVersion sets the optional parameter "resourceVersion": The 1230 // baseline resource version from which the list or watch operation 1231 // should start. Not currently used by Cloud Run. 1232 func (c *CustomresourcedefinitionsListCall) ResourceVersion(resourceVersion string) *CustomresourcedefinitionsListCall { 1233 c.urlParams_.Set("resourceVersion", resourceVersion) 1234 return c 1235 } 1236 1237 // Watch sets the optional parameter "watch": Flag that indicates that 1238 // the client expects to watch this resource as well. Not currently used 1239 // by Cloud Run. 1240 func (c *CustomresourcedefinitionsListCall) Watch(watch bool) *CustomresourcedefinitionsListCall { 1241 c.urlParams_.Set("watch", fmt.Sprint(watch)) 1242 return c 1243 } 1244 1245 // Fields allows partial responses to be retrieved. See 1246 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1247 // for more information. 1248 func (c *CustomresourcedefinitionsListCall) Fields(s ...googleapi.Field) *CustomresourcedefinitionsListCall { 1249 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1250 return c 1251 } 1252 1253 // IfNoneMatch sets the optional parameter which makes the operation 1254 // fail if the object's ETag matches the given value. This is useful for 1255 // getting updates only after the object has changed since the last 1256 // request. Use googleapi.IsNotModified to check whether the response 1257 // error from Do is the result of In-None-Match. 1258 func (c *CustomresourcedefinitionsListCall) IfNoneMatch(entityTag string) *CustomresourcedefinitionsListCall { 1259 c.ifNoneMatch_ = entityTag 1260 return c 1261 } 1262 1263 // Context sets the context to be used in this call's Do method. Any 1264 // pending HTTP request will be aborted if the provided context is 1265 // canceled. 1266 func (c *CustomresourcedefinitionsListCall) Context(ctx context.Context) *CustomresourcedefinitionsListCall { 1267 c.ctx_ = ctx 1268 return c 1269 } 1270 1271 // Header returns an http.Header that can be modified by the caller to 1272 // add HTTP headers to the request. 1273 func (c *CustomresourcedefinitionsListCall) Header() http.Header { 1274 if c.header_ == nil { 1275 c.header_ = make(http.Header) 1276 } 1277 return c.header_ 1278 } 1279 1280 func (c *CustomresourcedefinitionsListCall) doRequest(alt string) (*http.Response, error) { 1281 reqHeaders := make(http.Header) 1282 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210331") 1283 for k, v := range c.header_ { 1284 reqHeaders[k] = v 1285 } 1286 reqHeaders.Set("User-Agent", c.s.userAgent()) 1287 if c.ifNoneMatch_ != "" { 1288 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1289 } 1290 var body io.Reader = nil 1291 c.urlParams_.Set("alt", alt) 1292 c.urlParams_.Set("prettyPrint", "false") 1293 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions") 1294 urls += "?" + c.urlParams_.Encode() 1295 req, err := http.NewRequest("GET", urls, body) 1296 if err != nil { 1297 return nil, err 1298 } 1299 req.Header = reqHeaders 1300 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1301 } 1302 1303 // Do executes the "run.customresourcedefinitions.list" call. 1304 // Exactly one of *ListCustomResourceDefinitionsResponse or error will 1305 // be non-nil. Any non-2xx status code is an error. Response headers are 1306 // in either 1307 // *ListCustomResourceDefinitionsResponse.ServerResponse.Header or (if a 1308 // response was returned at all) in error.(*googleapi.Error).Header. Use 1309 // googleapi.IsNotModified to check whether the returned error was 1310 // because http.StatusNotModified was returned. 1311 func (c *CustomresourcedefinitionsListCall) Do(opts ...googleapi.CallOption) (*ListCustomResourceDefinitionsResponse, error) { 1312 gensupport.SetOptions(c.urlParams_, opts...) 1313 res, err := c.doRequest("json") 1314 if res != nil && res.StatusCode == http.StatusNotModified { 1315 if res.Body != nil { 1316 res.Body.Close() 1317 } 1318 return nil, &googleapi.Error{ 1319 Code: res.StatusCode, 1320 Header: res.Header, 1321 } 1322 } 1323 if err != nil { 1324 return nil, err 1325 } 1326 defer googleapi.CloseBody(res) 1327 if err := googleapi.CheckResponse(res); err != nil { 1328 return nil, err 1329 } 1330 ret := &ListCustomResourceDefinitionsResponse{ 1331 ServerResponse: googleapi.ServerResponse{ 1332 Header: res.Header, 1333 HTTPStatusCode: res.StatusCode, 1334 }, 1335 } 1336 target := &ret 1337 if err := gensupport.DecodeResponse(target, res); err != nil { 1338 return nil, err 1339 } 1340 return ret, nil 1341 // { 1342 // "description": "Rpc to list custom resource definitions.", 1343 // "flatPath": "apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions", 1344 // "httpMethod": "GET", 1345 // "id": "run.customresourcedefinitions.list", 1346 // "parameterOrder": [], 1347 // "parameters": { 1348 // "continue": { 1349 // "description": "Optional encoded string to continue paging.", 1350 // "location": "query", 1351 // "type": "string" 1352 // }, 1353 // "fieldSelector": { 1354 // "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.", 1355 // "location": "query", 1356 // "type": "string" 1357 // }, 1358 // "includeUninitialized": { 1359 // "description": "Not currently used by Cloud Run.", 1360 // "location": "query", 1361 // "type": "boolean" 1362 // }, 1363 // "labelSelector": { 1364 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 1365 // "location": "query", 1366 // "type": "string" 1367 // }, 1368 // "limit": { 1369 // "format": "int32", 1370 // "location": "query", 1371 // "type": "integer" 1372 // }, 1373 // "parent": { 1374 // "description": "The project ID or project number from which the storages should be listed.", 1375 // "location": "query", 1376 // "type": "string" 1377 // }, 1378 // "resourceVersion": { 1379 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 1380 // "location": "query", 1381 // "type": "string" 1382 // }, 1383 // "watch": { 1384 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 1385 // "location": "query", 1386 // "type": "boolean" 1387 // } 1388 // }, 1389 // "path": "apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions", 1390 // "response": { 1391 // "$ref": "ListCustomResourceDefinitionsResponse" 1392 // }, 1393 // "scopes": [ 1394 // "https://www.googleapis.com/auth/cloud-platform" 1395 // ] 1396 // } 1397 1398 } 1399 1400 // method id "run.namespaces.customresourcedefinitions.get": 1401 1402 type NamespacesCustomresourcedefinitionsGetCall struct { 1403 s *Service 1404 name string 1405 urlParams_ gensupport.URLParams 1406 ifNoneMatch_ string 1407 ctx_ context.Context 1408 header_ http.Header 1409 } 1410 1411 // Get: Rpc to get information about a CustomResourceDefinition. 1412 // 1413 // - name: The name of the CustomResourceDefinition being retrieved. If 1414 // needed, replace {namespace_id} with the project ID. 1415 func (r *NamespacesCustomresourcedefinitionsService) Get(name string) *NamespacesCustomresourcedefinitionsGetCall { 1416 c := &NamespacesCustomresourcedefinitionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1417 c.name = name 1418 return c 1419 } 1420 1421 // Fields allows partial responses to be retrieved. See 1422 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1423 // for more information. 1424 func (c *NamespacesCustomresourcedefinitionsGetCall) Fields(s ...googleapi.Field) *NamespacesCustomresourcedefinitionsGetCall { 1425 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1426 return c 1427 } 1428 1429 // IfNoneMatch sets the optional parameter which makes the operation 1430 // fail if the object's ETag matches the given value. This is useful for 1431 // getting updates only after the object has changed since the last 1432 // request. Use googleapi.IsNotModified to check whether the response 1433 // error from Do is the result of In-None-Match. 1434 func (c *NamespacesCustomresourcedefinitionsGetCall) IfNoneMatch(entityTag string) *NamespacesCustomresourcedefinitionsGetCall { 1435 c.ifNoneMatch_ = entityTag 1436 return c 1437 } 1438 1439 // Context sets the context to be used in this call's Do method. Any 1440 // pending HTTP request will be aborted if the provided context is 1441 // canceled. 1442 func (c *NamespacesCustomresourcedefinitionsGetCall) Context(ctx context.Context) *NamespacesCustomresourcedefinitionsGetCall { 1443 c.ctx_ = ctx 1444 return c 1445 } 1446 1447 // Header returns an http.Header that can be modified by the caller to 1448 // add HTTP headers to the request. 1449 func (c *NamespacesCustomresourcedefinitionsGetCall) Header() http.Header { 1450 if c.header_ == nil { 1451 c.header_ = make(http.Header) 1452 } 1453 return c.header_ 1454 } 1455 1456 func (c *NamespacesCustomresourcedefinitionsGetCall) doRequest(alt string) (*http.Response, error) { 1457 reqHeaders := make(http.Header) 1458 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210331") 1459 for k, v := range c.header_ { 1460 reqHeaders[k] = v 1461 } 1462 reqHeaders.Set("User-Agent", c.s.userAgent()) 1463 if c.ifNoneMatch_ != "" { 1464 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1465 } 1466 var body io.Reader = nil 1467 c.urlParams_.Set("alt", alt) 1468 c.urlParams_.Set("prettyPrint", "false") 1469 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/apiextensions.k8s.io/v1beta1/{+name}") 1470 urls += "?" + c.urlParams_.Encode() 1471 req, err := http.NewRequest("GET", urls, body) 1472 if err != nil { 1473 return nil, err 1474 } 1475 req.Header = reqHeaders 1476 googleapi.Expand(req.URL, map[string]string{ 1477 "name": c.name, 1478 }) 1479 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1480 } 1481 1482 // Do executes the "run.namespaces.customresourcedefinitions.get" call. 1483 // Exactly one of *CustomResourceDefinition or error will be non-nil. 1484 // Any non-2xx status code is an error. Response headers are in either 1485 // *CustomResourceDefinition.ServerResponse.Header or (if a response was 1486 // returned at all) in error.(*googleapi.Error).Header. Use 1487 // googleapi.IsNotModified to check whether the returned error was 1488 // because http.StatusNotModified was returned. 1489 func (c *NamespacesCustomresourcedefinitionsGetCall) Do(opts ...googleapi.CallOption) (*CustomResourceDefinition, error) { 1490 gensupport.SetOptions(c.urlParams_, opts...) 1491 res, err := c.doRequest("json") 1492 if res != nil && res.StatusCode == http.StatusNotModified { 1493 if res.Body != nil { 1494 res.Body.Close() 1495 } 1496 return nil, &googleapi.Error{ 1497 Code: res.StatusCode, 1498 Header: res.Header, 1499 } 1500 } 1501 if err != nil { 1502 return nil, err 1503 } 1504 defer googleapi.CloseBody(res) 1505 if err := googleapi.CheckResponse(res); err != nil { 1506 return nil, err 1507 } 1508 ret := &CustomResourceDefinition{ 1509 ServerResponse: googleapi.ServerResponse{ 1510 Header: res.Header, 1511 HTTPStatusCode: res.StatusCode, 1512 }, 1513 } 1514 target := &ret 1515 if err := gensupport.DecodeResponse(target, res); err != nil { 1516 return nil, err 1517 } 1518 return ret, nil 1519 // { 1520 // "description": "Rpc to get information about a CustomResourceDefinition.", 1521 // "flatPath": "apis/apiextensions.k8s.io/v1beta1/namespaces/{namespacesId}/customresourcedefinitions/{customresourcedefinitionsId}", 1522 // "httpMethod": "GET", 1523 // "id": "run.namespaces.customresourcedefinitions.get", 1524 // "parameterOrder": [ 1525 // "name" 1526 // ], 1527 // "parameters": { 1528 // "name": { 1529 // "description": "The name of the CustomResourceDefinition being retrieved. If needed, replace {namespace_id} with the project ID.", 1530 // "location": "path", 1531 // "pattern": "^namespaces/[^/]+/customresourcedefinitions/[^/]+$", 1532 // "required": true, 1533 // "type": "string" 1534 // } 1535 // }, 1536 // "path": "apis/apiextensions.k8s.io/v1beta1/{+name}", 1537 // "response": { 1538 // "$ref": "CustomResourceDefinition" 1539 // }, 1540 // "scopes": [ 1541 // "https://www.googleapis.com/auth/cloud-platform" 1542 // ] 1543 // } 1544 1545 } 1546 1547 // method id "run.projects.locations.customresourcedefinitions.get": 1548 1549 type ProjectsLocationsCustomresourcedefinitionsGetCall struct { 1550 s *Service 1551 name string 1552 urlParams_ gensupport.URLParams 1553 ifNoneMatch_ string 1554 ctx_ context.Context 1555 header_ http.Header 1556 } 1557 1558 // Get: Rpc to get information about a CustomResourceDefinition. 1559 // 1560 // - name: The name of the CustomResourceDefinition being retrieved. If 1561 // needed, replace {namespace_id} with the project ID. 1562 func (r *ProjectsLocationsCustomresourcedefinitionsService) Get(name string) *ProjectsLocationsCustomresourcedefinitionsGetCall { 1563 c := &ProjectsLocationsCustomresourcedefinitionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1564 c.name = name 1565 return c 1566 } 1567 1568 // Fields allows partial responses to be retrieved. See 1569 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1570 // for more information. 1571 func (c *ProjectsLocationsCustomresourcedefinitionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomresourcedefinitionsGetCall { 1572 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1573 return c 1574 } 1575 1576 // IfNoneMatch sets the optional parameter which makes the operation 1577 // fail if the object's ETag matches the given value. This is useful for 1578 // getting updates only after the object has changed since the last 1579 // request. Use googleapi.IsNotModified to check whether the response 1580 // error from Do is the result of In-None-Match. 1581 func (c *ProjectsLocationsCustomresourcedefinitionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomresourcedefinitionsGetCall { 1582 c.ifNoneMatch_ = entityTag 1583 return c 1584 } 1585 1586 // Context sets the context to be used in this call's Do method. Any 1587 // pending HTTP request will be aborted if the provided context is 1588 // canceled. 1589 func (c *ProjectsLocationsCustomresourcedefinitionsGetCall) Context(ctx context.Context) *ProjectsLocationsCustomresourcedefinitionsGetCall { 1590 c.ctx_ = ctx 1591 return c 1592 } 1593 1594 // Header returns an http.Header that can be modified by the caller to 1595 // add HTTP headers to the request. 1596 func (c *ProjectsLocationsCustomresourcedefinitionsGetCall) Header() http.Header { 1597 if c.header_ == nil { 1598 c.header_ = make(http.Header) 1599 } 1600 return c.header_ 1601 } 1602 1603 func (c *ProjectsLocationsCustomresourcedefinitionsGetCall) doRequest(alt string) (*http.Response, error) { 1604 reqHeaders := make(http.Header) 1605 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210331") 1606 for k, v := range c.header_ { 1607 reqHeaders[k] = v 1608 } 1609 reqHeaders.Set("User-Agent", c.s.userAgent()) 1610 if c.ifNoneMatch_ != "" { 1611 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1612 } 1613 var body io.Reader = nil 1614 c.urlParams_.Set("alt", alt) 1615 c.urlParams_.Set("prettyPrint", "false") 1616 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 1617 urls += "?" + c.urlParams_.Encode() 1618 req, err := http.NewRequest("GET", urls, body) 1619 if err != nil { 1620 return nil, err 1621 } 1622 req.Header = reqHeaders 1623 googleapi.Expand(req.URL, map[string]string{ 1624 "name": c.name, 1625 }) 1626 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1627 } 1628 1629 // Do executes the "run.projects.locations.customresourcedefinitions.get" call. 1630 // Exactly one of *CustomResourceDefinition or error will be non-nil. 1631 // Any non-2xx status code is an error. Response headers are in either 1632 // *CustomResourceDefinition.ServerResponse.Header or (if a response was 1633 // returned at all) in error.(*googleapi.Error).Header. Use 1634 // googleapi.IsNotModified to check whether the returned error was 1635 // because http.StatusNotModified was returned. 1636 func (c *ProjectsLocationsCustomresourcedefinitionsGetCall) Do(opts ...googleapi.CallOption) (*CustomResourceDefinition, error) { 1637 gensupport.SetOptions(c.urlParams_, opts...) 1638 res, err := c.doRequest("json") 1639 if res != nil && res.StatusCode == http.StatusNotModified { 1640 if res.Body != nil { 1641 res.Body.Close() 1642 } 1643 return nil, &googleapi.Error{ 1644 Code: res.StatusCode, 1645 Header: res.Header, 1646 } 1647 } 1648 if err != nil { 1649 return nil, err 1650 } 1651 defer googleapi.CloseBody(res) 1652 if err := googleapi.CheckResponse(res); err != nil { 1653 return nil, err 1654 } 1655 ret := &CustomResourceDefinition{ 1656 ServerResponse: googleapi.ServerResponse{ 1657 Header: res.Header, 1658 HTTPStatusCode: res.StatusCode, 1659 }, 1660 } 1661 target := &ret 1662 if err := gensupport.DecodeResponse(target, res); err != nil { 1663 return nil, err 1664 } 1665 return ret, nil 1666 // { 1667 // "description": "Rpc to get information about a CustomResourceDefinition.", 1668 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/customresourcedefinitions/{customresourcedefinitionsId}", 1669 // "httpMethod": "GET", 1670 // "id": "run.projects.locations.customresourcedefinitions.get", 1671 // "parameterOrder": [ 1672 // "name" 1673 // ], 1674 // "parameters": { 1675 // "name": { 1676 // "description": "The name of the CustomResourceDefinition being retrieved. If needed, replace {namespace_id} with the project ID.", 1677 // "location": "path", 1678 // "pattern": "^projects/[^/]+/locations/[^/]+/customresourcedefinitions/[^/]+$", 1679 // "required": true, 1680 // "type": "string" 1681 // } 1682 // }, 1683 // "path": "v1beta1/{+name}", 1684 // "response": { 1685 // "$ref": "CustomResourceDefinition" 1686 // }, 1687 // "scopes": [ 1688 // "https://www.googleapis.com/auth/cloud-platform" 1689 // ] 1690 // } 1691 1692 } 1693 1694 // method id "run.projects.locations.customresourcedefinitions.list": 1695 1696 type ProjectsLocationsCustomresourcedefinitionsListCall struct { 1697 s *Service 1698 parent string 1699 urlParams_ gensupport.URLParams 1700 ifNoneMatch_ string 1701 ctx_ context.Context 1702 header_ http.Header 1703 } 1704 1705 // List: Rpc to list custom resource definitions. 1706 // 1707 // - parent: The project ID or project number from which the storages 1708 // should be listed. 1709 func (r *ProjectsLocationsCustomresourcedefinitionsService) List(parent string) *ProjectsLocationsCustomresourcedefinitionsListCall { 1710 c := &ProjectsLocationsCustomresourcedefinitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1711 c.parent = parent 1712 return c 1713 } 1714 1715 // Continue sets the optional parameter "continue": Optional encoded 1716 // string to continue paging. 1717 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) Continue(continue_ string) *ProjectsLocationsCustomresourcedefinitionsListCall { 1718 c.urlParams_.Set("continue", continue_) 1719 return c 1720 } 1721 1722 // FieldSelector sets the optional parameter "fieldSelector": Allows to 1723 // filter resources based on a specific value for a field name. Send 1724 // this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 1725 // currently used by Cloud Run. 1726 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) FieldSelector(fieldSelector string) *ProjectsLocationsCustomresourcedefinitionsListCall { 1727 c.urlParams_.Set("fieldSelector", fieldSelector) 1728 return c 1729 } 1730 1731 // IncludeUninitialized sets the optional parameter 1732 // "includeUninitialized": Not currently used by Cloud Run. 1733 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) IncludeUninitialized(includeUninitialized bool) *ProjectsLocationsCustomresourcedefinitionsListCall { 1734 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 1735 return c 1736 } 1737 1738 // LabelSelector sets the optional parameter "labelSelector": Allows to 1739 // filter resources based on a label. Supported operations are =, !=, 1740 // exists, in, and notIn. 1741 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) LabelSelector(labelSelector string) *ProjectsLocationsCustomresourcedefinitionsListCall { 1742 c.urlParams_.Set("labelSelector", labelSelector) 1743 return c 1744 } 1745 1746 // Limit sets the optional parameter "limit": 1747 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) Limit(limit int64) *ProjectsLocationsCustomresourcedefinitionsListCall { 1748 c.urlParams_.Set("limit", fmt.Sprint(limit)) 1749 return c 1750 } 1751 1752 // ResourceVersion sets the optional parameter "resourceVersion": The 1753 // baseline resource version from which the list or watch operation 1754 // should start. Not currently used by Cloud Run. 1755 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) ResourceVersion(resourceVersion string) *ProjectsLocationsCustomresourcedefinitionsListCall { 1756 c.urlParams_.Set("resourceVersion", resourceVersion) 1757 return c 1758 } 1759 1760 // Watch sets the optional parameter "watch": Flag that indicates that 1761 // the client expects to watch this resource as well. Not currently used 1762 // by Cloud Run. 1763 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) Watch(watch bool) *ProjectsLocationsCustomresourcedefinitionsListCall { 1764 c.urlParams_.Set("watch", fmt.Sprint(watch)) 1765 return c 1766 } 1767 1768 // Fields allows partial responses to be retrieved. See 1769 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1770 // for more information. 1771 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomresourcedefinitionsListCall { 1772 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1773 return c 1774 } 1775 1776 // IfNoneMatch sets the optional parameter which makes the operation 1777 // fail if the object's ETag matches the given value. This is useful for 1778 // getting updates only after the object has changed since the last 1779 // request. Use googleapi.IsNotModified to check whether the response 1780 // error from Do is the result of In-None-Match. 1781 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomresourcedefinitionsListCall { 1782 c.ifNoneMatch_ = entityTag 1783 return c 1784 } 1785 1786 // Context sets the context to be used in this call's Do method. Any 1787 // pending HTTP request will be aborted if the provided context is 1788 // canceled. 1789 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) Context(ctx context.Context) *ProjectsLocationsCustomresourcedefinitionsListCall { 1790 c.ctx_ = ctx 1791 return c 1792 } 1793 1794 // Header returns an http.Header that can be modified by the caller to 1795 // add HTTP headers to the request. 1796 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) Header() http.Header { 1797 if c.header_ == nil { 1798 c.header_ = make(http.Header) 1799 } 1800 return c.header_ 1801 } 1802 1803 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) doRequest(alt string) (*http.Response, error) { 1804 reqHeaders := make(http.Header) 1805 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210331") 1806 for k, v := range c.header_ { 1807 reqHeaders[k] = v 1808 } 1809 reqHeaders.Set("User-Agent", c.s.userAgent()) 1810 if c.ifNoneMatch_ != "" { 1811 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1812 } 1813 var body io.Reader = nil 1814 c.urlParams_.Set("alt", alt) 1815 c.urlParams_.Set("prettyPrint", "false") 1816 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/customresourcedefinitions") 1817 urls += "?" + c.urlParams_.Encode() 1818 req, err := http.NewRequest("GET", urls, body) 1819 if err != nil { 1820 return nil, err 1821 } 1822 req.Header = reqHeaders 1823 googleapi.Expand(req.URL, map[string]string{ 1824 "parent": c.parent, 1825 }) 1826 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1827 } 1828 1829 // Do executes the "run.projects.locations.customresourcedefinitions.list" call. 1830 // Exactly one of *ListCustomResourceDefinitionsResponse or error will 1831 // be non-nil. Any non-2xx status code is an error. Response headers are 1832 // in either 1833 // *ListCustomResourceDefinitionsResponse.ServerResponse.Header or (if a 1834 // response was returned at all) in error.(*googleapi.Error).Header. Use 1835 // googleapi.IsNotModified to check whether the returned error was 1836 // because http.StatusNotModified was returned. 1837 func (c *ProjectsLocationsCustomresourcedefinitionsListCall) Do(opts ...googleapi.CallOption) (*ListCustomResourceDefinitionsResponse, error) { 1838 gensupport.SetOptions(c.urlParams_, opts...) 1839 res, err := c.doRequest("json") 1840 if res != nil && res.StatusCode == http.StatusNotModified { 1841 if res.Body != nil { 1842 res.Body.Close() 1843 } 1844 return nil, &googleapi.Error{ 1845 Code: res.StatusCode, 1846 Header: res.Header, 1847 } 1848 } 1849 if err != nil { 1850 return nil, err 1851 } 1852 defer googleapi.CloseBody(res) 1853 if err := googleapi.CheckResponse(res); err != nil { 1854 return nil, err 1855 } 1856 ret := &ListCustomResourceDefinitionsResponse{ 1857 ServerResponse: googleapi.ServerResponse{ 1858 Header: res.Header, 1859 HTTPStatusCode: res.StatusCode, 1860 }, 1861 } 1862 target := &ret 1863 if err := gensupport.DecodeResponse(target, res); err != nil { 1864 return nil, err 1865 } 1866 return ret, nil 1867 // { 1868 // "description": "Rpc to list custom resource definitions.", 1869 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/customresourcedefinitions", 1870 // "httpMethod": "GET", 1871 // "id": "run.projects.locations.customresourcedefinitions.list", 1872 // "parameterOrder": [ 1873 // "parent" 1874 // ], 1875 // "parameters": { 1876 // "continue": { 1877 // "description": "Optional encoded string to continue paging.", 1878 // "location": "query", 1879 // "type": "string" 1880 // }, 1881 // "fieldSelector": { 1882 // "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.", 1883 // "location": "query", 1884 // "type": "string" 1885 // }, 1886 // "includeUninitialized": { 1887 // "description": "Not currently used by Cloud Run.", 1888 // "location": "query", 1889 // "type": "boolean" 1890 // }, 1891 // "labelSelector": { 1892 // "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 1893 // "location": "query", 1894 // "type": "string" 1895 // }, 1896 // "limit": { 1897 // "format": "int32", 1898 // "location": "query", 1899 // "type": "integer" 1900 // }, 1901 // "parent": { 1902 // "description": "The project ID or project number from which the storages should be listed.", 1903 // "location": "path", 1904 // "pattern": "^projects/[^/]+/locations/[^/]+$", 1905 // "required": true, 1906 // "type": "string" 1907 // }, 1908 // "resourceVersion": { 1909 // "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 1910 // "location": "query", 1911 // "type": "string" 1912 // }, 1913 // "watch": { 1914 // "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 1915 // "location": "query", 1916 // "type": "boolean" 1917 // } 1918 // }, 1919 // "path": "v1beta1/{+parent}/customresourcedefinitions", 1920 // "response": { 1921 // "$ref": "ListCustomResourceDefinitionsResponse" 1922 // }, 1923 // "scopes": [ 1924 // "https://www.googleapis.com/auth/cloud-platform" 1925 // ] 1926 // } 1927 1928 } 1929