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 |
Stores a new object and metadata.
See: Cloud Storage JSON API Reference for storage.objects.insert
.
Synopsis
- type ObjectsInsertResource = ("storage" :> ("v1" :> ("b" :> (Capture "bucket" Text :> ("o" :> (QueryParam "ifMetagenerationMatch" (Textual Int64) :> (QueryParam "ifGenerationNotMatch" (Textual Int64) :> (QueryParam "ifGenerationMatch" (Textual Int64) :> (QueryParam "predefinedAcl" ObjectsInsertPredefinedACL :> (QueryParam "userProject" Text :> (QueryParam "name" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "contentEncoding" Text :> (QueryParam "kmsKeyName" Text :> (QueryParam "projection" ObjectsInsertProjection :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Object :> Post '[JSON] Object))))))))))))))))) :<|> ("upload" :> ("storage" :> ("v1" :> ("b" :> (Capture "bucket" Text :> ("o" :> (QueryParam "ifMetagenerationMatch" (Textual Int64) :> (QueryParam "ifGenerationNotMatch" (Textual Int64) :> (QueryParam "ifGenerationMatch" (Textual Int64) :> (QueryParam "predefinedAcl" ObjectsInsertPredefinedACL :> (QueryParam "userProject" Text :> (QueryParam "name" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "contentEncoding" Text :> (QueryParam "kmsKeyName" Text :> (QueryParam "projection" ObjectsInsertProjection :> (QueryParam "alt" AltJSON :> (QueryParam "uploadType" Multipart :> (MultipartRelated '[JSON] Object :> Post '[JSON] Object)))))))))))))))))))
- objectsInsert :: Text -> Object -> ObjectsInsert
- data ObjectsInsert
- oiIfMetagenerationMatch :: Lens' ObjectsInsert (Maybe Int64)
- oiIfGenerationNotMatch :: Lens' ObjectsInsert (Maybe Int64)
- oiIfGenerationMatch :: Lens' ObjectsInsert (Maybe Int64)
- oiPredefinedACL :: Lens' ObjectsInsert (Maybe ObjectsInsertPredefinedACL)
- oiBucket :: Lens' ObjectsInsert Text
- oiPayload :: Lens' ObjectsInsert Object
- oiUserProject :: Lens' ObjectsInsert (Maybe Text)
- oiName :: Lens' ObjectsInsert (Maybe Text)
- oiIfMetagenerationNotMatch :: Lens' ObjectsInsert (Maybe Int64)
- oiContentEncoding :: Lens' ObjectsInsert (Maybe Text)
- oiKmsKeyName :: Lens' ObjectsInsert (Maybe Text)
- oiProjection :: Lens' ObjectsInsert (Maybe ObjectsInsertProjection)
REST Resource
type ObjectsInsertResource = ("storage" :> ("v1" :> ("b" :> (Capture "bucket" Text :> ("o" :> (QueryParam "ifMetagenerationMatch" (Textual Int64) :> (QueryParam "ifGenerationNotMatch" (Textual Int64) :> (QueryParam "ifGenerationMatch" (Textual Int64) :> (QueryParam "predefinedAcl" ObjectsInsertPredefinedACL :> (QueryParam "userProject" Text :> (QueryParam "name" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "contentEncoding" Text :> (QueryParam "kmsKeyName" Text :> (QueryParam "projection" ObjectsInsertProjection :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Object :> Post '[JSON] Object))))))))))))))))) :<|> ("upload" :> ("storage" :> ("v1" :> ("b" :> (Capture "bucket" Text :> ("o" :> (QueryParam "ifMetagenerationMatch" (Textual Int64) :> (QueryParam "ifGenerationNotMatch" (Textual Int64) :> (QueryParam "ifGenerationMatch" (Textual Int64) :> (QueryParam "predefinedAcl" ObjectsInsertPredefinedACL :> (QueryParam "userProject" Text :> (QueryParam "name" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "contentEncoding" Text :> (QueryParam "kmsKeyName" Text :> (QueryParam "projection" ObjectsInsertProjection :> (QueryParam "alt" AltJSON :> (QueryParam "uploadType" Multipart :> (MultipartRelated '[JSON] Object :> Post '[JSON] Object))))))))))))))))))) Source #
A resource alias for storage.objects.insert
method which the
ObjectsInsert
request conforms to.
Creating a Request
Creates a value of ObjectsInsert
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data ObjectsInsert Source #
Stores a new object and metadata.
See: objectsInsert
smart constructor.
Instances
Request Lenses
oiIfMetagenerationMatch :: Lens' ObjectsInsert (Maybe Int64) Source #
Makes the operation conditional on whether the object's current metageneration matches the given value.
oiIfGenerationNotMatch :: Lens' ObjectsInsert (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.
oiIfGenerationMatch :: Lens' ObjectsInsert (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.
oiPredefinedACL :: Lens' ObjectsInsert (Maybe ObjectsInsertPredefinedACL) Source #
Apply a predefined set of access controls to this object.
oiBucket :: Lens' ObjectsInsert Text Source #
Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.
oiUserProject :: Lens' ObjectsInsert (Maybe Text) Source #
The project to be billed for this request. Required for Requester Pays buckets.
oiName :: Lens' ObjectsInsert (Maybe Text) Source #
Name of the 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.
oiIfMetagenerationNotMatch :: Lens' ObjectsInsert (Maybe Int64) Source #
Makes the operation conditional on whether the object's current metageneration does not match the given value.
oiContentEncoding :: Lens' ObjectsInsert (Maybe Text) Source #
If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded.
oiKmsKeyName :: Lens' ObjectsInsert (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.
oiProjection :: Lens' ObjectsInsert (Maybe ObjectsInsertProjection) Source #
Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.