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