google-cloud-resource_manager-v3 0.6.2 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -101
  3. data/lib/google/cloud/resource_manager/v3/folders/client.rb +42 -9
  4. data/lib/google/cloud/resource_manager/v3/folders/operations.rb +38 -7
  5. data/lib/google/cloud/resource_manager/v3/folders/rest/client.rb +253 -7
  6. data/lib/google/cloud/resource_manager/v3/folders/rest/operations.rb +108 -8
  7. data/lib/google/cloud/resource_manager/v3/folders/rest/service_stub.rb +14 -2
  8. data/lib/google/cloud/resource_manager/v3/organizations/client.rb +41 -9
  9. data/lib/google/cloud/resource_manager/v3/organizations/rest/client.rb +117 -7
  10. data/lib/google/cloud/resource_manager/v3/organizations/rest/service_stub.rb +14 -2
  11. data/lib/google/cloud/resource_manager/v3/projects/client.rb +42 -9
  12. data/lib/google/cloud/resource_manager/v3/projects/operations.rb +38 -7
  13. data/lib/google/cloud/resource_manager/v3/projects/rest/client.rb +253 -7
  14. data/lib/google/cloud/resource_manager/v3/projects/rest/operations.rb +108 -8
  15. data/lib/google/cloud/resource_manager/v3/projects/rest/service_stub.rb +14 -2
  16. data/lib/google/cloud/resource_manager/v3/tag_bindings/client.rb +42 -9
  17. data/lib/google/cloud/resource_manager/v3/tag_bindings/operations.rb +38 -7
  18. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/client.rb +120 -7
  19. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/operations.rb +108 -8
  20. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/service_stub.rb +14 -2
  21. data/lib/google/cloud/resource_manager/v3/tag_holds/client.rb +42 -9
  22. data/lib/google/cloud/resource_manager/v3/tag_holds/operations.rb +38 -7
  23. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/client.rb +100 -7
  24. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/operations.rb +108 -8
  25. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/service_stub.rb +14 -2
  26. data/lib/google/cloud/resource_manager/v3/tag_keys/client.rb +42 -9
  27. data/lib/google/cloud/resource_manager/v3/tag_keys/operations.rb +38 -7
  28. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/client.rb +203 -7
  29. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/operations.rb +108 -8
  30. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/service_stub.rb +14 -2
  31. data/lib/google/cloud/resource_manager/v3/tag_values/client.rb +42 -9
  32. data/lib/google/cloud/resource_manager/v3/tag_values/operations.rb +38 -7
  33. data/lib/google/cloud/resource_manager/v3/tag_values/rest/client.rb +203 -7
  34. data/lib/google/cloud/resource_manager/v3/tag_values/rest/operations.rb +108 -8
  35. data/lib/google/cloud/resource_manager/v3/tag_values/rest/service_stub.rb +14 -2
  36. data/lib/google/cloud/resource_manager/v3/version.rb +1 -1
  37. data/proto_docs/google/api/client.rb +14 -0
  38. data/proto_docs/google/api/field_behavior.rb +14 -0
  39. metadata +5 -5
@@ -30,6 +30,9 @@ module Google
30
30
  # Allows users to manage their organization resources.
31
31
  #
32
32
  class Client
33
+ # @private
34
+ DEFAULT_ENDPOINT_TEMPLATE = "cloudresourcemanager.$UNIVERSE_DOMAIN$"
35
+
33
36
  include Paths
34
37
 
35
38
  # @private
@@ -104,6 +107,15 @@ module Google
104
107
  @config
105
108
  end
106
109
 
110
+ ##
111
+ # The effective universe domain
112
+ #
113
+ # @return [String]
114
+ #
115
+ def universe_domain
116
+ @organizations_stub.universe_domain
117
+ end
118
+
107
119
  ##
108
120
  # Create a new Organizations client object.
109
121
  #
@@ -137,8 +149,9 @@ module Google
137
149
  credentials = @config.credentials
138
150
  # Use self-signed JWT if the endpoint is unchanged from default,
