google-cloud-sql-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.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +146 -8
  5. data/lib/google/cloud/sql/v1/cloud_sql_available_database_versions_pb.rb +25 -0
  6. data/lib/google/cloud/sql/v1/cloud_sql_available_database_versions_services_pb.rb +29 -0
  7. data/lib/google/cloud/sql/v1/cloud_sql_backup_runs_pb.rb +35 -0
  8. data/lib/google/cloud/sql/v1/cloud_sql_backup_runs_services_pb.rb +53 -0
  9. data/lib/google/cloud/sql/v1/cloud_sql_backups_pb.rb +41 -0
  10. data/lib/google/cloud/sql/v1/cloud_sql_backups_services_pb.rb +54 -0
  11. data/lib/google/cloud/sql/v1/cloud_sql_connect_pb.rb +34 -0
  12. data/lib/google/cloud/sql/v1/cloud_sql_connect_services_pb.rb +50 -0
  13. data/lib/google/cloud/sql/v1/cloud_sql_databases_pb.rb +30 -0
  14. data/lib/google/cloud/sql/v1/cloud_sql_databases_services_pb.rb +61 -0
  15. data/lib/google/cloud/sql/v1/cloud_sql_events_pb.rb +25 -0
  16. data/lib/google/cloud/sql/v1/cloud_sql_events_services_pb.rb +29 -0
  17. data/lib/google/cloud/sql/v1/cloud_sql_feature_eligibility_pb.rb +24 -0
  18. data/lib/google/cloud/sql/v1/cloud_sql_feature_eligibility_services_pb.rb +29 -0
  19. data/lib/google/cloud/sql/v1/cloud_sql_flags_pb.rb +31 -0
  20. data/lib/google/cloud/sql/v1/cloud_sql_flags_services_pb.rb +45 -0
  21. data/lib/google/cloud/sql/v1/cloud_sql_iam_policies_pb.rb +23 -0
  22. data/lib/google/cloud/sql/v1/cloud_sql_iam_policies_services_pb.rb +29 -0
  23. data/lib/google/cloud/sql/v1/cloud_sql_instance_names_pb.rb +24 -0
  24. data/lib/google/cloud/sql/v1/cloud_sql_instance_names_services_pb.rb +29 -0
  25. data/lib/google/cloud/sql/v1/cloud_sql_instances_pb.rb +146 -0
  26. data/lib/google/cloud/sql/v1/cloud_sql_instances_services_pb.rb +184 -0
  27. data/lib/google/cloud/sql/v1/cloud_sql_operations_pb.rb +30 -0
  28. data/lib/google/cloud/sql/v1/cloud_sql_operations_services_pb.rb +50 -0
  29. data/lib/google/cloud/sql/v1/cloud_sql_regions_pb.rb +25 -0
  30. data/lib/google/cloud/sql/v1/cloud_sql_regions_services_pb.rb +29 -0
  31. data/lib/google/cloud/sql/v1/cloud_sql_resources_pb.rb +119 -0
  32. data/lib/google/cloud/sql/v1/cloud_sql_ssl_certs_pb.rb +31 -0
  33. data/lib/google/cloud/sql/v1/cloud_sql_ssl_certs_services_pb.rb +56 -0
  34. data/lib/google/cloud/sql/v1/cloud_sql_tiers_pb.rb +26 -0
  35. data/lib/google/cloud/sql/v1/cloud_sql_tiers_services_pb.rb +47 -0
  36. data/lib/google/cloud/sql/v1/cloud_sql_users_pb.rb +41 -0
  37. data/lib/google/cloud/sql/v1/cloud_sql_users_services_pb.rb +53 -0
  38. data/lib/google/cloud/sql/v1/rest.rb +46 -0
  39. data/lib/google/cloud/sql/v1/sql_backup_runs_service/client.rb +809 -0
  40. data/lib/google/cloud/sql/v1/sql_backup_runs_service/credentials.rb +48 -0
  41. data/lib/google/cloud/sql/v1/sql_backup_runs_service/rest/client.rb +720 -0
  42. data/lib/google/cloud/sql/v1/sql_backup_runs_service/rest/service_stub.rb +332 -0
  43. data/lib/google/cloud/sql/v1/sql_backup_runs_service/rest.rb +51 -0
  44. data/lib/google/cloud/sql/v1/sql_backup_runs_service.rb +54 -0
  45. data/lib/google/cloud/sql/v1/sql_backups_service/client.rb +896 -0
  46. data/lib/google/cloud/sql/v1/sql_backups_service/credentials.rb +48 -0
  47. data/lib/google/cloud/sql/v1/sql_backups_service/paths.rb +64 -0
  48. data/lib/google/cloud/sql/v1/sql_backups_service/rest/client.rb +818 -0
  49. data/lib/google/cloud/sql/v1/sql_backups_service/rest/service_stub.rb +388 -0
  50. data/lib/google/cloud/sql/v1/sql_backups_service/rest.rb +50 -0
  51. data/lib/google/cloud/sql/v1/sql_backups_service.rb +53 -0
  52. data/lib/google/cloud/sql/v1/sql_connect_service/client.rb +607 -0
  53. data/lib/google/cloud/sql/v1/sql_connect_service/credentials.rb +48 -0
  54. data/lib/google/cloud/sql/v1/sql_connect_service/rest/client.rb +544 -0
  55. data/lib/google/cloud/sql/v1/sql_connect_service/rest/service_stub.rb +206 -0
  56. data/lib/google/cloud/sql/v1/sql_connect_service/rest.rb +51 -0
  57. data/lib/google/cloud/sql/v1/sql_connect_service.rb +54 -0
  58. data/lib/google/cloud/sql/v1/sql_databases_service/client.rb +1011 -0
  59. data/lib/google/cloud/sql/v1/sql_databases_service/credentials.rb +48 -0
  60. data/lib/google/cloud/sql/v1/sql_databases_service/rest/client.rb +896 -0
  61. data/lib/google/cloud/sql/v1/sql_databases_service/rest/service_stub.rb +460 -0
  62. data/lib/google/cloud/sql/v1/sql_databases_service/rest.rb +51 -0
  63. data/lib/google/cloud/sql/v1/sql_databases_service.rb +54 -0
  64. data/lib/google/cloud/sql/v1/sql_flags_service/client.rb +488 -0
  65. data/lib/google/cloud/sql/v1/sql_flags_service/credentials.rb +48 -0
  66. data/lib/google/cloud/sql/v1/sql_flags_service/rest/client.rb +446 -0
  67. data/lib/google/cloud/sql/v1/sql_flags_service/rest/service_stub.rb +140 -0
  68. data/lib/google/cloud/sql/v1/sql_flags_service/rest.rb +51 -0
  69. data/lib/google/cloud/sql/v1/sql_flags_service.rb +54 -0
  70. data/lib/google/cloud/sql/v1/sql_instances_service/client.rb +4738 -0
  71. data/lib/google/cloud/sql/v1/sql_instances_service/credentials.rb +48 -0
  72. data/lib/google/cloud/sql/v1/sql_instances_service/paths.rb +95 -0
  73. data/lib/google/cloud/sql/v1/sql_instances_service/rest/client.rb +4274 -0
  74. data/lib/google/cloud/sql/v1/sql_instances_service/rest/service_stub.rb +2769 -0
  75. data/lib/google/cloud/sql/v1/sql_instances_service/rest.rb +50 -0
  76. data/lib/google/cloud/sql/v1/sql_instances_service.rb +53 -0
  77. data/lib/google/cloud/sql/v1/sql_operations_service/client.rb +694 -0
  78. data/lib/google/cloud/sql/v1/sql_operations_service/credentials.rb +48 -0
  79. data/lib/google/cloud/sql/v1/sql_operations_service/rest/client.rb +624 -0
  80. data/lib/google/cloud/sql/v1/sql_operations_service/rest/service_stub.rb +266 -0
  81. data/lib/google/cloud/sql/v1/sql_operations_service/rest.rb +51 -0
  82. data/lib/google/cloud/sql/v1/sql_operations_service.rb +54 -0
  83. data/lib/google/cloud/sql/v1/sql_ssl_certs_service/client.rb +804 -0
  84. data/lib/google/cloud/sql/v1/sql_ssl_certs_service/credentials.rb +48 -0
  85. data/lib/google/cloud/sql/v1/sql_ssl_certs_service/rest/client.rb +715 -0
  86. data/lib/google/cloud/sql/v1/sql_ssl_certs_service/rest/service_stub.rb +332 -0
  87. data/lib/google/cloud/sql/v1/sql_ssl_certs_service/rest.rb +51 -0
  88. data/lib/google/cloud/sql/v1/sql_ssl_certs_service.rb +54 -0
  89. data/lib/google/cloud/sql/v1/sql_tiers_service/client.rb +494 -0
  90. data/lib/google/cloud/sql/v1/sql_tiers_service/credentials.rb +48 -0
  91. data/lib/google/cloud/sql/v1/sql_tiers_service/rest/client.rb +444 -0
  92. data/lib/google/cloud/sql/v1/sql_tiers_service/rest/service_stub.rb +142 -0
  93. data/lib/google/cloud/sql/v1/sql_tiers_service/rest.rb +51 -0
  94. data/lib/google/cloud/sql/v1/sql_tiers_service.rb +54 -0
  95. data/lib/google/cloud/sql/v1/sql_users_service/client.rb +909 -0
  96. data/lib/google/cloud/sql/v1/sql_users_service/credentials.rb +48 -0
  97. data/lib/google/cloud/sql/v1/sql_users_service/rest/client.rb +813 -0
  98. data/lib/google/cloud/sql/v1/sql_users_service/rest/service_stub.rb +394 -0
  99. data/lib/google/cloud/sql/v1/sql_users_service/rest.rb +51 -0
  100. data/lib/google/cloud/sql/v1/sql_users_service.rb +54 -0
  101. data/lib/google/cloud/sql/v1/version.rb +8 -3
  102. data/lib/google/cloud/sql/v1.rb +60 -0
  103. data/lib/google-cloud-sql-v1.rb +21 -0
  104. data/proto_docs/README.md +4 -0
  105. data/proto_docs/google/api/client.rb +593 -0
  106. data/proto_docs/google/api/field_behavior.rb +85 -0
  107. data/proto_docs/google/api/field_info.rb +88 -0
  108. data/proto_docs/google/api/launch_stage.rb +71 -0
  109. data/proto_docs/google/api/resource.rb +227 -0
  110. data/proto_docs/google/cloud/sql/v1/cloud_sql_backup_runs.rb +245 -0
  111. data/proto_docs/google/cloud/sql/v1/cloud_sql_backups.rb +259 -0
  112. data/proto_docs/google/cloud/sql/v1/cloud_sql_connect.rb +190 -0
  113. data/proto_docs/google/cloud/sql/v1/cloud_sql_databases.rb +111 -0
  114. data/proto_docs/google/cloud/sql/v1/cloud_sql_flags.rb +154 -0
  115. data/proto_docs/google/cloud/sql/v1/cloud_sql_instances.rb +2357 -0
  116. data/proto_docs/google/cloud/sql/v1/cloud_sql_operations.rb +85 -0
  117. data/proto_docs/google/cloud/sql/v1/cloud_sql_resources.rb +2522 -0
  118. data/proto_docs/google/cloud/sql/v1/cloud_sql_ssl_certs.rb +120 -0
  119. data/proto_docs/google/cloud/sql/v1/cloud_sql_tiers.rb +69 -0
  120. data/proto_docs/google/cloud/sql/v1/cloud_sql_users.rb +291 -0
  121. data/proto_docs/google/protobuf/any.rb +145 -0
  122. data/proto_docs/google/protobuf/duration.rb +98 -0
  123. data/proto_docs/google/protobuf/empty.rb +34 -0
  124. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  125. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  126. data/proto_docs/google/protobuf/wrappers.rb +148 -0
  127. data/proto_docs/google/rpc/status.rb +48 -0
  128. data/proto_docs/google/type/interval.rb +45 -0
  129. metadata +176 -14
