google-cloud-compute-v1 0.3.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/README.md +4 -4
  5. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +4 -24
  6. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +6 -34
  7. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +8 -44
  8. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +85 -42
  9. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +46 -0
  10. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +91 -66
  11. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +46 -0
  12. data/lib/google/cloud/compute/v1/compute_pb.rb +8335 -7443
  13. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +4 -24
  14. data/lib/google/cloud/compute/v1/disks/rest/client.rb +12 -60
  15. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +4 -22
  16. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +13 -63
  17. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +6 -32
  18. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +9 -49
  19. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +4 -22
  20. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +7 -33
  21. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +8 -44
  22. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +6 -30
  23. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +2 -12
  24. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +5 -27
  25. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +8 -44
  26. data/lib/google/cloud/compute/v1/image_family_views/credentials.rb +53 -0
  27. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +318 -0
  28. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +89 -0
  29. data/lib/google/cloud/compute/v1/image_family_views/rest.rb +33 -0
  30. data/lib/google/cloud/compute/v1/image_family_views.rb +44 -0
  31. data/lib/google/cloud/compute/v1/images/rest/client.rb +7 -35
  32. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +30 -150
  33. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +16 -72
  34. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +4 -22
  35. data/lib/google/cloud/compute/v1/instances/rest/client.rb +272 -197
  36. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +134 -0
  37. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +7 -39
  38. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +2 -12
  39. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +5 -27
  40. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +2 -2
  41. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +11 -29
  42. data/lib/google/cloud/compute/v1/machine_images/credentials.rb +52 -0
  43. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +777 -0
  44. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +363 -0
  45. data/lib/google/cloud/compute/v1/machine_images/rest.rb +33 -0
  46. data/lib/google/cloud/compute/v1/machine_images.rb +44 -0
  47. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +4 -24
  48. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +10 -56
  49. data/lib/google/cloud/compute/v1/networks/rest/client.rb +14 -61
  50. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +12 -66
  51. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +6 -34
  52. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +4 -24
  53. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +7 -39
  54. data/lib/google/cloud/compute/v1/projects/rest/client.rb +15 -71
  55. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +5 -27
  56. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +7 -39
  57. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +6 -32
  58. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +9 -35
  59. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +88 -30
  60. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +48 -0
  61. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +2 -12
  62. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +10 -48
  63. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +5 -27
  64. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +6 -32
  65. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +27 -133
  66. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +5 -29
  67. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +1 -5
  68. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +4 -22
  69. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +4 -22
  70. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +3 -17
  71. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +4 -22
  72. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +5 -27
  73. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +6 -32
  74. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +2 -12
  75. data/lib/google/cloud/compute/v1/regions/rest/client.rb +4 -14
  76. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +89 -39
  77. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +48 -0
  78. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +6 -34
  79. data/lib/google/cloud/compute/v1/routers/rest/client.rb +10 -56
  80. data/lib/google/cloud/compute/v1/routes/rest/client.rb +4 -22
  81. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +7 -39
  82. data/lib/google/cloud/compute/v1/service_attachments/credentials.rb +52 -0
  83. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +954 -0
  84. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +458 -0
  85. data/lib/google/cloud/compute/v1/service_attachments/rest.rb +33 -0
  86. data/lib/google/cloud/compute/v1/service_attachments.rb +44 -0
  87. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +79 -20
  88. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +46 -0
  89. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +6 -34
  90. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +7 -39
  91. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +11 -61
  92. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +5 -27
  93. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +9 -45
  94. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +12 -60
  95. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +6 -34
  96. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +11 -59
  97. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +8 -42
  98. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +6 -32
  99. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +6 -34
  100. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +10 -52
  101. data/lib/google/cloud/compute/v1/version.rb +1 -1
  102. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +7 -39
  103. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +6 -34
  104. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +3 -17
  105. data/lib/google/cloud/compute/v1/zones/rest/client.rb +2 -12
  106. data/lib/google/cloud/compute/v1.rb +3 -0
  107. data/proto_docs/README.md +1 -1
  108. data/proto_docs/google/api/field_behavior.rb +6 -0
  109. data/proto_docs/google/api/resource.rb +10 -71
  110. data/proto_docs/google/cloud/compute/v1/compute.rb +20013 -21099
  111. data/proto_docs/google/cloud/extended_operations.rb +51 -0
  112. metadata +34 -4
