File manager - Edit - /home/u478019808/domains/bestandroidphones.store/public_html/static/img/logo/storage_sample.zip
Back
PK ���Z�d�s� s� storage_v1.jsonnu �[��� { "kind": "discovery#restDescription", "discoveryVersion": "v1", "id": "storage:v1", "name": "storage", "version": "v1", "revision": "20160525", "title": "Cloud Storage JSON API", "description": "Stores and retrieves potentially large, immutable data objects.", "ownerDomain": "google.com", "ownerName": "Google", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" }, "documentationLink": "https://developers.google.com/storage/docs/json_api/", "labels": [ "graduated" ], "protocol": "rest", "baseUrl": "https://www.googleapis.com/storage/v1/", "basePath": "/storage/v1/", "rootUrl": "https://www.googleapis.com/", "mtlsRootUrl": "https://www.mtls.googleapis.com/", "servicePath": "storage/v1/", "batchPath": "batch/storage/v1", "parameters": { "alt": { "type": "string", "description": "Data format for the response.", "default": "json", "enum": [ "json" ], "enumDescriptions": [ "Responses with Content-Type of application/json" ], "location": "query" }, "fields": { "type": "string", "description": "Selector specifying which fields to include in a partial response.", "location": "query" }, "key": { "type": "string", "description": "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.", "location": "query" }, "oauth_token": { "type": "string", "description": "OAuth 2.0 token for the current user.", "location": "query" }, "prettyPrint": { "type": "boolean", "description": "Returns response with indentations and line breaks.", "default": "true", "location": "query" }, "quotaUser": { "type": "string", "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.", "location": "query" }, "userIp": { "type": "string", "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.", "location": "query" } }, "auth": { "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { "description": "View and manage your data across Google Cloud Platform services" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" }, "https://www.googleapis.com/auth/devstorage.full_control": { "description": "Manage your data and permissions in Google Cloud Storage" }, "https://www.googleapis.com/auth/devstorage.read_only": { "description": "View your data in Google Cloud Storage" }, "https://www.googleapis.com/auth/devstorage.read_write": { "description": "Manage your data in Google Cloud Storage" } } } }, "schemas": { "Bucket": { "id": "Bucket", "type": "object", "description": "A bucket.", "properties": { "acl": { "type": "array", "description": "Access controls on the bucket.", "items": { "$ref": "BucketAccessControl" }, "annotations": { "required": [ "storage.buckets.update" ] } }, "cors": { "type": "array", "description": "The bucket's Cross-Origin Resource Sharing (CORS) configuration.", "items": { "type": "object", "properties": { "maxAgeSeconds": { "type": "integer", "description": "The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.", "format": "int32" }, "method": { "type": "array", "description": "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\".", "items": { "type": "string" } }, "origin": { "type": "array", "description": "The list of Origins eligible to receive CORS response headers. Note: \"*\" is permitted in the list of origins, and means \"any Origin\".", "items": { "type": "string" } }, "responseHeader": { "type": "array", "description": "The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.", "items": { "type": "string" } } } } }, "defaultObjectAcl": { "type": "array", "description": "Default access controls to apply to new objects when no ACL is provided.", "items": { "$ref": "ObjectAccessControl" } }, "etag": { "type": "string", "description": "HTTP 1.1 Entity tag for the bucket." }, "id": { "type": "string", "description": "The ID of the bucket." }, "kind": { "type": "string", "description": "The kind of item this is. For buckets, this is always storage#bucket.", "default": "storage#bucket" }, "lifecycle": { "type": "object", "description": "The bucket's lifecycle configuration. See lifecycle management for more information.", "properties": { "rule": { "type": "array", "description": "A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken.", "items": { "type": "object", "properties": { "action": { "type": "object", "description": "The action to take.", "properties": { "type": { "type": "string", "description": "Type of the action. Currently, only Delete is supported." } } }, "condition": { "type": "object", "description": "The condition(s) under which the action will be taken.", "properties": { "age": { "type": "integer", "description": "Age of an object (in days). This condition is satisfied when an object reaches the specified age.", "format": "int32" }, "createdBefore": { "type": "string", "description": "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.", "format": "date" }, "isLive": { "type": "boolean", "description": "Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects." }, "numNewerVersions": { "type": "integer", "description": "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.", "format": "int32" } } } } } } } }, "location": { "type": "string", "description": "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." }, "logging": { "type": "object", "description": "The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.", "properties": { "logBucket": { "type": "string", "description": "The destination bucket where the current bucket's logs should be placed." }, "logObjectPrefix": { "type": "string", "description": "A prefix for log object names." } } }, "metageneration": { "type": "string", "description": "The metadata generation of this bucket.", "format": "int64" }, "name": { "type": "string", "description": "The name of the bucket.", "annotations": { "required": [ "storage.buckets.insert" ] } }, "owner": { "type": "object", "description": "The owner of the bucket. This is always the project team's owner group.", "properties": { "entity": { "type": "string", "description": "The entity, in the form project-owner-projectId." }, "entityId": { "type": "string", "description": "The ID for the entity." } } }, "projectNumber": { "type": "string", "description": "The project number of the project the bucket belongs to.", "format": "uint64" }, "selfLink": { "type": "string", "description": "The URI of this bucket." }, "storageClass": { "type": "string", "description": "The bucket's storage class. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include STANDARD, NEARLINE and DURABLE_REDUCED_AVAILABILITY. Defaults to STANDARD. For more information, see storage classes." }, "timeCreated": { "type": "string", "description": "The creation time of the bucket in RFC 3339 format.", "format": "date-time" }, "updated": { "type": "string", "description": "The modification time of the bucket in RFC 3339 format.", "format": "date-time" }, "versioning": { "type": "object", "description": "The bucket's versioning configuration.", "properties": { "enabled": { "type": "boolean", "description": "While set to true, versioning is fully enabled for this bucket." } } }, "website": { "type": "object", "description": "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.", "properties": { "mainPageSuffix": { "type": "string", "description": "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." }, "notFoundPage": { "type": "string", "description": "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." } } } } }, "BucketAccessControl": { "id": "BucketAccessControl", "type": "object", "description": "An access-control entry.", "properties": { "bucket": { "type": "string", "description": "The name of the bucket." }, "domain": { "type": "string", "description": "The domain associated with the entity, if any." }, "email": { "type": "string", "description": "The email address associated with the entity, if any." }, "entity": { "type": "string", "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.", "annotations": { "required": [ "storage.bucketAccessControls.insert" ] } }, "entityId": { "type": "string", "description": "The ID for the entity, if any." }, "etag": { "type": "string", "description": "HTTP 1.1 Entity tag for the access-control entry." }, "id": { "type": "string", "description": "The ID of the access-control entry." }, "kind": { "type": "string", "description": "The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl.", "default": "storage#bucketAccessControl" }, "projectTeam": { "type": "object", "description": "The project team associated with the entity, if any.", "properties": { "projectNumber": { "type": "string", "description": "The project number." }, "team": { "type": "string", "description": "The team. Can be owners, editors, or viewers." } } }, "role": { "type": "string", "description": "The access permission for the entity. Can be READER, WRITER, or OWNER.", "annotations": { "required": [ "storage.bucketAccessControls.insert" ] } }, "selfLink": { "type": "string", "description": "The link to this access-control entry." } } }, "BucketAccessControls": { "id": "BucketAccessControls", "type": "object", "description": "An access-control list.", "properties": { "items": { "type": "array", "description": "The list of items.", "items": { "$ref": "BucketAccessControl" } }, "kind": { "type": "string", "description": "The kind of item this is. For lists of bucket access control entries, this is always storage#bucketAccessControls.", "default": "storage#bucketAccessControls" } } }, "Buckets": { "id": "Buckets", "type": "object", "description": "A list of buckets.", "properties": { "items": { "type": "array", "description": "The list of items.", "items": { "$ref": "Bucket" } }, "kind": { "type": "string", "description": "The kind of item this is. For lists of buckets, this is always storage#buckets.", "default": "storage#buckets" }, "nextPageToken": { "type": "string", "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." } } }, "Channel": { "id": "Channel", "type": "object", "description": "An notification channel used to watch for resource changes.", "properties": { "address": { "type": "string", "description": "The address where notifications are delivered for this channel." }, "expiration": { "type": "string", "description": "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.", "format": "int64" }, "id": { "type": "string", "description": "A UUID or similar unique string that identifies this channel." }, "kind": { "type": "string", "description": "Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string \"api#channel\".", "default": "api#channel" }, "params": { "type": "object", "description": "Additional parameters controlling delivery channel behavior. Optional.", "additionalProperties": { "type": "string", "description": "Declares a new parameter by name." } }, "payload": { "type": "boolean", "description": "A Boolean value to indicate whether payload is wanted. Optional." }, "resourceId": { "type": "string", "description": "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions." }, "resourceUri": { "type": "string", "description": "A version-specific identifier for the watched resource." }, "token": { "type": "string", "description": "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional." }, "type": { "type": "string", "description": "The type of delivery mechanism used for this channel." } } }, "ComposeRequest": { "id": "ComposeRequest", "type": "object", "description": "A Compose request.", "properties": { "destination": { "$ref": "Object", "description": "Properties of the resulting object." }, "kind": { "type": "string", "description": "The kind of item this is.", "default": "storage#composeRequest" }, "sourceObjects": { "type": "array", "description": "The list of source objects that will be concatenated into a single object.", "items": { "type": "object", "properties": { "generation": { "type": "string", "description": "The generation of this object to use as the source.", "format": "int64" }, "name": { "type": "string", "description": "The source object's name. The source object's bucket is implicitly the destination bucket.", "annotations": { "required": [ "storage.objects.compose" ] } }, "objectPreconditions": { "type": "object", "description": "Conditions that must be met for this operation to execute.", "properties": { "ifGenerationMatch": { "type": "string", "description": "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.", "format": "int64" } } } } }, "annotations": { "required": [ "storage.objects.compose" ] } } } }, "Notification": { "id": "Notification", "type": "object", "description": "A subscription to receive Google PubSub notifications.", "properties": { "bucket": { "type": "string", "description": "The name of the bucket this subscription is particular to.", "annotations": { "required": [ "storage.notifications.insert" ] } }, "custom_attributes": { "type": "object", "description": "An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.", "additionalProperties": { "type": "string" } }, "etag": { "type": "string", "description": "HTTP 1.1 Entity tag for this subscription notification." }, "event_types": { "type": "array", "description": "If present, only send notifications about listed event types. If empty, sent notifications for all event types.", "items": { "type": "string" } }, "id": { "type": "string", "description": "The ID of the notification." }, "kind": { "type": "string", "description": "The kind of item this is. For notifications, this is always storage#notification.", "default": "storage#notification" }, "object_metadata_format": { "type": "string", "description": "If payload_content is OBJECT_METADATA, controls the format of that metadata. Otherwise, must not be set.", "default": "JSON_API_V1" }, "object_name_prefix": { "type": "string", "description": "If present, only apply this notification configuration to object names that begin with this prefix." }, "payload_content": { "type": "string", "description": "The desired content of the Payload. Defaults to OBJECT_METADATA.", "default": "OBJECT_METADATA" }, "selfLink": { "type": "string", "description": "The canonical URL of this notification." }, "topic": { "type": "string", "description": "The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'", "annotations": { "required": [ "storage.notifications.insert" ] } } } }, "Notifications": { "id": "Notifications", "type": "object", "description": "A list of notification subscriptions.", "properties": { "items": { "type": "array", "description": "The list of items.", "items": { "$ref": "Notification" } }, "kind": { "type": "string", "description": "The kind of item this is. For lists of notifications, this is always storage#notifications.", "default": "storage#notifications" } } }, "Object": { "id": "Object", "type": "object", "description": "An object.", "properties": { "acl": { "type": "array", "description": "Access controls on the object.", "items": { "$ref": "ObjectAccessControl" }, "annotations": { "required": [ "storage.objects.update" ] } }, "bucket": { "type": "string", "description": "The name of the bucket containing this object." }, "cacheControl": { "type": "string", "description": "Cache-Control directive for the object data." }, "componentCount": { "type": "integer", "description": "Number of underlying components that make up this object. Components are accumulated by compose operations.", "format": "int32" }, "contentDisposition": { "type": "string", "description": "Content-Disposition of the object data." }, "contentEncoding": { "type": "string", "description": "Content-Encoding of the object data." }, "contentLanguage": { "type": "string", "description": "Content-Language of the object data." }, "contentType": { "type": "string", "description": "Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream." }, "crc32c": { "type": "string", "description": "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." }, "customerEncryption": { "type": "object", "description": "Metadata of customer-supplied encryption key, if the object is encrypted by such a key.", "properties": { "encryptionAlgorithm": { "type": "string", "description": "The encryption algorithm." }, "keySha256": { "type": "string", "description": "SHA256 hash value of the encryption key." } } }, "etag": { "type": "string", "description": "HTTP 1.1 Entity tag for the object." }, "generation": { "type": "string", "description": "The content generation of this object. Used for object versioning.", "format": "int64" }, "id": { "type": "string", "description": "The ID of the object." }, "kind": { "type": "string", "description": "The kind of item this is. For objects, this is always storage#object.", "default": "storage#object" }, "md5Hash": { "type": "string", "description": "MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices." }, "mediaLink": { "type": "string", "description": "Media download link." }, "metadata": { "type": "object", "description": "User-provided metadata, in key/value pairs.", "additionalProperties": { "type": "string", "description": "An individual metadata entry." } }, "metageneration": { "type": "string", "description": "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.", "format": "int64" }, "name": { "type": "string", "description": "The name of this object. Required if not specified by URL parameter." }, "owner": { "type": "object", "description": "The owner of the object. This will always be the uploader of the object.", "properties": { "entity": { "type": "string", "description": "The entity, in the form user-userId." }, "entityId": { "type": "string", "description": "The ID for the entity." } } }, "selfLink": { "type": "string", "description": "The link to this object." }, "size": { "type": "string", "description": "Content-Length of the data in bytes.", "format": "uint64" }, "storageClass": { "type": "string", "description": "Storage class of the object." }, "timeCreated": { "type": "string", "description": "The creation time of the object in RFC 3339 format.", "format": "date-time" }, "timeDeleted": { "type": "string", "description": "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.", "format": "date-time" }, "updated": { "type": "string", "description": "The modification time of the object metadata in RFC 3339 format.", "format": "date-time" } } }, "ObjectAccessControl": { "id": "ObjectAccessControl", "type": "object", "description": "An access-control entry.", "properties": { "bucket": { "type": "string", "description": "The name of the bucket." }, "domain": { "type": "string", "description": "The domain associated with the entity, if any." }, "email": { "type": "string", "description": "The email address associated with the entity, if any." }, "entity": { "type": "string", "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com." }, "entityId": { "type": "string", "description": "The ID for the entity, if any." }, "etag": { "type": "string", "description": "HTTP 1.1 Entity tag for the access-control entry." }, "generation": { "type": "string", "description": "The content generation of the object.", "format": "int64" }, "id": { "type": "string", "description": "The ID of the access-control entry." }, "kind": { "type": "string", "description": "The kind of item this is. For object access control entries, this is always storage#objectAccessControl.", "default": "storage#objectAccessControl" }, "object": { "type": "string", "description": "The name of the object." }, "projectTeam": { "type": "object", "description": "The project team associated with the entity, if any.", "properties": { "projectNumber": { "type": "string", "description": "The project number." }, "team": { "type": "string", "description": "The team. Can be owners, editors, or viewers." } } }, "role": { "type": "string", "description": "The access permission for the entity. Can be READER or OWNER." }, "selfLink": { "type": "string", "description": "The link to this access-control entry." } } }, "ObjectAccessControls": { "id": "ObjectAccessControls", "type": "object", "description": "An access-control list.", "properties": { "items": { "type": "array", "description": "The list of items.", "items": { "type": "any" } }, "kind": { "type": "string", "description": "The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls.", "default": "storage#objectAccessControls" } } }, "Objects": { "id": "Objects", "type": "object", "description": "A list of objects.", "properties": { "items": { "type": "array", "description": "The list of items.", "items": { "$ref": "Object" } }, "kind": { "type": "string", "description": "The kind of item this is. For lists of objects, this is always storage#objects.", "default": "storage#objects" }, "nextPageToken": { "type": "string", "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." }, "prefixes": { "type": "array", "description": "The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.", "items": { "type": "string" } } } }, "Policy": { "id": "Policy", "type": "object", "description": "A bucket/object IAM policy.", "properties": { "bindings": { "type": "array", "description": "An association between a role, which comes with a set of permissions, and members who may assume that role.", "items": { "type": "object", "properties": { "members": { "type": "array", "description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers — A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid — An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project", "items": { "type": "string" }, "annotations": { "required": [ "storage.buckets.setIamPolicy", "storage.objects.setIamPolicy" ] } }, "role": { "type": "string", "description": "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.\nThe new IAM roles are: \n- roles/storage.admin — Full control of Google Cloud Storage resources. \n- roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. \n- roles/storage.objectCreator — Access to create objects in Google Cloud Storage. \n- roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: \n- roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. \n- roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. \n- roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. \n- roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. \n- 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.", "annotations": { "required": [ "storage.buckets.setIamPolicy", "storage.objects.setIamPolicy" ] } } } }, "annotations": { "required": [ "storage.buckets.setIamPolicy", "storage.objects.setIamPolicy" ] } }, "etag": { "type": "string", "description": "HTTP 1.1 Entity tag for the policy.", "format": "byte" }, "kind": { "type": "string", "description": "The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.", "default": "storage#policy" }, "resourceId": { "type": "string", "description": "The ID of the resource to which this policy belongs. Will be of the form buckets/bucket for buckets, and buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input." } } }, "RewriteResponse": { "id": "RewriteResponse", "type": "object", "description": "A rewrite response.", "properties": { "done": { "type": "boolean", "description": "true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response." }, "kind": { "type": "string", "description": "The kind of item this is.", "default": "storage#rewriteResponse" }, "objectSize": { "type": "string", "description": "The total size of the object being copied in bytes. This property is always present in the response.", "format": "uint64" }, "resource": { "$ref": "Object", "description": "A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes." }, "rewriteToken": { "type": "string", "description": "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." }, "totalBytesRewritten": { "type": "string", "description": "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.", "format": "uint64" } } }, "TestIamPermissionsResponse": { "id": "TestIamPermissionsResponse", "type": "object", "description": "A storage.(buckets|objects).testIamPermissions response.", "properties": { "kind": { "type": "string", "description": "The kind of item this is.", "default": "storage#testIamPermissionsResponse" }, "permissions": { "type": "array", "description": "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: \n- storage.buckets.delete — Delete bucket. \n- storage.buckets.get — Read bucket metadata. \n- storage.buckets.getIamPolicy — Read bucket IAM policy. \n- storage.buckets.create — Create bucket. \n- storage.buckets.list — List buckets. \n- storage.buckets.setIamPolicy — Update bucket IAM policy. \n- storage.buckets.update — Update bucket metadata. \n- storage.objects.delete — Delete object. \n- storage.objects.get — Read object data and metadata. \n- storage.objects.getIamPolicy — Read object IAM policy. \n- storage.objects.create — Create object. \n- storage.objects.list — List objects. \n- storage.objects.setIamPolicy — Update object IAM policy. \n- storage.objects.update — Update object metadata.", "items": { "type": "string" } } } } }, "resources": { "bucketAccessControls": { "methods": { "delete": { "id": "storage.bucketAccessControls.delete", "path": "b/{bucket}/acl/{entity}", "httpMethod": "DELETE", "description": "Permanently deletes the ACL entry for the specified entity on the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "entity" ], "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "get": { "id": "storage.bucketAccessControls.get", "path": "b/{bucket}/acl/{entity}", "httpMethod": "GET", "description": "Returns the ACL entry for the specified entity on the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "entity" ], "response": { "$ref": "BucketAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "insert": { "id": "storage.bucketAccessControls.insert", "path": "b/{bucket}/acl", "httpMethod": "POST", "description": "Creates a new ACL entry on the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket" ], "request": { "$ref": "BucketAccessControl" }, "response": { "$ref": "BucketAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "list": { "id": "storage.bucketAccessControls.list", "path": "b/{bucket}/acl", "httpMethod": "GET", "description": "Retrieves ACL entries on the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket" ], "response": { "$ref": "BucketAccessControls" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "patch": { "id": "storage.bucketAccessControls.patch", "path": "b/{bucket}/acl/{entity}", "httpMethod": "PATCH", "description": "Updates an ACL entry on the specified bucket. This method supports patch semantics.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "entity" ], "request": { "$ref": "BucketAccessControl" }, "response": { "$ref": "BucketAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "update": { "id": "storage.bucketAccessControls.update", "path": "b/{bucket}/acl/{entity}", "httpMethod": "PUT", "description": "Updates an ACL entry on the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "entity" ], "request": { "$ref": "BucketAccessControl" }, "response": { "$ref": "BucketAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] } } }, "buckets": { "methods": { "delete": { "id": "storage.buckets.delete", "path": "b/{bucket}", "httpMethod": "DELETE", "description": "Permanently deletes an empty bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "ifMetagenerationMatch": { "type": "string", "description": "If set, only deletes the bucket if its metageneration matches this value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "If set, only deletes the bucket if its metageneration does not match this value.", "format": "int64", "location": "query" } }, "parameterOrder": [ "bucket" ], "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "get": { "id": "storage.buckets.get", "path": "b/{bucket}", "httpMethod": "GET", "description": "Returns metadata for the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "ifMetagenerationMatch": { "type": "string", "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to noAcl.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit owner, acl and defaultObjectAcl properties." ], "location": "query" } }, "parameterOrder": [ "bucket" ], "response": { "$ref": "Bucket" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "getIamPolicy": { "id": "storage.buckets.getIamPolicy", "path": "b/{bucket}/iam", "httpMethod": "GET", "description": "Returns an IAM policy for the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket" ], "response": { "$ref": "Policy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "insert": { "id": "storage.buckets.insert", "path": "b", "httpMethod": "POST", "description": "Creates a new bucket.", "parameters": { "predefinedAcl": { "type": "string", "description": "Apply a predefined set of access controls to this bucket.", "enum": [ "authenticatedRead", "private", "projectPrivate", "publicRead", "publicReadWrite" ], "enumDescriptions": [ "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", "Project team owners get OWNER access.", "Project team members get access according to their roles.", "Project team owners get OWNER access, and allUsers get READER access.", "Project team owners get OWNER access, and allUsers get WRITER access." ], "location": "query" }, "predefinedDefaultObjectAcl": { "type": "string", "description": "Apply a predefined set of default object access controls to this bucket.", "enum": [ "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", "publicRead" ], "enumDescriptions": [ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", "Object owner gets OWNER access, and project team owners get OWNER access.", "Object owner gets OWNER access, and project team owners get READER access.", "Object owner gets OWNER access.", "Object owner gets OWNER access, and project team members get access according to their roles.", "Object owner gets OWNER access, and allUsers get READER access." ], "location": "query" }, "project": { "type": "string", "description": "A valid API project identifier.", "required": true, "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit owner, acl and defaultObjectAcl properties." ], "location": "query" } }, "parameterOrder": [ "project" ], "request": { "$ref": "Bucket" }, "response": { "$ref": "Bucket" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "list": { "id": "storage.buckets.list", "path": "b", "httpMethod": "GET", "description": "Retrieves a list of buckets for a given project.", "parameters": { "maxResults": { "type": "integer", "description": "Maximum number of buckets to return.", "format": "uint32", "minimum": "0", "location": "query" }, "pageToken": { "type": "string", "description": "A previously-returned page token representing part of the larger set of results to view.", "location": "query" }, "prefix": { "type": "string", "description": "Filter results to buckets whose names begin with this prefix.", "location": "query" }, "project": { "type": "string", "description": "A valid API project identifier.", "required": true, "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to noAcl.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit owner, acl and defaultObjectAcl properties." ], "location": "query" } }, "parameterOrder": [ "project" ], "response": { "$ref": "Buckets" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "patch": { "id": "storage.buckets.patch", "path": "b/{bucket}", "httpMethod": "PATCH", "description": "Updates a bucket. This method supports patch semantics.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "ifMetagenerationMatch": { "type": "string", "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "predefinedAcl": { "type": "string", "description": "Apply a predefined set of access controls to this bucket.", "enum": [ "authenticatedRead", "private", "projectPrivate", "publicRead", "publicReadWrite" ], "enumDescriptions": [ "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", "Project team owners get OWNER access.", "Project team members get access according to their roles.", "Project team owners get OWNER access, and allUsers get READER access.", "Project team owners get OWNER access, and allUsers get WRITER access." ], "location": "query" }, "predefinedDefaultObjectAcl": { "type": "string", "description": "Apply a predefined set of default object access controls to this bucket.", "enum": [ "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", "publicRead" ], "enumDescriptions": [ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", "Object owner gets OWNER access, and project team owners get OWNER access.", "Object owner gets OWNER access, and project team owners get READER access.", "Object owner gets OWNER access.", "Object owner gets OWNER access, and project team members get access according to their roles.", "Object owner gets OWNER access, and allUsers get READER access." ], "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to full.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit owner, acl and defaultObjectAcl properties." ], "location": "query" } }, "parameterOrder": [ "bucket" ], "request": { "$ref": "Bucket" }, "response": { "$ref": "Bucket" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "setIamPolicy": { "id": "storage.buckets.setIamPolicy", "path": "b/{bucket}/iam", "httpMethod": "PUT", "description": "Updates an IAM policy for the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket" ], "request": { "$ref": "Policy" }, "response": { "$ref": "Policy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "testIamPermissions": { "id": "storage.buckets.testIamPermissions", "path": "b/{bucket}/iam/testPermissions", "httpMethod": "GET", "description": "Tests a set of permissions on the given bucket to see which, if any, are held by the caller.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "permissions": { "type": "string", "description": "Permissions to test.", "required": true, "repeated": true, "location": "query" } }, "parameterOrder": [ "bucket", "permissions" ], "response": { "$ref": "TestIamPermissionsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "update": { "id": "storage.buckets.update", "path": "b/{bucket}", "httpMethod": "PUT", "description": "Updates a bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "ifMetagenerationMatch": { "type": "string", "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "predefinedAcl": { "type": "string", "description": "Apply a predefined set of access controls to this bucket.", "enum": [ "authenticatedRead", "private", "projectPrivate", "publicRead", "publicReadWrite" ], "enumDescriptions": [ "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", "Project team owners get OWNER access.", "Project team members get access according to their roles.", "Project team owners get OWNER access, and allUsers get READER access.", "Project team owners get OWNER access, and allUsers get WRITER access." ], "location": "query" }, "predefinedDefaultObjectAcl": { "type": "string", "description": "Apply a predefined set of default object access controls to this bucket.", "enum": [ "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", "publicRead" ], "enumDescriptions": [ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", "Object owner gets OWNER access, and project team owners get OWNER access.", "Object owner gets OWNER access, and project team owners get READER access.", "Object owner gets OWNER access.", "Object owner gets OWNER access, and project team members get access according to their roles.", "Object owner gets OWNER access, and allUsers get READER access." ], "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to full.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit owner, acl and defaultObjectAcl properties." ], "location": "query" } }, "parameterOrder": [ "bucket" ], "request": { "$ref": "Bucket" }, "response": { "$ref": "Bucket" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] } } }, "channels": { "methods": { "stop": { "id": "storage.channels.stop", "path": "channels/stop", "httpMethod": "POST", "description": "Stop watching resources through this channel", "request": { "$ref": "Channel", "parameterName": "resource" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ] } } }, "defaultObjectAccessControls": { "methods": { "delete": { "id": "storage.defaultObjectAccessControls.delete", "path": "b/{bucket}/defaultObjectAcl/{entity}", "httpMethod": "DELETE", "description": "Permanently deletes the default object ACL entry for the specified entity on the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "entity" ], "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "get": { "id": "storage.defaultObjectAccessControls.get", "path": "b/{bucket}/defaultObjectAcl/{entity}", "httpMethod": "GET", "description": "Returns the default object ACL entry for the specified entity on the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "entity" ], "response": { "$ref": "ObjectAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "insert": { "id": "storage.defaultObjectAccessControls.insert", "path": "b/{bucket}/defaultObjectAcl", "httpMethod": "POST", "description": "Creates a new default object ACL entry on the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket" ], "request": { "$ref": "ObjectAccessControl" }, "response": { "$ref": "ObjectAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "list": { "id": "storage.defaultObjectAccessControls.list", "path": "b/{bucket}/defaultObjectAcl", "httpMethod": "GET", "description": "Retrieves default object ACL entries on the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "ifMetagenerationMatch": { "type": "string", "description": "If present, only return default ACL listing if the bucket's current metageneration matches this value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "If present, only return default ACL listing if the bucket's current metageneration does not match the given value.", "format": "int64", "location": "query" } }, "parameterOrder": [ "bucket" ], "response": { "$ref": "ObjectAccessControls" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "patch": { "id": "storage.defaultObjectAccessControls.patch", "path": "b/{bucket}/defaultObjectAcl/{entity}", "httpMethod": "PATCH", "description": "Updates a default object ACL entry on the specified bucket. This method supports patch semantics.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "entity" ], "request": { "$ref": "ObjectAccessControl" }, "response": { "$ref": "ObjectAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "update": { "id": "storage.defaultObjectAccessControls.update", "path": "b/{bucket}/defaultObjectAcl/{entity}", "httpMethod": "PUT", "description": "Updates a default object ACL entry on the specified bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "entity" ], "request": { "$ref": "ObjectAccessControl" }, "response": { "$ref": "ObjectAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] } } }, "notifications": { "methods": { "delete": { "id": "storage.notifications.delete", "path": "notifications/{notification}", "httpMethod": "DELETE", "description": "Permanently deletes a notification subscription.", "parameters": { "notification": { "type": "string", "description": "ID of the notification to delete.", "required": true, "location": "path" } }, "parameterOrder": [ "notification" ], "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "get": { "id": "storage.notifications.get", "path": "notifications/{notification}", "httpMethod": "GET", "description": "View a notification configuration.", "parameters": { "notification": { "type": "string", "description": "Notification ID", "required": true, "location": "path" } }, "parameterOrder": [ "notification" ], "response": { "$ref": "Notification" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "insert": { "id": "storage.notifications.insert", "path": "notifications", "httpMethod": "POST", "description": "Creates a notification subscription for a given bucket.", "request": { "$ref": "Notification" }, "response": { "$ref": "Notification" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "list": { "id": "storage.notifications.list", "path": "notifications", "httpMethod": "GET", "description": "Retrieves a list of notification subscriptions for a given bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of a GCS bucket.", "required": true, "location": "query" } }, "parameterOrder": [ "bucket" ], "response": { "$ref": "Notifications" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ] } } }, "objectAccessControls": { "methods": { "delete": { "id": "storage.objectAccessControls.delete", "path": "b/{bucket}/o/{object}/acl/{entity}", "httpMethod": "DELETE", "description": "Permanently deletes the ACL entry for the specified entity on the specified object.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "object", "entity" ], "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "get": { "id": "storage.objectAccessControls.get", "path": "b/{bucket}/o/{object}/acl/{entity}", "httpMethod": "GET", "description": "Returns the ACL entry for the specified entity on the specified object.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "object", "entity" ], "response": { "$ref": "ObjectAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "insert": { "id": "storage.objectAccessControls.insert", "path": "b/{bucket}/o/{object}/acl", "httpMethod": "POST", "description": "Creates a new ACL entry on the specified object.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "object" ], "request": { "$ref": "ObjectAccessControl" }, "response": { "$ref": "ObjectAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "list": { "id": "storage.objectAccessControls.list", "path": "b/{bucket}/o/{object}/acl", "httpMethod": "GET", "description": "Retrieves ACL entries on the specified object.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "object" ], "response": { "$ref": "ObjectAccessControls" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "patch": { "id": "storage.objectAccessControls.patch", "path": "b/{bucket}/o/{object}/acl/{entity}", "httpMethod": "PATCH", "description": "Updates an ACL entry on the specified object. This method supports patch semantics.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "object", "entity" ], "request": { "$ref": "ObjectAccessControl" }, "response": { "$ref": "ObjectAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "update": { "id": "storage.objectAccessControls.update", "path": "b/{bucket}/o/{object}/acl/{entity}", "httpMethod": "PUT", "description": "Updates an ACL entry on the specified object.", "parameters": { "bucket": { "type": "string", "description": "Name of a bucket.", "required": true, "location": "path" }, "entity": { "type": "string", "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "object", "entity" ], "request": { "$ref": "ObjectAccessControl" }, "response": { "$ref": "ObjectAccessControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] } } }, "objects": { "methods": { "compose": { "id": "storage.objects.compose", "path": "b/{destinationBucket}/o/{destinationObject}/compose", "httpMethod": "POST", "description": "Concatenates a list of existing objects into a new object in the same bucket.", "parameters": { "destinationBucket": { "type": "string", "description": "Name of the bucket in which to store the new object.", "required": true, "location": "path" }, "destinationObject": { "type": "string", "description": "Name of the new object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" }, "destinationPredefinedAcl": { "type": "string", "description": "Apply a predefined set of access controls to the destination object.", "enum": [ "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", "publicRead" ], "enumDescriptions": [ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", "Object owner gets OWNER access, and project team owners get OWNER access.", "Object owner gets OWNER access, and project team owners get READER access.", "Object owner gets OWNER access.", "Object owner gets OWNER access, and project team members get access according to their roles.", "Object owner gets OWNER access, and allUsers get READER access." ], "location": "query" }, "ifGenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current generation matches the given value.", "format": "int64", "location": "query" }, "ifMetagenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", "format": "int64", "location": "query" } }, "parameterOrder": [ "destinationBucket", "destinationObject" ], "request": { "$ref": "ComposeRequest" }, "response": { "$ref": "Object" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write" ], "supportsMediaDownload": true }, "copy": { "id": "storage.objects.copy", "path": "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}", "httpMethod": "POST", "description": "Copies a source object to a destination object. Optionally overrides metadata.", "parameters": { "destinationBucket": { "type": "string", "description": "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.", "required": true, "location": "path" }, "destinationObject": { "type": "string", "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.", "required": true, "location": "path" }, "destinationPredefinedAcl": { "type": "string", "description": "Apply a predefined set of access controls to the destination object.", "enum": [ "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", "publicRead" ], "enumDescriptions": [ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", "Object owner gets OWNER access, and project team owners get OWNER access.", "Object owner gets OWNER access, and project team owners get READER access.", "Object owner gets OWNER access.", "Object owner gets OWNER access, and project team members get access according to their roles.", "Object owner gets OWNER access, and allUsers get READER access." ], "location": "query" }, "ifGenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the destination object's current generation matches the given value.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value.", "format": "int64", "location": "query" }, "ifMetagenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "ifSourceGenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the source object's generation matches the given value.", "format": "int64", "location": "query" }, "ifSourceGenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the source object's generation does not match the given value.", "format": "int64", "location": "query" }, "ifSourceMetagenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifSourceMetagenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit the owner, acl property." ], "location": "query" }, "sourceBucket": { "type": "string", "description": "Name of the bucket in which to find the source object.", "required": true, "location": "path" }, "sourceGeneration": { "type": "string", "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "sourceObject": { "type": "string", "description": "Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" } }, "parameterOrder": [ "sourceBucket", "sourceObject", "destinationBucket", "destinationObject" ], "request": { "$ref": "Object" }, "response": { "$ref": "Object" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write" ], "supportsMediaDownload": true }, "delete": { "id": "storage.objects.delete", "path": "b/{bucket}/o/{object}", "httpMethod": "DELETE", "description": "Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.", "parameters": { "bucket": { "type": "string", "description": "Name of the bucket in which the object resides.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "ifGenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current generation matches the given value.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", "format": "int64", "location": "query" }, "ifMetagenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "object" ], "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "get": { "id": "storage.objects.get", "path": "b/{bucket}/o/{object}", "httpMethod": "GET", "description": "Retrieves an object or its metadata.", "parameters": { "bucket": { "type": "string", "description": "Name of the bucket in which the object resides.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "ifGenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's generation matches the given value.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's generation does not match the given value.", "format": "int64", "location": "query" }, "ifMetagenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to noAcl.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit the owner, acl property." ], "location": "query" } }, "parameterOrder": [ "bucket", "object" ], "response": { "$ref": "Object" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ], "supportsMediaDownload": true }, "getIamPolicy": { "id": "storage.objects.getIamPolicy", "path": "b/{bucket}/o/{object}/iam", "httpMethod": "GET", "description": "Returns an IAM policy for the specified object.", "parameters": { "bucket": { "type": "string", "description": "Name of the bucket in which the object resides.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "object" ], "response": { "$ref": "Policy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "insert": { "id": "storage.objects.insert", "path": "b/{bucket}/o", "httpMethod": "POST", "description": "Stores a new object and metadata.", "parameters": { "bucket": { "type": "string", "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.", "required": true, "location": "path" }, "contentEncoding": { "type": "string", "description": "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.", "location": "query" }, "ifGenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current generation matches the given value.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", "format": "int64", "location": "query" }, "ifMetagenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "name": { "type": "string", "description": "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.", "location": "query" }, "predefinedAcl": { "type": "string", "description": "Apply a predefined set of access controls to this object.", "enum": [ "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", "publicRead" ], "enumDescriptions": [ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", "Object owner gets OWNER access, and project team owners get OWNER access.", "Object owner gets OWNER access, and project team owners get READER access.", "Object owner gets OWNER access.", "Object owner gets OWNER access, and project team members get access according to their roles.", "Object owner gets OWNER access, and allUsers get READER access." ], "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit the owner, acl property." ], "location": "query" } }, "parameterOrder": [ "bucket" ], "request": { "$ref": "Object" }, "response": { "$ref": "Object" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write" ], "supportsMediaDownload": true, "supportsMediaUpload": true, "mediaUpload": { "accept": [ "*/*" ], "protocols": { "simple": { "multipart": true, "path": "/upload/storage/v1/b/{bucket}/o" }, "resumable": { "multipart": true, "path": "/resumable/upload/storage/v1/b/{bucket}/o" } } } }, "list": { "id": "storage.objects.list", "path": "b/{bucket}/o", "httpMethod": "GET", "description": "Retrieves a list of objects matching the criteria.", "parameters": { "bucket": { "type": "string", "description": "Name of the bucket in which to look for objects.", "required": true, "location": "path" }, "delimiter": { "type": "string", "description": "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.", "location": "query" }, "maxResults": { "type": "integer", "description": "Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. The default value of this parameter is 1,000 items.", "format": "uint32", "minimum": "0", "location": "query" }, "pageToken": { "type": "string", "description": "A previously-returned page token representing part of the larger set of results to view.", "location": "query" }, "prefix": { "type": "string", "description": "Filter results to objects whose names begin with this prefix.", "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to noAcl.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit the owner, acl property." ], "location": "query" }, "versions": { "type": "boolean", "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", "location": "query" } }, "parameterOrder": [ "bucket" ], "response": { "$ref": "Objects" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ], "supportsSubscription": true }, "patch": { "id": "storage.objects.patch", "path": "b/{bucket}/o/{object}", "httpMethod": "PATCH", "description": "Updates an object's metadata. This method supports patch semantics.", "parameters": { "bucket": { "type": "string", "description": "Name of the bucket in which the object resides.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "ifGenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current generation matches the given value.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", "format": "int64", "location": "query" }, "ifMetagenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" }, "predefinedAcl": { "type": "string", "description": "Apply a predefined set of access controls to this object.", "enum": [ "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", "publicRead" ], "enumDescriptions": [ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", "Object owner gets OWNER access, and project team owners get OWNER access.", "Object owner gets OWNER access, and project team owners get READER access.", "Object owner gets OWNER access.", "Object owner gets OWNER access, and project team members get access according to their roles.", "Object owner gets OWNER access, and allUsers get READER access." ], "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to full.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit the owner, acl property." ], "location": "query" } }, "parameterOrder": [ "bucket", "object" ], "request": { "$ref": "Object" }, "response": { "$ref": "Object" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ] }, "rewrite": { "id": "storage.objects.rewrite", "path": "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}", "httpMethod": "POST", "description": "Rewrites a source object to a destination object. Optionally overrides metadata.", "parameters": { "destinationBucket": { "type": "string", "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.", "required": true, "location": "path" }, "destinationObject": { "type": "string", "description": "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.", "required": true, "location": "path" }, "destinationPredefinedAcl": { "type": "string", "description": "Apply a predefined set of access controls to the destination object.", "enum": [ "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", "publicRead" ], "enumDescriptions": [ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", "Object owner gets OWNER access, and project team owners get OWNER access.", "Object owner gets OWNER access, and project team owners get READER access.", "Object owner gets OWNER access.", "Object owner gets OWNER access, and project team members get access according to their roles.", "Object owner gets OWNER access, and allUsers get READER access." ], "location": "query" }, "ifGenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the destination object's current generation matches the given value.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value.", "format": "int64", "location": "query" }, "ifMetagenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "ifSourceGenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the source object's generation matches the given value.", "format": "int64", "location": "query" }, "ifSourceGenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the source object's generation does not match the given value.", "format": "int64", "location": "query" }, "ifSourceMetagenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifSourceMetagenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "maxBytesRewrittenPerCall": { "type": "string", "description": "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.", "format": "int64", "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit the owner, acl property." ], "location": "query" }, "rewriteToken": { "type": "string", "description": "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.", "location": "query" }, "sourceBucket": { "type": "string", "description": "Name of the bucket in which to find the source object.", "required": true, "location": "path" }, "sourceGeneration": { "type": "string", "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "sourceObject": { "type": "string", "description": "Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" } }, "parameterOrder": [ "sourceBucket", "sourceObject", "destinationBucket", "destinationObject" ], "request": { "$ref": "Object" }, "response": { "$ref": "RewriteResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "setIamPolicy": { "id": "storage.objects.setIamPolicy", "path": "b/{bucket}/o/{object}/iam", "httpMethod": "PUT", "description": "Updates an IAM policy for the specified object.", "parameters": { "bucket": { "type": "string", "description": "Name of the bucket in which the object resides.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" } }, "parameterOrder": [ "bucket", "object" ], "request": { "$ref": "Policy" }, "response": { "$ref": "Policy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "testIamPermissions": { "id": "storage.objects.testIamPermissions", "path": "b/{bucket}/o/{object}/iam/testPermissions", "httpMethod": "GET", "description": "Tests a set of permissions on the given object to see which, if any, are held by the caller.", "parameters": { "bucket": { "type": "string", "description": "Name of the bucket in which the object resides.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" }, "permissions": { "type": "string", "description": "Permissions to test.", "required": true, "repeated": true, "location": "query" } }, "parameterOrder": [ "bucket", "object", "permissions" ], "response": { "$ref": "TestIamPermissionsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ] }, "update": { "id": "storage.objects.update", "path": "b/{bucket}/o/{object}", "httpMethod": "PUT", "description": "Updates an object's metadata.", "parameters": { "bucket": { "type": "string", "description": "Name of the bucket in which the object resides.", "required": true, "location": "path" }, "generation": { "type": "string", "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", "format": "int64", "location": "query" }, "ifGenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current generation matches the given value.", "format": "int64", "location": "query" }, "ifGenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current generation does not match the given value.", "format": "int64", "location": "query" }, "ifMetagenerationMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", "format": "int64", "location": "query" }, "ifMetagenerationNotMatch": { "type": "string", "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", "format": "int64", "location": "query" }, "object": { "type": "string", "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" }, "predefinedAcl": { "type": "string", "description": "Apply a predefined set of access controls to this object.", "enum": [ "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", "publicRead" ], "enumDescriptions": [ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", "Object owner gets OWNER access, and project team owners get OWNER access.", "Object owner gets OWNER access, and project team owners get READER access.", "Object owner gets OWNER access.", "Object owner gets OWNER access, and project team members get access according to their roles.", "Object owner gets OWNER access, and allUsers get READER access." ], "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to full.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit the owner, acl property." ], "location": "query" } }, "parameterOrder": [ "bucket", "object" ], "request": { "$ref": "Object" }, "response": { "$ref": "Object" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/devstorage.full_control" ], "supportsMediaDownload": true }, "watchAll": { "id": "storage.objects.watchAll", "path": "b/{bucket}/o/watch", "httpMethod": "POST", "description": "Watch for changes on all objects in a bucket.", "parameters": { "bucket": { "type": "string", "description": "Name of the bucket in which to look for objects.", "required": true, "location": "path" }, "delimiter": { "type": "string", "description": "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.", "location": "query" }, "maxResults": { "type": "integer", "description": "Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. The default value of this parameter is 1,000 items.", "format": "uint32", "minimum": "0", "location": "query" }, "pageToken": { "type": "string", "description": "A previously-returned page token representing part of the larger set of results to view.", "location": "query" }, "prefix": { "type": "string", "description": "Filter results to objects whose names begin with this prefix.", "location": "query" }, "projection": { "type": "string", "description": "Set of properties to return. Defaults to noAcl.", "enum": [ "full", "noAcl" ], "enumDescriptions": [ "Include all properties.", "Omit the owner, acl property." ], "location": "query" }, "versions": { "type": "boolean", "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", "location": "query" } }, "parameterOrder": [ "bucket" ], "request": { "$ref": "Channel", "parameterName": "resource" }, "response": { "$ref": "Channel" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write" ], "supportsSubscription": true } } } } } PK ���ZwJ1 downloads_test.pynu �[��� # # Copyright 2015 Google Inc. # # 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. """Integration tests for uploading and downloading to GCS. These tests exercise most of the corner cases for upload/download of files in apitools, via GCS. There are no performance tests here yet. """ import json import os import unittest import six from apitools.base.py import exceptions import storage _CLIENT = None def _GetClient(): global _CLIENT # pylint: disable=global-statement if _CLIENT is None: _CLIENT = storage.StorageV1() return _CLIENT class DownloadsTest(unittest.TestCase): _DEFAULT_BUCKET = 'apitools' _TESTDATA_PREFIX = 'testdata' def setUp(self): self.__client = _GetClient() self.__ResetDownload() def __ResetDownload(self, auto_transfer=False): self.__buffer = six.StringIO() self.__download = storage.Download.FromStream( self.__buffer, auto_transfer=auto_transfer) def __GetTestdataFileContents(self, filename): file_path = os.path.join( os.path.dirname(__file__), self._TESTDATA_PREFIX, filename) file_contents = open(file_path).read() self.assertIsNotNone( file_contents, msg=('Could not read file %s' % filename)) return file_contents @classmethod def __GetRequest(cls, filename): object_name = os.path.join(cls._TESTDATA_PREFIX, filename) return storage.StorageObjectsGetRequest( bucket=cls._DEFAULT_BUCKET, object=object_name) def __GetFile(self, request): response = self.__client.objects.Get(request, download=self.__download) self.assertIsNone(response, msg=( 'Unexpected nonempty response for file download: %s' % response)) def __GetAndStream(self, request): self.__GetFile(request) self.__download.StreamInChunks() def testZeroBytes(self): request = self.__GetRequest('zero_byte_file') self.__GetAndStream(request) self.assertEqual(0, self.__buffer.tell()) def testObjectDoesNotExist(self): self.__ResetDownload(auto_transfer=True) with self.assertRaises(exceptions.HttpError): self.__GetFile(self.__GetRequest('nonexistent_file')) def testAutoTransfer(self): self.__ResetDownload(auto_transfer=True) self.__GetFile(self.__GetRequest('fifteen_byte_file')) file_contents = self.__GetTestdataFileContents('fifteen_byte_file') self.assertEqual(15, self.__buffer.tell()) self.__buffer.seek(0) self.assertEqual(file_contents, self.__buffer.read()) def testFilenameWithSpaces(self): self.__ResetDownload(auto_transfer=True) self.__GetFile(self.__GetRequest('filename with spaces')) # NOTE(craigcitro): We add _ here to make this play nice with blaze. file_contents = self.__GetTestdataFileContents('filename_with_spaces') self.assertEqual(15, self.__buffer.tell()) self.__buffer.seek(0) self.assertEqual(file_contents, self.__buffer.read()) def testGetRange(self): # TODO(craigcitro): Test about a thousand more corner cases. file_contents = self.__GetTestdataFileContents('fifteen_byte_file') self.__GetFile(self.__GetRequest('fifteen_byte_file')) self.__download.GetRange(5, 10) self.assertEqual(6, self.__buffer.tell()) self.__buffer.seek(0) self.assertEqual(file_contents[5:11], self.__buffer.read()) def testGetRangeWithNegativeStart(self): file_contents = self.__GetTestdataFileContents('fifteen_byte_file') self.__GetFile(self.__GetRequest('fifteen_byte_file')) self.__download.GetRange(-3) self.assertEqual(3, self.__buffer.tell()) self.__buffer.seek(0) self.assertEqual(file_contents[-3:], self.__buffer.read()) def testGetRangeWithPositiveStart(self): file_contents = self.__GetTestdataFileContents('fifteen_byte_file') self.__GetFile(self.__GetRequest('fifteen_byte_file')) self.__download.GetRange(2) self.assertEqual(13, self.__buffer.tell()) self.__buffer.seek(0) self.assertEqual(file_contents[2:15], self.__buffer.read()) def testSmallChunksizes(self): file_contents = self.__GetTestdataFileContents('fifteen_byte_file') request = self.__GetRequest('fifteen_byte_file') for chunksize in (2, 3, 15, 100): self.__ResetDownload() self.__download.chunksize = chunksize self.__GetAndStream(request) self.assertEqual(15, self.__buffer.tell()) self.__buffer.seek(0) self.assertEqual(file_contents, self.__buffer.read(15)) def testLargeFileChunksizes(self): request = self.__GetRequest('thirty_meg_file') for chunksize in (1048576, 40 * 1048576): self.__ResetDownload() self.__download.chunksize = chunksize self.__GetAndStream(request) self.__buffer.seek(0) def testAutoGzipObject(self): # TODO(craigcitro): Move this to a new object once we have a more # permanent one, see: http://b/12250275 request = storage.StorageObjectsGetRequest( bucket='ottenl-gzip', object='50K.txt') # First, try without auto-transfer. self.__GetFile(request) self.assertEqual(0, self.__buffer.tell()) self.__download.StreamInChunks() self.assertEqual(50000, self.__buffer.tell()) # Next, try with auto-transfer. self.__ResetDownload(auto_transfer=True) self.__GetFile(request) self.assertEqual(50000, self.__buffer.tell()) def testSmallGzipObject(self): request = self.__GetRequest('zero-gzipd.html') self.__GetFile(request) self.assertEqual(0, self.__buffer.tell()) additional_headers = {'accept-encoding': 'gzip, deflate'} self.__download.StreamInChunks(additional_headers=additional_headers) self.assertEqual(0, self.__buffer.tell()) def testSerializedDownload(self): def _ProgressCallback(unused_response, download_object): print('Progress %s' % download_object.progress) file_contents = self.__GetTestdataFileContents('fifteen_byte_file') object_name = os.path.join(self._TESTDATA_PREFIX, 'fifteen_byte_file') request = storage.StorageObjectsGetRequest( bucket=self._DEFAULT_BUCKET, object=object_name) response = self.__client.objects.Get(request) # pylint: disable=attribute-defined-outside-init self.__buffer = six.StringIO() download_data = json.dumps({ 'auto_transfer': False, 'progress': 0, 'total_size': response.size, 'url': response.mediaLink, }) self.__download = storage.Download.FromData( self.__buffer, download_data, http=self.__client.http) self.__download.StreamInChunks(callback=_ProgressCallback) self.assertEqual(15, self.__buffer.tell()) self.__buffer.seek(0) self.assertEqual(file_contents, self.__buffer.read(15)) if __name__ == '__main__': unittest.main() PK ���Zw�T�:� :� storage_v1/storage_v1_client.pynu �[��� """Generated client library for storage version v1.""" # NOTE: This file is autogenerated and should not be edited by hand. from __future__ import absolute_import from apitools.base.py import base_api from samples.storage_sample.storage_v1 import storage_v1_messages as messages class StorageV1(base_api.BaseApiClient): """Generated client library for service storage version v1.""" MESSAGES_MODULE = messages BASE_URL = 'https://www.googleapis.com/storage/v1/' MTLS_BASE_URL = 'https://www.mtls.googleapis.com/storage/v1/' _PACKAGE = 'storage' _SCOPES = ['https://www.googleapis.com/auth/cloud-platform', 'https://www.googleapis.com/auth/cloud-platform.read-only', 'https://www.googleapis.com/auth/devstorage.full_control', 'https://www.googleapis.com/auth/devstorage.read_only', 'https://www.googleapis.com/auth/devstorage.read_write'] _VERSION = 'v1' _CLIENT_ID = 'CLIENT_ID' _CLIENT_SECRET = 'CLIENT_SECRET' _USER_AGENT = 'x_Tw5K8nnjoRAqULM9PFAC2b' _CLIENT_CLASS_NAME = 'StorageV1' _URL_VERSION = 'v1' _API_KEY = None def __init__(self, url='', credentials=None, get_credentials=True, http=None, model=None, log_request=False, log_response=False, credentials_args=None, default_global_params=None, additional_http_headers=None, response_encoding=None): """Create a new storage handle.""" url = url or self.BASE_URL super(StorageV1, self).__init__( url, credentials=credentials, get_credentials=get_credentials, http=http, model=model, log_request=log_request, log_response=log_response, credentials_args=credentials_args, default_global_params=default_global_params, additional_http_headers=additional_http_headers, response_encoding=response_encoding) self.bucketAccessControls = self.BucketAccessControlsService(self) self.buckets = self.BucketsService(self) self.channels = self.ChannelsService(self) self.defaultObjectAccessControls = self.DefaultObjectAccessControlsService(self) self.notifications = self.NotificationsService(self) self.objectAccessControls = self.ObjectAccessControlsService(self) self.objects = self.ObjectsService(self) class BucketAccessControlsService(base_api.BaseApiService): """Service class for the bucketAccessControls resource.""" _NAME = 'bucketAccessControls' def __init__(self, client): super(StorageV1.BucketAccessControlsService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): r"""Permanently deletes the ACL entry for the specified entity on the specified bucket. Args: request: (StorageBucketAccessControlsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (StorageBucketAccessControlsDeleteResponse) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method='DELETE', method_id='storage.bucketAccessControls.delete', ordered_params=['bucket', 'entity'], path_params=['bucket', 'entity'], query_params=[], relative_path='b/{bucket}/acl/{entity}', request_field='', request_type_name='StorageBucketAccessControlsDeleteRequest', response_type_name='StorageBucketAccessControlsDeleteResponse', supports_download=False, ) def Get(self, request, global_params=None): r"""Returns the ACL entry for the specified entity on the specified bucket. Args: request: (StorageBucketAccessControlsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BucketAccessControl) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.bucketAccessControls.get', ordered_params=['bucket', 'entity'], path_params=['bucket', 'entity'], query_params=[], relative_path='b/{bucket}/acl/{entity}', request_field='', request_type_name='StorageBucketAccessControlsGetRequest', response_type_name='BucketAccessControl', supports_download=False, ) def Insert(self, request, global_params=None): r"""Creates a new ACL entry on the specified bucket. Args: request: (BucketAccessControl) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BucketAccessControl) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method='POST', method_id='storage.bucketAccessControls.insert', ordered_params=['bucket'], path_params=['bucket'], query_params=[], relative_path='b/{bucket}/acl', request_field='<request>', request_type_name='BucketAccessControl', response_type_name='BucketAccessControl', supports_download=False, ) def List(self, request, global_params=None): r"""Retrieves ACL entries on the specified bucket. Args: request: (StorageBucketAccessControlsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BucketAccessControls) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.bucketAccessControls.list', ordered_params=['bucket'], path_params=['bucket'], query_params=[], relative_path='b/{bucket}/acl', request_field='', request_type_name='StorageBucketAccessControlsListRequest', response_type_name='BucketAccessControls', supports_download=False, ) def Patch(self, request, global_params=None): r"""Updates an ACL entry on the specified bucket. This method supports patch semantics. Args: request: (BucketAccessControl) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BucketAccessControl) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method='PATCH', method_id='storage.bucketAccessControls.patch', ordered_params=['bucket', 'entity'], path_params=['bucket', 'entity'], query_params=[], relative_path='b/{bucket}/acl/{entity}', request_field='<request>', request_type_name='BucketAccessControl', response_type_name='BucketAccessControl', supports_download=False, ) def Update(self, request, global_params=None): r"""Updates an ACL entry on the specified bucket. Args: request: (BucketAccessControl) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BucketAccessControl) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method='PUT', method_id='storage.bucketAccessControls.update', ordered_params=['bucket', 'entity'], path_params=['bucket', 'entity'], query_params=[], relative_path='b/{bucket}/acl/{entity}', request_field='<request>', request_type_name='BucketAccessControl', response_type_name='BucketAccessControl', supports_download=False, ) class BucketsService(base_api.BaseApiService): """Service class for the buckets resource.""" _NAME = 'buckets' def __init__(self, client): super(StorageV1.BucketsService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): r"""Permanently deletes an empty bucket. Args: request: (StorageBucketsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (StorageBucketsDeleteResponse) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method='DELETE', method_id='storage.buckets.delete', ordered_params=['bucket'], path_params=['bucket'], query_params=['ifMetagenerationMatch', 'ifMetagenerationNotMatch'], relative_path='b/{bucket}', request_field='', request_type_name='StorageBucketsDeleteRequest', response_type_name='StorageBucketsDeleteResponse', supports_download=False, ) def Get(self, request, global_params=None): r"""Returns metadata for the specified bucket. Args: request: (StorageBucketsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Bucket) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.buckets.get', ordered_params=['bucket'], path_params=['bucket'], query_params=['ifMetagenerationMatch', 'ifMetagenerationNotMatch', 'projection'], relative_path='b/{bucket}', request_field='', request_type_name='StorageBucketsGetRequest', response_type_name='Bucket', supports_download=False, ) def GetIamPolicy(self, request, global_params=None): r"""Returns an IAM policy for the specified bucket. Args: request: (StorageBucketsGetIamPolicyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Policy) The response message. """ config = self.GetMethodConfig('GetIamPolicy') return self._RunMethod( config, request, global_params=global_params) GetIamPolicy.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.buckets.getIamPolicy', ordered_params=['bucket'], path_params=['bucket'], query_params=[], relative_path='b/{bucket}/iam', request_field='', request_type_name='StorageBucketsGetIamPolicyRequest', response_type_name='Policy', supports_download=False, ) def Insert(self, request, global_params=None): r"""Creates a new bucket. Args: request: (StorageBucketsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Bucket) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method='POST', method_id='storage.buckets.insert', ordered_params=['project'], path_params=[], query_params=['predefinedAcl', 'predefinedDefaultObjectAcl', 'project', 'projection'], relative_path='b', request_field='bucket', request_type_name='StorageBucketsInsertRequest', response_type_name='Bucket', supports_download=False, ) def List(self, request, global_params=None): r"""Retrieves a list of buckets for a given project. Args: request: (StorageBucketsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Buckets) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.buckets.list', ordered_params=['project'], path_params=[], query_params=['maxResults', 'pageToken', 'prefix', 'project', 'projection'], relative_path='b', request_field='', request_type_name='StorageBucketsListRequest', response_type_name='Buckets', supports_download=False, ) def Patch(self, request, global_params=None): r"""Updates a bucket. This method supports patch semantics. Args: request: (StorageBucketsPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Bucket) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method='PATCH', method_id='storage.buckets.patch', ordered_params=['bucket'], path_params=['bucket'], query_params=['ifMetagenerationMatch', 'ifMetagenerationNotMatch', 'predefinedAcl', 'predefinedDefaultObjectAcl', 'projection'], relative_path='b/{bucket}', request_field='bucketResource', request_type_name='StorageBucketsPatchRequest', response_type_name='Bucket', supports_download=False, ) def SetIamPolicy(self, request, global_params=None): r"""Updates an IAM policy for the specified bucket. Args: request: (StorageBucketsSetIamPolicyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Policy) The response message. """ config = self.GetMethodConfig('SetIamPolicy') return self._RunMethod( config, request, global_params=global_params) SetIamPolicy.method_config = lambda: base_api.ApiMethodInfo( http_method='PUT', method_id='storage.buckets.setIamPolicy', ordered_params=['bucket'], path_params=['bucket'], query_params=[], relative_path='b/{bucket}/iam', request_field='policy', request_type_name='StorageBucketsSetIamPolicyRequest', response_type_name='Policy', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): r"""Tests a set of permissions on the given bucket to see which, if any, are held by the caller. Args: request: (StorageBucketsTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestIamPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.buckets.testIamPermissions', ordered_params=['bucket', 'permissions'], path_params=['bucket'], query_params=['permissions'], relative_path='b/{bucket}/iam/testPermissions', request_field='', request_type_name='StorageBucketsTestIamPermissionsRequest', response_type_name='TestIamPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): r"""Updates a bucket. Args: request: (StorageBucketsUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Bucket) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method='PUT', method_id='storage.buckets.update', ordered_params=['bucket'], path_params=['bucket'], query_params=['ifMetagenerationMatch', 'ifMetagenerationNotMatch', 'predefinedAcl', 'predefinedDefaultObjectAcl', 'projection'], relative_path='b/{bucket}', request_field='bucketResource', request_type_name='StorageBucketsUpdateRequest', response_type_name='Bucket', supports_download=False, ) class ChannelsService(base_api.BaseApiService): """Service class for the channels resource.""" _NAME = 'channels' def __init__(self, client): super(StorageV1.ChannelsService, self).__init__(client) self._upload_configs = { } def Stop(self, request, global_params=None): r"""Stop watching resources through this channel. Args: request: (Channel) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (StorageChannelsStopResponse) The response message. """ config = self.GetMethodConfig('Stop') return self._RunMethod( config, request, global_params=global_params) Stop.method_config = lambda: base_api.ApiMethodInfo( http_method='POST', method_id='storage.channels.stop', ordered_params=[], path_params=[], query_params=[], relative_path='channels/stop', request_field='<request>', request_type_name='Channel', response_type_name='StorageChannelsStopResponse', supports_download=False, ) class DefaultObjectAccessControlsService(base_api.BaseApiService): """Service class for the defaultObjectAccessControls resource.""" _NAME = 'defaultObjectAccessControls' def __init__(self, client): super(StorageV1.DefaultObjectAccessControlsService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): r"""Permanently deletes the default object ACL entry for the specified entity on the specified bucket. Args: request: (StorageDefaultObjectAccessControlsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (StorageDefaultObjectAccessControlsDeleteResponse) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method='DELETE', method_id='storage.defaultObjectAccessControls.delete', ordered_params=['bucket', 'entity'], path_params=['bucket', 'entity'], query_params=[], relative_path='b/{bucket}/defaultObjectAcl/{entity}', request_field='', request_type_name='StorageDefaultObjectAccessControlsDeleteRequest', response_type_name='StorageDefaultObjectAccessControlsDeleteResponse', supports_download=False, ) def Get(self, request, global_params=None): r"""Returns the default object ACL entry for the specified entity on the specified bucket. Args: request: (StorageDefaultObjectAccessControlsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ObjectAccessControl) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.defaultObjectAccessControls.get', ordered_params=['bucket', 'entity'], path_params=['bucket', 'entity'], query_params=[], relative_path='b/{bucket}/defaultObjectAcl/{entity}', request_field='', request_type_name='StorageDefaultObjectAccessControlsGetRequest', response_type_name='ObjectAccessControl', supports_download=False, ) def Insert(self, request, global_params=None): r"""Creates a new default object ACL entry on the specified bucket. Args: request: (ObjectAccessControl) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ObjectAccessControl) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method='POST', method_id='storage.defaultObjectAccessControls.insert', ordered_params=['bucket'], path_params=['bucket'], query_params=[], relative_path='b/{bucket}/defaultObjectAcl', request_field='<request>', request_type_name='ObjectAccessControl', response_type_name='ObjectAccessControl', supports_download=False, ) def List(self, request, global_params=None): r"""Retrieves default object ACL entries on the specified bucket. Args: request: (StorageDefaultObjectAccessControlsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ObjectAccessControls) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.defaultObjectAccessControls.list', ordered_params=['bucket'], path_params=['bucket'], query_params=['ifMetagenerationMatch', 'ifMetagenerationNotMatch'], relative_path='b/{bucket}/defaultObjectAcl', request_field='', request_type_name='StorageDefaultObjectAccessControlsListRequest', response_type_name='ObjectAccessControls', supports_download=False, ) def Patch(self, request, global_params=None): r"""Updates a default object ACL entry on the specified bucket. This method supports patch semantics. Args: request: (ObjectAccessControl) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ObjectAccessControl) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method='PATCH', method_id='storage.defaultObjectAccessControls.patch', ordered_params=['bucket', 'entity'], path_params=['bucket', 'entity'], query_params=[], relative_path='b/{bucket}/defaultObjectAcl/{entity}', request_field='<request>', request_type_name='ObjectAccessControl', response_type_name='ObjectAccessControl', supports_download=False, ) def Update(self, request, global_params=None): r"""Updates a default object ACL entry on the specified bucket. Args: request: (ObjectAccessControl) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ObjectAccessControl) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method='PUT', method_id='storage.defaultObjectAccessControls.update', ordered_params=['bucket', 'entity'], path_params=['bucket', 'entity'], query_params=[], relative_path='b/{bucket}/defaultObjectAcl/{entity}', request_field='<request>', request_type_name='ObjectAccessControl', response_type_name='ObjectAccessControl', supports_download=False, ) class NotificationsService(base_api.BaseApiService): """Service class for the notifications resource.""" _NAME = 'notifications' def __init__(self, client): super(StorageV1.NotificationsService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): r"""Permanently deletes a notification subscription. Args: request: (StorageNotificationsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (StorageNotificationsDeleteResponse) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method='DELETE', method_id='storage.notifications.delete', ordered_params=['notification'], path_params=['notification'], query_params=[], relative_path='notifications/{notification}', request_field='', request_type_name='StorageNotificationsDeleteRequest', response_type_name='StorageNotificationsDeleteResponse', supports_download=False, ) def Get(self, request, global_params=None): r"""View a notification configuration. Args: request: (StorageNotificationsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Notification) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.notifications.get', ordered_params=['notification'], path_params=['notification'], query_params=[], relative_path='notifications/{notification}', request_field='', request_type_name='StorageNotificationsGetRequest', response_type_name='Notification', supports_download=False, ) def Insert(self, request, global_params=None): r"""Creates a notification subscription for a given bucket. Args: request: (Notification) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Notification) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method='POST', method_id='storage.notifications.insert', ordered_params=[], path_params=[], query_params=[], relative_path='notifications', request_field='<request>', request_type_name='Notification', response_type_name='Notification', supports_download=False, ) def List(self, request, global_params=None): r"""Retrieves a list of notification subscriptions for a given bucket. Args: request: (StorageNotificationsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Notifications) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.notifications.list', ordered_params=['bucket'], path_params=[], query_params=['bucket'], relative_path='notifications', request_field='', request_type_name='StorageNotificationsListRequest', response_type_name='Notifications', supports_download=False, ) class ObjectAccessControlsService(base_api.BaseApiService): """Service class for the objectAccessControls resource.""" _NAME = 'objectAccessControls' def __init__(self, client): super(StorageV1.ObjectAccessControlsService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): r"""Permanently deletes the ACL entry for the specified entity on the specified object. Args: request: (StorageObjectAccessControlsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (StorageObjectAccessControlsDeleteResponse) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method='DELETE', method_id='storage.objectAccessControls.delete', ordered_params=['bucket', 'object', 'entity'], path_params=['bucket', 'entity', 'object'], query_params=['generation'], relative_path='b/{bucket}/o/{object}/acl/{entity}', request_field='', request_type_name='StorageObjectAccessControlsDeleteRequest', response_type_name='StorageObjectAccessControlsDeleteResponse', supports_download=False, ) def Get(self, request, global_params=None): r"""Returns the ACL entry for the specified entity on the specified object. Args: request: (StorageObjectAccessControlsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ObjectAccessControl) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.objectAccessControls.get', ordered_params=['bucket', 'object', 'entity'], path_params=['bucket', 'entity', 'object'], query_params=['generation'], relative_path='b/{bucket}/o/{object}/acl/{entity}', request_field='', request_type_name='StorageObjectAccessControlsGetRequest', response_type_name='ObjectAccessControl', supports_download=False, ) def Insert(self, request, global_params=None): r"""Creates a new ACL entry on the specified object. Args: request: (StorageObjectAccessControlsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ObjectAccessControl) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method='POST', method_id='storage.objectAccessControls.insert', ordered_params=['bucket', 'object'], path_params=['bucket', 'object'], query_params=['generation'], relative_path='b/{bucket}/o/{object}/acl', request_field='objectAccessControl', request_type_name='StorageObjectAccessControlsInsertRequest', response_type_name='ObjectAccessControl', supports_download=False, ) def List(self, request, global_params=None): r"""Retrieves ACL entries on the specified object. Args: request: (StorageObjectAccessControlsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ObjectAccessControls) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.objectAccessControls.list', ordered_params=['bucket', 'object'], path_params=['bucket', 'object'], query_params=['generation'], relative_path='b/{bucket}/o/{object}/acl', request_field='', request_type_name='StorageObjectAccessControlsListRequest', response_type_name='ObjectAccessControls', supports_download=False, ) def Patch(self, request, global_params=None): r"""Updates an ACL entry on the specified object. This method supports patch semantics. Args: request: (StorageObjectAccessControlsPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ObjectAccessControl) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method='PATCH', method_id='storage.objectAccessControls.patch', ordered_params=['bucket', 'object', 'entity'], path_params=['bucket', 'entity', 'object'], query_params=['generation'], relative_path='b/{bucket}/o/{object}/acl/{entity}', request_field='objectAccessControl', request_type_name='StorageObjectAccessControlsPatchRequest', response_type_name='ObjectAccessControl', supports_download=False, ) def Update(self, request, global_params=None): r"""Updates an ACL entry on the specified object. Args: request: (StorageObjectAccessControlsUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ObjectAccessControl) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method='PUT', method_id='storage.objectAccessControls.update', ordered_params=['bucket', 'object', 'entity'], path_params=['bucket', 'entity', 'object'], query_params=['generation'], relative_path='b/{bucket}/o/{object}/acl/{entity}', request_field='objectAccessControl', request_type_name='StorageObjectAccessControlsUpdateRequest', response_type_name='ObjectAccessControl', supports_download=False, ) class ObjectsService(base_api.BaseApiService): """Service class for the objects resource.""" _NAME = 'objects' def __init__(self, client): super(StorageV1.ObjectsService, self).__init__(client) self._upload_configs = { 'Insert': base_api.ApiUploadInfo( accept=['*/*'], max_size=None, resumable_multipart=True, resumable_path='/resumable/upload/storage/v1/b/{bucket}/o', simple_multipart=True, simple_path='/upload/storage/v1/b/{bucket}/o', ), } def Compose(self, request, global_params=None, download=None): r"""Concatenates a list of existing objects into a new object in the same bucket. Args: request: (StorageObjectsComposeRequest) input message global_params: (StandardQueryParameters, default: None) global arguments download: (Download, default: None) If present, download data from the request via this stream. Returns: (Object) The response message. """ config = self.GetMethodConfig('Compose') return self._RunMethod( config, request, global_params=global_params, download=download) Compose.method_config = lambda: base_api.ApiMethodInfo( http_method='POST', method_id='storage.objects.compose', ordered_params=['destinationBucket', 'destinationObject'], path_params=['destinationBucket', 'destinationObject'], query_params=['destinationPredefinedAcl', 'ifGenerationMatch', 'ifMetagenerationMatch'], relative_path='b/{destinationBucket}/o/{destinationObject}/compose', request_field='composeRequest', request_type_name='StorageObjectsComposeRequest', response_type_name='Object', supports_download=True, ) def Copy(self, request, global_params=None, download=None): r"""Copies a source object to a destination object. Optionally overrides metadata. Args: request: (StorageObjectsCopyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments download: (Download, default: None) If present, download data from the request via this stream. Returns: (Object) The response message. """ config = self.GetMethodConfig('Copy') return self._RunMethod( config, request, global_params=global_params, download=download) Copy.method_config = lambda: base_api.ApiMethodInfo( http_method='POST', method_id='storage.objects.copy', ordered_params=['sourceBucket', 'sourceObject', 'destinationBucket', 'destinationObject'], path_params=['destinationBucket', 'destinationObject', 'sourceBucket', 'sourceObject'], query_params=['destinationPredefinedAcl', 'ifGenerationMatch', 'ifGenerationNotMatch', 'ifMetagenerationMatch', 'ifMetagenerationNotMatch', 'ifSourceGenerationMatch', 'ifSourceGenerationNotMatch', 'ifSourceMetagenerationMatch', 'ifSourceMetagenerationNotMatch', 'projection', 'sourceGeneration'], relative_path='b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}', request_field='object', request_type_name='StorageObjectsCopyRequest', response_type_name='Object', supports_download=True, ) def Delete(self, request, global_params=None): r"""Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used. Args: request: (StorageObjectsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (StorageObjectsDeleteResponse) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method='DELETE', method_id='storage.objects.delete', ordered_params=['bucket', 'object'], path_params=['bucket', 'object'], query_params=['generation', 'ifGenerationMatch', 'ifGenerationNotMatch', 'ifMetagenerationMatch', 'ifMetagenerationNotMatch'], relative_path='b/{bucket}/o/{object}', request_field='', request_type_name='StorageObjectsDeleteRequest', response_type_name='StorageObjectsDeleteResponse', supports_download=False, ) def Get(self, request, global_params=None, download=None): r"""Retrieves an object or its metadata. Args: request: (StorageObjectsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments download: (Download, default: None) If present, download data from the request via this stream. Returns: (Object) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params, download=download) Get.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.objects.get', ordered_params=['bucket', 'object'], path_params=['bucket', 'object'], query_params=['generation', 'ifGenerationMatch', 'ifGenerationNotMatch', 'ifMetagenerationMatch', 'ifMetagenerationNotMatch', 'projection'], relative_path='b/{bucket}/o/{object}', request_field='', request_type_name='StorageObjectsGetRequest', response_type_name='Object', supports_download=True, ) def GetIamPolicy(self, request, global_params=None): r"""Returns an IAM policy for the specified object. Args: request: (StorageObjectsGetIamPolicyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Policy) The response message. """ config = self.GetMethodConfig('GetIamPolicy') return self._RunMethod( config, request, global_params=global_params) GetIamPolicy.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.objects.getIamPolicy', ordered_params=['bucket', 'object'], path_params=['bucket', 'object'], query_params=['generation'], relative_path='b/{bucket}/o/{object}/iam', request_field='', request_type_name='StorageObjectsGetIamPolicyRequest', response_type_name='Policy', supports_download=False, ) def Insert(self, request, global_params=None, upload=None, download=None): r"""Stores a new object and metadata. Args: request: (StorageObjectsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments upload: (Upload, default: None) If present, upload this stream with the request. download: (Download, default: None) If present, download data from the request via this stream. Returns: (Object) The response message. """ config = self.GetMethodConfig('Insert') upload_config = self.GetUploadConfig('Insert') return self._RunMethod( config, request, global_params=global_params, upload=upload, upload_config=upload_config, download=download) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method='POST', method_id='storage.objects.insert', ordered_params=['bucket'], path_params=['bucket'], query_params=['contentEncoding', 'ifGenerationMatch', 'ifGenerationNotMatch', 'ifMetagenerationMatch', 'ifMetagenerationNotMatch', 'name', 'predefinedAcl', 'projection'], relative_path='b/{bucket}/o', request_field='object', request_type_name='StorageObjectsInsertRequest', response_type_name='Object', supports_download=True, ) def List(self, request, global_params=None): r"""Retrieves a list of objects matching the criteria. Args: request: (StorageObjectsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Objects) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.objects.list', ordered_params=['bucket'], path_params=['bucket'], query_params=['delimiter', 'maxResults', 'pageToken', 'prefix', 'projection', 'versions'], relative_path='b/{bucket}/o', request_field='', request_type_name='StorageObjectsListRequest', response_type_name='Objects', supports_download=False, ) def Patch(self, request, global_params=None): r"""Updates an object's metadata. This method supports patch semantics. Args: request: (StorageObjectsPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Object) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method='PATCH', method_id='storage.objects.patch', ordered_params=['bucket', 'object'], path_params=['bucket', 'object'], query_params=['generation', 'ifGenerationMatch', 'ifGenerationNotMatch', 'ifMetagenerationMatch', 'ifMetagenerationNotMatch', 'predefinedAcl', 'projection'], relative_path='b/{bucket}/o/{object}', request_field='objectResource', request_type_name='StorageObjectsPatchRequest', response_type_name='Object', supports_download=False, ) def Rewrite(self, request, global_params=None): r"""Rewrites a source object to a destination object. Optionally overrides metadata. Args: request: (StorageObjectsRewriteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RewriteResponse) The response message. """ config = self.GetMethodConfig('Rewrite') return self._RunMethod( config, request, global_params=global_params) Rewrite.method_config = lambda: base_api.ApiMethodInfo( http_method='POST', method_id='storage.objects.rewrite', ordered_params=['sourceBucket', 'sourceObject', 'destinationBucket', 'destinationObject'], path_params=['destinationBucket', 'destinationObject', 'sourceBucket', 'sourceObject'], query_params=['destinationPredefinedAcl', 'ifGenerationMatch', 'ifGenerationNotMatch', 'ifMetagenerationMatch', 'ifMetagenerationNotMatch', 'ifSourceGenerationMatch', 'ifSourceGenerationNotMatch', 'ifSourceMetagenerationMatch', 'ifSourceMetagenerationNotMatch', 'maxBytesRewrittenPerCall', 'projection', 'rewriteToken', 'sourceGeneration'], relative_path='b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}', request_field='object', request_type_name='StorageObjectsRewriteRequest', response_type_name='RewriteResponse', supports_download=False, ) def SetIamPolicy(self, request, global_params=None): r"""Updates an IAM policy for the specified object. Args: request: (StorageObjectsSetIamPolicyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Policy) The response message. """ config = self.GetMethodConfig('SetIamPolicy') return self._RunMethod( config, request, global_params=global_params) SetIamPolicy.method_config = lambda: base_api.ApiMethodInfo( http_method='PUT', method_id='storage.objects.setIamPolicy', ordered_params=['bucket', 'object'], path_params=['bucket', 'object'], query_params=['generation'], relative_path='b/{bucket}/o/{object}/iam', request_field='policy', request_type_name='StorageObjectsSetIamPolicyRequest', response_type_name='Policy', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): r"""Tests a set of permissions on the given object to see which, if any, are held by the caller. Args: request: (StorageObjectsTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestIamPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method='GET', method_id='storage.objects.testIamPermissions', ordered_params=['bucket', 'object', 'permissions'], path_params=['bucket', 'object'], query_params=['generation', 'permissions'], relative_path='b/{bucket}/o/{object}/iam/testPermissions', request_field='', request_type_name='StorageObjectsTestIamPermissionsRequest', response_type_name='TestIamPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None, download=None): r"""Updates an object's metadata. Args: request: (StorageObjectsUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments download: (Download, default: None) If present, download data from the request via this stream. Returns: (Object) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params, download=download) Update.method_config = lambda: base_api.ApiMethodInfo( http_method='PUT', method_id='storage.objects.update', ordered_params=['bucket', 'object'], path_params=['bucket', 'object'], query_params=['generation', 'ifGenerationMatch', 'ifGenerationNotMatch', 'ifMetagenerationMatch', 'ifMetagenerationNotMatch', 'predefinedAcl', 'projection'], relative_path='b/{bucket}/o/{object}', request_field='objectResource', request_type_name='StorageObjectsUpdateRequest', response_type_name='Object', supports_download=True, ) def WatchAll(self, request, global_params=None): r"""Watch for changes on all objects in a bucket. Args: request: (StorageObjectsWatchAllRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Channel) The response message. """ config = self.GetMethodConfig('WatchAll') return self._RunMethod( config, request, global_params=global_params) WatchAll.method_config = lambda: base_api.ApiMethodInfo( http_method='POST', method_id='storage.objects.watchAll', ordered_params=['bucket'], path_params=['bucket'], query_params=['delimiter', 'maxResults', 'pageToken', 'prefix', 'projection', 'versions'], relative_path='b/{bucket}/o/watch', request_field='channel', request_type_name='StorageObjectsWatchAllRequest', response_type_name='Channel', supports_download=False, ) PK ���Z !��c �c ! storage_v1/storage_v1_messages.pynu �[��� """Generated message classes for storage version v1. Stores and retrieves potentially large, immutable data objects. """ # NOTE: This file is autogenerated and should not be edited by hand. from __future__ import absolute_import from apitools.base.protorpclite import message_types as _message_types from apitools.base.protorpclite import messages as _messages from apitools.base.py import encoding from apitools.base.py import extra_types package = 'storage' class Bucket(_messages.Message): r"""A bucket. Messages: CorsValueListEntry: A CorsValueListEntry object. LifecycleValue: The bucket's lifecycle configuration. See lifecycle management for more information. LoggingValue: The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. OwnerValue: The owner of the bucket. This is always the project team's owner group. VersioningValue: The bucket's versioning configuration. WebsiteValue: 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. Fields: acl: Access controls on the bucket. cors: The bucket's Cross-Origin Resource Sharing (CORS) configuration. defaultObjectAcl: Default access controls to apply to new objects when no ACL is provided. etag: HTTP 1.1 Entity tag for the bucket. id: The ID of the bucket. kind: The kind of item this is. For buckets, this is always storage#bucket. lifecycle: The bucket's lifecycle configuration. See lifecycle management for more information. location: 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. logging: The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. metageneration: The metadata generation of this bucket. name: The name of the bucket. owner: The owner of the bucket. This is always the project team's owner group. projectNumber: The project number of the project the bucket belongs to. selfLink: The URI of this bucket. storageClass: The bucket's storage class. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include STANDARD, NEARLINE and DURABLE_REDUCED_AVAILABILITY. Defaults to STANDARD. For more information, see storage classes. timeCreated: The creation time of the bucket in RFC 3339 format. updated: The modification time of the bucket in RFC 3339 format. versioning: The bucket's versioning configuration. website: 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 CorsValueListEntry(_messages.Message): r"""A CorsValueListEntry object. Fields: maxAgeSeconds: The value, in seconds, to return in the Access-Control- Max-Age header used in preflight responses. method: 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". origin: The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". responseHeader: The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. """ maxAgeSeconds = _messages.IntegerField(1, variant=_messages.Variant.INT32) method = _messages.StringField(2, repeated=True) origin = _messages.StringField(3, repeated=True) responseHeader = _messages.StringField(4, repeated=True) class LifecycleValue(_messages.Message): r"""The bucket's lifecycle configuration. See lifecycle management for more information. Messages: RuleValueListEntry: A RuleValueListEntry object. Fields: rule: A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. """ class RuleValueListEntry(_messages.Message): r"""A RuleValueListEntry object. Messages: ActionValue: The action to take. ConditionValue: The condition(s) under which the action will be taken. Fields: action: The action to take. condition: The condition(s) under which the action will be taken. """ class ActionValue(_messages.Message): r"""The action to take. Fields: type: Type of the action. Currently, only Delete is supported. """ type = _messages.StringField(1) class ConditionValue(_messages.Message): r"""The condition(s) under which the action will be taken. Fields: age: Age of an object (in days). This condition is satisfied when an object reaches the specified age. createdBefore: 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. isLive: Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. numNewerVersions: 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. """ age = _messages.IntegerField(1, variant=_messages.Variant.INT32) createdBefore = extra_types.DateField(2) isLive = _messages.BooleanField(3) numNewerVersions = _messages.IntegerField(4, variant=_messages.Variant.INT32) action = _messages.MessageField('ActionValue', 1) condition = _messages.MessageField('ConditionValue', 2) rule = _messages.MessageField('RuleValueListEntry', 1, repeated=True) class LoggingValue(_messages.Message): r"""The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. Fields: logBucket: The destination bucket where the current bucket's logs should be placed. logObjectPrefix: A prefix for log object names. """ logBucket = _messages.StringField(1) logObjectPrefix = _messages.StringField(2) class OwnerValue(_messages.Message): r"""The owner of the bucket. This is always the project team's owner group. Fields: entity: The entity, in the form project-owner-projectId. entityId: The ID for the entity. """ entity = _messages.StringField(1) entityId = _messages.StringField(2) class VersioningValue(_messages.Message): r"""The bucket's versioning configuration. Fields: enabled: While set to true, versioning is fully enabled for this bucket. """ enabled = _messages.BooleanField(1) class WebsiteValue(_messages.Message): r"""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. Fields: mainPageSuffix: 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. notFoundPage: 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. """ mainPageSuffix = _messages.StringField(1) notFoundPage = _messages.StringField(2) acl = _messages.MessageField('BucketAccessControl', 1, repeated=True) cors = _messages.MessageField('CorsValueListEntry', 2, repeated=True) defaultObjectAcl = _messages.MessageField('ObjectAccessControl', 3, repeated=True) etag = _messages.StringField(4) id = _messages.StringField(5) kind = _messages.StringField(6, default='storage#bucket') lifecycle = _messages.MessageField('LifecycleValue', 7) location = _messages.StringField(8) logging = _messages.MessageField('LoggingValue', 9) metageneration = _messages.IntegerField(10) name = _messages.StringField(11) owner = _messages.MessageField('OwnerValue', 12) projectNumber = _messages.IntegerField(13, variant=_messages.Variant.UINT64) selfLink = _messages.StringField(14) storageClass = _messages.StringField(15) timeCreated = _message_types.DateTimeField(16) updated = _message_types.DateTimeField(17) versioning = _messages.MessageField('VersioningValue', 18) website = _messages.MessageField('WebsiteValue', 19) class BucketAccessControl(_messages.Message): r"""An access-control entry. Messages: ProjectTeamValue: The project team associated with the entity, if any. Fields: bucket: The name of the bucket. domain: The domain associated with the entity, if any. email: The email address associated with the entity, if any. entity: 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. entityId: The ID for the entity, if any. etag: HTTP 1.1 Entity tag for the access-control entry. id: The ID of the access-control entry. kind: The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. projectTeam: The project team associated with the entity, if any. role: The access permission for the entity. Can be READER, WRITER, or OWNER. selfLink: The link to this access-control entry. """ class ProjectTeamValue(_messages.Message): r"""The project team associated with the entity, if any. Fields: projectNumber: The project number. team: The team. Can be owners, editors, or viewers. """ projectNumber = _messages.StringField(1) team = _messages.StringField(2) bucket = _messages.StringField(1) domain = _messages.StringField(2) email = _messages.StringField(3) entity = _messages.StringField(4) entityId = _messages.StringField(5) etag = _messages.StringField(6) id = _messages.StringField(7) kind = _messages.StringField(8, default='storage#bucketAccessControl') projectTeam = _messages.MessageField('ProjectTeamValue', 9) role = _messages.StringField(10) selfLink = _messages.StringField(11) class BucketAccessControls(_messages.Message): r"""An access-control list. Fields: items: The list of items. kind: The kind of item this is. For lists of bucket access control entries, this is always storage#bucketAccessControls. """ items = _messages.MessageField('BucketAccessControl', 1, repeated=True) kind = _messages.StringField(2, default='storage#bucketAccessControls') class Buckets(_messages.Message): r"""A list of buckets. Fields: items: The list of items. kind: The kind of item this is. For lists of buckets, this is always storage#buckets. nextPageToken: The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. """ items = _messages.MessageField('Bucket', 1, repeated=True) kind = _messages.StringField(2, default='storage#buckets') nextPageToken = _messages.StringField(3) class Channel(_messages.Message): r"""An notification channel used to watch for resource changes. Messages: ParamsValue: Additional parameters controlling delivery channel behavior. Optional. Fields: address: The address where notifications are delivered for this channel. expiration: Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. id: A UUID or similar unique string that identifies this channel. kind: Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". params: Additional parameters controlling delivery channel behavior. Optional. payload: A Boolean value to indicate whether payload is wanted. Optional. resourceId: An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. resourceUri: A version-specific identifier for the watched resource. token: An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. type: The type of delivery mechanism used for this channel. """ @encoding.MapUnrecognizedFields('additionalProperties') class ParamsValue(_messages.Message): r"""Additional parameters controlling delivery channel behavior. Optional. Messages: AdditionalProperty: An additional property for a ParamsValue object. Fields: additionalProperties: Declares a new parameter by name. """ class AdditionalProperty(_messages.Message): r"""An additional property for a ParamsValue object. Fields: key: Name of the additional property. value: A string attribute. """ key = _messages.StringField(1) value = _messages.StringField(2) additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) address = _messages.StringField(1) expiration = _messages.IntegerField(2) id = _messages.StringField(3) kind = _messages.StringField(4, default='api#channel') params = _messages.MessageField('ParamsValue', 5) payload = _messages.BooleanField(6) resourceId = _messages.StringField(7) resourceUri = _messages.StringField(8) token = _messages.StringField(9) type = _messages.StringField(10) class ComposeRequest(_messages.Message): r"""A Compose request. Messages: SourceObjectsValueListEntry: A SourceObjectsValueListEntry object. Fields: destination: Properties of the resulting object. kind: The kind of item this is. sourceObjects: The list of source objects that will be concatenated into a single object. """ class SourceObjectsValueListEntry(_messages.Message): r"""A SourceObjectsValueListEntry object. Messages: ObjectPreconditionsValue: Conditions that must be met for this operation to execute. Fields: generation: The generation of this object to use as the source. name: The source object's name. The source object's bucket is implicitly the destination bucket. objectPreconditions: Conditions that must be met for this operation to execute. """ class ObjectPreconditionsValue(_messages.Message): r"""Conditions that must be met for this operation to execute. Fields: ifGenerationMatch: 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. """ ifGenerationMatch = _messages.IntegerField(1) generation = _messages.IntegerField(1) name = _messages.StringField(2) objectPreconditions = _messages.MessageField('ObjectPreconditionsValue', 3) destination = _messages.MessageField('Object', 1) kind = _messages.StringField(2, default='storage#composeRequest') sourceObjects = _messages.MessageField('SourceObjectsValueListEntry', 3, repeated=True) class Notification(_messages.Message): r"""A subscription to receive Google PubSub notifications. Messages: CustomAttributesValue: An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. Fields: bucket: The name of the bucket this subscription is particular to. custom_attributes: An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. etag: HTTP 1.1 Entity tag for this subscription notification. event_types: If present, only send notifications about listed event types. If empty, sent notifications for all event types. id: The ID of the notification. kind: The kind of item this is. For notifications, this is always storage#notification. object_metadata_format: If payload_content is OBJECT_METADATA, controls the format of that metadata. Otherwise, must not be set. object_name_prefix: If present, only apply this notification configuration to object names that begin with this prefix. payload_content: The desired content of the Payload. Defaults to OBJECT_METADATA. selfLink: The canonical URL of this notification. topic: The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project- identifier}/topics/{my-topic}' """ @encoding.MapUnrecognizedFields('additionalProperties') class CustomAttributesValue(_messages.Message): r"""An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. Messages: AdditionalProperty: An additional property for a CustomAttributesValue object. Fields: additionalProperties: Additional properties of type CustomAttributesValue """ class AdditionalProperty(_messages.Message): r"""An additional property for a CustomAttributesValue object. Fields: key: Name of the additional property. value: A string attribute. """ key = _messages.StringField(1) value = _messages.StringField(2) additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) bucket = _messages.StringField(1) custom_attributes = _messages.MessageField('CustomAttributesValue', 2) etag = _messages.StringField(3) event_types = _messages.StringField(4, repeated=True) id = _messages.StringField(5) kind = _messages.StringField(6, default='storage#notification') object_metadata_format = _messages.StringField(7, default='JSON_API_V1') object_name_prefix = _messages.StringField(8) payload_content = _messages.StringField(9, default='OBJECT_METADATA') selfLink = _messages.StringField(10) topic = _messages.StringField(11) class Notifications(_messages.Message): r"""A list of notification subscriptions. Fields: items: The list of items. kind: The kind of item this is. For lists of notifications, this is always storage#notifications. """ items = _messages.MessageField('Notification', 1, repeated=True) kind = _messages.StringField(2, default='storage#notifications') class Object(_messages.Message): r"""An object. Messages: CustomerEncryptionValue: Metadata of customer-supplied encryption key, if the object is encrypted by such a key. MetadataValue: User-provided metadata, in key/value pairs. OwnerValue: The owner of the object. This will always be the uploader of the object. Fields: acl: Access controls on the object. bucket: The name of the bucket containing this object. cacheControl: Cache-Control directive for the object data. componentCount: Number of underlying components that make up this object. Components are accumulated by compose operations. contentDisposition: Content-Disposition of the object data. contentEncoding: Content-Encoding of the object data. contentLanguage: Content-Language of the object data. contentType: Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream. crc32c: 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. customerEncryption: Metadata of customer-supplied encryption key, if the object is encrypted by such a key. etag: HTTP 1.1 Entity tag for the object. generation: The content generation of this object. Used for object versioning. id: The ID of the object. kind: The kind of item this is. For objects, this is always storage#object. md5Hash: MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. mediaLink: Media download link. metadata: User-provided metadata, in key/value pairs. metageneration: 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. name: The name of this object. Required if not specified by URL parameter. owner: The owner of the object. This will always be the uploader of the object. selfLink: The link to this object. size: Content-Length of the data in bytes. storageClass: Storage class of the object. timeCreated: The creation time of the object in RFC 3339 format. timeDeleted: 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. updated: The modification time of the object metadata in RFC 3339 format. """ class CustomerEncryptionValue(_messages.Message): r"""Metadata of customer-supplied encryption key, if the object is encrypted by such a key. Fields: encryptionAlgorithm: The encryption algorithm. keySha256: SHA256 hash value of the encryption key. """ encryptionAlgorithm = _messages.StringField(1) keySha256 = _messages.StringField(2) @encoding.MapUnrecognizedFields('additionalProperties') class MetadataValue(_messages.Message): r"""User-provided metadata, in key/value pairs. Messages: AdditionalProperty: An additional property for a MetadataValue object. Fields: additionalProperties: An individual metadata entry. """ class AdditionalProperty(_messages.Message): r"""An additional property for a MetadataValue object. Fields: key: Name of the additional property. value: A string attribute. """ key = _messages.StringField(1) value = _messages.StringField(2) additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) class OwnerValue(_messages.Message): r"""The owner of the object. This will always be the uploader of the object. Fields: entity: The entity, in the form user-userId. entityId: The ID for the entity. """ entity = _messages.StringField(1) entityId = _messages.StringField(2) acl = _messages.MessageField('ObjectAccessControl', 1, repeated=True) bucket = _messages.StringField(2) cacheControl = _messages.StringField(3) componentCount = _messages.IntegerField(4, variant=_messages.Variant.INT32) contentDisposition = _messages.StringField(5) contentEncoding = _messages.StringField(6) contentLanguage = _messages.StringField(7) contentType = _messages.StringField(8) crc32c = _messages.StringField(9) customerEncryption = _messages.MessageField('CustomerEncryptionValue', 10) etag = _messages.StringField(11) generation = _messages.IntegerField(12) id = _messages.StringField(13) kind = _messages.StringField(14, default='storage#object') md5Hash = _messages.StringField(15) mediaLink = _messages.StringField(16) metadata = _messages.MessageField('MetadataValue', 17) metageneration = _messages.IntegerField(18) name = _messages.StringField(19) owner = _messages.MessageField('OwnerValue', 20) selfLink = _messages.StringField(21) size = _messages.IntegerField(22, variant=_messages.Variant.UINT64) storageClass = _messages.StringField(23) timeCreated = _message_types.DateTimeField(24) timeDeleted = _message_types.DateTimeField(25) updated = _message_types.DateTimeField(26) class ObjectAccessControl(_messages.Message): r"""An access-control entry. Messages: ProjectTeamValue: The project team associated with the entity, if any. Fields: bucket: The name of the bucket. domain: The domain associated with the entity, if any. email: The email address associated with the entity, if any. entity: 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. entityId: The ID for the entity, if any. etag: HTTP 1.1 Entity tag for the access-control entry. generation: The content generation of the object. id: The ID of the access-control entry. kind: The kind of item this is. For object access control entries, this is always storage#objectAccessControl. object: The name of the object. projectTeam: The project team associated with the entity, if any. role: The access permission for the entity. Can be READER or OWNER. selfLink: The link to this access-control entry. """ class ProjectTeamValue(_messages.Message): r"""The project team associated with the entity, if any. Fields: projectNumber: The project number. team: The team. Can be owners, editors, or viewers. """ projectNumber = _messages.StringField(1) team = _messages.StringField(2) bucket = _messages.StringField(1) domain = _messages.StringField(2) email = _messages.StringField(3) entity = _messages.StringField(4) entityId = _messages.StringField(5) etag = _messages.StringField(6) generation = _messages.IntegerField(7) id = _messages.StringField(8) kind = _messages.StringField(9, default='storage#objectAccessControl') object = _messages.StringField(10) projectTeam = _messages.MessageField('ProjectTeamValue', 11) role = _messages.StringField(12) selfLink = _messages.StringField(13) class ObjectAccessControls(_messages.Message): r"""An access-control list. Fields: items: The list of items. kind: The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls. """ items = _messages.MessageField('extra_types.JsonValue', 1, repeated=True) kind = _messages.StringField(2, default='storage#objectAccessControls') class Objects(_messages.Message): r"""A list of objects. Fields: items: The list of items. kind: The kind of item this is. For lists of objects, this is always storage#objects. nextPageToken: The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. prefixes: The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter. """ items = _messages.MessageField('Object', 1, repeated=True) kind = _messages.StringField(2, default='storage#objects') nextPageToken = _messages.StringField(3) prefixes = _messages.StringField(4, repeated=True) class Policy(_messages.Message): r"""A bucket/object IAM policy. Messages: BindingsValueListEntry: A BindingsValueListEntry object. Fields: bindings: An association between a role, which comes with a set of permissions, and members who may assume that role. etag: HTTP 1.1 Entity tag for the policy. kind: The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. resourceId: The ID of the resource to which this policy belongs. Will be of the form buckets/bucket for buckets, and buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. """ class BindingsValueListEntry(_messages.Message): r"""A BindingsValueListEntry object. Fields: members: 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 role: 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. """ members = _messages.StringField(1, repeated=True) role = _messages.StringField(2) bindings = _messages.MessageField('BindingsValueListEntry', 1, repeated=True) etag = _messages.BytesField(2) kind = _messages.StringField(3, default='storage#policy') resourceId = _messages.StringField(4) class RewriteResponse(_messages.Message): r"""A rewrite response. Fields: done: true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response. kind: The kind of item this is. objectSize: The total size of the object being copied in bytes. This property is always present in the response. resource: A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes. rewriteToken: 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. totalBytesRewritten: 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. """ done = _messages.BooleanField(1) kind = _messages.StringField(2, default='storage#rewriteResponse') objectSize = _messages.IntegerField(3, variant=_messages.Variant.UINT64) resource = _messages.MessageField('Object', 4) rewriteToken = _messages.StringField(5) totalBytesRewritten = _messages.IntegerField(6, variant=_messages.Variant.UINT64) class StandardQueryParameters(_messages.Message): r"""Query parameters accepted by all methods. Enums: AltValueValuesEnum: Data format for the response. Fields: alt: Data format for the response. fields: Selector specifying which fields to include in a partial response. key: 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. oauth_token: OAuth 2.0 token for the current user. prettyPrint: Returns response with indentations and line breaks. quotaUser: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. trace: A tracing token of the form "token:<tokenid>" to include in api requests. userIp: IP address of the site where the request originates. Use this if you want to enforce per-user limits. """ class AltValueValuesEnum(_messages.Enum): r"""Data format for the response. Values: json: Responses with Content-Type of application/json """ json = 0 alt = _messages.EnumField('AltValueValuesEnum', 1, default='json') fields = _messages.StringField(2) key = _messages.StringField(3) oauth_token = _messages.StringField(4) prettyPrint = _messages.BooleanField(5, default=True) quotaUser = _messages.StringField(6) trace = _messages.StringField(7) userIp = _messages.StringField(8) class StorageBucketAccessControlsDeleteRequest(_messages.Message): r"""A StorageBucketAccessControlsDeleteRequest object. Fields: bucket: Name of a bucket. entity: The entity holding the permission. Can be user-userId, user- emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. """ bucket = _messages.StringField(1, required=True) entity = _messages.StringField(2, required=True) class StorageBucketAccessControlsDeleteResponse(_messages.Message): r"""An empty StorageBucketAccessControlsDelete response.""" class StorageBucketAccessControlsGetRequest(_messages.Message): r"""A StorageBucketAccessControlsGetRequest object. Fields: bucket: Name of a bucket. entity: The entity holding the permission. Can be user-userId, user- emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. """ bucket = _messages.StringField(1, required=True) entity = _messages.StringField(2, required=True) class StorageBucketAccessControlsListRequest(_messages.Message): r"""A StorageBucketAccessControlsListRequest object. Fields: bucket: Name of a bucket. """ bucket = _messages.StringField(1, required=True) class StorageBucketsDeleteRequest(_messages.Message): r"""A StorageBucketsDeleteRequest object. Fields: bucket: Name of a bucket. ifMetagenerationMatch: If set, only deletes the bucket if its metageneration matches this value. ifMetagenerationNotMatch: If set, only deletes the bucket if its metageneration does not match this value. """ bucket = _messages.StringField(1, required=True) ifMetagenerationMatch = _messages.IntegerField(2) ifMetagenerationNotMatch = _messages.IntegerField(3) class StorageBucketsDeleteResponse(_messages.Message): r"""An empty StorageBucketsDelete response.""" class StorageBucketsGetIamPolicyRequest(_messages.Message): r"""A StorageBucketsGetIamPolicyRequest object. Fields: bucket: Name of a bucket. """ bucket = _messages.StringField(1, required=True) class StorageBucketsGetRequest(_messages.Message): r"""A StorageBucketsGetRequest object. Enums: ProjectionValueValuesEnum: Set of properties to return. Defaults to noAcl. Fields: bucket: Name of a bucket. ifMetagenerationMatch: Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. ifMetagenerationNotMatch: Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. projection: Set of properties to return. Defaults to noAcl. """ class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to noAcl. Values: full: Include all properties. noAcl: Omit owner, acl and defaultObjectAcl properties. """ full = 0 noAcl = 1 bucket = _messages.StringField(1, required=True) ifMetagenerationMatch = _messages.IntegerField(2) ifMetagenerationNotMatch = _messages.IntegerField(3) projection = _messages.EnumField('ProjectionValueValuesEnum', 4) class StorageBucketsInsertRequest(_messages.Message): r"""A StorageBucketsInsertRequest object. Enums: PredefinedAclValueValuesEnum: Apply a predefined set of access controls to this bucket. PredefinedDefaultObjectAclValueValuesEnum: Apply a predefined set of default object access controls to this bucket. ProjectionValueValuesEnum: Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full. Fields: bucket: A Bucket resource to be passed as the request body. predefinedAcl: Apply a predefined set of access controls to this bucket. predefinedDefaultObjectAcl: Apply a predefined set of default object access controls to this bucket. project: A valid API project identifier. projection: Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full. """ class PredefinedAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of access controls to this bucket. Values: authenticatedRead: Project team owners get OWNER access, and allAuthenticatedUsers get READER access. private: Project team owners get OWNER access. projectPrivate: Project team members get access according to their roles. publicRead: Project team owners get OWNER access, and allUsers get READER access. publicReadWrite: Project team owners get OWNER access, and allUsers get WRITER access. """ authenticatedRead = 0 private = 1 projectPrivate = 2 publicRead = 3 publicReadWrite = 4 class PredefinedDefaultObjectAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of default object access controls to this bucket. Values: authenticatedRead: Object owner gets OWNER access, and allAuthenticatedUsers get READER access. bucketOwnerFullControl: Object owner gets OWNER access, and project team owners get OWNER access. bucketOwnerRead: Object owner gets OWNER access, and project team owners get READER access. private: Object owner gets OWNER access. projectPrivate: Object owner gets OWNER access, and project team members get access according to their roles. publicRead: Object owner gets OWNER access, and allUsers get READER access. """ authenticatedRead = 0 bucketOwnerFullControl = 1 bucketOwnerRead = 2 private = 3 projectPrivate = 4 publicRead = 5 class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full. Values: full: Include all properties. noAcl: Omit owner, acl and defaultObjectAcl properties. """ full = 0 noAcl = 1 bucket = _messages.MessageField('Bucket', 1) predefinedAcl = _messages.EnumField('PredefinedAclValueValuesEnum', 2) predefinedDefaultObjectAcl = _messages.EnumField('PredefinedDefaultObjectAclValueValuesEnum', 3) project = _messages.StringField(4, required=True) projection = _messages.EnumField('ProjectionValueValuesEnum', 5) class StorageBucketsListRequest(_messages.Message): r"""A StorageBucketsListRequest object. Enums: ProjectionValueValuesEnum: Set of properties to return. Defaults to noAcl. Fields: maxResults: Maximum number of buckets to return. pageToken: A previously-returned page token representing part of the larger set of results to view. prefix: Filter results to buckets whose names begin with this prefix. project: A valid API project identifier. projection: Set of properties to return. Defaults to noAcl. """ class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to noAcl. Values: full: Include all properties. noAcl: Omit owner, acl and defaultObjectAcl properties. """ full = 0 noAcl = 1 maxResults = _messages.IntegerField(1, variant=_messages.Variant.UINT32) pageToken = _messages.StringField(2) prefix = _messages.StringField(3) project = _messages.StringField(4, required=True) projection = _messages.EnumField('ProjectionValueValuesEnum', 5) class StorageBucketsPatchRequest(_messages.Message): r"""A StorageBucketsPatchRequest object. Enums: PredefinedAclValueValuesEnum: Apply a predefined set of access controls to this bucket. PredefinedDefaultObjectAclValueValuesEnum: Apply a predefined set of default object access controls to this bucket. ProjectionValueValuesEnum: Set of properties to return. Defaults to full. Fields: bucket: Name of a bucket. bucketResource: A Bucket resource to be passed as the request body. ifMetagenerationMatch: Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. ifMetagenerationNotMatch: Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. predefinedAcl: Apply a predefined set of access controls to this bucket. predefinedDefaultObjectAcl: Apply a predefined set of default object access controls to this bucket. projection: Set of properties to return. Defaults to full. """ class PredefinedAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of access controls to this bucket. Values: authenticatedRead: Project team owners get OWNER access, and allAuthenticatedUsers get READER access. private: Project team owners get OWNER access. projectPrivate: Project team members get access according to their roles. publicRead: Project team owners get OWNER access, and allUsers get READER access. publicReadWrite: Project team owners get OWNER access, and allUsers get WRITER access. """ authenticatedRead = 0 private = 1 projectPrivate = 2 publicRead = 3 publicReadWrite = 4 class PredefinedDefaultObjectAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of default object access controls to this bucket. Values: authenticatedRead: Object owner gets OWNER access, and allAuthenticatedUsers get READER access. bucketOwnerFullControl: Object owner gets OWNER access, and project team owners get OWNER access. bucketOwnerRead: Object owner gets OWNER access, and project team owners get READER access. private: Object owner gets OWNER access. projectPrivate: Object owner gets OWNER access, and project team members get access according to their roles. publicRead: Object owner gets OWNER access, and allUsers get READER access. """ authenticatedRead = 0 bucketOwnerFullControl = 1 bucketOwnerRead = 2 private = 3 projectPrivate = 4 publicRead = 5 class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to full. Values: full: Include all properties. noAcl: Omit owner, acl and defaultObjectAcl properties. """ full = 0 noAcl = 1 bucket = _messages.StringField(1, required=True) bucketResource = _messages.MessageField('Bucket', 2) ifMetagenerationMatch = _messages.IntegerField(3) ifMetagenerationNotMatch = _messages.IntegerField(4) predefinedAcl = _messages.EnumField('PredefinedAclValueValuesEnum', 5) predefinedDefaultObjectAcl = _messages.EnumField('PredefinedDefaultObjectAclValueValuesEnum', 6) projection = _messages.EnumField('ProjectionValueValuesEnum', 7) class StorageBucketsSetIamPolicyRequest(_messages.Message): r"""A StorageBucketsSetIamPolicyRequest object. Fields: bucket: Name of a bucket. policy: A Policy resource to be passed as the request body. """ bucket = _messages.StringField(1, required=True) policy = _messages.MessageField('Policy', 2) class StorageBucketsTestIamPermissionsRequest(_messages.Message): r"""A StorageBucketsTestIamPermissionsRequest object. Fields: bucket: Name of a bucket. permissions: Permissions to test. """ bucket = _messages.StringField(1, required=True) permissions = _messages.StringField(2, required=True) class StorageBucketsUpdateRequest(_messages.Message): r"""A StorageBucketsUpdateRequest object. Enums: PredefinedAclValueValuesEnum: Apply a predefined set of access controls to this bucket. PredefinedDefaultObjectAclValueValuesEnum: Apply a predefined set of default object access controls to this bucket. ProjectionValueValuesEnum: Set of properties to return. Defaults to full. Fields: bucket: Name of a bucket. bucketResource: A Bucket resource to be passed as the request body. ifMetagenerationMatch: Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. ifMetagenerationNotMatch: Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. predefinedAcl: Apply a predefined set of access controls to this bucket. predefinedDefaultObjectAcl: Apply a predefined set of default object access controls to this bucket. projection: Set of properties to return. Defaults to full. """ class PredefinedAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of access controls to this bucket. Values: authenticatedRead: Project team owners get OWNER access, and allAuthenticatedUsers get READER access. private: Project team owners get OWNER access. projectPrivate: Project team members get access according to their roles. publicRead: Project team owners get OWNER access, and allUsers get READER access. publicReadWrite: Project team owners get OWNER access, and allUsers get WRITER access. """ authenticatedRead = 0 private = 1 projectPrivate = 2 publicRead = 3 publicReadWrite = 4 class PredefinedDefaultObjectAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of default object access controls to this bucket. Values: authenticatedRead: Object owner gets OWNER access, and allAuthenticatedUsers get READER access. bucketOwnerFullControl: Object owner gets OWNER access, and project team owners get OWNER access. bucketOwnerRead: Object owner gets OWNER access, and project team owners get READER access. private: Object owner gets OWNER access. projectPrivate: Object owner gets OWNER access, and project team members get access according to their roles. publicRead: Object owner gets OWNER access, and allUsers get READER access. """ authenticatedRead = 0 bucketOwnerFullControl = 1 bucketOwnerRead = 2 private = 3 projectPrivate = 4 publicRead = 5 class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to full. Values: full: Include all properties. noAcl: Omit owner, acl and defaultObjectAcl properties. """ full = 0 noAcl = 1 bucket = _messages.StringField(1, required=True) bucketResource = _messages.MessageField('Bucket', 2) ifMetagenerationMatch = _messages.IntegerField(3) ifMetagenerationNotMatch = _messages.IntegerField(4) predefinedAcl = _messages.EnumField('PredefinedAclValueValuesEnum', 5) predefinedDefaultObjectAcl = _messages.EnumField('PredefinedDefaultObjectAclValueValuesEnum', 6) projection = _messages.EnumField('ProjectionValueValuesEnum', 7) class StorageChannelsStopResponse(_messages.Message): r"""An empty StorageChannelsStop response.""" class StorageDefaultObjectAccessControlsDeleteRequest(_messages.Message): r"""A StorageDefaultObjectAccessControlsDeleteRequest object. Fields: bucket: Name of a bucket. entity: The entity holding the permission. Can be user-userId, user- emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. """ bucket = _messages.StringField(1, required=True) entity = _messages.StringField(2, required=True) class StorageDefaultObjectAccessControlsDeleteResponse(_messages.Message): r"""An empty StorageDefaultObjectAccessControlsDelete response.""" class StorageDefaultObjectAccessControlsGetRequest(_messages.Message): r"""A StorageDefaultObjectAccessControlsGetRequest object. Fields: bucket: Name of a bucket. entity: The entity holding the permission. Can be user-userId, user- emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. """ bucket = _messages.StringField(1, required=True) entity = _messages.StringField(2, required=True) class StorageDefaultObjectAccessControlsListRequest(_messages.Message): r"""A StorageDefaultObjectAccessControlsListRequest object. Fields: bucket: Name of a bucket. ifMetagenerationMatch: If present, only return default ACL listing if the bucket's current metageneration matches this value. ifMetagenerationNotMatch: If present, only return default ACL listing if the bucket's current metageneration does not match the given value. """ bucket = _messages.StringField(1, required=True) ifMetagenerationMatch = _messages.IntegerField(2) ifMetagenerationNotMatch = _messages.IntegerField(3) class StorageNotificationsDeleteRequest(_messages.Message): r"""A StorageNotificationsDeleteRequest object. Fields: notification: ID of the notification to delete. """ notification = _messages.StringField(1, required=True) class StorageNotificationsDeleteResponse(_messages.Message): r"""An empty StorageNotificationsDelete response.""" class StorageNotificationsGetRequest(_messages.Message): r"""A StorageNotificationsGetRequest object. Fields: notification: Notification ID """ notification = _messages.StringField(1, required=True) class StorageNotificationsListRequest(_messages.Message): r"""A StorageNotificationsListRequest object. Fields: bucket: Name of a GCS bucket. """ bucket = _messages.StringField(1, required=True) class StorageObjectAccessControlsDeleteRequest(_messages.Message): r"""A StorageObjectAccessControlsDeleteRequest object. Fields: bucket: Name of a bucket. entity: The entity holding the permission. Can be user-userId, user- emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. """ bucket = _messages.StringField(1, required=True) entity = _messages.StringField(2, required=True) generation = _messages.IntegerField(3) object = _messages.StringField(4, required=True) class StorageObjectAccessControlsDeleteResponse(_messages.Message): r"""An empty StorageObjectAccessControlsDelete response.""" class StorageObjectAccessControlsGetRequest(_messages.Message): r"""A StorageObjectAccessControlsGetRequest object. Fields: bucket: Name of a bucket. entity: The entity holding the permission. Can be user-userId, user- emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. """ bucket = _messages.StringField(1, required=True) entity = _messages.StringField(2, required=True) generation = _messages.IntegerField(3) object = _messages.StringField(4, required=True) class StorageObjectAccessControlsInsertRequest(_messages.Message): r"""A StorageObjectAccessControlsInsertRequest object. Fields: bucket: Name of a bucket. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. objectAccessControl: A ObjectAccessControl resource to be passed as the request body. """ bucket = _messages.StringField(1, required=True) generation = _messages.IntegerField(2) object = _messages.StringField(3, required=True) objectAccessControl = _messages.MessageField('ObjectAccessControl', 4) class StorageObjectAccessControlsListRequest(_messages.Message): r"""A StorageObjectAccessControlsListRequest object. Fields: bucket: Name of a bucket. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. """ bucket = _messages.StringField(1, required=True) generation = _messages.IntegerField(2) object = _messages.StringField(3, required=True) class StorageObjectAccessControlsPatchRequest(_messages.Message): r"""A StorageObjectAccessControlsPatchRequest object. Fields: bucket: Name of a bucket. entity: The entity holding the permission. Can be user-userId, user- emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. objectAccessControl: A ObjectAccessControl resource to be passed as the request body. """ bucket = _messages.StringField(1, required=True) entity = _messages.StringField(2, required=True) generation = _messages.IntegerField(3) object = _messages.StringField(4, required=True) objectAccessControl = _messages.MessageField('ObjectAccessControl', 5) class StorageObjectAccessControlsUpdateRequest(_messages.Message): r"""A StorageObjectAccessControlsUpdateRequest object. Fields: bucket: Name of a bucket. entity: The entity holding the permission. Can be user-userId, user- emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. objectAccessControl: A ObjectAccessControl resource to be passed as the request body. """ bucket = _messages.StringField(1, required=True) entity = _messages.StringField(2, required=True) generation = _messages.IntegerField(3) object = _messages.StringField(4, required=True) objectAccessControl = _messages.MessageField('ObjectAccessControl', 5) class StorageObjectsComposeRequest(_messages.Message): r"""A StorageObjectsComposeRequest object. Enums: DestinationPredefinedAclValueValuesEnum: Apply a predefined set of access controls to the destination object. Fields: composeRequest: A ComposeRequest resource to be passed as the request body. destinationBucket: Name of the bucket in which to store the new object. destinationObject: Name of the new object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. destinationPredefinedAcl: Apply a predefined set of access controls to the destination object. ifGenerationMatch: Makes the operation conditional on whether the object's current generation matches the given value. ifMetagenerationMatch: Makes the operation conditional on whether the object's current metageneration matches the given value. """ class DestinationPredefinedAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of access controls to the destination object. Values: authenticatedRead: Object owner gets OWNER access, and allAuthenticatedUsers get READER access. bucketOwnerFullControl: Object owner gets OWNER access, and project team owners get OWNER access. bucketOwnerRead: Object owner gets OWNER access, and project team owners get READER access. private: Object owner gets OWNER access. projectPrivate: Object owner gets OWNER access, and project team members get access according to their roles. publicRead: Object owner gets OWNER access, and allUsers get READER access. """ authenticatedRead = 0 bucketOwnerFullControl = 1 bucketOwnerRead = 2 private = 3 projectPrivate = 4 publicRead = 5 composeRequest = _messages.MessageField('ComposeRequest', 1) destinationBucket = _messages.StringField(2, required=True) destinationObject = _messages.StringField(3, required=True) destinationPredefinedAcl = _messages.EnumField('DestinationPredefinedAclValueValuesEnum', 4) ifGenerationMatch = _messages.IntegerField(5) ifMetagenerationMatch = _messages.IntegerField(6) class StorageObjectsCopyRequest(_messages.Message): r"""A StorageObjectsCopyRequest object. Enums: DestinationPredefinedAclValueValuesEnum: Apply a predefined set of access controls to the destination object. ProjectionValueValuesEnum: Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. Fields: destinationBucket: 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. destinationObject: Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. destinationPredefinedAcl: Apply a predefined set of access controls to the destination object. ifGenerationMatch: Makes the operation conditional on whether the destination object's current generation matches the given value. ifGenerationNotMatch: Makes the operation conditional on whether the destination object's current generation does not match the given value. ifMetagenerationMatch: Makes the operation conditional on whether the destination object's current metageneration matches the given value. ifMetagenerationNotMatch: Makes the operation conditional on whether the destination object's current metageneration does not match the given value. ifSourceGenerationMatch: Makes the operation conditional on whether the source object's generation matches the given value. ifSourceGenerationNotMatch: Makes the operation conditional on whether the source object's generation does not match the given value. ifSourceMetagenerationMatch: Makes the operation conditional on whether the source object's current metageneration matches the given value. ifSourceMetagenerationNotMatch: Makes the operation conditional on whether the source object's current metageneration does not match the given value. object: A Object resource to be passed as the request body. projection: Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. sourceBucket: Name of the bucket in which to find the source object. sourceGeneration: If present, selects a specific revision of the source object (as opposed to the latest version, the default). sourceObject: Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. """ class DestinationPredefinedAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of access controls to the destination object. Values: authenticatedRead: Object owner gets OWNER access, and allAuthenticatedUsers get READER access. bucketOwnerFullControl: Object owner gets OWNER access, and project team owners get OWNER access. bucketOwnerRead: Object owner gets OWNER access, and project team owners get READER access. private: Object owner gets OWNER access. projectPrivate: Object owner gets OWNER access, and project team members get access according to their roles. publicRead: Object owner gets OWNER access, and allUsers get READER access. """ authenticatedRead = 0 bucketOwnerFullControl = 1 bucketOwnerRead = 2 private = 3 projectPrivate = 4 publicRead = 5 class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. Values: full: Include all properties. noAcl: Omit the owner, acl property. """ full = 0 noAcl = 1 destinationBucket = _messages.StringField(1, required=True) destinationObject = _messages.StringField(2, required=True) destinationPredefinedAcl = _messages.EnumField('DestinationPredefinedAclValueValuesEnum', 3) ifGenerationMatch = _messages.IntegerField(4) ifGenerationNotMatch = _messages.IntegerField(5) ifMetagenerationMatch = _messages.IntegerField(6) ifMetagenerationNotMatch = _messages.IntegerField(7) ifSourceGenerationMatch = _messages.IntegerField(8) ifSourceGenerationNotMatch = _messages.IntegerField(9) ifSourceMetagenerationMatch = _messages.IntegerField(10) ifSourceMetagenerationNotMatch = _messages.IntegerField(11) object = _messages.MessageField('Object', 12) projection = _messages.EnumField('ProjectionValueValuesEnum', 13) sourceBucket = _messages.StringField(14, required=True) sourceGeneration = _messages.IntegerField(15) sourceObject = _messages.StringField(16, required=True) class StorageObjectsDeleteRequest(_messages.Message): r"""A StorageObjectsDeleteRequest object. Fields: bucket: Name of the bucket in which the object resides. generation: If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default). ifGenerationMatch: Makes the operation conditional on whether the object's current generation matches the given value. ifGenerationNotMatch: Makes the operation conditional on whether the object's current generation does not match the given value. ifMetagenerationMatch: Makes the operation conditional on whether the object's current metageneration matches the given value. ifMetagenerationNotMatch: Makes the operation conditional on whether the object's current metageneration does not match the given value. object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. """ bucket = _messages.StringField(1, required=True) generation = _messages.IntegerField(2) ifGenerationMatch = _messages.IntegerField(3) ifGenerationNotMatch = _messages.IntegerField(4) ifMetagenerationMatch = _messages.IntegerField(5) ifMetagenerationNotMatch = _messages.IntegerField(6) object = _messages.StringField(7, required=True) class StorageObjectsDeleteResponse(_messages.Message): r"""An empty StorageObjectsDelete response.""" class StorageObjectsGetIamPolicyRequest(_messages.Message): r"""A StorageObjectsGetIamPolicyRequest object. Fields: bucket: Name of the bucket in which the object resides. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. """ bucket = _messages.StringField(1, required=True) generation = _messages.IntegerField(2) object = _messages.StringField(3, required=True) class StorageObjectsGetRequest(_messages.Message): r"""A StorageObjectsGetRequest object. Enums: ProjectionValueValuesEnum: Set of properties to return. Defaults to noAcl. Fields: bucket: Name of the bucket in which the object resides. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). ifGenerationMatch: Makes the operation conditional on whether the object's generation matches the given value. ifGenerationNotMatch: Makes the operation conditional on whether the object's generation does not match the given value. ifMetagenerationMatch: Makes the operation conditional on whether the object's current metageneration matches the given value. ifMetagenerationNotMatch: Makes the operation conditional on whether the object's current metageneration does not match the given value. object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. projection: Set of properties to return. Defaults to noAcl. """ class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to noAcl. Values: full: Include all properties. noAcl: Omit the owner, acl property. """ full = 0 noAcl = 1 bucket = _messages.StringField(1, required=True) generation = _messages.IntegerField(2) ifGenerationMatch = _messages.IntegerField(3) ifGenerationNotMatch = _messages.IntegerField(4) ifMetagenerationMatch = _messages.IntegerField(5) ifMetagenerationNotMatch = _messages.IntegerField(6) object = _messages.StringField(7, required=True) projection = _messages.EnumField('ProjectionValueValuesEnum', 8) class StorageObjectsInsertRequest(_messages.Message): r"""A StorageObjectsInsertRequest object. Enums: PredefinedAclValueValuesEnum: Apply a predefined set of access controls to this object. ProjectionValueValuesEnum: Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. Fields: bucket: Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. contentEncoding: 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. ifGenerationMatch: Makes the operation conditional on whether the object's current generation matches the given value. ifGenerationNotMatch: Makes the operation conditional on whether the object's current generation does not match the given value. ifMetagenerationMatch: Makes the operation conditional on whether the object's current metageneration matches the given value. ifMetagenerationNotMatch: Makes the operation conditional on whether the object's current metageneration does not match the given value. 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. object: A Object resource to be passed as the request body. predefinedAcl: Apply a predefined set of access controls to this object. projection: Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. """ class PredefinedAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of access controls to this object. Values: authenticatedRead: Object owner gets OWNER access, and allAuthenticatedUsers get READER access. bucketOwnerFullControl: Object owner gets OWNER access, and project team owners get OWNER access. bucketOwnerRead: Object owner gets OWNER access, and project team owners get READER access. private: Object owner gets OWNER access. projectPrivate: Object owner gets OWNER access, and project team members get access according to their roles. publicRead: Object owner gets OWNER access, and allUsers get READER access. """ authenticatedRead = 0 bucketOwnerFullControl = 1 bucketOwnerRead = 2 private = 3 projectPrivate = 4 publicRead = 5 class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. Values: full: Include all properties. noAcl: Omit the owner, acl property. """ full = 0 noAcl = 1 bucket = _messages.StringField(1, required=True) contentEncoding = _messages.StringField(2) ifGenerationMatch = _messages.IntegerField(3) ifGenerationNotMatch = _messages.IntegerField(4) ifMetagenerationMatch = _messages.IntegerField(5) ifMetagenerationNotMatch = _messages.IntegerField(6) name = _messages.StringField(7) object = _messages.MessageField('Object', 8) predefinedAcl = _messages.EnumField('PredefinedAclValueValuesEnum', 9) projection = _messages.EnumField('ProjectionValueValuesEnum', 10) class StorageObjectsListRequest(_messages.Message): r"""A StorageObjectsListRequest object. Enums: ProjectionValueValuesEnum: Set of properties to return. Defaults to noAcl. Fields: bucket: Name of the bucket in which to look for objects. 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. maxResults: Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. The default value of this parameter is 1,000 items. pageToken: A previously-returned page token representing part of the larger set of results to view. prefix: Filter results to objects whose names begin with this prefix. projection: Set of properties to return. Defaults to noAcl. versions: If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning. """ class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to noAcl. Values: full: Include all properties. noAcl: Omit the owner, acl property. """ full = 0 noAcl = 1 bucket = _messages.StringField(1, required=True) delimiter = _messages.StringField(2) maxResults = _messages.IntegerField(3, variant=_messages.Variant.UINT32) pageToken = _messages.StringField(4) prefix = _messages.StringField(5) projection = _messages.EnumField('ProjectionValueValuesEnum', 6) versions = _messages.BooleanField(7) class StorageObjectsPatchRequest(_messages.Message): r"""A StorageObjectsPatchRequest object. Enums: PredefinedAclValueValuesEnum: Apply a predefined set of access controls to this object. ProjectionValueValuesEnum: Set of properties to return. Defaults to full. Fields: bucket: Name of the bucket in which the object resides. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). ifGenerationMatch: Makes the operation conditional on whether the object's current generation matches the given value. ifGenerationNotMatch: Makes the operation conditional on whether the object's current generation does not match the given value. ifMetagenerationMatch: Makes the operation conditional on whether the object's current metageneration matches the given value. ifMetagenerationNotMatch: Makes the operation conditional on whether the object's current metageneration does not match the given value. object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. objectResource: A Object resource to be passed as the request body. predefinedAcl: Apply a predefined set of access controls to this object. projection: Set of properties to return. Defaults to full. """ class PredefinedAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of access controls to this object. Values: authenticatedRead: Object owner gets OWNER access, and allAuthenticatedUsers get READER access. bucketOwnerFullControl: Object owner gets OWNER access, and project team owners get OWNER access. bucketOwnerRead: Object owner gets OWNER access, and project team owners get READER access. private: Object owner gets OWNER access. projectPrivate: Object owner gets OWNER access, and project team members get access according to their roles. publicRead: Object owner gets OWNER access, and allUsers get READER access. """ authenticatedRead = 0 bucketOwnerFullControl = 1 bucketOwnerRead = 2 private = 3 projectPrivate = 4 publicRead = 5 class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to full. Values: full: Include all properties. noAcl: Omit the owner, acl property. """ full = 0 noAcl = 1 bucket = _messages.StringField(1, required=True) generation = _messages.IntegerField(2) ifGenerationMatch = _messages.IntegerField(3) ifGenerationNotMatch = _messages.IntegerField(4) ifMetagenerationMatch = _messages.IntegerField(5) ifMetagenerationNotMatch = _messages.IntegerField(6) object = _messages.StringField(7, required=True) objectResource = _messages.MessageField('Object', 8) predefinedAcl = _messages.EnumField('PredefinedAclValueValuesEnum', 9) projection = _messages.EnumField('ProjectionValueValuesEnum', 10) class StorageObjectsRewriteRequest(_messages.Message): r"""A StorageObjectsRewriteRequest object. Enums: DestinationPredefinedAclValueValuesEnum: Apply a predefined set of access controls to the destination object. ProjectionValueValuesEnum: Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. Fields: destinationBucket: Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. destinationObject: 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. destinationPredefinedAcl: Apply a predefined set of access controls to the destination object. ifGenerationMatch: Makes the operation conditional on whether the destination object's current generation matches the given value. ifGenerationNotMatch: Makes the operation conditional on whether the destination object's current generation does not match the given value. ifMetagenerationMatch: Makes the operation conditional on whether the destination object's current metageneration matches the given value. ifMetagenerationNotMatch: Makes the operation conditional on whether the destination object's current metageneration does not match the given value. ifSourceGenerationMatch: Makes the operation conditional on whether the source object's generation matches the given value. ifSourceGenerationNotMatch: Makes the operation conditional on whether the source object's generation does not match the given value. ifSourceMetagenerationMatch: Makes the operation conditional on whether the source object's current metageneration matches the given value. ifSourceMetagenerationNotMatch: Makes the operation conditional on whether the source object's current metageneration does not match the given value. maxBytesRewrittenPerCall: 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. object: A Object resource to be passed as the request body. projection: Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. rewriteToken: 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. sourceBucket: Name of the bucket in which to find the source object. sourceGeneration: If present, selects a specific revision of the source object (as opposed to the latest version, the default). sourceObject: Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. """ class DestinationPredefinedAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of access controls to the destination object. Values: authenticatedRead: Object owner gets OWNER access, and allAuthenticatedUsers get READER access. bucketOwnerFullControl: Object owner gets OWNER access, and project team owners get OWNER access. bucketOwnerRead: Object owner gets OWNER access, and project team owners get READER access. private: Object owner gets OWNER access. projectPrivate: Object owner gets OWNER access, and project team members get access according to their roles. publicRead: Object owner gets OWNER access, and allUsers get READER access. """ authenticatedRead = 0 bucketOwnerFullControl = 1 bucketOwnerRead = 2 private = 3 projectPrivate = 4 publicRead = 5 class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. Values: full: Include all properties. noAcl: Omit the owner, acl property. """ full = 0 noAcl = 1 destinationBucket = _messages.StringField(1, required=True) destinationObject = _messages.StringField(2, required=True) destinationPredefinedAcl = _messages.EnumField('DestinationPredefinedAclValueValuesEnum', 3) ifGenerationMatch = _messages.IntegerField(4) ifGenerationNotMatch = _messages.IntegerField(5) ifMetagenerationMatch = _messages.IntegerField(6) ifMetagenerationNotMatch = _messages.IntegerField(7) ifSourceGenerationMatch = _messages.IntegerField(8) ifSourceGenerationNotMatch = _messages.IntegerField(9) ifSourceMetagenerationMatch = _messages.IntegerField(10) ifSourceMetagenerationNotMatch = _messages.IntegerField(11) maxBytesRewrittenPerCall = _messages.IntegerField(12) object = _messages.MessageField('Object', 13) projection = _messages.EnumField('ProjectionValueValuesEnum', 14) rewriteToken = _messages.StringField(15) sourceBucket = _messages.StringField(16, required=True) sourceGeneration = _messages.IntegerField(17) sourceObject = _messages.StringField(18, required=True) class StorageObjectsSetIamPolicyRequest(_messages.Message): r"""A StorageObjectsSetIamPolicyRequest object. Fields: bucket: Name of the bucket in which the object resides. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. policy: A Policy resource to be passed as the request body. """ bucket = _messages.StringField(1, required=True) generation = _messages.IntegerField(2) object = _messages.StringField(3, required=True) policy = _messages.MessageField('Policy', 4) class StorageObjectsTestIamPermissionsRequest(_messages.Message): r"""A StorageObjectsTestIamPermissionsRequest object. Fields: bucket: Name of the bucket in which the object resides. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. permissions: Permissions to test. """ bucket = _messages.StringField(1, required=True) generation = _messages.IntegerField(2) object = _messages.StringField(3, required=True) permissions = _messages.StringField(4, required=True) class StorageObjectsUpdateRequest(_messages.Message): r"""A StorageObjectsUpdateRequest object. Enums: PredefinedAclValueValuesEnum: Apply a predefined set of access controls to this object. ProjectionValueValuesEnum: Set of properties to return. Defaults to full. Fields: bucket: Name of the bucket in which the object resides. generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). ifGenerationMatch: Makes the operation conditional on whether the object's current generation matches the given value. ifGenerationNotMatch: Makes the operation conditional on whether the object's current generation does not match the given value. ifMetagenerationMatch: Makes the operation conditional on whether the object's current metageneration matches the given value. ifMetagenerationNotMatch: Makes the operation conditional on whether the object's current metageneration does not match the given value. object: Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. objectResource: A Object resource to be passed as the request body. predefinedAcl: Apply a predefined set of access controls to this object. projection: Set of properties to return. Defaults to full. """ class PredefinedAclValueValuesEnum(_messages.Enum): r"""Apply a predefined set of access controls to this object. Values: authenticatedRead: Object owner gets OWNER access, and allAuthenticatedUsers get READER access. bucketOwnerFullControl: Object owner gets OWNER access, and project team owners get OWNER access. bucketOwnerRead: Object owner gets OWNER access, and project team owners get READER access. private: Object owner gets OWNER access. projectPrivate: Object owner gets OWNER access, and project team members get access according to their roles. publicRead: Object owner gets OWNER access, and allUsers get READER access. """ authenticatedRead = 0 bucketOwnerFullControl = 1 bucketOwnerRead = 2 private = 3 projectPrivate = 4 publicRead = 5 class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to full. Values: full: Include all properties. noAcl: Omit the owner, acl property. """ full = 0 noAcl = 1 bucket = _messages.StringField(1, required=True) generation = _messages.IntegerField(2) ifGenerationMatch = _messages.IntegerField(3) ifGenerationNotMatch = _messages.IntegerField(4) ifMetagenerationMatch = _messages.IntegerField(5) ifMetagenerationNotMatch = _messages.IntegerField(6) object = _messages.StringField(7, required=True) objectResource = _messages.MessageField('Object', 8) predefinedAcl = _messages.EnumField('PredefinedAclValueValuesEnum', 9) projection = _messages.EnumField('ProjectionValueValuesEnum', 10) class StorageObjectsWatchAllRequest(_messages.Message): r"""A StorageObjectsWatchAllRequest object. Enums: ProjectionValueValuesEnum: Set of properties to return. Defaults to noAcl. Fields: bucket: Name of the bucket in which to look for objects. channel: A Channel resource to be passed as the request body. 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. maxResults: Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. The default value of this parameter is 1,000 items. pageToken: A previously-returned page token representing part of the larger set of results to view. prefix: Filter results to objects whose names begin with this prefix. projection: Set of properties to return. Defaults to noAcl. versions: If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning. """ class ProjectionValueValuesEnum(_messages.Enum): r"""Set of properties to return. Defaults to noAcl. Values: full: Include all properties. noAcl: Omit the owner, acl property. """ full = 0 noAcl = 1 bucket = _messages.StringField(1, required=True) channel = _messages.MessageField('Channel', 2) delimiter = _messages.StringField(3) maxResults = _messages.IntegerField(4, variant=_messages.Variant.UINT32) pageToken = _messages.StringField(5) prefix = _messages.StringField(6) projection = _messages.EnumField('ProjectionValueValuesEnum', 7) versions = _messages.BooleanField(8) class TestIamPermissionsResponse(_messages.Message): r"""A storage.(buckets|objects).testIamPermissions response. Fields: kind: The kind of item this is. permissions: 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. """ kind = _messages.StringField(1, default='storage#testIamPermissionsResponse') permissions = _messages.StringField(2, repeated=True) PK ���Z� �ԇ � storage_v1/__init__.pynu �[��� """Package marker file.""" from __future__ import absolute_import import pkgutil __path__ = pkgutil.extend_path(__path__, __name__) PK ���Z�%�e{ { uploads_test.pynu �[��� # # Copyright 2015 Google Inc. # # 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. """Integration tests for uploading and downloading to GCS. These tests exercise most of the corner cases for upload/download of files in apitools, via GCS. There are no performance tests here yet. """ import json import os import random import string import unittest import six from apitools.base.py import transfer import storage _CLIENT = None def _GetClient(): global _CLIENT # pylint: disable=global-statement if _CLIENT is None: _CLIENT = storage.StorageV1() return _CLIENT class UploadsTest(unittest.TestCase): _DEFAULT_BUCKET = 'apitools' _TESTDATA_PREFIX = 'uploads' def setUp(self): self.__client = _GetClient() self.__files = [] self.__content = '' self.__buffer = None self.__upload = None def tearDown(self): self.__DeleteFiles() def __ResetUpload(self, size, auto_transfer=True): self.__content = ''.join( random.choice(string.ascii_letters) for _ in range(size)) self.__buffer = six.StringIO(self.__content) self.__upload = storage.Upload.FromStream( self.__buffer, 'text/plain', auto_transfer=auto_transfer) def __DeleteFiles(self): for filename in self.__files: self.__DeleteFile(filename) def __DeleteFile(self, filename): object_name = os.path.join(self._TESTDATA_PREFIX, filename) req = storage.StorageObjectsDeleteRequest( bucket=self._DEFAULT_BUCKET, object=object_name) self.__client.objects.Delete(req) def __InsertRequest(self, filename): object_name = os.path.join(self._TESTDATA_PREFIX, filename) return storage.StorageObjectsInsertRequest( name=object_name, bucket=self._DEFAULT_BUCKET) def __GetRequest(self, filename): object_name = os.path.join(self._TESTDATA_PREFIX, filename) return storage.StorageObjectsGetRequest( object=object_name, bucket=self._DEFAULT_BUCKET) def __InsertFile(self, filename, request=None): if request is None: request = self.__InsertRequest(filename) response = self.__client.objects.Insert(request, upload=self.__upload) self.assertIsNotNone(response) self.__files.append(filename) return response def testZeroBytes(self): filename = 'zero_byte_file' self.__ResetUpload(0) response = self.__InsertFile(filename) self.assertEqual(0, response.size) def testSimpleUpload(self): filename = 'fifteen_byte_file' self.__ResetUpload(15) response = self.__InsertFile(filename) self.assertEqual(15, response.size) def testMultipartUpload(self): filename = 'fifteen_byte_file' self.__ResetUpload(15) request = self.__InsertRequest(filename) request.object = storage.Object(contentLanguage='en') response = self.__InsertFile(filename, request=request) self.assertEqual(15, response.size) self.assertEqual('en', response.contentLanguage) def testAutoUpload(self): filename = 'ten_meg_file' size = 10 << 20 self.__ResetUpload(size) request = self.__InsertRequest(filename) response = self.__InsertFile(filename, request=request) self.assertEqual(size, response.size) def testStreamMedia(self): filename = 'ten_meg_file' size = 10 << 20 self.__ResetUpload(size, auto_transfer=False) self.__upload.strategy = 'resumable' self.__upload.total_size = size request = self.__InsertRequest(filename) initial_response = self.__client.objects.Insert( request, upload=self.__upload) self.assertIsNotNone(initial_response) self.assertEqual(0, self.__buffer.tell()) self.__upload.StreamMedia() self.assertEqual(size, self.__buffer.tell()) def testBreakAndResumeUpload(self): filename = ('ten_meg_file_' + ''.join(random.sample(string.ascii_letters, 5))) size = 10 << 20 self.__ResetUpload(size, auto_transfer=False) self.__upload.strategy = 'resumable' self.__upload.total_size = size # Start the upload request = self.__InsertRequest(filename) initial_response = self.__client.objects.Insert( request, upload=self.__upload) self.assertIsNotNone(initial_response) self.assertEqual(0, self.__buffer.tell()) # Pretend the process died, and resume with a new attempt at the # same upload. upload_data = json.dumps(self.__upload.serialization_data) second_upload_attempt = transfer.Upload.FromData( self.__buffer, upload_data, self.__upload.http) second_upload_attempt._Upload__SendChunk(0) self.assertEqual(second_upload_attempt.chunksize, self.__buffer.tell()) # Simulate a third try, and stream from there. final_upload_attempt = transfer.Upload.FromData( self.__buffer, upload_data, self.__upload.http) final_upload_attempt.StreamInChunks() self.assertEqual(size, self.__buffer.tell()) # Verify the upload object_info = self.__client.objects.Get(self.__GetRequest(filename)) self.assertEqual(size, object_info.size) # Confirm that a new attempt successfully does nothing. completed_upload_attempt = transfer.Upload.FromData( self.__buffer, upload_data, self.__upload.http) self.assertTrue(completed_upload_attempt.complete) completed_upload_attempt.StreamInChunks() # Verify the upload didn't pick up extra bytes. object_info = self.__client.objects.Get(self.__GetRequest(filename)) self.assertEqual(size, object_info.size) # TODO(craigcitro): Add tests for callbacks (especially around # finish callback). if __name__ == '__main__': unittest.main() PK ���Z�en testdata/fifteen_byte_filenu �[��� a ab abc abcde PK ���Z�en testdata/filename_with_spacesnu �[��� a ab abc abcde PK ���Z���+� � generate_clients.shnu �[��� #!/bin/bash # # Copyright 2015 Google Inc. # # 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. gen_client --discovery_url=storage.v1 --overwrite --outdir=storage --root_package=. client PK ���Z�d�s� s� storage_v1.jsonnu �[��� PK ���ZwJ1 �� downloads_test.pynu �[��� PK ���Zw�T�:� :� � storage_v1/storage_v1_client.pynu �[��� PK ���Z !��c �c ! �� storage_v1/storage_v1_messages.pynu �[��� PK ���Z� �ԇ � � storage_v1/__init__.pynu �[��� PK ���Z�%�e{ { h uploads_test.pynu �[��� PK ���Z�en "* testdata/fifteen_byte_filenu �[��� PK ���Z�en {* testdata/filename_with_spacesnu �[��� PK ���Z���+� � �* generate_clients.shnu �[��� PK �-
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings