api.go 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980
  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. )
  9. const opBatchGetRepositories = "BatchGetRepositories"
  10. // BatchGetRepositoriesRequest generates a request for the BatchGetRepositories operation.
  11. func (c *CodeCommit) BatchGetRepositoriesRequest(input *BatchGetRepositoriesInput) (req *request.Request, output *BatchGetRepositoriesOutput) {
  12. op := &request.Operation{
  13. Name: opBatchGetRepositories,
  14. HTTPMethod: "POST",
  15. HTTPPath: "/",
  16. }
  17. if input == nil {
  18. input = &BatchGetRepositoriesInput{}
  19. }
  20. req = c.newRequest(op, input, output)
  21. output = &BatchGetRepositoriesOutput{}
  22. req.Data = output
  23. return
  24. }
  25. // Gets information about one or more repositories.
  26. //
  27. // The description field for a repository accepts all HTML characters and all
  28. // valid Unicode characters. Applications that do not HTML-encode the description
  29. // and display it in a web page could expose users to potentially malicious
  30. // code. Make sure that you HTML-encode the description field in any application
  31. // that uses this API to display the repository description on a web page.
  32. func (c *CodeCommit) BatchGetRepositories(input *BatchGetRepositoriesInput) (*BatchGetRepositoriesOutput, error) {
  33. req, out := c.BatchGetRepositoriesRequest(input)
  34. err := req.Send()
  35. return out, err
  36. }
  37. const opCreateBranch = "CreateBranch"
  38. // CreateBranchRequest generates a request for the CreateBranch operation.
  39. func (c *CodeCommit) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) {
  40. op := &request.Operation{
  41. Name: opCreateBranch,
  42. HTTPMethod: "POST",
  43. HTTPPath: "/",
  44. }
  45. if input == nil {
  46. input = &CreateBranchInput{}
  47. }
  48. req = c.newRequest(op, input, output)
  49. output = &CreateBranchOutput{}
  50. req.Data = output
  51. return
  52. }
  53. // Creates a new branch in a repository and points the branch to a commit.
  54. //
  55. // Calling the create branch operation does not set a repository's default
  56. // branch. To do this, call the update default branch operation.
  57. func (c *CodeCommit) CreateBranch(input *CreateBranchInput) (*CreateBranchOutput, error) {
  58. req, out := c.CreateBranchRequest(input)
  59. err := req.Send()
  60. return out, err
  61. }
  62. const opCreateRepository = "CreateRepository"
  63. // CreateRepositoryRequest generates a request for the CreateRepository operation.
  64. func (c *CodeCommit) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) {
  65. op := &request.Operation{
  66. Name: opCreateRepository,
  67. HTTPMethod: "POST",
  68. HTTPPath: "/",
  69. }
  70. if input == nil {
  71. input = &CreateRepositoryInput{}
  72. }
  73. req = c.newRequest(op, input, output)
  74. output = &CreateRepositoryOutput{}
  75. req.Data = output
  76. return
  77. }
  78. // Creates a new, empty repository.
  79. func (c *CodeCommit) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
  80. req, out := c.CreateRepositoryRequest(input)
  81. err := req.Send()
  82. return out, err
  83. }
  84. const opDeleteRepository = "DeleteRepository"
  85. // DeleteRepositoryRequest generates a request for the DeleteRepository operation.
  86. func (c *CodeCommit) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) {
  87. op := &request.Operation{
  88. Name: opDeleteRepository,
  89. HTTPMethod: "POST",
  90. HTTPPath: "/",
  91. }
  92. if input == nil {
  93. input = &DeleteRepositoryInput{}
  94. }
  95. req = c.newRequest(op, input, output)
  96. output = &DeleteRepositoryOutput{}
  97. req.Data = output
  98. return
  99. }
  100. // Deletes a repository. If a specified repository was already deleted, a null
  101. // repository ID will be returned.
  102. //
  103. // Deleting a repository also deletes all associated objects and metadata.
  104. // After a repository is deleted, all future push calls to the deleted repository
  105. // will fail.
  106. func (c *CodeCommit) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
  107. req, out := c.DeleteRepositoryRequest(input)
  108. err := req.Send()
  109. return out, err
  110. }
  111. const opGetBranch = "GetBranch"
  112. // GetBranchRequest generates a request for the GetBranch operation.
  113. func (c *CodeCommit) GetBranchRequest(input *GetBranchInput) (req *request.Request, output *GetBranchOutput) {
  114. op := &request.Operation{
  115. Name: opGetBranch,
  116. HTTPMethod: "POST",
  117. HTTPPath: "/",
  118. }
  119. if input == nil {
  120. input = &GetBranchInput{}
  121. }
  122. req = c.newRequest(op, input, output)
  123. output = &GetBranchOutput{}
  124. req.Data = output
  125. return
  126. }
  127. // Retrieves information about a repository branch, including its name and the
  128. // last commit ID.
  129. func (c *CodeCommit) GetBranch(input *GetBranchInput) (*GetBranchOutput, error) {
  130. req, out := c.GetBranchRequest(input)
  131. err := req.Send()
  132. return out, err
  133. }
  134. const opGetRepository = "GetRepository"
  135. // GetRepositoryRequest generates a request for the GetRepository operation.
  136. func (c *CodeCommit) GetRepositoryRequest(input *GetRepositoryInput) (req *request.Request, output *GetRepositoryOutput) {
  137. op := &request.Operation{
  138. Name: opGetRepository,
  139. HTTPMethod: "POST",
  140. HTTPPath: "/",
  141. }
  142. if input == nil {
  143. input = &GetRepositoryInput{}
  144. }
  145. req = c.newRequest(op, input, output)
  146. output = &GetRepositoryOutput{}
  147. req.Data = output
  148. return
  149. }
  150. // Gets information about a repository.
  151. //
  152. // The description field for a repository accepts all HTML characters and all
  153. // valid Unicode characters. Applications that do not HTML-encode the description
  154. // and display it in a web page could expose users to potentially malicious
  155. // code. Make sure that you HTML-encode the description field in any application
  156. // that uses this API to display the repository description on a web page.
  157. func (c *CodeCommit) GetRepository(input *GetRepositoryInput) (*GetRepositoryOutput, error) {
  158. req, out := c.GetRepositoryRequest(input)
  159. err := req.Send()
  160. return out, err
  161. }
  162. const opListBranches = "ListBranches"
  163. // ListBranchesRequest generates a request for the ListBranches operation.
  164. func (c *CodeCommit) ListBranchesRequest(input *ListBranchesInput) (req *request.Request, output *ListBranchesOutput) {
  165. op := &request.Operation{
  166. Name: opListBranches,
  167. HTTPMethod: "POST",
  168. HTTPPath: "/",
  169. }
  170. if input == nil {
  171. input = &ListBranchesInput{}
  172. }
  173. req = c.newRequest(op, input, output)
  174. output = &ListBranchesOutput{}
  175. req.Data = output
  176. return
  177. }
  178. // Gets information about one or more branches in a repository.
  179. func (c *CodeCommit) ListBranches(input *ListBranchesInput) (*ListBranchesOutput, error) {
  180. req, out := c.ListBranchesRequest(input)
  181. err := req.Send()
  182. return out, err
  183. }
  184. const opListRepositories = "ListRepositories"
  185. // ListRepositoriesRequest generates a request for the ListRepositories operation.
  186. func (c *CodeCommit) ListRepositoriesRequest(input *ListRepositoriesInput) (req *request.Request, output *ListRepositoriesOutput) {
  187. op := &request.Operation{
  188. Name: opListRepositories,
  189. HTTPMethod: "POST",
  190. HTTPPath: "/",
  191. }
  192. if input == nil {
  193. input = &ListRepositoriesInput{}
  194. }
  195. req = c.newRequest(op, input, output)
  196. output = &ListRepositoriesOutput{}
  197. req.Data = output
  198. return
  199. }
  200. // Gets information about one or more repositories.
  201. func (c *CodeCommit) ListRepositories(input *ListRepositoriesInput) (*ListRepositoriesOutput, error) {
  202. req, out := c.ListRepositoriesRequest(input)
  203. err := req.Send()
  204. return out, err
  205. }
  206. const opUpdateDefaultBranch = "UpdateDefaultBranch"
  207. // UpdateDefaultBranchRequest generates a request for the UpdateDefaultBranch operation.
  208. func (c *CodeCommit) UpdateDefaultBranchRequest(input *UpdateDefaultBranchInput) (req *request.Request, output *UpdateDefaultBranchOutput) {
  209. op := &request.Operation{
  210. Name: opUpdateDefaultBranch,
  211. HTTPMethod: "POST",
  212. HTTPPath: "/",
  213. }
  214. if input == nil {
  215. input = &UpdateDefaultBranchInput{}
  216. }
  217. req = c.newRequest(op, input, output)
  218. output = &UpdateDefaultBranchOutput{}
  219. req.Data = output
  220. return
  221. }
  222. // Sets or changes the default branch name for the specified repository.
  223. //
  224. // If you use this operation to change the default branch name to the current
  225. // default branch name, a success message is returned even though the default
  226. // branch did not change.
  227. func (c *CodeCommit) UpdateDefaultBranch(input *UpdateDefaultBranchInput) (*UpdateDefaultBranchOutput, error) {
  228. req, out := c.UpdateDefaultBranchRequest(input)
  229. err := req.Send()
  230. return out, err
  231. }
  232. const opUpdateRepositoryDescription = "UpdateRepositoryDescription"
  233. // UpdateRepositoryDescriptionRequest generates a request for the UpdateRepositoryDescription operation.
  234. func (c *CodeCommit) UpdateRepositoryDescriptionRequest(input *UpdateRepositoryDescriptionInput) (req *request.Request, output *UpdateRepositoryDescriptionOutput) {
  235. op := &request.Operation{
  236. Name: opUpdateRepositoryDescription,
  237. HTTPMethod: "POST",
  238. HTTPPath: "/",
  239. }
  240. if input == nil {
  241. input = &UpdateRepositoryDescriptionInput{}
  242. }
  243. req = c.newRequest(op, input, output)
  244. output = &UpdateRepositoryDescriptionOutput{}
  245. req.Data = output
  246. return
  247. }
  248. // Sets or changes the comment or description for a repository.
  249. //
  250. // The description field for a repository accepts all HTML characters and all
  251. // valid Unicode characters. Applications that do not HTML-encode the description
  252. // and display it in a web page could expose users to potentially malicious
  253. // code. Make sure that you HTML-encode the description field in any application
  254. // that uses this API to display the repository description on a web page.
  255. func (c *CodeCommit) UpdateRepositoryDescription(input *UpdateRepositoryDescriptionInput) (*UpdateRepositoryDescriptionOutput, error) {
  256. req, out := c.UpdateRepositoryDescriptionRequest(input)
  257. err := req.Send()
  258. return out, err
  259. }
  260. const opUpdateRepositoryName = "UpdateRepositoryName"
  261. // UpdateRepositoryNameRequest generates a request for the UpdateRepositoryName operation.
  262. func (c *CodeCommit) UpdateRepositoryNameRequest(input *UpdateRepositoryNameInput) (req *request.Request, output *UpdateRepositoryNameOutput) {
  263. op := &request.Operation{
  264. Name: opUpdateRepositoryName,
  265. HTTPMethod: "POST",
  266. HTTPPath: "/",
  267. }
  268. if input == nil {
  269. input = &UpdateRepositoryNameInput{}
  270. }
  271. req = c.newRequest(op, input, output)
  272. output = &UpdateRepositoryNameOutput{}
  273. req.Data = output
  274. return
  275. }
  276. // Renames a repository.
  277. func (c *CodeCommit) UpdateRepositoryName(input *UpdateRepositoryNameInput) (*UpdateRepositoryNameOutput, error) {
  278. req, out := c.UpdateRepositoryNameRequest(input)
  279. err := req.Send()
  280. return out, err
  281. }
  282. // Represents the input of a batch get repositories operation.
  283. type BatchGetRepositoriesInput struct {
  284. // The names of the repositories to get information about.
  285. RepositoryNames []*string `locationName:"repositoryNames" type:"list" required:"true"`
  286. metadataBatchGetRepositoriesInput `json:"-" xml:"-"`
  287. }
  288. type metadataBatchGetRepositoriesInput struct {
  289. SDKShapeTraits bool `type:"structure"`
  290. }
  291. // String returns the string representation
  292. func (s BatchGetRepositoriesInput) String() string {
  293. return awsutil.Prettify(s)
  294. }
  295. // GoString returns the string representation
  296. func (s BatchGetRepositoriesInput) GoString() string {
  297. return s.String()
  298. }
  299. // Represents the output of a batch get repositories operation.
  300. type BatchGetRepositoriesOutput struct {
  301. // A list of repositories returned by the batch get repositories operation.
  302. Repositories []*RepositoryMetadata `locationName:"repositories" type:"list"`
  303. // Returns a list of repository names for which information could not be found.
  304. RepositoriesNotFound []*string `locationName:"repositoriesNotFound" type:"list"`
  305. metadataBatchGetRepositoriesOutput `json:"-" xml:"-"`
  306. }
  307. type metadataBatchGetRepositoriesOutput struct {
  308. SDKShapeTraits bool `type:"structure"`
  309. }
  310. // String returns the string representation
  311. func (s BatchGetRepositoriesOutput) String() string {
  312. return awsutil.Prettify(s)
  313. }
  314. // GoString returns the string representation
  315. func (s BatchGetRepositoriesOutput) GoString() string {
  316. return s.String()
  317. }
  318. // Returns information about a branch.
  319. type BranchInfo struct {
  320. // The name of the branch.
  321. BranchName *string `locationName:"branchName" type:"string"`
  322. // The ID of the last commit made to the branch.
  323. CommitId *string `locationName:"commitId" type:"string"`
  324. metadataBranchInfo `json:"-" xml:"-"`
  325. }
  326. type metadataBranchInfo struct {
  327. SDKShapeTraits bool `type:"structure"`
  328. }
  329. // String returns the string representation
  330. func (s BranchInfo) String() string {
  331. return awsutil.Prettify(s)
  332. }
  333. // GoString returns the string representation
  334. func (s BranchInfo) GoString() string {
  335. return s.String()
  336. }
  337. // Represents the input of a create branch operation.
  338. type CreateBranchInput struct {
  339. // The name of the new branch to create.
  340. BranchName *string `locationName:"branchName" type:"string" required:"true"`
  341. // The ID of the commit to point the new branch to.
  342. //
  343. // If this commit ID is not specified, the new branch will point to the commit
  344. // that is pointed to by the repository's default branch.
  345. CommitId *string `locationName:"commitId" type:"string" required:"true"`
  346. // The name of the repository in which you want to create the new branch.
  347. RepositoryName *string `locationName:"repositoryName" type:"string" required:"true"`
  348. metadataCreateBranchInput `json:"-" xml:"-"`
  349. }
  350. type metadataCreateBranchInput struct {
  351. SDKShapeTraits bool `type:"structure"`
  352. }
  353. // String returns the string representation
  354. func (s CreateBranchInput) String() string {
  355. return awsutil.Prettify(s)
  356. }
  357. // GoString returns the string representation
  358. func (s CreateBranchInput) GoString() string {
  359. return s.String()
  360. }
  361. type CreateBranchOutput struct {
  362. metadataCreateBranchOutput `json:"-" xml:"-"`
  363. }
  364. type metadataCreateBranchOutput struct {
  365. SDKShapeTraits bool `type:"structure"`
  366. }
  367. // String returns the string representation
  368. func (s CreateBranchOutput) String() string {
  369. return awsutil.Prettify(s)
  370. }
  371. // GoString returns the string representation
  372. func (s CreateBranchOutput) GoString() string {
  373. return s.String()
  374. }
  375. // Represents the input of a create repository operation.
  376. type CreateRepositoryInput struct {
  377. // A comment or description about the new repository.
  378. RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
  379. // The name of the new repository to be created.
  380. //
  381. // The repository name must be unique across the calling AWS account. In addition,
  382. // repository names are restricted to alphanumeric characters. The suffix ".git"
  383. // is prohibited.
  384. RepositoryName *string `locationName:"repositoryName" type:"string" required:"true"`
  385. metadataCreateRepositoryInput `json:"-" xml:"-"`
  386. }
  387. type metadataCreateRepositoryInput struct {
  388. SDKShapeTraits bool `type:"structure"`
  389. }
  390. // String returns the string representation
  391. func (s CreateRepositoryInput) String() string {
  392. return awsutil.Prettify(s)
  393. }
  394. // GoString returns the string representation
  395. func (s CreateRepositoryInput) GoString() string {
  396. return s.String()
  397. }
  398. // Represents the output of a create repository operation.
  399. type CreateRepositoryOutput struct {
  400. // Information about the newly created repository.
  401. RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"`
  402. metadataCreateRepositoryOutput `json:"-" xml:"-"`
  403. }
  404. type metadataCreateRepositoryOutput struct {
  405. SDKShapeTraits bool `type:"structure"`
  406. }
  407. // String returns the string representation
  408. func (s CreateRepositoryOutput) String() string {
  409. return awsutil.Prettify(s)
  410. }
  411. // GoString returns the string representation
  412. func (s CreateRepositoryOutput) GoString() string {
  413. return s.String()
  414. }
  415. // Represents the input of a delete repository operation.
  416. type DeleteRepositoryInput struct {
  417. // The name of the repository to delete.
  418. RepositoryName *string `locationName:"repositoryName" type:"string" required:"true"`
  419. metadataDeleteRepositoryInput `json:"-" xml:"-"`
  420. }
  421. type metadataDeleteRepositoryInput struct {
  422. SDKShapeTraits bool `type:"structure"`
  423. }
  424. // String returns the string representation
  425. func (s DeleteRepositoryInput) String() string {
  426. return awsutil.Prettify(s)
  427. }
  428. // GoString returns the string representation
  429. func (s DeleteRepositoryInput) GoString() string {
  430. return s.String()
  431. }
  432. // Represents the output of a delete repository operation.
  433. type DeleteRepositoryOutput struct {
  434. // The ID of the repository that was deleted.
  435. RepositoryId *string `locationName:"repositoryId" type:"string"`
  436. metadataDeleteRepositoryOutput `json:"-" xml:"-"`
  437. }
  438. type metadataDeleteRepositoryOutput struct {
  439. SDKShapeTraits bool `type:"structure"`
  440. }
  441. // String returns the string representation
  442. func (s DeleteRepositoryOutput) String() string {
  443. return awsutil.Prettify(s)
  444. }
  445. // GoString returns the string representation
  446. func (s DeleteRepositoryOutput) GoString() string {
  447. return s.String()
  448. }
  449. // Represents the input of a get branch operation.
  450. type GetBranchInput struct {
  451. // The name of the branch for which you want to retrieve information.
  452. BranchName *string `locationName:"branchName" type:"string"`
  453. // Repository name is restricted to alphanumeric characters (a-z, A-Z, 0-9),
  454. // ".", "_", and "-". Additionally, the suffix ".git" is prohibited in a repository
  455. // name.
  456. RepositoryName *string `locationName:"repositoryName" type:"string"`
  457. metadataGetBranchInput `json:"-" xml:"-"`
  458. }
  459. type metadataGetBranchInput struct {
  460. SDKShapeTraits bool `type:"structure"`
  461. }
  462. // String returns the string representation
  463. func (s GetBranchInput) String() string {
  464. return awsutil.Prettify(s)
  465. }
  466. // GoString returns the string representation
  467. func (s GetBranchInput) GoString() string {
  468. return s.String()
  469. }
  470. // Represents the output of a get branch operation.
  471. type GetBranchOutput struct {
  472. // The name of the branch.
  473. Branch *BranchInfo `locationName:"branch" type:"structure"`
  474. metadataGetBranchOutput `json:"-" xml:"-"`
  475. }
  476. type metadataGetBranchOutput struct {
  477. SDKShapeTraits bool `type:"structure"`
  478. }
  479. // String returns the string representation
  480. func (s GetBranchOutput) String() string {
  481. return awsutil.Prettify(s)
  482. }
  483. // GoString returns the string representation
  484. func (s GetBranchOutput) GoString() string {
  485. return s.String()
  486. }
  487. // Represents the input of a get repository operation.
  488. type GetRepositoryInput struct {
  489. // The name of the repository to get information about.
  490. RepositoryName *string `locationName:"repositoryName" type:"string" required:"true"`
  491. metadataGetRepositoryInput `json:"-" xml:"-"`
  492. }
  493. type metadataGetRepositoryInput struct {
  494. SDKShapeTraits bool `type:"structure"`
  495. }
  496. // String returns the string representation
  497. func (s GetRepositoryInput) String() string {
  498. return awsutil.Prettify(s)
  499. }
  500. // GoString returns the string representation
  501. func (s GetRepositoryInput) GoString() string {
  502. return s.String()
  503. }
  504. // Represents the output of a get repository operation.
  505. type GetRepositoryOutput struct {
  506. // Information about the repository.
  507. RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"`
  508. metadataGetRepositoryOutput `json:"-" xml:"-"`
  509. }
  510. type metadataGetRepositoryOutput struct {
  511. SDKShapeTraits bool `type:"structure"`
  512. }
  513. // String returns the string representation
  514. func (s GetRepositoryOutput) String() string {
  515. return awsutil.Prettify(s)
  516. }
  517. // GoString returns the string representation
  518. func (s GetRepositoryOutput) GoString() string {
  519. return s.String()
  520. }
  521. // Represents the input of a list branches operation.
  522. type ListBranchesInput struct {
  523. // An enumeration token that allows the operation to batch the results.
  524. NextToken *string `locationName:"nextToken" type:"string"`
  525. // The name of the repository that contains the branches.
  526. RepositoryName *string `locationName:"repositoryName" type:"string" required:"true"`
  527. metadataListBranchesInput `json:"-" xml:"-"`
  528. }
  529. type metadataListBranchesInput struct {
  530. SDKShapeTraits bool `type:"structure"`
  531. }
  532. // String returns the string representation
  533. func (s ListBranchesInput) String() string {
  534. return awsutil.Prettify(s)
  535. }
  536. // GoString returns the string representation
  537. func (s ListBranchesInput) GoString() string {
  538. return s.String()
  539. }
  540. // Represents the output of a list branches operation.
  541. type ListBranchesOutput struct {
  542. // The list of branch names.
  543. Branches []*string `locationName:"branches" type:"list"`
  544. // An enumeration token that returns the batch of the results.
  545. NextToken *string `locationName:"nextToken" type:"string"`
  546. metadataListBranchesOutput `json:"-" xml:"-"`
  547. }
  548. type metadataListBranchesOutput struct {
  549. SDKShapeTraits bool `type:"structure"`
  550. }
  551. // String returns the string representation
  552. func (s ListBranchesOutput) String() string {
  553. return awsutil.Prettify(s)
  554. }
  555. // GoString returns the string representation
  556. func (s ListBranchesOutput) GoString() string {
  557. return s.String()
  558. }
  559. // Represents the input of a list repositories operation.
  560. type ListRepositoriesInput struct {
  561. // An enumeration token that allows the operation to batch the results of the
  562. // operation. Batch sizes are 1,000 for list repository operations. When the
  563. // client sends the token back to AWS CodeCommit, another page of 1,000 records
  564. // is retrieved.
  565. NextToken *string `locationName:"nextToken" type:"string"`
  566. // The order in which to sort the results of a list repositories operation.
  567. Order *string `locationName:"order" type:"string" enum:"OrderEnum"`
  568. // The criteria used to sort the results of a list repositories operation.
  569. SortBy *string `locationName:"sortBy" type:"string" enum:"SortByEnum"`
  570. metadataListRepositoriesInput `json:"-" xml:"-"`
  571. }
  572. type metadataListRepositoriesInput struct {
  573. SDKShapeTraits bool `type:"structure"`
  574. }
  575. // String returns the string representation
  576. func (s ListRepositoriesInput) String() string {
  577. return awsutil.Prettify(s)
  578. }
  579. // GoString returns the string representation
  580. func (s ListRepositoriesInput) GoString() string {
  581. return s.String()
  582. }
  583. // Represents the output of a list repositories operation.
  584. type ListRepositoriesOutput struct {
  585. // An enumeration token that allows the operation to batch the results of the
  586. // operation. Batch sizes are 1,000 for list repository operations. When the
  587. // client sends the token back to AWS CodeCommit, another page of 1,000 records
  588. // is retrieved.
  589. NextToken *string `locationName:"nextToken" type:"string"`
  590. // Lists the repositories called by the list repositories operation.
  591. Repositories []*RepositoryNameIdPair `locationName:"repositories" type:"list"`
  592. metadataListRepositoriesOutput `json:"-" xml:"-"`
  593. }
  594. type metadataListRepositoriesOutput struct {
  595. SDKShapeTraits bool `type:"structure"`
  596. }
  597. // String returns the string representation
  598. func (s ListRepositoriesOutput) String() string {
  599. return awsutil.Prettify(s)
  600. }
  601. // GoString returns the string representation
  602. func (s ListRepositoriesOutput) GoString() string {
  603. return s.String()
  604. }
  605. // Information about a repository.
  606. type RepositoryMetadata struct {
  607. // The ID of the AWS account associated with the repository.
  608. AccountId *string `locationName:"accountId" type:"string"`
  609. // The Amazon Resource Name (ARN) of the repository.
  610. Arn *string `type:"string"`
  611. // The URL to use for cloning the repository over HTTPS.
  612. CloneUrlHttp *string `locationName:"cloneUrlHttp" type:"string"`
  613. // The URL to use for cloning the repository over SSH.
  614. CloneUrlSsh *string `locationName:"cloneUrlSsh" type:"string"`
  615. // The date and time the repository was created, in timestamp format.
  616. CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"`
  617. // The repository's default branch name.
  618. DefaultBranch *string `locationName:"defaultBranch" type:"string"`
  619. // The date and time the repository was last modified, in timestamp format.
  620. LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"`
  621. // A comment or description about the repository.
  622. RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
  623. // The ID of the repository.
  624. RepositoryId *string `locationName:"repositoryId" type:"string"`
  625. // The repository's name.
  626. RepositoryName *string `locationName:"repositoryName" type:"string"`
  627. metadataRepositoryMetadata `json:"-" xml:"-"`
  628. }
  629. type metadataRepositoryMetadata struct {
  630. SDKShapeTraits bool `type:"structure"`
  631. }
  632. // String returns the string representation
  633. func (s RepositoryMetadata) String() string {
  634. return awsutil.Prettify(s)
  635. }
  636. // GoString returns the string representation
  637. func (s RepositoryMetadata) GoString() string {
  638. return s.String()
  639. }
  640. // Information about a repository name and ID.
  641. type RepositoryNameIdPair struct {
  642. // The ID associated with the repository name.
  643. RepositoryId *string `locationName:"repositoryId" type:"string"`
  644. // Repository name is restricted to alphanumeric characters (a-z, A-Z, 0-9),
  645. // ".", "_", and "-". Additionally, the suffix ".git" is prohibited in a repository
  646. // name.
  647. RepositoryName *string `locationName:"repositoryName" type:"string"`
  648. metadataRepositoryNameIdPair `json:"-" xml:"-"`
  649. }
  650. type metadataRepositoryNameIdPair struct {
  651. SDKShapeTraits bool `type:"structure"`
  652. }
  653. // String returns the string representation
  654. func (s RepositoryNameIdPair) String() string {
  655. return awsutil.Prettify(s)
  656. }
  657. // GoString returns the string representation
  658. func (s RepositoryNameIdPair) GoString() string {
  659. return s.String()
  660. }
  661. // Represents the input of an update default branch operation.
  662. type UpdateDefaultBranchInput struct {
  663. // The name of the branch to set as the default.
  664. DefaultBranchName *string `locationName:"defaultBranchName" type:"string" required:"true"`
  665. // The name of the repository to set or change the default branch for.
  666. RepositoryName *string `locationName:"repositoryName" type:"string" required:"true"`
  667. metadataUpdateDefaultBranchInput `json:"-" xml:"-"`
  668. }
  669. type metadataUpdateDefaultBranchInput struct {
  670. SDKShapeTraits bool `type:"structure"`
  671. }
  672. // String returns the string representation
  673. func (s UpdateDefaultBranchInput) String() string {
  674. return awsutil.Prettify(s)
  675. }
  676. // GoString returns the string representation
  677. func (s UpdateDefaultBranchInput) GoString() string {
  678. return s.String()
  679. }
  680. type UpdateDefaultBranchOutput struct {
  681. metadataUpdateDefaultBranchOutput `json:"-" xml:"-"`
  682. }
  683. type metadataUpdateDefaultBranchOutput struct {
  684. SDKShapeTraits bool `type:"structure"`
  685. }
  686. // String returns the string representation
  687. func (s UpdateDefaultBranchOutput) String() string {
  688. return awsutil.Prettify(s)
  689. }
  690. // GoString returns the string representation
  691. func (s UpdateDefaultBranchOutput) GoString() string {
  692. return s.String()
  693. }
  694. // Represents the input of an update repository description operation.
  695. type UpdateRepositoryDescriptionInput struct {
  696. // The new comment or description for the specified repository.
  697. RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
  698. // The name of the repository to set or change the comment or description for.
  699. RepositoryName *string `locationName:"repositoryName" type:"string" required:"true"`
  700. metadataUpdateRepositoryDescriptionInput `json:"-" xml:"-"`
  701. }
  702. type metadataUpdateRepositoryDescriptionInput struct {
  703. SDKShapeTraits bool `type:"structure"`
  704. }
  705. // String returns the string representation
  706. func (s UpdateRepositoryDescriptionInput) String() string {
  707. return awsutil.Prettify(s)
  708. }
  709. // GoString returns the string representation
  710. func (s UpdateRepositoryDescriptionInput) GoString() string {
  711. return s.String()
  712. }
  713. type UpdateRepositoryDescriptionOutput struct {
  714. metadataUpdateRepositoryDescriptionOutput `json:"-" xml:"-"`
  715. }
  716. type metadataUpdateRepositoryDescriptionOutput struct {
  717. SDKShapeTraits bool `type:"structure"`
  718. }
  719. // String returns the string representation
  720. func (s UpdateRepositoryDescriptionOutput) String() string {
  721. return awsutil.Prettify(s)
  722. }
  723. // GoString returns the string representation
  724. func (s UpdateRepositoryDescriptionOutput) GoString() string {
  725. return s.String()
  726. }
  727. // Represents the input of an update repository description operation.
  728. type UpdateRepositoryNameInput struct {
  729. // Repository name is restricted to alphanumeric characters (a-z, A-Z, 0-9),
  730. // ".", "_", and "-". Additionally, the suffix ".git" is prohibited in a repository
  731. // name.
  732. NewName *string `locationName:"newName" type:"string" required:"true"`
  733. // Repository name is restricted to alphanumeric characters (a-z, A-Z, 0-9),
  734. // ".", "_", and "-". Additionally, the suffix ".git" is prohibited in a repository
  735. // name.
  736. OldName *string `locationName:"oldName" type:"string" required:"true"`
  737. metadataUpdateRepositoryNameInput `json:"-" xml:"-"`
  738. }
  739. type metadataUpdateRepositoryNameInput struct {
  740. SDKShapeTraits bool `type:"structure"`
  741. }
  742. // String returns the string representation
  743. func (s UpdateRepositoryNameInput) String() string {
  744. return awsutil.Prettify(s)
  745. }
  746. // GoString returns the string representation
  747. func (s UpdateRepositoryNameInput) GoString() string {
  748. return s.String()
  749. }
  750. type UpdateRepositoryNameOutput struct {
  751. metadataUpdateRepositoryNameOutput `json:"-" xml:"-"`
  752. }
  753. type metadataUpdateRepositoryNameOutput struct {
  754. SDKShapeTraits bool `type:"structure"`
  755. }
  756. // String returns the string representation
  757. func (s UpdateRepositoryNameOutput) String() string {
  758. return awsutil.Prettify(s)
  759. }
  760. // GoString returns the string representation
  761. func (s UpdateRepositoryNameOutput) GoString() string {
  762. return s.String()
  763. }
  764. const (
  765. // @enum OrderEnum
  766. OrderEnumAscending = "ascending"
  767. // @enum OrderEnum
  768. OrderEnumDescending = "descending"
  769. )
  770. const (
  771. // @enum SortByEnum
  772. SortByEnumRepositoryName = "repositoryName"
  773. // @enum SortByEnum
  774. SortByEnumLastModifiedDate = "lastModifiedDate"
  775. )