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

Copyright(c) 2015-2016 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" 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

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:

data ObjectsInsert Source #

Stores a new object and metadata.

See: objectsInsert smart constructor.

Instances

Eq ObjectsInsert Source # 
Data ObjectsInsert Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ObjectsInsert -> c ObjectsInsert #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ObjectsInsert #

toConstr :: ObjectsInsert -> Constr #

dataTypeOf :: ObjectsInsert -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ObjectsInsert) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ObjectsInsert) #

gmapT :: (forall b. Data b => b -> b) -> ObjectsInsert -> ObjectsInsert #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ObjectsInsert -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ObjectsInsert -> r #

gmapQ :: (forall d. Data d => d -> u) -> ObjectsInsert -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ObjectsInsert -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ObjectsInsert -> m ObjectsInsert #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ObjectsInsert -> m ObjectsInsert #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ObjectsInsert -> m ObjectsInsert #

Show ObjectsInsert Source # 
Generic ObjectsInsert Source # 

Associated Types

type Rep ObjectsInsert :: * -> * #

GoogleRequest ObjectsInsert Source # 

Associated Types

type Rs ObjectsInsert :: * #

type Scopes ObjectsInsert :: [Symbol] #

GoogleRequest (MediaUpload ObjectsInsert) Source # 
type Rep ObjectsInsert Source # 
type Rep ObjectsInsert = D1 (MetaData "ObjectsInsert" "Network.Google.Resource.Storage.Objects.Insert" "gogol-storage-0.3.0-DGwRnfj7WmaH5CaBqC8AR9" False) (C1 (MetaCons "ObjectsInsert'" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_oiIfMetagenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) (S1 (MetaSel (Just Symbol "_oiIfGenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))))) ((:*:) (S1 (MetaSel (Just Symbol "_oiIfGenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) ((:*:) (S1 (MetaSel (Just Symbol "_oiPredefinedACL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsInsertPredefinedACL))) (S1 (MetaSel (Just Symbol "_oiBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_oiPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Object)) (S1 (MetaSel (Just Symbol "_oiName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_oiIfMetagenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64)))) ((:*:) (S1 (MetaSel (Just Symbol "_oiContentEncoding") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_oiProjection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsInsertProjection))))))))
type Scopes ObjectsInsert Source # 
type Scopes ObjectsInsert = (:) Symbol "https://www.googleapis.com/auth/cloud-platform" ((:) Symbol "https://www.googleapis.com/auth/devstorage.full_control" ((:) Symbol "https://www.googleapis.com/auth/devstorage.read_write" ([] Symbol)))
type Rs ObjectsInsert Source # 
type Scopes (MediaUpload ObjectsInsert) Source # 
type Rs (MediaUpload ObjectsInsert) Source # 

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.