google-apis-storage-v1-0.21.0/0000755000175100017510000000000014377353716015034 5ustar pravipravigoogle-apis-storage-v1-0.21.0/LICENSE.md0000644000175100017510000002636114377353716016450 0ustar pravipravi Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. google-apis-storage-v1-0.21.0/CHANGELOG.md0000644000175100017510000000350514377353716016650 0ustar pravipravi# Release history for google-apis-storage_v1 ### v0.21.0 (2023-02-14) * Regenerated using generator version 0.11.1 ### v0.20.0 (2022-10-20) * Regenerated using generator version 0.11.0 ### v0.19.0 (2022-09-23) * Regenerated using generator version 0.10.0 ### v0.18.0 (2022-07-08) * Regenerated from discovery document revision 20220705 * Regenerated using generator version 0.9.0 ### v0.17.0 (2022-06-30) * Regenerated using generator version 0.8.0 ### v0.16.0 (2022-06-21) * Regenerated using generator version 0.7.0 ### v0.15.0 (2022-06-11) * Regenerated from discovery document revision 20220608 * Regenerated using generator version 0.5.0 ### v0.14.0 (2022-05-13) * Regenerated from discovery document revision 20220509 ### v0.13.0 (2022-04-05) * Regenerated from discovery document revision 20220401 ### v0.12.0 (2022-04-01) * Regenerated from discovery document revision 20220328 * Regenerated using generator version 0.4.1 ### v0.11.0 (2021-12-14) * Unspecified changes ### v0.10.0 (2021-12-05) * Regenerated from discovery document revision 20211201 ### v0.9.0 (2021-10-23) * Regenerated from discovery document revision 20211018 * Unspecified changes ### v0.8.0 (2021-09-24) * Regenerated from discovery document revision 20210918 ### v0.7.0 (2021-09-19) * Regenerated from discovery document revision 20210914 ### v0.6.0 (2021-06-29) * Regenerated using generator version 0.4.0 ### v0.5.0 (2021-06-24) * Regenerated using generator version 0.3.0 ### v0.4.0 (2021-05-20) * Regenerated using generator version 0.2.0 ### v0.3.0 (2021-03-04) * Unspecified changes ### v0.2.0 (2021-02-01) * Regenerated from discovery document revision 20210127 * Regenerated using generator version 0.1.2 ### v0.1.0 (2021-01-07) * Regenerated using generator version 0.1.1 * Regenerated from discovery document revision 20201112 google-apis-storage-v1-0.21.0/.yardopts0000644000175100017510000000035614377353716016706 0ustar pravipravi--hide-void-return --no-private --verbose --title=google-apis-storage_v1 --markup-provider=redcarpet --markup=markdown --main OVERVIEW.md lib/google/apis/storage_v1/*.rb lib/google/apis/storage_v1.rb - OVERVIEW.md CHANGELOG.md LICENSE.md google-apis-storage-v1-0.21.0/lib/0000755000175100017510000000000014377353716015602 5ustar pravipravigoogle-apis-storage-v1-0.21.0/lib/google-apis-storage_v1.rb0000644000175100017510000000114114377353716022402 0ustar pravipravi# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require "google/apis/storage_v1" google-apis-storage-v1-0.21.0/lib/google/0000755000175100017510000000000014377353716017056 5ustar pravipravigoogle-apis-storage-v1-0.21.0/lib/google/apis/0000755000175100017510000000000014377353716020012 5ustar pravipravigoogle-apis-storage-v1-0.21.0/lib/google/apis/storage_v1.rb0000644000175100017510000000353414377353716022416 0ustar pravipravi# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'google/apis/storage_v1/service.rb' require 'google/apis/storage_v1/classes.rb' require 'google/apis/storage_v1/representations.rb' require 'google/apis/storage_v1/gem_version.rb' module Google module Apis # Cloud Storage JSON API # # Stores and retrieves potentially large, immutable data objects. # # @see https://developers.google.com/storage/docs/json_api/ module StorageV1 # Version of the Cloud Storage JSON API this client connects to. # This is NOT the gem version. VERSION = 'V1' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' # Manage your data and permissions in Google Cloud Storage AUTH_DEVSTORAGE_FULL_CONTROL = 'https://www.googleapis.com/auth/devstorage.full_control' # View your data in Google Cloud Storage AUTH_DEVSTORAGE_READ_ONLY = 'https://www.googleapis.com/auth/devstorage.read_only' # Manage your data in Google Cloud Storage AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write' end end end google-apis-storage-v1-0.21.0/lib/google/apis/storage_v1/0000755000175100017510000000000014377353716022064 5ustar pravipravigoogle-apis-storage-v1-0.21.0/lib/google/apis/storage_v1/representations.rb0000644000175100017510000007631714377353716025654 0ustar pravipravi# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'date' require 'google/apis/core/base_service' require 'google/apis/core/json_representation' require 'google/apis/core/hashable' require 'google/apis/errors' module Google module Apis module StorageV1 class Bucket class Representation < Google::Apis::Core::JsonRepresentation; end class Autoclass class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Billing class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class CorsConfiguration class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class CustomPlacementConfig class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Encryption class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class IamConfiguration class Representation < Google::Apis::Core::JsonRepresentation; end class BucketPolicyOnly class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class UniformBucketLevelAccess class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end include Google::Apis::Core::JsonObjectSupport end class Lifecycle class Representation < Google::Apis::Core::JsonRepresentation; end class Rule class Representation < Google::Apis::Core::JsonRepresentation; end class Action class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Condition class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end include Google::Apis::Core::JsonObjectSupport end include Google::Apis::Core::JsonObjectSupport end class Logging class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Owner class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class RetentionPolicy class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Versioning class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Website class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end include Google::Apis::Core::JsonObjectSupport end class BucketAccessControl class Representation < Google::Apis::Core::JsonRepresentation; end class ProjectTeam class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end include Google::Apis::Core::JsonObjectSupport end class BucketAccessControls class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Buckets class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Channel class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class ComposeRequest class Representation < Google::Apis::Core::JsonRepresentation; end class SourceObject class Representation < Google::Apis::Core::JsonRepresentation; end class ObjectPreconditions class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end include Google::Apis::Core::JsonObjectSupport end include Google::Apis::Core::JsonObjectSupport end class Expr class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class HmacKey class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class HmacKeyMetadata class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class HmacKeysMetadata class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Notification class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Notifications class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Object class Representation < Google::Apis::Core::JsonRepresentation; end class CustomerEncryption class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Owner class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end include Google::Apis::Core::JsonObjectSupport end class ObjectAccessControl class Representation < Google::Apis::Core::JsonRepresentation; end class ProjectTeam class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end include Google::Apis::Core::JsonObjectSupport end class ObjectAccessControls class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Objects class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Policy class Representation < Google::Apis::Core::JsonRepresentation; end class Binding class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end include Google::Apis::Core::JsonObjectSupport end class RewriteResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class ServiceAccount class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class TestIamPermissionsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Bucket # @private class Representation < Google::Apis::Core::JsonRepresentation collection :acl, as: 'acl', class: Google::Apis::StorageV1::BucketAccessControl, decorator: Google::Apis::StorageV1::BucketAccessControl::Representation property :autoclass, as: 'autoclass', class: Google::Apis::StorageV1::Bucket::Autoclass, decorator: Google::Apis::StorageV1::Bucket::Autoclass::Representation property :billing, as: 'billing', class: Google::Apis::StorageV1::Bucket::Billing, decorator: Google::Apis::StorageV1::Bucket::Billing::Representation collection :cors_configurations, as: 'cors', class: Google::Apis::StorageV1::Bucket::CorsConfiguration, decorator: Google::Apis::StorageV1::Bucket::CorsConfiguration::Representation property :custom_placement_config, as: 'customPlacementConfig', class: Google::Apis::StorageV1::Bucket::CustomPlacementConfig, decorator: Google::Apis::StorageV1::Bucket::CustomPlacementConfig::Representation property :default_event_based_hold, as: 'defaultEventBasedHold' collection :default_object_acl, as: 'defaultObjectAcl', class: Google::Apis::StorageV1::ObjectAccessControl, decorator: Google::Apis::StorageV1::ObjectAccessControl::Representation property :encryption, as: 'encryption', class: Google::Apis::StorageV1::Bucket::Encryption, decorator: Google::Apis::StorageV1::Bucket::Encryption::Representation property :etag, as: 'etag' property :iam_configuration, as: 'iamConfiguration', class: Google::Apis::StorageV1::Bucket::IamConfiguration, decorator: Google::Apis::StorageV1::Bucket::IamConfiguration::Representation property :id, as: 'id' property :kind, as: 'kind' hash :labels, as: 'labels' property :lifecycle, as: 'lifecycle', class: Google::Apis::StorageV1::Bucket::Lifecycle, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Representation property :location, as: 'location' property :location_type, as: 'locationType' property :logging, as: 'logging', class: Google::Apis::StorageV1::Bucket::Logging, decorator: Google::Apis::StorageV1::Bucket::Logging::Representation property :metageneration, :numeric_string => true, as: 'metageneration' property :name, as: 'name' property :owner, as: 'owner', class: Google::Apis::StorageV1::Bucket::Owner, decorator: Google::Apis::StorageV1::Bucket::Owner::Representation property :project_number, :numeric_string => true, as: 'projectNumber' property :retention_policy, as: 'retentionPolicy', class: Google::Apis::StorageV1::Bucket::RetentionPolicy, decorator: Google::Apis::StorageV1::Bucket::RetentionPolicy::Representation property :rpo, as: 'rpo' property :satisfies_pzs, as: 'satisfiesPZS' property :self_link, as: 'selfLink' property :storage_class, as: 'storageClass' property :time_created, as: 'timeCreated', type: DateTime property :updated, as: 'updated', type: DateTime property :versioning, as: 'versioning', class: Google::Apis::StorageV1::Bucket::Versioning, decorator: Google::Apis::StorageV1::Bucket::Versioning::Representation property :website, as: 'website', class: Google::Apis::StorageV1::Bucket::Website, decorator: Google::Apis::StorageV1::Bucket::Website::Representation end class Autoclass # @private class Representation < Google::Apis::Core::JsonRepresentation property :enabled, as: 'enabled' property :toggle_time, as: 'toggleTime', type: DateTime end end class Billing # @private class Representation < Google::Apis::Core::JsonRepresentation property :requester_pays, as: 'requesterPays' end end class CorsConfiguration # @private class Representation < Google::Apis::Core::JsonRepresentation property :max_age_seconds, as: 'maxAgeSeconds' collection :http_method, as: 'method' collection :origin, as: 'origin' collection :response_header, as: 'responseHeader' end end class CustomPlacementConfig # @private class Representation < Google::Apis::Core::JsonRepresentation collection :data_locations, as: 'dataLocations' end end class Encryption # @private class Representation < Google::Apis::Core::JsonRepresentation property :default_kms_key_name, as: 'defaultKmsKeyName' end end class IamConfiguration # @private class Representation < Google::Apis::Core::JsonRepresentation property :bucket_policy_only, as: 'bucketPolicyOnly', class: Google::Apis::StorageV1::Bucket::IamConfiguration::BucketPolicyOnly, decorator: Google::Apis::StorageV1::Bucket::IamConfiguration::BucketPolicyOnly::Representation property :public_access_prevention, as: 'publicAccessPrevention' property :uniform_bucket_level_access, as: 'uniformBucketLevelAccess', class: Google::Apis::StorageV1::Bucket::IamConfiguration::UniformBucketLevelAccess, decorator: Google::Apis::StorageV1::Bucket::IamConfiguration::UniformBucketLevelAccess::Representation end class BucketPolicyOnly # @private class Representation < Google::Apis::Core::JsonRepresentation property :enabled, as: 'enabled' property :locked_time, as: 'lockedTime', type: DateTime end end class UniformBucketLevelAccess # @private class Representation < Google::Apis::Core::JsonRepresentation property :enabled, as: 'enabled' property :locked_time, as: 'lockedTime', type: DateTime end end end class Lifecycle # @private class Representation < Google::Apis::Core::JsonRepresentation collection :rule, as: 'rule', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Representation end class Rule # @private class Representation < Google::Apis::Core::JsonRepresentation property :action, as: 'action', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action::Representation property :condition, as: 'condition', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition::Representation end class Action # @private class Representation < Google::Apis::Core::JsonRepresentation property :storage_class, as: 'storageClass' property :type, as: 'type' end end class Condition # @private class Representation < Google::Apis::Core::JsonRepresentation property :age, as: 'age' property :created_before, as: 'createdBefore', type: Date property :custom_time_before, as: 'customTimeBefore', type: Date property :days_since_custom_time, as: 'daysSinceCustomTime' property :days_since_noncurrent_time, as: 'daysSinceNoncurrentTime' property :is_live, as: 'isLive' property :matches_pattern, as: 'matchesPattern' collection :matches_prefix, as: 'matchesPrefix' collection :matches_storage_class, as: 'matchesStorageClass' collection :matches_suffix, as: 'matchesSuffix' property :noncurrent_time_before, as: 'noncurrentTimeBefore', type: Date property :num_newer_versions, as: 'numNewerVersions' end end end end class Logging # @private class Representation < Google::Apis::Core::JsonRepresentation property :log_bucket, as: 'logBucket' property :log_object_prefix, as: 'logObjectPrefix' end end class Owner # @private class Representation < Google::Apis::Core::JsonRepresentation property :entity, as: 'entity' property :entity_id, as: 'entityId' end end class RetentionPolicy # @private class Representation < Google::Apis::Core::JsonRepresentation property :effective_time, as: 'effectiveTime', type: DateTime property :is_locked, as: 'isLocked' property :retention_period, :numeric_string => true, as: 'retentionPeriod' end end class Versioning # @private class Representation < Google::Apis::Core::JsonRepresentation property :enabled, as: 'enabled' end end class Website # @private class Representation < Google::Apis::Core::JsonRepresentation property :main_page_suffix, as: 'mainPageSuffix' property :not_found_page, as: 'notFoundPage' end end end class BucketAccessControl # @private class Representation < Google::Apis::Core::JsonRepresentation property :bucket, as: 'bucket' property :domain, as: 'domain' property :email, as: 'email' property :entity, as: 'entity' property :entity_id, as: 'entityId' property :etag, as: 'etag' property :id, as: 'id' property :kind, as: 'kind' property :project_team, as: 'projectTeam', class: Google::Apis::StorageV1::BucketAccessControl::ProjectTeam, decorator: Google::Apis::StorageV1::BucketAccessControl::ProjectTeam::Representation property :role, as: 'role' property :self_link, as: 'selfLink' end class ProjectTeam # @private class Representation < Google::Apis::Core::JsonRepresentation property :project_number, as: 'projectNumber' property :team, as: 'team' end end end class BucketAccessControls # @private class Representation < Google::Apis::Core::JsonRepresentation collection :items, as: 'items', class: Google::Apis::StorageV1::BucketAccessControl, decorator: Google::Apis::StorageV1::BucketAccessControl::Representation property :kind, as: 'kind' end end class Buckets # @private class Representation < Google::Apis::Core::JsonRepresentation collection :items, as: 'items', class: Google::Apis::StorageV1::Bucket, decorator: Google::Apis::StorageV1::Bucket::Representation property :kind, as: 'kind' property :next_page_token, as: 'nextPageToken' end end class Channel # @private class Representation < Google::Apis::Core::JsonRepresentation property :address, as: 'address' property :expiration, :numeric_string => true, as: 'expiration' property :id, as: 'id' property :kind, as: 'kind' hash :params, as: 'params' property :payload, as: 'payload' property :resource_id, as: 'resourceId' property :resource_uri, as: 'resourceUri' property :token, as: 'token' property :type, as: 'type' end end class ComposeRequest # @private class Representation < Google::Apis::Core::JsonRepresentation property :destination, as: 'destination', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation property :kind, as: 'kind' collection :source_objects, as: 'sourceObjects', class: Google::Apis::StorageV1::ComposeRequest::SourceObject, decorator: Google::Apis::StorageV1::ComposeRequest::SourceObject::Representation end class SourceObject # @private class Representation < Google::Apis::Core::JsonRepresentation property :generation, :numeric_string => true, as: 'generation' property :name, as: 'name' property :object_preconditions, as: 'objectPreconditions', class: Google::Apis::StorageV1::ComposeRequest::SourceObject::ObjectPreconditions, decorator: Google::Apis::StorageV1::ComposeRequest::SourceObject::ObjectPreconditions::Representation end class ObjectPreconditions # @private class Representation < Google::Apis::Core::JsonRepresentation property :if_generation_match, :numeric_string => true, as: 'ifGenerationMatch' end end end end class Expr # @private class Representation < Google::Apis::Core::JsonRepresentation property :description, as: 'description' property :expression, as: 'expression' property :location, as: 'location' property :title, as: 'title' end end class HmacKey # @private class Representation < Google::Apis::Core::JsonRepresentation property :kind, as: 'kind' property :metadata, as: 'metadata', class: Google::Apis::StorageV1::HmacKeyMetadata, decorator: Google::Apis::StorageV1::HmacKeyMetadata::Representation property :secret, as: 'secret' end end class HmacKeyMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation property :access_id, as: 'accessId' property :etag, as: 'etag' property :id, as: 'id' property :kind, as: 'kind' property :project_id, as: 'projectId' property :self_link, as: 'selfLink' property :service_account_email, as: 'serviceAccountEmail' property :state, as: 'state' property :time_created, as: 'timeCreated', type: DateTime property :updated, as: 'updated', type: DateTime end end class HmacKeysMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation collection :items, as: 'items', class: Google::Apis::StorageV1::HmacKeyMetadata, decorator: Google::Apis::StorageV1::HmacKeyMetadata::Representation property :kind, as: 'kind' property :next_page_token, as: 'nextPageToken' end end class Notification # @private class Representation < Google::Apis::Core::JsonRepresentation hash :custom_attributes, as: 'custom_attributes' property :etag, as: 'etag' collection :event_types, as: 'event_types' property :id, as: 'id' property :kind, as: 'kind' property :object_name_prefix, as: 'object_name_prefix' property :payload_format, as: 'payload_format' property :self_link, as: 'selfLink' property :topic, as: 'topic' end end class Notifications # @private class Representation < Google::Apis::Core::JsonRepresentation collection :items, as: 'items', class: Google::Apis::StorageV1::Notification, decorator: Google::Apis::StorageV1::Notification::Representation property :kind, as: 'kind' end end class Object # @private class Representation < Google::Apis::Core::JsonRepresentation collection :acl, as: 'acl', class: Google::Apis::StorageV1::ObjectAccessControl, decorator: Google::Apis::StorageV1::ObjectAccessControl::Representation property :bucket, as: 'bucket' property :cache_control, as: 'cacheControl' property :component_count, as: 'componentCount' property :content_disposition, as: 'contentDisposition' property :content_encoding, as: 'contentEncoding' property :content_language, as: 'contentLanguage' property :content_type, as: 'contentType' property :crc32c, as: 'crc32c' property :custom_time, as: 'customTime', type: DateTime property :customer_encryption, as: 'customerEncryption', class: Google::Apis::StorageV1::Object::CustomerEncryption, decorator: Google::Apis::StorageV1::Object::CustomerEncryption::Representation property :etag, as: 'etag' property :event_based_hold, as: 'eventBasedHold' property :generation, :numeric_string => true, as: 'generation' property :id, as: 'id' property :kind, as: 'kind' property :kms_key_name, as: 'kmsKeyName' property :md5_hash, as: 'md5Hash' property :media_link, as: 'mediaLink' hash :metadata, as: 'metadata' property :metageneration, :numeric_string => true, as: 'metageneration' property :name, as: 'name' property :owner, as: 'owner', class: Google::Apis::StorageV1::Object::Owner, decorator: Google::Apis::StorageV1::Object::Owner::Representation property :retention_expiration_time, as: 'retentionExpirationTime', type: DateTime property :self_link, as: 'selfLink' property :size, :numeric_string => true, as: 'size' property :storage_class, as: 'storageClass' property :temporary_hold, as: 'temporaryHold' property :time_created, as: 'timeCreated', type: DateTime property :time_deleted, as: 'timeDeleted', type: DateTime property :time_storage_class_updated, as: 'timeStorageClassUpdated', type: DateTime property :updated, as: 'updated', type: DateTime end class CustomerEncryption # @private class Representation < Google::Apis::Core::JsonRepresentation property :encryption_algorithm, as: 'encryptionAlgorithm' property :key_sha256, as: 'keySha256' end end class Owner # @private class Representation < Google::Apis::Core::JsonRepresentation property :entity, as: 'entity' property :entity_id, as: 'entityId' end end end class ObjectAccessControl # @private class Representation < Google::Apis::Core::JsonRepresentation property :bucket, as: 'bucket' property :domain, as: 'domain' property :email, as: 'email' property :entity, as: 'entity' property :entity_id, as: 'entityId' property :etag, as: 'etag' property :generation, :numeric_string => true, as: 'generation' property :id, as: 'id' property :kind, as: 'kind' property :object, as: 'object' property :project_team, as: 'projectTeam', class: Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam, decorator: Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam::Representation property :role, as: 'role' property :self_link, as: 'selfLink' end class ProjectTeam # @private class Representation < Google::Apis::Core::JsonRepresentation property :project_number, as: 'projectNumber' property :team, as: 'team' end end end class ObjectAccessControls # @private class Representation < Google::Apis::Core::JsonRepresentation collection :items, as: 'items', class: Google::Apis::StorageV1::ObjectAccessControl, decorator: Google::Apis::StorageV1::ObjectAccessControl::Representation property :kind, as: 'kind' end end class Objects # @private class Representation < Google::Apis::Core::JsonRepresentation collection :items, as: 'items', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation property :kind, as: 'kind' property :next_page_token, as: 'nextPageToken' collection :prefixes, as: 'prefixes' end end class Policy # @private class Representation < Google::Apis::Core::JsonRepresentation collection :bindings, as: 'bindings', class: Google::Apis::StorageV1::Policy::Binding, decorator: Google::Apis::StorageV1::Policy::Binding::Representation property :etag, :base64 => true, as: 'etag' property :kind, as: 'kind' property :resource_id, as: 'resourceId' property :version, as: 'version' end class Binding # @private class Representation < Google::Apis::Core::JsonRepresentation property :condition, as: 'condition', class: Google::Apis::StorageV1::Expr, decorator: Google::Apis::StorageV1::Expr::Representation collection :members, as: 'members' property :role, as: 'role' end end end class RewriteResponse # @private class Representation < Google::Apis::Core::JsonRepresentation property :done, as: 'done' property :kind, as: 'kind' property :object_size, :numeric_string => true, as: 'objectSize' property :resource, as: 'resource', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation property :rewrite_token, as: 'rewriteToken' property :total_bytes_rewritten, :numeric_string => true, as: 'totalBytesRewritten' end end class ServiceAccount # @private class Representation < Google::Apis::Core::JsonRepresentation property :email_address, as: 'email_address' property :kind, as: 'kind' end end class TestIamPermissionsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation property :kind, as: 'kind' collection :permissions, as: 'permissions' end end end end end google-apis-storage-v1-0.21.0/lib/google/apis/storage_v1/gem_version.rb0000644000175100017510000000164014377353716024727 0ustar pravipravi# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module Google module Apis module StorageV1 # Version of the google-apis-storage_v1 gem GEM_VERSION = "0.21.0" # Version of the code generator used to generate this client GENERATOR_VERSION = "0.11.1" # Revision of the discovery document this client was generated from REVISION = "20220705" end end end google-apis-storage-v1-0.21.0/lib/google/apis/storage_v1/service.rb0000644000175100017510000051150414377353716024057 0ustar pravipravi# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'google/apis/core/base_service' require 'google/apis/core/json_representation' require 'google/apis/core/hashable' require 'google/apis/errors' module Google module Apis module StorageV1 # Cloud Storage JSON API # # Stores and retrieves potentially large, immutable data objects. # # @example # require 'google/apis/storage_v1' # # Storage = Google::Apis::StorageV1 # Alias the module # service = Storage::StorageService.new # # @see https://developers.google.com/storage/docs/json_api/ class StorageService < Google::Apis::Core::BaseService # @return [String] # API key. Your API key identifies your project and provides you with API access, # quota, and reports. Required unless you provide an OAuth 2.0 token. attr_accessor :key # @return [String] # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. attr_accessor :quota_user # @return [String] # Deprecated. Please use quotaUser instead. attr_accessor :user_ip def initialize super('https://storage.googleapis.com/', 'storage/v1/', client_name: 'google-apis-storage_v1', client_version: Google::Apis::StorageV1::GEM_VERSION) @batch_path = 'batch/storage/v1' end # Permanently deletes the ACL entry for the specified entity on the specified # bucket. # @param [String] bucket # Name of a bucket. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_bucket_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/acl/{entity}', options) command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Returns the ACL entry for the specified entity on the specified bucket. # @param [String] bucket # Name of a bucket. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::BucketAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_bucket_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/acl/{entity}', options) command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.response_class = Google::Apis::StorageV1::BucketAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Creates a new ACL entry on the specified bucket. # @param [String] bucket # Name of a bucket. # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::BucketAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_bucket_access_control(bucket, bucket_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/acl', options) command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.request_object = bucket_access_control_object command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.response_class = Google::Apis::StorageV1::BucketAccessControl command.params['bucket'] = bucket unless bucket.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves ACL entries on the specified bucket. # @param [String] bucket # Name of a bucket. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::BucketAccessControls] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::BucketAccessControls] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_bucket_access_controls(bucket, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/acl', options) command.response_representation = Google::Apis::StorageV1::BucketAccessControls::Representation command.response_class = Google::Apis::StorageV1::BucketAccessControls command.params['bucket'] = bucket unless bucket.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Patches an ACL entry on the specified bucket. # @param [String] bucket # Name of a bucket. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::BucketAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_bucket_access_control(bucket, entity, bucket_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'b/{bucket}/acl/{entity}', options) command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.request_object = bucket_access_control_object command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.response_class = Google::Apis::StorageV1::BucketAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an ACL entry on the specified bucket. # @param [String] bucket # Name of a bucket. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::BucketAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_bucket_access_control(bucket, entity, bucket_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/acl/{entity}', options) command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.request_object = bucket_access_control_object command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.response_class = Google::Apis::StorageV1::BucketAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Permanently deletes an empty bucket. # @param [String] bucket # Name of a bucket. # @param [Fixnum] if_metageneration_match # If set, only deletes the bucket if its metageneration matches this value. # @param [Fixnum] if_metageneration_not_match # If set, only deletes the bucket if its metageneration does not match this # value. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}', options) command.params['bucket'] = bucket unless bucket.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Returns metadata for the specified bucket. # @param [String] bucket # Name of a bucket. # @param [Fixnum] if_metageneration_match # Makes the return of the bucket metadata conditional on whether the bucket's # current metageneration matches the given value. # @param [Fixnum] if_metageneration_not_match # Makes the return of the bucket metadata conditional on whether the bucket's # current metageneration does not match the given value. # @param [String] projection # Set of properties to return. Defaults to noAcl. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Bucket] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}', options) command.response_representation = Google::Apis::StorageV1::Bucket::Representation command.response_class = Google::Apis::StorageV1::Bucket command.params['bucket'] = bucket unless bucket.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['projection'] = projection unless projection.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Returns an IAM policy for the specified bucket. # @param [String] bucket # Name of a bucket. # @param [Fixnum] options_requested_policy_version # The IAM policy format version to be returned. If the # optionsRequestedPolicyVersion is for an older version that doesn't support # part of the requested IAM policy, the request fails. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Policy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_bucket_iam_policy(bucket, options_requested_policy_version: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/iam', options) command.response_representation = Google::Apis::StorageV1::Policy::Representation command.response_class = Google::Apis::StorageV1::Policy command.params['bucket'] = bucket unless bucket.nil? command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Creates a new bucket. # @param [String] project # A valid API project identifier. # @param [Google::Apis::StorageV1::Bucket] bucket_object # @param [String] predefined_acl # Apply a predefined set of access controls to this bucket. # @param [String] predefined_default_object_acl # Apply a predefined set of default object access controls to this bucket. # @param [String] projection # Set of properties to return. Defaults to noAcl, unless the bucket resource # specifies acl or defaultObjectAcl properties, when it defaults to full. # @param [String] user_project # The project to be billed for this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Bucket] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_bucket(project, bucket_object = nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b', options) command.request_representation = Google::Apis::StorageV1::Bucket::Representation command.request_object = bucket_object command.response_representation = Google::Apis::StorageV1::Bucket::Representation command.response_class = Google::Apis::StorageV1::Bucket command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil? command.query['project'] = project unless project.nil? command.query['projection'] = projection unless projection.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of buckets for a given project. # @param [String] project # A valid API project identifier. # @param [Fixnum] max_results # Maximum number of buckets to return in a single response. The service will use # this parameter or 1,000 items, whichever is smaller. # @param [String] page_token # A previously-returned page token representing part of the larger set of # results to view. # @param [String] prefix # Filter results to buckets whose names begin with this prefix. # @param [String] projection # Set of properties to return. Defaults to noAcl. # @param [String] user_project # The project to be billed for this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Buckets] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Buckets] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_buckets(project, max_results: nil, page_token: nil, prefix: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b', options) command.response_representation = Google::Apis::StorageV1::Buckets::Representation command.response_class = Google::Apis::StorageV1::Buckets command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['prefix'] = prefix unless prefix.nil? command.query['project'] = project unless project.nil? command.query['projection'] = projection unless projection.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Locks retention policy on a bucket. # @param [String] bucket # Name of a bucket. # @param [Fixnum] if_metageneration_match # Makes the operation conditional on whether bucket's current metageneration # matches the given value. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Bucket] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def lock_bucket_retention_policy(bucket, if_metageneration_match, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/lockRetentionPolicy', options) command.response_representation = Google::Apis::StorageV1::Bucket::Representation command.response_class = Google::Apis::StorageV1::Bucket command.params['bucket'] = bucket unless bucket.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Patches a bucket. Changes to the bucket will be readable immediately after # writing, but configuration changes may take time to propagate. # @param [String] bucket # Name of a bucket. # @param [Google::Apis::StorageV1::Bucket] bucket_object # @param [Fixnum] if_metageneration_match # Makes the return of the bucket metadata conditional on whether the bucket's # current metageneration matches the given value. # @param [Fixnum] if_metageneration_not_match # Makes the return of the bucket metadata conditional on whether the bucket's # current metageneration does not match the given value. # @param [String] predefined_acl # Apply a predefined set of access controls to this bucket. # @param [String] predefined_default_object_acl # Apply a predefined set of default object access controls to this bucket. # @param [String] projection # Set of properties to return. Defaults to full. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Bucket] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'b/{bucket}', options) command.request_representation = Google::Apis::StorageV1::Bucket::Representation command.request_object = bucket_object command.response_representation = Google::Apis::StorageV1::Bucket::Representation command.response_class = Google::Apis::StorageV1::Bucket command.params['bucket'] = bucket unless bucket.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil? command.query['projection'] = projection unless projection.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an IAM policy for the specified bucket. # @param [String] bucket # Name of a bucket. # @param [Google::Apis::StorageV1::Policy] policy_object # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Policy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def set_bucket_iam_policy(bucket, policy_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/iam', options) command.request_representation = Google::Apis::StorageV1::Policy::Representation command.request_object = policy_object command.response_representation = Google::Apis::StorageV1::Policy::Representation command.response_class = Google::Apis::StorageV1::Policy command.params['bucket'] = bucket unless bucket.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Tests a set of permissions on the given bucket to see which, if any, are held # by the caller. # @param [String] bucket # Name of a bucket. # @param [Array, String] permissions # Permissions to test. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::TestIamPermissionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::TestIamPermissionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def test_bucket_iam_permissions(bucket, permissions, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/iam/testPermissions', options) command.response_representation = Google::Apis::StorageV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::StorageV1::TestIamPermissionsResponse command.params['bucket'] = bucket unless bucket.nil? command.query['permissions'] = permissions unless permissions.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates a bucket. Changes to the bucket will be readable immediately after # writing, but configuration changes may take time to propagate. # @param [String] bucket # Name of a bucket. # @param [Google::Apis::StorageV1::Bucket] bucket_object # @param [Fixnum] if_metageneration_match # Makes the return of the bucket metadata conditional on whether the bucket's # current metageneration matches the given value. # @param [Fixnum] if_metageneration_not_match # Makes the return of the bucket metadata conditional on whether the bucket's # current metageneration does not match the given value. # @param [String] predefined_acl # Apply a predefined set of access controls to this bucket. # @param [String] predefined_default_object_acl # Apply a predefined set of default object access controls to this bucket. # @param [String] projection # Set of properties to return. Defaults to full. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Bucket] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}', options) command.request_representation = Google::Apis::StorageV1::Bucket::Representation command.request_object = bucket_object command.response_representation = Google::Apis::StorageV1::Bucket::Representation command.response_class = Google::Apis::StorageV1::Bucket command.params['bucket'] = bucket unless bucket.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil? command.query['projection'] = projection unless projection.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Stop watching resources through this channel # @param [Google::Apis::StorageV1::Channel] channel_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'channels/stop', options) command.request_representation = Google::Apis::StorageV1::Channel::Representation command.request_object = channel_object command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Permanently deletes the default object ACL entry for the specified entity on # the specified bucket. # @param [String] bucket # Name of a bucket. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_default_object_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/defaultObjectAcl/{entity}', options) command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Returns the default object ACL entry for the specified entity on the specified # bucket. # @param [String] bucket # Name of a bucket. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::ObjectAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_default_object_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/defaultObjectAcl/{entity}', options) command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Creates a new default object ACL entry on the specified bucket. # @param [String] bucket # Name of a bucket. # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::ObjectAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_default_object_access_control(bucket, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/defaultObjectAcl', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves default object ACL entries on the specified bucket. # @param [String] bucket # Name of a bucket. # @param [Fixnum] if_metageneration_match # If present, only return default ACL listing if the bucket's current # metageneration matches this value. # @param [Fixnum] if_metageneration_not_match # If present, only return default ACL listing if the bucket's current # metageneration does not match the given value. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControls] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::ObjectAccessControls] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/defaultObjectAcl', options) command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControls command.params['bucket'] = bucket unless bucket.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Patches a default object ACL entry on the specified bucket. # @param [String] bucket # Name of a bucket. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::ObjectAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_default_object_access_control(bucket, entity, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'b/{bucket}/defaultObjectAcl/{entity}', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates a default object ACL entry on the specified bucket. # @param [String] bucket # Name of a bucket. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::ObjectAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_default_object_access_control(bucket, entity, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/defaultObjectAcl/{entity}', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Permanently deletes a notification subscription. # @param [String] bucket # The parent bucket of the notification. # @param [String] notification # ID of the notification to delete. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_notification(bucket, notification, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/notificationConfigs/{notification}', options) command.params['bucket'] = bucket unless bucket.nil? command.params['notification'] = notification unless notification.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # View a notification configuration. # @param [String] bucket # The parent bucket of the notification. # @param [String] notification # Notification ID # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Notification] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Notification] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_notification(bucket, notification, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/notificationConfigs/{notification}', options) command.response_representation = Google::Apis::StorageV1::Notification::Representation command.response_class = Google::Apis::StorageV1::Notification command.params['bucket'] = bucket unless bucket.nil? command.params['notification'] = notification unless notification.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Creates a notification subscription for a given bucket. # @param [String] bucket # The parent bucket of the notification. # @param [Google::Apis::StorageV1::Notification] notification_object # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Notification] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Notification] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_notification(bucket, notification_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/notificationConfigs', options) command.request_representation = Google::Apis::StorageV1::Notification::Representation command.request_object = notification_object command.response_representation = Google::Apis::StorageV1::Notification::Representation command.response_class = Google::Apis::StorageV1::Notification command.params['bucket'] = bucket unless bucket.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of notification subscriptions for a given bucket. # @param [String] bucket # Name of a Google Cloud Storage bucket. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Notifications] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Notifications] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_notifications(bucket, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/notificationConfigs', options) command.response_representation = Google::Apis::StorageV1::Notifications::Representation command.response_class = Google::Apis::StorageV1::Notifications command.params['bucket'] = bucket unless bucket.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Permanently deletes the ACL entry for the specified entity on the specified # object. # @param [String] bucket # Name of a bucket. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_object_access_control(bucket, object, entity, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/o/{object}/acl/{entity}', options) command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.params['entity'] = entity unless entity.nil? command.query['generation'] = generation unless generation.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Returns the ACL entry for the specified entity on the specified object. # @param [String] bucket # Name of a bucket. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::ObjectAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_object_access_control(bucket, object, entity, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/o/{object}/acl/{entity}', options) command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.params['entity'] = entity unless entity.nil? command.query['generation'] = generation unless generation.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Creates a new ACL entry on the specified object. # @param [String] bucket # Name of a bucket. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::ObjectAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_object_access_control(bucket, object, object_access_control_object = nil, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/o/{object}/acl', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves ACL entries on the specified object. # @param [String] bucket # Name of a bucket. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControls] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::ObjectAccessControls] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_object_access_controls(bucket, object, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/o/{object}/acl', options) command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControls command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Patches an ACL entry on the specified object. # @param [String] bucket # Name of a bucket. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::ObjectAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'b/{bucket}/o/{object}/acl/{entity}', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.params['entity'] = entity unless entity.nil? command.query['generation'] = generation unless generation.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an ACL entry on the specified object. # @param [String] bucket # Name of a bucket. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::ObjectAccessControl] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/o/{object}/acl/{entity}', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.params['entity'] = entity unless entity.nil? command.query['generation'] = generation unless generation.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Concatenates a list of existing objects into a new object in the same bucket. # @param [String] destination_bucket # Name of the bucket containing the source objects. The destination object is # stored in this bucket. # @param [String] destination_object # Name of the new object. For information about how to URL encode object names # to be path safe, see Encoding URI Path Parts. # @param [Google::Apis::StorageV1::ComposeRequest] compose_request_object # @param [String] destination_predefined_acl # Apply a predefined set of access controls to the destination object. # @param [Fixnum] if_generation_match # Makes the operation conditional on whether the object's current generation # matches the given value. Setting to 0 makes the operation succeed only if # there are no live versions of the object. # @param [Fixnum] if_metageneration_match # Makes the operation conditional on whether the object's current metageneration # matches the given value. # @param [String] kms_key_name # Resource name of the Cloud KMS key, of the form projects/my-project/locations/ # global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the # object. Overrides the object metadata's kms_key_name value, if any. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Object] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def compose_object(destination_bucket, destination_object, compose_request_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_metageneration_match: nil, kms_key_name: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{destinationBucket}/o/{destinationObject}/compose', options) command.request_representation = Google::Apis::StorageV1::ComposeRequest::Representation command.request_object = compose_request_object command.response_representation = Google::Apis::StorageV1::Object::Representation command.response_class = Google::Apis::StorageV1::Object command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil? command.params['destinationObject'] = destination_object unless destination_object.nil? command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil? command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['kmsKeyName'] = kms_key_name unless kms_key_name.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Copies a source object to a destination object. Optionally overrides metadata. # @param [String] source_bucket # Name of the bucket in which to find the source object. # @param [String] source_object # Name of the source object. For information about how to URL encode object # names to be path safe, see Encoding URI Path Parts. # @param [String] destination_bucket # Name of the bucket in which to store the new object. Overrides the provided # object metadata's bucket value, if any.For information about how to URL encode # object names to be path safe, see Encoding URI Path Parts. # @param [String] destination_object # Name of the new object. Required when the object metadata is not otherwise # provided. Overrides the object metadata's name value, if any. # @param [Google::Apis::StorageV1::Object] object_object # @param [String] destination_kms_key_name # Resource name of the Cloud KMS key, of the form projects/my-project/locations/ # global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the # object. Overrides the object metadata's kms_key_name value, if any. # @param [String] destination_predefined_acl # Apply a predefined set of access controls to the destination object. # @param [Fixnum] if_generation_match # Makes the operation conditional on whether the destination object's current # generation matches the given value. Setting to 0 makes the operation succeed # only if there are no live versions of the object. # @param [Fixnum] if_generation_not_match # Makes the operation conditional on whether the destination object's current # generation does not match the given value. If no live object exists, the # precondition fails. Setting to 0 makes the operation succeed only if there is # a live version of the object. # @param [Fixnum] if_metageneration_match # Makes the operation conditional on whether the destination object's current # metageneration matches the given value. # @param [Fixnum] if_metageneration_not_match # Makes the operation conditional on whether the destination object's current # metageneration does not match the given value. # @param [Fixnum] if_source_generation_match # Makes the operation conditional on whether the source object's current # generation matches the given value. # @param [Fixnum] if_source_generation_not_match # Makes the operation conditional on whether the source object's current # generation does not match the given value. # @param [Fixnum] if_source_metageneration_match # Makes the operation conditional on whether the source object's current # metageneration matches the given value. # @param [Fixnum] if_source_metageneration_not_match # Makes the operation conditional on whether the source object's current # metageneration does not match the given value. # @param [String] projection # Set of properties to return. Defaults to noAcl, unless the object resource # specifies the acl property, when it defaults to full. # @param [Fixnum] source_generation # If present, selects a specific revision of the source object (as opposed to # the latest version, the default). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Object] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def copy_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_kms_key_name: nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, projection: nil, source_generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}', options) command.request_representation = Google::Apis::StorageV1::Object::Representation command.request_object = object_object command.response_representation = Google::Apis::StorageV1::Object::Representation command.response_class = Google::Apis::StorageV1::Object command.params['sourceBucket'] = source_bucket unless source_bucket.nil? command.params['sourceObject'] = source_object unless source_object.nil? command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil? command.params['destinationObject'] = destination_object unless destination_object.nil? command.query['destinationKmsKeyName'] = destination_kms_key_name unless destination_kms_key_name.nil? command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil? command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil? command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil? command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil? command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil? command.query['projection'] = projection unless projection.nil? command.query['sourceGeneration'] = source_generation unless source_generation.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an object and its metadata. Deletions are permanent if versioning is # not enabled for the bucket, or if the generation parameter is used. # @param [String] bucket # Name of the bucket in which the object resides. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [Fixnum] generation # If present, permanently deletes a specific revision of this object (as opposed # to the latest version, the default). # @param [Fixnum] if_generation_match # Makes the operation conditional on whether the object's current generation # matches the given value. Setting to 0 makes the operation succeed only if # there are no live versions of the object. # @param [Fixnum] if_generation_not_match # Makes the operation conditional on whether the object's current generation # does not match the given value. If no live object exists, the precondition # fails. Setting to 0 makes the operation succeed only if there is a live # version of the object. # @param [Fixnum] if_metageneration_match # Makes the operation conditional on whether the object's current metageneration # matches the given value. # @param [Fixnum] if_metageneration_not_match # Makes the operation conditional on whether the object's current metageneration # does not match the given value. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/o/{object}', options) command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves an object or its metadata. # @param [String] bucket # Name of the bucket in which the object resides. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [Fixnum] if_generation_match # Makes the operation conditional on whether the object's current generation # matches the given value. Setting to 0 makes the operation succeed only if # there are no live versions of the object. # @param [Fixnum] if_generation_not_match # Makes the operation conditional on whether the object's current generation # does not match the given value. If no live object exists, the precondition # fails. Setting to 0 makes the operation succeed only if there is a live # version of the object. # @param [Fixnum] if_metageneration_match # Makes the operation conditional on whether the object's current metageneration # matches the given value. # @param [Fixnum] if_metageneration_not_match # Makes the operation conditional on whether the object's current metageneration # does not match the given value. # @param [String] projection # Set of properties to return. Defaults to noAcl. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [IO, String] download_dest # IO stream or filename to receive content download # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Object] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'b/{bucket}/o/{object}', options) else command = make_storage_download_command(:get, 'b/{bucket}/o/{object}', options) command.download_dest = download_dest end command.response_representation = Google::Apis::StorageV1::Object::Representation command.response_class = Google::Apis::StorageV1::Object command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['projection'] = projection unless projection.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Returns an IAM policy for the specified object. # @param [String] bucket # Name of the bucket in which the object resides. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Policy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_object_iam_policy(bucket, object, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/o/{object}/iam', options) command.response_representation = Google::Apis::StorageV1::Policy::Representation command.response_class = Google::Apis::StorageV1::Policy command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Stores a new object and metadata. # @param [String] bucket # Name of the bucket in which to store the new object. Overrides the provided # object metadata's bucket value, if any. # @param [Google::Apis::StorageV1::Object] object_object # @param [String] content_encoding # If set, sets the contentEncoding property of the final object to this value. # Setting this parameter is equivalent to setting the contentEncoding metadata # property. This can be useful when uploading an object with uploadType=media to # indicate the encoding of the content being uploaded. # @param [Fixnum] if_generation_match # Makes the operation conditional on whether the object's current generation # matches the given value. Setting to 0 makes the operation succeed only if # there are no live versions of the object. # @param [Fixnum] if_generation_not_match # Makes the operation conditional on whether the object's current generation # does not match the given value. If no live object exists, the precondition # fails. Setting to 0 makes the operation succeed only if there is a live # version of the object. # @param [Fixnum] if_metageneration_match # Makes the operation conditional on whether the object's current metageneration # matches the given value. # @param [Fixnum] if_metageneration_not_match # Makes the operation conditional on whether the object's current metageneration # does not match the given value. # @param [String] kms_key_name # Resource name of the Cloud KMS key, of the form projects/my-project/locations/ # global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the # object. Overrides the object metadata's kms_key_name value, if any. # @param [String] name # Name of the object. Required when the object metadata is not otherwise # provided. Overrides the object metadata's name value, if any. For information # about how to URL encode object names to be path safe, see Encoding URI Path # Parts. # @param [String] predefined_acl # Apply a predefined set of access controls to this object. # @param [String] projection # Set of properties to return. Defaults to noAcl, unless the object resource # specifies the acl property, when it defaults to full. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [IO, String] upload_source # IO stream or filename containing content to upload # @param [String] content_type # Content type of the uploaded content. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Object] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_object(bucket, object_object = nil, content_encoding: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, kms_key_name: nil, name: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'b/{bucket}/o', options) else command = make_storage_upload_command(:post, 'b/{bucket}/o', options) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::StorageV1::Object::Representation command.request_object = object_object command.response_representation = Google::Apis::StorageV1::Object::Representation command.response_class = Google::Apis::StorageV1::Object command.params['bucket'] = bucket unless bucket.nil? command.query['contentEncoding'] = content_encoding unless content_encoding.nil? command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['kmsKeyName'] = kms_key_name unless kms_key_name.nil? command.query['name'] = name unless name.nil? command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? command.query['projection'] = projection unless projection.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of objects matching the criteria. # @param [String] bucket # Name of the bucket in which to look for objects. # @param [String] delimiter # Returns results in a directory-like mode. items will contain only objects # whose names, aside from the prefix, do not contain delimiter. Objects whose # names, aside from the prefix, contain delimiter will have their name, # truncated after the delimiter, returned in prefixes. Duplicate prefixes are # omitted. # @param [String] end_offset # Filter results to objects whose names are lexicographically before endOffset. # If startOffset is also set, the objects listed will have names between # startOffset (inclusive) and endOffset (exclusive). # @param [Boolean] include_trailing_delimiter # If true, objects that end in exactly one instance of delimiter will have their # metadata included in items in addition to prefixes. # @param [Fixnum] max_results # Maximum number of items plus prefixes to return in a single page of responses. # As duplicate prefixes are omitted, fewer total results may be returned than # requested. The service will use this parameter or 1,000 items, whichever is # smaller. # @param [String] page_token # A previously-returned page token representing part of the larger set of # results to view. # @param [String] prefix # Filter results to objects whose names begin with this prefix. # @param [String] projection # Set of properties to return. Defaults to noAcl. # @param [String] start_offset # Filter results to objects whose names are lexicographically equal to or after # startOffset. If endOffset is also set, the objects listed will have names # between startOffset (inclusive) and endOffset (exclusive). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [Boolean] versions # If true, lists all versions of an object as distinct results. The default is # false. For more information, see Object Versioning. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Objects] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Objects] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_objects(bucket, delimiter: nil, end_offset: nil, include_trailing_delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, start_offset: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/o', options) command.response_representation = Google::Apis::StorageV1::Objects::Representation command.response_class = Google::Apis::StorageV1::Objects command.params['bucket'] = bucket unless bucket.nil? command.query['delimiter'] = delimiter unless delimiter.nil? command.query['endOffset'] = end_offset unless end_offset.nil? command.query['includeTrailingDelimiter'] = include_trailing_delimiter unless include_trailing_delimiter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['prefix'] = prefix unless prefix.nil? command.query['projection'] = projection unless projection.nil? command.query['startOffset'] = start_offset unless start_offset.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['versions'] = versions unless versions.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Patches an object's metadata. # @param [String] bucket # Name of the bucket in which the object resides. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [Google::Apis::StorageV1::Object] object_object # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [Fixnum] if_generation_match # Makes the operation conditional on whether the object's current generation # matches the given value. Setting to 0 makes the operation succeed only if # there are no live versions of the object. # @param [Fixnum] if_generation_not_match # Makes the operation conditional on whether the object's current generation # does not match the given value. If no live object exists, the precondition # fails. Setting to 0 makes the operation succeed only if there is a live # version of the object. # @param [Fixnum] if_metageneration_match # Makes the operation conditional on whether the object's current metageneration # matches the given value. # @param [Fixnum] if_metageneration_not_match # Makes the operation conditional on whether the object's current metageneration # does not match the given value. # @param [String] predefined_acl # Apply a predefined set of access controls to this object. # @param [String] projection # Set of properties to return. Defaults to full. # @param [String] user_project # The project to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Object] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'b/{bucket}/o/{object}', options) command.request_representation = Google::Apis::StorageV1::Object::Representation command.request_object = object_object command.response_representation = Google::Apis::StorageV1::Object::Representation command.response_class = Google::Apis::StorageV1::Object command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? command.query['projection'] = projection unless projection.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Rewrites a source object to a destination object. Optionally overrides # metadata. # @param [String] source_bucket # Name of the bucket in which to find the source object. # @param [String] source_object # Name of the source object. For information about how to URL encode object # names to be path safe, see Encoding URI Path Parts. # @param [String] destination_bucket # Name of the bucket in which to store the new object. Overrides the provided # object metadata's bucket value, if any. # @param [String] destination_object # Name of the new object. Required when the object metadata is not otherwise # provided. Overrides the object metadata's name value, if any. For information # about how to URL encode object names to be path safe, see Encoding URI Path # Parts. # @param [Google::Apis::StorageV1::Object] object_object # @param [String] destination_kms_key_name # Resource name of the Cloud KMS key, of the form projects/my-project/locations/ # global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the # object. Overrides the object metadata's kms_key_name value, if any. # @param [String] destination_predefined_acl # Apply a predefined set of access controls to the destination object. # @param [Fixnum] if_generation_match # Makes the operation conditional on whether the object's current generation # matches the given value. Setting to 0 makes the operation succeed only if # there are no live versions of the object. # @param [Fixnum] if_generation_not_match # Makes the operation conditional on whether the object's current generation # does not match the given value. If no live object exists, the precondition # fails. Setting to 0 makes the operation succeed only if there is a live # version of the object. # @param [Fixnum] if_metageneration_match # Makes the operation conditional on whether the destination object's current # metageneration matches the given value. # @param [Fixnum] if_metageneration_not_match # Makes the operation conditional on whether the destination object's current # metageneration does not match the given value. # @param [Fixnum] if_source_generation_match # Makes the operation conditional on whether the source object's current # generation matches the given value. # @param [Fixnum] if_source_generation_not_match # Makes the operation conditional on whether the source object's current # generation does not match the given value. # @param [Fixnum] if_source_metageneration_match # Makes the operation conditional on whether the source object's current # metageneration matches the given value. # @param [Fixnum] if_source_metageneration_not_match # Makes the operation conditional on whether the source object's current # metageneration does not match the given value. # @param [Fixnum] max_bytes_rewritten_per_call # The maximum number of bytes that will be rewritten per rewrite request. Most # callers shouldn't need to specify this parameter - it is primarily in place to # support testing. If specified the value must be an integral multiple of 1 MiB ( # 1048576). Also, this only applies to requests where the source and destination # span locations and/or storage classes. Finally, this value must not change # across rewrite calls else you'll get an error that the rewriteToken is invalid. # @param [String] projection # Set of properties to return. Defaults to noAcl, unless the object resource # specifies the acl property, when it defaults to full. # @param [String] rewrite_token # Include this field (from the previous rewrite response) on each rewrite # request after the first one, until the rewrite response 'done' flag is true. # Calls that provide a rewriteToken can omit all other request fields, but if # included those fields must match the values provided in the first rewrite # request. # @param [Fixnum] source_generation # If present, selects a specific revision of the source object (as opposed to # the latest version, the default). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::RewriteResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::RewriteResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def rewrite_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_kms_key_name: nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, max_bytes_rewritten_per_call: nil, projection: nil, rewrite_token: nil, source_generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}', options) command.request_representation = Google::Apis::StorageV1::Object::Representation command.request_object = object_object command.response_representation = Google::Apis::StorageV1::RewriteResponse::Representation command.response_class = Google::Apis::StorageV1::RewriteResponse command.params['sourceBucket'] = source_bucket unless source_bucket.nil? command.params['sourceObject'] = source_object unless source_object.nil? command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil? command.params['destinationObject'] = destination_object unless destination_object.nil? command.query['destinationKmsKeyName'] = destination_kms_key_name unless destination_kms_key_name.nil? command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil? command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil? command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil? command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil? command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil? command.query['maxBytesRewrittenPerCall'] = max_bytes_rewritten_per_call unless max_bytes_rewritten_per_call.nil? command.query['projection'] = projection unless projection.nil? command.query['rewriteToken'] = rewrite_token unless rewrite_token.nil? command.query['sourceGeneration'] = source_generation unless source_generation.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an IAM policy for the specified object. # @param [String] bucket # Name of the bucket in which the object resides. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [Google::Apis::StorageV1::Policy] policy_object # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Policy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def set_object_iam_policy(bucket, object, policy_object = nil, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/o/{object}/iam', options) command.request_representation = Google::Apis::StorageV1::Policy::Representation command.request_object = policy_object command.response_representation = Google::Apis::StorageV1::Policy::Representation command.response_class = Google::Apis::StorageV1::Policy command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Tests a set of permissions on the given object to see which, if any, are held # by the caller. # @param [String] bucket # Name of the bucket in which the object resides. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [Array, String] permissions # Permissions to test. # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::TestIamPermissionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::TestIamPermissionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def test_object_iam_permissions(bucket, object, permissions, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/o/{object}/iam/testPermissions', options) command.response_representation = Google::Apis::StorageV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::StorageV1::TestIamPermissionsResponse command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? command.query['permissions'] = permissions unless permissions.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an object's metadata. # @param [String] bucket # Name of the bucket in which the object resides. # @param [String] object # Name of the object. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. # @param [Google::Apis::StorageV1::Object] object_object # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). # @param [Fixnum] if_generation_match # Makes the operation conditional on whether the object's current generation # matches the given value. Setting to 0 makes the operation succeed only if # there are no live versions of the object. # @param [Fixnum] if_generation_not_match # Makes the operation conditional on whether the object's current generation # does not match the given value. If no live object exists, the precondition # fails. Setting to 0 makes the operation succeed only if there is a live # version of the object. # @param [Fixnum] if_metageneration_match # Makes the operation conditional on whether the object's current metageneration # matches the given value. # @param [Fixnum] if_metageneration_not_match # Makes the operation conditional on whether the object's current metageneration # does not match the given value. # @param [String] predefined_acl # Apply a predefined set of access controls to this object. # @param [String] projection # Set of properties to return. Defaults to full. # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Object] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/o/{object}', options) command.request_representation = Google::Apis::StorageV1::Object::Representation command.request_object = object_object command.response_representation = Google::Apis::StorageV1::Object::Representation command.response_class = Google::Apis::StorageV1::Object command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? command.query['projection'] = projection unless projection.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Watch for changes on all objects in a bucket. # @param [String] bucket # Name of the bucket in which to look for objects. # @param [Google::Apis::StorageV1::Channel] channel_object # @param [String] delimiter # Returns results in a directory-like mode. items will contain only objects # whose names, aside from the prefix, do not contain delimiter. Objects whose # names, aside from the prefix, contain delimiter will have their name, # truncated after the delimiter, returned in prefixes. Duplicate prefixes are # omitted. # @param [String] end_offset # Filter results to objects whose names are lexicographically before endOffset. # If startOffset is also set, the objects listed will have names between # startOffset (inclusive) and endOffset (exclusive). # @param [Boolean] include_trailing_delimiter # If true, objects that end in exactly one instance of delimiter will have their # metadata included in items in addition to prefixes. # @param [Fixnum] max_results # Maximum number of items plus prefixes to return in a single page of responses. # As duplicate prefixes are omitted, fewer total results may be returned than # requested. The service will use this parameter or 1,000 items, whichever is # smaller. # @param [String] page_token # A previously-returned page token representing part of the larger set of # results to view. # @param [String] prefix # Filter results to objects whose names begin with this prefix. # @param [String] projection # Set of properties to return. Defaults to noAcl. # @param [String] start_offset # Filter results to objects whose names are lexicographically equal to or after # startOffset. If endOffset is also set, the objects listed will have names # between startOffset (inclusive) and endOffset (exclusive). # @param [String] user_project # The project to be billed for this request. Required for Requester Pays buckets. # @param [Boolean] versions # If true, lists all versions of an object as distinct results. The default is # false. For more information, see Object Versioning. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::Channel] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::Channel] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def watch_all_objects(bucket, channel_object = nil, delimiter: nil, end_offset: nil, include_trailing_delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, start_offset: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/o/watch', options) command.request_representation = Google::Apis::StorageV1::Channel::Representation command.request_object = channel_object command.response_representation = Google::Apis::StorageV1::Channel::Representation command.response_class = Google::Apis::StorageV1::Channel command.params['bucket'] = bucket unless bucket.nil? command.query['delimiter'] = delimiter unless delimiter.nil? command.query['endOffset'] = end_offset unless end_offset.nil? command.query['includeTrailingDelimiter'] = include_trailing_delimiter unless include_trailing_delimiter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['prefix'] = prefix unless prefix.nil? command.query['projection'] = projection unless projection.nil? command.query['startOffset'] = start_offset unless start_offset.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['versions'] = versions unless versions.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Creates a new HMAC key for the specified service account. # @param [String] project_id # Project ID owning the service account. # @param [String] service_account_email # Email address of the service account. # @param [String] user_project # The project to be billed for this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::HmacKey] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::HmacKey] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def create_project_hmac_key(project_id, service_account_email, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{projectId}/hmacKeys', options) command.response_representation = Google::Apis::StorageV1::HmacKey::Representation command.response_class = Google::Apis::StorageV1::HmacKey command.params['projectId'] = project_id unless project_id.nil? command.query['serviceAccountEmail'] = service_account_email unless service_account_email.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an HMAC key. # @param [String] project_id # Project ID owning the requested key # @param [String] access_id # Name of the HMAC key to be deleted. # @param [String] user_project # The project to be billed for this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_project_hmac_key(project_id, access_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'projects/{projectId}/hmacKeys/{accessId}', options) command.params['projectId'] = project_id unless project_id.nil? command.params['accessId'] = access_id unless access_id.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves an HMAC key's metadata # @param [String] project_id # Project ID owning the service account of the requested key. # @param [String] access_id # Name of the HMAC key. # @param [String] user_project # The project to be billed for this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::HmacKeyMetadata] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::HmacKeyMetadata] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_project_hmac_key(project_id, access_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/hmacKeys/{accessId}', options) command.response_representation = Google::Apis::StorageV1::HmacKeyMetadata::Representation command.response_class = Google::Apis::StorageV1::HmacKeyMetadata command.params['projectId'] = project_id unless project_id.nil? command.params['accessId'] = access_id unless access_id.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of HMAC keys matching the criteria. # @param [String] project_id # Name of the project in which to look for HMAC keys. # @param [Fixnum] max_results # Maximum number of items to return in a single page of responses. The service # uses this parameter or 250 items, whichever is smaller. The max number of # items per page will also be limited by the number of distinct service accounts # in the response. If the number of service accounts in a single response is too # high, the page will truncated and a next page token will be returned. # @param [String] page_token # A previously-returned page token representing part of the larger set of # results to view. # @param [String] service_account_email # If present, only keys for the given service account are returned. # @param [Boolean] show_deleted_keys # Whether or not to show keys in the DELETED state. # @param [String] user_project # The project to be billed for this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::HmacKeysMetadata] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::HmacKeysMetadata] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_project_hmac_keys(project_id, max_results: nil, page_token: nil, service_account_email: nil, show_deleted_keys: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/hmacKeys', options) command.response_representation = Google::Apis::StorageV1::HmacKeysMetadata::Representation command.response_class = Google::Apis::StorageV1::HmacKeysMetadata command.params['projectId'] = project_id unless project_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['serviceAccountEmail'] = service_account_email unless service_account_email.nil? command.query['showDeletedKeys'] = show_deleted_keys unless show_deleted_keys.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates the state of an HMAC key. See the HMAC Key resource descriptor for # valid states. # @param [String] project_id # Project ID owning the service account of the updated key. # @param [String] access_id # Name of the HMAC key being updated. # @param [Google::Apis::StorageV1::HmacKeyMetadata] hmac_key_metadata_object # @param [String] user_project # The project to be billed for this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::HmacKeyMetadata] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::HmacKeyMetadata] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_project_hmac_key(project_id, access_id, hmac_key_metadata_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'projects/{projectId}/hmacKeys/{accessId}', options) command.request_representation = Google::Apis::StorageV1::HmacKeyMetadata::Representation command.request_object = hmac_key_metadata_object command.response_representation = Google::Apis::StorageV1::HmacKeyMetadata::Representation command.response_class = Google::Apis::StorageV1::HmacKeyMetadata command.params['projectId'] = project_id unless project_id.nil? command.params['accessId'] = access_id unless access_id.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Get the email address of this project's Google Cloud Storage service account. # @param [String] project_id # Project ID # @param [String] user_project # The project to be billed for this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # An opaque string that represents a user for quota purposes. Must not exceed 40 # characters. # @param [String] user_ip # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::StorageV1::ServiceAccount] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::StorageV1::ServiceAccount] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_project_service_account(project_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/serviceAccount', options) command.response_representation = Google::Apis::StorageV1::ServiceAccount::Representation command.response_class = Google::Apis::StorageV1::ServiceAccount command.params['projectId'] = project_id unless project_id.nil? command.query['userProject'] = user_project unless user_project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end protected def apply_command_defaults(command) command.query['key'] = key unless key.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? end end end end end google-apis-storage-v1-0.21.0/lib/google/apis/storage_v1/classes.rb0000644000175100017510000026213714377353716024061 0ustar pravipravi# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'date' require 'google/apis/core/base_service' require 'google/apis/core/json_representation' require 'google/apis/core/hashable' require 'google/apis/errors' module Google module Apis module StorageV1 # A bucket. class Bucket include Google::Apis::Core::Hashable # Access controls on the bucket. # Corresponds to the JSON property `acl` # @return [Array] attr_accessor :acl # The bucket's Autoclass configuration. # Corresponds to the JSON property `autoclass` # @return [Google::Apis::StorageV1::Bucket::Autoclass] attr_accessor :autoclass # The bucket's billing configuration. # Corresponds to the JSON property `billing` # @return [Google::Apis::StorageV1::Bucket::Billing] attr_accessor :billing # The bucket's Cross-Origin Resource Sharing (CORS) configuration. # Corresponds to the JSON property `cors` # @return [Array] attr_accessor :cors_configurations # The bucket's custom placement configuration for Custom Dual Regions. # Corresponds to the JSON property `customPlacementConfig` # @return [Google::Apis::StorageV1::Bucket::CustomPlacementConfig] attr_accessor :custom_placement_config # The default value for event-based hold on newly created objects in this bucket. # Event-based hold is a way to retain objects indefinitely until an event # occurs, signified by the hold's release. After being released, such objects # will be subject to bucket-level retention (if any). One sample use case of # this flag is for banks to hold loan documents for at least 3 years after loan # is paid in full. Here, bucket-level retention is 3 years and the event is loan # being paid in full. In this example, these objects will be held intact for any # number of years until the event has occurred (event-based hold on the object # is released) and then 3 more years after that. That means retention duration # of the objects begins from the moment event-based hold transitioned from true # to false. Objects under event-based hold cannot be deleted, overwritten or # archived until the hold is removed. # Corresponds to the JSON property `defaultEventBasedHold` # @return [Boolean] attr_accessor :default_event_based_hold alias_method :default_event_based_hold?, :default_event_based_hold # Default access controls to apply to new objects when no ACL is provided. # Corresponds to the JSON property `defaultObjectAcl` # @return [Array] attr_accessor :default_object_acl # Encryption configuration for a bucket. # Corresponds to the JSON property `encryption` # @return [Google::Apis::StorageV1::Bucket::Encryption] attr_accessor :encryption # HTTP 1.1 Entity tag for the bucket. # Corresponds to the JSON property `etag` # @return [String] attr_accessor :etag # The bucket's IAM configuration. # Corresponds to the JSON property `iamConfiguration` # @return [Google::Apis::StorageV1::Bucket::IamConfiguration] attr_accessor :iam_configuration # The ID of the bucket. For buckets, the id and name properties are the same. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id # The kind of item this is. For buckets, this is always storage#bucket. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # User-provided labels, in key/value pairs. # Corresponds to the JSON property `labels` # @return [Hash] attr_accessor :labels # The bucket's lifecycle configuration. See lifecycle management for more # information. # Corresponds to the JSON property `lifecycle` # @return [Google::Apis::StorageV1::Bucket::Lifecycle] attr_accessor :lifecycle # The location of the bucket. Object data for objects in the bucket resides in # physical storage within this region. Defaults to US. See the developer's guide # for the authoritative list. # Corresponds to the JSON property `location` # @return [String] attr_accessor :location # The type of the bucket location. # Corresponds to the JSON property `locationType` # @return [String] attr_accessor :location_type # The bucket's logging configuration, which defines the destination bucket and # optional name prefix for the current bucket's logs. # Corresponds to the JSON property `logging` # @return [Google::Apis::StorageV1::Bucket::Logging] attr_accessor :logging # The metadata generation of this bucket. # Corresponds to the JSON property `metageneration` # @return [Fixnum] attr_accessor :metageneration # The name of the bucket. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name # The owner of the bucket. This is always the project team's owner group. # Corresponds to the JSON property `owner` # @return [Google::Apis::StorageV1::Bucket::Owner] attr_accessor :owner # The project number of the project the bucket belongs to. # Corresponds to the JSON property `projectNumber` # @return [Fixnum] attr_accessor :project_number # The bucket's retention policy. The retention policy enforces a minimum # retention time for all objects contained in the bucket, based on their # creation time. Any attempt to overwrite or delete objects younger than the # retention period will result in a PERMISSION_DENIED error. An unlocked # retention policy can be modified or removed from the bucket via a storage. # buckets.update operation. A locked retention policy cannot be removed or # shortened in duration for the lifetime of the bucket. Attempting to remove or # decrease period of a locked retention policy will result in a # PERMISSION_DENIED error. # Corresponds to the JSON property `retentionPolicy` # @return [Google::Apis::StorageV1::Bucket::RetentionPolicy] attr_accessor :retention_policy # The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn # on Turbo Replication on a bucket. # Corresponds to the JSON property `rpo` # @return [String] attr_accessor :rpo # Reserved for future use. # Corresponds to the JSON property `satisfiesPZS` # @return [Boolean] attr_accessor :satisfies_pzs alias_method :satisfies_pzs?, :satisfies_pzs # The URI of this bucket. # Corresponds to the JSON property `selfLink` # @return [String] attr_accessor :self_link # The bucket's default storage class, used whenever no storageClass is specified # for a newly-created object. This defines how objects in the bucket are stored # and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, # REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and # DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket # is created, it will default to STANDARD. For more information, see storage # classes. # Corresponds to the JSON property `storageClass` # @return [String] attr_accessor :storage_class # The creation time of the bucket in RFC 3339 format. # Corresponds to the JSON property `timeCreated` # @return [DateTime] attr_accessor :time_created # The modification time of the bucket in RFC 3339 format. # Corresponds to the JSON property `updated` # @return [DateTime] attr_accessor :updated # The bucket's versioning configuration. # Corresponds to the JSON property `versioning` # @return [Google::Apis::StorageV1::Bucket::Versioning] attr_accessor :versioning # The bucket's website configuration, controlling how the service behaves when # accessing bucket contents as a web site. See the Static Website Examples for # more information. # Corresponds to the JSON property `website` # @return [Google::Apis::StorageV1::Bucket::Website] attr_accessor :website def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @acl = args[:acl] if args.key?(:acl) @autoclass = args[:autoclass] if args.key?(:autoclass) @billing = args[:billing] if args.key?(:billing) @cors_configurations = args[:cors_configurations] if args.key?(:cors_configurations) @custom_placement_config = args[:custom_placement_config] if args.key?(:custom_placement_config) @default_event_based_hold = args[:default_event_based_hold] if args.key?(:default_event_based_hold) @default_object_acl = args[:default_object_acl] if args.key?(:default_object_acl) @encryption = args[:encryption] if args.key?(:encryption) @etag = args[:etag] if args.key?(:etag) @iam_configuration = args[:iam_configuration] if args.key?(:iam_configuration) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @labels = args[:labels] if args.key?(:labels) @lifecycle = args[:lifecycle] if args.key?(:lifecycle) @location = args[:location] if args.key?(:location) @location_type = args[:location_type] if args.key?(:location_type) @logging = args[:logging] if args.key?(:logging) @metageneration = args[:metageneration] if args.key?(:metageneration) @name = args[:name] if args.key?(:name) @owner = args[:owner] if args.key?(:owner) @project_number = args[:project_number] if args.key?(:project_number) @retention_policy = args[:retention_policy] if args.key?(:retention_policy) @rpo = args[:rpo] if args.key?(:rpo) @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs) @self_link = args[:self_link] if args.key?(:self_link) @storage_class = args[:storage_class] if args.key?(:storage_class) @time_created = args[:time_created] if args.key?(:time_created) @updated = args[:updated] if args.key?(:updated) @versioning = args[:versioning] if args.key?(:versioning) @website = args[:website] if args.key?(:website) end # The bucket's Autoclass configuration. class Autoclass include Google::Apis::Core::Hashable # Whether or not Autoclass is enabled on this bucket # Corresponds to the JSON property `enabled` # @return [Boolean] attr_accessor :enabled alias_method :enabled?, :enabled # A date and time in RFC 3339 format representing the instant at which "enabled" # was last toggled. # Corresponds to the JSON property `toggleTime` # @return [DateTime] attr_accessor :toggle_time def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @enabled = args[:enabled] if args.key?(:enabled) @toggle_time = args[:toggle_time] if args.key?(:toggle_time) end end # The bucket's billing configuration. class Billing include Google::Apis::Core::Hashable # When set to true, Requester Pays is enabled for this bucket. # Corresponds to the JSON property `requesterPays` # @return [Boolean] attr_accessor :requester_pays alias_method :requester_pays?, :requester_pays def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @requester_pays = args[:requester_pays] if args.key?(:requester_pays) end end # class CorsConfiguration include Google::Apis::Core::Hashable # The value, in seconds, to return in the Access-Control-Max-Age header used in # preflight responses. # Corresponds to the JSON property `maxAgeSeconds` # @return [Fixnum] attr_accessor :max_age_seconds # The list of HTTP methods on which to include CORS response headers, (GET, # OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means " # any method". # Corresponds to the JSON property `method` # @return [Array] attr_accessor :http_method # The list of Origins eligible to receive CORS response headers. Note: "*" is # permitted in the list of origins, and means "any Origin". # Corresponds to the JSON property `origin` # @return [Array] attr_accessor :origin # The list of HTTP headers other than the simple response headers to give # permission for the user-agent to share across domains. # Corresponds to the JSON property `responseHeader` # @return [Array] attr_accessor :response_header def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @max_age_seconds = args[:max_age_seconds] if args.key?(:max_age_seconds) @http_method = args[:http_method] if args.key?(:http_method) @origin = args[:origin] if args.key?(:origin) @response_header = args[:response_header] if args.key?(:response_header) end end # The bucket's custom placement configuration for Custom Dual Regions. class CustomPlacementConfig include Google::Apis::Core::Hashable # The list of regional locations in which data is placed. # Corresponds to the JSON property `dataLocations` # @return [Array] attr_accessor :data_locations def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @data_locations = args[:data_locations] if args.key?(:data_locations) end end # Encryption configuration for a bucket. class Encryption include Google::Apis::Core::Hashable # A Cloud KMS key that will be used to encrypt objects inserted into this bucket, # if no encryption method is specified. # Corresponds to the JSON property `defaultKmsKeyName` # @return [String] attr_accessor :default_kms_key_name def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @default_kms_key_name = args[:default_kms_key_name] if args.key?(:default_kms_key_name) end end # The bucket's IAM configuration. class IamConfiguration include Google::Apis::Core::Hashable # The bucket's uniform bucket-level access configuration. The feature was # formerly known as Bucket Policy Only. For backward compatibility, this field # will be populated with identical information as the uniformBucketLevelAccess # field. We recommend using the uniformBucketLevelAccess field to enable and # disable the feature. # Corresponds to the JSON property `bucketPolicyOnly` # @return [Google::Apis::StorageV1::Bucket::IamConfiguration::BucketPolicyOnly] attr_accessor :bucket_policy_only # The bucket's Public Access Prevention configuration. Currently, 'inherited' # and 'enforced' are supported. # Corresponds to the JSON property `publicAccessPrevention` # @return [String] attr_accessor :public_access_prevention # The bucket's uniform bucket-level access configuration. # Corresponds to the JSON property `uniformBucketLevelAccess` # @return [Google::Apis::StorageV1::Bucket::IamConfiguration::UniformBucketLevelAccess] attr_accessor :uniform_bucket_level_access def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @bucket_policy_only = args[:bucket_policy_only] if args.key?(:bucket_policy_only) @public_access_prevention = args[:public_access_prevention] if args.key?(:public_access_prevention) @uniform_bucket_level_access = args[:uniform_bucket_level_access] if args.key?(:uniform_bucket_level_access) end # The bucket's uniform bucket-level access configuration. The feature was # formerly known as Bucket Policy Only. For backward compatibility, this field # will be populated with identical information as the uniformBucketLevelAccess # field. We recommend using the uniformBucketLevelAccess field to enable and # disable the feature. class BucketPolicyOnly include Google::Apis::Core::Hashable # If set, access is controlled only by bucket-level or above IAM policies. # Corresponds to the JSON property `enabled` # @return [Boolean] attr_accessor :enabled alias_method :enabled?, :enabled # The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true # to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be # changed from true to false until the locked time, after which the field is # immutable. # Corresponds to the JSON property `lockedTime` # @return [DateTime] attr_accessor :locked_time def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @enabled = args[:enabled] if args.key?(:enabled) @locked_time = args[:locked_time] if args.key?(:locked_time) end end # The bucket's uniform bucket-level access configuration. class UniformBucketLevelAccess include Google::Apis::Core::Hashable # If set, access is controlled only by bucket-level or above IAM policies. # Corresponds to the JSON property `enabled` # @return [Boolean] attr_accessor :enabled alias_method :enabled?, :enabled # The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled # from true to false in RFC 3339 format. iamConfiguration. # uniformBucketLevelAccess.enabled may be changed from true to false until the # locked time, after which the field is immutable. # Corresponds to the JSON property `lockedTime` # @return [DateTime] attr_accessor :locked_time def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @enabled = args[:enabled] if args.key?(:enabled) @locked_time = args[:locked_time] if args.key?(:locked_time) end end end # The bucket's lifecycle configuration. See lifecycle management for more # information. class Lifecycle include Google::Apis::Core::Hashable # A lifecycle management rule, which is made of an action to take and the # condition(s) under which the action will be taken. # Corresponds to the JSON property `rule` # @return [Array] attr_accessor :rule def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @rule = args[:rule] if args.key?(:rule) end # class Rule include Google::Apis::Core::Hashable # The action to take. # Corresponds to the JSON property `action` # @return [Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action] attr_accessor :action # The condition(s) under which the action will be taken. # Corresponds to the JSON property `condition` # @return [Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition] attr_accessor :condition def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @action = args[:action] if args.key?(:action) @condition = args[:condition] if args.key?(:condition) end # The action to take. class Action include Google::Apis::Core::Hashable # Target storage class. Required iff the type of the action is SetStorageClass. # Corresponds to the JSON property `storageClass` # @return [String] attr_accessor :storage_class # Type of the action. Currently, only Delete, SetStorageClass, and # AbortIncompleteMultipartUpload are supported. # Corresponds to the JSON property `type` # @return [String] attr_accessor :type def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @storage_class = args[:storage_class] if args.key?(:storage_class) @type = args[:type] if args.key?(:type) end end # The condition(s) under which the action will be taken. class Condition include Google::Apis::Core::Hashable # Age of an object (in days). This condition is satisfied when an object reaches # the specified age. # Corresponds to the JSON property `age` # @return [Fixnum] attr_accessor :age # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). # This condition is satisfied when an object is created before midnight of the # specified date in UTC. # Corresponds to the JSON property `createdBefore` # @return [Date] attr_accessor :created_before # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). # This condition is satisfied when the custom time on an object is before this # date in UTC. # Corresponds to the JSON property `customTimeBefore` # @return [Date] attr_accessor :custom_time_before # Number of days elapsed since the user-specified timestamp set on an object. # The condition is satisfied if the days elapsed is at least this number. If no # custom timestamp is specified on an object, the condition does not apply. # Corresponds to the JSON property `daysSinceCustomTime` # @return [Fixnum] attr_accessor :days_since_custom_time # Number of days elapsed since the noncurrent timestamp of an object. The # condition is satisfied if the days elapsed is at least this number. This # condition is relevant only for versioned objects. The value of the field must # be a nonnegative integer. If it's zero, the object version will become # eligible for Lifecycle action as soon as it becomes noncurrent. # Corresponds to the JSON property `daysSinceNoncurrentTime` # @return [Fixnum] attr_accessor :days_since_noncurrent_time # Relevant only for versioned objects. If the value is true, this condition # matches live objects; if the value is false, it matches archived objects. # Corresponds to the JSON property `isLive` # @return [Boolean] attr_accessor :is_live alias_method :is_live?, :is_live # A regular expression that satisfies the RE2 syntax. This condition is # satisfied when the name of the object matches the RE2 pattern. Note: This # feature is currently in the "Early Access" launch stage and is only available # to a whitelisted set of users; that means that this feature may be changed in # backward-incompatible ways and that it is not guaranteed to be released. # Corresponds to the JSON property `matchesPattern` # @return [String] attr_accessor :matches_pattern # List of object name prefixes. This condition will be satisfied when at least # one of the prefixes exactly matches the beginning of the object name. # Corresponds to the JSON property `matchesPrefix` # @return [Array] attr_accessor :matches_prefix # Objects having any of the storage classes specified by this condition will be # matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, # STANDARD, and DURABLE_REDUCED_AVAILABILITY. # Corresponds to the JSON property `matchesStorageClass` # @return [Array] attr_accessor :matches_storage_class # List of object name suffixes. This condition will be satisfied when at least # one of the suffixes exactly matches the end of the object name. # Corresponds to the JSON property `matchesSuffix` # @return [Array] attr_accessor :matches_suffix # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). # This condition is satisfied when the noncurrent time on an object is before # this date in UTC. This condition is relevant only for versioned objects. # Corresponds to the JSON property `noncurrentTimeBefore` # @return [Date] attr_accessor :noncurrent_time_before # Relevant only for versioned objects. If the value is N, this condition is # satisfied when there are at least N versions (including the live version) # newer than this version of the object. # Corresponds to the JSON property `numNewerVersions` # @return [Fixnum] attr_accessor :num_newer_versions def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @age = args[:age] if args.key?(:age) @created_before = args[:created_before] if args.key?(:created_before) @custom_time_before = args[:custom_time_before] if args.key?(:custom_time_before) @days_since_custom_time = args[:days_since_custom_time] if args.key?(:days_since_custom_time) @days_since_noncurrent_time = args[:days_since_noncurrent_time] if args.key?(:days_since_noncurrent_time) @is_live = args[:is_live] if args.key?(:is_live) @matches_pattern = args[:matches_pattern] if args.key?(:matches_pattern) @matches_prefix = args[:matches_prefix] if args.key?(:matches_prefix) @matches_storage_class = args[:matches_storage_class] if args.key?(:matches_storage_class) @matches_suffix = args[:matches_suffix] if args.key?(:matches_suffix) @noncurrent_time_before = args[:noncurrent_time_before] if args.key?(:noncurrent_time_before) @num_newer_versions = args[:num_newer_versions] if args.key?(:num_newer_versions) end end end end # The bucket's logging configuration, which defines the destination bucket and # optional name prefix for the current bucket's logs. class Logging include Google::Apis::Core::Hashable # The destination bucket where the current bucket's logs should be placed. # Corresponds to the JSON property `logBucket` # @return [String] attr_accessor :log_bucket # A prefix for log object names. # Corresponds to the JSON property `logObjectPrefix` # @return [String] attr_accessor :log_object_prefix def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @log_bucket = args[:log_bucket] if args.key?(:log_bucket) @log_object_prefix = args[:log_object_prefix] if args.key?(:log_object_prefix) end end # The owner of the bucket. This is always the project team's owner group. class Owner include Google::Apis::Core::Hashable # The entity, in the form project-owner-projectId. # Corresponds to the JSON property `entity` # @return [String] attr_accessor :entity # The ID for the entity. # Corresponds to the JSON property `entityId` # @return [String] attr_accessor :entity_id def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @entity = args[:entity] if args.key?(:entity) @entity_id = args[:entity_id] if args.key?(:entity_id) end end # The bucket's retention policy. The retention policy enforces a minimum # retention time for all objects contained in the bucket, based on their # creation time. Any attempt to overwrite or delete objects younger than the # retention period will result in a PERMISSION_DENIED error. An unlocked # retention policy can be modified or removed from the bucket via a storage. # buckets.update operation. A locked retention policy cannot be removed or # shortened in duration for the lifetime of the bucket. Attempting to remove or # decrease period of a locked retention policy will result in a # PERMISSION_DENIED error. class RetentionPolicy include Google::Apis::Core::Hashable # Server-determined value that indicates the time from which policy was enforced # and effective. This value is in RFC 3339 format. # Corresponds to the JSON property `effectiveTime` # @return [DateTime] attr_accessor :effective_time # Once locked, an object retention policy cannot be modified. # Corresponds to the JSON property `isLocked` # @return [Boolean] attr_accessor :is_locked alias_method :is_locked?, :is_locked # The duration in seconds that objects need to be retained. Retention duration # must be greater than zero and less than 100 years. Note that enforcement of # retention periods less than a day is not guaranteed. Such periods should only # be used for testing purposes. # Corresponds to the JSON property `retentionPeriod` # @return [Fixnum] attr_accessor :retention_period def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @effective_time = args[:effective_time] if args.key?(:effective_time) @is_locked = args[:is_locked] if args.key?(:is_locked) @retention_period = args[:retention_period] if args.key?(:retention_period) end end # The bucket's versioning configuration. class Versioning include Google::Apis::Core::Hashable # While set to true, versioning is fully enabled for this bucket. # Corresponds to the JSON property `enabled` # @return [Boolean] attr_accessor :enabled alias_method :enabled?, :enabled def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @enabled = args[:enabled] if args.key?(:enabled) end end # The bucket's website configuration, controlling how the service behaves when # accessing bucket contents as a web site. See the Static Website Examples for # more information. class Website include Google::Apis::Core::Hashable # If the requested object path is missing, the service will ensure the path has # a trailing '/', append this suffix, and attempt to retrieve the resulting # object. This allows the creation of index.html objects to represent directory # pages. # Corresponds to the JSON property `mainPageSuffix` # @return [String] attr_accessor :main_page_suffix # If the requested object path is missing, and any mainPageSuffix object is # missing, if applicable, the service will return the named object from this # bucket as the content for a 404 Not Found result. # Corresponds to the JSON property `notFoundPage` # @return [String] attr_accessor :not_found_page def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @main_page_suffix = args[:main_page_suffix] if args.key?(:main_page_suffix) @not_found_page = args[:not_found_page] if args.key?(:not_found_page) end end end # An access-control entry. class BucketAccessControl include Google::Apis::Core::Hashable # The name of the bucket. # Corresponds to the JSON property `bucket` # @return [String] attr_accessor :bucket # The domain associated with the entity, if any. # Corresponds to the JSON property `domain` # @return [String] attr_accessor :domain # The email address associated with the entity, if any. # Corresponds to the JSON property `email` # @return [String] attr_accessor :email # The entity holding the permission, in one of the following forms: # - user-userId # - user-email # - group-groupId # - group-email # - domain-domain # - project-team-projectId # - allUsers # - allAuthenticatedUsers Examples: # - The user liz@example.com would be user-liz@example.com. # - The group example@googlegroups.com would be group-example@googlegroups.com. # - To refer to all members of the Google Apps for Business domain example.com, # the entity would be domain-example.com. # Corresponds to the JSON property `entity` # @return [String] attr_accessor :entity # The ID for the entity, if any. # Corresponds to the JSON property `entityId` # @return [String] attr_accessor :entity_id # HTTP 1.1 Entity tag for the access-control entry. # Corresponds to the JSON property `etag` # @return [String] attr_accessor :etag # The ID of the access-control entry. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id # The kind of item this is. For bucket access control entries, this is always # storage#bucketAccessControl. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The project team associated with the entity, if any. # Corresponds to the JSON property `projectTeam` # @return [Google::Apis::StorageV1::BucketAccessControl::ProjectTeam] attr_accessor :project_team # The access permission for the entity. # Corresponds to the JSON property `role` # @return [String] attr_accessor :role # The link to this access-control entry. # Corresponds to the JSON property `selfLink` # @return [String] attr_accessor :self_link def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @bucket = args[:bucket] if args.key?(:bucket) @domain = args[:domain] if args.key?(:domain) @email = args[:email] if args.key?(:email) @entity = args[:entity] if args.key?(:entity) @entity_id = args[:entity_id] if args.key?(:entity_id) @etag = args[:etag] if args.key?(:etag) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @project_team = args[:project_team] if args.key?(:project_team) @role = args[:role] if args.key?(:role) @self_link = args[:self_link] if args.key?(:self_link) end # The project team associated with the entity, if any. class ProjectTeam include Google::Apis::Core::Hashable # The project number. # Corresponds to the JSON property `projectNumber` # @return [String] attr_accessor :project_number # The team. # Corresponds to the JSON property `team` # @return [String] attr_accessor :team def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @project_number = args[:project_number] if args.key?(:project_number) @team = args[:team] if args.key?(:team) end end end # An access-control list. class BucketAccessControls include Google::Apis::Core::Hashable # The list of items. # Corresponds to the JSON property `items` # @return [Array] attr_accessor :items # The kind of item this is. For lists of bucket access control entries, this is # always storage#bucketAccessControls. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @items = args[:items] if args.key?(:items) @kind = args[:kind] if args.key?(:kind) end end # A list of buckets. class Buckets include Google::Apis::Core::Hashable # The list of items. # Corresponds to the JSON property `items` # @return [Array] attr_accessor :items # The kind of item this is. For lists of buckets, this is always storage#buckets. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The continuation token, used to page through large result sets. Provide this # value in a subsequent request to return the next page of results. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @items = args[:items] if args.key?(:items) @kind = args[:kind] if args.key?(:kind) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end # An notification channel used to watch for resource changes. class Channel include Google::Apis::Core::Hashable # The address where notifications are delivered for this channel. # Corresponds to the JSON property `address` # @return [String] attr_accessor :address # Date and time of notification channel expiration, expressed as a Unix # timestamp, in milliseconds. Optional. # Corresponds to the JSON property `expiration` # @return [Fixnum] attr_accessor :expiration # A UUID or similar unique string that identifies this channel. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id # Identifies this as a notification channel used to watch for changes to a # resource, which is "api#channel". # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # Additional parameters controlling delivery channel behavior. Optional. # Corresponds to the JSON property `params` # @return [Hash] attr_accessor :params # A Boolean value to indicate whether payload is wanted. Optional. # Corresponds to the JSON property `payload` # @return [Boolean] attr_accessor :payload alias_method :payload?, :payload # An opaque ID that identifies the resource being watched on this channel. # Stable across different API versions. # Corresponds to the JSON property `resourceId` # @return [String] attr_accessor :resource_id # A version-specific identifier for the watched resource. # Corresponds to the JSON property `resourceUri` # @return [String] attr_accessor :resource_uri # An arbitrary string delivered to the target address with each notification # delivered over this channel. Optional. # Corresponds to the JSON property `token` # @return [String] attr_accessor :token # The type of delivery mechanism used for this channel. # Corresponds to the JSON property `type` # @return [String] attr_accessor :type def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @address = args[:address] if args.key?(:address) @expiration = args[:expiration] if args.key?(:expiration) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @params = args[:params] if args.key?(:params) @payload = args[:payload] if args.key?(:payload) @resource_id = args[:resource_id] if args.key?(:resource_id) @resource_uri = args[:resource_uri] if args.key?(:resource_uri) @token = args[:token] if args.key?(:token) @type = args[:type] if args.key?(:type) end end # A Compose request. class ComposeRequest include Google::Apis::Core::Hashable # An object. # Corresponds to the JSON property `destination` # @return [Google::Apis::StorageV1::Object] attr_accessor :destination # The kind of item this is. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The list of source objects that will be concatenated into a single object. # Corresponds to the JSON property `sourceObjects` # @return [Array] attr_accessor :source_objects def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @destination = args[:destination] if args.key?(:destination) @kind = args[:kind] if args.key?(:kind) @source_objects = args[:source_objects] if args.key?(:source_objects) end # class SourceObject include Google::Apis::Core::Hashable # The generation of this object to use as the source. # Corresponds to the JSON property `generation` # @return [Fixnum] attr_accessor :generation # The source object's name. All source objects must reside in the same bucket. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name # Conditions that must be met for this operation to execute. # Corresponds to the JSON property `objectPreconditions` # @return [Google::Apis::StorageV1::ComposeRequest::SourceObject::ObjectPreconditions] attr_accessor :object_preconditions def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @generation = args[:generation] if args.key?(:generation) @name = args[:name] if args.key?(:name) @object_preconditions = args[:object_preconditions] if args.key?(:object_preconditions) end # Conditions that must be met for this operation to execute. class ObjectPreconditions include Google::Apis::Core::Hashable # Only perform the composition if the generation of the source object that would # be used matches this value. If this value and a generation are both specified, # they must be the same value or the call will fail. # Corresponds to the JSON property `ifGenerationMatch` # @return [Fixnum] attr_accessor :if_generation_match def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @if_generation_match = args[:if_generation_match] if args.key?(:if_generation_match) end end end end # Represents an expression text. Example: title: "User account presence" # description: "Determines whether the request has a user account" expression: " # size(request.user) > 0" class Expr include Google::Apis::Core::Hashable # An optional description of the expression. This is a longer text which # describes the expression, e.g. when hovered over it in a UI. # Corresponds to the JSON property `description` # @return [String] attr_accessor :description # Textual representation of an expression in Common Expression Language syntax. # The application context of the containing message determines which well-known # feature set of CEL is supported. # Corresponds to the JSON property `expression` # @return [String] attr_accessor :expression # An optional string indicating the location of the expression for error # reporting, e.g. a file name and a position in the file. # Corresponds to the JSON property `location` # @return [String] attr_accessor :location # An optional title for the expression, i.e. a short string describing its # purpose. This can be used e.g. in UIs which allow to enter the expression. # Corresponds to the JSON property `title` # @return [String] attr_accessor :title def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @description = args[:description] if args.key?(:description) @expression = args[:expression] if args.key?(:expression) @location = args[:location] if args.key?(:location) @title = args[:title] if args.key?(:title) end end # JSON template to produce a JSON-style HMAC Key resource for Create responses. class HmacKey include Google::Apis::Core::Hashable # The kind of item this is. For HMAC keys, this is always storage#hmacKey. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # JSON template to produce a JSON-style HMAC Key metadata resource. # Corresponds to the JSON property `metadata` # @return [Google::Apis::StorageV1::HmacKeyMetadata] attr_accessor :metadata # HMAC secret key material. # Corresponds to the JSON property `secret` # @return [String] attr_accessor :secret def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @kind = args[:kind] if args.key?(:kind) @metadata = args[:metadata] if args.key?(:metadata) @secret = args[:secret] if args.key?(:secret) end end # JSON template to produce a JSON-style HMAC Key metadata resource. class HmacKeyMetadata include Google::Apis::Core::Hashable # The ID of the HMAC Key. # Corresponds to the JSON property `accessId` # @return [String] attr_accessor :access_id # HTTP 1.1 Entity tag for the HMAC key. # Corresponds to the JSON property `etag` # @return [String] attr_accessor :etag # The ID of the HMAC key, including the Project ID and the Access ID. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id # The kind of item this is. For HMAC Key metadata, this is always storage# # hmacKeyMetadata. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # Project ID owning the service account to which the key authenticates. # Corresponds to the JSON property `projectId` # @return [String] attr_accessor :project_id # The link to this resource. # Corresponds to the JSON property `selfLink` # @return [String] attr_accessor :self_link # The email address of the key's associated service account. # Corresponds to the JSON property `serviceAccountEmail` # @return [String] attr_accessor :service_account_email # The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED. # Corresponds to the JSON property `state` # @return [String] attr_accessor :state # The creation time of the HMAC key in RFC 3339 format. # Corresponds to the JSON property `timeCreated` # @return [DateTime] attr_accessor :time_created # The last modification time of the HMAC key metadata in RFC 3339 format. # Corresponds to the JSON property `updated` # @return [DateTime] attr_accessor :updated def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @access_id = args[:access_id] if args.key?(:access_id) @etag = args[:etag] if args.key?(:etag) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @project_id = args[:project_id] if args.key?(:project_id) @self_link = args[:self_link] if args.key?(:self_link) @service_account_email = args[:service_account_email] if args.key?(:service_account_email) @state = args[:state] if args.key?(:state) @time_created = args[:time_created] if args.key?(:time_created) @updated = args[:updated] if args.key?(:updated) end end # A list of hmacKeys. class HmacKeysMetadata include Google::Apis::Core::Hashable # The list of items. # Corresponds to the JSON property `items` # @return [Array] attr_accessor :items # The kind of item this is. For lists of hmacKeys, this is always storage# # hmacKeysMetadata. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The continuation token, used to page through large result sets. Provide this # value in a subsequent request to return the next page of results. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @items = args[:items] if args.key?(:items) @kind = args[:kind] if args.key?(:kind) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end # A subscription to receive Google PubSub notifications. class Notification include Google::Apis::Core::Hashable # An optional list of additional attributes to attach to each Cloud PubSub # message published for this notification subscription. # Corresponds to the JSON property `custom_attributes` # @return [Hash] attr_accessor :custom_attributes # HTTP 1.1 Entity tag for this subscription notification. # Corresponds to the JSON property `etag` # @return [String] attr_accessor :etag # If present, only send notifications about listed event types. If empty, sent # notifications for all event types. # Corresponds to the JSON property `event_types` # @return [Array] attr_accessor :event_types # The ID of the notification. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id # The kind of item this is. For notifications, this is always storage# # notification. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # If present, only apply this notification configuration to object names that # begin with this prefix. # Corresponds to the JSON property `object_name_prefix` # @return [String] attr_accessor :object_name_prefix # The desired content of the Payload. # Corresponds to the JSON property `payload_format` # @return [String] attr_accessor :payload_format # The canonical URL of this notification. # Corresponds to the JSON property `selfLink` # @return [String] attr_accessor :self_link # The Cloud PubSub topic to which this subscription publishes. Formatted as: '// # pubsub.googleapis.com/projects/`project-identifier`/topics/`my-topic`' # Corresponds to the JSON property `topic` # @return [String] attr_accessor :topic def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @custom_attributes = args[:custom_attributes] if args.key?(:custom_attributes) @etag = args[:etag] if args.key?(:etag) @event_types = args[:event_types] if args.key?(:event_types) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @object_name_prefix = args[:object_name_prefix] if args.key?(:object_name_prefix) @payload_format = args[:payload_format] if args.key?(:payload_format) @self_link = args[:self_link] if args.key?(:self_link) @topic = args[:topic] if args.key?(:topic) end end # A list of notification subscriptions. class Notifications include Google::Apis::Core::Hashable # The list of items. # Corresponds to the JSON property `items` # @return [Array] attr_accessor :items # The kind of item this is. For lists of notifications, this is always storage# # notifications. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @items = args[:items] if args.key?(:items) @kind = args[:kind] if args.key?(:kind) end end # An object. class Object include Google::Apis::Core::Hashable # Access controls on the object. # Corresponds to the JSON property `acl` # @return [Array] attr_accessor :acl # The name of the bucket containing this object. # Corresponds to the JSON property `bucket` # @return [String] attr_accessor :bucket # Cache-Control directive for the object data. If omitted, and the object is # accessible to all anonymous users, the default will be public, max-age=3600. # Corresponds to the JSON property `cacheControl` # @return [String] attr_accessor :cache_control # Number of underlying components that make up this object. Components are # accumulated by compose operations. # Corresponds to the JSON property `componentCount` # @return [Fixnum] attr_accessor :component_count # Content-Disposition of the object data. # Corresponds to the JSON property `contentDisposition` # @return [String] attr_accessor :content_disposition # Content-Encoding of the object data. # Corresponds to the JSON property `contentEncoding` # @return [String] attr_accessor :content_encoding # Content-Language of the object data. # Corresponds to the JSON property `contentLanguage` # @return [String] attr_accessor :content_language # Content-Type of the object data. If an object is stored without a Content-Type, # it is served as application/octet-stream. # Corresponds to the JSON property `contentType` # @return [String] attr_accessor :content_type # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in # big-endian byte order. For more information about using the CRC32c checksum, # see Hashes and ETags: Best Practices. # Corresponds to the JSON property `crc32c` # @return [String] attr_accessor :crc32c # A timestamp in RFC 3339 format specified by the user for an object. # Corresponds to the JSON property `customTime` # @return [DateTime] attr_accessor :custom_time # Metadata of customer-supplied encryption key, if the object is encrypted by # such a key. # Corresponds to the JSON property `customerEncryption` # @return [Google::Apis::StorageV1::Object::CustomerEncryption] attr_accessor :customer_encryption # HTTP 1.1 Entity tag for the object. # Corresponds to the JSON property `etag` # @return [String] attr_accessor :etag # Whether an object is under event-based hold. Event-based hold is a way to # retain objects until an event occurs, which is signified by the hold's release # (i.e. this value is set to false). After being released (set to false), such # objects will be subject to bucket-level retention (if any). One sample use # case of this flag is for banks to hold loan documents for at least 3 years # after loan is paid in full. Here, bucket-level retention is 3 years and the # event is the loan being paid in full. In this example, these objects will be # held intact for any number of years until the event has occurred (event-based # hold on the object is released) and then 3 more years after that. That means # retention duration of the objects begins from the moment event-based hold # transitioned from true to false. # Corresponds to the JSON property `eventBasedHold` # @return [Boolean] attr_accessor :event_based_hold alias_method :event_based_hold?, :event_based_hold # The content generation of this object. Used for object versioning. # Corresponds to the JSON property `generation` # @return [Fixnum] attr_accessor :generation # The ID of the object, including the bucket name, object name, and generation # number. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id # The kind of item this is. For objects, this is always storage#object. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # Not currently supported. Specifying the parameter causes the request to fail # with status code 400 - Bad Request. # Corresponds to the JSON property `kmsKeyName` # @return [String] attr_accessor :kms_key_name # MD5 hash of the data; encoded using base64. For more information about using # the MD5 hash, see Hashes and ETags: Best Practices. # Corresponds to the JSON property `md5Hash` # @return [String] attr_accessor :md5_hash # Media download link. # Corresponds to the JSON property `mediaLink` # @return [String] attr_accessor :media_link # User-provided metadata, in key/value pairs. # Corresponds to the JSON property `metadata` # @return [Hash] attr_accessor :metadata # The version of the metadata for this object at this generation. Used for # preconditions and for detecting changes in metadata. A metageneration number # is only meaningful in the context of a particular generation of a particular # object. # Corresponds to the JSON property `metageneration` # @return [Fixnum] attr_accessor :metageneration # The name of the object. Required if not specified by URL parameter. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name # The owner of the object. This will always be the uploader of the object. # Corresponds to the JSON property `owner` # @return [Google::Apis::StorageV1::Object::Owner] attr_accessor :owner # A server-determined value that specifies the earliest time that the object's # retention period expires. This value is in RFC 3339 format. Note 1: This field # is not provided for objects with an active event-based hold, since retention # expiration is unknown until the hold is removed. Note 2: This value can be # provided even when temporary hold is set (so that the user can reason about # policy without having to first unset the temporary hold). # Corresponds to the JSON property `retentionExpirationTime` # @return [DateTime] attr_accessor :retention_expiration_time # The link to this object. # Corresponds to the JSON property `selfLink` # @return [String] attr_accessor :self_link # Content-Length of the data in bytes. # Corresponds to the JSON property `size` # @return [Fixnum] attr_accessor :size # Storage class of the object. # Corresponds to the JSON property `storageClass` # @return [String] attr_accessor :storage_class # Whether an object is under temporary hold. While this flag is set to true, the # object is protected against deletion and overwrites. A common use case of this # flag is regulatory investigations where objects need to be retained while the # investigation is ongoing. Note that unlike event-based hold, temporary hold # does not impact retention expiration time of an object. # Corresponds to the JSON property `temporaryHold` # @return [Boolean] attr_accessor :temporary_hold alias_method :temporary_hold?, :temporary_hold # The creation time of the object in RFC 3339 format. # Corresponds to the JSON property `timeCreated` # @return [DateTime] attr_accessor :time_created # The deletion time of the object in RFC 3339 format. Will be returned if and # only if this version of the object has been deleted. # Corresponds to the JSON property `timeDeleted` # @return [DateTime] attr_accessor :time_deleted # The time at which the object's storage class was last changed. When the object # is initially created, it will be set to timeCreated. # Corresponds to the JSON property `timeStorageClassUpdated` # @return [DateTime] attr_accessor :time_storage_class_updated # The modification time of the object metadata in RFC 3339 format. Set initially # to object creation time and then updated whenever any metadata of the object # changes. This includes changes made by a requester, such as modifying custom # metadata, as well as changes made by Cloud Storage on behalf of a requester, # such as changing the storage class based on an Object Lifecycle Configuration. # Corresponds to the JSON property `updated` # @return [DateTime] attr_accessor :updated def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @acl = args[:acl] if args.key?(:acl) @bucket = args[:bucket] if args.key?(:bucket) @cache_control = args[:cache_control] if args.key?(:cache_control) @component_count = args[:component_count] if args.key?(:component_count) @content_disposition = args[:content_disposition] if args.key?(:content_disposition) @content_encoding = args[:content_encoding] if args.key?(:content_encoding) @content_language = args[:content_language] if args.key?(:content_language) @content_type = args[:content_type] if args.key?(:content_type) @crc32c = args[:crc32c] if args.key?(:crc32c) @custom_time = args[:custom_time] if args.key?(:custom_time) @customer_encryption = args[:customer_encryption] if args.key?(:customer_encryption) @etag = args[:etag] if args.key?(:etag) @event_based_hold = args[:event_based_hold] if args.key?(:event_based_hold) @generation = args[:generation] if args.key?(:generation) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name) @md5_hash = args[:md5_hash] if args.key?(:md5_hash) @media_link = args[:media_link] if args.key?(:media_link) @metadata = args[:metadata] if args.key?(:metadata) @metageneration = args[:metageneration] if args.key?(:metageneration) @name = args[:name] if args.key?(:name) @owner = args[:owner] if args.key?(:owner) @retention_expiration_time = args[:retention_expiration_time] if args.key?(:retention_expiration_time) @self_link = args[:self_link] if args.key?(:self_link) @size = args[:size] if args.key?(:size) @storage_class = args[:storage_class] if args.key?(:storage_class) @temporary_hold = args[:temporary_hold] if args.key?(:temporary_hold) @time_created = args[:time_created] if args.key?(:time_created) @time_deleted = args[:time_deleted] if args.key?(:time_deleted) @time_storage_class_updated = args[:time_storage_class_updated] if args.key?(:time_storage_class_updated) @updated = args[:updated] if args.key?(:updated) end # Metadata of customer-supplied encryption key, if the object is encrypted by # such a key. class CustomerEncryption include Google::Apis::Core::Hashable # The encryption algorithm. # Corresponds to the JSON property `encryptionAlgorithm` # @return [String] attr_accessor :encryption_algorithm # SHA256 hash value of the encryption key. # Corresponds to the JSON property `keySha256` # @return [String] attr_accessor :key_sha256 def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @encryption_algorithm = args[:encryption_algorithm] if args.key?(:encryption_algorithm) @key_sha256 = args[:key_sha256] if args.key?(:key_sha256) end end # The owner of the object. This will always be the uploader of the object. class Owner include Google::Apis::Core::Hashable # The entity, in the form user-userId. # Corresponds to the JSON property `entity` # @return [String] attr_accessor :entity # The ID for the entity. # Corresponds to the JSON property `entityId` # @return [String] attr_accessor :entity_id def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @entity = args[:entity] if args.key?(:entity) @entity_id = args[:entity_id] if args.key?(:entity_id) end end end # An access-control entry. class ObjectAccessControl include Google::Apis::Core::Hashable # The name of the bucket. # Corresponds to the JSON property `bucket` # @return [String] attr_accessor :bucket # The domain associated with the entity, if any. # Corresponds to the JSON property `domain` # @return [String] attr_accessor :domain # The email address associated with the entity, if any. # Corresponds to the JSON property `email` # @return [String] attr_accessor :email # The entity holding the permission, in one of the following forms: # - user-userId # - user-email # - group-groupId # - group-email # - domain-domain # - project-team-projectId # - allUsers # - allAuthenticatedUsers Examples: # - The user liz@example.com would be user-liz@example.com. # - The group example@googlegroups.com would be group-example@googlegroups.com. # - To refer to all members of the Google Apps for Business domain example.com, # the entity would be domain-example.com. # Corresponds to the JSON property `entity` # @return [String] attr_accessor :entity # The ID for the entity, if any. # Corresponds to the JSON property `entityId` # @return [String] attr_accessor :entity_id # HTTP 1.1 Entity tag for the access-control entry. # Corresponds to the JSON property `etag` # @return [String] attr_accessor :etag # The content generation of the object, if applied to an object. # Corresponds to the JSON property `generation` # @return [Fixnum] attr_accessor :generation # The ID of the access-control entry. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id # The kind of item this is. For object access control entries, this is always # storage#objectAccessControl. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The name of the object, if applied to an object. # Corresponds to the JSON property `object` # @return [String] attr_accessor :object # The project team associated with the entity, if any. # Corresponds to the JSON property `projectTeam` # @return [Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam] attr_accessor :project_team # The access permission for the entity. # Corresponds to the JSON property `role` # @return [String] attr_accessor :role # The link to this access-control entry. # Corresponds to the JSON property `selfLink` # @return [String] attr_accessor :self_link def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @bucket = args[:bucket] if args.key?(:bucket) @domain = args[:domain] if args.key?(:domain) @email = args[:email] if args.key?(:email) @entity = args[:entity] if args.key?(:entity) @entity_id = args[:entity_id] if args.key?(:entity_id) @etag = args[:etag] if args.key?(:etag) @generation = args[:generation] if args.key?(:generation) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @object = args[:object] if args.key?(:object) @project_team = args[:project_team] if args.key?(:project_team) @role = args[:role] if args.key?(:role) @self_link = args[:self_link] if args.key?(:self_link) end # The project team associated with the entity, if any. class ProjectTeam include Google::Apis::Core::Hashable # The project number. # Corresponds to the JSON property `projectNumber` # @return [String] attr_accessor :project_number # The team. # Corresponds to the JSON property `team` # @return [String] attr_accessor :team def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @project_number = args[:project_number] if args.key?(:project_number) @team = args[:team] if args.key?(:team) end end end # An access-control list. class ObjectAccessControls include Google::Apis::Core::Hashable # The list of items. # Corresponds to the JSON property `items` # @return [Array] attr_accessor :items # The kind of item this is. For lists of object access control entries, this is # always storage#objectAccessControls. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @items = args[:items] if args.key?(:items) @kind = args[:kind] if args.key?(:kind) end end # A list of objects. class Objects include Google::Apis::Core::Hashable # The list of items. # Corresponds to the JSON property `items` # @return [Array] attr_accessor :items # The kind of item this is. For lists of objects, this is always storage#objects. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The continuation token, used to page through large result sets. Provide this # value in a subsequent request to return the next page of results. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token # The list of prefixes of objects matching-but-not-listed up to and including # the requested delimiter. # Corresponds to the JSON property `prefixes` # @return [Array] attr_accessor :prefixes def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @items = args[:items] if args.key?(:items) @kind = args[:kind] if args.key?(:kind) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @prefixes = args[:prefixes] if args.key?(:prefixes) end end # A bucket/object IAM policy. class Policy include Google::Apis::Core::Hashable # An association between a role, which comes with a set of permissions, and # members who may assume that role. # Corresponds to the JSON property `bindings` # @return [Array] attr_accessor :bindings # HTTP 1.1 Entity tag for the policy. # Corresponds to the JSON property `etag` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] attr_accessor :etag # The kind of item this is. For policies, this is always storage#policy. This # field is ignored on input. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The ID of the resource to which this policy belongs. Will be of the form # projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/ # object for objects. A specific generation may be specified by appending # # generationNumber to the end of the object name, e.g. projects/_/buckets/my- # bucket/objects/data.txt#17. The current generation can be denoted with #0. # This field is ignored on input. # Corresponds to the JSON property `resourceId` # @return [String] attr_accessor :resource_id # The IAM policy format version. # Corresponds to the JSON property `version` # @return [Fixnum] attr_accessor :version def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @bindings = args[:bindings] if args.key?(:bindings) @etag = args[:etag] if args.key?(:etag) @kind = args[:kind] if args.key?(:kind) @resource_id = args[:resource_id] if args.key?(:resource_id) @version = args[:version] if args.key?(:version) end # class Binding include Google::Apis::Core::Hashable # Represents an expression text. Example: title: "User account presence" # description: "Determines whether the request has a user account" expression: " # size(request.user) > 0" # Corresponds to the JSON property `condition` # @return [Google::Apis::StorageV1::Expr] attr_accessor :condition # A collection of identifiers for members who may assume the provided role. # Recognized identifiers are as follows: # - allUsers — A special identifier that represents anyone on the internet; with # or without a Google account. # - allAuthenticatedUsers — A special identifier that represents anyone who is # authenticated with a Google account or a service account. # - user:emailid — An email address that represents a specific account. For # example, user:alice@gmail.com or user:joe@example.com. # - serviceAccount:emailid — An email address that represents a service account. # For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . # - group:emailid — An email address that represents a Google group. For example, # group:admins@example.com. # - domain:domain — A Google Apps domain name that represents all the users of # that domain. For example, domain:google.com or domain:example.com. # - projectOwner:projectid — Owners of the given project. For example, # projectOwner:my-example-project # - projectEditor:projectid — Editors of the given project. For example, # projectEditor:my-example-project # - projectViewer:projectid — Viewers of the given project. For example, # projectViewer:my-example-project # Corresponds to the JSON property `members` # @return [Array] attr_accessor :members # The role to which members belong. Two types of roles are supported: new IAM # roles, which grant permissions that do not map directly to those provided by # ACLs, and legacy IAM roles, which do map directly to ACL permissions. All # roles are of the format roles/storage.specificRole. # The new IAM roles are: # - roles/storage.admin — Full control of Google Cloud Storage resources. # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage # objects. # - roles/storage.objectCreator — Access to create objects in Google Cloud # Storage. # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. # The legacy IAM roles are: # - roles/storage.legacyObjectReader — Read-only access to objects without # listing. Equivalent to an ACL entry on an object with the READER role. # - roles/storage.legacyObjectOwner — Read/write access to existing objects # without listing. Equivalent to an ACL entry on an object with the OWNER role. # - roles/storage.legacyBucketReader — Read access to buckets with object # listing. Equivalent to an ACL entry on a bucket with the READER role. # - roles/storage.legacyBucketWriter — Read access to buckets with object # listing/creation/deletion. Equivalent to an ACL entry on a bucket with the # WRITER role. # - roles/storage.legacyBucketOwner — Read and write access to existing buckets # with object listing/creation/deletion. Equivalent to an ACL entry on a bucket # with the OWNER role. # Corresponds to the JSON property `role` # @return [String] attr_accessor :role def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @condition = args[:condition] if args.key?(:condition) @members = args[:members] if args.key?(:members) @role = args[:role] if args.key?(:role) end end end # A rewrite response. class RewriteResponse include Google::Apis::Core::Hashable # true if the copy is finished; otherwise, false if the copy is in progress. # This property is always present in the response. # Corresponds to the JSON property `done` # @return [Boolean] attr_accessor :done alias_method :done?, :done # The kind of item this is. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The total size of the object being copied in bytes. This property is always # present in the response. # Corresponds to the JSON property `objectSize` # @return [Fixnum] attr_accessor :object_size # An object. # Corresponds to the JSON property `resource` # @return [Google::Apis::StorageV1::Object] attr_accessor :resource # A token to use in subsequent requests to continue copying data. This token is # present in the response only when there is more data to copy. # Corresponds to the JSON property `rewriteToken` # @return [String] attr_accessor :rewrite_token # The total bytes written so far, which can be used to provide a waiting user # with a progress indicator. This property is always present in the response. # Corresponds to the JSON property `totalBytesRewritten` # @return [Fixnum] attr_accessor :total_bytes_rewritten def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @done = args[:done] if args.key?(:done) @kind = args[:kind] if args.key?(:kind) @object_size = args[:object_size] if args.key?(:object_size) @resource = args[:resource] if args.key?(:resource) @rewrite_token = args[:rewrite_token] if args.key?(:rewrite_token) @total_bytes_rewritten = args[:total_bytes_rewritten] if args.key?(:total_bytes_rewritten) end end # A subscription to receive Google PubSub notifications. class ServiceAccount include Google::Apis::Core::Hashable # The ID of the notification. # Corresponds to the JSON property `email_address` # @return [String] attr_accessor :email_address # The kind of item this is. For notifications, this is always storage# # notification. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @email_address = args[:email_address] if args.key?(:email_address) @kind = args[:kind] if args.key?(:kind) end end # A storage.(buckets|objects).testIamPermissions response. class TestIamPermissionsResponse include Google::Apis::Core::Hashable # The kind of item this is. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The permissions held by the caller. Permissions are always of the format # storage.resource.capability, where resource is one of buckets or objects. The # supported permissions are as follows: # - storage.buckets.delete — Delete bucket. # - storage.buckets.get — Read bucket metadata. # - storage.buckets.getIamPolicy — Read bucket IAM policy. # - storage.buckets.create — Create bucket. # - storage.buckets.list — List buckets. # - storage.buckets.setIamPolicy — Update bucket IAM policy. # - storage.buckets.update — Update bucket metadata. # - storage.objects.delete — Delete object. # - storage.objects.get — Read object data and metadata. # - storage.objects.getIamPolicy — Read object IAM policy. # - storage.objects.create — Create object. # - storage.objects.list — List objects. # - storage.objects.setIamPolicy — Update object IAM policy. # - storage.objects.update — Update object metadata. # Corresponds to the JSON property `permissions` # @return [Array] attr_accessor :permissions def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) @kind = args[:kind] if args.key?(:kind) @permissions = args[:permissions] if args.key?(:permissions) end end end end end google-apis-storage-v1-0.21.0/google-apis-storage_v1.gemspec0000644000175100017510000000507314377353716022664 0ustar pravipravi######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- # stub: google-apis-storage_v1 0.21.0 ruby lib Gem::Specification.new do |s| s.name = "google-apis-storage_v1".freeze s.version = "0.21.0" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.metadata = { "bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues", "changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-storage_v1/CHANGELOG.md", "documentation_uri" => "https://googleapis.dev/ruby/google-apis-storage_v1/v0.21.0", "source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-storage_v1" } if s.respond_to? :metadata= s.require_paths = ["lib".freeze] s.authors = ["Google LLC".freeze] s.date = "2023-02-14" s.description = "This is the simple REST client for Cloud Storage JSON API V1. Simple REST clients are Ruby client libraries that provide access to Google services via their HTTP REST API endpoints. These libraries are generated and updated automatically based on the discovery documents published by the service, and they handle most concerns such as authentication, pagination, retry, timeouts, and logging. You can use this client to access the Cloud Storage JSON API, but note that some services may provide a separate modern client that is easier to use.".freeze s.email = "googleapis-packages@google.com".freeze s.files = [".yardopts".freeze, "CHANGELOG.md".freeze, "LICENSE.md".freeze, "OVERVIEW.md".freeze, "lib/google-apis-storage_v1.rb".freeze, "lib/google/apis/storage_v1.rb".freeze, "lib/google/apis/storage_v1/classes.rb".freeze, "lib/google/apis/storage_v1/gem_version.rb".freeze, "lib/google/apis/storage_v1/representations.rb".freeze, "lib/google/apis/storage_v1/service.rb".freeze] s.homepage = "https://github.com/google/google-api-ruby-client".freeze s.licenses = ["Apache-2.0".freeze] s.required_ruby_version = Gem::Requirement.new(">= 2.5".freeze) s.rubygems_version = "3.3.15".freeze s.summary = "Simple REST client for Cloud Storage JSON API V1".freeze if s.respond_to? :specification_version then s.specification_version = 4 end if s.respond_to? :add_runtime_dependency then s.add_runtime_dependency(%q.freeze, [">= 0.11.0", "< 2.a"]) else s.add_dependency(%q.freeze, [">= 0.11.0", "< 2.a"]) end end google-apis-storage-v1-0.21.0/OVERVIEW.md0000644000175100017510000001372014377353716016627 0ustar pravipravi# Simple REST client for version V1 of the Cloud Storage JSON API This is a simple client library for version V1 of the Cloud Storage JSON API. It provides: * A client object that connects to the HTTP/JSON REST endpoint for the service. * Ruby objects for data structures related to the service. * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts. * Control of retry, pagination, and timeouts. Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information. ## Getting started ### Before you begin There are a few setup steps you need to complete before you can use this library: 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts). 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/). 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/storage.googleapis.com) in the console. ### Installation Add this line to your application's Gemfile: ```ruby gem 'google-apis-storage_v1', '~> 0.1' ``` And then execute: ``` $ bundle ``` Or install it yourself as: ``` $ gem install google-apis-storage_v1 ``` ### Creating a client object Once the gem is installed, you can load the client code and instantiate a client. ```ruby # Load the client require "google/apis/storage_v1" # Create a client object client = Google::Apis::StorageV1::StorageService.new # Authenticate calls client.authorization = # ... use the googleauth gem to create credentials ``` See the class reference docs for information on the methods you can call from a client. ## Documentation More detailed descriptions of the Google simple REST clients are available in two documents. * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging. * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables. (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Storage service in particular.) For reference information on specific calls in the Cloud Storage JSON API, see the {Google::Apis::StorageV1::StorageService class reference docs}. ## Which client should I use? Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**. This library, `google-apis-storage_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-_`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward. Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients. Gem names for modern clients are often of the form `google-cloud-`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud--`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended. **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure. The [product documentation](https://developers.google.com/storage/docs/json_api/) may provide guidance regarding the preferred client library to use. ## Supported Ruby versions This library is supported on Ruby 2.5+. Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule. ## License This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}. ## Support Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).