139
151
  # but only if the default endpoint does not have a region prefix.
140
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
141
- !@config.endpoint.split(".").first.include?("-")
152
+ enable_self_signed_jwt = @config.endpoint.nil? ||
153
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
154
+ !@config.endpoint.split(".").first.include?("-"))
142
155
  credentials ||= Credentials.default scope: @config.scope,
143
156
  enable_self_signed_jwt: enable_self_signed_jwt
144
157
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -149,10 +162,13 @@ module Google
149
162
 
150
163
  @organizations_stub = ::Gapic::ServiceStub.new(
151
164
  ::Google::Cloud::ResourceManager::V3::Organizations::Stub,
152
- credentials: credentials,
153
- endpoint: @config.endpoint,
165
+ credentials: credentials,
166
+ endpoint: @config.endpoint,
167
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
168
+ universe_domain: @config.universe_domain,
154
169
  channel_args: @config.channel_args,
155
- interceptors: @config.interceptors
170
+ interceptors: @config.interceptors,
171
+ channel_pool_config: @config.channel_pool
156
172
  )
157
173
  end
158
174
 
@@ -679,9 +695,9 @@ module Google
679
695
  # end
680
696
  #
681
697
  # @!attribute [rw] endpoint
682
- # The hostname or hostname:port of the service endpoint.
683
- # Defaults to `"cloudresourcemanager.googleapis.com"`.
684
- # @return [::String]
698
+ # A custom service endpoint, as a hostname or hostname:port. The default is
699
+ # nil, indicating to use the default endpoint in the current universe domain.
700
+ # @return [::String,nil]
685
701
  # @!attribute [rw] credentials
686
702
  # Credentials to send with calls. You may provide any of the following types:
687
703
  # * (`String`) The path to a service account key file in JSON format
@@ -727,13 +743,20 @@ module Google
727
743
  # @!attribute [rw] quota_project
728
744
  # A separate project against which to charge quota.
729
745
  # @return [::String]
746
+ # @!attribute [rw] universe_domain
747
+ # The universe domain within which to make requests. This determines the
748
+ # default endpoint URL. The default value of nil uses the environment
749
+ # universe (usually the default "googleapis.com" universe).
750
+ # @return [::String,nil]
730
751
  #
731
752
  class Configuration
732
753
  extend ::Gapic::Config
733
754
 
755
+ # @private
756
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
734
757
  DEFAULT_ENDPOINT = "cloudresourcemanager.googleapis.com"
735
758
 
736
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
759
+ config_attr :endpoint, nil, ::String, nil
737
760
  config_attr :credentials, nil do |value|
738
761
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
739
762
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -748,6 +771,7 @@ module Google
748
771
  config_attr :metadata, nil, ::Hash, nil
749
772
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
750
773
  config_attr :quota_project, nil, ::String, nil
774
+ config_attr :universe_domain, nil, ::String, nil
751
775
 
752
776
  # @private
753
777
  def initialize parent_config = nil
@@ -768,6 +792,14 @@ module Google
768
792
  end
769
793
  end
770
794
 
795
+ ##
796
+ # Configuration for the channel pool
797
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
798
+ #
799
+ def channel_pool
800
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
801
+ end
802
+
771
803
  ##
772
804
  # Configuration RPC class for the Organizations API.
773
805
  #
@@ -32,6 +32,9 @@ module Google
32
32
  # Allows users to manage their organization resources.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ DEFAULT_ENDPOINT_TEMPLATE = "cloudresourcemanager.$UNIVERSE_DOMAIN$"
37
+
35
38
  include Paths
36
39
 
37
40
  # @private
@@ -106,6 +109,15 @@ module Google
106
109
  @config
107
110
  end
108
111
 
112
+ ##
113
+ # The effective universe domain
114
+ #
115
+ # @return [String]
116
+ #
117
+ def universe_domain
118
+ @organizations_stub.universe_domain
119
+ end
120
+
109
121
  ##
110
122
  # Create a new Organizations REST client object.
111
123
  #
@@ -133,8 +145,9 @@ module Google
133
145
  credentials = @config.credentials
