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.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 "userProject" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "ifSourceGenerationNotMatch" (Textual Int64) :> (QueryParam "projection" ObjectsRewriteProjection :> (QueryParam "sourceGeneration" (Textual Int64) :> (QueryParam "destinationKmsKeyName" Text :> (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.

Instances
Eq ObjectsRewrite Source # 
Instance details

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

Data ObjectsRewrite Source # 
Instance details

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

Methods

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

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

toConstr :: ObjectsRewrite -> Constr #

dataTypeOf :: ObjectsRewrite -> DataType #

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

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

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

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

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

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

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

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

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

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

Show ObjectsRewrite Source # 
Instance details

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

Generic ObjectsRewrite Source # 
Instance details

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

Associated Types

type Rep ObjectsRewrite :: Type -> Type #

GoogleRequest ObjectsRewrite Source # 
Instance details

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

Associated Types

type Rs ObjectsRewrite :: Type #

type Scopes ObjectsRewrite :: [Symbol] #

type Rep ObjectsRewrite Source # 
Instance details

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

type Rep ObjectsRewrite = D1 (MetaData "ObjectsRewrite" "Network.Google.Resource.Storage.Objects.Rewrite" "gogol-storage-0.4.0-F1QXZopXJqf9Y2QJKwfuR3" False) (C1 (MetaCons "ObjectsRewrite'" PrefixI True) ((((S1 (MetaSel (Just "_orDestinationPredefinedACL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsRewriteDestinationPredefinedACL)) :*: S1 (MetaSel (Just "_orIfSourceGenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) :*: (S1 (MetaSel (Just "_orIfMetagenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: (S1 (MetaSel (Just "_orIfGenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: S1 (MetaSel (Just "_orIfSourceMetagenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))))) :*: ((S1 (MetaSel (Just "_orIfSourceMetagenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: S1 (MetaSel (Just "_orIfGenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) :*: (S1 (MetaSel (Just "_orSourceObject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: (S1 (MetaSel (Just "_orMaxBytesRewrittenPerCall") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: S1 (MetaSel (Just "_orSourceBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))) :*: (((S1 (MetaSel (Just "_orPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Object) :*: S1 (MetaSel (Just "_orUserProject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_orDestinationBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: (S1 (MetaSel (Just "_orIfMetagenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: S1 (MetaSel (Just "_orIfSourceGenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))))) :*: ((S1 (MetaSel (Just "_orProjection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsRewriteProjection)) :*: S1 (MetaSel (Just "_orSourceGeneration") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) :*: (S1 (MetaSel (Just "_orDestinationKmsKeyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_orRewriteToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_orDestinationObject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))))
type Scopes ObjectsRewrite Source # 
Instance details

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

type Scopes ObjectsRewrite = "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 ObjectsRewrite Source # 
Instance details

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

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

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

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.

orUserProject :: Lens' ObjectsRewrite (Maybe Text) Source #

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

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

orDestinationKmsKeyName :: Lens' ObjectsRewrite (Maybe Text) Source #

Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.

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.