1 // Copyright 2022 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. 38 package run // import "google.golang.org/api/run/v1alpha1" 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 internal "google.golang.org/api/internal" 54 gensupport "google.golang.org/api/internal/gensupport" 55 option "google.golang.org/api/option" 56 internaloption "google.golang.org/api/option/internaloption" 57 htransport "google.golang.org/api/transport/http" 58 ) 59 60 // Always reference these packages, just in case the auto-generated code 61 // below doesn't. 62 var _ = bytes.NewBuffer 63 var _ = strconv.Itoa 64 var _ = fmt.Sprintf 65 var _ = json.NewDecoder 66 var _ = io.Copy 67 var _ = url.Parse 68 var _ = gensupport.MarshalJSON 69 var _ = googleapi.Version 70 var _ = errors.New 71 var _ = strings.Replace 72 var _ = context.Canceled 73 var _ = internaloption.WithDefaultEndpoint 74 75 const apiId = "run:v1alpha1" 76 const apiName = "run" 77 const apiVersion = "v1alpha1" 78 const basePath = "https://run.googleapis.com/" 79 const mtlsBasePath = "https://run.mtls.googleapis.com/" 80 81 // OAuth2 scopes used by this API. 82 const ( 83 // See, edit, configure, and delete your Google Cloud data and see the 84 // email address for your Google Account. 85 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 86 ) 87 88 // NewService creates a new Service. 89 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 90 scopesOption := internaloption.WithDefaultScopes( 91 "https://www.googleapis.com/auth/cloud-platform", 92 ) 93 // NOTE: prepend, so we don't override user-specified scopes. 94 opts = append([]option.ClientOption{scopesOption}, opts...) 95 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 96 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 97 client, endpoint, err := htransport.NewClient(ctx, opts...) 98 if err != nil { 99 return nil, err 100 } 101 s, err := New(client) 102 if err != nil { 103 return nil, err 104 } 105 if endpoint != "" { 106 s.BasePath = endpoint 107 } 108 return s, nil 109 } 110 111 // New creates a new Service. It uses the provided http.Client for requests. 112 // 113 // Deprecated: please use NewService instead. 114 // To provide a custom HTTP client, use option.WithHTTPClient. 115 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 116 func New(client *http.Client) (*Service, error) { 117 if client == nil { 118 return nil, errors.New("client is nil") 119 } 120 s := &Service{client: client, BasePath: basePath} 121 s.Namespaces = NewNamespacesService(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 Namespaces *NamespacesService 131 } 132 133 func (s *Service) userAgent() string { 134 if s.UserAgent == "" { 135 return googleapi.UserAgent 136 } 137 return googleapi.UserAgent + " " + s.UserAgent 138 } 139 140 func NewNamespacesService(s *Service) *NamespacesService { 141 rs := &NamespacesService{s: s} 142 rs.Jobs = NewNamespacesJobsService(s) 143 return rs 144 } 145 146 type NamespacesService struct { 147 s *Service 148 149 Jobs *NamespacesJobsService 150 } 151 152 func NewNamespacesJobsService(s *Service) *NamespacesJobsService { 153 rs := &NamespacesJobsService{s: s} 154 return rs 155 } 156 157 type NamespacesJobsService struct { 158 s *Service 159 } 160 161 // ConfigMapEnvSource: Not supported by Cloud Run ConfigMapEnvSource 162 // selects a ConfigMap to populate the environment variables with. The 163 // contents of the target ConfigMap's Data field will represent the 164 // key-value pairs as environment variables. 165 type ConfigMapEnvSource struct { 166 // LocalObjectReference: This field should not be used directly as it is 167 // meant to be inlined directly into the message. Use the "name" field 168 // instead. 169 LocalObjectReference *LocalObjectReference `json:"localObjectReference,omitempty"` 170 171 // Name: The ConfigMap to select from. 172 Name string `json:"name,omitempty"` 173 174 // Optional: (Optional) Specify whether the ConfigMap must be defined 175 Optional bool `json:"optional,omitempty"` 176 177 // ForceSendFields is a list of field names (e.g. 178 // "LocalObjectReference") to unconditionally include in API requests. 179 // By default, fields with empty or default values are omitted from API 180 // requests. However, any non-pointer, non-interface field appearing in 181 // ForceSendFields will be sent to the server regardless of whether the 182 // field is empty or not. This may be used to include empty fields in 183 // Patch requests. 184 ForceSendFields []string `json:"-"` 185 186 // NullFields is a list of field names (e.g. "LocalObjectReference") to 187 // include in API requests with the JSON null value. By default, fields 188 // with empty values are omitted from API requests. However, any field 189 // with an empty value appearing in NullFields will be sent to the 190 // server as null. It is an error if a field in this list has a 191 // non-empty value. This may be used to include null fields in Patch 192 // requests. 193 NullFields []string `json:"-"` 194 } 195 196 func (s *ConfigMapEnvSource) MarshalJSON() ([]byte, error) { 197 type NoMethod ConfigMapEnvSource 198 raw := NoMethod(*s) 199 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 200 } 201 202 // ConfigMapKeySelector: Not supported by Cloud Run Selects a key from a 203 // ConfigMap. 204 type ConfigMapKeySelector struct { 205 // Key: The key to select. 206 Key string `json:"key,omitempty"` 207 208 // LocalObjectReference: This field should not be used directly as it is 209 // meant to be inlined directly into the message. Use the "name" field 210 // instead. 211 LocalObjectReference *LocalObjectReference `json:"localObjectReference,omitempty"` 212 213 // Name: The ConfigMap to select from. 214 Name string `json:"name,omitempty"` 215 216 // Optional: (Optional) Specify whether the ConfigMap or its key must be 217 // defined 218 Optional bool `json:"optional,omitempty"` 219 220 // ForceSendFields is a list of field names (e.g. "Key") to 221 // unconditionally include in API requests. By default, fields with 222 // empty or default values are omitted from API requests. However, any 223 // non-pointer, non-interface field appearing in ForceSendFields will be 224 // sent to the server regardless of whether the field is empty or not. 225 // This may be used to include empty fields in Patch requests. 226 ForceSendFields []string `json:"-"` 227 228 // NullFields is a list of field names (e.g. "Key") to include in API 229 // requests with the JSON null value. By default, fields with empty 230 // values are omitted from API requests. However, any field with an 231 // empty value appearing in NullFields will be sent to the server as 232 // null. It is an error if a field in this list has a non-empty value. 233 // This may be used to include null fields in Patch requests. 234 NullFields []string `json:"-"` 235 } 236 237 func (s *ConfigMapKeySelector) MarshalJSON() ([]byte, error) { 238 type NoMethod ConfigMapKeySelector 239 raw := NoMethod(*s) 240 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 241 } 242 243 // ConfigMapVolumeSource: Not supported by Cloud Run Adapts a ConfigMap 244 // into a volume. The contents of the target ConfigMap's Data field will 245 // be presented in a volume as files using the keys in the Data field as 246 // the file names, unless the items element is populated with specific 247 // mappings of keys to paths. 248 type ConfigMapVolumeSource struct { 249 // DefaultMode: (Optional) Integer representation of mode bits to use on 250 // created files by default. Must be a value between 01 and 0777 251 // (octal). If 0 or not set, it will default to 0644. Directories within 252 // the path are not affected by this setting. Notes * Internally, a 253 // umask of 0222 will be applied to any non-zero value. * This is an 254 // integer representation of the mode bits. So, the octal integer value 255 // should look exactly as the chmod numeric notation with a leading 256 // zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 257 // 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 258 // (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 259 // 493 (base-10). * This might be in conflict with other options that 260 // affect the file mode, like fsGroup, and the result can be other mode 261 // bits set. 262 DefaultMode int64 `json:"defaultMode,omitempty"` 263 264 // Items: (Optional) If unspecified, each key-value pair in the Data 265 // field of the referenced Secret will be projected into the volume as a 266 // file whose name is the key and content is the value. If specified, 267 // the listed keys will be projected into the specified paths, and 268 // unlisted keys will not be present. If a key is specified that is not 269 // present in the Secret, the volume setup will error unless it is 270 // marked optional. 271 Items []*KeyToPath `json:"items,omitempty"` 272 273 // Name: Name of the config. 274 Name string `json:"name,omitempty"` 275 276 // Optional: (Optional) Specify whether the Secret or its keys must be 277 // defined. 278 Optional bool `json:"optional,omitempty"` 279 280 // ForceSendFields is a list of field names (e.g. "DefaultMode") to 281 // unconditionally include in API requests. By default, fields with 282 // empty or default values are omitted from API requests. However, any 283 // non-pointer, non-interface field appearing in ForceSendFields will be 284 // sent to the server regardless of whether the field is empty or not. 285 // This may be used to include empty fields in Patch requests. 286 ForceSendFields []string `json:"-"` 287 288 // NullFields is a list of field names (e.g. "DefaultMode") to include 289 // in API requests with the JSON null value. By default, fields with 290 // empty values are omitted from API requests. However, any field with 291 // an empty value appearing in NullFields will be sent to the server as 292 // null. It is an error if a field in this list has a non-empty value. 293 // This may be used to include null fields in Patch requests. 294 NullFields []string `json:"-"` 295 } 296 297 func (s *ConfigMapVolumeSource) MarshalJSON() ([]byte, error) { 298 type NoMethod ConfigMapVolumeSource 299 raw := NoMethod(*s) 300 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 301 } 302 303 // Container: A single application container. This specifies both the 304 // container to run, the command to run in the container and the 305 // arguments to supply to it. Note that additional arguments may be 306 // supplied by the system to the container at runtime. 307 type Container struct { 308 // Args: (Optional) Arguments to the entrypoint. The docker image's CMD 309 // is used if this is not provided. Variable references $(VAR_NAME) are 310 // expanded using the container's environment. If a variable cannot be 311 // resolved, the reference in the input string will be unchanged. The 312 // $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). 313 // Escaped references will never be expanded, regardless of whether the 314 // variable exists or not. More info: 315 // https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell 316 Args []string `json:"args,omitempty"` 317 318 Command []string `json:"command,omitempty"` 319 320 // Env: (Optional) List of environment variables to set in the 321 // container. 322 Env []*EnvVar `json:"env,omitempty"` 323 324 // EnvFrom: (Optional) List of sources to populate environment variables 325 // in the container. The keys defined within a source must be a 326 // C_IDENTIFIER. All invalid keys will be reported as an event when the 327 // container is starting. When a key exists in multiple sources, the 328 // value associated with the last source will take precedence. Values 329 // defined by an Env with a duplicate key will take precedence. Cannot 330 // be updated. 331 EnvFrom []*EnvFromSource `json:"envFrom,omitempty"` 332 333 // Image: Only supports containers from Google Container Registry or 334 // Artifact Registry URL of the Container image. More info: 335 // https://kubernetes.io/docs/concepts/containers/images 336 Image string `json:"image,omitempty"` 337 338 // ImagePullPolicy: (Optional) Image pull policy. One of Always, Never, 339 // IfNotPresent. Defaults to Always if :latest tag is specified, or 340 // IfNotPresent otherwise. More info: 341 // https://kubernetes.io/docs/concepts/containers/images#updating-images 342 ImagePullPolicy string `json:"imagePullPolicy,omitempty"` 343 344 // LivenessProbe: (Optional) Periodic probe of container liveness. 345 // Container will be restarted if the probe fails. More info: 346 // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 347 LivenessProbe *Probe `json:"livenessProbe,omitempty"` 348 349 // Name: (Optional) Name of the container specified as a DNS_LABEL. 350 // Currently unused in Cloud Run. More info: 351 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names 352 Name string `json:"name,omitempty"` 353 354 // Ports: (Optional) List of ports to expose from the container. Only a 355 // single port can be specified. The specified ports must be listening 356 // on all interfaces (0.0.0.0) within the container to be accessible. If 357 // omitted, a port number will be chosen and passed to the container 358 // through the PORT environment variable for the container to listen on. 359 Ports []*ContainerPort `json:"ports,omitempty"` 360 361 // ReadinessProbe: (Optional) Periodic probe of container service 362 // readiness. Container will be removed from service endpoints if the 363 // probe fails. More info: 364 // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 365 ReadinessProbe *Probe `json:"readinessProbe,omitempty"` 366 367 // Resources: (Optional) Compute Resources required by this container. 368 // More info: 369 // https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources 370 Resources *ResourceRequirements `json:"resources,omitempty"` 371 372 // SecurityContext: (Optional) Security options the pod should run with. 373 // More info: 374 // https://kubernetes.io/docs/concepts/policy/security-context/ More 375 // info: 376 // https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ 377 SecurityContext *SecurityContext `json:"securityContext,omitempty"` 378 379 // StartupProbe: (Optional) Startup probe of application within the 380 // container. All other probes are disabled if a startup probe is 381 // provided, until it succeeds. Container will not be added to service 382 // endpoints if the probe fails. More info: 383 // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 384 StartupProbe *Probe `json:"startupProbe,omitempty"` 385 386 // TerminationMessagePath: (Optional) Path at which the file to which 387 // the container's termination message will be written is mounted into 388 // the container's filesystem. Message written is intended to be brief 389 // final status, such as an assertion failure message. Will be truncated 390 // by the node if greater than 4096 bytes. The total message length 391 // across all containers will be limited to 12kb. Defaults to 392 // /dev/termination-log. 393 TerminationMessagePath string `json:"terminationMessagePath,omitempty"` 394 395 // TerminationMessagePolicy: (Optional) Indicate how the termination 396 // message should be populated. File will use the contents of 397 // terminationMessagePath to populate the container status message on 398 // both success and failure. FallbackToLogsOnError will use the last 399 // chunk of container log output if the termination message file is 400 // empty and the container exited with an error. The log output is 401 // limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to 402 // File. Cannot be updated. 403 TerminationMessagePolicy string `json:"terminationMessagePolicy,omitempty"` 404 405 // VolumeMounts: (Optional) Volume to mount into the container's 406 // filesystem. Only supports SecretVolumeSources. Pod volumes to mount 407 // into the container's filesystem. 408 VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"` 409 410 // WorkingDir: (Optional) Container's working directory. If not 411 // specified, the container runtime's default will be used, which might 412 // be configured in the container image. 413 WorkingDir string `json:"workingDir,omitempty"` 414 415 // ForceSendFields is a list of field names (e.g. "Args") to 416 // unconditionally include in API requests. By default, fields with 417 // empty or default values are omitted from API requests. However, any 418 // non-pointer, non-interface field appearing in ForceSendFields will be 419 // sent to the server regardless of whether the field is empty or not. 420 // This may be used to include empty fields in Patch requests. 421 ForceSendFields []string `json:"-"` 422 423 // NullFields is a list of field names (e.g. "Args") to include in API 424 // requests with the JSON null value. By default, fields with empty 425 // values are omitted from API requests. However, any field with an 426 // empty value appearing in NullFields will be sent to the server as 427 // null. It is an error if a field in this list has a non-empty value. 428 // This may be used to include null fields in Patch requests. 429 NullFields []string `json:"-"` 430 } 431 432 func (s *Container) MarshalJSON() ([]byte, error) { 433 type NoMethod Container 434 raw := NoMethod(*s) 435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 436 } 437 438 // ContainerPort: ContainerPort represents a network port in a single 439 // container. 440 type ContainerPort struct { 441 // ContainerPort: (Optional) Port number the container listens on. This 442 // must be a valid port number, 0 < x < 65536. 443 ContainerPort int64 `json:"containerPort,omitempty"` 444 445 // Name: (Optional) If specified, used to specify which protocol to use. 446 // Allowed values are "http1" and "h2c". 447 Name string `json:"name,omitempty"` 448 449 // Protocol: (Optional) Protocol for port. Must be "TCP". Defaults to 450 // "TCP". 451 Protocol string `json:"protocol,omitempty"` 452 453 // ForceSendFields is a list of field names (e.g. "ContainerPort") to 454 // unconditionally include in API requests. By default, fields with 455 // empty or default values are omitted from API requests. However, any 456 // non-pointer, non-interface field appearing in ForceSendFields will be 457 // sent to the server regardless of whether the field is empty or not. 458 // This may be used to include empty fields in Patch requests. 459 ForceSendFields []string `json:"-"` 460 461 // NullFields is a list of field names (e.g. "ContainerPort") to include 462 // in API requests with the JSON null value. By default, fields with 463 // empty values are omitted from API requests. However, any field with 464 // an empty value appearing in NullFields will be sent to the server as 465 // null. It is an error if a field in this list has a non-empty value. 466 // This may be used to include null fields in Patch requests. 467 NullFields []string `json:"-"` 468 } 469 470 func (s *ContainerPort) MarshalJSON() ([]byte, error) { 471 type NoMethod ContainerPort 472 raw := NoMethod(*s) 473 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 474 } 475 476 // Empty: A generic empty message that you can re-use to avoid defining 477 // duplicated empty messages in your APIs. A typical example is to use 478 // it as the request or the response type of an API method. For 479 // instance: service Foo { rpc Bar(google.protobuf.Empty) returns 480 // (google.protobuf.Empty); } 481 type Empty struct { 482 // ServerResponse contains the HTTP response code and headers from the 483 // server. 484 googleapi.ServerResponse `json:"-"` 485 } 486 487 // EnvFromSource: Not supported by Cloud Run EnvFromSource represents 488 // the source of a set of ConfigMaps 489 type EnvFromSource struct { 490 // ConfigMapRef: (Optional) The ConfigMap to select from 491 ConfigMapRef *ConfigMapEnvSource `json:"configMapRef,omitempty"` 492 493 // Prefix: (Optional) An optional identifier to prepend to each key in 494 // the ConfigMap. Must be a C_IDENTIFIER. 495 Prefix string `json:"prefix,omitempty"` 496 497 // SecretRef: (Optional) The Secret to select from 498 SecretRef *SecretEnvSource `json:"secretRef,omitempty"` 499 500 // ForceSendFields is a list of field names (e.g. "ConfigMapRef") to 501 // unconditionally include in API requests. By default, fields with 502 // empty or default values are omitted from API requests. However, any 503 // non-pointer, non-interface field appearing in ForceSendFields will be 504 // sent to the server regardless of whether the field is empty or not. 505 // This may be used to include empty fields in Patch requests. 506 ForceSendFields []string `json:"-"` 507 508 // NullFields is a list of field names (e.g. "ConfigMapRef") to include 509 // in API requests with the JSON null value. By default, fields with 510 // empty values are omitted from API requests. However, any field with 511 // an empty value appearing in NullFields will be sent to the server as 512 // null. It is an error if a field in this list has a non-empty value. 513 // This may be used to include null fields in Patch requests. 514 NullFields []string `json:"-"` 515 } 516 517 func (s *EnvFromSource) MarshalJSON() ([]byte, error) { 518 type NoMethod EnvFromSource 519 raw := NoMethod(*s) 520 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 521 } 522 523 // EnvVar: EnvVar represents an environment variable present in a 524 // Container. 525 type EnvVar struct { 526 // Name: Name of the environment variable. Must be a C_IDENTIFIER. 527 Name string `json:"name,omitempty"` 528 529 // Value: (Optional) Variable references $(VAR_NAME) are expanded using 530 // the previous defined environment variables in the container and any 531 // route environment variables. If a variable cannot be resolved, the 532 // reference in the input string will be unchanged. The $(VAR_NAME) 533 // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped 534 // references will never be expanded, regardless of whether the variable 535 // exists or not. Defaults to "". 536 Value string `json:"value,omitempty"` 537 538 // ValueFrom: (Optional) Source for the environment variable's value. 539 // Only supports secret_key_ref. Source for the environment variable's 540 // value. Cannot be used if value is not empty. 541 ValueFrom *EnvVarSource `json:"valueFrom,omitempty"` 542 543 // ForceSendFields is a list of field names (e.g. "Name") to 544 // unconditionally include in API requests. By default, fields with 545 // empty or default values are omitted from API requests. However, any 546 // non-pointer, non-interface field appearing in ForceSendFields will be 547 // sent to the server regardless of whether the field is empty or not. 548 // This may be used to include empty fields in Patch requests. 549 ForceSendFields []string `json:"-"` 550 551 // NullFields is a list of field names (e.g. "Name") to include in API 552 // requests with the JSON null value. By default, fields with empty 553 // values are omitted from API requests. However, any field with an 554 // empty value appearing in NullFields will be sent to the server as 555 // null. It is an error if a field in this list has a non-empty value. 556 // This may be used to include null fields in Patch requests. 557 NullFields []string `json:"-"` 558 } 559 560 func (s *EnvVar) MarshalJSON() ([]byte, error) { 561 type NoMethod EnvVar 562 raw := NoMethod(*s) 563 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 564 } 565 566 // EnvVarSource: EnvVarSource represents a source for the value of an 567 // EnvVar. 568 type EnvVarSource struct { 569 // ConfigMapKeyRef: (Optional) Not supported by Cloud Run Selects a key 570 // of a ConfigMap. 571 ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty"` 572 573 // SecretKeyRef: (Optional) Selects a key (version) of a secret in 574 // Secret Manager. 575 SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty"` 576 577 // ForceSendFields is a list of field names (e.g. "ConfigMapKeyRef") to 578 // unconditionally include in API requests. By default, fields with 579 // empty or default values are omitted from API requests. However, any 580 // non-pointer, non-interface field appearing in ForceSendFields will be 581 // sent to the server regardless of whether the field is empty or not. 582 // This may be used to include empty fields in Patch requests. 583 ForceSendFields []string `json:"-"` 584 585 // NullFields is a list of field names (e.g. "ConfigMapKeyRef") to 586 // include in API requests with the JSON null value. By default, fields 587 // with empty values are omitted from API requests. However, any field 588 // with an empty value appearing in NullFields will be sent to the 589 // server as null. It is an error if a field in this list has a 590 // non-empty value. This may be used to include null fields in Patch 591 // requests. 592 NullFields []string `json:"-"` 593 } 594 595 func (s *EnvVarSource) MarshalJSON() ([]byte, error) { 596 type NoMethod EnvVarSource 597 raw := NoMethod(*s) 598 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 599 } 600 601 // ExecAction: Not supported by Cloud Run ExecAction describes a "run in 602 // container" action. 603 type ExecAction struct { 604 // Command: (Optional) Command is the command line to execute inside the 605 // container, the working directory for the command is root ('/') in the 606 // container's filesystem. The command is simply exec'd, it is not run 607 // inside a shell, so traditional shell instructions ('|', etc) won't 608 // work. To use a shell, you need to explicitly call out to that shell. 609 // Exit status of 0 is treated as live/healthy and non-zero is 610 // unhealthy. 611 Command []string `json:"command,omitempty"` 612 613 // ForceSendFields is a list of field names (e.g. "Command") to 614 // unconditionally include in API requests. By default, fields with 615 // empty or default values are omitted from API requests. However, any 616 // non-pointer, non-interface field appearing in ForceSendFields will be 617 // sent to the server regardless of whether the field is empty or not. 618 // This may be used to include empty fields in Patch requests. 619 ForceSendFields []string `json:"-"` 620 621 // NullFields is a list of field names (e.g. "Command") to include in 622 // API requests with the JSON null value. By default, fields with empty 623 // values are omitted from API requests. However, any field with an 624 // empty value appearing in NullFields will be sent to the server as 625 // null. It is an error if a field in this list has a non-empty value. 626 // This may be used to include null fields in Patch requests. 627 NullFields []string `json:"-"` 628 } 629 630 func (s *ExecAction) MarshalJSON() ([]byte, error) { 631 type NoMethod ExecAction 632 raw := NoMethod(*s) 633 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 634 } 635 636 // GRPCAction: Not supported by Cloud Run GRPCAction describes an action 637 // involving a GRPC port. 638 type GRPCAction struct { 639 // Port: Port number of the gRPC service. Number must be in the range 1 640 // to 65535. 641 Port int64 `json:"port,omitempty"` 642 643 // Service: Service is the name of the service to place in the gRPC 644 // HealthCheckRequest (see 645 // https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If 646 // this is not specified, the default behavior is defined by gRPC. 647 Service string `json:"service,omitempty"` 648 649 // ForceSendFields is a list of field names (e.g. "Port") to 650 // unconditionally include in API requests. By default, fields with 651 // empty or default values are omitted from API requests. However, any 652 // non-pointer, non-interface field appearing in ForceSendFields will be 653 // sent to the server regardless of whether the field is empty or not. 654 // This may be used to include empty fields in Patch requests. 655 ForceSendFields []string `json:"-"` 656 657 // NullFields is a list of field names (e.g. "Port") to include in API 658 // 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 666 func (s *GRPCAction) MarshalJSON() ([]byte, error) { 667 type NoMethod GRPCAction 668 raw := NoMethod(*s) 669 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 670 } 671 672 // GoogleRpcStatus: The `Status` type defines a logical error model that 673 // is suitable for different programming environments, including REST 674 // APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 675 // `Status` message contains three pieces of data: error code, error 676 // message, and error details. You can find out more about this error 677 // model and how to work with it in the API Design Guide 678 // (https://cloud.google.com/apis/design/errors). 679 type GoogleRpcStatus struct { 680 // Code: The status code, which should be an enum value of 681 // google.rpc.Code. 682 Code int64 `json:"code,omitempty"` 683 684 // Details: A list of messages that carry the error details. There is a 685 // common set of message types for APIs to use. 686 Details []googleapi.RawMessage `json:"details,omitempty"` 687 688 // Message: A developer-facing error message, which should be in 689 // English. Any user-facing error message should be localized and sent 690 // in the google.rpc.Status.details field, or localized by the client. 691 Message string `json:"message,omitempty"` 692 693 // ForceSendFields is a list of field names (e.g. "Code") to 694 // unconditionally include in API requests. By default, fields with 695 // empty or default values are omitted from API requests. However, any 696 // non-pointer, non-interface field appearing in ForceSendFields will be 697 // sent to the server regardless of whether the field is empty or not. 698 // This may be used to include empty fields in Patch requests. 699 ForceSendFields []string `json:"-"` 700 701 // NullFields is a list of field names (e.g. "Code") to include in API 702 // requests with the JSON null value. By default, fields with empty 703 // values are omitted from API requests. However, any field with an 704 // empty value appearing in NullFields will be sent to the server as 705 // null. It is an error if a field in this list has a non-empty value. 706 // This may be used to include null fields in Patch requests. 707 NullFields []string `json:"-"` 708 } 709 710 func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 711 type NoMethod GoogleRpcStatus 712 raw := NoMethod(*s) 713 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 714 } 715 716 // HTTPGetAction: Not supported by Cloud Run HTTPGetAction describes an 717 // action based on HTTP Get requests. 718 type HTTPGetAction struct { 719 // Host: (Optional) Host name to connect to, defaults to the pod IP. You 720 // probably want to set "Host" in httpHeaders instead. 721 Host string `json:"host,omitempty"` 722 723 // HttpHeaders: (Optional) Custom headers to set in the request. HTTP 724 // allows repeated headers. 725 HttpHeaders []*HTTPHeader `json:"httpHeaders,omitempty"` 726 727 // Path: (Optional) Path to access on the HTTP server. 728 Path string `json:"path,omitempty"` 729 730 // Scheme: (Optional) Scheme to use for connecting to the host. Defaults 731 // to HTTP. 732 Scheme string `json:"scheme,omitempty"` 733 734 // ForceSendFields is a list of field names (e.g. "Host") to 735 // unconditionally include in API requests. By default, fields with 736 // empty or default values are omitted from API requests. However, any 737 // non-pointer, non-interface field appearing in ForceSendFields will be 738 // sent to the server regardless of whether the field is empty or not. 739 // This may be used to include empty fields in Patch requests. 740 ForceSendFields []string `json:"-"` 741 742 // NullFields is a list of field names (e.g. "Host") to include in API 743 // requests with the JSON null value. By default, fields with empty 744 // values are omitted from API requests. However, any field with an 745 // empty value appearing in NullFields will be sent to the server as 746 // null. It is an error if a field in this list has a non-empty value. 747 // This may be used to include null fields in Patch requests. 748 NullFields []string `json:"-"` 749 } 750 751 func (s *HTTPGetAction) MarshalJSON() ([]byte, error) { 752 type NoMethod HTTPGetAction 753 raw := NoMethod(*s) 754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 755 } 756 757 // HTTPHeader: Not supported by Cloud Run HTTPHeader describes a custom 758 // header to be used in HTTP probes 759 type HTTPHeader struct { 760 // Name: The header field name 761 Name string `json:"name,omitempty"` 762 763 // Value: The header field value 764 Value string `json:"value,omitempty"` 765 766 // ForceSendFields is a list of field names (e.g. "Name") to 767 // unconditionally include in API requests. By default, fields with 768 // empty or default values are omitted from API requests. However, any 769 // non-pointer, non-interface field appearing in ForceSendFields will be 770 // sent to the server regardless of whether the field is empty or not. 771 // This may be used to include empty fields in Patch requests. 772 ForceSendFields []string `json:"-"` 773 774 // NullFields is a list of field names (e.g. "Name") to include in API 775 // requests with the JSON null value. By default, fields with empty 776 // values are omitted from API requests. However, any field with an 777 // empty value appearing in NullFields will be sent to the server as 778 // null. It is an error if a field in this list has a non-empty value. 779 // This may be used to include null fields in Patch requests. 780 NullFields []string `json:"-"` 781 } 782 783 func (s *HTTPHeader) MarshalJSON() ([]byte, error) { 784 type NoMethod HTTPHeader 785 raw := NoMethod(*s) 786 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 787 } 788 789 // InstanceAttemptResult: Result of an instance attempt. 790 type InstanceAttemptResult struct { 791 // ExitCode: Optional. The exit code of this attempt. This may be unset 792 // if the container was unable to exit cleanly with a code due to some 793 // other failure. See status field for possible failure details. 794 ExitCode int64 `json:"exitCode,omitempty"` 795 796 // Status: Optional. The status of this attempt. If the status code is 797 // OK, then the attempt succeeded. 798 Status *GoogleRpcStatus `json:"status,omitempty"` 799 800 // ForceSendFields is a list of field names (e.g. "ExitCode") to 801 // unconditionally include in API requests. By default, fields with 802 // empty or default values are omitted from API requests. However, any 803 // non-pointer, non-interface field appearing in ForceSendFields will be 804 // sent to the server regardless of whether the field is empty or not. 805 // This may be used to include empty fields in Patch requests. 806 ForceSendFields []string `json:"-"` 807 808 // NullFields is a list of field names (e.g. "ExitCode") to include in 809 // API requests with the JSON null value. By default, fields with empty 810 // values are omitted from API requests. However, any field with an 811 // empty value appearing in NullFields will be sent to the server as 812 // null. It is an error if a field in this list has a non-empty value. 813 // This may be used to include null fields in Patch requests. 814 NullFields []string `json:"-"` 815 } 816 817 func (s *InstanceAttemptResult) MarshalJSON() ([]byte, error) { 818 type NoMethod InstanceAttemptResult 819 raw := NoMethod(*s) 820 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 821 } 822 823 // InstanceSpec: InstanceSpec is a description of an instance. 824 type InstanceSpec struct { 825 // ActiveDeadlineSeconds: Optional. Optional duration in seconds the 826 // instance may be active relative to StartTime before the system will 827 // actively try to mark it failed and kill associated containers. If set 828 // to zero, the system will never attempt to kill an instance based on 829 // time. Otherwise, value must be a positive integer. +optional 830 ActiveDeadlineSeconds int64 `json:"activeDeadlineSeconds,omitempty,string"` 831 832 // Containers: Optional. List of containers belonging to the instance. 833 // We disallow a number of fields on this Container. Only a single 834 // container may be provided. 835 Containers []*Container `json:"containers,omitempty"` 836 837 // RestartPolicy: Optional. Restart policy for all containers within the 838 // instance. Allowed values are: - OnFailure: Instances will always be 839 // restarted on failure if the backoffLimit has not been reached. - 840 // Never: Instances are never restarted and all failures are permanent. 841 // Cannot be used if backoffLimit is set. +optional 842 RestartPolicy string `json:"restartPolicy,omitempty"` 843 844 // ServiceAccountName: Optional. Email address of the IAM service 845 // account associated with the instance of a Job. The service account 846 // represents the identity of the running instance, and determines what 847 // permissions the instance has. If not provided, the instance will use 848 // the project's default service account. +optional 849 ServiceAccountName string `json:"serviceAccountName,omitempty"` 850 851 // TerminationGracePeriodSeconds: Optional. Optional duration in seconds 852 // the instance needs to terminate gracefully. Value must be 853 // non-negative integer. The value zero indicates delete immediately. 854 // The grace period is the duration in seconds after the processes 855 // running in the instance are sent a termination signal and the time 856 // when the processes are forcibly halted with a kill signal. Set this 857 // value longer than the expected cleanup time for your process. 858 // +optional 859 TerminationGracePeriodSeconds int64 `json:"terminationGracePeriodSeconds,omitempty,string"` 860 861 // Volumes: Optional. List of volumes that can be mounted by containers 862 // belonging to the instance. More info: 863 // https://kubernetes.io/docs/concepts/storage/volumes +optional 864 Volumes []*Volume `json:"volumes,omitempty"` 865 866 // ForceSendFields is a list of field names (e.g. 867 // "ActiveDeadlineSeconds") to unconditionally include in API requests. 868 // By default, fields with empty or default values are omitted from API 869 // requests. However, any non-pointer, non-interface field appearing in 870 // ForceSendFields will be sent to the server regardless of whether the 871 // field is empty or not. This may be used to include empty fields in 872 // Patch requests. 873 ForceSendFields []string `json:"-"` 874 875 // NullFields is a list of field names (e.g. "ActiveDeadlineSeconds") to 876 // include in API requests with the JSON null value. By default, fields 877 // with empty values are omitted from API requests. However, any field 878 // with an empty value appearing in NullFields will be sent to the 879 // server as null. It is an error if a field in this list has a 880 // non-empty value. This may be used to include null fields in Patch 881 // requests. 882 NullFields []string `json:"-"` 883 } 884 885 func (s *InstanceSpec) MarshalJSON() ([]byte, error) { 886 type NoMethod InstanceSpec 887 raw := NoMethod(*s) 888 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 889 } 890 891 // InstanceStatus: Instance represents the status of an instance of a 892 // Job. 893 type InstanceStatus struct { 894 // CompletionTime: Optional. Represents time when the instance was 895 // completed. It is not guaranteed to be set in happens-before order 896 // across separate operations. It is represented in RFC3339 form and is 897 // in UTC. +optional 898 CompletionTime string `json:"completionTime,omitempty"` 899 900 // Failed: Optional. The number of times this instance exited with code 901 // > 0; +optional 902 Failed int64 `json:"failed,omitempty"` 903 904 // Index: Required. Index of the instance, unique per Job, and beginning 905 // at 0. 906 Index int64 `json:"index,omitempty"` 907 908 // LastAttemptResult: Optional. Result of the last attempt of this 909 // instance. +optional 910 LastAttemptResult *InstanceAttemptResult `json:"lastAttemptResult,omitempty"` 911 912 // LastExitCode: Optional. Last exit code seen for this instance. 913 // +optional 914 LastExitCode int64 `json:"lastExitCode,omitempty"` 915 916 // Restarted: Optional. The number of times this instance was restarted. 917 // Instances are restarted according the restartPolicy configured in the 918 // Job template. +optional 919 Restarted int64 `json:"restarted,omitempty"` 920 921 // StartTime: Optional. Represents time when the instance was created by 922 // the job controller. It is not guaranteed to be set in happens-before 923 // order across separate operations. It is represented in RFC3339 form 924 // and is in UTC. +optional 925 StartTime string `json:"startTime,omitempty"` 926 927 // Succeeded: Optional. The number of times this instance exited with 928 // code == 0. +optional 929 Succeeded int64 `json:"succeeded,omitempty"` 930 931 // ForceSendFields is a list of field names (e.g. "CompletionTime") to 932 // unconditionally include in API requests. By default, fields with 933 // empty or default values are omitted from API requests. However, any 934 // non-pointer, non-interface field appearing in ForceSendFields will be 935 // sent to the server regardless of whether the field is empty or not. 936 // This may be used to include empty fields in Patch requests. 937 ForceSendFields []string `json:"-"` 938 939 // NullFields is a list of field names (e.g. "CompletionTime") to 940 // include in API requests with the JSON null value. By default, fields 941 // with empty values are omitted from API requests. However, any field 942 // with an empty value appearing in NullFields will be sent to the 943 // server as null. It is an error if a field in this list has a 944 // non-empty value. This may be used to include null fields in Patch 945 // requests. 946 NullFields []string `json:"-"` 947 } 948 949 func (s *InstanceStatus) MarshalJSON() ([]byte, error) { 950 type NoMethod InstanceStatus 951 raw := NoMethod(*s) 952 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 953 } 954 955 // InstanceTemplateSpec: InstanceTemplateSpec describes the data an 956 // instance should have when created from a template. 957 type InstanceTemplateSpec struct { 958 // Spec: Optional. Specification of the desired behavior of the 959 // instance. More info: 960 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 961 // +optional 962 Spec *InstanceSpec `json:"spec,omitempty"` 963 964 // ForceSendFields is a list of field names (e.g. "Spec") to 965 // unconditionally include in API requests. By default, fields with 966 // empty or default values are omitted from API requests. However, any 967 // non-pointer, non-interface field appearing in ForceSendFields will be 968 // sent to the server regardless of whether the field is empty or not. 969 // This may be used to include empty fields in Patch requests. 970 ForceSendFields []string `json:"-"` 971 972 // NullFields is a list of field names (e.g. "Spec") to include in API 973 // requests with the JSON null value. By default, fields with empty 974 // values are omitted from API requests. However, any field with an 975 // empty value appearing in NullFields will be sent to the server as 976 // null. It is an error if a field in this list has a non-empty value. 977 // This may be used to include null fields in Patch requests. 978 NullFields []string `json:"-"` 979 } 980 981 func (s *InstanceTemplateSpec) MarshalJSON() ([]byte, error) { 982 type NoMethod InstanceTemplateSpec 983 raw := NoMethod(*s) 984 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 985 } 986 987 // Job: Job represents the configuration of a single job. A job an 988 // immutable resource that references a container image which is run to 989 // completion. 990 type Job struct { 991 // ApiVersion: Optional. APIVersion defines the versioned schema of this 992 // representation of an object. Servers should convert recognized 993 // schemas to the latest internal value, and may reject unrecognized 994 // values. More info: 995 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 996 // +optional 997 ApiVersion string `json:"apiVersion,omitempty"` 998 999 // Kind: Optional. Kind is a string value representing the REST resource 1000 // this object represents. Servers may infer this from the endpoint the 1001 // client submits requests to. Cannot be updated. In CamelCase. More 1002 // info: 1003 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 1004 // +optional 1005 Kind string `json:"kind,omitempty"` 1006 1007 // Metadata: Optional. Standard object's metadata. More info: 1008 // https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 1009 // +optional 1010 Metadata *ObjectMeta `json:"metadata,omitempty"` 1011 1012 // Spec: Optional. Specification of the desired behavior of a job. More 1013 // info: 1014 // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status 1015 // +optional 1016 Spec *JobSpec `json:"spec,omitempty"` 1017 1018 // Status: Optional. Current status of a job. More info: 1019 // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status 1020 // +optional 1021 Status *JobStatus `json:"status,omitempty"` 1022 1023 // ServerResponse contains the HTTP response code and headers from the 1024 // server. 1025 googleapi.ServerResponse `json:"-"` 1026 1027 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1028 // unconditionally include in API requests. By default, fields with 1029 // empty or default values are omitted from API requests. However, any 1030 // non-pointer, non-interface field appearing in ForceSendFields will be 1031 // sent to the server regardless of whether the field is empty or not. 1032 // This may be used to include empty fields in Patch requests. 1033 ForceSendFields []string `json:"-"` 1034 1035 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1036 // API requests with the JSON null value. By default, fields with empty 1037 // values are omitted from API requests. However, any field with an 1038 // empty value appearing in NullFields will be sent to the server as 1039 // null. It is an error if a field in this list has a non-empty value. 1040 // This may be used to include null fields in Patch requests. 1041 NullFields []string `json:"-"` 1042 } 1043 1044 func (s *Job) MarshalJSON() ([]byte, error) { 1045 type NoMethod Job 1046 raw := NoMethod(*s) 1047 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1048 } 1049 1050 // JobCondition: JobCondition defines a readiness condition for a 1051 // Revision. 1052 type JobCondition struct { 1053 // LastTransitionTime: Optional. Last time the condition transitioned 1054 // from one status to another. 1055 LastTransitionTime string `json:"lastTransitionTime,omitempty"` 1056 1057 // Message: Optional. Human readable message indicating details about 1058 // the current status. 1059 Message string `json:"message,omitempty"` 1060 1061 // Reason: Optional. One-word CamelCase reason for the condition's last 1062 // transition. 1063 Reason string `json:"reason,omitempty"` 1064 1065 // Severity: Optional. How to interpret failures of this condition, one 1066 // of Error, Warning, Info 1067 Severity string `json:"severity,omitempty"` 1068 1069 // Status: Required. Status of the condition, one of True, False, 1070 // Unknown. 1071 Status string `json:"status,omitempty"` 1072 1073 // Type: Required. Type is used to communicate the status of the 1074 // reconciliation process. See also: 1075 // https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting 1076 // Types include: * "Completed": True when the Job has successfully 1077 // completed. * "Started": True when the Job has successfully started 1078 // running. * "ResourcesAvailable": True when underlying resources have 1079 // been provisioned. 1080 Type string `json:"type,omitempty"` 1081 1082 // ForceSendFields is a list of field names (e.g. "LastTransitionTime") 1083 // to unconditionally include in API requests. By default, fields with 1084 // empty or default values are omitted from API requests. However, any 1085 // non-pointer, non-interface field appearing in ForceSendFields will be 1086 // sent to the server regardless of whether the field is empty or not. 1087 // This may be used to include empty fields in Patch requests. 1088 ForceSendFields []string `json:"-"` 1089 1090 // NullFields is a list of field names (e.g. "LastTransitionTime") to 1091 // include in API requests with the JSON null value. By default, fields 1092 // with empty values are omitted from API requests. However, any field 1093 // with an empty value appearing in NullFields will be sent to the 1094 // server as null. It is an error if a field in this list has a 1095 // non-empty value. This may be used to include null fields in Patch 1096 // requests. 1097 NullFields []string `json:"-"` 1098 } 1099 1100 func (s *JobCondition) MarshalJSON() ([]byte, error) { 1101 type NoMethod JobCondition 1102 raw := NoMethod(*s) 1103 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1104 } 1105 1106 // JobSpec: JobSpec describes how the job execution will look like. 1107 type JobSpec struct { 1108 // ActiveDeadlineSeconds: Optional. Not supported. Specifies the 1109 // duration in seconds relative to the startTime that the job may be 1110 // active before the system tries to terminate it. If set to zero, the 1111 // system will never attempt to terminate the job based on time. 1112 // Otherwise, the value must be positive integer. +optional 1113 ActiveDeadlineSeconds int64 `json:"activeDeadlineSeconds,omitempty,string"` 1114 1115 // BackoffLimit: Optional. Specifies the number of retries per instance, 1116 // before marking this job failed. If set to zero, instances will never 1117 // retry on failure. +optional 1118 BackoffLimit int64 `json:"backoffLimit,omitempty"` 1119 1120 // Completions: Optional. Specifies the desired number of successfully 1121 // finished instances the job should be run with. Setting to 1 means 1122 // that parallelism is limited to 1 and the success of that instance 1123 // signals the success of the job. More info: 1124 // https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ 1125 // +optional 1126 Completions int64 `json:"completions,omitempty"` 1127 1128 // Parallelism: Optional. Specifies the maximum desired number of 1129 // instances the job should run at any given time. Must be <= 1130 // completions. The actual number of instances running in steady state 1131 // will be less than this number when ((.spec.completions - 1132 // .status.successful) < .spec.parallelism), i.e. when the work left to 1133 // do is less than max parallelism. More info: 1134 // https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ 1135 // +optional 1136 Parallelism int64 `json:"parallelism,omitempty"` 1137 1138 // Template: Optional. Describes the instance that will be created when 1139 // executing a job. 1140 Template *InstanceTemplateSpec `json:"template,omitempty"` 1141 1142 // TtlSecondsAfterFinished: Optional. Not supported. 1143 // ttlSecondsAfterFinished limits the lifetime of a Job that has 1144 // finished execution (either Complete or Failed). If this field is set, 1145 // ttlSecondsAfterFinished after the Job finishes, it is eligible to be 1146 // automatically deleted. When the Job is being deleted, its lifecycle 1147 // guarantees (e.g. finalizers) will be honored. If this field is set to 1148 // zero, the Job won't be automatically deleted. +optional 1149 TtlSecondsAfterFinished int64 `json:"ttlSecondsAfterFinished,omitempty"` 1150 1151 // ForceSendFields is a list of field names (e.g. 1152 // "ActiveDeadlineSeconds") to unconditionally include in API requests. 1153 // By default, fields with empty or default values are omitted from API 1154 // requests. However, any non-pointer, non-interface field appearing in 1155 // ForceSendFields will be sent to the server regardless of whether the 1156 // field is empty or not. This may be used to include empty fields in 1157 // Patch requests. 1158 ForceSendFields []string `json:"-"` 1159 1160 // NullFields is a list of field names (e.g. "ActiveDeadlineSeconds") to 1161 // include in API requests with the JSON null value. By default, fields 1162 // with empty values are omitted from API requests. However, any field 1163 // with an empty value appearing in NullFields will be sent to the 1164 // server as null. It is an error if a field in this list has a 1165 // non-empty value. This may be used to include null fields in Patch 1166 // requests. 1167 NullFields []string `json:"-"` 1168 } 1169 1170 func (s *JobSpec) MarshalJSON() ([]byte, error) { 1171 type NoMethod JobSpec 1172 raw := NoMethod(*s) 1173 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1174 } 1175 1176 // JobStatus: JobStatus represents the current state of a Job. 1177 type JobStatus struct { 1178 // Active: Optional. The number of actively running instances. +optional 1179 Active int64 `json:"active,omitempty"` 1180 1181 // CompletionTime: Optional. Represents time when the job was completed. 1182 // It is not guaranteed to be set in happens-before order across 1183 // separate operations. It is represented in RFC3339 form and is in UTC. 1184 // +optional 1185 CompletionTime string `json:"completionTime,omitempty"` 1186 1187 // Conditions: Optional. The latest available observations of a job's 1188 // current state. More info: 1189 // https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ 1190 // +optional 1191 Conditions []*JobCondition `json:"conditions,omitempty"` 1192 1193 // Failed: Optional. The number of instances which reached phase Failed. 1194 // +optional 1195 Failed int64 `json:"failed,omitempty"` 1196 1197 // ImageDigest: Optional. ImageDigest holds the resolved digest for the 1198 // image specified within .Spec.Template.Spec.Container.Image. The 1199 // digest is resolved during the creation of the Job. This field holds 1200 // the digest value regardless of whether a tag or digest was originally 1201 // specified in the Container object. 1202 ImageDigest string `json:"imageDigest,omitempty"` 1203 1204 // Instances: Optional. Status of completed, failed, and running 1205 // instances. +optional 1206 Instances []*InstanceStatus `json:"instances,omitempty"` 1207 1208 // ObservedGeneration: Optional. The 'generation' of the job that was 1209 // last processed by the controller. 1210 ObservedGeneration int64 `json:"observedGeneration,omitempty"` 1211 1212 // StartTime: Optional. Represents time when the job was acknowledged by 1213 // the job controller. It is not guaranteed to be set in happens-before 1214 // order across separate operations. It is represented in RFC3339 form 1215 // and is in UTC. +optional 1216 StartTime string `json:"startTime,omitempty"` 1217 1218 // Succeeded: Optional. The number of instances which reached phase 1219 // Succeeded. +optional 1220 Succeeded int64 `json:"succeeded,omitempty"` 1221 1222 // ForceSendFields is a list of field names (e.g. "Active") to 1223 // unconditionally include in API requests. By default, fields with 1224 // empty or default values are omitted from API requests. However, any 1225 // non-pointer, non-interface field appearing in ForceSendFields will be 1226 // sent to the server regardless of whether the field is empty or not. 1227 // This may be used to include empty fields in Patch requests. 1228 ForceSendFields []string `json:"-"` 1229 1230 // NullFields is a list of field names (e.g. "Active") to include in API 1231 // requests with the JSON null value. By default, fields with empty 1232 // values are omitted from API requests. However, any field with an 1233 // empty value appearing in NullFields will be sent to the server as 1234 // null. It is an error if a field in this list has a non-empty value. 1235 // This may be used to include null fields in Patch requests. 1236 NullFields []string `json:"-"` 1237 } 1238 1239 func (s *JobStatus) MarshalJSON() ([]byte, error) { 1240 type NoMethod JobStatus 1241 raw := NoMethod(*s) 1242 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1243 } 1244 1245 // KeyToPath: Maps a string key to a path within a volume. 1246 type KeyToPath struct { 1247 // Key: The Cloud Secret Manager secret version. Can be 'latest' for the 1248 // latest value or an integer for a specific version. The key to 1249 // project. 1250 Key string `json:"key,omitempty"` 1251 1252 // Mode: (Optional) Mode bits to use on this file, must be a value 1253 // between 01 and 0777 (octal). If 0 or not set, the Volume's default 1254 // mode will be used. Notes * Internally, a umask of 0222 will be 1255 // applied to any non-zero value. * This is an integer representation of 1256 // the mode bits. So, the octal integer value should look exactly as the 1257 // chmod numeric notation with a leading zero. Some examples: for chmod 1258 // 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 1259 // (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 1260 // (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might 1261 // be in conflict with other options that affect the file mode, like 1262 // fsGroup, and the result can be other mode bits set. 1263 Mode int64 `json:"mode,omitempty"` 1264 1265 // Path: The relative path of the file to map the key to. May not be an 1266 // absolute path. May not contain the path element '..'. May not start 1267 // with the string '..'. 1268 Path string `json:"path,omitempty"` 1269 1270 // ForceSendFields is a list of field names (e.g. "Key") to 1271 // unconditionally include in API requests. By default, fields with 1272 // empty or default values are omitted from API requests. However, any 1273 // non-pointer, non-interface field appearing in ForceSendFields will be 1274 // sent to the server regardless of whether the field is empty or not. 1275 // This may be used to include empty fields in Patch requests. 1276 ForceSendFields []string `json:"-"` 1277 1278 // NullFields is a list of field names (e.g. "Key") to include in API 1279 // requests with the JSON null value. By default, fields with empty 1280 // values are omitted from API requests. However, any field with an 1281 // empty value appearing in NullFields will be sent to the server as 1282 // null. It is an error if a field in this list has a non-empty value. 1283 // This may be used to include null fields in Patch requests. 1284 NullFields []string `json:"-"` 1285 } 1286 1287 func (s *KeyToPath) MarshalJSON() ([]byte, error) { 1288 type NoMethod KeyToPath 1289 raw := NoMethod(*s) 1290 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1291 } 1292 1293 // ListJobsResponse: ListJobsResponse is a list of Jobs resources. 1294 type ListJobsResponse struct { 1295 // ApiVersion: The API version for this call such as 1296 // "run.googleapis.com/v1alpha1". 1297 ApiVersion string `json:"apiVersion,omitempty"` 1298 1299 // Items: List of Jobs. 1300 Items []*Job `json:"items,omitempty"` 1301 1302 // Kind: The kind of this resource, in this case "JobsList". 1303 Kind string `json:"kind,omitempty"` 1304 1305 // Metadata: Metadata associated with this jobs list. 1306 Metadata *ListMeta `json:"metadata,omitempty"` 1307 1308 // NextPageToken: This field is equivalent to the metadata.continue 1309 // field and is provided as a convenience for compatibility with 1310 // https://google.aip.dev/158. The value is opaque and may be used to 1311 // issue another request to the endpoint that served this list to 1312 // retrieve the next set of available objects. Continuing a list may not 1313 // be possible if the server configuration has changed or more than a 1314 // few minutes have passed. The metadata.resourceVersion field returned 1315 // when using this field will be identical to the value in the first 1316 // response. 1317 NextPageToken string `json:"nextPageToken,omitempty"` 1318 1319 // Unreachable: Locations that could not be reached. 1320 Unreachable []string `json:"unreachable,omitempty"` 1321 1322 // ServerResponse contains the HTTP response code and headers from the 1323 // server. 1324 googleapi.ServerResponse `json:"-"` 1325 1326 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1327 // unconditionally include in API requests. By default, fields with 1328 // empty or default values are omitted from API requests. However, any 1329 // non-pointer, non-interface field appearing in ForceSendFields will be 1330 // sent to the server regardless of whether the field is empty or not. 1331 // This may be used to include empty fields in Patch requests. 1332 ForceSendFields []string `json:"-"` 1333 1334 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1335 // API requests with the JSON null value. By default, fields with empty 1336 // values are omitted from API requests. However, any field with an 1337 // empty value appearing in NullFields will be sent to the server as 1338 // null. It is an error if a field in this list has a non-empty value. 1339 // This may be used to include null fields in Patch requests. 1340 NullFields []string `json:"-"` 1341 } 1342 1343 func (s *ListJobsResponse) MarshalJSON() ([]byte, error) { 1344 type NoMethod ListJobsResponse 1345 raw := NoMethod(*s) 1346 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1347 } 1348 1349 // ListMeta: ListMeta describes metadata that synthetic resources must 1350 // have, including lists and various status objects. A resource may have 1351 // only one of {ObjectMeta, ListMeta}. 1352 type ListMeta struct { 1353 // Continue: continue may be set if the user set a limit on the number 1354 // of items returned, and indicates that the server has more data 1355 // available. The value is opaque and may be used to issue another 1356 // request to the endpoint that served this list to retrieve the next 1357 // set of available objects. Continuing a list may not be possible if 1358 // the server configuration has changed or more than a few minutes have 1359 // passed. The resourceVersion field returned when using this continue 1360 // value will be identical to the value in the first response. 1361 Continue string `json:"continue,omitempty"` 1362 1363 // ResourceVersion: String that identifies the server's internal version 1364 // of this object that can be used by clients to determine when objects 1365 // have changed. Value must be treated as opaque by clients and passed 1366 // unmodified back to the server. Populated by the system. Read-only. 1367 // More info: 1368 // https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency 1369 // +optional 1370 ResourceVersion string `json:"resourceVersion,omitempty"` 1371 1372 // SelfLink: SelfLink is a URL representing this object. Populated by 1373 // the system. Read-only. +optional 1374 SelfLink string `json:"selfLink,omitempty"` 1375 1376 // ForceSendFields is a list of field names (e.g. "Continue") to 1377 // unconditionally include in API requests. By default, fields with 1378 // empty or default values are omitted from API requests. However, any 1379 // non-pointer, non-interface field appearing in ForceSendFields will be 1380 // sent to the server regardless of whether the field is empty or not. 1381 // This may be used to include empty fields in Patch requests. 1382 ForceSendFields []string `json:"-"` 1383 1384 // NullFields is a list of field names (e.g. "Continue") to include in 1385 // API requests with the JSON null value. By default, fields with empty 1386 // values are omitted from API requests. However, any field with an 1387 // empty value appearing in NullFields will be sent to the server as 1388 // null. It is an error if a field in this list has a non-empty value. 1389 // This may be used to include null fields in Patch requests. 1390 NullFields []string `json:"-"` 1391 } 1392 1393 func (s *ListMeta) MarshalJSON() ([]byte, error) { 1394 type NoMethod ListMeta 1395 raw := NoMethod(*s) 1396 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1397 } 1398 1399 // LocalObjectReference: Not supported by Cloud Run LocalObjectReference 1400 // contains enough information to let you locate the referenced object 1401 // inside the same namespace. 1402 type LocalObjectReference struct { 1403 // Name: (Optional) Name of the referent. More info: 1404 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 1405 Name string `json:"name,omitempty"` 1406 1407 // ForceSendFields is a list of field names (e.g. "Name") to 1408 // unconditionally include in API requests. By default, fields with 1409 // empty or default values are omitted from API requests. However, any 1410 // non-pointer, non-interface field appearing in ForceSendFields will be 1411 // sent to the server regardless of whether the field is empty or not. 1412 // This may be used to include empty fields in Patch requests. 1413 ForceSendFields []string `json:"-"` 1414 1415 // NullFields is a list of field names (e.g. "Name") to include in API 1416 // requests with the JSON null value. By default, fields with empty 1417 // values are omitted from API requests. However, any field with an 1418 // empty value appearing in NullFields will be sent to the server as 1419 // null. It is an error if a field in this list has a non-empty value. 1420 // This may be used to include null fields in Patch requests. 1421 NullFields []string `json:"-"` 1422 } 1423 1424 func (s *LocalObjectReference) MarshalJSON() ([]byte, error) { 1425 type NoMethod LocalObjectReference 1426 raw := NoMethod(*s) 1427 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1428 } 1429 1430 // ObjectMeta: k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta is 1431 // metadata that all persisted resources must have, which includes all 1432 // objects users must create. 1433 type ObjectMeta struct { 1434 // Annotations: (Optional) Annotations is an unstructured key value map 1435 // stored with a resource that may be set by external tools to store and 1436 // retrieve arbitrary metadata. They are not queryable and should be 1437 // preserved when modifying objects. More info: 1438 // https://kubernetes.io/docs/user-guide/annotations 1439 Annotations map[string]string `json:"annotations,omitempty"` 1440 1441 // ClusterName: (Optional) Not supported by Cloud Run The name of the 1442 // cluster which the object belongs to. This is used to distinguish 1443 // resources with same name and namespace in different clusters. This 1444 // field is not set anywhere right now and apiserver is going to ignore 1445 // it if set in create or update request. 1446 ClusterName string `json:"clusterName,omitempty"` 1447 1448 // CreationTimestamp: (Optional) CreationTimestamp is a timestamp 1449 // representing the server time when this object was created. It is not 1450 // guaranteed to be set in happens-before order across separate 1451 // operations. Clients may not set this value. It is represented in 1452 // RFC3339 form and is in UTC. Populated by the system. Read-only. Null 1453 // for lists. More info: 1454 // https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 1455 CreationTimestamp string `json:"creationTimestamp,omitempty"` 1456 1457 // DeletionGracePeriodSeconds: (Optional) Not supported by Cloud Run 1458 // Number of seconds allowed for this object to gracefully terminate 1459 // before it will be removed from the system. Only set when 1460 // deletionTimestamp is also set. May only be shortened. Read-only. 1461 DeletionGracePeriodSeconds int64 `json:"deletionGracePeriodSeconds,omitempty"` 1462 1463 // DeletionTimestamp: (Optional) Not supported by Cloud Run 1464 // DeletionTimestamp is RFC 3339 date and time at which this resource 1465 // will be deleted. This field is set by the server when a graceful 1466 // deletion is requested by the user, and is not directly settable by a 1467 // client. The resource is expected to be deleted (no longer visible 1468 // from resource lists, and not reachable by name) after the time in 1469 // this field, once the finalizers list is empty. As long as the 1470 // finalizers list contains items, deletion is blocked. Once the 1471 // deletionTimestamp is set, this value may not be unset or be set 1472 // further into the future, although it may be shortened or the resource 1473 // may be deleted prior to this time. For example, a user may request 1474 // that a pod is deleted in 30 seconds. The Kubelet will react by 1475 // sending a graceful termination signal to the containers in the pod. 1476 // After that 30 seconds, the Kubelet will send a hard termination 1477 // signal (SIGKILL) to the container and after cleanup, remove the pod 1478 // from the API. In the presence of network partitions, this object may 1479 // still exist after this timestamp, until an administrator or automated 1480 // process can determine the resource is fully terminated. If not set, 1481 // graceful deletion of the object has not been requested. Populated by 1482 // the system when a graceful deletion is requested. Read-only. More 1483 // info: 1484 // https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 1485 DeletionTimestamp string `json:"deletionTimestamp,omitempty"` 1486 1487 // Finalizers: (Optional) Not supported by Cloud Run Must be empty 1488 // before the object is deleted from the registry. Each entry is an 1489 // identifier for the responsible component that will remove the entry 1490 // from the list. If the deletionTimestamp of the object is non-nil, 1491 // entries in this list can only be removed. +patchStrategy=merge 1492 Finalizers []string `json:"finalizers,omitempty"` 1493 1494 // GenerateName: (Optional) Not supported by Cloud Run GenerateName is 1495 // an optional prefix, used by the server, to generate a unique name 1496 // ONLY IF the Name field has not been provided. If this field is used, 1497 // the name returned to the client will be different than the name 1498 // passed. This value will also be combined with a unique suffix. The 1499 // provided value has the same validation rules as the Name field, and 1500 // may be truncated by the length of the suffix required to make the 1501 // value unique on the server. If this field is specified and the 1502 // generated name exists, the server will NOT return a 409 - instead, it 1503 // will either return 201 Created or 500 with Reason ServerTimeout 1504 // indicating a unique name could not be found in the time allotted, and 1505 // the client should retry (optionally after the time indicated in the 1506 // Retry-After header). Applied only if Name is not specified. More 1507 // info: 1508 // https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency 1509 // string generateName = 2; 1510 GenerateName string `json:"generateName,omitempty"` 1511 1512 // Generation: (Optional) A sequence number representing a specific 1513 // generation of the desired state. Populated by the system. Read-only. 1514 Generation int64 `json:"generation,omitempty"` 1515 1516 // Labels: (Optional) Map of string keys and values that can be used to 1517 // organize and categorize (scope and select) objects. May match 1518 // selectors of replication controllers and routes. More info: 1519 // https://kubernetes.io/docs/user-guide/labels 1520 Labels map[string]string `json:"labels,omitempty"` 1521 1522 // Name: Name must be unique within a namespace, within a Cloud Run 1523 // region. Is required when creating resources, although some resources 1524 // may allow a client to request the generation of an appropriate name 1525 // automatically. Name is primarily intended for creation idempotence 1526 // and configuration definition. Cannot be updated. More info: 1527 // https://kubernetes.io/docs/user-guide/identifiers#names +optional 1528 Name string `json:"name,omitempty"` 1529 1530 // Namespace: Namespace defines the space within each name must be 1531 // unique, within a Cloud Run region. In Cloud Run the namespace must be 1532 // equal to either the project ID or project number. 1533 Namespace string `json:"namespace,omitempty"` 1534 1535 // OwnerReferences: (Optional) Not supported by Cloud Run List of 1536 // objects that own this object. If ALL objects in the list have been 1537 // deleted, this object will be garbage collected. 1538 OwnerReferences []*OwnerReference `json:"ownerReferences,omitempty"` 1539 1540 // ResourceVersion: Optional. An opaque value that represents the 1541 // internal version of this object that can be used by clients to 1542 // determine when objects have changed. May be used for optimistic 1543 // concurrency, change detection, and the watch operation on a resource 1544 // or set of resources. Clients must treat these values as opaque and 1545 // passed unmodified back to the server or omit the value to disable 1546 // conflict-detection. They may only be valid for a particular resource 1547 // or set of resources. Populated by the system. Read-only. Value must 1548 // be treated as opaque by clients or omitted. More info: 1549 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency 1550 ResourceVersion string `json:"resourceVersion,omitempty"` 1551 1552 // SelfLink: (Optional) SelfLink is a URL representing this object. 1553 // Populated by the system. Read-only. string selfLink = 4; 1554 SelfLink string `json:"selfLink,omitempty"` 1555 1556 // Uid: (Optional) UID is the unique in time and space value for this 1557 // object. It is typically generated by the server on successful 1558 // creation of a resource and is not allowed to change on PUT 1559 // operations. Populated by the system. Read-only. More info: 1560 // https://kubernetes.io/docs/user-guide/identifiers#uids 1561 Uid string `json:"uid,omitempty"` 1562 1563 // ForceSendFields is a list of field names (e.g. "Annotations") to 1564 // unconditionally include in API requests. By default, fields with 1565 // empty or default values are omitted from API requests. However, any 1566 // non-pointer, non-interface field appearing in ForceSendFields will be 1567 // sent to the server regardless of whether the field is empty or not. 1568 // This may be used to include empty fields in Patch requests. 1569 ForceSendFields []string `json:"-"` 1570 1571 // NullFields is a list of field names (e.g. "Annotations") to include 1572 // in API requests with the JSON null value. By default, fields with 1573 // empty values are omitted from API requests. However, any field with 1574 // an empty value appearing in NullFields will be sent to the server as 1575 // null. It is an error if a field in this list has a non-empty value. 1576 // This may be used to include null fields in Patch requests. 1577 NullFields []string `json:"-"` 1578 } 1579 1580 func (s *ObjectMeta) MarshalJSON() ([]byte, error) { 1581 type NoMethod ObjectMeta 1582 raw := NoMethod(*s) 1583 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1584 } 1585 1586 // OwnerReference: OwnerReference contains enough information to let you 1587 // identify an owning object. Currently, an owning object must be in the 1588 // same namespace, so there is no namespace field. 1589 type OwnerReference struct { 1590 // ApiVersion: API version of the referent. 1591 ApiVersion string `json:"apiVersion,omitempty"` 1592 1593 // BlockOwnerDeletion: If true, AND if the owner has the 1594 // "foregroundDeletion" finalizer, then the owner cannot be deleted from 1595 // the key-value store until this reference is removed. Defaults to 1596 // false. To set this field, a user needs "delete" permission of the 1597 // owner, otherwise 422 (Unprocessable Entity) will be returned. 1598 // +optional 1599 BlockOwnerDeletion bool `json:"blockOwnerDeletion,omitempty"` 1600 1601 // Controller: If true, this reference points to the managing 1602 // controller. +optional 1603 Controller bool `json:"controller,omitempty"` 1604 1605 // Kind: Kind of the referent. More info: 1606 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 1607 Kind string `json:"kind,omitempty"` 1608 1609 // Name: Name of the referent. More info: 1610 // https://kubernetes.io/docs/user-guide/identifiers#names 1611 Name string `json:"name,omitempty"` 1612 1613 // Uid: UID of the referent. More info: 1614 // https://kubernetes.io/docs/user-guide/identifiers#uids 1615 Uid string `json:"uid,omitempty"` 1616 1617 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1618 // unconditionally include in API requests. By default, fields with 1619 // empty or default values are omitted from API requests. However, any 1620 // non-pointer, non-interface field appearing in ForceSendFields will be 1621 // sent to the server regardless of whether the field is empty or not. 1622 // This may be used to include empty fields in Patch requests. 1623 ForceSendFields []string `json:"-"` 1624 1625 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1626 // API requests with the JSON null value. By default, fields with empty 1627 // values are omitted from API requests. However, any field with an 1628 // empty value appearing in NullFields will be sent to the server as 1629 // null. It is an error if a field in this list has a non-empty value. 1630 // This may be used to include null fields in Patch requests. 1631 NullFields []string `json:"-"` 1632 } 1633 1634 func (s *OwnerReference) MarshalJSON() ([]byte, error) { 1635 type NoMethod OwnerReference 1636 raw := NoMethod(*s) 1637 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1638 } 1639 1640 // Probe: Not supported by Cloud Run Probe describes a health check to 1641 // be performed against a container to determine whether it is alive or 1642 // ready to receive traffic. 1643 type Probe struct { 1644 // Exec: (Optional) Not supported by Cloud Run One and only one of the 1645 // following should be specified. Exec specifies the action to take. A 1646 // field inlined from the Handler message. 1647 Exec *ExecAction `json:"exec,omitempty"` 1648 1649 // FailureThreshold: (Optional) Minimum consecutive failures for the 1650 // probe to be considered failed after having succeeded. Defaults to 3. 1651 // Minimum value is 1. 1652 FailureThreshold int64 `json:"failureThreshold,omitempty"` 1653 1654 // Grpc: (Optional) GRPCAction specifies an action involving a GRPC 1655 // port. A field inlined from the Handler message. 1656 Grpc *GRPCAction `json:"grpc,omitempty"` 1657 1658 // HttpGet: (Optional) HTTPGet specifies the http request to perform. A 1659 // field inlined from the Handler message. 1660 HttpGet *HTTPGetAction `json:"httpGet,omitempty"` 1661 1662 // InitialDelaySeconds: (Optional) Number of seconds after the container 1663 // has started before the probe is initiated. Defaults to 0 seconds. 1664 // Minimum value is 0. Maximum value for liveness probe is 3600. Maximum 1665 // value for startup probe is 240. More info: 1666 // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 1667 InitialDelaySeconds int64 `json:"initialDelaySeconds,omitempty"` 1668 1669 // PeriodSeconds: (Optional) How often (in seconds) to perform the 1670 // probe. Default to 10 seconds. Minimum value is 1. Maximum value for 1671 // liveness probe is 3600. Maximum value for startup probe is 240. Must 1672 // be greater or equal than timeout_seconds. 1673 PeriodSeconds int64 `json:"periodSeconds,omitempty"` 1674 1675 // SuccessThreshold: (Optional) Minimum consecutive successes for the 1676 // probe to be considered successful after having failed. Must be 1 if 1677 // set. 1678 SuccessThreshold int64 `json:"successThreshold,omitempty"` 1679 1680 // TcpSocket: (Optional) TCPSocket specifies an action involving a TCP 1681 // port. TCP hooks not yet supported A field inlined from the Handler 1682 // message. 1683 TcpSocket *TCPSocketAction `json:"tcpSocket,omitempty"` 1684 1685 // TimeoutSeconds: (Optional) Number of seconds after which the probe 1686 // times out. Defaults to 1 second. Minimum value is 1. Maximum value is 1687 // 3600. Must be smaller than period_seconds. More info: 1688 // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 1689 TimeoutSeconds int64 `json:"timeoutSeconds,omitempty"` 1690 1691 // ForceSendFields is a list of field names (e.g. "Exec") to 1692 // unconditionally include in API requests. By default, fields with 1693 // empty or default values are omitted from API requests. However, any 1694 // non-pointer, non-interface field appearing in ForceSendFields will be 1695 // sent to the server regardless of whether the field is empty or not. 1696 // This may be used to include empty fields in Patch requests. 1697 ForceSendFields []string `json:"-"` 1698 1699 // NullFields is a list of field names (e.g. "Exec") to include in API 1700 // requests with the JSON null value. By default, fields with empty 1701 // values are omitted from API requests. However, any field with an 1702 // empty value appearing in NullFields will be sent to the server as 1703 // null. It is an error if a field in this list has a non-empty value. 1704 // This may be used to include null fields in Patch requests. 1705 NullFields []string `json:"-"` 1706 } 1707 1708 func (s *Probe) MarshalJSON() ([]byte, error) { 1709 type NoMethod Probe 1710 raw := NoMethod(*s) 1711 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1712 } 1713 1714 // ResourceRequirements: ResourceRequirements describes the compute 1715 // resource requirements. 1716 type ResourceRequirements struct { 1717 // Limits: (Optional) Only memory and CPU are supported. Limits 1718 // describes the maximum amount of compute resources allowed. The values 1719 // of the map is string form of the 'quantity' k8s type: 1720 // https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go 1721 Limits map[string]string `json:"limits,omitempty"` 1722 1723 // Requests: (Optional) Only memory and CPU are supported. Requests 1724 // describes the minimum amount of compute resources required. If 1725 // Requests is omitted for a container, it defaults to Limits if that is 1726 // explicitly specified, otherwise to an implementation-defined value. 1727 // The values of the map is string form of the 'quantity' k8s type: 1728 // https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go 1729 Requests map[string]string `json:"requests,omitempty"` 1730 1731 // ForceSendFields is a list of field names (e.g. "Limits") to 1732 // unconditionally include in API requests. By default, fields with 1733 // empty or default values are omitted from API requests. However, any 1734 // non-pointer, non-interface field appearing in ForceSendFields will be 1735 // sent to the server regardless of whether the field is empty or not. 1736 // This may be used to include empty fields in Patch requests. 1737 ForceSendFields []string `json:"-"` 1738 1739 // NullFields is a list of field names (e.g. "Limits") to include in API 1740 // requests with the JSON null value. By default, fields with empty 1741 // values are omitted from API requests. However, any field with an 1742 // empty value appearing in NullFields will be sent to the server as 1743 // null. It is an error if a field in this list has a non-empty value. 1744 // This may be used to include null fields in Patch requests. 1745 NullFields []string `json:"-"` 1746 } 1747 1748 func (s *ResourceRequirements) MarshalJSON() ([]byte, error) { 1749 type NoMethod ResourceRequirements 1750 raw := NoMethod(*s) 1751 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1752 } 1753 1754 // SecretEnvSource: Not supported by Cloud Run SecretEnvSource selects a 1755 // Secret to populate the environment variables with. The contents of 1756 // the target Secret's Data field will represent the key-value pairs as 1757 // environment variables. 1758 type SecretEnvSource struct { 1759 // LocalObjectReference: This field should not be used directly as it is 1760 // meant to be inlined directly into the message. Use the "name" field 1761 // instead. 1762 LocalObjectReference *LocalObjectReference `json:"localObjectReference,omitempty"` 1763 1764 // Name: The Secret to select from. 1765 Name string `json:"name,omitempty"` 1766 1767 // Optional: (Optional) Specify whether the Secret must be defined 1768 Optional bool `json:"optional,omitempty"` 1769 1770 // ForceSendFields is a list of field names (e.g. 1771 // "LocalObjectReference") to unconditionally include in API requests. 1772 // By default, fields with empty or default values are omitted from API 1773 // requests. However, any non-pointer, non-interface field appearing in 1774 // ForceSendFields will be sent to the server regardless of whether the 1775 // field is empty or not. This may be used to include empty fields in 1776 // Patch requests. 1777 ForceSendFields []string `json:"-"` 1778 1779 // NullFields is a list of field names (e.g. "LocalObjectReference") to 1780 // include in API requests with the JSON null value. By default, fields 1781 // with empty values are omitted from API requests. However, any field 1782 // with an empty value appearing in NullFields will be sent to the 1783 // server as null. It is an error if a field in this list has a 1784 // non-empty value. This may be used to include null fields in Patch 1785 // requests. 1786 NullFields []string `json:"-"` 1787 } 1788 1789 func (s *SecretEnvSource) MarshalJSON() ([]byte, error) { 1790 type NoMethod SecretEnvSource 1791 raw := NoMethod(*s) 1792 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1793 } 1794 1795 // SecretKeySelector: SecretKeySelector selects a key of a Secret. 1796 type SecretKeySelector struct { 1797 // Key: A Cloud Secret Manager secret version. Must be 'latest' for the 1798 // latest version or an integer for a specific version. The key of the 1799 // secret to select from. Must be a valid secret key. 1800 Key string `json:"key,omitempty"` 1801 1802 // LocalObjectReference: This field should not be used directly as it is 1803 // meant to be inlined directly into the message. Use the "name" field 1804 // instead. 1805 LocalObjectReference *LocalObjectReference `json:"localObjectReference,omitempty"` 1806 1807 // Name: The name of the secret in Cloud Secret Manager. By default, the 1808 // secret is assumed to be in the same project. If the secret is in 1809 // another project, you must define an alias. An alias definition has 1810 // the form: :projects//secrets/. If multiple alias definitions are 1811 // needed, they must be separated by commas. The alias definitions must 1812 // be set on the run.googleapis.com/secrets annotation. The name of the 1813 // secret in the pod's namespace to select from. 1814 Name string `json:"name,omitempty"` 1815 1816 // Optional: (Optional) Specify whether the Secret or its key must be 1817 // defined 1818 Optional bool `json:"optional,omitempty"` 1819 1820 // ForceSendFields is a list of field names (e.g. "Key") to 1821 // unconditionally include in API requests. By default, fields with 1822 // empty or default values are omitted from API requests. However, any 1823 // non-pointer, non-interface field appearing in ForceSendFields will be 1824 // sent to the server regardless of whether the field is empty or not. 1825 // This may be used to include empty fields in Patch requests. 1826 ForceSendFields []string `json:"-"` 1827 1828 // NullFields is a list of field names (e.g. "Key") to include in API 1829 // requests with the JSON null value. By default, fields with empty 1830 // values are omitted from API requests. However, any field with an 1831 // empty value appearing in NullFields will be sent to the server as 1832 // null. It is an error if a field in this list has a non-empty value. 1833 // This may be used to include null fields in Patch requests. 1834 NullFields []string `json:"-"` 1835 } 1836 1837 func (s *SecretKeySelector) MarshalJSON() ([]byte, error) { 1838 type NoMethod SecretKeySelector 1839 raw := NoMethod(*s) 1840 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1841 } 1842 1843 // SecretVolumeSource: The secret's value will be presented as the 1844 // content of a file whose name is defined in the item path. If no items 1845 // are defined, the name of the file is the secret_name. The contents of 1846 // the target Secret's Data field will be presented in a volume as files 1847 // using the keys in the Data field as the file names. 1848 type SecretVolumeSource struct { 1849 // DefaultMode: Integer representation of mode bits to use on created 1850 // files by default. Must be a value between 01 and 0777 (octal). If 0 1851 // or not set, it will default to 0444. Directories within the path are 1852 // not affected by this setting. Notes * Internally, a umask of 0222 1853 // will be applied to any non-zero value. * This is an integer 1854 // representation of the mode bits. So, the octal integer value should 1855 // look exactly as the chmod numeric notation with a leading zero. Some 1856 // examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 1857 // (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 1858 // (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 1859 // 493 (base-10). * This might be in conflict with other options that 1860 // affect the file mode, like fsGroup, and the result can be other mode 1861 // bits set. 1862 DefaultMode int64 `json:"defaultMode,omitempty"` 1863 1864 // Items: (Optional) If unspecified, the volume will expose a file whose 1865 // name is the secret_name. If specified, the key will be used as the 1866 // version to fetch from Cloud Secret Manager and the path will be the 1867 // name of the file exposed in the volume. When items are defined, they 1868 // must specify a key and a path. If unspecified, each key-value pair in 1869 // the Data field of the referenced Secret will be projected into the 1870 // volume as a file whose name is the key and content is the value. If 1871 // specified, the listed keys will be projected into the specified 1872 // paths, and unlisted keys will not be present. If a key is specified 1873 // that is not present in the Secret, the volume setup will error unless 1874 // it is marked optional. 1875 Items []*KeyToPath `json:"items,omitempty"` 1876 1877 // Optional: (Optional) Specify whether the Secret or its keys must be 1878 // defined. 1879 Optional bool `json:"optional,omitempty"` 1880 1881 // SecretName: The name of the secret in Cloud Secret Manager. By 1882 // default, the secret is assumed to be in the same project. If the 1883 // secret is in another project, you must define an alias. An alias 1884 // definition has the form: :projects//secrets/. If multiple alias 1885 // definitions are needed, they must be separated by commas. The alias 1886 // definitions must be set on the run.googleapis.com/secrets annotation. 1887 // Name of the secret in the container's namespace to use. 1888 SecretName string `json:"secretName,omitempty"` 1889 1890 // ForceSendFields is a list of field names (e.g. "DefaultMode") to 1891 // unconditionally include in API requests. By default, fields with 1892 // empty or default values are omitted from API requests. However, any 1893 // non-pointer, non-interface field appearing in ForceSendFields will be 1894 // sent to the server regardless of whether the field is empty or not. 1895 // This may be used to include empty fields in Patch requests. 1896 ForceSendFields []string `json:"-"` 1897 1898 // NullFields is a list of field names (e.g. "DefaultMode") to include 1899 // in API requests with the JSON null value. By default, fields with 1900 // empty values are omitted from API requests. However, any field with 1901 // an empty value appearing in NullFields will be sent to the server as 1902 // null. It is an error if a field in this list has a non-empty value. 1903 // This may be used to include null fields in Patch requests. 1904 NullFields []string `json:"-"` 1905 } 1906 1907 func (s *SecretVolumeSource) MarshalJSON() ([]byte, error) { 1908 type NoMethod SecretVolumeSource 1909 raw := NoMethod(*s) 1910 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1911 } 1912 1913 // SecurityContext: Not supported by Cloud Run SecurityContext holds 1914 // security configuration that will be applied to a container. Some 1915 // fields are present in both SecurityContext and PodSecurityContext. 1916 // When both are set, the values in SecurityContext take precedence. 1917 type SecurityContext struct { 1918 // RunAsUser: (Optional) The UID to run the entrypoint of the container 1919 // process. Defaults to user specified in image metadata if unspecified. 1920 // May also be set in PodSecurityContext. If set in both SecurityContext 1921 // and PodSecurityContext, the value specified in SecurityContext takes 1922 // precedence. 1923 RunAsUser int64 `json:"runAsUser,omitempty"` 1924 1925 // ForceSendFields is a list of field names (e.g. "RunAsUser") to 1926 // unconditionally include in API requests. By default, fields with 1927 // empty or default values are omitted from API requests. However, any 1928 // non-pointer, non-interface field appearing in ForceSendFields will be 1929 // sent to the server regardless of whether the field is empty or not. 1930 // This may be used to include empty fields in Patch requests. 1931 ForceSendFields []string `json:"-"` 1932 1933 // NullFields is a list of field names (e.g. "RunAsUser") to include in 1934 // API requests with the JSON null value. By default, fields with empty 1935 // values are omitted from API requests. However, any field with an 1936 // empty value appearing in NullFields will be sent to the server as 1937 // null. It is an error if a field in this list has a non-empty value. 1938 // This may be used to include null fields in Patch requests. 1939 NullFields []string `json:"-"` 1940 } 1941 1942 func (s *SecurityContext) MarshalJSON() ([]byte, error) { 1943 type NoMethod SecurityContext 1944 raw := NoMethod(*s) 1945 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1946 } 1947 1948 // TCPSocketAction: Not supported by Cloud Run TCPSocketAction describes 1949 // an action based on opening a socket 1950 type TCPSocketAction struct { 1951 // Host: (Optional) Optional: Host name to connect to, defaults to the 1952 // pod IP. 1953 Host string `json:"host,omitempty"` 1954 1955 // Port: Number or name of the port to access on the container. Number 1956 // must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. This 1957 // field is currently limited to integer types only because of proto's 1958 // inability to properly support the IntOrString golang type. 1959 Port int64 `json:"port,omitempty"` 1960 1961 // ForceSendFields is a list of field names (e.g. "Host") to 1962 // unconditionally include in API requests. By default, fields with 1963 // empty or default values are omitted from API requests. However, any 1964 // non-pointer, non-interface field appearing in ForceSendFields will be 1965 // sent to the server regardless of whether the field is empty or not. 1966 // This may be used to include empty fields in Patch requests. 1967 ForceSendFields []string `json:"-"` 1968 1969 // NullFields is a list of field names (e.g. "Host") to include in API 1970 // requests with the JSON null value. By default, fields with empty 1971 // values are omitted from API requests. However, any field with an 1972 // empty value appearing in NullFields will be sent to the server as 1973 // null. It is an error if a field in this list has a non-empty value. 1974 // This may be used to include null fields in Patch requests. 1975 NullFields []string `json:"-"` 1976 } 1977 1978 func (s *TCPSocketAction) MarshalJSON() ([]byte, error) { 1979 type NoMethod TCPSocketAction 1980 raw := NoMethod(*s) 1981 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1982 } 1983 1984 // Volume: Volume represents a named volume in a container. 1985 type Volume struct { 1986 ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"` 1987 1988 // Name: Volume's name. In Cloud Run Fully Managed, the name 'cloudsql' 1989 // is reserved. 1990 Name string `json:"name,omitempty"` 1991 1992 Secret *SecretVolumeSource `json:"secret,omitempty"` 1993 1994 // ForceSendFields is a list of field names (e.g. "ConfigMap") to 1995 // unconditionally include in API requests. By default, fields with 1996 // empty or default values are omitted from API requests. However, any 1997 // non-pointer, non-interface field appearing in ForceSendFields will be 1998 // sent to the server regardless of whether the field is empty or not. 1999 // This may be used to include empty fields in Patch requests. 2000 ForceSendFields []string `json:"-"` 2001 2002 // NullFields is a list of field names (e.g. "ConfigMap") to include in 2003 // API requests with the JSON null value. By default, fields with empty 2004 // values are omitted from API requests. However, any field with an 2005 // empty value appearing in NullFields will be sent to the server as 2006 // null. It is an error if a field in this list has a non-empty value. 2007 // This may be used to include null fields in Patch requests. 2008 NullFields []string `json:"-"` 2009 } 2010 2011 func (s *Volume) MarshalJSON() ([]byte, error) { 2012 type NoMethod Volume 2013 raw := NoMethod(*s) 2014 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2015 } 2016 2017 // VolumeMount: VolumeMount describes a mounting of a Volume within a 2018 // container. 2019 type VolumeMount struct { 2020 // MountPath: Path within the container at which the volume should be 2021 // mounted. Must not contain ':'. 2022 MountPath string `json:"mountPath,omitempty"` 2023 2024 // Name: The name of the volume. There must be a corresponding Volume 2025 // with the same name. 2026 Name string `json:"name,omitempty"` 2027 2028 // ReadOnly: (Optional) Only true is accepted. Defaults to true. 2029 ReadOnly bool `json:"readOnly,omitempty"` 2030 2031 // SubPath: (Optional) Path within the volume from which the container's 2032 // volume should be mounted. Defaults to "" (volume's root). 2033 SubPath string `json:"subPath,omitempty"` 2034 2035 // ForceSendFields is a list of field names (e.g. "MountPath") to 2036 // unconditionally include in API requests. By default, fields with 2037 // empty or default values are omitted from API requests. However, any 2038 // non-pointer, non-interface field appearing in ForceSendFields will be 2039 // sent to the server regardless of whether the field is empty or not. 2040 // This may be used to include empty fields in Patch requests. 2041 ForceSendFields []string `json:"-"` 2042 2043 // NullFields is a list of field names (e.g. "MountPath") to include in 2044 // API requests with the JSON null value. By default, fields with empty 2045 // values are omitted from API requests. However, any field with an 2046 // empty value appearing in NullFields will be sent to the server as 2047 // null. It is an error if a field in this list has a non-empty value. 2048 // This may be used to include null fields in Patch requests. 2049 NullFields []string `json:"-"` 2050 } 2051 2052 func (s *VolumeMount) MarshalJSON() ([]byte, error) { 2053 type NoMethod VolumeMount 2054 raw := NoMethod(*s) 2055 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2056 } 2057 2058 // method id "run.namespaces.jobs.create": 2059 2060 type NamespacesJobsCreateCall struct { 2061 s *Service 2062 parent string 2063 job *Job 2064 urlParams_ gensupport.URLParams 2065 ctx_ context.Context 2066 header_ http.Header 2067 } 2068 2069 // Create: Create a job. 2070 // 2071 // - parent: The namespace in which the job should be created. Replace 2072 // {namespace_id} with the project ID or number. 2073 func (r *NamespacesJobsService) Create(parent string, job *Job) *NamespacesJobsCreateCall { 2074 c := &NamespacesJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2075 c.parent = parent 2076 c.job = job 2077 return c 2078 } 2079 2080 // Fields allows partial responses to be retrieved. See 2081 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2082 // for more information. 2083 func (c *NamespacesJobsCreateCall) Fields(s ...googleapi.Field) *NamespacesJobsCreateCall { 2084 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2085 return c 2086 } 2087 2088 // Context sets the context to be used in this call's Do method. Any 2089 // pending HTTP request will be aborted if the provided context is 2090 // canceled. 2091 func (c *NamespacesJobsCreateCall) Context(ctx context.Context) *NamespacesJobsCreateCall { 2092 c.ctx_ = ctx 2093 return c 2094 } 2095 2096 // Header returns an http.Header that can be modified by the caller to 2097 // add HTTP headers to the request. 2098 func (c *NamespacesJobsCreateCall) Header() http.Header { 2099 if c.header_ == nil { 2100 c.header_ = make(http.Header) 2101 } 2102 return c.header_ 2103 } 2104 2105 func (c *NamespacesJobsCreateCall) doRequest(alt string) (*http.Response, error) { 2106 reqHeaders := make(http.Header) 2107 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 2108 for k, v := range c.header_ { 2109 reqHeaders[k] = v 2110 } 2111 reqHeaders.Set("User-Agent", c.s.userAgent()) 2112 var body io.Reader = nil 2113 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 2114 if err != nil { 2115 return nil, err 2116 } 2117 reqHeaders.Set("Content-Type", "application/json") 2118 c.urlParams_.Set("alt", alt) 2119 c.urlParams_.Set("prettyPrint", "false") 2120 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/run.googleapis.com/v1alpha1/{+parent}/jobs") 2121 urls += "?" + c.urlParams_.Encode() 2122 req, err := http.NewRequest("POST", urls, body) 2123 if err != nil { 2124 return nil, err 2125 } 2126 req.Header = reqHeaders 2127 googleapi.Expand(req.URL, map[string]string{ 2128 "parent": c.parent, 2129 }) 2130 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2131 } 2132 2133 // Do executes the "run.namespaces.jobs.create" call. 2134 // Exactly one of *Job or error will be non-nil. Any non-2xx status code 2135 // is an error. Response headers are in either 2136 // *Job.ServerResponse.Header or (if a response was returned at all) in 2137 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2138 // whether the returned error was because http.StatusNotModified was 2139 // returned. 2140 func (c *NamespacesJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 2141 gensupport.SetOptions(c.urlParams_, opts...) 2142 res, err := c.doRequest("json") 2143 if res != nil && res.StatusCode == http.StatusNotModified { 2144 if res.Body != nil { 2145 res.Body.Close() 2146 } 2147 return nil, &googleapi.Error{ 2148 Code: res.StatusCode, 2149 Header: res.Header, 2150 } 2151 } 2152 if err != nil { 2153 return nil, err 2154 } 2155 defer googleapi.CloseBody(res) 2156 if err := googleapi.CheckResponse(res); err != nil { 2157 return nil, err 2158 } 2159 ret := &Job{ 2160 ServerResponse: googleapi.ServerResponse{ 2161 Header: res.Header, 2162 HTTPStatusCode: res.StatusCode, 2163 }, 2164 } 2165 target := &ret 2166 if err := gensupport.DecodeResponse(target, res); err != nil { 2167 return nil, err 2168 } 2169 return ret, nil 2170 // { 2171 // "description": "Create a job.", 2172 // "flatPath": "apis/run.googleapis.com/v1alpha1/namespaces/{namespacesId}/jobs", 2173 // "httpMethod": "POST", 2174 // "id": "run.namespaces.jobs.create", 2175 // "parameterOrder": [ 2176 // "parent" 2177 // ], 2178 // "parameters": { 2179 // "parent": { 2180 // "description": "Required. The namespace in which the job should be created. Replace {namespace_id} with the project ID or number.", 2181 // "location": "path", 2182 // "pattern": "^namespaces/[^/]+$", 2183 // "required": true, 2184 // "type": "string" 2185 // } 2186 // }, 2187 // "path": "apis/run.googleapis.com/v1alpha1/{+parent}/jobs", 2188 // "request": { 2189 // "$ref": "Job" 2190 // }, 2191 // "response": { 2192 // "$ref": "Job" 2193 // }, 2194 // "scopes": [ 2195 // "https://www.googleapis.com/auth/cloud-platform" 2196 // ] 2197 // } 2198 2199 } 2200 2201 // method id "run.namespaces.jobs.delete": 2202 2203 type NamespacesJobsDeleteCall struct { 2204 s *Service 2205 name string 2206 urlParams_ gensupport.URLParams 2207 ctx_ context.Context 2208 header_ http.Header 2209 } 2210 2211 // Delete: Delete a job. 2212 // 2213 // - name: The name of the job to delete. For Cloud Run (fully managed), 2214 // replace {namespace_id} with the project ID or number. 2215 func (r *NamespacesJobsService) Delete(name string) *NamespacesJobsDeleteCall { 2216 c := &NamespacesJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2217 c.name = name 2218 return c 2219 } 2220 2221 // ApiVersion sets the optional parameter "apiVersion": Cloud Run 2222 // currently ignores this parameter. 2223 func (c *NamespacesJobsDeleteCall) ApiVersion(apiVersion string) *NamespacesJobsDeleteCall { 2224 c.urlParams_.Set("apiVersion", apiVersion) 2225 return c 2226 } 2227 2228 // Kind sets the optional parameter "kind": Cloud Run currently ignores 2229 // this parameter. 2230 func (c *NamespacesJobsDeleteCall) Kind(kind string) *NamespacesJobsDeleteCall { 2231 c.urlParams_.Set("kind", kind) 2232 return c 2233 } 2234 2235 // PropagationPolicy sets the optional parameter "propagationPolicy": 2236 // Specifies the propagation policy of delete. Cloud Run currently 2237 // ignores this setting, and deletes in the background. Please see 2238 // kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ 2239 // for more information. 2240 func (c *NamespacesJobsDeleteCall) PropagationPolicy(propagationPolicy string) *NamespacesJobsDeleteCall { 2241 c.urlParams_.Set("propagationPolicy", propagationPolicy) 2242 return c 2243 } 2244 2245 // Fields allows partial responses to be retrieved. See 2246 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2247 // for more information. 2248 func (c *NamespacesJobsDeleteCall) Fields(s ...googleapi.Field) *NamespacesJobsDeleteCall { 2249 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2250 return c 2251 } 2252 2253 // Context sets the context to be used in this call's Do method. Any 2254 // pending HTTP request will be aborted if the provided context is 2255 // canceled. 2256 func (c *NamespacesJobsDeleteCall) Context(ctx context.Context) *NamespacesJobsDeleteCall { 2257 c.ctx_ = ctx 2258 return c 2259 } 2260 2261 // Header returns an http.Header that can be modified by the caller to 2262 // add HTTP headers to the request. 2263 func (c *NamespacesJobsDeleteCall) Header() http.Header { 2264 if c.header_ == nil { 2265 c.header_ = make(http.Header) 2266 } 2267 return c.header_ 2268 } 2269 2270 func (c *NamespacesJobsDeleteCall) doRequest(alt string) (*http.Response, error) { 2271 reqHeaders := make(http.Header) 2272 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 2273 for k, v := range c.header_ { 2274 reqHeaders[k] = v 2275 } 2276 reqHeaders.Set("User-Agent", c.s.userAgent()) 2277 var body io.Reader = nil 2278 c.urlParams_.Set("alt", alt) 2279 c.urlParams_.Set("prettyPrint", "false") 2280 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/run.googleapis.com/v1alpha1/{+name}") 2281 urls += "?" + c.urlParams_.Encode() 2282 req, err := http.NewRequest("DELETE", urls, body) 2283 if err != nil { 2284 return nil, err 2285 } 2286 req.Header = reqHeaders 2287 googleapi.Expand(req.URL, map[string]string{ 2288 "name": c.name, 2289 }) 2290 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2291 } 2292 2293 // Do executes the "run.namespaces.jobs.delete" call. 2294 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 2295 // code is an error. Response headers are in either 2296 // *Empty.ServerResponse.Header or (if a response was returned at all) 2297 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 2298 // check whether the returned error was because http.StatusNotModified 2299 // was returned. 2300 func (c *NamespacesJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 2301 gensupport.SetOptions(c.urlParams_, opts...) 2302 res, err := c.doRequest("json") 2303 if res != nil && res.StatusCode == http.StatusNotModified { 2304 if res.Body != nil { 2305 res.Body.Close() 2306 } 2307 return nil, &googleapi.Error{ 2308 Code: res.StatusCode, 2309 Header: res.Header, 2310 } 2311 } 2312 if err != nil { 2313 return nil, err 2314 } 2315 defer googleapi.CloseBody(res) 2316 if err := googleapi.CheckResponse(res); err != nil { 2317 return nil, err 2318 } 2319 ret := &Empty{ 2320 ServerResponse: googleapi.ServerResponse{ 2321 Header: res.Header, 2322 HTTPStatusCode: res.StatusCode, 2323 }, 2324 } 2325 target := &ret 2326 if err := gensupport.DecodeResponse(target, res); err != nil { 2327 return nil, err 2328 } 2329 return ret, nil 2330 // { 2331 // "description": "Delete a job.", 2332 // "flatPath": "apis/run.googleapis.com/v1alpha1/namespaces/{namespacesId}/jobs/{jobsId}", 2333 // "httpMethod": "DELETE", 2334 // "id": "run.namespaces.jobs.delete", 2335 // "parameterOrder": [ 2336 // "name" 2337 // ], 2338 // "parameters": { 2339 // "apiVersion": { 2340 // "description": "Optional. Cloud Run currently ignores this parameter.", 2341 // "location": "query", 2342 // "type": "string" 2343 // }, 2344 // "kind": { 2345 // "description": "Optional. Cloud Run currently ignores this parameter.", 2346 // "location": "query", 2347 // "type": "string" 2348 // }, 2349 // "name": { 2350 // "description": "Required. The name of the job to delete. For Cloud Run (fully managed), replace {namespace_id} with the project ID or number.", 2351 // "location": "path", 2352 // "pattern": "^namespaces/[^/]+/jobs/[^/]+$", 2353 // "required": true, 2354 // "type": "string" 2355 // }, 2356 // "propagationPolicy": { 2357 // "description": "Optional. 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.", 2358 // "location": "query", 2359 // "type": "string" 2360 // } 2361 // }, 2362 // "path": "apis/run.googleapis.com/v1alpha1/{+name}", 2363 // "response": { 2364 // "$ref": "Empty" 2365 // }, 2366 // "scopes": [ 2367 // "https://www.googleapis.com/auth/cloud-platform" 2368 // ] 2369 // } 2370 2371 } 2372 2373 // method id "run.namespaces.jobs.get": 2374 2375 type NamespacesJobsGetCall struct { 2376 s *Service 2377 name string 2378 urlParams_ gensupport.URLParams 2379 ifNoneMatch_ string 2380 ctx_ context.Context 2381 header_ http.Header 2382 } 2383 2384 // Get: Get information about a job. 2385 // 2386 // - name: The name of the job to retrieve. For Cloud Run (fully 2387 // managed), replace {namespace_id} with the project ID or number. 2388 func (r *NamespacesJobsService) Get(name string) *NamespacesJobsGetCall { 2389 c := &NamespacesJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2390 c.name = name 2391 return c 2392 } 2393 2394 // Fields allows partial responses to be retrieved. See 2395 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2396 // for more information. 2397 func (c *NamespacesJobsGetCall) Fields(s ...googleapi.Field) *NamespacesJobsGetCall { 2398 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2399 return c 2400 } 2401 2402 // IfNoneMatch sets the optional parameter which makes the operation 2403 // fail if the object's ETag matches the given value. This is useful for 2404 // getting updates only after the object has changed since the last 2405 // request. Use googleapi.IsNotModified to check whether the response 2406 // error from Do is the result of In-None-Match. 2407 func (c *NamespacesJobsGetCall) IfNoneMatch(entityTag string) *NamespacesJobsGetCall { 2408 c.ifNoneMatch_ = entityTag 2409 return c 2410 } 2411 2412 // Context sets the context to be used in this call's Do method. Any 2413 // pending HTTP request will be aborted if the provided context is 2414 // canceled. 2415 func (c *NamespacesJobsGetCall) Context(ctx context.Context) *NamespacesJobsGetCall { 2416 c.ctx_ = ctx 2417 return c 2418 } 2419 2420 // Header returns an http.Header that can be modified by the caller to 2421 // add HTTP headers to the request. 2422 func (c *NamespacesJobsGetCall) Header() http.Header { 2423 if c.header_ == nil { 2424 c.header_ = make(http.Header) 2425 } 2426 return c.header_ 2427 } 2428 2429 func (c *NamespacesJobsGetCall) doRequest(alt string) (*http.Response, error) { 2430 reqHeaders := make(http.Header) 2431 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 2432 for k, v := range c.header_ { 2433 reqHeaders[k] = v 2434 } 2435 reqHeaders.Set("User-Agent", c.s.userAgent()) 2436 if c.ifNoneMatch_ != "" { 2437 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2438 } 2439 var body io.Reader = nil 2440 c.urlParams_.Set("alt", alt) 2441 c.urlParams_.Set("prettyPrint", "false") 2442 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/run.googleapis.com/v1alpha1/{+name}") 2443 urls += "?" + c.urlParams_.Encode() 2444 req, err := http.NewRequest("GET", urls, body) 2445 if err != nil { 2446 return nil, err 2447 } 2448 req.Header = reqHeaders 2449 googleapi.Expand(req.URL, map[string]string{ 2450 "name": c.name, 2451 }) 2452 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2453 } 2454 2455 // Do executes the "run.namespaces.jobs.get" call. 2456 // Exactly one of *Job or error will be non-nil. Any non-2xx status code 2457 // is an error. Response headers are in either 2458 // *Job.ServerResponse.Header or (if a response was returned at all) in 2459 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2460 // whether the returned error was because http.StatusNotModified was 2461 // returned. 2462 func (c *NamespacesJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) { 2463 gensupport.SetOptions(c.urlParams_, opts...) 2464 res, err := c.doRequest("json") 2465 if res != nil && res.StatusCode == http.StatusNotModified { 2466 if res.Body != nil { 2467 res.Body.Close() 2468 } 2469 return nil, &googleapi.Error{ 2470 Code: res.StatusCode, 2471 Header: res.Header, 2472 } 2473 } 2474 if err != nil { 2475 return nil, err 2476 } 2477 defer googleapi.CloseBody(res) 2478 if err := googleapi.CheckResponse(res); err != nil { 2479 return nil, err 2480 } 2481 ret := &Job{ 2482 ServerResponse: googleapi.ServerResponse{ 2483 Header: res.Header, 2484 HTTPStatusCode: res.StatusCode, 2485 }, 2486 } 2487 target := &ret 2488 if err := gensupport.DecodeResponse(target, res); err != nil { 2489 return nil, err 2490 } 2491 return ret, nil 2492 // { 2493 // "description": "Get information about a job.", 2494 // "flatPath": "apis/run.googleapis.com/v1alpha1/namespaces/{namespacesId}/jobs/{jobsId}", 2495 // "httpMethod": "GET", 2496 // "id": "run.namespaces.jobs.get", 2497 // "parameterOrder": [ 2498 // "name" 2499 // ], 2500 // "parameters": { 2501 // "name": { 2502 // "description": "Required. The name of the job to retrieve. For Cloud Run (fully managed), replace {namespace_id} with the project ID or number.", 2503 // "location": "path", 2504 // "pattern": "^namespaces/[^/]+/jobs/[^/]+$", 2505 // "required": true, 2506 // "type": "string" 2507 // } 2508 // }, 2509 // "path": "apis/run.googleapis.com/v1alpha1/{+name}", 2510 // "response": { 2511 // "$ref": "Job" 2512 // }, 2513 // "scopes": [ 2514 // "https://www.googleapis.com/auth/cloud-platform" 2515 // ] 2516 // } 2517 2518 } 2519 2520 // method id "run.namespaces.jobs.list": 2521 2522 type NamespacesJobsListCall struct { 2523 s *Service 2524 parent string 2525 urlParams_ gensupport.URLParams 2526 ifNoneMatch_ string 2527 ctx_ context.Context 2528 header_ http.Header 2529 } 2530 2531 // List: List jobs. 2532 // 2533 // - parent: The namespace from which the jobs should be listed. Replace 2534 // {namespace_id} with the project ID or number. 2535 func (r *NamespacesJobsService) List(parent string) *NamespacesJobsListCall { 2536 c := &NamespacesJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2537 c.parent = parent 2538 return c 2539 } 2540 2541 // Continue sets the optional parameter "continue": Optional encoded 2542 // string to continue paging. 2543 func (c *NamespacesJobsListCall) Continue(continue_ string) *NamespacesJobsListCall { 2544 c.urlParams_.Set("continue", continue_) 2545 return c 2546 } 2547 2548 // FieldSelector sets the optional parameter "fieldSelector": Allows to 2549 // filter resources based on a specific value for a field name. Send 2550 // this in a query string format. i.e. 'metadata.name%3Dlorem'. Not 2551 // currently used by Cloud Run. 2552 func (c *NamespacesJobsListCall) FieldSelector(fieldSelector string) *NamespacesJobsListCall { 2553 c.urlParams_.Set("fieldSelector", fieldSelector) 2554 return c 2555 } 2556 2557 // IncludeUninitialized sets the optional parameter 2558 // "includeUninitialized": Not currently used by Cloud Run. 2559 func (c *NamespacesJobsListCall) IncludeUninitialized(includeUninitialized bool) *NamespacesJobsListCall { 2560 c.urlParams_.Set("includeUninitialized", fmt.Sprint(includeUninitialized)) 2561 return c 2562 } 2563 2564 // LabelSelector sets the optional parameter "labelSelector": Allows to 2565 // filter resources based on a label. Supported operations are =, !=, 2566 // exists, in, and notIn. 2567 func (c *NamespacesJobsListCall) LabelSelector(labelSelector string) *NamespacesJobsListCall { 2568 c.urlParams_.Set("labelSelector", labelSelector) 2569 return c 2570 } 2571 2572 // Limit sets the optional parameter "limit": The maximum number of 2573 // records that should be returned. 2574 func (c *NamespacesJobsListCall) Limit(limit int64) *NamespacesJobsListCall { 2575 c.urlParams_.Set("limit", fmt.Sprint(limit)) 2576 return c 2577 } 2578 2579 // ResourceVersion sets the optional parameter "resourceVersion": The 2580 // baseline resource version from which the list or watch operation 2581 // should start. Not currently used by Cloud Run. 2582 func (c *NamespacesJobsListCall) ResourceVersion(resourceVersion string) *NamespacesJobsListCall { 2583 c.urlParams_.Set("resourceVersion", resourceVersion) 2584 return c 2585 } 2586 2587 // Watch sets the optional parameter "watch": Flag that indicates that 2588 // the client expects to watch this resource as well. Not currently used 2589 // by Cloud Run. 2590 func (c *NamespacesJobsListCall) Watch(watch bool) *NamespacesJobsListCall { 2591 c.urlParams_.Set("watch", fmt.Sprint(watch)) 2592 return c 2593 } 2594 2595 // Fields allows partial responses to be retrieved. See 2596 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2597 // for more information. 2598 func (c *NamespacesJobsListCall) Fields(s ...googleapi.Field) *NamespacesJobsListCall { 2599 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2600 return c 2601 } 2602 2603 // IfNoneMatch sets the optional parameter which makes the operation 2604 // fail if the object's ETag matches the given value. This is useful for 2605 // getting updates only after the object has changed since the last 2606 // request. Use googleapi.IsNotModified to check whether the response 2607 // error from Do is the result of In-None-Match. 2608 func (c *NamespacesJobsListCall) IfNoneMatch(entityTag string) *NamespacesJobsListCall { 2609 c.ifNoneMatch_ = entityTag 2610 return c 2611 } 2612 2613 // Context sets the context to be used in this call's Do method. Any 2614 // pending HTTP request will be aborted if the provided context is 2615 // canceled. 2616 func (c *NamespacesJobsListCall) Context(ctx context.Context) *NamespacesJobsListCall { 2617 c.ctx_ = ctx 2618 return c 2619 } 2620 2621 // Header returns an http.Header that can be modified by the caller to 2622 // add HTTP headers to the request. 2623 func (c *NamespacesJobsListCall) Header() http.Header { 2624 if c.header_ == nil { 2625 c.header_ = make(http.Header) 2626 } 2627 return c.header_ 2628 } 2629 2630 func (c *NamespacesJobsListCall) doRequest(alt string) (*http.Response, error) { 2631 reqHeaders := make(http.Header) 2632 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 2633 for k, v := range c.header_ { 2634 reqHeaders[k] = v 2635 } 2636 reqHeaders.Set("User-Agent", c.s.userAgent()) 2637 if c.ifNoneMatch_ != "" { 2638 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2639 } 2640 var body io.Reader = nil 2641 c.urlParams_.Set("alt", alt) 2642 c.urlParams_.Set("prettyPrint", "false") 2643 urls := googleapi.ResolveRelative(c.s.BasePath, "apis/run.googleapis.com/v1alpha1/{+parent}/jobs") 2644 urls += "?" + c.urlParams_.Encode() 2645 req, err := http.NewRequest("GET", urls, body) 2646 if err != nil { 2647 return nil, err 2648 } 2649 req.Header = reqHeaders 2650 googleapi.Expand(req.URL, map[string]string{ 2651 "parent": c.parent, 2652 }) 2653 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2654 } 2655 2656 // Do executes the "run.namespaces.jobs.list" call. 2657 // Exactly one of *ListJobsResponse or error will be non-nil. Any 2658 // non-2xx status code is an error. Response headers are in either 2659 // *ListJobsResponse.ServerResponse.Header or (if a response was 2660 // returned at all) in error.(*googleapi.Error).Header. Use 2661 // googleapi.IsNotModified to check whether the returned error was 2662 // because http.StatusNotModified was returned. 2663 func (c *NamespacesJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) { 2664 gensupport.SetOptions(c.urlParams_, opts...) 2665 res, err := c.doRequest("json") 2666 if res != nil && res.StatusCode == http.StatusNotModified { 2667 if res.Body != nil { 2668 res.Body.Close() 2669 } 2670 return nil, &googleapi.Error{ 2671 Code: res.StatusCode, 2672 Header: res.Header, 2673 } 2674 } 2675 if err != nil { 2676 return nil, err 2677 } 2678 defer googleapi.CloseBody(res) 2679 if err := googleapi.CheckResponse(res); err != nil { 2680 return nil, err 2681 } 2682 ret := &ListJobsResponse{ 2683 ServerResponse: googleapi.ServerResponse{ 2684 Header: res.Header, 2685 HTTPStatusCode: res.StatusCode, 2686 }, 2687 } 2688 target := &ret 2689 if err := gensupport.DecodeResponse(target, res); err != nil { 2690 return nil, err 2691 } 2692 return ret, nil 2693 // { 2694 // "description": "List jobs.", 2695 // "flatPath": "apis/run.googleapis.com/v1alpha1/namespaces/{namespacesId}/jobs", 2696 // "httpMethod": "GET", 2697 // "id": "run.namespaces.jobs.list", 2698 // "parameterOrder": [ 2699 // "parent" 2700 // ], 2701 // "parameters": { 2702 // "continue": { 2703 // "description": "Optional. Optional encoded string to continue paging.", 2704 // "location": "query", 2705 // "type": "string" 2706 // }, 2707 // "fieldSelector": { 2708 // "description": "Optional. 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.", 2709 // "location": "query", 2710 // "type": "string" 2711 // }, 2712 // "includeUninitialized": { 2713 // "description": "Optional. Not currently used by Cloud Run.", 2714 // "location": "query", 2715 // "type": "boolean" 2716 // }, 2717 // "labelSelector": { 2718 // "description": "Optional. Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", 2719 // "location": "query", 2720 // "type": "string" 2721 // }, 2722 // "limit": { 2723 // "description": "Optional. The maximum number of records that should be returned.", 2724 // "format": "int32", 2725 // "location": "query", 2726 // "type": "integer" 2727 // }, 2728 // "parent": { 2729 // "description": "Required. The namespace from which the jobs should be listed. Replace {namespace_id} with the project ID or number.", 2730 // "location": "path", 2731 // "pattern": "^namespaces/[^/]+$", 2732 // "required": true, 2733 // "type": "string" 2734 // }, 2735 // "resourceVersion": { 2736 // "description": "Optional. The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", 2737 // "location": "query", 2738 // "type": "string" 2739 // }, 2740 // "watch": { 2741 // "description": "Optional. Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", 2742 // "location": "query", 2743 // "type": "boolean" 2744 // } 2745 // }, 2746 // "path": "apis/run.googleapis.com/v1alpha1/{+parent}/jobs", 2747 // "response": { 2748 // "$ref": "ListJobsResponse" 2749 // }, 2750 // "scopes": [ 2751 // "https://www.googleapis.com/auth/cloud-platform" 2752 // ] 2753 // } 2754 2755 } 2756