134
146
  # Use self-signed JWT if the endpoint is unchanged from default,
135
147
  # but only if the default endpoint does not have a region prefix.
136
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
137
- !@config.endpoint.split(".").first.include?("-")
148
+ enable_self_signed_jwt = @config.endpoint.nil? ||
149
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
150
+ !@config.endpoint.split(".").first.include?("-"))
138
151
  credentials ||= Credentials.default scope: @config.scope,
139
152
  enable_self_signed_jwt: enable_self_signed_jwt
140
153
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -144,7 +157,12 @@ module Google
144
157
  @quota_project_id = @config.quota_project
145
158
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
146
159
 
147
- @organizations_stub = ::Google::Cloud::ResourceManager::V3::Organizations::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
160
+ @organizations_stub = ::Google::Cloud::ResourceManager::V3::Organizations::Rest::ServiceStub.new(
161
+ endpoint: @config.endpoint,
162
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
+ universe_domain: @config.universe_domain,
164
+ credentials: credentials
165
+ )
148
166
  end
149
167
 
150
168
  # Service calls
@@ -178,6 +196,22 @@ module Google
178
196
  # @return [::Google::Cloud::ResourceManager::V3::Organization]
179
197
  #
180
198
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
199
+ #
200
+ # @example Basic example
201
+ # require "google/cloud/resource_manager/v3"
202
+ #
203
+ # # Create a client object. The client can be reused for multiple calls.
204
+ # client = Google::Cloud::ResourceManager::V3::Organizations::Rest::Client.new
205
+ #
206
+ # # Create a request. To set request fields, pass in keyword arguments.
207
+ # request = Google::Cloud::ResourceManager::V3::GetOrganizationRequest.new
208
+ #
209
+ # # Call the get_organization method.
210
+ # result = client.get_organization request
211
+ #
212
+ # # The returned object is of type Google::Cloud::ResourceManager::V3::Organization.
213
+ # p result
214
+ #
181
215
  def get_organization request, options = nil
182
216
  raise ::ArgumentError, "request must be provided" if request.nil?
183
217
 
@@ -271,6 +305,26 @@ module Google
271
305
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ResourceManager::V3::Organization>]
272
306
  #
273
307
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
308
+ #
309
+ # @example Basic example
310
+ # require "google/cloud/resource_manager/v3"
311
+ #
312
+ # # Create a client object. The client can be reused for multiple calls.
313
+ # client = Google::Cloud::ResourceManager::V3::Organizations::Rest::Client.new
314
+ #
315
+ # # Create a request. To set request fields, pass in keyword arguments.
316
+ # request = Google::Cloud::ResourceManager::V3::SearchOrganizationsRequest.new
317
+ #
318
+ # # Call the search_organizations method.
319
+ # result = client.search_organizations request
320
+ #
321
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
322
+ # # over elements, and API calls will be issued to fetch pages as needed.
323
+ # result.each do |item|
324
+ # # Each element is of type ::Google::Cloud::ResourceManager::V3::Organization.
325
+ # p item
326
+ # end
327
+ #
274
328
  def search_organizations request, options = nil
275
329
  raise ::ArgumentError, "request must be provided" if request.nil?
276
330
 
@@ -343,6 +397,22 @@ module Google
343
397
  # @return [::Google::Iam::V1::Policy]
344
398
  #
345
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/cloud/resource_manager/v3"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Cloud::ResourceManager::V3::Organizations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
409
+ #
410
+ # # Call the get_iam_policy method.
411
+ # result = client.get_iam_policy request
412
+ #
413
+ # # The returned object is of type Google::Iam::V1::Policy.
414
+ # p result
415
+ #
346
416
  def get_iam_policy request, options = nil
347
417
  raise ::ArgumentError, "request must be provided" if request.nil?
348
418
 
@@ -422,6 +492,22 @@ module Google
422
492
  # @return [::Google::Iam::V1::Policy]
423
493
  #
