gogol-storage-0.0.1: Google Cloud Storage JSON SDK.

Copyright(c) 2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.Resource.Storage.Objects.Rewrite

Contents

Description

Rewrites a source object to a destination object. Optionally overrides metadata.

See: Cloud Storage JSON API Reference for storage.objects.rewrite.

Synopsis

REST Resource

type ObjectsRewriteResource = "storage" :> ("v1" :> ("b" :> (Capture "sourceBucket" Text :> ("o" :> (Capture "sourceObject" Text :> ("rewriteTo" :> ("b" :> (Capture "destinationBucket" Text :> ("o" :> (Capture "destinationObject" Text :> (QueryParam "destinationPredefinedAcl" ObjectsRewriteDestinationPredefinedACL :> (QueryParam "ifSourceGenerationMatch" (Textual Int64) :> (QueryParam "ifMetagenerationMatch" (Textual Int64) :> (QueryParam "ifGenerationNotMatch" (Textual Int64) :> (QueryParam "ifSourceMetagenerationNotMatch" (Textual Int64) :> (QueryParam "ifSourceMetagenerationMatch" (Textual Int64) :> (QueryParam "ifGenerationMatch" (Textual Int64) :> (QueryParam "maxBytesRewrittenPerCall" (Textual Int64) :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "ifSourceGenerationNotMatch" (Textual Int64) :> (QueryParam "projection" ObjectsRewriteProjection :> (QueryParam "sourceGeneration" (Textual Int64) :> (QueryParam "rewriteToken" Text :> (QueryParam "alt" AltJSON :> (ReqBody `[JSON]` Object :> Post `[JSON]` RewriteResponse))))))))))))))))))))))))) Source

A resource alias for storage.objects.rewrite method which the ObjectsRewrite request conforms to.

Creating a Request

data ObjectsRewrite Source

Rewrites a source object to a destination object. Optionally overrides metadata.

See: objectsRewrite smart constructor.

Request Lenses

orDestinationPredefinedACL :: Lens' ObjectsRewrite (Maybe ObjectsRewriteDestinationPredefinedACL) Source

Apply a predefined set of access controls to the destination object.

orIfSourceGenerationMatch :: Lens' ObjectsRewrite (Maybe Int64) Source

Makes the operation conditional on whether the source object's generation matches the given value.

orIfMetagenerationMatch :: Lens' ObjectsRewrite (Maybe Int64) Source

Makes the operation conditional on whether the destination object's current metageneration matches the given value.

orIfGenerationNotMatch :: Lens' ObjectsRewrite (Maybe Int64) Source

Makes the operation conditional on whether the destination object's current generation does not match the given value.

orIfSourceMetagenerationNotMatch :: Lens' ObjectsRewrite (Maybe Int64) Source

Makes the operation conditional on whether the source object's current metageneration does not match the given value.

orIfSourceMetagenerationMatch :: Lens' ObjectsRewrite (Maybe Int64) Source

Makes the operation conditional on whether the source object's current metageneration matches the given value.

orIfGenerationMatch :: Lens' ObjectsRewrite (Maybe Int64) Source

Makes the operation conditional on whether the destination object's current generation matches the given value.

orSourceObject :: Lens' ObjectsRewrite Text Source

Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

orMaxBytesRewrittenPerCall :: Lens' ObjectsRewrite (Maybe Int64) Source

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.

orSourceBucket :: Lens' ObjectsRewrite Text Source

Name of the bucket in which to find the source object.

orPayload :: Lens' ObjectsRewrite Object Source

Multipart request metadata.

orDestinationBucket :: Lens' ObjectsRewrite Text Source

Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.

orIfMetagenerationNotMatch :: Lens' ObjectsRewrite (Maybe Int64) Source

Makes the operation conditional on whether the destination object's current metageneration does not match the given value.

orIfSourceGenerationNotMatch :: Lens' ObjectsRewrite (Maybe Int64) Source

Makes the operation conditional on whether the source object's generation does not match the given value.

orProjection :: Lens' ObjectsRewrite (Maybe ObjectsRewriteProjection) Source

Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.

orSourceGeneration :: Lens' ObjectsRewrite (Maybe Int64) Source

If present, selects a specific revision of the source object (as opposed to the latest version, the default).

orRewriteToken :: Lens' ObjectsRewrite (Maybe Text) Source

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.

orDestinationObject :: Lens' ObjectsRewrite Text Source

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.