Class: Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::Storage::Control::V2::StorageControl::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/storage/control/v2/storage_control/rest/client.rb
Overview
REST client for the StorageControl service.
StorageControl service includes selected control plane operations.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#operations_client ⇒ ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the StorageControl Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the StorageControl Client instance.
-
#create_folder(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Storage::Control::V2::Folder
Creates a new folder.
-
#delete_folder(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Permanently deletes an empty folder.
-
#delete_folder_recursive(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a folder recursively.
-
#get_folder(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Storage::Control::V2::Folder
Returns metadata for the specified folder.
-
#get_folder_intelligence_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Returns the Folder scoped singleton IntelligenceConfig resource.
-
#get_intelligence_finding(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceFinding
Gets the
IntelligenceFindingfor a project. -
#get_intelligence_finding_revision(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision
Gets the
IntelligenceFindingRevisionresource. -
#get_organization_intelligence_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Returns the Organization scoped singleton IntelligenceConfig resource.
-
#get_project_intelligence_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Returns the Project scoped singleton IntelligenceConfig resource.
-
#get_storage_layout(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Storage::Control::V2::StorageLayout
Returns the storage layout configuration for a given bucket.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new StorageControl REST client object.
-
#list_folders(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::Folder>
Retrieves a list of folders.
-
#list_intelligence_finding_revisions(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision>
Lists all the revisions of an
IntelligenceFindingresource. -
#list_intelligence_findings(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::IntelligenceFinding>
Lists the
IntelligenceFindingresources for the specified the project. -
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#rename_folder(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Renames a source folder to a destination folder.
-
#summarize_intelligence_findings(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::FindingSummary>
Summarizes the intelligence findings for the specified scope (organization, folder or project).
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_folder_intelligence_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Updates the Folder scoped singleton IntelligenceConfig resource.
-
#update_organization_intelligence_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Updates the Organization scoped singleton IntelligenceConfig resource.
-
#update_project_intelligence_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Updates the Project scoped singleton IntelligenceConfig resource.
Methods included from Paths
#anywhere_cache_path, #bucket_path, #folder_path, #intelligence_config_path, #intelligence_finding_path, #intelligence_finding_revision_path, #location_path, #managed_folder_path, #rapid_cache_path, #storage_layout_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new StorageControl REST client object.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 214 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @storage_control_stub = ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials, logger: @config.logger ) @storage_control_stub.logger(stub: true)&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end end |
Instance Attribute Details
#operations_client ⇒ ::Google::Cloud::Storage::Control::V2::StorageControl::Rest::Operations (readonly)
Get the associated client for long-running operations.
268 269 270 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 268 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the StorageControl Client class.
See Configuration for a description of the configuration fields.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 65 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Storage", "Control", "V2"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.timeout = 60.0 default_config.rpcs.create_folder.timeout = 60.0 default_config.rpcs.create_folder.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.get_folder.timeout = 60.0 default_config.rpcs.get_folder.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.list_folders.timeout = 60.0 default_config.rpcs.list_folders.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.rename_folder.timeout = 60.0 default_config.rpcs.rename_folder.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.delete_folder_recursive.timeout = 60.0 default_config.rpcs.delete_folder_recursive.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.get_storage_layout.timeout = 60.0 default_config.rpcs.get_storage_layout.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.get_project_intelligence_config.timeout = 60.0 default_config.rpcs.get_project_intelligence_config.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.update_project_intelligence_config.timeout = 60.0 default_config.rpcs.update_project_intelligence_config.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.get_folder_intelligence_config.timeout = 60.0 default_config.rpcs.get_folder_intelligence_config.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.update_folder_intelligence_config.timeout = 60.0 default_config.rpcs.update_folder_intelligence_config.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.get_organization_intelligence_config.timeout = 60.0 default_config.rpcs.get_organization_intelligence_config.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.update_organization_intelligence_config.timeout = 60.0 default_config.rpcs.update_organization_intelligence_config.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.get_intelligence_finding.timeout = 60.0 default_config.rpcs.get_intelligence_finding.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.list_intelligence_findings.timeout = 60.0 default_config.rpcs.list_intelligence_findings.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.summarize_intelligence_findings.timeout = 60.0 default_config.rpcs.summarize_intelligence_findings.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.get_intelligence_finding_revision.timeout = 60.0 default_config.rpcs.get_intelligence_finding_revision.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config.rpcs.list_intelligence_finding_revisions.timeout = 60.0 default_config.rpcs.list_intelligence_finding_revisions.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 13, 2] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the StorageControl Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
184 185 186 187 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 184 def configure yield @config if block_given? @config end |
#create_folder(request, options = nil) ⇒ ::Google::Cloud::Storage::Control::V2::Folder #create_folder(parent: nil, folder: nil, folder_id: nil, recursive: nil, request_id: nil) ⇒ ::Google::Cloud::Storage::Control::V2::Folder
Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 343 def create_folder request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::CreateFolderRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_folder..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_folder.timeout, metadata: , retry_policy: @config.rpcs.create_folder.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.create_folder request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_folder(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_folder(name: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, request_id: nil) ⇒ ::Google::Protobuf::Empty
Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 432 def delete_folder request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::DeleteFolderRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_folder..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_folder.timeout, metadata: , retry_policy: @config.rpcs.delete_folder.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.delete_folder request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_folder_recursive(request, options = nil) ⇒ ::Gapic::Operation #delete_folder_recursive(name: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a folder recursively. This operation is only applicable to a hierarchical namespace enabled bucket.
833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 833 def delete_folder_recursive request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::DeleteFolderRecursiveRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_folder_recursive..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_folder_recursive.timeout, metadata: , retry_policy: @config.rpcs.delete_folder_recursive.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.delete_folder_recursive request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_folder(request, options = nil) ⇒ ::Google::Cloud::Storage::Control::V2::Folder #get_folder(name: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, request_id: nil) ⇒ ::Google::Cloud::Storage::Control::V2::Folder
Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 521 def get_folder request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetFolderRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_folder..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_folder.timeout, metadata: , retry_policy: @config.rpcs.get_folder.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.get_folder request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_folder_intelligence_config(request, options = nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig #get_folder_intelligence_config(name: nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Returns the Folder scoped singleton IntelligenceConfig resource.
1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 1167 def get_folder_intelligence_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetFolderIntelligenceConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_folder_intelligence_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_folder_intelligence_config.timeout, metadata: , retry_policy: @config.rpcs.get_folder_intelligence_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.get_folder_intelligence_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_intelligence_finding(request, options = nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceFinding #get_intelligence_finding(name: nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceFinding
Gets the IntelligenceFinding for a project.
1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 1499 def get_intelligence_finding request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetIntelligenceFindingRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_intelligence_finding..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_intelligence_finding.timeout, metadata: , retry_policy: @config.rpcs.get_intelligence_finding.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.get_intelligence_finding request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_intelligence_finding_revision(request, options = nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision #get_intelligence_finding_revision(name: nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision
Gets the IntelligenceFindingRevision resource.
1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 1798 def get_intelligence_finding_revision request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetIntelligenceFindingRevisionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_intelligence_finding_revision..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_intelligence_finding_revision.timeout, metadata: , retry_policy: @config.rpcs.get_intelligence_finding_revision.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.get_intelligence_finding_revision request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_organization_intelligence_config(request, options = nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig #get_organization_intelligence_config(name: nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Returns the Organization scoped singleton IntelligenceConfig resource.
1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 1333 def get_organization_intelligence_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetOrganizationIntelligenceConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_organization_intelligence_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_organization_intelligence_config.timeout, metadata: , retry_policy: @config.rpcs.get_organization_intelligence_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.get_organization_intelligence_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_project_intelligence_config(request, options = nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig #get_project_intelligence_config(name: nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Returns the Project scoped singleton IntelligenceConfig resource.
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 1001 def get_project_intelligence_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetProjectIntelligenceConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_project_intelligence_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_project_intelligence_config.timeout, metadata: , retry_policy: @config.rpcs.get_project_intelligence_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.get_project_intelligence_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_storage_layout(request, options = nil) ⇒ ::Google::Cloud::Storage::Control::V2::StorageLayout #get_storage_layout(name: nil, prefix: nil, request_id: nil) ⇒ ::Google::Cloud::Storage::Control::V2::StorageLayout
Returns the storage layout configuration for a given bucket.
920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 920 def get_storage_layout request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetStorageLayoutRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_storage_layout..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_storage_layout.timeout, metadata: , retry_policy: @config.rpcs.get_storage_layout.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.get_storage_layout request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_folders(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::Folder> #list_folders(parent: nil, page_size: nil, page_token: nil, prefix: nil, delimiter: nil, lexicographic_start: nil, lexicographic_end: nil, request_id: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::Folder>
Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 631 def list_folders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::ListFoldersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_folders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_folders.timeout, metadata: , retry_policy: @config.rpcs.list_folders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.list_folders request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @storage_control_stub, :list_folders, "folders", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_intelligence_finding_revisions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision> #list_intelligence_finding_revisions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision>
Lists all the revisions of an IntelligenceFinding resource.
1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 1893 def list_intelligence_finding_revisions request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::ListIntelligenceFindingRevisionsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_intelligence_finding_revisions..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_intelligence_finding_revisions.timeout, metadata: , retry_policy: @config.rpcs.list_intelligence_finding_revisions.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.list_intelligence_finding_revisions request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @storage_control_stub, :list_intelligence_finding_revisions, "intelligence_finding_revisions", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_intelligence_findings(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::IntelligenceFinding> #list_intelligence_findings(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::IntelligenceFinding>
Lists the IntelligenceFinding resources for the specified the project.
1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 1598 def list_intelligence_findings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::ListIntelligenceFindingsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_intelligence_findings..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_intelligence_findings.timeout, metadata: , retry_policy: @config.rpcs.list_intelligence_findings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.list_intelligence_findings request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @storage_control_stub, :list_intelligence_findings, "intelligence_findings", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
275 276 277 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 275 def logger @storage_control_stub.logger end |
#rename_folder(request, options = nil) ⇒ ::Gapic::Operation #rename_folder(name: nil, destination_folder_id: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, request_id: nil) ⇒ ::Gapic::Operation
Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 734 def rename_folder request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::RenameFolderRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.rename_folder..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.rename_folder.timeout, metadata: , retry_policy: @config.rpcs.rename_folder.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.rename_folder request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#summarize_intelligence_findings(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::FindingSummary> #summarize_intelligence_findings(parent: nil, resource_scope: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Storage::Control::V2::FindingSummary>
Summarizes the intelligence findings for the specified scope (organization, folder or project).
1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 1715 def summarize_intelligence_findings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::SummarizeIntelligenceFindingsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.summarize_intelligence_findings..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.summarize_intelligence_findings.timeout, metadata: , retry_policy: @config.rpcs.summarize_intelligence_findings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.summarize_intelligence_findings request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @storage_control_stub, :summarize_intelligence_findings, "finding_summaries", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
194 195 196 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 194 def universe_domain @storage_control_stub.universe_domain end |
#update_folder_intelligence_config(request, options = nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig #update_folder_intelligence_config(intelligence_config: nil, update_mask: nil, request_id: nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Updates the Folder scoped singleton IntelligenceConfig resource.
1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 1252 def update_folder_intelligence_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::UpdateFolderIntelligenceConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_folder_intelligence_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_folder_intelligence_config.timeout, metadata: , retry_policy: @config.rpcs.update_folder_intelligence_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.update_folder_intelligence_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_organization_intelligence_config(request, options = nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig #update_organization_intelligence_config(intelligence_config: nil, update_mask: nil, request_id: nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Updates the Organization scoped singleton IntelligenceConfig resource.
1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 1418 def update_organization_intelligence_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::UpdateOrganizationIntelligenceConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_organization_intelligence_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_organization_intelligence_config.timeout, metadata: , retry_policy: @config.rpcs.update_organization_intelligence_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.update_organization_intelligence_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_project_intelligence_config(request, options = nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig #update_project_intelligence_config(intelligence_config: nil, update_mask: nil, request_id: nil) ⇒ ::Google::Cloud::Storage::Control::V2::IntelligenceConfig
Updates the Project scoped singleton IntelligenceConfig resource.
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 |
# File 'lib/google/cloud/storage/control/v2/storage_control/rest/client.rb', line 1086 def update_project_intelligence_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::UpdateProjectIntelligenceConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_project_intelligence_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_project_intelligence_config.timeout, metadata: , retry_policy: @config.rpcs.update_project_intelligence_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @storage_control_stub.update_project_intelligence_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |