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

Copyright(c) 2015-2016 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.

Instances

Eq ObjectsCopy Source # 
Data ObjectsCopy Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ObjectsCopy -> c ObjectsCopy #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ObjectsCopy #

toConstr :: ObjectsCopy -> Constr #

dataTypeOf :: ObjectsCopy -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ObjectsCopy) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ObjectsCopy) #

gmapT :: (forall b. Data b => b -> b) -> ObjectsCopy -> ObjectsCopy #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ObjectsCopy -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ObjectsCopy -> r #

gmapQ :: (forall d. Data d => d -> u) -> ObjectsCopy -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ObjectsCopy -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ObjectsCopy -> m ObjectsCopy #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ObjectsCopy -> m ObjectsCopy #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ObjectsCopy -> m ObjectsCopy #

Show ObjectsCopy Source # 
Generic ObjectsCopy Source # 

Associated Types

type Rep ObjectsCopy :: * -> * #

GoogleRequest ObjectsCopy Source # 

Associated Types

type Rs ObjectsCopy :: * #

type Scopes ObjectsCopy :: [Symbol] #

GoogleRequest (MediaDownload ObjectsCopy) Source # 
type Rep ObjectsCopy Source # 
type Rep ObjectsCopy = D1 (MetaData "ObjectsCopy" "Network.Google.Resource.Storage.Objects.Copy" "gogol-storage-0.3.0-DGwRnfj7WmaH5CaBqC8AR9" False) (C1 (MetaCons "ObjectsCopy'" PrefixI True) ((:*:) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_ocDestinationPredefinedACL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsCopyDestinationPredefinedACL))) (S1 (MetaSel (Just Symbol "_ocIfSourceGenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))))) ((:*:) (S1 (MetaSel (Just Symbol "_ocIfMetagenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_ocIfGenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_ocIfSourceMetagenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_ocIfSourceMetagenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))))) ((:*:) (S1 (MetaSel (Just Symbol "_ocIfGenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_ocSourceObject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_ocSourceBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_ocPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Object))) ((:*:) (S1 (MetaSel (Just Symbol "_ocDestinationBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_ocIfMetagenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_ocIfSourceGenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_ocProjection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsCopyProjection)))) ((:*:) (S1 (MetaSel (Just Symbol "_ocSourceGeneration") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_ocDestinationObject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))))
type Scopes ObjectsCopy Source # 
type Scopes ObjectsCopy = (:) Symbol "https://www.googleapis.com/auth/cloud-platform" ((:) Symbol "https://www.googleapis.com/auth/devstorage.full_control" ((:) Symbol "https://www.googleapis.com/auth/devstorage.read_write" ([] Symbol)))
type Rs ObjectsCopy Source # 
type Scopes (MediaDownload ObjectsCopy) Source # 
type Rs (MediaDownload ObjectsCopy) Source # 

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.