424
494
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
495
+ #
496
+ # @example Basic example
497
+ # require "google/cloud/resource_manager/v3"
498
+ #
499
+ # # Create a client object. The client can be reused for multiple calls.
500
+ # client = Google::Cloud::ResourceManager::V3::Organizations::Rest::Client.new
501
+ #
502
+ # # Create a request. To set request fields, pass in keyword arguments.
503
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
504
+ #
505
+ # # Call the set_iam_policy method.
506
+ # result = client.set_iam_policy request
507
+ #
508
+ # # The returned object is of type Google::Iam::V1::Policy.
509
+ # p result
510
+ #
425
511
  def set_iam_policy request, options = nil
426
512
  raise ::ArgumentError, "request must be provided" if request.nil?
427
513
 
@@ -494,6 +580,22 @@ module Google
494
580
  # @return [::Google::Iam::V1::TestIamPermissionsResponse]
495
581
  #
496
582
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
583
+ #
584
+ # @example Basic example
585
+ # require "google/cloud/resource_manager/v3"
586
+ #
587
+ # # Create a client object. The client can be reused for multiple calls.
588
+ # client = Google::Cloud::ResourceManager::V3::Organizations::Rest::Client.new
589
+ #
590
+ # # Create a request. To set request fields, pass in keyword arguments.
591
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
592
+ #
593
+ # # Call the test_iam_permissions method.
594
+ # result = client.test_iam_permissions request
595
+ #
596
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
597
+ # p result
598
+ #
497
599
  def test_iam_permissions request, options = nil
498
600
  raise ::ArgumentError, "request must be provided" if request.nil?
499
601
 
@@ -559,9 +661,9 @@ module Google
559
661
  # end
560
662
  #
561
663
  # @!attribute [rw] endpoint
562
- # The hostname or hostname:port of the service endpoint.
563
- # Defaults to `"cloudresourcemanager.googleapis.com"`.
564
- # @return [::String]
664
+ # A custom service endpoint, as a hostname or hostname:port. The default is
665
+ # nil, indicating to use the default endpoint in the current universe domain.
666
+ # @return [::String,nil]
565
667
  # @!attribute [rw] credentials
566
668
  # Credentials to send with calls. You may provide any of the following types:
567
669
  # * (`String`) The path to a service account key file in JSON format
@@ -598,13 +700,20 @@ module Google
598
700
  # @!attribute [rw] quota_project
599
701
  # A separate project against which to charge quota.
600
702
  # @return [::String]
703
+ # @!attribute [rw] universe_domain
704
+ # The universe domain within which to make requests. This determines the
705
+ # default endpoint URL. The default value of nil uses the environment
706
+ # universe (usually the default "googleapis.com" universe).
707
+ # @return [::String,nil]
601
708
  #
602
709
  class Configuration
603
710
  extend ::Gapic::Config
604
711
 
712
+ # @private
713
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
605
714
  DEFAULT_ENDPOINT = "cloudresourcemanager.googleapis.com"
606
715
 
607
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
716
+ config_attr :endpoint, nil, ::String, nil
608
717
  config_attr :credentials, nil do |value|
609
718
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
610
719
  allowed.any? { |klass| klass === value }
@@ -616,6 +725,7 @@ module Google
616
725
  config_attr :metadata, nil, ::Hash, nil
617
726
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
618
727
  config_attr :quota_project, nil, ::String, nil
728
+ config_attr :universe_domain, nil, ::String, nil
619
729
 
620
730
  # @private
621
731
  def initialize parent_config = nil
@@ -30,16 +30,28 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, credentials:
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
34
34
  # These require statements are intentionally placed here to initialize
35
35
  # the REST modules only when it's required.
36
36
  require "gapic/rest"
37
37
 
38
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
39
42
  numeric_enums: true,
40
43
  raise_faraday_errors: false
41
44
  end
42
45
 
46
+ ##
47
+ # The effective universe domain
48
+ #
49
+ # @return [String]
50
+ #
51
+ def universe_domain
52
+ @client_stub.universe_domain
53
+ end
54
+
43
55
  ##
44
56
  # Baseline implementation for the get_organization REST call
