google-cloud-compute-v1 2.9.0 → 2.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +3 -3
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +3 -3
  4. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +3 -3
  5. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +1 -1
  6. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +4 -4
  7. data/lib/google/cloud/compute/v1/compute_pb.rb +32 -1
  8. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +3 -3
  9. data/lib/google/cloud/compute/v1/disks/rest/client.rb +3 -3
  10. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +1 -1
  11. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +1 -1
  12. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +1 -1
  13. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +3 -3
  14. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +1 -1
  15. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +1 -1
  16. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +2 -2
  17. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +3 -3
  18. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  19. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +1 -1
  20. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +3 -3
  21. data/lib/google/cloud/compute/v1/images/rest/client.rb +1 -1
  22. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +6 -6
  23. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +4 -4
  24. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +3 -3
  25. data/lib/google/cloud/compute/v1/instances/rest/client.rb +4 -4
  26. data/lib/google/cloud/compute/v1/instant_snapshots/credentials.rb +52 -0
  27. data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +1208 -0
  28. data/lib/google/cloud/compute/v1/instant_snapshots/rest/service_stub.rb +618 -0
  29. data/lib/google/cloud/compute/v1/instant_snapshots/rest.rb +51 -0
  30. data/lib/google/cloud/compute/v1/instant_snapshots.rb +47 -0
  31. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +3 -3
  32. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  33. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +1 -1
  34. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +1 -1
  35. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +1 -1
  36. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +1 -1
  37. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +3 -3
  38. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +3 -3
  39. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +2 -2
  40. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +4 -4
  41. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1 -1
  42. data/lib/google/cloud/compute/v1/networks/rest/client.rb +2 -2
  43. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +4 -4
  44. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +3 -3
  45. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +3 -3
  46. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +3 -3
  47. data/lib/google/cloud/compute/v1/projects/rest/client.rb +101 -2
  48. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +60 -0
  49. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +1 -1
  50. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +3 -3
  51. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +1 -1
  52. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +2 -2
  53. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +3 -3
  54. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  55. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +1 -1
  56. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +1 -1
  57. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +1 -1
  58. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +4 -4
  59. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +2 -2
  60. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +1 -1
  61. data/lib/google/cloud/compute/v1/region_instant_snapshots/credentials.rb +52 -0
  62. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +1103 -0
  63. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/service_stub.rb +559 -0
  64. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest.rb +51 -0
  65. data/lib/google/cloud/compute/v1/region_instant_snapshots.rb +47 -0
  66. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +2 -2
  67. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1 -1
  68. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +1 -1
  69. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  70. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +1 -1
  71. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +1 -1
  72. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +2 -2
  73. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +1 -1
  74. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +1 -1
  75. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +1 -1
  76. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +1 -1
  77. data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +1 -1
  78. data/lib/google/cloud/compute/v1/regions/rest/client.rb +1 -1
  79. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +3 -3
  80. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +3 -3
  81. data/lib/google/cloud/compute/v1/rest.rb +2 -0
  82. data/lib/google/cloud/compute/v1/routers/rest/client.rb +4 -4
  83. data/lib/google/cloud/compute/v1/routes/rest/client.rb +1 -1
  84. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +4 -4
  85. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +3 -3
  86. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +1 -1
  87. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +3 -3
  88. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +4 -4
  89. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +4 -4
  90. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +1 -1
  91. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +3 -3
  92. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +3 -3
  93. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +3 -3
  94. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +3 -3
  95. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +1 -1
  96. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +3 -3
  97. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +3 -3
  98. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +3 -3
  99. data/lib/google/cloud/compute/v1/version.rb +1 -1
  100. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +3 -3
  101. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +3 -3
  102. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  103. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  104. data/lib/google/cloud/compute/v1.rb +2 -0
  105. data/proto_docs/google/cloud/compute/v1/compute.rb +806 -152
  106. metadata +12 -2
