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