amazonka-codecommit-1.6.0: Amazon CodeCommit SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.CodeCommit.PutFile

Contents

Description

Adds or updates a file in an AWS CodeCommit repository.

Synopsis

Creating a Request

putFile #

Creates a value of PutFile with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • pfEmail - An email address for the person adding or updating the file.
  • pfFileMode - The file mode permissions of the blob. Valid file mode permissions are listed below.
  • pfParentCommitId - The full commit ID of the head commit in the branch where you want to add or update the file. If the commit ID does not match the ID of the head commit at the time of the operation, an error will occur, and the file will not be added or updated.
  • pfName - The name of the person adding or updating the file. While optional, adding a name is strongly encouraged in order to provide a more useful commit history for your repository.
  • pfCommitMessage - A message about why this file was added or updated. While optional, adding a message is strongly encouraged in order to provide a more useful commit history for your repository.
  • pfRepositoryName - The name of the repository where you want to add or update the file.
  • pfBranchName - The name of the branch where you want to add or update the file.
  • pfFileContent - The content of the file, in binary object format. -- Note: This Lens automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.
  • pfFilePath - The name of the file you want to add or update, including the relative path to the file in the repository.

data PutFile #

See: putFile smart constructor.

Instances

Eq PutFile # 

Methods

(==) :: PutFile -> PutFile -> Bool #

(/=) :: PutFile -> PutFile -> Bool #

Data PutFile # 

Methods

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

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

toConstr :: PutFile -> Constr #

dataTypeOf :: PutFile -> DataType #

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

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

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

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

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

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

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

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

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

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

Read PutFile # 
Show PutFile # 
Generic PutFile # 

Associated Types

type Rep PutFile :: * -> * #

Methods

from :: PutFile -> Rep PutFile x #

to :: Rep PutFile x -> PutFile #

Hashable PutFile # 

Methods

hashWithSalt :: Int -> PutFile -> Int #

hash :: PutFile -> Int #

ToJSON PutFile # 
NFData PutFile # 

Methods

rnf :: PutFile -> () #

AWSRequest PutFile # 

Associated Types

type Rs PutFile :: * #

ToHeaders PutFile # 

Methods

toHeaders :: PutFile -> [Header] #

ToPath PutFile # 

Methods

toPath :: PutFile -> ByteString #

ToQuery PutFile # 
type Rep PutFile # 
type Rs PutFile # 

Request Lenses

pfEmail :: Lens' PutFile (Maybe Text) #

An email address for the person adding or updating the file.

pfFileMode :: Lens' PutFile (Maybe FileModeTypeEnum) #

The file mode permissions of the blob. Valid file mode permissions are listed below.

pfParentCommitId :: Lens' PutFile (Maybe Text) #

The full commit ID of the head commit in the branch where you want to add or update the file. If the commit ID does not match the ID of the head commit at the time of the operation, an error will occur, and the file will not be added or updated.

pfName :: Lens' PutFile (Maybe Text) #

The name of the person adding or updating the file. While optional, adding a name is strongly encouraged in order to provide a more useful commit history for your repository.

pfCommitMessage :: Lens' PutFile (Maybe Text) #

A message about why this file was added or updated. While optional, adding a message is strongly encouraged in order to provide a more useful commit history for your repository.

pfRepositoryName :: Lens' PutFile Text #

The name of the repository where you want to add or update the file.

pfBranchName :: Lens' PutFile Text #

The name of the branch where you want to add or update the file.

pfFileContent :: Lens' PutFile ByteString #

The content of the file, in binary object format. -- Note: This Lens automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.

pfFilePath :: Lens' PutFile Text #

The name of the file you want to add or update, including the relative path to the file in the repository.

Destructuring the Response

putFileResponse #

Creates a value of PutFileResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • pfrsResponseStatus - -- | The response status code.
  • pfrsCommitId - The full SHA of the commit that contains this file change.
  • pfrsBlobId - The ID of the blob, which is its SHA-1 pointer.
  • pfrsTreeId - Tree information for the commit that contains this file change.

data PutFileResponse #

See: putFileResponse smart constructor.

Instances

Eq PutFileResponse # 
Data PutFileResponse # 

Methods

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

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

toConstr :: PutFileResponse -> Constr #

dataTypeOf :: PutFileResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read PutFileResponse # 
Show PutFileResponse # 
Generic PutFileResponse # 
NFData PutFileResponse # 

Methods

rnf :: PutFileResponse -> () #

type Rep PutFileResponse # 
type Rep PutFileResponse = D1 * (MetaData "PutFileResponse" "Network.AWS.CodeCommit.PutFile" "amazonka-codecommit-1.6.0-DWhAPL2rvZuFmVENn91cJd" False) (C1 * (MetaCons "PutFileResponse'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_pfrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "_pfrsCommitId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_pfrsBlobId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_pfrsTreeId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))

Response Lenses

pfrsResponseStatus :: Lens' PutFileResponse Int #

  • - | The response status code.

pfrsCommitId :: Lens' PutFileResponse Text #

The full SHA of the commit that contains this file change.

pfrsBlobId :: Lens' PutFileResponse Text #

The ID of the blob, which is its SHA-1 pointer.

pfrsTreeId :: Lens' PutFileResponse Text #

Tree information for the commit that contains this file change.