@@ -0,0 +1,1208 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/compute/v1/compute_pb"
21
+ require "google/cloud/compute/v1/instant_snapshots/rest/service_stub"
22
+ require "google/cloud/compute/v1/zone_operations/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Compute
27
+ module V1
28
+ module InstantSnapshots
29
+ module Rest
30
+ ##
31
+ # REST client for the InstantSnapshots service.
32
+ #
33
+ # The InstantSnapshots API.
34
+ #
35
+ class Client
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
38
+
39
+ # @private
40
+ attr_reader :instant_snapshots_stub
41
+
42
+ ##
43
+ # Configure the InstantSnapshots Client class.
44
+ #
45
+ # See {::Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client::Configuration}
46
+ # for a description of the configuration fields.
47
+ #
48
+ # @example
49
+ #
50
+ # # Modify the configuration for all InstantSnapshots clients
51
+ # ::Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.configure do |config|
52
+ # config.timeout = 10.0
53
+ # end
54
+ #
55
+ # @yield [config] Configure the Client client.
56
+ # @yieldparam config [Client::Configuration]
57
+ #
58
+ # @return [Client::Configuration]
59
+ #
60
+ def self.configure
61
+ @configure ||= begin
62
+ namespace = ["Google", "Cloud", "Compute", "V1"]
63
+ parent_config = while namespace.any?
64
+ parent_name = namespace.join "::"
65
+ parent_const = const_get parent_name
66
+ break parent_const.configure if parent_const.respond_to? :configure
67
+ namespace.pop
68
+ end
69
+ default_config = Client::Configuration.new parent_config
70
+
71
+ default_config.rpcs.aggregated_list.timeout = 600.0
72
+ default_config.rpcs.aggregated_list.retry_policy = {
73
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
74
+ }
75
+
76
+ default_config.rpcs.delete.timeout = 600.0
77
+
78
+ default_config.rpcs.get.timeout = 600.0
79
+ default_config.rpcs.get.retry_policy = {
80
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
81
+ }
82
+
83
+ default_config.rpcs.get_iam_policy.timeout = 600.0
84
+ default_config.rpcs.get_iam_policy.retry_policy = {
85
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
86
+ }
87
+
88
+ default_config.rpcs.insert.timeout = 600.0
89
+
90
+ default_config.rpcs.list.timeout = 600.0
91
+ default_config.rpcs.list.retry_policy = {
92
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
93
+ }
94
+
95
+ default_config.rpcs.set_iam_policy.timeout = 600.0
96
+
97
+ default_config.rpcs.set_labels.timeout = 600.0
98
+
99
+ default_config.rpcs.test_iam_permissions.timeout = 600.0
100
+
101
+ default_config
102
+ end
103
+ yield @configure if block_given?
104
+ @configure
105
+ end
106
+
107
+ ##
108
+ # Configure the InstantSnapshots Client instance.
109
+ #
110
+ # The configuration is set to the derived mode, meaning that values can be changed,
111
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
112
+ # should be made on {Client.configure}.
113
+ #
114
+ # See {::Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client::Configuration}
115
+ # for a description of the configuration fields.
116
+ #
117
+ # @yield [config] Configure the Client client.
118
+ # @yieldparam config [Client::Configuration]
119
+ #
120
+ # @return [Client::Configuration]
121
+ #
122
+ def configure
123
+ yield @config if block_given?
124
+ @config
125
+ end
126
+
127
+ ##
128
+ # The effective universe domain
129
+ #
130
+ # @return [String]
131
+ #
132
+ def universe_domain
133
+ @instant_snapshots_stub.universe_domain
134
+ end
135
+
136
+ ##
137
+ # Create a new InstantSnapshots REST client object.
138
+ #
139
+ # @example
140
+ #
141
+ # # Create a client using the default configuration
142
+ # client = ::Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new
143
+ #
144
+ # # Create a client using a custom configuration
145
+ # client = ::Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new do |config|
146
+ # config.timeout = 10.0
147
+ # end
148
+ #
149
+ # @yield [config] Configure the InstantSnapshots client.
150
+ # @yieldparam config [Client::Configuration]
151
+ #
152
+ def initialize
153
+ # Create the configuration object
154
+ @config = Configuration.new Client.configure
155
+
156
+ # Yield the configuration if needed
157
+ yield @config if block_given?
158
+
159
+ # Create credentials
160
+ credentials = @config.credentials
161
+ # Use self-signed JWT if the endpoint is unchanged from default,
162
+ # but only if the default endpoint does not have a region prefix.
163
+ enable_self_signed_jwt = @config.endpoint.nil? ||
164
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
165
+ !@config.endpoint.split(".").first.include?("-"))
166
+ credentials ||= Credentials.default scope: @config.scope,
167
+ enable_self_signed_jwt: enable_self_signed_jwt
168
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
169
+ credentials = Credentials.new credentials, scope: @config.scope
170
+ end
171
+
172
+ @quota_project_id = @config.quota_project
173
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
174
+
175
+ @zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
176
+ config.credentials = credentials
177
+ config.quota_project = @quota_project_id
178
+ config.endpoint = @config.endpoint
179
+ config.universe_domain = @config.universe_domain
180
+ end
181
+
182
+ @instant_snapshots_stub = ::Google::Cloud::Compute::V1::InstantSnapshots::Rest::ServiceStub.new(
183
+ endpoint: @config.endpoint,
184
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
185
+ universe_domain: @config.universe_domain,
186
+ credentials: credentials
187
+ )
188
+ end
189
+
190
+ ##
191
+ # Get the associated client for long-running operations via ZoneOperations.
192
+ #
193
+ # @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
194
+ #
195
+ attr_reader :zone_operations
196
+
197
+ # Service calls
198
+
199
+ ##
200
+ # Retrieves an aggregated list of instantSnapshots. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
201
+ #
202
+ # @overload aggregated_list(request, options = nil)
203
+ # Pass arguments to `aggregated_list` via a request object, either of type
204
+ # {::Google::Cloud::Compute::V1::AggregatedListInstantSnapshotsRequest} or an equivalent Hash.
205
+ #
206
+ # @param request [::Google::Cloud::Compute::V1::AggregatedListInstantSnapshotsRequest, ::Hash]
207
+ # A request object representing the call parameters. Required. To specify no
208
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
209
+ # @param options [::Gapic::CallOptions, ::Hash]
210
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
211
+ #
212
+ # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project_number: nil)
213
+ # Pass arguments to `aggregated_list` via keyword arguments. Note that at
214
+ # least one keyword argument is required. To specify no parameters, or to keep all
215
+ # the default parameter values, pass an empty Hash as a request object (see above).
216
+ #
217
+ # @param filter [::String]
218
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your 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 `:*` 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) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.
219
+ # @param include_all_scopes [::Boolean]
220
+ # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
221
+ # @param max_results [::Integer]
222
+ # 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`)
223
+ # @param order_by [::String]
224
+ # 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.
225
+ # @param page_token [::String]
226
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
227
+ # @param project [::String]
228
+ # Project ID for this request.
229
+ # @param return_partial_success [::Boolean]
230
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
231
+ # @param service_project_number [::Integer]
232
+ # The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api.
233
+ # @yield [result, operation] Access the result along with the TransportOperation object
234
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstantSnapshotsScopedList>]
235
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
236
+ #
237
+ # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstantSnapshotsScopedList>]
238
+ #
239
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
240
+ #
241
+ # @example Basic example
242
+ # require "google/cloud/compute/v1"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Cloud::Compute::V1::AggregatedListInstantSnapshotsRequest.new
249
+ #
250
+ # # Call the aggregated_list method.
251
+ # result = client.aggregated_list request
252
+ #
253
+ # # The returned object is of type Google::Cloud::Compute::V1::InstantSnapshotAggregatedList.
254
+ # p result
255
+ #
256
+ def aggregated_list request, options = nil
257
+ raise ::ArgumentError, "request must be provided" if request.nil?
258
+
259
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AggregatedListInstantSnapshotsRequest
260
+
261
+ # Converts hash and nil to an options object
262
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
263
+
264
+ # Customize the options with defaults
265
+ call_metadata = @config.rpcs.aggregated_list.metadata.to_h
266
+
267
+ # Set x-goog-api-client and x-goog-user-project headers
268
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
269
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
270
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
271
+ transports_version_send: [:rest]
272
+
273
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
274
+
275
+ options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
276
+ metadata: call_metadata,
277
+ retry_policy: @config.rpcs.aggregated_list.retry_policy
278
+
279
+ options.apply_defaults timeout: @config.timeout,
280
+ metadata: @config.metadata,
281
+ retry_policy: @config.retry_policy
282
+
283
+ @instant_snapshots_stub.aggregated_list request, options do |result, operation|
284
+ result = ::Gapic::Rest::PagedEnumerable.new @instant_snapshots_stub, :aggregated_list, "items", request, result, options
285
+ yield result, operation if block_given?
286
+ return result
287
+ end
288
+ rescue ::Gapic::Rest::Error => e
289
+ raise ::Google::Cloud::Error.from_error(e)
290
+ end
291
+
292
+ ##
293
+ # Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding instantSnapshot. For more information, see Deleting instantSnapshots.
294
+ #
295
+ # @overload delete(request, options = nil)
296
+ # Pass arguments to `delete` via a request object, either of type
297
+ # {::Google::Cloud::Compute::V1::DeleteInstantSnapshotRequest} or an equivalent Hash.
298
+ #
299
+ # @param request [::Google::Cloud::Compute::V1::DeleteInstantSnapshotRequest, ::Hash]
300
+ # A request object representing the call parameters. Required. To specify no
301
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
302
+ # @param options [::Gapic::CallOptions, ::Hash]
303
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
304
+ #
305
+ # @overload delete(instant_snapshot: nil, project: nil, request_id: nil, zone: nil)
306
+ # Pass arguments to `delete` via keyword arguments. Note that at
307
+ # least one keyword argument is required. To specify no parameters, or to keep all
308
+ # the default parameter values, pass an empty Hash as a request object (see above).
309
+ #
310
+ # @param instant_snapshot [::String]
311
+ # Name of the InstantSnapshot resource to delete.
312
+ # @param project [::String]
313
+ # Project ID for this request.
314
+ # @param request_id [::String]
315
+ # 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).
316
+ # @param zone [::String]
317
+ # The name of the zone for this request.
318
+ # @yield [result, operation] Access the result along with the TransportOperation object
319
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
320
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
321
+ #
322
+ # @return [::Gapic::GenericLRO::Operation]
323
+ #
324
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
325
+ #
326
+ # @example Basic example
327
+ # require "google/cloud/compute/v1"
328
+ #
329
+ # # Create a client object. The client can be reused for multiple calls.
330
+ # client = Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new
331
+ #
332
+ # # Create a request. To set request fields, pass in keyword arguments.
333
+ # request = Google::Cloud::Compute::V1::DeleteInstantSnapshotRequest.new
334
+ #
335
+ # # Call the delete method.
336
+ # result = client.delete request
337
+ #
338
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
339
+ # p result
340
+ #
341
+ def delete request, options = nil
342
+ raise ::ArgumentError, "request must be provided" if request.nil?
343
+
344
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteInstantSnapshotRequest
345
+
346
+ # Converts hash and nil to an options object
347
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
348
+
349
+ # Customize the options with defaults
350
+ call_metadata = @config.rpcs.delete.metadata.to_h
351
+
352
+ # Set x-goog-api-client and x-goog-user-project headers
353
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
354
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
355
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
356
+ transports_version_send: [:rest]
357
+
358
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
359
+
360
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
361
+ metadata: call_metadata,
362
+ retry_policy: @config.rpcs.delete.retry_policy
363
+
364
+ options.apply_defaults timeout: @config.timeout,
365
+ metadata: @config.metadata,
366
+ retry_policy: @config.retry_policy
367
+
368
+ @instant_snapshots_stub.delete request, options do |result, response|
369
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
370
+ operation: result,
371
+ client: zone_operations,
372
+ request_values: {
373
+ "project" => request.project,
374
+ "zone" => request.zone
375
+ },
376
+ options: options
377
+ )
378
+ yield result, response if block_given?
379
+ return result
380
+ end
381
+ rescue ::Gapic::Rest::Error => e
382
+ raise ::Google::Cloud::Error.from_error(e)
383
+ end
384
+
385
+ ##
386
+ # Returns the specified InstantSnapshot resource in the specified zone.
387
+ #
388
+ # @overload get(request, options = nil)
389
+ # Pass arguments to `get` via a request object, either of type
390
+ # {::Google::Cloud::Compute::V1::GetInstantSnapshotRequest} or an equivalent Hash.
391
+ #
392
+ # @param request [::Google::Cloud::Compute::V1::GetInstantSnapshotRequest, ::Hash]
393
+ # A request object representing the call parameters. Required. To specify no
394
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
395
+ # @param options [::Gapic::CallOptions, ::Hash]
396
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
397
+ #
398
+ # @overload get(instant_snapshot: nil, project: nil, zone: nil)
399
+ # Pass arguments to `get` via keyword arguments. Note that at
400
+ # least one keyword argument is required. To specify no parameters, or to keep all
401
+ # the default parameter values, pass an empty Hash as a request object (see above).
402
+ #
403
+ # @param instant_snapshot [::String]
404
+ # Name of the InstantSnapshot resource to return.
405
+ # @param project [::String]
406
+ # Project ID for this request.
407
+ # @param zone [::String]
408
+ # The name of the zone for this request.
409
+ # @yield [result, operation] Access the result along with the TransportOperation object
410
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstantSnapshot]
411
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
412
+ #
413
+ # @return [::Google::Cloud::Compute::V1::InstantSnapshot]
414
+ #
415
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
416
+ #
417
+ # @example Basic example
418
+ # require "google/cloud/compute/v1"
419
+ #
420
+ # # Create a client object. The client can be reused for multiple calls.
421
+ # client = Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new
422
+ #
423
+ # # Create a request. To set request fields, pass in keyword arguments.
424
+ # request = Google::Cloud::Compute::V1::GetInstantSnapshotRequest.new
425
+ #
426
+ # # Call the get method.
427
+ # result = client.get request
428
+ #
429
+ # # The returned object is of type Google::Cloud::Compute::V1::InstantSnapshot.
430
+ # p result
431
+ #
432
+ def get request, options = nil
433
+ raise ::ArgumentError, "request must be provided" if request.nil?
434
+
435
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetInstantSnapshotRequest
436
+
437
+ # Converts hash and nil to an options object
438
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
439
+
440
+ # Customize the options with defaults
441
+ call_metadata = @config.rpcs.get.metadata.to_h
442
+
443
+ # Set x-goog-api-client and x-goog-user-project headers
444
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
445
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
446
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
447
+ transports_version_send: [:rest]
448
+
449
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
450
+
451
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
452
+ metadata: call_metadata,
453
+ retry_policy: @config.rpcs.get.retry_policy
454
+
455
+ options.apply_defaults timeout: @config.timeout,
456
+ metadata: @config.metadata,
457
+ retry_policy: @config.retry_policy
458
+
459
+ @instant_snapshots_stub.get request, options do |result, operation|
460
+ yield result, operation if block_given?
461
+ return result
462
+ end
463
+ rescue ::Gapic::Rest::Error => e
464
+ raise ::Google::Cloud::Error.from_error(e)
465
+ end
466
+
467
+ ##
468
+ # Gets the access control policy for a resource. May be empty if no such policy or resource exists.
469
+ #
470
+ # @overload get_iam_policy(request, options = nil)
471
+ # Pass arguments to `get_iam_policy` via a request object, either of type
472
+ # {::Google::Cloud::Compute::V1::GetIamPolicyInstantSnapshotRequest} or an equivalent Hash.
473
+ #
474
+ # @param request [::Google::Cloud::Compute::V1::GetIamPolicyInstantSnapshotRequest, ::Hash]
475
+ # A request object representing the call parameters. Required. To specify no
476
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
477
+ # @param options [::Gapic::CallOptions, ::Hash]
478
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
479
+ #
480
+ # @overload get_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil, zone: nil)
481
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
482
+ # least one keyword argument is required. To specify no parameters, or to keep all
483
+ # the default parameter values, pass an empty Hash as a request object (see above).
484
+ #
485
+ # @param options_requested_policy_version [::Integer]
486
+ # Requested IAM Policy version.
487
+ # @param project [::String]
488
+ # Project ID for this request.
489
+ # @param resource [::String]
490
+ # Name or id of the resource for this request.
491
+ # @param zone [::String]
492
+ # The name of the zone for this request.
493
+ # @yield [result, operation] Access the result along with the TransportOperation object
494
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
495
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
496
+ #
497
+ # @return [::Google::Cloud::Compute::V1::Policy]
498
+ #
499
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
500
+ #
501
+ # @example Basic example
502
+ # require "google/cloud/compute/v1"
503
+ #
504
+ # # Create a client object. The client can be reused for multiple calls.
505
+ # client = Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new
506
+ #
507
+ # # Create a request. To set request fields, pass in keyword arguments.
508
+ # request = Google::Cloud::Compute::V1::GetIamPolicyInstantSnapshotRequest.new
509
+ #
510
+ # # Call the get_iam_policy method.
511
+ # result = client.get_iam_policy request
512
+ #
513
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
514
+ # p result
515
+ #
516
+ def get_iam_policy request, options = nil
517
+ raise ::ArgumentError, "request must be provided" if request.nil?
518
+
519
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetIamPolicyInstantSnapshotRequest
520
+
521
+ # Converts hash and nil to an options object
522
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
523
+
524
+ # Customize the options with defaults
525
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
526
+
527
+ # Set x-goog-api-client and x-goog-user-project headers
528
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
529
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
530
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
531
+ transports_version_send: [:rest]
532
+
533
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
534
+
535
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
536
+ metadata: call_metadata,
537
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
538
+
539
+ options.apply_defaults timeout: @config.timeout,
540
+ metadata: @config.metadata,
541
+ retry_policy: @config.retry_policy
542
+
543
+ @instant_snapshots_stub.get_iam_policy request, options do |result, operation|
544
+ yield result, operation if block_given?
545
+ return result
546
+ end
547
+ rescue ::Gapic::Rest::Error => e
548
+ raise ::Google::Cloud::Error.from_error(e)
549
+ end
550
+
551
+ ##
552
+ # Creates an instant snapshot in the specified zone.
553
+ #
554
+ # @overload insert(request, options = nil)
555
+ # Pass arguments to `insert` via a request object, either of type
556
+ # {::Google::Cloud::Compute::V1::InsertInstantSnapshotRequest} or an equivalent Hash.
557
+ #
558
+ # @param request [::Google::Cloud::Compute::V1::InsertInstantSnapshotRequest, ::Hash]
559
+ # A request object representing the call parameters. Required. To specify no
560
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
561
+ # @param options [::Gapic::CallOptions, ::Hash]
562
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
563
+ #
564
+ # @overload insert(instant_snapshot_resource: nil, project: nil, request_id: nil, zone: nil)
565
+ # Pass arguments to `insert` via keyword arguments. Note that at
566
+ # least one keyword argument is required. To specify no parameters, or to keep all
567
+ # the default parameter values, pass an empty Hash as a request object (see above).
568
+ #
569
+ # @param instant_snapshot_resource [::Google::Cloud::Compute::V1::InstantSnapshot, ::Hash]
570
+ # The body resource for this request
571
+ # @param project [::String]
572
+ # Project ID for this request.
573
+ # @param request_id [::String]
574
+ # 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).
575
+ # @param zone [::String]
576
+ # Name of the zone for this request.
577
+ # @yield [result, operation] Access the result along with the TransportOperation object
578
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
579
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
580
+ #
581
+ # @return [::Gapic::GenericLRO::Operation]
582
+ #
583
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
584
+ #
585
+ # @example Basic example
586
+ # require "google/cloud/compute/v1"
587
+ #
588
+ # # Create a client object. The client can be reused for multiple calls.
589
+ # client = Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new
590
+ #
591
+ # # Create a request. To set request fields, pass in keyword arguments.
592
+ # request = Google::Cloud::Compute::V1::InsertInstantSnapshotRequest.new
593
+ #
594
+ # # Call the insert method.
595
+ # result = client.insert request
596
+ #
597
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
598
+ # p result
599
+ #
600
+ def insert request, options = nil
601
+ raise ::ArgumentError, "request must be provided" if request.nil?
602
+
603
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertInstantSnapshotRequest
604
+
605
+ # Converts hash and nil to an options object
606
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
607
+
608
+ # Customize the options with defaults
609
+ call_metadata = @config.rpcs.insert.metadata.to_h
610
+
611
+ # Set x-goog-api-client and x-goog-user-project headers
612
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
613
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
614
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
615
+ transports_version_send: [:rest]
616
+
617
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
618
+
619
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
620
+ metadata: call_metadata,
621
+ retry_policy: @config.rpcs.insert.retry_policy
622
+
623
+ options.apply_defaults timeout: @config.timeout,
624
+ metadata: @config.metadata,
625
+ retry_policy: @config.retry_policy
626
+
627
+ @instant_snapshots_stub.insert request, options do |result, response|
628
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
629
+ operation: result,
630
+ client: zone_operations,
631
+ request_values: {
632
+ "project" => request.project,
633
+ "zone" => request.zone
634
+ },
635
+ options: options
636
+ )
637
+ yield result, response if block_given?
638
+ return result
639
+ end
640
+ rescue ::Gapic::Rest::Error => e
641
+ raise ::Google::Cloud::Error.from_error(e)
642
+ end
643
+
644
+ ##
645
+ # Retrieves the list of InstantSnapshot resources contained within the specified zone.
646
+ #
647
+ # @overload list(request, options = nil)
648
+ # Pass arguments to `list` via a request object, either of type
649
+ # {::Google::Cloud::Compute::V1::ListInstantSnapshotsRequest} or an equivalent Hash.
650
+ #
651
+ # @param request [::Google::Cloud::Compute::V1::ListInstantSnapshotsRequest, ::Hash]
652
+ # A request object representing the call parameters. Required. To specify no
653
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
654
+ # @param options [::Gapic::CallOptions, ::Hash]
655
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
656
+ #
657
+ # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
658
+ # Pass arguments to `list` via keyword arguments. Note that at
659
+ # least one keyword argument is required. To specify no parameters, or to keep all
660
+ # the default parameter values, pass an empty Hash as a request object (see above).
661
+ #
662
+ # @param filter [::String]
663
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your 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 `:*` 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) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.
664
+ # @param max_results [::Integer]
665
+ # 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`)
666
+ # @param order_by [::String]
667
+ # 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.
668
+ # @param page_token [::String]
669
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
670
+ # @param project [::String]
671
+ # Project ID for this request.
672
+ # @param return_partial_success [::Boolean]
673
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
674
+ # @param zone [::String]
675
+ # The name of the zone for this request.
676
+ # @yield [result, operation] Access the result along with the TransportOperation object
677
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstantSnapshot>]
678
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
679
+ #
680
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstantSnapshot>]
681
+ #
682
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
683
+ #
684
+ # @example Basic example
685
+ # require "google/cloud/compute/v1"
686
+ #
687
+ # # Create a client object. The client can be reused for multiple calls.
688
+ # client = Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new
689
+ #
690
+ # # Create a request. To set request fields, pass in keyword arguments.
691
+ # request = Google::Cloud::Compute::V1::ListInstantSnapshotsRequest.new
692
+ #
693
+ # # Call the list method.
694
+ # result = client.list request
695
+ #
696
+ # # The returned object is of type Google::Cloud::Compute::V1::InstantSnapshotList.
697
+ # p result
698
+ #
699
+ def list request, options = nil
700
+ raise ::ArgumentError, "request must be provided" if request.nil?
701
+
702
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListInstantSnapshotsRequest
703
+
704
+ # Converts hash and nil to an options object
705
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
706
+
707
+ # Customize the options with defaults
708
+ call_metadata = @config.rpcs.list.metadata.to_h
709
+
710
+ # Set x-goog-api-client and x-goog-user-project headers
711
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
712
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
713
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
714
+ transports_version_send: [:rest]
715
+
716
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
717
+
718
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
719
+ metadata: call_metadata,
720
+ retry_policy: @config.rpcs.list.retry_policy
721
+
722
+ options.apply_defaults timeout: @config.timeout,
723
+ metadata: @config.metadata,
724
+ retry_policy: @config.retry_policy
725
+
726
+ @instant_snapshots_stub.list request, options do |result, operation|
727
+ result = ::Gapic::Rest::PagedEnumerable.new @instant_snapshots_stub, :list, "items", request, result, options
728
+ yield result, operation if block_given?
729
+ return result
730
+ end
731
+ rescue ::Gapic::Rest::Error => e
732
+ raise ::Google::Cloud::Error.from_error(e)
733
+ end
734
+
735
+ ##
736
+ # Sets the access control policy on the specified resource. Replaces any existing policy.
737
+ #
738
+ # @overload set_iam_policy(request, options = nil)
739
+ # Pass arguments to `set_iam_policy` via a request object, either of type
740
+ # {::Google::Cloud::Compute::V1::SetIamPolicyInstantSnapshotRequest} or an equivalent Hash.
741
+ #
742
+ # @param request [::Google::Cloud::Compute::V1::SetIamPolicyInstantSnapshotRequest, ::Hash]
743
+ # A request object representing the call parameters. Required. To specify no
744
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
745
+ # @param options [::Gapic::CallOptions, ::Hash]
746
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
747
+ #
748
+ # @overload set_iam_policy(project: nil, resource: nil, zone: nil, zone_set_policy_request_resource: nil)
749
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
750
+ # least one keyword argument is required. To specify no parameters, or to keep all
751
+ # the default parameter values, pass an empty Hash as a request object (see above).
752
+ #
753
+ # @param project [::String]
754
+ # Project ID for this request.
755
+ # @param resource [::String]
756
+ # Name or id of the resource for this request.
757
+ # @param zone [::String]
758
+ # The name of the zone for this request.
759
+ # @param zone_set_policy_request_resource [::Google::Cloud::Compute::V1::ZoneSetPolicyRequest, ::Hash]
760
+ # The body resource for this request
761
+ # @yield [result, operation] Access the result along with the TransportOperation object
762
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
763
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
764
+ #
765
+ # @return [::Google::Cloud::Compute::V1::Policy]
766
+ #
767
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
768
+ #
769
+ # @example Basic example
770
+ # require "google/cloud/compute/v1"
771
+ #
772
+ # # Create a client object. The client can be reused for multiple calls.
773
+ # client = Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new
774
+ #
775
+ # # Create a request. To set request fields, pass in keyword arguments.
776
+ # request = Google::Cloud::Compute::V1::SetIamPolicyInstantSnapshotRequest.new
777
+ #
778
+ # # Call the set_iam_policy method.
779
+ # result = client.set_iam_policy request
780
+ #
781
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
782
+ # p result
783
+ #
784
+ def set_iam_policy request, options = nil
785
+ raise ::ArgumentError, "request must be provided" if request.nil?
786
+
787
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetIamPolicyInstantSnapshotRequest
788
+
789
+ # Converts hash and nil to an options object
790
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
791
+
792
+ # Customize the options with defaults
793
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
794
+
795
+ # Set x-goog-api-client and x-goog-user-project headers
796
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
797
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
798
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
799
+ transports_version_send: [:rest]
800
+
801
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
802
+
803
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
804
+ metadata: call_metadata,
805
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
806
+
807
+ options.apply_defaults timeout: @config.timeout,
808
+ metadata: @config.metadata,
809
+ retry_policy: @config.retry_policy
810
+
811
+ @instant_snapshots_stub.set_iam_policy request, options do |result, operation|
812
+ yield result, operation if block_given?
813
+ return result
814
+ end
815
+ rescue ::Gapic::Rest::Error => e
816
+ raise ::Google::Cloud::Error.from_error(e)
817
+ end
818
+
819
+ ##
820
+ # Sets the labels on a instantSnapshot in the given zone. To learn more about labels, read the Labeling Resources documentation.
821
+ #
822
+ # @overload set_labels(request, options = nil)
823
+ # Pass arguments to `set_labels` via a request object, either of type
824
+ # {::Google::Cloud::Compute::V1::SetLabelsInstantSnapshotRequest} or an equivalent Hash.
825
+ #
826
+ # @param request [::Google::Cloud::Compute::V1::SetLabelsInstantSnapshotRequest, ::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 set_labels(project: nil, request_id: nil, resource: nil, zone: nil, zone_set_labels_request_resource: nil)
833
+ # Pass arguments to `set_labels` 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 project [::String]
838
+ # Project ID for this request.
839
+ # @param request_id [::String]
840
+ # 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).
841
+ # @param resource [::String]
842
+ # Name or id of the resource for this request.
843
+ # @param zone [::String]
844
+ # The name of the zone for this request.
845
+ # @param zone_set_labels_request_resource [::Google::Cloud::Compute::V1::ZoneSetLabelsRequest, ::Hash]
846
+ # The body resource for this request
847
+ # @yield [result, operation] Access the result along with the TransportOperation object
848
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
849
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
850
+ #
851
+ # @return [::Gapic::GenericLRO::Operation]
852
+ #
853
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
854
+ #
855
+ # @example Basic example
856
+ # require "google/cloud/compute/v1"
857
+ #
858
+ # # Create a client object. The client can be reused for multiple calls.
859
+ # client = Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new
860
+ #
861
+ # # Create a request. To set request fields, pass in keyword arguments.
862
+ # request = Google::Cloud::Compute::V1::SetLabelsInstantSnapshotRequest.new
863
+ #
864
+ # # Call the set_labels method.
865
+ # result = client.set_labels request
866
+ #
867
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
868
+ # p result
869
+ #
870
+ def set_labels request, options = nil
871
+ raise ::ArgumentError, "request must be provided" if request.nil?
872
+
873
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetLabelsInstantSnapshotRequest
874
+
875
+ # Converts hash and nil to an options object
876
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
877
+
878
+ # Customize the options with defaults
879
+ call_metadata = @config.rpcs.set_labels.metadata.to_h
880
+
881
+ # Set x-goog-api-client and x-goog-user-project headers
882
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
883
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
884
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
885
+ transports_version_send: [:rest]
886
+
887
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
888
+
889
+ options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
890
+ metadata: call_metadata,
891
+ retry_policy: @config.rpcs.set_labels.retry_policy
892
+
893
+ options.apply_defaults timeout: @config.timeout,
894
+ metadata: @config.metadata,
895
+ retry_policy: @config.retry_policy
896
+
897
+ @instant_snapshots_stub.set_labels request, options do |result, response|
898
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
899
+ operation: result,
900
+ client: zone_operations,
901
+ request_values: {
902
+ "project" => request.project,
903
+ "zone" => request.zone
904
+ },
905
+ options: options
906
+ )
907
+ yield result, response if block_given?
908
+ return result
909
+ end
910
+ rescue ::Gapic::Rest::Error => e
911
+ raise ::Google::Cloud::Error.from_error(e)
912
+ end
913
+
914
+ ##
915
+ # Returns permissions that a caller has on the specified resource.
916
+ #
917
+ # @overload test_iam_permissions(request, options = nil)
918
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
919
+ # {::Google::Cloud::Compute::V1::TestIamPermissionsInstantSnapshotRequest} or an equivalent Hash.
920
+ #
921
+ # @param request [::Google::Cloud::Compute::V1::TestIamPermissionsInstantSnapshotRequest, ::Hash]
922
+ # A request object representing the call parameters. Required. To specify no
923
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
924
+ # @param options [::Gapic::CallOptions, ::Hash]
925
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
926
+ #
927
+ # @overload test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil, zone: nil)
928
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
929
+ # least one keyword argument is required. To specify no parameters, or to keep all
930
+ # the default parameter values, pass an empty Hash as a request object (see above).
931
+ #
932
+ # @param project [::String]
933
+ # Project ID for this request.
934
+ # @param resource [::String]
935
+ # Name or id of the resource for this request.
936
+ # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
937
+ # The body resource for this request
938
+ # @param zone [::String]
939
+ # The name of the zone for this request.
940
+ # @yield [result, operation] Access the result along with the TransportOperation object
941
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
942
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
943
+ #
944
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
945
+ #
946
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
947
+ #
948
+ # @example Basic example
949
+ # require "google/cloud/compute/v1"
950
+ #
951
+ # # Create a client object. The client can be reused for multiple calls.
952
+ # client = Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new
953
+ #
954
+ # # Create a request. To set request fields, pass in keyword arguments.
955
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsInstantSnapshotRequest.new
956
+ #
957
+ # # Call the test_iam_permissions method.
958
+ # result = client.test_iam_permissions request
959
+ #
960
+ # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
961
+ # p result
962
+ #
963
+ def test_iam_permissions request, options = nil
964
+ raise ::ArgumentError, "request must be provided" if request.nil?
965
+
966
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsInstantSnapshotRequest
967
+
968
+ # Converts hash and nil to an options object
969
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
970
+
971
+ # Customize the options with defaults
972
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
973
+
974
+ # Set x-goog-api-client and x-goog-user-project headers
975
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
976
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
977
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
978
+ transports_version_send: [:rest]
979
+
980
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
981
+
982
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
983
+ metadata: call_metadata,
984
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
985
+
986
+ options.apply_defaults timeout: @config.timeout,
987
+ metadata: @config.metadata,
988
+ retry_policy: @config.retry_policy
989
+
990
+ @instant_snapshots_stub.test_iam_permissions request, options do |result, operation|
991
+ yield result, operation if block_given?
992
+ return result
993
+ end
994
+ rescue ::Gapic::Rest::Error => e
995
+ raise ::Google::Cloud::Error.from_error(e)
996
+ end
997
+
998
+ ##
999
+ # Configuration class for the InstantSnapshots REST API.
1000
+ #
1001
+ # This class represents the configuration for InstantSnapshots REST,
1002
+ # providing control over timeouts, retry behavior, logging, transport
1003
+ # parameters, and other low-level controls. Certain parameters can also be
1004
+ # applied individually to specific RPCs. See
1005
+ # {::Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client::Configuration::Rpcs}
1006
+ # for a list of RPCs that can be configured independently.
1007
+ #
1008
+ # Configuration can be applied globally to all clients, or to a single client
1009
+ # on construction.
1010
+ #
1011
+ # @example
1012
+ #
1013
+ # # Modify the global config, setting the timeout for
1014
+ # # aggregated_list to 20 seconds,
1015
+ # # and all remaining timeouts to 10 seconds.
1016
+ # ::Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.configure do |config|
1017
+ # config.timeout = 10.0
1018
+ # config.rpcs.aggregated_list.timeout = 20.0
1019
+ # end
1020
+ #
1021
+ # # Apply the above configuration only to a new client.
1022
+ # client = ::Google::Cloud::Compute::V1::InstantSnapshots::Rest::Client.new do |config|
1023
+ # config.timeout = 10.0
1024
+ # config.rpcs.aggregated_list.timeout = 20.0
1025
+ # end
1026
+ #
1027
+ # @!attribute [rw] endpoint
1028
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1029
+ # nil, indicating to use the default endpoint in the current universe domain.
1030
+ # @return [::String,nil]
1031
+ # @!attribute [rw] credentials
1032
+ # Credentials to send with calls. You may provide any of the following types:
1033
+ # * (`String`) The path to a service account key file in JSON format
1034
+ # * (`Hash`) A service account key as a Hash
1035
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1036
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1037
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1038
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1039
+ # * (`nil`) indicating no credentials
1040
+ # @return [::Object]
1041
+ # @!attribute [rw] scope
1042
+ # The OAuth scopes
1043
+ # @return [::Array<::String>]
1044
+ # @!attribute [rw] lib_name
1045
+ # The library name as recorded in instrumentation and logging
1046
+ # @return [::String]
1047
+ # @!attribute [rw] lib_version
1048
+ # The library version as recorded in instrumentation and logging
1049
+ # @return [::String]
1050
+ # @!attribute [rw] timeout
1051
+ # The call timeout in seconds.
1052
+ # @return [::Numeric]
1053
+ # @!attribute [rw] metadata
1054
+ # Additional headers to be sent with the call.
1055
+ # @return [::Hash{::Symbol=>::String}]
1056
+ # @!attribute [rw] retry_policy
1057
+ # The retry policy. The value is a hash with the following keys:
1058
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1059
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1060
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1061
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1062
+ # trigger a retry.
1063
+ # @return [::Hash]
1064
+ # @!attribute [rw] quota_project
1065
+ # A separate project against which to charge quota.
1066
+ # @return [::String]
1067
+ # @!attribute [rw] universe_domain
1068
+ # The universe domain within which to make requests. This determines the
1069
+ # default endpoint URL. The default value of nil uses the environment
1070
+ # universe (usually the default "googleapis.com" universe).
1071
+ # @return [::String,nil]
1072
+ #
1073
+ class Configuration
1074
+ extend ::Gapic::Config
1075
+
1076
+ # @private
1077
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1078
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
1079
+
1080
+ config_attr :endpoint, nil, ::String, nil
1081
+ config_attr :credentials, nil do |value|
1082
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1083
+ allowed.any? { |klass| klass === value }
1084
+ end
1085
+ config_attr :scope, nil, ::String, ::Array, nil
1086
+ config_attr :lib_name, nil, ::String, nil
1087
+ config_attr :lib_version, nil, ::String, nil
1088
+ config_attr :timeout, nil, ::Numeric, nil
1089
+ config_attr :metadata, nil, ::Hash, nil
1090
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1091
+ config_attr :quota_project, nil, ::String, nil
1092
+ config_attr :universe_domain, nil, ::String, nil
1093
+
1094
+ # @private
1095
+ def initialize parent_config = nil
1096
+ @parent_config = parent_config unless parent_config.nil?
1097
+
1098
+ yield self if block_given?
1099
+ end
1100
+
1101
+ ##
1102
+ # Configurations for individual RPCs
1103
+ # @return [Rpcs]
1104
+ #
1105
+ def rpcs
1106
+ @rpcs ||= begin
1107
+ parent_rpcs = nil
1108
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1109
+ Rpcs.new parent_rpcs
1110
+ end
1111
+ end
1112
+
1113
+ ##
1114
+ # Configuration RPC class for the InstantSnapshots API.
1115
+ #
1116
+ # Includes fields providing the configuration for each RPC in this service.
1117
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1118
+ # the following configuration fields:
1119
+ #
1120
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1121
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1122
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1123
+ # include the following keys:
1124
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1125
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1126
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1127
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1128
+ # trigger a retry.
1129
+ #
1130
+ class Rpcs
1131
+ ##
1132
+ # RPC-specific configuration for `aggregated_list`
1133
+ # @return [::Gapic::Config::Method]
1134
+ #
1135
+ attr_reader :aggregated_list
1136
+ ##
1137
+ # RPC-specific configuration for `delete`
1138
+ # @return [::Gapic::Config::Method]
1139
+ #
1140
+ attr_reader :delete
1141
+ ##
1142
+ # RPC-specific configuration for `get`
1143
+ # @return [::Gapic::Config::Method]
1144
+ #
1145
+ attr_reader :get
1146
+ ##
1147
+ # RPC-specific configuration for `get_iam_policy`
1148
+ # @return [::Gapic::Config::Method]
1149
+ #
1150
+ attr_reader :get_iam_policy
1151
+ ##
1152
+ # RPC-specific configuration for `insert`
1153
+ # @return [::Gapic::Config::Method]
1154
+ #
1155
+ attr_reader :insert
1156
+ ##
1157
+ # RPC-specific configuration for `list`
1158
+ # @return [::Gapic::Config::Method]
1159
+ #
1160
+ attr_reader :list
1161
+ ##
1162
+ # RPC-specific configuration for `set_iam_policy`
1163
+ # @return [::Gapic::Config::Method]
1164
+ #
1165
+ attr_reader :set_iam_policy
1166
+ ##
1167
+ # RPC-specific configuration for `set_labels`
1168
+ # @return [::Gapic::Config::Method]
1169
+ #
1170
+ attr_reader :set_labels
1171
+ ##
1172
+ # RPC-specific configuration for `test_iam_permissions`
1173
+ # @return [::Gapic::Config::Method]
1174
+ #
1175
+ attr_reader :test_iam_permissions
1176
+
1177
+ # @private
1178
+ def initialize parent_rpcs = nil
1179
+ aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
1180
+ @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
1181
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
1182
+ @delete = ::Gapic::Config::Method.new delete_config
1183
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
1184
+ @get = ::Gapic::Config::Method.new get_config
1185
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
1186
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1187
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
1188
+ @insert = ::Gapic::Config::Method.new insert_config
1189
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
1190
+ @list = ::Gapic::Config::Method.new list_config
1191
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1192
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1193
+ set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
1194
+ @set_labels = ::Gapic::Config::Method.new set_labels_config
1195
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1196
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1197
+
1198
+ yield self if block_given?
1199
+ end
1200
+ end
1201
+ end
1202
+ end
1203
+ end
1204
+ end
1205
+ end
1206
+ end
1207
+ end
1208
+ end