/
classes.rb
3624 lines (3112 loc) · 171 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 ServicenetworkingV1beta
# Metadata provided through GetOperation request for the LRO generated by
# AddDnsRecordSet API
class AddDnsRecordSetMetadata
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Metadata provided through GetOperation request for the LRO generated by
# AddDnsZone API
class AddDnsZoneMetadata
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Represents managed DNS zones created in the shared producer host and consumer
# projects.
class AddDnsZoneResponse
include Google::Apis::Core::Hashable
# Represents a DNS zone resource.
# Corresponds to the JSON property `consumerPeeringZone`
# @return [Google::Apis::ServicenetworkingV1beta::DnsZone]
attr_accessor :consumer_peering_zone
# Represents a DNS zone resource.
# Corresponds to the JSON property `producerPrivateZone`
# @return [Google::Apis::ServicenetworkingV1beta::DnsZone]
attr_accessor :producer_private_zone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@consumer_peering_zone = args[:consumer_peering_zone] if args.key?(:consumer_peering_zone)
@producer_private_zone = args[:producer_private_zone] if args.key?(:producer_private_zone)
end
end
# Metadata provided through GetOperation request for the LRO generated by
# AddRoles API
class AddRolesMetadata
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Represents IAM roles added to the shared VPC host project.
class AddRolesResponse
include Google::Apis::Core::Hashable
# Required. List of policy bindings that were added to the shared VPC host
# project.
# Corresponds to the JSON property `policyBinding`
# @return [Array<Google::Apis::ServicenetworkingV1beta::PolicyBinding>]
attr_accessor :policy_binding
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@policy_binding = args[:policy_binding] if args.key?(:policy_binding)
end
end
# Request to create a subnetwork in a previously peered service network.
class AddSubnetworkRequest
include Google::Apis::Core::Hashable
# Required. A resource that represents the service consumer, such as `projects/
# 123456`. The project number can be different from the value in the consumer
# network parameter. For example, the network might be part of a Shared VPC
# network. In those cases, Service Networking validates that this resource
# belongs to that Shared VPC.
# Corresponds to the JSON property `consumer`
# @return [String]
attr_accessor :consumer
# Required. The name of the service consumer's VPC network. The network must
# have an existing private connection that was provisioned through the
# connections.create method. The name must be in the following format: `projects/
# `project`/global/networks/`network``, where `project` is a project number,
# such as `12345`. `network` is the name of a VPC network in the project.
# Corresponds to the JSON property `consumerNetwork`
# @return [String]
attr_accessor :consumer_network
# An optional description of the subnet.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Required. The prefix length of the subnet's IP address range. Use CIDR range
# notation, such as `30` to provision a subnet with an `x.x.x.x/30` CIDR range.
# The IP address range is drawn from a pool of available ranges in the service
# consumer's allocated range.
# Corresponds to the JSON property `ipPrefixLength`
# @return [Fixnum]
attr_accessor :ip_prefix_length
# Required. The name of a [region](/compute/docs/regions-zones) for the subnet,
# such `europe-west1`.
# Corresponds to the JSON property `region`
# @return [String]
attr_accessor :region
# Optional. The starting address of a range. The address must be a valid IPv4
# address in the x.x.x.x format. This value combined with the IP prefix range is
# the CIDR range for the subnet. The range must be within the allocated range
# that is assigned to the private connection. If the CIDR range isn't available,
# the call fails.
# Corresponds to the JSON property `requestedAddress`
# @return [String]
attr_accessor :requested_address
# Required. A name for the new subnet. For information about the naming
# requirements, see [subnetwork](/compute/docs/reference/rest/v1/subnetworks) in
# the Compute API documentation.
# Corresponds to the JSON property `subnetwork`
# @return [String]
attr_accessor :subnetwork
# A list of members that are granted the `compute.networkUser` role on the
# subnet.
# Corresponds to the JSON property `subnetworkUsers`
# @return [Array<String>]
attr_accessor :subnetwork_users
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@consumer = args[:consumer] if args.key?(:consumer)
@consumer_network = args[:consumer_network] if args.key?(:consumer_network)
@description = args[:description] if args.key?(:description)
@ip_prefix_length = args[:ip_prefix_length] if args.key?(:ip_prefix_length)
@region = args[:region] if args.key?(:region)
@requested_address = args[:requested_address] if args.key?(:requested_address)
@subnetwork = args[:subnetwork] if args.key?(:subnetwork)
@subnetwork_users = args[:subnetwork_users] if args.key?(:subnetwork_users)
end
end
# Api is a light-weight descriptor for an API Interface. Interfaces are also
# described as "protocol buffer services" in some contexts, such as by the "
# service" keyword in a .proto file, but they are different from API Services,
# which represent a concrete implementation of an interface as opposed to simply
# a description of methods and bindings. They are also sometimes simply referred
# to as "APIs" in other contexts, such as the name of this message itself. See
# https://cloud.google.com/apis/design/glossary for detailed terminology.
class Api
include Google::Apis::Core::Hashable
# The methods of this interface, in unspecified order.
# Corresponds to the JSON property `methods`
# @return [Array<Google::Apis::ServicenetworkingV1beta::MethodProp>]
attr_accessor :methods_prop
# Included interfaces. See Mixin.
# Corresponds to the JSON property `mixins`
# @return [Array<Google::Apis::ServicenetworkingV1beta::Mixin>]
attr_accessor :mixins
# The fully qualified name of this interface, including package name followed by
# the interface's simple name.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Any metadata attached to the interface.
# Corresponds to the JSON property `options`
# @return [Array<Google::Apis::ServicenetworkingV1beta::Option>]
attr_accessor :options
# `SourceContext` represents information about the source of a protobuf element,
# like the file in which it is defined.
# Corresponds to the JSON property `sourceContext`
# @return [Google::Apis::ServicenetworkingV1beta::SourceContext]
attr_accessor :source_context
# The source syntax of the service.
# Corresponds to the JSON property `syntax`
# @return [String]
attr_accessor :syntax
# A version string for this interface. If specified, must have the form `major-
# version.minor-version`, as in `1.10`. If the minor version is omitted, it
# defaults to zero. If the entire version field is empty, the major version is
# derived from the package name, as outlined below. If the field is not empty,
# the version in the package name will be verified to be consistent with what is
# provided here. The versioning schema uses [semantic versioning](http://semver.
# org) where the major version number indicates a breaking change and the minor
# version an additive, non-breaking change. Both version numbers are signals to
# users what to expect from different versions, and should be carefully chosen
# based on the product plan. The major version is also reflected in the package
# name of the interface, which must end in `v`, as in `google.feature.v1`. For
# major versions 0 and 1, the suffix can be omitted. Zero major versions must
# only be used for experimental, non-GA interfaces.
# Corresponds to the JSON property `version`
# @return [String]
attr_accessor :version
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@methods_prop = args[:methods_prop] if args.key?(:methods_prop)
@mixins = args[:mixins] if args.key?(:mixins)
@name = args[:name] if args.key?(:name)
@options = args[:options] if args.key?(:options)
@source_context = args[:source_context] if args.key?(:source_context)
@syntax = args[:syntax] if args.key?(:syntax)
@version = args[:version] if args.key?(:version)
end
end
# Configuration for an authentication provider, including support for [JSON Web
# Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
class AuthProvider
include Google::Apis::Core::Hashable
# The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-
# web-token-32#section-4.1.3). that are allowed to access. A JWT containing any
# of these audiences will be accepted. When this setting is absent, JWTs with
# audiences: - "https://[service.name]/[google.protobuf.Api.name]" - "https://[
# service.name]/" will be accepted. For example, if no audiences are in the
# setting, LibraryService API will accept JWTs with the following audiences: -
# https://library-example.googleapis.com/google.example.library.v1.
# LibraryService - https://library-example.googleapis.com/ Example: audiences:
# bookstore_android.apps.googleusercontent.com, bookstore_web.apps.
# googleusercontent.com
# Corresponds to the JSON property `audiences`
# @return [String]
attr_accessor :audiences
# Redirect URL if JWT token is required but not present or is expired. Implement
# authorizationUrl of securityDefinitions in OpenAPI spec.
# Corresponds to the JSON property `authorizationUrl`
# @return [String]
attr_accessor :authorization_url
# The unique identifier of the auth provider. It will be referred to by `
# AuthRequirement.provider_id`. Example: "bookstore_auth".
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Identifies the principal that issued the JWT. See https://tools.ietf.org/html/
# draft-ietf-oauth-json-web-token-32#section-4.1.1 Usually a URL or an email
# address. Example: https://securetoken.google.com Example: 1234567-compute@
# developer.gserviceaccount.com
# Corresponds to the JSON property `issuer`
# @return [String]
attr_accessor :issuer
# URL of the provider's public key set to validate signature of the JWT. See [
# OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#
# ProviderMetadata). Optional if the key set document: - can be retrieved from [
# OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
# of the issuer. - can be inferred from the email domain of the issuer (e.g. a
# Google service account). Example: https://www.googleapis.com/oauth2/v1/certs
# Corresponds to the JSON property `jwksUri`
# @return [String]
attr_accessor :jwks_uri
# Defines the locations to extract the JWT. JWT locations can be either from
# HTTP headers or URL query parameters. The rule is that the first match wins.
# The checking order is: checking all headers first, then URL query parameters.
# If not specified, default to use following 3 locations: 1) Authorization:
# Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter Default
# locations can be specified as followings: jwt_locations: - header:
# Authorization value_prefix: "Bearer " - header: x-goog-iap-jwt-assertion -
# query: access_token
# Corresponds to the JSON property `jwtLocations`
# @return [Array<Google::Apis::ServicenetworkingV1beta::JwtLocation>]
attr_accessor :jwt_locations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@audiences = args[:audiences] if args.key?(:audiences)
@authorization_url = args[:authorization_url] if args.key?(:authorization_url)
@id = args[:id] if args.key?(:id)
@issuer = args[:issuer] if args.key?(:issuer)
@jwks_uri = args[:jwks_uri] if args.key?(:jwks_uri)
@jwt_locations = args[:jwt_locations] if args.key?(:jwt_locations)
end
end
# User-defined authentication requirements, including support for [JSON Web
# Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
class AuthRequirement
include Google::Apis::Core::Hashable
# NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented
# and accepted in all the runtime components. The list of JWT [audiences](https:/
# /tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that
# are allowed to access. A JWT containing any of these audiences will be
# accepted. When this setting is absent, only JWTs with audience "https://
# Service_name/API_name" will be accepted. For example, if no audiences are in
# the setting, LibraryService API will only accept JWTs with the following
# audience "https://library-example.googleapis.com/google.example.library.v1.
# LibraryService". Example: audiences: bookstore_android.apps.googleusercontent.
# com, bookstore_web.apps.googleusercontent.com
# Corresponds to the JSON property `audiences`
# @return [String]
attr_accessor :audiences
# id from authentication provider. Example: provider_id: bookstore_auth
# Corresponds to the JSON property `providerId`
# @return [String]
attr_accessor :provider_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@audiences = args[:audiences] if args.key?(:audiences)
@provider_id = args[:provider_id] if args.key?(:provider_id)
end
end
# `Authentication` defines the authentication configuration for an API. Example
# for an API targeted for external use: name: calendar.googleapis.com
# authentication: providers: - id: google_calendar_auth jwks_uri: https://www.
# googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: -
# selector: "*" requirements: provider_id: google_calendar_auth
class Authentication
include Google::Apis::Core::Hashable
# Defines a set of authentication providers that a service supports.
# Corresponds to the JSON property `providers`
# @return [Array<Google::Apis::ServicenetworkingV1beta::AuthProvider>]
attr_accessor :providers
# A list of authentication rules that apply to individual API methods. **NOTE:**
# All service configuration rules follow "last one wins" order.
# Corresponds to the JSON property `rules`
# @return [Array<Google::Apis::ServicenetworkingV1beta::AuthenticationRule>]
attr_accessor :rules
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@providers = args[:providers] if args.key?(:providers)
@rules = args[:rules] if args.key?(:rules)
end
end
# Authentication rules for the service. By default, if a method has any
# authentication requirements, every request must include a valid credential
# matching one of the requirements. It's an error to include more than one kind
# of credential in a single request. If a method doesn't have any auth
# requirements, request credentials will be ignored.
class AuthenticationRule
include Google::Apis::Core::Hashable
# If true, the service accepts API keys without any other credential. This flag
# only applies to HTTP and gRPC requests.
# Corresponds to the JSON property `allowWithoutCredential`
# @return [Boolean]
attr_accessor :allow_without_credential
alias_method :allow_without_credential?, :allow_without_credential
# OAuth scopes are a way to define data and permissions on data. For example,
# there are scopes defined for "Read-only access to Google Calendar" and "Access
# to Cloud Platform". Users can consent to a scope for an application, giving it
# permission to access that data on their behalf. OAuth scope specifications
# should be fairly coarse grained; a user will need to see and understand the
# text description of what your scope means. In most cases: use one or at most
# two OAuth scopes for an entire family of products. If your product has
# multiple APIs, you should probably be sharing the OAuth scope across all of
# those APIs. When you need finer grained OAuth consent screens: talk with your
# product management about how developers will use them in practice. Please note
# that even though each of the canonical scopes is enough for a request to be
# accepted and passed to the backend, a request can still fail due to the
# backend requiring additional scopes or permissions.
# Corresponds to the JSON property `oauth`
# @return [Google::Apis::ServicenetworkingV1beta::OAuthRequirements]
attr_accessor :oauth
# Requirements for additional authentication providers.
# Corresponds to the JSON property `requirements`
# @return [Array<Google::Apis::ServicenetworkingV1beta::AuthRequirement>]
attr_accessor :requirements
# Selects the methods to which this rule applies. Refer to selector for syntax
# details.
# Corresponds to the JSON property `selector`
# @return [String]
attr_accessor :selector
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@allow_without_credential = args[:allow_without_credential] if args.key?(:allow_without_credential)
@oauth = args[:oauth] if args.key?(:oauth)
@requirements = args[:requirements] if args.key?(:requirements)
@selector = args[:selector] if args.key?(:selector)
end
end
# `Backend` defines the backend configuration for a service.
class Backend
include Google::Apis::Core::Hashable
# A list of API backend rules that apply to individual API methods. **NOTE:**
# All service configuration rules follow "last one wins" order.
# Corresponds to the JSON property `rules`
# @return [Array<Google::Apis::ServicenetworkingV1beta::BackendRule>]
attr_accessor :rules
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@rules = args[:rules] if args.key?(:rules)
end
end
# A backend rule provides configuration for an individual API element.
class BackendRule
include Google::Apis::Core::Hashable
# The address of the API backend. The scheme is used to determine the backend
# protocol and security. The following schemes are accepted: SCHEME PROTOCOL
# SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC
# TLS It is recommended to explicitly include a scheme. Leaving out the scheme
# may cause constrasting behaviors across platforms. If the port is unspecified,
# the default is: - 80 for schemes without TLS - 443 for schemes with TLS For
# HTTP backends, use protocol to specify the protocol version.
# Corresponds to the JSON property `address`
# @return [String]
attr_accessor :address
# The number of seconds to wait for a response from a request. The default
# varies based on the request protocol and deployment environment.
# Corresponds to the JSON property `deadline`
# @return [Float]
attr_accessor :deadline
# When disable_auth is true, a JWT ID token won't be generated and the original "
# Authorization" HTTP header will be preserved. If the header is used to carry
# the original token and is expected by the backend, this field must be set to
# true to preserve the header.
# Corresponds to the JSON property `disableAuth`
# @return [Boolean]
attr_accessor :disable_auth
alias_method :disable_auth?, :disable_auth
# The JWT audience is used when generating a JWT ID token for the backend. This
# ID token will be added in the HTTP "authorization" header, and sent to the
# backend.
# Corresponds to the JSON property `jwtAudience`
# @return [String]
attr_accessor :jwt_audience
# Minimum deadline in seconds needed for this method. Calls having deadline
# value lower than this will be rejected.
# Corresponds to the JSON property `minDeadline`
# @return [Float]
attr_accessor :min_deadline
# The number of seconds to wait for the completion of a long running operation.
# The default is no deadline.
# Corresponds to the JSON property `operationDeadline`
# @return [Float]
attr_accessor :operation_deadline
#
# Corresponds to the JSON property `pathTranslation`
# @return [String]
attr_accessor :path_translation
# The protocol used for sending a request to the backend. The supported values
# are "http/1.1" and "h2". The default value is inferred from the scheme in the
# address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2
# grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this
# field to "h2" for improved performance. Configuring this field to non-default
# values is only supported for secure HTTP backends. This field will be ignored
# for all other backends. See https://www.iana.org/assignments/tls-extensiontype-
# values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on
# the supported values.
# Corresponds to the JSON property `protocol`
# @return [String]
attr_accessor :protocol
# Selects the methods to which this rule applies. Refer to selector for syntax
# details.
# Corresponds to the JSON property `selector`
# @return [String]
attr_accessor :selector
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@address = args[:address] if args.key?(:address)
@deadline = args[:deadline] if args.key?(:deadline)
@disable_auth = args[:disable_auth] if args.key?(:disable_auth)
@jwt_audience = args[:jwt_audience] if args.key?(:jwt_audience)
@min_deadline = args[:min_deadline] if args.key?(:min_deadline)
@operation_deadline = args[:operation_deadline] if args.key?(:operation_deadline)
@path_translation = args[:path_translation] if args.key?(:path_translation)
@protocol = args[:protocol] if args.key?(:protocol)
@selector = args[:selector] if args.key?(:selector)
end
end
# Billing related configuration of the service. The following example shows how
# to configure monitored resources and metrics for billing, `
# consumer_destinations` is the only supported destination and the monitored
# resources need at least one label key `cloud.googleapis.com/location` to
# indicate the location of the billing usage, using different monitored
# resources between monitoring and billing is recommended so they can be evolved
# independently: monitored_resources: - type: library.googleapis.com/
# billing_branch labels: - key: cloud.googleapis.com/location description: |
# Predefined label to support billing location restriction. - key: city
# description: | Custom label to define the city where the library branch is
# located in. - key: name description: Custom label to define the name of the
# library branch. metrics: - name: library.googleapis.com/book/borrowed_count
# metric_kind: DELTA value_type: INT64 unit: "1" billing: consumer_destinations:
# - monitored_resource: library.googleapis.com/billing_branch metrics: - library.
# googleapis.com/book/borrowed_count
class Billing
include Google::Apis::Core::Hashable
# Billing configurations for sending metrics to the consumer project. There can
# be multiple consumer destinations per service, each one must have a different
# monitored resource type. A metric can be used in at most one consumer
# destination.
# Corresponds to the JSON property `consumerDestinations`
# @return [Array<Google::Apis::ServicenetworkingV1beta::BillingDestination>]
attr_accessor :consumer_destinations
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations)
end
end
# Configuration of a specific billing destination (Currently only support bill
# against consumer project).
class BillingDestination
include Google::Apis::Core::Hashable
# Names of the metrics to report to this billing destination. Each name must be
# defined in Service.metrics section.
# Corresponds to the JSON property `metrics`
# @return [Array<String>]
attr_accessor :metrics
# The monitored resource type. The type must be defined in Service.
# monitored_resources section.
# Corresponds to the JSON property `monitoredResource`
# @return [String]
attr_accessor :monitored_resource
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metrics = args[:metrics] if args.key?(:metrics)
@monitored_resource = args[:monitored_resource] if args.key?(:monitored_resource)
end
end
# Represents a private connection resource. A private connection is implemented
# as a VPC Network Peering connection between a service producer's VPC network
# and a service consumer's VPC network.
class Connection
include Google::Apis::Core::Hashable
# The name of service consumer's VPC network that's connected with service
# producer network, in the following format: `projects/`project`/global/networks/
# `network``. ``project`` is a project number, such as in `12345` that includes
# the VPC service consumer's VPC network. ``network`` is the name of the service
# consumer's VPC network.
# Corresponds to the JSON property `network`
# @return [String]
attr_accessor :network
# Output only. The name of the VPC Network Peering connection that was created
# by the service producer.
# Corresponds to the JSON property `peering`
# @return [String]
attr_accessor :peering
# The name of one or more allocated IP address ranges for this service producer
# of type `PEERING`. Note that invoking this method with a different range when
# connection is already established will not modify already provisioned service
# producer subnetworks.
# Corresponds to the JSON property `reservedPeeringRanges`
# @return [Array<String>]
attr_accessor :reserved_peering_ranges
# Output only. The name of the peering service that's associated with this
# connection, in the following format: `services/`service name``.
# 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)
@network = args[:network] if args.key?(:network)
@peering = args[:peering] if args.key?(:peering)
@reserved_peering_ranges = args[:reserved_peering_ranges] if args.key?(:reserved_peering_ranges)
@service = args[:service] if args.key?(:service)
end
end
# Configuration information for a private service access connection.
class ConsumerConfig
include Google::Apis::Core::Hashable
# Export custom routes flag value for peering from consumer to producer.
# Corresponds to the JSON property `consumerExportCustomRoutes`
# @return [Boolean]
attr_accessor :consumer_export_custom_routes
alias_method :consumer_export_custom_routes?, :consumer_export_custom_routes
# Export subnet routes with public ip flag value for peering from consumer to
# producer.
# Corresponds to the JSON property `consumerExportSubnetRoutesWithPublicIp`
# @return [Boolean]
attr_accessor :consumer_export_subnet_routes_with_public_ip
alias_method :consumer_export_subnet_routes_with_public_ip?, :consumer_export_subnet_routes_with_public_ip
# Import custom routes flag value for peering from consumer to producer.
# Corresponds to the JSON property `consumerImportCustomRoutes`
# @return [Boolean]
attr_accessor :consumer_import_custom_routes
alias_method :consumer_import_custom_routes?, :consumer_import_custom_routes
# Import subnet routes with public ip flag value for peering from consumer to
# producer.
# Corresponds to the JSON property `consumerImportSubnetRoutesWithPublicIp`
# @return [Boolean]
attr_accessor :consumer_import_subnet_routes_with_public_ip
alias_method :consumer_import_subnet_routes_with_public_ip?, :consumer_import_subnet_routes_with_public_ip
# Export custom routes flag value for peering from producer to consumer.
# Corresponds to the JSON property `producerExportCustomRoutes`
# @return [Boolean]
attr_accessor :producer_export_custom_routes
alias_method :producer_export_custom_routes?, :producer_export_custom_routes
# Export subnet routes with public ip flag value for peering from producer to
# consumer.
# Corresponds to the JSON property `producerExportSubnetRoutesWithPublicIp`
# @return [Boolean]
attr_accessor :producer_export_subnet_routes_with_public_ip
alias_method :producer_export_subnet_routes_with_public_ip?, :producer_export_subnet_routes_with_public_ip
# Import custom routes flag value for peering from producer to consumer.
# Corresponds to the JSON property `producerImportCustomRoutes`
# @return [Boolean]
attr_accessor :producer_import_custom_routes
alias_method :producer_import_custom_routes?, :producer_import_custom_routes
# Import subnet routes with public ip flag value for peering from producer to
# consumer.
# Corresponds to the JSON property `producerImportSubnetRoutesWithPublicIp`
# @return [Boolean]
attr_accessor :producer_import_subnet_routes_with_public_ip
alias_method :producer_import_subnet_routes_with_public_ip?, :producer_import_subnet_routes_with_public_ip
# Output only. The VPC host network that is used to host managed service
# instances. In the format, projects/`project`/global/networks/`network` where `
# project` is the project number e.g. '12345' and `network` is the network name.
# Corresponds to the JSON property `producerNetwork`
# @return [String]
attr_accessor :producer_network
# Output only. The reserved ranges associated with this private service access
# connection.
# Corresponds to the JSON property `reservedRanges`
# @return [Array<Google::Apis::ServicenetworkingV1beta::GoogleCloudServicenetworkingV1ConsumerConfigReservedRange>]
attr_accessor :reserved_ranges
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@consumer_export_custom_routes = args[:consumer_export_custom_routes] if args.key?(:consumer_export_custom_routes)
@consumer_export_subnet_routes_with_public_ip = args[:consumer_export_subnet_routes_with_public_ip] if args.key?(:consumer_export_subnet_routes_with_public_ip)
@consumer_import_custom_routes = args[:consumer_import_custom_routes] if args.key?(:consumer_import_custom_routes)
@consumer_import_subnet_routes_with_public_ip = args[:consumer_import_subnet_routes_with_public_ip] if args.key?(:consumer_import_subnet_routes_with_public_ip)
@producer_export_custom_routes = args[:producer_export_custom_routes] if args.key?(:producer_export_custom_routes)
@producer_export_subnet_routes_with_public_ip = args[:producer_export_subnet_routes_with_public_ip] if args.key?(:producer_export_subnet_routes_with_public_ip)
@producer_import_custom_routes = args[:producer_import_custom_routes] if args.key?(:producer_import_custom_routes)
@producer_import_subnet_routes_with_public_ip = args[:producer_import_subnet_routes_with_public_ip] if args.key?(:producer_import_subnet_routes_with_public_ip)
@producer_network = args[:producer_network] if args.key?(:producer_network)
@reserved_ranges = args[:reserved_ranges] if args.key?(:reserved_ranges)
end
end
# Metadata provided through GetOperation request for the LRO generated by
# UpdateConsumerConfig API.
class ConsumerConfigMetadata
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# `Context` defines which contexts an API requests. Example: context: rules: -
# selector: "*" requested: - google.rpc.context.ProjectContext - google.rpc.
# context.OriginContext The above specifies that all methods in the API request `
# google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`.
# Available context types are defined in package `google.rpc.context`. This also
# provides mechanism to allowlist any protobuf message extension that can be
# sent in grpc metadata using “x-goog-ext--bin” and “x-goog-ext--jspb” format.
# For example, list any service specific protobuf types that can appear in grpc
# metadata as follows in your yaml file: Example: context: rules: - selector: "
# google.example.library.v1.LibraryService.CreateBook"
# allowed_request_extensions: - google.foo.v1.NewExtension
# allowed_response_extensions: - google.foo.v1.NewExtension You can also specify
# extension ID instead of fully qualified extension name here.
class Context
include Google::Apis::Core::Hashable
# A list of RPC context rules that apply to individual API methods. **NOTE:**
# All service configuration rules follow "last one wins" order.
# Corresponds to the JSON property `rules`
# @return [Array<Google::Apis::ServicenetworkingV1beta::ContextRule>]
attr_accessor :rules
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@rules = args[:rules] if args.key?(:rules)
end
end
# A context rule provides information about the context for an individual API
# element.
class ContextRule
include Google::Apis::Core::Hashable
# A list of full type names or extension IDs of extensions allowed in grpc side
# channel from client to backend.
# Corresponds to the JSON property `allowedRequestExtensions`
# @return [Array<String>]
attr_accessor :allowed_request_extensions
# A list of full type names or extension IDs of extensions allowed in grpc side
# channel from backend to client.
# Corresponds to the JSON property `allowedResponseExtensions`
# @return [Array<String>]
attr_accessor :allowed_response_extensions
# A list of full type names of provided contexts.
# Corresponds to the JSON property `provided`
# @return [Array<String>]
attr_accessor :provided
# A list of full type names of requested contexts.
# Corresponds to the JSON property `requested`
# @return [Array<String>]
attr_accessor :requested
# Selects the methods to which this rule applies. Refer to selector for syntax
# details.
# Corresponds to the JSON property `selector`
# @return [String]
attr_accessor :selector
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@allowed_request_extensions = args[:allowed_request_extensions] if args.key?(:allowed_request_extensions)
@allowed_response_extensions = args[:allowed_response_extensions] if args.key?(:allowed_response_extensions)
@provided = args[:provided] if args.key?(:provided)
@requested = args[:requested] if args.key?(:requested)
@selector = args[:selector] if args.key?(:selector)
end
end
# Selects and configures the service controller used by the service. The service
# controller handles features like abuse, quota, billing, logging, monitoring,
# etc.
class Control
include Google::Apis::Core::Hashable
# The service control environment to use. If empty, no control plane feature (
# like quota and billing) will be enabled.
# Corresponds to the JSON property `environment`
# @return [String]
attr_accessor :environment
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@environment = args[:environment] if args.key?(:environment)
end
end
# Customize service error responses. For example, list any service specific
# protobuf types that can appear in error detail lists of error responses.
# Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.
# AnotherError
class CustomError
include Google::Apis::Core::Hashable
# The list of custom error rules that apply to individual API messages. **NOTE:**
# All service configuration rules follow "last one wins" order.
# Corresponds to the JSON property `rules`
# @return [Array<Google::Apis::ServicenetworkingV1beta::CustomErrorRule>]
attr_accessor :rules
# The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
# Corresponds to the JSON property `types`
# @return [Array<String>]
attr_accessor :types
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@rules = args[:rules] if args.key?(:rules)
@types = args[:types] if args.key?(:types)
end
end
# A custom error rule.
class CustomErrorRule
include Google::Apis::Core::Hashable
# Mark this message as possible payload in error response. Otherwise, objects of
# this type will be filtered when they appear in error payload.
# Corresponds to the JSON property `isErrorType`
# @return [Boolean]
attr_accessor :is_error_type
alias_method :is_error_type?, :is_error_type
# Selects messages to which this rule applies. Refer to selector for syntax
# details.
# Corresponds to the JSON property `selector`
# @return [String]
attr_accessor :selector
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@is_error_type = args[:is_error_type] if args.key?(:is_error_type)
@selector = args[:selector] if args.key?(:selector)
end
end
# A custom pattern is used for defining custom HTTP verb.
class CustomHttpPattern
include Google::Apis::Core::Hashable
# The name of this custom HTTP verb.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The path matched by this custom verb.
# Corresponds to the JSON property `path`
# @return [String]
attr_accessor :path
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@path = args[:path] if args.key?(:path)
end
end
# Metadata provided through GetOperation request for the LRO generated by
# DeletePeeredDnsDomain API.
class DeletePeeredDnsDomainMetadata
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Represents a DNS record set resource.
class DnsRecordSet
include Google::Apis::Core::Hashable
# Required. As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) for
# examples see https://cloud.google.com/dns/records/json-record.
# Corresponds to the JSON property `data`
# @return [Array<String>]
attr_accessor :data
# Required. The DNS or domain name of the record set, e.g. `test.example.com`.
# Corresponds to the JSON property `domain`
# @return [String]
attr_accessor :domain