Copyright | (c) 2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Rewrites a source object to a destination object. Optionally overrides metadata.
See: Cloud Storage JSON API Reference for storage.objects.rewrite
.
- 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)))))))))))))))))))))))))
- objectsRewrite :: Text -> Text -> Object -> Text -> Text -> ObjectsRewrite
- data ObjectsRewrite
- orDestinationPredefinedACL :: Lens' ObjectsRewrite (Maybe ObjectsRewriteDestinationPredefinedACL)
- orIfSourceGenerationMatch :: Lens' ObjectsRewrite (Maybe Int64)
- orIfMetagenerationMatch :: Lens' ObjectsRewrite (Maybe Int64)
- orIfGenerationNotMatch :: Lens' ObjectsRewrite (Maybe Int64)
- orIfSourceMetagenerationNotMatch :: Lens' ObjectsRewrite (Maybe Int64)
- orIfSourceMetagenerationMatch :: Lens' ObjectsRewrite (Maybe Int64)
- orIfGenerationMatch :: Lens' ObjectsRewrite (Maybe Int64)
- orSourceObject :: Lens' ObjectsRewrite Text
- orMaxBytesRewrittenPerCall :: Lens' ObjectsRewrite (Maybe Int64)
- orSourceBucket :: Lens' ObjectsRewrite Text
- orPayload :: Lens' ObjectsRewrite Object
- orDestinationBucket :: Lens' ObjectsRewrite Text
- orIfMetagenerationNotMatch :: Lens' ObjectsRewrite (Maybe Int64)
- orIfSourceGenerationNotMatch :: Lens' ObjectsRewrite (Maybe Int64)
- orProjection :: Lens' ObjectsRewrite (Maybe ObjectsRewriteProjection)
- orSourceGeneration :: Lens' ObjectsRewrite (Maybe Int64)
- orRewriteToken :: Lens' ObjectsRewrite (Maybe Text)
- orDestinationObject :: Lens' ObjectsRewrite Text
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
Creates a value of ObjectsRewrite
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
orDestinationPredefinedACL
orIfSourceGenerationMatch
orIfMetagenerationMatch
orIfGenerationNotMatch
orIfSourceMetagenerationNotMatch
orIfSourceMetagenerationMatch
orIfGenerationMatch
orSourceObject
orMaxBytesRewrittenPerCall
orSourceBucket
orPayload
orDestinationBucket
orIfMetagenerationNotMatch
orIfSourceGenerationNotMatch
orProjection
orSourceGeneration
orRewriteToken
orDestinationObject
data ObjectsRewrite Source
Rewrites a source object to a destination object. Optionally overrides metadata.
See: objectsRewrite
smart constructor.
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.