google-cloud-saas_platform-saas_service_mgmt-v1beta1 0.a → 0.2.0

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