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