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