google-cloud-service_directory-v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +75 -0
  6. data/lib/google-cloud-service_directory-v1.rb +21 -0
  7. data/lib/google/cloud/service_directory/v1.rb +36 -0
  8. data/lib/google/cloud/service_directory/v1/lookup_service.rb +49 -0
  9. data/lib/google/cloud/service_directory/v1/lookup_service/client.rb +402 -0
  10. data/lib/google/cloud/service_directory/v1/lookup_service/credentials.rb +51 -0
  11. data/lib/google/cloud/service_directory/v1/lookup_service/paths.rb +54 -0
  12. data/lib/google/cloud/service_directory/v1/registration_service.rb +63 -0
  13. data/lib/google/cloud/service_directory/v1/registration_service/client.rb +1796 -0
  14. data/lib/google/cloud/service_directory/v1/registration_service/credentials.rb +51 -0
  15. data/lib/google/cloud/service_directory/v1/registration_service/paths.rb +113 -0
  16. data/lib/google/cloud/service_directory/v1/version.rb +28 -0
  17. data/lib/google/cloud/servicedirectory/v1/endpoint_pb.rb +28 -0
  18. data/lib/google/cloud/servicedirectory/v1/lookup_service_pb.rb +33 -0
  19. data/lib/google/cloud/servicedirectory/v1/lookup_service_services_pb.rb +47 -0
  20. data/lib/google/cloud/servicedirectory/v1/namespace_pb.rb +26 -0
  21. data/lib/google/cloud/servicedirectory/v1/registration_service_pb.rb +125 -0
  22. data/lib/google/cloud/servicedirectory/v1/registration_service_services_pb.rb +95 -0
  23. data/lib/google/cloud/servicedirectory/v1/service_pb.rb +28 -0
  24. data/proto_docs/README.md +4 -0
  25. data/proto_docs/google/api/field_behavior.rb +59 -0
  26. data/proto_docs/google/api/resource.rb +283 -0
  27. data/proto_docs/google/cloud/servicedirectory/v1/endpoint.rb +82 -0
  28. data/proto_docs/google/cloud/servicedirectory/v1/lookup_service.rb +71 -0
  29. data/proto_docs/google/cloud/servicedirectory/v1/namespace.rb +52 -0
  30. data/proto_docs/google/cloud/servicedirectory/v1/registration_service.rb +386 -0
  31. data/proto_docs/google/cloud/servicedirectory/v1/service.rb +76 -0
  32. data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
  33. data/proto_docs/google/iam/v1/options.rb +40 -0
  34. data/proto_docs/google/iam/v1/policy.rb +248 -0
  35. data/proto_docs/google/protobuf/empty.rb +36 -0
  36. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  37. data/proto_docs/google/type/expr.rb +52 -0
  38. metadata +239 -0
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module ServiceDirectory
24
+ module V1
25
+ module LookupService
26
+ # Credentials for the LookupService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "SERVICE_DIRECTORY_CREDENTIALS",
33
+ "SERVICE_DIRECTORY_KEYFILE",
34
+ "GOOGLE_CLOUD_CREDENTIALS",
35
+ "GOOGLE_CLOUD_KEYFILE",
36
+ "GCLOUD_KEYFILE",
37
+ "SERVICE_DIRECTORY_CREDENTIALS_JSON",
38
+ "SERVICE_DIRECTORY_KEYFILE_JSON",
39
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
40
+ "GOOGLE_CLOUD_KEYFILE_JSON",
41
+ "GCLOUD_KEYFILE_JSON"
42
+ ]
43
+ self.paths = [
44
+ "~/.config/google_cloud/application_default_credentials.json"
45
+ ]
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module ServiceDirectory
23
+ module V1
24
+ module LookupService
25
+ # Path helper methods for the LookupService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Service resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param namespace [String]
37
+ # @param service [String]
38
+ #
39
+ # @return [::String]
40
+ def service_path project:, location:, namespace:, service:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
43
+ raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/"
44
+
45
+ "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}"
46
+ end
47
+
48
+ extend self
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/service_directory/v1/version"
24
+
25
+ require "google/cloud/service_directory/v1/registration_service/credentials"
26
+ require "google/cloud/service_directory/v1/registration_service/paths"
27
+ require "google/cloud/service_directory/v1/registration_service/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module ServiceDirectory
32
+ module V1
33
+ ##
34
+ # Service Directory API for registering services. It defines the following
35
+ # resource model:
36
+ #
37
+ # - The API has a collection of
38
+ # {::Google::Cloud::ServiceDirectory::V1::Namespace Namespace}
39
+ # resources, named `projects/*/locations/*/namespaces/*`.
40
+ #
41
+ # - Each Namespace has a collection of
42
+ # {::Google::Cloud::ServiceDirectory::V1::Service Service} resources, named
43
+ # `projects/*/locations/*/namespaces/*/services/*`.
44
+ #
45
+ # - Each Service has a collection of
46
+ # {::Google::Cloud::ServiceDirectory::V1::Endpoint Endpoint}
47
+ # resources, named
48
+ # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`.
49
+ #
50
+ # To load this service and instantiate a client:
51
+ #
52
+ # require "google/cloud/service_directory/v1/registration_service"
53
+ # client = ::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client.new
54
+ #
55
+ module RegistrationService
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+
62
+ helper_path = ::File.join __dir__, "registration_service", "helpers.rb"
63
+ require "google/cloud/service_directory/v1/registration_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,1796 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/servicedirectory/v1/registration_service_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module ServiceDirectory
25
+ module V1
26
+ module RegistrationService
27
+ ##
28
+ # Client for the RegistrationService service.
29
+ #
30
+ # Service Directory API for registering services. It defines the following
31
+ # resource model:
32
+ #
33
+ # - The API has a collection of
34
+ # {::Google::Cloud::ServiceDirectory::V1::Namespace Namespace}
35
+ # resources, named `projects/*/locations/*/namespaces/*`.
36
+ #
37
+ # - Each Namespace has a collection of
38
+ # {::Google::Cloud::ServiceDirectory::V1::Service Service} resources, named
39
+ # `projects/*/locations/*/namespaces/*/services/*`.
40
+ #
41
+ # - Each Service has a collection of
42
+ # {::Google::Cloud::ServiceDirectory::V1::Endpoint Endpoint}
43
+ # resources, named
44
+ # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`.
45
+ #
46
+ class Client
47
+ include Paths
48
+
49
+ # @private
50
+ attr_reader :registration_service_stub
51
+
52
+ ##
53
+ # Configure the RegistrationService Client class.
54
+ #
55
+ # See {::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client::Configuration}
56
+ # for a description of the configuration fields.
57
+ #
58
+ # ## Example
59
+ #
60
+ # To modify the configuration for all RegistrationService clients:
61
+ #
62
+ # ::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client.configure do |config|
63
+ # config.timeout = 10.0
64
+ # end
65
+ #
66
+ # @yield [config] Configure the Client client.
67
+ # @yieldparam config [Client::Configuration]
68
+ #
69
+ # @return [Client::Configuration]
70
+ #
71
+ def self.configure
72
+ @configure ||= begin
73
+ namespace = ["Google", "Cloud", "ServiceDirectory", "V1"]
74
+ parent_config = while namespace.any?
75
+ parent_name = namespace.join "::"
76
+ parent_const = const_get parent_name
77
+ break parent_const.configure if parent_const&.respond_to? :configure
78
+ namespace.pop
79
+ end
80
+ default_config = Client::Configuration.new parent_config
81
+
82
+ default_config.timeout = 15.0
83
+ default_config.retry_policy = {
84
+ initial_delay: 1.0,
85
+ max_delay: 60.0,
86
+ multiplier: 1.3,
87
+ retry_codes: [14, 2]
88
+ }
89
+
90
+ default_config
91
+ end
92
+ yield @configure if block_given?
93
+ @configure
94
+ end
95
+
96
+ ##
97
+ # Configure the RegistrationService Client instance.
98
+ #
99
+ # The configuration is set to the derived mode, meaning that values can be changed,
100
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
101
+ # should be made on {Client.configure}.
102
+ #
103
+ # See {::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client::Configuration}
104
+ # for a description of the configuration fields.
105
+ #
106
+ # @yield [config] Configure the Client client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ # @return [Client::Configuration]
110
+ #
111
+ def configure
112
+ yield @config if block_given?
113
+ @config
114
+ end
115
+
116
+ ##
117
+ # Create a new RegistrationService client object.
118
+ #
119
+ # ## Examples
120
+ #
121
+ # To create a new RegistrationService client with the default
122
+ # configuration:
123
+ #
124
+ # client = ::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client.new
125
+ #
126
+ # To create a new RegistrationService client with a custom
127
+ # configuration:
128
+ #
129
+ # client = ::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client.new do |config|
130
+ # config.timeout = 10.0
131
+ # end
132
+ #
133
+ # @yield [config] Configure the RegistrationService client.
134
+ # @yieldparam config [Client::Configuration]
135
+ #
136
+ def initialize
137
+ # These require statements are intentionally placed here to initialize
138
+ # the gRPC module only when it's required.
139
+ # See https://github.com/googleapis/toolkit/issues/446
140
+ require "gapic/grpc"
141
+ require "google/cloud/servicedirectory/v1/registration_service_services_pb"
142
+
143
+ # Create the configuration object
144
+ @config = Configuration.new Client.configure
145
+
146
+ # Yield the configuration if needed
147
+ yield @config if block_given?
148
+
149
+ # Create credentials
150
+ credentials = @config.credentials
151
+ credentials ||= Credentials.default scope: @config.scope
152
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
153
+ credentials = Credentials.new credentials, scope: @config.scope
154
+ end
155
+ @quota_project_id = @config.quota_project
156
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
157
+
158
+ @registration_service_stub = ::Gapic::ServiceStub.new(
159
+ ::Google::Cloud::ServiceDirectory::V1::RegistrationService::Stub,
160
+ credentials: credentials,
161
+ endpoint: @config.endpoint,
162
+ channel_args: @config.channel_args,
163
+ interceptors: @config.interceptors
164
+ )
165
+ end
166
+
167
+ # Service calls
168
+
169
+ ##
170
+ # Creates a namespace, and returns the new Namespace.
171
+ #
172
+ # @overload create_namespace(request, options = nil)
173
+ # Pass arguments to `create_namespace` via a request object, either of type
174
+ # {::Google::Cloud::ServiceDirectory::V1::CreateNamespaceRequest} or an equivalent Hash.
175
+ #
176
+ # @param request [::Google::Cloud::ServiceDirectory::V1::CreateNamespaceRequest, ::Hash]
177
+ # A request object representing the call parameters. Required. To specify no
178
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
179
+ # @param options [::Gapic::CallOptions, ::Hash]
180
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
181
+ #
182
+ # @overload create_namespace(parent: nil, namespace_id: nil, namespace: nil)
183
+ # Pass arguments to `create_namespace` via keyword arguments. Note that at
184
+ # least one keyword argument is required. To specify no parameters, or to keep all
185
+ # the default parameter values, pass an empty Hash as a request object (see above).
186
+ #
187
+ # @param parent [::String]
188
+ # Required. The resource name of the project and location the namespace
189
+ # will be created in.
190
+ # @param namespace_id [::String]
191
+ # Required. The Resource ID must be 1-63 characters long, and comply with
192
+ # <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
193
+ # Specifically, the name must be 1-63 characters long and match the regular
194
+ # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first
195
+ # character must be a lowercase letter, and all following characters must
196
+ # be a dash, lowercase letter, or digit, except the last character, which
197
+ # cannot be a dash.
198
+ # @param namespace [::Google::Cloud::ServiceDirectory::V1::Namespace, ::Hash]
199
+ # Required. A namespace with initial fields set.
200
+ #
201
+ # @yield [response, operation] Access the result along with the RPC operation
202
+ # @yieldparam response [::Google::Cloud::ServiceDirectory::V1::Namespace]
203
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
204
+ #
205
+ # @return [::Google::Cloud::ServiceDirectory::V1::Namespace]
206
+ #
207
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
208
+ #
209
+ def create_namespace request, options = nil
210
+ raise ::ArgumentError, "request must be provided" if request.nil?
211
+
212
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::CreateNamespaceRequest
213
+
214
+ # Converts hash and nil to an options object
215
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
216
+
217
+ # Customize the options with defaults
218
+ metadata = @config.rpcs.create_namespace.metadata.to_h
219
+
220
+ # Set x-goog-api-client and x-goog-user-project headers
221
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
222
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
223
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
224
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
225
+
226
+ header_params = {
227
+ "parent" => request.parent
228
+ }
229
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
230
+ metadata[:"x-goog-request-params"] ||= request_params_header
231
+
232
+ options.apply_defaults timeout: @config.rpcs.create_namespace.timeout,
233
+ metadata: metadata,
234
+ retry_policy: @config.rpcs.create_namespace.retry_policy
235
+ options.apply_defaults metadata: @config.metadata,
236
+ retry_policy: @config.retry_policy
237
+
238
+ @registration_service_stub.call_rpc :create_namespace, request, options: options do |response, operation|
239
+ yield response, operation if block_given?
240
+ return response
241
+ end
242
+ rescue ::GRPC::BadStatus => e
243
+ raise ::Google::Cloud::Error.from_error(e)
244
+ end
245
+
246
+ ##
247
+ # Lists all namespaces.
248
+ #
249
+ # @overload list_namespaces(request, options = nil)
250
+ # Pass arguments to `list_namespaces` via a request object, either of type
251
+ # {::Google::Cloud::ServiceDirectory::V1::ListNamespacesRequest} or an equivalent Hash.
252
+ #
253
+ # @param request [::Google::Cloud::ServiceDirectory::V1::ListNamespacesRequest, ::Hash]
254
+ # A request object representing the call parameters. Required. To specify no
255
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
256
+ # @param options [::Gapic::CallOptions, ::Hash]
257
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
258
+ #
259
+ # @overload list_namespaces(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
260
+ # Pass arguments to `list_namespaces` via keyword arguments. Note that at
261
+ # least one keyword argument is required. To specify no parameters, or to keep all
262
+ # the default parameter values, pass an empty Hash as a request object (see above).
263
+ #
264
+ # @param parent [::String]
265
+ # Required. The resource name of the project and location whose namespaces
266
+ # we'd like to list.
267
+ # @param page_size [::Integer]
268
+ # Optional. The maximum number of items to return.
269
+ # @param page_token [::String]
270
+ # Optional. The next_page_token value returned from a previous List request,
271
+ # if any.
272
+ # @param filter [::String]
273
+ # Optional. The filter to list result by.
274
+ #
275
+ # General filter string syntax:
276
+ # <field> <operator> <value> (<logical connector>)
277
+ # <field> can be "name", or "labels.<key>" for map field.
278
+ # <operator> can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and
279
+ # is roughly the same as "=".
280
+ # <value> must be the same data type as field.
281
+ # <logical connector> can be "AND, OR, NOT".
282
+ #
283
+ # Examples of valid filters:
284
+ # * "labels.owner" returns Namespaces that have a label with the key "owner"
285
+ # this is the same as "labels:owner".
286
+ # * "labels.protocol=gRPC" returns Namespaces that have key/value
287
+ # "protocol=gRPC".
288
+ # * "name>projects/my-project/locations/us-east/namespaces/namespace-c"
289
+ # returns Namespaces that have name that is alphabetically later than the
290
+ # string, so "namespace-e" will be returned but "namespace-a" will not be.
291
+ # * "labels.owner!=sd AND labels.foo=bar" returns Namespaces that have
292
+ # "owner" in label key but value is not "sd" AND have key/value foo=bar.
293
+ # * "doesnotexist.foo=bar" returns an empty list. Note that Namespace doesn't
294
+ # have a field called "doesnotexist". Since the filter does not match any
295
+ # Namespaces, it returns no results.
296
+ # @param order_by [::String]
297
+ # Optional. The order to list result by.
298
+ #
299
+ # General order by string syntax:
300
+ # <field> (<asc|desc>) (,)
301
+ # <field> allows values \\{"name"}
302
+ # <asc/desc> ascending or descending order by <field>. If this is left
303
+ # blank, "asc" is used.
304
+ # Note that an empty order_by string result in default order, which is order
305
+ # by name in ascending order.
306
+ #
307
+ # @yield [response, operation] Access the result along with the RPC operation
308
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Namespace>]
309
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
310
+ #
311
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Namespace>]
312
+ #
313
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
314
+ #
315
+ def list_namespaces request, options = nil
316
+ raise ::ArgumentError, "request must be provided" if request.nil?
317
+
318
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::ListNamespacesRequest
319
+
320
+ # Converts hash and nil to an options object
321
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
322
+
323
+ # Customize the options with defaults
324
+ metadata = @config.rpcs.list_namespaces.metadata.to_h
325
+
326
+ # Set x-goog-api-client and x-goog-user-project headers
327
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
328
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
329
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
330
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
331
+
332
+ header_params = {
333
+ "parent" => request.parent
334
+ }
335
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
336
+ metadata[:"x-goog-request-params"] ||= request_params_header
337
+
338
+ options.apply_defaults timeout: @config.rpcs.list_namespaces.timeout,
339
+ metadata: metadata,
340
+ retry_policy: @config.rpcs.list_namespaces.retry_policy
341
+ options.apply_defaults metadata: @config.metadata,
342
+ retry_policy: @config.retry_policy
343
+
344
+ @registration_service_stub.call_rpc :list_namespaces, request, options: options do |response, operation|
345
+ response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_namespaces, request, response, operation, options
346
+ yield response, operation if block_given?
347
+ return response
348
+ end
349
+ rescue ::GRPC::BadStatus => e
350
+ raise ::Google::Cloud::Error.from_error(e)
351
+ end
352
+
353
+ ##
354
+ # Gets a namespace.
355
+ #
356
+ # @overload get_namespace(request, options = nil)
357
+ # Pass arguments to `get_namespace` via a request object, either of type
358
+ # {::Google::Cloud::ServiceDirectory::V1::GetNamespaceRequest} or an equivalent Hash.
359
+ #
360
+ # @param request [::Google::Cloud::ServiceDirectory::V1::GetNamespaceRequest, ::Hash]
361
+ # A request object representing the call parameters. Required. To specify no
362
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
363
+ # @param options [::Gapic::CallOptions, ::Hash]
364
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
365
+ #
366
+ # @overload get_namespace(name: nil)
367
+ # Pass arguments to `get_namespace` via keyword arguments. Note that at
368
+ # least one keyword argument is required. To specify no parameters, or to keep all
369
+ # the default parameter values, pass an empty Hash as a request object (see above).
370
+ #
371
+ # @param name [::String]
372
+ # Required. The name of the namespace to retrieve.
373
+ #
374
+ # @yield [response, operation] Access the result along with the RPC operation
375
+ # @yieldparam response [::Google::Cloud::ServiceDirectory::V1::Namespace]
376
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
377
+ #
378
+ # @return [::Google::Cloud::ServiceDirectory::V1::Namespace]
379
+ #
380
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
381
+ #
382
+ def get_namespace request, options = nil
383
+ raise ::ArgumentError, "request must be provided" if request.nil?
384
+
385
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::GetNamespaceRequest
386
+
387
+ # Converts hash and nil to an options object
388
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
389
+
390
+ # Customize the options with defaults
391
+ metadata = @config.rpcs.get_namespace.metadata.to_h
392
+
393
+ # Set x-goog-api-client and x-goog-user-project headers
394
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
395
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
396
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
397
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
398
+
399
+ header_params = {
400
+ "name" => request.name
401
+ }
402
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
403
+ metadata[:"x-goog-request-params"] ||= request_params_header
404
+
405
+ options.apply_defaults timeout: @config.rpcs.get_namespace.timeout,
406
+ metadata: metadata,
407
+ retry_policy: @config.rpcs.get_namespace.retry_policy
408
+ options.apply_defaults metadata: @config.metadata,
409
+ retry_policy: @config.retry_policy
410
+
411
+ @registration_service_stub.call_rpc :get_namespace, request, options: options do |response, operation|
412
+ yield response, operation if block_given?
413
+ return response
414
+ end
415
+ rescue ::GRPC::BadStatus => e
416
+ raise ::Google::Cloud::Error.from_error(e)
417
+ end
418
+
419
+ ##
420
+ # Updates a namespace.
421
+ #
422
+ # @overload update_namespace(request, options = nil)
423
+ # Pass arguments to `update_namespace` via a request object, either of type
424
+ # {::Google::Cloud::ServiceDirectory::V1::UpdateNamespaceRequest} or an equivalent Hash.
425
+ #
426
+ # @param request [::Google::Cloud::ServiceDirectory::V1::UpdateNamespaceRequest, ::Hash]
427
+ # A request object representing the call parameters. Required. To specify no
428
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
429
+ # @param options [::Gapic::CallOptions, ::Hash]
430
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
431
+ #
432
+ # @overload update_namespace(namespace: nil, update_mask: nil)
433
+ # Pass arguments to `update_namespace` via keyword arguments. Note that at
434
+ # least one keyword argument is required. To specify no parameters, or to keep all
435
+ # the default parameter values, pass an empty Hash as a request object (see above).
436
+ #
437
+ # @param namespace [::Google::Cloud::ServiceDirectory::V1::Namespace, ::Hash]
438
+ # Required. The updated namespace.
439
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
440
+ # Required. List of fields to be updated in this request.
441
+ #
442
+ # @yield [response, operation] Access the result along with the RPC operation
443
+ # @yieldparam response [::Google::Cloud::ServiceDirectory::V1::Namespace]
444
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
445
+ #
446
+ # @return [::Google::Cloud::ServiceDirectory::V1::Namespace]
447
+ #
448
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
449
+ #
450
+ def update_namespace request, options = nil
451
+ raise ::ArgumentError, "request must be provided" if request.nil?
452
+
453
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::UpdateNamespaceRequest
454
+
455
+ # Converts hash and nil to an options object
456
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
457
+
458
+ # Customize the options with defaults
459
+ metadata = @config.rpcs.update_namespace.metadata.to_h
460
+
461
+ # Set x-goog-api-client and x-goog-user-project headers
462
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
463
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
464
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
465
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
466
+
467
+ header_params = {
468
+ "namespace.name" => request.namespace.name
469
+ }
470
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
471
+ metadata[:"x-goog-request-params"] ||= request_params_header
472
+
473
+ options.apply_defaults timeout: @config.rpcs.update_namespace.timeout,
474
+ metadata: metadata,
475
+ retry_policy: @config.rpcs.update_namespace.retry_policy
476
+ options.apply_defaults metadata: @config.metadata,
477
+ retry_policy: @config.retry_policy
478
+
479
+ @registration_service_stub.call_rpc :update_namespace, request, options: options do |response, operation|
480
+ yield response, operation if block_given?
481
+ return response
482
+ end
483
+ rescue ::GRPC::BadStatus => e
484
+ raise ::Google::Cloud::Error.from_error(e)
485
+ end
486
+
487
+ ##
488
+ # Deletes a namespace. This also deletes all services and endpoints in
489
+ # the namespace.
490
+ #
491
+ # @overload delete_namespace(request, options = nil)
492
+ # Pass arguments to `delete_namespace` via a request object, either of type
493
+ # {::Google::Cloud::ServiceDirectory::V1::DeleteNamespaceRequest} or an equivalent Hash.
494
+ #
495
+ # @param request [::Google::Cloud::ServiceDirectory::V1::DeleteNamespaceRequest, ::Hash]
496
+ # A request object representing the call parameters. Required. To specify no
497
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
498
+ # @param options [::Gapic::CallOptions, ::Hash]
499
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
500
+ #
501
+ # @overload delete_namespace(name: nil)
502
+ # Pass arguments to `delete_namespace` via keyword arguments. Note that at
503
+ # least one keyword argument is required. To specify no parameters, or to keep all
504
+ # the default parameter values, pass an empty Hash as a request object (see above).
505
+ #
506
+ # @param name [::String]
507
+ # Required. The name of the namespace to delete.
508
+ #
509
+ # @yield [response, operation] Access the result along with the RPC operation
510
+ # @yieldparam response [::Google::Protobuf::Empty]
511
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
512
+ #
513
+ # @return [::Google::Protobuf::Empty]
514
+ #
515
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
516
+ #
517
+ def delete_namespace request, options = nil
518
+ raise ::ArgumentError, "request must be provided" if request.nil?
519
+
520
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::DeleteNamespaceRequest
521
+
522
+ # Converts hash and nil to an options object
523
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
524
+
525
+ # Customize the options with defaults
526
+ metadata = @config.rpcs.delete_namespace.metadata.to_h
527
+
528
+ # Set x-goog-api-client and x-goog-user-project headers
529
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
530
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
531
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
532
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
533
+
534
+ header_params = {
535
+ "name" => request.name
536
+ }
537
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
538
+ metadata[:"x-goog-request-params"] ||= request_params_header
539
+
540
+ options.apply_defaults timeout: @config.rpcs.delete_namespace.timeout,
541
+ metadata: metadata,
542
+ retry_policy: @config.rpcs.delete_namespace.retry_policy
543
+ options.apply_defaults metadata: @config.metadata,
544
+ retry_policy: @config.retry_policy
545
+
546
+ @registration_service_stub.call_rpc :delete_namespace, request, options: options do |response, operation|
547
+ yield response, operation if block_given?
548
+ return response
549
+ end
550
+ rescue ::GRPC::BadStatus => e
551
+ raise ::Google::Cloud::Error.from_error(e)
552
+ end
553
+
554
+ ##
555
+ # Creates a service, and returns the new Service.
556
+ #
557
+ # @overload create_service(request, options = nil)
558
+ # Pass arguments to `create_service` via a request object, either of type
559
+ # {::Google::Cloud::ServiceDirectory::V1::CreateServiceRequest} or an equivalent Hash.
560
+ #
561
+ # @param request [::Google::Cloud::ServiceDirectory::V1::CreateServiceRequest, ::Hash]
562
+ # A request object representing the call parameters. Required. To specify no
563
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
564
+ # @param options [::Gapic::CallOptions, ::Hash]
565
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
566
+ #
567
+ # @overload create_service(parent: nil, service_id: nil, service: nil)
568
+ # Pass arguments to `create_service` via keyword arguments. Note that at
569
+ # least one keyword argument is required. To specify no parameters, or to keep all
570
+ # the default parameter values, pass an empty Hash as a request object (see above).
571
+ #
572
+ # @param parent [::String]
573
+ # Required. The resource name of the namespace this service will belong to.
574
+ # @param service_id [::String]
575
+ # Required. The Resource ID must be 1-63 characters long, and comply with
576
+ # <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
577
+ # Specifically, the name must be 1-63 characters long and match the regular
578
+ # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first
579
+ # character must be a lowercase letter, and all following characters must
580
+ # be a dash, lowercase letter, or digit, except the last character, which
581
+ # cannot be a dash.
582
+ # @param service [::Google::Cloud::ServiceDirectory::V1::Service, ::Hash]
583
+ # Required. A service with initial fields set.
584
+ #
585
+ # @yield [response, operation] Access the result along with the RPC operation
586
+ # @yieldparam response [::Google::Cloud::ServiceDirectory::V1::Service]
587
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
588
+ #
589
+ # @return [::Google::Cloud::ServiceDirectory::V1::Service]
590
+ #
591
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
592
+ #
593
+ def create_service request, options = nil
594
+ raise ::ArgumentError, "request must be provided" if request.nil?
595
+
596
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::CreateServiceRequest
597
+
598
+ # Converts hash and nil to an options object
599
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
600
+
601
+ # Customize the options with defaults
602
+ metadata = @config.rpcs.create_service.metadata.to_h
603
+
604
+ # Set x-goog-api-client and x-goog-user-project headers
605
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
606
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
607
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
608
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
609
+
610
+ header_params = {
611
+ "parent" => request.parent
612
+ }
613
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
614
+ metadata[:"x-goog-request-params"] ||= request_params_header
615
+
616
+ options.apply_defaults timeout: @config.rpcs.create_service.timeout,
617
+ metadata: metadata,
618
+ retry_policy: @config.rpcs.create_service.retry_policy
619
+ options.apply_defaults metadata: @config.metadata,
620
+ retry_policy: @config.retry_policy
621
+
622
+ @registration_service_stub.call_rpc :create_service, request, options: options do |response, operation|
623
+ yield response, operation if block_given?
624
+ return response
625
+ end
626
+ rescue ::GRPC::BadStatus => e
627
+ raise ::Google::Cloud::Error.from_error(e)
628
+ end
629
+
630
+ ##
631
+ # Lists all services belonging to a namespace.
632
+ #
633
+ # @overload list_services(request, options = nil)
634
+ # Pass arguments to `list_services` via a request object, either of type
635
+ # {::Google::Cloud::ServiceDirectory::V1::ListServicesRequest} or an equivalent Hash.
636
+ #
637
+ # @param request [::Google::Cloud::ServiceDirectory::V1::ListServicesRequest, ::Hash]
638
+ # A request object representing the call parameters. Required. To specify no
639
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
640
+ # @param options [::Gapic::CallOptions, ::Hash]
641
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
642
+ #
643
+ # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
644
+ # Pass arguments to `list_services` via keyword arguments. Note that at
645
+ # least one keyword argument is required. To specify no parameters, or to keep all
646
+ # the default parameter values, pass an empty Hash as a request object (see above).
647
+ #
648
+ # @param parent [::String]
649
+ # Required. The resource name of the namespace whose services we'd
650
+ # like to list.
651
+ # @param page_size [::Integer]
652
+ # Optional. The maximum number of items to return.
653
+ # @param page_token [::String]
654
+ # Optional. The next_page_token value returned from a previous List request,
655
+ # if any.
656
+ # @param filter [::String]
657
+ # Optional. The filter to list result by.
658
+ #
659
+ # General filter string syntax:
660
+ # <field> <operator> <value> (<logical connector>)
661
+ # <field> can be "name", or "metadata.<key>" for map field.
662
+ # <operator> can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and
663
+ # is roughly the same as "=".
664
+ # <value> must be the same data type as field.
665
+ # <logical connector> can be "AND, OR, NOT".
666
+ #
667
+ # Examples of valid filters:
668
+ # * "metadata.owner" returns Services that have a label with the key "owner"
669
+ # this is the same as "metadata:owner".
670
+ # * "metadata.protocol=gRPC" returns Services that have key/value
671
+ # "protocol=gRPC".
672
+ # * "name>projects/my-project/locations/us-east/namespaces/my-namespace/services/service-c"
673
+ # returns Services that have name that is alphabetically later than the
674
+ # string, so "service-e" will be returned but "service-a" will not be.
675
+ # * "metadata.owner!=sd AND metadata.foo=bar" returns Services that have
676
+ # "owner" in label key but value is not "sd" AND have key/value foo=bar.
677
+ # * "doesnotexist.foo=bar" returns an empty list. Note that Service doesn't
678
+ # have a field called "doesnotexist". Since the filter does not match any
679
+ # Services, it returns no results.
680
+ # @param order_by [::String]
681
+ # Optional. The order to list result by.
682
+ #
683
+ # @yield [response, operation] Access the result along with the RPC operation
684
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Service>]
685
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
686
+ #
687
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Service>]
688
+ #
689
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
690
+ #
691
+ def list_services request, options = nil
692
+ raise ::ArgumentError, "request must be provided" if request.nil?
693
+
694
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::ListServicesRequest
695
+
696
+ # Converts hash and nil to an options object
697
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
698
+
699
+ # Customize the options with defaults
700
+ metadata = @config.rpcs.list_services.metadata.to_h
701
+
702
+ # Set x-goog-api-client and x-goog-user-project headers
703
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
704
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
705
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
706
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
707
+
708
+ header_params = {
709
+ "parent" => request.parent
710
+ }
711
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
712
+ metadata[:"x-goog-request-params"] ||= request_params_header
713
+
714
+ options.apply_defaults timeout: @config.rpcs.list_services.timeout,
715
+ metadata: metadata,
716
+ retry_policy: @config.rpcs.list_services.retry_policy
717
+ options.apply_defaults metadata: @config.metadata,
718
+ retry_policy: @config.retry_policy
719
+
720
+ @registration_service_stub.call_rpc :list_services, request, options: options do |response, operation|
721
+ response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_services, request, response, operation, options
722
+ yield response, operation if block_given?
723
+ return response
724
+ end
725
+ rescue ::GRPC::BadStatus => e
726
+ raise ::Google::Cloud::Error.from_error(e)
727
+ end
728
+
729
+ ##
730
+ # Gets a service.
731
+ #
732
+ # @overload get_service(request, options = nil)
733
+ # Pass arguments to `get_service` via a request object, either of type
734
+ # {::Google::Cloud::ServiceDirectory::V1::GetServiceRequest} or an equivalent Hash.
735
+ #
736
+ # @param request [::Google::Cloud::ServiceDirectory::V1::GetServiceRequest, ::Hash]
737
+ # A request object representing the call parameters. Required. To specify no
738
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
739
+ # @param options [::Gapic::CallOptions, ::Hash]
740
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
741
+ #
742
+ # @overload get_service(name: nil)
743
+ # Pass arguments to `get_service` via keyword arguments. Note that at
744
+ # least one keyword argument is required. To specify no parameters, or to keep all
745
+ # the default parameter values, pass an empty Hash as a request object (see above).
746
+ #
747
+ # @param name [::String]
748
+ # Required. The name of the service to get.
749
+ #
750
+ # @yield [response, operation] Access the result along with the RPC operation
751
+ # @yieldparam response [::Google::Cloud::ServiceDirectory::V1::Service]
752
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
753
+ #
754
+ # @return [::Google::Cloud::ServiceDirectory::V1::Service]
755
+ #
756
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
757
+ #
758
+ def get_service request, options = nil
759
+ raise ::ArgumentError, "request must be provided" if request.nil?
760
+
761
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::GetServiceRequest
762
+
763
+ # Converts hash and nil to an options object
764
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
765
+
766
+ # Customize the options with defaults
767
+ metadata = @config.rpcs.get_service.metadata.to_h
768
+
769
+ # Set x-goog-api-client and x-goog-user-project headers
770
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
771
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
772
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
773
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
774
+
775
+ header_params = {
776
+ "name" => request.name
777
+ }
778
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
779
+ metadata[:"x-goog-request-params"] ||= request_params_header
780
+
781
+ options.apply_defaults timeout: @config.rpcs.get_service.timeout,
782
+ metadata: metadata,
783
+ retry_policy: @config.rpcs.get_service.retry_policy
784
+ options.apply_defaults metadata: @config.metadata,
785
+ retry_policy: @config.retry_policy
786
+
787
+ @registration_service_stub.call_rpc :get_service, request, options: options do |response, operation|
788
+ yield response, operation if block_given?
789
+ return response
790
+ end
791
+ rescue ::GRPC::BadStatus => e
792
+ raise ::Google::Cloud::Error.from_error(e)
793
+ end
794
+
795
+ ##
796
+ # Updates a service.
797
+ #
798
+ # @overload update_service(request, options = nil)
799
+ # Pass arguments to `update_service` via a request object, either of type
800
+ # {::Google::Cloud::ServiceDirectory::V1::UpdateServiceRequest} or an equivalent Hash.
801
+ #
802
+ # @param request [::Google::Cloud::ServiceDirectory::V1::UpdateServiceRequest, ::Hash]
803
+ # A request object representing the call parameters. Required. To specify no
804
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
805
+ # @param options [::Gapic::CallOptions, ::Hash]
806
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
807
+ #
808
+ # @overload update_service(service: nil, update_mask: nil)
809
+ # Pass arguments to `update_service` via keyword arguments. Note that at
810
+ # least one keyword argument is required. To specify no parameters, or to keep all
811
+ # the default parameter values, pass an empty Hash as a request object (see above).
812
+ #
813
+ # @param service [::Google::Cloud::ServiceDirectory::V1::Service, ::Hash]
814
+ # Required. The updated service.
815
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
816
+ # Required. List of fields to be updated in this request.
817
+ #
818
+ # @yield [response, operation] Access the result along with the RPC operation
819
+ # @yieldparam response [::Google::Cloud::ServiceDirectory::V1::Service]
820
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
821
+ #
822
+ # @return [::Google::Cloud::ServiceDirectory::V1::Service]
823
+ #
824
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
825
+ #
826
+ def update_service request, options = nil
827
+ raise ::ArgumentError, "request must be provided" if request.nil?
828
+
829
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::UpdateServiceRequest
830
+
831
+ # Converts hash and nil to an options object
832
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
833
+
834
+ # Customize the options with defaults
835
+ metadata = @config.rpcs.update_service.metadata.to_h
836
+
837
+ # Set x-goog-api-client and x-goog-user-project headers
838
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
839
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
840
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
841
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
842
+
843
+ header_params = {
844
+ "service.name" => request.service.name
845
+ }
846
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
847
+ metadata[:"x-goog-request-params"] ||= request_params_header
848
+
849
+ options.apply_defaults timeout: @config.rpcs.update_service.timeout,
850
+ metadata: metadata,
851
+ retry_policy: @config.rpcs.update_service.retry_policy
852
+ options.apply_defaults metadata: @config.metadata,
853
+ retry_policy: @config.retry_policy
854
+
855
+ @registration_service_stub.call_rpc :update_service, request, options: options do |response, operation|
856
+ yield response, operation if block_given?
857
+ return response
858
+ end
859
+ rescue ::GRPC::BadStatus => e
860
+ raise ::Google::Cloud::Error.from_error(e)
861
+ end
862
+
863
+ ##
864
+ # Deletes a service. This also deletes all endpoints associated with
865
+ # the service.
866
+ #
867
+ # @overload delete_service(request, options = nil)
868
+ # Pass arguments to `delete_service` via a request object, either of type
869
+ # {::Google::Cloud::ServiceDirectory::V1::DeleteServiceRequest} or an equivalent Hash.
870
+ #
871
+ # @param request [::Google::Cloud::ServiceDirectory::V1::DeleteServiceRequest, ::Hash]
872
+ # A request object representing the call parameters. Required. To specify no
873
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
874
+ # @param options [::Gapic::CallOptions, ::Hash]
875
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
876
+ #
877
+ # @overload delete_service(name: nil)
878
+ # Pass arguments to `delete_service` via keyword arguments. Note that at
879
+ # least one keyword argument is required. To specify no parameters, or to keep all
880
+ # the default parameter values, pass an empty Hash as a request object (see above).
881
+ #
882
+ # @param name [::String]
883
+ # Required. The name of the service to delete.
884
+ #
885
+ # @yield [response, operation] Access the result along with the RPC operation
886
+ # @yieldparam response [::Google::Protobuf::Empty]
887
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
888
+ #
889
+ # @return [::Google::Protobuf::Empty]
890
+ #
891
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
892
+ #
893
+ def delete_service request, options = nil
894
+ raise ::ArgumentError, "request must be provided" if request.nil?
895
+
896
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::DeleteServiceRequest
897
+
898
+ # Converts hash and nil to an options object
899
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
900
+
901
+ # Customize the options with defaults
902
+ metadata = @config.rpcs.delete_service.metadata.to_h
903
+
904
+ # Set x-goog-api-client and x-goog-user-project headers
905
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
906
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
907
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
908
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
909
+
910
+ header_params = {
911
+ "name" => request.name
912
+ }
913
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
914
+ metadata[:"x-goog-request-params"] ||= request_params_header
915
+
916
+ options.apply_defaults timeout: @config.rpcs.delete_service.timeout,
917
+ metadata: metadata,
918
+ retry_policy: @config.rpcs.delete_service.retry_policy
919
+ options.apply_defaults metadata: @config.metadata,
920
+ retry_policy: @config.retry_policy
921
+
922
+ @registration_service_stub.call_rpc :delete_service, request, options: options do |response, operation|
923
+ yield response, operation if block_given?
924
+ return response
925
+ end
926
+ rescue ::GRPC::BadStatus => e
927
+ raise ::Google::Cloud::Error.from_error(e)
928
+ end
929
+
930
+ ##
931
+ # Creates a endpoint, and returns the new Endpoint.
932
+ #
933
+ # @overload create_endpoint(request, options = nil)
934
+ # Pass arguments to `create_endpoint` via a request object, either of type
935
+ # {::Google::Cloud::ServiceDirectory::V1::CreateEndpointRequest} or an equivalent Hash.
936
+ #
937
+ # @param request [::Google::Cloud::ServiceDirectory::V1::CreateEndpointRequest, ::Hash]
938
+ # A request object representing the call parameters. Required. To specify no
939
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
940
+ # @param options [::Gapic::CallOptions, ::Hash]
941
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
942
+ #
943
+ # @overload create_endpoint(parent: nil, endpoint_id: nil, endpoint: nil)
944
+ # Pass arguments to `create_endpoint` via keyword arguments. Note that at
945
+ # least one keyword argument is required. To specify no parameters, or to keep all
946
+ # the default parameter values, pass an empty Hash as a request object (see above).
947
+ #
948
+ # @param parent [::String]
949
+ # Required. The resource name of the service that this endpoint provides.
950
+ # @param endpoint_id [::String]
951
+ # Required. The Resource ID must be 1-63 characters long, and comply with
952
+ # <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
953
+ # Specifically, the name must be 1-63 characters long and match the regular
954
+ # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first
955
+ # character must be a lowercase letter, and all following characters must
956
+ # be a dash, lowercase letter, or digit, except the last character, which
957
+ # cannot be a dash.
958
+ # @param endpoint [::Google::Cloud::ServiceDirectory::V1::Endpoint, ::Hash]
959
+ # Required. A endpoint with initial fields set.
960
+ #
961
+ # @yield [response, operation] Access the result along with the RPC operation
962
+ # @yieldparam response [::Google::Cloud::ServiceDirectory::V1::Endpoint]
963
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
964
+ #
965
+ # @return [::Google::Cloud::ServiceDirectory::V1::Endpoint]
966
+ #
967
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
968
+ #
969
+ def create_endpoint request, options = nil
970
+ raise ::ArgumentError, "request must be provided" if request.nil?
971
+
972
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::CreateEndpointRequest
973
+
974
+ # Converts hash and nil to an options object
975
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
976
+
977
+ # Customize the options with defaults
978
+ metadata = @config.rpcs.create_endpoint.metadata.to_h
979
+
980
+ # Set x-goog-api-client and x-goog-user-project headers
981
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
982
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
983
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
984
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
985
+
986
+ header_params = {
987
+ "parent" => request.parent
988
+ }
989
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
990
+ metadata[:"x-goog-request-params"] ||= request_params_header
991
+
992
+ options.apply_defaults timeout: @config.rpcs.create_endpoint.timeout,
993
+ metadata: metadata,
994
+ retry_policy: @config.rpcs.create_endpoint.retry_policy
995
+ options.apply_defaults metadata: @config.metadata,
996
+ retry_policy: @config.retry_policy
997
+
998
+ @registration_service_stub.call_rpc :create_endpoint, request, options: options do |response, operation|
999
+ yield response, operation if block_given?
1000
+ return response
1001
+ end
1002
+ rescue ::GRPC::BadStatus => e
1003
+ raise ::Google::Cloud::Error.from_error(e)
1004
+ end
1005
+
1006
+ ##
1007
+ # Lists all endpoints.
1008
+ #
1009
+ # @overload list_endpoints(request, options = nil)
1010
+ # Pass arguments to `list_endpoints` via a request object, either of type
1011
+ # {::Google::Cloud::ServiceDirectory::V1::ListEndpointsRequest} or an equivalent Hash.
1012
+ #
1013
+ # @param request [::Google::Cloud::ServiceDirectory::V1::ListEndpointsRequest, ::Hash]
1014
+ # A request object representing the call parameters. Required. To specify no
1015
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1016
+ # @param options [::Gapic::CallOptions, ::Hash]
1017
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1018
+ #
1019
+ # @overload list_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1020
+ # Pass arguments to `list_endpoints` via keyword arguments. Note that at
1021
+ # least one keyword argument is required. To specify no parameters, or to keep all
1022
+ # the default parameter values, pass an empty Hash as a request object (see above).
1023
+ #
1024
+ # @param parent [::String]
1025
+ # Required. The resource name of the service whose endpoints we'd like to
1026
+ # list.
1027
+ # @param page_size [::Integer]
1028
+ # Optional. The maximum number of items to return.
1029
+ # @param page_token [::String]
1030
+ # Optional. The next_page_token value returned from a previous List request,
1031
+ # if any.
1032
+ # @param filter [::String]
1033
+ # Optional. The filter to list result by.
1034
+ #
1035
+ # General filter string syntax:
1036
+ # <field> <operator> <value> (<logical connector>)
1037
+ # <field> can be "name", "address", "port" or "metadata.<key>" for map field.
1038
+ # <operator> can be "<, >, <=, >=, !=, =, :". Of which ":" means HAS, and
1039
+ # is roughly the same as "=".
1040
+ # <value> must be the same data type as field.
1041
+ # <logical connector> can be "AND, OR, NOT".
1042
+ #
1043
+ # Examples of valid filters:
1044
+ # * "metadata.owner" returns Endpoints that have a label with the key "owner"
1045
+ # this is the same as "metadata:owner".
1046
+ # * "metadata.protocol=gRPC" returns Endpoints that have key/value
1047
+ # "protocol=gRPC".
1048
+ # * "address=192.108.1.105" returns Endpoints that have this address.
1049
+ # * "port>8080" returns Endpoints that have port number larger than 8080.
1050
+ # * "name>projects/my-project/locations/us-east/namespaces/my-namespace/services/my-service/endpoints/endpoint-c"
1051
+ # returns Endpoints that have name that is alphabetically later than the
1052
+ # string, so "endpoint-e" will be returned but "endpoint-a" will not be.
1053
+ # * "metadata.owner!=sd AND metadata.foo=bar" returns Endpoints that have
1054
+ # "owner" in label key but value is not "sd" AND have key/value foo=bar.
1055
+ # * "doesnotexist.foo=bar" returns an empty list. Note that Endpoint doesn't
1056
+ # have a field called "doesnotexist". Since the filter does not match any
1057
+ # Endpoints, it returns no results.
1058
+ # @param order_by [::String]
1059
+ # Optional. The order to list result by.
1060
+ #
1061
+ # @yield [response, operation] Access the result along with the RPC operation
1062
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Endpoint>]
1063
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1064
+ #
1065
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1::Endpoint>]
1066
+ #
1067
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1068
+ #
1069
+ def list_endpoints request, options = nil
1070
+ raise ::ArgumentError, "request must be provided" if request.nil?
1071
+
1072
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::ListEndpointsRequest
1073
+
1074
+ # Converts hash and nil to an options object
1075
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1076
+
1077
+ # Customize the options with defaults
1078
+ metadata = @config.rpcs.list_endpoints.metadata.to_h
1079
+
1080
+ # Set x-goog-api-client and x-goog-user-project headers
1081
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1082
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1083
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
1084
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1085
+
1086
+ header_params = {
1087
+ "parent" => request.parent
1088
+ }
1089
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1090
+ metadata[:"x-goog-request-params"] ||= request_params_header
1091
+
1092
+ options.apply_defaults timeout: @config.rpcs.list_endpoints.timeout,
1093
+ metadata: metadata,
1094
+ retry_policy: @config.rpcs.list_endpoints.retry_policy
1095
+ options.apply_defaults metadata: @config.metadata,
1096
+ retry_policy: @config.retry_policy
1097
+
1098
+ @registration_service_stub.call_rpc :list_endpoints, request, options: options do |response, operation|
1099
+ response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_endpoints, request, response, operation, options
1100
+ yield response, operation if block_given?
1101
+ return response
1102
+ end
1103
+ rescue ::GRPC::BadStatus => e
1104
+ raise ::Google::Cloud::Error.from_error(e)
1105
+ end
1106
+
1107
+ ##
1108
+ # Gets a endpoint.
1109
+ #
1110
+ # @overload get_endpoint(request, options = nil)
1111
+ # Pass arguments to `get_endpoint` via a request object, either of type
1112
+ # {::Google::Cloud::ServiceDirectory::V1::GetEndpointRequest} or an equivalent Hash.
1113
+ #
1114
+ # @param request [::Google::Cloud::ServiceDirectory::V1::GetEndpointRequest, ::Hash]
1115
+ # A request object representing the call parameters. Required. To specify no
1116
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1117
+ # @param options [::Gapic::CallOptions, ::Hash]
1118
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1119
+ #
1120
+ # @overload get_endpoint(name: nil)
1121
+ # Pass arguments to `get_endpoint` via keyword arguments. Note that at
1122
+ # least one keyword argument is required. To specify no parameters, or to keep all
1123
+ # the default parameter values, pass an empty Hash as a request object (see above).
1124
+ #
1125
+ # @param name [::String]
1126
+ # Required. The name of the endpoint to get.
1127
+ #
1128
+ # @yield [response, operation] Access the result along with the RPC operation
1129
+ # @yieldparam response [::Google::Cloud::ServiceDirectory::V1::Endpoint]
1130
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1131
+ #
1132
+ # @return [::Google::Cloud::ServiceDirectory::V1::Endpoint]
1133
+ #
1134
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1135
+ #
1136
+ def get_endpoint request, options = nil
1137
+ raise ::ArgumentError, "request must be provided" if request.nil?
1138
+
1139
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::GetEndpointRequest
1140
+
1141
+ # Converts hash and nil to an options object
1142
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1143
+
1144
+ # Customize the options with defaults
1145
+ metadata = @config.rpcs.get_endpoint.metadata.to_h
1146
+
1147
+ # Set x-goog-api-client and x-goog-user-project headers
1148
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1149
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1150
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
1151
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1152
+
1153
+ header_params = {
1154
+ "name" => request.name
1155
+ }
1156
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1157
+ metadata[:"x-goog-request-params"] ||= request_params_header
1158
+
1159
+ options.apply_defaults timeout: @config.rpcs.get_endpoint.timeout,
1160
+ metadata: metadata,
1161
+ retry_policy: @config.rpcs.get_endpoint.retry_policy
1162
+ options.apply_defaults metadata: @config.metadata,
1163
+ retry_policy: @config.retry_policy
1164
+
1165
+ @registration_service_stub.call_rpc :get_endpoint, request, options: options do |response, operation|
1166
+ yield response, operation if block_given?
1167
+ return response
1168
+ end
1169
+ rescue ::GRPC::BadStatus => e
1170
+ raise ::Google::Cloud::Error.from_error(e)
1171
+ end
1172
+
1173
+ ##
1174
+ # Updates a endpoint.
1175
+ #
1176
+ # @overload update_endpoint(request, options = nil)
1177
+ # Pass arguments to `update_endpoint` via a request object, either of type
1178
+ # {::Google::Cloud::ServiceDirectory::V1::UpdateEndpointRequest} or an equivalent Hash.
1179
+ #
1180
+ # @param request [::Google::Cloud::ServiceDirectory::V1::UpdateEndpointRequest, ::Hash]
1181
+ # A request object representing the call parameters. Required. To specify no
1182
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1183
+ # @param options [::Gapic::CallOptions, ::Hash]
1184
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1185
+ #
1186
+ # @overload update_endpoint(endpoint: nil, update_mask: nil)
1187
+ # Pass arguments to `update_endpoint` via keyword arguments. Note that at
1188
+ # least one keyword argument is required. To specify no parameters, or to keep all
1189
+ # the default parameter values, pass an empty Hash as a request object (see above).
1190
+ #
1191
+ # @param endpoint [::Google::Cloud::ServiceDirectory::V1::Endpoint, ::Hash]
1192
+ # Required. The updated endpoint.
1193
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1194
+ # Required. List of fields to be updated in this request.
1195
+ #
1196
+ # @yield [response, operation] Access the result along with the RPC operation
1197
+ # @yieldparam response [::Google::Cloud::ServiceDirectory::V1::Endpoint]
1198
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1199
+ #
1200
+ # @return [::Google::Cloud::ServiceDirectory::V1::Endpoint]
1201
+ #
1202
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1203
+ #
1204
+ def update_endpoint request, options = nil
1205
+ raise ::ArgumentError, "request must be provided" if request.nil?
1206
+
1207
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::UpdateEndpointRequest
1208
+
1209
+ # Converts hash and nil to an options object
1210
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1211
+
1212
+ # Customize the options with defaults
1213
+ metadata = @config.rpcs.update_endpoint.metadata.to_h
1214
+
1215
+ # Set x-goog-api-client and x-goog-user-project headers
1216
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1217
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1218
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
1219
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1220
+
1221
+ header_params = {
1222
+ "endpoint.name" => request.endpoint.name
1223
+ }
1224
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1225
+ metadata[:"x-goog-request-params"] ||= request_params_header
1226
+
1227
+ options.apply_defaults timeout: @config.rpcs.update_endpoint.timeout,
1228
+ metadata: metadata,
1229
+ retry_policy: @config.rpcs.update_endpoint.retry_policy
1230
+ options.apply_defaults metadata: @config.metadata,
1231
+ retry_policy: @config.retry_policy
1232
+
1233
+ @registration_service_stub.call_rpc :update_endpoint, request, options: options do |response, operation|
1234
+ yield response, operation if block_given?
1235
+ return response
1236
+ end
1237
+ rescue ::GRPC::BadStatus => e
1238
+ raise ::Google::Cloud::Error.from_error(e)
1239
+ end
1240
+
1241
+ ##
1242
+ # Deletes a endpoint.
1243
+ #
1244
+ # @overload delete_endpoint(request, options = nil)
1245
+ # Pass arguments to `delete_endpoint` via a request object, either of type
1246
+ # {::Google::Cloud::ServiceDirectory::V1::DeleteEndpointRequest} or an equivalent Hash.
1247
+ #
1248
+ # @param request [::Google::Cloud::ServiceDirectory::V1::DeleteEndpointRequest, ::Hash]
1249
+ # A request object representing the call parameters. Required. To specify no
1250
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1251
+ # @param options [::Gapic::CallOptions, ::Hash]
1252
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1253
+ #
1254
+ # @overload delete_endpoint(name: nil)
1255
+ # Pass arguments to `delete_endpoint` via keyword arguments. Note that at
1256
+ # least one keyword argument is required. To specify no parameters, or to keep all
1257
+ # the default parameter values, pass an empty Hash as a request object (see above).
1258
+ #
1259
+ # @param name [::String]
1260
+ # Required. The name of the endpoint to delete.
1261
+ #
1262
+ # @yield [response, operation] Access the result along with the RPC operation
1263
+ # @yieldparam response [::Google::Protobuf::Empty]
1264
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1265
+ #
1266
+ # @return [::Google::Protobuf::Empty]
1267
+ #
1268
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1269
+ #
1270
+ def delete_endpoint request, options = nil
1271
+ raise ::ArgumentError, "request must be provided" if request.nil?
1272
+
1273
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1::DeleteEndpointRequest
1274
+
1275
+ # Converts hash and nil to an options object
1276
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1277
+
1278
+ # Customize the options with defaults
1279
+ metadata = @config.rpcs.delete_endpoint.metadata.to_h
1280
+
1281
+ # Set x-goog-api-client and x-goog-user-project headers
1282
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1283
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1284
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
1285
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1286
+
1287
+ header_params = {
1288
+ "name" => request.name
1289
+ }
1290
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1291
+ metadata[:"x-goog-request-params"] ||= request_params_header
1292
+
1293
+ options.apply_defaults timeout: @config.rpcs.delete_endpoint.timeout,
1294
+ metadata: metadata,
1295
+ retry_policy: @config.rpcs.delete_endpoint.retry_policy
1296
+ options.apply_defaults metadata: @config.metadata,
1297
+ retry_policy: @config.retry_policy
1298
+
1299
+ @registration_service_stub.call_rpc :delete_endpoint, request, options: options do |response, operation|
1300
+ yield response, operation if block_given?
1301
+ return response
1302
+ end
1303
+ rescue ::GRPC::BadStatus => e
1304
+ raise ::Google::Cloud::Error.from_error(e)
1305
+ end
1306
+
1307
+ ##
1308
+ # Gets the IAM Policy for a resource (namespace or service only).
1309
+ #
1310
+ # @overload get_iam_policy(request, options = nil)
1311
+ # Pass arguments to `get_iam_policy` via a request object, either of type
1312
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
1313
+ #
1314
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
1315
+ # A request object representing the call parameters. Required. To specify no
1316
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1317
+ # @param options [::Gapic::CallOptions, ::Hash]
1318
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1319
+ #
1320
+ # @overload get_iam_policy(resource: nil, options: nil)
1321
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
1322
+ # least one keyword argument is required. To specify no parameters, or to keep all
1323
+ # the default parameter values, pass an empty Hash as a request object (see above).
1324
+ #
1325
+ # @param resource [::String]
1326
+ # REQUIRED: The resource for which the policy is being requested.
1327
+ # See the operation documentation for the appropriate value for this field.
1328
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
1329
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
1330
+ # `GetIamPolicy`. This field is only used by Cloud IAM.
1331
+ #
1332
+ # @yield [response, operation] Access the result along with the RPC operation
1333
+ # @yieldparam response [::Google::Iam::V1::Policy]
1334
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1335
+ #
1336
+ # @return [::Google::Iam::V1::Policy]
1337
+ #
1338
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1339
+ #
1340
+ def get_iam_policy request, options = nil
1341
+ raise ::ArgumentError, "request must be provided" if request.nil?
1342
+
1343
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
1344
+
1345
+ # Converts hash and nil to an options object
1346
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1347
+
1348
+ # Customize the options with defaults
1349
+ metadata = @config.rpcs.get_iam_policy.metadata.to_h
1350
+
1351
+ # Set x-goog-api-client and x-goog-user-project headers
1352
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1353
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1354
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
1355
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1356
+
1357
+ header_params = {
1358
+ "resource" => request.resource
1359
+ }
1360
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1361
+ metadata[:"x-goog-request-params"] ||= request_params_header
1362
+
1363
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
1364
+ metadata: metadata,
1365
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
1366
+ options.apply_defaults metadata: @config.metadata,
1367
+ retry_policy: @config.retry_policy
1368
+
1369
+ @registration_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
1370
+ yield response, operation if block_given?
1371
+ return response
1372
+ end
1373
+ rescue ::GRPC::BadStatus => e
1374
+ raise ::Google::Cloud::Error.from_error(e)
1375
+ end
1376
+
1377
+ ##
1378
+ # Sets the IAM Policy for a resource (namespace or service only).
1379
+ #
1380
+ # @overload set_iam_policy(request, options = nil)
1381
+ # Pass arguments to `set_iam_policy` via a request object, either of type
1382
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
1383
+ #
1384
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
1385
+ # A request object representing the call parameters. Required. To specify no
1386
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1387
+ # @param options [::Gapic::CallOptions, ::Hash]
1388
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1389
+ #
1390
+ # @overload set_iam_policy(resource: nil, policy: nil)
1391
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
1392
+ # least one keyword argument is required. To specify no parameters, or to keep all
1393
+ # the default parameter values, pass an empty Hash as a request object (see above).
1394
+ #
1395
+ # @param resource [::String]
1396
+ # REQUIRED: The resource for which the policy is being specified.
1397
+ # See the operation documentation for the appropriate value for this field.
1398
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
1399
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
1400
+ # the policy is limited to a few 10s of KB. An empty policy is a
1401
+ # valid policy but certain Cloud Platform services (such as Projects)
1402
+ # might reject them.
1403
+ #
1404
+ # @yield [response, operation] Access the result along with the RPC operation
1405
+ # @yieldparam response [::Google::Iam::V1::Policy]
1406
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1407
+ #
1408
+ # @return [::Google::Iam::V1::Policy]
1409
+ #
1410
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1411
+ #
1412
+ def set_iam_policy request, options = nil
1413
+ raise ::ArgumentError, "request must be provided" if request.nil?
1414
+
1415
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
1416
+
1417
+ # Converts hash and nil to an options object
1418
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1419
+
1420
+ # Customize the options with defaults
1421
+ metadata = @config.rpcs.set_iam_policy.metadata.to_h
1422
+
1423
+ # Set x-goog-api-client and x-goog-user-project headers
1424
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1425
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1426
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
1427
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1428
+
1429
+ header_params = {
1430
+ "resource" => request.resource
1431
+ }
1432
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1433
+ metadata[:"x-goog-request-params"] ||= request_params_header
1434
+
1435
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1436
+ metadata: metadata,
1437
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
1438
+ options.apply_defaults metadata: @config.metadata,
1439
+ retry_policy: @config.retry_policy
1440
+
1441
+ @registration_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
1442
+ yield response, operation if block_given?
1443
+ return response
1444
+ end
1445
+ rescue ::GRPC::BadStatus => e
1446
+ raise ::Google::Cloud::Error.from_error(e)
1447
+ end
1448
+
1449
+ ##
1450
+ # Tests IAM permissions for a resource (namespace or service only).
1451
+ #
1452
+ # @overload test_iam_permissions(request, options = nil)
1453
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
1454
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
1455
+ #
1456
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
1457
+ # A request object representing the call parameters. Required. To specify no
1458
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1459
+ # @param options [::Gapic::CallOptions, ::Hash]
1460
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1461
+ #
1462
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
1463
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
1464
+ # least one keyword argument is required. To specify no parameters, or to keep all
1465
+ # the default parameter values, pass an empty Hash as a request object (see above).
1466
+ #
1467
+ # @param resource [::String]
1468
+ # REQUIRED: The resource for which the policy detail is being requested.
1469
+ # See the operation documentation for the appropriate value for this field.
1470
+ # @param permissions [::Array<::String>]
1471
+ # The set of permissions to check for the `resource`. Permissions with
1472
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
1473
+ # information see
1474
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
1475
+ #
1476
+ # @yield [response, operation] Access the result along with the RPC operation
1477
+ # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
1478
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1479
+ #
1480
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
1481
+ #
1482
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1483
+ #
1484
+ def test_iam_permissions request, options = nil
1485
+ raise ::ArgumentError, "request must be provided" if request.nil?
1486
+
1487
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
1488
+
1489
+ # Converts hash and nil to an options object
1490
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1491
+
1492
+ # Customize the options with defaults
1493
+ metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1494
+
1495
+ # Set x-goog-api-client and x-goog-user-project headers
1496
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1497
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1498
+ gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
1499
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1500
+
1501
+ header_params = {
1502
+ "resource" => request.resource
1503
+ }
1504
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1505
+ metadata[:"x-goog-request-params"] ||= request_params_header
1506
+
1507
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1508
+ metadata: metadata,
1509
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1510
+ options.apply_defaults metadata: @config.metadata,
1511
+ retry_policy: @config.retry_policy
1512
+
1513
+ @registration_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
1514
+ yield response, operation if block_given?
1515
+ return response
1516
+ end
1517
+ rescue ::GRPC::BadStatus => e
1518
+ raise ::Google::Cloud::Error.from_error(e)
1519
+ end
1520
+
1521
+ ##
1522
+ # Configuration class for the RegistrationService API.
1523
+ #
1524
+ # This class represents the configuration for RegistrationService,
1525
+ # providing control over timeouts, retry behavior, logging, transport
1526
+ # parameters, and other low-level controls. Certain parameters can also be
1527
+ # applied individually to specific RPCs. See
1528
+ # {::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client::Configuration::Rpcs}
1529
+ # for a list of RPCs that can be configured independently.
1530
+ #
1531
+ # Configuration can be applied globally to all clients, or to a single client
1532
+ # on construction.
1533
+ #
1534
+ # # Examples
1535
+ #
1536
+ # To modify the global config, setting the timeout for create_namespace
1537
+ # to 20 seconds, and all remaining timeouts to 10 seconds:
1538
+ #
1539
+ # ::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client.configure do |config|
1540
+ # config.timeout = 10.0
1541
+ # config.rpcs.create_namespace.timeout = 20.0
1542
+ # end
1543
+ #
1544
+ # To apply the above configuration only to a new client:
1545
+ #
1546
+ # client = ::Google::Cloud::ServiceDirectory::V1::RegistrationService::Client.new do |config|
1547
+ # config.timeout = 10.0
1548
+ # config.rpcs.create_namespace.timeout = 20.0
1549
+ # end
1550
+ #
1551
+ # @!attribute [rw] endpoint
1552
+ # The hostname or hostname:port of the service endpoint.
1553
+ # Defaults to `"servicedirectory.googleapis.com"`.
1554
+ # @return [::String]
1555
+ # @!attribute [rw] credentials
1556
+ # Credentials to send with calls. You may provide any of the following types:
1557
+ # * (`String`) The path to a service account key file in JSON format
1558
+ # * (`Hash`) A service account key as a Hash
1559
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1560
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1561
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1562
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1563
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1564
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1565
+ # * (`nil`) indicating no credentials
1566
+ # @return [::Object]
1567
+ # @!attribute [rw] scope
1568
+ # The OAuth scopes
1569
+ # @return [::Array<::String>]
1570
+ # @!attribute [rw] lib_name
1571
+ # The library name as recorded in instrumentation and logging
1572
+ # @return [::String]
1573
+ # @!attribute [rw] lib_version
1574
+ # The library version as recorded in instrumentation and logging
1575
+ # @return [::String]
1576
+ # @!attribute [rw] channel_args
1577
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1578
+ # `GRPC::Core::Channel` object is provided as the credential.
1579
+ # @return [::Hash]
1580
+ # @!attribute [rw] interceptors
1581
+ # An array of interceptors that are run before calls are executed.
1582
+ # @return [::Array<::GRPC::ClientInterceptor>]
1583
+ # @!attribute [rw] timeout
1584
+ # The call timeout in seconds.
1585
+ # @return [::Numeric]
1586
+ # @!attribute [rw] metadata
1587
+ # Additional gRPC headers to be sent with the call.
1588
+ # @return [::Hash{::Symbol=>::String}]
1589
+ # @!attribute [rw] retry_policy
1590
+ # The retry policy. The value is a hash with the following keys:
1591
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1592
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1593
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1594
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1595
+ # trigger a retry.
1596
+ # @return [::Hash]
1597
+ # @!attribute [rw] quota_project
1598
+ # A separate project against which to charge quota.
1599
+ # @return [::String]
1600
+ #
1601
+ class Configuration
1602
+ extend ::Gapic::Config
1603
+
1604
+ config_attr :endpoint, "servicedirectory.googleapis.com", ::String
1605
+ config_attr :credentials, nil do |value|
1606
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1607
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1608
+ allowed.any? { |klass| klass === value }
1609
+ end
1610
+ config_attr :scope, nil, ::String, ::Array, nil
1611
+ config_attr :lib_name, nil, ::String, nil
1612
+ config_attr :lib_version, nil, ::String, nil
1613
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
1614
+ config_attr :interceptors, nil, ::Array, nil
1615
+ config_attr :timeout, nil, ::Numeric, nil
1616
+ config_attr :metadata, nil, ::Hash, nil
1617
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1618
+ config_attr :quota_project, nil, ::String, nil
1619
+
1620
+ # @private
1621
+ def initialize parent_config = nil
1622
+ @parent_config = parent_config unless parent_config.nil?
1623
+
1624
+ yield self if block_given?
1625
+ end
1626
+
1627
+ ##
1628
+ # Configurations for individual RPCs
1629
+ # @return [Rpcs]
1630
+ #
1631
+ def rpcs
1632
+ @rpcs ||= begin
1633
+ parent_rpcs = nil
1634
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
1635
+ Rpcs.new parent_rpcs
1636
+ end
1637
+ end
1638
+
1639
+ ##
1640
+ # Configuration RPC class for the RegistrationService API.
1641
+ #
1642
+ # Includes fields providing the configuration for each RPC in this service.
1643
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1644
+ # the following configuration fields:
1645
+ #
1646
+ # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
1647
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1648
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1649
+ # include the following keys:
1650
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1651
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1652
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1653
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1654
+ # trigger a retry.
1655
+ #
1656
+ class Rpcs
1657
+ ##
1658
+ # RPC-specific configuration for `create_namespace`
1659
+ # @return [::Gapic::Config::Method]
1660
+ #
1661
+ attr_reader :create_namespace
1662
+ ##
1663
+ # RPC-specific configuration for `list_namespaces`
1664
+ # @return [::Gapic::Config::Method]
1665
+ #
1666
+ attr_reader :list_namespaces
1667
+ ##
1668
+ # RPC-specific configuration for `get_namespace`
1669
+ # @return [::Gapic::Config::Method]
1670
+ #
1671
+ attr_reader :get_namespace
1672
+ ##
1673
+ # RPC-specific configuration for `update_namespace`
1674
+ # @return [::Gapic::Config::Method]
1675
+ #
1676
+ attr_reader :update_namespace
1677
+ ##
1678
+ # RPC-specific configuration for `delete_namespace`
1679
+ # @return [::Gapic::Config::Method]
1680
+ #
1681
+ attr_reader :delete_namespace
1682
+ ##
1683
+ # RPC-specific configuration for `create_service`
1684
+ # @return [::Gapic::Config::Method]
1685
+ #
1686
+ attr_reader :create_service
1687
+ ##
1688
+ # RPC-specific configuration for `list_services`
1689
+ # @return [::Gapic::Config::Method]
1690
+ #
1691
+ attr_reader :list_services
1692
+ ##
1693
+ # RPC-specific configuration for `get_service`
1694
+ # @return [::Gapic::Config::Method]
1695
+ #
1696
+ attr_reader :get_service
1697
+ ##
1698
+ # RPC-specific configuration for `update_service`
1699
+ # @return [::Gapic::Config::Method]
1700
+ #
1701
+ attr_reader :update_service
1702
+ ##
1703
+ # RPC-specific configuration for `delete_service`
1704
+ # @return [::Gapic::Config::Method]
1705
+ #
1706
+ attr_reader :delete_service
1707
+ ##
1708
+ # RPC-specific configuration for `create_endpoint`
1709
+ # @return [::Gapic::Config::Method]
1710
+ #
1711
+ attr_reader :create_endpoint
1712
+ ##
1713
+ # RPC-specific configuration for `list_endpoints`
1714
+ # @return [::Gapic::Config::Method]
1715
+ #
1716
+ attr_reader :list_endpoints
1717
+ ##
1718
+ # RPC-specific configuration for `get_endpoint`
1719
+ # @return [::Gapic::Config::Method]
1720
+ #
1721
+ attr_reader :get_endpoint
1722
+ ##
1723
+ # RPC-specific configuration for `update_endpoint`
1724
+ # @return [::Gapic::Config::Method]
1725
+ #
1726
+ attr_reader :update_endpoint
1727
+ ##
1728
+ # RPC-specific configuration for `delete_endpoint`
1729
+ # @return [::Gapic::Config::Method]
1730
+ #
1731
+ attr_reader :delete_endpoint
1732
+ ##
1733
+ # RPC-specific configuration for `get_iam_policy`
1734
+ # @return [::Gapic::Config::Method]
1735
+ #
1736
+ attr_reader :get_iam_policy
1737
+ ##
1738
+ # RPC-specific configuration for `set_iam_policy`
1739
+ # @return [::Gapic::Config::Method]
1740
+ #
1741
+ attr_reader :set_iam_policy
1742
+ ##
1743
+ # RPC-specific configuration for `test_iam_permissions`
1744
+ # @return [::Gapic::Config::Method]
1745
+ #
1746
+ attr_reader :test_iam_permissions
1747
+
1748
+ # @private
1749
+ def initialize parent_rpcs = nil
1750
+ create_namespace_config = parent_rpcs&.create_namespace if parent_rpcs&.respond_to? :create_namespace
1751
+ @create_namespace = ::Gapic::Config::Method.new create_namespace_config
1752
+ list_namespaces_config = parent_rpcs&.list_namespaces if parent_rpcs&.respond_to? :list_namespaces
1753
+ @list_namespaces = ::Gapic::Config::Method.new list_namespaces_config
1754
+ get_namespace_config = parent_rpcs&.get_namespace if parent_rpcs&.respond_to? :get_namespace
1755
+ @get_namespace = ::Gapic::Config::Method.new get_namespace_config
1756
+ update_namespace_config = parent_rpcs&.update_namespace if parent_rpcs&.respond_to? :update_namespace
1757
+ @update_namespace = ::Gapic::Config::Method.new update_namespace_config
1758
+ delete_namespace_config = parent_rpcs&.delete_namespace if parent_rpcs&.respond_to? :delete_namespace
1759
+ @delete_namespace = ::Gapic::Config::Method.new delete_namespace_config
1760
+ create_service_config = parent_rpcs&.create_service if parent_rpcs&.respond_to? :create_service
1761
+ @create_service = ::Gapic::Config::Method.new create_service_config
1762
+ list_services_config = parent_rpcs&.list_services if parent_rpcs&.respond_to? :list_services
1763
+ @list_services = ::Gapic::Config::Method.new list_services_config
1764
+ get_service_config = parent_rpcs&.get_service if parent_rpcs&.respond_to? :get_service
1765
+ @get_service = ::Gapic::Config::Method.new get_service_config
1766
+ update_service_config = parent_rpcs&.update_service if parent_rpcs&.respond_to? :update_service
1767
+ @update_service = ::Gapic::Config::Method.new update_service_config
1768
+ delete_service_config = parent_rpcs&.delete_service if parent_rpcs&.respond_to? :delete_service
1769
+ @delete_service = ::Gapic::Config::Method.new delete_service_config
1770
+ create_endpoint_config = parent_rpcs&.create_endpoint if parent_rpcs&.respond_to? :create_endpoint
1771
+ @create_endpoint = ::Gapic::Config::Method.new create_endpoint_config
1772
+ list_endpoints_config = parent_rpcs&.list_endpoints if parent_rpcs&.respond_to? :list_endpoints
1773
+ @list_endpoints = ::Gapic::Config::Method.new list_endpoints_config
1774
+ get_endpoint_config = parent_rpcs&.get_endpoint if parent_rpcs&.respond_to? :get_endpoint
1775
+ @get_endpoint = ::Gapic::Config::Method.new get_endpoint_config
1776
+ update_endpoint_config = parent_rpcs&.update_endpoint if parent_rpcs&.respond_to? :update_endpoint
1777
+ @update_endpoint = ::Gapic::Config::Method.new update_endpoint_config
1778
+ delete_endpoint_config = parent_rpcs&.delete_endpoint if parent_rpcs&.respond_to? :delete_endpoint
1779
+ @delete_endpoint = ::Gapic::Config::Method.new delete_endpoint_config
1780
+ get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy
1781
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1782
+ set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy
1783
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1784
+ test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
1785
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1786
+
1787
+ yield self if block_given?
1788
+ end
1789
+ end
1790
+ end
1791
+ end
1792
+ end
1793
+ end
1794
+ end
1795
+ end
1796
+ end