google-cloud-telco_automation-v1 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/telco_automation/v1/bindings_override.rb +102 -0
  6. data/lib/google/cloud/telco_automation/v1/rest.rb +38 -0
  7. data/lib/google/cloud/telco_automation/v1/telco_automation/client.rb +3971 -0
  8. data/lib/google/cloud/telco_automation/v1/telco_automation/credentials.rb +47 -0
  9. data/lib/google/cloud/telco_automation/v1/telco_automation/operations.rb +801 -0
  10. data/lib/google/cloud/telco_automation/v1/telco_automation/paths.rb +172 -0
  11. data/lib/google/cloud/telco_automation/v1/telco_automation/rest/client.rb +3699 -0
  12. data/lib/google/cloud/telco_automation/v1/telco_automation/rest/operations.rb +895 -0
  13. data/lib/google/cloud/telco_automation/v1/telco_automation/rest/service_stub.rb +2200 -0
  14. data/lib/google/cloud/telco_automation/v1/telco_automation/rest.rb +58 -0
  15. data/lib/google/cloud/telco_automation/v1/telco_automation.rb +60 -0
  16. data/lib/google/cloud/telco_automation/v1/version.rb +7 -2
  17. data/lib/google/cloud/telco_automation/v1.rb +45 -0
  18. data/lib/google/cloud/telcoautomation/v1/telcoautomation_pb.rb +131 -0
  19. data/lib/google/cloud/telcoautomation/v1/telcoautomation_services_pb.rb +126 -0
  20. data/lib/google-cloud-telco_automation-v1.rb +21 -0
  21. data/proto_docs/README.md +4 -0
  22. data/proto_docs/google/api/client.rb +395 -0
  23. data/proto_docs/google/api/field_behavior.rb +85 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. data/proto_docs/google/api/resource.rb +222 -0
  26. data/proto_docs/google/cloud/telcoautomation/v1/telcoautomation.rb +1534 -0
  27. data/proto_docs/google/longrunning/operations.rb +164 -0
  28. data/proto_docs/google/protobuf/any.rb +144 -0
  29. data/proto_docs/google/protobuf/duration.rb +98 -0
  30. data/proto_docs/google/protobuf/empty.rb +34 -0
  31. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  32. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  33. data/proto_docs/google/rpc/status.rb +48 -0
  34. metadata +209 -13