45
57
  #
@@ -30,6 +30,9 @@ module Google
30
30
  # Manages Google Cloud Projects.
31
31
  #
32
32
  class Client
33
+ # @private
34
+ DEFAULT_ENDPOINT_TEMPLATE = "cloudresourcemanager.$UNIVERSE_DOMAIN$"
35
+
33
36
  include Paths
34
37
 
35
38
  # @private
@@ -119,6 +122,15 @@ module Google
119
122
  @config
120
123
  end
121
124
 
125
+ ##
126
+ # The effective universe domain
127
+ #
128
+ # @return [String]
129
+ #
130
+ def universe_domain
131
+ @projects_stub.universe_domain
132
+ end
133
+
122
134
  ##
123
135
  # Create a new Projects client object.
124
136
  #
@@ -152,8 +164,9 @@ module Google
152
164
  credentials = @config.credentials
153
165
  # Use self-signed JWT if the endpoint is unchanged from default,
154
166
  # but only if the default endpoint does not have a region prefix.
155
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
156
- !@config.endpoint.split(".").first.include?("-")
167
+ enable_self_signed_jwt = @config.endpoint.nil? ||
168
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
169
+ !@config.endpoint.split(".").first.include?("-"))
157
170
  credentials ||= Credentials.default scope: @config.scope,
158
171
  enable_self_signed_jwt: enable_self_signed_jwt
159
172
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -166,14 +179,18 @@ module Google
166
179
  config.credentials = credentials
167
180
  config.quota_project = @quota_project_id
168
181
  config.endpoint = @config.endpoint
182
+ config.universe_domain = @config.universe_domain
169
183
  end
170
184
 
171
185
  @projects_stub = ::Gapic::ServiceStub.new(
172
186
  ::Google::Cloud::ResourceManager::V3::Projects::Stub,
173
- credentials: credentials,
174
- endpoint: @config.endpoint,
187
+ credentials: credentials,
188
+ endpoint: @config.endpoint,
189
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
190
+ universe_domain: @config.universe_domain,
175
191
  channel_args: @config.channel_args,
176
- interceptors: @config.interceptors
192
+ interceptors: @config.interceptors,
193
+ channel_pool_config: @config.channel_pool
177
194
  )
178
195
  end
179
196
 
@@ -1392,9 +1409,9 @@ module Google
1392
1409
  # end
1393
1410
  #
1394
1411
  # @!attribute [rw] endpoint
1395
- # The hostname or hostname:port of the service endpoint.
1396
- # Defaults to `"cloudresourcemanager.googleapis.com"`.
1397
- # @return [::String]
1412
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1413
+ # nil, indicating to use the default endpoint in the current universe domain.
1414
+ # @return [::String,nil]
1398
1415
  # @!attribute [rw] credentials
1399
1416
  # Credentials to send with calls. You may provide any of the following types:
1400
1417
  # * (`String`) The path to a service account key file in JSON format
@@ -1440,13 +1457,20 @@ module Google
1440
1457
  # @!attribute [rw] quota_project
1441
1458
  # A separate project against which to charge quota.
1442
1459
  # @return [::String]
1460
+ # @!attribute [rw] universe_domain
1461
+ # The universe domain within which to make requests. This determines the
1462
+ # default endpoint URL. The default value of nil uses the environment
1463
+ # universe (usually the default "googleapis.com" universe).
1464
+ # @return [::String,nil]
1443
1465
  #
1444
1466
  class Configuration
1445
1467
  extend ::Gapic::Config
1446
1468
 
1469
+ # @private
1470
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1447
1471
  DEFAULT_ENDPOINT = "cloudresourcemanager.googleapis.com"
1448
1472
 
1449
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1473
+ config_attr :endpoint, nil, ::String, nil
1450
1474
  config_attr :credentials, nil do |value|
1451
1475
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1452
1476
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -1461,6 +1485,7 @@ module Google
1461
1485
  config_attr :metadata, nil, ::Hash, nil
1462
1486
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1463
1487
  config_attr :quota_project, nil, ::String, nil
