gogol-storage-0.1.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 "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.

Instances

Eq ObjectsRewrite Source # 
Data ObjectsRewrite Source # 

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 # 
Generic ObjectsRewrite Source # 

Associated Types

type Rep ObjectsRewrite :: * -> * #

GoogleRequest ObjectsRewrite Source # 
type Rep ObjectsRewrite Source # 
type Rep ObjectsRewrite = D1 (MetaData "ObjectsRewrite" "Network.Google.Resource.Storage.Objects.Rewrite" "gogol-storage-0.1.0-L0T4EMtUjHX8jDbB9PaYdJ" False) (C1 (MetaCons "ObjectsRewrite'" PrefixI True) ((:*:) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_orDestinationPredefinedACL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsRewriteDestinationPredefinedACL))) (S1 (MetaSel (Just Symbol "_orIfSourceGenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))))) ((:*:) (S1 (MetaSel (Just Symbol "_orIfMetagenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_orIfGenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_orIfSourceMetagenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_orIfSourceMetagenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))))) ((:*:) (S1 (MetaSel (Just Symbol "_orIfGenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) ((:*:) (S1 (MetaSel (Just Symbol "_orSourceObject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_orMaxBytesRewrittenPerCall") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_orSourceBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_orPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Object))) ((:*:) (S1 (MetaSel (Just Symbol "_orDestinationBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_orIfMetagenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_orIfSourceGenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_orProjection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsRewriteProjection)))) ((:*:) (S1 (MetaSel (Just Symbol "_orSourceGeneration") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) ((:*:) (S1 (MetaSel (Just Symbol "_orRewriteToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_orDestinationObject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))))))
type Scopes ObjectsRewrite Source # 
type Scopes ObjectsRewrite = (:) 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 ObjectsRewrite Source # 

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.