Copyright | (c) 2015-2016 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 |
Copies a source object to a destination object. Optionally overrides metadata.
See: Cloud Storage JSON API Reference for storage.objects.copy
.
Synopsis
- 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))))))))))))))))))))))))
- objectsCopy :: Text -> Text -> Object -> Text -> Text -> ObjectsCopy
- data ObjectsCopy
- ocDestinationPredefinedACL :: Lens' ObjectsCopy (Maybe ObjectsCopyDestinationPredefinedACL)
- ocIfSourceGenerationMatch :: Lens' ObjectsCopy (Maybe Int64)
- ocIfMetagenerationMatch :: Lens' ObjectsCopy (Maybe Int64)
- ocIfGenerationNotMatch :: Lens' ObjectsCopy (Maybe Int64)
- ocIfSourceMetagenerationNotMatch :: Lens' ObjectsCopy (Maybe Int64)
- ocIfSourceMetagenerationMatch :: Lens' ObjectsCopy (Maybe Int64)
- ocIfGenerationMatch :: Lens' ObjectsCopy (Maybe Int64)
- ocSourceObject :: Lens' ObjectsCopy Text
- ocSourceBucket :: Lens' ObjectsCopy Text
- ocPayload :: Lens' ObjectsCopy Object
- ocUserProject :: Lens' ObjectsCopy (Maybe Text)
- ocDestinationBucket :: Lens' ObjectsCopy Text
- ocIfMetagenerationNotMatch :: Lens' ObjectsCopy (Maybe Int64)
- ocIfSourceGenerationNotMatch :: Lens' ObjectsCopy (Maybe Int64)
- ocProjection :: Lens' ObjectsCopy (Maybe ObjectsCopyProjection)
- ocSourceGeneration :: Lens' ObjectsCopy (Maybe Int64)
- ocDestinationObject :: Lens' ObjectsCopy Text
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
Creates a value of ObjectsCopy
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ocDestinationPredefinedACL
ocIfSourceGenerationMatch
ocIfMetagenerationMatch
ocIfGenerationNotMatch
ocIfSourceMetagenerationNotMatch
ocIfSourceMetagenerationMatch
ocIfGenerationMatch
ocSourceObject
ocSourceBucket
ocPayload
ocUserProject
ocDestinationBucket
ocIfMetagenerationNotMatch
ocIfSourceGenerationNotMatch
ocProjection
ocSourceGeneration
ocDestinationObject
data ObjectsCopy Source #
Copies a source object to a destination object. Optionally overrides metadata.
See: objectsCopy
smart constructor.
Instances
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.
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.