gogol-storage-0.4.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 "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

data ObjectsInsert Source #

Stores a new object and metadata.

See: objectsInsert smart constructor.

Instances
Eq ObjectsInsert Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Insert

Data ObjectsInsert Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Insert

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 # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Insert

Generic ObjectsInsert Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Insert

Associated Types

type Rep ObjectsInsert :: Type -> Type #

GoogleRequest ObjectsInsert Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Insert

Associated Types

type Rs ObjectsInsert :: Type #

type Scopes ObjectsInsert :: [Symbol] #

GoogleRequest (MediaUpload ObjectsInsert) Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Insert

Associated Types

type Rs (MediaUpload ObjectsInsert) :: Type #

type Scopes (MediaUpload ObjectsInsert) :: [Symbol] #

type Rep ObjectsInsert Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Insert

type Rep ObjectsInsert = D1 (MetaData "ObjectsInsert" "Network.Google.Resource.Storage.Objects.Insert" "gogol-storage-0.4.0-F1QXZopXJqf9Y2QJKwfuR3" False) (C1 (MetaCons "ObjectsInsert'" PrefixI True) (((S1 (MetaSel (Just "_oiIfMetagenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: (S1 (MetaSel (Just "_oiIfGenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))) :*: S1 (MetaSel (Just "_oiIfGenerationMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))))) :*: (S1 (MetaSel (Just "_oiPredefinedACL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsInsertPredefinedACL)) :*: (S1 (MetaSel (Just "_oiBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_oiPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Object)))) :*: ((S1 (MetaSel (Just "_oiUserProject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_oiName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_oiIfMetagenerationNotMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int64))))) :*: (S1 (MetaSel (Just "_oiContentEncoding") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_oiKmsKeyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_oiProjection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectsInsertProjection)))))))
type Scopes ObjectsInsert Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Insert

type Scopes ObjectsInsert = "https://www.googleapis.com/auth/cloud-platform" ': ("https://www.googleapis.com/auth/devstorage.full_control" ': ("https://www.googleapis.com/auth/devstorage.read_write" ': ([] :: [Symbol])))
type Rs ObjectsInsert Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Insert

type Scopes (MediaUpload ObjectsInsert) Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Insert

type Rs (MediaUpload ObjectsInsert) Source # 
Instance details

Defined in Network.Google.Resource.Storage.Objects.Insert

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.

oiPayload :: Lens' ObjectsInsert Object Source #

Multipart request metadata.

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.