gogol-storage-0.0.1: Google Cloud Storage JSON SDK.

Copyright(c) 2015 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.Insert

Contents

Description

Stores a new object and metadata.

See: Cloud Storage JSON API Reference for storage.objects.insert.

Synopsis

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

objectsInsert Source

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:

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.