123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676 |
- // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
- // Package codecommit provides a client for AWS CodeCommit.
- package codecommit
- import (
- "time"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
- )
- const opBatchGetRepositories = "BatchGetRepositories"
- // BatchGetRepositoriesRequest generates a "aws/request.Request" representing the
- // client's request for the BatchGetRepositories operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See BatchGetRepositories for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the BatchGetRepositories method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the BatchGetRepositoriesRequest method.
- // req, resp := client.BatchGetRepositoriesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) BatchGetRepositoriesRequest(input *BatchGetRepositoriesInput) (req *request.Request, output *BatchGetRepositoriesOutput) {
- op := &request.Operation{
- Name: opBatchGetRepositories,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &BatchGetRepositoriesInput{}
- }
- req = c.newRequest(op, input, output)
- output = &BatchGetRepositoriesOutput{}
- req.Data = output
- return
- }
- // BatchGetRepositories API operation for AWS CodeCommit.
- //
- // Returns information about one or more repositories.
- //
- // The description field for a repository accepts all HTML characters and all
- // valid Unicode characters. Applications that do not HTML-encode the description
- // and display it in a web page could expose users to potentially malicious
- // code. Make sure that you HTML-encode the description field in any application
- // that uses this API to display the repository description on a web page.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation BatchGetRepositories for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryNamesRequiredException
- // A repository names object is required but was not specified.
- //
- // * MaximumRepositoryNamesExceededException
- // The maximum number of allowed repository names was exceeded. Currently, this
- // number is 25.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) BatchGetRepositories(input *BatchGetRepositoriesInput) (*BatchGetRepositoriesOutput, error) {
- req, out := c.BatchGetRepositoriesRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateBranch = "CreateBranch"
- // CreateBranchRequest generates a "aws/request.Request" representing the
- // client's request for the CreateBranch operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateBranch for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateBranch method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateBranchRequest method.
- // req, resp := client.CreateBranchRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) {
- op := &request.Operation{
- Name: opCreateBranch,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateBranchInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &CreateBranchOutput{}
- req.Data = output
- return
- }
- // CreateBranch API operation for AWS CodeCommit.
- //
- // Creates a new branch in a repository and points the branch to a commit.
- //
- // Calling the create branch operation does not set a repository's default branch.
- // To do this, call the update default branch operation.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation CreateBranch for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * RepositoryDoesNotExistException
- // The specified repository does not exist.
- //
- // * BranchNameRequiredException
- // A branch name is required but was not specified.
- //
- // * BranchNameExistsException
- // The specified branch name already exists.
- //
- // * InvalidBranchNameException
- // The specified branch name is not valid.
- //
- // * CommitIdRequiredException
- // A commit ID was not specified.
- //
- // * CommitDoesNotExistException
- // The specified commit does not exist or no commit was specified, and the specified
- // repository has no default branch.
- //
- // * InvalidCommitIdException
- // The specified commit ID is not valid.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) CreateBranch(input *CreateBranchInput) (*CreateBranchOutput, error) {
- req, out := c.CreateBranchRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateRepository = "CreateRepository"
- // CreateRepositoryRequest generates a "aws/request.Request" representing the
- // client's request for the CreateRepository operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateRepository for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateRepository method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateRepositoryRequest method.
- // req, resp := client.CreateRepositoryRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) {
- op := &request.Operation{
- Name: opCreateRepository,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateRepositoryInput{}
- }
- req = c.newRequest(op, input, output)
- output = &CreateRepositoryOutput{}
- req.Data = output
- return
- }
- // CreateRepository API operation for AWS CodeCommit.
- //
- // Creates a new, empty repository.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation CreateRepository for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryNameExistsException
- // The specified repository name already exists.
- //
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * InvalidRepositoryDescriptionException
- // The specified repository description is not valid.
- //
- // * RepositoryLimitExceededException
- // A repository resource limit was exceeded.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
- req, out := c.CreateRepositoryRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteRepository = "DeleteRepository"
- // DeleteRepositoryRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteRepository operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteRepository for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteRepository method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DeleteRepositoryRequest method.
- // req, resp := client.DeleteRepositoryRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) {
- op := &request.Operation{
- Name: opDeleteRepository,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteRepositoryInput{}
- }
- req = c.newRequest(op, input, output)
- output = &DeleteRepositoryOutput{}
- req.Data = output
- return
- }
- // DeleteRepository API operation for AWS CodeCommit.
- //
- // Deletes a repository. If a specified repository was already deleted, a null
- // repository ID will be returned.
- //
- // Deleting a repository also deletes all associated objects and metadata. After
- // a repository is deleted, all future push calls to the deleted repository
- // will fail.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation DeleteRepository for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
- req, out := c.DeleteRepositoryRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetBranch = "GetBranch"
- // GetBranchRequest generates a "aws/request.Request" representing the
- // client's request for the GetBranch operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetBranch for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetBranch method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetBranchRequest method.
- // req, resp := client.GetBranchRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) GetBranchRequest(input *GetBranchInput) (req *request.Request, output *GetBranchOutput) {
- op := &request.Operation{
- Name: opGetBranch,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetBranchInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetBranchOutput{}
- req.Data = output
- return
- }
- // GetBranch API operation for AWS CodeCommit.
- //
- // Returns information about a repository branch, including its name and the
- // last commit ID.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation GetBranch for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * RepositoryDoesNotExistException
- // The specified repository does not exist.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * BranchNameRequiredException
- // A branch name is required but was not specified.
- //
- // * InvalidBranchNameException
- // The specified branch name is not valid.
- //
- // * BranchDoesNotExistException
- // The specified branch does not exist.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) GetBranch(input *GetBranchInput) (*GetBranchOutput, error) {
- req, out := c.GetBranchRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetCommit = "GetCommit"
- // GetCommitRequest generates a "aws/request.Request" representing the
- // client's request for the GetCommit operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetCommit for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetCommit method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetCommitRequest method.
- // req, resp := client.GetCommitRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) GetCommitRequest(input *GetCommitInput) (req *request.Request, output *GetCommitOutput) {
- op := &request.Operation{
- Name: opGetCommit,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetCommitInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetCommitOutput{}
- req.Data = output
- return
- }
- // GetCommit API operation for AWS CodeCommit.
- //
- // Returns information about a commit, including commit message and committer
- // information.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation GetCommit for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * RepositoryDoesNotExistException
- // The specified repository does not exist.
- //
- // * CommitIdRequiredException
- // A commit ID was not specified.
- //
- // * InvalidCommitIdException
- // The specified commit ID is not valid.
- //
- // * CommitIdDoesNotExistException
- // The specified commit ID does not exist.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) GetCommit(input *GetCommitInput) (*GetCommitOutput, error) {
- req, out := c.GetCommitRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetRepository = "GetRepository"
- // GetRepositoryRequest generates a "aws/request.Request" representing the
- // client's request for the GetRepository operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetRepository for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetRepository method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetRepositoryRequest method.
- // req, resp := client.GetRepositoryRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) GetRepositoryRequest(input *GetRepositoryInput) (req *request.Request, output *GetRepositoryOutput) {
- op := &request.Operation{
- Name: opGetRepository,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetRepositoryInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetRepositoryOutput{}
- req.Data = output
- return
- }
- // GetRepository API operation for AWS CodeCommit.
- //
- // Returns information about a repository.
- //
- // The description field for a repository accepts all HTML characters and all
- // valid Unicode characters. Applications that do not HTML-encode the description
- // and display it in a web page could expose users to potentially malicious
- // code. Make sure that you HTML-encode the description field in any application
- // that uses this API to display the repository description on a web page.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation GetRepository for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * RepositoryDoesNotExistException
- // The specified repository does not exist.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) GetRepository(input *GetRepositoryInput) (*GetRepositoryOutput, error) {
- req, out := c.GetRepositoryRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetRepositoryTriggers = "GetRepositoryTriggers"
- // GetRepositoryTriggersRequest generates a "aws/request.Request" representing the
- // client's request for the GetRepositoryTriggers operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetRepositoryTriggers for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetRepositoryTriggers method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetRepositoryTriggersRequest method.
- // req, resp := client.GetRepositoryTriggersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) GetRepositoryTriggersRequest(input *GetRepositoryTriggersInput) (req *request.Request, output *GetRepositoryTriggersOutput) {
- op := &request.Operation{
- Name: opGetRepositoryTriggers,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetRepositoryTriggersInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetRepositoryTriggersOutput{}
- req.Data = output
- return
- }
- // GetRepositoryTriggers API operation for AWS CodeCommit.
- //
- // Gets information about triggers configured for a repository.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation GetRepositoryTriggers for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * RepositoryDoesNotExistException
- // The specified repository does not exist.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) GetRepositoryTriggers(input *GetRepositoryTriggersInput) (*GetRepositoryTriggersOutput, error) {
- req, out := c.GetRepositoryTriggersRequest(input)
- err := req.Send()
- return out, err
- }
- const opListBranches = "ListBranches"
- // ListBranchesRequest generates a "aws/request.Request" representing the
- // client's request for the ListBranches operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListBranches for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListBranches method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListBranchesRequest method.
- // req, resp := client.ListBranchesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) ListBranchesRequest(input *ListBranchesInput) (req *request.Request, output *ListBranchesOutput) {
- op := &request.Operation{
- Name: opListBranches,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListBranchesInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListBranchesOutput{}
- req.Data = output
- return
- }
- // ListBranches API operation for AWS CodeCommit.
- //
- // Gets information about one or more branches in a repository.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation ListBranches for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * RepositoryDoesNotExistException
- // The specified repository does not exist.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- // * InvalidContinuationTokenException
- // The specified continuation token is not valid.
- //
- func (c *CodeCommit) ListBranches(input *ListBranchesInput) (*ListBranchesOutput, error) {
- req, out := c.ListBranchesRequest(input)
- err := req.Send()
- return out, err
- }
- // ListBranchesPages iterates over the pages of a ListBranches operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListBranches method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListBranches operation.
- // pageNum := 0
- // err := client.ListBranchesPages(params,
- // func(page *ListBranchesOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CodeCommit) ListBranchesPages(input *ListBranchesInput, fn func(p *ListBranchesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListBranchesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListBranchesOutput), lastPage)
- })
- }
- const opListRepositories = "ListRepositories"
- // ListRepositoriesRequest generates a "aws/request.Request" representing the
- // client's request for the ListRepositories operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListRepositories for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListRepositories method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListRepositoriesRequest method.
- // req, resp := client.ListRepositoriesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) ListRepositoriesRequest(input *ListRepositoriesInput) (req *request.Request, output *ListRepositoriesOutput) {
- op := &request.Operation{
- Name: opListRepositories,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListRepositoriesInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListRepositoriesOutput{}
- req.Data = output
- return
- }
- // ListRepositories API operation for AWS CodeCommit.
- //
- // Gets information about one or more repositories.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation ListRepositories for usage and error information.
- //
- // Returned Error Codes:
- // * InvalidSortByException
- // The specified sort by value is not valid.
- //
- // * InvalidOrderException
- // The specified sort order is not valid.
- //
- // * InvalidContinuationTokenException
- // The specified continuation token is not valid.
- //
- func (c *CodeCommit) ListRepositories(input *ListRepositoriesInput) (*ListRepositoriesOutput, error) {
- req, out := c.ListRepositoriesRequest(input)
- err := req.Send()
- return out, err
- }
- // ListRepositoriesPages iterates over the pages of a ListRepositories operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListRepositories method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListRepositories operation.
- // pageNum := 0
- // err := client.ListRepositoriesPages(params,
- // func(page *ListRepositoriesOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CodeCommit) ListRepositoriesPages(input *ListRepositoriesInput, fn func(p *ListRepositoriesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListRepositoriesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListRepositoriesOutput), lastPage)
- })
- }
- const opPutRepositoryTriggers = "PutRepositoryTriggers"
- // PutRepositoryTriggersRequest generates a "aws/request.Request" representing the
- // client's request for the PutRepositoryTriggers operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See PutRepositoryTriggers for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the PutRepositoryTriggers method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the PutRepositoryTriggersRequest method.
- // req, resp := client.PutRepositoryTriggersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) PutRepositoryTriggersRequest(input *PutRepositoryTriggersInput) (req *request.Request, output *PutRepositoryTriggersOutput) {
- op := &request.Operation{
- Name: opPutRepositoryTriggers,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutRepositoryTriggersInput{}
- }
- req = c.newRequest(op, input, output)
- output = &PutRepositoryTriggersOutput{}
- req.Data = output
- return
- }
- // PutRepositoryTriggers API operation for AWS CodeCommit.
- //
- // Replaces all triggers for a repository. This can be used to create or delete
- // triggers.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation PutRepositoryTriggers for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryDoesNotExistException
- // The specified repository does not exist.
- //
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * RepositoryTriggersListRequiredException
- // The list of triggers for the repository is required but was not specified.
- //
- // * MaximumRepositoryTriggersExceededException
- // The number of triggers allowed for the repository was exceeded.
- //
- // * InvalidRepositoryTriggerNameException
- // The name of the trigger is not valid.
- //
- // * InvalidRepositoryTriggerDestinationArnException
- // The Amazon Resource Name (ARN) for the trigger is not valid for the specified
- // destination. The most common reason for this error is that the ARN does not
- // meet the requirements for the service type.
- //
- // * InvalidRepositoryTriggerRegionException
- // The region for the trigger target does not match the region for the repository.
- // Triggers must be created in the same region as the target for the trigger.
- //
- // * InvalidRepositoryTriggerCustomDataException
- // The custom data provided for the trigger is not valid.
- //
- // * MaximumBranchesExceededException
- // The number of branches for the trigger was exceeded.
- //
- // * InvalidRepositoryTriggerBranchNameException
- // One or more branch names specified for the trigger is not valid.
- //
- // * InvalidRepositoryTriggerEventsException
- // One or more events specified for the trigger is not valid. Check to make
- // sure that all events specified match the requirements for allowed events.
- //
- // * RepositoryTriggerNameRequiredException
- // A name for the trigger is required but was not specified.
- //
- // * RepositoryTriggerDestinationArnRequiredException
- // A destination ARN for the target service for the trigger is required but
- // was not specified.
- //
- // * RepositoryTriggerBranchNameListRequiredException
- // At least one branch name is required but was not specified in the trigger
- // configuration.
- //
- // * RepositoryTriggerEventsListRequiredException
- // At least one event for the trigger is required but was not specified.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) PutRepositoryTriggers(input *PutRepositoryTriggersInput) (*PutRepositoryTriggersOutput, error) {
- req, out := c.PutRepositoryTriggersRequest(input)
- err := req.Send()
- return out, err
- }
- const opTestRepositoryTriggers = "TestRepositoryTriggers"
- // TestRepositoryTriggersRequest generates a "aws/request.Request" representing the
- // client's request for the TestRepositoryTriggers operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See TestRepositoryTriggers for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the TestRepositoryTriggers method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the TestRepositoryTriggersRequest method.
- // req, resp := client.TestRepositoryTriggersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) TestRepositoryTriggersRequest(input *TestRepositoryTriggersInput) (req *request.Request, output *TestRepositoryTriggersOutput) {
- op := &request.Operation{
- Name: opTestRepositoryTriggers,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &TestRepositoryTriggersInput{}
- }
- req = c.newRequest(op, input, output)
- output = &TestRepositoryTriggersOutput{}
- req.Data = output
- return
- }
- // TestRepositoryTriggers API operation for AWS CodeCommit.
- //
- // Tests the functionality of repository triggers by sending information to
- // the trigger target. If real data is available in the repository, the test
- // will send data from the last commit. If no data is available, sample data
- // will be generated.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation TestRepositoryTriggers for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryDoesNotExistException
- // The specified repository does not exist.
- //
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * RepositoryTriggersListRequiredException
- // The list of triggers for the repository is required but was not specified.
- //
- // * MaximumRepositoryTriggersExceededException
- // The number of triggers allowed for the repository was exceeded.
- //
- // * InvalidRepositoryTriggerNameException
- // The name of the trigger is not valid.
- //
- // * InvalidRepositoryTriggerDestinationArnException
- // The Amazon Resource Name (ARN) for the trigger is not valid for the specified
- // destination. The most common reason for this error is that the ARN does not
- // meet the requirements for the service type.
- //
- // * InvalidRepositoryTriggerRegionException
- // The region for the trigger target does not match the region for the repository.
- // Triggers must be created in the same region as the target for the trigger.
- //
- // * InvalidRepositoryTriggerCustomDataException
- // The custom data provided for the trigger is not valid.
- //
- // * MaximumBranchesExceededException
- // The number of branches for the trigger was exceeded.
- //
- // * InvalidRepositoryTriggerBranchNameException
- // One or more branch names specified for the trigger is not valid.
- //
- // * InvalidRepositoryTriggerEventsException
- // One or more events specified for the trigger is not valid. Check to make
- // sure that all events specified match the requirements for allowed events.
- //
- // * RepositoryTriggerNameRequiredException
- // A name for the trigger is required but was not specified.
- //
- // * RepositoryTriggerDestinationArnRequiredException
- // A destination ARN for the target service for the trigger is required but
- // was not specified.
- //
- // * RepositoryTriggerBranchNameListRequiredException
- // At least one branch name is required but was not specified in the trigger
- // configuration.
- //
- // * RepositoryTriggerEventsListRequiredException
- // At least one event for the trigger is required but was not specified.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) TestRepositoryTriggers(input *TestRepositoryTriggersInput) (*TestRepositoryTriggersOutput, error) {
- req, out := c.TestRepositoryTriggersRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateDefaultBranch = "UpdateDefaultBranch"
- // UpdateDefaultBranchRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateDefaultBranch operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateDefaultBranch for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateDefaultBranch method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateDefaultBranchRequest method.
- // req, resp := client.UpdateDefaultBranchRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) UpdateDefaultBranchRequest(input *UpdateDefaultBranchInput) (req *request.Request, output *UpdateDefaultBranchOutput) {
- op := &request.Operation{
- Name: opUpdateDefaultBranch,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateDefaultBranchInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &UpdateDefaultBranchOutput{}
- req.Data = output
- return
- }
- // UpdateDefaultBranch API operation for AWS CodeCommit.
- //
- // Sets or changes the default branch name for the specified repository.
- //
- // If you use this operation to change the default branch name to the current
- // default branch name, a success message is returned even though the default
- // branch did not change.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation UpdateDefaultBranch for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * RepositoryDoesNotExistException
- // The specified repository does not exist.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * BranchNameRequiredException
- // A branch name is required but was not specified.
- //
- // * InvalidBranchNameException
- // The specified branch name is not valid.
- //
- // * BranchDoesNotExistException
- // The specified branch does not exist.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) UpdateDefaultBranch(input *UpdateDefaultBranchInput) (*UpdateDefaultBranchOutput, error) {
- req, out := c.UpdateDefaultBranchRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateRepositoryDescription = "UpdateRepositoryDescription"
- // UpdateRepositoryDescriptionRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateRepositoryDescription operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateRepositoryDescription for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateRepositoryDescription method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateRepositoryDescriptionRequest method.
- // req, resp := client.UpdateRepositoryDescriptionRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) UpdateRepositoryDescriptionRequest(input *UpdateRepositoryDescriptionInput) (req *request.Request, output *UpdateRepositoryDescriptionOutput) {
- op := &request.Operation{
- Name: opUpdateRepositoryDescription,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateRepositoryDescriptionInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &UpdateRepositoryDescriptionOutput{}
- req.Data = output
- return
- }
- // UpdateRepositoryDescription API operation for AWS CodeCommit.
- //
- // Sets or changes the comment or description for a repository.
- //
- // The description field for a repository accepts all HTML characters and all
- // valid Unicode characters. Applications that do not HTML-encode the description
- // and display it in a web page could expose users to potentially malicious
- // code. Make sure that you HTML-encode the description field in any application
- // that uses this API to display the repository description on a web page.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation UpdateRepositoryDescription for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * RepositoryDoesNotExistException
- // The specified repository does not exist.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- // * InvalidRepositoryDescriptionException
- // The specified repository description is not valid.
- //
- // * EncryptionIntegrityChecksFailedException
- // An encryption integrity check failed.
- //
- // * EncryptionKeyAccessDeniedException
- // An encryption key could not be accessed.
- //
- // * EncryptionKeyDisabledException
- // The encryption key is disabled.
- //
- // * EncryptionKeyNotFoundException
- // No encryption key was found.
- //
- // * EncryptionKeyUnavailableException
- // The encryption key is not available.
- //
- func (c *CodeCommit) UpdateRepositoryDescription(input *UpdateRepositoryDescriptionInput) (*UpdateRepositoryDescriptionOutput, error) {
- req, out := c.UpdateRepositoryDescriptionRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateRepositoryName = "UpdateRepositoryName"
- // UpdateRepositoryNameRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateRepositoryName operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateRepositoryName for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateRepositoryName method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateRepositoryNameRequest method.
- // req, resp := client.UpdateRepositoryNameRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *CodeCommit) UpdateRepositoryNameRequest(input *UpdateRepositoryNameInput) (req *request.Request, output *UpdateRepositoryNameOutput) {
- op := &request.Operation{
- Name: opUpdateRepositoryName,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateRepositoryNameInput{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &UpdateRepositoryNameOutput{}
- req.Data = output
- return
- }
- // UpdateRepositoryName API operation for AWS CodeCommit.
- //
- // Renames a repository. The repository name must be unique across the calling
- // AWS account. In addition, repository names are limited to 100 alphanumeric,
- // dash, and underscore characters, and cannot include certain characters. The
- // suffix ".git" is prohibited. For a full description of the limits on repository
- // names, see Limits (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html)
- // in the AWS CodeCommit User Guide.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CodeCommit's
- // API operation UpdateRepositoryName for usage and error information.
- //
- // Returned Error Codes:
- // * RepositoryDoesNotExistException
- // The specified repository does not exist.
- //
- // * RepositoryNameExistsException
- // The specified repository name already exists.
- //
- // * RepositoryNameRequiredException
- // A repository name is required but was not specified.
- //
- // * InvalidRepositoryNameException
- // At least one specified repository name is not valid.
- //
- // This exception only occurs when a specified repository name is not valid.
- // Other exceptions occur when a required repository parameter is missing, or
- // when a specified repository does not exist.
- //
- func (c *CodeCommit) UpdateRepositoryName(input *UpdateRepositoryNameInput) (*UpdateRepositoryNameOutput, error) {
- req, out := c.UpdateRepositoryNameRequest(input)
- err := req.Send()
- return out, err
- }
- // Represents the input of a batch get repositories operation.
- type BatchGetRepositoriesInput struct {
- _ struct{} `type:"structure"`
- // The names of the repositories to get information about.
- //
- // RepositoryNames is a required field
- RepositoryNames []*string `locationName:"repositoryNames" type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchGetRepositoriesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchGetRepositoriesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *BatchGetRepositoriesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BatchGetRepositoriesInput"}
- if s.RepositoryNames == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryNames"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a batch get repositories operation.
- type BatchGetRepositoriesOutput struct {
- _ struct{} `type:"structure"`
- // A list of repositories returned by the batch get repositories operation.
- Repositories []*RepositoryMetadata `locationName:"repositories" type:"list"`
- // Returns a list of repository names for which information could not be found.
- RepositoriesNotFound []*string `locationName:"repositoriesNotFound" type:"list"`
- }
- // String returns the string representation
- func (s BatchGetRepositoriesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchGetRepositoriesOutput) GoString() string {
- return s.String()
- }
- // Returns information about a branch.
- type BranchInfo struct {
- _ struct{} `type:"structure"`
- // The name of the branch.
- BranchName *string `locationName:"branchName" min:"1" type:"string"`
- // The ID of the last commit made to the branch.
- CommitId *string `locationName:"commitId" type:"string"`
- }
- // String returns the string representation
- func (s BranchInfo) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BranchInfo) GoString() string {
- return s.String()
- }
- // Returns information about a specific commit.
- type Commit struct {
- _ struct{} `type:"structure"`
- // Any additional data associated with the specified commit.
- AdditionalData *string `locationName:"additionalData" type:"string"`
- // Information about the author of the specified commit.
- Author *UserInfo `locationName:"author" type:"structure"`
- // Information about the person who committed the specified commit, also known
- // as the committer. For more information about the difference between an author
- // and a committer in Git, see Viewing the Commit History (http://git-scm.com/book/ch2-3.html)
- // in Pro Git by Scott Chacon and Ben Straub.
- Committer *UserInfo `locationName:"committer" type:"structure"`
- // The message associated with the specified commit.
- Message *string `locationName:"message" type:"string"`
- // The parent list for the specified commit.
- Parents []*string `locationName:"parents" type:"list"`
- // Tree information for the specified commit.
- TreeId *string `locationName:"treeId" type:"string"`
- }
- // String returns the string representation
- func (s Commit) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Commit) GoString() string {
- return s.String()
- }
- // Represents the input of a create branch operation.
- type CreateBranchInput struct {
- _ struct{} `type:"structure"`
- // The name of the new branch to create.
- //
- // BranchName is a required field
- BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"`
- // The ID of the commit to point the new branch to.
- //
- // CommitId is a required field
- CommitId *string `locationName:"commitId" type:"string" required:"true"`
- // The name of the repository in which you want to create the new branch.
- //
- // RepositoryName is a required field
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateBranchInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateBranchInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateBranchInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateBranchInput"}
- if s.BranchName == nil {
- invalidParams.Add(request.NewErrParamRequired("BranchName"))
- }
- if s.BranchName != nil && len(*s.BranchName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
- }
- if s.CommitId == nil {
- invalidParams.Add(request.NewErrParamRequired("CommitId"))
- }
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type CreateBranchOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s CreateBranchOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateBranchOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a create repository operation.
- type CreateRepositoryInput struct {
- _ struct{} `type:"structure"`
- // A comment or description about the new repository.
- //
- // The description field for a repository accepts all HTML characters and all
- // valid Unicode characters. Applications that do not HTML-encode the description
- // and display it in a web page could expose users to potentially malicious
- // code. Make sure that you HTML-encode the description field in any application
- // that uses this API to display the repository description on a web page.
- RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
- // The name of the new repository to be created.
- //
- // The repository name must be unique across the calling AWS account. In addition,
- // repository names are limited to 100 alphanumeric, dash, and underscore characters,
- // and cannot include certain characters. For a full description of the limits
- // on repository names, see Limits (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html)
- // in the AWS CodeCommit User Guide. The suffix ".git" is prohibited.
- //
- // RepositoryName is a required field
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateRepositoryInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateRepositoryInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateRepositoryInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"}
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a create repository operation.
- type CreateRepositoryOutput struct {
- _ struct{} `type:"structure"`
- // Information about the newly created repository.
- RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"`
- }
- // String returns the string representation
- func (s CreateRepositoryOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateRepositoryOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a delete repository operation.
- type DeleteRepositoryInput struct {
- _ struct{} `type:"structure"`
- // The name of the repository to delete.
- //
- // RepositoryName is a required field
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteRepositoryInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteRepositoryInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteRepositoryInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"}
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a delete repository operation.
- type DeleteRepositoryOutput struct {
- _ struct{} `type:"structure"`
- // The ID of the repository that was deleted.
- RepositoryId *string `locationName:"repositoryId" type:"string"`
- }
- // String returns the string representation
- func (s DeleteRepositoryOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteRepositoryOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a get branch operation.
- type GetBranchInput struct {
- _ struct{} `type:"structure"`
- // The name of the branch for which you want to retrieve information.
- BranchName *string `locationName:"branchName" min:"1" type:"string"`
- // The name of the repository that contains the branch for which you want to
- // retrieve information.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s GetBranchInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBranchInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetBranchInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBranchInput"}
- if s.BranchName != nil && len(*s.BranchName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a get branch operation.
- type GetBranchOutput struct {
- _ struct{} `type:"structure"`
- // The name of the branch.
- Branch *BranchInfo `locationName:"branch" type:"structure"`
- }
- // String returns the string representation
- func (s GetBranchOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBranchOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a get commit operation.
- type GetCommitInput struct {
- _ struct{} `type:"structure"`
- // The commit ID.
- //
- // CommitId is a required field
- CommitId *string `locationName:"commitId" type:"string" required:"true"`
- // The name of the repository to which the commit was made.
- //
- // RepositoryName is a required field
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetCommitInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetCommitInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetCommitInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetCommitInput"}
- if s.CommitId == nil {
- invalidParams.Add(request.NewErrParamRequired("CommitId"))
- }
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a get commit operation.
- type GetCommitOutput struct {
- _ struct{} `type:"structure"`
- // Information about the specified commit.
- //
- // Commit is a required field
- Commit *Commit `locationName:"commit" type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s GetCommitOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetCommitOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a get repository operation.
- type GetRepositoryInput struct {
- _ struct{} `type:"structure"`
- // The name of the repository to get information about.
- //
- // RepositoryName is a required field
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetRepositoryInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRepositoryInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetRepositoryInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetRepositoryInput"}
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a get repository operation.
- type GetRepositoryOutput struct {
- _ struct{} `type:"structure"`
- // Information about the repository.
- RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"`
- }
- // String returns the string representation
- func (s GetRepositoryOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRepositoryOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a get repository triggers operation.
- type GetRepositoryTriggersInput struct {
- _ struct{} `type:"structure"`
- // The name of the repository for which the trigger is configured.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s GetRepositoryTriggersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRepositoryTriggersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetRepositoryTriggersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetRepositoryTriggersInput"}
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a get repository triggers operation.
- type GetRepositoryTriggersOutput struct {
- _ struct{} `type:"structure"`
- // The system-generated unique ID for the trigger.
- ConfigurationId *string `locationName:"configurationId" type:"string"`
- // The JSON block of configuration information for each trigger.
- Triggers []*RepositoryTrigger `locationName:"triggers" type:"list"`
- }
- // String returns the string representation
- func (s GetRepositoryTriggersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRepositoryTriggersOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a list branches operation.
- type ListBranchesInput struct {
- _ struct{} `type:"structure"`
- // An enumeration token that allows the operation to batch the results.
- NextToken *string `locationName:"nextToken" type:"string"`
- // The name of the repository that contains the branches.
- //
- // RepositoryName is a required field
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s ListBranchesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBranchesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListBranchesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBranchesInput"}
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a list branches operation.
- type ListBranchesOutput struct {
- _ struct{} `type:"structure"`
- // The list of branch names.
- Branches []*string `locationName:"branches" type:"list"`
- // An enumeration token that returns the batch of the results.
- NextToken *string `locationName:"nextToken" type:"string"`
- }
- // String returns the string representation
- func (s ListBranchesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBranchesOutput) GoString() string {
- return s.String()
- }
- // Represents the input of a list repositories operation.
- type ListRepositoriesInput struct {
- _ struct{} `type:"structure"`
- // An enumeration token that allows the operation to batch the results of the
- // operation. Batch sizes are 1,000 for list repository operations. When the
- // client sends the token back to AWS CodeCommit, another page of 1,000 records
- // is retrieved.
- NextToken *string `locationName:"nextToken" type:"string"`
- // The order in which to sort the results of a list repositories operation.
- Order *string `locationName:"order" type:"string" enum:"OrderEnum"`
- // The criteria used to sort the results of a list repositories operation.
- SortBy *string `locationName:"sortBy" type:"string" enum:"SortByEnum"`
- }
- // String returns the string representation
- func (s ListRepositoriesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRepositoriesInput) GoString() string {
- return s.String()
- }
- // Represents the output of a list repositories operation.
- type ListRepositoriesOutput struct {
- _ struct{} `type:"structure"`
- // An enumeration token that allows the operation to batch the results of the
- // operation. Batch sizes are 1,000 for list repository operations. When the
- // client sends the token back to AWS CodeCommit, another page of 1,000 records
- // is retrieved.
- NextToken *string `locationName:"nextToken" type:"string"`
- // Lists the repositories called by the list repositories operation.
- Repositories []*RepositoryNameIdPair `locationName:"repositories" type:"list"`
- }
- // String returns the string representation
- func (s ListRepositoriesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRepositoriesOutput) GoString() string {
- return s.String()
- }
- // Represents the input ofa put repository triggers operation.
- type PutRepositoryTriggersInput struct {
- _ struct{} `type:"structure"`
- // The name of the repository where you want to create or update the trigger.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- // The JSON block of configuration information for each trigger.
- Triggers []*RepositoryTrigger `locationName:"triggers" type:"list"`
- }
- // String returns the string representation
- func (s PutRepositoryTriggersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutRepositoryTriggersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutRepositoryTriggersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutRepositoryTriggersInput"}
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a put repository triggers operation.
- type PutRepositoryTriggersOutput struct {
- _ struct{} `type:"structure"`
- // The system-generated unique ID for the create or update operation.
- ConfigurationId *string `locationName:"configurationId" type:"string"`
- }
- // String returns the string representation
- func (s PutRepositoryTriggersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutRepositoryTriggersOutput) GoString() string {
- return s.String()
- }
- // Information about a repository.
- type RepositoryMetadata struct {
- _ struct{} `type:"structure"`
- // The ID of the AWS account associated with the repository.
- AccountId *string `locationName:"accountId" type:"string"`
- // The Amazon Resource Name (ARN) of the repository.
- Arn *string `type:"string"`
- // The URL to use for cloning the repository over HTTPS.
- CloneUrlHttp *string `locationName:"cloneUrlHttp" type:"string"`
- // The URL to use for cloning the repository over SSH.
- CloneUrlSsh *string `locationName:"cloneUrlSsh" type:"string"`
- // The date and time the repository was created, in timestamp format.
- CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"`
- // The repository's default branch name.
- DefaultBranch *string `locationName:"defaultBranch" min:"1" type:"string"`
- // The date and time the repository was last modified, in timestamp format.
- LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"`
- // A comment or description about the repository.
- RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
- // The ID of the repository.
- RepositoryId *string `locationName:"repositoryId" type:"string"`
- // The repository's name.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s RepositoryMetadata) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RepositoryMetadata) GoString() string {
- return s.String()
- }
- // Information about a repository name and ID.
- type RepositoryNameIdPair struct {
- _ struct{} `type:"structure"`
- // The ID associated with the repository.
- RepositoryId *string `locationName:"repositoryId" type:"string"`
- // The name associated with the repository.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s RepositoryNameIdPair) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RepositoryNameIdPair) GoString() string {
- return s.String()
- }
- // Information about a trigger for a repository.
- type RepositoryTrigger struct {
- _ struct{} `type:"structure"`
- // The branches that will be included in the trigger configuration. If no branches
- // are specified, the trigger will apply to all branches.
- Branches []*string `locationName:"branches" type:"list"`
- // Any custom data associated with the trigger that will be included in the
- // information sent to the target of the trigger.
- CustomData *string `locationName:"customData" type:"string"`
- // The ARN of the resource that is the target for a trigger. For example, the
- // ARN of a topic in Amazon Simple Notification Service (SNS).
- DestinationArn *string `locationName:"destinationArn" type:"string"`
- // The repository events that will cause the trigger to run actions in another
- // service, such as sending a notification through Amazon Simple Notification
- // Service (SNS). If no events are specified, the trigger will run for all repository
- // events.
- Events []*string `locationName:"events" type:"list"`
- // The name of the trigger.
- Name *string `locationName:"name" type:"string"`
- }
- // String returns the string representation
- func (s RepositoryTrigger) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RepositoryTrigger) GoString() string {
- return s.String()
- }
- // A trigger failed to run.
- type RepositoryTriggerExecutionFailure struct {
- _ struct{} `type:"structure"`
- // Additional message information about the trigger that did not run.
- FailureMessage *string `locationName:"failureMessage" type:"string"`
- // The name of the trigger that did not run.
- Trigger *string `locationName:"trigger" type:"string"`
- }
- // String returns the string representation
- func (s RepositoryTriggerExecutionFailure) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RepositoryTriggerExecutionFailure) GoString() string {
- return s.String()
- }
- // Represents the input of a test repository triggers operation.
- type TestRepositoryTriggersInput struct {
- _ struct{} `type:"structure"`
- // The name of the repository in which to test the triggers.
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
- // The list of triggers to test.
- Triggers []*RepositoryTrigger `locationName:"triggers" type:"list"`
- }
- // String returns the string representation
- func (s TestRepositoryTriggersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TestRepositoryTriggersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *TestRepositoryTriggersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TestRepositoryTriggersInput"}
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Represents the output of a test repository triggers operation.
- type TestRepositoryTriggersOutput struct {
- _ struct{} `type:"structure"`
- // The list of triggers that were not able to be tested. This list provides
- // the names of the triggers that could not be tested, separated by commas.
- FailedExecutions []*RepositoryTriggerExecutionFailure `locationName:"failedExecutions" type:"list"`
- // The list of triggers that were successfully tested. This list provides the
- // names of the triggers that were successfully tested, separated by commas.
- SuccessfulExecutions []*string `locationName:"successfulExecutions" type:"list"`
- }
- // String returns the string representation
- func (s TestRepositoryTriggersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TestRepositoryTriggersOutput) GoString() string {
- return s.String()
- }
- // Represents the input of an update default branch operation.
- type UpdateDefaultBranchInput struct {
- _ struct{} `type:"structure"`
- // The name of the branch to set as the default.
- //
- // DefaultBranchName is a required field
- DefaultBranchName *string `locationName:"defaultBranchName" min:"1" type:"string" required:"true"`
- // The name of the repository to set or change the default branch for.
- //
- // RepositoryName is a required field
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateDefaultBranchInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateDefaultBranchInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateDefaultBranchInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateDefaultBranchInput"}
- if s.DefaultBranchName == nil {
- invalidParams.Add(request.NewErrParamRequired("DefaultBranchName"))
- }
- if s.DefaultBranchName != nil && len(*s.DefaultBranchName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DefaultBranchName", 1))
- }
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateDefaultBranchOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s UpdateDefaultBranchOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateDefaultBranchOutput) GoString() string {
- return s.String()
- }
- // Represents the input of an update repository description operation.
- type UpdateRepositoryDescriptionInput struct {
- _ struct{} `type:"structure"`
- // The new comment or description for the specified repository. Repository descriptions
- // are limited to 1,000 characters.
- RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
- // The name of the repository to set or change the comment or description for.
- //
- // RepositoryName is a required field
- RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateRepositoryDescriptionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRepositoryDescriptionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateRepositoryDescriptionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryDescriptionInput"}
- if s.RepositoryName == nil {
- invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
- }
- if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateRepositoryDescriptionOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s UpdateRepositoryDescriptionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRepositoryDescriptionOutput) GoString() string {
- return s.String()
- }
- // Represents the input of an update repository description operation.
- type UpdateRepositoryNameInput struct {
- _ struct{} `type:"structure"`
- // The new name for the repository.
- //
- // NewName is a required field
- NewName *string `locationName:"newName" min:"1" type:"string" required:"true"`
- // The existing name of the repository.
- //
- // OldName is a required field
- OldName *string `locationName:"oldName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateRepositoryNameInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRepositoryNameInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateRepositoryNameInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryNameInput"}
- if s.NewName == nil {
- invalidParams.Add(request.NewErrParamRequired("NewName"))
- }
- if s.NewName != nil && len(*s.NewName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NewName", 1))
- }
- if s.OldName == nil {
- invalidParams.Add(request.NewErrParamRequired("OldName"))
- }
- if s.OldName != nil && len(*s.OldName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("OldName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateRepositoryNameOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s UpdateRepositoryNameOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRepositoryNameOutput) GoString() string {
- return s.String()
- }
- // Information about the user who made a specified commit.
- type UserInfo struct {
- _ struct{} `type:"structure"`
- // The date when the specified commit was pushed to the repository.
- Date *string `locationName:"date" type:"string"`
- // The email address associated with the user who made the commit, if any.
- Email *string `locationName:"email" type:"string"`
- // The name of the user who made the specified commit.
- Name *string `locationName:"name" type:"string"`
- }
- // String returns the string representation
- func (s UserInfo) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UserInfo) GoString() string {
- return s.String()
- }
- const (
- // OrderEnumAscending is a OrderEnum enum value
- OrderEnumAscending = "ascending"
- // OrderEnumDescending is a OrderEnum enum value
- OrderEnumDescending = "descending"
- )
- const (
- // RepositoryTriggerEventEnumAll is a RepositoryTriggerEventEnum enum value
- RepositoryTriggerEventEnumAll = "all"
- // RepositoryTriggerEventEnumUpdateReference is a RepositoryTriggerEventEnum enum value
- RepositoryTriggerEventEnumUpdateReference = "updateReference"
- // RepositoryTriggerEventEnumCreateReference is a RepositoryTriggerEventEnum enum value
- RepositoryTriggerEventEnumCreateReference = "createReference"
- // RepositoryTriggerEventEnumDeleteReference is a RepositoryTriggerEventEnum enum value
- RepositoryTriggerEventEnumDeleteReference = "deleteReference"
- )
- const (
- // SortByEnumRepositoryName is a SortByEnum enum value
- SortByEnumRepositoryName = "repositoryName"
- // SortByEnumLastModifiedDate is a SortByEnum enum value
- SortByEnumLastModifiedDate = "lastModifiedDate"
- )
|