-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
run-gen.go
8860 lines (7992 loc) · 357 KB
/
run-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2024 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package run provides access to the Cloud Run Admin API.
//
// For product documentation, see: https://cloud.google.com/run/
//
// # Library status
//
// These client libraries are officially supported by Google. However, this
// library is considered complete and is in maintenance mode. This means
// that we will address critical bugs and security issues but will not add
// any new features.
//
// When possible, we recommend using our newer
// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
// that are still actively being worked and iterated on.
//
// # Creating a client
//
// Usage example:
//
// import "google.golang.org/api/run/v2"
// ...
// ctx := context.Background()
// runService, err := run.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for
// authentication. For information on how to create and obtain Application
// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// # Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API
// keys), use [google.golang.org/api/option.WithAPIKey]:
//
// runService, err := run.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
// flow, use [google.golang.org/api/option.WithTokenSource]:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// runService, err := run.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See [google.golang.org/api/option.ClientOption] for details on options.
package run // import "google.golang.org/api/run/v2"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
internal "google.golang.org/api/internal"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
var _ = internal.Version
const apiId = "run:v2"
const apiName = "run"
const apiVersion = "v2"
const basePath = "https://run.googleapis.com/"
const basePathTemplate = "https://run.UNIVERSE_DOMAIN/"
const mtlsBasePath = "https://run.mtls.googleapis.com/"
const defaultUniverseDomain = "googleapis.com"
// OAuth2 scopes used by this API.
const (
// See, edit, configure, and delete your Google Cloud data and see the
// email address for your Google Account.
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := internaloption.WithDefaultScopes(
"https://www.googleapis.com/auth/cloud-platform",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
opts = append(opts, internaloption.WithDefaultUniverseDomain(defaultUniverseDomain))
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Locations = NewProjectsLocationsService(s)
return rs
}
type ProjectsService struct {
s *Service
Locations *ProjectsLocationsService
}
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
rs := &ProjectsLocationsService{s: s}
rs.Jobs = NewProjectsLocationsJobsService(s)
rs.Operations = NewProjectsLocationsOperationsService(s)
rs.Services = NewProjectsLocationsServicesService(s)
return rs
}
type ProjectsLocationsService struct {
s *Service
Jobs *ProjectsLocationsJobsService
Operations *ProjectsLocationsOperationsService
Services *ProjectsLocationsServicesService
}
func NewProjectsLocationsJobsService(s *Service) *ProjectsLocationsJobsService {
rs := &ProjectsLocationsJobsService{s: s}
rs.Executions = NewProjectsLocationsJobsExecutionsService(s)
return rs
}
type ProjectsLocationsJobsService struct {
s *Service
Executions *ProjectsLocationsJobsExecutionsService
}
func NewProjectsLocationsJobsExecutionsService(s *Service) *ProjectsLocationsJobsExecutionsService {
rs := &ProjectsLocationsJobsExecutionsService{s: s}
rs.Tasks = NewProjectsLocationsJobsExecutionsTasksService(s)
return rs
}
type ProjectsLocationsJobsExecutionsService struct {
s *Service
Tasks *ProjectsLocationsJobsExecutionsTasksService
}
func NewProjectsLocationsJobsExecutionsTasksService(s *Service) *ProjectsLocationsJobsExecutionsTasksService {
rs := &ProjectsLocationsJobsExecutionsTasksService{s: s}
return rs
}
type ProjectsLocationsJobsExecutionsTasksService struct {
s *Service
}
func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
rs := &ProjectsLocationsOperationsService{s: s}
return rs
}
type ProjectsLocationsOperationsService struct {
s *Service
}
func NewProjectsLocationsServicesService(s *Service) *ProjectsLocationsServicesService {
rs := &ProjectsLocationsServicesService{s: s}
rs.Revisions = NewProjectsLocationsServicesRevisionsService(s)
return rs
}
type ProjectsLocationsServicesService struct {
s *Service
Revisions *ProjectsLocationsServicesRevisionsService
}
func NewProjectsLocationsServicesRevisionsService(s *Service) *ProjectsLocationsServicesRevisionsService {
rs := &ProjectsLocationsServicesRevisionsService{s: s}
return rs
}
type ProjectsLocationsServicesRevisionsService struct {
s *Service
}
// GoogleCloudRunV2BinaryAuthorization: Settings for Binary
// Authorization feature.
type GoogleCloudRunV2BinaryAuthorization struct {
// BreakglassJustification: If present, indicates to use Breakglass
// using this justification. If use_default is False, then it must be
// empty. For more information on breakglass, see
// https://cloud.google.com/binary-authorization/docs/using-breakglass
BreakglassJustification string `json:"breakglassJustification,omitempty"`
// UseDefault: If True, indicates to use the default project's binary
// authorization policy. If False, binary authorization will be
// disabled.
UseDefault bool `json:"useDefault,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "BreakglassJustification") to unconditionally include in API
// requests. By default, fields with empty or default values are omitted
// from API requests. However, any non-pointer, non-interface field
// appearing in ForceSendFields will be sent to the server regardless of
// whether the field is empty or not. This may be used to include empty
// fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BreakglassJustification")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2BinaryAuthorization) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2BinaryAuthorization
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRunV2CancelExecutionRequest: Request message for deleting
// an Execution.
type GoogleCloudRunV2CancelExecutionRequest struct {
// Etag: A system-generated fingerprint for this version of the
// resource. This may be used to detect modification conflict during
// updates.
Etag string `json:"etag,omitempty"`
// ValidateOnly: Indicates that the request should be validated without
// actually cancelling any resources.
ValidateOnly bool `json:"validateOnly,omitempty"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Etag") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2CancelExecutionRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2CancelExecutionRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRunV2CloudSqlInstance: Represents a set of Cloud SQL
// instances. Each one will be available under /cloudsql/[instance].
// Visit https://cloud.google.com/sql/docs/mysql/connect-run for more
// information on how to connect Cloud SQL and Cloud Run.
type GoogleCloudRunV2CloudSqlInstance struct {
// Instances: The Cloud SQL instance connection names, as can be found
// in https://console.cloud.google.com/sql/instances. Visit
// https://cloud.google.com/sql/docs/mysql/connect-run for more
// information on how to connect Cloud SQL and Cloud Run. Format:
// {project}:{location}:{instance}
Instances []string `json:"instances,omitempty"`
// ForceSendFields is a list of field names (e.g. "Instances") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Instances") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2CloudSqlInstance) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2CloudSqlInstance
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRunV2Condition: Defines a status condition for a resource.
type GoogleCloudRunV2Condition struct {
// ExecutionReason: A reason for the execution condition.
//
// Possible values:
// "EXECUTION_REASON_UNDEFINED" - Default value.
// "JOB_STATUS_SERVICE_POLLING_ERROR" - Internal system error getting
// execution status. System will retry.
// "NON_ZERO_EXIT_CODE" - A task reached its retry limit and the last
// attempt failed due to the user container exiting with a non-zero exit
// code.
// "CANCELLED" - The execution was cancelled by users.
// "CANCELLING" - The execution is in the process of being cancelled.
// "DELETED" - The execution was deleted.
ExecutionReason string `json:"executionReason,omitempty"`
// LastTransitionTime: Last time the condition transitioned from one
// status to another.
LastTransitionTime string `json:"lastTransitionTime,omitempty"`
// Message: Human readable message indicating details about the current
// status.
Message string `json:"message,omitempty"`
// Reason: A common (service-level) reason for this condition.
//
// Possible values:
// "COMMON_REASON_UNDEFINED" - Default value.
// "UNKNOWN" - Reason unknown. Further details will be in message.
// "REVISION_FAILED" - Revision creation process failed.
// "PROGRESS_DEADLINE_EXCEEDED" - Timed out waiting for completion.
// "CONTAINER_MISSING" - The container image path is incorrect.
// "CONTAINER_PERMISSION_DENIED" - Insufficient permissions on the
// container image.
// "CONTAINER_IMAGE_UNAUTHORIZED" - Container image is not authorized
// by policy.
// "CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED" - Container image
// policy authorization check failed.
// "ENCRYPTION_KEY_PERMISSION_DENIED" - Insufficient permissions on
// encryption key.
// "ENCRYPTION_KEY_CHECK_FAILED" - Permission check on encryption key
// failed.
// "SECRETS_ACCESS_CHECK_FAILED" - At least one Access check on
// secrets failed.
// "WAITING_FOR_OPERATION" - Waiting for operation to complete.
// "IMMEDIATE_RETRY" - System will retry immediately.
// "POSTPONED_RETRY" - System will retry later; current attempt
// failed.
// "INTERNAL" - An internal error occurred. Further information may be
// in the message.
Reason string `json:"reason,omitempty"`
// RevisionReason: A reason for the revision condition.
//
// Possible values:
// "REVISION_REASON_UNDEFINED" - Default value.
// "PENDING" - Revision in Pending state.
// "RESERVE" - Revision is in Reserve state.
// "RETIRED" - Revision is Retired.
// "RETIRING" - Revision is being retired.
// "RECREATING" - Revision is being recreated.
// "HEALTH_CHECK_CONTAINER_ERROR" - There was a health check error.
// "CUSTOMIZED_PATH_RESPONSE_PENDING" - Health check failed due to
// user error from customized path of the container. System will retry.
// "MIN_INSTANCES_NOT_PROVISIONED" - A revision with
// min_instance_count > 0 was created and is reserved, but it was not
// configured to serve traffic, so it's not live. This can also happen
// momentarily during traffic migration.
// "ACTIVE_REVISION_LIMIT_REACHED" - The maximum allowed number of
// active revisions has been reached.
// "NO_DEPLOYMENT" - There was no deployment defined. This value is no
// longer used, but Services created in older versions of the API might
// contain this value.
// "HEALTH_CHECK_SKIPPED" - A revision's container has no port
// specified since the revision is of a manually scaled service with 0
// instance count
// "MIN_INSTANCES_WARMING" - A revision with min_instance_count > 0
// was created and is waiting for enough instances to begin a traffic
// migration.
RevisionReason string `json:"revisionReason,omitempty"`
// Severity: How to interpret failures of this condition, one of Error,
// Warning, Info
//
// Possible values:
// "SEVERITY_UNSPECIFIED" - Unspecified severity
// "ERROR" - Error severity.
// "WARNING" - Warning severity.
// "INFO" - Info severity.
Severity string `json:"severity,omitempty"`
// State: State of the condition.
//
// Possible values:
// "STATE_UNSPECIFIED" - The default value. This value is used if the
// state is omitted.
// "CONDITION_PENDING" - Transient state: Reconciliation has not
// started yet.
// "CONDITION_RECONCILING" - Transient state: reconciliation is still
// in progress.
// "CONDITION_FAILED" - Terminal state: Reconciliation did not
// succeed.
// "CONDITION_SUCCEEDED" - Terminal state: Reconciliation completed
// successfully.
State string `json:"state,omitempty"`
// Type: type is used to communicate the status of the reconciliation
// process. See also:
// https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting
// Types common to all resources include: * "Ready": True when the
// Resource is ready.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "ExecutionReason") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExecutionReason") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2Condition) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2Condition
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRunV2Container: A single application container. This
// specifies both the container to run, the command to run in the
// container and the arguments to supply to it. Note that additional
// arguments can be supplied by the system to the container at runtime.
type GoogleCloudRunV2Container struct {
// Args: Arguments to the entrypoint. The docker image's CMD is used if
// this is not provided.
Args []string `json:"args,omitempty"`
// Command: Entrypoint array. Not executed within a shell. The docker
// image's ENTRYPOINT is used if this is not provided.
Command []string `json:"command,omitempty"`
// DependsOn: Names of the containers that must start before this
// container.
DependsOn []string `json:"dependsOn,omitempty"`
// Env: List of environment variables to set in the container.
Env []*GoogleCloudRunV2EnvVar `json:"env,omitempty"`
// Image: Required. Name of the container image in Dockerhub, Google
// Artifact Registry, or Google Container Registry. If the host is not
// provided, Dockerhub is assumed.
Image string `json:"image,omitempty"`
// LivenessProbe: Periodic probe of container liveness. Container will
// be restarted if the probe fails.
LivenessProbe *GoogleCloudRunV2Probe `json:"livenessProbe,omitempty"`
// Name: Name of the container specified as a DNS_LABEL (RFC 1123).
Name string `json:"name,omitempty"`
// Ports: List of ports to expose from the container. Only a single port
// can be specified. The specified ports must be listening on all
// interfaces (0.0.0.0) within the container to be accessible. If
// omitted, a port number will be chosen and passed to the container
// through the PORT environment variable for the container to listen on.
Ports []*GoogleCloudRunV2ContainerPort `json:"ports,omitempty"`
// Resources: Compute Resource requirements by this container.
Resources *GoogleCloudRunV2ResourceRequirements `json:"resources,omitempty"`
// StartupProbe: Startup probe of application within the container. All
// other probes are disabled if a startup probe is provided, until it
// succeeds. Container will not be added to service endpoints if the
// probe fails.
StartupProbe *GoogleCloudRunV2Probe `json:"startupProbe,omitempty"`
// VolumeMounts: Volume to mount into the container's filesystem.
VolumeMounts []*GoogleCloudRunV2VolumeMount `json:"volumeMounts,omitempty"`
// WorkingDir: Container's working directory. If not specified, the
// container runtime's default will be used, which might be configured
// in the container image.
WorkingDir string `json:"workingDir,omitempty"`
// ForceSendFields is a list of field names (e.g. "Args") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Args") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2Container) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2Container
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRunV2ContainerOverride: Per-container override
// specification.
type GoogleCloudRunV2ContainerOverride struct {
// Args: Optional. Arguments to the entrypoint. Will replace existing
// args for override.
Args []string `json:"args,omitempty"`
// ClearArgs: Optional. True if the intention is to clear out existing
// args list.
ClearArgs bool `json:"clearArgs,omitempty"`
// Env: List of environment variables to set in the container. Will be
// merged with existing env for override.
Env []*GoogleCloudRunV2EnvVar `json:"env,omitempty"`
// Name: The name of the container specified as a DNS_LABEL.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "Args") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Args") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2ContainerOverride) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2ContainerOverride
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRunV2ContainerPort: ContainerPort represents a network
// port in a single container.
type GoogleCloudRunV2ContainerPort struct {
// ContainerPort: Port number the container listens on. This must be a
// valid TCP port number, 0 < container_port < 65536.
ContainerPort int64 `json:"containerPort,omitempty"`
// Name: If specified, used to specify which protocol to use. Allowed
// values are "http1" and "h2c".
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "ContainerPort") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ContainerPort") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2ContainerPort) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2ContainerPort
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRunV2EmptyDirVolumeSource: In memory (tmpfs) ephemeral
// storage. It is ephemeral in the sense that when the sandbox is taken
// down, the data is destroyed with it (it does not persist across
// sandbox runs).
type GoogleCloudRunV2EmptyDirVolumeSource struct {
// Medium: The medium on which the data is stored. Acceptable values
// today is only MEMORY or none. When none, the default will currently
// be backed by memory but could change over time. +optional
//
// Possible values:
// "MEDIUM_UNSPECIFIED" - When not specified, falls back to the
// default implementation which is currently in memory (this may change
// over time).
// "MEMORY" - Explicitly set the EmptyDir to be in memory. Uses tmpfs.
Medium string `json:"medium,omitempty"`
// SizeLimit: Limit on the storage usable by this EmptyDir volume. The
// size limit is also applicable for memory medium. The maximum usage on
// memory medium EmptyDir would be the minimum value between the
// SizeLimit specified here and the sum of memory limits of all
// containers. The default is nil which means that the limit is
// undefined. More info:
// https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume.
// Info in Kubernetes:
// https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
SizeLimit string `json:"sizeLimit,omitempty"`
// ForceSendFields is a list of field names (e.g. "Medium") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Medium") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2EmptyDirVolumeSource) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2EmptyDirVolumeSource
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRunV2EnvVar: EnvVar represents an environment variable
// present in a Container.
type GoogleCloudRunV2EnvVar struct {
// Name: Required. Name of the environment variable. Must not exceed
// 32768 characters.
Name string `json:"name,omitempty"`
// Value: Variable references $(VAR_NAME) are expanded using the
// previous defined environment variables in the container and any route
// environment variables. If a variable cannot be resolved, the
// reference in the input string will be unchanged. The $(VAR_NAME)
// syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
// references will never be expanded, regardless of whether the variable
// exists or not. Defaults to "", and the maximum length is 32768 bytes.
Value string `json:"value,omitempty"`
// ValueSource: Source for the environment variable's value.
ValueSource *GoogleCloudRunV2EnvVarSource `json:"valueSource,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2EnvVar) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2EnvVar
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRunV2EnvVarSource: EnvVarSource represents a source for
// the value of an EnvVar.
type GoogleCloudRunV2EnvVarSource struct {
// SecretKeyRef: Selects a secret and a specific version from Cloud
// Secret Manager.
SecretKeyRef *GoogleCloudRunV2SecretKeySelector `json:"secretKeyRef,omitempty"`
// ForceSendFields is a list of field names (e.g. "SecretKeyRef") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "SecretKeyRef") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2EnvVarSource) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2EnvVarSource
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRunV2Execution: Execution represents the configuration of
// a single execution. A execution an immutable resource that references
// a container image which is run to completion.
type GoogleCloudRunV2Execution struct {
// Annotations: Output only. Unstructured key value map that may be set
// by external tools to store and arbitrary metadata. They are not
// queryable and should be preserved when modifying objects.
Annotations map[string]string `json:"annotations,omitempty"`
// CancelledCount: Output only. The number of tasks which reached phase
// Cancelled.
CancelledCount int64 `json:"cancelledCount,omitempty"`
// CompletionTime: Output only. Represents time when the execution was
// completed. It is not guaranteed to be set in happens-before order
// across separate operations.
CompletionTime string `json:"completionTime,omitempty"`
// Conditions: Output only. The Condition of this Execution, containing
// its readiness status, and detailed error information in case it did
// not reach the desired state.
Conditions []*GoogleCloudRunV2Condition `json:"conditions,omitempty"`
// CreateTime: Output only. Represents time when the execution was
// acknowledged by the execution controller. It is not guaranteed to be
// set in happens-before order across separate operations.
CreateTime string `json:"createTime,omitempty"`
// DeleteTime: Output only. For a deleted resource, the deletion time.
// It is only populated as a response to a Delete request.
DeleteTime string `json:"deleteTime,omitempty"`
// Etag: Output only. A system-generated fingerprint for this version of
// the resource. May be used to detect modification conflict during
// updates.
Etag string `json:"etag,omitempty"`
// ExpireTime: Output only. For a deleted resource, the time after which
// it will be permamently deleted. It is only populated as a response to
// a Delete request.
ExpireTime string `json:"expireTime,omitempty"`
// FailedCount: Output only. The number of tasks which reached phase
// Failed.
FailedCount int64 `json:"failedCount,omitempty"`
// Generation: Output only. A number that monotonically increases every
// time the user modifies the desired state.
Generation int64 `json:"generation,omitempty,string"`
// Job: Output only. The name of the parent Job.
Job string `json:"job,omitempty"`
// Labels: Output only. Unstructured key value map that can be used to
// organize and categorize objects. User-provided labels are shared with
// Google's billing system, so they can be used to filter, or break down
// billing charges by team, component, environment, state, etc. For more
// information, visit
// https://cloud.google.com/resource-manager/docs/creating-managing-labels
// or https://cloud.google.com/run/docs/configuring/labels
Labels map[string]string `json:"labels,omitempty"`
// LaunchStage: The least stable launch stage needed to create this
// resource, as defined by Google Cloud Platform Launch Stages
// (https://cloud.google.com/terms/launch-stages). Cloud Run supports
// `ALPHA`, `BETA`, and `GA`. Note that this value might not be what was
// used as input. For example, if ALPHA was provided as input in the
// parent resource, but only BETA and GA-level features are were, this
// field will be BETA.
//
// Possible values:
// "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
// "UNIMPLEMENTED" - The feature is not yet implemented. Users can not
// use it.
// "PRELAUNCH" - Prelaunch features are hidden from users and are only
// visible internally.
// "EARLY_ACCESS" - Early Access features are limited to a closed
// group of testers. To use these features, you must sign up in advance
// and sign a Trusted Tester agreement (which includes confidentiality
// provisions). These features may be unstable, changed in
// backward-incompatible ways, and are not guaranteed to be released.
// "ALPHA" - Alpha is a limited availability test for releases before
// they are cleared for widespread use. By Alpha, all significant design
// issues are resolved and we are in the process of verifying
// functionality. Alpha customers need to apply for access, agree to
// applicable terms, and have their projects allowlisted. Alpha releases
// don't have to be feature complete, no SLAs are provided, and there
// are no technical support obligations, but they will be far enough
// along that customers can actually use them in test environments or
// for limited-use tests -- just like they would in normal production
// cases.
// "BETA" - Beta is the point at which we are ready to open a release
// for any customer to use. There are no SLA or technical support
// obligations in a Beta release. Products will be complete from a
// feature perspective, but may have some open outstanding issues. Beta
// releases are suitable for limited production use cases.
// "GA" - GA features are open to all developers and are considered
// stable and fully qualified for production use.
// "DEPRECATED" - Deprecated features are scheduled to be shut down
// and removed. For more information, see the "Deprecation Policy"
// section of our [Terms of Service](https://cloud.google.com/terms/)
// and the [Google Cloud Platform Subject to the Deprecation
// Policy](https://cloud.google.com/terms/deprecation) documentation.
LaunchStage string `json:"launchStage,omitempty"`
// LogUri: Output only. URI where logs for this execution can be found
// in Cloud Console.
LogUri string `json:"logUri,omitempty"`
// Name: Output only. The unique name of this Execution.
Name string `json:"name,omitempty"`
// ObservedGeneration: Output only. The generation of this Execution.
// See comments in `reconciling` for additional information on
// reconciliation process in Cloud Run.
ObservedGeneration int64 `json:"observedGeneration,omitempty,string"`
// Parallelism: Output only. Specifies the maximum desired number of
// tasks the execution should run at any given time. Must be <=
// task_count. The actual number of tasks running in steady state will
// be less than this number when ((.spec.task_count -
// .status.successful) < .spec.parallelism), i.e. when the work left to
// do is less than max parallelism.
Parallelism int64 `json:"parallelism,omitempty"`
// Reconciling: Output only. Indicates whether the resource's
// reconciliation is still in progress. See comments in
// `Job.reconciling` for additional information on reconciliation
// process in Cloud Run.
Reconciling bool `json:"reconciling,omitempty"`
// RetriedCount: Output only. The number of tasks which have retried at
// least once.
RetriedCount int64 `json:"retriedCount,omitempty"`
// RunningCount: Output only. The number of actively running tasks.
RunningCount int64 `json:"runningCount,omitempty"`
// SatisfiesPzs: Output only. Reserved for future use.
SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
// StartTime: Output only. Represents time when the execution started to
// run. It is not guaranteed to be set in happens-before order across
// separate operations.
StartTime string `json:"startTime,omitempty"`
// SucceededCount: Output only. The number of tasks which reached phase
// Succeeded.
SucceededCount int64 `json:"succeededCount,omitempty"`
// TaskCount: Output only. Specifies the desired number of tasks the
// execution should run. Setting to 1 means that parallelism is limited
// to 1 and the success of that task signals the success of the
// execution.
TaskCount int64 `json:"taskCount,omitempty"`
// Template: Output only. The template used to create tasks for this
// execution.
Template *GoogleCloudRunV2TaskTemplate `json:"template,omitempty"`
// Uid: Output only. Server assigned unique identifier for the
// Execution. The value is a UUID4 string and guaranteed to remain
// unchanged until the resource is deleted.
Uid string `json:"uid,omitempty"`
// UpdateTime: Output only. The last-modified time.
UpdateTime string `json:"updateTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Annotations") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Annotations") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2Execution) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2Execution
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRunV2ExecutionReference: Reference to an Execution. Use
// /Executions.GetExecution with the given name to get full execution
// including the latest status.
type GoogleCloudRunV2ExecutionReference struct {
// CompletionTime: Creation timestamp of the execution.
CompletionTime string `json:"completionTime,omitempty"`
// CreateTime: Creation timestamp of the execution.
CreateTime string `json:"createTime,omitempty"`
// Name: Name of the execution.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "CompletionTime") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CompletionTime") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRunV2ExecutionReference) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRunV2ExecutionReference