@@ -0,0 +1,818 @@
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/sql/v1/cloud_sql_backups_pb"
21
+ require "google/cloud/sql/v1/sql_backups_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Sql
27
+ module V1
28
+ module SqlBackupsService
29
+ module Rest
30
+ ##
31
+ # REST client for the SqlBackupsService service.
32
+ #
33
+ class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "sqladmin.$UNIVERSE_DOMAIN$"
39
+
40
+ include Paths
41
+
42
+ # @private
43
+ attr_reader :sql_backups_service_stub
44
+
45
+ ##
46
+ # Configure the SqlBackupsService Client class.
47
+ #
48
+ # See {::Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all SqlBackupsService clients
54
+ # ::Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Cloud", "Sql", "V1"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.timeout = 60.0
75
+
76
+ default_config
77
+ end
78
+ yield @configure if block_given?
79
+ @configure
80
+ end
81
+
82
+ ##
83
+ # Configure the SqlBackupsService Client instance.
84
+ #
85
+ # The configuration is set to the derived mode, meaning that values can be changed,
86
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
87
+ # should be made on {Client.configure}.
88
+ #
89
+ # See {::Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client::Configuration}
90
+ # for a description of the configuration fields.
91
+ #
92
+ # @yield [config] Configure the Client client.
93
+ # @yieldparam config [Client::Configuration]
94
+ #
95
+ # @return [Client::Configuration]
96
+ #
97
+ def configure
98
+ yield @config if block_given?
99
+ @config
100
+ end
101
+
102
+ ##
103
+ # The effective universe domain
104
+ #
105
+ # @return [String]
106
+ #
107
+ def universe_domain
108
+ @sql_backups_service_stub.universe_domain
109
+ end
110
+
111
+ ##
112
+ # Create a new SqlBackupsService REST client object.
113
+ #
114
+ # @example
115
+ #
116
+ # # Create a client using the default configuration
117
+ # client = ::Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client.new
118
+ #
119
+ # # Create a client using a custom configuration
120
+ # client = ::Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client.new do |config|
121
+ # config.timeout = 10.0
122
+ # end
123
+ #
124
+ # @yield [config] Configure the SqlBackupsService client.
125
+ # @yieldparam config [Client::Configuration]
126
+ #
127
+ def initialize
128
+ # Create the configuration object
129
+ @config = Configuration.new Client.configure
130
+
131
+ # Yield the configuration if needed
132
+ yield @config if block_given?
133
+
134
+ # Create credentials
135
+ credentials = @config.credentials
136
+ # Use self-signed JWT if the endpoint is unchanged from default,
137
+ # but only if the default endpoint does not have a region prefix.
138
+ enable_self_signed_jwt = @config.endpoint.nil? ||
139
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
140
+ !@config.endpoint.split(".").first.include?("-"))
141
+ credentials ||= Credentials.default scope: @config.scope,
142
+ enable_self_signed_jwt: enable_self_signed_jwt
143
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
144
+ credentials = Credentials.new credentials, scope: @config.scope
145
+ end
146
+
147
+ @quota_project_id = @config.quota_project
148
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
149
+
150
+ @sql_backups_service_stub = ::Google::Cloud::Sql::V1::SqlBackupsService::Rest::ServiceStub.new(
151
+ endpoint: @config.endpoint,
152
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
153
+ universe_domain: @config.universe_domain,
154
+ credentials: credentials,
155
+ logger: @config.logger
156
+ )
157
+
158
+ @sql_backups_service_stub.logger(stub: true)&.info do |entry|
159
+ entry.set_system_name
160
+ entry.set_service
161
+ entry.message = "Created client for #{entry.service}"
162
+ entry.set_credentials_fields credentials
163
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
164
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
165
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
166
+ end
167
+
168
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
169
+ config.credentials = credentials
170
+ config.quota_project = @quota_project_id
171
+ config.endpoint = @sql_backups_service_stub.endpoint
172
+ config.universe_domain = @sql_backups_service_stub.universe_domain
173
+ config.logger = @sql_backups_service_stub.logger if config.respond_to? :logger=
174
+ end
175
+ end
176
+
177
+ ##
178
+ # Get the associated client for mix-in of the Locations.
179
+ #
180
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
181
+ #
182
+ attr_reader :location_client
183
+
184
+ ##
185
+ # The logger used for request/response debug logging.
186
+ #
187
+ # @return [Logger]
188
+ #
189
+ def logger
190
+ @sql_backups_service_stub.logger
191
+ end
192
+
193
+ # Service calls
194
+
195
+ ##
196
+ # Creates a backup for a Cloud SQL instance. This API can be used only to
197
+ # create on-demand backups.
198
+ #
199
+ # @overload create_backup(request, options = nil)
200
+ # Pass arguments to `create_backup` via a request object, either of type
201
+ # {::Google::Cloud::Sql::V1::CreateBackupRequest} or an equivalent Hash.
202
+ #
203
+ # @param request [::Google::Cloud::Sql::V1::CreateBackupRequest, ::Hash]
204
+ # A request object representing the call parameters. Required. To specify no
205
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
206
+ # @param options [::Gapic::CallOptions, ::Hash]
207
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
208
+ #
209
+ # @overload create_backup(parent: nil, backup: nil)
210
+ # Pass arguments to `create_backup` via keyword arguments. Note that at
211
+ # least one keyword argument is required. To specify no parameters, or to keep all
212
+ # the default parameter values, pass an empty Hash as a request object (see above).
213
+ #
214
+ # @param parent [::String]
215
+ # Required. The parent resource where this backup is created.
216
+ # Format: projects/\\{project}
217
+ # @param backup [::Google::Cloud::Sql::V1::Backup, ::Hash]
218
+ # Required. The Backup to create.
219
+ # @yield [result, operation] Access the result along with the TransportOperation object
220
+ # @yieldparam result [::Google::Cloud::Sql::V1::Operation]
221
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
222
+ #
223
+ # @return [::Google::Cloud::Sql::V1::Operation]
224
+ #
225
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
226
+ #
227
+ # @example Basic example
228
+ # require "google/cloud/sql/v1"
229
+ #
230
+ # # Create a client object. The client can be reused for multiple calls.
231
+ # client = Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client.new
232
+ #
233
+ # # Create a request. To set request fields, pass in keyword arguments.
234
+ # request = Google::Cloud::Sql::V1::CreateBackupRequest.new
235
+ #
236
+ # # Call the create_backup method.
237
+ # result = client.create_backup request
238
+ #
239
+ # # The returned object is of type Google::Cloud::Sql::V1::Operation.
240
+ # p result
241
+ #
242
+ def create_backup request, options = nil
243
+ raise ::ArgumentError, "request must be provided" if request.nil?
244
+
245
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::CreateBackupRequest
246
+
247
+ # Converts hash and nil to an options object
248
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
249
+
250
+ # Customize the options with defaults
251
+ call_metadata = @config.rpcs.create_backup.metadata.to_h
252
+
253
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
254
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
255
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
256
+ gapic_version: ::Google::Cloud::Sql::V1::VERSION,
257
+ transports_version_send: [:rest]
258
+
259
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
260
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
261
+
262
+ options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
263
+ metadata: call_metadata,
264
+ retry_policy: @config.rpcs.create_backup.retry_policy
265
+
266
+ options.apply_defaults timeout: @config.timeout,
267
+ metadata: @config.metadata,
268
+ retry_policy: @config.retry_policy
269
+
270
+ @sql_backups_service_stub.create_backup request, options do |result, operation|
271
+ yield result, operation if block_given?
272
+ end
273
+ rescue ::Gapic::Rest::Error => e
274
+ raise ::Google::Cloud::Error.from_error(e)
275
+ end
276
+
277
+ ##
278
+ # Retrieves a resource containing information about a backup.
279
+ #
280
+ # @overload get_backup(request, options = nil)
281
+ # Pass arguments to `get_backup` via a request object, either of type
282
+ # {::Google::Cloud::Sql::V1::GetBackupRequest} or an equivalent Hash.
283
+ #
284
+ # @param request [::Google::Cloud::Sql::V1::GetBackupRequest, ::Hash]
285
+ # A request object representing the call parameters. Required. To specify no
286
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
287
+ # @param options [::Gapic::CallOptions, ::Hash]
288
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
289
+ #
290
+ # @overload get_backup(name: nil)
291
+ # Pass arguments to `get_backup` via keyword arguments. Note that at
292
+ # least one keyword argument is required. To specify no parameters, or to keep all
293
+ # the default parameter values, pass an empty Hash as a request object (see above).
294
+ #
295
+ # @param name [::String]
296
+ # Required. The name of the backup to retrieve.
297
+ # Format: projects/\\{project}/backups/\\{backup}
298
+ # @yield [result, operation] Access the result along with the TransportOperation object
299
+ # @yieldparam result [::Google::Cloud::Sql::V1::Backup]
300
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
301
+ #
302
+ # @return [::Google::Cloud::Sql::V1::Backup]
303
+ #
304
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
305
+ #
306
+ # @example Basic example
307
+ # require "google/cloud/sql/v1"
308
+ #
309
+ # # Create a client object. The client can be reused for multiple calls.
310
+ # client = Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client.new
311
+ #
312
+ # # Create a request. To set request fields, pass in keyword arguments.
313
+ # request = Google::Cloud::Sql::V1::GetBackupRequest.new
314
+ #
315
+ # # Call the get_backup method.
316
+ # result = client.get_backup request
317
+ #
318
+ # # The returned object is of type Google::Cloud::Sql::V1::Backup.
319
+ # p result
320
+ #
321
+ def get_backup request, options = nil
322
+ raise ::ArgumentError, "request must be provided" if request.nil?
323
+
324
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::GetBackupRequest
325
+
326
+ # Converts hash and nil to an options object
327
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
328
+
329
+ # Customize the options with defaults
330
+ call_metadata = @config.rpcs.get_backup.metadata.to_h
331
+
332
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
333
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
334
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
335
+ gapic_version: ::Google::Cloud::Sql::V1::VERSION,
336
+ transports_version_send: [:rest]
337
+
338
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
339
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
340
+
341
+ options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
342
+ metadata: call_metadata,
343
+ retry_policy: @config.rpcs.get_backup.retry_policy
344
+
345
+ options.apply_defaults timeout: @config.timeout,
346
+ metadata: @config.metadata,
347
+ retry_policy: @config.retry_policy
348
+
349
+ @sql_backups_service_stub.get_backup request, options do |result, operation|
350
+ yield result, operation if block_given?
351
+ end
352
+ rescue ::Gapic::Rest::Error => e
353
+ raise ::Google::Cloud::Error.from_error(e)
354
+ end
355
+
356
+ ##
357
+ # Lists all backups associated with the project.
358
+ #
359
+ # @overload list_backups(request, options = nil)
360
+ # Pass arguments to `list_backups` via a request object, either of type
361
+ # {::Google::Cloud::Sql::V1::ListBackupsRequest} or an equivalent Hash.
362
+ #
363
+ # @param request [::Google::Cloud::Sql::V1::ListBackupsRequest, ::Hash]
364
+ # A request object representing the call parameters. Required. To specify no
365
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
366
+ # @param options [::Gapic::CallOptions, ::Hash]
367
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
368
+ #
369
+ # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil)
370
+ # Pass arguments to `list_backups` via keyword arguments. Note that at
371
+ # least one keyword argument is required. To specify no parameters, or to keep all
372
+ # the default parameter values, pass an empty Hash as a request object (see above).
373
+ #
374
+ # @param parent [::String]
375
+ # Required. The parent that owns this collection of backups.
376
+ # Format: projects/\\{project}
377
+ # @param page_size [::Integer]
378
+ # The maximum number of backups to return per response. The service might
379
+ # return fewer backups than this value. If a value for this parameter isn't
380
+ # specified, then, at most, 500 backups are returned. The maximum value is
381
+ # 2,000. Any values that you set, which are greater than 2,000, are changed
382
+ # to 2,000.
383
+ # @param page_token [::String]
384
+ # A page token, received from a previous `ListBackups` call.
385
+ # Provide this to retrieve the subsequent page.
386
+ #
387
+ # When paginating, all other parameters provided to `ListBackups` must match
388
+ # the call that provided the page token.
389
+ # @param filter [::String]
390
+ # Multiple filter queries are separated by spaces. For example,
391
+ # 'instance:abc AND type:FINAL, 'location:us',
392
+ # 'backupInterval.startTime>=1950-01-01T01:01:25.771Z'. You can filter by
393
+ # type, instance, backupInterval.startTime (creation time), or location.
394
+ # @yield [result, operation] Access the result along with the TransportOperation object
395
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Sql::V1::Backup>]
396
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
397
+ #
398
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Sql::V1::Backup>]
399
+ #
400
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
401
+ #
402
+ # @example Basic example
403
+ # require "google/cloud/sql/v1"
404
+ #
405
+ # # Create a client object. The client can be reused for multiple calls.
406
+ # client = Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client.new
407
+ #
408
+ # # Create a request. To set request fields, pass in keyword arguments.
409
+ # request = Google::Cloud::Sql::V1::ListBackupsRequest.new
410
+ #
411
+ # # Call the list_backups method.
412
+ # result = client.list_backups request
413
+ #
414
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
415
+ # # over elements, and API calls will be issued to fetch pages as needed.
416
+ # result.each do |item|
417
+ # # Each element is of type ::Google::Cloud::Sql::V1::Backup.
418
+ # p item
419
+ # end
420
+ #
421
+ def list_backups request, options = nil
422
+ raise ::ArgumentError, "request must be provided" if request.nil?
423
+
424
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::ListBackupsRequest
425
+
426
+ # Converts hash and nil to an options object
427
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
428
+
429
+ # Customize the options with defaults
430
+ call_metadata = @config.rpcs.list_backups.metadata.to_h
431
+
432
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
433
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
434
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
435
+ gapic_version: ::Google::Cloud::Sql::V1::VERSION,
436
+ transports_version_send: [:rest]
437
+
438
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
439
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
440
+
441
+ options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
442
+ metadata: call_metadata,
443
+ retry_policy: @config.rpcs.list_backups.retry_policy
444
+
445
+ options.apply_defaults timeout: @config.timeout,
446
+ metadata: @config.metadata,
447
+ retry_policy: @config.retry_policy
448
+
449
+ @sql_backups_service_stub.list_backups request, options do |result, operation|
450
+ result = ::Gapic::Rest::PagedEnumerable.new @sql_backups_service_stub, :list_backups, "backups", request, result, options
451
+ yield result, operation if block_given?
452
+ throw :response, result
453
+ end
454
+ rescue ::Gapic::Rest::Error => e
455
+ raise ::Google::Cloud::Error.from_error(e)
456
+ end
457
+
458
+ ##
459
+ # Updates the retention period and description of the backup. You can use
460
+ # this API to update final backups only.
461
+ #
462
+ # @overload update_backup(request, options = nil)
463
+ # Pass arguments to `update_backup` via a request object, either of type
464
+ # {::Google::Cloud::Sql::V1::UpdateBackupRequest} or an equivalent Hash.
465
+ #
466
+ # @param request [::Google::Cloud::Sql::V1::UpdateBackupRequest, ::Hash]
467
+ # A request object representing the call parameters. Required. To specify no
468
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
469
+ # @param options [::Gapic::CallOptions, ::Hash]
470
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
471
+ #
472
+ # @overload update_backup(backup: nil, update_mask: nil)
473
+ # Pass arguments to `update_backup` via keyword arguments. Note that at
474
+ # least one keyword argument is required. To specify no parameters, or to keep all
475
+ # the default parameter values, pass an empty Hash as a request object (see above).
476
+ #
477
+ # @param backup [::Google::Cloud::Sql::V1::Backup, ::Hash]
478
+ # Required. The backup to update.
479
+ # The backup’s `name` field is used to identify the backup to update.
480
+ # Format: projects/\\{project}/backups/\\{backup}
481
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
482
+ # The list of fields that you can update. You can update only the description
483
+ # and retention period of the final backup.
484
+ # @yield [result, operation] Access the result along with the TransportOperation object
485
+ # @yieldparam result [::Google::Cloud::Sql::V1::Operation]
486
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
487
+ #
488
+ # @return [::Google::Cloud::Sql::V1::Operation]
489
+ #
490
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
491
+ #
492
+ # @example Basic example
493
+ # require "google/cloud/sql/v1"
494
+ #
495
+ # # Create a client object. The client can be reused for multiple calls.
496
+ # client = Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client.new
497
+ #
498
+ # # Create a request. To set request fields, pass in keyword arguments.
499
+ # request = Google::Cloud::Sql::V1::UpdateBackupRequest.new
500
+ #
501
+ # # Call the update_backup method.
502
+ # result = client.update_backup request
503
+ #
504
+ # # The returned object is of type Google::Cloud::Sql::V1::Operation.
505
+ # p result
506
+ #
507
+ def update_backup request, options = nil
508
+ raise ::ArgumentError, "request must be provided" if request.nil?
509
+
510
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::UpdateBackupRequest
511
+
512
+ # Converts hash and nil to an options object
513
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
514
+
515
+ # Customize the options with defaults
516
+ call_metadata = @config.rpcs.update_backup.metadata.to_h
517
+
518
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
519
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
520
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
521
+ gapic_version: ::Google::Cloud::Sql::V1::VERSION,
522
+ transports_version_send: [:rest]
523
+
524
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
525
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
526
+
527
+ options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
528
+ metadata: call_metadata,
529
+ retry_policy: @config.rpcs.update_backup.retry_policy
530
+
531
+ options.apply_defaults timeout: @config.timeout,
532
+ metadata: @config.metadata,
533
+ retry_policy: @config.retry_policy
534
+
535
+ @sql_backups_service_stub.update_backup request, options do |result, operation|
536
+ yield result, operation if block_given?
537
+ end
538
+ rescue ::Gapic::Rest::Error => e
539
+ raise ::Google::Cloud::Error.from_error(e)
540
+ end
541
+
542
+ ##
543
+ # Deletes the backup.
544
+ #
545
+ # @overload delete_backup(request, options = nil)
546
+ # Pass arguments to `delete_backup` via a request object, either of type
547
+ # {::Google::Cloud::Sql::V1::DeleteBackupRequest} or an equivalent Hash.
548
+ #
549
+ # @param request [::Google::Cloud::Sql::V1::DeleteBackupRequest, ::Hash]
550
+ # A request object representing the call parameters. Required. To specify no
551
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
552
+ # @param options [::Gapic::CallOptions, ::Hash]
553
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
554
+ #
555
+ # @overload delete_backup(name: nil)
556
+ # Pass arguments to `delete_backup` via keyword arguments. Note that at
557
+ # least one keyword argument is required. To specify no parameters, or to keep all
558
+ # the default parameter values, pass an empty Hash as a request object (see above).
559
+ #
560
+ # @param name [::String]
561
+ # Required. The name of the backup to delete.
562
+ # Format: projects/\\{project}/backups/\\{backup}
563
+ # @yield [result, operation] Access the result along with the TransportOperation object
564
+ # @yieldparam result [::Google::Cloud::Sql::V1::Operation]
565
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
566
+ #
567
+ # @return [::Google::Cloud::Sql::V1::Operation]
568
+ #
569
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
570
+ #
571
+ # @example Basic example
572
+ # require "google/cloud/sql/v1"
573
+ #
574
+ # # Create a client object. The client can be reused for multiple calls.
575
+ # client = Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client.new
576
+ #
577
+ # # Create a request. To set request fields, pass in keyword arguments.
578
+ # request = Google::Cloud::Sql::V1::DeleteBackupRequest.new
579
+ #
580
+ # # Call the delete_backup method.
581
+ # result = client.delete_backup request
582
+ #
583
+ # # The returned object is of type Google::Cloud::Sql::V1::Operation.
584
+ # p result
585
+ #
586
+ def delete_backup request, options = nil
587
+ raise ::ArgumentError, "request must be provided" if request.nil?
588
+
589
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::DeleteBackupRequest
590
+
591
+ # Converts hash and nil to an options object
592
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
593
+
594
+ # Customize the options with defaults
595
+ call_metadata = @config.rpcs.delete_backup.metadata.to_h
596
+
597
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
598
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
599
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
600
+ gapic_version: ::Google::Cloud::Sql::V1::VERSION,
601
+ transports_version_send: [:rest]
602
+
603
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
604
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
605
+
606
+ options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
607
+ metadata: call_metadata,
608
+ retry_policy: @config.rpcs.delete_backup.retry_policy
609
+
610
+ options.apply_defaults timeout: @config.timeout,
611
+ metadata: @config.metadata,
612
+ retry_policy: @config.retry_policy
613
+
614
+ @sql_backups_service_stub.delete_backup request, options do |result, operation|
615
+ yield result, operation if block_given?
616
+ end
617
+ rescue ::Gapic::Rest::Error => e
618
+ raise ::Google::Cloud::Error.from_error(e)
619
+ end
620
+
621
+ ##
622
+ # Configuration class for the SqlBackupsService REST API.
623
+ #
624
+ # This class represents the configuration for SqlBackupsService REST,
625
+ # providing control over timeouts, retry behavior, logging, transport
626
+ # parameters, and other low-level controls. Certain parameters can also be
627
+ # applied individually to specific RPCs. See
628
+ # {::Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client::Configuration::Rpcs}
629
+ # for a list of RPCs that can be configured independently.
630
+ #
631
+ # Configuration can be applied globally to all clients, or to a single client
632
+ # on construction.
633
+ #
634
+ # @example
635
+ #
636
+ # # Modify the global config, setting the timeout for
637
+ # # create_backup to 20 seconds,
638
+ # # and all remaining timeouts to 10 seconds.
639
+ # ::Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client.configure do |config|
640
+ # config.timeout = 10.0
641
+ # config.rpcs.create_backup.timeout = 20.0
642
+ # end
643
+ #
644
+ # # Apply the above configuration only to a new client.
645
+ # client = ::Google::Cloud::Sql::V1::SqlBackupsService::Rest::Client.new do |config|
646
+ # config.timeout = 10.0
647
+ # config.rpcs.create_backup.timeout = 20.0
648
+ # end
649
+ #
650
+ # @!attribute [rw] endpoint
651
+ # A custom service endpoint, as a hostname or hostname:port. The default is
652
+ # nil, indicating to use the default endpoint in the current universe domain.
653
+ # @return [::String,nil]
654
+ # @!attribute [rw] credentials
655
+ # Credentials to send with calls. You may provide any of the following types:
656
+ # * (`String`) The path to a service account key file in JSON format
657
+ # * (`Hash`) A service account key as a Hash
658
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
659
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
660
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
661
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
662
+ # * (`nil`) indicating no credentials
663
+ #
664
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
665
+ # external source for authentication to Google Cloud, you must validate it before
666
+ # providing it to a Google API client library. Providing an unvalidated credential
667
+ # configuration to Google APIs can compromise the security of your systems and data.
668
+ # For more information, refer to [Validate credential configurations from external
669
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
670
+ # @return [::Object]
671
+ # @!attribute [rw] scope
672
+ # The OAuth scopes
673
+ # @return [::Array<::String>]
674
+ # @!attribute [rw] lib_name
675
+ # The library name as recorded in instrumentation and logging
676
+ # @return [::String]
677
+ # @!attribute [rw] lib_version
678
+ # The library version as recorded in instrumentation and logging
679
+ # @return [::String]
680
+ # @!attribute [rw] timeout
681
+ # The call timeout in seconds.
682
+ # @return [::Numeric]
683
+ # @!attribute [rw] metadata
684
+ # Additional headers to be sent with the call.
685
+ # @return [::Hash{::Symbol=>::String}]
686
+ # @!attribute [rw] retry_policy
687
+ # The retry policy. The value is a hash with the following keys:
688
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
689
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
690
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
691
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
692
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
693
+ # trigger a retry.
694
+ # @return [::Hash]
695
+ # @!attribute [rw] quota_project
696
+ # A separate project against which to charge quota.
697
+ # @return [::String]
698
+ # @!attribute [rw] universe_domain
699
+ # The universe domain within which to make requests. This determines the
700
+ # default endpoint URL. The default value of nil uses the environment
701
+ # universe (usually the default "googleapis.com" universe).
702
+ # @return [::String,nil]
703
+ # @!attribute [rw] logger
704
+ # A custom logger to use for request/response debug logging, or the value
705
+ # `:default` (the default) to construct a default logger, or `nil` to
706
+ # explicitly disable logging.
707
+ # @return [::Logger,:default,nil]
708
+ #
709
+ class Configuration
710
+ extend ::Gapic::Config
711
+
712
+ # @private
713
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
714
+ DEFAULT_ENDPOINT = "sqladmin.googleapis.com"
715
+
716
+ config_attr :endpoint, nil, ::String, nil
717
+ config_attr :credentials, nil do |value|
718
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
719
+ allowed.any? { |klass| klass === value }
720
+ end
721
+ config_attr :scope, nil, ::String, ::Array, nil
722
+ config_attr :lib_name, nil, ::String, nil
723
+ config_attr :lib_version, nil, ::String, nil
724
+ config_attr :timeout, nil, ::Numeric, nil
725
+ config_attr :metadata, nil, ::Hash, nil
726
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
727
+ config_attr :quota_project, nil, ::String, nil
728
+ config_attr :universe_domain, nil, ::String, nil
729
+ config_attr :logger, :default, ::Logger, nil, :default
730
+
731
+ # @private
732
+ def initialize parent_config = nil
733
+ @parent_config = parent_config unless parent_config.nil?
734
+
735
+ yield self if block_given?
736
+ end
737
+
738
+ ##
739
+ # Configurations for individual RPCs
740
+ # @return [Rpcs]
741
+ #
742
+ def rpcs
743
+ @rpcs ||= begin
744
+ parent_rpcs = nil
745
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
746
+ Rpcs.new parent_rpcs
747
+ end
748
+ end
749
+
750
+ ##
751
+ # Configuration RPC class for the SqlBackupsService API.
752
+ #
753
+ # Includes fields providing the configuration for each RPC in this service.
754
+ # Each configuration object is of type `Gapic::Config::Method` and includes
755
+ # the following configuration fields:
756
+ #
757
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
758
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
759
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
760
+ # include the following keys:
761
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
762
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
763
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
764
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
765
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
766
+ # trigger a retry.
767
+ #
768
+ class Rpcs
769
+ ##
770
+ # RPC-specific configuration for `create_backup`
771
+ # @return [::Gapic::Config::Method]
772
+ #
773
+ attr_reader :create_backup
774
+ ##
775
+ # RPC-specific configuration for `get_backup`
776
+ # @return [::Gapic::Config::Method]
777
+ #
778
+ attr_reader :get_backup
779
+ ##
780
+ # RPC-specific configuration for `list_backups`
781
+ # @return [::Gapic::Config::Method]
782
+ #
783
+ attr_reader :list_backups
784
+ ##
785
+ # RPC-specific configuration for `update_backup`
786
+ # @return [::Gapic::Config::Method]
787
+ #
788
+ attr_reader :update_backup
789
+ ##
790
+ # RPC-specific configuration for `delete_backup`
791
+ # @return [::Gapic::Config::Method]
792
+ #
793
+ attr_reader :delete_backup
794
+
795
+ # @private
796
+ def initialize parent_rpcs = nil
797
+ create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
798
+ @create_backup = ::Gapic::Config::Method.new create_backup_config
799
+ get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
800
+ @get_backup = ::Gapic::Config::Method.new get_backup_config
801
+ list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
802
+ @list_backups = ::Gapic::Config::Method.new list_backups_config
803
+ update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup
804
+ @update_backup = ::Gapic::Config::Method.new update_backup_config
805
+ delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
806
+ @delete_backup = ::Gapic::Config::Method.new delete_backup_config
807
+
808
+ yield self if block_given?
809
+ end
810
+ end
811
+ end
812
+ end
813
+ end
814
+ end
815
+ end
816
+ end
817
+ end
818
+ end