1488
+ config_attr :universe_domain, nil, ::String, nil
1464
1489
 
1465
1490
  # @private
1466
1491
  def initialize parent_config = nil
@@ -1481,6 +1506,14 @@ module Google
1481
1506
  end
1482
1507
  end
1483
1508
 
1509
+ ##
1510
+ # Configuration for the channel pool
1511
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1512
+ #
1513
+ def channel_pool
1514
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1515
+ end
1516
+
1484
1517
  ##
1485
1518
  # Configuration RPC class for the Projects API.
1486
1519
  #
@@ -26,6 +26,9 @@ module Google
26
26
  module Projects
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ DEFAULT_ENDPOINT_TEMPLATE = "cloudresourcemanager.$UNIVERSE_DOMAIN$"
31
+
29
32
  # @private
30
33
  attr_reader :operations_stub
31
34
 
@@ -60,6 +63,15 @@ module Google
60
63
  @config
61
64
  end
62
65
 
66
+ ##
67
+ # The effective universe domain
68
+ #
69
+ # @return [String]
70
+ #
71
+ def universe_domain
72
+ @operations_stub.universe_domain
73
+ end
74
+
63
75
  ##
64
76
  # Create a new Operations client object.
65
77
  #
@@ -90,10 +102,13 @@ module Google
90
102
 
91
103
  @operations_stub = ::Gapic::ServiceStub.new(
92
104
  ::Google::Longrunning::Operations::Stub,
93
- credentials: credentials,
94
- endpoint: @config.endpoint,
105
+ credentials: credentials,
106
+ endpoint: @config.endpoint,
107
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
108
+ universe_domain: @config.universe_domain,
95
109
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
110
+ interceptors: @config.interceptors,
111
+ channel_pool_config: @config.channel_pool
97
112
  )
98
113
 
99
114
  # Used by an LRO wrapper for some methods of this service
@@ -612,9 +627,9 @@ module Google
612
627
  # end
613
628
  #
614
629
  # @!attribute [rw] endpoint
615
- # The hostname or hostname:port of the service endpoint.
616
- # Defaults to `"cloudresourcemanager.googleapis.com"`.
617
- # @return [::String]
630
+ # A custom service endpoint, as a hostname or hostname:port. The default is
631
+ # nil, indicating to use the default endpoint in the current universe domain.
632
+ # @return [::String,nil]
618
633
  # @!attribute [rw] credentials
619
634
  # Credentials to send with calls. You may provide any of the following types:
620
635
  # * (`String`) The path to a service account key file in JSON format
@@ -660,13 +675,20 @@ module Google
660
675
  # @!attribute [rw] quota_project
661
676
  # A separate project against which to charge quota.
662
677
  # @return [::String]
678
+ # @!attribute [rw] universe_domain
679
+ # The universe domain within which to make requests. This determines the
680
+ # default endpoint URL. The default value of nil uses the environment
681
+ # universe (usually the default "googleapis.com" universe).
682
+ # @return [::String,nil]
663
683
  #
664
684
  class Configuration
665
685
  extend ::Gapic::Config
666
686
 
687
+ # @private
688
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
667
689
  DEFAULT_ENDPOINT = "cloudresourcemanager.googleapis.com"
668
690
 
669
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
691
+ config_attr :endpoint, nil, ::String, nil
670
692
  config_attr :credentials, nil do |value|
671
693
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
672
694
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -681,6 +703,7 @@ module Google
681
703
  config_attr :metadata, nil, ::Hash, nil
682
704
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
683
705
  config_attr :quota_project, nil, ::String, nil
706
+ config_attr :universe_domain, nil, ::String, nil
684
707
 
685
708
  # @private
686
709
  def initialize parent_config = nil
@@ -701,6 +724,14 @@ module Google
701
724
  end
702
725
  end
703
726
 
727
+ ##
728
+ # Configuration for the channel pool
729
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
730
+ #
731
+ def channel_pool
732
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
733
+ end
734
+
704
735
  ##
705
736
  # Configuration RPC class for the Operations API.
706
737
  #