gogol-storage-0.4.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 "userProject" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "ifSourceGenerationNotMatch" (Textual Int64) :> (QueryParam "projection" ObjectsCopyProjection :> (QueryParam "sourceGeneration" (Textual Int64) :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Object :> Post '[JSON] Object)))))))))))))))))))))))) 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 # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Copy

Data ObjectsCopy Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Copy

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 # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Copy

Generic ObjectsCopy Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Copy

Associated Types

type Rep ObjectsCopy :: Type -> Type #

GoogleRequest ObjectsCopy Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Copy

Associated Types

type Rs ObjectsCopy :: Type #

type Scopes ObjectsCopy :: [Symbol] #

type Rep ObjectsCopy Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Copy

type Rep ObjectsCopy = D1 (MetaData "ObjectsCopy" "Network.Google.Resource.Storage.Objects.Copy" "gogol-storage-0.4.0-F1QXZopXJqf9Y2QJKwfuR3" False) (C1 (MetaCons "ObjectsCopy'" PrefixI True) ((((S1 (MetaSel (Just "_ocDestinationPredefinedACL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsCopyDestinationPredefinedACL)) :*: S1 (MetaSel (Just "_ocIfSourceGenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) :*: (S1 (MetaSel (Just "_ocIfMetagenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: S1 (MetaSel (Just "_ocIfGenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))))) :*: ((S1 (MetaSel (Just "_ocIfSourceMetagenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: S1 (MetaSel (Just "_ocIfSourceMetagenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) :*: (S1 (MetaSel (Just "_ocIfGenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: S1 (MetaSel (Just "_ocSourceObject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))) :*: (((S1 (MetaSel (Just "_ocSourceBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_ocPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Object)) :*: (S1 (MetaSel (Just "_ocUserProject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_ocDestinationBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) :*: ((S1 (MetaSel (Just "_ocIfMetagenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: S1 (MetaSel (Just "_ocIfSourceGenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) :*: (S1 (MetaSel (Just "_ocProjection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsCopyProjection)) :*: (S1 (MetaSel (Just "_ocSourceGeneration") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: S1 (MetaSel (Just "_ocDestinationObject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))))
type Scopes ObjectsCopy Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Copy

type Scopes ObjectsCopy = "https://www.googleapis.com/auth/cloud-platform" ': ("https://www.googleapis.com/auth/devstorage.full_control" ': ("https://www.googleapis.com/auth/devstorage.read_write" ': ([] :: [Symbol])))
type Rs ObjectsCopy Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Copy

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 current 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. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

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. Setting to 0 makes the operation succeed only if there are no live versions of the object.

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.

ocUserProject :: Lens' ObjectsCopy (Maybe Text) Source #

The project to be billed for this request. Required for Requester Pays buckets.

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