@@ -0,0 +1,777 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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/compute/v1/compute_pb"
21
+ require "google/cloud/compute/v1/machine_images/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Compute
26
+ module V1
27
+ module MachineImages
28
+ module Rest
29
+ ##
30
+ # REST client for the MachineImages service.
31
+ #
32
+ # The MachineImages API.
33
+ #
34
+ class Client
35
+ # @private
36
+ attr_reader :machine_images_stub
37
+
38
+ ##
39
+ # Configure the MachineImages Client class.
40
+ #
41
+ # See {::Google::Cloud::Compute::V1::MachineImages::Rest::Client::Configuration}
42
+ # for a description of the configuration fields.
43
+ #
44
+ # @example
45
+ #
46
+ # # Modify the configuration for all MachineImages clients
47
+ # ::Google::Cloud::Compute::V1::MachineImages::Rest::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
50
+ #
51
+ # @yield [config] Configure the Client client.
52
+ # @yieldparam config [Client::Configuration]
53
+ #
54
+ # @return [Client::Configuration]
55
+ #
56
+ def self.configure
57
+ @configure ||= begin
58
+ namespace = ["Google", "Cloud", "Compute", "V1"]
59
+ parent_config = while namespace.any?
60
+ parent_name = namespace.join "::"
61
+ parent_const = const_get parent_name
62
+ break parent_const.configure if parent_const.respond_to? :configure
63
+ namespace.pop
64
+ end
65
+ default_config = Client::Configuration.new parent_config
66
+
67
+ default_config.rpcs.delete.timeout = 600.0
68
+
69
+ default_config.rpcs.get.timeout = 600.0
70
+ default_config.rpcs.get.retry_policy = {
71
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
72
+ }
73
+
74
+ default_config.rpcs.get_iam_policy.timeout = 600.0
75
+ default_config.rpcs.get_iam_policy.retry_policy = {
76
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
77
+ }
78
+
79
+ default_config.rpcs.insert.timeout = 600.0
80
+
81
+ default_config.rpcs.list.timeout = 600.0
82
+ default_config.rpcs.list.retry_policy = {
83
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
84
+ }
85
+
86
+ default_config.rpcs.set_iam_policy.timeout = 600.0
87
+
88
+ default_config.rpcs.test_iam_permissions.timeout = 600.0
89
+
90
+ default_config
91
+ end
92
+ yield @configure if block_given?
93
+ @configure
94
+ end
95
+
96
+ ##
97
+ # Configure the MachineImages Client instance.
98
+ #
99
+ # The configuration is set to the derived mode, meaning that values can be changed,
100
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
101
+ # should be made on {Client.configure}.
102
+ #
103
+ # See {::Google::Cloud::Compute::V1::MachineImages::Rest::Client::Configuration}
104
+ # for a description of the configuration fields.
105
+ #
106
+ # @yield [config] Configure the Client client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ # @return [Client::Configuration]
110
+ #
111
+ def configure
112
+ yield @config if block_given?
113
+ @config
114
+ end
115
+
116
+ ##
117
+ # Create a new MachineImages REST client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Cloud::Compute::V1::MachineImages::Rest::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Cloud::Compute::V1::MachineImages::Rest::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the MachineImages client.
130
+ # @yieldparam config [Client::Configuration]
131
+ #
132
+ def initialize
133
+ # Create the configuration object
134
+ @config = Configuration.new Client.configure
135
+
136
+ # Yield the configuration if needed
137
+ yield @config if block_given?
138
+
139
+ # Create credentials
140
+ credentials = @config.credentials
141
+ credentials ||= Credentials.default scope: @config.scope
142
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
143
+ credentials = Credentials.new credentials, scope: @config.scope
144
+ end
145
+
146
+ @machine_images_stub = ::Google::Cloud::Compute::V1::MachineImages::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
147
+ end
148
+
149
+ # Service calls
150
+
151
+ ##
152
+ # Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone.
153
+ #
154
+ # @overload delete(request, options = nil)
155
+ # Pass arguments to `delete` via a request object, either of type
156
+ # {::Google::Cloud::Compute::V1::DeleteMachineImageRequest} or an equivalent Hash.
157
+ #
158
+ # @param request [::Google::Cloud::Compute::V1::DeleteMachineImageRequest, ::Hash]
159
+ # A request object representing the call parameters. Required. To specify no
160
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
161
+ # @param options [::Gapic::CallOptions, ::Hash]
162
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
163
+ # Note: currently retry functionality is not implemented. While it is possible
164
+ # to set it using ::Gapic::CallOptions, it will not be applied
165
+ #
166
+ # @overload delete(machine_image: nil, project: nil, request_id: nil)
167
+ # Pass arguments to `delete` via keyword arguments. Note that at
168
+ # least one keyword argument is required. To specify no parameters, or to keep all
169
+ # the default parameter values, pass an empty Hash as a request object (see above).
170
+ #
171
+ # @param machine_image [::String]
172
+ # The name of the machine image to delete.
173
+ # @param project [::String]
174
+ # Project ID for this request.
175
+ # @param request_id [::String]
176
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
177
+ # @yield [result, response] Access the result along with the Faraday response object
178
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
179
+ # @yieldparam response [::Faraday::Response]
180
+ #
181
+ # @return [::Gapic::Rest::BaseOperation]
182
+ #
183
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
184
+ def delete request, options = nil
185
+ raise ::ArgumentError, "request must be provided" if request.nil?
186
+
187
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteMachineImageRequest
188
+
189
+ # Converts hash and nil to an options object
190
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
191
+
192
+ # Customize the options with defaults
193
+ call_metadata = @config.rpcs.delete.metadata.to_h
194
+
195
+ # Set x-goog-api-client header
196
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
197
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
198
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
199
+ transports_version_send: [:rest]
200
+
201
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
202
+ metadata: call_metadata
203
+
204
+ options.apply_defaults timeout: @config.timeout,
205
+ metadata: @config.metadata
206
+
207
+ @machine_images_stub.delete request, options do |result, response|
208
+ result = ::Gapic::Rest::BaseOperation.new result
209
+ yield result, response if block_given?
210
+ return result
211
+ end
212
+ rescue ::Faraday::Error => e
213
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
214
+ raise ::Google::Cloud::Error.from_error(gapic_error)
215
+ end
216
+
217
+ ##
218
+ # Returns the specified machine image. Gets a list of available machine images by making a list() request.
219
+ #
220
+ # @overload get(request, options = nil)
221
+ # Pass arguments to `get` via a request object, either of type
222
+ # {::Google::Cloud::Compute::V1::GetMachineImageRequest} or an equivalent Hash.
223
+ #
224
+ # @param request [::Google::Cloud::Compute::V1::GetMachineImageRequest, ::Hash]
225
+ # A request object representing the call parameters. Required. To specify no
226
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
227
+ # @param options [::Gapic::CallOptions, ::Hash]
228
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
229
+ # Note: currently retry functionality is not implemented. While it is possible
230
+ # to set it using ::Gapic::CallOptions, it will not be applied
231
+ #
232
+ # @overload get(machine_image: nil, project: nil)
233
+ # Pass arguments to `get` via keyword arguments. Note that at
234
+ # least one keyword argument is required. To specify no parameters, or to keep all
235
+ # the default parameter values, pass an empty Hash as a request object (see above).
236
+ #
237
+ # @param machine_image [::String]
238
+ # The name of the machine image.
239
+ # @param project [::String]
240
+ # Project ID for this request.
241
+ # @yield [result, response] Access the result along with the Faraday response object
242
+ # @yieldparam result [::Google::Cloud::Compute::V1::MachineImage]
243
+ # @yieldparam response [::Faraday::Response]
244
+ #
245
+ # @return [::Google::Cloud::Compute::V1::MachineImage]
246
+ #
247
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
248
+ def get request, options = nil
249
+ raise ::ArgumentError, "request must be provided" if request.nil?
250
+
251
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetMachineImageRequest
252
+
253
+ # Converts hash and nil to an options object
254
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
255
+
256
+ # Customize the options with defaults
257
+ call_metadata = @config.rpcs.get.metadata.to_h
258
+
259
+ # Set x-goog-api-client header
260
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
261
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
262
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
263
+ transports_version_send: [:rest]
264
+
265
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
266
+ metadata: call_metadata
267
+
268
+ options.apply_defaults timeout: @config.timeout,
269
+ metadata: @config.metadata
270
+
271
+ @machine_images_stub.get request, options do |result, response|
272
+ yield result, response if block_given?
273
+ return result
274
+ end
275
+ rescue ::Faraday::Error => e
276
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
277
+ raise ::Google::Cloud::Error.from_error(gapic_error)
278
+ end
279
+
280
+ ##
281
+ # Gets the access control policy for a resource. May be empty if no such policy or resource exists.
282
+ #
283
+ # @overload get_iam_policy(request, options = nil)
284
+ # Pass arguments to `get_iam_policy` via a request object, either of type
285
+ # {::Google::Cloud::Compute::V1::GetIamPolicyMachineImageRequest} or an equivalent Hash.
286
+ #
287
+ # @param request [::Google::Cloud::Compute::V1::GetIamPolicyMachineImageRequest, ::Hash]
288
+ # A request object representing the call parameters. Required. To specify no
289
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
290
+ # @param options [::Gapic::CallOptions, ::Hash]
291
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
292
+ # Note: currently retry functionality is not implemented. While it is possible
293
+ # to set it using ::Gapic::CallOptions, it will not be applied
294
+ #
295
+ # @overload get_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil)
296
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
297
+ # least one keyword argument is required. To specify no parameters, or to keep all
298
+ # the default parameter values, pass an empty Hash as a request object (see above).
299
+ #
300
+ # @param options_requested_policy_version [::Integer]
301
+ # Requested IAM Policy version.
302
+ # @param project [::String]
303
+ # Project ID for this request.
304
+ # @param resource [::String]
305
+ # Name or id of the resource for this request.
306
+ # @yield [result, response] Access the result along with the Faraday response object
307
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
308
+ # @yieldparam response [::Faraday::Response]
309
+ #
310
+ # @return [::Google::Cloud::Compute::V1::Policy]
311
+ #
312
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ def get_iam_policy request, options = nil
314
+ raise ::ArgumentError, "request must be provided" if request.nil?
315
+
316
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetIamPolicyMachineImageRequest
317
+
318
+ # Converts hash and nil to an options object
319
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
320
+
321
+ # Customize the options with defaults
322
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
323
+
324
+ # Set x-goog-api-client header
325
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
326
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
327
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
328
+ transports_version_send: [:rest]
329
+
330
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
331
+ metadata: call_metadata
332
+
333
+ options.apply_defaults timeout: @config.timeout,
334
+ metadata: @config.metadata
335
+
336
+ @machine_images_stub.get_iam_policy request, options do |result, response|
337
+ yield result, response if block_given?
338
+ return result
339
+ end
340
+ rescue ::Faraday::Error => e
341
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
342
+ raise ::Google::Cloud::Error.from_error(gapic_error)
343
+ end
344
+
345
+ ##
346
+ # Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance.
347
+ #
348
+ # @overload insert(request, options = nil)
349
+ # Pass arguments to `insert` via a request object, either of type
350
+ # {::Google::Cloud::Compute::V1::InsertMachineImageRequest} or an equivalent Hash.
351
+ #
352
+ # @param request [::Google::Cloud::Compute::V1::InsertMachineImageRequest, ::Hash]
353
+ # A request object representing the call parameters. Required. To specify no
354
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
355
+ # @param options [::Gapic::CallOptions, ::Hash]
356
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
357
+ # Note: currently retry functionality is not implemented. While it is possible
358
+ # to set it using ::Gapic::CallOptions, it will not be applied
359
+ #
360
+ # @overload insert(machine_image_resource: nil, project: nil, request_id: nil, source_instance: nil)
361
+ # Pass arguments to `insert` via keyword arguments. Note that at
362
+ # least one keyword argument is required. To specify no parameters, or to keep all
363
+ # the default parameter values, pass an empty Hash as a request object (see above).
364
+ #
365
+ # @param machine_image_resource [::Google::Cloud::Compute::V1::MachineImage, ::Hash]
366
+ # The body resource for this request
367
+ # @param project [::String]
368
+ # Project ID for this request.
369
+ # @param request_id [::String]
370
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
371
+ # @param source_instance [::String]
372
+ # Required. Source instance that is used to create the machine image from.
373
+ # @yield [result, response] Access the result along with the Faraday response object
374
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
375
+ # @yieldparam response [::Faraday::Response]
376
+ #
377
+ # @return [::Gapic::Rest::BaseOperation]
378
+ #
379
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
380
+ def insert request, options = nil
381
+ raise ::ArgumentError, "request must be provided" if request.nil?
382
+
383
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertMachineImageRequest
384
+
385
+ # Converts hash and nil to an options object
386
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
387
+
388
+ # Customize the options with defaults
389
+ call_metadata = @config.rpcs.insert.metadata.to_h
390
+
391
+ # Set x-goog-api-client header
392
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
393
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
394
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
395
+ transports_version_send: [:rest]
396
+
397
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
398
+ metadata: call_metadata
399
+
400
+ options.apply_defaults timeout: @config.timeout,
401
+ metadata: @config.metadata
402
+
403
+ @machine_images_stub.insert request, options do |result, response|
404
+ result = ::Gapic::Rest::BaseOperation.new result
405
+ yield result, response if block_given?
406
+ return result
407
+ end
408
+ rescue ::Faraday::Error => e
409
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
410
+ raise ::Google::Cloud::Error.from_error(gapic_error)
411
+ end
412
+
413
+ ##
414
+ # Retrieves a list of machine images that are contained within the specified project.
415
+ #
416
+ # @overload list(request, options = nil)
417
+ # Pass arguments to `list` via a request object, either of type
418
+ # {::Google::Cloud::Compute::V1::ListMachineImagesRequest} or an equivalent Hash.
419
+ #
420
+ # @param request [::Google::Cloud::Compute::V1::ListMachineImagesRequest, ::Hash]
421
+ # A request object representing the call parameters. Required. To specify no
422
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
423
+ # @param options [::Gapic::CallOptions, ::Hash]
424
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
425
+ # Note: currently retry functionality is not implemented. While it is possible
426
+ # to set it using ::Gapic::CallOptions, it will not be applied
427
+ #
428
+ # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
429
+ # Pass arguments to `list` via keyword arguments. Note that at
430
+ # least one keyword argument is required. To specify no parameters, or to keep all
431
+ # the default parameter values, pass an empty Hash as a request object (see above).
432
+ #
433
+ # @param filter [::String]
434
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
435
+ # @param max_results [::Integer]
436
+ # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
437
+ # @param order_by [::String]
438
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
439
+ # @param page_token [::String]
440
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
441
+ # @param project [::String]
442
+ # Project ID for this request.
443
+ # @param return_partial_success [::Boolean]
444
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
445
+ # @yield [result, response] Access the result along with the Faraday response object
446
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::MachineImage>]
447
+ # @yieldparam response [::Faraday::Response]
448
+ #
449
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::MachineImage>]
450
+ #
451
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
452
+ def list request, options = nil
453
+ raise ::ArgumentError, "request must be provided" if request.nil?
454
+
455
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListMachineImagesRequest
456
+
457
+ # Converts hash and nil to an options object
458
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
459
+
460
+ # Customize the options with defaults
461
+ call_metadata = @config.rpcs.list.metadata.to_h
462
+
463
+ # Set x-goog-api-client header
464
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
465
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
466
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
467
+ transports_version_send: [:rest]
468
+
469
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
470
+ metadata: call_metadata
471
+
472
+ options.apply_defaults timeout: @config.timeout,
473
+ metadata: @config.metadata
474
+
475
+ @machine_images_stub.list request, options do |result, response|
476
+ result = ::Gapic::Rest::PagedEnumerable.new @machine_images_stub, :list, "items", request, result, options
477
+ yield result, response if block_given?
478
+ return result
479
+ end
480
+ rescue ::Faraday::Error => e
481
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
482
+ raise ::Google::Cloud::Error.from_error(gapic_error)
483
+ end
484
+
485
+ ##
486
+ # Sets the access control policy on the specified resource. Replaces any existing policy.
487
+ #
488
+ # @overload set_iam_policy(request, options = nil)
489
+ # Pass arguments to `set_iam_policy` via a request object, either of type
490
+ # {::Google::Cloud::Compute::V1::SetIamPolicyMachineImageRequest} or an equivalent Hash.
491
+ #
492
+ # @param request [::Google::Cloud::Compute::V1::SetIamPolicyMachineImageRequest, ::Hash]
493
+ # A request object representing the call parameters. Required. To specify no
494
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
495
+ # @param options [::Gapic::CallOptions, ::Hash]
496
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
497
+ # Note: currently retry functionality is not implemented. While it is possible
498
+ # to set it using ::Gapic::CallOptions, it will not be applied
499
+ #
500
+ # @overload set_iam_policy(global_set_policy_request_resource: nil, project: nil, resource: nil)
501
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
502
+ # least one keyword argument is required. To specify no parameters, or to keep all
503
+ # the default parameter values, pass an empty Hash as a request object (see above).
504
+ #
505
+ # @param global_set_policy_request_resource [::Google::Cloud::Compute::V1::GlobalSetPolicyRequest, ::Hash]
506
+ # The body resource for this request
507
+ # @param project [::String]
508
+ # Project ID for this request.
509
+ # @param resource [::String]
510
+ # Name or id of the resource for this request.
511
+ # @yield [result, response] Access the result along with the Faraday response object
512
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
513
+ # @yieldparam response [::Faraday::Response]
514
+ #
515
+ # @return [::Google::Cloud::Compute::V1::Policy]
516
+ #
517
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
518
+ def set_iam_policy request, options = nil
519
+ raise ::ArgumentError, "request must be provided" if request.nil?
520
+
521
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetIamPolicyMachineImageRequest
522
+
523
+ # Converts hash and nil to an options object
524
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
525
+
526
+ # Customize the options with defaults
527
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
528
+
529
+ # Set x-goog-api-client header
530
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
531
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
532
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
533
+ transports_version_send: [:rest]
534
+
535
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
536
+ metadata: call_metadata
537
+
538
+ options.apply_defaults timeout: @config.timeout,
539
+ metadata: @config.metadata
540
+
541
+ @machine_images_stub.set_iam_policy request, options do |result, response|
542
+ yield result, response if block_given?
543
+ return result
544
+ end
545
+ rescue ::Faraday::Error => e
546
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
547
+ raise ::Google::Cloud::Error.from_error(gapic_error)
548
+ end
549
+
550
+ ##
551
+ # Returns permissions that a caller has on the specified resource.
552
+ #
553
+ # @overload test_iam_permissions(request, options = nil)
554
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
555
+ # {::Google::Cloud::Compute::V1::TestIamPermissionsMachineImageRequest} or an equivalent Hash.
556
+ #
557
+ # @param request [::Google::Cloud::Compute::V1::TestIamPermissionsMachineImageRequest, ::Hash]
558
+ # A request object representing the call parameters. Required. To specify no
559
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
560
+ # @param options [::Gapic::CallOptions, ::Hash]
561
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
562
+ # Note: currently retry functionality is not implemented. While it is possible
563
+ # to set it using ::Gapic::CallOptions, it will not be applied
564
+ #
565
+ # @overload test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil)
566
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
567
+ # least one keyword argument is required. To specify no parameters, or to keep all
568
+ # the default parameter values, pass an empty Hash as a request object (see above).
569
+ #
570
+ # @param project [::String]
571
+ # Project ID for this request.
572
+ # @param resource [::String]
573
+ # Name or id of the resource for this request.
574
+ # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
575
+ # The body resource for this request
576
+ # @yield [result, response] Access the result along with the Faraday response object
577
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
578
+ # @yieldparam response [::Faraday::Response]
579
+ #
580
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
581
+ #
582
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
583
+ def test_iam_permissions request, options = nil
584
+ raise ::ArgumentError, "request must be provided" if request.nil?
585
+
586
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsMachineImageRequest
587
+
588
+ # Converts hash and nil to an options object
589
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
590
+
591
+ # Customize the options with defaults
592
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
593
+
594
+ # Set x-goog-api-client header
595
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
596
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
597
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
598
+ transports_version_send: [:rest]
599
+
600
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
601
+ metadata: call_metadata
602
+
603
+ options.apply_defaults timeout: @config.timeout,
604
+ metadata: @config.metadata
605
+
606
+ @machine_images_stub.test_iam_permissions request, options do |result, response|
607
+ yield result, response if block_given?
608
+ return result
609
+ end
610
+ rescue ::Faraday::Error => e
611
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
612
+ raise ::Google::Cloud::Error.from_error(gapic_error)
613
+ end
614
+
615
+ ##
616
+ # Configuration class for the MachineImages REST API.
617
+ #
618
+ # This class represents the configuration for MachineImages REST,
619
+ # providing control over credentials, timeouts, retry behavior, logging.
620
+ #
621
+ # Configuration can be applied globally to all clients, or to a single client
622
+ # on construction.
623
+ #
624
+ # # Examples
625
+ #
626
+ # To modify the global config, setting the timeout for all calls to 10 seconds:
627
+ #
628
+ # ::Google::Cloud::Compute::V1::MachineImages::Client.configure do |config|
629
+ # config.timeout = 10.0
630
+ # end
631
+ #
632
+ # To apply the above configuration only to a new client:
633
+ #
634
+ # client = ::Google::Cloud::Compute::V1::MachineImages::Client.new do |config|
635
+ # config.timeout = 10.0
636
+ # end
637
+ #
638
+ # @!attribute [rw] endpoint
639
+ # The hostname or hostname:port of the service endpoint.
640
+ # Defaults to `"compute.googleapis.com"`.
641
+ # @return [::String]
642
+ # @!attribute [rw] credentials
643
+ # Credentials to send with calls. You may provide any of the following types:
644
+ # * (`String`) The path to a service account key file in JSON format
645
+ # * (`Hash`) A service account key as a Hash
646
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
647
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
648
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
649
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
650
+ # * (`nil`) indicating no credentials
651
+ # @return [::Object]
652
+ # @!attribute [rw] scope
653
+ # The OAuth scopes
654
+ # @return [::Array<::String>]
655
+ # @!attribute [rw] lib_name
656
+ # The library name as recorded in instrumentation and logging
657
+ # @return [::String]
658
+ # @!attribute [rw] lib_version
659
+ # The library version as recorded in instrumentation and logging
660
+ # @return [::String]
661
+ # @!attribute [rw] timeout
662
+ # The call timeout in seconds.
663
+ # @return [::Numeric]
664
+ # @!attribute [rw] metadata
665
+ # Additional REST headers to be sent with the call.
666
+ # @return [::Hash{::Symbol=>::String}]
667
+ #
668
+ class Configuration
669
+ extend ::Gapic::Config
670
+
671
+ config_attr :endpoint, "compute.googleapis.com", ::String
672
+ config_attr :credentials, nil do |value|
673
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
674
+ allowed.any? { |klass| klass === value }
675
+ end
676
+ config_attr :scope, nil, ::String, ::Array, nil
677
+ config_attr :lib_name, nil, ::String, nil
678
+ config_attr :lib_version, nil, ::String, nil
679
+ config_attr :timeout, nil, ::Numeric, nil
680
+ config_attr :metadata, nil, ::Hash, nil
681
+
682
+ # @private
683
+ def initialize parent_config = nil
684
+ @parent_config = parent_config unless parent_config.nil?
685
+
686
+ yield self if block_given?
687
+ end
688
+
689
+ ##
690
+ # Configurations for individual RPCs
691
+ # @return [Rpcs]
692
+ #
693
+ def rpcs
694
+ @rpcs ||= begin
695
+ parent_rpcs = nil
696
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
697
+ Rpcs.new parent_rpcs
698
+ end
699
+ end
700
+
701
+ ##
702
+ # Configuration RPC class for the MachineImages API.
703
+ #
704
+ # Includes fields providing the configuration for each RPC in this service.
705
+ # Each configuration object is of type `Gapic::Config::Method` and includes
706
+ # the following configuration fields:
707
+ #
708
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
709
+ #
710
+ # there is one other field (`retry_policy`) that can be set
711
+ # but is currently not supported for REST Gapic libraries.
712
+ #
713
+ class Rpcs
714
+ ##
715
+ # RPC-specific configuration for `delete`
716
+ # @return [::Gapic::Config::Method]
717
+ #
718
+ attr_reader :delete
719
+ ##
720
+ # RPC-specific configuration for `get`
721
+ # @return [::Gapic::Config::Method]
722
+ #
723
+ attr_reader :get
724
+ ##
725
+ # RPC-specific configuration for `get_iam_policy`
726
+ # @return [::Gapic::Config::Method]
727
+ #
728
+ attr_reader :get_iam_policy
729
+ ##
730
+ # RPC-specific configuration for `insert`
731
+ # @return [::Gapic::Config::Method]
732
+ #
733
+ attr_reader :insert
734
+ ##
735
+ # RPC-specific configuration for `list`
736
+ # @return [::Gapic::Config::Method]
737
+ #
738
+ attr_reader :list
739
+ ##
740
+ # RPC-specific configuration for `set_iam_policy`
741
+ # @return [::Gapic::Config::Method]
742
+ #
743
+ attr_reader :set_iam_policy
744
+ ##
745
+ # RPC-specific configuration for `test_iam_permissions`
746
+ # @return [::Gapic::Config::Method]
747
+ #
748
+ attr_reader :test_iam_permissions
749
+
750
+ # @private
751
+ def initialize parent_rpcs = nil
752
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
753
+ @delete = ::Gapic::Config::Method.new delete_config
754
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
755
+ @get = ::Gapic::Config::Method.new get_config
756
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
757
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
758
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
759
+ @insert = ::Gapic::Config::Method.new insert_config
760
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
761
+ @list = ::Gapic::Config::Method.new list_config
762
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
763
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
764
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
765
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
766
+
767
+ yield self if block_given?
768
+ end
769
+ end
770
+ end
771
+ end
772
+ end
773
+ end
774
+ end
775
+ end
776
+ end
777
+ end