api.go 88 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package codecommit provides a client for AWS CodeCommit.
  3. package codecommit
  4. import (
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  10. )
  11. const opBatchGetRepositories = "BatchGetRepositories"
  12. // BatchGetRepositoriesRequest generates a "aws/request.Request" representing the
  13. // client's request for the BatchGetRepositories operation. The "output" return
  14. // value can be used to capture response data after the request's "Send" method
  15. // is called.
  16. //
  17. // See BatchGetRepositories for usage and error information.
  18. //
  19. // Creating a request object using this method should be used when you want to inject
  20. // custom logic into the request's lifecycle using a custom handler, or if you want to
  21. // access properties on the request object before or after sending the request. If
  22. // you just want the service response, call the BatchGetRepositories method directly
  23. // instead.
  24. //
  25. // Note: You must call the "Send" method on the returned request object in order
  26. // to execute the request.
  27. //
  28. // // Example sending a request using the BatchGetRepositoriesRequest method.
  29. // req, resp := client.BatchGetRepositoriesRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. func (c *CodeCommit) BatchGetRepositoriesRequest(input *BatchGetRepositoriesInput) (req *request.Request, output *BatchGetRepositoriesOutput) {
  37. op := &request.Operation{
  38. Name: opBatchGetRepositories,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/",
  41. }
  42. if input == nil {
  43. input = &BatchGetRepositoriesInput{}
  44. }
  45. req = c.newRequest(op, input, output)
  46. output = &BatchGetRepositoriesOutput{}
  47. req.Data = output
  48. return
  49. }
  50. // BatchGetRepositories API operation for AWS CodeCommit.
  51. //
  52. // Returns information about one or more repositories.
  53. //
  54. // The description field for a repository accepts all HTML characters and all
  55. // valid Unicode characters. Applications that do not HTML-encode the description
  56. // and display it in a web page could expose users to potentially malicious
  57. // code. Make sure that you HTML-encode the description field in any application
  58. // that uses this API to display the repository description on a web page.
  59. //
  60. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  61. // with awserr.Error's Code and Message methods to get detailed information about
  62. // the error.
  63. //
  64. // See the AWS API reference guide for AWS CodeCommit's
  65. // API operation BatchGetRepositories for usage and error information.
  66. //
  67. // Returned Error Codes:
  68. // * RepositoryNamesRequiredException
  69. // A repository names object is required but was not specified.
  70. //
  71. // * MaximumRepositoryNamesExceededException
  72. // The maximum number of allowed repository names was exceeded. Currently, this
  73. // number is 25.
  74. //
  75. // * InvalidRepositoryNameException
  76. // At least one specified repository name is not valid.
  77. //
  78. // This exception only occurs when a specified repository name is not valid.
  79. // Other exceptions occur when a required repository parameter is missing, or
  80. // when a specified repository does not exist.
  81. //
  82. // * EncryptionIntegrityChecksFailedException
  83. // An encryption integrity check failed.
  84. //
  85. // * EncryptionKeyAccessDeniedException
  86. // An encryption key could not be accessed.
  87. //
  88. // * EncryptionKeyDisabledException
  89. // The encryption key is disabled.
  90. //
  91. // * EncryptionKeyNotFoundException
  92. // No encryption key was found.
  93. //
  94. // * EncryptionKeyUnavailableException
  95. // The encryption key is not available.
  96. //
  97. func (c *CodeCommit) BatchGetRepositories(input *BatchGetRepositoriesInput) (*BatchGetRepositoriesOutput, error) {
  98. req, out := c.BatchGetRepositoriesRequest(input)
  99. err := req.Send()
  100. return out, err
  101. }
  102. const opCreateBranch = "CreateBranch"
  103. // CreateBranchRequest generates a "aws/request.Request" representing the
  104. // client's request for the CreateBranch operation. The "output" return
  105. // value can be used to capture response data after the request's "Send" method
  106. // is called.
  107. //
  108. // See CreateBranch for usage and error information.
  109. //
  110. // Creating a request object using this method should be used when you want to inject
  111. // custom logic into the request's lifecycle using a custom handler, or if you want to
  112. // access properties on the request object before or after sending the request. If
  113. // you just want the service response, call the CreateBranch method directly
  114. // instead.
  115. //
  116. // Note: You must call the "Send" method on the returned request object in order
  117. // to execute the request.
  118. //
  119. // // Example sending a request using the CreateBranchRequest method.
  120. // req, resp := client.CreateBranchRequest(params)
  121. //
  122. // err := req.Send()
  123. // if err == nil { // resp is now filled
  124. // fmt.Println(resp)
  125. // }
  126. //
  127. func (c *CodeCommit) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) {
  128. op := &request.Operation{
  129. Name: opCreateBranch,
  130. HTTPMethod: "POST",
  131. HTTPPath: "/",
  132. }
  133. if input == nil {
  134. input = &CreateBranchInput{}
  135. }
  136. req = c.newRequest(op, input, output)
  137. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  138. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  139. output = &CreateBranchOutput{}
  140. req.Data = output
  141. return
  142. }
  143. // CreateBranch API operation for AWS CodeCommit.
  144. //
  145. // Creates a new branch in a repository and points the branch to a commit.
  146. //
  147. // Calling the create branch operation does not set a repository's default branch.
  148. // To do this, call the update default branch operation.
  149. //
  150. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  151. // with awserr.Error's Code and Message methods to get detailed information about
  152. // the error.
  153. //
  154. // See the AWS API reference guide for AWS CodeCommit's
  155. // API operation CreateBranch for usage and error information.
  156. //
  157. // Returned Error Codes:
  158. // * RepositoryNameRequiredException
  159. // A repository name is required but was not specified.
  160. //
  161. // * InvalidRepositoryNameException
  162. // At least one specified repository name is not valid.
  163. //
  164. // This exception only occurs when a specified repository name is not valid.
  165. // Other exceptions occur when a required repository parameter is missing, or
  166. // when a specified repository does not exist.
  167. //
  168. // * RepositoryDoesNotExistException
  169. // The specified repository does not exist.
  170. //
  171. // * BranchNameRequiredException
  172. // A branch name is required but was not specified.
  173. //
  174. // * BranchNameExistsException
  175. // The specified branch name already exists.
  176. //
  177. // * InvalidBranchNameException
  178. // The specified branch name is not valid.
  179. //
  180. // * CommitIdRequiredException
  181. // A commit ID was not specified.
  182. //
  183. // * CommitDoesNotExistException
  184. // The specified commit does not exist or no commit was specified, and the specified
  185. // repository has no default branch.
  186. //
  187. // * InvalidCommitIdException
  188. // The specified commit ID is not valid.
  189. //
  190. // * EncryptionIntegrityChecksFailedException
  191. // An encryption integrity check failed.
  192. //
  193. // * EncryptionKeyAccessDeniedException
  194. // An encryption key could not be accessed.
  195. //
  196. // * EncryptionKeyDisabledException
  197. // The encryption key is disabled.
  198. //
  199. // * EncryptionKeyNotFoundException
  200. // No encryption key was found.
  201. //
  202. // * EncryptionKeyUnavailableException
  203. // The encryption key is not available.
  204. //
  205. func (c *CodeCommit) CreateBranch(input *CreateBranchInput) (*CreateBranchOutput, error) {
  206. req, out := c.CreateBranchRequest(input)
  207. err := req.Send()
  208. return out, err
  209. }
  210. const opCreateRepository = "CreateRepository"
  211. // CreateRepositoryRequest generates a "aws/request.Request" representing the
  212. // client's request for the CreateRepository operation. The "output" return
  213. // value can be used to capture response data after the request's "Send" method
  214. // is called.
  215. //
  216. // See CreateRepository for usage and error information.
  217. //
  218. // Creating a request object using this method should be used when you want to inject
  219. // custom logic into the request's lifecycle using a custom handler, or if you want to
  220. // access properties on the request object before or after sending the request. If
  221. // you just want the service response, call the CreateRepository method directly
  222. // instead.
  223. //
  224. // Note: You must call the "Send" method on the returned request object in order
  225. // to execute the request.
  226. //
  227. // // Example sending a request using the CreateRepositoryRequest method.
  228. // req, resp := client.CreateRepositoryRequest(params)
  229. //
  230. // err := req.Send()
  231. // if err == nil { // resp is now filled
  232. // fmt.Println(resp)
  233. // }
  234. //
  235. func (c *CodeCommit) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) {
  236. op := &request.Operation{
  237. Name: opCreateRepository,
  238. HTTPMethod: "POST",
  239. HTTPPath: "/",
  240. }
  241. if input == nil {
  242. input = &CreateRepositoryInput{}
  243. }
  244. req = c.newRequest(op, input, output)
  245. output = &CreateRepositoryOutput{}
  246. req.Data = output
  247. return
  248. }
  249. // CreateRepository API operation for AWS CodeCommit.
  250. //
  251. // Creates a new, empty repository.
  252. //
  253. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  254. // with awserr.Error's Code and Message methods to get detailed information about
  255. // the error.
  256. //
  257. // See the AWS API reference guide for AWS CodeCommit's
  258. // API operation CreateRepository for usage and error information.
  259. //
  260. // Returned Error Codes:
  261. // * RepositoryNameExistsException
  262. // The specified repository name already exists.
  263. //
  264. // * RepositoryNameRequiredException
  265. // A repository name is required but was not specified.
  266. //
  267. // * InvalidRepositoryNameException
  268. // At least one specified repository name is not valid.
  269. //
  270. // This exception only occurs when a specified repository name is not valid.
  271. // Other exceptions occur when a required repository parameter is missing, or
  272. // when a specified repository does not exist.
  273. //
  274. // * InvalidRepositoryDescriptionException
  275. // The specified repository description is not valid.
  276. //
  277. // * RepositoryLimitExceededException
  278. // A repository resource limit was exceeded.
  279. //
  280. // * EncryptionIntegrityChecksFailedException
  281. // An encryption integrity check failed.
  282. //
  283. // * EncryptionKeyAccessDeniedException
  284. // An encryption key could not be accessed.
  285. //
  286. // * EncryptionKeyDisabledException
  287. // The encryption key is disabled.
  288. //
  289. // * EncryptionKeyNotFoundException
  290. // No encryption key was found.
  291. //
  292. // * EncryptionKeyUnavailableException
  293. // The encryption key is not available.
  294. //
  295. func (c *CodeCommit) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
  296. req, out := c.CreateRepositoryRequest(input)
  297. err := req.Send()
  298. return out, err
  299. }
  300. const opDeleteRepository = "DeleteRepository"
  301. // DeleteRepositoryRequest generates a "aws/request.Request" representing the
  302. // client's request for the DeleteRepository operation. The "output" return
  303. // value can be used to capture response data after the request's "Send" method
  304. // is called.
  305. //
  306. // See DeleteRepository for usage and error information.
  307. //
  308. // Creating a request object using this method should be used when you want to inject
  309. // custom logic into the request's lifecycle using a custom handler, or if you want to
  310. // access properties on the request object before or after sending the request. If
  311. // you just want the service response, call the DeleteRepository method directly
  312. // instead.
  313. //
  314. // Note: You must call the "Send" method on the returned request object in order
  315. // to execute the request.
  316. //
  317. // // Example sending a request using the DeleteRepositoryRequest method.
  318. // req, resp := client.DeleteRepositoryRequest(params)
  319. //
  320. // err := req.Send()
  321. // if err == nil { // resp is now filled
  322. // fmt.Println(resp)
  323. // }
  324. //
  325. func (c *CodeCommit) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) {
  326. op := &request.Operation{
  327. Name: opDeleteRepository,
  328. HTTPMethod: "POST",
  329. HTTPPath: "/",
  330. }
  331. if input == nil {
  332. input = &DeleteRepositoryInput{}
  333. }
  334. req = c.newRequest(op, input, output)
  335. output = &DeleteRepositoryOutput{}
  336. req.Data = output
  337. return
  338. }
  339. // DeleteRepository API operation for AWS CodeCommit.
  340. //
  341. // Deletes a repository. If a specified repository was already deleted, a null
  342. // repository ID will be returned.
  343. //
  344. // Deleting a repository also deletes all associated objects and metadata. After
  345. // a repository is deleted, all future push calls to the deleted repository
  346. // will fail.
  347. //
  348. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  349. // with awserr.Error's Code and Message methods to get detailed information about
  350. // the error.
  351. //
  352. // See the AWS API reference guide for AWS CodeCommit's
  353. // API operation DeleteRepository for usage and error information.
  354. //
  355. // Returned Error Codes:
  356. // * RepositoryNameRequiredException
  357. // A repository name is required but was not specified.
  358. //
  359. // * InvalidRepositoryNameException
  360. // At least one specified repository name is not valid.
  361. //
  362. // This exception only occurs when a specified repository name is not valid.
  363. // Other exceptions occur when a required repository parameter is missing, or
  364. // when a specified repository does not exist.
  365. //
  366. // * EncryptionIntegrityChecksFailedException
  367. // An encryption integrity check failed.
  368. //
  369. // * EncryptionKeyAccessDeniedException
  370. // An encryption key could not be accessed.
  371. //
  372. // * EncryptionKeyDisabledException
  373. // The encryption key is disabled.
  374. //
  375. // * EncryptionKeyNotFoundException
  376. // No encryption key was found.
  377. //
  378. // * EncryptionKeyUnavailableException
  379. // The encryption key is not available.
  380. //
  381. func (c *CodeCommit) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
  382. req, out := c.DeleteRepositoryRequest(input)
  383. err := req.Send()
  384. return out, err
  385. }
  386. const opGetBranch = "GetBranch"
  387. // GetBranchRequest generates a "aws/request.Request" representing the
  388. // client's request for the GetBranch operation. The "output" return
  389. // value can be used to capture response data after the request's "Send" method
  390. // is called.
  391. //
  392. // See GetBranch for usage and error information.
  393. //
  394. // Creating a request object using this method should be used when you want to inject
  395. // custom logic into the request's lifecycle using a custom handler, or if you want to
  396. // access properties on the request object before or after sending the request. If
  397. // you just want the service response, call the GetBranch method directly
  398. // instead.
  399. //
  400. // Note: You must call the "Send" method on the returned request object in order
  401. // to execute the request.
  402. //
  403. // // Example sending a request using the GetBranchRequest method.
  404. // req, resp := client.GetBranchRequest(params)
  405. //
  406. // err := req.Send()
  407. // if err == nil { // resp is now filled
  408. // fmt.Println(resp)
  409. // }
  410. //
  411. func (c *CodeCommit) GetBranchRequest(input *GetBranchInput) (req *request.Request, output *GetBranchOutput) {
  412. op := &request.Operation{
  413. Name: opGetBranch,
  414. HTTPMethod: "POST",
  415. HTTPPath: "/",
  416. }
  417. if input == nil {
  418. input = &GetBranchInput{}
  419. }
  420. req = c.newRequest(op, input, output)
  421. output = &GetBranchOutput{}
  422. req.Data = output
  423. return
  424. }
  425. // GetBranch API operation for AWS CodeCommit.
  426. //
  427. // Returns information about a repository branch, including its name and the
  428. // last commit ID.
  429. //
  430. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  431. // with awserr.Error's Code and Message methods to get detailed information about
  432. // the error.
  433. //
  434. // See the AWS API reference guide for AWS CodeCommit's
  435. // API operation GetBranch for usage and error information.
  436. //
  437. // Returned Error Codes:
  438. // * RepositoryNameRequiredException
  439. // A repository name is required but was not specified.
  440. //
  441. // * RepositoryDoesNotExistException
  442. // The specified repository does not exist.
  443. //
  444. // * InvalidRepositoryNameException
  445. // At least one specified repository name is not valid.
  446. //
  447. // This exception only occurs when a specified repository name is not valid.
  448. // Other exceptions occur when a required repository parameter is missing, or
  449. // when a specified repository does not exist.
  450. //
  451. // * BranchNameRequiredException
  452. // A branch name is required but was not specified.
  453. //
  454. // * InvalidBranchNameException
  455. // The specified branch name is not valid.
  456. //
  457. // * BranchDoesNotExistException
  458. // The specified branch does not exist.
  459. //
  460. // * EncryptionIntegrityChecksFailedException
  461. // An encryption integrity check failed.
  462. //
  463. // * EncryptionKeyAccessDeniedException
  464. // An encryption key could not be accessed.
  465. //
  466. // * EncryptionKeyDisabledException
  467. // The encryption key is disabled.
  468. //
  469. // * EncryptionKeyNotFoundException
  470. // No encryption key was found.
  471. //
  472. // * EncryptionKeyUnavailableException
  473. // The encryption key is not available.
  474. //
  475. func (c *CodeCommit) GetBranch(input *GetBranchInput) (*GetBranchOutput, error) {
  476. req, out := c.GetBranchRequest(input)
  477. err := req.Send()
  478. return out, err
  479. }
  480. const opGetCommit = "GetCommit"
  481. // GetCommitRequest generates a "aws/request.Request" representing the
  482. // client's request for the GetCommit operation. The "output" return
  483. // value can be used to capture response data after the request's "Send" method
  484. // is called.
  485. //
  486. // See GetCommit for usage and error information.
  487. //
  488. // Creating a request object using this method should be used when you want to inject
  489. // custom logic into the request's lifecycle using a custom handler, or if you want to
  490. // access properties on the request object before or after sending the request. If
  491. // you just want the service response, call the GetCommit method directly
  492. // instead.
  493. //
  494. // Note: You must call the "Send" method on the returned request object in order
  495. // to execute the request.
  496. //
  497. // // Example sending a request using the GetCommitRequest method.
  498. // req, resp := client.GetCommitRequest(params)
  499. //
  500. // err := req.Send()
  501. // if err == nil { // resp is now filled
  502. // fmt.Println(resp)
  503. // }
  504. //
  505. func (c *CodeCommit) GetCommitRequest(input *GetCommitInput) (req *request.Request, output *GetCommitOutput) {
  506. op := &request.Operation{
  507. Name: opGetCommit,
  508. HTTPMethod: "POST",
  509. HTTPPath: "/",
  510. }
  511. if input == nil {
  512. input = &GetCommitInput{}
  513. }
  514. req = c.newRequest(op, input, output)
  515. output = &GetCommitOutput{}
  516. req.Data = output
  517. return
  518. }
  519. // GetCommit API operation for AWS CodeCommit.
  520. //
  521. // Returns information about a commit, including commit message and committer
  522. // information.
  523. //
  524. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  525. // with awserr.Error's Code and Message methods to get detailed information about
  526. // the error.
  527. //
  528. // See the AWS API reference guide for AWS CodeCommit's
  529. // API operation GetCommit for usage and error information.
  530. //
  531. // Returned Error Codes:
  532. // * RepositoryNameRequiredException
  533. // A repository name is required but was not specified.
  534. //
  535. // * InvalidRepositoryNameException
  536. // At least one specified repository name is not valid.
  537. //
  538. // This exception only occurs when a specified repository name is not valid.
  539. // Other exceptions occur when a required repository parameter is missing, or
  540. // when a specified repository does not exist.
  541. //
  542. // * RepositoryDoesNotExistException
  543. // The specified repository does not exist.
  544. //
  545. // * CommitIdRequiredException
  546. // A commit ID was not specified.
  547. //
  548. // * InvalidCommitIdException
  549. // The specified commit ID is not valid.
  550. //
  551. // * CommitIdDoesNotExistException
  552. // The specified commit ID does not exist.
  553. //
  554. // * EncryptionIntegrityChecksFailedException
  555. // An encryption integrity check failed.
  556. //
  557. // * EncryptionKeyAccessDeniedException
  558. // An encryption key could not be accessed.
  559. //
  560. // * EncryptionKeyDisabledException
  561. // The encryption key is disabled.
  562. //
  563. // * EncryptionKeyNotFoundException
  564. // No encryption key was found.
  565. //
  566. // * EncryptionKeyUnavailableException
  567. // The encryption key is not available.
  568. //
  569. func (c *CodeCommit) GetCommit(input *GetCommitInput) (*GetCommitOutput, error) {
  570. req, out := c.GetCommitRequest(input)
  571. err := req.Send()
  572. return out, err
  573. }
  574. const opGetRepository = "GetRepository"
  575. // GetRepositoryRequest generates a "aws/request.Request" representing the
  576. // client's request for the GetRepository operation. The "output" return
  577. // value can be used to capture response data after the request's "Send" method
  578. // is called.
  579. //
  580. // See GetRepository for usage and error information.
  581. //
  582. // Creating a request object using this method should be used when you want to inject
  583. // custom logic into the request's lifecycle using a custom handler, or if you want to
  584. // access properties on the request object before or after sending the request. If
  585. // you just want the service response, call the GetRepository method directly
  586. // instead.
  587. //
  588. // Note: You must call the "Send" method on the returned request object in order
  589. // to execute the request.
  590. //
  591. // // Example sending a request using the GetRepositoryRequest method.
  592. // req, resp := client.GetRepositoryRequest(params)
  593. //
  594. // err := req.Send()
  595. // if err == nil { // resp is now filled
  596. // fmt.Println(resp)
  597. // }
  598. //
  599. func (c *CodeCommit) GetRepositoryRequest(input *GetRepositoryInput) (req *request.Request, output *GetRepositoryOutput) {
  600. op := &request.Operation{
  601. Name: opGetRepository,
  602. HTTPMethod: "POST",
  603. HTTPPath: "/",
  604. }
  605. if input == nil {
  606. input = &GetRepositoryInput{}
  607. }
  608. req = c.newRequest(op, input, output)
  609. output = &GetRepositoryOutput{}
  610. req.Data = output
  611. return
  612. }
  613. // GetRepository API operation for AWS CodeCommit.
  614. //
  615. // Returns information about a repository.
  616. //
  617. // The description field for a repository accepts all HTML characters and all
  618. // valid Unicode characters. Applications that do not HTML-encode the description
  619. // and display it in a web page could expose users to potentially malicious
  620. // code. Make sure that you HTML-encode the description field in any application
  621. // that uses this API to display the repository description on a web page.
  622. //
  623. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  624. // with awserr.Error's Code and Message methods to get detailed information about
  625. // the error.
  626. //
  627. // See the AWS API reference guide for AWS CodeCommit's
  628. // API operation GetRepository for usage and error information.
  629. //
  630. // Returned Error Codes:
  631. // * RepositoryNameRequiredException
  632. // A repository name is required but was not specified.
  633. //
  634. // * RepositoryDoesNotExistException
  635. // The specified repository does not exist.
  636. //
  637. // * InvalidRepositoryNameException
  638. // At least one specified repository name is not valid.
  639. //
  640. // This exception only occurs when a specified repository name is not valid.
  641. // Other exceptions occur when a required repository parameter is missing, or
  642. // when a specified repository does not exist.
  643. //
  644. // * EncryptionIntegrityChecksFailedException
  645. // An encryption integrity check failed.
  646. //
  647. // * EncryptionKeyAccessDeniedException
  648. // An encryption key could not be accessed.
  649. //
  650. // * EncryptionKeyDisabledException
  651. // The encryption key is disabled.
  652. //
  653. // * EncryptionKeyNotFoundException
  654. // No encryption key was found.
  655. //
  656. // * EncryptionKeyUnavailableException
  657. // The encryption key is not available.
  658. //
  659. func (c *CodeCommit) GetRepository(input *GetRepositoryInput) (*GetRepositoryOutput, error) {
  660. req, out := c.GetRepositoryRequest(input)
  661. err := req.Send()
  662. return out, err
  663. }
  664. const opGetRepositoryTriggers = "GetRepositoryTriggers"
  665. // GetRepositoryTriggersRequest generates a "aws/request.Request" representing the
  666. // client's request for the GetRepositoryTriggers operation. The "output" return
  667. // value can be used to capture response data after the request's "Send" method
  668. // is called.
  669. //
  670. // See GetRepositoryTriggers for usage and error information.
  671. //
  672. // Creating a request object using this method should be used when you want to inject
  673. // custom logic into the request's lifecycle using a custom handler, or if you want to
  674. // access properties on the request object before or after sending the request. If
  675. // you just want the service response, call the GetRepositoryTriggers method directly
  676. // instead.
  677. //
  678. // Note: You must call the "Send" method on the returned request object in order
  679. // to execute the request.
  680. //
  681. // // Example sending a request using the GetRepositoryTriggersRequest method.
  682. // req, resp := client.GetRepositoryTriggersRequest(params)
  683. //
  684. // err := req.Send()
  685. // if err == nil { // resp is now filled
  686. // fmt.Println(resp)
  687. // }
  688. //
  689. func (c *CodeCommit) GetRepositoryTriggersRequest(input *GetRepositoryTriggersInput) (req *request.Request, output *GetRepositoryTriggersOutput) {
  690. op := &request.Operation{
  691. Name: opGetRepositoryTriggers,
  692. HTTPMethod: "POST",
  693. HTTPPath: "/",
  694. }
  695. if input == nil {
  696. input = &GetRepositoryTriggersInput{}
  697. }
  698. req = c.newRequest(op, input, output)
  699. output = &GetRepositoryTriggersOutput{}
  700. req.Data = output
  701. return
  702. }
  703. // GetRepositoryTriggers API operation for AWS CodeCommit.
  704. //
  705. // Gets information about triggers configured for a repository.
  706. //
  707. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  708. // with awserr.Error's Code and Message methods to get detailed information about
  709. // the error.
  710. //
  711. // See the AWS API reference guide for AWS CodeCommit's
  712. // API operation GetRepositoryTriggers for usage and error information.
  713. //
  714. // Returned Error Codes:
  715. // * RepositoryNameRequiredException
  716. // A repository name is required but was not specified.
  717. //
  718. // * InvalidRepositoryNameException
  719. // At least one specified repository name is not valid.
  720. //
  721. // This exception only occurs when a specified repository name is not valid.
  722. // Other exceptions occur when a required repository parameter is missing, or
  723. // when a specified repository does not exist.
  724. //
  725. // * RepositoryDoesNotExistException
  726. // The specified repository does not exist.
  727. //
  728. // * EncryptionIntegrityChecksFailedException
  729. // An encryption integrity check failed.
  730. //
  731. // * EncryptionKeyAccessDeniedException
  732. // An encryption key could not be accessed.
  733. //
  734. // * EncryptionKeyDisabledException
  735. // The encryption key is disabled.
  736. //
  737. // * EncryptionKeyNotFoundException
  738. // No encryption key was found.
  739. //
  740. // * EncryptionKeyUnavailableException
  741. // The encryption key is not available.
  742. //
  743. func (c *CodeCommit) GetRepositoryTriggers(input *GetRepositoryTriggersInput) (*GetRepositoryTriggersOutput, error) {
  744. req, out := c.GetRepositoryTriggersRequest(input)
  745. err := req.Send()
  746. return out, err
  747. }
  748. const opListBranches = "ListBranches"
  749. // ListBranchesRequest generates a "aws/request.Request" representing the
  750. // client's request for the ListBranches operation. The "output" return
  751. // value can be used to capture response data after the request's "Send" method
  752. // is called.
  753. //
  754. // See ListBranches for usage and error information.
  755. //
  756. // Creating a request object using this method should be used when you want to inject
  757. // custom logic into the request's lifecycle using a custom handler, or if you want to
  758. // access properties on the request object before or after sending the request. If
  759. // you just want the service response, call the ListBranches method directly
  760. // instead.
  761. //
  762. // Note: You must call the "Send" method on the returned request object in order
  763. // to execute the request.
  764. //
  765. // // Example sending a request using the ListBranchesRequest method.
  766. // req, resp := client.ListBranchesRequest(params)
  767. //
  768. // err := req.Send()
  769. // if err == nil { // resp is now filled
  770. // fmt.Println(resp)
  771. // }
  772. //
  773. func (c *CodeCommit) ListBranchesRequest(input *ListBranchesInput) (req *request.Request, output *ListBranchesOutput) {
  774. op := &request.Operation{
  775. Name: opListBranches,
  776. HTTPMethod: "POST",
  777. HTTPPath: "/",
  778. Paginator: &request.Paginator{
  779. InputTokens: []string{"nextToken"},
  780. OutputTokens: []string{"nextToken"},
  781. LimitToken: "",
  782. TruncationToken: "",
  783. },
  784. }
  785. if input == nil {
  786. input = &ListBranchesInput{}
  787. }
  788. req = c.newRequest(op, input, output)
  789. output = &ListBranchesOutput{}
  790. req.Data = output
  791. return
  792. }
  793. // ListBranches API operation for AWS CodeCommit.
  794. //
  795. // Gets information about one or more branches in a repository.
  796. //
  797. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  798. // with awserr.Error's Code and Message methods to get detailed information about
  799. // the error.
  800. //
  801. // See the AWS API reference guide for AWS CodeCommit's
  802. // API operation ListBranches for usage and error information.
  803. //
  804. // Returned Error Codes:
  805. // * RepositoryNameRequiredException
  806. // A repository name is required but was not specified.
  807. //
  808. // * RepositoryDoesNotExistException
  809. // The specified repository does not exist.
  810. //
  811. // * InvalidRepositoryNameException
  812. // At least one specified repository name is not valid.
  813. //
  814. // This exception only occurs when a specified repository name is not valid.
  815. // Other exceptions occur when a required repository parameter is missing, or
  816. // when a specified repository does not exist.
  817. //
  818. // * EncryptionIntegrityChecksFailedException
  819. // An encryption integrity check failed.
  820. //
  821. // * EncryptionKeyAccessDeniedException
  822. // An encryption key could not be accessed.
  823. //
  824. // * EncryptionKeyDisabledException
  825. // The encryption key is disabled.
  826. //
  827. // * EncryptionKeyNotFoundException
  828. // No encryption key was found.
  829. //
  830. // * EncryptionKeyUnavailableException
  831. // The encryption key is not available.
  832. //
  833. // * InvalidContinuationTokenException
  834. // The specified continuation token is not valid.
  835. //
  836. func (c *CodeCommit) ListBranches(input *ListBranchesInput) (*ListBranchesOutput, error) {
  837. req, out := c.ListBranchesRequest(input)
  838. err := req.Send()
  839. return out, err
  840. }
  841. // ListBranchesPages iterates over the pages of a ListBranches operation,
  842. // calling the "fn" function with the response data for each page. To stop
  843. // iterating, return false from the fn function.
  844. //
  845. // See ListBranches method for more information on how to use this operation.
  846. //
  847. // Note: This operation can generate multiple requests to a service.
  848. //
  849. // // Example iterating over at most 3 pages of a ListBranches operation.
  850. // pageNum := 0
  851. // err := client.ListBranchesPages(params,
  852. // func(page *ListBranchesOutput, lastPage bool) bool {
  853. // pageNum++
  854. // fmt.Println(page)
  855. // return pageNum <= 3
  856. // })
  857. //
  858. func (c *CodeCommit) ListBranchesPages(input *ListBranchesInput, fn func(p *ListBranchesOutput, lastPage bool) (shouldContinue bool)) error {
  859. page, _ := c.ListBranchesRequest(input)
  860. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  861. return page.EachPage(func(p interface{}, lastPage bool) bool {
  862. return fn(p.(*ListBranchesOutput), lastPage)
  863. })
  864. }
  865. const opListRepositories = "ListRepositories"
  866. // ListRepositoriesRequest generates a "aws/request.Request" representing the
  867. // client's request for the ListRepositories operation. The "output" return
  868. // value can be used to capture response data after the request's "Send" method
  869. // is called.
  870. //
  871. // See ListRepositories for usage and error information.
  872. //
  873. // Creating a request object using this method should be used when you want to inject
  874. // custom logic into the request's lifecycle using a custom handler, or if you want to
  875. // access properties on the request object before or after sending the request. If
  876. // you just want the service response, call the ListRepositories method directly
  877. // instead.
  878. //
  879. // Note: You must call the "Send" method on the returned request object in order
  880. // to execute the request.
  881. //
  882. // // Example sending a request using the ListRepositoriesRequest method.
  883. // req, resp := client.ListRepositoriesRequest(params)
  884. //
  885. // err := req.Send()
  886. // if err == nil { // resp is now filled
  887. // fmt.Println(resp)
  888. // }
  889. //
  890. func (c *CodeCommit) ListRepositoriesRequest(input *ListRepositoriesInput) (req *request.Request, output *ListRepositoriesOutput) {
  891. op := &request.Operation{
  892. Name: opListRepositories,
  893. HTTPMethod: "POST",
  894. HTTPPath: "/",
  895. Paginator: &request.Paginator{
  896. InputTokens: []string{"nextToken"},
  897. OutputTokens: []string{"nextToken"},
  898. LimitToken: "",
  899. TruncationToken: "",
  900. },
  901. }
  902. if input == nil {
  903. input = &ListRepositoriesInput{}
  904. }
  905. req = c.newRequest(op, input, output)
  906. output = &ListRepositoriesOutput{}
  907. req.Data = output
  908. return
  909. }
  910. // ListRepositories API operation for AWS CodeCommit.
  911. //
  912. // Gets information about one or more repositories.
  913. //
  914. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  915. // with awserr.Error's Code and Message methods to get detailed information about
  916. // the error.
  917. //
  918. // See the AWS API reference guide for AWS CodeCommit's
  919. // API operation ListRepositories for usage and error information.
  920. //
  921. // Returned Error Codes:
  922. // * InvalidSortByException
  923. // The specified sort by value is not valid.
  924. //
  925. // * InvalidOrderException
  926. // The specified sort order is not valid.
  927. //
  928. // * InvalidContinuationTokenException
  929. // The specified continuation token is not valid.
  930. //
  931. func (c *CodeCommit) ListRepositories(input *ListRepositoriesInput) (*ListRepositoriesOutput, error) {
  932. req, out := c.ListRepositoriesRequest(input)
  933. err := req.Send()
  934. return out, err
  935. }
  936. // ListRepositoriesPages iterates over the pages of a ListRepositories operation,
  937. // calling the "fn" function with the response data for each page. To stop
  938. // iterating, return false from the fn function.
  939. //
  940. // See ListRepositories method for more information on how to use this operation.
  941. //
  942. // Note: This operation can generate multiple requests to a service.
  943. //
  944. // // Example iterating over at most 3 pages of a ListRepositories operation.
  945. // pageNum := 0
  946. // err := client.ListRepositoriesPages(params,
  947. // func(page *ListRepositoriesOutput, lastPage bool) bool {
  948. // pageNum++
  949. // fmt.Println(page)
  950. // return pageNum <= 3
  951. // })
  952. //
  953. func (c *CodeCommit) ListRepositoriesPages(input *ListRepositoriesInput, fn func(p *ListRepositoriesOutput, lastPage bool) (shouldContinue bool)) error {
  954. page, _ := c.ListRepositoriesRequest(input)
  955. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  956. return page.EachPage(func(p interface{}, lastPage bool) bool {
  957. return fn(p.(*ListRepositoriesOutput), lastPage)
  958. })
  959. }
  960. const opPutRepositoryTriggers = "PutRepositoryTriggers"
  961. // PutRepositoryTriggersRequest generates a "aws/request.Request" representing the
  962. // client's request for the PutRepositoryTriggers operation. The "output" return
  963. // value can be used to capture response data after the request's "Send" method
  964. // is called.
  965. //
  966. // See PutRepositoryTriggers for usage and error information.
  967. //
  968. // Creating a request object using this method should be used when you want to inject
  969. // custom logic into the request's lifecycle using a custom handler, or if you want to
  970. // access properties on the request object before or after sending the request. If
  971. // you just want the service response, call the PutRepositoryTriggers method directly
  972. // instead.
  973. //
  974. // Note: You must call the "Send" method on the returned request object in order
  975. // to execute the request.
  976. //
  977. // // Example sending a request using the PutRepositoryTriggersRequest method.
  978. // req, resp := client.PutRepositoryTriggersRequest(params)
  979. //
  980. // err := req.Send()
  981. // if err == nil { // resp is now filled
  982. // fmt.Println(resp)
  983. // }
  984. //
  985. func (c *CodeCommit) PutRepositoryTriggersRequest(input *PutRepositoryTriggersInput) (req *request.Request, output *PutRepositoryTriggersOutput) {
  986. op := &request.Operation{
  987. Name: opPutRepositoryTriggers,
  988. HTTPMethod: "POST",
  989. HTTPPath: "/",
  990. }
  991. if input == nil {
  992. input = &PutRepositoryTriggersInput{}
  993. }
  994. req = c.newRequest(op, input, output)
  995. output = &PutRepositoryTriggersOutput{}
  996. req.Data = output
  997. return
  998. }
  999. // PutRepositoryTriggers API operation for AWS CodeCommit.
  1000. //
  1001. // Replaces all triggers for a repository. This can be used to create or delete
  1002. // triggers.
  1003. //
  1004. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1005. // with awserr.Error's Code and Message methods to get detailed information about
  1006. // the error.
  1007. //
  1008. // See the AWS API reference guide for AWS CodeCommit's
  1009. // API operation PutRepositoryTriggers for usage and error information.
  1010. //
  1011. // Returned Error Codes:
  1012. // * RepositoryDoesNotExistException
  1013. // The specified repository does not exist.
  1014. //
  1015. // * RepositoryNameRequiredException
  1016. // A repository name is required but was not specified.
  1017. //
  1018. // * InvalidRepositoryNameException
  1019. // At least one specified repository name is not valid.
  1020. //
  1021. // This exception only occurs when a specified repository name is not valid.
  1022. // Other exceptions occur when a required repository parameter is missing, or
  1023. // when a specified repository does not exist.
  1024. //
  1025. // * RepositoryTriggersListRequiredException
  1026. // The list of triggers for the repository is required but was not specified.
  1027. //
  1028. // * MaximumRepositoryTriggersExceededException
  1029. // The number of triggers allowed for the repository was exceeded.
  1030. //
  1031. // * InvalidRepositoryTriggerNameException
  1032. // The name of the trigger is not valid.
  1033. //
  1034. // * InvalidRepositoryTriggerDestinationArnException
  1035. // The Amazon Resource Name (ARN) for the trigger is not valid for the specified
  1036. // destination. The most common reason for this error is that the ARN does not
  1037. // meet the requirements for the service type.
  1038. //
  1039. // * InvalidRepositoryTriggerRegionException
  1040. // The region for the trigger target does not match the region for the repository.
  1041. // Triggers must be created in the same region as the target for the trigger.
  1042. //
  1043. // * InvalidRepositoryTriggerCustomDataException
  1044. // The custom data provided for the trigger is not valid.
  1045. //
  1046. // * MaximumBranchesExceededException
  1047. // The number of branches for the trigger was exceeded.
  1048. //
  1049. // * InvalidRepositoryTriggerBranchNameException
  1050. // One or more branch names specified for the trigger is not valid.
  1051. //
  1052. // * InvalidRepositoryTriggerEventsException
  1053. // One or more events specified for the trigger is not valid. Check to make
  1054. // sure that all events specified match the requirements for allowed events.
  1055. //
  1056. // * RepositoryTriggerNameRequiredException
  1057. // A name for the trigger is required but was not specified.
  1058. //
  1059. // * RepositoryTriggerDestinationArnRequiredException
  1060. // A destination ARN for the target service for the trigger is required but
  1061. // was not specified.
  1062. //
  1063. // * RepositoryTriggerBranchNameListRequiredException
  1064. // At least one branch name is required but was not specified in the trigger
  1065. // configuration.
  1066. //
  1067. // * RepositoryTriggerEventsListRequiredException
  1068. // At least one event for the trigger is required but was not specified.
  1069. //
  1070. // * EncryptionIntegrityChecksFailedException
  1071. // An encryption integrity check failed.
  1072. //
  1073. // * EncryptionKeyAccessDeniedException
  1074. // An encryption key could not be accessed.
  1075. //
  1076. // * EncryptionKeyDisabledException
  1077. // The encryption key is disabled.
  1078. //
  1079. // * EncryptionKeyNotFoundException
  1080. // No encryption key was found.
  1081. //
  1082. // * EncryptionKeyUnavailableException
  1083. // The encryption key is not available.
  1084. //
  1085. func (c *CodeCommit) PutRepositoryTriggers(input *PutRepositoryTriggersInput) (*PutRepositoryTriggersOutput, error) {
  1086. req, out := c.PutRepositoryTriggersRequest(input)
  1087. err := req.Send()
  1088. return out, err
  1089. }
  1090. const opTestRepositoryTriggers = "TestRepositoryTriggers"
  1091. // TestRepositoryTriggersRequest generates a "aws/request.Request" representing the
  1092. // client's request for the TestRepositoryTriggers operation. The "output" return
  1093. // value can be used to capture response data after the request's "Send" method
  1094. // is called.
  1095. //
  1096. // See TestRepositoryTriggers for usage and error information.
  1097. //
  1098. // Creating a request object using this method should be used when you want to inject
  1099. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1100. // access properties on the request object before or after sending the request. If
  1101. // you just want the service response, call the TestRepositoryTriggers method directly
  1102. // instead.
  1103. //
  1104. // Note: You must call the "Send" method on the returned request object in order
  1105. // to execute the request.
  1106. //
  1107. // // Example sending a request using the TestRepositoryTriggersRequest method.
  1108. // req, resp := client.TestRepositoryTriggersRequest(params)
  1109. //
  1110. // err := req.Send()
  1111. // if err == nil { // resp is now filled
  1112. // fmt.Println(resp)
  1113. // }
  1114. //
  1115. func (c *CodeCommit) TestRepositoryTriggersRequest(input *TestRepositoryTriggersInput) (req *request.Request, output *TestRepositoryTriggersOutput) {
  1116. op := &request.Operation{
  1117. Name: opTestRepositoryTriggers,
  1118. HTTPMethod: "POST",
  1119. HTTPPath: "/",
  1120. }
  1121. if input == nil {
  1122. input = &TestRepositoryTriggersInput{}
  1123. }
  1124. req = c.newRequest(op, input, output)
  1125. output = &TestRepositoryTriggersOutput{}
  1126. req.Data = output
  1127. return
  1128. }
  1129. // TestRepositoryTriggers API operation for AWS CodeCommit.
  1130. //
  1131. // Tests the functionality of repository triggers by sending information to
  1132. // the trigger target. If real data is available in the repository, the test
  1133. // will send data from the last commit. If no data is available, sample data
  1134. // will be generated.
  1135. //
  1136. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1137. // with awserr.Error's Code and Message methods to get detailed information about
  1138. // the error.
  1139. //
  1140. // See the AWS API reference guide for AWS CodeCommit's
  1141. // API operation TestRepositoryTriggers for usage and error information.
  1142. //
  1143. // Returned Error Codes:
  1144. // * RepositoryDoesNotExistException
  1145. // The specified repository does not exist.
  1146. //
  1147. // * RepositoryNameRequiredException
  1148. // A repository name is required but was not specified.
  1149. //
  1150. // * InvalidRepositoryNameException
  1151. // At least one specified repository name is not valid.
  1152. //
  1153. // This exception only occurs when a specified repository name is not valid.
  1154. // Other exceptions occur when a required repository parameter is missing, or
  1155. // when a specified repository does not exist.
  1156. //
  1157. // * RepositoryTriggersListRequiredException
  1158. // The list of triggers for the repository is required but was not specified.
  1159. //
  1160. // * MaximumRepositoryTriggersExceededException
  1161. // The number of triggers allowed for the repository was exceeded.
  1162. //
  1163. // * InvalidRepositoryTriggerNameException
  1164. // The name of the trigger is not valid.
  1165. //
  1166. // * InvalidRepositoryTriggerDestinationArnException
  1167. // The Amazon Resource Name (ARN) for the trigger is not valid for the specified
  1168. // destination. The most common reason for this error is that the ARN does not
  1169. // meet the requirements for the service type.
  1170. //
  1171. // * InvalidRepositoryTriggerRegionException
  1172. // The region for the trigger target does not match the region for the repository.
  1173. // Triggers must be created in the same region as the target for the trigger.
  1174. //
  1175. // * InvalidRepositoryTriggerCustomDataException
  1176. // The custom data provided for the trigger is not valid.
  1177. //
  1178. // * MaximumBranchesExceededException
  1179. // The number of branches for the trigger was exceeded.
  1180. //
  1181. // * InvalidRepositoryTriggerBranchNameException
  1182. // One or more branch names specified for the trigger is not valid.
  1183. //
  1184. // * InvalidRepositoryTriggerEventsException
  1185. // One or more events specified for the trigger is not valid. Check to make
  1186. // sure that all events specified match the requirements for allowed events.
  1187. //
  1188. // * RepositoryTriggerNameRequiredException
  1189. // A name for the trigger is required but was not specified.
  1190. //
  1191. // * RepositoryTriggerDestinationArnRequiredException
  1192. // A destination ARN for the target service for the trigger is required but
  1193. // was not specified.
  1194. //
  1195. // * RepositoryTriggerBranchNameListRequiredException
  1196. // At least one branch name is required but was not specified in the trigger
  1197. // configuration.
  1198. //
  1199. // * RepositoryTriggerEventsListRequiredException
  1200. // At least one event for the trigger is required but was not specified.
  1201. //
  1202. // * EncryptionIntegrityChecksFailedException
  1203. // An encryption integrity check failed.
  1204. //
  1205. // * EncryptionKeyAccessDeniedException
  1206. // An encryption key could not be accessed.
  1207. //
  1208. // * EncryptionKeyDisabledException
  1209. // The encryption key is disabled.
  1210. //
  1211. // * EncryptionKeyNotFoundException
  1212. // No encryption key was found.
  1213. //
  1214. // * EncryptionKeyUnavailableException
  1215. // The encryption key is not available.
  1216. //
  1217. func (c *CodeCommit) TestRepositoryTriggers(input *TestRepositoryTriggersInput) (*TestRepositoryTriggersOutput, error) {
  1218. req, out := c.TestRepositoryTriggersRequest(input)
  1219. err := req.Send()
  1220. return out, err
  1221. }
  1222. const opUpdateDefaultBranch = "UpdateDefaultBranch"
  1223. // UpdateDefaultBranchRequest generates a "aws/request.Request" representing the
  1224. // client's request for the UpdateDefaultBranch operation. The "output" return
  1225. // value can be used to capture response data after the request's "Send" method
  1226. // is called.
  1227. //
  1228. // See UpdateDefaultBranch for usage and error information.
  1229. //
  1230. // Creating a request object using this method should be used when you want to inject
  1231. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1232. // access properties on the request object before or after sending the request. If
  1233. // you just want the service response, call the UpdateDefaultBranch method directly
  1234. // instead.
  1235. //
  1236. // Note: You must call the "Send" method on the returned request object in order
  1237. // to execute the request.
  1238. //
  1239. // // Example sending a request using the UpdateDefaultBranchRequest method.
  1240. // req, resp := client.UpdateDefaultBranchRequest(params)
  1241. //
  1242. // err := req.Send()
  1243. // if err == nil { // resp is now filled
  1244. // fmt.Println(resp)
  1245. // }
  1246. //
  1247. func (c *CodeCommit) UpdateDefaultBranchRequest(input *UpdateDefaultBranchInput) (req *request.Request, output *UpdateDefaultBranchOutput) {
  1248. op := &request.Operation{
  1249. Name: opUpdateDefaultBranch,
  1250. HTTPMethod: "POST",
  1251. HTTPPath: "/",
  1252. }
  1253. if input == nil {
  1254. input = &UpdateDefaultBranchInput{}
  1255. }
  1256. req = c.newRequest(op, input, output)
  1257. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1258. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1259. output = &UpdateDefaultBranchOutput{}
  1260. req.Data = output
  1261. return
  1262. }
  1263. // UpdateDefaultBranch API operation for AWS CodeCommit.
  1264. //
  1265. // Sets or changes the default branch name for the specified repository.
  1266. //
  1267. // If you use this operation to change the default branch name to the current
  1268. // default branch name, a success message is returned even though the default
  1269. // branch did not change.
  1270. //
  1271. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1272. // with awserr.Error's Code and Message methods to get detailed information about
  1273. // the error.
  1274. //
  1275. // See the AWS API reference guide for AWS CodeCommit's
  1276. // API operation UpdateDefaultBranch for usage and error information.
  1277. //
  1278. // Returned Error Codes:
  1279. // * RepositoryNameRequiredException
  1280. // A repository name is required but was not specified.
  1281. //
  1282. // * RepositoryDoesNotExistException
  1283. // The specified repository does not exist.
  1284. //
  1285. // * InvalidRepositoryNameException
  1286. // At least one specified repository name is not valid.
  1287. //
  1288. // This exception only occurs when a specified repository name is not valid.
  1289. // Other exceptions occur when a required repository parameter is missing, or
  1290. // when a specified repository does not exist.
  1291. //
  1292. // * BranchNameRequiredException
  1293. // A branch name is required but was not specified.
  1294. //
  1295. // * InvalidBranchNameException
  1296. // The specified branch name is not valid.
  1297. //
  1298. // * BranchDoesNotExistException
  1299. // The specified branch does not exist.
  1300. //
  1301. // * EncryptionIntegrityChecksFailedException
  1302. // An encryption integrity check failed.
  1303. //
  1304. // * EncryptionKeyAccessDeniedException
  1305. // An encryption key could not be accessed.
  1306. //
  1307. // * EncryptionKeyDisabledException
  1308. // The encryption key is disabled.
  1309. //
  1310. // * EncryptionKeyNotFoundException
  1311. // No encryption key was found.
  1312. //
  1313. // * EncryptionKeyUnavailableException
  1314. // The encryption key is not available.
  1315. //
  1316. func (c *CodeCommit) UpdateDefaultBranch(input *UpdateDefaultBranchInput) (*UpdateDefaultBranchOutput, error) {
  1317. req, out := c.UpdateDefaultBranchRequest(input)
  1318. err := req.Send()
  1319. return out, err
  1320. }
  1321. const opUpdateRepositoryDescription = "UpdateRepositoryDescription"
  1322. // UpdateRepositoryDescriptionRequest generates a "aws/request.Request" representing the
  1323. // client's request for the UpdateRepositoryDescription operation. The "output" return
  1324. // value can be used to capture response data after the request's "Send" method
  1325. // is called.
  1326. //
  1327. // See UpdateRepositoryDescription for usage and error information.
  1328. //
  1329. // Creating a request object using this method should be used when you want to inject
  1330. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1331. // access properties on the request object before or after sending the request. If
  1332. // you just want the service response, call the UpdateRepositoryDescription method directly
  1333. // instead.
  1334. //
  1335. // Note: You must call the "Send" method on the returned request object in order
  1336. // to execute the request.
  1337. //
  1338. // // Example sending a request using the UpdateRepositoryDescriptionRequest method.
  1339. // req, resp := client.UpdateRepositoryDescriptionRequest(params)
  1340. //
  1341. // err := req.Send()
  1342. // if err == nil { // resp is now filled
  1343. // fmt.Println(resp)
  1344. // }
  1345. //
  1346. func (c *CodeCommit) UpdateRepositoryDescriptionRequest(input *UpdateRepositoryDescriptionInput) (req *request.Request, output *UpdateRepositoryDescriptionOutput) {
  1347. op := &request.Operation{
  1348. Name: opUpdateRepositoryDescription,
  1349. HTTPMethod: "POST",
  1350. HTTPPath: "/",
  1351. }
  1352. if input == nil {
  1353. input = &UpdateRepositoryDescriptionInput{}
  1354. }
  1355. req = c.newRequest(op, input, output)
  1356. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1357. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1358. output = &UpdateRepositoryDescriptionOutput{}
  1359. req.Data = output
  1360. return
  1361. }
  1362. // UpdateRepositoryDescription API operation for AWS CodeCommit.
  1363. //
  1364. // Sets or changes the comment or description for a repository.
  1365. //
  1366. // The description field for a repository accepts all HTML characters and all
  1367. // valid Unicode characters. Applications that do not HTML-encode the description
  1368. // and display it in a web page could expose users to potentially malicious
  1369. // code. Make sure that you HTML-encode the description field in any application
  1370. // that uses this API to display the repository description on a web page.
  1371. //
  1372. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1373. // with awserr.Error's Code and Message methods to get detailed information about
  1374. // the error.
  1375. //
  1376. // See the AWS API reference guide for AWS CodeCommit's
  1377. // API operation UpdateRepositoryDescription for usage and error information.
  1378. //
  1379. // Returned Error Codes:
  1380. // * RepositoryNameRequiredException
  1381. // A repository name is required but was not specified.
  1382. //
  1383. // * RepositoryDoesNotExistException
  1384. // The specified repository does not exist.
  1385. //
  1386. // * InvalidRepositoryNameException
  1387. // At least one specified repository name is not valid.
  1388. //
  1389. // This exception only occurs when a specified repository name is not valid.
  1390. // Other exceptions occur when a required repository parameter is missing, or
  1391. // when a specified repository does not exist.
  1392. //
  1393. // * InvalidRepositoryDescriptionException
  1394. // The specified repository description is not valid.
  1395. //
  1396. // * EncryptionIntegrityChecksFailedException
  1397. // An encryption integrity check failed.
  1398. //
  1399. // * EncryptionKeyAccessDeniedException
  1400. // An encryption key could not be accessed.
  1401. //
  1402. // * EncryptionKeyDisabledException
  1403. // The encryption key is disabled.
  1404. //
  1405. // * EncryptionKeyNotFoundException
  1406. // No encryption key was found.
  1407. //
  1408. // * EncryptionKeyUnavailableException
  1409. // The encryption key is not available.
  1410. //
  1411. func (c *CodeCommit) UpdateRepositoryDescription(input *UpdateRepositoryDescriptionInput) (*UpdateRepositoryDescriptionOutput, error) {
  1412. req, out := c.UpdateRepositoryDescriptionRequest(input)
  1413. err := req.Send()
  1414. return out, err
  1415. }
  1416. const opUpdateRepositoryName = "UpdateRepositoryName"
  1417. // UpdateRepositoryNameRequest generates a "aws/request.Request" representing the
  1418. // client's request for the UpdateRepositoryName operation. The "output" return
  1419. // value can be used to capture response data after the request's "Send" method
  1420. // is called.
  1421. //
  1422. // See UpdateRepositoryName for usage and error information.
  1423. //
  1424. // Creating a request object using this method should be used when you want to inject
  1425. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1426. // access properties on the request object before or after sending the request. If
  1427. // you just want the service response, call the UpdateRepositoryName method directly
  1428. // instead.
  1429. //
  1430. // Note: You must call the "Send" method on the returned request object in order
  1431. // to execute the request.
  1432. //
  1433. // // Example sending a request using the UpdateRepositoryNameRequest method.
  1434. // req, resp := client.UpdateRepositoryNameRequest(params)
  1435. //
  1436. // err := req.Send()
  1437. // if err == nil { // resp is now filled
  1438. // fmt.Println(resp)
  1439. // }
  1440. //
  1441. func (c *CodeCommit) UpdateRepositoryNameRequest(input *UpdateRepositoryNameInput) (req *request.Request, output *UpdateRepositoryNameOutput) {
  1442. op := &request.Operation{
  1443. Name: opUpdateRepositoryName,
  1444. HTTPMethod: "POST",
  1445. HTTPPath: "/",
  1446. }
  1447. if input == nil {
  1448. input = &UpdateRepositoryNameInput{}
  1449. }
  1450. req = c.newRequest(op, input, output)
  1451. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1452. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1453. output = &UpdateRepositoryNameOutput{}
  1454. req.Data = output
  1455. return
  1456. }
  1457. // UpdateRepositoryName API operation for AWS CodeCommit.
  1458. //
  1459. // Renames a repository. The repository name must be unique across the calling
  1460. // AWS account. In addition, repository names are limited to 100 alphanumeric,
  1461. // dash, and underscore characters, and cannot include certain characters. The
  1462. // suffix ".git" is prohibited. For a full description of the limits on repository
  1463. // names, see Limits (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html)
  1464. // in the AWS CodeCommit User Guide.
  1465. //
  1466. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1467. // with awserr.Error's Code and Message methods to get detailed information about
  1468. // the error.
  1469. //
  1470. // See the AWS API reference guide for AWS CodeCommit's
  1471. // API operation UpdateRepositoryName for usage and error information.
  1472. //
  1473. // Returned Error Codes:
  1474. // * RepositoryDoesNotExistException
  1475. // The specified repository does not exist.
  1476. //
  1477. // * RepositoryNameExistsException
  1478. // The specified repository name already exists.
  1479. //
  1480. // * RepositoryNameRequiredException
  1481. // A repository name is required but was not specified.
  1482. //
  1483. // * InvalidRepositoryNameException
  1484. // At least one specified repository name is not valid.
  1485. //
  1486. // This exception only occurs when a specified repository name is not valid.
  1487. // Other exceptions occur when a required repository parameter is missing, or
  1488. // when a specified repository does not exist.
  1489. //
  1490. func (c *CodeCommit) UpdateRepositoryName(input *UpdateRepositoryNameInput) (*UpdateRepositoryNameOutput, error) {
  1491. req, out := c.UpdateRepositoryNameRequest(input)
  1492. err := req.Send()
  1493. return out, err
  1494. }
  1495. // Represents the input of a batch get repositories operation.
  1496. type BatchGetRepositoriesInput struct {
  1497. _ struct{} `type:"structure"`
  1498. // The names of the repositories to get information about.
  1499. //
  1500. // RepositoryNames is a required field
  1501. RepositoryNames []*string `locationName:"repositoryNames" type:"list" required:"true"`
  1502. }
  1503. // String returns the string representation
  1504. func (s BatchGetRepositoriesInput) String() string {
  1505. return awsutil.Prettify(s)
  1506. }
  1507. // GoString returns the string representation
  1508. func (s BatchGetRepositoriesInput) GoString() string {
  1509. return s.String()
  1510. }
  1511. // Validate inspects the fields of the type to determine if they are valid.
  1512. func (s *BatchGetRepositoriesInput) Validate() error {
  1513. invalidParams := request.ErrInvalidParams{Context: "BatchGetRepositoriesInput"}
  1514. if s.RepositoryNames == nil {
  1515. invalidParams.Add(request.NewErrParamRequired("RepositoryNames"))
  1516. }
  1517. if invalidParams.Len() > 0 {
  1518. return invalidParams
  1519. }
  1520. return nil
  1521. }
  1522. // Represents the output of a batch get repositories operation.
  1523. type BatchGetRepositoriesOutput struct {
  1524. _ struct{} `type:"structure"`
  1525. // A list of repositories returned by the batch get repositories operation.
  1526. Repositories []*RepositoryMetadata `locationName:"repositories" type:"list"`
  1527. // Returns a list of repository names for which information could not be found.
  1528. RepositoriesNotFound []*string `locationName:"repositoriesNotFound" type:"list"`
  1529. }
  1530. // String returns the string representation
  1531. func (s BatchGetRepositoriesOutput) String() string {
  1532. return awsutil.Prettify(s)
  1533. }
  1534. // GoString returns the string representation
  1535. func (s BatchGetRepositoriesOutput) GoString() string {
  1536. return s.String()
  1537. }
  1538. // Returns information about a branch.
  1539. type BranchInfo struct {
  1540. _ struct{} `type:"structure"`
  1541. // The name of the branch.
  1542. BranchName *string `locationName:"branchName" min:"1" type:"string"`
  1543. // The ID of the last commit made to the branch.
  1544. CommitId *string `locationName:"commitId" type:"string"`
  1545. }
  1546. // String returns the string representation
  1547. func (s BranchInfo) String() string {
  1548. return awsutil.Prettify(s)
  1549. }
  1550. // GoString returns the string representation
  1551. func (s BranchInfo) GoString() string {
  1552. return s.String()
  1553. }
  1554. // Returns information about a specific commit.
  1555. type Commit struct {
  1556. _ struct{} `type:"structure"`
  1557. // Any additional data associated with the specified commit.
  1558. AdditionalData *string `locationName:"additionalData" type:"string"`
  1559. // Information about the author of the specified commit.
  1560. Author *UserInfo `locationName:"author" type:"structure"`
  1561. // Information about the person who committed the specified commit, also known
  1562. // as the committer. For more information about the difference between an author
  1563. // and a committer in Git, see Viewing the Commit History (http://git-scm.com/book/ch2-3.html)
  1564. // in Pro Git by Scott Chacon and Ben Straub.
  1565. Committer *UserInfo `locationName:"committer" type:"structure"`
  1566. // The message associated with the specified commit.
  1567. Message *string `locationName:"message" type:"string"`
  1568. // The parent list for the specified commit.
  1569. Parents []*string `locationName:"parents" type:"list"`
  1570. // Tree information for the specified commit.
  1571. TreeId *string `locationName:"treeId" type:"string"`
  1572. }
  1573. // String returns the string representation
  1574. func (s Commit) String() string {
  1575. return awsutil.Prettify(s)
  1576. }
  1577. // GoString returns the string representation
  1578. func (s Commit) GoString() string {
  1579. return s.String()
  1580. }
  1581. // Represents the input of a create branch operation.
  1582. type CreateBranchInput struct {
  1583. _ struct{} `type:"structure"`
  1584. // The name of the new branch to create.
  1585. //
  1586. // BranchName is a required field
  1587. BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"`
  1588. // The ID of the commit to point the new branch to.
  1589. //
  1590. // CommitId is a required field
  1591. CommitId *string `locationName:"commitId" type:"string" required:"true"`
  1592. // The name of the repository in which you want to create the new branch.
  1593. //
  1594. // RepositoryName is a required field
  1595. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  1596. }
  1597. // String returns the string representation
  1598. func (s CreateBranchInput) String() string {
  1599. return awsutil.Prettify(s)
  1600. }
  1601. // GoString returns the string representation
  1602. func (s CreateBranchInput) GoString() string {
  1603. return s.String()
  1604. }
  1605. // Validate inspects the fields of the type to determine if they are valid.
  1606. func (s *CreateBranchInput) Validate() error {
  1607. invalidParams := request.ErrInvalidParams{Context: "CreateBranchInput"}
  1608. if s.BranchName == nil {
  1609. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  1610. }
  1611. if s.BranchName != nil && len(*s.BranchName) < 1 {
  1612. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  1613. }
  1614. if s.CommitId == nil {
  1615. invalidParams.Add(request.NewErrParamRequired("CommitId"))
  1616. }
  1617. if s.RepositoryName == nil {
  1618. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1619. }
  1620. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  1621. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  1622. }
  1623. if invalidParams.Len() > 0 {
  1624. return invalidParams
  1625. }
  1626. return nil
  1627. }
  1628. type CreateBranchOutput struct {
  1629. _ struct{} `type:"structure"`
  1630. }
  1631. // String returns the string representation
  1632. func (s CreateBranchOutput) String() string {
  1633. return awsutil.Prettify(s)
  1634. }
  1635. // GoString returns the string representation
  1636. func (s CreateBranchOutput) GoString() string {
  1637. return s.String()
  1638. }
  1639. // Represents the input of a create repository operation.
  1640. type CreateRepositoryInput struct {
  1641. _ struct{} `type:"structure"`
  1642. // A comment or description about the new repository.
  1643. //
  1644. // The description field for a repository accepts all HTML characters and all
  1645. // valid Unicode characters. Applications that do not HTML-encode the description
  1646. // and display it in a web page could expose users to potentially malicious
  1647. // code. Make sure that you HTML-encode the description field in any application
  1648. // that uses this API to display the repository description on a web page.
  1649. RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
  1650. // The name of the new repository to be created.
  1651. //
  1652. // The repository name must be unique across the calling AWS account. In addition,
  1653. // repository names are limited to 100 alphanumeric, dash, and underscore characters,
  1654. // and cannot include certain characters. For a full description of the limits
  1655. // on repository names, see Limits (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html)
  1656. // in the AWS CodeCommit User Guide. The suffix ".git" is prohibited.
  1657. //
  1658. // RepositoryName is a required field
  1659. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  1660. }
  1661. // String returns the string representation
  1662. func (s CreateRepositoryInput) String() string {
  1663. return awsutil.Prettify(s)
  1664. }
  1665. // GoString returns the string representation
  1666. func (s CreateRepositoryInput) GoString() string {
  1667. return s.String()
  1668. }
  1669. // Validate inspects the fields of the type to determine if they are valid.
  1670. func (s *CreateRepositoryInput) Validate() error {
  1671. invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"}
  1672. if s.RepositoryName == nil {
  1673. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1674. }
  1675. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  1676. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  1677. }
  1678. if invalidParams.Len() > 0 {
  1679. return invalidParams
  1680. }
  1681. return nil
  1682. }
  1683. // Represents the output of a create repository operation.
  1684. type CreateRepositoryOutput struct {
  1685. _ struct{} `type:"structure"`
  1686. // Information about the newly created repository.
  1687. RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"`
  1688. }
  1689. // String returns the string representation
  1690. func (s CreateRepositoryOutput) String() string {
  1691. return awsutil.Prettify(s)
  1692. }
  1693. // GoString returns the string representation
  1694. func (s CreateRepositoryOutput) GoString() string {
  1695. return s.String()
  1696. }
  1697. // Represents the input of a delete repository operation.
  1698. type DeleteRepositoryInput struct {
  1699. _ struct{} `type:"structure"`
  1700. // The name of the repository to delete.
  1701. //
  1702. // RepositoryName is a required field
  1703. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  1704. }
  1705. // String returns the string representation
  1706. func (s DeleteRepositoryInput) String() string {
  1707. return awsutil.Prettify(s)
  1708. }
  1709. // GoString returns the string representation
  1710. func (s DeleteRepositoryInput) GoString() string {
  1711. return s.String()
  1712. }
  1713. // Validate inspects the fields of the type to determine if they are valid.
  1714. func (s *DeleteRepositoryInput) Validate() error {
  1715. invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"}
  1716. if s.RepositoryName == nil {
  1717. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1718. }
  1719. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  1720. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  1721. }
  1722. if invalidParams.Len() > 0 {
  1723. return invalidParams
  1724. }
  1725. return nil
  1726. }
  1727. // Represents the output of a delete repository operation.
  1728. type DeleteRepositoryOutput struct {
  1729. _ struct{} `type:"structure"`
  1730. // The ID of the repository that was deleted.
  1731. RepositoryId *string `locationName:"repositoryId" type:"string"`
  1732. }
  1733. // String returns the string representation
  1734. func (s DeleteRepositoryOutput) String() string {
  1735. return awsutil.Prettify(s)
  1736. }
  1737. // GoString returns the string representation
  1738. func (s DeleteRepositoryOutput) GoString() string {
  1739. return s.String()
  1740. }
  1741. // Represents the input of a get branch operation.
  1742. type GetBranchInput struct {
  1743. _ struct{} `type:"structure"`
  1744. // The name of the branch for which you want to retrieve information.
  1745. BranchName *string `locationName:"branchName" min:"1" type:"string"`
  1746. // The name of the repository that contains the branch for which you want to
  1747. // retrieve information.
  1748. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  1749. }
  1750. // String returns the string representation
  1751. func (s GetBranchInput) String() string {
  1752. return awsutil.Prettify(s)
  1753. }
  1754. // GoString returns the string representation
  1755. func (s GetBranchInput) GoString() string {
  1756. return s.String()
  1757. }
  1758. // Validate inspects the fields of the type to determine if they are valid.
  1759. func (s *GetBranchInput) Validate() error {
  1760. invalidParams := request.ErrInvalidParams{Context: "GetBranchInput"}
  1761. if s.BranchName != nil && len(*s.BranchName) < 1 {
  1762. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  1763. }
  1764. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  1765. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  1766. }
  1767. if invalidParams.Len() > 0 {
  1768. return invalidParams
  1769. }
  1770. return nil
  1771. }
  1772. // Represents the output of a get branch operation.
  1773. type GetBranchOutput struct {
  1774. _ struct{} `type:"structure"`
  1775. // The name of the branch.
  1776. Branch *BranchInfo `locationName:"branch" type:"structure"`
  1777. }
  1778. // String returns the string representation
  1779. func (s GetBranchOutput) String() string {
  1780. return awsutil.Prettify(s)
  1781. }
  1782. // GoString returns the string representation
  1783. func (s GetBranchOutput) GoString() string {
  1784. return s.String()
  1785. }
  1786. // Represents the input of a get commit operation.
  1787. type GetCommitInput struct {
  1788. _ struct{} `type:"structure"`
  1789. // The commit ID.
  1790. //
  1791. // CommitId is a required field
  1792. CommitId *string `locationName:"commitId" type:"string" required:"true"`
  1793. // The name of the repository to which the commit was made.
  1794. //
  1795. // RepositoryName is a required field
  1796. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  1797. }
  1798. // String returns the string representation
  1799. func (s GetCommitInput) String() string {
  1800. return awsutil.Prettify(s)
  1801. }
  1802. // GoString returns the string representation
  1803. func (s GetCommitInput) GoString() string {
  1804. return s.String()
  1805. }
  1806. // Validate inspects the fields of the type to determine if they are valid.
  1807. func (s *GetCommitInput) Validate() error {
  1808. invalidParams := request.ErrInvalidParams{Context: "GetCommitInput"}
  1809. if s.CommitId == nil {
  1810. invalidParams.Add(request.NewErrParamRequired("CommitId"))
  1811. }
  1812. if s.RepositoryName == nil {
  1813. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1814. }
  1815. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  1816. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  1817. }
  1818. if invalidParams.Len() > 0 {
  1819. return invalidParams
  1820. }
  1821. return nil
  1822. }
  1823. // Represents the output of a get commit operation.
  1824. type GetCommitOutput struct {
  1825. _ struct{} `type:"structure"`
  1826. // Information about the specified commit.
  1827. //
  1828. // Commit is a required field
  1829. Commit *Commit `locationName:"commit" type:"structure" required:"true"`
  1830. }
  1831. // String returns the string representation
  1832. func (s GetCommitOutput) String() string {
  1833. return awsutil.Prettify(s)
  1834. }
  1835. // GoString returns the string representation
  1836. func (s GetCommitOutput) GoString() string {
  1837. return s.String()
  1838. }
  1839. // Represents the input of a get repository operation.
  1840. type GetRepositoryInput struct {
  1841. _ struct{} `type:"structure"`
  1842. // The name of the repository to get information about.
  1843. //
  1844. // RepositoryName is a required field
  1845. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  1846. }
  1847. // String returns the string representation
  1848. func (s GetRepositoryInput) String() string {
  1849. return awsutil.Prettify(s)
  1850. }
  1851. // GoString returns the string representation
  1852. func (s GetRepositoryInput) GoString() string {
  1853. return s.String()
  1854. }
  1855. // Validate inspects the fields of the type to determine if they are valid.
  1856. func (s *GetRepositoryInput) Validate() error {
  1857. invalidParams := request.ErrInvalidParams{Context: "GetRepositoryInput"}
  1858. if s.RepositoryName == nil {
  1859. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1860. }
  1861. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  1862. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  1863. }
  1864. if invalidParams.Len() > 0 {
  1865. return invalidParams
  1866. }
  1867. return nil
  1868. }
  1869. // Represents the output of a get repository operation.
  1870. type GetRepositoryOutput struct {
  1871. _ struct{} `type:"structure"`
  1872. // Information about the repository.
  1873. RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"`
  1874. }
  1875. // String returns the string representation
  1876. func (s GetRepositoryOutput) String() string {
  1877. return awsutil.Prettify(s)
  1878. }
  1879. // GoString returns the string representation
  1880. func (s GetRepositoryOutput) GoString() string {
  1881. return s.String()
  1882. }
  1883. // Represents the input of a get repository triggers operation.
  1884. type GetRepositoryTriggersInput struct {
  1885. _ struct{} `type:"structure"`
  1886. // The name of the repository for which the trigger is configured.
  1887. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  1888. }
  1889. // String returns the string representation
  1890. func (s GetRepositoryTriggersInput) String() string {
  1891. return awsutil.Prettify(s)
  1892. }
  1893. // GoString returns the string representation
  1894. func (s GetRepositoryTriggersInput) GoString() string {
  1895. return s.String()
  1896. }
  1897. // Validate inspects the fields of the type to determine if they are valid.
  1898. func (s *GetRepositoryTriggersInput) Validate() error {
  1899. invalidParams := request.ErrInvalidParams{Context: "GetRepositoryTriggersInput"}
  1900. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  1901. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  1902. }
  1903. if invalidParams.Len() > 0 {
  1904. return invalidParams
  1905. }
  1906. return nil
  1907. }
  1908. // Represents the output of a get repository triggers operation.
  1909. type GetRepositoryTriggersOutput struct {
  1910. _ struct{} `type:"structure"`
  1911. // The system-generated unique ID for the trigger.
  1912. ConfigurationId *string `locationName:"configurationId" type:"string"`
  1913. // The JSON block of configuration information for each trigger.
  1914. Triggers []*RepositoryTrigger `locationName:"triggers" type:"list"`
  1915. }
  1916. // String returns the string representation
  1917. func (s GetRepositoryTriggersOutput) String() string {
  1918. return awsutil.Prettify(s)
  1919. }
  1920. // GoString returns the string representation
  1921. func (s GetRepositoryTriggersOutput) GoString() string {
  1922. return s.String()
  1923. }
  1924. // Represents the input of a list branches operation.
  1925. type ListBranchesInput struct {
  1926. _ struct{} `type:"structure"`
  1927. // An enumeration token that allows the operation to batch the results.
  1928. NextToken *string `locationName:"nextToken" type:"string"`
  1929. // The name of the repository that contains the branches.
  1930. //
  1931. // RepositoryName is a required field
  1932. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  1933. }
  1934. // String returns the string representation
  1935. func (s ListBranchesInput) String() string {
  1936. return awsutil.Prettify(s)
  1937. }
  1938. // GoString returns the string representation
  1939. func (s ListBranchesInput) GoString() string {
  1940. return s.String()
  1941. }
  1942. // Validate inspects the fields of the type to determine if they are valid.
  1943. func (s *ListBranchesInput) Validate() error {
  1944. invalidParams := request.ErrInvalidParams{Context: "ListBranchesInput"}
  1945. if s.RepositoryName == nil {
  1946. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1947. }
  1948. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  1949. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  1950. }
  1951. if invalidParams.Len() > 0 {
  1952. return invalidParams
  1953. }
  1954. return nil
  1955. }
  1956. // Represents the output of a list branches operation.
  1957. type ListBranchesOutput struct {
  1958. _ struct{} `type:"structure"`
  1959. // The list of branch names.
  1960. Branches []*string `locationName:"branches" type:"list"`
  1961. // An enumeration token that returns the batch of the results.
  1962. NextToken *string `locationName:"nextToken" type:"string"`
  1963. }
  1964. // String returns the string representation
  1965. func (s ListBranchesOutput) String() string {
  1966. return awsutil.Prettify(s)
  1967. }
  1968. // GoString returns the string representation
  1969. func (s ListBranchesOutput) GoString() string {
  1970. return s.String()
  1971. }
  1972. // Represents the input of a list repositories operation.
  1973. type ListRepositoriesInput struct {
  1974. _ struct{} `type:"structure"`
  1975. // An enumeration token that allows the operation to batch the results of the
  1976. // operation. Batch sizes are 1,000 for list repository operations. When the
  1977. // client sends the token back to AWS CodeCommit, another page of 1,000 records
  1978. // is retrieved.
  1979. NextToken *string `locationName:"nextToken" type:"string"`
  1980. // The order in which to sort the results of a list repositories operation.
  1981. Order *string `locationName:"order" type:"string" enum:"OrderEnum"`
  1982. // The criteria used to sort the results of a list repositories operation.
  1983. SortBy *string `locationName:"sortBy" type:"string" enum:"SortByEnum"`
  1984. }
  1985. // String returns the string representation
  1986. func (s ListRepositoriesInput) String() string {
  1987. return awsutil.Prettify(s)
  1988. }
  1989. // GoString returns the string representation
  1990. func (s ListRepositoriesInput) GoString() string {
  1991. return s.String()
  1992. }
  1993. // Represents the output of a list repositories operation.
  1994. type ListRepositoriesOutput struct {
  1995. _ struct{} `type:"structure"`
  1996. // An enumeration token that allows the operation to batch the results of the
  1997. // operation. Batch sizes are 1,000 for list repository operations. When the
  1998. // client sends the token back to AWS CodeCommit, another page of 1,000 records
  1999. // is retrieved.
  2000. NextToken *string `locationName:"nextToken" type:"string"`
  2001. // Lists the repositories called by the list repositories operation.
  2002. Repositories []*RepositoryNameIdPair `locationName:"repositories" type:"list"`
  2003. }
  2004. // String returns the string representation
  2005. func (s ListRepositoriesOutput) String() string {
  2006. return awsutil.Prettify(s)
  2007. }
  2008. // GoString returns the string representation
  2009. func (s ListRepositoriesOutput) GoString() string {
  2010. return s.String()
  2011. }
  2012. // Represents the input ofa put repository triggers operation.
  2013. type PutRepositoryTriggersInput struct {
  2014. _ struct{} `type:"structure"`
  2015. // The name of the repository where you want to create or update the trigger.
  2016. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  2017. // The JSON block of configuration information for each trigger.
  2018. Triggers []*RepositoryTrigger `locationName:"triggers" type:"list"`
  2019. }
  2020. // String returns the string representation
  2021. func (s PutRepositoryTriggersInput) String() string {
  2022. return awsutil.Prettify(s)
  2023. }
  2024. // GoString returns the string representation
  2025. func (s PutRepositoryTriggersInput) GoString() string {
  2026. return s.String()
  2027. }
  2028. // Validate inspects the fields of the type to determine if they are valid.
  2029. func (s *PutRepositoryTriggersInput) Validate() error {
  2030. invalidParams := request.ErrInvalidParams{Context: "PutRepositoryTriggersInput"}
  2031. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  2032. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  2033. }
  2034. if invalidParams.Len() > 0 {
  2035. return invalidParams
  2036. }
  2037. return nil
  2038. }
  2039. // Represents the output of a put repository triggers operation.
  2040. type PutRepositoryTriggersOutput struct {
  2041. _ struct{} `type:"structure"`
  2042. // The system-generated unique ID for the create or update operation.
  2043. ConfigurationId *string `locationName:"configurationId" type:"string"`
  2044. }
  2045. // String returns the string representation
  2046. func (s PutRepositoryTriggersOutput) String() string {
  2047. return awsutil.Prettify(s)
  2048. }
  2049. // GoString returns the string representation
  2050. func (s PutRepositoryTriggersOutput) GoString() string {
  2051. return s.String()
  2052. }
  2053. // Information about a repository.
  2054. type RepositoryMetadata struct {
  2055. _ struct{} `type:"structure"`
  2056. // The ID of the AWS account associated with the repository.
  2057. AccountId *string `locationName:"accountId" type:"string"`
  2058. // The Amazon Resource Name (ARN) of the repository.
  2059. Arn *string `type:"string"`
  2060. // The URL to use for cloning the repository over HTTPS.
  2061. CloneUrlHttp *string `locationName:"cloneUrlHttp" type:"string"`
  2062. // The URL to use for cloning the repository over SSH.
  2063. CloneUrlSsh *string `locationName:"cloneUrlSsh" type:"string"`
  2064. // The date and time the repository was created, in timestamp format.
  2065. CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"`
  2066. // The repository's default branch name.
  2067. DefaultBranch *string `locationName:"defaultBranch" min:"1" type:"string"`
  2068. // The date and time the repository was last modified, in timestamp format.
  2069. LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"`
  2070. // A comment or description about the repository.
  2071. RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
  2072. // The ID of the repository.
  2073. RepositoryId *string `locationName:"repositoryId" type:"string"`
  2074. // The repository's name.
  2075. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  2076. }
  2077. // String returns the string representation
  2078. func (s RepositoryMetadata) String() string {
  2079. return awsutil.Prettify(s)
  2080. }
  2081. // GoString returns the string representation
  2082. func (s RepositoryMetadata) GoString() string {
  2083. return s.String()
  2084. }
  2085. // Information about a repository name and ID.
  2086. type RepositoryNameIdPair struct {
  2087. _ struct{} `type:"structure"`
  2088. // The ID associated with the repository.
  2089. RepositoryId *string `locationName:"repositoryId" type:"string"`
  2090. // The name associated with the repository.
  2091. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  2092. }
  2093. // String returns the string representation
  2094. func (s RepositoryNameIdPair) String() string {
  2095. return awsutil.Prettify(s)
  2096. }
  2097. // GoString returns the string representation
  2098. func (s RepositoryNameIdPair) GoString() string {
  2099. return s.String()
  2100. }
  2101. // Information about a trigger for a repository.
  2102. type RepositoryTrigger struct {
  2103. _ struct{} `type:"structure"`
  2104. // The branches that will be included in the trigger configuration. If no branches
  2105. // are specified, the trigger will apply to all branches.
  2106. Branches []*string `locationName:"branches" type:"list"`
  2107. // Any custom data associated with the trigger that will be included in the
  2108. // information sent to the target of the trigger.
  2109. CustomData *string `locationName:"customData" type:"string"`
  2110. // The ARN of the resource that is the target for a trigger. For example, the
  2111. // ARN of a topic in Amazon Simple Notification Service (SNS).
  2112. DestinationArn *string `locationName:"destinationArn" type:"string"`
  2113. // The repository events that will cause the trigger to run actions in another
  2114. // service, such as sending a notification through Amazon Simple Notification
  2115. // Service (SNS). If no events are specified, the trigger will run for all repository
  2116. // events.
  2117. Events []*string `locationName:"events" type:"list"`
  2118. // The name of the trigger.
  2119. Name *string `locationName:"name" type:"string"`
  2120. }
  2121. // String returns the string representation
  2122. func (s RepositoryTrigger) String() string {
  2123. return awsutil.Prettify(s)
  2124. }
  2125. // GoString returns the string representation
  2126. func (s RepositoryTrigger) GoString() string {
  2127. return s.String()
  2128. }
  2129. // A trigger failed to run.
  2130. type RepositoryTriggerExecutionFailure struct {
  2131. _ struct{} `type:"structure"`
  2132. // Additional message information about the trigger that did not run.
  2133. FailureMessage *string `locationName:"failureMessage" type:"string"`
  2134. // The name of the trigger that did not run.
  2135. Trigger *string `locationName:"trigger" type:"string"`
  2136. }
  2137. // String returns the string representation
  2138. func (s RepositoryTriggerExecutionFailure) String() string {
  2139. return awsutil.Prettify(s)
  2140. }
  2141. // GoString returns the string representation
  2142. func (s RepositoryTriggerExecutionFailure) GoString() string {
  2143. return s.String()
  2144. }
  2145. // Represents the input of a test repository triggers operation.
  2146. type TestRepositoryTriggersInput struct {
  2147. _ struct{} `type:"structure"`
  2148. // The name of the repository in which to test the triggers.
  2149. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  2150. // The list of triggers to test.
  2151. Triggers []*RepositoryTrigger `locationName:"triggers" type:"list"`
  2152. }
  2153. // String returns the string representation
  2154. func (s TestRepositoryTriggersInput) String() string {
  2155. return awsutil.Prettify(s)
  2156. }
  2157. // GoString returns the string representation
  2158. func (s TestRepositoryTriggersInput) GoString() string {
  2159. return s.String()
  2160. }
  2161. // Validate inspects the fields of the type to determine if they are valid.
  2162. func (s *TestRepositoryTriggersInput) Validate() error {
  2163. invalidParams := request.ErrInvalidParams{Context: "TestRepositoryTriggersInput"}
  2164. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  2165. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  2166. }
  2167. if invalidParams.Len() > 0 {
  2168. return invalidParams
  2169. }
  2170. return nil
  2171. }
  2172. // Represents the output of a test repository triggers operation.
  2173. type TestRepositoryTriggersOutput struct {
  2174. _ struct{} `type:"structure"`
  2175. // The list of triggers that were not able to be tested. This list provides
  2176. // the names of the triggers that could not be tested, separated by commas.
  2177. FailedExecutions []*RepositoryTriggerExecutionFailure `locationName:"failedExecutions" type:"list"`
  2178. // The list of triggers that were successfully tested. This list provides the
  2179. // names of the triggers that were successfully tested, separated by commas.
  2180. SuccessfulExecutions []*string `locationName:"successfulExecutions" type:"list"`
  2181. }
  2182. // String returns the string representation
  2183. func (s TestRepositoryTriggersOutput) String() string {
  2184. return awsutil.Prettify(s)
  2185. }
  2186. // GoString returns the string representation
  2187. func (s TestRepositoryTriggersOutput) GoString() string {
  2188. return s.String()
  2189. }
  2190. // Represents the input of an update default branch operation.
  2191. type UpdateDefaultBranchInput struct {
  2192. _ struct{} `type:"structure"`
  2193. // The name of the branch to set as the default.
  2194. //
  2195. // DefaultBranchName is a required field
  2196. DefaultBranchName *string `locationName:"defaultBranchName" min:"1" type:"string" required:"true"`
  2197. // The name of the repository to set or change the default branch for.
  2198. //
  2199. // RepositoryName is a required field
  2200. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  2201. }
  2202. // String returns the string representation
  2203. func (s UpdateDefaultBranchInput) String() string {
  2204. return awsutil.Prettify(s)
  2205. }
  2206. // GoString returns the string representation
  2207. func (s UpdateDefaultBranchInput) GoString() string {
  2208. return s.String()
  2209. }
  2210. // Validate inspects the fields of the type to determine if they are valid.
  2211. func (s *UpdateDefaultBranchInput) Validate() error {
  2212. invalidParams := request.ErrInvalidParams{Context: "UpdateDefaultBranchInput"}
  2213. if s.DefaultBranchName == nil {
  2214. invalidParams.Add(request.NewErrParamRequired("DefaultBranchName"))
  2215. }
  2216. if s.DefaultBranchName != nil && len(*s.DefaultBranchName) < 1 {
  2217. invalidParams.Add(request.NewErrParamMinLen("DefaultBranchName", 1))
  2218. }
  2219. if s.RepositoryName == nil {
  2220. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2221. }
  2222. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  2223. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  2224. }
  2225. if invalidParams.Len() > 0 {
  2226. return invalidParams
  2227. }
  2228. return nil
  2229. }
  2230. type UpdateDefaultBranchOutput struct {
  2231. _ struct{} `type:"structure"`
  2232. }
  2233. // String returns the string representation
  2234. func (s UpdateDefaultBranchOutput) String() string {
  2235. return awsutil.Prettify(s)
  2236. }
  2237. // GoString returns the string representation
  2238. func (s UpdateDefaultBranchOutput) GoString() string {
  2239. return s.String()
  2240. }
  2241. // Represents the input of an update repository description operation.
  2242. type UpdateRepositoryDescriptionInput struct {
  2243. _ struct{} `type:"structure"`
  2244. // The new comment or description for the specified repository. Repository descriptions
  2245. // are limited to 1,000 characters.
  2246. RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
  2247. // The name of the repository to set or change the comment or description for.
  2248. //
  2249. // RepositoryName is a required field
  2250. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  2251. }
  2252. // String returns the string representation
  2253. func (s UpdateRepositoryDescriptionInput) String() string {
  2254. return awsutil.Prettify(s)
  2255. }
  2256. // GoString returns the string representation
  2257. func (s UpdateRepositoryDescriptionInput) GoString() string {
  2258. return s.String()
  2259. }
  2260. // Validate inspects the fields of the type to determine if they are valid.
  2261. func (s *UpdateRepositoryDescriptionInput) Validate() error {
  2262. invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryDescriptionInput"}
  2263. if s.RepositoryName == nil {
  2264. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2265. }
  2266. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  2267. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  2268. }
  2269. if invalidParams.Len() > 0 {
  2270. return invalidParams
  2271. }
  2272. return nil
  2273. }
  2274. type UpdateRepositoryDescriptionOutput struct {
  2275. _ struct{} `type:"structure"`
  2276. }
  2277. // String returns the string representation
  2278. func (s UpdateRepositoryDescriptionOutput) String() string {
  2279. return awsutil.Prettify(s)
  2280. }
  2281. // GoString returns the string representation
  2282. func (s UpdateRepositoryDescriptionOutput) GoString() string {
  2283. return s.String()
  2284. }
  2285. // Represents the input of an update repository description operation.
  2286. type UpdateRepositoryNameInput struct {
  2287. _ struct{} `type:"structure"`
  2288. // The new name for the repository.
  2289. //
  2290. // NewName is a required field
  2291. NewName *string `locationName:"newName" min:"1" type:"string" required:"true"`
  2292. // The existing name of the repository.
  2293. //
  2294. // OldName is a required field
  2295. OldName *string `locationName:"oldName" min:"1" type:"string" required:"true"`
  2296. }
  2297. // String returns the string representation
  2298. func (s UpdateRepositoryNameInput) String() string {
  2299. return awsutil.Prettify(s)
  2300. }
  2301. // GoString returns the string representation
  2302. func (s UpdateRepositoryNameInput) GoString() string {
  2303. return s.String()
  2304. }
  2305. // Validate inspects the fields of the type to determine if they are valid.
  2306. func (s *UpdateRepositoryNameInput) Validate() error {
  2307. invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryNameInput"}
  2308. if s.NewName == nil {
  2309. invalidParams.Add(request.NewErrParamRequired("NewName"))
  2310. }
  2311. if s.NewName != nil && len(*s.NewName) < 1 {
  2312. invalidParams.Add(request.NewErrParamMinLen("NewName", 1))
  2313. }
  2314. if s.OldName == nil {
  2315. invalidParams.Add(request.NewErrParamRequired("OldName"))
  2316. }
  2317. if s.OldName != nil && len(*s.OldName) < 1 {
  2318. invalidParams.Add(request.NewErrParamMinLen("OldName", 1))
  2319. }
  2320. if invalidParams.Len() > 0 {
  2321. return invalidParams
  2322. }
  2323. return nil
  2324. }
  2325. type UpdateRepositoryNameOutput struct {
  2326. _ struct{} `type:"structure"`
  2327. }
  2328. // String returns the string representation
  2329. func (s UpdateRepositoryNameOutput) String() string {
  2330. return awsutil.Prettify(s)
  2331. }
  2332. // GoString returns the string representation
  2333. func (s UpdateRepositoryNameOutput) GoString() string {
  2334. return s.String()
  2335. }
  2336. // Information about the user who made a specified commit.
  2337. type UserInfo struct {
  2338. _ struct{} `type:"structure"`
  2339. // The date when the specified commit was pushed to the repository.
  2340. Date *string `locationName:"date" type:"string"`
  2341. // The email address associated with the user who made the commit, if any.
  2342. Email *string `locationName:"email" type:"string"`
  2343. // The name of the user who made the specified commit.
  2344. Name *string `locationName:"name" type:"string"`
  2345. }
  2346. // String returns the string representation
  2347. func (s UserInfo) String() string {
  2348. return awsutil.Prettify(s)
  2349. }
  2350. // GoString returns the string representation
  2351. func (s UserInfo) GoString() string {
  2352. return s.String()
  2353. }
  2354. const (
  2355. // OrderEnumAscending is a OrderEnum enum value
  2356. OrderEnumAscending = "ascending"
  2357. // OrderEnumDescending is a OrderEnum enum value
  2358. OrderEnumDescending = "descending"
  2359. )
  2360. const (
  2361. // RepositoryTriggerEventEnumAll is a RepositoryTriggerEventEnum enum value
  2362. RepositoryTriggerEventEnumAll = "all"
  2363. // RepositoryTriggerEventEnumUpdateReference is a RepositoryTriggerEventEnum enum value
  2364. RepositoryTriggerEventEnumUpdateReference = "updateReference"
  2365. // RepositoryTriggerEventEnumCreateReference is a RepositoryTriggerEventEnum enum value
  2366. RepositoryTriggerEventEnumCreateReference = "createReference"
  2367. // RepositoryTriggerEventEnumDeleteReference is a RepositoryTriggerEventEnum enum value
  2368. RepositoryTriggerEventEnumDeleteReference = "deleteReference"
  2369. )
  2370. const (
  2371. // SortByEnumRepositoryName is a SortByEnum enum value
  2372. SortByEnumRepositoryName = "repositoryName"
  2373. // SortByEnumLastModifiedDate is a SortByEnum enum value
  2374. SortByEnumLastModifiedDate = "lastModifiedDate"
  2375. )