google-cloud-ftp-v1 0.a → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +153 -8
- data/lib/google/cloud/ftp/v1/bindings_override.rb +75 -0
- data/lib/google/cloud/ftp/v1/cloud_ftp/credentials.rb +47 -0
- data/lib/google/cloud/ftp/v1/cloud_ftp/paths.rb +159 -0
- data/lib/google/cloud/ftp/v1/cloud_ftp/rest/client.rb +1617 -0
- data/lib/google/cloud/ftp/v1/cloud_ftp/rest/operations.rb +927 -0
- data/lib/google/cloud/ftp/v1/cloud_ftp/rest/service_stub.rb +819 -0
- data/lib/google/cloud/ftp/v1/cloud_ftp/rest.rb +54 -0
- data/lib/google/cloud/ftp/v1/cloud_ftp.rb +48 -0
- data/lib/google/cloud/ftp/v1/rest.rb +38 -0
- data/lib/google/cloud/ftp/v1/service_pb.rb +62 -0
- data/lib/google/cloud/ftp/v1/service_services_pb.rb +67 -0
- data/lib/google/cloud/ftp/v1/version.rb +7 -2
- data/lib/google/cloud/ftp/v1.rb +40 -0
- data/lib/google-cloud-ftp-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +593 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/ftp/v1/service.rb +683 -0
- data/proto_docs/google/longrunning/operations.rb +191 -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 +128 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- metadata +80 -9
|
@@ -0,0 +1,1617 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 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/ftp/v1/service_pb"
|
|
21
|
+
require "google/cloud/ftp/v1/cloud_ftp/rest/service_stub"
|
|
22
|
+
require "google/cloud/location/rest"
|
|
23
|
+
|
|
24
|
+
module Google
|
|
25
|
+
module Cloud
|
|
26
|
+
module Ftp
|
|
27
|
+
module V1
|
|
28
|
+
module CloudFtp
|
|
29
|
+
module Rest
|
|
30
|
+
##
|
|
31
|
+
# REST client for the CloudFtp service.
|
|
32
|
+
#
|
|
33
|
+
# Service describing handlers for resources
|
|
34
|
+
#
|
|
35
|
+
class Client
|
|
36
|
+
# @private
|
|
37
|
+
API_VERSION = ""
|
|
38
|
+
|
|
39
|
+
# @private
|
|
40
|
+
DEFAULT_ENDPOINT_TEMPLATE = "ftp.$UNIVERSE_DOMAIN$"
|
|
41
|
+
|
|
42
|
+
include Paths
|
|
43
|
+
|
|
44
|
+
# @private
|
|
45
|
+
attr_reader :cloud_ftp_stub
|
|
46
|
+
|
|
47
|
+
##
|
|
48
|
+
# Configure the CloudFtp Client class.
|
|
49
|
+
#
|
|
50
|
+
# See {::Google::Cloud::Ftp::V1::CloudFtp::Rest::Client::Configuration}
|
|
51
|
+
# for a description of the configuration fields.
|
|
52
|
+
#
|
|
53
|
+
# @example
|
|
54
|
+
#
|
|
55
|
+
# # Modify the configuration for all CloudFtp clients
|
|
56
|
+
# ::Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.configure do |config|
|
|
57
|
+
# config.timeout = 10.0
|
|
58
|
+
# end
|
|
59
|
+
#
|
|
60
|
+
# @yield [config] Configure the Client client.
|
|
61
|
+
# @yieldparam config [Client::Configuration]
|
|
62
|
+
#
|
|
63
|
+
# @return [Client::Configuration]
|
|
64
|
+
#
|
|
65
|
+
def self.configure
|
|
66
|
+
@configure ||= begin
|
|
67
|
+
namespace = ["Google", "Cloud", "Ftp", "V1"]
|
|
68
|
+
parent_config = while namespace.any?
|
|
69
|
+
parent_name = namespace.join "::"
|
|
70
|
+
parent_const = const_get parent_name
|
|
71
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
72
|
+
namespace.pop
|
|
73
|
+
end
|
|
74
|
+
default_config = Client::Configuration.new parent_config
|
|
75
|
+
|
|
76
|
+
default_config.rpcs.list_servers.timeout = 60.0
|
|
77
|
+
default_config.rpcs.list_servers.retry_policy = {
|
|
78
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
default_config.rpcs.get_server.timeout = 60.0
|
|
82
|
+
default_config.rpcs.get_server.retry_policy = {
|
|
83
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
default_config.rpcs.create_server.timeout = 60.0
|
|
87
|
+
|
|
88
|
+
default_config.rpcs.update_server.timeout = 60.0
|
|
89
|
+
|
|
90
|
+
default_config.rpcs.delete_server.timeout = 60.0
|
|
91
|
+
|
|
92
|
+
default_config.rpcs.list_users.timeout = 60.0
|
|
93
|
+
default_config.rpcs.list_users.retry_policy = {
|
|
94
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
default_config.rpcs.get_user.timeout = 60.0
|
|
98
|
+
default_config.rpcs.get_user.retry_policy = {
|
|
99
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
default_config.rpcs.create_user.timeout = 60.0
|
|
103
|
+
|
|
104
|
+
default_config.rpcs.update_user.timeout = 60.0
|
|
105
|
+
|
|
106
|
+
default_config.rpcs.delete_user.timeout = 60.0
|
|
107
|
+
|
|
108
|
+
default_config.rpcs.start_server.timeout = 60.0
|
|
109
|
+
|
|
110
|
+
default_config.rpcs.stop_server.timeout = 60.0
|
|
111
|
+
|
|
112
|
+
default_config
|
|
113
|
+
end
|
|
114
|
+
yield @configure if block_given?
|
|
115
|
+
@configure
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
##
|
|
119
|
+
# Configure the CloudFtp Client instance.
|
|
120
|
+
#
|
|
121
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
122
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
123
|
+
# should be made on {Client.configure}.
|
|
124
|
+
#
|
|
125
|
+
# See {::Google::Cloud::Ftp::V1::CloudFtp::Rest::Client::Configuration}
|
|
126
|
+
# for a description of the configuration fields.
|
|
127
|
+
#
|
|
128
|
+
# @yield [config] Configure the Client client.
|
|
129
|
+
# @yieldparam config [Client::Configuration]
|
|
130
|
+
#
|
|
131
|
+
# @return [Client::Configuration]
|
|
132
|
+
#
|
|
133
|
+
def configure
|
|
134
|
+
yield @config if block_given?
|
|
135
|
+
@config
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
##
|
|
139
|
+
# The effective universe domain
|
|
140
|
+
#
|
|
141
|
+
# @return [String]
|
|
142
|
+
#
|
|
143
|
+
def universe_domain
|
|
144
|
+
@cloud_ftp_stub.universe_domain
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
##
|
|
148
|
+
# Create a new CloudFtp REST client object.
|
|
149
|
+
#
|
|
150
|
+
# @example
|
|
151
|
+
#
|
|
152
|
+
# # Create a client using the default configuration
|
|
153
|
+
# client = ::Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
154
|
+
#
|
|
155
|
+
# # Create a client using a custom configuration
|
|
156
|
+
# client = ::Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new do |config|
|
|
157
|
+
# config.timeout = 10.0
|
|
158
|
+
# end
|
|
159
|
+
#
|
|
160
|
+
# @yield [config] Configure the CloudFtp client.
|
|
161
|
+
# @yieldparam config [Client::Configuration]
|
|
162
|
+
#
|
|
163
|
+
def initialize
|
|
164
|
+
# Create the configuration object
|
|
165
|
+
@config = Configuration.new Client.configure
|
|
166
|
+
|
|
167
|
+
# Yield the configuration if needed
|
|
168
|
+
yield @config if block_given?
|
|
169
|
+
|
|
170
|
+
# Create credentials
|
|
171
|
+
credentials = @config.credentials
|
|
172
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
173
|
+
# but only if the default endpoint does not have a region prefix.
|
|
174
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
175
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
176
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
177
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
178
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
179
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
180
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
@quota_project_id = @config.quota_project
|
|
184
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
185
|
+
|
|
186
|
+
@operations_client = ::Google::Cloud::Ftp::V1::CloudFtp::Rest::Operations.new do |config|
|
|
187
|
+
config.credentials = credentials
|
|
188
|
+
config.quota_project = @quota_project_id
|
|
189
|
+
config.endpoint = @config.endpoint
|
|
190
|
+
config.universe_domain = @config.universe_domain
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
@cloud_ftp_stub = ::Google::Cloud::Ftp::V1::CloudFtp::Rest::ServiceStub.new(
|
|
194
|
+
endpoint: @config.endpoint,
|
|
195
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
196
|
+
universe_domain: @config.universe_domain,
|
|
197
|
+
credentials: credentials,
|
|
198
|
+
logger: @config.logger
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
@cloud_ftp_stub.logger(stub: true)&.info do |entry|
|
|
202
|
+
entry.set_system_name
|
|
203
|
+
entry.set_service
|
|
204
|
+
entry.message = "Created client for #{entry.service}"
|
|
205
|
+
entry.set_credentials_fields credentials
|
|
206
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
207
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
208
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
|
212
|
+
config.credentials = credentials
|
|
213
|
+
config.quota_project = @quota_project_id
|
|
214
|
+
config.endpoint = @cloud_ftp_stub.endpoint
|
|
215
|
+
config.universe_domain = @cloud_ftp_stub.universe_domain
|
|
216
|
+
config.bindings_override = @config.bindings_override
|
|
217
|
+
config.logger = @cloud_ftp_stub.logger if config.respond_to? :logger=
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
##
|
|
222
|
+
# Get the associated client for long-running operations.
|
|
223
|
+
#
|
|
224
|
+
# @return [::Google::Cloud::Ftp::V1::CloudFtp::Rest::Operations]
|
|
225
|
+
#
|
|
226
|
+
attr_reader :operations_client
|
|
227
|
+
|
|
228
|
+
##
|
|
229
|
+
# Get the associated client for mix-in of the Locations.
|
|
230
|
+
#
|
|
231
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
|
232
|
+
#
|
|
233
|
+
attr_reader :location_client
|
|
234
|
+
|
|
235
|
+
##
|
|
236
|
+
# The logger used for request/response debug logging.
|
|
237
|
+
#
|
|
238
|
+
# @return [Logger]
|
|
239
|
+
#
|
|
240
|
+
def logger
|
|
241
|
+
@cloud_ftp_stub.logger
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Service calls
|
|
245
|
+
|
|
246
|
+
##
|
|
247
|
+
# Lists Servers in a given project and location.
|
|
248
|
+
#
|
|
249
|
+
# @overload list_servers(request, options = nil)
|
|
250
|
+
# Pass arguments to `list_servers` via a request object, either of type
|
|
251
|
+
# {::Google::Cloud::Ftp::V1::ListServersRequest} or an equivalent Hash.
|
|
252
|
+
#
|
|
253
|
+
# @param request [::Google::Cloud::Ftp::V1::ListServersRequest, ::Hash]
|
|
254
|
+
# A request object representing the call parameters. Required. To specify no
|
|
255
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
256
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
257
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
258
|
+
#
|
|
259
|
+
# @overload list_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil)
|
|
260
|
+
# Pass arguments to `list_servers` via keyword arguments. Note that at
|
|
261
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
262
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
263
|
+
#
|
|
264
|
+
# @param parent [::String]
|
|
265
|
+
# Required. Parent value for ListServersRequest
|
|
266
|
+
# @param page_size [::Integer]
|
|
267
|
+
# Optional. Requested page size. Server may return fewer items than
|
|
268
|
+
# requested. If unspecified, server will pick an appropriate default.
|
|
269
|
+
# @param page_token [::String]
|
|
270
|
+
# Optional. A token identifying a page of results the server should return.
|
|
271
|
+
# @param filter [::String]
|
|
272
|
+
# Optional. Filtering results
|
|
273
|
+
# @param order_by [::String]
|
|
274
|
+
# Optional. Hint for how to order the results
|
|
275
|
+
# @param view [::Google::Cloud::Ftp::V1::ServerView]
|
|
276
|
+
# Optional. The view of the Server resource to return.
|
|
277
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
278
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::Server>]
|
|
279
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
280
|
+
#
|
|
281
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::Server>]
|
|
282
|
+
#
|
|
283
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
284
|
+
#
|
|
285
|
+
# @example Basic example
|
|
286
|
+
# require "google/cloud/ftp/v1"
|
|
287
|
+
#
|
|
288
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
289
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
290
|
+
#
|
|
291
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
292
|
+
# request = Google::Cloud::Ftp::V1::ListServersRequest.new
|
|
293
|
+
#
|
|
294
|
+
# # Call the list_servers method.
|
|
295
|
+
# result = client.list_servers request
|
|
296
|
+
#
|
|
297
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
298
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
299
|
+
# result.each do |item|
|
|
300
|
+
# # Each element is of type ::Google::Cloud::Ftp::V1::Server.
|
|
301
|
+
# p item
|
|
302
|
+
# end
|
|
303
|
+
#
|
|
304
|
+
def list_servers request, options = nil
|
|
305
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
306
|
+
|
|
307
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::ListServersRequest
|
|
308
|
+
|
|
309
|
+
# Converts hash and nil to an options object
|
|
310
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
311
|
+
|
|
312
|
+
# Customize the options with defaults
|
|
313
|
+
call_metadata = @config.rpcs.list_servers.metadata.to_h
|
|
314
|
+
|
|
315
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
316
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
317
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
318
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
319
|
+
transports_version_send: [:rest]
|
|
320
|
+
|
|
321
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
322
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
323
|
+
|
|
324
|
+
options.apply_defaults timeout: @config.rpcs.list_servers.timeout,
|
|
325
|
+
metadata: call_metadata,
|
|
326
|
+
retry_policy: @config.rpcs.list_servers.retry_policy
|
|
327
|
+
|
|
328
|
+
options.apply_defaults timeout: @config.timeout,
|
|
329
|
+
metadata: @config.metadata,
|
|
330
|
+
retry_policy: @config.retry_policy
|
|
331
|
+
|
|
332
|
+
@cloud_ftp_stub.list_servers request, options do |result, operation|
|
|
333
|
+
result = ::Gapic::Rest::PagedEnumerable.new @cloud_ftp_stub, :list_servers, "servers", request, result, options
|
|
334
|
+
yield result, operation if block_given?
|
|
335
|
+
throw :response, result
|
|
336
|
+
end
|
|
337
|
+
rescue ::Gapic::Rest::Error => e
|
|
338
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
##
|
|
342
|
+
# Gets details of a single Server.
|
|
343
|
+
#
|
|
344
|
+
# @overload get_server(request, options = nil)
|
|
345
|
+
# Pass arguments to `get_server` via a request object, either of type
|
|
346
|
+
# {::Google::Cloud::Ftp::V1::GetServerRequest} or an equivalent Hash.
|
|
347
|
+
#
|
|
348
|
+
# @param request [::Google::Cloud::Ftp::V1::GetServerRequest, ::Hash]
|
|
349
|
+
# A request object representing the call parameters. Required. To specify no
|
|
350
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
351
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
352
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
353
|
+
#
|
|
354
|
+
# @overload get_server(name: nil, view: nil)
|
|
355
|
+
# Pass arguments to `get_server` via keyword arguments. Note that at
|
|
356
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
357
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
358
|
+
#
|
|
359
|
+
# @param name [::String]
|
|
360
|
+
# Required. Name of the resource
|
|
361
|
+
# @param view [::Google::Cloud::Ftp::V1::ServerView]
|
|
362
|
+
# Optional. The view of the Server resource to return.
|
|
363
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
364
|
+
# @yieldparam result [::Google::Cloud::Ftp::V1::Server]
|
|
365
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
366
|
+
#
|
|
367
|
+
# @return [::Google::Cloud::Ftp::V1::Server]
|
|
368
|
+
#
|
|
369
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
370
|
+
#
|
|
371
|
+
# @example Basic example
|
|
372
|
+
# require "google/cloud/ftp/v1"
|
|
373
|
+
#
|
|
374
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
375
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
376
|
+
#
|
|
377
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
378
|
+
# request = Google::Cloud::Ftp::V1::GetServerRequest.new
|
|
379
|
+
#
|
|
380
|
+
# # Call the get_server method.
|
|
381
|
+
# result = client.get_server request
|
|
382
|
+
#
|
|
383
|
+
# # The returned object is of type Google::Cloud::Ftp::V1::Server.
|
|
384
|
+
# p result
|
|
385
|
+
#
|
|
386
|
+
def get_server request, options = nil
|
|
387
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
388
|
+
|
|
389
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::GetServerRequest
|
|
390
|
+
|
|
391
|
+
# Converts hash and nil to an options object
|
|
392
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
393
|
+
|
|
394
|
+
# Customize the options with defaults
|
|
395
|
+
call_metadata = @config.rpcs.get_server.metadata.to_h
|
|
396
|
+
|
|
397
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
398
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
399
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
400
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
401
|
+
transports_version_send: [:rest]
|
|
402
|
+
|
|
403
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
404
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
405
|
+
|
|
406
|
+
options.apply_defaults timeout: @config.rpcs.get_server.timeout,
|
|
407
|
+
metadata: call_metadata,
|
|
408
|
+
retry_policy: @config.rpcs.get_server.retry_policy
|
|
409
|
+
|
|
410
|
+
options.apply_defaults timeout: @config.timeout,
|
|
411
|
+
metadata: @config.metadata,
|
|
412
|
+
retry_policy: @config.retry_policy
|
|
413
|
+
|
|
414
|
+
@cloud_ftp_stub.get_server request, options do |result, operation|
|
|
415
|
+
yield result, operation if block_given?
|
|
416
|
+
end
|
|
417
|
+
rescue ::Gapic::Rest::Error => e
|
|
418
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
##
|
|
422
|
+
# Creates a new Server in a given project and location.
|
|
423
|
+
#
|
|
424
|
+
# @overload create_server(request, options = nil)
|
|
425
|
+
# Pass arguments to `create_server` via a request object, either of type
|
|
426
|
+
# {::Google::Cloud::Ftp::V1::CreateServerRequest} or an equivalent Hash.
|
|
427
|
+
#
|
|
428
|
+
# @param request [::Google::Cloud::Ftp::V1::CreateServerRequest, ::Hash]
|
|
429
|
+
# A request object representing the call parameters. Required. To specify no
|
|
430
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
431
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
432
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
433
|
+
#
|
|
434
|
+
# @overload create_server(parent: nil, server_id: nil, server: nil, request_id: nil)
|
|
435
|
+
# Pass arguments to `create_server` via keyword arguments. Note that at
|
|
436
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
437
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
438
|
+
#
|
|
439
|
+
# @param parent [::String]
|
|
440
|
+
# Required. Value for parent.
|
|
441
|
+
# @param server_id [::String]
|
|
442
|
+
# Required. A unique ID for the server. Must start with a lowercase letter,
|
|
443
|
+
# and end with a lowercase letter or number. Can contain lowercase letters,
|
|
444
|
+
# numbers, and hyphens. Maximum length is 30 characters.
|
|
445
|
+
# @param server [::Google::Cloud::Ftp::V1::Server, ::Hash]
|
|
446
|
+
# Required. The resource being created
|
|
447
|
+
# @param request_id [::String]
|
|
448
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
449
|
+
# request ID so that if you must retry your request, the server will know to
|
|
450
|
+
# ignore the request if it has already been completed. The server will
|
|
451
|
+
# guarantee that for at least 60 minutes since the first request.
|
|
452
|
+
#
|
|
453
|
+
# For example, consider a situation where you make an initial request and the
|
|
454
|
+
# request times out. If you make the request again with the same request
|
|
455
|
+
# ID, the server can check if original operation with the same request ID
|
|
456
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
457
|
+
# clients from accidentally creating duplicate commitments.
|
|
458
|
+
#
|
|
459
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
460
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
461
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
462
|
+
# @yieldparam result [::Gapic::Operation]
|
|
463
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
464
|
+
#
|
|
465
|
+
# @return [::Gapic::Operation]
|
|
466
|
+
#
|
|
467
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
468
|
+
#
|
|
469
|
+
# @example Basic example
|
|
470
|
+
# require "google/cloud/ftp/v1"
|
|
471
|
+
#
|
|
472
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
473
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
474
|
+
#
|
|
475
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
476
|
+
# request = Google::Cloud::Ftp::V1::CreateServerRequest.new
|
|
477
|
+
#
|
|
478
|
+
# # Call the create_server method.
|
|
479
|
+
# result = client.create_server request
|
|
480
|
+
#
|
|
481
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
482
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
483
|
+
# # Here is how to wait for a response.
|
|
484
|
+
# result.wait_until_done! timeout: 60
|
|
485
|
+
# if result.response?
|
|
486
|
+
# p result.response
|
|
487
|
+
# else
|
|
488
|
+
# puts "No response received."
|
|
489
|
+
# end
|
|
490
|
+
#
|
|
491
|
+
def create_server request, options = nil
|
|
492
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
493
|
+
|
|
494
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::CreateServerRequest
|
|
495
|
+
|
|
496
|
+
# Converts hash and nil to an options object
|
|
497
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
498
|
+
|
|
499
|
+
# Customize the options with defaults
|
|
500
|
+
call_metadata = @config.rpcs.create_server.metadata.to_h
|
|
501
|
+
|
|
502
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
503
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
504
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
505
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
506
|
+
transports_version_send: [:rest]
|
|
507
|
+
|
|
508
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
509
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
510
|
+
|
|
511
|
+
options.apply_defaults timeout: @config.rpcs.create_server.timeout,
|
|
512
|
+
metadata: call_metadata,
|
|
513
|
+
retry_policy: @config.rpcs.create_server.retry_policy
|
|
514
|
+
|
|
515
|
+
options.apply_defaults timeout: @config.timeout,
|
|
516
|
+
metadata: @config.metadata,
|
|
517
|
+
retry_policy: @config.retry_policy
|
|
518
|
+
|
|
519
|
+
@cloud_ftp_stub.create_server request, options do |result, operation|
|
|
520
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
521
|
+
yield result, operation if block_given?
|
|
522
|
+
throw :response, result
|
|
523
|
+
end
|
|
524
|
+
rescue ::Gapic::Rest::Error => e
|
|
525
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
##
|
|
529
|
+
# Updates the parameters of a single Server.
|
|
530
|
+
#
|
|
531
|
+
# @overload update_server(request, options = nil)
|
|
532
|
+
# Pass arguments to `update_server` via a request object, either of type
|
|
533
|
+
# {::Google::Cloud::Ftp::V1::UpdateServerRequest} or an equivalent Hash.
|
|
534
|
+
#
|
|
535
|
+
# @param request [::Google::Cloud::Ftp::V1::UpdateServerRequest, ::Hash]
|
|
536
|
+
# A request object representing the call parameters. Required. To specify no
|
|
537
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
538
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
539
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
540
|
+
#
|
|
541
|
+
# @overload update_server(update_mask: nil, server: nil, request_id: nil)
|
|
542
|
+
# Pass arguments to `update_server` via keyword arguments. Note that at
|
|
543
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
544
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
545
|
+
#
|
|
546
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
547
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
|
548
|
+
# Server resource by the update.
|
|
549
|
+
# The fields specified in the update_mask are relative to the resource, not
|
|
550
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
|
551
|
+
# user does not provide a mask then all fields present in the request will be
|
|
552
|
+
# overwritten.
|
|
553
|
+
# @param server [::Google::Cloud::Ftp::V1::Server, ::Hash]
|
|
554
|
+
# Required. The resource being updated
|
|
555
|
+
# @param request_id [::String]
|
|
556
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
557
|
+
# request ID so that if you must retry your request, the server will know to
|
|
558
|
+
# ignore the request if it has already been completed. The server will
|
|
559
|
+
# guarantee that for at least 60 minutes since the first request.
|
|
560
|
+
#
|
|
561
|
+
# For example, consider a situation where you make an initial request and the
|
|
562
|
+
# request times out. If you make the request again with the same request
|
|
563
|
+
# ID, the server can check if original operation with the same request ID
|
|
564
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
565
|
+
# clients from accidentally creating duplicate commitments.
|
|
566
|
+
#
|
|
567
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
568
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
569
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
570
|
+
# @yieldparam result [::Gapic::Operation]
|
|
571
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
572
|
+
#
|
|
573
|
+
# @return [::Gapic::Operation]
|
|
574
|
+
#
|
|
575
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
576
|
+
#
|
|
577
|
+
# @example Basic example
|
|
578
|
+
# require "google/cloud/ftp/v1"
|
|
579
|
+
#
|
|
580
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
581
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
582
|
+
#
|
|
583
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
584
|
+
# request = Google::Cloud::Ftp::V1::UpdateServerRequest.new
|
|
585
|
+
#
|
|
586
|
+
# # Call the update_server method.
|
|
587
|
+
# result = client.update_server request
|
|
588
|
+
#
|
|
589
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
590
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
591
|
+
# # Here is how to wait for a response.
|
|
592
|
+
# result.wait_until_done! timeout: 60
|
|
593
|
+
# if result.response?
|
|
594
|
+
# p result.response
|
|
595
|
+
# else
|
|
596
|
+
# puts "No response received."
|
|
597
|
+
# end
|
|
598
|
+
#
|
|
599
|
+
def update_server request, options = nil
|
|
600
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
601
|
+
|
|
602
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::UpdateServerRequest
|
|
603
|
+
|
|
604
|
+
# Converts hash and nil to an options object
|
|
605
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
606
|
+
|
|
607
|
+
# Customize the options with defaults
|
|
608
|
+
call_metadata = @config.rpcs.update_server.metadata.to_h
|
|
609
|
+
|
|
610
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
611
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
612
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
613
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
614
|
+
transports_version_send: [:rest]
|
|
615
|
+
|
|
616
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
617
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
618
|
+
|
|
619
|
+
options.apply_defaults timeout: @config.rpcs.update_server.timeout,
|
|
620
|
+
metadata: call_metadata,
|
|
621
|
+
retry_policy: @config.rpcs.update_server.retry_policy
|
|
622
|
+
|
|
623
|
+
options.apply_defaults timeout: @config.timeout,
|
|
624
|
+
metadata: @config.metadata,
|
|
625
|
+
retry_policy: @config.retry_policy
|
|
626
|
+
|
|
627
|
+
@cloud_ftp_stub.update_server request, options do |result, operation|
|
|
628
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
629
|
+
yield result, operation if block_given?
|
|
630
|
+
throw :response, result
|
|
631
|
+
end
|
|
632
|
+
rescue ::Gapic::Rest::Error => e
|
|
633
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
##
|
|
637
|
+
# Deletes a single Server.
|
|
638
|
+
#
|
|
639
|
+
# @overload delete_server(request, options = nil)
|
|
640
|
+
# Pass arguments to `delete_server` via a request object, either of type
|
|
641
|
+
# {::Google::Cloud::Ftp::V1::DeleteServerRequest} or an equivalent Hash.
|
|
642
|
+
#
|
|
643
|
+
# @param request [::Google::Cloud::Ftp::V1::DeleteServerRequest, ::Hash]
|
|
644
|
+
# A request object representing the call parameters. Required. To specify no
|
|
645
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
646
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
647
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
648
|
+
#
|
|
649
|
+
# @overload delete_server(name: nil)
|
|
650
|
+
# Pass arguments to `delete_server` via keyword arguments. Note that at
|
|
651
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
652
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
653
|
+
#
|
|
654
|
+
# @param name [::String]
|
|
655
|
+
# Required. Name of the resource
|
|
656
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
657
|
+
# @yieldparam result [::Gapic::Operation]
|
|
658
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
659
|
+
#
|
|
660
|
+
# @return [::Gapic::Operation]
|
|
661
|
+
#
|
|
662
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
663
|
+
#
|
|
664
|
+
# @example Basic example
|
|
665
|
+
# require "google/cloud/ftp/v1"
|
|
666
|
+
#
|
|
667
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
668
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
669
|
+
#
|
|
670
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
671
|
+
# request = Google::Cloud::Ftp::V1::DeleteServerRequest.new
|
|
672
|
+
#
|
|
673
|
+
# # Call the delete_server method.
|
|
674
|
+
# result = client.delete_server request
|
|
675
|
+
#
|
|
676
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
677
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
678
|
+
# # Here is how to wait for a response.
|
|
679
|
+
# result.wait_until_done! timeout: 60
|
|
680
|
+
# if result.response?
|
|
681
|
+
# p result.response
|
|
682
|
+
# else
|
|
683
|
+
# puts "No response received."
|
|
684
|
+
# end
|
|
685
|
+
#
|
|
686
|
+
def delete_server request, options = nil
|
|
687
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
688
|
+
|
|
689
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::DeleteServerRequest
|
|
690
|
+
|
|
691
|
+
# Converts hash and nil to an options object
|
|
692
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
693
|
+
|
|
694
|
+
# Customize the options with defaults
|
|
695
|
+
call_metadata = @config.rpcs.delete_server.metadata.to_h
|
|
696
|
+
|
|
697
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
698
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
699
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
700
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
701
|
+
transports_version_send: [:rest]
|
|
702
|
+
|
|
703
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
704
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
705
|
+
|
|
706
|
+
options.apply_defaults timeout: @config.rpcs.delete_server.timeout,
|
|
707
|
+
metadata: call_metadata,
|
|
708
|
+
retry_policy: @config.rpcs.delete_server.retry_policy
|
|
709
|
+
|
|
710
|
+
options.apply_defaults timeout: @config.timeout,
|
|
711
|
+
metadata: @config.metadata,
|
|
712
|
+
retry_policy: @config.retry_policy
|
|
713
|
+
|
|
714
|
+
@cloud_ftp_stub.delete_server request, options do |result, operation|
|
|
715
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
716
|
+
yield result, operation if block_given?
|
|
717
|
+
throw :response, result
|
|
718
|
+
end
|
|
719
|
+
rescue ::Gapic::Rest::Error => e
|
|
720
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
721
|
+
end
|
|
722
|
+
|
|
723
|
+
##
|
|
724
|
+
# Lists Users in a given project and location.
|
|
725
|
+
#
|
|
726
|
+
# @overload list_users(request, options = nil)
|
|
727
|
+
# Pass arguments to `list_users` via a request object, either of type
|
|
728
|
+
# {::Google::Cloud::Ftp::V1::ListUsersRequest} or an equivalent Hash.
|
|
729
|
+
#
|
|
730
|
+
# @param request [::Google::Cloud::Ftp::V1::ListUsersRequest, ::Hash]
|
|
731
|
+
# A request object representing the call parameters. Required. To specify no
|
|
732
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
733
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
734
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
735
|
+
#
|
|
736
|
+
# @overload list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil)
|
|
737
|
+
# Pass arguments to `list_users` via keyword arguments. Note that at
|
|
738
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
739
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
740
|
+
#
|
|
741
|
+
# @param parent [::String]
|
|
742
|
+
# Required. Parent value for ListUsersRequest
|
|
743
|
+
# @param page_size [::Integer]
|
|
744
|
+
# Optional. Requested page size. User may return fewer items than requested.
|
|
745
|
+
# The maximum value is 1000; The default value is 50 if the field is omitted
|
|
746
|
+
# (or set to 0).
|
|
747
|
+
# @param page_token [::String]
|
|
748
|
+
# Optional. A token identifying a page of results the user should return.
|
|
749
|
+
# @param filter [::String]
|
|
750
|
+
# Optional. Filtering results
|
|
751
|
+
# @param order_by [::String]
|
|
752
|
+
# Optional. Hint for how to order the results
|
|
753
|
+
# @param view [::Google::Cloud::Ftp::V1::UserView]
|
|
754
|
+
# Optional. The view of the User resource to return.
|
|
755
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
756
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::User>]
|
|
757
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
758
|
+
#
|
|
759
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::User>]
|
|
760
|
+
#
|
|
761
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
762
|
+
#
|
|
763
|
+
# @example Basic example
|
|
764
|
+
# require "google/cloud/ftp/v1"
|
|
765
|
+
#
|
|
766
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
767
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
768
|
+
#
|
|
769
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
770
|
+
# request = Google::Cloud::Ftp::V1::ListUsersRequest.new
|
|
771
|
+
#
|
|
772
|
+
# # Call the list_users method.
|
|
773
|
+
# result = client.list_users request
|
|
774
|
+
#
|
|
775
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
776
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
777
|
+
# result.each do |item|
|
|
778
|
+
# # Each element is of type ::Google::Cloud::Ftp::V1::User.
|
|
779
|
+
# p item
|
|
780
|
+
# end
|
|
781
|
+
#
|
|
782
|
+
def list_users request, options = nil
|
|
783
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
784
|
+
|
|
785
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::ListUsersRequest
|
|
786
|
+
|
|
787
|
+
# Converts hash and nil to an options object
|
|
788
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
789
|
+
|
|
790
|
+
# Customize the options with defaults
|
|
791
|
+
call_metadata = @config.rpcs.list_users.metadata.to_h
|
|
792
|
+
|
|
793
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
794
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
795
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
796
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
797
|
+
transports_version_send: [:rest]
|
|
798
|
+
|
|
799
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
800
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
801
|
+
|
|
802
|
+
options.apply_defaults timeout: @config.rpcs.list_users.timeout,
|
|
803
|
+
metadata: call_metadata,
|
|
804
|
+
retry_policy: @config.rpcs.list_users.retry_policy
|
|
805
|
+
|
|
806
|
+
options.apply_defaults timeout: @config.timeout,
|
|
807
|
+
metadata: @config.metadata,
|
|
808
|
+
retry_policy: @config.retry_policy
|
|
809
|
+
|
|
810
|
+
@cloud_ftp_stub.list_users request, options do |result, operation|
|
|
811
|
+
result = ::Gapic::Rest::PagedEnumerable.new @cloud_ftp_stub, :list_users, "users", request, result, options
|
|
812
|
+
yield result, operation if block_given?
|
|
813
|
+
throw :response, result
|
|
814
|
+
end
|
|
815
|
+
rescue ::Gapic::Rest::Error => e
|
|
816
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
817
|
+
end
|
|
818
|
+
|
|
819
|
+
##
|
|
820
|
+
# Gets details of a single User.
|
|
821
|
+
#
|
|
822
|
+
# @overload get_user(request, options = nil)
|
|
823
|
+
# Pass arguments to `get_user` via a request object, either of type
|
|
824
|
+
# {::Google::Cloud::Ftp::V1::GetUserRequest} or an equivalent Hash.
|
|
825
|
+
#
|
|
826
|
+
# @param request [::Google::Cloud::Ftp::V1::GetUserRequest, ::Hash]
|
|
827
|
+
# A request object representing the call parameters. Required. To specify no
|
|
828
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
829
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
830
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
831
|
+
#
|
|
832
|
+
# @overload get_user(name: nil, view: nil)
|
|
833
|
+
# Pass arguments to `get_user` via keyword arguments. Note that at
|
|
834
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
835
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
836
|
+
#
|
|
837
|
+
# @param name [::String]
|
|
838
|
+
# Required. Name of the resource
|
|
839
|
+
# @param view [::Google::Cloud::Ftp::V1::UserView]
|
|
840
|
+
# Optional. The view of the User resource to return.
|
|
841
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
842
|
+
# @yieldparam result [::Google::Cloud::Ftp::V1::User]
|
|
843
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
844
|
+
#
|
|
845
|
+
# @return [::Google::Cloud::Ftp::V1::User]
|
|
846
|
+
#
|
|
847
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
848
|
+
#
|
|
849
|
+
# @example Basic example
|
|
850
|
+
# require "google/cloud/ftp/v1"
|
|
851
|
+
#
|
|
852
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
853
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
854
|
+
#
|
|
855
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
856
|
+
# request = Google::Cloud::Ftp::V1::GetUserRequest.new
|
|
857
|
+
#
|
|
858
|
+
# # Call the get_user method.
|
|
859
|
+
# result = client.get_user request
|
|
860
|
+
#
|
|
861
|
+
# # The returned object is of type Google::Cloud::Ftp::V1::User.
|
|
862
|
+
# p result
|
|
863
|
+
#
|
|
864
|
+
def get_user request, options = nil
|
|
865
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
866
|
+
|
|
867
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::GetUserRequest
|
|
868
|
+
|
|
869
|
+
# Converts hash and nil to an options object
|
|
870
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
871
|
+
|
|
872
|
+
# Customize the options with defaults
|
|
873
|
+
call_metadata = @config.rpcs.get_user.metadata.to_h
|
|
874
|
+
|
|
875
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
876
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
877
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
878
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
879
|
+
transports_version_send: [:rest]
|
|
880
|
+
|
|
881
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
882
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
883
|
+
|
|
884
|
+
options.apply_defaults timeout: @config.rpcs.get_user.timeout,
|
|
885
|
+
metadata: call_metadata,
|
|
886
|
+
retry_policy: @config.rpcs.get_user.retry_policy
|
|
887
|
+
|
|
888
|
+
options.apply_defaults timeout: @config.timeout,
|
|
889
|
+
metadata: @config.metadata,
|
|
890
|
+
retry_policy: @config.retry_policy
|
|
891
|
+
|
|
892
|
+
@cloud_ftp_stub.get_user request, options do |result, operation|
|
|
893
|
+
yield result, operation if block_given?
|
|
894
|
+
end
|
|
895
|
+
rescue ::Gapic::Rest::Error => e
|
|
896
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
897
|
+
end
|
|
898
|
+
|
|
899
|
+
##
|
|
900
|
+
# Creates a new User in a given project and location and Server.
|
|
901
|
+
#
|
|
902
|
+
# @overload create_user(request, options = nil)
|
|
903
|
+
# Pass arguments to `create_user` via a request object, either of type
|
|
904
|
+
# {::Google::Cloud::Ftp::V1::CreateUserRequest} or an equivalent Hash.
|
|
905
|
+
#
|
|
906
|
+
# @param request [::Google::Cloud::Ftp::V1::CreateUserRequest, ::Hash]
|
|
907
|
+
# A request object representing the call parameters. Required. To specify no
|
|
908
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
909
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
910
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
911
|
+
#
|
|
912
|
+
# @overload create_user(parent: nil, user_id: nil, user: nil, request_id: nil)
|
|
913
|
+
# Pass arguments to `create_user` via keyword arguments. Note that at
|
|
914
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
915
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
916
|
+
#
|
|
917
|
+
# @param parent [::String]
|
|
918
|
+
# Required. Value for parent.
|
|
919
|
+
# @param user_id [::String]
|
|
920
|
+
# Required. A unique user ID for the SFTP user. The user ID must start with a
|
|
921
|
+
# lowercase letter and can include lowercase letters, numbers, or hyphens.
|
|
922
|
+
# @param user [::Google::Cloud::Ftp::V1::User, ::Hash]
|
|
923
|
+
# Required. The resource being created
|
|
924
|
+
# @param request_id [::String]
|
|
925
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
926
|
+
# request ID so that if you must retry your request, the server will know to
|
|
927
|
+
# ignore the request if it has already been completed. The server will
|
|
928
|
+
# guarantee that for at least 60 minutes since the first request.
|
|
929
|
+
#
|
|
930
|
+
# For example, consider a situation where you make an initial request and the
|
|
931
|
+
# request times out. If you make the request again with the same request
|
|
932
|
+
# ID, the server can check if original operation with the same request ID
|
|
933
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
934
|
+
# clients from accidentally creating duplicate commitments.
|
|
935
|
+
#
|
|
936
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
937
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
938
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
939
|
+
# @yieldparam result [::Gapic::Operation]
|
|
940
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
941
|
+
#
|
|
942
|
+
# @return [::Gapic::Operation]
|
|
943
|
+
#
|
|
944
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
945
|
+
#
|
|
946
|
+
# @example Basic example
|
|
947
|
+
# require "google/cloud/ftp/v1"
|
|
948
|
+
#
|
|
949
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
950
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
951
|
+
#
|
|
952
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
953
|
+
# request = Google::Cloud::Ftp::V1::CreateUserRequest.new
|
|
954
|
+
#
|
|
955
|
+
# # Call the create_user method.
|
|
956
|
+
# result = client.create_user request
|
|
957
|
+
#
|
|
958
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
959
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
960
|
+
# # Here is how to wait for a response.
|
|
961
|
+
# result.wait_until_done! timeout: 60
|
|
962
|
+
# if result.response?
|
|
963
|
+
# p result.response
|
|
964
|
+
# else
|
|
965
|
+
# puts "No response received."
|
|
966
|
+
# end
|
|
967
|
+
#
|
|
968
|
+
def create_user request, options = nil
|
|
969
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
970
|
+
|
|
971
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::CreateUserRequest
|
|
972
|
+
|
|
973
|
+
# Converts hash and nil to an options object
|
|
974
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
975
|
+
|
|
976
|
+
# Customize the options with defaults
|
|
977
|
+
call_metadata = @config.rpcs.create_user.metadata.to_h
|
|
978
|
+
|
|
979
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
980
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
981
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
982
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
983
|
+
transports_version_send: [:rest]
|
|
984
|
+
|
|
985
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
986
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
987
|
+
|
|
988
|
+
options.apply_defaults timeout: @config.rpcs.create_user.timeout,
|
|
989
|
+
metadata: call_metadata,
|
|
990
|
+
retry_policy: @config.rpcs.create_user.retry_policy
|
|
991
|
+
|
|
992
|
+
options.apply_defaults timeout: @config.timeout,
|
|
993
|
+
metadata: @config.metadata,
|
|
994
|
+
retry_policy: @config.retry_policy
|
|
995
|
+
|
|
996
|
+
@cloud_ftp_stub.create_user request, options do |result, operation|
|
|
997
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
998
|
+
yield result, operation if block_given?
|
|
999
|
+
throw :response, result
|
|
1000
|
+
end
|
|
1001
|
+
rescue ::Gapic::Rest::Error => e
|
|
1002
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1003
|
+
end
|
|
1004
|
+
|
|
1005
|
+
##
|
|
1006
|
+
# Updates the parameters of a single User.
|
|
1007
|
+
#
|
|
1008
|
+
# @overload update_user(request, options = nil)
|
|
1009
|
+
# Pass arguments to `update_user` via a request object, either of type
|
|
1010
|
+
# {::Google::Cloud::Ftp::V1::UpdateUserRequest} or an equivalent Hash.
|
|
1011
|
+
#
|
|
1012
|
+
# @param request [::Google::Cloud::Ftp::V1::UpdateUserRequest, ::Hash]
|
|
1013
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1014
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1015
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1016
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1017
|
+
#
|
|
1018
|
+
# @overload update_user(update_mask: nil, user: nil)
|
|
1019
|
+
# Pass arguments to `update_user` via keyword arguments. Note that at
|
|
1020
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1021
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1022
|
+
#
|
|
1023
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
1024
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
|
1025
|
+
# User resource by the update.
|
|
1026
|
+
# The fields specified in the update_mask are relative to the resource, not
|
|
1027
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
|
1028
|
+
# user does not provide a mask then all fields present in the request will be
|
|
1029
|
+
# overwritten.
|
|
1030
|
+
# @param user [::Google::Cloud::Ftp::V1::User, ::Hash]
|
|
1031
|
+
# Required. The resource being updated
|
|
1032
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1033
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1034
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1035
|
+
#
|
|
1036
|
+
# @return [::Gapic::Operation]
|
|
1037
|
+
#
|
|
1038
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1039
|
+
#
|
|
1040
|
+
# @example Basic example
|
|
1041
|
+
# require "google/cloud/ftp/v1"
|
|
1042
|
+
#
|
|
1043
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1044
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
1045
|
+
#
|
|
1046
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1047
|
+
# request = Google::Cloud::Ftp::V1::UpdateUserRequest.new
|
|
1048
|
+
#
|
|
1049
|
+
# # Call the update_user method.
|
|
1050
|
+
# result = client.update_user request
|
|
1051
|
+
#
|
|
1052
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1053
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1054
|
+
# # Here is how to wait for a response.
|
|
1055
|
+
# result.wait_until_done! timeout: 60
|
|
1056
|
+
# if result.response?
|
|
1057
|
+
# p result.response
|
|
1058
|
+
# else
|
|
1059
|
+
# puts "No response received."
|
|
1060
|
+
# end
|
|
1061
|
+
#
|
|
1062
|
+
def update_user request, options = nil
|
|
1063
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1064
|
+
|
|
1065
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::UpdateUserRequest
|
|
1066
|
+
|
|
1067
|
+
# Converts hash and nil to an options object
|
|
1068
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1069
|
+
|
|
1070
|
+
# Customize the options with defaults
|
|
1071
|
+
call_metadata = @config.rpcs.update_user.metadata.to_h
|
|
1072
|
+
|
|
1073
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1074
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1075
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1076
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
1077
|
+
transports_version_send: [:rest]
|
|
1078
|
+
|
|
1079
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1080
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1081
|
+
|
|
1082
|
+
options.apply_defaults timeout: @config.rpcs.update_user.timeout,
|
|
1083
|
+
metadata: call_metadata,
|
|
1084
|
+
retry_policy: @config.rpcs.update_user.retry_policy
|
|
1085
|
+
|
|
1086
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1087
|
+
metadata: @config.metadata,
|
|
1088
|
+
retry_policy: @config.retry_policy
|
|
1089
|
+
|
|
1090
|
+
@cloud_ftp_stub.update_user request, options do |result, operation|
|
|
1091
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1092
|
+
yield result, operation if block_given?
|
|
1093
|
+
throw :response, result
|
|
1094
|
+
end
|
|
1095
|
+
rescue ::Gapic::Rest::Error => e
|
|
1096
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1097
|
+
end
|
|
1098
|
+
|
|
1099
|
+
##
|
|
1100
|
+
# Deletes a single User.
|
|
1101
|
+
#
|
|
1102
|
+
# @overload delete_user(request, options = nil)
|
|
1103
|
+
# Pass arguments to `delete_user` via a request object, either of type
|
|
1104
|
+
# {::Google::Cloud::Ftp::V1::DeleteUserRequest} or an equivalent Hash.
|
|
1105
|
+
#
|
|
1106
|
+
# @param request [::Google::Cloud::Ftp::V1::DeleteUserRequest, ::Hash]
|
|
1107
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1108
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1109
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1110
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1111
|
+
#
|
|
1112
|
+
# @overload delete_user(name: nil, force: nil)
|
|
1113
|
+
# Pass arguments to `delete_user` via keyword arguments. Note that at
|
|
1114
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1115
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1116
|
+
#
|
|
1117
|
+
# @param name [::String]
|
|
1118
|
+
# Required. Name of the resource
|
|
1119
|
+
# @param force [::Boolean]
|
|
1120
|
+
# Optional. If set to true, the request will force the deletion of the User.
|
|
1121
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1122
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1123
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1124
|
+
#
|
|
1125
|
+
# @return [::Gapic::Operation]
|
|
1126
|
+
#
|
|
1127
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1128
|
+
#
|
|
1129
|
+
# @example Basic example
|
|
1130
|
+
# require "google/cloud/ftp/v1"
|
|
1131
|
+
#
|
|
1132
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1133
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
1134
|
+
#
|
|
1135
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1136
|
+
# request = Google::Cloud::Ftp::V1::DeleteUserRequest.new
|
|
1137
|
+
#
|
|
1138
|
+
# # Call the delete_user method.
|
|
1139
|
+
# result = client.delete_user request
|
|
1140
|
+
#
|
|
1141
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1142
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1143
|
+
# # Here is how to wait for a response.
|
|
1144
|
+
# result.wait_until_done! timeout: 60
|
|
1145
|
+
# if result.response?
|
|
1146
|
+
# p result.response
|
|
1147
|
+
# else
|
|
1148
|
+
# puts "No response received."
|
|
1149
|
+
# end
|
|
1150
|
+
#
|
|
1151
|
+
def delete_user request, options = nil
|
|
1152
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1153
|
+
|
|
1154
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::DeleteUserRequest
|
|
1155
|
+
|
|
1156
|
+
# Converts hash and nil to an options object
|
|
1157
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1158
|
+
|
|
1159
|
+
# Customize the options with defaults
|
|
1160
|
+
call_metadata = @config.rpcs.delete_user.metadata.to_h
|
|
1161
|
+
|
|
1162
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1163
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1164
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1165
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
1166
|
+
transports_version_send: [:rest]
|
|
1167
|
+
|
|
1168
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1169
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1170
|
+
|
|
1171
|
+
options.apply_defaults timeout: @config.rpcs.delete_user.timeout,
|
|
1172
|
+
metadata: call_metadata,
|
|
1173
|
+
retry_policy: @config.rpcs.delete_user.retry_policy
|
|
1174
|
+
|
|
1175
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1176
|
+
metadata: @config.metadata,
|
|
1177
|
+
retry_policy: @config.retry_policy
|
|
1178
|
+
|
|
1179
|
+
@cloud_ftp_stub.delete_user request, options do |result, operation|
|
|
1180
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1181
|
+
yield result, operation if block_given?
|
|
1182
|
+
throw :response, result
|
|
1183
|
+
end
|
|
1184
|
+
rescue ::Gapic::Rest::Error => e
|
|
1185
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1186
|
+
end
|
|
1187
|
+
|
|
1188
|
+
##
|
|
1189
|
+
# Starts a stopping/stopped Server.
|
|
1190
|
+
#
|
|
1191
|
+
# @overload start_server(request, options = nil)
|
|
1192
|
+
# Pass arguments to `start_server` via a request object, either of type
|
|
1193
|
+
# {::Google::Cloud::Ftp::V1::StartServerRequest} or an equivalent Hash.
|
|
1194
|
+
#
|
|
1195
|
+
# @param request [::Google::Cloud::Ftp::V1::StartServerRequest, ::Hash]
|
|
1196
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1197
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1198
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1199
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1200
|
+
#
|
|
1201
|
+
# @overload start_server(name: nil)
|
|
1202
|
+
# Pass arguments to `start_server` via keyword arguments. Note that at
|
|
1203
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1204
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1205
|
+
#
|
|
1206
|
+
# @param name [::String]
|
|
1207
|
+
# Required. Name of the resource
|
|
1208
|
+
# Format: `projects/{project}/locations/{location}/servers/{server}`
|
|
1209
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1210
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1211
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1212
|
+
#
|
|
1213
|
+
# @return [::Gapic::Operation]
|
|
1214
|
+
#
|
|
1215
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1216
|
+
#
|
|
1217
|
+
# @example Basic example
|
|
1218
|
+
# require "google/cloud/ftp/v1"
|
|
1219
|
+
#
|
|
1220
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1221
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
1222
|
+
#
|
|
1223
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1224
|
+
# request = Google::Cloud::Ftp::V1::StartServerRequest.new
|
|
1225
|
+
#
|
|
1226
|
+
# # Call the start_server method.
|
|
1227
|
+
# result = client.start_server request
|
|
1228
|
+
#
|
|
1229
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1230
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1231
|
+
# # Here is how to wait for a response.
|
|
1232
|
+
# result.wait_until_done! timeout: 60
|
|
1233
|
+
# if result.response?
|
|
1234
|
+
# p result.response
|
|
1235
|
+
# else
|
|
1236
|
+
# puts "No response received."
|
|
1237
|
+
# end
|
|
1238
|
+
#
|
|
1239
|
+
def start_server request, options = nil
|
|
1240
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1241
|
+
|
|
1242
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::StartServerRequest
|
|
1243
|
+
|
|
1244
|
+
# Converts hash and nil to an options object
|
|
1245
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1246
|
+
|
|
1247
|
+
# Customize the options with defaults
|
|
1248
|
+
call_metadata = @config.rpcs.start_server.metadata.to_h
|
|
1249
|
+
|
|
1250
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1251
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1252
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1253
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
1254
|
+
transports_version_send: [:rest]
|
|
1255
|
+
|
|
1256
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1257
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1258
|
+
|
|
1259
|
+
options.apply_defaults timeout: @config.rpcs.start_server.timeout,
|
|
1260
|
+
metadata: call_metadata,
|
|
1261
|
+
retry_policy: @config.rpcs.start_server.retry_policy
|
|
1262
|
+
|
|
1263
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1264
|
+
metadata: @config.metadata,
|
|
1265
|
+
retry_policy: @config.retry_policy
|
|
1266
|
+
|
|
1267
|
+
@cloud_ftp_stub.start_server request, options do |result, operation|
|
|
1268
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1269
|
+
yield result, operation if block_given?
|
|
1270
|
+
throw :response, result
|
|
1271
|
+
end
|
|
1272
|
+
rescue ::Gapic::Rest::Error => e
|
|
1273
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1274
|
+
end
|
|
1275
|
+
|
|
1276
|
+
##
|
|
1277
|
+
# Stops an active Server.
|
|
1278
|
+
#
|
|
1279
|
+
# @overload stop_server(request, options = nil)
|
|
1280
|
+
# Pass arguments to `stop_server` via a request object, either of type
|
|
1281
|
+
# {::Google::Cloud::Ftp::V1::StopServerRequest} or an equivalent Hash.
|
|
1282
|
+
#
|
|
1283
|
+
# @param request [::Google::Cloud::Ftp::V1::StopServerRequest, ::Hash]
|
|
1284
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1285
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1286
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1287
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1288
|
+
#
|
|
1289
|
+
# @overload stop_server(name: nil)
|
|
1290
|
+
# Pass arguments to `stop_server` via keyword arguments. Note that at
|
|
1291
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1292
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1293
|
+
#
|
|
1294
|
+
# @param name [::String]
|
|
1295
|
+
# Required. Name of the resource.
|
|
1296
|
+
# Format: `projects/{project}/locations/{location}/servers/{server}`
|
|
1297
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1298
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1299
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1300
|
+
#
|
|
1301
|
+
# @return [::Gapic::Operation]
|
|
1302
|
+
#
|
|
1303
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1304
|
+
#
|
|
1305
|
+
# @example Basic example
|
|
1306
|
+
# require "google/cloud/ftp/v1"
|
|
1307
|
+
#
|
|
1308
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1309
|
+
# client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new
|
|
1310
|
+
#
|
|
1311
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1312
|
+
# request = Google::Cloud::Ftp::V1::StopServerRequest.new
|
|
1313
|
+
#
|
|
1314
|
+
# # Call the stop_server method.
|
|
1315
|
+
# result = client.stop_server request
|
|
1316
|
+
#
|
|
1317
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1318
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1319
|
+
# # Here is how to wait for a response.
|
|
1320
|
+
# result.wait_until_done! timeout: 60
|
|
1321
|
+
# if result.response?
|
|
1322
|
+
# p result.response
|
|
1323
|
+
# else
|
|
1324
|
+
# puts "No response received."
|
|
1325
|
+
# end
|
|
1326
|
+
#
|
|
1327
|
+
def stop_server request, options = nil
|
|
1328
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1329
|
+
|
|
1330
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ftp::V1::StopServerRequest
|
|
1331
|
+
|
|
1332
|
+
# Converts hash and nil to an options object
|
|
1333
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1334
|
+
|
|
1335
|
+
# Customize the options with defaults
|
|
1336
|
+
call_metadata = @config.rpcs.stop_server.metadata.to_h
|
|
1337
|
+
|
|
1338
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1339
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1340
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1341
|
+
gapic_version: ::Google::Cloud::Ftp::V1::VERSION,
|
|
1342
|
+
transports_version_send: [:rest]
|
|
1343
|
+
|
|
1344
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1345
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1346
|
+
|
|
1347
|
+
options.apply_defaults timeout: @config.rpcs.stop_server.timeout,
|
|
1348
|
+
metadata: call_metadata,
|
|
1349
|
+
retry_policy: @config.rpcs.stop_server.retry_policy
|
|
1350
|
+
|
|
1351
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1352
|
+
metadata: @config.metadata,
|
|
1353
|
+
retry_policy: @config.retry_policy
|
|
1354
|
+
|
|
1355
|
+
@cloud_ftp_stub.stop_server request, options do |result, operation|
|
|
1356
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1357
|
+
yield result, operation if block_given?
|
|
1358
|
+
throw :response, result
|
|
1359
|
+
end
|
|
1360
|
+
rescue ::Gapic::Rest::Error => e
|
|
1361
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1362
|
+
end
|
|
1363
|
+
|
|
1364
|
+
##
|
|
1365
|
+
# Configuration class for the CloudFtp REST API.
|
|
1366
|
+
#
|
|
1367
|
+
# This class represents the configuration for CloudFtp REST,
|
|
1368
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
1369
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
1370
|
+
# applied individually to specific RPCs. See
|
|
1371
|
+
# {::Google::Cloud::Ftp::V1::CloudFtp::Rest::Client::Configuration::Rpcs}
|
|
1372
|
+
# for a list of RPCs that can be configured independently.
|
|
1373
|
+
#
|
|
1374
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
1375
|
+
# on construction.
|
|
1376
|
+
#
|
|
1377
|
+
# @example
|
|
1378
|
+
#
|
|
1379
|
+
# # Modify the global config, setting the timeout for
|
|
1380
|
+
# # list_servers to 20 seconds,
|
|
1381
|
+
# # and all remaining timeouts to 10 seconds.
|
|
1382
|
+
# ::Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.configure do |config|
|
|
1383
|
+
# config.timeout = 10.0
|
|
1384
|
+
# config.rpcs.list_servers.timeout = 20.0
|
|
1385
|
+
# end
|
|
1386
|
+
#
|
|
1387
|
+
# # Apply the above configuration only to a new client.
|
|
1388
|
+
# client = ::Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new do |config|
|
|
1389
|
+
# config.timeout = 10.0
|
|
1390
|
+
# config.rpcs.list_servers.timeout = 20.0
|
|
1391
|
+
# end
|
|
1392
|
+
#
|
|
1393
|
+
# @!attribute [rw] endpoint
|
|
1394
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
1395
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
1396
|
+
# @return [::String,nil]
|
|
1397
|
+
# @!attribute [rw] credentials
|
|
1398
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
1399
|
+
# * (`String`) The path to a service account key file in JSON format
|
|
1400
|
+
# * (`Hash`) A service account key as a Hash
|
|
1401
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1402
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1403
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
1404
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
1405
|
+
# * (`nil`) indicating no credentials
|
|
1406
|
+
#
|
|
1407
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1408
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
1409
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1410
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
1411
|
+
# For more information, refer to [Validate credential configurations from external
|
|
1412
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
1413
|
+
# @return [::Object]
|
|
1414
|
+
# @!attribute [rw] scope
|
|
1415
|
+
# The OAuth scopes
|
|
1416
|
+
# @return [::Array<::String>]
|
|
1417
|
+
# @!attribute [rw] lib_name
|
|
1418
|
+
# The library name as recorded in instrumentation and logging
|
|
1419
|
+
# @return [::String]
|
|
1420
|
+
# @!attribute [rw] lib_version
|
|
1421
|
+
# The library version as recorded in instrumentation and logging
|
|
1422
|
+
# @return [::String]
|
|
1423
|
+
# @!attribute [rw] timeout
|
|
1424
|
+
# The call timeout in seconds.
|
|
1425
|
+
# @return [::Numeric]
|
|
1426
|
+
# @!attribute [rw] metadata
|
|
1427
|
+
# Additional headers to be sent with the call.
|
|
1428
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
1429
|
+
# @!attribute [rw] retry_policy
|
|
1430
|
+
# The retry policy. The value is a hash with the following keys:
|
|
1431
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1432
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1433
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1434
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
1435
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1436
|
+
# trigger a retry.
|
|
1437
|
+
# @return [::Hash]
|
|
1438
|
+
# @!attribute [rw] quota_project
|
|
1439
|
+
# A separate project against which to charge quota.
|
|
1440
|
+
# @return [::String]
|
|
1441
|
+
# @!attribute [rw] universe_domain
|
|
1442
|
+
# The universe domain within which to make requests. This determines the
|
|
1443
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
1444
|
+
# universe (usually the default "googleapis.com" universe).
|
|
1445
|
+
# @return [::String,nil]
|
|
1446
|
+
# @!attribute [rw] logger
|
|
1447
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
1448
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
1449
|
+
# explicitly disable logging.
|
|
1450
|
+
# @return [::Logger,:default,nil]
|
|
1451
|
+
#
|
|
1452
|
+
class Configuration
|
|
1453
|
+
extend ::Gapic::Config
|
|
1454
|
+
|
|
1455
|
+
# @private
|
|
1456
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
1457
|
+
DEFAULT_ENDPOINT = "ftp.googleapis.com"
|
|
1458
|
+
|
|
1459
|
+
config_attr :endpoint, nil, ::String, nil
|
|
1460
|
+
config_attr :credentials, nil do |value|
|
|
1461
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
1462
|
+
allowed.any? { |klass| klass === value }
|
|
1463
|
+
end
|
|
1464
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
1465
|
+
config_attr :lib_name, nil, ::String, nil
|
|
1466
|
+
config_attr :lib_version, nil, ::String, nil
|
|
1467
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
1468
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
1469
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1470
|
+
config_attr :quota_project, nil, ::String, nil
|
|
1471
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
1472
|
+
|
|
1473
|
+
# @private
|
|
1474
|
+
# Overrides for http bindings for the RPCs of this service
|
|
1475
|
+
# are only used when this service is used as mixin, and only
|
|
1476
|
+
# by the host service.
|
|
1477
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
|
1478
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
|
1479
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
1480
|
+
|
|
1481
|
+
# @private
|
|
1482
|
+
def initialize parent_config = nil
|
|
1483
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
1484
|
+
|
|
1485
|
+
yield self if block_given?
|
|
1486
|
+
end
|
|
1487
|
+
|
|
1488
|
+
##
|
|
1489
|
+
# Configurations for individual RPCs
|
|
1490
|
+
# @return [Rpcs]
|
|
1491
|
+
#
|
|
1492
|
+
def rpcs
|
|
1493
|
+
@rpcs ||= begin
|
|
1494
|
+
parent_rpcs = nil
|
|
1495
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
1496
|
+
Rpcs.new parent_rpcs
|
|
1497
|
+
end
|
|
1498
|
+
end
|
|
1499
|
+
|
|
1500
|
+
##
|
|
1501
|
+
# Configuration RPC class for the CloudFtp API.
|
|
1502
|
+
#
|
|
1503
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
1504
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
1505
|
+
# the following configuration fields:
|
|
1506
|
+
#
|
|
1507
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
1508
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
|
1509
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
1510
|
+
# include the following keys:
|
|
1511
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1512
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1513
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1514
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
1515
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1516
|
+
# trigger a retry.
|
|
1517
|
+
#
|
|
1518
|
+
class Rpcs
|
|
1519
|
+
##
|
|
1520
|
+
# RPC-specific configuration for `list_servers`
|
|
1521
|
+
# @return [::Gapic::Config::Method]
|
|
1522
|
+
#
|
|
1523
|
+
attr_reader :list_servers
|
|
1524
|
+
##
|
|
1525
|
+
# RPC-specific configuration for `get_server`
|
|
1526
|
+
# @return [::Gapic::Config::Method]
|
|
1527
|
+
#
|
|
1528
|
+
attr_reader :get_server
|
|
1529
|
+
##
|
|
1530
|
+
# RPC-specific configuration for `create_server`
|
|
1531
|
+
# @return [::Gapic::Config::Method]
|
|
1532
|
+
#
|
|
1533
|
+
attr_reader :create_server
|
|
1534
|
+
##
|
|
1535
|
+
# RPC-specific configuration for `update_server`
|
|
1536
|
+
# @return [::Gapic::Config::Method]
|
|
1537
|
+
#
|
|
1538
|
+
attr_reader :update_server
|
|
1539
|
+
##
|
|
1540
|
+
# RPC-specific configuration for `delete_server`
|
|
1541
|
+
# @return [::Gapic::Config::Method]
|
|
1542
|
+
#
|
|
1543
|
+
attr_reader :delete_server
|
|
1544
|
+
##
|
|
1545
|
+
# RPC-specific configuration for `list_users`
|
|
1546
|
+
# @return [::Gapic::Config::Method]
|
|
1547
|
+
#
|
|
1548
|
+
attr_reader :list_users
|
|
1549
|
+
##
|
|
1550
|
+
# RPC-specific configuration for `get_user`
|
|
1551
|
+
# @return [::Gapic::Config::Method]
|
|
1552
|
+
#
|
|
1553
|
+
attr_reader :get_user
|
|
1554
|
+
##
|
|
1555
|
+
# RPC-specific configuration for `create_user`
|
|
1556
|
+
# @return [::Gapic::Config::Method]
|
|
1557
|
+
#
|
|
1558
|
+
attr_reader :create_user
|
|
1559
|
+
##
|
|
1560
|
+
# RPC-specific configuration for `update_user`
|
|
1561
|
+
# @return [::Gapic::Config::Method]
|
|
1562
|
+
#
|
|
1563
|
+
attr_reader :update_user
|
|
1564
|
+
##
|
|
1565
|
+
# RPC-specific configuration for `delete_user`
|
|
1566
|
+
# @return [::Gapic::Config::Method]
|
|
1567
|
+
#
|
|
1568
|
+
attr_reader :delete_user
|
|
1569
|
+
##
|
|
1570
|
+
# RPC-specific configuration for `start_server`
|
|
1571
|
+
# @return [::Gapic::Config::Method]
|
|
1572
|
+
#
|
|
1573
|
+
attr_reader :start_server
|
|
1574
|
+
##
|
|
1575
|
+
# RPC-specific configuration for `stop_server`
|
|
1576
|
+
# @return [::Gapic::Config::Method]
|
|
1577
|
+
#
|
|
1578
|
+
attr_reader :stop_server
|
|
1579
|
+
|
|
1580
|
+
# @private
|
|
1581
|
+
def initialize parent_rpcs = nil
|
|
1582
|
+
list_servers_config = parent_rpcs.list_servers if parent_rpcs.respond_to? :list_servers
|
|
1583
|
+
@list_servers = ::Gapic::Config::Method.new list_servers_config
|
|
1584
|
+
get_server_config = parent_rpcs.get_server if parent_rpcs.respond_to? :get_server
|
|
1585
|
+
@get_server = ::Gapic::Config::Method.new get_server_config
|
|
1586
|
+
create_server_config = parent_rpcs.create_server if parent_rpcs.respond_to? :create_server
|
|
1587
|
+
@create_server = ::Gapic::Config::Method.new create_server_config
|
|
1588
|
+
update_server_config = parent_rpcs.update_server if parent_rpcs.respond_to? :update_server
|
|
1589
|
+
@update_server = ::Gapic::Config::Method.new update_server_config
|
|
1590
|
+
delete_server_config = parent_rpcs.delete_server if parent_rpcs.respond_to? :delete_server
|
|
1591
|
+
@delete_server = ::Gapic::Config::Method.new delete_server_config
|
|
1592
|
+
list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users
|
|
1593
|
+
@list_users = ::Gapic::Config::Method.new list_users_config
|
|
1594
|
+
get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user
|
|
1595
|
+
@get_user = ::Gapic::Config::Method.new get_user_config
|
|
1596
|
+
create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user
|
|
1597
|
+
@create_user = ::Gapic::Config::Method.new create_user_config
|
|
1598
|
+
update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user
|
|
1599
|
+
@update_user = ::Gapic::Config::Method.new update_user_config
|
|
1600
|
+
delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user
|
|
1601
|
+
@delete_user = ::Gapic::Config::Method.new delete_user_config
|
|
1602
|
+
start_server_config = parent_rpcs.start_server if parent_rpcs.respond_to? :start_server
|
|
1603
|
+
@start_server = ::Gapic::Config::Method.new start_server_config
|
|
1604
|
+
stop_server_config = parent_rpcs.stop_server if parent_rpcs.respond_to? :stop_server
|
|
1605
|
+
@stop_server = ::Gapic::Config::Method.new stop_server_config
|
|
1606
|
+
|
|
1607
|
+
yield self if block_given?
|
|
1608
|
+
end
|
|
1609
|
+
end
|
|
1610
|
+
end
|
|
1611
|
+
end
|
|
1612
|
+
end
|
|
1613
|
+
end
|
|
1614
|
+
end
|
|
1615
|
+
end
|
|
1616
|
+
end
|
|
1617
|
+
end
|