google-cloud-resource_manager-v3 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +139 -0
  6. data/lib/google-cloud-resource_manager-v3.rb +21 -0
  7. data/lib/google/cloud/resource_manager/v3.rb +43 -0
  8. data/lib/google/cloud/resource_manager/v3/folders.rb +52 -0
  9. data/lib/google/cloud/resource_manager/v3/folders/client.rb +1328 -0
  10. data/lib/google/cloud/resource_manager/v3/folders/credentials.rb +52 -0
  11. data/lib/google/cloud/resource_manager/v3/folders/operations.rb +664 -0
  12. data/lib/google/cloud/resource_manager/v3/folders/paths.rb +47 -0
  13. data/lib/google/cloud/resource_manager/v3/organizations.rb +49 -0
  14. data/lib/google/cloud/resource_manager/v3/organizations/client.rb +739 -0
  15. data/lib/google/cloud/resource_manager/v3/organizations/credentials.rb +52 -0
  16. data/lib/google/cloud/resource_manager/v3/organizations/paths.rb +47 -0
  17. data/lib/google/cloud/resource_manager/v3/projects.rb +50 -0
  18. data/lib/google/cloud/resource_manager/v3/projects/client.rb +1356 -0
  19. data/lib/google/cloud/resource_manager/v3/projects/credentials.rb +52 -0
  20. data/lib/google/cloud/resource_manager/v3/projects/operations.rb +664 -0
  21. data/lib/google/cloud/resource_manager/v3/projects/paths.rb +47 -0
  22. data/lib/google/cloud/resource_manager/v3/tag_bindings.rb +51 -0
  23. data/lib/google/cloud/resource_manager/v3/tag_bindings/client.rb +552 -0
  24. data/lib/google/cloud/resource_manager/v3/tag_bindings/credentials.rb +52 -0
  25. data/lib/google/cloud/resource_manager/v3/tag_bindings/operations.rb +664 -0
  26. data/lib/google/cloud/resource_manager/v3/tag_bindings/paths.rb +47 -0
  27. data/lib/google/cloud/resource_manager/v3/tag_keys.rb +50 -0
  28. data/lib/google/cloud/resource_manager/v3/tag_keys/client.rb +987 -0
  29. data/lib/google/cloud/resource_manager/v3/tag_keys/credentials.rb +52 -0
  30. data/lib/google/cloud/resource_manager/v3/tag_keys/operations.rb +664 -0
  31. data/lib/google/cloud/resource_manager/v3/tag_keys/paths.rb +47 -0
  32. data/lib/google/cloud/resource_manager/v3/tag_values.rb +50 -0
  33. data/lib/google/cloud/resource_manager/v3/tag_values/client.rb +983 -0
  34. data/lib/google/cloud/resource_manager/v3/tag_values/credentials.rb +52 -0
  35. data/lib/google/cloud/resource_manager/v3/tag_values/operations.rb +664 -0
  36. data/lib/google/cloud/resource_manager/v3/tag_values/paths.rb +47 -0
  37. data/lib/google/cloud/resource_manager/v3/version.rb +28 -0
  38. data/lib/google/cloud/resourcemanager/v3/folders_pb.rb +113 -0
  39. data/lib/google/cloud/resourcemanager/v3/folders_services_pb.rb +166 -0
  40. data/lib/google/cloud/resourcemanager/v3/organizations_pb.rb +66 -0
  41. data/lib/google/cloud/resourcemanager/v3/organizations_services_pb.rb +73 -0
  42. data/lib/google/cloud/resourcemanager/v3/projects_pb.rb +113 -0
  43. data/lib/google/cloud/resourcemanager/v3/projects_services_pb.rb +187 -0
  44. data/lib/google/cloud/resourcemanager/v3/tag_bindings_pb.rb +55 -0
  45. data/lib/google/cloud/resourcemanager/v3/tag_bindings_services_pb.rb +55 -0
  46. data/lib/google/cloud/resourcemanager/v3/tag_keys_pb.rb +79 -0
  47. data/lib/google/cloud/resourcemanager/v3/tag_keys_services_pb.rb +77 -0
  48. data/lib/google/cloud/resourcemanager/v3/tag_values_pb.rb +79 -0
  49. data/lib/google/cloud/resourcemanager/v3/tag_values_services_pb.rb +78 -0
  50. data/proto_docs/README.md +4 -0
  51. data/proto_docs/google/api/field_behavior.rb +71 -0
  52. data/proto_docs/google/api/resource.rb +283 -0
  53. data/proto_docs/google/cloud/resourcemanager/v3/folders.rb +307 -0
  54. data/proto_docs/google/cloud/resourcemanager/v3/organizations.rb +152 -0
  55. data/proto_docs/google/cloud/resourcemanager/v3/projects.rb +395 -0
  56. data/proto_docs/google/cloud/resourcemanager/v3/tag_bindings.rb +127 -0
  57. data/proto_docs/google/cloud/resourcemanager/v3/tag_keys.rb +181 -0
  58. data/proto_docs/google/cloud/resourcemanager/v3/tag_values.rb +179 -0
  59. data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
  60. data/proto_docs/google/iam/v1/options.rb +40 -0
  61. data/proto_docs/google/iam/v1/policy.rb +248 -0
  62. data/proto_docs/google/longrunning/operations.rb +164 -0
  63. data/proto_docs/google/protobuf/any.rb +141 -0
  64. data/proto_docs/google/protobuf/duration.rb +98 -0
  65. data/proto_docs/google/protobuf/empty.rb +36 -0
  66. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  67. data/proto_docs/google/protobuf/timestamp.rb +129 -0
  68. data/proto_docs/google/rpc/status.rb +46 -0
  69. data/proto_docs/google/type/expr.rb +75 -0
  70. metadata +283 -0
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/cloud/resource_manager/v3"
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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/resource_manager/v3/folders"
20
+ require "google/cloud/resource_manager/v3/organizations"
21
+ require "google/cloud/resource_manager/v3/projects"
22
+ require "google/cloud/resource_manager/v3/tag_bindings"
23
+ require "google/cloud/resource_manager/v3/tag_keys"
24
+ require "google/cloud/resource_manager/v3/tag_values"
25
+ require "google/cloud/resource_manager/v3/version"
26
+
27
+ module Google
28
+ module Cloud
29
+ module ResourceManager
30
+ ##
31
+ # To load this package, including all its services, and instantiate a client:
32
+ #
33
+ # require "google/cloud/resource_manager/v3"
34
+ # client = ::Google::Cloud::ResourceManager::V3::Folders::Client.new
35
+ #
36
+ module V3
37
+ end
38
+ end
39
+ end
40
+ end
41
+
42
+ helper_path = ::File.join __dir__, "v3", "_helpers.rb"
43
+ require "google/cloud/resource_manager/v3/_helpers" if ::File.file? helper_path
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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 "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/resource_manager/v3/version"
24
+
25
+ require "google/cloud/resource_manager/v3/folders/credentials"
26
+ require "google/cloud/resource_manager/v3/folders/paths"
27
+ require "google/cloud/resource_manager/v3/folders/operations"
28
+ require "google/cloud/resource_manager/v3/folders/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module ResourceManager
33
+ module V3
34
+ ##
35
+ # Manages Cloud Platform folder resources.
36
+ # Folders can be used to organize the resources under an
37
+ # organization and to control the policies applied to groups of resources.
38
+ #
39
+ # To load this service and instantiate a client:
40
+ #
41
+ # require "google/cloud/resource_manager/v3/folders"
42
+ # client = ::Google::Cloud::ResourceManager::V3::Folders::Client.new
43
+ #
44
+ module Folders
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ helper_path = ::File.join __dir__, "folders", "helpers.rb"
52
+ require "google/cloud/resource_manager/v3/folders/helpers" if ::File.file? helper_path
@@ -0,0 +1,1328 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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/resourcemanager/v3/folders_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module ResourceManager
25
+ module V3
26
+ module Folders
27
+ ##
28
+ # Client for the Folders service.
29
+ #
30
+ # Manages Cloud Platform folder resources.
31
+ # Folders can be used to organize the resources under an
32
+ # organization and to control the policies applied to groups of resources.
33
+ #
34
+ class Client
35
+ include Paths
36
+
37
+ # @private
38
+ attr_reader :folders_stub
39
+
40
+ ##
41
+ # Configure the Folders Client class.
42
+ #
43
+ # See {::Google::Cloud::ResourceManager::V3::Folders::Client::Configuration}
44
+ # for a description of the configuration fields.
45
+ #
46
+ # @example
47
+ #
48
+ # # Modify the configuration for all Folders clients
49
+ # ::Google::Cloud::ResourceManager::V3::Folders::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
52
+ #
53
+ # @yield [config] Configure the Client client.
54
+ # @yieldparam config [Client::Configuration]
55
+ #
56
+ # @return [Client::Configuration]
57
+ #
58
+ def self.configure
59
+ @configure ||= begin
60
+ namespace = ["Google", "Cloud", "ResourceManager", "V3"]
61
+ parent_config = while namespace.any?
62
+ parent_name = namespace.join "::"
63
+ parent_const = const_get parent_name
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
+ namespace.pop
66
+ end
67
+ default_config = Client::Configuration.new parent_config
68
+
69
+ default_config.rpcs.get_folder.timeout = 60.0
70
+ default_config.rpcs.get_folder.retry_policy = {
71
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
72
+ }
73
+
74
+ default_config.rpcs.list_folders.timeout = 60.0
75
+ default_config.rpcs.list_folders.retry_policy = {
76
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
77
+ }
78
+
79
+ default_config.rpcs.search_folders.timeout = 60.0
80
+
81
+ default_config.rpcs.create_folder.timeout = 60.0
82
+
83
+ default_config.rpcs.update_folder.timeout = 60.0
84
+
85
+ default_config.rpcs.move_folder.timeout = 60.0
86
+
87
+ default_config.rpcs.delete_folder.timeout = 60.0
88
+
89
+ default_config.rpcs.undelete_folder.timeout = 60.0
90
+
91
+ default_config.rpcs.get_iam_policy.timeout = 60.0
92
+ default_config.rpcs.get_iam_policy.retry_policy = {
93
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
94
+ }
95
+
96
+ default_config.rpcs.set_iam_policy.timeout = 60.0
97
+
98
+ default_config
99
+ end
100
+ yield @configure if block_given?
101
+ @configure
102
+ end
103
+
104
+ ##
105
+ # Configure the Folders Client instance.
106
+ #
107
+ # The configuration is set to the derived mode, meaning that values can be changed,
108
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
109
+ # should be made on {Client.configure}.
110
+ #
111
+ # See {::Google::Cloud::ResourceManager::V3::Folders::Client::Configuration}
112
+ # for a description of the configuration fields.
113
+ #
114
+ # @yield [config] Configure the Client client.
115
+ # @yieldparam config [Client::Configuration]
116
+ #
117
+ # @return [Client::Configuration]
118
+ #
119
+ def configure
120
+ yield @config if block_given?
121
+ @config
122
+ end
123
+
124
+ ##
125
+ # Create a new Folders client object.
126
+ #
127
+ # @example
128
+ #
129
+ # # Create a client using the default configuration
130
+ # client = ::Google::Cloud::ResourceManager::V3::Folders::Client.new
131
+ #
132
+ # # Create a client using a custom configuration
133
+ # client = ::Google::Cloud::ResourceManager::V3::Folders::Client.new do |config|
134
+ # config.timeout = 10.0
135
+ # end
136
+ #
137
+ # @yield [config] Configure the Folders client.
138
+ # @yieldparam config [Client::Configuration]
139
+ #
140
+ def initialize
141
+ # These require statements are intentionally placed here to initialize
142
+ # the gRPC module only when it's required.
143
+ # See https://github.com/googleapis/toolkit/issues/446
144
+ require "gapic/grpc"
145
+ require "google/cloud/resourcemanager/v3/folders_services_pb"
146
+
147
+ # Create the configuration object
148
+ @config = Configuration.new Client.configure
149
+
150
+ # Yield the configuration if needed
151
+ yield @config if block_given?
152
+
153
+ # Create credentials
154
+ credentials = @config.credentials
155
+ # Use self-signed JWT if the endpoint is unchanged from default,
156
+ # but only if the default endpoint does not have a region prefix.
157
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
158
+ !@config.endpoint.split(".").first.include?("-")
159
+ credentials ||= Credentials.default scope: @config.scope,
160
+ enable_self_signed_jwt: enable_self_signed_jwt
161
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
162
+ credentials = Credentials.new credentials, scope: @config.scope
163
+ end
164
+ @quota_project_id = @config.quota_project
165
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
166
+
167
+ @operations_client = Operations.new do |config|
168
+ config.credentials = credentials
169
+ config.endpoint = @config.endpoint
170
+ end
171
+
172
+ @folders_stub = ::Gapic::ServiceStub.new(
173
+ ::Google::Cloud::ResourceManager::V3::Folders::Stub,
174
+ credentials: credentials,
175
+ endpoint: @config.endpoint,
176
+ channel_args: @config.channel_args,
177
+ interceptors: @config.interceptors
178
+ )
179
+ end
180
+
181
+ ##
182
+ # Get the associated client for long-running operations.
183
+ #
184
+ # @return [::Google::Cloud::ResourceManager::V3::Folders::Operations]
185
+ #
186
+ attr_reader :operations_client
187
+
188
+ # Service calls
189
+
190
+ ##
191
+ # Retrieves a folder identified by the supplied resource name.
192
+ # Valid folder resource names have the format `folders/{folder_id}`
193
+ # (for example, `folders/1234`).
194
+ # The caller must have `resourcemanager.folders.get` permission on the
195
+ # identified folder.
196
+ #
197
+ # @overload get_folder(request, options = nil)
198
+ # Pass arguments to `get_folder` via a request object, either of type
199
+ # {::Google::Cloud::ResourceManager::V3::GetFolderRequest} or an equivalent Hash.
200
+ #
201
+ # @param request [::Google::Cloud::ResourceManager::V3::GetFolderRequest, ::Hash]
202
+ # A request object representing the call parameters. Required. To specify no
203
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
204
+ # @param options [::Gapic::CallOptions, ::Hash]
205
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
206
+ #
207
+ # @overload get_folder(name: nil)
208
+ # Pass arguments to `get_folder` via keyword arguments. Note that at
209
+ # least one keyword argument is required. To specify no parameters, or to keep all
210
+ # the default parameter values, pass an empty Hash as a request object (see above).
211
+ #
212
+ # @param name [::String]
213
+ # Required. The resource name of the folder to retrieve.
214
+ # Must be of the form `folders/{folder_id}`.
215
+ #
216
+ # @yield [response, operation] Access the result along with the RPC operation
217
+ # @yieldparam response [::Google::Cloud::ResourceManager::V3::Folder]
218
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
219
+ #
220
+ # @return [::Google::Cloud::ResourceManager::V3::Folder]
221
+ #
222
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
223
+ #
224
+ def get_folder request, options = nil
225
+ raise ::ArgumentError, "request must be provided" if request.nil?
226
+
227
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::GetFolderRequest
228
+
229
+ # Converts hash and nil to an options object
230
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
231
+
232
+ # Customize the options with defaults
233
+ metadata = @config.rpcs.get_folder.metadata.to_h
234
+
235
+ # Set x-goog-api-client and x-goog-user-project headers
236
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
237
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
238
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
239
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
240
+
241
+ header_params = {
242
+ "name" => request.name
243
+ }
244
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
245
+ metadata[:"x-goog-request-params"] ||= request_params_header
246
+
247
+ options.apply_defaults timeout: @config.rpcs.get_folder.timeout,
248
+ metadata: metadata,
249
+ retry_policy: @config.rpcs.get_folder.retry_policy
250
+
251
+ options.apply_defaults timeout: @config.timeout,
252
+ metadata: @config.metadata,
253
+ retry_policy: @config.retry_policy
254
+
255
+ @folders_stub.call_rpc :get_folder, request, options: options do |response, operation|
256
+ yield response, operation if block_given?
257
+ return response
258
+ end
259
+ rescue ::GRPC::BadStatus => e
260
+ raise ::Google::Cloud::Error.from_error(e)
261
+ end
262
+
263
+ ##
264
+ # Lists the folders that are direct descendants of supplied parent resource.
265
+ # `list()` provides a strongly consistent view of the folders underneath
266
+ # the specified parent resource.
267
+ # `list()` returns folders sorted based upon the (ascending) lexical ordering
268
+ # of their display_name.
269
+ # The caller must have `resourcemanager.folders.list` permission on the
270
+ # identified parent.
271
+ #
272
+ # @overload list_folders(request, options = nil)
273
+ # Pass arguments to `list_folders` via a request object, either of type
274
+ # {::Google::Cloud::ResourceManager::V3::ListFoldersRequest} or an equivalent Hash.
275
+ #
276
+ # @param request [::Google::Cloud::ResourceManager::V3::ListFoldersRequest, ::Hash]
277
+ # A request object representing the call parameters. Required. To specify no
278
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
279
+ # @param options [::Gapic::CallOptions, ::Hash]
280
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
281
+ #
282
+ # @overload list_folders(parent: nil, page_size: nil, page_token: nil, show_deleted: nil)
283
+ # Pass arguments to `list_folders` via keyword arguments. Note that at
284
+ # least one keyword argument is required. To specify no parameters, or to keep all
285
+ # the default parameter values, pass an empty Hash as a request object (see above).
286
+ #
287
+ # @param parent [::String]
288
+ # Required. The resource name of the organization or folder whose folders are
289
+ # being listed.
290
+ # Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
291
+ # Access to this method is controlled by checking the
292
+ # `resourcemanager.folders.list` permission on the `parent`.
293
+ # @param page_size [::Integer]
294
+ # Optional. The maximum number of folders to return in the response.
295
+ # If unspecified, server picks an appropriate default.
296
+ # @param page_token [::String]
297
+ # Optional. A pagination token returned from a previous call to `ListFolders`
298
+ # that indicates where this listing should continue from.
299
+ # @param show_deleted [::Boolean]
300
+ # Optional. Controls whether folders in the
301
+ # {::Google::Cloud::ResourceManager::V3::Folder::State::DELETE_REQUESTED DELETE_REQUESTED}
302
+ # state should be returned. Defaults to false.
303
+ #
304
+ # @yield [response, operation] Access the result along with the RPC operation
305
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ResourceManager::V3::Folder>]
306
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
307
+ #
308
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ResourceManager::V3::Folder>]
309
+ #
310
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
311
+ #
312
+ def list_folders request, options = nil
313
+ raise ::ArgumentError, "request must be provided" if request.nil?
314
+
315
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::ListFoldersRequest
316
+
317
+ # Converts hash and nil to an options object
318
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
319
+
320
+ # Customize the options with defaults
321
+ metadata = @config.rpcs.list_folders.metadata.to_h
322
+
323
+ # Set x-goog-api-client and x-goog-user-project headers
324
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
325
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
326
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
327
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
328
+
329
+ options.apply_defaults timeout: @config.rpcs.list_folders.timeout,
330
+ metadata: metadata,
331
+ retry_policy: @config.rpcs.list_folders.retry_policy
332
+
333
+ options.apply_defaults timeout: @config.timeout,
334
+ metadata: @config.metadata,
335
+ retry_policy: @config.retry_policy
336
+
337
+ @folders_stub.call_rpc :list_folders, request, options: options do |response, operation|
338
+ response = ::Gapic::PagedEnumerable.new @folders_stub, :list_folders, request, response, operation, options
339
+ yield response, operation if block_given?
340
+ return response
341
+ end
342
+ rescue ::GRPC::BadStatus => e
343
+ raise ::Google::Cloud::Error.from_error(e)
344
+ end
345
+
346
+ ##
347
+ # Search for folders that match specific filter criteria.
348
+ # `search()` provides an eventually consistent view of the folders a user has
349
+ # access to which meet the specified filter criteria.
350
+ #
351
+ # This will only return folders on which the caller has the
352
+ # permission `resourcemanager.folders.get`.
353
+ #
354
+ # @overload search_folders(request, options = nil)
355
+ # Pass arguments to `search_folders` via a request object, either of type
356
+ # {::Google::Cloud::ResourceManager::V3::SearchFoldersRequest} or an equivalent Hash.
357
+ #
358
+ # @param request [::Google::Cloud::ResourceManager::V3::SearchFoldersRequest, ::Hash]
359
+ # A request object representing the call parameters. Required. To specify no
360
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
361
+ # @param options [::Gapic::CallOptions, ::Hash]
362
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
363
+ #
364
+ # @overload search_folders(page_size: nil, page_token: nil, query: nil)
365
+ # Pass arguments to `search_folders` via keyword arguments. Note that at
366
+ # least one keyword argument is required. To specify no parameters, or to keep all
367
+ # the default parameter values, pass an empty Hash as a request object (see above).
368
+ #
369
+ # @param page_size [::Integer]
370
+ # Optional. The maximum number of folders to return in the response.
371
+ # If unspecified, server picks an appropriate default.
372
+ # @param page_token [::String]
373
+ # Optional. A pagination token returned from a previous call to `SearchFolders`
374
+ # that indicates from where search should continue.
375
+ # @param query [::String]
376
+ # Optional. Search criteria used to select the folders to return.
377
+ # If no search criteria is specified then all accessible folders will be
378
+ # returned.
379
+ #
380
+ # Query expressions can be used to restrict results based upon displayName,
381
+ # state and parent, where the operators `=` (`:`) `NOT`, `AND` and `OR`
382
+ # can be used along with the suffix wildcard symbol `*`.
383
+ #
384
+ # The `displayName` field in a query expression should use escaped quotes
385
+ # for values that include whitespace to prevent unexpected behavior.
386
+ #
387
+ # | Field | Description |
388
+ # |-------------------------|----------------------------------------|
389
+ # | displayName | Filters by displayName. |
390
+ # | parent | Filters by parent (for example: folders/123). |
391
+ # | state, lifecycleState | Filters by state. |
392
+ #
393
+ # Some example queries are:
394
+ #
395
+ # * Query `displayName=Test*` returns Folder resources whose display name
396
+ # starts with "Test".
397
+ # * Query `state=ACTIVE` returns Folder resources with
398
+ # `state` set to `ACTIVE`.
399
+ # * Query `parent=folders/123` returns Folder resources that have
400
+ # `folders/123` as a parent resource.
401
+ # * Query `parent=folders/123 AND state=ACTIVE` returns active
402
+ # Folder resources that have `folders/123` as a parent resource.
403
+ # * Query `displayName=\\"Test String\\"` returns Folder resources with
404
+ # display names that include both "Test" and "String".
405
+ #
406
+ # @yield [response, operation] Access the result along with the RPC operation
407
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ResourceManager::V3::Folder>]
408
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
409
+ #
410
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ResourceManager::V3::Folder>]
411
+ #
412
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
413
+ #
414
+ def search_folders request, options = nil
415
+ raise ::ArgumentError, "request must be provided" if request.nil?
416
+
417
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::SearchFoldersRequest
418
+
419
+ # Converts hash and nil to an options object
420
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
421
+
422
+ # Customize the options with defaults
423
+ metadata = @config.rpcs.search_folders.metadata.to_h
424
+
425
+ # Set x-goog-api-client and x-goog-user-project headers
426
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
427
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
428
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
429
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
430
+
431
+ options.apply_defaults timeout: @config.rpcs.search_folders.timeout,
432
+ metadata: metadata,
433
+ retry_policy: @config.rpcs.search_folders.retry_policy
434
+
435
+ options.apply_defaults timeout: @config.timeout,
436
+ metadata: @config.metadata,
437
+ retry_policy: @config.retry_policy
438
+
439
+ @folders_stub.call_rpc :search_folders, request, options: options do |response, operation|
440
+ response = ::Gapic::PagedEnumerable.new @folders_stub, :search_folders, request, response, operation, options
441
+ yield response, operation if block_given?
442
+ return response
443
+ end
444
+ rescue ::GRPC::BadStatus => e
445
+ raise ::Google::Cloud::Error.from_error(e)
446
+ end
447
+
448
+ ##
449
+ # Creates a folder in the resource hierarchy.
450
+ # Returns an `Operation` which can be used to track the progress of the
451
+ # folder creation workflow.
452
+ # Upon success, the `Operation.response` field will be populated with the
453
+ # created Folder.
454
+ #
455
+ # In order to succeed, the addition of this new folder must not violate
456
+ # the folder naming, height, or fanout constraints.
457
+ #
458
+ # + The folder's `display_name` must be distinct from all other folders that
459
+ # share its parent.
460
+ # + The addition of the folder must not cause the active folder hierarchy
461
+ # to exceed a height of 10. Note, the full active + deleted folder hierarchy
462
+ # is allowed to reach a height of 20; this provides additional headroom when
463
+ # moving folders that contain deleted folders.
464
+ # + The addition of the folder must not cause the total number of folders
465
+ # under its parent to exceed 300.
466
+ #
467
+ # If the operation fails due to a folder constraint violation, some errors
468
+ # may be returned by the `CreateFolder` request, with status code
469
+ # `FAILED_PRECONDITION` and an error description. Other folder constraint
470
+ # violations will be communicated in the `Operation`, with the specific
471
+ # `PreconditionFailure` returned in the details list in the `Operation.error`
472
+ # field.
473
+ #
474
+ # The caller must have `resourcemanager.folders.create` permission on the
475
+ # identified parent.
476
+ #
477
+ # @overload create_folder(request, options = nil)
478
+ # Pass arguments to `create_folder` via a request object, either of type
479
+ # {::Google::Cloud::ResourceManager::V3::CreateFolderRequest} or an equivalent Hash.
480
+ #
481
+ # @param request [::Google::Cloud::ResourceManager::V3::CreateFolderRequest, ::Hash]
482
+ # A request object representing the call parameters. Required. To specify no
483
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
484
+ # @param options [::Gapic::CallOptions, ::Hash]
485
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
486
+ #
487
+ # @overload create_folder(folder: nil)
488
+ # Pass arguments to `create_folder` via keyword arguments. Note that at
489
+ # least one keyword argument is required. To specify no parameters, or to keep all
490
+ # the default parameter values, pass an empty Hash as a request object (see above).
491
+ #
492
+ # @param folder [::Google::Cloud::ResourceManager::V3::Folder, ::Hash]
493
+ # Required. The folder being created, only the display name and parent will be
494
+ # consulted. All other fields will be ignored.
495
+ #
496
+ # @yield [response, operation] Access the result along with the RPC operation
497
+ # @yieldparam response [::Gapic::Operation]
498
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
499
+ #
500
+ # @return [::Gapic::Operation]
501
+ #
502
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
503
+ #
504
+ def create_folder request, options = nil
505
+ raise ::ArgumentError, "request must be provided" if request.nil?
506
+
507
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::CreateFolderRequest
508
+
509
+ # Converts hash and nil to an options object
510
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
511
+
512
+ # Customize the options with defaults
513
+ metadata = @config.rpcs.create_folder.metadata.to_h
514
+
515
+ # Set x-goog-api-client and x-goog-user-project headers
516
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
517
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
518
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
519
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
520
+
521
+ options.apply_defaults timeout: @config.rpcs.create_folder.timeout,
522
+ metadata: metadata,
523
+ retry_policy: @config.rpcs.create_folder.retry_policy
524
+
525
+ options.apply_defaults timeout: @config.timeout,
526
+ metadata: @config.metadata,
527
+ retry_policy: @config.retry_policy
528
+
529
+ @folders_stub.call_rpc :create_folder, request, options: options do |response, operation|
530
+ response = ::Gapic::Operation.new response, @operations_client, options: options
531
+ yield response, operation if block_given?
532
+ return response
533
+ end
534
+ rescue ::GRPC::BadStatus => e
535
+ raise ::Google::Cloud::Error.from_error(e)
536
+ end
537
+
538
+ ##
539
+ # Updates a folder, changing its `display_name`.
540
+ # Changes to the folder `display_name` will be rejected if they violate
541
+ # either the `display_name` formatting rules or the naming constraints
542
+ # described in the {::Google::Cloud::ResourceManager::V3::Folders::Client#create_folder CreateFolder} documentation.
543
+ #
544
+ # The folder's `display_name` must start and end with a letter or digit,
545
+ # may contain letters, digits, spaces, hyphens and underscores and can be
546
+ # between 3 and 30 characters. This is captured by the regular expression:
547
+ # `[\p{L}\p{N}][\p{L}\p{N}_- ]{1,28}[\p{L}\p{N}]`.
548
+ # The caller must have `resourcemanager.folders.update` permission on the
549
+ # identified folder.
550
+ #
551
+ # If the update fails due to the unique name constraint then a
552
+ # `PreconditionFailure` explaining this violation will be returned
553
+ # in the Status.details field.
554
+ #
555
+ # @overload update_folder(request, options = nil)
556
+ # Pass arguments to `update_folder` via a request object, either of type
557
+ # {::Google::Cloud::ResourceManager::V3::UpdateFolderRequest} or an equivalent Hash.
558
+ #
559
+ # @param request [::Google::Cloud::ResourceManager::V3::UpdateFolderRequest, ::Hash]
560
+ # A request object representing the call parameters. Required. To specify no
561
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
562
+ # @param options [::Gapic::CallOptions, ::Hash]
563
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
564
+ #
565
+ # @overload update_folder(folder: nil, update_mask: nil)
566
+ # Pass arguments to `update_folder` 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 folder [::Google::Cloud::ResourceManager::V3::Folder, ::Hash]
571
+ # Required. The new definition of the Folder. It must include the `name` field, which
572
+ # cannot be changed.
573
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
574
+ # Required. Fields to be updated.
575
+ # Only the `display_name` can be updated.
576
+ #
577
+ # @yield [response, operation] Access the result along with the RPC operation
578
+ # @yieldparam response [::Gapic::Operation]
579
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
580
+ #
581
+ # @return [::Gapic::Operation]
582
+ #
583
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
584
+ #
585
+ def update_folder request, options = nil
586
+ raise ::ArgumentError, "request must be provided" if request.nil?
587
+
588
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::UpdateFolderRequest
589
+
590
+ # Converts hash and nil to an options object
591
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
592
+
593
+ # Customize the options with defaults
594
+ metadata = @config.rpcs.update_folder.metadata.to_h
595
+
596
+ # Set x-goog-api-client and x-goog-user-project headers
597
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
598
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
599
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
600
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
601
+
602
+ header_params = {
603
+ "folder.name" => request.folder.name
604
+ }
605
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
606
+ metadata[:"x-goog-request-params"] ||= request_params_header
607
+
608
+ options.apply_defaults timeout: @config.rpcs.update_folder.timeout,
609
+ metadata: metadata,
610
+ retry_policy: @config.rpcs.update_folder.retry_policy
611
+
612
+ options.apply_defaults timeout: @config.timeout,
613
+ metadata: @config.metadata,
614
+ retry_policy: @config.retry_policy
615
+
616
+ @folders_stub.call_rpc :update_folder, request, options: options do |response, operation|
617
+ response = ::Gapic::Operation.new response, @operations_client, options: options
618
+ yield response, operation if block_given?
619
+ return response
620
+ end
621
+ rescue ::GRPC::BadStatus => e
622
+ raise ::Google::Cloud::Error.from_error(e)
623
+ end
624
+
625
+ ##
626
+ # Moves a folder under a new resource parent.
627
+ # Returns an `Operation` which can be used to track the progress of the
628
+ # folder move workflow.
629
+ # Upon success, the `Operation.response` field will be populated with the
630
+ # moved folder.
631
+ # Upon failure, a `FolderOperationError` categorizing the failure cause will
632
+ # be returned - if the failure occurs synchronously then the
633
+ # `FolderOperationError` will be returned in the `Status.details` field.
634
+ # If it occurs asynchronously, then the FolderOperation will be returned
635
+ # in the `Operation.error` field.
636
+ # In addition, the `Operation.metadata` field will be populated with a
637
+ # `FolderOperation` message as an aid to stateless clients.
638
+ # Folder moves will be rejected if they violate either the naming, height,
639
+ # or fanout constraints described in the
640
+ # {::Google::Cloud::ResourceManager::V3::Folders::Client#create_folder CreateFolder} documentation.
641
+ # The caller must have `resourcemanager.folders.move` permission on the
642
+ # folder's current and proposed new parent.
643
+ #
644
+ # @overload move_folder(request, options = nil)
645
+ # Pass arguments to `move_folder` via a request object, either of type
646
+ # {::Google::Cloud::ResourceManager::V3::MoveFolderRequest} or an equivalent Hash.
647
+ #
648
+ # @param request [::Google::Cloud::ResourceManager::V3::MoveFolderRequest, ::Hash]
649
+ # A request object representing the call parameters. Required. To specify no
650
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
651
+ # @param options [::Gapic::CallOptions, ::Hash]
652
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
653
+ #
654
+ # @overload move_folder(name: nil, destination_parent: nil)
655
+ # Pass arguments to `move_folder` via keyword arguments. Note that at
656
+ # least one keyword argument is required. To specify no parameters, or to keep all
657
+ # the default parameter values, pass an empty Hash as a request object (see above).
658
+ #
659
+ # @param name [::String]
660
+ # Required. The resource name of the Folder to move.
661
+ # Must be of the form folders/\\{folder_id}
662
+ # @param destination_parent [::String]
663
+ # Required. The resource name of the folder or organization which should be the
664
+ # folder's new parent.
665
+ # Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
666
+ #
667
+ # @yield [response, operation] Access the result along with the RPC operation
668
+ # @yieldparam response [::Gapic::Operation]
669
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
670
+ #
671
+ # @return [::Gapic::Operation]
672
+ #
673
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
674
+ #
675
+ def move_folder request, options = nil
676
+ raise ::ArgumentError, "request must be provided" if request.nil?
677
+
678
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::MoveFolderRequest
679
+
680
+ # Converts hash and nil to an options object
681
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
682
+
683
+ # Customize the options with defaults
684
+ metadata = @config.rpcs.move_folder.metadata.to_h
685
+
686
+ # Set x-goog-api-client and x-goog-user-project headers
687
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
688
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
689
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
690
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
691
+
692
+ header_params = {
693
+ "name" => request.name
694
+ }
695
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
696
+ metadata[:"x-goog-request-params"] ||= request_params_header
697
+
698
+ options.apply_defaults timeout: @config.rpcs.move_folder.timeout,
699
+ metadata: metadata,
700
+ retry_policy: @config.rpcs.move_folder.retry_policy
701
+
702
+ options.apply_defaults timeout: @config.timeout,
703
+ metadata: @config.metadata,
704
+ retry_policy: @config.retry_policy
705
+
706
+ @folders_stub.call_rpc :move_folder, request, options: options do |response, operation|
707
+ response = ::Gapic::Operation.new response, @operations_client, options: options
708
+ yield response, operation if block_given?
709
+ return response
710
+ end
711
+ rescue ::GRPC::BadStatus => e
712
+ raise ::Google::Cloud::Error.from_error(e)
713
+ end
714
+
715
+ ##
716
+ # Requests deletion of a folder. The folder is moved into the
717
+ # {::Google::Cloud::ResourceManager::V3::Folder::State::DELETE_REQUESTED DELETE_REQUESTED} state
718
+ # immediately, and is deleted approximately 30 days later. This method may
719
+ # only be called on an empty folder, where a folder is empty if it doesn't
720
+ # contain any folders or projects in the {::Google::Cloud::ResourceManager::V3::Folder::State::ACTIVE ACTIVE} state.
721
+ # If called on a folder in {::Google::Cloud::ResourceManager::V3::Folder::State::DELETE_REQUESTED DELETE_REQUESTED}
722
+ # state the operation will result in a no-op success.
723
+ # The caller must have `resourcemanager.folders.delete` permission on the
724
+ # identified folder.
725
+ #
726
+ # @overload delete_folder(request, options = nil)
727
+ # Pass arguments to `delete_folder` via a request object, either of type
728
+ # {::Google::Cloud::ResourceManager::V3::DeleteFolderRequest} or an equivalent Hash.
729
+ #
730
+ # @param request [::Google::Cloud::ResourceManager::V3::DeleteFolderRequest, ::Hash]
731
+ # A request object representing the call parameters. Required. To specify no
732
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
733
+ # @param options [::Gapic::CallOptions, ::Hash]
734
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
735
+ #
736
+ # @overload delete_folder(name: nil)
737
+ # Pass arguments to `delete_folder` via keyword arguments. Note that at
738
+ # least one keyword argument is required. To specify no parameters, or to keep all
739
+ # the default parameter values, pass an empty Hash as a request object (see above).
740
+ #
741
+ # @param name [::String]
742
+ # Required. The resource name of the folder to be deleted.
743
+ # Must be of the form `folders/{folder_id}`.
744
+ #
745
+ # @yield [response, operation] Access the result along with the RPC operation
746
+ # @yieldparam response [::Gapic::Operation]
747
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
748
+ #
749
+ # @return [::Gapic::Operation]
750
+ #
751
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
752
+ #
753
+ def delete_folder request, options = nil
754
+ raise ::ArgumentError, "request must be provided" if request.nil?
755
+
756
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::DeleteFolderRequest
757
+
758
+ # Converts hash and nil to an options object
759
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
760
+
761
+ # Customize the options with defaults
762
+ metadata = @config.rpcs.delete_folder.metadata.to_h
763
+
764
+ # Set x-goog-api-client and x-goog-user-project headers
765
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
766
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
767
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
768
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
769
+
770
+ header_params = {
771
+ "name" => request.name
772
+ }
773
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
774
+ metadata[:"x-goog-request-params"] ||= request_params_header
775
+
776
+ options.apply_defaults timeout: @config.rpcs.delete_folder.timeout,
777
+ metadata: metadata,
778
+ retry_policy: @config.rpcs.delete_folder.retry_policy
779
+
780
+ options.apply_defaults timeout: @config.timeout,
781
+ metadata: @config.metadata,
782
+ retry_policy: @config.retry_policy
783
+
784
+ @folders_stub.call_rpc :delete_folder, request, options: options do |response, operation|
785
+ response = ::Gapic::Operation.new response, @operations_client, options: options
786
+ yield response, operation if block_given?
787
+ return response
788
+ end
789
+ rescue ::GRPC::BadStatus => e
790
+ raise ::Google::Cloud::Error.from_error(e)
791
+ end
792
+
793
+ ##
794
+ # Cancels the deletion request for a folder. This method may be called on a
795
+ # folder in any state. If the folder is in the {::Google::Cloud::ResourceManager::V3::Folder::State::ACTIVE ACTIVE}
796
+ # state the result will be a no-op success. In order to succeed, the folder's
797
+ # parent must be in the {::Google::Cloud::ResourceManager::V3::Folder::State::ACTIVE ACTIVE} state. In addition,
798
+ # reintroducing the folder into the tree must not violate folder naming,
799
+ # height, and fanout constraints described in the
800
+ # {::Google::Cloud::ResourceManager::V3::Folders::Client#create_folder CreateFolder} documentation.
801
+ # The caller must have `resourcemanager.folders.undelete` permission on the
802
+ # identified folder.
803
+ #
804
+ # @overload undelete_folder(request, options = nil)
805
+ # Pass arguments to `undelete_folder` via a request object, either of type
806
+ # {::Google::Cloud::ResourceManager::V3::UndeleteFolderRequest} or an equivalent Hash.
807
+ #
808
+ # @param request [::Google::Cloud::ResourceManager::V3::UndeleteFolderRequest, ::Hash]
809
+ # A request object representing the call parameters. Required. To specify no
810
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
811
+ # @param options [::Gapic::CallOptions, ::Hash]
812
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
813
+ #
814
+ # @overload undelete_folder(name: nil)
815
+ # Pass arguments to `undelete_folder` via keyword arguments. Note that at
816
+ # least one keyword argument is required. To specify no parameters, or to keep all
817
+ # the default parameter values, pass an empty Hash as a request object (see above).
818
+ #
819
+ # @param name [::String]
820
+ # Required. The resource name of the folder to undelete.
821
+ # Must be of the form `folders/{folder_id}`.
822
+ #
823
+ # @yield [response, operation] Access the result along with the RPC operation
824
+ # @yieldparam response [::Gapic::Operation]
825
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
826
+ #
827
+ # @return [::Gapic::Operation]
828
+ #
829
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
830
+ #
831
+ def undelete_folder request, options = nil
832
+ raise ::ArgumentError, "request must be provided" if request.nil?
833
+
834
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::UndeleteFolderRequest
835
+
836
+ # Converts hash and nil to an options object
837
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
838
+
839
+ # Customize the options with defaults
840
+ metadata = @config.rpcs.undelete_folder.metadata.to_h
841
+
842
+ # Set x-goog-api-client and x-goog-user-project headers
843
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
844
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
845
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
846
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
847
+
848
+ header_params = {
849
+ "name" => request.name
850
+ }
851
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
852
+ metadata[:"x-goog-request-params"] ||= request_params_header
853
+
854
+ options.apply_defaults timeout: @config.rpcs.undelete_folder.timeout,
855
+ metadata: metadata,
856
+ retry_policy: @config.rpcs.undelete_folder.retry_policy
857
+
858
+ options.apply_defaults timeout: @config.timeout,
859
+ metadata: @config.metadata,
860
+ retry_policy: @config.retry_policy
861
+
862
+ @folders_stub.call_rpc :undelete_folder, request, options: options do |response, operation|
863
+ response = ::Gapic::Operation.new response, @operations_client, options: options
864
+ yield response, operation if block_given?
865
+ return response
866
+ end
867
+ rescue ::GRPC::BadStatus => e
868
+ raise ::Google::Cloud::Error.from_error(e)
869
+ end
870
+
871
+ ##
872
+ # Gets the access control policy for a folder. The returned policy may be
873
+ # empty if no such policy or resource exists. The `resource` field should
874
+ # be the folder's resource name, for example: "folders/1234".
875
+ # The caller must have `resourcemanager.folders.getIamPolicy` permission
876
+ # on the identified folder.
877
+ #
878
+ # @overload get_iam_policy(request, options = nil)
879
+ # Pass arguments to `get_iam_policy` via a request object, either of type
880
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
881
+ #
882
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
883
+ # A request object representing the call parameters. Required. To specify no
884
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
885
+ # @param options [::Gapic::CallOptions, ::Hash]
886
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
887
+ #
888
+ # @overload get_iam_policy(resource: nil, options: nil)
889
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
890
+ # least one keyword argument is required. To specify no parameters, or to keep all
891
+ # the default parameter values, pass an empty Hash as a request object (see above).
892
+ #
893
+ # @param resource [::String]
894
+ # REQUIRED: The resource for which the policy is being requested.
895
+ # See the operation documentation for the appropriate value for this field.
896
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
897
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
898
+ # `GetIamPolicy`. This field is only used by Cloud IAM.
899
+ #
900
+ # @yield [response, operation] Access the result along with the RPC operation
901
+ # @yieldparam response [::Google::Iam::V1::Policy]
902
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
903
+ #
904
+ # @return [::Google::Iam::V1::Policy]
905
+ #
906
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
907
+ #
908
+ def get_iam_policy request, options = nil
909
+ raise ::ArgumentError, "request must be provided" if request.nil?
910
+
911
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
912
+
913
+ # Converts hash and nil to an options object
914
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
915
+
916
+ # Customize the options with defaults
917
+ metadata = @config.rpcs.get_iam_policy.metadata.to_h
918
+
919
+ # Set x-goog-api-client and x-goog-user-project headers
920
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
921
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
922
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
923
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
924
+
925
+ header_params = {
926
+ "resource" => request.resource
927
+ }
928
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
929
+ metadata[:"x-goog-request-params"] ||= request_params_header
930
+
931
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
932
+ metadata: metadata,
933
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
934
+
935
+ options.apply_defaults timeout: @config.timeout,
936
+ metadata: @config.metadata,
937
+ retry_policy: @config.retry_policy
938
+
939
+ @folders_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
940
+ yield response, operation if block_given?
941
+ return response
942
+ end
943
+ rescue ::GRPC::BadStatus => e
944
+ raise ::Google::Cloud::Error.from_error(e)
945
+ end
946
+
947
+ ##
948
+ # Sets the access control policy on a folder, replacing any existing policy.
949
+ # The `resource` field should be the folder's resource name, for example:
950
+ # "folders/1234".
951
+ # The caller must have `resourcemanager.folders.setIamPolicy` permission
952
+ # on the identified folder.
953
+ #
954
+ # @overload set_iam_policy(request, options = nil)
955
+ # Pass arguments to `set_iam_policy` via a request object, either of type
956
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
957
+ #
958
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
959
+ # A request object representing the call parameters. Required. To specify no
960
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
961
+ # @param options [::Gapic::CallOptions, ::Hash]
962
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
963
+ #
964
+ # @overload set_iam_policy(resource: nil, policy: nil)
965
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
966
+ # least one keyword argument is required. To specify no parameters, or to keep all
967
+ # the default parameter values, pass an empty Hash as a request object (see above).
968
+ #
969
+ # @param resource [::String]
970
+ # REQUIRED: The resource for which the policy is being specified.
971
+ # See the operation documentation for the appropriate value for this field.
972
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
973
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
974
+ # the policy is limited to a few 10s of KB. An empty policy is a
975
+ # valid policy but certain Cloud Platform services (such as Projects)
976
+ # might reject them.
977
+ #
978
+ # @yield [response, operation] Access the result along with the RPC operation
979
+ # @yieldparam response [::Google::Iam::V1::Policy]
980
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
981
+ #
982
+ # @return [::Google::Iam::V1::Policy]
983
+ #
984
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
985
+ #
986
+ def set_iam_policy request, options = nil
987
+ raise ::ArgumentError, "request must be provided" if request.nil?
988
+
989
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
990
+
991
+ # Converts hash and nil to an options object
992
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
993
+
994
+ # Customize the options with defaults
995
+ metadata = @config.rpcs.set_iam_policy.metadata.to_h
996
+
997
+ # Set x-goog-api-client and x-goog-user-project headers
998
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
999
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1000
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
1001
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1002
+
1003
+ header_params = {
1004
+ "resource" => request.resource
1005
+ }
1006
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1007
+ metadata[:"x-goog-request-params"] ||= request_params_header
1008
+
1009
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1010
+ metadata: metadata,
1011
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
1012
+
1013
+ options.apply_defaults timeout: @config.timeout,
1014
+ metadata: @config.metadata,
1015
+ retry_policy: @config.retry_policy
1016
+
1017
+ @folders_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
1018
+ yield response, operation if block_given?
1019
+ return response
1020
+ end
1021
+ rescue ::GRPC::BadStatus => e
1022
+ raise ::Google::Cloud::Error.from_error(e)
1023
+ end
1024
+
1025
+ ##
1026
+ # Returns permissions that a caller has on the specified folder.
1027
+ # The `resource` field should be the folder's resource name,
1028
+ # for example: "folders/1234".
1029
+ #
1030
+ # There are no permissions required for making this API call.
1031
+ #
1032
+ # @overload test_iam_permissions(request, options = nil)
1033
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
1034
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
1035
+ #
1036
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
1037
+ # A request object representing the call parameters. Required. To specify no
1038
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1039
+ # @param options [::Gapic::CallOptions, ::Hash]
1040
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1041
+ #
1042
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
1043
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
1044
+ # least one keyword argument is required. To specify no parameters, or to keep all
1045
+ # the default parameter values, pass an empty Hash as a request object (see above).
1046
+ #
1047
+ # @param resource [::String]
1048
+ # REQUIRED: The resource for which the policy detail is being requested.
1049
+ # See the operation documentation for the appropriate value for this field.
1050
+ # @param permissions [::Array<::String>]
1051
+ # The set of permissions to check for the `resource`. Permissions with
1052
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
1053
+ # information see
1054
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
1055
+ #
1056
+ # @yield [response, operation] Access the result along with the RPC operation
1057
+ # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
1058
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1059
+ #
1060
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
1061
+ #
1062
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1063
+ #
1064
+ def test_iam_permissions request, options = nil
1065
+ raise ::ArgumentError, "request must be provided" if request.nil?
1066
+
1067
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
1068
+
1069
+ # Converts hash and nil to an options object
1070
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1071
+
1072
+ # Customize the options with defaults
1073
+ metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1074
+
1075
+ # Set x-goog-api-client and x-goog-user-project headers
1076
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1077
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1078
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
1079
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1080
+
1081
+ header_params = {
1082
+ "resource" => request.resource
1083
+ }
1084
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1085
+ metadata[:"x-goog-request-params"] ||= request_params_header
1086
+
1087
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1088
+ metadata: metadata,
1089
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1090
+
1091
+ options.apply_defaults timeout: @config.timeout,
1092
+ metadata: @config.metadata,
1093
+ retry_policy: @config.retry_policy
1094
+
1095
+ @folders_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
1096
+ yield response, operation if block_given?
1097
+ return response
1098
+ end
1099
+ rescue ::GRPC::BadStatus => e
1100
+ raise ::Google::Cloud::Error.from_error(e)
1101
+ end
1102
+
1103
+ ##
1104
+ # Configuration class for the Folders API.
1105
+ #
1106
+ # This class represents the configuration for Folders,
1107
+ # providing control over timeouts, retry behavior, logging, transport
1108
+ # parameters, and other low-level controls. Certain parameters can also be
1109
+ # applied individually to specific RPCs. See
1110
+ # {::Google::Cloud::ResourceManager::V3::Folders::Client::Configuration::Rpcs}
1111
+ # for a list of RPCs that can be configured independently.
1112
+ #
1113
+ # Configuration can be applied globally to all clients, or to a single client
1114
+ # on construction.
1115
+ #
1116
+ # @example
1117
+ #
1118
+ # # Modify the global config, setting the timeout for
1119
+ # # get_folder to 20 seconds,
1120
+ # # and all remaining timeouts to 10 seconds.
1121
+ # ::Google::Cloud::ResourceManager::V3::Folders::Client.configure do |config|
1122
+ # config.timeout = 10.0
1123
+ # config.rpcs.get_folder.timeout = 20.0
1124
+ # end
1125
+ #
1126
+ # # Apply the above configuration only to a new client.
1127
+ # client = ::Google::Cloud::ResourceManager::V3::Folders::Client.new do |config|
1128
+ # config.timeout = 10.0
1129
+ # config.rpcs.get_folder.timeout = 20.0
1130
+ # end
1131
+ #
1132
+ # @!attribute [rw] endpoint
1133
+ # The hostname or hostname:port of the service endpoint.
1134
+ # Defaults to `"cloudresourcemanager.googleapis.com"`.
1135
+ # @return [::String]
1136
+ # @!attribute [rw] credentials
1137
+ # Credentials to send with calls. You may provide any of the following types:
1138
+ # * (`String`) The path to a service account key file in JSON format
1139
+ # * (`Hash`) A service account key as a Hash
1140
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1141
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1142
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1143
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1144
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1145
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1146
+ # * (`nil`) indicating no credentials
1147
+ # @return [::Object]
1148
+ # @!attribute [rw] scope
1149
+ # The OAuth scopes
1150
+ # @return [::Array<::String>]
1151
+ # @!attribute [rw] lib_name
1152
+ # The library name as recorded in instrumentation and logging
1153
+ # @return [::String]
1154
+ # @!attribute [rw] lib_version
1155
+ # The library version as recorded in instrumentation and logging
1156
+ # @return [::String]
1157
+ # @!attribute [rw] channel_args
1158
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1159
+ # `GRPC::Core::Channel` object is provided as the credential.
1160
+ # @return [::Hash]
1161
+ # @!attribute [rw] interceptors
1162
+ # An array of interceptors that are run before calls are executed.
1163
+ # @return [::Array<::GRPC::ClientInterceptor>]
1164
+ # @!attribute [rw] timeout
1165
+ # The call timeout in seconds.
1166
+ # @return [::Numeric]
1167
+ # @!attribute [rw] metadata
1168
+ # Additional gRPC headers to be sent with the call.
1169
+ # @return [::Hash{::Symbol=>::String}]
1170
+ # @!attribute [rw] retry_policy
1171
+ # The retry policy. The value is a hash with the following keys:
1172
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1173
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1174
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1175
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1176
+ # trigger a retry.
1177
+ # @return [::Hash]
1178
+ # @!attribute [rw] quota_project
1179
+ # A separate project against which to charge quota.
1180
+ # @return [::String]
1181
+ #
1182
+ class Configuration
1183
+ extend ::Gapic::Config
1184
+
1185
+ config_attr :endpoint, "cloudresourcemanager.googleapis.com", ::String
1186
+ config_attr :credentials, nil do |value|
1187
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1188
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1189
+ allowed.any? { |klass| klass === value }
1190
+ end
1191
+ config_attr :scope, nil, ::String, ::Array, nil
1192
+ config_attr :lib_name, nil, ::String, nil
1193
+ config_attr :lib_version, nil, ::String, nil
1194
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1195
+ config_attr :interceptors, nil, ::Array, nil
1196
+ config_attr :timeout, nil, ::Numeric, nil
1197
+ config_attr :metadata, nil, ::Hash, nil
1198
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1199
+ config_attr :quota_project, nil, ::String, nil
1200
+
1201
+ # @private
1202
+ def initialize parent_config = nil
1203
+ @parent_config = parent_config unless parent_config.nil?
1204
+
1205
+ yield self if block_given?
1206
+ end
1207
+
1208
+ ##
1209
+ # Configurations for individual RPCs
1210
+ # @return [Rpcs]
1211
+ #
1212
+ def rpcs
1213
+ @rpcs ||= begin
1214
+ parent_rpcs = nil
1215
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1216
+ Rpcs.new parent_rpcs
1217
+ end
1218
+ end
1219
+
1220
+ ##
1221
+ # Configuration RPC class for the Folders API.
1222
+ #
1223
+ # Includes fields providing the configuration for each RPC in this service.
1224
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1225
+ # the following configuration fields:
1226
+ #
1227
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1228
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1229
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1230
+ # include the following keys:
1231
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1232
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1233
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1234
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1235
+ # trigger a retry.
1236
+ #
1237
+ class Rpcs
1238
+ ##
1239
+ # RPC-specific configuration for `get_folder`
1240
+ # @return [::Gapic::Config::Method]
1241
+ #
1242
+ attr_reader :get_folder
1243
+ ##
1244
+ # RPC-specific configuration for `list_folders`
1245
+ # @return [::Gapic::Config::Method]
1246
+ #
1247
+ attr_reader :list_folders
1248
+ ##
1249
+ # RPC-specific configuration for `search_folders`
1250
+ # @return [::Gapic::Config::Method]
1251
+ #
1252
+ attr_reader :search_folders
1253
+ ##
1254
+ # RPC-specific configuration for `create_folder`
1255
+ # @return [::Gapic::Config::Method]
1256
+ #
1257
+ attr_reader :create_folder
1258
+ ##
1259
+ # RPC-specific configuration for `update_folder`
1260
+ # @return [::Gapic::Config::Method]
1261
+ #
1262
+ attr_reader :update_folder
1263
+ ##
1264
+ # RPC-specific configuration for `move_folder`
1265
+ # @return [::Gapic::Config::Method]
1266
+ #
1267
+ attr_reader :move_folder
1268
+ ##
1269
+ # RPC-specific configuration for `delete_folder`
1270
+ # @return [::Gapic::Config::Method]
1271
+ #
1272
+ attr_reader :delete_folder
1273
+ ##
1274
+ # RPC-specific configuration for `undelete_folder`
1275
+ # @return [::Gapic::Config::Method]
1276
+ #
1277
+ attr_reader :undelete_folder
1278
+ ##
1279
+ # RPC-specific configuration for `get_iam_policy`
1280
+ # @return [::Gapic::Config::Method]
1281
+ #
1282
+ attr_reader :get_iam_policy
1283
+ ##
1284
+ # RPC-specific configuration for `set_iam_policy`
1285
+ # @return [::Gapic::Config::Method]
1286
+ #
1287
+ attr_reader :set_iam_policy
1288
+ ##
1289
+ # RPC-specific configuration for `test_iam_permissions`
1290
+ # @return [::Gapic::Config::Method]
1291
+ #
1292
+ attr_reader :test_iam_permissions
1293
+
1294
+ # @private
1295
+ def initialize parent_rpcs = nil
1296
+ get_folder_config = parent_rpcs.get_folder if parent_rpcs.respond_to? :get_folder
1297
+ @get_folder = ::Gapic::Config::Method.new get_folder_config
1298
+ list_folders_config = parent_rpcs.list_folders if parent_rpcs.respond_to? :list_folders
1299
+ @list_folders = ::Gapic::Config::Method.new list_folders_config
1300
+ search_folders_config = parent_rpcs.search_folders if parent_rpcs.respond_to? :search_folders
1301
+ @search_folders = ::Gapic::Config::Method.new search_folders_config
1302
+ create_folder_config = parent_rpcs.create_folder if parent_rpcs.respond_to? :create_folder
1303
+ @create_folder = ::Gapic::Config::Method.new create_folder_config
1304
+ update_folder_config = parent_rpcs.update_folder if parent_rpcs.respond_to? :update_folder
1305
+ @update_folder = ::Gapic::Config::Method.new update_folder_config
1306
+ move_folder_config = parent_rpcs.move_folder if parent_rpcs.respond_to? :move_folder
1307
+ @move_folder = ::Gapic::Config::Method.new move_folder_config
1308
+ delete_folder_config = parent_rpcs.delete_folder if parent_rpcs.respond_to? :delete_folder
1309
+ @delete_folder = ::Gapic::Config::Method.new delete_folder_config
1310
+ undelete_folder_config = parent_rpcs.undelete_folder if parent_rpcs.respond_to? :undelete_folder
1311
+ @undelete_folder = ::Gapic::Config::Method.new undelete_folder_config
1312
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
1313
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1314
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1315
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1316
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1317
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1318
+
1319
+ yield self if block_given?
1320
+ end
1321
+ end
1322
+ end
1323
+ end
1324
+ end
1325
+ end
1326
+ end
1327
+ end
1328
+ end