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 |
Stores a new object and metadata.
See: Cloud Storage JSON API Reference for storage.objects.insert
.
- 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 "name" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "contentEncoding" Text :> (QueryParam "projection" ObjectsInsertProjection :> (QueryParam "alt" AltJSON :> (ReqBody `[JSON]` Object :> Post `[JSON]` Object))))))))))))))) :<|> (("storage" :> ("v1" :> ("b" :> (Capture "bucket" Text :> ("o" :> (QueryParam "ifMetagenerationMatch" (Textual Int64) :> (QueryParam "ifGenerationNotMatch" (Textual Int64) :> (QueryParam "ifGenerationMatch" (Textual Int64) :> (QueryParam "predefinedAcl" ObjectsInsertPredefinedACL :> (QueryParam "name" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "contentEncoding" Text :> (QueryParam "projection" ObjectsInsertProjection :> (QueryParam "alt" AltMedia :> Post `[OctetStream]` Stream)))))))))))))) :<|> ("upload" :> ("storage" :> ("v1" :> ("b" :> (Capture "bucket" Text :> ("o" :> (QueryParam "ifMetagenerationMatch" (Textual Int64) :> (QueryParam "ifGenerationNotMatch" (Textual Int64) :> (QueryParam "ifGenerationMatch" (Textual Int64) :> (QueryParam "predefinedAcl" ObjectsInsertPredefinedACL :> (QueryParam "name" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "contentEncoding" Text :> (QueryParam "projection" ObjectsInsertProjection :> (QueryParam "alt" AltJSON :> (QueryParam "uploadType" AltMedia :> (MultipartRelated `[JSON]` Object RequestBody :> 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
- oiName :: Lens' ObjectsInsert (Maybe Text)
- oiIfMetagenerationNotMatch :: Lens' ObjectsInsert (Maybe Int64)
- oiContentEncoding :: 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 "name" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "contentEncoding" Text :> (QueryParam "projection" ObjectsInsertProjection :> (QueryParam "alt" AltJSON :> (ReqBody `[JSON]` Object :> Post `[JSON]` Object))))))))))))))) :<|> (("storage" :> ("v1" :> ("b" :> (Capture "bucket" Text :> ("o" :> (QueryParam "ifMetagenerationMatch" (Textual Int64) :> (QueryParam "ifGenerationNotMatch" (Textual Int64) :> (QueryParam "ifGenerationMatch" (Textual Int64) :> (QueryParam "predefinedAcl" ObjectsInsertPredefinedACL :> (QueryParam "name" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "contentEncoding" Text :> (QueryParam "projection" ObjectsInsertProjection :> (QueryParam "alt" AltMedia :> Post `[OctetStream]` Stream)))))))))))))) :<|> ("upload" :> ("storage" :> ("v1" :> ("b" :> (Capture "bucket" Text :> ("o" :> (QueryParam "ifMetagenerationMatch" (Textual Int64) :> (QueryParam "ifGenerationNotMatch" (Textual Int64) :> (QueryParam "ifGenerationMatch" (Textual Int64) :> (QueryParam "predefinedAcl" ObjectsInsertPredefinedACL :> (QueryParam "name" Text :> (QueryParam "ifMetagenerationNotMatch" (Textual Int64) :> (QueryParam "contentEncoding" Text :> (QueryParam "projection" ObjectsInsertProjection :> (QueryParam "alt" AltJSON :> (QueryParam "uploadType" AltMedia :> (MultipartRelated `[JSON]` Object RequestBody :> 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.
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.
oiIfGenerationMatch :: Lens' ObjectsInsert (Maybe Int64) Source
Makes the operation conditional on whether the object's current generation matches the given value.
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.
oiPayload :: Lens' ObjectsInsert Object Source
Multipart request metadata.
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.
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.