@@ -0,0 +1,3971 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/telcoautomation/v1/telcoautomation_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module TelcoAutomation
26
+ module V1
27
+ module TelcoAutomation
28
+ ##
29
+ # Client for the TelcoAutomation service.
30
+ #
31
+ # TelcoAutomation Service manages the control plane cluster a.k.a.
32
+ # Orchestration Cluster (GKE cluster with config controller) of TNA. It also
33
+ # exposes blueprint APIs which manages the lifecycle of blueprints that control
34
+ # the infrastructure setup (e.g GDCE clusters) and deployment of network
35
+ # functions.
36
+ #
37
+ class Client
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "telcoautomation.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :telco_automation_stub
45
+
46
+ ##
47
+ # Configure the TelcoAutomation Client class.
48
+ #
49
+ # See {::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all TelcoAutomation clients
55
+ # ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "TelcoAutomation", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config
76
+ end
77
+ yield @configure if block_given?
78
+ @configure
79
+ end
80
+
81
+ ##
82
+ # Configure the TelcoAutomation Client instance.
83
+ #
84
+ # The configuration is set to the derived mode, meaning that values can be changed,
85
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
86
+ # should be made on {Client.configure}.
87
+ #
88
+ # See {::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client::Configuration}
89
+ # for a description of the configuration fields.
90
+ #
91
+ # @yield [config] Configure the Client client.
92
+ # @yieldparam config [Client::Configuration]
93
+ #
94
+ # @return [Client::Configuration]
95
+ #
96
+ def configure
97
+ yield @config if block_given?
98
+ @config
99
+ end
100
+
101
+ ##
102
+ # The effective universe domain
103
+ #
104
+ # @return [String]
105
+ #
106
+ def universe_domain
107
+ @telco_automation_stub.universe_domain
108
+ end
109
+
110
+ ##
111
+ # Create a new TelcoAutomation client object.
112
+ #
113
+ # @example
114
+ #
115
+ # # Create a client using the default configuration
116
+ # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
117
+ #
118
+ # # Create a client using a custom configuration
119
+ # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config|
120
+ # config.timeout = 10.0
121
+ # end
122
+ #
123
+ # @yield [config] Configure the TelcoAutomation client.
124
+ # @yieldparam config [Client::Configuration]
125
+ #
126
+ def initialize
127
+ # These require statements are intentionally placed here to initialize
128
+ # the gRPC module only when it's required.
129
+ # See https://github.com/googleapis/toolkit/issues/446
130
+ require "gapic/grpc"
131
+ require "google/cloud/telcoautomation/v1/telcoautomation_services_pb"
132
+
133
+ # Create the configuration object
134
+ @config = Configuration.new Client.configure
135
+
136
+ # Yield the configuration if needed
137
+ yield @config if block_given?
138
+
139
+ # Create credentials
140
+ credentials = @config.credentials
141
+ # Use self-signed JWT if the endpoint is unchanged from default,
142
+ # but only if the default endpoint does not have a region prefix.
143
+ enable_self_signed_jwt = @config.endpoint.nil? ||
144
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
145
+ !@config.endpoint.split(".").first.include?("-"))
146
+ credentials ||= Credentials.default scope: @config.scope,
147
+ enable_self_signed_jwt: enable_self_signed_jwt
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
149
+ credentials = Credentials.new credentials, scope: @config.scope
150
+ end
151
+ @quota_project_id = @config.quota_project
152
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
153
+
154
+ @operations_client = Operations.new do |config|
155
+ config.credentials = credentials
156
+ config.quota_project = @quota_project_id
157
+ config.endpoint = @config.endpoint
158
+ config.universe_domain = @config.universe_domain
159
+ end
160
+
161
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
162
+ config.credentials = credentials
163
+ config.quota_project = @quota_project_id
164
+ config.endpoint = @config.endpoint
165
+ config.universe_domain = @config.universe_domain
166
+ end
167
+
168
+ @telco_automation_stub = ::Gapic::ServiceStub.new(
169
+ ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Stub,
170
+ credentials: credentials,
171
+ endpoint: @config.endpoint,
172
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
173
+ universe_domain: @config.universe_domain,
174
+ channel_args: @config.channel_args,
175
+ interceptors: @config.interceptors,
176
+ channel_pool_config: @config.channel_pool
177
+ )
178
+ end
179
+
180
+ ##
181
+ # Get the associated client for long-running operations.
182
+ #
183
+ # @return [::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Operations]
184
+ #
185
+ attr_reader :operations_client
186
+
187
+ ##
188
+ # Get the associated client for mix-in of the Locations.
189
+ #
190
+ # @return [Google::Cloud::Location::Locations::Client]
191
+ #
192
+ attr_reader :location_client
193
+
194
+ # Service calls
195
+
196
+ ##
197
+ # Lists OrchestrationClusters in a given project and location.
198
+ #
199
+ # @overload list_orchestration_clusters(request, options = nil)
200
+ # Pass arguments to `list_orchestration_clusters` via a request object, either of type
201
+ # {::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest} or an equivalent Hash.
202
+ #
203
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest, ::Hash]
204
+ # A request object representing the call parameters. Required. To specify no
205
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
206
+ # @param options [::Gapic::CallOptions, ::Hash]
207
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
208
+ #
209
+ # @overload list_orchestration_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
210
+ # Pass arguments to `list_orchestration_clusters` via keyword arguments. Note that at
211
+ # least one keyword argument is required. To specify no parameters, or to keep all
212
+ # the default parameter values, pass an empty Hash as a request object (see above).
213
+ #
214
+ # @param parent [::String]
215
+ # Required. Parent value for ListOrchestrationClustersRequest
216
+ # @param page_size [::Integer]
217
+ # Requested page size. Server may return fewer items than requested.
218
+ # If unspecified, server will pick an appropriate default.
219
+ # @param page_token [::String]
220
+ # A token identifying a page of results the server should return.
221
+ # @param filter [::String]
222
+ # Filtering results.
223
+ # @param order_by [::String]
224
+ # Hint for how to order the results.
225
+ #
226
+ # @yield [response, operation] Access the result along with the RPC operation
227
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster>]
228
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
229
+ #
230
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster>]
231
+ #
232
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
233
+ #
234
+ # @example Basic example
235
+ # require "google/cloud/telco_automation/v1"
236
+ #
237
+ # # Create a client object. The client can be reused for multiple calls.
238
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
239
+ #
240
+ # # Create a request. To set request fields, pass in keyword arguments.
241
+ # request = Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.new
242
+ #
243
+ # # Call the list_orchestration_clusters method.
244
+ # result = client.list_orchestration_clusters request
245
+ #
246
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
247
+ # # over elements, and API calls will be issued to fetch pages as needed.
248
+ # result.each do |item|
249
+ # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster.
250
+ # p item
251
+ # end
252
+ #
253
+ def list_orchestration_clusters request, options = nil
254
+ raise ::ArgumentError, "request must be provided" if request.nil?
255
+
256
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest
257
+
258
+ # Converts hash and nil to an options object
259
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
260
+
261
+ # Customize the options with defaults
262
+ metadata = @config.rpcs.list_orchestration_clusters.metadata.to_h
263
+
264
+ # Set x-goog-api-client and x-goog-user-project headers
265
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
266
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
267
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
268
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
269
+
270
+ header_params = {}
271
+ if request.parent
272
+ header_params["parent"] = request.parent
273
+ end
274
+
275
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
276
+ metadata[:"x-goog-request-params"] ||= request_params_header
277
+
278
+ options.apply_defaults timeout: @config.rpcs.list_orchestration_clusters.timeout,
279
+ metadata: metadata,
280
+ retry_policy: @config.rpcs.list_orchestration_clusters.retry_policy
281
+
282
+ options.apply_defaults timeout: @config.timeout,
283
+ metadata: @config.metadata,
284
+ retry_policy: @config.retry_policy
285
+
286
+ @telco_automation_stub.call_rpc :list_orchestration_clusters, request, options: options do |response, operation|
287
+ response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_orchestration_clusters, request, response, operation, options
288
+ yield response, operation if block_given?
289
+ return response
290
+ end
291
+ rescue ::GRPC::BadStatus => e
292
+ raise ::Google::Cloud::Error.from_error(e)
293
+ end
294
+
295
+ ##
296
+ # Gets details of a single OrchestrationCluster.
297
+ #
298
+ # @overload get_orchestration_cluster(request, options = nil)
299
+ # Pass arguments to `get_orchestration_cluster` via a request object, either of type
300
+ # {::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest} or an equivalent Hash.
301
+ #
302
+ # @param request [::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest, ::Hash]
303
+ # A request object representing the call parameters. Required. To specify no
304
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
305
+ # @param options [::Gapic::CallOptions, ::Hash]
306
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
307
+ #
308
+ # @overload get_orchestration_cluster(name: nil)
309
+ # Pass arguments to `get_orchestration_cluster` via keyword arguments. Note that at
310
+ # least one keyword argument is required. To specify no parameters, or to keep all
311
+ # the default parameter values, pass an empty Hash as a request object (see above).
312
+ #
313
+ # @param name [::String]
314
+ # Required. Name of the resource
315
+ #
316
+ # @yield [response, operation] Access the result along with the RPC operation
317
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster]
318
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
319
+ #
320
+ # @return [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster]
321
+ #
322
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
323
+ #
324
+ # @example Basic example
325
+ # require "google/cloud/telco_automation/v1"
326
+ #
327
+ # # Create a client object. The client can be reused for multiple calls.
328
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
329
+ #
330
+ # # Create a request. To set request fields, pass in keyword arguments.
331
+ # request = Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new
332
+ #
333
+ # # Call the get_orchestration_cluster method.
334
+ # result = client.get_orchestration_cluster request
335
+ #
336
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::OrchestrationCluster.
337
+ # p result
338
+ #
339
+ def get_orchestration_cluster request, options = nil
340
+ raise ::ArgumentError, "request must be provided" if request.nil?
341
+
342
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest
343
+
344
+ # Converts hash and nil to an options object
345
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
346
+
347
+ # Customize the options with defaults
348
+ metadata = @config.rpcs.get_orchestration_cluster.metadata.to_h
349
+
350
+ # Set x-goog-api-client and x-goog-user-project headers
351
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
352
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
353
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
354
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
355
+
356
+ header_params = {}
357
+ if request.name
358
+ header_params["name"] = request.name
359
+ end
360
+
361
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
362
+ metadata[:"x-goog-request-params"] ||= request_params_header
363
+
364
+ options.apply_defaults timeout: @config.rpcs.get_orchestration_cluster.timeout,
365
+ metadata: metadata,
366
+ retry_policy: @config.rpcs.get_orchestration_cluster.retry_policy
367
+
368
+ options.apply_defaults timeout: @config.timeout,
369
+ metadata: @config.metadata,
370
+ retry_policy: @config.retry_policy
371
+
372
+ @telco_automation_stub.call_rpc :get_orchestration_cluster, request, options: options do |response, operation|
373
+ yield response, operation if block_given?
374
+ return response
375
+ end
376
+ rescue ::GRPC::BadStatus => e
377
+ raise ::Google::Cloud::Error.from_error(e)
378
+ end
379
+
380
+ ##
381
+ # Creates a new OrchestrationCluster in a given project and location.
382
+ #
383
+ # @overload create_orchestration_cluster(request, options = nil)
384
+ # Pass arguments to `create_orchestration_cluster` via a request object, either of type
385
+ # {::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest} or an equivalent Hash.
386
+ #
387
+ # @param request [::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest, ::Hash]
388
+ # A request object representing the call parameters. Required. To specify no
389
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
390
+ # @param options [::Gapic::CallOptions, ::Hash]
391
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
392
+ #
393
+ # @overload create_orchestration_cluster(parent: nil, orchestration_cluster_id: nil, orchestration_cluster: nil, request_id: nil)
394
+ # Pass arguments to `create_orchestration_cluster` via keyword arguments. Note that at
395
+ # least one keyword argument is required. To specify no parameters, or to keep all
396
+ # the default parameter values, pass an empty Hash as a request object (see above).
397
+ #
398
+ # @param parent [::String]
399
+ # Required. Value for parent.
400
+ # @param orchestration_cluster_id [::String]
401
+ # Required. Id of the requesting object
402
+ # If auto-generating Id server-side, remove this field and
403
+ # orchestration_cluster_id from the method_signature of Create RPC
404
+ # @param orchestration_cluster [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster, ::Hash]
405
+ # Required. The resource being created
406
+ # @param request_id [::String]
407
+ # Optional. An optional request ID to identify requests. Specify a unique
408
+ # request ID so that if you must retry your request, the server will know to
409
+ # ignore the request if it has already been completed. The server will
410
+ # guarantee that for at least 60 minutes since the first request.
411
+ #
412
+ # For example, consider a situation where you make an initial request and
413
+ # the request times out. If you make the request again with the same request
414
+ # ID, the server can check if original operation with the same request ID
415
+ # was received, and if so, will ignore the second request. This prevents
416
+ # clients from accidentally creating duplicate commitments.
417
+ #
418
+ # The request ID must be a valid UUID with the exception that zero UUID is
419
+ # not supported (00000000-0000-0000-0000-000000000000).
420
+ #
421
+ # @yield [response, operation] Access the result along with the RPC operation
422
+ # @yieldparam response [::Gapic::Operation]
423
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
424
+ #
425
+ # @return [::Gapic::Operation]
426
+ #
427
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
428
+ #
429
+ # @example Basic example
430
+ # require "google/cloud/telco_automation/v1"
431
+ #
432
+ # # Create a client object. The client can be reused for multiple calls.
433
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
434
+ #
435
+ # # Create a request. To set request fields, pass in keyword arguments.
436
+ # request = Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new
437
+ #
438
+ # # Call the create_orchestration_cluster method.
439
+ # result = client.create_orchestration_cluster request
440
+ #
441
+ # # The returned object is of type Gapic::Operation. You can use it to
442
+ # # check the status of an operation, cancel it, or wait for results.
443
+ # # Here is how to wait for a response.
444
+ # result.wait_until_done! timeout: 60
445
+ # if result.response?
446
+ # p result.response
447
+ # else
448
+ # puts "No response received."
449
+ # end
450
+ #
451
+ def create_orchestration_cluster request, options = nil
452
+ raise ::ArgumentError, "request must be provided" if request.nil?
453
+
454
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest
455
+
456
+ # Converts hash and nil to an options object
457
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
458
+
459
+ # Customize the options with defaults
460
+ metadata = @config.rpcs.create_orchestration_cluster.metadata.to_h
461
+
462
+ # Set x-goog-api-client and x-goog-user-project headers
463
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
464
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
465
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
466
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
467
+
468
+ header_params = {}
469
+ if request.parent
470
+ header_params["parent"] = request.parent
471
+ end
472
+
473
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
474
+ metadata[:"x-goog-request-params"] ||= request_params_header
475
+
476
+ options.apply_defaults timeout: @config.rpcs.create_orchestration_cluster.timeout,
477
+ metadata: metadata,
478
+ retry_policy: @config.rpcs.create_orchestration_cluster.retry_policy
479
+
480
+ options.apply_defaults timeout: @config.timeout,
481
+ metadata: @config.metadata,
482
+ retry_policy: @config.retry_policy
483
+
484
+ @telco_automation_stub.call_rpc :create_orchestration_cluster, request, options: options do |response, operation|
485
+ response = ::Gapic::Operation.new response, @operations_client, options: options
486
+ yield response, operation if block_given?
487
+ return response
488
+ end
489
+ rescue ::GRPC::BadStatus => e
490
+ raise ::Google::Cloud::Error.from_error(e)
491
+ end
492
+
493
+ ##
494
+ # Deletes a single OrchestrationCluster.
495
+ #
496
+ # @overload delete_orchestration_cluster(request, options = nil)
497
+ # Pass arguments to `delete_orchestration_cluster` via a request object, either of type
498
+ # {::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest} or an equivalent Hash.
499
+ #
500
+ # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest, ::Hash]
501
+ # A request object representing the call parameters. Required. To specify no
502
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
503
+ # @param options [::Gapic::CallOptions, ::Hash]
504
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
505
+ #
506
+ # @overload delete_orchestration_cluster(name: nil, request_id: nil)
507
+ # Pass arguments to `delete_orchestration_cluster` via keyword arguments. Note that at
508
+ # least one keyword argument is required. To specify no parameters, or to keep all
509
+ # the default parameter values, pass an empty Hash as a request object (see above).
510
+ #
511
+ # @param name [::String]
512
+ # Required. Name of the resource
513
+ # @param request_id [::String]
514
+ # Optional. An optional request ID to identify requests. Specify a unique
515
+ # request ID so that if you must retry your request, the server will know to
516
+ # ignore the request if it has already been completed. The server will
517
+ # guarantee that for at least 60 minutes after the first request.
518
+ #
519
+ # For example, consider a situation where you make an initial request and
520
+ # the request times out. If you make the request again with the same request
521
+ # ID, the server can check if original operation with the same request ID
522
+ # was received, and if so, will ignore the second request. This prevents
523
+ # clients from accidentally creating duplicate commitments.
524
+ #
525
+ # The request ID must be a valid UUID with the exception that zero UUID is
526
+ # not supported (00000000-0000-0000-0000-000000000000).
527
+ #
528
+ # @yield [response, operation] Access the result along with the RPC operation
529
+ # @yieldparam response [::Gapic::Operation]
530
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
531
+ #
532
+ # @return [::Gapic::Operation]
533
+ #
534
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
535
+ #
536
+ # @example Basic example
537
+ # require "google/cloud/telco_automation/v1"
538
+ #
539
+ # # Create a client object. The client can be reused for multiple calls.
540
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
541
+ #
542
+ # # Create a request. To set request fields, pass in keyword arguments.
543
+ # request = Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.new
544
+ #
545
+ # # Call the delete_orchestration_cluster method.
546
+ # result = client.delete_orchestration_cluster request
547
+ #
548
+ # # The returned object is of type Gapic::Operation. You can use it to
549
+ # # check the status of an operation, cancel it, or wait for results.
550
+ # # Here is how to wait for a response.
551
+ # result.wait_until_done! timeout: 60
552
+ # if result.response?
553
+ # p result.response
554
+ # else
555
+ # puts "No response received."
556
+ # end
557
+ #
558
+ def delete_orchestration_cluster request, options = nil
559
+ raise ::ArgumentError, "request must be provided" if request.nil?
560
+
561
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest
562
+
563
+ # Converts hash and nil to an options object
564
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
565
+
566
+ # Customize the options with defaults
567
+ metadata = @config.rpcs.delete_orchestration_cluster.metadata.to_h
568
+
569
+ # Set x-goog-api-client and x-goog-user-project headers
570
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
571
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
572
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
573
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
574
+
575
+ header_params = {}
576
+ if request.name
577
+ header_params["name"] = request.name
578
+ end
579
+
580
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
581
+ metadata[:"x-goog-request-params"] ||= request_params_header
582
+
583
+ options.apply_defaults timeout: @config.rpcs.delete_orchestration_cluster.timeout,
584
+ metadata: metadata,
585
+ retry_policy: @config.rpcs.delete_orchestration_cluster.retry_policy
586
+
587
+ options.apply_defaults timeout: @config.timeout,
588
+ metadata: @config.metadata,
589
+ retry_policy: @config.retry_policy
590
+
591
+ @telco_automation_stub.call_rpc :delete_orchestration_cluster, request, options: options do |response, operation|
592
+ response = ::Gapic::Operation.new response, @operations_client, options: options
593
+ yield response, operation if block_given?
594
+ return response
595
+ end
596
+ rescue ::GRPC::BadStatus => e
597
+ raise ::Google::Cloud::Error.from_error(e)
598
+ end
599
+
600
+ ##
601
+ # Lists EdgeSlms in a given project and location.
602
+ #
603
+ # @overload list_edge_slms(request, options = nil)
604
+ # Pass arguments to `list_edge_slms` via a request object, either of type
605
+ # {::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest} or an equivalent Hash.
606
+ #
607
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest, ::Hash]
608
+ # A request object representing the call parameters. Required. To specify no
609
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
610
+ # @param options [::Gapic::CallOptions, ::Hash]
611
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
612
+ #
613
+ # @overload list_edge_slms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
614
+ # Pass arguments to `list_edge_slms` via keyword arguments. Note that at
615
+ # least one keyword argument is required. To specify no parameters, or to keep all
616
+ # the default parameter values, pass an empty Hash as a request object (see above).
617
+ #
618
+ # @param parent [::String]
619
+ # Required. Parent value for ListEdgeSlmsRequest
620
+ # @param page_size [::Integer]
621
+ # Requested page size. Server may return fewer items than requested.
622
+ # If unspecified, server will pick an appropriate default.
623
+ # @param page_token [::String]
624
+ # A token identifying a page of results the server should return.
625
+ # @param filter [::String]
626
+ # Filtering results
627
+ # @param order_by [::String]
628
+ # Hint for how to order the results
629
+ #
630
+ # @yield [response, operation] Access the result along with the RPC operation
631
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::EdgeSlm>]
632
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
633
+ #
634
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::EdgeSlm>]
635
+ #
636
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
637
+ #
638
+ # @example Basic example
639
+ # require "google/cloud/telco_automation/v1"
640
+ #
641
+ # # Create a client object. The client can be reused for multiple calls.
642
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
643
+ #
644
+ # # Create a request. To set request fields, pass in keyword arguments.
645
+ # request = Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.new
646
+ #
647
+ # # Call the list_edge_slms method.
648
+ # result = client.list_edge_slms request
649
+ #
650
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
651
+ # # over elements, and API calls will be issued to fetch pages as needed.
652
+ # result.each do |item|
653
+ # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::EdgeSlm.
654
+ # p item
655
+ # end
656
+ #
657
+ def list_edge_slms request, options = nil
658
+ raise ::ArgumentError, "request must be provided" if request.nil?
659
+
660
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest
661
+
662
+ # Converts hash and nil to an options object
663
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
664
+
665
+ # Customize the options with defaults
666
+ metadata = @config.rpcs.list_edge_slms.metadata.to_h
667
+
668
+ # Set x-goog-api-client and x-goog-user-project headers
669
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
670
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
671
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
672
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
673
+
674
+ header_params = {}
675
+ if request.parent
676
+ header_params["parent"] = request.parent
677
+ end
678
+
679
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
680
+ metadata[:"x-goog-request-params"] ||= request_params_header
681
+
682
+ options.apply_defaults timeout: @config.rpcs.list_edge_slms.timeout,
683
+ metadata: metadata,
684
+ retry_policy: @config.rpcs.list_edge_slms.retry_policy
685
+
686
+ options.apply_defaults timeout: @config.timeout,
687
+ metadata: @config.metadata,
688
+ retry_policy: @config.retry_policy
689
+
690
+ @telco_automation_stub.call_rpc :list_edge_slms, request, options: options do |response, operation|
691
+ response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_edge_slms, request, response, operation, options
692
+ yield response, operation if block_given?
693
+ return response
694
+ end
695
+ rescue ::GRPC::BadStatus => e
696
+ raise ::Google::Cloud::Error.from_error(e)
697
+ end
698
+
699
+ ##
700
+ # Gets details of a single EdgeSlm.
701
+ #
702
+ # @overload get_edge_slm(request, options = nil)
703
+ # Pass arguments to `get_edge_slm` via a request object, either of type
704
+ # {::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest} or an equivalent Hash.
705
+ #
706
+ # @param request [::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest, ::Hash]
707
+ # A request object representing the call parameters. Required. To specify no
708
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
709
+ # @param options [::Gapic::CallOptions, ::Hash]
710
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
711
+ #
712
+ # @overload get_edge_slm(name: nil)
713
+ # Pass arguments to `get_edge_slm` via keyword arguments. Note that at
714
+ # least one keyword argument is required. To specify no parameters, or to keep all
715
+ # the default parameter values, pass an empty Hash as a request object (see above).
716
+ #
717
+ # @param name [::String]
718
+ # Required. Name of the resource
719
+ #
720
+ # @yield [response, operation] Access the result along with the RPC operation
721
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::EdgeSlm]
722
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
723
+ #
724
+ # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm]
725
+ #
726
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
727
+ #
728
+ # @example Basic example
729
+ # require "google/cloud/telco_automation/v1"
730
+ #
731
+ # # Create a client object. The client can be reused for multiple calls.
732
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
733
+ #
734
+ # # Create a request. To set request fields, pass in keyword arguments.
735
+ # request = Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new
736
+ #
737
+ # # Call the get_edge_slm method.
738
+ # result = client.get_edge_slm request
739
+ #
740
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::EdgeSlm.
741
+ # p result
742
+ #
743
+ def get_edge_slm request, options = nil
744
+ raise ::ArgumentError, "request must be provided" if request.nil?
745
+
746
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest
747
+
748
+ # Converts hash and nil to an options object
749
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
750
+
751
+ # Customize the options with defaults
752
+ metadata = @config.rpcs.get_edge_slm.metadata.to_h
753
+
754
+ # Set x-goog-api-client and x-goog-user-project headers
755
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
756
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
757
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
758
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
759
+
760
+ header_params = {}
761
+ if request.name
762
+ header_params["name"] = request.name
763
+ end
764
+
765
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
766
+ metadata[:"x-goog-request-params"] ||= request_params_header
767
+
768
+ options.apply_defaults timeout: @config.rpcs.get_edge_slm.timeout,
769
+ metadata: metadata,
770
+ retry_policy: @config.rpcs.get_edge_slm.retry_policy
771
+
772
+ options.apply_defaults timeout: @config.timeout,
773
+ metadata: @config.metadata,
774
+ retry_policy: @config.retry_policy
775
+
776
+ @telco_automation_stub.call_rpc :get_edge_slm, request, options: options do |response, operation|
777
+ yield response, operation if block_given?
778
+ return response
779
+ end
780
+ rescue ::GRPC::BadStatus => e
781
+ raise ::Google::Cloud::Error.from_error(e)
782
+ end
783
+
784
+ ##
785
+ # Creates a new EdgeSlm in a given project and location.
786
+ #
787
+ # @overload create_edge_slm(request, options = nil)
788
+ # Pass arguments to `create_edge_slm` via a request object, either of type
789
+ # {::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest} or an equivalent Hash.
790
+ #
791
+ # @param request [::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest, ::Hash]
792
+ # A request object representing the call parameters. Required. To specify no
793
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
794
+ # @param options [::Gapic::CallOptions, ::Hash]
795
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
796
+ #
797
+ # @overload create_edge_slm(parent: nil, edge_slm_id: nil, edge_slm: nil, request_id: nil)
798
+ # Pass arguments to `create_edge_slm` via keyword arguments. Note that at
799
+ # least one keyword argument is required. To specify no parameters, or to keep all
800
+ # the default parameter values, pass an empty Hash as a request object (see above).
801
+ #
802
+ # @param parent [::String]
803
+ # Required. Value for parent.
804
+ # @param edge_slm_id [::String]
805
+ # Required. Id of the requesting object
806
+ # If auto-generating Id server-side, remove this field and
807
+ # edge_slm_id from the method_signature of Create RPC
808
+ # @param edge_slm [::Google::Cloud::TelcoAutomation::V1::EdgeSlm, ::Hash]
809
+ # Required. The resource being created
810
+ # @param request_id [::String]
811
+ # Optional. An optional request ID to identify requests. Specify a unique
812
+ # request ID so that if you must retry your request, the server will know to
813
+ # ignore the request if it has already been completed. The server will
814
+ # guarantee that for at least 60 minutes since the first request.
815
+ #
816
+ # For example, consider a situation where you make an initial request and
817
+ # the request times out. If you make the request again with the same request
818
+ # ID, the server can check if original operation with the same request ID
819
+ # was received, and if so, will ignore the second request. This prevents
820
+ # clients from accidentally creating duplicate commitments.
821
+ #
822
+ # The request ID must be a valid UUID with the exception that zero UUID is
823
+ # not supported (00000000-0000-0000-0000-000000000000).
824
+ #
825
+ # @yield [response, operation] Access the result along with the RPC operation
826
+ # @yieldparam response [::Gapic::Operation]
827
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
828
+ #
829
+ # @return [::Gapic::Operation]
830
+ #
831
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
832
+ #
833
+ # @example Basic example
834
+ # require "google/cloud/telco_automation/v1"
835
+ #
836
+ # # Create a client object. The client can be reused for multiple calls.
837
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
838
+ #
839
+ # # Create a request. To set request fields, pass in keyword arguments.
840
+ # request = Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new
841
+ #
842
+ # # Call the create_edge_slm method.
843
+ # result = client.create_edge_slm request
844
+ #
845
+ # # The returned object is of type Gapic::Operation. You can use it to
846
+ # # check the status of an operation, cancel it, or wait for results.
847
+ # # Here is how to wait for a response.
848
+ # result.wait_until_done! timeout: 60
849
+ # if result.response?
850
+ # p result.response
851
+ # else
852
+ # puts "No response received."
853
+ # end
854
+ #
855
+ def create_edge_slm request, options = nil
856
+ raise ::ArgumentError, "request must be provided" if request.nil?
857
+
858
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest
859
+
860
+ # Converts hash and nil to an options object
861
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
862
+
863
+ # Customize the options with defaults
864
+ metadata = @config.rpcs.create_edge_slm.metadata.to_h
865
+
866
+ # Set x-goog-api-client and x-goog-user-project headers
867
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
868
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
869
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
870
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
871
+
872
+ header_params = {}
873
+ if request.parent
874
+ header_params["parent"] = request.parent
875
+ end
876
+
877
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
878
+ metadata[:"x-goog-request-params"] ||= request_params_header
879
+
880
+ options.apply_defaults timeout: @config.rpcs.create_edge_slm.timeout,
881
+ metadata: metadata,
882
+ retry_policy: @config.rpcs.create_edge_slm.retry_policy
883
+
884
+ options.apply_defaults timeout: @config.timeout,
885
+ metadata: @config.metadata,
886
+ retry_policy: @config.retry_policy
887
+
888
+ @telco_automation_stub.call_rpc :create_edge_slm, request, options: options do |response, operation|
889
+ response = ::Gapic::Operation.new response, @operations_client, options: options
890
+ yield response, operation if block_given?
891
+ return response
892
+ end
893
+ rescue ::GRPC::BadStatus => e
894
+ raise ::Google::Cloud::Error.from_error(e)
895
+ end
896
+
897
+ ##
898
+ # Deletes a single EdgeSlm.
899
+ #
900
+ # @overload delete_edge_slm(request, options = nil)
901
+ # Pass arguments to `delete_edge_slm` via a request object, either of type
902
+ # {::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest} or an equivalent Hash.
903
+ #
904
+ # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest, ::Hash]
905
+ # A request object representing the call parameters. Required. To specify no
906
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
907
+ # @param options [::Gapic::CallOptions, ::Hash]
908
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
909
+ #
910
+ # @overload delete_edge_slm(name: nil, request_id: nil)
911
+ # Pass arguments to `delete_edge_slm` via keyword arguments. Note that at
912
+ # least one keyword argument is required. To specify no parameters, or to keep all
913
+ # the default parameter values, pass an empty Hash as a request object (see above).
914
+ #
915
+ # @param name [::String]
916
+ # Required. Name of the resource
917
+ # @param request_id [::String]
918
+ # Optional. An optional request ID to identify requests. Specify a unique
919
+ # request ID so that if you must retry your request, the server will know to
920
+ # ignore the request if it has already been completed. The server will
921
+ # guarantee that for at least 60 minutes after the first request.
922
+ #
923
+ # For example, consider a situation where you make an initial request and
924
+ # the request times out. If you make the request again with the same request
925
+ # ID, the server can check if original operation with the same request ID
926
+ # was received, and if so, will ignore the second request. This prevents
927
+ # clients from accidentally creating duplicate commitments.
928
+ #
929
+ # The request ID must be a valid UUID with the exception that zero UUID is
930
+ # not supported (00000000-0000-0000-0000-000000000000).
931
+ #
932
+ # @yield [response, operation] Access the result along with the RPC operation
933
+ # @yieldparam response [::Gapic::Operation]
934
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
935
+ #
936
+ # @return [::Gapic::Operation]
937
+ #
938
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
939
+ #
940
+ # @example Basic example
941
+ # require "google/cloud/telco_automation/v1"
942
+ #
943
+ # # Create a client object. The client can be reused for multiple calls.
944
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
945
+ #
946
+ # # Create a request. To set request fields, pass in keyword arguments.
947
+ # request = Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.new
948
+ #
949
+ # # Call the delete_edge_slm method.
950
+ # result = client.delete_edge_slm request
951
+ #
952
+ # # The returned object is of type Gapic::Operation. You can use it to
953
+ # # check the status of an operation, cancel it, or wait for results.
954
+ # # Here is how to wait for a response.
955
+ # result.wait_until_done! timeout: 60
956
+ # if result.response?
957
+ # p result.response
958
+ # else
959
+ # puts "No response received."
960
+ # end
961
+ #
962
+ def delete_edge_slm request, options = nil
963
+ raise ::ArgumentError, "request must be provided" if request.nil?
964
+
965
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest
966
+
967
+ # Converts hash and nil to an options object
968
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
969
+
970
+ # Customize the options with defaults
971
+ metadata = @config.rpcs.delete_edge_slm.metadata.to_h
972
+
973
+ # Set x-goog-api-client and x-goog-user-project headers
974
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
975
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
976
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
977
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
978
+
979
+ header_params = {}
980
+ if request.name
981
+ header_params["name"] = request.name
982
+ end
983
+
984
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
985
+ metadata[:"x-goog-request-params"] ||= request_params_header
986
+
987
+ options.apply_defaults timeout: @config.rpcs.delete_edge_slm.timeout,
988
+ metadata: metadata,
989
+ retry_policy: @config.rpcs.delete_edge_slm.retry_policy
990
+
991
+ options.apply_defaults timeout: @config.timeout,
992
+ metadata: @config.metadata,
993
+ retry_policy: @config.retry_policy
994
+
995
+ @telco_automation_stub.call_rpc :delete_edge_slm, request, options: options do |response, operation|
996
+ response = ::Gapic::Operation.new response, @operations_client, options: options
997
+ yield response, operation if block_given?
998
+ return response
999
+ end
1000
+ rescue ::GRPC::BadStatus => e
1001
+ raise ::Google::Cloud::Error.from_error(e)
1002
+ end
1003
+
1004
+ ##
1005
+ # Creates a blueprint.
1006
+ #
1007
+ # @overload create_blueprint(request, options = nil)
1008
+ # Pass arguments to `create_blueprint` via a request object, either of type
1009
+ # {::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest} or an equivalent Hash.
1010
+ #
1011
+ # @param request [::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest, ::Hash]
1012
+ # A request object representing the call parameters. Required. To specify no
1013
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1014
+ # @param options [::Gapic::CallOptions, ::Hash]
1015
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1016
+ #
1017
+ # @overload create_blueprint(parent: nil, blueprint_id: nil, blueprint: nil)
1018
+ # Pass arguments to `create_blueprint` via keyword arguments. Note that at
1019
+ # least one keyword argument is required. To specify no parameters, or to keep all
1020
+ # the default parameter values, pass an empty Hash as a request object (see above).
1021
+ #
1022
+ # @param parent [::String]
1023
+ # Required. The name of parent resource.
1024
+ # Format should be -
1025
+ # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}".
1026
+ # @param blueprint_id [::String]
1027
+ # Optional. The name of the blueprint.
1028
+ # @param blueprint [::Google::Cloud::TelcoAutomation::V1::Blueprint, ::Hash]
1029
+ # Required. The `Blueprint` to create.
1030
+ #
1031
+ # @yield [response, operation] Access the result along with the RPC operation
1032
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1033
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1034
+ #
1035
+ # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1036
+ #
1037
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1038
+ #
1039
+ # @example Basic example
1040
+ # require "google/cloud/telco_automation/v1"
1041
+ #
1042
+ # # Create a client object. The client can be reused for multiple calls.
1043
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
1044
+ #
1045
+ # # Create a request. To set request fields, pass in keyword arguments.
1046
+ # request = Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new
1047
+ #
1048
+ # # Call the create_blueprint method.
1049
+ # result = client.create_blueprint request
1050
+ #
1051
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint.
1052
+ # p result
1053
+ #
1054
+ def create_blueprint request, options = nil
1055
+ raise ::ArgumentError, "request must be provided" if request.nil?
1056
+
1057
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest
1058
+
1059
+ # Converts hash and nil to an options object
1060
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1061
+
1062
+ # Customize the options with defaults
1063
+ metadata = @config.rpcs.create_blueprint.metadata.to_h
1064
+
1065
+ # Set x-goog-api-client and x-goog-user-project headers
1066
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1067
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1068
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
1069
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1070
+
1071
+ header_params = {}
1072
+ if request.parent
1073
+ header_params["parent"] = request.parent
1074
+ end
1075
+
1076
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1077
+ metadata[:"x-goog-request-params"] ||= request_params_header
1078
+
1079
+ options.apply_defaults timeout: @config.rpcs.create_blueprint.timeout,
1080
+ metadata: metadata,
1081
+ retry_policy: @config.rpcs.create_blueprint.retry_policy
1082
+
1083
+ options.apply_defaults timeout: @config.timeout,
1084
+ metadata: @config.metadata,
1085
+ retry_policy: @config.retry_policy
1086
+
1087
+ @telco_automation_stub.call_rpc :create_blueprint, request, options: options do |response, operation|
1088
+ yield response, operation if block_given?
1089
+ return response
1090
+ end
1091
+ rescue ::GRPC::BadStatus => e
1092
+ raise ::Google::Cloud::Error.from_error(e)
1093
+ end
1094
+
1095
+ ##
1096
+ # Updates a blueprint.
1097
+ #
1098
+ # @overload update_blueprint(request, options = nil)
1099
+ # Pass arguments to `update_blueprint` via a request object, either of type
1100
+ # {::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest} or an equivalent Hash.
1101
+ #
1102
+ # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest, ::Hash]
1103
+ # A request object representing the call parameters. Required. To specify no
1104
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1105
+ # @param options [::Gapic::CallOptions, ::Hash]
1106
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1107
+ #
1108
+ # @overload update_blueprint(blueprint: nil, update_mask: nil)
1109
+ # Pass arguments to `update_blueprint` via keyword arguments. Note that at
1110
+ # least one keyword argument is required. To specify no parameters, or to keep all
1111
+ # the default parameter values, pass an empty Hash as a request object (see above).
1112
+ #
1113
+ # @param blueprint [::Google::Cloud::TelcoAutomation::V1::Blueprint, ::Hash]
1114
+ # Required. The `blueprint` to update.
1115
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1116
+ # Required. Update mask is used to specify the fields to be overwritten in
1117
+ # the `blueprint` resource by the update.
1118
+ #
1119
+ # @yield [response, operation] Access the result along with the RPC operation
1120
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1121
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1122
+ #
1123
+ # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1124
+ #
1125
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1126
+ #
1127
+ # @example Basic example
1128
+ # require "google/cloud/telco_automation/v1"
1129
+ #
1130
+ # # Create a client object. The client can be reused for multiple calls.
1131
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
1132
+ #
1133
+ # # Create a request. To set request fields, pass in keyword arguments.
1134
+ # request = Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new
1135
+ #
1136
+ # # Call the update_blueprint method.
1137
+ # result = client.update_blueprint request
1138
+ #
1139
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint.
1140
+ # p result
1141
+ #
1142
+ def update_blueprint request, options = nil
1143
+ raise ::ArgumentError, "request must be provided" if request.nil?
1144
+
1145
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest
1146
+
1147
+ # Converts hash and nil to an options object
1148
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1149
+
1150
+ # Customize the options with defaults
1151
+ metadata = @config.rpcs.update_blueprint.metadata.to_h
1152
+
1153
+ # Set x-goog-api-client and x-goog-user-project headers
1154
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1155
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1156
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
1157
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1158
+
1159
+ header_params = {}
1160
+ if request.blueprint&.name
1161
+ header_params["blueprint.name"] = request.blueprint.name
1162
+ end
1163
+
1164
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1165
+ metadata[:"x-goog-request-params"] ||= request_params_header
1166
+
1167
+ options.apply_defaults timeout: @config.rpcs.update_blueprint.timeout,
1168
+ metadata: metadata,
1169
+ retry_policy: @config.rpcs.update_blueprint.retry_policy
1170
+
1171
+ options.apply_defaults timeout: @config.timeout,
1172
+ metadata: @config.metadata,
1173
+ retry_policy: @config.retry_policy
1174
+
1175
+ @telco_automation_stub.call_rpc :update_blueprint, request, options: options do |response, operation|
1176
+ yield response, operation if block_given?
1177
+ return response
1178
+ end
1179
+ rescue ::GRPC::BadStatus => e
1180
+ raise ::Google::Cloud::Error.from_error(e)
1181
+ end
1182
+
1183
+ ##
1184
+ # Returns the requested blueprint.
1185
+ #
1186
+ # @overload get_blueprint(request, options = nil)
1187
+ # Pass arguments to `get_blueprint` via a request object, either of type
1188
+ # {::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest} or an equivalent Hash.
1189
+ #
1190
+ # @param request [::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest, ::Hash]
1191
+ # A request object representing the call parameters. Required. To specify no
1192
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1193
+ # @param options [::Gapic::CallOptions, ::Hash]
1194
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1195
+ #
1196
+ # @overload get_blueprint(name: nil, view: nil)
1197
+ # Pass arguments to `get_blueprint` via keyword arguments. Note that at
1198
+ # least one keyword argument is required. To specify no parameters, or to keep all
1199
+ # the default parameter values, pass an empty Hash as a request object (see above).
1200
+ #
1201
+ # @param name [::String]
1202
+ # Required. The name of the blueprint.
1203
+ # Case 1: If the name provided in the request is
1204
+ # \\{blueprint_id}@\\{revision_id}, then the revision with revision_id will be
1205
+ # returned. Case 2: If the name provided in the request is \\{blueprint}, then
1206
+ # the current state of the blueprint is returned.
1207
+ # @param view [::Google::Cloud::TelcoAutomation::V1::BlueprintView]
1208
+ # Optional. Defines the type of view of the blueprint.
1209
+ # When field is not present BLUEPRINT_VIEW_BASIC is considered as default.
1210
+ #
1211
+ # @yield [response, operation] Access the result along with the RPC operation
1212
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1213
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1214
+ #
1215
+ # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1216
+ #
1217
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1218
+ #
1219
+ # @example Basic example
1220
+ # require "google/cloud/telco_automation/v1"
1221
+ #
1222
+ # # Create a client object. The client can be reused for multiple calls.
1223
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
1224
+ #
1225
+ # # Create a request. To set request fields, pass in keyword arguments.
1226
+ # request = Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new
1227
+ #
1228
+ # # Call the get_blueprint method.
1229
+ # result = client.get_blueprint request
1230
+ #
1231
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint.
1232
+ # p result
1233
+ #
1234
+ def get_blueprint request, options = nil
1235
+ raise ::ArgumentError, "request must be provided" if request.nil?
1236
+
1237
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest
1238
+
1239
+ # Converts hash and nil to an options object
1240
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1241
+
1242
+ # Customize the options with defaults
1243
+ metadata = @config.rpcs.get_blueprint.metadata.to_h
1244
+
1245
+ # Set x-goog-api-client and x-goog-user-project headers
1246
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1247
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1248
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
1249
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1250
+
1251
+ header_params = {}
1252
+ if request.name
1253
+ header_params["name"] = request.name
1254
+ end
1255
+
1256
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1257
+ metadata[:"x-goog-request-params"] ||= request_params_header
1258
+
1259
+ options.apply_defaults timeout: @config.rpcs.get_blueprint.timeout,
1260
+ metadata: metadata,
1261
+ retry_policy: @config.rpcs.get_blueprint.retry_policy
1262
+
1263
+ options.apply_defaults timeout: @config.timeout,
1264
+ metadata: @config.metadata,
1265
+ retry_policy: @config.retry_policy
1266
+
1267
+ @telco_automation_stub.call_rpc :get_blueprint, request, options: options do |response, operation|
1268
+ yield response, operation if block_given?
1269
+ return response
1270
+ end
1271
+ rescue ::GRPC::BadStatus => e
1272
+ raise ::Google::Cloud::Error.from_error(e)
1273
+ end
1274
+
1275
+ ##
1276
+ # Deletes a blueprint and all its revisions.
1277
+ #
1278
+ # @overload delete_blueprint(request, options = nil)
1279
+ # Pass arguments to `delete_blueprint` via a request object, either of type
1280
+ # {::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest} or an equivalent Hash.
1281
+ #
1282
+ # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest, ::Hash]
1283
+ # A request object representing the call parameters. Required. To specify no
1284
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1285
+ # @param options [::Gapic::CallOptions, ::Hash]
1286
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1287
+ #
1288
+ # @overload delete_blueprint(name: nil)
1289
+ # Pass arguments to `delete_blueprint` via keyword arguments. Note that at
1290
+ # least one keyword argument is required. To specify no parameters, or to keep all
1291
+ # the default parameter values, pass an empty Hash as a request object (see above).
1292
+ #
1293
+ # @param name [::String]
1294
+ # Required. The name of blueprint to delete.
1295
+ # Blueprint name should be in the format \\{blueprint_id}, if
1296
+ # \\{blueprint_id}@\\{revision_id} is passed then the API throws invalid
1297
+ # argument.
1298
+ #
1299
+ # @yield [response, operation] Access the result along with the RPC operation
1300
+ # @yieldparam response [::Google::Protobuf::Empty]
1301
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1302
+ #
1303
+ # @return [::Google::Protobuf::Empty]
1304
+ #
1305
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1306
+ #
1307
+ # @example Basic example
1308
+ # require "google/cloud/telco_automation/v1"
1309
+ #
1310
+ # # Create a client object. The client can be reused for multiple calls.
1311
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
1312
+ #
1313
+ # # Create a request. To set request fields, pass in keyword arguments.
1314
+ # request = Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new
1315
+ #
1316
+ # # Call the delete_blueprint method.
1317
+ # result = client.delete_blueprint request
1318
+ #
1319
+ # # The returned object is of type Google::Protobuf::Empty.
1320
+ # p result
1321
+ #
1322
+ def delete_blueprint request, options = nil
1323
+ raise ::ArgumentError, "request must be provided" if request.nil?
1324
+
1325
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest
1326
+
1327
+ # Converts hash and nil to an options object
1328
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1329
+
1330
+ # Customize the options with defaults
1331
+ metadata = @config.rpcs.delete_blueprint.metadata.to_h
1332
+
1333
+ # Set x-goog-api-client and x-goog-user-project headers
1334
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1335
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1336
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
1337
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1338
+
1339
+ header_params = {}
1340
+ if request.name
1341
+ header_params["name"] = request.name
1342
+ end
1343
+
1344
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1345
+ metadata[:"x-goog-request-params"] ||= request_params_header
1346
+
1347
+ options.apply_defaults timeout: @config.rpcs.delete_blueprint.timeout,
1348
+ metadata: metadata,
1349
+ retry_policy: @config.rpcs.delete_blueprint.retry_policy
1350
+
1351
+ options.apply_defaults timeout: @config.timeout,
1352
+ metadata: @config.metadata,
1353
+ retry_policy: @config.retry_policy
1354
+
1355
+ @telco_automation_stub.call_rpc :delete_blueprint, request, options: options do |response, operation|
1356
+ yield response, operation if block_given?
1357
+ return response
1358
+ end
1359
+ rescue ::GRPC::BadStatus => e
1360
+ raise ::Google::Cloud::Error.from_error(e)
1361
+ end
1362
+
1363
+ ##
1364
+ # List all blueprints.
1365
+ #
1366
+ # @overload list_blueprints(request, options = nil)
1367
+ # Pass arguments to `list_blueprints` via a request object, either of type
1368
+ # {::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest} or an equivalent Hash.
1369
+ #
1370
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest, ::Hash]
1371
+ # A request object representing the call parameters. Required. To specify no
1372
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1373
+ # @param options [::Gapic::CallOptions, ::Hash]
1374
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1375
+ #
1376
+ # @overload list_blueprints(parent: nil, filter: nil, page_size: nil, page_token: nil)
1377
+ # Pass arguments to `list_blueprints` via keyword arguments. Note that at
1378
+ # least one keyword argument is required. To specify no parameters, or to keep all
1379
+ # the default parameter values, pass an empty Hash as a request object (see above).
1380
+ #
1381
+ # @param parent [::String]
1382
+ # Required. The name of parent orchestration cluster resource.
1383
+ # Format should be -
1384
+ # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}".
1385
+ # @param filter [::String]
1386
+ # Optional. Filtering only supports equality on blueprint state.
1387
+ # It should be in the form: "state = DRAFT". `OR` operator can be used to
1388
+ # get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED".
1389
+ # @param page_size [::Integer]
1390
+ # Optional. The maximum number of blueprints to return per page.
1391
+ # @param page_token [::String]
1392
+ # Optional. The page token, received from a previous ListBlueprints call.
1393
+ # It can be provided to retrieve the subsequent page.
1394
+ #
1395
+ # @yield [response, operation] Access the result along with the RPC operation
1396
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>]
1397
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1398
+ #
1399
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>]
1400
+ #
1401
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1402
+ #
1403
+ # @example Basic example
1404
+ # require "google/cloud/telco_automation/v1"
1405
+ #
1406
+ # # Create a client object. The client can be reused for multiple calls.
1407
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
1408
+ #
1409
+ # # Create a request. To set request fields, pass in keyword arguments.
1410
+ # request = Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.new
1411
+ #
1412
+ # # Call the list_blueprints method.
1413
+ # result = client.list_blueprints request
1414
+ #
1415
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1416
+ # # over elements, and API calls will be issued to fetch pages as needed.
1417
+ # result.each do |item|
1418
+ # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint.
1419
+ # p item
1420
+ # end
1421
+ #
1422
+ def list_blueprints request, options = nil
1423
+ raise ::ArgumentError, "request must be provided" if request.nil?
1424
+
1425
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest
1426
+
1427
+ # Converts hash and nil to an options object
1428
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1429
+
1430
+ # Customize the options with defaults
1431
+ metadata = @config.rpcs.list_blueprints.metadata.to_h
1432
+
1433
+ # Set x-goog-api-client and x-goog-user-project headers
1434
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1435
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1436
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
1437
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1438
+
1439
+ header_params = {}
1440
+ if request.parent
1441
+ header_params["parent"] = request.parent
1442
+ end
1443
+
1444
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1445
+ metadata[:"x-goog-request-params"] ||= request_params_header
1446
+
1447
+ options.apply_defaults timeout: @config.rpcs.list_blueprints.timeout,
1448
+ metadata: metadata,
1449
+ retry_policy: @config.rpcs.list_blueprints.retry_policy
1450
+
1451
+ options.apply_defaults timeout: @config.timeout,
1452
+ metadata: @config.metadata,
1453
+ retry_policy: @config.retry_policy
1454
+
1455
+ @telco_automation_stub.call_rpc :list_blueprints, request, options: options do |response, operation|
1456
+ response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_blueprints, request, response, operation, options
1457
+ yield response, operation if block_given?
1458
+ return response
1459
+ end
1460
+ rescue ::GRPC::BadStatus => e
1461
+ raise ::Google::Cloud::Error.from_error(e)
1462
+ end
1463
+
1464
+ ##
1465
+ # Approves a blueprint and commits a new revision.
1466
+ #
1467
+ # @overload approve_blueprint(request, options = nil)
1468
+ # Pass arguments to `approve_blueprint` via a request object, either of type
1469
+ # {::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest} or an equivalent Hash.
1470
+ #
1471
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest, ::Hash]
1472
+ # A request object representing the call parameters. Required. To specify no
1473
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1474
+ # @param options [::Gapic::CallOptions, ::Hash]
1475
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1476
+ #
1477
+ # @overload approve_blueprint(name: nil)
1478
+ # Pass arguments to `approve_blueprint` via keyword arguments. Note that at
1479
+ # least one keyword argument is required. To specify no parameters, or to keep all
1480
+ # the default parameter values, pass an empty Hash as a request object (see above).
1481
+ #
1482
+ # @param name [::String]
1483
+ # Required. The name of the blueprint to approve. The blueprint must be in
1484
+ # Proposed state. A new revision is committed on approval.
1485
+ #
1486
+ # @yield [response, operation] Access the result along with the RPC operation
1487
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1488
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1489
+ #
1490
+ # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1491
+ #
1492
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1493
+ #
1494
+ # @example Basic example
1495
+ # require "google/cloud/telco_automation/v1"
1496
+ #
1497
+ # # Create a client object. The client can be reused for multiple calls.
1498
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
1499
+ #
1500
+ # # Create a request. To set request fields, pass in keyword arguments.
1501
+ # request = Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new
1502
+ #
1503
+ # # Call the approve_blueprint method.
1504
+ # result = client.approve_blueprint request
1505
+ #
1506
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint.
1507
+ # p result
1508
+ #
1509
+ def approve_blueprint request, options = nil
1510
+ raise ::ArgumentError, "request must be provided" if request.nil?
1511
+
1512
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest
1513
+
1514
+ # Converts hash and nil to an options object
1515
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1516
+
1517
+ # Customize the options with defaults
1518
+ metadata = @config.rpcs.approve_blueprint.metadata.to_h
1519
+
1520
+ # Set x-goog-api-client and x-goog-user-project headers
1521
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1522
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1523
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
1524
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1525
+
1526
+ header_params = {}
1527
+ if request.name
1528
+ header_params["name"] = request.name
1529
+ end
1530
+
1531
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1532
+ metadata[:"x-goog-request-params"] ||= request_params_header
1533
+
1534
+ options.apply_defaults timeout: @config.rpcs.approve_blueprint.timeout,
1535
+ metadata: metadata,
1536
+ retry_policy: @config.rpcs.approve_blueprint.retry_policy
1537
+
1538
+ options.apply_defaults timeout: @config.timeout,
1539
+ metadata: @config.metadata,
1540
+ retry_policy: @config.retry_policy
1541
+
1542
+ @telco_automation_stub.call_rpc :approve_blueprint, request, options: options do |response, operation|
1543
+ yield response, operation if block_given?
1544
+ return response
1545
+ end
1546
+ rescue ::GRPC::BadStatus => e
1547
+ raise ::Google::Cloud::Error.from_error(e)
1548
+ end
1549
+
1550
+ ##
1551
+ # Proposes a blueprint for approval of changes.
1552
+ #
1553
+ # @overload propose_blueprint(request, options = nil)
1554
+ # Pass arguments to `propose_blueprint` via a request object, either of type
1555
+ # {::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest} or an equivalent Hash.
1556
+ #
1557
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest, ::Hash]
1558
+ # A request object representing the call parameters. Required. To specify no
1559
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1560
+ # @param options [::Gapic::CallOptions, ::Hash]
1561
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1562
+ #
1563
+ # @overload propose_blueprint(name: nil)
1564
+ # Pass arguments to `propose_blueprint` via keyword arguments. Note that at
1565
+ # least one keyword argument is required. To specify no parameters, or to keep all
1566
+ # the default parameter values, pass an empty Hash as a request object (see above).
1567
+ #
1568
+ # @param name [::String]
1569
+ # Required. The name of the blueprint being proposed.
1570
+ #
1571
+ # @yield [response, operation] Access the result along with the RPC operation
1572
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1573
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1574
+ #
1575
+ # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1576
+ #
1577
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1578
+ #
1579
+ # @example Basic example
1580
+ # require "google/cloud/telco_automation/v1"
1581
+ #
1582
+ # # Create a client object. The client can be reused for multiple calls.
1583
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
1584
+ #
1585
+ # # Create a request. To set request fields, pass in keyword arguments.
1586
+ # request = Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new
1587
+ #
1588
+ # # Call the propose_blueprint method.
1589
+ # result = client.propose_blueprint request
1590
+ #
1591
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint.
1592
+ # p result
1593
+ #
1594
+ def propose_blueprint request, options = nil
1595
+ raise ::ArgumentError, "request must be provided" if request.nil?
1596
+
1597
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest
1598
+
1599
+ # Converts hash and nil to an options object
1600
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1601
+
1602
+ # Customize the options with defaults
1603
+ metadata = @config.rpcs.propose_blueprint.metadata.to_h
1604
+
1605
+ # Set x-goog-api-client and x-goog-user-project headers
1606
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1607
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1608
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
1609
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1610
+
1611
+ header_params = {}
1612
+ if request.name
1613
+ header_params["name"] = request.name
1614
+ end
1615
+
1616
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1617
+ metadata[:"x-goog-request-params"] ||= request_params_header
1618
+
1619
+ options.apply_defaults timeout: @config.rpcs.propose_blueprint.timeout,
1620
+ metadata: metadata,
1621
+ retry_policy: @config.rpcs.propose_blueprint.retry_policy
1622
+
1623
+ options.apply_defaults timeout: @config.timeout,
1624
+ metadata: @config.metadata,
1625
+ retry_policy: @config.retry_policy
1626
+
1627
+ @telco_automation_stub.call_rpc :propose_blueprint, request, options: options do |response, operation|
1628
+ yield response, operation if block_given?
1629
+ return response
1630
+ end
1631
+ rescue ::GRPC::BadStatus => e
1632
+ raise ::Google::Cloud::Error.from_error(e)
1633
+ end
1634
+
1635
+ ##
1636
+ # Rejects a blueprint revision proposal and flips it back to Draft state.
1637
+ #
1638
+ # @overload reject_blueprint(request, options = nil)
1639
+ # Pass arguments to `reject_blueprint` via a request object, either of type
1640
+ # {::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest} or an equivalent Hash.
1641
+ #
1642
+ # @param request [::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest, ::Hash]
1643
+ # A request object representing the call parameters. Required. To specify no
1644
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1645
+ # @param options [::Gapic::CallOptions, ::Hash]
1646
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1647
+ #
1648
+ # @overload reject_blueprint(name: nil)
1649
+ # Pass arguments to `reject_blueprint` via keyword arguments. Note that at
1650
+ # least one keyword argument is required. To specify no parameters, or to keep all
1651
+ # the default parameter values, pass an empty Hash as a request object (see above).
1652
+ #
1653
+ # @param name [::String]
1654
+ # Required. The name of the blueprint being rejected.
1655
+ #
1656
+ # @yield [response, operation] Access the result along with the RPC operation
1657
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1658
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1659
+ #
1660
+ # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint]
1661
+ #
1662
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1663
+ #
1664
+ # @example Basic example
1665
+ # require "google/cloud/telco_automation/v1"
1666
+ #
1667
+ # # Create a client object. The client can be reused for multiple calls.
1668
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
1669
+ #
1670
+ # # Create a request. To set request fields, pass in keyword arguments.
1671
+ # request = Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new
1672
+ #
1673
+ # # Call the reject_blueprint method.
1674
+ # result = client.reject_blueprint request
1675
+ #
1676
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint.
1677
+ # p result
1678
+ #
1679
+ def reject_blueprint request, options = nil
1680
+ raise ::ArgumentError, "request must be provided" if request.nil?
1681
+
1682
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest
1683
+
1684
+ # Converts hash and nil to an options object
1685
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1686
+
1687
+ # Customize the options with defaults
1688
+ metadata = @config.rpcs.reject_blueprint.metadata.to_h
1689
+
1690
+ # Set x-goog-api-client and x-goog-user-project headers
1691
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1692
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1693
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
1694
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1695
+
1696
+ header_params = {}
1697
+ if request.name
1698
+ header_params["name"] = request.name
1699
+ end
1700
+
1701
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1702
+ metadata[:"x-goog-request-params"] ||= request_params_header
1703
+
1704
+ options.apply_defaults timeout: @config.rpcs.reject_blueprint.timeout,
1705
+ metadata: metadata,
1706
+ retry_policy: @config.rpcs.reject_blueprint.retry_policy
1707
+
1708
+ options.apply_defaults timeout: @config.timeout,
1709
+ metadata: @config.metadata,
1710
+ retry_policy: @config.retry_policy
1711
+
1712
+ @telco_automation_stub.call_rpc :reject_blueprint, request, options: options do |response, operation|
1713
+ yield response, operation if block_given?
1714
+ return response
1715
+ end
1716
+ rescue ::GRPC::BadStatus => e
1717
+ raise ::Google::Cloud::Error.from_error(e)
1718
+ end
1719
+
1720
+ ##
1721
+ # List blueprint revisions of a given blueprint.
1722
+ #
1723
+ # @overload list_blueprint_revisions(request, options = nil)
1724
+ # Pass arguments to `list_blueprint_revisions` via a request object, either of type
1725
+ # {::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest} or an equivalent Hash.
1726
+ #
1727
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest, ::Hash]
1728
+ # A request object representing the call parameters. Required. To specify no
1729
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1730
+ # @param options [::Gapic::CallOptions, ::Hash]
1731
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1732
+ #
1733
+ # @overload list_blueprint_revisions(name: nil, page_size: nil, page_token: nil)
1734
+ # Pass arguments to `list_blueprint_revisions` via keyword arguments. Note that at
1735
+ # least one keyword argument is required. To specify no parameters, or to keep all
1736
+ # the default parameter values, pass an empty Hash as a request object (see above).
1737
+ #
1738
+ # @param name [::String]
1739
+ # Required. The name of the blueprint to list revisions for.
1740
+ # @param page_size [::Integer]
1741
+ # The maximum number of revisions to return per page.
1742
+ # @param page_token [::String]
1743
+ # The page token, received from a previous ListBlueprintRevisions call
1744
+ # It can be provided to retrieve the subsequent page.
1745
+ #
1746
+ # @yield [response, operation] Access the result along with the RPC operation
1747
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>]
1748
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1749
+ #
1750
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>]
1751
+ #
1752
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1753
+ #
1754
+ # @example Basic example
1755
+ # require "google/cloud/telco_automation/v1"
1756
+ #
1757
+ # # Create a client object. The client can be reused for multiple calls.
1758
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
1759
+ #
1760
+ # # Create a request. To set request fields, pass in keyword arguments.
1761
+ # request = Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new
1762
+ #
1763
+ # # Call the list_blueprint_revisions method.
1764
+ # result = client.list_blueprint_revisions request
1765
+ #
1766
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1767
+ # # over elements, and API calls will be issued to fetch pages as needed.
1768
+ # result.each do |item|
1769
+ # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint.
1770
+ # p item
1771
+ # end
1772
+ #
1773
+ def list_blueprint_revisions request, options = nil
1774
+ raise ::ArgumentError, "request must be provided" if request.nil?
1775
+
1776
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest
1777
+
1778
+ # Converts hash and nil to an options object
1779
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1780
+
1781
+ # Customize the options with defaults
1782
+ metadata = @config.rpcs.list_blueprint_revisions.metadata.to_h
1783
+
1784
+ # Set x-goog-api-client and x-goog-user-project headers
1785
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1786
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1787
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
1788
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1789
+
1790
+ header_params = {}
1791
+ if request.name
1792
+ header_params["name"] = request.name
1793
+ end
1794
+
1795
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1796
+ metadata[:"x-goog-request-params"] ||= request_params_header
1797
+
1798
+ options.apply_defaults timeout: @config.rpcs.list_blueprint_revisions.timeout,
1799
+ metadata: metadata,
1800
+ retry_policy: @config.rpcs.list_blueprint_revisions.retry_policy
1801
+
1802
+ options.apply_defaults timeout: @config.timeout,
1803
+ metadata: @config.metadata,
1804
+ retry_policy: @config.retry_policy
1805
+
1806
+ @telco_automation_stub.call_rpc :list_blueprint_revisions, request, options: options do |response, operation|
1807
+ response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_blueprint_revisions, request, response, operation, options
1808
+ yield response, operation if block_given?
1809
+ return response
1810
+ end
1811
+ rescue ::GRPC::BadStatus => e
1812
+ raise ::Google::Cloud::Error.from_error(e)
1813
+ end
1814
+
1815
+ ##
1816
+ # Searches across blueprint revisions.
1817
+ #
1818
+ # @overload search_blueprint_revisions(request, options = nil)
1819
+ # Pass arguments to `search_blueprint_revisions` via a request object, either of type
1820
+ # {::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest} or an equivalent Hash.
1821
+ #
1822
+ # @param request [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest, ::Hash]
1823
+ # A request object representing the call parameters. Required. To specify no
1824
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1825
+ # @param options [::Gapic::CallOptions, ::Hash]
1826
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1827
+ #
1828
+ # @overload search_blueprint_revisions(parent: nil, query: nil, page_size: nil, page_token: nil)
1829
+ # Pass arguments to `search_blueprint_revisions` via keyword arguments. Note that at
1830
+ # least one keyword argument is required. To specify no parameters, or to keep all
1831
+ # the default parameter values, pass an empty Hash as a request object (see above).
1832
+ #
1833
+ # @param parent [::String]
1834
+ # Required. The name of parent orchestration cluster resource.
1835
+ # Format should be -
1836
+ # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}".
1837
+ # @param query [::String]
1838
+ # Required. Supported queries:
1839
+ # 1. "" : Lists all revisions across all blueprints.
1840
+ # 2. "latest=true" : Lists latest revisions across all blueprints.
1841
+ # 3. "name=\\{name}" : Lists all revisions of blueprint with name
1842
+ # \\{name}.
1843
+ # 4. "name=\\{name} latest=true": Lists latest revision of blueprint with name
1844
+ # \\{name}
1845
+ # @param page_size [::Integer]
1846
+ # Optional. The maximum number of blueprints revisions to return per page.
1847
+ # max page size = 100, default page size = 20.
1848
+ # @param page_token [::String]
1849
+ # Optional. The page token, received from a previous search call.
1850
+ # It can be provided to retrieve the subsequent page.
1851
+ #
1852
+ # @yield [response, operation] Access the result along with the RPC operation
1853
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>]
1854
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1855
+ #
1856
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>]
1857
+ #
1858
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1859
+ #
1860
+ # @example Basic example
1861
+ # require "google/cloud/telco_automation/v1"
1862
+ #
1863
+ # # Create a client object. The client can be reused for multiple calls.
1864
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
1865
+ #
1866
+ # # Create a request. To set request fields, pass in keyword arguments.
1867
+ # request = Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new
1868
+ #
1869
+ # # Call the search_blueprint_revisions method.
1870
+ # result = client.search_blueprint_revisions request
1871
+ #
1872
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1873
+ # # over elements, and API calls will be issued to fetch pages as needed.
1874
+ # result.each do |item|
1875
+ # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint.
1876
+ # p item
1877
+ # end
1878
+ #
1879
+ def search_blueprint_revisions request, options = nil
1880
+ raise ::ArgumentError, "request must be provided" if request.nil?
1881
+
1882
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest
1883
+
1884
+ # Converts hash and nil to an options object
1885
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1886
+
1887
+ # Customize the options with defaults
1888
+ metadata = @config.rpcs.search_blueprint_revisions.metadata.to_h
1889
+
1890
+ # Set x-goog-api-client and x-goog-user-project headers
1891
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1892
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1893
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
1894
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1895
+
1896
+ header_params = {}
1897
+ if request.parent
1898
+ header_params["parent"] = request.parent
1899
+ end
1900
+
1901
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1902
+ metadata[:"x-goog-request-params"] ||= request_params_header
1903
+
1904
+ options.apply_defaults timeout: @config.rpcs.search_blueprint_revisions.timeout,
1905
+ metadata: metadata,
1906
+ retry_policy: @config.rpcs.search_blueprint_revisions.retry_policy
1907
+
1908
+ options.apply_defaults timeout: @config.timeout,
1909
+ metadata: @config.metadata,
1910
+ retry_policy: @config.retry_policy
1911
+
1912
+ @telco_automation_stub.call_rpc :search_blueprint_revisions, request, options: options do |response, operation|
1913
+ response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :search_blueprint_revisions, request, response, operation, options
1914
+ yield response, operation if block_given?
1915
+ return response
1916
+ end
1917
+ rescue ::GRPC::BadStatus => e
1918
+ raise ::Google::Cloud::Error.from_error(e)
1919
+ end
1920
+
1921
+ ##
1922
+ # Searches across deployment revisions.
1923
+ #
1924
+ # @overload search_deployment_revisions(request, options = nil)
1925
+ # Pass arguments to `search_deployment_revisions` via a request object, either of type
1926
+ # {::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest} or an equivalent Hash.
1927
+ #
1928
+ # @param request [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest, ::Hash]
1929
+ # A request object representing the call parameters. Required. To specify no
1930
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1931
+ # @param options [::Gapic::CallOptions, ::Hash]
1932
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1933
+ #
1934
+ # @overload search_deployment_revisions(parent: nil, query: nil, page_size: nil, page_token: nil)
1935
+ # Pass arguments to `search_deployment_revisions` via keyword arguments. Note that at
1936
+ # least one keyword argument is required. To specify no parameters, or to keep all
1937
+ # the default parameter values, pass an empty Hash as a request object (see above).
1938
+ #
1939
+ # @param parent [::String]
1940
+ # Required. The name of parent orchestration cluster resource.
1941
+ # Format should be -
1942
+ # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}".
1943
+ # @param query [::String]
1944
+ # Required. Supported queries:
1945
+ # 1. "" : Lists all revisions across all deployments.
1946
+ # 2. "latest=true" : Lists latest revisions across all
1947
+ # deployments.
1948
+ # 3. "name=\\{name}" : Lists all revisions of deployment with name
1949
+ # \\{name}.
1950
+ # 4. "name=\\{name} latest=true": Lists latest revision of deployment with name
1951
+ # \\{name}
1952
+ # @param page_size [::Integer]
1953
+ # Optional. The maximum number of deployment revisions to return per page.
1954
+ # max page size = 100, default page size = 20.
1955
+ # @param page_token [::String]
1956
+ # Optional. The page token, received from a previous search call.
1957
+ # It can be provided to retrieve the subsequent page.
1958
+ #
1959
+ # @yield [response, operation] Access the result along with the RPC operation
1960
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>]
1961
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1962
+ #
1963
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>]
1964
+ #
1965
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1966
+ #
1967
+ # @example Basic example
1968
+ # require "google/cloud/telco_automation/v1"
1969
+ #
1970
+ # # Create a client object. The client can be reused for multiple calls.
1971
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
1972
+ #
1973
+ # # Create a request. To set request fields, pass in keyword arguments.
1974
+ # request = Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new
1975
+ #
1976
+ # # Call the search_deployment_revisions method.
1977
+ # result = client.search_deployment_revisions request
1978
+ #
1979
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1980
+ # # over elements, and API calls will be issued to fetch pages as needed.
1981
+ # result.each do |item|
1982
+ # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment.
1983
+ # p item
1984
+ # end
1985
+ #
1986
+ def search_deployment_revisions request, options = nil
1987
+ raise ::ArgumentError, "request must be provided" if request.nil?
1988
+
1989
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest
1990
+
1991
+ # Converts hash and nil to an options object
1992
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1993
+
1994
+ # Customize the options with defaults
1995
+ metadata = @config.rpcs.search_deployment_revisions.metadata.to_h
1996
+
1997
+ # Set x-goog-api-client and x-goog-user-project headers
1998
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1999
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2000
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2001
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2002
+
2003
+ header_params = {}
2004
+ if request.parent
2005
+ header_params["parent"] = request.parent
2006
+ end
2007
+
2008
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2009
+ metadata[:"x-goog-request-params"] ||= request_params_header
2010
+
2011
+ options.apply_defaults timeout: @config.rpcs.search_deployment_revisions.timeout,
2012
+ metadata: metadata,
2013
+ retry_policy: @config.rpcs.search_deployment_revisions.retry_policy
2014
+
2015
+ options.apply_defaults timeout: @config.timeout,
2016
+ metadata: @config.metadata,
2017
+ retry_policy: @config.retry_policy
2018
+
2019
+ @telco_automation_stub.call_rpc :search_deployment_revisions, request, options: options do |response, operation|
2020
+ response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :search_deployment_revisions, request, response, operation, options
2021
+ yield response, operation if block_given?
2022
+ return response
2023
+ end
2024
+ rescue ::GRPC::BadStatus => e
2025
+ raise ::Google::Cloud::Error.from_error(e)
2026
+ end
2027
+
2028
+ ##
2029
+ # Discards the changes in a blueprint and reverts the blueprint to the last
2030
+ # approved blueprint revision. No changes take place if a blueprint does not
2031
+ # have revisions.
2032
+ #
2033
+ # @overload discard_blueprint_changes(request, options = nil)
2034
+ # Pass arguments to `discard_blueprint_changes` via a request object, either of type
2035
+ # {::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest} or an equivalent Hash.
2036
+ #
2037
+ # @param request [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest, ::Hash]
2038
+ # A request object representing the call parameters. Required. To specify no
2039
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2040
+ # @param options [::Gapic::CallOptions, ::Hash]
2041
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2042
+ #
2043
+ # @overload discard_blueprint_changes(name: nil)
2044
+ # Pass arguments to `discard_blueprint_changes` via keyword arguments. Note that at
2045
+ # least one keyword argument is required. To specify no parameters, or to keep all
2046
+ # the default parameter values, pass an empty Hash as a request object (see above).
2047
+ #
2048
+ # @param name [::String]
2049
+ # Required. The name of the blueprint of which changes are being discarded.
2050
+ #
2051
+ # @yield [response, operation] Access the result along with the RPC operation
2052
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse]
2053
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2054
+ #
2055
+ # @return [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse]
2056
+ #
2057
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2058
+ #
2059
+ # @example Basic example
2060
+ # require "google/cloud/telco_automation/v1"
2061
+ #
2062
+ # # Create a client object. The client can be reused for multiple calls.
2063
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
2064
+ #
2065
+ # # Create a request. To set request fields, pass in keyword arguments.
2066
+ # request = Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new
2067
+ #
2068
+ # # Call the discard_blueprint_changes method.
2069
+ # result = client.discard_blueprint_changes request
2070
+ #
2071
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse.
2072
+ # p result
2073
+ #
2074
+ def discard_blueprint_changes request, options = nil
2075
+ raise ::ArgumentError, "request must be provided" if request.nil?
2076
+
2077
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest
2078
+
2079
+ # Converts hash and nil to an options object
2080
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2081
+
2082
+ # Customize the options with defaults
2083
+ metadata = @config.rpcs.discard_blueprint_changes.metadata.to_h
2084
+
2085
+ # Set x-goog-api-client and x-goog-user-project headers
2086
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2087
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2088
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2089
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2090
+
2091
+ header_params = {}
2092
+ if request.name
2093
+ header_params["name"] = request.name
2094
+ end
2095
+
2096
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2097
+ metadata[:"x-goog-request-params"] ||= request_params_header
2098
+
2099
+ options.apply_defaults timeout: @config.rpcs.discard_blueprint_changes.timeout,
2100
+ metadata: metadata,
2101
+ retry_policy: @config.rpcs.discard_blueprint_changes.retry_policy
2102
+
2103
+ options.apply_defaults timeout: @config.timeout,
2104
+ metadata: @config.metadata,
2105
+ retry_policy: @config.retry_policy
2106
+
2107
+ @telco_automation_stub.call_rpc :discard_blueprint_changes, request, options: options do |response, operation|
2108
+ yield response, operation if block_given?
2109
+ return response
2110
+ end
2111
+ rescue ::GRPC::BadStatus => e
2112
+ raise ::Google::Cloud::Error.from_error(e)
2113
+ end
2114
+
2115
+ ##
2116
+ # Lists the blueprints in TNA's public catalog. Default page size = 20,
2117
+ # Max Page Size = 100.
2118
+ #
2119
+ # @overload list_public_blueprints(request, options = nil)
2120
+ # Pass arguments to `list_public_blueprints` via a request object, either of type
2121
+ # {::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest} or an equivalent Hash.
2122
+ #
2123
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest, ::Hash]
2124
+ # A request object representing the call parameters. Required. To specify no
2125
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2126
+ # @param options [::Gapic::CallOptions, ::Hash]
2127
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2128
+ #
2129
+ # @overload list_public_blueprints(parent: nil, page_size: nil, page_token: nil)
2130
+ # Pass arguments to `list_public_blueprints` via keyword arguments. Note that at
2131
+ # least one keyword argument is required. To specify no parameters, or to keep all
2132
+ # the default parameter values, pass an empty Hash as a request object (see above).
2133
+ #
2134
+ # @param parent [::String]
2135
+ # Required. Parent value of public blueprint.
2136
+ # Format should be -
2137
+ # "projects/\\{project_id}/locations/\\{location_name}".
2138
+ # @param page_size [::Integer]
2139
+ # Optional. Requested page size. Server may return fewer items than
2140
+ # requested. If unspecified, server will pick an appropriate default.
2141
+ # @param page_token [::String]
2142
+ # Optional. A token identifying a page of results the server should return.
2143
+ #
2144
+ # @yield [response, operation] Access the result along with the RPC operation
2145
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>]
2146
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2147
+ #
2148
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>]
2149
+ #
2150
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2151
+ #
2152
+ # @example Basic example
2153
+ # require "google/cloud/telco_automation/v1"
2154
+ #
2155
+ # # Create a client object. The client can be reused for multiple calls.
2156
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
2157
+ #
2158
+ # # Create a request. To set request fields, pass in keyword arguments.
2159
+ # request = Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.new
2160
+ #
2161
+ # # Call the list_public_blueprints method.
2162
+ # result = client.list_public_blueprints request
2163
+ #
2164
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2165
+ # # over elements, and API calls will be issued to fetch pages as needed.
2166
+ # result.each do |item|
2167
+ # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint.
2168
+ # p item
2169
+ # end
2170
+ #
2171
+ def list_public_blueprints request, options = nil
2172
+ raise ::ArgumentError, "request must be provided" if request.nil?
2173
+
2174
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest
2175
+
2176
+ # Converts hash and nil to an options object
2177
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2178
+
2179
+ # Customize the options with defaults
2180
+ metadata = @config.rpcs.list_public_blueprints.metadata.to_h
2181
+
2182
+ # Set x-goog-api-client and x-goog-user-project headers
2183
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2184
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2185
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2186
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2187
+
2188
+ header_params = {}
2189
+ if request.parent
2190
+ header_params["parent"] = request.parent
2191
+ end
2192
+
2193
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2194
+ metadata[:"x-goog-request-params"] ||= request_params_header
2195
+
2196
+ options.apply_defaults timeout: @config.rpcs.list_public_blueprints.timeout,
2197
+ metadata: metadata,
2198
+ retry_policy: @config.rpcs.list_public_blueprints.retry_policy
2199
+
2200
+ options.apply_defaults timeout: @config.timeout,
2201
+ metadata: @config.metadata,
2202
+ retry_policy: @config.retry_policy
2203
+
2204
+ @telco_automation_stub.call_rpc :list_public_blueprints, request, options: options do |response, operation|
2205
+ response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_public_blueprints, request, response, operation, options
2206
+ yield response, operation if block_given?
2207
+ return response
2208
+ end
2209
+ rescue ::GRPC::BadStatus => e
2210
+ raise ::Google::Cloud::Error.from_error(e)
2211
+ end
2212
+
2213
+ ##
2214
+ # Returns the requested public blueprint.
2215
+ #
2216
+ # @overload get_public_blueprint(request, options = nil)
2217
+ # Pass arguments to `get_public_blueprint` via a request object, either of type
2218
+ # {::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest} or an equivalent Hash.
2219
+ #
2220
+ # @param request [::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest, ::Hash]
2221
+ # A request object representing the call parameters. Required. To specify no
2222
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2223
+ # @param options [::Gapic::CallOptions, ::Hash]
2224
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2225
+ #
2226
+ # @overload get_public_blueprint(name: nil)
2227
+ # Pass arguments to `get_public_blueprint` via keyword arguments. Note that at
2228
+ # least one keyword argument is required. To specify no parameters, or to keep all
2229
+ # the default parameter values, pass an empty Hash as a request object (see above).
2230
+ #
2231
+ # @param name [::String]
2232
+ # Required. The name of the public blueprint.
2233
+ #
2234
+ # @yield [response, operation] Access the result along with the RPC operation
2235
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint]
2236
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2237
+ #
2238
+ # @return [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint]
2239
+ #
2240
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2241
+ #
2242
+ # @example Basic example
2243
+ # require "google/cloud/telco_automation/v1"
2244
+ #
2245
+ # # Create a client object. The client can be reused for multiple calls.
2246
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
2247
+ #
2248
+ # # Create a request. To set request fields, pass in keyword arguments.
2249
+ # request = Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new
2250
+ #
2251
+ # # Call the get_public_blueprint method.
2252
+ # result = client.get_public_blueprint request
2253
+ #
2254
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::PublicBlueprint.
2255
+ # p result
2256
+ #
2257
+ def get_public_blueprint request, options = nil
2258
+ raise ::ArgumentError, "request must be provided" if request.nil?
2259
+
2260
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest
2261
+
2262
+ # Converts hash and nil to an options object
2263
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2264
+
2265
+ # Customize the options with defaults
2266
+ metadata = @config.rpcs.get_public_blueprint.metadata.to_h
2267
+
2268
+ # Set x-goog-api-client and x-goog-user-project headers
2269
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2270
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2271
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2272
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2273
+
2274
+ header_params = {}
2275
+ if request.name
2276
+ header_params["name"] = request.name
2277
+ end
2278
+
2279
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2280
+ metadata[:"x-goog-request-params"] ||= request_params_header
2281
+
2282
+ options.apply_defaults timeout: @config.rpcs.get_public_blueprint.timeout,
2283
+ metadata: metadata,
2284
+ retry_policy: @config.rpcs.get_public_blueprint.retry_policy
2285
+
2286
+ options.apply_defaults timeout: @config.timeout,
2287
+ metadata: @config.metadata,
2288
+ retry_policy: @config.retry_policy
2289
+
2290
+ @telco_automation_stub.call_rpc :get_public_blueprint, request, options: options do |response, operation|
2291
+ yield response, operation if block_given?
2292
+ return response
2293
+ end
2294
+ rescue ::GRPC::BadStatus => e
2295
+ raise ::Google::Cloud::Error.from_error(e)
2296
+ end
2297
+
2298
+ ##
2299
+ # Creates a deployment.
2300
+ #
2301
+ # @overload create_deployment(request, options = nil)
2302
+ # Pass arguments to `create_deployment` via a request object, either of type
2303
+ # {::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest} or an equivalent Hash.
2304
+ #
2305
+ # @param request [::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest, ::Hash]
2306
+ # A request object representing the call parameters. Required. To specify no
2307
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2308
+ # @param options [::Gapic::CallOptions, ::Hash]
2309
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2310
+ #
2311
+ # @overload create_deployment(parent: nil, deployment_id: nil, deployment: nil)
2312
+ # Pass arguments to `create_deployment` via keyword arguments. Note that at
2313
+ # least one keyword argument is required. To specify no parameters, or to keep all
2314
+ # the default parameter values, pass an empty Hash as a request object (see above).
2315
+ #
2316
+ # @param parent [::String]
2317
+ # Required. The name of parent resource.
2318
+ # Format should be -
2319
+ # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}".
2320
+ # @param deployment_id [::String]
2321
+ # Optional. The name of the deployment.
2322
+ # @param deployment [::Google::Cloud::TelcoAutomation::V1::Deployment, ::Hash]
2323
+ # Required. The `Deployment` to create.
2324
+ #
2325
+ # @yield [response, operation] Access the result along with the RPC operation
2326
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment]
2327
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2328
+ #
2329
+ # @return [::Google::Cloud::TelcoAutomation::V1::Deployment]
2330
+ #
2331
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2332
+ #
2333
+ # @example Basic example
2334
+ # require "google/cloud/telco_automation/v1"
2335
+ #
2336
+ # # Create a client object. The client can be reused for multiple calls.
2337
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
2338
+ #
2339
+ # # Create a request. To set request fields, pass in keyword arguments.
2340
+ # request = Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new
2341
+ #
2342
+ # # Call the create_deployment method.
2343
+ # result = client.create_deployment request
2344
+ #
2345
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment.
2346
+ # p result
2347
+ #
2348
+ def create_deployment request, options = nil
2349
+ raise ::ArgumentError, "request must be provided" if request.nil?
2350
+
2351
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest
2352
+
2353
+ # Converts hash and nil to an options object
2354
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2355
+
2356
+ # Customize the options with defaults
2357
+ metadata = @config.rpcs.create_deployment.metadata.to_h
2358
+
2359
+ # Set x-goog-api-client and x-goog-user-project headers
2360
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2361
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2362
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2363
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2364
+
2365
+ header_params = {}
2366
+ if request.parent
2367
+ header_params["parent"] = request.parent
2368
+ end
2369
+
2370
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2371
+ metadata[:"x-goog-request-params"] ||= request_params_header
2372
+
2373
+ options.apply_defaults timeout: @config.rpcs.create_deployment.timeout,
2374
+ metadata: metadata,
2375
+ retry_policy: @config.rpcs.create_deployment.retry_policy
2376
+
2377
+ options.apply_defaults timeout: @config.timeout,
2378
+ metadata: @config.metadata,
2379
+ retry_policy: @config.retry_policy
2380
+
2381
+ @telco_automation_stub.call_rpc :create_deployment, request, options: options do |response, operation|
2382
+ yield response, operation if block_given?
2383
+ return response
2384
+ end
2385
+ rescue ::GRPC::BadStatus => e
2386
+ raise ::Google::Cloud::Error.from_error(e)
2387
+ end
2388
+
2389
+ ##
2390
+ # Updates a deployment.
2391
+ #
2392
+ # @overload update_deployment(request, options = nil)
2393
+ # Pass arguments to `update_deployment` via a request object, either of type
2394
+ # {::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest} or an equivalent Hash.
2395
+ #
2396
+ # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest, ::Hash]
2397
+ # A request object representing the call parameters. Required. To specify no
2398
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2399
+ # @param options [::Gapic::CallOptions, ::Hash]
2400
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2401
+ #
2402
+ # @overload update_deployment(deployment: nil, update_mask: nil)
2403
+ # Pass arguments to `update_deployment` via keyword arguments. Note that at
2404
+ # least one keyword argument is required. To specify no parameters, or to keep all
2405
+ # the default parameter values, pass an empty Hash as a request object (see above).
2406
+ #
2407
+ # @param deployment [::Google::Cloud::TelcoAutomation::V1::Deployment, ::Hash]
2408
+ # Required. The `deployment` to update.
2409
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2410
+ # Required. Update mask is used to specify the fields to be overwritten in
2411
+ # the `deployment` resource by the update.
2412
+ #
2413
+ # @yield [response, operation] Access the result along with the RPC operation
2414
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment]
2415
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2416
+ #
2417
+ # @return [::Google::Cloud::TelcoAutomation::V1::Deployment]
2418
+ #
2419
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2420
+ #
2421
+ # @example Basic example
2422
+ # require "google/cloud/telco_automation/v1"
2423
+ #
2424
+ # # Create a client object. The client can be reused for multiple calls.
2425
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
2426
+ #
2427
+ # # Create a request. To set request fields, pass in keyword arguments.
2428
+ # request = Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new
2429
+ #
2430
+ # # Call the update_deployment method.
2431
+ # result = client.update_deployment request
2432
+ #
2433
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment.
2434
+ # p result
2435
+ #
2436
+ def update_deployment request, options = nil
2437
+ raise ::ArgumentError, "request must be provided" if request.nil?
2438
+
2439
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest
2440
+
2441
+ # Converts hash and nil to an options object
2442
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2443
+
2444
+ # Customize the options with defaults
2445
+ metadata = @config.rpcs.update_deployment.metadata.to_h
2446
+
2447
+ # Set x-goog-api-client and x-goog-user-project headers
2448
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2449
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2450
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2451
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2452
+
2453
+ header_params = {}
2454
+ if request.deployment&.name
2455
+ header_params["deployment.name"] = request.deployment.name
2456
+ end
2457
+
2458
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2459
+ metadata[:"x-goog-request-params"] ||= request_params_header
2460
+
2461
+ options.apply_defaults timeout: @config.rpcs.update_deployment.timeout,
2462
+ metadata: metadata,
2463
+ retry_policy: @config.rpcs.update_deployment.retry_policy
2464
+
2465
+ options.apply_defaults timeout: @config.timeout,
2466
+ metadata: @config.metadata,
2467
+ retry_policy: @config.retry_policy
2468
+
2469
+ @telco_automation_stub.call_rpc :update_deployment, request, options: options do |response, operation|
2470
+ yield response, operation if block_given?
2471
+ return response
2472
+ end
2473
+ rescue ::GRPC::BadStatus => e
2474
+ raise ::Google::Cloud::Error.from_error(e)
2475
+ end
2476
+
2477
+ ##
2478
+ # Returns the requested deployment.
2479
+ #
2480
+ # @overload get_deployment(request, options = nil)
2481
+ # Pass arguments to `get_deployment` via a request object, either of type
2482
+ # {::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest} or an equivalent Hash.
2483
+ #
2484
+ # @param request [::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest, ::Hash]
2485
+ # A request object representing the call parameters. Required. To specify no
2486
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2487
+ # @param options [::Gapic::CallOptions, ::Hash]
2488
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2489
+ #
2490
+ # @overload get_deployment(name: nil, view: nil)
2491
+ # Pass arguments to `get_deployment` via keyword arguments. Note that at
2492
+ # least one keyword argument is required. To specify no parameters, or to keep all
2493
+ # the default parameter values, pass an empty Hash as a request object (see above).
2494
+ #
2495
+ # @param name [::String]
2496
+ # Required. The name of the deployment.
2497
+ # Case 1: If the name provided in the request is
2498
+ # \\{deployment_id}@\\{revision_id}, then the revision with revision_id will be
2499
+ # returned.
2500
+ # Case 2: If the name provided in the request is \\{deployment}, then
2501
+ # the current state of the deployment is returned.
2502
+ # @param view [::Google::Cloud::TelcoAutomation::V1::DeploymentView]
2503
+ # Optional. Defines the type of view of the deployment.
2504
+ # When field is not present VIEW_BASIC is considered as default.
2505
+ #
2506
+ # @yield [response, operation] Access the result along with the RPC operation
2507
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment]
2508
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2509
+ #
2510
+ # @return [::Google::Cloud::TelcoAutomation::V1::Deployment]
2511
+ #
2512
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2513
+ #
2514
+ # @example Basic example
2515
+ # require "google/cloud/telco_automation/v1"
2516
+ #
2517
+ # # Create a client object. The client can be reused for multiple calls.
2518
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
2519
+ #
2520
+ # # Create a request. To set request fields, pass in keyword arguments.
2521
+ # request = Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new
2522
+ #
2523
+ # # Call the get_deployment method.
2524
+ # result = client.get_deployment request
2525
+ #
2526
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment.
2527
+ # p result
2528
+ #
2529
+ def get_deployment request, options = nil
2530
+ raise ::ArgumentError, "request must be provided" if request.nil?
2531
+
2532
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest
2533
+
2534
+ # Converts hash and nil to an options object
2535
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2536
+
2537
+ # Customize the options with defaults
2538
+ metadata = @config.rpcs.get_deployment.metadata.to_h
2539
+
2540
+ # Set x-goog-api-client and x-goog-user-project headers
2541
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2542
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2543
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2544
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2545
+
2546
+ header_params = {}
2547
+ if request.name
2548
+ header_params["name"] = request.name
2549
+ end
2550
+
2551
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2552
+ metadata[:"x-goog-request-params"] ||= request_params_header
2553
+
2554
+ options.apply_defaults timeout: @config.rpcs.get_deployment.timeout,
2555
+ metadata: metadata,
2556
+ retry_policy: @config.rpcs.get_deployment.retry_policy
2557
+
2558
+ options.apply_defaults timeout: @config.timeout,
2559
+ metadata: @config.metadata,
2560
+ retry_policy: @config.retry_policy
2561
+
2562
+ @telco_automation_stub.call_rpc :get_deployment, request, options: options do |response, operation|
2563
+ yield response, operation if block_given?
2564
+ return response
2565
+ end
2566
+ rescue ::GRPC::BadStatus => e
2567
+ raise ::Google::Cloud::Error.from_error(e)
2568
+ end
2569
+
2570
+ ##
2571
+ # Removes the deployment by marking it as DELETING. Post which deployment and
2572
+ # it's revisions gets deleted.
2573
+ #
2574
+ # @overload remove_deployment(request, options = nil)
2575
+ # Pass arguments to `remove_deployment` via a request object, either of type
2576
+ # {::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest} or an equivalent Hash.
2577
+ #
2578
+ # @param request [::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest, ::Hash]
2579
+ # A request object representing the call parameters. Required. To specify no
2580
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2581
+ # @param options [::Gapic::CallOptions, ::Hash]
2582
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2583
+ #
2584
+ # @overload remove_deployment(name: nil)
2585
+ # Pass arguments to `remove_deployment` via keyword arguments. Note that at
2586
+ # least one keyword argument is required. To specify no parameters, or to keep all
2587
+ # the default parameter values, pass an empty Hash as a request object (see above).
2588
+ #
2589
+ # @param name [::String]
2590
+ # Required. The name of deployment to initiate delete.
2591
+ #
2592
+ # @yield [response, operation] Access the result along with the RPC operation
2593
+ # @yieldparam response [::Google::Protobuf::Empty]
2594
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2595
+ #
2596
+ # @return [::Google::Protobuf::Empty]
2597
+ #
2598
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2599
+ #
2600
+ # @example Basic example
2601
+ # require "google/cloud/telco_automation/v1"
2602
+ #
2603
+ # # Create a client object. The client can be reused for multiple calls.
2604
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
2605
+ #
2606
+ # # Create a request. To set request fields, pass in keyword arguments.
2607
+ # request = Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new
2608
+ #
2609
+ # # Call the remove_deployment method.
2610
+ # result = client.remove_deployment request
2611
+ #
2612
+ # # The returned object is of type Google::Protobuf::Empty.
2613
+ # p result
2614
+ #
2615
+ def remove_deployment request, options = nil
2616
+ raise ::ArgumentError, "request must be provided" if request.nil?
2617
+
2618
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest
2619
+
2620
+ # Converts hash and nil to an options object
2621
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2622
+
2623
+ # Customize the options with defaults
2624
+ metadata = @config.rpcs.remove_deployment.metadata.to_h
2625
+
2626
+ # Set x-goog-api-client and x-goog-user-project headers
2627
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2628
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2629
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2630
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2631
+
2632
+ header_params = {}
2633
+ if request.name
2634
+ header_params["name"] = request.name
2635
+ end
2636
+
2637
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2638
+ metadata[:"x-goog-request-params"] ||= request_params_header
2639
+
2640
+ options.apply_defaults timeout: @config.rpcs.remove_deployment.timeout,
2641
+ metadata: metadata,
2642
+ retry_policy: @config.rpcs.remove_deployment.retry_policy
2643
+
2644
+ options.apply_defaults timeout: @config.timeout,
2645
+ metadata: @config.metadata,
2646
+ retry_policy: @config.retry_policy
2647
+
2648
+ @telco_automation_stub.call_rpc :remove_deployment, request, options: options do |response, operation|
2649
+ yield response, operation if block_given?
2650
+ return response
2651
+ end
2652
+ rescue ::GRPC::BadStatus => e
2653
+ raise ::Google::Cloud::Error.from_error(e)
2654
+ end
2655
+
2656
+ ##
2657
+ # List all deployments.
2658
+ #
2659
+ # @overload list_deployments(request, options = nil)
2660
+ # Pass arguments to `list_deployments` via a request object, either of type
2661
+ # {::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest} or an equivalent Hash.
2662
+ #
2663
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest, ::Hash]
2664
+ # A request object representing the call parameters. Required. To specify no
2665
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2666
+ # @param options [::Gapic::CallOptions, ::Hash]
2667
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2668
+ #
2669
+ # @overload list_deployments(parent: nil, filter: nil, page_size: nil, page_token: nil)
2670
+ # Pass arguments to `list_deployments` via keyword arguments. Note that at
2671
+ # least one keyword argument is required. To specify no parameters, or to keep all
2672
+ # the default parameter values, pass an empty Hash as a request object (see above).
2673
+ #
2674
+ # @param parent [::String]
2675
+ # Required. The name of parent orchestration cluster resource.
2676
+ # Format should be -
2677
+ # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}".
2678
+ # @param filter [::String]
2679
+ # Optional. Filtering only supports equality on deployment state.
2680
+ # It should be in the form: "state = DRAFT". `OR` operator can be used to
2681
+ # get response for multiple states. e.g. "state = DRAFT OR state = APPLIED".
2682
+ # @param page_size [::Integer]
2683
+ # Optional. The maximum number of deployments to return per page.
2684
+ # @param page_token [::String]
2685
+ # Optional. The page token, received from a previous ListDeployments call.
2686
+ # It can be provided to retrieve the subsequent page.
2687
+ #
2688
+ # @yield [response, operation] Access the result along with the RPC operation
2689
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>]
2690
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2691
+ #
2692
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>]
2693
+ #
2694
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2695
+ #
2696
+ # @example Basic example
2697
+ # require "google/cloud/telco_automation/v1"
2698
+ #
2699
+ # # Create a client object. The client can be reused for multiple calls.
2700
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
2701
+ #
2702
+ # # Create a request. To set request fields, pass in keyword arguments.
2703
+ # request = Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.new
2704
+ #
2705
+ # # Call the list_deployments method.
2706
+ # result = client.list_deployments request
2707
+ #
2708
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2709
+ # # over elements, and API calls will be issued to fetch pages as needed.
2710
+ # result.each do |item|
2711
+ # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment.
2712
+ # p item
2713
+ # end
2714
+ #
2715
+ def list_deployments request, options = nil
2716
+ raise ::ArgumentError, "request must be provided" if request.nil?
2717
+
2718
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest
2719
+
2720
+ # Converts hash and nil to an options object
2721
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2722
+
2723
+ # Customize the options with defaults
2724
+ metadata = @config.rpcs.list_deployments.metadata.to_h
2725
+
2726
+ # Set x-goog-api-client and x-goog-user-project headers
2727
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2728
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2729
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2730
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2731
+
2732
+ header_params = {}
2733
+ if request.parent
2734
+ header_params["parent"] = request.parent
2735
+ end
2736
+
2737
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2738
+ metadata[:"x-goog-request-params"] ||= request_params_header
2739
+
2740
+ options.apply_defaults timeout: @config.rpcs.list_deployments.timeout,
2741
+ metadata: metadata,
2742
+ retry_policy: @config.rpcs.list_deployments.retry_policy
2743
+
2744
+ options.apply_defaults timeout: @config.timeout,
2745
+ metadata: @config.metadata,
2746
+ retry_policy: @config.retry_policy
2747
+
2748
+ @telco_automation_stub.call_rpc :list_deployments, request, options: options do |response, operation|
2749
+ response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_deployments, request, response, operation, options
2750
+ yield response, operation if block_given?
2751
+ return response
2752
+ end
2753
+ rescue ::GRPC::BadStatus => e
2754
+ raise ::Google::Cloud::Error.from_error(e)
2755
+ end
2756
+
2757
+ ##
2758
+ # List deployment revisions of a given deployment.
2759
+ #
2760
+ # @overload list_deployment_revisions(request, options = nil)
2761
+ # Pass arguments to `list_deployment_revisions` via a request object, either of type
2762
+ # {::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest} or an equivalent Hash.
2763
+ #
2764
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest, ::Hash]
2765
+ # A request object representing the call parameters. Required. To specify no
2766
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2767
+ # @param options [::Gapic::CallOptions, ::Hash]
2768
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2769
+ #
2770
+ # @overload list_deployment_revisions(name: nil, page_size: nil, page_token: nil)
2771
+ # Pass arguments to `list_deployment_revisions` via keyword arguments. Note that at
2772
+ # least one keyword argument is required. To specify no parameters, or to keep all
2773
+ # the default parameter values, pass an empty Hash as a request object (see above).
2774
+ #
2775
+ # @param name [::String]
2776
+ # Required. The name of the deployment to list revisions for.
2777
+ # @param page_size [::Integer]
2778
+ # Optional. The maximum number of revisions to return per page.
2779
+ # @param page_token [::String]
2780
+ # Optional. The page token, received from a previous ListDeploymentRevisions
2781
+ # call Provide this to retrieve the subsequent page.
2782
+ #
2783
+ # @yield [response, operation] Access the result along with the RPC operation
2784
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>]
2785
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2786
+ #
2787
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>]
2788
+ #
2789
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2790
+ #
2791
+ # @example Basic example
2792
+ # require "google/cloud/telco_automation/v1"
2793
+ #
2794
+ # # Create a client object. The client can be reused for multiple calls.
2795
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
2796
+ #
2797
+ # # Create a request. To set request fields, pass in keyword arguments.
2798
+ # request = Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new
2799
+ #
2800
+ # # Call the list_deployment_revisions method.
2801
+ # result = client.list_deployment_revisions request
2802
+ #
2803
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2804
+ # # over elements, and API calls will be issued to fetch pages as needed.
2805
+ # result.each do |item|
2806
+ # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment.
2807
+ # p item
2808
+ # end
2809
+ #
2810
+ def list_deployment_revisions request, options = nil
2811
+ raise ::ArgumentError, "request must be provided" if request.nil?
2812
+
2813
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest
2814
+
2815
+ # Converts hash and nil to an options object
2816
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2817
+
2818
+ # Customize the options with defaults
2819
+ metadata = @config.rpcs.list_deployment_revisions.metadata.to_h
2820
+
2821
+ # Set x-goog-api-client and x-goog-user-project headers
2822
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2823
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2824
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2825
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2826
+
2827
+ header_params = {}
2828
+ if request.name
2829
+ header_params["name"] = request.name
2830
+ end
2831
+
2832
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2833
+ metadata[:"x-goog-request-params"] ||= request_params_header
2834
+
2835
+ options.apply_defaults timeout: @config.rpcs.list_deployment_revisions.timeout,
2836
+ metadata: metadata,
2837
+ retry_policy: @config.rpcs.list_deployment_revisions.retry_policy
2838
+
2839
+ options.apply_defaults timeout: @config.timeout,
2840
+ metadata: @config.metadata,
2841
+ retry_policy: @config.retry_policy
2842
+
2843
+ @telco_automation_stub.call_rpc :list_deployment_revisions, request, options: options do |response, operation|
2844
+ response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_deployment_revisions, request, response, operation, options
2845
+ yield response, operation if block_given?
2846
+ return response
2847
+ end
2848
+ rescue ::GRPC::BadStatus => e
2849
+ raise ::Google::Cloud::Error.from_error(e)
2850
+ end
2851
+
2852
+ ##
2853
+ # Discards the changes in a deployment and reverts the deployment to the last
2854
+ # approved deployment revision. No changes take place if a deployment does
2855
+ # not have revisions.
2856
+ #
2857
+ # @overload discard_deployment_changes(request, options = nil)
2858
+ # Pass arguments to `discard_deployment_changes` via a request object, either of type
2859
+ # {::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest} or an equivalent Hash.
2860
+ #
2861
+ # @param request [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest, ::Hash]
2862
+ # A request object representing the call parameters. Required. To specify no
2863
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2864
+ # @param options [::Gapic::CallOptions, ::Hash]
2865
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2866
+ #
2867
+ # @overload discard_deployment_changes(name: nil)
2868
+ # Pass arguments to `discard_deployment_changes` via keyword arguments. Note that at
2869
+ # least one keyword argument is required. To specify no parameters, or to keep all
2870
+ # the default parameter values, pass an empty Hash as a request object (see above).
2871
+ #
2872
+ # @param name [::String]
2873
+ # Required. The name of the deployment of which changes are being discarded.
2874
+ #
2875
+ # @yield [response, operation] Access the result along with the RPC operation
2876
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse]
2877
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2878
+ #
2879
+ # @return [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse]
2880
+ #
2881
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2882
+ #
2883
+ # @example Basic example
2884
+ # require "google/cloud/telco_automation/v1"
2885
+ #
2886
+ # # Create a client object. The client can be reused for multiple calls.
2887
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
2888
+ #
2889
+ # # Create a request. To set request fields, pass in keyword arguments.
2890
+ # request = Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new
2891
+ #
2892
+ # # Call the discard_deployment_changes method.
2893
+ # result = client.discard_deployment_changes request
2894
+ #
2895
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse.
2896
+ # p result
2897
+ #
2898
+ def discard_deployment_changes request, options = nil
2899
+ raise ::ArgumentError, "request must be provided" if request.nil?
2900
+
2901
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest
2902
+
2903
+ # Converts hash and nil to an options object
2904
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2905
+
2906
+ # Customize the options with defaults
2907
+ metadata = @config.rpcs.discard_deployment_changes.metadata.to_h
2908
+
2909
+ # Set x-goog-api-client and x-goog-user-project headers
2910
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2911
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2912
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2913
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2914
+
2915
+ header_params = {}
2916
+ if request.name
2917
+ header_params["name"] = request.name
2918
+ end
2919
+
2920
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2921
+ metadata[:"x-goog-request-params"] ||= request_params_header
2922
+
2923
+ options.apply_defaults timeout: @config.rpcs.discard_deployment_changes.timeout,
2924
+ metadata: metadata,
2925
+ retry_policy: @config.rpcs.discard_deployment_changes.retry_policy
2926
+
2927
+ options.apply_defaults timeout: @config.timeout,
2928
+ metadata: @config.metadata,
2929
+ retry_policy: @config.retry_policy
2930
+
2931
+ @telco_automation_stub.call_rpc :discard_deployment_changes, request, options: options do |response, operation|
2932
+ yield response, operation if block_given?
2933
+ return response
2934
+ end
2935
+ rescue ::GRPC::BadStatus => e
2936
+ raise ::Google::Cloud::Error.from_error(e)
2937
+ end
2938
+
2939
+ ##
2940
+ # Applies the deployment's YAML files to the parent orchestration cluster.
2941
+ #
2942
+ # @overload apply_deployment(request, options = nil)
2943
+ # Pass arguments to `apply_deployment` via a request object, either of type
2944
+ # {::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest} or an equivalent Hash.
2945
+ #
2946
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest, ::Hash]
2947
+ # A request object representing the call parameters. Required. To specify no
2948
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2949
+ # @param options [::Gapic::CallOptions, ::Hash]
2950
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2951
+ #
2952
+ # @overload apply_deployment(name: nil)
2953
+ # Pass arguments to `apply_deployment` via keyword arguments. Note that at
2954
+ # least one keyword argument is required. To specify no parameters, or to keep all
2955
+ # the default parameter values, pass an empty Hash as a request object (see above).
2956
+ #
2957
+ # @param name [::String]
2958
+ # Required. The name of the deployment to apply to orchestration cluster.
2959
+ #
2960
+ # @yield [response, operation] Access the result along with the RPC operation
2961
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment]
2962
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2963
+ #
2964
+ # @return [::Google::Cloud::TelcoAutomation::V1::Deployment]
2965
+ #
2966
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2967
+ #
2968
+ # @example Basic example
2969
+ # require "google/cloud/telco_automation/v1"
2970
+ #
2971
+ # # Create a client object. The client can be reused for multiple calls.
2972
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
2973
+ #
2974
+ # # Create a request. To set request fields, pass in keyword arguments.
2975
+ # request = Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new
2976
+ #
2977
+ # # Call the apply_deployment method.
2978
+ # result = client.apply_deployment request
2979
+ #
2980
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment.
2981
+ # p result
2982
+ #
2983
+ def apply_deployment request, options = nil
2984
+ raise ::ArgumentError, "request must be provided" if request.nil?
2985
+
2986
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest
2987
+
2988
+ # Converts hash and nil to an options object
2989
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2990
+
2991
+ # Customize the options with defaults
2992
+ metadata = @config.rpcs.apply_deployment.metadata.to_h
2993
+
2994
+ # Set x-goog-api-client and x-goog-user-project headers
2995
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2996
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2997
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
2998
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2999
+
3000
+ header_params = {}
3001
+ if request.name
3002
+ header_params["name"] = request.name
3003
+ end
3004
+
3005
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3006
+ metadata[:"x-goog-request-params"] ||= request_params_header
3007
+
3008
+ options.apply_defaults timeout: @config.rpcs.apply_deployment.timeout,
3009
+ metadata: metadata,
3010
+ retry_policy: @config.rpcs.apply_deployment.retry_policy
3011
+
3012
+ options.apply_defaults timeout: @config.timeout,
3013
+ metadata: @config.metadata,
3014
+ retry_policy: @config.retry_policy
3015
+
3016
+ @telco_automation_stub.call_rpc :apply_deployment, request, options: options do |response, operation|
3017
+ yield response, operation if block_given?
3018
+ return response
3019
+ end
3020
+ rescue ::GRPC::BadStatus => e
3021
+ raise ::Google::Cloud::Error.from_error(e)
3022
+ end
3023
+
3024
+ ##
3025
+ # Returns the requested deployment status.
3026
+ #
3027
+ # @overload compute_deployment_status(request, options = nil)
3028
+ # Pass arguments to `compute_deployment_status` via a request object, either of type
3029
+ # {::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest} or an equivalent Hash.
3030
+ #
3031
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest, ::Hash]
3032
+ # A request object representing the call parameters. Required. To specify no
3033
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3034
+ # @param options [::Gapic::CallOptions, ::Hash]
3035
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3036
+ #
3037
+ # @overload compute_deployment_status(name: nil)
3038
+ # Pass arguments to `compute_deployment_status` via keyword arguments. Note that at
3039
+ # least one keyword argument is required. To specify no parameters, or to keep all
3040
+ # the default parameter values, pass an empty Hash as a request object (see above).
3041
+ #
3042
+ # @param name [::String]
3043
+ # Required. The name of the deployment without revisionID.
3044
+ #
3045
+ # @yield [response, operation] Access the result along with the RPC operation
3046
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse]
3047
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3048
+ #
3049
+ # @return [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse]
3050
+ #
3051
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3052
+ #
3053
+ # @example Basic example
3054
+ # require "google/cloud/telco_automation/v1"
3055
+ #
3056
+ # # Create a client object. The client can be reused for multiple calls.
3057
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
3058
+ #
3059
+ # # Create a request. To set request fields, pass in keyword arguments.
3060
+ # request = Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new
3061
+ #
3062
+ # # Call the compute_deployment_status method.
3063
+ # result = client.compute_deployment_status request
3064
+ #
3065
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse.
3066
+ # p result
3067
+ #
3068
+ def compute_deployment_status request, options = nil
3069
+ raise ::ArgumentError, "request must be provided" if request.nil?
3070
+
3071
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest
3072
+
3073
+ # Converts hash and nil to an options object
3074
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3075
+
3076
+ # Customize the options with defaults
3077
+ metadata = @config.rpcs.compute_deployment_status.metadata.to_h
3078
+
3079
+ # Set x-goog-api-client and x-goog-user-project headers
3080
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3081
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3082
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
3083
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3084
+
3085
+ header_params = {}
3086
+ if request.name
3087
+ header_params["name"] = request.name
3088
+ end
3089
+
3090
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3091
+ metadata[:"x-goog-request-params"] ||= request_params_header
3092
+
3093
+ options.apply_defaults timeout: @config.rpcs.compute_deployment_status.timeout,
3094
+ metadata: metadata,
3095
+ retry_policy: @config.rpcs.compute_deployment_status.retry_policy
3096
+
3097
+ options.apply_defaults timeout: @config.timeout,
3098
+ metadata: @config.metadata,
3099
+ retry_policy: @config.retry_policy
3100
+
3101
+ @telco_automation_stub.call_rpc :compute_deployment_status, request, options: options do |response, operation|
3102
+ yield response, operation if block_given?
3103
+ return response
3104
+ end
3105
+ rescue ::GRPC::BadStatus => e
3106
+ raise ::Google::Cloud::Error.from_error(e)
3107
+ end
3108
+
3109
+ ##
3110
+ # Rollback the active deployment to the given past approved deployment
3111
+ # revision.
3112
+ #
3113
+ # @overload rollback_deployment(request, options = nil)
3114
+ # Pass arguments to `rollback_deployment` via a request object, either of type
3115
+ # {::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest} or an equivalent Hash.
3116
+ #
3117
+ # @param request [::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest, ::Hash]
3118
+ # A request object representing the call parameters. Required. To specify no
3119
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3120
+ # @param options [::Gapic::CallOptions, ::Hash]
3121
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3122
+ #
3123
+ # @overload rollback_deployment(name: nil, revision_id: nil)
3124
+ # Pass arguments to `rollback_deployment` via keyword arguments. Note that at
3125
+ # least one keyword argument is required. To specify no parameters, or to keep all
3126
+ # the default parameter values, pass an empty Hash as a request object (see above).
3127
+ #
3128
+ # @param name [::String]
3129
+ # Required. Name of the deployment.
3130
+ # @param revision_id [::String]
3131
+ # Required. The revision id of deployment to roll back to.
3132
+ #
3133
+ # @yield [response, operation] Access the result along with the RPC operation
3134
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment]
3135
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3136
+ #
3137
+ # @return [::Google::Cloud::TelcoAutomation::V1::Deployment]
3138
+ #
3139
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3140
+ #
3141
+ # @example Basic example
3142
+ # require "google/cloud/telco_automation/v1"
3143
+ #
3144
+ # # Create a client object. The client can be reused for multiple calls.
3145
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
3146
+ #
3147
+ # # Create a request. To set request fields, pass in keyword arguments.
3148
+ # request = Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new
3149
+ #
3150
+ # # Call the rollback_deployment method.
3151
+ # result = client.rollback_deployment request
3152
+ #
3153
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment.
3154
+ # p result
3155
+ #
3156
+ def rollback_deployment request, options = nil
3157
+ raise ::ArgumentError, "request must be provided" if request.nil?
3158
+
3159
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest
3160
+
3161
+ # Converts hash and nil to an options object
3162
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3163
+
3164
+ # Customize the options with defaults
3165
+ metadata = @config.rpcs.rollback_deployment.metadata.to_h
3166
+
3167
+ # Set x-goog-api-client and x-goog-user-project headers
3168
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3169
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3170
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
3171
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3172
+
3173
+ header_params = {}
3174
+ if request.name
3175
+ header_params["name"] = request.name
3176
+ end
3177
+
3178
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3179
+ metadata[:"x-goog-request-params"] ||= request_params_header
3180
+
3181
+ options.apply_defaults timeout: @config.rpcs.rollback_deployment.timeout,
3182
+ metadata: metadata,
3183
+ retry_policy: @config.rpcs.rollback_deployment.retry_policy
3184
+
3185
+ options.apply_defaults timeout: @config.timeout,
3186
+ metadata: @config.metadata,
3187
+ retry_policy: @config.retry_policy
3188
+
3189
+ @telco_automation_stub.call_rpc :rollback_deployment, request, options: options do |response, operation|
3190
+ yield response, operation if block_given?
3191
+ return response
3192
+ end
3193
+ rescue ::GRPC::BadStatus => e
3194
+ raise ::Google::Cloud::Error.from_error(e)
3195
+ end
3196
+
3197
+ ##
3198
+ # Returns the requested hydrated deployment.
3199
+ #
3200
+ # @overload get_hydrated_deployment(request, options = nil)
3201
+ # Pass arguments to `get_hydrated_deployment` via a request object, either of type
3202
+ # {::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest} or an equivalent Hash.
3203
+ #
3204
+ # @param request [::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest, ::Hash]
3205
+ # A request object representing the call parameters. Required. To specify no
3206
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3207
+ # @param options [::Gapic::CallOptions, ::Hash]
3208
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3209
+ #
3210
+ # @overload get_hydrated_deployment(name: nil)
3211
+ # Pass arguments to `get_hydrated_deployment` via keyword arguments. Note that at
3212
+ # least one keyword argument is required. To specify no parameters, or to keep all
3213
+ # the default parameter values, pass an empty Hash as a request object (see above).
3214
+ #
3215
+ # @param name [::String]
3216
+ # Required. Name of the hydrated deployment.
3217
+ #
3218
+ # @yield [response, operation] Access the result along with the RPC operation
3219
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment]
3220
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3221
+ #
3222
+ # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment]
3223
+ #
3224
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3225
+ #
3226
+ # @example Basic example
3227
+ # require "google/cloud/telco_automation/v1"
3228
+ #
3229
+ # # Create a client object. The client can be reused for multiple calls.
3230
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
3231
+ #
3232
+ # # Create a request. To set request fields, pass in keyword arguments.
3233
+ # request = Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new
3234
+ #
3235
+ # # Call the get_hydrated_deployment method.
3236
+ # result = client.get_hydrated_deployment request
3237
+ #
3238
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment.
3239
+ # p result
3240
+ #
3241
+ def get_hydrated_deployment request, options = nil
3242
+ raise ::ArgumentError, "request must be provided" if request.nil?
3243
+
3244
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest
3245
+
3246
+ # Converts hash and nil to an options object
3247
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3248
+
3249
+ # Customize the options with defaults
3250
+ metadata = @config.rpcs.get_hydrated_deployment.metadata.to_h
3251
+
3252
+ # Set x-goog-api-client and x-goog-user-project headers
3253
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3254
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3255
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
3256
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3257
+
3258
+ header_params = {}
3259
+ if request.name
3260
+ header_params["name"] = request.name
3261
+ end
3262
+
3263
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3264
+ metadata[:"x-goog-request-params"] ||= request_params_header
3265
+
3266
+ options.apply_defaults timeout: @config.rpcs.get_hydrated_deployment.timeout,
3267
+ metadata: metadata,
3268
+ retry_policy: @config.rpcs.get_hydrated_deployment.retry_policy
3269
+
3270
+ options.apply_defaults timeout: @config.timeout,
3271
+ metadata: @config.metadata,
3272
+ retry_policy: @config.retry_policy
3273
+
3274
+ @telco_automation_stub.call_rpc :get_hydrated_deployment, request, options: options do |response, operation|
3275
+ yield response, operation if block_given?
3276
+ return response
3277
+ end
3278
+ rescue ::GRPC::BadStatus => e
3279
+ raise ::Google::Cloud::Error.from_error(e)
3280
+ end
3281
+
3282
+ ##
3283
+ # List all hydrated deployments present under a deployment.
3284
+ #
3285
+ # @overload list_hydrated_deployments(request, options = nil)
3286
+ # Pass arguments to `list_hydrated_deployments` via a request object, either of type
3287
+ # {::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest} or an equivalent Hash.
3288
+ #
3289
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest, ::Hash]
3290
+ # A request object representing the call parameters. Required. To specify no
3291
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3292
+ # @param options [::Gapic::CallOptions, ::Hash]
3293
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3294
+ #
3295
+ # @overload list_hydrated_deployments(parent: nil, page_size: nil, page_token: nil)
3296
+ # Pass arguments to `list_hydrated_deployments` via keyword arguments. Note that at
3297
+ # least one keyword argument is required. To specify no parameters, or to keep all
3298
+ # the default parameter values, pass an empty Hash as a request object (see above).
3299
+ #
3300
+ # @param parent [::String]
3301
+ # Required. The deployment managing the hydrated deployments.
3302
+ # @param page_size [::Integer]
3303
+ # Optional. The maximum number of hydrated deployments to return. The service
3304
+ # may return fewer than this value. If unspecified, at most 50 hydrated
3305
+ # deployments will be returned. The maximum value is 1000. Values above 1000
3306
+ # will be set to 1000.
3307
+ # @param page_token [::String]
3308
+ # Optional. The page token, received from a previous ListHydratedDeployments
3309
+ # call. Provide this to retrieve the subsequent page.
3310
+ #
3311
+ # @yield [response, operation] Access the result along with the RPC operation
3312
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>]
3313
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3314
+ #
3315
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>]
3316
+ #
3317
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3318
+ #
3319
+ # @example Basic example
3320
+ # require "google/cloud/telco_automation/v1"
3321
+ #
3322
+ # # Create a client object. The client can be reused for multiple calls.
3323
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
3324
+ #
3325
+ # # Create a request. To set request fields, pass in keyword arguments.
3326
+ # request = Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.new
3327
+ #
3328
+ # # Call the list_hydrated_deployments method.
3329
+ # result = client.list_hydrated_deployments request
3330
+ #
3331
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3332
+ # # over elements, and API calls will be issued to fetch pages as needed.
3333
+ # result.each do |item|
3334
+ # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.
3335
+ # p item
3336
+ # end
3337
+ #
3338
+ def list_hydrated_deployments request, options = nil
3339
+ raise ::ArgumentError, "request must be provided" if request.nil?
3340
+
3341
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest
3342
+
3343
+ # Converts hash and nil to an options object
3344
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3345
+
3346
+ # Customize the options with defaults
3347
+ metadata = @config.rpcs.list_hydrated_deployments.metadata.to_h
3348
+
3349
+ # Set x-goog-api-client and x-goog-user-project headers
3350
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3351
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3352
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
3353
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3354
+
3355
+ header_params = {}
3356
+ if request.parent
3357
+ header_params["parent"] = request.parent
3358
+ end
3359
+
3360
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3361
+ metadata[:"x-goog-request-params"] ||= request_params_header
3362
+
3363
+ options.apply_defaults timeout: @config.rpcs.list_hydrated_deployments.timeout,
3364
+ metadata: metadata,
3365
+ retry_policy: @config.rpcs.list_hydrated_deployments.retry_policy
3366
+
3367
+ options.apply_defaults timeout: @config.timeout,
3368
+ metadata: @config.metadata,
3369
+ retry_policy: @config.retry_policy
3370
+
3371
+ @telco_automation_stub.call_rpc :list_hydrated_deployments, request, options: options do |response, operation|
3372
+ response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_hydrated_deployments, request, response, operation, options
3373
+ yield response, operation if block_given?
3374
+ return response
3375
+ end
3376
+ rescue ::GRPC::BadStatus => e
3377
+ raise ::Google::Cloud::Error.from_error(e)
3378
+ end
3379
+
3380
+ ##
3381
+ # Updates a hydrated deployment.
3382
+ #
3383
+ # @overload update_hydrated_deployment(request, options = nil)
3384
+ # Pass arguments to `update_hydrated_deployment` via a request object, either of type
3385
+ # {::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest} or an equivalent Hash.
3386
+ #
3387
+ # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest, ::Hash]
3388
+ # A request object representing the call parameters. Required. To specify no
3389
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3390
+ # @param options [::Gapic::CallOptions, ::Hash]
3391
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3392
+ #
3393
+ # @overload update_hydrated_deployment(hydrated_deployment: nil, update_mask: nil)
3394
+ # Pass arguments to `update_hydrated_deployment` via keyword arguments. Note that at
3395
+ # least one keyword argument is required. To specify no parameters, or to keep all
3396
+ # the default parameter values, pass an empty Hash as a request object (see above).
3397
+ #
3398
+ # @param hydrated_deployment [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment, ::Hash]
3399
+ # Required. The hydrated deployment to update.
3400
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3401
+ # Required. The list of fields to update. Update mask supports a special
3402
+ # value `*` which fully replaces (equivalent to PUT) the resource provided.
3403
+ #
3404
+ # @yield [response, operation] Access the result along with the RPC operation
3405
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment]
3406
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3407
+ #
3408
+ # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment]
3409
+ #
3410
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3411
+ #
3412
+ # @example Basic example
3413
+ # require "google/cloud/telco_automation/v1"
3414
+ #
3415
+ # # Create a client object. The client can be reused for multiple calls.
3416
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
3417
+ #
3418
+ # # Create a request. To set request fields, pass in keyword arguments.
3419
+ # request = Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new
3420
+ #
3421
+ # # Call the update_hydrated_deployment method.
3422
+ # result = client.update_hydrated_deployment request
3423
+ #
3424
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment.
3425
+ # p result
3426
+ #
3427
+ def update_hydrated_deployment request, options = nil
3428
+ raise ::ArgumentError, "request must be provided" if request.nil?
3429
+
3430
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest
3431
+
3432
+ # Converts hash and nil to an options object
3433
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3434
+
3435
+ # Customize the options with defaults
3436
+ metadata = @config.rpcs.update_hydrated_deployment.metadata.to_h
3437
+
3438
+ # Set x-goog-api-client and x-goog-user-project headers
3439
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3440
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3441
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
3442
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3443
+
3444
+ header_params = {}
3445
+ if request.hydrated_deployment&.name
3446
+ header_params["hydrated_deployment.name"] = request.hydrated_deployment.name
3447
+ end
3448
+
3449
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3450
+ metadata[:"x-goog-request-params"] ||= request_params_header
3451
+
3452
+ options.apply_defaults timeout: @config.rpcs.update_hydrated_deployment.timeout,
3453
+ metadata: metadata,
3454
+ retry_policy: @config.rpcs.update_hydrated_deployment.retry_policy
3455
+
3456
+ options.apply_defaults timeout: @config.timeout,
3457
+ metadata: @config.metadata,
3458
+ retry_policy: @config.retry_policy
3459
+
3460
+ @telco_automation_stub.call_rpc :update_hydrated_deployment, request, options: options do |response, operation|
3461
+ yield response, operation if block_given?
3462
+ return response
3463
+ end
3464
+ rescue ::GRPC::BadStatus => e
3465
+ raise ::Google::Cloud::Error.from_error(e)
3466
+ end
3467
+
3468
+ ##
3469
+ # Applies a hydrated deployment to a workload cluster.
3470
+ #
3471
+ # @overload apply_hydrated_deployment(request, options = nil)
3472
+ # Pass arguments to `apply_hydrated_deployment` via a request object, either of type
3473
+ # {::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest} or an equivalent Hash.
3474
+ #
3475
+ # @param request [::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest, ::Hash]
3476
+ # A request object representing the call parameters. Required. To specify no
3477
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3478
+ # @param options [::Gapic::CallOptions, ::Hash]
3479
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3480
+ #
3481
+ # @overload apply_hydrated_deployment(name: nil)
3482
+ # Pass arguments to `apply_hydrated_deployment` via keyword arguments. Note that at
3483
+ # least one keyword argument is required. To specify no parameters, or to keep all
3484
+ # the default parameter values, pass an empty Hash as a request object (see above).
3485
+ #
3486
+ # @param name [::String]
3487
+ # Required. The name of the hydrated deployment to apply.
3488
+ #
3489
+ # @yield [response, operation] Access the result along with the RPC operation
3490
+ # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment]
3491
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3492
+ #
3493
+ # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment]
3494
+ #
3495
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3496
+ #
3497
+ # @example Basic example
3498
+ # require "google/cloud/telco_automation/v1"
3499
+ #
3500
+ # # Create a client object. The client can be reused for multiple calls.
3501
+ # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new
3502
+ #
3503
+ # # Create a request. To set request fields, pass in keyword arguments.
3504
+ # request = Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new
3505
+ #
3506
+ # # Call the apply_hydrated_deployment method.
3507
+ # result = client.apply_hydrated_deployment request
3508
+ #
3509
+ # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment.
3510
+ # p result
3511
+ #
3512
+ def apply_hydrated_deployment request, options = nil
3513
+ raise ::ArgumentError, "request must be provided" if request.nil?
3514
+
3515
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest
3516
+
3517
+ # Converts hash and nil to an options object
3518
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3519
+
3520
+ # Customize the options with defaults
3521
+ metadata = @config.rpcs.apply_hydrated_deployment.metadata.to_h
3522
+
3523
+ # Set x-goog-api-client and x-goog-user-project headers
3524
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3525
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3526
+ gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION
3527
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3528
+
3529
+ header_params = {}
3530
+ if request.name
3531
+ header_params["name"] = request.name
3532
+ end
3533
+
3534
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3535
+ metadata[:"x-goog-request-params"] ||= request_params_header
3536
+
3537
+ options.apply_defaults timeout: @config.rpcs.apply_hydrated_deployment.timeout,
3538
+ metadata: metadata,
3539
+ retry_policy: @config.rpcs.apply_hydrated_deployment.retry_policy
3540
+
3541
+ options.apply_defaults timeout: @config.timeout,
3542
+ metadata: @config.metadata,
3543
+ retry_policy: @config.retry_policy
3544
+
3545
+ @telco_automation_stub.call_rpc :apply_hydrated_deployment, request, options: options do |response, operation|
3546
+ yield response, operation if block_given?
3547
+ return response
3548
+ end
3549
+ rescue ::GRPC::BadStatus => e
3550
+ raise ::Google::Cloud::Error.from_error(e)
3551
+ end
3552
+
3553
+ ##
3554
+ # Configuration class for the TelcoAutomation API.
3555
+ #
3556
+ # This class represents the configuration for TelcoAutomation,
3557
+ # providing control over timeouts, retry behavior, logging, transport
3558
+ # parameters, and other low-level controls. Certain parameters can also be
3559
+ # applied individually to specific RPCs. See
3560
+ # {::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client::Configuration::Rpcs}
3561
+ # for a list of RPCs that can be configured independently.
3562
+ #
3563
+ # Configuration can be applied globally to all clients, or to a single client
3564
+ # on construction.
3565
+ #
3566
+ # @example
3567
+ #
3568
+ # # Modify the global config, setting the timeout for
3569
+ # # list_orchestration_clusters to 20 seconds,
3570
+ # # and all remaining timeouts to 10 seconds.
3571
+ # ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.configure do |config|
3572
+ # config.timeout = 10.0
3573
+ # config.rpcs.list_orchestration_clusters.timeout = 20.0
3574
+ # end
3575
+ #
3576
+ # # Apply the above configuration only to a new client.
3577
+ # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config|
3578
+ # config.timeout = 10.0
3579
+ # config.rpcs.list_orchestration_clusters.timeout = 20.0
3580
+ # end
3581
+ #
3582
+ # @!attribute [rw] endpoint
3583
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3584
+ # nil, indicating to use the default endpoint in the current universe domain.
3585
+ # @return [::String,nil]
3586
+ # @!attribute [rw] credentials
3587
+ # Credentials to send with calls. You may provide any of the following types:
3588
+ # * (`String`) The path to a service account key file in JSON format
3589
+ # * (`Hash`) A service account key as a Hash
3590
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3591
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3592
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3593
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3594
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
3595
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
3596
+ # * (`nil`) indicating no credentials
3597
+ # @return [::Object]
3598
+ # @!attribute [rw] scope
3599
+ # The OAuth scopes
3600
+ # @return [::Array<::String>]
3601
+ # @!attribute [rw] lib_name
3602
+ # The library name as recorded in instrumentation and logging
3603
+ # @return [::String]
3604
+ # @!attribute [rw] lib_version
3605
+ # The library version as recorded in instrumentation and logging
3606
+ # @return [::String]
3607
+ # @!attribute [rw] channel_args
3608
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
3609
+ # `GRPC::Core::Channel` object is provided as the credential.
3610
+ # @return [::Hash]
3611
+ # @!attribute [rw] interceptors
3612
+ # An array of interceptors that are run before calls are executed.
3613
+ # @return [::Array<::GRPC::ClientInterceptor>]
3614
+ # @!attribute [rw] timeout
3615
+ # The call timeout in seconds.
3616
+ # @return [::Numeric]
3617
+ # @!attribute [rw] metadata
3618
+ # Additional gRPC headers to be sent with the call.
3619
+ # @return [::Hash{::Symbol=>::String}]
3620
+ # @!attribute [rw] retry_policy
3621
+ # The retry policy. The value is a hash with the following keys:
3622
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3623
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3624
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3625
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3626
+ # trigger a retry.
3627
+ # @return [::Hash]
3628
+ # @!attribute [rw] quota_project
3629
+ # A separate project against which to charge quota.
3630
+ # @return [::String]
3631
+ # @!attribute [rw] universe_domain
3632
+ # The universe domain within which to make requests. This determines the
3633
+ # default endpoint URL. The default value of nil uses the environment
3634
+ # universe (usually the default "googleapis.com" universe).
3635
+ # @return [::String,nil]
3636
+ #
3637
+ class Configuration
3638
+ extend ::Gapic::Config
3639
+
3640
+ # @private
3641
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
3642
+ DEFAULT_ENDPOINT = "telcoautomation.googleapis.com"
3643
+
3644
+ config_attr :endpoint, nil, ::String, nil
3645
+ config_attr :credentials, nil do |value|
3646
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3647
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
3648
+ allowed.any? { |klass| klass === value }
3649
+ end
3650
+ config_attr :scope, nil, ::String, ::Array, nil
3651
+ config_attr :lib_name, nil, ::String, nil
3652
+ config_attr :lib_version, nil, ::String, nil
3653
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
3654
+ config_attr :interceptors, nil, ::Array, nil
3655
+ config_attr :timeout, nil, ::Numeric, nil
3656
+ config_attr :metadata, nil, ::Hash, nil
3657
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3658
+ config_attr :quota_project, nil, ::String, nil
3659
+ config_attr :universe_domain, nil, ::String, nil
3660
+
3661
+ # @private
3662
+ def initialize parent_config = nil
3663
+ @parent_config = parent_config unless parent_config.nil?
3664
+
3665
+ yield self if block_given?
3666
+ end
3667
+
3668
+ ##
3669
+ # Configurations for individual RPCs
3670
+ # @return [Rpcs]
3671
+ #
3672
+ def rpcs
3673
+ @rpcs ||= begin
3674
+ parent_rpcs = nil
3675
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3676
+ Rpcs.new parent_rpcs
3677
+ end
3678
+ end
3679
+
3680
+ ##
3681
+ # Configuration for the channel pool
3682
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
3683
+ #
3684
+ def channel_pool
3685
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
3686
+ end
3687
+
3688
+ ##
3689
+ # Configuration RPC class for the TelcoAutomation API.
3690
+ #
3691
+ # Includes fields providing the configuration for each RPC in this service.
3692
+ # Each configuration object is of type `Gapic::Config::Method` and includes
3693
+ # the following configuration fields:
3694
+ #
3695
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
3696
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
3697
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
3698
+ # include the following keys:
3699
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3700
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3701
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3702
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3703
+ # trigger a retry.
3704
+ #
3705
+ class Rpcs
3706
+ ##
3707
+ # RPC-specific configuration for `list_orchestration_clusters`
3708
+ # @return [::Gapic::Config::Method]
3709
+ #
3710
+ attr_reader :list_orchestration_clusters
3711
+ ##
3712
+ # RPC-specific configuration for `get_orchestration_cluster`
3713
+ # @return [::Gapic::Config::Method]
3714
+ #
3715
+ attr_reader :get_orchestration_cluster
3716
+ ##
3717
+ # RPC-specific configuration for `create_orchestration_cluster`
3718
+ # @return [::Gapic::Config::Method]
3719
+ #
3720
+ attr_reader :create_orchestration_cluster
3721
+ ##
3722
+ # RPC-specific configuration for `delete_orchestration_cluster`
3723
+ # @return [::Gapic::Config::Method]
3724
+ #
3725
+ attr_reader :delete_orchestration_cluster
3726
+ ##
3727
+ # RPC-specific configuration for `list_edge_slms`
3728
+ # @return [::Gapic::Config::Method]
3729
+ #
3730
+ attr_reader :list_edge_slms
3731
+ ##
3732
+ # RPC-specific configuration for `get_edge_slm`
3733
+ # @return [::Gapic::Config::Method]
3734
+ #
3735
+ attr_reader :get_edge_slm
3736
+ ##
3737
+ # RPC-specific configuration for `create_edge_slm`
3738
+ # @return [::Gapic::Config::Method]
3739
+ #
3740
+ attr_reader :create_edge_slm
3741
+ ##
3742
+ # RPC-specific configuration for `delete_edge_slm`
3743
+ # @return [::Gapic::Config::Method]
3744
+ #
3745
+ attr_reader :delete_edge_slm
3746
+ ##
3747
+ # RPC-specific configuration for `create_blueprint`
3748
+ # @return [::Gapic::Config::Method]
3749
+ #
3750
+ attr_reader :create_blueprint
3751
+ ##
3752
+ # RPC-specific configuration for `update_blueprint`
3753
+ # @return [::Gapic::Config::Method]
3754
+ #
3755
+ attr_reader :update_blueprint
3756
+ ##
3757
+ # RPC-specific configuration for `get_blueprint`
3758
+ # @return [::Gapic::Config::Method]
3759
+ #
3760
+ attr_reader :get_blueprint
3761
+ ##
3762
+ # RPC-specific configuration for `delete_blueprint`
3763
+ # @return [::Gapic::Config::Method]
3764
+ #
3765
+ attr_reader :delete_blueprint
3766
+ ##
3767
+ # RPC-specific configuration for `list_blueprints`
3768
+ # @return [::Gapic::Config::Method]
3769
+ #
3770
+ attr_reader :list_blueprints
3771
+ ##
3772
+ # RPC-specific configuration for `approve_blueprint`
3773
+ # @return [::Gapic::Config::Method]
3774
+ #
3775
+ attr_reader :approve_blueprint
3776
+ ##
3777
+ # RPC-specific configuration for `propose_blueprint`
3778
+ # @return [::Gapic::Config::Method]
3779
+ #
3780
+ attr_reader :propose_blueprint
3781
+ ##
3782
+ # RPC-specific configuration for `reject_blueprint`
3783
+ # @return [::Gapic::Config::Method]
3784
+ #
3785
+ attr_reader :reject_blueprint
3786
+ ##
3787
+ # RPC-specific configuration for `list_blueprint_revisions`
3788
+ # @return [::Gapic::Config::Method]
3789
+ #
3790
+ attr_reader :list_blueprint_revisions
3791
+ ##
3792
+ # RPC-specific configuration for `search_blueprint_revisions`
3793
+ # @return [::Gapic::Config::Method]
3794
+ #
3795
+ attr_reader :search_blueprint_revisions
3796
+ ##
3797
+ # RPC-specific configuration for `search_deployment_revisions`
3798
+ # @return [::Gapic::Config::Method]
3799
+ #
3800
+ attr_reader :search_deployment_revisions
3801
+ ##
3802
+ # RPC-specific configuration for `discard_blueprint_changes`
3803
+ # @return [::Gapic::Config::Method]
3804
+ #
3805
+ attr_reader :discard_blueprint_changes
3806
+ ##
3807
+ # RPC-specific configuration for `list_public_blueprints`
3808
+ # @return [::Gapic::Config::Method]
3809
+ #
3810
+ attr_reader :list_public_blueprints
3811
+ ##
3812
+ # RPC-specific configuration for `get_public_blueprint`
3813
+ # @return [::Gapic::Config::Method]
3814
+ #
3815
+ attr_reader :get_public_blueprint
3816
+ ##
3817
+ # RPC-specific configuration for `create_deployment`
3818
+ # @return [::Gapic::Config::Method]
3819
+ #
3820
+ attr_reader :create_deployment
3821
+ ##
3822
+ # RPC-specific configuration for `update_deployment`
3823
+ # @return [::Gapic::Config::Method]
3824
+ #
3825
+ attr_reader :update_deployment
3826
+ ##
3827
+ # RPC-specific configuration for `get_deployment`
3828
+ # @return [::Gapic::Config::Method]
3829
+ #
3830
+ attr_reader :get_deployment
3831
+ ##
3832
+ # RPC-specific configuration for `remove_deployment`
3833
+ # @return [::Gapic::Config::Method]
3834
+ #
3835
+ attr_reader :remove_deployment
3836
+ ##
3837
+ # RPC-specific configuration for `list_deployments`
3838
+ # @return [::Gapic::Config::Method]
3839
+ #
3840
+ attr_reader :list_deployments
3841
+ ##
3842
+ # RPC-specific configuration for `list_deployment_revisions`
3843
+ # @return [::Gapic::Config::Method]
3844
+ #
3845
+ attr_reader :list_deployment_revisions
3846
+ ##
3847
+ # RPC-specific configuration for `discard_deployment_changes`
3848
+ # @return [::Gapic::Config::Method]
3849
+ #
3850
+ attr_reader :discard_deployment_changes
3851
+ ##
3852
+ # RPC-specific configuration for `apply_deployment`
3853
+ # @return [::Gapic::Config::Method]
3854
+ #
3855
+ attr_reader :apply_deployment
3856
+ ##
3857
+ # RPC-specific configuration for `compute_deployment_status`
3858
+ # @return [::Gapic::Config::Method]
3859
+ #
3860
+ attr_reader :compute_deployment_status
3861
+ ##
3862
+ # RPC-specific configuration for `rollback_deployment`
3863
+ # @return [::Gapic::Config::Method]
3864
+ #
3865
+ attr_reader :rollback_deployment
3866
+ ##
3867
+ # RPC-specific configuration for `get_hydrated_deployment`
3868
+ # @return [::Gapic::Config::Method]
3869
+ #
3870
+ attr_reader :get_hydrated_deployment
3871
+ ##
3872
+ # RPC-specific configuration for `list_hydrated_deployments`
3873
+ # @return [::Gapic::Config::Method]
3874
+ #
3875
+ attr_reader :list_hydrated_deployments
3876
+ ##
3877
+ # RPC-specific configuration for `update_hydrated_deployment`
3878
+ # @return [::Gapic::Config::Method]
3879
+ #
3880
+ attr_reader :update_hydrated_deployment
3881
+ ##
3882
+ # RPC-specific configuration for `apply_hydrated_deployment`
3883
+ # @return [::Gapic::Config::Method]
3884
+ #
3885
+ attr_reader :apply_hydrated_deployment
3886
+
3887
+ # @private
3888
+ def initialize parent_rpcs = nil
3889
+ list_orchestration_clusters_config = parent_rpcs.list_orchestration_clusters if parent_rpcs.respond_to? :list_orchestration_clusters
3890
+ @list_orchestration_clusters = ::Gapic::Config::Method.new list_orchestration_clusters_config
3891
+ get_orchestration_cluster_config = parent_rpcs.get_orchestration_cluster if parent_rpcs.respond_to? :get_orchestration_cluster
3892
+ @get_orchestration_cluster = ::Gapic::Config::Method.new get_orchestration_cluster_config
3893
+ create_orchestration_cluster_config = parent_rpcs.create_orchestration_cluster if parent_rpcs.respond_to? :create_orchestration_cluster
3894
+ @create_orchestration_cluster = ::Gapic::Config::Method.new create_orchestration_cluster_config
3895
+ delete_orchestration_cluster_config = parent_rpcs.delete_orchestration_cluster if parent_rpcs.respond_to? :delete_orchestration_cluster
3896
+ @delete_orchestration_cluster = ::Gapic::Config::Method.new delete_orchestration_cluster_config
3897
+ list_edge_slms_config = parent_rpcs.list_edge_slms if parent_rpcs.respond_to? :list_edge_slms
3898
+ @list_edge_slms = ::Gapic::Config::Method.new list_edge_slms_config
3899
+ get_edge_slm_config = parent_rpcs.get_edge_slm if parent_rpcs.respond_to? :get_edge_slm
3900
+ @get_edge_slm = ::Gapic::Config::Method.new get_edge_slm_config
3901
+ create_edge_slm_config = parent_rpcs.create_edge_slm if parent_rpcs.respond_to? :create_edge_slm
3902
+ @create_edge_slm = ::Gapic::Config::Method.new create_edge_slm_config
3903
+ delete_edge_slm_config = parent_rpcs.delete_edge_slm if parent_rpcs.respond_to? :delete_edge_slm
3904
+ @delete_edge_slm = ::Gapic::Config::Method.new delete_edge_slm_config
3905
+ create_blueprint_config = parent_rpcs.create_blueprint if parent_rpcs.respond_to? :create_blueprint
3906
+ @create_blueprint = ::Gapic::Config::Method.new create_blueprint_config
3907
+ update_blueprint_config = parent_rpcs.update_blueprint if parent_rpcs.respond_to? :update_blueprint
3908
+ @update_blueprint = ::Gapic::Config::Method.new update_blueprint_config
3909
+ get_blueprint_config = parent_rpcs.get_blueprint if parent_rpcs.respond_to? :get_blueprint
3910
+ @get_blueprint = ::Gapic::Config::Method.new get_blueprint_config
3911
+ delete_blueprint_config = parent_rpcs.delete_blueprint if parent_rpcs.respond_to? :delete_blueprint
3912
+ @delete_blueprint = ::Gapic::Config::Method.new delete_blueprint_config
3913
+ list_blueprints_config = parent_rpcs.list_blueprints if parent_rpcs.respond_to? :list_blueprints
3914
+ @list_blueprints = ::Gapic::Config::Method.new list_blueprints_config
3915
+ approve_blueprint_config = parent_rpcs.approve_blueprint if parent_rpcs.respond_to? :approve_blueprint
3916
+ @approve_blueprint = ::Gapic::Config::Method.new approve_blueprint_config
3917
+ propose_blueprint_config = parent_rpcs.propose_blueprint if parent_rpcs.respond_to? :propose_blueprint
3918
+ @propose_blueprint = ::Gapic::Config::Method.new propose_blueprint_config
3919
+ reject_blueprint_config = parent_rpcs.reject_blueprint if parent_rpcs.respond_to? :reject_blueprint
3920
+ @reject_blueprint = ::Gapic::Config::Method.new reject_blueprint_config
3921
+ list_blueprint_revisions_config = parent_rpcs.list_blueprint_revisions if parent_rpcs.respond_to? :list_blueprint_revisions
3922
+ @list_blueprint_revisions = ::Gapic::Config::Method.new list_blueprint_revisions_config
3923
+ search_blueprint_revisions_config = parent_rpcs.search_blueprint_revisions if parent_rpcs.respond_to? :search_blueprint_revisions
3924
+ @search_blueprint_revisions = ::Gapic::Config::Method.new search_blueprint_revisions_config
3925
+ search_deployment_revisions_config = parent_rpcs.search_deployment_revisions if parent_rpcs.respond_to? :search_deployment_revisions
3926
+ @search_deployment_revisions = ::Gapic::Config::Method.new search_deployment_revisions_config
3927
+ discard_blueprint_changes_config = parent_rpcs.discard_blueprint_changes if parent_rpcs.respond_to? :discard_blueprint_changes
3928
+ @discard_blueprint_changes = ::Gapic::Config::Method.new discard_blueprint_changes_config
3929
+ list_public_blueprints_config = parent_rpcs.list_public_blueprints if parent_rpcs.respond_to? :list_public_blueprints
3930
+ @list_public_blueprints = ::Gapic::Config::Method.new list_public_blueprints_config
3931
+ get_public_blueprint_config = parent_rpcs.get_public_blueprint if parent_rpcs.respond_to? :get_public_blueprint
3932
+ @get_public_blueprint = ::Gapic::Config::Method.new get_public_blueprint_config
3933
+ create_deployment_config = parent_rpcs.create_deployment if parent_rpcs.respond_to? :create_deployment
3934
+ @create_deployment = ::Gapic::Config::Method.new create_deployment_config
3935
+ update_deployment_config = parent_rpcs.update_deployment if parent_rpcs.respond_to? :update_deployment
3936
+ @update_deployment = ::Gapic::Config::Method.new update_deployment_config
3937
+ get_deployment_config = parent_rpcs.get_deployment if parent_rpcs.respond_to? :get_deployment
3938
+ @get_deployment = ::Gapic::Config::Method.new get_deployment_config
3939
+ remove_deployment_config = parent_rpcs.remove_deployment if parent_rpcs.respond_to? :remove_deployment
3940
+ @remove_deployment = ::Gapic::Config::Method.new remove_deployment_config
3941
+ list_deployments_config = parent_rpcs.list_deployments if parent_rpcs.respond_to? :list_deployments
3942
+ @list_deployments = ::Gapic::Config::Method.new list_deployments_config
3943
+ list_deployment_revisions_config = parent_rpcs.list_deployment_revisions if parent_rpcs.respond_to? :list_deployment_revisions
3944
+ @list_deployment_revisions = ::Gapic::Config::Method.new list_deployment_revisions_config
3945
+ discard_deployment_changes_config = parent_rpcs.discard_deployment_changes if parent_rpcs.respond_to? :discard_deployment_changes
3946
+ @discard_deployment_changes = ::Gapic::Config::Method.new discard_deployment_changes_config
3947
+ apply_deployment_config = parent_rpcs.apply_deployment if parent_rpcs.respond_to? :apply_deployment
3948
+ @apply_deployment = ::Gapic::Config::Method.new apply_deployment_config
3949
+ compute_deployment_status_config = parent_rpcs.compute_deployment_status if parent_rpcs.respond_to? :compute_deployment_status
3950
+ @compute_deployment_status = ::Gapic::Config::Method.new compute_deployment_status_config
3951
+ rollback_deployment_config = parent_rpcs.rollback_deployment if parent_rpcs.respond_to? :rollback_deployment
3952
+ @rollback_deployment = ::Gapic::Config::Method.new rollback_deployment_config
3953
+ get_hydrated_deployment_config = parent_rpcs.get_hydrated_deployment if parent_rpcs.respond_to? :get_hydrated_deployment
3954
+ @get_hydrated_deployment = ::Gapic::Config::Method.new get_hydrated_deployment_config
3955
+ list_hydrated_deployments_config = parent_rpcs.list_hydrated_deployments if parent_rpcs.respond_to? :list_hydrated_deployments
3956
+ @list_hydrated_deployments = ::Gapic::Config::Method.new list_hydrated_deployments_config
3957
+ update_hydrated_deployment_config = parent_rpcs.update_hydrated_deployment if parent_rpcs.respond_to? :update_hydrated_deployment
3958
+ @update_hydrated_deployment = ::Gapic::Config::Method.new update_hydrated_deployment_config
3959
+ apply_hydrated_deployment_config = parent_rpcs.apply_hydrated_deployment if parent_rpcs.respond_to? :apply_hydrated_deployment
3960
+ @apply_hydrated_deployment = ::Gapic::Config::Method.new apply_hydrated_deployment_config
3961
+
3962
+ yield self if block_given?
3963
+ end
3964
+ end
3965
+ end
3966
+ end
3967
+ end
3968
+ end
3969
+ end
3970
+ end
3971
+ end