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.Copy

Contents

Description

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

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

Synopsis

REST Resource

type ObjectsCopyResource = ("storage" :> ("v1" :> ("b" :> (Capture "sourceBucket" Text :> ("o" :> (Capture "sourceObject" Text :> ("copyTo" :> ("b" :> (Capture "destinationBucket" Text :> ("o" :> (Capture "destinationObject" Text :> (QueryParam "destinationPredefinedAcl" ObjectsCopyDestinationPredefinedACL :> (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 "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "ifSourceGenerationNotMatch" (Textual Int64) :> (QueryParam "projection" ObjectsCopyProjection :> (QueryParam "sourceGeneration" (Textual Int64) :> (QueryParam "alt" AltJSON :> (ReqBody `[JSON]` Object :> Post `[JSON]` Object)))))))))))))))))))))))) :<|> ("storage" :> ("v1" :> ("b" :> (Capture "sourceBucket" Text :> ("o" :> (Capture "sourceObject" Text :> ("copyTo" :> ("b" :> (Capture "destinationBucket" Text :> ("o" :> (Capture "destinationObject" Text :> (QueryParam "destinationPredefinedAcl" ObjectsCopyDestinationPredefinedACL :> (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 "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "ifSourceGenerationNotMatch" (Textual Int64) :> (QueryParam "projection" ObjectsCopyProjection :> (QueryParam "sourceGeneration" (Textual Int64) :> (QueryParam "alt" AltMedia :> Post `[OctetStream]` Stream))))))))))))))))))))))) Source

A resource alias for storage.objects.copy method which the ObjectsCopy request conforms to.

Creating a Request

data ObjectsCopy Source

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

See: objectsCopy smart constructor.

Request Lenses

ocDestinationPredefinedACL :: Lens' ObjectsCopy (Maybe ObjectsCopyDestinationPredefinedACL) Source

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

ocIfSourceGenerationMatch :: Lens' ObjectsCopy (Maybe Int64) Source

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

ocIfMetagenerationMatch :: Lens' ObjectsCopy (Maybe Int64) Source

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

ocIfGenerationNotMatch :: Lens' ObjectsCopy (Maybe Int64) Source

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

ocIfSourceMetagenerationNotMatch :: Lens' ObjectsCopy (Maybe Int64) Source

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

ocIfSourceMetagenerationMatch :: Lens' ObjectsCopy (Maybe Int64) Source

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

ocIfGenerationMatch :: Lens' ObjectsCopy (Maybe Int64) Source

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

ocSourceObject :: Lens' ObjectsCopy 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.

ocSourceBucket :: Lens' ObjectsCopy Text Source

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

ocPayload :: Lens' ObjectsCopy Object Source

Multipart request metadata.

ocDestinationBucket :: Lens' ObjectsCopy Text Source

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.

ocIfMetagenerationNotMatch :: Lens' ObjectsCopy (Maybe Int64) Source

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

ocIfSourceGenerationNotMatch :: Lens' ObjectsCopy (Maybe Int64) Source

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

ocProjection :: Lens' ObjectsCopy (Maybe ObjectsCopyProjection) Source

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

ocSourceGeneration :: Lens' ObjectsCopy (Maybe Int64) Source

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

ocDestinationObject :: Lens' ObjectsCopy 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.