/
classes.rb
4834 lines (4076 loc) · 208 KB
/
classes.rb
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 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module RunV1alpha1
# Information for connecting over HTTP(s).
class Addressable
include Google::Apis::Core::Hashable
# Deprecated - use url instead.
# Corresponds to the JSON property `hostname`
# @return [String]
attr_accessor :hostname
#
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@hostname = args[:hostname] if args.key?(:hostname)
@url = args[:url] if args.key?(:url)
end
end
# Specifies the audit configuration for a service. The configuration determines
# which permission types are logged, and what identities, if any, are exempted
# from logging. An AuditConfig must have one or more AuditLogConfigs. If there
# are AuditConfigs for both `allServices` and a specific service, the union of
# the two AuditConfigs is used for that service: the log_types specified in each
# AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
# exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
# service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
# exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
# ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
# "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
# , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
# this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
# exempts jose@example.com from DATA_READ logging, and aliya@example.com from
# DATA_WRITE logging.
class AuditConfig
include Google::Apis::Core::Hashable
# The configuration for logging of each type of permission.
# Corresponds to the JSON property `auditLogConfigs`
# @return [Array<Google::Apis::RunV1alpha1::AuditLogConfig>]
attr_accessor :audit_log_configs
# Specifies a service that will be enabled for audit logging. For example, `
# storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
# value that covers all services.
# Corresponds to the JSON property `service`
# @return [String]
attr_accessor :service
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
@service = args[:service] if args.key?(:service)
end
end
# Provides the configuration for logging a type of permissions. Example: ` "
# audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
# jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
# DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
# DATA_READ logging.
class AuditLogConfig
include Google::Apis::Core::Hashable
# Specifies the identities that do not cause logging for this type of permission.
# Follows the same format of Binding.members.
# Corresponds to the JSON property `exemptedMembers`
# @return [Array<String>]
attr_accessor :exempted_members
# The log type that this config enables.
# Corresponds to the JSON property `logType`
# @return [String]
attr_accessor :log_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@log_type = args[:log_type] if args.key?(:log_type)
end
end
# A domain that a user has been authorized to administer. To authorize use of a
# domain, verify ownership via [Webmaster Central](https://www.google.com/
# webmasters/verification/home).
class AuthorizedDomain
include Google::Apis::Core::Hashable
# Relative name of the domain authorized for use. Example: `example.com`.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Read only. Full path to the `AuthorizedDomain` resource in the API. Example: `
# apps/myapp/authorizedDomains/example.com`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@name = args[:name] if args.key?(:name)
end
end
# Associates `members` with a `role`.
class Binding
include Google::Apis::Core::Hashable
# Represents a textual expression in the Common Expression Language (CEL) syntax.
# CEL is a C-like expression language. The syntax and semantics of CEL are
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
# "Summary size limit" description: "Determines if a summary is less than 100
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
# Requestor is owner" description: "Determines if requestor is the document
# owner" expression: "document.owner == request.auth.claims.email" Example (
# Logic): title: "Public documents" description: "Determine whether the document
# should be publicly visible" expression: "document.type != 'private' &&
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
# string" description: "Create a notification string with a timestamp."
# expression: "'New message received at ' + string(document.create_time)" The
# exact variables and functions that may be referenced within an expression are
# determined by the service that evaluates it. See the service documentation for
# additional information.
# Corresponds to the JSON property `condition`
# @return [Google::Apis::RunV1alpha1::Expr]
attr_accessor :condition
# Specifies the identities requesting access for a Cloud Platform resource. `
# members` can have the following values: * `allUsers`: A special identifier
# that represents anyone who is on the internet; with or without a Google
# account. * `allAuthenticatedUsers`: A special identifier that represents
# anyone who is authenticated with a Google account or a service account. * `
# user:`emailid``: An email address that represents a specific Google account.
# For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
# address that represents a service account. For example, `my-other-app@appspot.
# gserviceaccount.com`. * `group:`emailid``: An email address that represents a
# Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
# `uniqueid``: An email address (plus unique identifier) representing a user
# that has been recently deleted. For example, `alice@example.com?uid=
# 123456789012345678901`. If the user is recovered, this value reverts to `user:`
# emailid`` and the recovered user retains the role in the binding. * `deleted:
# serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a service account that has been recently deleted. For
# example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
# If the service account is undeleted, this value reverts to `serviceAccount:`
# emailid`` and the undeleted service account retains the role in the binding. *
# `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a Google group that has been recently deleted. For
# example, `admins@example.com?uid=123456789012345678901`. If the group is
# recovered, this value reverts to `group:`emailid`` and the recovered group
# retains the role in the binding. * `domain:`domain``: The G Suite domain (
# primary) that represents all the users of that domain. For example, `google.
# com` or `example.com`.
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
# Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
# , or `roles/owner`.
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@condition = args[:condition] if args.key?(:condition)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# Adds and removes POSIX capabilities from running containers.
class Capabilities
include Google::Apis::Core::Hashable
# Added capabilities +optional
# Corresponds to the JSON property `add`
# @return [Array<String>]
attr_accessor :add
# Removed capabilities +optional
# Corresponds to the JSON property `drop`
# @return [Array<String>]
attr_accessor :drop
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@add = args[:add] if args.key?(:add)
@drop = args[:drop] if args.key?(:drop)
end
end
#
class CloudAuditLogsSource
include Google::Apis::Core::Hashable
# The API version for this call such as "events.cloud.google.com/v1alpha1".
# Corresponds to the JSON property `apiVersion`
# @return [String]
attr_accessor :api_version
# The kind of resource, in this case "CloudAuditLogsSource".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# ObjectMeta is metadata that all persisted resources must have, which includes
# all objects users must create.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::RunV1alpha1::ObjectMeta]
attr_accessor :metadata
# The desired state of the CloudAuditLogsSource.
# Corresponds to the JSON property `spec`
# @return [Google::Apis::RunV1alpha1::CloudAuditLogsSourceSpec]
attr_accessor :spec
# CloudAuditLogsSourceStatus represents the current state of a
# CloudAuditLogsSource.
# Corresponds to the JSON property `status`
# @return [Google::Apis::RunV1alpha1::CloudAuditLogsSourceStatus]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@api_version = args[:api_version] if args.key?(:api_version)
@kind = args[:kind] if args.key?(:kind)
@metadata = args[:metadata] if args.key?(:metadata)
@spec = args[:spec] if args.key?(:spec)
@status = args[:status] if args.key?(:status)
end
end
# The desired state of the CloudAuditLogsSource.
class CloudAuditLogsSourceSpec
include Google::Apis::Core::Hashable
# CloudEventOverrides defines arguments for a Source that control the output
# format of the CloudEvents produced by the Source.
# Corresponds to the JSON property `ceOverrides`
# @return [Google::Apis::RunV1alpha1::CloudEventOverrides]
attr_accessor :ce_overrides
# Required. The method name at the service API. This must match "methodName" in
# Cloud Audit Logs. Regex or Wildcards (*) are not supported. Example: "google.
# cloud.bigquery.job.create".
# Corresponds to the JSON property `methodName`
# @return [String]
attr_accessor :method_name
# Optional. The resource specification. This must match "methodName" in Cloud
# Audit Logs. Regex or Wildcards (*) are not supported. Example: "projects/my-
# project/jobs/foo".
# Corresponds to the JSON property `resourceName`
# @return [String]
attr_accessor :resource_name
# Optional. Email address of the IAM service account associated with the source.
# The service account represents the identity of the source, and determines what
# permissions the source has. If not provided, the source will use the project's
# default service account.
# Corresponds to the JSON property `serviceAccountName`
# @return [String]
attr_accessor :service_account_name
# Required. The GCP service name. This must match "serviceName" in Cloud Audit
# Logs. Regex or Wildcards (*) are not supported. Example: "bigquery.googleapis.
# com".
# Corresponds to the JSON property `serviceName`
# @return [String]
attr_accessor :service_name
# Sink is a reference to an object that will resolve to a domain name or a URI
# directly to use as the sink.
# Corresponds to the JSON property `sink`
# @return [Google::Apis::RunV1alpha1::Destination]
attr_accessor :sink
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ce_overrides = args[:ce_overrides] if args.key?(:ce_overrides)
@method_name = args[:method_name] if args.key?(:method_name)
@resource_name = args[:resource_name] if args.key?(:resource_name)
@service_account_name = args[:service_account_name] if args.key?(:service_account_name)
@service_name = args[:service_name] if args.key?(:service_name)
@sink = args[:sink] if args.key?(:sink)
end
end
# CloudAuditLogsSourceStatus represents the current state of a
# CloudAuditLogsSource.
class CloudAuditLogsSourceStatus
include Google::Apis::Core::Hashable
# Array of observed CloudAuditLogsSourceConditions, indicating the current state
# of the CloudAuditLogsSource.
# Corresponds to the JSON property `conditions`
# @return [Array<Google::Apis::RunV1alpha1::Condition>]
attr_accessor :conditions
# ObservedGeneration is the 'Generation' of the CloudAuditLogsSource that was
# last processed by the controller.
# Corresponds to the JSON property `observedGeneration`
# @return [Fixnum]
attr_accessor :observed_generation
# SinkURI is the current active sink URI that has been configured for the Source.
# +optional
# Corresponds to the JSON property `sinkUri`
# @return [String]
attr_accessor :sink_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@conditions = args[:conditions] if args.key?(:conditions)
@observed_generation = args[:observed_generation] if args.key?(:observed_generation)
@sink_uri = args[:sink_uri] if args.key?(:sink_uri)
end
end
# CloudEventOverrides defines arguments for a Source that control the output
# format of the CloudEvents produced by the Source.
class CloudEventOverrides
include Google::Apis::Core::Hashable
# Extensions specify what attribute are added or overridden on the outbound
# event. Each `Extensions` key-value pair are set on the event as an attribute
# extension independently. +optional
# Corresponds to the JSON property `extensions`
# @return [Hash<String,String>]
attr_accessor :extensions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@extensions = args[:extensions] if args.key?(:extensions)
end
end
#
class CloudPubSubSource
include Google::Apis::Core::Hashable
# The API version for this call such as "events.cloud.google.com/v1alpha1".
# Corresponds to the JSON property `apiVersion`
# @return [String]
attr_accessor :api_version
# The kind of resource, in this case "CloudPubSubSource".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# ObjectMeta is metadata that all persisted resources must have, which includes
# all objects users must create.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::RunV1alpha1::ObjectMeta]
attr_accessor :metadata
# The desired state of the CloudPubSubSource.
# Corresponds to the JSON property `spec`
# @return [Google::Apis::RunV1alpha1::CloudPubSubSourceSpec]
attr_accessor :spec
# CloudPubSubSourceStatus represents the current state of a CloudPubSubSource.
# Corresponds to the JSON property `status`
# @return [Google::Apis::RunV1alpha1::CloudPubSubSourceStatus]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@api_version = args[:api_version] if args.key?(:api_version)
@kind = args[:kind] if args.key?(:kind)
@metadata = args[:metadata] if args.key?(:metadata)
@spec = args[:spec] if args.key?(:spec)
@status = args[:status] if args.key?(:status)
end
end
# The desired state of the CloudPubSubSource.
class CloudPubSubSourceSpec
include Google::Apis::Core::Hashable
# AckDeadline is the default maximum time after a subscriber receives a message
# before the subscriber should acknowledge the message. Defaults to 30 seconds ('
# 30s'). +optional
# Corresponds to the JSON property `ackDeadline`
# @return [String]
attr_accessor :ack_deadline
# CloudEventOverrides defines arguments for a Source that control the output
# format of the CloudEvents produced by the Source.
# Corresponds to the JSON property `ceOverrides`
# @return [Google::Apis::RunV1alpha1::CloudEventOverrides]
attr_accessor :ce_overrides
# Project is the ID of the Google Cloud Project that the CloudPubSubSource Topic
# exists in. If omitted, defaults to same as the cluster. +optional
# Corresponds to the JSON property `project`
# @return [String]
attr_accessor :project
# Cloud Run fully managed: not supported Cloud Run on GKE: supported
# SecretKeySelector selects a key of a Secret.
# Corresponds to the JSON property `pubsubSecret`
# @return [Google::Apis::RunV1alpha1::SecretKeySelector]
attr_accessor :pubsub_secret
# RetainAckedMessages defines whether to retain acknowledged messages. If true,
# acknowledged messages will not be expunged until they fall out of the
# RetentionDuration window.
# Corresponds to the JSON property `retainAckedMessages`
# @return [Boolean]
attr_accessor :retain_acked_messages
alias_method :retain_acked_messages?, :retain_acked_messages
# RetentionDuration defines how long to retain messages in backlog, from the
# time of publish. If RetainAckedMessages is true, this duration affects the
# retention of acknowledged messages, otherwise only unacknowledged messages are
# retained. Cannot be longer than 7 days or shorter than 10 minutes. Defaults to
# 7 days ('7d'). +optional
# Corresponds to the JSON property `retentionDuration`
# @return [String]
attr_accessor :retention_duration
# Cloud Run fully managed: not supported Cloud Run on GKE: supported
# SecretKeySelector selects a key of a Secret.
# Corresponds to the JSON property `secret`
# @return [Google::Apis::RunV1alpha1::SecretKeySelector]
attr_accessor :secret
# Sink is a reference to an object that will resolve to a domain name or a URI
# directly to use as the sink.
# Corresponds to the JSON property `sink`
# @return [Google::Apis::RunV1alpha1::Destination]
attr_accessor :sink
# Topic is the ID of the CloudPubSubSource Topic to Subscribe to. It must be in
# the form of the unique identifier within the project, not the entire name. E.g.
# it must be 'laconia', not 'projects/my-proj/topics/laconia'.
# Corresponds to the JSON property `topic`
# @return [String]
attr_accessor :topic
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ack_deadline = args[:ack_deadline] if args.key?(:ack_deadline)
@ce_overrides = args[:ce_overrides] if args.key?(:ce_overrides)
@project = args[:project] if args.key?(:project)
@pubsub_secret = args[:pubsub_secret] if args.key?(:pubsub_secret)
@retain_acked_messages = args[:retain_acked_messages] if args.key?(:retain_acked_messages)
@retention_duration = args[:retention_duration] if args.key?(:retention_duration)
@secret = args[:secret] if args.key?(:secret)
@sink = args[:sink] if args.key?(:sink)
@topic = args[:topic] if args.key?(:topic)
end
end
# CloudPubSubSourceStatus represents the current state of a CloudPubSubSource.
class CloudPubSubSourceStatus
include Google::Apis::Core::Hashable
# Array of observed CloudPubSubSourceConditions, indicating the current state of
# the CloudPubSubSource.
# Corresponds to the JSON property `conditions`
# @return [Array<Google::Apis::RunV1alpha1::Condition>]
attr_accessor :conditions
# ObservedGeneration is the 'Generation' of the CloudPubSubSource that was last
# processed by the controller.
# Corresponds to the JSON property `observedGeneration`
# @return [Fixnum]
attr_accessor :observed_generation
# SinkURI is the current active sink URI that has been configured for the Source.
# +optional
# Corresponds to the JSON property `sinkUri`
# @return [String]
attr_accessor :sink_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@conditions = args[:conditions] if args.key?(:conditions)
@observed_generation = args[:observed_generation] if args.key?(:observed_generation)
@sink_uri = args[:sink_uri] if args.key?(:sink_uri)
end
end
# The CloudSchedulerSource resource.
class CloudSchedulerSource
include Google::Apis::Core::Hashable
# The API version for this call such as "events.cloud.google.com/v1alpha1".
# Corresponds to the JSON property `apiVersion`
# @return [String]
attr_accessor :api_version
# The kind of resource, in this case "CloudSchedulerSource".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# ObjectMeta is metadata that all persisted resources must have, which includes
# all objects users must create.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::RunV1alpha1::ObjectMeta]
attr_accessor :metadata
# The desired state of the CloudSchedulerSource.
# Corresponds to the JSON property `spec`
# @return [Google::Apis::RunV1alpha1::CloudSchedulerSourceSpec]
attr_accessor :spec
# CloudSchedulerSourceStatus represents the current state of a
# CloudSchedulerSource.
# Corresponds to the JSON property `status`
# @return [Google::Apis::RunV1alpha1::CloudSchedulerSourceStatus]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@api_version = args[:api_version] if args.key?(:api_version)
@kind = args[:kind] if args.key?(:kind)
@metadata = args[:metadata] if args.key?(:metadata)
@spec = args[:spec] if args.key?(:spec)
@status = args[:status] if args.key?(:status)
end
end
# The desired state of the CloudSchedulerSource.
class CloudSchedulerSourceSpec
include Google::Apis::Core::Hashable
# CloudEventOverrides defines arguments for a Source that control the output
# format of the CloudEvents produced by the Source.
# Corresponds to the JSON property `ceOverrides`
# @return [Google::Apis::RunV1alpha1::CloudEventOverrides]
attr_accessor :ce_overrides
# Data to send in the payload of the Event.
# Corresponds to the JSON property `data`
# @return [String]
attr_accessor :data
# Location to create the Scheduler job in.
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
# Project is the ID of the Google Cloud Project that the CloudPubSubSource Topic
# exists in. If omitted, defaults to same as the cluster.
# Corresponds to the JSON property `project`
# @return [String]
attr_accessor :project
# Cloud Run fully managed: not supported Cloud Run on GKE: supported
# SecretKeySelector selects a key of a Secret.
# Corresponds to the JSON property `pubsubSecret`
# @return [Google::Apis::RunV1alpha1::SecretKeySelector]
attr_accessor :pubsub_secret
# Schedule in cron format, for example: "* * * * *" would be run every minute.
# Corresponds to the JSON property `schedule`
# @return [String]
attr_accessor :schedule
# Cloud Run fully managed: not supported Cloud Run on GKE: supported
# SecretKeySelector selects a key of a Secret.
# Corresponds to the JSON property `secret`
# @return [Google::Apis::RunV1alpha1::SecretKeySelector]
attr_accessor :secret
# Sink is a reference to an object that will resolve to a domain name or a URI
# directly to use as the sink.
# Corresponds to the JSON property `sink`
# @return [Google::Apis::RunV1alpha1::Destination]
attr_accessor :sink
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ce_overrides = args[:ce_overrides] if args.key?(:ce_overrides)
@data = args[:data] if args.key?(:data)
@location = args[:location] if args.key?(:location)
@project = args[:project] if args.key?(:project)
@pubsub_secret = args[:pubsub_secret] if args.key?(:pubsub_secret)
@schedule = args[:schedule] if args.key?(:schedule)
@secret = args[:secret] if args.key?(:secret)
@sink = args[:sink] if args.key?(:sink)
end
end
# CloudSchedulerSourceStatus represents the current state of a
# CloudSchedulerSource.
class CloudSchedulerSourceStatus
include Google::Apis::Core::Hashable
# Array of observed CloudSchedulerSourceConditions, indicating the current state
# of the CloudSchedulerSource.
# Corresponds to the JSON property `conditions`
# @return [Array<Google::Apis::RunV1alpha1::Condition>]
attr_accessor :conditions
# ObservedGeneration is the 'Generation' of the CloudSchedulerSource that was
# last processed by the controller.
# Corresponds to the JSON property `observedGeneration`
# @return [Fixnum]
attr_accessor :observed_generation
# SinkURI is the current active sink URI that has been configured for the Source.
# Corresponds to the JSON property `sinkUri`
# @return [String]
attr_accessor :sink_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@conditions = args[:conditions] if args.key?(:conditions)
@observed_generation = args[:observed_generation] if args.key?(:observed_generation)
@sink_uri = args[:sink_uri] if args.key?(:sink_uri)
end
end
# The CloudStorageSource resource.
class CloudStorageSource
include Google::Apis::Core::Hashable
# The API version for this call such as "events.cloud.google.com/v1alpha1".
# Corresponds to the JSON property `apiVersion`
# @return [String]
attr_accessor :api_version
# The kind of resource, in this case "CloudStorageSource".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# ObjectMeta is metadata that all persisted resources must have, which includes
# all objects users must create.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::RunV1alpha1::ObjectMeta]
attr_accessor :metadata
# The desired state of the CloudStorageSource.
# Corresponds to the JSON property `spec`
# @return [Google::Apis::RunV1alpha1::CloudStorageSourceSpec]
attr_accessor :spec
# CloudStorageSourceStatus represents the current state of a CloudStorageSource.
# Corresponds to the JSON property `status`
# @return [Google::Apis::RunV1alpha1::CloudStorageSourceStatus]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@api_version = args[:api_version] if args.key?(:api_version)
@kind = args[:kind] if args.key?(:kind)
@metadata = args[:metadata] if args.key?(:metadata)
@spec = args[:spec] if args.key?(:spec)
@status = args[:status] if args.key?(:status)
end
end
# The desired state of the CloudStorageSource.
class CloudStorageSourceSpec
include Google::Apis::Core::Hashable
# Bucket to subscribe to.
# Corresponds to the JSON property `bucket`
# @return [String]
attr_accessor :bucket
# CloudEventOverrides defines arguments for a Source that control the output
# format of the CloudEvents produced by the Source.
# Corresponds to the JSON property `ceOverrides`
# @return [Google::Apis::RunV1alpha1::CloudEventOverrides]
attr_accessor :ce_overrides
# EventTypes to subscribe to. If unspecified, then subscribe to all events.
# Corresponds to the JSON property `eventTypes`
# @return [Array<String>]
attr_accessor :event_types
# ObjectNamePrefix limits the notifications to objects with this prefix.
# Corresponds to the JSON property `objectNamePrefix`
# @return [String]
attr_accessor :object_name_prefix
# PayloadFormat specifies the contents of the message payload. See https://cloud.
# google.com/storage/docs/pubsub-notifications#payload.
# Corresponds to the JSON property `payloadFormat`
# @return [String]
attr_accessor :payload_format
# Project is the ID of the Google Cloud Project that the PubSub Topic exists in.
# If omitted, defaults to same as the cluster.
# Corresponds to the JSON property `project`
# @return [String]
attr_accessor :project
# Cloud Run fully managed: not supported Cloud Run on GKE: supported
# SecretKeySelector selects a key of a Secret.
# Corresponds to the JSON property `pubsubSecret`
# @return [Google::Apis::RunV1alpha1::SecretKeySelector]
attr_accessor :pubsub_secret
# Cloud Run fully managed: not supported Cloud Run on GKE: supported
# SecretKeySelector selects a key of a Secret.
# Corresponds to the JSON property `secret`
# @return [Google::Apis::RunV1alpha1::SecretKeySelector]
attr_accessor :secret
# ServiceAccountName holds the name of the Kubernetes service account as which
# the underlying K8s resources should be run. If unspecified this will default
# to the "default" service account for the namespace in which the GCS exists.
# Corresponds to the JSON property `serviceAccountName`
# @return [String]
attr_accessor :service_account_name
# Sink is a reference to an object that will resolve to a domain name or a URI
# directly to use as the sink.
# Corresponds to the JSON property `sink`
# @return [Google::Apis::RunV1alpha1::Destination]
attr_accessor :sink
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bucket = args[:bucket] if args.key?(:bucket)
@ce_overrides = args[:ce_overrides] if args.key?(:ce_overrides)
@event_types = args[:event_types] if args.key?(:event_types)
@object_name_prefix = args[:object_name_prefix] if args.key?(:object_name_prefix)
@payload_format = args[:payload_format] if args.key?(:payload_format)
@project = args[:project] if args.key?(:project)
@pubsub_secret = args[:pubsub_secret] if args.key?(:pubsub_secret)
@secret = args[:secret] if args.key?(:secret)
@service_account_name = args[:service_account_name] if args.key?(:service_account_name)
@sink = args[:sink] if args.key?(:sink)
end
end
# CloudStorageSourceStatus represents the current state of a CloudStorageSource.
class CloudStorageSourceStatus
include Google::Apis::Core::Hashable
# Array of observed CloudStorageSourceConditions, indicating the current state
# of the CloudStorageSource.
# Corresponds to the JSON property `conditions`
# @return [Array<Google::Apis::RunV1alpha1::Condition>]
attr_accessor :conditions
# ObservedGeneration is the 'Generation' of the CloudStorageSource that was last
# processed by the controller.
# Corresponds to the JSON property `observedGeneration`
# @return [Fixnum]
attr_accessor :observed_generation
# SinkURI is the current active sink URI that has been configured for the Source.
# Corresponds to the JSON property `sinkUri`
# @return [String]
attr_accessor :sink_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@conditions = args[:conditions] if args.key?(:conditions)
@observed_generation = args[:observed_generation] if args.key?(:observed_generation)
@sink_uri = args[:sink_uri] if args.key?(:sink_uri)
end
end
# Condition defines a generic condition for a Resource
class Condition
include Google::Apis::Core::Hashable
# Optional. Last time the condition transitioned from one status to another.
# Corresponds to the JSON property `lastTransitionTime`
# @return [String]
attr_accessor :last_transition_time
# Optional. Human readable message indicating details about the current status.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
# Optional. One-word CamelCase reason for the condition's last transition.
# Corresponds to the JSON property `reason`
# @return [String]
attr_accessor :reason
# Optional. How to interpret failures of this condition, one of Error, Warning,
# Info
# Corresponds to the JSON property `severity`
# @return [String]
attr_accessor :severity
# Status of the condition, one of True, False, Unknown.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# type is used to communicate the status of the reconciliation process. See also:
# https://github.com/knative/serving/blob/master/docs/spec/errors.md#error-
# conditions-and-reporting Types common to all resources include: * "Ready":
# True when the Resource is ready.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@last_transition_time = args[:last_transition_time] if args.key?(:last_transition_time)
@message = args[:message] if args.key?(:message)
@reason = args[:reason] if args.key?(:reason)
@severity = args[:severity] if args.key?(:severity)
@status = args[:status] if args.key?(:status)
@type = args[:type] if args.key?(:type)
end
end
# ConfigMapEnvSource selects a ConfigMap to populate the environment variables
# with. The contents of the target ConfigMap's Data field will represent the key-
# value pairs as environment variables.
class ConfigMapEnvSource
include Google::Apis::Core::Hashable
# LocalObjectReference contains enough information to let you locate the
# referenced object inside the same namespace.
# Corresponds to the JSON property `localObjectReference`
# @return [Google::Apis::RunV1alpha1::LocalObjectReference]
attr_accessor :local_object_reference
# Cloud Run fully managed: not supported Cloud Run for Anthos: supported The
# ConfigMap to select from.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Cloud Run fully managed: not supported Cloud Run for Anthos: supported Specify
# whether the ConfigMap must be defined +optional
# Corresponds to the JSON property `optional`
# @return [Boolean]
attr_accessor :optional
alias_method :optional?, :optional
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@local_object_reference = args[:local_object_reference] if args.key?(:local_object_reference)
@name = args[:name] if args.key?(:name)
@optional = args[:optional] if args.key?(:optional)
end
end
# Cloud Run fully managed: not supported Cloud Run on GKE: supported Selects a
# key from a ConfigMap.
class ConfigMapKeySelector
include Google::Apis::Core::Hashable
# Cloud Run fully managed: not supported Cloud Run on GKE: supported The key to
# select.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# LocalObjectReference contains enough information to let you locate the
# referenced object inside the same namespace.
# Corresponds to the JSON property `localObjectReference`
# @return [Google::Apis::RunV1alpha1::LocalObjectReference]
attr_accessor :local_object_reference
# Cloud Run fully managed: not supported Cloud Run on GKE: supported The
# ConfigMap to select from.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Cloud Run fully managed: not supported Cloud Run on GKE: supported Specify
# whether the ConfigMap or its key must be defined +optional
# Corresponds to the JSON property `optional`
# @return [Boolean]
attr_accessor :optional
alias_method :optional?, :optional
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] if args.key?(:key)
@local_object_reference = args[:local_object_reference] if args.key?(:local_object_reference)
@name = args[:name] if args.key?(:name)
@optional = args[:optional] if args.key?(:optional)