api.go 389 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package codecommit
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opBatchGetRepositories = "BatchGetRepositories"
  13. // BatchGetRepositoriesRequest generates a "aws/request.Request" representing the
  14. // client's request for the BatchGetRepositories operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See BatchGetRepositories for more information on using the BatchGetRepositories
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  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. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/BatchGetRepositories
  37. func (c *CodeCommit) BatchGetRepositoriesRequest(input *BatchGetRepositoriesInput) (req *request.Request, output *BatchGetRepositoriesOutput) {
  38. op := &request.Operation{
  39. Name: opBatchGetRepositories,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &BatchGetRepositoriesInput{}
  45. }
  46. output = &BatchGetRepositoriesOutput{}
  47. req = c.newRequest(op, input, 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. // * ErrCodeRepositoryNamesRequiredException "RepositoryNamesRequiredException"
  69. // A repository names object is required but was not specified.
  70. //
  71. // * ErrCodeMaximumRepositoryNamesExceededException "MaximumRepositoryNamesExceededException"
  72. // The maximum number of allowed repository names was exceeded. Currently, this
  73. // number is 25.
  74. //
  75. // * ErrCodeInvalidRepositoryNameException "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. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  83. // An encryption integrity check failed.
  84. //
  85. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  86. // An encryption key could not be accessed.
  87. //
  88. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  89. // The encryption key is disabled.
  90. //
  91. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  92. // No encryption key was found.
  93. //
  94. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  95. // The encryption key is not available.
  96. //
  97. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/BatchGetRepositories
  98. func (c *CodeCommit) BatchGetRepositories(input *BatchGetRepositoriesInput) (*BatchGetRepositoriesOutput, error) {
  99. req, out := c.BatchGetRepositoriesRequest(input)
  100. return out, req.Send()
  101. }
  102. // BatchGetRepositoriesWithContext is the same as BatchGetRepositories with the addition of
  103. // the ability to pass a context and additional request options.
  104. //
  105. // See BatchGetRepositories for details on how to use this API operation.
  106. //
  107. // The context must be non-nil and will be used for request cancellation. If
  108. // the context is nil a panic will occur. In the future the SDK may create
  109. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  110. // for more information on using Contexts.
  111. func (c *CodeCommit) BatchGetRepositoriesWithContext(ctx aws.Context, input *BatchGetRepositoriesInput, opts ...request.Option) (*BatchGetRepositoriesOutput, error) {
  112. req, out := c.BatchGetRepositoriesRequest(input)
  113. req.SetContext(ctx)
  114. req.ApplyOptions(opts...)
  115. return out, req.Send()
  116. }
  117. const opCreateBranch = "CreateBranch"
  118. // CreateBranchRequest generates a "aws/request.Request" representing the
  119. // client's request for the CreateBranch operation. The "output" return
  120. // value will be populated with the request's response once the request completes
  121. // successfully.
  122. //
  123. // Use "Send" method on the returned Request to send the API call to the service.
  124. // the "output" return value is not valid until after Send returns without error.
  125. //
  126. // See CreateBranch for more information on using the CreateBranch
  127. // API call, and error handling.
  128. //
  129. // This method is useful when you want to inject custom logic or configuration
  130. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  131. //
  132. //
  133. // // Example sending a request using the CreateBranchRequest method.
  134. // req, resp := client.CreateBranchRequest(params)
  135. //
  136. // err := req.Send()
  137. // if err == nil { // resp is now filled
  138. // fmt.Println(resp)
  139. // }
  140. //
  141. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreateBranch
  142. func (c *CodeCommit) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) {
  143. op := &request.Operation{
  144. Name: opCreateBranch,
  145. HTTPMethod: "POST",
  146. HTTPPath: "/",
  147. }
  148. if input == nil {
  149. input = &CreateBranchInput{}
  150. }
  151. output = &CreateBranchOutput{}
  152. req = c.newRequest(op, input, output)
  153. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  154. return
  155. }
  156. // CreateBranch API operation for AWS CodeCommit.
  157. //
  158. // Creates a new branch in a repository and points the branch to a commit.
  159. //
  160. // Calling the create branch operation does not set a repository's default branch.
  161. // To do this, call the update default branch operation.
  162. //
  163. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  164. // with awserr.Error's Code and Message methods to get detailed information about
  165. // the error.
  166. //
  167. // See the AWS API reference guide for AWS CodeCommit's
  168. // API operation CreateBranch for usage and error information.
  169. //
  170. // Returned Error Codes:
  171. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  172. // A repository name is required but was not specified.
  173. //
  174. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  175. // At least one specified repository name is not valid.
  176. //
  177. // This exception only occurs when a specified repository name is not valid.
  178. // Other exceptions occur when a required repository parameter is missing, or
  179. // when a specified repository does not exist.
  180. //
  181. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  182. // The specified repository does not exist.
  183. //
  184. // * ErrCodeBranchNameRequiredException "BranchNameRequiredException"
  185. // A branch name is required but was not specified.
  186. //
  187. // * ErrCodeBranchNameExistsException "BranchNameExistsException"
  188. // The specified branch name already exists.
  189. //
  190. // * ErrCodeInvalidBranchNameException "InvalidBranchNameException"
  191. // The specified reference name is not valid.
  192. //
  193. // * ErrCodeCommitIdRequiredException "CommitIdRequiredException"
  194. // A commit ID was not specified.
  195. //
  196. // * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException"
  197. // The specified commit does not exist or no commit was specified, and the specified
  198. // repository has no default branch.
  199. //
  200. // * ErrCodeInvalidCommitIdException "InvalidCommitIdException"
  201. // The specified commit ID is not valid.
  202. //
  203. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  204. // An encryption integrity check failed.
  205. //
  206. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  207. // An encryption key could not be accessed.
  208. //
  209. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  210. // The encryption key is disabled.
  211. //
  212. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  213. // No encryption key was found.
  214. //
  215. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  216. // The encryption key is not available.
  217. //
  218. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreateBranch
  219. func (c *CodeCommit) CreateBranch(input *CreateBranchInput) (*CreateBranchOutput, error) {
  220. req, out := c.CreateBranchRequest(input)
  221. return out, req.Send()
  222. }
  223. // CreateBranchWithContext is the same as CreateBranch with the addition of
  224. // the ability to pass a context and additional request options.
  225. //
  226. // See CreateBranch for details on how to use this API operation.
  227. //
  228. // The context must be non-nil and will be used for request cancellation. If
  229. // the context is nil a panic will occur. In the future the SDK may create
  230. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  231. // for more information on using Contexts.
  232. func (c *CodeCommit) CreateBranchWithContext(ctx aws.Context, input *CreateBranchInput, opts ...request.Option) (*CreateBranchOutput, error) {
  233. req, out := c.CreateBranchRequest(input)
  234. req.SetContext(ctx)
  235. req.ApplyOptions(opts...)
  236. return out, req.Send()
  237. }
  238. const opCreatePullRequest = "CreatePullRequest"
  239. // CreatePullRequestRequest generates a "aws/request.Request" representing the
  240. // client's request for the CreatePullRequest operation. The "output" return
  241. // value will be populated with the request's response once the request completes
  242. // successfully.
  243. //
  244. // Use "Send" method on the returned Request to send the API call to the service.
  245. // the "output" return value is not valid until after Send returns without error.
  246. //
  247. // See CreatePullRequest for more information on using the CreatePullRequest
  248. // API call, and error handling.
  249. //
  250. // This method is useful when you want to inject custom logic or configuration
  251. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  252. //
  253. //
  254. // // Example sending a request using the CreatePullRequestRequest method.
  255. // req, resp := client.CreatePullRequestRequest(params)
  256. //
  257. // err := req.Send()
  258. // if err == nil { // resp is now filled
  259. // fmt.Println(resp)
  260. // }
  261. //
  262. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreatePullRequest
  263. func (c *CodeCommit) CreatePullRequestRequest(input *CreatePullRequestInput) (req *request.Request, output *CreatePullRequestOutput) {
  264. op := &request.Operation{
  265. Name: opCreatePullRequest,
  266. HTTPMethod: "POST",
  267. HTTPPath: "/",
  268. }
  269. if input == nil {
  270. input = &CreatePullRequestInput{}
  271. }
  272. output = &CreatePullRequestOutput{}
  273. req = c.newRequest(op, input, output)
  274. return
  275. }
  276. // CreatePullRequest API operation for AWS CodeCommit.
  277. //
  278. // Creates a pull request in the specified repository.
  279. //
  280. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  281. // with awserr.Error's Code and Message methods to get detailed information about
  282. // the error.
  283. //
  284. // See the AWS API reference guide for AWS CodeCommit's
  285. // API operation CreatePullRequest for usage and error information.
  286. //
  287. // Returned Error Codes:
  288. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  289. // A repository name is required but was not specified.
  290. //
  291. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  292. // At least one specified repository name is not valid.
  293. //
  294. // This exception only occurs when a specified repository name is not valid.
  295. // Other exceptions occur when a required repository parameter is missing, or
  296. // when a specified repository does not exist.
  297. //
  298. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  299. // The specified repository does not exist.
  300. //
  301. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  302. // An encryption integrity check failed.
  303. //
  304. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  305. // An encryption key could not be accessed.
  306. //
  307. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  308. // The encryption key is disabled.
  309. //
  310. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  311. // No encryption key was found.
  312. //
  313. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  314. // The encryption key is not available.
  315. //
  316. // * ErrCodeClientRequestTokenRequiredException "ClientRequestTokenRequiredException"
  317. // A client request token is required. A client request token is an unique,
  318. // client-generated idempotency token that when provided in a request, ensures
  319. // the request cannot be repeated with a changed parameter. If a request is
  320. // received with the same parameters and a token is included, the request will
  321. // return information about the initial request that used that token.
  322. //
  323. // * ErrCodeInvalidClientRequestTokenException "InvalidClientRequestTokenException"
  324. // The client request token is not valid.
  325. //
  326. // * ErrCodeIdempotencyParameterMismatchException "IdempotencyParameterMismatchException"
  327. // The client request token is not valid. Either the token is not in a valid
  328. // format, or the token has been used in a previous request and cannot be re-used.
  329. //
  330. // * ErrCodeReferenceNameRequiredException "ReferenceNameRequiredException"
  331. // A reference name is required, but none was provided.
  332. //
  333. // * ErrCodeInvalidReferenceNameException "InvalidReferenceNameException"
  334. // The specified reference name format is not valid. Reference names must conform
  335. // to the Git references format, for example refs/heads/master. For more information,
  336. // see Git Internals - Git References (https://git-scm.com/book/en/v2/Git-Internals-Git-References)
  337. // or consult your Git documentation.
  338. //
  339. // * ErrCodeReferenceDoesNotExistException "ReferenceDoesNotExistException"
  340. // The specified reference does not exist. You must provide a full commit ID.
  341. //
  342. // * ErrCodeReferenceTypeNotSupportedException "ReferenceTypeNotSupportedException"
  343. // The specified reference is not a supported type.
  344. //
  345. // * ErrCodeTitleRequiredException "TitleRequiredException"
  346. // A pull request title is required. It cannot be empty or null.
  347. //
  348. // * ErrCodeInvalidTitleException "InvalidTitleException"
  349. // The title of the pull request is not valid. Pull request titles cannot exceed
  350. // 100 characters in length.
  351. //
  352. // * ErrCodeInvalidDescriptionException "InvalidDescriptionException"
  353. // The pull request description is not valid. Descriptions are limited to 1,000
  354. // characters in length.
  355. //
  356. // * ErrCodeTargetsRequiredException "TargetsRequiredException"
  357. // An array of target objects is required. It cannot be empty or null.
  358. //
  359. // * ErrCodeInvalidTargetsException "InvalidTargetsException"
  360. // The targets for the pull request is not valid or not in a valid format. Targets
  361. // are a list of target objects. Each target object must contain the full values
  362. // for the repository name, source branch, and destination branch for a pull
  363. // request.
  364. //
  365. // * ErrCodeTargetRequiredException "TargetRequiredException"
  366. // A pull request target is required. It cannot be empty or null. A pull request
  367. // target must contain the full values for the repository name, source branch,
  368. // and destination branch for the pull request.
  369. //
  370. // * ErrCodeInvalidTargetException "InvalidTargetException"
  371. // The target for the pull request is not valid. A target must contain the full
  372. // values for the repository name, source branch, and destination branch for
  373. // the pull request.
  374. //
  375. // * ErrCodeMultipleRepositoriesInPullRequestException "MultipleRepositoriesInPullRequestException"
  376. // You cannot include more than one repository in a pull request. Make sure
  377. // you have specified only one repository name in your request, and then try
  378. // again.
  379. //
  380. // * ErrCodeMaximumOpenPullRequestsExceededException "MaximumOpenPullRequestsExceededException"
  381. // You cannot create the pull request because the repository has too many open
  382. // pull requests. The maximum number of open pull requests for a repository
  383. // is 1,000. Close one or more open pull requests, and then try again.
  384. //
  385. // * ErrCodeSourceAndDestinationAreSameException "SourceAndDestinationAreSameException"
  386. // The source branch and the destination branch for the pull request are the
  387. // same. You must specify different branches for the source and destination.
  388. //
  389. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreatePullRequest
  390. func (c *CodeCommit) CreatePullRequest(input *CreatePullRequestInput) (*CreatePullRequestOutput, error) {
  391. req, out := c.CreatePullRequestRequest(input)
  392. return out, req.Send()
  393. }
  394. // CreatePullRequestWithContext is the same as CreatePullRequest with the addition of
  395. // the ability to pass a context and additional request options.
  396. //
  397. // See CreatePullRequest for details on how to use this API operation.
  398. //
  399. // The context must be non-nil and will be used for request cancellation. If
  400. // the context is nil a panic will occur. In the future the SDK may create
  401. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  402. // for more information on using Contexts.
  403. func (c *CodeCommit) CreatePullRequestWithContext(ctx aws.Context, input *CreatePullRequestInput, opts ...request.Option) (*CreatePullRequestOutput, error) {
  404. req, out := c.CreatePullRequestRequest(input)
  405. req.SetContext(ctx)
  406. req.ApplyOptions(opts...)
  407. return out, req.Send()
  408. }
  409. const opCreateRepository = "CreateRepository"
  410. // CreateRepositoryRequest generates a "aws/request.Request" representing the
  411. // client's request for the CreateRepository operation. The "output" return
  412. // value will be populated with the request's response once the request completes
  413. // successfully.
  414. //
  415. // Use "Send" method on the returned Request to send the API call to the service.
  416. // the "output" return value is not valid until after Send returns without error.
  417. //
  418. // See CreateRepository for more information on using the CreateRepository
  419. // API call, and error handling.
  420. //
  421. // This method is useful when you want to inject custom logic or configuration
  422. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  423. //
  424. //
  425. // // Example sending a request using the CreateRepositoryRequest method.
  426. // req, resp := client.CreateRepositoryRequest(params)
  427. //
  428. // err := req.Send()
  429. // if err == nil { // resp is now filled
  430. // fmt.Println(resp)
  431. // }
  432. //
  433. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreateRepository
  434. func (c *CodeCommit) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) {
  435. op := &request.Operation{
  436. Name: opCreateRepository,
  437. HTTPMethod: "POST",
  438. HTTPPath: "/",
  439. }
  440. if input == nil {
  441. input = &CreateRepositoryInput{}
  442. }
  443. output = &CreateRepositoryOutput{}
  444. req = c.newRequest(op, input, output)
  445. return
  446. }
  447. // CreateRepository API operation for AWS CodeCommit.
  448. //
  449. // Creates a new, empty repository.
  450. //
  451. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  452. // with awserr.Error's Code and Message methods to get detailed information about
  453. // the error.
  454. //
  455. // See the AWS API reference guide for AWS CodeCommit's
  456. // API operation CreateRepository for usage and error information.
  457. //
  458. // Returned Error Codes:
  459. // * ErrCodeRepositoryNameExistsException "RepositoryNameExistsException"
  460. // The specified repository name already exists.
  461. //
  462. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  463. // A repository name is required but was not specified.
  464. //
  465. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  466. // At least one specified repository name is not valid.
  467. //
  468. // This exception only occurs when a specified repository name is not valid.
  469. // Other exceptions occur when a required repository parameter is missing, or
  470. // when a specified repository does not exist.
  471. //
  472. // * ErrCodeInvalidRepositoryDescriptionException "InvalidRepositoryDescriptionException"
  473. // The specified repository description is not valid.
  474. //
  475. // * ErrCodeRepositoryLimitExceededException "RepositoryLimitExceededException"
  476. // A repository resource limit was exceeded.
  477. //
  478. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  479. // An encryption integrity check failed.
  480. //
  481. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  482. // An encryption key could not be accessed.
  483. //
  484. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  485. // The encryption key is disabled.
  486. //
  487. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  488. // No encryption key was found.
  489. //
  490. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  491. // The encryption key is not available.
  492. //
  493. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/CreateRepository
  494. func (c *CodeCommit) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
  495. req, out := c.CreateRepositoryRequest(input)
  496. return out, req.Send()
  497. }
  498. // CreateRepositoryWithContext is the same as CreateRepository with the addition of
  499. // the ability to pass a context and additional request options.
  500. //
  501. // See CreateRepository for details on how to use this API operation.
  502. //
  503. // The context must be non-nil and will be used for request cancellation. If
  504. // the context is nil a panic will occur. In the future the SDK may create
  505. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  506. // for more information on using Contexts.
  507. func (c *CodeCommit) CreateRepositoryWithContext(ctx aws.Context, input *CreateRepositoryInput, opts ...request.Option) (*CreateRepositoryOutput, error) {
  508. req, out := c.CreateRepositoryRequest(input)
  509. req.SetContext(ctx)
  510. req.ApplyOptions(opts...)
  511. return out, req.Send()
  512. }
  513. const opDeleteBranch = "DeleteBranch"
  514. // DeleteBranchRequest generates a "aws/request.Request" representing the
  515. // client's request for the DeleteBranch operation. The "output" return
  516. // value will be populated with the request's response once the request completes
  517. // successfully.
  518. //
  519. // Use "Send" method on the returned Request to send the API call to the service.
  520. // the "output" return value is not valid until after Send returns without error.
  521. //
  522. // See DeleteBranch for more information on using the DeleteBranch
  523. // API call, and error handling.
  524. //
  525. // This method is useful when you want to inject custom logic or configuration
  526. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  527. //
  528. //
  529. // // Example sending a request using the DeleteBranchRequest method.
  530. // req, resp := client.DeleteBranchRequest(params)
  531. //
  532. // err := req.Send()
  533. // if err == nil { // resp is now filled
  534. // fmt.Println(resp)
  535. // }
  536. //
  537. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteBranch
  538. func (c *CodeCommit) DeleteBranchRequest(input *DeleteBranchInput) (req *request.Request, output *DeleteBranchOutput) {
  539. op := &request.Operation{
  540. Name: opDeleteBranch,
  541. HTTPMethod: "POST",
  542. HTTPPath: "/",
  543. }
  544. if input == nil {
  545. input = &DeleteBranchInput{}
  546. }
  547. output = &DeleteBranchOutput{}
  548. req = c.newRequest(op, input, output)
  549. return
  550. }
  551. // DeleteBranch API operation for AWS CodeCommit.
  552. //
  553. // Deletes a branch from a repository, unless that branch is the default branch
  554. // for the repository.
  555. //
  556. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  557. // with awserr.Error's Code and Message methods to get detailed information about
  558. // the error.
  559. //
  560. // See the AWS API reference guide for AWS CodeCommit's
  561. // API operation DeleteBranch for usage and error information.
  562. //
  563. // Returned Error Codes:
  564. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  565. // A repository name is required but was not specified.
  566. //
  567. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  568. // The specified repository does not exist.
  569. //
  570. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  571. // At least one specified repository name is not valid.
  572. //
  573. // This exception only occurs when a specified repository name is not valid.
  574. // Other exceptions occur when a required repository parameter is missing, or
  575. // when a specified repository does not exist.
  576. //
  577. // * ErrCodeBranchNameRequiredException "BranchNameRequiredException"
  578. // A branch name is required but was not specified.
  579. //
  580. // * ErrCodeInvalidBranchNameException "InvalidBranchNameException"
  581. // The specified reference name is not valid.
  582. //
  583. // * ErrCodeDefaultBranchCannotBeDeletedException "DefaultBranchCannotBeDeletedException"
  584. // The specified branch is the default branch for the repository, and cannot
  585. // be deleted. To delete this branch, you must first set another branch as the
  586. // default branch.
  587. //
  588. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  589. // An encryption integrity check failed.
  590. //
  591. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  592. // An encryption key could not be accessed.
  593. //
  594. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  595. // The encryption key is disabled.
  596. //
  597. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  598. // No encryption key was found.
  599. //
  600. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  601. // The encryption key is not available.
  602. //
  603. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteBranch
  604. func (c *CodeCommit) DeleteBranch(input *DeleteBranchInput) (*DeleteBranchOutput, error) {
  605. req, out := c.DeleteBranchRequest(input)
  606. return out, req.Send()
  607. }
  608. // DeleteBranchWithContext is the same as DeleteBranch with the addition of
  609. // the ability to pass a context and additional request options.
  610. //
  611. // See DeleteBranch for details on how to use this API operation.
  612. //
  613. // The context must be non-nil and will be used for request cancellation. If
  614. // the context is nil a panic will occur. In the future the SDK may create
  615. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  616. // for more information on using Contexts.
  617. func (c *CodeCommit) DeleteBranchWithContext(ctx aws.Context, input *DeleteBranchInput, opts ...request.Option) (*DeleteBranchOutput, error) {
  618. req, out := c.DeleteBranchRequest(input)
  619. req.SetContext(ctx)
  620. req.ApplyOptions(opts...)
  621. return out, req.Send()
  622. }
  623. const opDeleteCommentContent = "DeleteCommentContent"
  624. // DeleteCommentContentRequest generates a "aws/request.Request" representing the
  625. // client's request for the DeleteCommentContent operation. The "output" return
  626. // value will be populated with the request's response once the request completes
  627. // successfully.
  628. //
  629. // Use "Send" method on the returned Request to send the API call to the service.
  630. // the "output" return value is not valid until after Send returns without error.
  631. //
  632. // See DeleteCommentContent for more information on using the DeleteCommentContent
  633. // API call, and error handling.
  634. //
  635. // This method is useful when you want to inject custom logic or configuration
  636. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  637. //
  638. //
  639. // // Example sending a request using the DeleteCommentContentRequest method.
  640. // req, resp := client.DeleteCommentContentRequest(params)
  641. //
  642. // err := req.Send()
  643. // if err == nil { // resp is now filled
  644. // fmt.Println(resp)
  645. // }
  646. //
  647. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteCommentContent
  648. func (c *CodeCommit) DeleteCommentContentRequest(input *DeleteCommentContentInput) (req *request.Request, output *DeleteCommentContentOutput) {
  649. op := &request.Operation{
  650. Name: opDeleteCommentContent,
  651. HTTPMethod: "POST",
  652. HTTPPath: "/",
  653. }
  654. if input == nil {
  655. input = &DeleteCommentContentInput{}
  656. }
  657. output = &DeleteCommentContentOutput{}
  658. req = c.newRequest(op, input, output)
  659. return
  660. }
  661. // DeleteCommentContent API operation for AWS CodeCommit.
  662. //
  663. // Deletes the content of a comment made on a change, file, or commit in a repository.
  664. //
  665. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  666. // with awserr.Error's Code and Message methods to get detailed information about
  667. // the error.
  668. //
  669. // See the AWS API reference guide for AWS CodeCommit's
  670. // API operation DeleteCommentContent for usage and error information.
  671. //
  672. // Returned Error Codes:
  673. // * ErrCodeCommentDoesNotExistException "CommentDoesNotExistException"
  674. // No comment exists with the provided ID. Verify that you have provided the
  675. // correct ID, and then try again.
  676. //
  677. // * ErrCodeCommentIdRequiredException "CommentIdRequiredException"
  678. // The comment ID is missing or null. A comment ID is required.
  679. //
  680. // * ErrCodeInvalidCommentIdException "InvalidCommentIdException"
  681. // The comment ID is not in a valid format. Make sure that you have provided
  682. // the full comment ID.
  683. //
  684. // * ErrCodeCommentDeletedException "CommentDeletedException"
  685. // This comment has already been deleted. You cannot edit or delete a deleted
  686. // comment.
  687. //
  688. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteCommentContent
  689. func (c *CodeCommit) DeleteCommentContent(input *DeleteCommentContentInput) (*DeleteCommentContentOutput, error) {
  690. req, out := c.DeleteCommentContentRequest(input)
  691. return out, req.Send()
  692. }
  693. // DeleteCommentContentWithContext is the same as DeleteCommentContent with the addition of
  694. // the ability to pass a context and additional request options.
  695. //
  696. // See DeleteCommentContent for details on how to use this API operation.
  697. //
  698. // The context must be non-nil and will be used for request cancellation. If
  699. // the context is nil a panic will occur. In the future the SDK may create
  700. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  701. // for more information on using Contexts.
  702. func (c *CodeCommit) DeleteCommentContentWithContext(ctx aws.Context, input *DeleteCommentContentInput, opts ...request.Option) (*DeleteCommentContentOutput, error) {
  703. req, out := c.DeleteCommentContentRequest(input)
  704. req.SetContext(ctx)
  705. req.ApplyOptions(opts...)
  706. return out, req.Send()
  707. }
  708. const opDeleteFile = "DeleteFile"
  709. // DeleteFileRequest generates a "aws/request.Request" representing the
  710. // client's request for the DeleteFile operation. The "output" return
  711. // value will be populated with the request's response once the request completes
  712. // successfully.
  713. //
  714. // Use "Send" method on the returned Request to send the API call to the service.
  715. // the "output" return value is not valid until after Send returns without error.
  716. //
  717. // See DeleteFile for more information on using the DeleteFile
  718. // API call, and error handling.
  719. //
  720. // This method is useful when you want to inject custom logic or configuration
  721. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  722. //
  723. //
  724. // // Example sending a request using the DeleteFileRequest method.
  725. // req, resp := client.DeleteFileRequest(params)
  726. //
  727. // err := req.Send()
  728. // if err == nil { // resp is now filled
  729. // fmt.Println(resp)
  730. // }
  731. //
  732. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteFile
  733. func (c *CodeCommit) DeleteFileRequest(input *DeleteFileInput) (req *request.Request, output *DeleteFileOutput) {
  734. op := &request.Operation{
  735. Name: opDeleteFile,
  736. HTTPMethod: "POST",
  737. HTTPPath: "/",
  738. }
  739. if input == nil {
  740. input = &DeleteFileInput{}
  741. }
  742. output = &DeleteFileOutput{}
  743. req = c.newRequest(op, input, output)
  744. return
  745. }
  746. // DeleteFile API operation for AWS CodeCommit.
  747. //
  748. // Deletes a specified file from a specified branch. A commit is created on
  749. // the branch that contains the revision. The file will still exist in the commits
  750. // prior to the commit that contains the deletion.
  751. //
  752. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  753. // with awserr.Error's Code and Message methods to get detailed information about
  754. // the error.
  755. //
  756. // See the AWS API reference guide for AWS CodeCommit's
  757. // API operation DeleteFile for usage and error information.
  758. //
  759. // Returned Error Codes:
  760. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  761. // A repository name is required but was not specified.
  762. //
  763. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  764. // At least one specified repository name is not valid.
  765. //
  766. // This exception only occurs when a specified repository name is not valid.
  767. // Other exceptions occur when a required repository parameter is missing, or
  768. // when a specified repository does not exist.
  769. //
  770. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  771. // The specified repository does not exist.
  772. //
  773. // * ErrCodeParentCommitIdRequiredException "ParentCommitIdRequiredException"
  774. // A parent commit ID is required. To view the full commit ID of a branch in
  775. // a repository, use GetBranch or a Git command (for example, git pull or git
  776. // log).
  777. //
  778. // * ErrCodeInvalidParentCommitIdException "InvalidParentCommitIdException"
  779. // The parent commit ID is not valid. The commit ID cannot be empty, and must
  780. // match the head commit ID for the branch of the repository where you want
  781. // to add or update a file.
  782. //
  783. // * ErrCodeParentCommitDoesNotExistException "ParentCommitDoesNotExistException"
  784. // The parent commit ID is not valid because it does not exist. The specified
  785. // parent commit ID does not exist in the specified branch of the repository.
  786. //
  787. // * ErrCodeParentCommitIdOutdatedException "ParentCommitIdOutdatedException"
  788. // The file could not be added because the provided parent commit ID is not
  789. // the current tip of the specified branch. To view the full commit ID of the
  790. // current head of the branch, use GetBranch.
  791. //
  792. // * ErrCodePathRequiredException "PathRequiredException"
  793. // The folderPath for a location cannot be null.
  794. //
  795. // * ErrCodeInvalidPathException "InvalidPathException"
  796. // The specified path is not valid.
  797. //
  798. // * ErrCodeFileDoesNotExistException "FileDoesNotExistException"
  799. // The specified file does not exist. Verify that you have provided the correct
  800. // name of the file, including its full path and extension.
  801. //
  802. // * ErrCodeBranchNameRequiredException "BranchNameRequiredException"
  803. // A branch name is required but was not specified.
  804. //
  805. // * ErrCodeInvalidBranchNameException "InvalidBranchNameException"
  806. // The specified reference name is not valid.
  807. //
  808. // * ErrCodeBranchDoesNotExistException "BranchDoesNotExistException"
  809. // The specified branch does not exist.
  810. //
  811. // * ErrCodeBranchNameIsTagNameException "BranchNameIsTagNameException"
  812. // The specified branch name is not valid because it is a tag name. Type the
  813. // name of a current branch in the repository. For a list of valid branch names,
  814. // use ListBranches.
  815. //
  816. // * ErrCodeNameLengthExceededException "NameLengthExceededException"
  817. // The user name is not valid because it has exceeded the character limit for
  818. // file names. File names, including the path to the file, cannot exceed the
  819. // character limit.
  820. //
  821. // * ErrCodeInvalidEmailException "InvalidEmailException"
  822. // The specified email address either contains one or more characters that are
  823. // not allowed, or it exceeds the maximum number of characters allowed for an
  824. // email address.
  825. //
  826. // * ErrCodeCommitMessageLengthExceededException "CommitMessageLengthExceededException"
  827. // The commit message is too long. Provide a shorter string.
  828. //
  829. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  830. // An encryption integrity check failed.
  831. //
  832. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  833. // An encryption key could not be accessed.
  834. //
  835. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  836. // The encryption key is disabled.
  837. //
  838. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  839. // No encryption key was found.
  840. //
  841. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  842. // The encryption key is not available.
  843. //
  844. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteFile
  845. func (c *CodeCommit) DeleteFile(input *DeleteFileInput) (*DeleteFileOutput, error) {
  846. req, out := c.DeleteFileRequest(input)
  847. return out, req.Send()
  848. }
  849. // DeleteFileWithContext is the same as DeleteFile with the addition of
  850. // the ability to pass a context and additional request options.
  851. //
  852. // See DeleteFile for details on how to use this API operation.
  853. //
  854. // The context must be non-nil and will be used for request cancellation. If
  855. // the context is nil a panic will occur. In the future the SDK may create
  856. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  857. // for more information on using Contexts.
  858. func (c *CodeCommit) DeleteFileWithContext(ctx aws.Context, input *DeleteFileInput, opts ...request.Option) (*DeleteFileOutput, error) {
  859. req, out := c.DeleteFileRequest(input)
  860. req.SetContext(ctx)
  861. req.ApplyOptions(opts...)
  862. return out, req.Send()
  863. }
  864. const opDeleteRepository = "DeleteRepository"
  865. // DeleteRepositoryRequest generates a "aws/request.Request" representing the
  866. // client's request for the DeleteRepository operation. The "output" return
  867. // value will be populated with the request's response once the request completes
  868. // successfully.
  869. //
  870. // Use "Send" method on the returned Request to send the API call to the service.
  871. // the "output" return value is not valid until after Send returns without error.
  872. //
  873. // See DeleteRepository for more information on using the DeleteRepository
  874. // API call, and error handling.
  875. //
  876. // This method is useful when you want to inject custom logic or configuration
  877. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  878. //
  879. //
  880. // // Example sending a request using the DeleteRepositoryRequest method.
  881. // req, resp := client.DeleteRepositoryRequest(params)
  882. //
  883. // err := req.Send()
  884. // if err == nil { // resp is now filled
  885. // fmt.Println(resp)
  886. // }
  887. //
  888. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteRepository
  889. func (c *CodeCommit) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) {
  890. op := &request.Operation{
  891. Name: opDeleteRepository,
  892. HTTPMethod: "POST",
  893. HTTPPath: "/",
  894. }
  895. if input == nil {
  896. input = &DeleteRepositoryInput{}
  897. }
  898. output = &DeleteRepositoryOutput{}
  899. req = c.newRequest(op, input, output)
  900. return
  901. }
  902. // DeleteRepository API operation for AWS CodeCommit.
  903. //
  904. // Deletes a repository. If a specified repository was already deleted, a null
  905. // repository ID will be returned.
  906. //
  907. // Deleting a repository also deletes all associated objects and metadata. After
  908. // a repository is deleted, all future push calls to the deleted repository
  909. // will fail.
  910. //
  911. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  912. // with awserr.Error's Code and Message methods to get detailed information about
  913. // the error.
  914. //
  915. // See the AWS API reference guide for AWS CodeCommit's
  916. // API operation DeleteRepository for usage and error information.
  917. //
  918. // Returned Error Codes:
  919. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  920. // A repository name is required but was not specified.
  921. //
  922. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  923. // At least one specified repository name is not valid.
  924. //
  925. // This exception only occurs when a specified repository name is not valid.
  926. // Other exceptions occur when a required repository parameter is missing, or
  927. // when a specified repository does not exist.
  928. //
  929. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  930. // An encryption integrity check failed.
  931. //
  932. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  933. // An encryption key could not be accessed.
  934. //
  935. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  936. // The encryption key is disabled.
  937. //
  938. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  939. // No encryption key was found.
  940. //
  941. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  942. // The encryption key is not available.
  943. //
  944. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteRepository
  945. func (c *CodeCommit) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
  946. req, out := c.DeleteRepositoryRequest(input)
  947. return out, req.Send()
  948. }
  949. // DeleteRepositoryWithContext is the same as DeleteRepository with the addition of
  950. // the ability to pass a context and additional request options.
  951. //
  952. // See DeleteRepository for details on how to use this API operation.
  953. //
  954. // The context must be non-nil and will be used for request cancellation. If
  955. // the context is nil a panic will occur. In the future the SDK may create
  956. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  957. // for more information on using Contexts.
  958. func (c *CodeCommit) DeleteRepositoryWithContext(ctx aws.Context, input *DeleteRepositoryInput, opts ...request.Option) (*DeleteRepositoryOutput, error) {
  959. req, out := c.DeleteRepositoryRequest(input)
  960. req.SetContext(ctx)
  961. req.ApplyOptions(opts...)
  962. return out, req.Send()
  963. }
  964. const opDescribePullRequestEvents = "DescribePullRequestEvents"
  965. // DescribePullRequestEventsRequest generates a "aws/request.Request" representing the
  966. // client's request for the DescribePullRequestEvents operation. The "output" return
  967. // value will be populated with the request's response once the request completes
  968. // successfully.
  969. //
  970. // Use "Send" method on the returned Request to send the API call to the service.
  971. // the "output" return value is not valid until after Send returns without error.
  972. //
  973. // See DescribePullRequestEvents for more information on using the DescribePullRequestEvents
  974. // API call, and error handling.
  975. //
  976. // This method is useful when you want to inject custom logic or configuration
  977. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  978. //
  979. //
  980. // // Example sending a request using the DescribePullRequestEventsRequest method.
  981. // req, resp := client.DescribePullRequestEventsRequest(params)
  982. //
  983. // err := req.Send()
  984. // if err == nil { // resp is now filled
  985. // fmt.Println(resp)
  986. // }
  987. //
  988. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DescribePullRequestEvents
  989. func (c *CodeCommit) DescribePullRequestEventsRequest(input *DescribePullRequestEventsInput) (req *request.Request, output *DescribePullRequestEventsOutput) {
  990. op := &request.Operation{
  991. Name: opDescribePullRequestEvents,
  992. HTTPMethod: "POST",
  993. HTTPPath: "/",
  994. Paginator: &request.Paginator{
  995. InputTokens: []string{"nextToken"},
  996. OutputTokens: []string{"nextToken"},
  997. LimitToken: "maxResults",
  998. TruncationToken: "",
  999. },
  1000. }
  1001. if input == nil {
  1002. input = &DescribePullRequestEventsInput{}
  1003. }
  1004. output = &DescribePullRequestEventsOutput{}
  1005. req = c.newRequest(op, input, output)
  1006. return
  1007. }
  1008. // DescribePullRequestEvents API operation for AWS CodeCommit.
  1009. //
  1010. // Returns information about one or more pull request events.
  1011. //
  1012. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1013. // with awserr.Error's Code and Message methods to get detailed information about
  1014. // the error.
  1015. //
  1016. // See the AWS API reference guide for AWS CodeCommit's
  1017. // API operation DescribePullRequestEvents for usage and error information.
  1018. //
  1019. // Returned Error Codes:
  1020. // * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException"
  1021. // The pull request ID could not be found. Make sure that you have specified
  1022. // the correct repository name and pull request ID, and then try again.
  1023. //
  1024. // * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException"
  1025. // The pull request ID is not valid. Make sure that you have provided the full
  1026. // ID and that the pull request is in the specified repository, and then try
  1027. // again.
  1028. //
  1029. // * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException"
  1030. // A pull request ID is required, but none was provided.
  1031. //
  1032. // * ErrCodeInvalidPullRequestEventTypeException "InvalidPullRequestEventTypeException"
  1033. // The pull request event type is not valid.
  1034. //
  1035. // * ErrCodeInvalidActorArnException "InvalidActorArnException"
  1036. // The Amazon Resource Name (ARN) is not valid. Make sure that you have provided
  1037. // the full ARN for the user who initiated the change for the pull request,
  1038. // and then try again.
  1039. //
  1040. // * ErrCodeActorDoesNotExistException "ActorDoesNotExistException"
  1041. // The specified Amazon Resource Name (ARN) does not exist in the AWS account.
  1042. //
  1043. // * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException"
  1044. // The specified number of maximum results is not valid.
  1045. //
  1046. // * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException"
  1047. // The specified continuation token is not valid.
  1048. //
  1049. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  1050. // An encryption integrity check failed.
  1051. //
  1052. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  1053. // An encryption key could not be accessed.
  1054. //
  1055. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  1056. // The encryption key is disabled.
  1057. //
  1058. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  1059. // No encryption key was found.
  1060. //
  1061. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  1062. // The encryption key is not available.
  1063. //
  1064. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DescribePullRequestEvents
  1065. func (c *CodeCommit) DescribePullRequestEvents(input *DescribePullRequestEventsInput) (*DescribePullRequestEventsOutput, error) {
  1066. req, out := c.DescribePullRequestEventsRequest(input)
  1067. return out, req.Send()
  1068. }
  1069. // DescribePullRequestEventsWithContext is the same as DescribePullRequestEvents with the addition of
  1070. // the ability to pass a context and additional request options.
  1071. //
  1072. // See DescribePullRequestEvents for details on how to use this API operation.
  1073. //
  1074. // The context must be non-nil and will be used for request cancellation. If
  1075. // the context is nil a panic will occur. In the future the SDK may create
  1076. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1077. // for more information on using Contexts.
  1078. func (c *CodeCommit) DescribePullRequestEventsWithContext(ctx aws.Context, input *DescribePullRequestEventsInput, opts ...request.Option) (*DescribePullRequestEventsOutput, error) {
  1079. req, out := c.DescribePullRequestEventsRequest(input)
  1080. req.SetContext(ctx)
  1081. req.ApplyOptions(opts...)
  1082. return out, req.Send()
  1083. }
  1084. // DescribePullRequestEventsPages iterates over the pages of a DescribePullRequestEvents operation,
  1085. // calling the "fn" function with the response data for each page. To stop
  1086. // iterating, return false from the fn function.
  1087. //
  1088. // See DescribePullRequestEvents method for more information on how to use this operation.
  1089. //
  1090. // Note: This operation can generate multiple requests to a service.
  1091. //
  1092. // // Example iterating over at most 3 pages of a DescribePullRequestEvents operation.
  1093. // pageNum := 0
  1094. // err := client.DescribePullRequestEventsPages(params,
  1095. // func(page *DescribePullRequestEventsOutput, lastPage bool) bool {
  1096. // pageNum++
  1097. // fmt.Println(page)
  1098. // return pageNum <= 3
  1099. // })
  1100. //
  1101. func (c *CodeCommit) DescribePullRequestEventsPages(input *DescribePullRequestEventsInput, fn func(*DescribePullRequestEventsOutput, bool) bool) error {
  1102. return c.DescribePullRequestEventsPagesWithContext(aws.BackgroundContext(), input, fn)
  1103. }
  1104. // DescribePullRequestEventsPagesWithContext same as DescribePullRequestEventsPages except
  1105. // it takes a Context and allows setting request options on the pages.
  1106. //
  1107. // The context must be non-nil and will be used for request cancellation. If
  1108. // the context is nil a panic will occur. In the future the SDK may create
  1109. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1110. // for more information on using Contexts.
  1111. func (c *CodeCommit) DescribePullRequestEventsPagesWithContext(ctx aws.Context, input *DescribePullRequestEventsInput, fn func(*DescribePullRequestEventsOutput, bool) bool, opts ...request.Option) error {
  1112. p := request.Pagination{
  1113. NewRequest: func() (*request.Request, error) {
  1114. var inCpy *DescribePullRequestEventsInput
  1115. if input != nil {
  1116. tmp := *input
  1117. inCpy = &tmp
  1118. }
  1119. req, _ := c.DescribePullRequestEventsRequest(inCpy)
  1120. req.SetContext(ctx)
  1121. req.ApplyOptions(opts...)
  1122. return req, nil
  1123. },
  1124. }
  1125. cont := true
  1126. for p.Next() && cont {
  1127. cont = fn(p.Page().(*DescribePullRequestEventsOutput), !p.HasNextPage())
  1128. }
  1129. return p.Err()
  1130. }
  1131. const opGetBlob = "GetBlob"
  1132. // GetBlobRequest generates a "aws/request.Request" representing the
  1133. // client's request for the GetBlob operation. The "output" return
  1134. // value will be populated with the request's response once the request completes
  1135. // successfully.
  1136. //
  1137. // Use "Send" method on the returned Request to send the API call to the service.
  1138. // the "output" return value is not valid until after Send returns without error.
  1139. //
  1140. // See GetBlob for more information on using the GetBlob
  1141. // API call, and error handling.
  1142. //
  1143. // This method is useful when you want to inject custom logic or configuration
  1144. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1145. //
  1146. //
  1147. // // Example sending a request using the GetBlobRequest method.
  1148. // req, resp := client.GetBlobRequest(params)
  1149. //
  1150. // err := req.Send()
  1151. // if err == nil { // resp is now filled
  1152. // fmt.Println(resp)
  1153. // }
  1154. //
  1155. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetBlob
  1156. func (c *CodeCommit) GetBlobRequest(input *GetBlobInput) (req *request.Request, output *GetBlobOutput) {
  1157. op := &request.Operation{
  1158. Name: opGetBlob,
  1159. HTTPMethod: "POST",
  1160. HTTPPath: "/",
  1161. }
  1162. if input == nil {
  1163. input = &GetBlobInput{}
  1164. }
  1165. output = &GetBlobOutput{}
  1166. req = c.newRequest(op, input, output)
  1167. return
  1168. }
  1169. // GetBlob API operation for AWS CodeCommit.
  1170. //
  1171. // Returns the base-64 encoded content of an individual blob within a repository.
  1172. //
  1173. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1174. // with awserr.Error's Code and Message methods to get detailed information about
  1175. // the error.
  1176. //
  1177. // See the AWS API reference guide for AWS CodeCommit's
  1178. // API operation GetBlob for usage and error information.
  1179. //
  1180. // Returned Error Codes:
  1181. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  1182. // A repository name is required but was not specified.
  1183. //
  1184. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  1185. // At least one specified repository name is not valid.
  1186. //
  1187. // This exception only occurs when a specified repository name is not valid.
  1188. // Other exceptions occur when a required repository parameter is missing, or
  1189. // when a specified repository does not exist.
  1190. //
  1191. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  1192. // The specified repository does not exist.
  1193. //
  1194. // * ErrCodeBlobIdRequiredException "BlobIdRequiredException"
  1195. // A blob ID is required but was not specified.
  1196. //
  1197. // * ErrCodeInvalidBlobIdException "InvalidBlobIdException"
  1198. // The specified blob is not valid.
  1199. //
  1200. // * ErrCodeBlobIdDoesNotExistException "BlobIdDoesNotExistException"
  1201. // The specified blob does not exist.
  1202. //
  1203. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  1204. // An encryption integrity check failed.
  1205. //
  1206. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  1207. // An encryption key could not be accessed.
  1208. //
  1209. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  1210. // The encryption key is disabled.
  1211. //
  1212. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  1213. // No encryption key was found.
  1214. //
  1215. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  1216. // The encryption key is not available.
  1217. //
  1218. // * ErrCodeFileTooLargeException "FileTooLargeException"
  1219. // The specified file exceeds the file size limit for AWS CodeCommit. For more
  1220. // information about limits in AWS CodeCommit, see AWS CodeCommit User Guide
  1221. // (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html).
  1222. //
  1223. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetBlob
  1224. func (c *CodeCommit) GetBlob(input *GetBlobInput) (*GetBlobOutput, error) {
  1225. req, out := c.GetBlobRequest(input)
  1226. return out, req.Send()
  1227. }
  1228. // GetBlobWithContext is the same as GetBlob with the addition of
  1229. // the ability to pass a context and additional request options.
  1230. //
  1231. // See GetBlob for details on how to use this API operation.
  1232. //
  1233. // The context must be non-nil and will be used for request cancellation. If
  1234. // the context is nil a panic will occur. In the future the SDK may create
  1235. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1236. // for more information on using Contexts.
  1237. func (c *CodeCommit) GetBlobWithContext(ctx aws.Context, input *GetBlobInput, opts ...request.Option) (*GetBlobOutput, error) {
  1238. req, out := c.GetBlobRequest(input)
  1239. req.SetContext(ctx)
  1240. req.ApplyOptions(opts...)
  1241. return out, req.Send()
  1242. }
  1243. const opGetBranch = "GetBranch"
  1244. // GetBranchRequest generates a "aws/request.Request" representing the
  1245. // client's request for the GetBranch operation. The "output" return
  1246. // value will be populated with the request's response once the request completes
  1247. // successfully.
  1248. //
  1249. // Use "Send" method on the returned Request to send the API call to the service.
  1250. // the "output" return value is not valid until after Send returns without error.
  1251. //
  1252. // See GetBranch for more information on using the GetBranch
  1253. // API call, and error handling.
  1254. //
  1255. // This method is useful when you want to inject custom logic or configuration
  1256. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1257. //
  1258. //
  1259. // // Example sending a request using the GetBranchRequest method.
  1260. // req, resp := client.GetBranchRequest(params)
  1261. //
  1262. // err := req.Send()
  1263. // if err == nil { // resp is now filled
  1264. // fmt.Println(resp)
  1265. // }
  1266. //
  1267. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetBranch
  1268. func (c *CodeCommit) GetBranchRequest(input *GetBranchInput) (req *request.Request, output *GetBranchOutput) {
  1269. op := &request.Operation{
  1270. Name: opGetBranch,
  1271. HTTPMethod: "POST",
  1272. HTTPPath: "/",
  1273. }
  1274. if input == nil {
  1275. input = &GetBranchInput{}
  1276. }
  1277. output = &GetBranchOutput{}
  1278. req = c.newRequest(op, input, output)
  1279. return
  1280. }
  1281. // GetBranch API operation for AWS CodeCommit.
  1282. //
  1283. // Returns information about a repository branch, including its name and the
  1284. // last commit ID.
  1285. //
  1286. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1287. // with awserr.Error's Code and Message methods to get detailed information about
  1288. // the error.
  1289. //
  1290. // See the AWS API reference guide for AWS CodeCommit's
  1291. // API operation GetBranch for usage and error information.
  1292. //
  1293. // Returned Error Codes:
  1294. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  1295. // A repository name is required but was not specified.
  1296. //
  1297. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  1298. // The specified repository does not exist.
  1299. //
  1300. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  1301. // At least one specified repository name is not valid.
  1302. //
  1303. // This exception only occurs when a specified repository name is not valid.
  1304. // Other exceptions occur when a required repository parameter is missing, or
  1305. // when a specified repository does not exist.
  1306. //
  1307. // * ErrCodeBranchNameRequiredException "BranchNameRequiredException"
  1308. // A branch name is required but was not specified.
  1309. //
  1310. // * ErrCodeInvalidBranchNameException "InvalidBranchNameException"
  1311. // The specified reference name is not valid.
  1312. //
  1313. // * ErrCodeBranchDoesNotExistException "BranchDoesNotExistException"
  1314. // The specified branch does not exist.
  1315. //
  1316. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  1317. // An encryption integrity check failed.
  1318. //
  1319. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  1320. // An encryption key could not be accessed.
  1321. //
  1322. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  1323. // The encryption key is disabled.
  1324. //
  1325. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  1326. // No encryption key was found.
  1327. //
  1328. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  1329. // The encryption key is not available.
  1330. //
  1331. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetBranch
  1332. func (c *CodeCommit) GetBranch(input *GetBranchInput) (*GetBranchOutput, error) {
  1333. req, out := c.GetBranchRequest(input)
  1334. return out, req.Send()
  1335. }
  1336. // GetBranchWithContext is the same as GetBranch with the addition of
  1337. // the ability to pass a context and additional request options.
  1338. //
  1339. // See GetBranch for details on how to use this API operation.
  1340. //
  1341. // The context must be non-nil and will be used for request cancellation. If
  1342. // the context is nil a panic will occur. In the future the SDK may create
  1343. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1344. // for more information on using Contexts.
  1345. func (c *CodeCommit) GetBranchWithContext(ctx aws.Context, input *GetBranchInput, opts ...request.Option) (*GetBranchOutput, error) {
  1346. req, out := c.GetBranchRequest(input)
  1347. req.SetContext(ctx)
  1348. req.ApplyOptions(opts...)
  1349. return out, req.Send()
  1350. }
  1351. const opGetComment = "GetComment"
  1352. // GetCommentRequest generates a "aws/request.Request" representing the
  1353. // client's request for the GetComment operation. The "output" return
  1354. // value will be populated with the request's response once the request completes
  1355. // successfully.
  1356. //
  1357. // Use "Send" method on the returned Request to send the API call to the service.
  1358. // the "output" return value is not valid until after Send returns without error.
  1359. //
  1360. // See GetComment for more information on using the GetComment
  1361. // API call, and error handling.
  1362. //
  1363. // This method is useful when you want to inject custom logic or configuration
  1364. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1365. //
  1366. //
  1367. // // Example sending a request using the GetCommentRequest method.
  1368. // req, resp := client.GetCommentRequest(params)
  1369. //
  1370. // err := req.Send()
  1371. // if err == nil { // resp is now filled
  1372. // fmt.Println(resp)
  1373. // }
  1374. //
  1375. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetComment
  1376. func (c *CodeCommit) GetCommentRequest(input *GetCommentInput) (req *request.Request, output *GetCommentOutput) {
  1377. op := &request.Operation{
  1378. Name: opGetComment,
  1379. HTTPMethod: "POST",
  1380. HTTPPath: "/",
  1381. }
  1382. if input == nil {
  1383. input = &GetCommentInput{}
  1384. }
  1385. output = &GetCommentOutput{}
  1386. req = c.newRequest(op, input, output)
  1387. return
  1388. }
  1389. // GetComment API operation for AWS CodeCommit.
  1390. //
  1391. // Returns the content of a comment made on a change, file, or commit in a repository.
  1392. //
  1393. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1394. // with awserr.Error's Code and Message methods to get detailed information about
  1395. // the error.
  1396. //
  1397. // See the AWS API reference guide for AWS CodeCommit's
  1398. // API operation GetComment for usage and error information.
  1399. //
  1400. // Returned Error Codes:
  1401. // * ErrCodeCommentDoesNotExistException "CommentDoesNotExistException"
  1402. // No comment exists with the provided ID. Verify that you have provided the
  1403. // correct ID, and then try again.
  1404. //
  1405. // * ErrCodeCommentIdRequiredException "CommentIdRequiredException"
  1406. // The comment ID is missing or null. A comment ID is required.
  1407. //
  1408. // * ErrCodeInvalidCommentIdException "InvalidCommentIdException"
  1409. // The comment ID is not in a valid format. Make sure that you have provided
  1410. // the full comment ID.
  1411. //
  1412. // * ErrCodeCommentDeletedException "CommentDeletedException"
  1413. // This comment has already been deleted. You cannot edit or delete a deleted
  1414. // comment.
  1415. //
  1416. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetComment
  1417. func (c *CodeCommit) GetComment(input *GetCommentInput) (*GetCommentOutput, error) {
  1418. req, out := c.GetCommentRequest(input)
  1419. return out, req.Send()
  1420. }
  1421. // GetCommentWithContext is the same as GetComment with the addition of
  1422. // the ability to pass a context and additional request options.
  1423. //
  1424. // See GetComment for details on how to use this API operation.
  1425. //
  1426. // The context must be non-nil and will be used for request cancellation. If
  1427. // the context is nil a panic will occur. In the future the SDK may create
  1428. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1429. // for more information on using Contexts.
  1430. func (c *CodeCommit) GetCommentWithContext(ctx aws.Context, input *GetCommentInput, opts ...request.Option) (*GetCommentOutput, error) {
  1431. req, out := c.GetCommentRequest(input)
  1432. req.SetContext(ctx)
  1433. req.ApplyOptions(opts...)
  1434. return out, req.Send()
  1435. }
  1436. const opGetCommentsForComparedCommit = "GetCommentsForComparedCommit"
  1437. // GetCommentsForComparedCommitRequest generates a "aws/request.Request" representing the
  1438. // client's request for the GetCommentsForComparedCommit operation. The "output" return
  1439. // value will be populated with the request's response once the request completes
  1440. // successfully.
  1441. //
  1442. // Use "Send" method on the returned Request to send the API call to the service.
  1443. // the "output" return value is not valid until after Send returns without error.
  1444. //
  1445. // See GetCommentsForComparedCommit for more information on using the GetCommentsForComparedCommit
  1446. // API call, and error handling.
  1447. //
  1448. // This method is useful when you want to inject custom logic or configuration
  1449. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1450. //
  1451. //
  1452. // // Example sending a request using the GetCommentsForComparedCommitRequest method.
  1453. // req, resp := client.GetCommentsForComparedCommitRequest(params)
  1454. //
  1455. // err := req.Send()
  1456. // if err == nil { // resp is now filled
  1457. // fmt.Println(resp)
  1458. // }
  1459. //
  1460. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommentsForComparedCommit
  1461. func (c *CodeCommit) GetCommentsForComparedCommitRequest(input *GetCommentsForComparedCommitInput) (req *request.Request, output *GetCommentsForComparedCommitOutput) {
  1462. op := &request.Operation{
  1463. Name: opGetCommentsForComparedCommit,
  1464. HTTPMethod: "POST",
  1465. HTTPPath: "/",
  1466. Paginator: &request.Paginator{
  1467. InputTokens: []string{"nextToken"},
  1468. OutputTokens: []string{"nextToken"},
  1469. LimitToken: "maxResults",
  1470. TruncationToken: "",
  1471. },
  1472. }
  1473. if input == nil {
  1474. input = &GetCommentsForComparedCommitInput{}
  1475. }
  1476. output = &GetCommentsForComparedCommitOutput{}
  1477. req = c.newRequest(op, input, output)
  1478. return
  1479. }
  1480. // GetCommentsForComparedCommit API operation for AWS CodeCommit.
  1481. //
  1482. // Returns information about comments made on the comparison between two commits.
  1483. //
  1484. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1485. // with awserr.Error's Code and Message methods to get detailed information about
  1486. // the error.
  1487. //
  1488. // See the AWS API reference guide for AWS CodeCommit's
  1489. // API operation GetCommentsForComparedCommit for usage and error information.
  1490. //
  1491. // Returned Error Codes:
  1492. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  1493. // A repository name is required but was not specified.
  1494. //
  1495. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  1496. // The specified repository does not exist.
  1497. //
  1498. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  1499. // At least one specified repository name is not valid.
  1500. //
  1501. // This exception only occurs when a specified repository name is not valid.
  1502. // Other exceptions occur when a required repository parameter is missing, or
  1503. // when a specified repository does not exist.
  1504. //
  1505. // * ErrCodeCommitIdRequiredException "CommitIdRequiredException"
  1506. // A commit ID was not specified.
  1507. //
  1508. // * ErrCodeInvalidCommitIdException "InvalidCommitIdException"
  1509. // The specified commit ID is not valid.
  1510. //
  1511. // * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException"
  1512. // The specified commit does not exist or no commit was specified, and the specified
  1513. // repository has no default branch.
  1514. //
  1515. // * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException"
  1516. // The specified number of maximum results is not valid.
  1517. //
  1518. // * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException"
  1519. // The specified continuation token is not valid.
  1520. //
  1521. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  1522. // An encryption integrity check failed.
  1523. //
  1524. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  1525. // An encryption key could not be accessed.
  1526. //
  1527. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  1528. // The encryption key is disabled.
  1529. //
  1530. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  1531. // No encryption key was found.
  1532. //
  1533. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  1534. // The encryption key is not available.
  1535. //
  1536. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommentsForComparedCommit
  1537. func (c *CodeCommit) GetCommentsForComparedCommit(input *GetCommentsForComparedCommitInput) (*GetCommentsForComparedCommitOutput, error) {
  1538. req, out := c.GetCommentsForComparedCommitRequest(input)
  1539. return out, req.Send()
  1540. }
  1541. // GetCommentsForComparedCommitWithContext is the same as GetCommentsForComparedCommit with the addition of
  1542. // the ability to pass a context and additional request options.
  1543. //
  1544. // See GetCommentsForComparedCommit for details on how to use this API operation.
  1545. //
  1546. // The context must be non-nil and will be used for request cancellation. If
  1547. // the context is nil a panic will occur. In the future the SDK may create
  1548. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1549. // for more information on using Contexts.
  1550. func (c *CodeCommit) GetCommentsForComparedCommitWithContext(ctx aws.Context, input *GetCommentsForComparedCommitInput, opts ...request.Option) (*GetCommentsForComparedCommitOutput, error) {
  1551. req, out := c.GetCommentsForComparedCommitRequest(input)
  1552. req.SetContext(ctx)
  1553. req.ApplyOptions(opts...)
  1554. return out, req.Send()
  1555. }
  1556. // GetCommentsForComparedCommitPages iterates over the pages of a GetCommentsForComparedCommit operation,
  1557. // calling the "fn" function with the response data for each page. To stop
  1558. // iterating, return false from the fn function.
  1559. //
  1560. // See GetCommentsForComparedCommit method for more information on how to use this operation.
  1561. //
  1562. // Note: This operation can generate multiple requests to a service.
  1563. //
  1564. // // Example iterating over at most 3 pages of a GetCommentsForComparedCommit operation.
  1565. // pageNum := 0
  1566. // err := client.GetCommentsForComparedCommitPages(params,
  1567. // func(page *GetCommentsForComparedCommitOutput, lastPage bool) bool {
  1568. // pageNum++
  1569. // fmt.Println(page)
  1570. // return pageNum <= 3
  1571. // })
  1572. //
  1573. func (c *CodeCommit) GetCommentsForComparedCommitPages(input *GetCommentsForComparedCommitInput, fn func(*GetCommentsForComparedCommitOutput, bool) bool) error {
  1574. return c.GetCommentsForComparedCommitPagesWithContext(aws.BackgroundContext(), input, fn)
  1575. }
  1576. // GetCommentsForComparedCommitPagesWithContext same as GetCommentsForComparedCommitPages except
  1577. // it takes a Context and allows setting request options on the pages.
  1578. //
  1579. // The context must be non-nil and will be used for request cancellation. If
  1580. // the context is nil a panic will occur. In the future the SDK may create
  1581. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1582. // for more information on using Contexts.
  1583. func (c *CodeCommit) GetCommentsForComparedCommitPagesWithContext(ctx aws.Context, input *GetCommentsForComparedCommitInput, fn func(*GetCommentsForComparedCommitOutput, bool) bool, opts ...request.Option) error {
  1584. p := request.Pagination{
  1585. NewRequest: func() (*request.Request, error) {
  1586. var inCpy *GetCommentsForComparedCommitInput
  1587. if input != nil {
  1588. tmp := *input
  1589. inCpy = &tmp
  1590. }
  1591. req, _ := c.GetCommentsForComparedCommitRequest(inCpy)
  1592. req.SetContext(ctx)
  1593. req.ApplyOptions(opts...)
  1594. return req, nil
  1595. },
  1596. }
  1597. cont := true
  1598. for p.Next() && cont {
  1599. cont = fn(p.Page().(*GetCommentsForComparedCommitOutput), !p.HasNextPage())
  1600. }
  1601. return p.Err()
  1602. }
  1603. const opGetCommentsForPullRequest = "GetCommentsForPullRequest"
  1604. // GetCommentsForPullRequestRequest generates a "aws/request.Request" representing the
  1605. // client's request for the GetCommentsForPullRequest operation. The "output" return
  1606. // value will be populated with the request's response once the request completes
  1607. // successfully.
  1608. //
  1609. // Use "Send" method on the returned Request to send the API call to the service.
  1610. // the "output" return value is not valid until after Send returns without error.
  1611. //
  1612. // See GetCommentsForPullRequest for more information on using the GetCommentsForPullRequest
  1613. // API call, and error handling.
  1614. //
  1615. // This method is useful when you want to inject custom logic or configuration
  1616. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1617. //
  1618. //
  1619. // // Example sending a request using the GetCommentsForPullRequestRequest method.
  1620. // req, resp := client.GetCommentsForPullRequestRequest(params)
  1621. //
  1622. // err := req.Send()
  1623. // if err == nil { // resp is now filled
  1624. // fmt.Println(resp)
  1625. // }
  1626. //
  1627. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommentsForPullRequest
  1628. func (c *CodeCommit) GetCommentsForPullRequestRequest(input *GetCommentsForPullRequestInput) (req *request.Request, output *GetCommentsForPullRequestOutput) {
  1629. op := &request.Operation{
  1630. Name: opGetCommentsForPullRequest,
  1631. HTTPMethod: "POST",
  1632. HTTPPath: "/",
  1633. Paginator: &request.Paginator{
  1634. InputTokens: []string{"nextToken"},
  1635. OutputTokens: []string{"nextToken"},
  1636. LimitToken: "maxResults",
  1637. TruncationToken: "",
  1638. },
  1639. }
  1640. if input == nil {
  1641. input = &GetCommentsForPullRequestInput{}
  1642. }
  1643. output = &GetCommentsForPullRequestOutput{}
  1644. req = c.newRequest(op, input, output)
  1645. return
  1646. }
  1647. // GetCommentsForPullRequest API operation for AWS CodeCommit.
  1648. //
  1649. // Returns comments made on a pull request.
  1650. //
  1651. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1652. // with awserr.Error's Code and Message methods to get detailed information about
  1653. // the error.
  1654. //
  1655. // See the AWS API reference guide for AWS CodeCommit's
  1656. // API operation GetCommentsForPullRequest for usage and error information.
  1657. //
  1658. // Returned Error Codes:
  1659. // * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException"
  1660. // A pull request ID is required, but none was provided.
  1661. //
  1662. // * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException"
  1663. // The pull request ID could not be found. Make sure that you have specified
  1664. // the correct repository name and pull request ID, and then try again.
  1665. //
  1666. // * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException"
  1667. // The pull request ID is not valid. Make sure that you have provided the full
  1668. // ID and that the pull request is in the specified repository, and then try
  1669. // again.
  1670. //
  1671. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  1672. // A repository name is required but was not specified.
  1673. //
  1674. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  1675. // The specified repository does not exist.
  1676. //
  1677. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  1678. // At least one specified repository name is not valid.
  1679. //
  1680. // This exception only occurs when a specified repository name is not valid.
  1681. // Other exceptions occur when a required repository parameter is missing, or
  1682. // when a specified repository does not exist.
  1683. //
  1684. // * ErrCodeCommitIdRequiredException "CommitIdRequiredException"
  1685. // A commit ID was not specified.
  1686. //
  1687. // * ErrCodeInvalidCommitIdException "InvalidCommitIdException"
  1688. // The specified commit ID is not valid.
  1689. //
  1690. // * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException"
  1691. // The specified commit does not exist or no commit was specified, and the specified
  1692. // repository has no default branch.
  1693. //
  1694. // * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException"
  1695. // The specified number of maximum results is not valid.
  1696. //
  1697. // * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException"
  1698. // The specified continuation token is not valid.
  1699. //
  1700. // * ErrCodeRepositoryNotAssociatedWithPullRequestException "RepositoryNotAssociatedWithPullRequestException"
  1701. // The repository does not contain any pull requests with that pull request
  1702. // ID. Check to make sure you have provided the correct repository name for
  1703. // the pull request.
  1704. //
  1705. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  1706. // An encryption integrity check failed.
  1707. //
  1708. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  1709. // An encryption key could not be accessed.
  1710. //
  1711. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  1712. // The encryption key is disabled.
  1713. //
  1714. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  1715. // No encryption key was found.
  1716. //
  1717. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  1718. // The encryption key is not available.
  1719. //
  1720. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommentsForPullRequest
  1721. func (c *CodeCommit) GetCommentsForPullRequest(input *GetCommentsForPullRequestInput) (*GetCommentsForPullRequestOutput, error) {
  1722. req, out := c.GetCommentsForPullRequestRequest(input)
  1723. return out, req.Send()
  1724. }
  1725. // GetCommentsForPullRequestWithContext is the same as GetCommentsForPullRequest with the addition of
  1726. // the ability to pass a context and additional request options.
  1727. //
  1728. // See GetCommentsForPullRequest for details on how to use this API operation.
  1729. //
  1730. // The context must be non-nil and will be used for request cancellation. If
  1731. // the context is nil a panic will occur. In the future the SDK may create
  1732. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1733. // for more information on using Contexts.
  1734. func (c *CodeCommit) GetCommentsForPullRequestWithContext(ctx aws.Context, input *GetCommentsForPullRequestInput, opts ...request.Option) (*GetCommentsForPullRequestOutput, error) {
  1735. req, out := c.GetCommentsForPullRequestRequest(input)
  1736. req.SetContext(ctx)
  1737. req.ApplyOptions(opts...)
  1738. return out, req.Send()
  1739. }
  1740. // GetCommentsForPullRequestPages iterates over the pages of a GetCommentsForPullRequest operation,
  1741. // calling the "fn" function with the response data for each page. To stop
  1742. // iterating, return false from the fn function.
  1743. //
  1744. // See GetCommentsForPullRequest method for more information on how to use this operation.
  1745. //
  1746. // Note: This operation can generate multiple requests to a service.
  1747. //
  1748. // // Example iterating over at most 3 pages of a GetCommentsForPullRequest operation.
  1749. // pageNum := 0
  1750. // err := client.GetCommentsForPullRequestPages(params,
  1751. // func(page *GetCommentsForPullRequestOutput, lastPage bool) bool {
  1752. // pageNum++
  1753. // fmt.Println(page)
  1754. // return pageNum <= 3
  1755. // })
  1756. //
  1757. func (c *CodeCommit) GetCommentsForPullRequestPages(input *GetCommentsForPullRequestInput, fn func(*GetCommentsForPullRequestOutput, bool) bool) error {
  1758. return c.GetCommentsForPullRequestPagesWithContext(aws.BackgroundContext(), input, fn)
  1759. }
  1760. // GetCommentsForPullRequestPagesWithContext same as GetCommentsForPullRequestPages except
  1761. // it takes a Context and allows setting request options on the pages.
  1762. //
  1763. // The context must be non-nil and will be used for request cancellation. If
  1764. // the context is nil a panic will occur. In the future the SDK may create
  1765. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1766. // for more information on using Contexts.
  1767. func (c *CodeCommit) GetCommentsForPullRequestPagesWithContext(ctx aws.Context, input *GetCommentsForPullRequestInput, fn func(*GetCommentsForPullRequestOutput, bool) bool, opts ...request.Option) error {
  1768. p := request.Pagination{
  1769. NewRequest: func() (*request.Request, error) {
  1770. var inCpy *GetCommentsForPullRequestInput
  1771. if input != nil {
  1772. tmp := *input
  1773. inCpy = &tmp
  1774. }
  1775. req, _ := c.GetCommentsForPullRequestRequest(inCpy)
  1776. req.SetContext(ctx)
  1777. req.ApplyOptions(opts...)
  1778. return req, nil
  1779. },
  1780. }
  1781. cont := true
  1782. for p.Next() && cont {
  1783. cont = fn(p.Page().(*GetCommentsForPullRequestOutput), !p.HasNextPage())
  1784. }
  1785. return p.Err()
  1786. }
  1787. const opGetCommit = "GetCommit"
  1788. // GetCommitRequest generates a "aws/request.Request" representing the
  1789. // client's request for the GetCommit operation. The "output" return
  1790. // value will be populated with the request's response once the request completes
  1791. // successfully.
  1792. //
  1793. // Use "Send" method on the returned Request to send the API call to the service.
  1794. // the "output" return value is not valid until after Send returns without error.
  1795. //
  1796. // See GetCommit for more information on using the GetCommit
  1797. // API call, and error handling.
  1798. //
  1799. // This method is useful when you want to inject custom logic or configuration
  1800. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1801. //
  1802. //
  1803. // // Example sending a request using the GetCommitRequest method.
  1804. // req, resp := client.GetCommitRequest(params)
  1805. //
  1806. // err := req.Send()
  1807. // if err == nil { // resp is now filled
  1808. // fmt.Println(resp)
  1809. // }
  1810. //
  1811. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommit
  1812. func (c *CodeCommit) GetCommitRequest(input *GetCommitInput) (req *request.Request, output *GetCommitOutput) {
  1813. op := &request.Operation{
  1814. Name: opGetCommit,
  1815. HTTPMethod: "POST",
  1816. HTTPPath: "/",
  1817. }
  1818. if input == nil {
  1819. input = &GetCommitInput{}
  1820. }
  1821. output = &GetCommitOutput{}
  1822. req = c.newRequest(op, input, output)
  1823. return
  1824. }
  1825. // GetCommit API operation for AWS CodeCommit.
  1826. //
  1827. // Returns information about a commit, including commit message and committer
  1828. // information.
  1829. //
  1830. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1831. // with awserr.Error's Code and Message methods to get detailed information about
  1832. // the error.
  1833. //
  1834. // See the AWS API reference guide for AWS CodeCommit's
  1835. // API operation GetCommit for usage and error information.
  1836. //
  1837. // Returned Error Codes:
  1838. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  1839. // A repository name is required but was not specified.
  1840. //
  1841. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  1842. // At least one specified repository name is not valid.
  1843. //
  1844. // This exception only occurs when a specified repository name is not valid.
  1845. // Other exceptions occur when a required repository parameter is missing, or
  1846. // when a specified repository does not exist.
  1847. //
  1848. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  1849. // The specified repository does not exist.
  1850. //
  1851. // * ErrCodeCommitIdRequiredException "CommitIdRequiredException"
  1852. // A commit ID was not specified.
  1853. //
  1854. // * ErrCodeInvalidCommitIdException "InvalidCommitIdException"
  1855. // The specified commit ID is not valid.
  1856. //
  1857. // * ErrCodeCommitIdDoesNotExistException "CommitIdDoesNotExistException"
  1858. // The specified commit ID does not exist.
  1859. //
  1860. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  1861. // An encryption integrity check failed.
  1862. //
  1863. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  1864. // An encryption key could not be accessed.
  1865. //
  1866. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  1867. // The encryption key is disabled.
  1868. //
  1869. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  1870. // No encryption key was found.
  1871. //
  1872. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  1873. // The encryption key is not available.
  1874. //
  1875. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommit
  1876. func (c *CodeCommit) GetCommit(input *GetCommitInput) (*GetCommitOutput, error) {
  1877. req, out := c.GetCommitRequest(input)
  1878. return out, req.Send()
  1879. }
  1880. // GetCommitWithContext is the same as GetCommit with the addition of
  1881. // the ability to pass a context and additional request options.
  1882. //
  1883. // See GetCommit for details on how to use this API operation.
  1884. //
  1885. // The context must be non-nil and will be used for request cancellation. If
  1886. // the context is nil a panic will occur. In the future the SDK may create
  1887. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1888. // for more information on using Contexts.
  1889. func (c *CodeCommit) GetCommitWithContext(ctx aws.Context, input *GetCommitInput, opts ...request.Option) (*GetCommitOutput, error) {
  1890. req, out := c.GetCommitRequest(input)
  1891. req.SetContext(ctx)
  1892. req.ApplyOptions(opts...)
  1893. return out, req.Send()
  1894. }
  1895. const opGetDifferences = "GetDifferences"
  1896. // GetDifferencesRequest generates a "aws/request.Request" representing the
  1897. // client's request for the GetDifferences operation. The "output" return
  1898. // value will be populated with the request's response once the request completes
  1899. // successfully.
  1900. //
  1901. // Use "Send" method on the returned Request to send the API call to the service.
  1902. // the "output" return value is not valid until after Send returns without error.
  1903. //
  1904. // See GetDifferences for more information on using the GetDifferences
  1905. // API call, and error handling.
  1906. //
  1907. // This method is useful when you want to inject custom logic or configuration
  1908. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1909. //
  1910. //
  1911. // // Example sending a request using the GetDifferencesRequest method.
  1912. // req, resp := client.GetDifferencesRequest(params)
  1913. //
  1914. // err := req.Send()
  1915. // if err == nil { // resp is now filled
  1916. // fmt.Println(resp)
  1917. // }
  1918. //
  1919. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetDifferences
  1920. func (c *CodeCommit) GetDifferencesRequest(input *GetDifferencesInput) (req *request.Request, output *GetDifferencesOutput) {
  1921. op := &request.Operation{
  1922. Name: opGetDifferences,
  1923. HTTPMethod: "POST",
  1924. HTTPPath: "/",
  1925. Paginator: &request.Paginator{
  1926. InputTokens: []string{"NextToken"},
  1927. OutputTokens: []string{"NextToken"},
  1928. LimitToken: "MaxResults",
  1929. TruncationToken: "",
  1930. },
  1931. }
  1932. if input == nil {
  1933. input = &GetDifferencesInput{}
  1934. }
  1935. output = &GetDifferencesOutput{}
  1936. req = c.newRequest(op, input, output)
  1937. return
  1938. }
  1939. // GetDifferences API operation for AWS CodeCommit.
  1940. //
  1941. // Returns information about the differences in a valid commit specifier (such
  1942. // as a branch, tag, HEAD, commit ID or other fully qualified reference). Results
  1943. // can be limited to a specified path.
  1944. //
  1945. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1946. // with awserr.Error's Code and Message methods to get detailed information about
  1947. // the error.
  1948. //
  1949. // See the AWS API reference guide for AWS CodeCommit's
  1950. // API operation GetDifferences for usage and error information.
  1951. //
  1952. // Returned Error Codes:
  1953. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  1954. // A repository name is required but was not specified.
  1955. //
  1956. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  1957. // The specified repository does not exist.
  1958. //
  1959. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  1960. // At least one specified repository name is not valid.
  1961. //
  1962. // This exception only occurs when a specified repository name is not valid.
  1963. // Other exceptions occur when a required repository parameter is missing, or
  1964. // when a specified repository does not exist.
  1965. //
  1966. // * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException"
  1967. // The specified continuation token is not valid.
  1968. //
  1969. // * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException"
  1970. // The specified number of maximum results is not valid.
  1971. //
  1972. // * ErrCodeInvalidCommitIdException "InvalidCommitIdException"
  1973. // The specified commit ID is not valid.
  1974. //
  1975. // * ErrCodeCommitRequiredException "CommitRequiredException"
  1976. // A commit was not specified.
  1977. //
  1978. // * ErrCodeInvalidCommitException "InvalidCommitException"
  1979. // The specified commit is not valid.
  1980. //
  1981. // * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException"
  1982. // The specified commit does not exist or no commit was specified, and the specified
  1983. // repository has no default branch.
  1984. //
  1985. // * ErrCodeInvalidPathException "InvalidPathException"
  1986. // The specified path is not valid.
  1987. //
  1988. // * ErrCodePathDoesNotExistException "PathDoesNotExistException"
  1989. // The specified path does not exist.
  1990. //
  1991. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  1992. // An encryption integrity check failed.
  1993. //
  1994. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  1995. // An encryption key could not be accessed.
  1996. //
  1997. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  1998. // The encryption key is disabled.
  1999. //
  2000. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  2001. // No encryption key was found.
  2002. //
  2003. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  2004. // The encryption key is not available.
  2005. //
  2006. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetDifferences
  2007. func (c *CodeCommit) GetDifferences(input *GetDifferencesInput) (*GetDifferencesOutput, error) {
  2008. req, out := c.GetDifferencesRequest(input)
  2009. return out, req.Send()
  2010. }
  2011. // GetDifferencesWithContext is the same as GetDifferences with the addition of
  2012. // the ability to pass a context and additional request options.
  2013. //
  2014. // See GetDifferences for details on how to use this API operation.
  2015. //
  2016. // The context must be non-nil and will be used for request cancellation. If
  2017. // the context is nil a panic will occur. In the future the SDK may create
  2018. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2019. // for more information on using Contexts.
  2020. func (c *CodeCommit) GetDifferencesWithContext(ctx aws.Context, input *GetDifferencesInput, opts ...request.Option) (*GetDifferencesOutput, error) {
  2021. req, out := c.GetDifferencesRequest(input)
  2022. req.SetContext(ctx)
  2023. req.ApplyOptions(opts...)
  2024. return out, req.Send()
  2025. }
  2026. // GetDifferencesPages iterates over the pages of a GetDifferences operation,
  2027. // calling the "fn" function with the response data for each page. To stop
  2028. // iterating, return false from the fn function.
  2029. //
  2030. // See GetDifferences method for more information on how to use this operation.
  2031. //
  2032. // Note: This operation can generate multiple requests to a service.
  2033. //
  2034. // // Example iterating over at most 3 pages of a GetDifferences operation.
  2035. // pageNum := 0
  2036. // err := client.GetDifferencesPages(params,
  2037. // func(page *GetDifferencesOutput, lastPage bool) bool {
  2038. // pageNum++
  2039. // fmt.Println(page)
  2040. // return pageNum <= 3
  2041. // })
  2042. //
  2043. func (c *CodeCommit) GetDifferencesPages(input *GetDifferencesInput, fn func(*GetDifferencesOutput, bool) bool) error {
  2044. return c.GetDifferencesPagesWithContext(aws.BackgroundContext(), input, fn)
  2045. }
  2046. // GetDifferencesPagesWithContext same as GetDifferencesPages except
  2047. // it takes a Context and allows setting request options on the pages.
  2048. //
  2049. // The context must be non-nil and will be used for request cancellation. If
  2050. // the context is nil a panic will occur. In the future the SDK may create
  2051. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2052. // for more information on using Contexts.
  2053. func (c *CodeCommit) GetDifferencesPagesWithContext(ctx aws.Context, input *GetDifferencesInput, fn func(*GetDifferencesOutput, bool) bool, opts ...request.Option) error {
  2054. p := request.Pagination{
  2055. NewRequest: func() (*request.Request, error) {
  2056. var inCpy *GetDifferencesInput
  2057. if input != nil {
  2058. tmp := *input
  2059. inCpy = &tmp
  2060. }
  2061. req, _ := c.GetDifferencesRequest(inCpy)
  2062. req.SetContext(ctx)
  2063. req.ApplyOptions(opts...)
  2064. return req, nil
  2065. },
  2066. }
  2067. cont := true
  2068. for p.Next() && cont {
  2069. cont = fn(p.Page().(*GetDifferencesOutput), !p.HasNextPage())
  2070. }
  2071. return p.Err()
  2072. }
  2073. const opGetFile = "GetFile"
  2074. // GetFileRequest generates a "aws/request.Request" representing the
  2075. // client's request for the GetFile operation. The "output" return
  2076. // value will be populated with the request's response once the request completes
  2077. // successfully.
  2078. //
  2079. // Use "Send" method on the returned Request to send the API call to the service.
  2080. // the "output" return value is not valid until after Send returns without error.
  2081. //
  2082. // See GetFile for more information on using the GetFile
  2083. // API call, and error handling.
  2084. //
  2085. // This method is useful when you want to inject custom logic or configuration
  2086. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2087. //
  2088. //
  2089. // // Example sending a request using the GetFileRequest method.
  2090. // req, resp := client.GetFileRequest(params)
  2091. //
  2092. // err := req.Send()
  2093. // if err == nil { // resp is now filled
  2094. // fmt.Println(resp)
  2095. // }
  2096. //
  2097. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFile
  2098. func (c *CodeCommit) GetFileRequest(input *GetFileInput) (req *request.Request, output *GetFileOutput) {
  2099. op := &request.Operation{
  2100. Name: opGetFile,
  2101. HTTPMethod: "POST",
  2102. HTTPPath: "/",
  2103. }
  2104. if input == nil {
  2105. input = &GetFileInput{}
  2106. }
  2107. output = &GetFileOutput{}
  2108. req = c.newRequest(op, input, output)
  2109. return
  2110. }
  2111. // GetFile API operation for AWS CodeCommit.
  2112. //
  2113. // Returns the base-64 encoded contents of a specified file and its metadata.
  2114. //
  2115. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2116. // with awserr.Error's Code and Message methods to get detailed information about
  2117. // the error.
  2118. //
  2119. // See the AWS API reference guide for AWS CodeCommit's
  2120. // API operation GetFile for usage and error information.
  2121. //
  2122. // Returned Error Codes:
  2123. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  2124. // A repository name is required but was not specified.
  2125. //
  2126. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  2127. // At least one specified repository name is not valid.
  2128. //
  2129. // This exception only occurs when a specified repository name is not valid.
  2130. // Other exceptions occur when a required repository parameter is missing, or
  2131. // when a specified repository does not exist.
  2132. //
  2133. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  2134. // The specified repository does not exist.
  2135. //
  2136. // * ErrCodeInvalidCommitException "InvalidCommitException"
  2137. // The specified commit is not valid.
  2138. //
  2139. // * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException"
  2140. // The specified commit does not exist or no commit was specified, and the specified
  2141. // repository has no default branch.
  2142. //
  2143. // * ErrCodePathRequiredException "PathRequiredException"
  2144. // The folderPath for a location cannot be null.
  2145. //
  2146. // * ErrCodeInvalidPathException "InvalidPathException"
  2147. // The specified path is not valid.
  2148. //
  2149. // * ErrCodeFileDoesNotExistException "FileDoesNotExistException"
  2150. // The specified file does not exist. Verify that you have provided the correct
  2151. // name of the file, including its full path and extension.
  2152. //
  2153. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  2154. // An encryption integrity check failed.
  2155. //
  2156. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  2157. // An encryption key could not be accessed.
  2158. //
  2159. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  2160. // The encryption key is disabled.
  2161. //
  2162. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  2163. // No encryption key was found.
  2164. //
  2165. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  2166. // The encryption key is not available.
  2167. //
  2168. // * ErrCodeFileTooLargeException "FileTooLargeException"
  2169. // The specified file exceeds the file size limit for AWS CodeCommit. For more
  2170. // information about limits in AWS CodeCommit, see AWS CodeCommit User Guide
  2171. // (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html).
  2172. //
  2173. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFile
  2174. func (c *CodeCommit) GetFile(input *GetFileInput) (*GetFileOutput, error) {
  2175. req, out := c.GetFileRequest(input)
  2176. return out, req.Send()
  2177. }
  2178. // GetFileWithContext is the same as GetFile with the addition of
  2179. // the ability to pass a context and additional request options.
  2180. //
  2181. // See GetFile for details on how to use this API operation.
  2182. //
  2183. // The context must be non-nil and will be used for request cancellation. If
  2184. // the context is nil a panic will occur. In the future the SDK may create
  2185. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2186. // for more information on using Contexts.
  2187. func (c *CodeCommit) GetFileWithContext(ctx aws.Context, input *GetFileInput, opts ...request.Option) (*GetFileOutput, error) {
  2188. req, out := c.GetFileRequest(input)
  2189. req.SetContext(ctx)
  2190. req.ApplyOptions(opts...)
  2191. return out, req.Send()
  2192. }
  2193. const opGetFolder = "GetFolder"
  2194. // GetFolderRequest generates a "aws/request.Request" representing the
  2195. // client's request for the GetFolder operation. The "output" return
  2196. // value will be populated with the request's response once the request completes
  2197. // successfully.
  2198. //
  2199. // Use "Send" method on the returned Request to send the API call to the service.
  2200. // the "output" return value is not valid until after Send returns without error.
  2201. //
  2202. // See GetFolder for more information on using the GetFolder
  2203. // API call, and error handling.
  2204. //
  2205. // This method is useful when you want to inject custom logic or configuration
  2206. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2207. //
  2208. //
  2209. // // Example sending a request using the GetFolderRequest method.
  2210. // req, resp := client.GetFolderRequest(params)
  2211. //
  2212. // err := req.Send()
  2213. // if err == nil { // resp is now filled
  2214. // fmt.Println(resp)
  2215. // }
  2216. //
  2217. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFolder
  2218. func (c *CodeCommit) GetFolderRequest(input *GetFolderInput) (req *request.Request, output *GetFolderOutput) {
  2219. op := &request.Operation{
  2220. Name: opGetFolder,
  2221. HTTPMethod: "POST",
  2222. HTTPPath: "/",
  2223. }
  2224. if input == nil {
  2225. input = &GetFolderInput{}
  2226. }
  2227. output = &GetFolderOutput{}
  2228. req = c.newRequest(op, input, output)
  2229. return
  2230. }
  2231. // GetFolder API operation for AWS CodeCommit.
  2232. //
  2233. // Returns the contents of a specified folder in a repository.
  2234. //
  2235. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2236. // with awserr.Error's Code and Message methods to get detailed information about
  2237. // the error.
  2238. //
  2239. // See the AWS API reference guide for AWS CodeCommit's
  2240. // API operation GetFolder for usage and error information.
  2241. //
  2242. // Returned Error Codes:
  2243. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  2244. // A repository name is required but was not specified.
  2245. //
  2246. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  2247. // At least one specified repository name is not valid.
  2248. //
  2249. // This exception only occurs when a specified repository name is not valid.
  2250. // Other exceptions occur when a required repository parameter is missing, or
  2251. // when a specified repository does not exist.
  2252. //
  2253. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  2254. // The specified repository does not exist.
  2255. //
  2256. // * ErrCodeInvalidCommitException "InvalidCommitException"
  2257. // The specified commit is not valid.
  2258. //
  2259. // * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException"
  2260. // The specified commit does not exist or no commit was specified, and the specified
  2261. // repository has no default branch.
  2262. //
  2263. // * ErrCodePathRequiredException "PathRequiredException"
  2264. // The folderPath for a location cannot be null.
  2265. //
  2266. // * ErrCodeInvalidPathException "InvalidPathException"
  2267. // The specified path is not valid.
  2268. //
  2269. // * ErrCodeFolderDoesNotExistException "FolderDoesNotExistException"
  2270. // The specified folder does not exist. Either the folder name is not correct,
  2271. // or you did not provide the full path to the folder.
  2272. //
  2273. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  2274. // An encryption integrity check failed.
  2275. //
  2276. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  2277. // An encryption key could not be accessed.
  2278. //
  2279. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  2280. // The encryption key is disabled.
  2281. //
  2282. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  2283. // No encryption key was found.
  2284. //
  2285. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  2286. // The encryption key is not available.
  2287. //
  2288. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFolder
  2289. func (c *CodeCommit) GetFolder(input *GetFolderInput) (*GetFolderOutput, error) {
  2290. req, out := c.GetFolderRequest(input)
  2291. return out, req.Send()
  2292. }
  2293. // GetFolderWithContext is the same as GetFolder with the addition of
  2294. // the ability to pass a context and additional request options.
  2295. //
  2296. // See GetFolder for details on how to use this API operation.
  2297. //
  2298. // The context must be non-nil and will be used for request cancellation. If
  2299. // the context is nil a panic will occur. In the future the SDK may create
  2300. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2301. // for more information on using Contexts.
  2302. func (c *CodeCommit) GetFolderWithContext(ctx aws.Context, input *GetFolderInput, opts ...request.Option) (*GetFolderOutput, error) {
  2303. req, out := c.GetFolderRequest(input)
  2304. req.SetContext(ctx)
  2305. req.ApplyOptions(opts...)
  2306. return out, req.Send()
  2307. }
  2308. const opGetMergeConflicts = "GetMergeConflicts"
  2309. // GetMergeConflictsRequest generates a "aws/request.Request" representing the
  2310. // client's request for the GetMergeConflicts operation. The "output" return
  2311. // value will be populated with the request's response once the request completes
  2312. // successfully.
  2313. //
  2314. // Use "Send" method on the returned Request to send the API call to the service.
  2315. // the "output" return value is not valid until after Send returns without error.
  2316. //
  2317. // See GetMergeConflicts for more information on using the GetMergeConflicts
  2318. // API call, and error handling.
  2319. //
  2320. // This method is useful when you want to inject custom logic or configuration
  2321. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2322. //
  2323. //
  2324. // // Example sending a request using the GetMergeConflictsRequest method.
  2325. // req, resp := client.GetMergeConflictsRequest(params)
  2326. //
  2327. // err := req.Send()
  2328. // if err == nil { // resp is now filled
  2329. // fmt.Println(resp)
  2330. // }
  2331. //
  2332. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetMergeConflicts
  2333. func (c *CodeCommit) GetMergeConflictsRequest(input *GetMergeConflictsInput) (req *request.Request, output *GetMergeConflictsOutput) {
  2334. op := &request.Operation{
  2335. Name: opGetMergeConflicts,
  2336. HTTPMethod: "POST",
  2337. HTTPPath: "/",
  2338. }
  2339. if input == nil {
  2340. input = &GetMergeConflictsInput{}
  2341. }
  2342. output = &GetMergeConflictsOutput{}
  2343. req = c.newRequest(op, input, output)
  2344. return
  2345. }
  2346. // GetMergeConflicts API operation for AWS CodeCommit.
  2347. //
  2348. // Returns information about merge conflicts between the before and after commit
  2349. // IDs for a pull request in a repository.
  2350. //
  2351. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2352. // with awserr.Error's Code and Message methods to get detailed information about
  2353. // the error.
  2354. //
  2355. // See the AWS API reference guide for AWS CodeCommit's
  2356. // API operation GetMergeConflicts for usage and error information.
  2357. //
  2358. // Returned Error Codes:
  2359. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  2360. // A repository name is required but was not specified.
  2361. //
  2362. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  2363. // At least one specified repository name is not valid.
  2364. //
  2365. // This exception only occurs when a specified repository name is not valid.
  2366. // Other exceptions occur when a required repository parameter is missing, or
  2367. // when a specified repository does not exist.
  2368. //
  2369. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  2370. // The specified repository does not exist.
  2371. //
  2372. // * ErrCodeMergeOptionRequiredException "MergeOptionRequiredException"
  2373. // A merge option or stategy is required, and none was provided.
  2374. //
  2375. // * ErrCodeInvalidMergeOptionException "InvalidMergeOptionException"
  2376. // The specified merge option is not valid. The only valid value is FAST_FORWARD_MERGE.
  2377. //
  2378. // * ErrCodeInvalidDestinationCommitSpecifierException "InvalidDestinationCommitSpecifierException"
  2379. // The destination commit specifier is not valid. You must provide a valid branch
  2380. // name, tag, or full commit ID.
  2381. //
  2382. // * ErrCodeInvalidSourceCommitSpecifierException "InvalidSourceCommitSpecifierException"
  2383. // The source commit specifier is not valid. You must provide a valid branch
  2384. // name, tag, or full commit ID.
  2385. //
  2386. // * ErrCodeCommitRequiredException "CommitRequiredException"
  2387. // A commit was not specified.
  2388. //
  2389. // * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException"
  2390. // The specified commit does not exist or no commit was specified, and the specified
  2391. // repository has no default branch.
  2392. //
  2393. // * ErrCodeInvalidCommitException "InvalidCommitException"
  2394. // The specified commit is not valid.
  2395. //
  2396. // * ErrCodeTipsDivergenceExceededException "TipsDivergenceExceededException"
  2397. // The divergence between the tips of the provided commit specifiers is too
  2398. // great to determine whether there might be any merge conflicts. Locally compare
  2399. // the specifiers using git diff or a diff tool.
  2400. //
  2401. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  2402. // An encryption integrity check failed.
  2403. //
  2404. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  2405. // An encryption key could not be accessed.
  2406. //
  2407. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  2408. // The encryption key is disabled.
  2409. //
  2410. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  2411. // No encryption key was found.
  2412. //
  2413. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  2414. // The encryption key is not available.
  2415. //
  2416. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetMergeConflicts
  2417. func (c *CodeCommit) GetMergeConflicts(input *GetMergeConflictsInput) (*GetMergeConflictsOutput, error) {
  2418. req, out := c.GetMergeConflictsRequest(input)
  2419. return out, req.Send()
  2420. }
  2421. // GetMergeConflictsWithContext is the same as GetMergeConflicts with the addition of
  2422. // the ability to pass a context and additional request options.
  2423. //
  2424. // See GetMergeConflicts for details on how to use this API operation.
  2425. //
  2426. // The context must be non-nil and will be used for request cancellation. If
  2427. // the context is nil a panic will occur. In the future the SDK may create
  2428. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2429. // for more information on using Contexts.
  2430. func (c *CodeCommit) GetMergeConflictsWithContext(ctx aws.Context, input *GetMergeConflictsInput, opts ...request.Option) (*GetMergeConflictsOutput, error) {
  2431. req, out := c.GetMergeConflictsRequest(input)
  2432. req.SetContext(ctx)
  2433. req.ApplyOptions(opts...)
  2434. return out, req.Send()
  2435. }
  2436. const opGetPullRequest = "GetPullRequest"
  2437. // GetPullRequestRequest generates a "aws/request.Request" representing the
  2438. // client's request for the GetPullRequest operation. The "output" return
  2439. // value will be populated with the request's response once the request completes
  2440. // successfully.
  2441. //
  2442. // Use "Send" method on the returned Request to send the API call to the service.
  2443. // the "output" return value is not valid until after Send returns without error.
  2444. //
  2445. // See GetPullRequest for more information on using the GetPullRequest
  2446. // API call, and error handling.
  2447. //
  2448. // This method is useful when you want to inject custom logic or configuration
  2449. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2450. //
  2451. //
  2452. // // Example sending a request using the GetPullRequestRequest method.
  2453. // req, resp := client.GetPullRequestRequest(params)
  2454. //
  2455. // err := req.Send()
  2456. // if err == nil { // resp is now filled
  2457. // fmt.Println(resp)
  2458. // }
  2459. //
  2460. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetPullRequest
  2461. func (c *CodeCommit) GetPullRequestRequest(input *GetPullRequestInput) (req *request.Request, output *GetPullRequestOutput) {
  2462. op := &request.Operation{
  2463. Name: opGetPullRequest,
  2464. HTTPMethod: "POST",
  2465. HTTPPath: "/",
  2466. }
  2467. if input == nil {
  2468. input = &GetPullRequestInput{}
  2469. }
  2470. output = &GetPullRequestOutput{}
  2471. req = c.newRequest(op, input, output)
  2472. return
  2473. }
  2474. // GetPullRequest API operation for AWS CodeCommit.
  2475. //
  2476. // Gets information about a pull request in a specified repository.
  2477. //
  2478. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2479. // with awserr.Error's Code and Message methods to get detailed information about
  2480. // the error.
  2481. //
  2482. // See the AWS API reference guide for AWS CodeCommit's
  2483. // API operation GetPullRequest for usage and error information.
  2484. //
  2485. // Returned Error Codes:
  2486. // * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException"
  2487. // The pull request ID could not be found. Make sure that you have specified
  2488. // the correct repository name and pull request ID, and then try again.
  2489. //
  2490. // * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException"
  2491. // The pull request ID is not valid. Make sure that you have provided the full
  2492. // ID and that the pull request is in the specified repository, and then try
  2493. // again.
  2494. //
  2495. // * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException"
  2496. // A pull request ID is required, but none was provided.
  2497. //
  2498. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  2499. // An encryption integrity check failed.
  2500. //
  2501. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  2502. // An encryption key could not be accessed.
  2503. //
  2504. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  2505. // The encryption key is disabled.
  2506. //
  2507. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  2508. // No encryption key was found.
  2509. //
  2510. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  2511. // The encryption key is not available.
  2512. //
  2513. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetPullRequest
  2514. func (c *CodeCommit) GetPullRequest(input *GetPullRequestInput) (*GetPullRequestOutput, error) {
  2515. req, out := c.GetPullRequestRequest(input)
  2516. return out, req.Send()
  2517. }
  2518. // GetPullRequestWithContext is the same as GetPullRequest with the addition of
  2519. // the ability to pass a context and additional request options.
  2520. //
  2521. // See GetPullRequest for details on how to use this API operation.
  2522. //
  2523. // The context must be non-nil and will be used for request cancellation. If
  2524. // the context is nil a panic will occur. In the future the SDK may create
  2525. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2526. // for more information on using Contexts.
  2527. func (c *CodeCommit) GetPullRequestWithContext(ctx aws.Context, input *GetPullRequestInput, opts ...request.Option) (*GetPullRequestOutput, error) {
  2528. req, out := c.GetPullRequestRequest(input)
  2529. req.SetContext(ctx)
  2530. req.ApplyOptions(opts...)
  2531. return out, req.Send()
  2532. }
  2533. const opGetRepository = "GetRepository"
  2534. // GetRepositoryRequest generates a "aws/request.Request" representing the
  2535. // client's request for the GetRepository operation. The "output" return
  2536. // value will be populated with the request's response once the request completes
  2537. // successfully.
  2538. //
  2539. // Use "Send" method on the returned Request to send the API call to the service.
  2540. // the "output" return value is not valid until after Send returns without error.
  2541. //
  2542. // See GetRepository for more information on using the GetRepository
  2543. // API call, and error handling.
  2544. //
  2545. // This method is useful when you want to inject custom logic or configuration
  2546. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2547. //
  2548. //
  2549. // // Example sending a request using the GetRepositoryRequest method.
  2550. // req, resp := client.GetRepositoryRequest(params)
  2551. //
  2552. // err := req.Send()
  2553. // if err == nil { // resp is now filled
  2554. // fmt.Println(resp)
  2555. // }
  2556. //
  2557. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetRepository
  2558. func (c *CodeCommit) GetRepositoryRequest(input *GetRepositoryInput) (req *request.Request, output *GetRepositoryOutput) {
  2559. op := &request.Operation{
  2560. Name: opGetRepository,
  2561. HTTPMethod: "POST",
  2562. HTTPPath: "/",
  2563. }
  2564. if input == nil {
  2565. input = &GetRepositoryInput{}
  2566. }
  2567. output = &GetRepositoryOutput{}
  2568. req = c.newRequest(op, input, output)
  2569. return
  2570. }
  2571. // GetRepository API operation for AWS CodeCommit.
  2572. //
  2573. // Returns information about a repository.
  2574. //
  2575. // The description field for a repository accepts all HTML characters and all
  2576. // valid Unicode characters. Applications that do not HTML-encode the description
  2577. // and display it in a web page could expose users to potentially malicious
  2578. // code. Make sure that you HTML-encode the description field in any application
  2579. // that uses this API to display the repository description on a web page.
  2580. //
  2581. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2582. // with awserr.Error's Code and Message methods to get detailed information about
  2583. // the error.
  2584. //
  2585. // See the AWS API reference guide for AWS CodeCommit's
  2586. // API operation GetRepository for usage and error information.
  2587. //
  2588. // Returned Error Codes:
  2589. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  2590. // A repository name is required but was not specified.
  2591. //
  2592. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  2593. // The specified repository does not exist.
  2594. //
  2595. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  2596. // At least one specified repository name is not valid.
  2597. //
  2598. // This exception only occurs when a specified repository name is not valid.
  2599. // Other exceptions occur when a required repository parameter is missing, or
  2600. // when a specified repository does not exist.
  2601. //
  2602. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  2603. // An encryption integrity check failed.
  2604. //
  2605. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  2606. // An encryption key could not be accessed.
  2607. //
  2608. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  2609. // The encryption key is disabled.
  2610. //
  2611. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  2612. // No encryption key was found.
  2613. //
  2614. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  2615. // The encryption key is not available.
  2616. //
  2617. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetRepository
  2618. func (c *CodeCommit) GetRepository(input *GetRepositoryInput) (*GetRepositoryOutput, error) {
  2619. req, out := c.GetRepositoryRequest(input)
  2620. return out, req.Send()
  2621. }
  2622. // GetRepositoryWithContext is the same as GetRepository with the addition of
  2623. // the ability to pass a context and additional request options.
  2624. //
  2625. // See GetRepository for details on how to use this API operation.
  2626. //
  2627. // The context must be non-nil and will be used for request cancellation. If
  2628. // the context is nil a panic will occur. In the future the SDK may create
  2629. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2630. // for more information on using Contexts.
  2631. func (c *CodeCommit) GetRepositoryWithContext(ctx aws.Context, input *GetRepositoryInput, opts ...request.Option) (*GetRepositoryOutput, error) {
  2632. req, out := c.GetRepositoryRequest(input)
  2633. req.SetContext(ctx)
  2634. req.ApplyOptions(opts...)
  2635. return out, req.Send()
  2636. }
  2637. const opGetRepositoryTriggers = "GetRepositoryTriggers"
  2638. // GetRepositoryTriggersRequest generates a "aws/request.Request" representing the
  2639. // client's request for the GetRepositoryTriggers operation. The "output" return
  2640. // value will be populated with the request's response once the request completes
  2641. // successfully.
  2642. //
  2643. // Use "Send" method on the returned Request to send the API call to the service.
  2644. // the "output" return value is not valid until after Send returns without error.
  2645. //
  2646. // See GetRepositoryTriggers for more information on using the GetRepositoryTriggers
  2647. // API call, and error handling.
  2648. //
  2649. // This method is useful when you want to inject custom logic or configuration
  2650. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2651. //
  2652. //
  2653. // // Example sending a request using the GetRepositoryTriggersRequest method.
  2654. // req, resp := client.GetRepositoryTriggersRequest(params)
  2655. //
  2656. // err := req.Send()
  2657. // if err == nil { // resp is now filled
  2658. // fmt.Println(resp)
  2659. // }
  2660. //
  2661. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetRepositoryTriggers
  2662. func (c *CodeCommit) GetRepositoryTriggersRequest(input *GetRepositoryTriggersInput) (req *request.Request, output *GetRepositoryTriggersOutput) {
  2663. op := &request.Operation{
  2664. Name: opGetRepositoryTriggers,
  2665. HTTPMethod: "POST",
  2666. HTTPPath: "/",
  2667. }
  2668. if input == nil {
  2669. input = &GetRepositoryTriggersInput{}
  2670. }
  2671. output = &GetRepositoryTriggersOutput{}
  2672. req = c.newRequest(op, input, output)
  2673. return
  2674. }
  2675. // GetRepositoryTriggers API operation for AWS CodeCommit.
  2676. //
  2677. // Gets information about triggers configured for a repository.
  2678. //
  2679. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2680. // with awserr.Error's Code and Message methods to get detailed information about
  2681. // the error.
  2682. //
  2683. // See the AWS API reference guide for AWS CodeCommit's
  2684. // API operation GetRepositoryTriggers for usage and error information.
  2685. //
  2686. // Returned Error Codes:
  2687. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  2688. // A repository name is required but was not specified.
  2689. //
  2690. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  2691. // At least one specified repository name is not valid.
  2692. //
  2693. // This exception only occurs when a specified repository name is not valid.
  2694. // Other exceptions occur when a required repository parameter is missing, or
  2695. // when a specified repository does not exist.
  2696. //
  2697. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  2698. // The specified repository does not exist.
  2699. //
  2700. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  2701. // An encryption integrity check failed.
  2702. //
  2703. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  2704. // An encryption key could not be accessed.
  2705. //
  2706. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  2707. // The encryption key is disabled.
  2708. //
  2709. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  2710. // No encryption key was found.
  2711. //
  2712. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  2713. // The encryption key is not available.
  2714. //
  2715. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetRepositoryTriggers
  2716. func (c *CodeCommit) GetRepositoryTriggers(input *GetRepositoryTriggersInput) (*GetRepositoryTriggersOutput, error) {
  2717. req, out := c.GetRepositoryTriggersRequest(input)
  2718. return out, req.Send()
  2719. }
  2720. // GetRepositoryTriggersWithContext is the same as GetRepositoryTriggers with the addition of
  2721. // the ability to pass a context and additional request options.
  2722. //
  2723. // See GetRepositoryTriggers for details on how to use this API operation.
  2724. //
  2725. // The context must be non-nil and will be used for request cancellation. If
  2726. // the context is nil a panic will occur. In the future the SDK may create
  2727. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2728. // for more information on using Contexts.
  2729. func (c *CodeCommit) GetRepositoryTriggersWithContext(ctx aws.Context, input *GetRepositoryTriggersInput, opts ...request.Option) (*GetRepositoryTriggersOutput, error) {
  2730. req, out := c.GetRepositoryTriggersRequest(input)
  2731. req.SetContext(ctx)
  2732. req.ApplyOptions(opts...)
  2733. return out, req.Send()
  2734. }
  2735. const opListBranches = "ListBranches"
  2736. // ListBranchesRequest generates a "aws/request.Request" representing the
  2737. // client's request for the ListBranches operation. The "output" return
  2738. // value will be populated with the request's response once the request completes
  2739. // successfully.
  2740. //
  2741. // Use "Send" method on the returned Request to send the API call to the service.
  2742. // the "output" return value is not valid until after Send returns without error.
  2743. //
  2744. // See ListBranches for more information on using the ListBranches
  2745. // API call, and error handling.
  2746. //
  2747. // This method is useful when you want to inject custom logic or configuration
  2748. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2749. //
  2750. //
  2751. // // Example sending a request using the ListBranchesRequest method.
  2752. // req, resp := client.ListBranchesRequest(params)
  2753. //
  2754. // err := req.Send()
  2755. // if err == nil { // resp is now filled
  2756. // fmt.Println(resp)
  2757. // }
  2758. //
  2759. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListBranches
  2760. func (c *CodeCommit) ListBranchesRequest(input *ListBranchesInput) (req *request.Request, output *ListBranchesOutput) {
  2761. op := &request.Operation{
  2762. Name: opListBranches,
  2763. HTTPMethod: "POST",
  2764. HTTPPath: "/",
  2765. Paginator: &request.Paginator{
  2766. InputTokens: []string{"nextToken"},
  2767. OutputTokens: []string{"nextToken"},
  2768. LimitToken: "",
  2769. TruncationToken: "",
  2770. },
  2771. }
  2772. if input == nil {
  2773. input = &ListBranchesInput{}
  2774. }
  2775. output = &ListBranchesOutput{}
  2776. req = c.newRequest(op, input, output)
  2777. return
  2778. }
  2779. // ListBranches API operation for AWS CodeCommit.
  2780. //
  2781. // Gets information about one or more branches in a repository.
  2782. //
  2783. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2784. // with awserr.Error's Code and Message methods to get detailed information about
  2785. // the error.
  2786. //
  2787. // See the AWS API reference guide for AWS CodeCommit's
  2788. // API operation ListBranches for usage and error information.
  2789. //
  2790. // Returned Error Codes:
  2791. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  2792. // A repository name is required but was not specified.
  2793. //
  2794. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  2795. // The specified repository does not exist.
  2796. //
  2797. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  2798. // At least one specified repository name is not valid.
  2799. //
  2800. // This exception only occurs when a specified repository name is not valid.
  2801. // Other exceptions occur when a required repository parameter is missing, or
  2802. // when a specified repository does not exist.
  2803. //
  2804. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  2805. // An encryption integrity check failed.
  2806. //
  2807. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  2808. // An encryption key could not be accessed.
  2809. //
  2810. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  2811. // The encryption key is disabled.
  2812. //
  2813. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  2814. // No encryption key was found.
  2815. //
  2816. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  2817. // The encryption key is not available.
  2818. //
  2819. // * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException"
  2820. // The specified continuation token is not valid.
  2821. //
  2822. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListBranches
  2823. func (c *CodeCommit) ListBranches(input *ListBranchesInput) (*ListBranchesOutput, error) {
  2824. req, out := c.ListBranchesRequest(input)
  2825. return out, req.Send()
  2826. }
  2827. // ListBranchesWithContext is the same as ListBranches with the addition of
  2828. // the ability to pass a context and additional request options.
  2829. //
  2830. // See ListBranches for details on how to use this API operation.
  2831. //
  2832. // The context must be non-nil and will be used for request cancellation. If
  2833. // the context is nil a panic will occur. In the future the SDK may create
  2834. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2835. // for more information on using Contexts.
  2836. func (c *CodeCommit) ListBranchesWithContext(ctx aws.Context, input *ListBranchesInput, opts ...request.Option) (*ListBranchesOutput, error) {
  2837. req, out := c.ListBranchesRequest(input)
  2838. req.SetContext(ctx)
  2839. req.ApplyOptions(opts...)
  2840. return out, req.Send()
  2841. }
  2842. // ListBranchesPages iterates over the pages of a ListBranches operation,
  2843. // calling the "fn" function with the response data for each page. To stop
  2844. // iterating, return false from the fn function.
  2845. //
  2846. // See ListBranches method for more information on how to use this operation.
  2847. //
  2848. // Note: This operation can generate multiple requests to a service.
  2849. //
  2850. // // Example iterating over at most 3 pages of a ListBranches operation.
  2851. // pageNum := 0
  2852. // err := client.ListBranchesPages(params,
  2853. // func(page *ListBranchesOutput, lastPage bool) bool {
  2854. // pageNum++
  2855. // fmt.Println(page)
  2856. // return pageNum <= 3
  2857. // })
  2858. //
  2859. func (c *CodeCommit) ListBranchesPages(input *ListBranchesInput, fn func(*ListBranchesOutput, bool) bool) error {
  2860. return c.ListBranchesPagesWithContext(aws.BackgroundContext(), input, fn)
  2861. }
  2862. // ListBranchesPagesWithContext same as ListBranchesPages except
  2863. // it takes a Context and allows setting request options on the pages.
  2864. //
  2865. // The context must be non-nil and will be used for request cancellation. If
  2866. // the context is nil a panic will occur. In the future the SDK may create
  2867. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2868. // for more information on using Contexts.
  2869. func (c *CodeCommit) ListBranchesPagesWithContext(ctx aws.Context, input *ListBranchesInput, fn func(*ListBranchesOutput, bool) bool, opts ...request.Option) error {
  2870. p := request.Pagination{
  2871. NewRequest: func() (*request.Request, error) {
  2872. var inCpy *ListBranchesInput
  2873. if input != nil {
  2874. tmp := *input
  2875. inCpy = &tmp
  2876. }
  2877. req, _ := c.ListBranchesRequest(inCpy)
  2878. req.SetContext(ctx)
  2879. req.ApplyOptions(opts...)
  2880. return req, nil
  2881. },
  2882. }
  2883. cont := true
  2884. for p.Next() && cont {
  2885. cont = fn(p.Page().(*ListBranchesOutput), !p.HasNextPage())
  2886. }
  2887. return p.Err()
  2888. }
  2889. const opListPullRequests = "ListPullRequests"
  2890. // ListPullRequestsRequest generates a "aws/request.Request" representing the
  2891. // client's request for the ListPullRequests operation. The "output" return
  2892. // value will be populated with the request's response once the request completes
  2893. // successfully.
  2894. //
  2895. // Use "Send" method on the returned Request to send the API call to the service.
  2896. // the "output" return value is not valid until after Send returns without error.
  2897. //
  2898. // See ListPullRequests for more information on using the ListPullRequests
  2899. // API call, and error handling.
  2900. //
  2901. // This method is useful when you want to inject custom logic or configuration
  2902. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2903. //
  2904. //
  2905. // // Example sending a request using the ListPullRequestsRequest method.
  2906. // req, resp := client.ListPullRequestsRequest(params)
  2907. //
  2908. // err := req.Send()
  2909. // if err == nil { // resp is now filled
  2910. // fmt.Println(resp)
  2911. // }
  2912. //
  2913. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListPullRequests
  2914. func (c *CodeCommit) ListPullRequestsRequest(input *ListPullRequestsInput) (req *request.Request, output *ListPullRequestsOutput) {
  2915. op := &request.Operation{
  2916. Name: opListPullRequests,
  2917. HTTPMethod: "POST",
  2918. HTTPPath: "/",
  2919. Paginator: &request.Paginator{
  2920. InputTokens: []string{"nextToken"},
  2921. OutputTokens: []string{"nextToken"},
  2922. LimitToken: "maxResults",
  2923. TruncationToken: "",
  2924. },
  2925. }
  2926. if input == nil {
  2927. input = &ListPullRequestsInput{}
  2928. }
  2929. output = &ListPullRequestsOutput{}
  2930. req = c.newRequest(op, input, output)
  2931. return
  2932. }
  2933. // ListPullRequests API operation for AWS CodeCommit.
  2934. //
  2935. // Returns a list of pull requests for a specified repository. The return list
  2936. // can be refined by pull request status or pull request author ARN.
  2937. //
  2938. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2939. // with awserr.Error's Code and Message methods to get detailed information about
  2940. // the error.
  2941. //
  2942. // See the AWS API reference guide for AWS CodeCommit's
  2943. // API operation ListPullRequests for usage and error information.
  2944. //
  2945. // Returned Error Codes:
  2946. // * ErrCodeInvalidPullRequestStatusException "InvalidPullRequestStatusException"
  2947. // The pull request status is not valid. The only valid values are OPEN and
  2948. // CLOSED.
  2949. //
  2950. // * ErrCodeInvalidAuthorArnException "InvalidAuthorArnException"
  2951. // The Amazon Resource Name (ARN) is not valid. Make sure that you have provided
  2952. // the full ARN for the author of the pull request, and then try again.
  2953. //
  2954. // * ErrCodeAuthorDoesNotExistException "AuthorDoesNotExistException"
  2955. // The specified Amazon Resource Name (ARN) does not exist in the AWS account.
  2956. //
  2957. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  2958. // A repository name is required but was not specified.
  2959. //
  2960. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  2961. // At least one specified repository name is not valid.
  2962. //
  2963. // This exception only occurs when a specified repository name is not valid.
  2964. // Other exceptions occur when a required repository parameter is missing, or
  2965. // when a specified repository does not exist.
  2966. //
  2967. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  2968. // The specified repository does not exist.
  2969. //
  2970. // * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException"
  2971. // The specified number of maximum results is not valid.
  2972. //
  2973. // * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException"
  2974. // The specified continuation token is not valid.
  2975. //
  2976. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  2977. // An encryption integrity check failed.
  2978. //
  2979. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  2980. // An encryption key could not be accessed.
  2981. //
  2982. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  2983. // The encryption key is disabled.
  2984. //
  2985. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  2986. // No encryption key was found.
  2987. //
  2988. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  2989. // The encryption key is not available.
  2990. //
  2991. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListPullRequests
  2992. func (c *CodeCommit) ListPullRequests(input *ListPullRequestsInput) (*ListPullRequestsOutput, error) {
  2993. req, out := c.ListPullRequestsRequest(input)
  2994. return out, req.Send()
  2995. }
  2996. // ListPullRequestsWithContext is the same as ListPullRequests with the addition of
  2997. // the ability to pass a context and additional request options.
  2998. //
  2999. // See ListPullRequests for details on how to use this API operation.
  3000. //
  3001. // The context must be non-nil and will be used for request cancellation. If
  3002. // the context is nil a panic will occur. In the future the SDK may create
  3003. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3004. // for more information on using Contexts.
  3005. func (c *CodeCommit) ListPullRequestsWithContext(ctx aws.Context, input *ListPullRequestsInput, opts ...request.Option) (*ListPullRequestsOutput, error) {
  3006. req, out := c.ListPullRequestsRequest(input)
  3007. req.SetContext(ctx)
  3008. req.ApplyOptions(opts...)
  3009. return out, req.Send()
  3010. }
  3011. // ListPullRequestsPages iterates over the pages of a ListPullRequests operation,
  3012. // calling the "fn" function with the response data for each page. To stop
  3013. // iterating, return false from the fn function.
  3014. //
  3015. // See ListPullRequests method for more information on how to use this operation.
  3016. //
  3017. // Note: This operation can generate multiple requests to a service.
  3018. //
  3019. // // Example iterating over at most 3 pages of a ListPullRequests operation.
  3020. // pageNum := 0
  3021. // err := client.ListPullRequestsPages(params,
  3022. // func(page *ListPullRequestsOutput, lastPage bool) bool {
  3023. // pageNum++
  3024. // fmt.Println(page)
  3025. // return pageNum <= 3
  3026. // })
  3027. //
  3028. func (c *CodeCommit) ListPullRequestsPages(input *ListPullRequestsInput, fn func(*ListPullRequestsOutput, bool) bool) error {
  3029. return c.ListPullRequestsPagesWithContext(aws.BackgroundContext(), input, fn)
  3030. }
  3031. // ListPullRequestsPagesWithContext same as ListPullRequestsPages except
  3032. // it takes a Context and allows setting request options on the pages.
  3033. //
  3034. // The context must be non-nil and will be used for request cancellation. If
  3035. // the context is nil a panic will occur. In the future the SDK may create
  3036. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3037. // for more information on using Contexts.
  3038. func (c *CodeCommit) ListPullRequestsPagesWithContext(ctx aws.Context, input *ListPullRequestsInput, fn func(*ListPullRequestsOutput, bool) bool, opts ...request.Option) error {
  3039. p := request.Pagination{
  3040. NewRequest: func() (*request.Request, error) {
  3041. var inCpy *ListPullRequestsInput
  3042. if input != nil {
  3043. tmp := *input
  3044. inCpy = &tmp
  3045. }
  3046. req, _ := c.ListPullRequestsRequest(inCpy)
  3047. req.SetContext(ctx)
  3048. req.ApplyOptions(opts...)
  3049. return req, nil
  3050. },
  3051. }
  3052. cont := true
  3053. for p.Next() && cont {
  3054. cont = fn(p.Page().(*ListPullRequestsOutput), !p.HasNextPage())
  3055. }
  3056. return p.Err()
  3057. }
  3058. const opListRepositories = "ListRepositories"
  3059. // ListRepositoriesRequest generates a "aws/request.Request" representing the
  3060. // client's request for the ListRepositories operation. The "output" return
  3061. // value will be populated with the request's response once the request completes
  3062. // successfully.
  3063. //
  3064. // Use "Send" method on the returned Request to send the API call to the service.
  3065. // the "output" return value is not valid until after Send returns without error.
  3066. //
  3067. // See ListRepositories for more information on using the ListRepositories
  3068. // API call, and error handling.
  3069. //
  3070. // This method is useful when you want to inject custom logic or configuration
  3071. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3072. //
  3073. //
  3074. // // Example sending a request using the ListRepositoriesRequest method.
  3075. // req, resp := client.ListRepositoriesRequest(params)
  3076. //
  3077. // err := req.Send()
  3078. // if err == nil { // resp is now filled
  3079. // fmt.Println(resp)
  3080. // }
  3081. //
  3082. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListRepositories
  3083. func (c *CodeCommit) ListRepositoriesRequest(input *ListRepositoriesInput) (req *request.Request, output *ListRepositoriesOutput) {
  3084. op := &request.Operation{
  3085. Name: opListRepositories,
  3086. HTTPMethod: "POST",
  3087. HTTPPath: "/",
  3088. Paginator: &request.Paginator{
  3089. InputTokens: []string{"nextToken"},
  3090. OutputTokens: []string{"nextToken"},
  3091. LimitToken: "",
  3092. TruncationToken: "",
  3093. },
  3094. }
  3095. if input == nil {
  3096. input = &ListRepositoriesInput{}
  3097. }
  3098. output = &ListRepositoriesOutput{}
  3099. req = c.newRequest(op, input, output)
  3100. return
  3101. }
  3102. // ListRepositories API operation for AWS CodeCommit.
  3103. //
  3104. // Gets information about one or more repositories.
  3105. //
  3106. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3107. // with awserr.Error's Code and Message methods to get detailed information about
  3108. // the error.
  3109. //
  3110. // See the AWS API reference guide for AWS CodeCommit's
  3111. // API operation ListRepositories for usage and error information.
  3112. //
  3113. // Returned Error Codes:
  3114. // * ErrCodeInvalidSortByException "InvalidSortByException"
  3115. // The specified sort by value is not valid.
  3116. //
  3117. // * ErrCodeInvalidOrderException "InvalidOrderException"
  3118. // The specified sort order is not valid.
  3119. //
  3120. // * ErrCodeInvalidContinuationTokenException "InvalidContinuationTokenException"
  3121. // The specified continuation token is not valid.
  3122. //
  3123. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/ListRepositories
  3124. func (c *CodeCommit) ListRepositories(input *ListRepositoriesInput) (*ListRepositoriesOutput, error) {
  3125. req, out := c.ListRepositoriesRequest(input)
  3126. return out, req.Send()
  3127. }
  3128. // ListRepositoriesWithContext is the same as ListRepositories with the addition of
  3129. // the ability to pass a context and additional request options.
  3130. //
  3131. // See ListRepositories for details on how to use this API operation.
  3132. //
  3133. // The context must be non-nil and will be used for request cancellation. If
  3134. // the context is nil a panic will occur. In the future the SDK may create
  3135. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3136. // for more information on using Contexts.
  3137. func (c *CodeCommit) ListRepositoriesWithContext(ctx aws.Context, input *ListRepositoriesInput, opts ...request.Option) (*ListRepositoriesOutput, error) {
  3138. req, out := c.ListRepositoriesRequest(input)
  3139. req.SetContext(ctx)
  3140. req.ApplyOptions(opts...)
  3141. return out, req.Send()
  3142. }
  3143. // ListRepositoriesPages iterates over the pages of a ListRepositories operation,
  3144. // calling the "fn" function with the response data for each page. To stop
  3145. // iterating, return false from the fn function.
  3146. //
  3147. // See ListRepositories method for more information on how to use this operation.
  3148. //
  3149. // Note: This operation can generate multiple requests to a service.
  3150. //
  3151. // // Example iterating over at most 3 pages of a ListRepositories operation.
  3152. // pageNum := 0
  3153. // err := client.ListRepositoriesPages(params,
  3154. // func(page *ListRepositoriesOutput, lastPage bool) bool {
  3155. // pageNum++
  3156. // fmt.Println(page)
  3157. // return pageNum <= 3
  3158. // })
  3159. //
  3160. func (c *CodeCommit) ListRepositoriesPages(input *ListRepositoriesInput, fn func(*ListRepositoriesOutput, bool) bool) error {
  3161. return c.ListRepositoriesPagesWithContext(aws.BackgroundContext(), input, fn)
  3162. }
  3163. // ListRepositoriesPagesWithContext same as ListRepositoriesPages except
  3164. // it takes a Context and allows setting request options on the pages.
  3165. //
  3166. // The context must be non-nil and will be used for request cancellation. If
  3167. // the context is nil a panic will occur. In the future the SDK may create
  3168. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3169. // for more information on using Contexts.
  3170. func (c *CodeCommit) ListRepositoriesPagesWithContext(ctx aws.Context, input *ListRepositoriesInput, fn func(*ListRepositoriesOutput, bool) bool, opts ...request.Option) error {
  3171. p := request.Pagination{
  3172. NewRequest: func() (*request.Request, error) {
  3173. var inCpy *ListRepositoriesInput
  3174. if input != nil {
  3175. tmp := *input
  3176. inCpy = &tmp
  3177. }
  3178. req, _ := c.ListRepositoriesRequest(inCpy)
  3179. req.SetContext(ctx)
  3180. req.ApplyOptions(opts...)
  3181. return req, nil
  3182. },
  3183. }
  3184. cont := true
  3185. for p.Next() && cont {
  3186. cont = fn(p.Page().(*ListRepositoriesOutput), !p.HasNextPage())
  3187. }
  3188. return p.Err()
  3189. }
  3190. const opMergePullRequestByFastForward = "MergePullRequestByFastForward"
  3191. // MergePullRequestByFastForwardRequest generates a "aws/request.Request" representing the
  3192. // client's request for the MergePullRequestByFastForward operation. The "output" return
  3193. // value will be populated with the request's response once the request completes
  3194. // successfully.
  3195. //
  3196. // Use "Send" method on the returned Request to send the API call to the service.
  3197. // the "output" return value is not valid until after Send returns without error.
  3198. //
  3199. // See MergePullRequestByFastForward for more information on using the MergePullRequestByFastForward
  3200. // API call, and error handling.
  3201. //
  3202. // This method is useful when you want to inject custom logic or configuration
  3203. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3204. //
  3205. //
  3206. // // Example sending a request using the MergePullRequestByFastForwardRequest method.
  3207. // req, resp := client.MergePullRequestByFastForwardRequest(params)
  3208. //
  3209. // err := req.Send()
  3210. // if err == nil { // resp is now filled
  3211. // fmt.Println(resp)
  3212. // }
  3213. //
  3214. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/MergePullRequestByFastForward
  3215. func (c *CodeCommit) MergePullRequestByFastForwardRequest(input *MergePullRequestByFastForwardInput) (req *request.Request, output *MergePullRequestByFastForwardOutput) {
  3216. op := &request.Operation{
  3217. Name: opMergePullRequestByFastForward,
  3218. HTTPMethod: "POST",
  3219. HTTPPath: "/",
  3220. }
  3221. if input == nil {
  3222. input = &MergePullRequestByFastForwardInput{}
  3223. }
  3224. output = &MergePullRequestByFastForwardOutput{}
  3225. req = c.newRequest(op, input, output)
  3226. return
  3227. }
  3228. // MergePullRequestByFastForward API operation for AWS CodeCommit.
  3229. //
  3230. // Closes a pull request and attempts to merge the source commit of a pull request
  3231. // into the specified destination branch for that pull request at the specified
  3232. // commit using the fast-forward merge option.
  3233. //
  3234. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3235. // with awserr.Error's Code and Message methods to get detailed information about
  3236. // the error.
  3237. //
  3238. // See the AWS API reference guide for AWS CodeCommit's
  3239. // API operation MergePullRequestByFastForward for usage and error information.
  3240. //
  3241. // Returned Error Codes:
  3242. // * ErrCodeManualMergeRequiredException "ManualMergeRequiredException"
  3243. // The pull request cannot be merged automatically into the destination branch.
  3244. // You must manually merge the branches and resolve any conflicts.
  3245. //
  3246. // * ErrCodePullRequestAlreadyClosedException "PullRequestAlreadyClosedException"
  3247. // The pull request status cannot be updated because it is already closed.
  3248. //
  3249. // * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException"
  3250. // The pull request ID could not be found. Make sure that you have specified
  3251. // the correct repository name and pull request ID, and then try again.
  3252. //
  3253. // * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException"
  3254. // The pull request ID is not valid. Make sure that you have provided the full
  3255. // ID and that the pull request is in the specified repository, and then try
  3256. // again.
  3257. //
  3258. // * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException"
  3259. // A pull request ID is required, but none was provided.
  3260. //
  3261. // * ErrCodeTipOfSourceReferenceIsDifferentException "TipOfSourceReferenceIsDifferentException"
  3262. // The tip of the source branch in the destination repository does not match
  3263. // the tip of the source branch specified in your request. The pull request
  3264. // might have been updated. Make sure that you have the latest changes.
  3265. //
  3266. // * ErrCodeReferenceDoesNotExistException "ReferenceDoesNotExistException"
  3267. // The specified reference does not exist. You must provide a full commit ID.
  3268. //
  3269. // * ErrCodeInvalidCommitIdException "InvalidCommitIdException"
  3270. // The specified commit ID is not valid.
  3271. //
  3272. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  3273. // A repository name is required but was not specified.
  3274. //
  3275. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  3276. // At least one specified repository name is not valid.
  3277. //
  3278. // This exception only occurs when a specified repository name is not valid.
  3279. // Other exceptions occur when a required repository parameter is missing, or
  3280. // when a specified repository does not exist.
  3281. //
  3282. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  3283. // The specified repository does not exist.
  3284. //
  3285. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  3286. // An encryption integrity check failed.
  3287. //
  3288. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  3289. // An encryption key could not be accessed.
  3290. //
  3291. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  3292. // The encryption key is disabled.
  3293. //
  3294. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  3295. // No encryption key was found.
  3296. //
  3297. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  3298. // The encryption key is not available.
  3299. //
  3300. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/MergePullRequestByFastForward
  3301. func (c *CodeCommit) MergePullRequestByFastForward(input *MergePullRequestByFastForwardInput) (*MergePullRequestByFastForwardOutput, error) {
  3302. req, out := c.MergePullRequestByFastForwardRequest(input)
  3303. return out, req.Send()
  3304. }
  3305. // MergePullRequestByFastForwardWithContext is the same as MergePullRequestByFastForward with the addition of
  3306. // the ability to pass a context and additional request options.
  3307. //
  3308. // See MergePullRequestByFastForward for details on how to use this API operation.
  3309. //
  3310. // The context must be non-nil and will be used for request cancellation. If
  3311. // the context is nil a panic will occur. In the future the SDK may create
  3312. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3313. // for more information on using Contexts.
  3314. func (c *CodeCommit) MergePullRequestByFastForwardWithContext(ctx aws.Context, input *MergePullRequestByFastForwardInput, opts ...request.Option) (*MergePullRequestByFastForwardOutput, error) {
  3315. req, out := c.MergePullRequestByFastForwardRequest(input)
  3316. req.SetContext(ctx)
  3317. req.ApplyOptions(opts...)
  3318. return out, req.Send()
  3319. }
  3320. const opPostCommentForComparedCommit = "PostCommentForComparedCommit"
  3321. // PostCommentForComparedCommitRequest generates a "aws/request.Request" representing the
  3322. // client's request for the PostCommentForComparedCommit operation. The "output" return
  3323. // value will be populated with the request's response once the request completes
  3324. // successfully.
  3325. //
  3326. // Use "Send" method on the returned Request to send the API call to the service.
  3327. // the "output" return value is not valid until after Send returns without error.
  3328. //
  3329. // See PostCommentForComparedCommit for more information on using the PostCommentForComparedCommit
  3330. // API call, and error handling.
  3331. //
  3332. // This method is useful when you want to inject custom logic or configuration
  3333. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3334. //
  3335. //
  3336. // // Example sending a request using the PostCommentForComparedCommitRequest method.
  3337. // req, resp := client.PostCommentForComparedCommitRequest(params)
  3338. //
  3339. // err := req.Send()
  3340. // if err == nil { // resp is now filled
  3341. // fmt.Println(resp)
  3342. // }
  3343. //
  3344. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentForComparedCommit
  3345. func (c *CodeCommit) PostCommentForComparedCommitRequest(input *PostCommentForComparedCommitInput) (req *request.Request, output *PostCommentForComparedCommitOutput) {
  3346. op := &request.Operation{
  3347. Name: opPostCommentForComparedCommit,
  3348. HTTPMethod: "POST",
  3349. HTTPPath: "/",
  3350. }
  3351. if input == nil {
  3352. input = &PostCommentForComparedCommitInput{}
  3353. }
  3354. output = &PostCommentForComparedCommitOutput{}
  3355. req = c.newRequest(op, input, output)
  3356. return
  3357. }
  3358. // PostCommentForComparedCommit API operation for AWS CodeCommit.
  3359. //
  3360. // Posts a comment on the comparison between two commits.
  3361. //
  3362. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3363. // with awserr.Error's Code and Message methods to get detailed information about
  3364. // the error.
  3365. //
  3366. // See the AWS API reference guide for AWS CodeCommit's
  3367. // API operation PostCommentForComparedCommit for usage and error information.
  3368. //
  3369. // Returned Error Codes:
  3370. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  3371. // A repository name is required but was not specified.
  3372. //
  3373. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  3374. // The specified repository does not exist.
  3375. //
  3376. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  3377. // At least one specified repository name is not valid.
  3378. //
  3379. // This exception only occurs when a specified repository name is not valid.
  3380. // Other exceptions occur when a required repository parameter is missing, or
  3381. // when a specified repository does not exist.
  3382. //
  3383. // * ErrCodeClientRequestTokenRequiredException "ClientRequestTokenRequiredException"
  3384. // A client request token is required. A client request token is an unique,
  3385. // client-generated idempotency token that when provided in a request, ensures
  3386. // the request cannot be repeated with a changed parameter. If a request is
  3387. // received with the same parameters and a token is included, the request will
  3388. // return information about the initial request that used that token.
  3389. //
  3390. // * ErrCodeInvalidClientRequestTokenException "InvalidClientRequestTokenException"
  3391. // The client request token is not valid.
  3392. //
  3393. // * ErrCodeIdempotencyParameterMismatchException "IdempotencyParameterMismatchException"
  3394. // The client request token is not valid. Either the token is not in a valid
  3395. // format, or the token has been used in a previous request and cannot be re-used.
  3396. //
  3397. // * ErrCodeCommentContentRequiredException "CommentContentRequiredException"
  3398. // The comment is empty. You must provide some content for a comment. The content
  3399. // cannot be null.
  3400. //
  3401. // * ErrCodeCommentContentSizeLimitExceededException "CommentContentSizeLimitExceededException"
  3402. // The comment is too large. Comments are limited to 1,000 characters.
  3403. //
  3404. // * ErrCodeInvalidFileLocationException "InvalidFileLocationException"
  3405. // The location of the file is not valid. Make sure that you include the extension
  3406. // of the file as well as the file name.
  3407. //
  3408. // * ErrCodeInvalidRelativeFileVersionEnumException "InvalidRelativeFileVersionEnumException"
  3409. // Either the enum is not in a valid format, or the specified file version enum
  3410. // is not valid in respect to the current file version.
  3411. //
  3412. // * ErrCodePathRequiredException "PathRequiredException"
  3413. // The folderPath for a location cannot be null.
  3414. //
  3415. // * ErrCodeInvalidFilePositionException "InvalidFilePositionException"
  3416. // The position is not valid. Make sure that the line number exists in the version
  3417. // of the file you want to comment on.
  3418. //
  3419. // * ErrCodeCommitIdRequiredException "CommitIdRequiredException"
  3420. // A commit ID was not specified.
  3421. //
  3422. // * ErrCodeInvalidCommitIdException "InvalidCommitIdException"
  3423. // The specified commit ID is not valid.
  3424. //
  3425. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  3426. // An encryption integrity check failed.
  3427. //
  3428. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  3429. // An encryption key could not be accessed.
  3430. //
  3431. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  3432. // The encryption key is disabled.
  3433. //
  3434. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  3435. // No encryption key was found.
  3436. //
  3437. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  3438. // The encryption key is not available.
  3439. //
  3440. // * ErrCodeBeforeCommitIdAndAfterCommitIdAreSameException "BeforeCommitIdAndAfterCommitIdAreSameException"
  3441. // The before commit ID and the after commit ID are the same, which is not valid.
  3442. // The before commit ID and the after commit ID must be different commit IDs.
  3443. //
  3444. // * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException"
  3445. // The specified commit does not exist or no commit was specified, and the specified
  3446. // repository has no default branch.
  3447. //
  3448. // * ErrCodeInvalidPathException "InvalidPathException"
  3449. // The specified path is not valid.
  3450. //
  3451. // * ErrCodePathDoesNotExistException "PathDoesNotExistException"
  3452. // The specified path does not exist.
  3453. //
  3454. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentForComparedCommit
  3455. func (c *CodeCommit) PostCommentForComparedCommit(input *PostCommentForComparedCommitInput) (*PostCommentForComparedCommitOutput, error) {
  3456. req, out := c.PostCommentForComparedCommitRequest(input)
  3457. return out, req.Send()
  3458. }
  3459. // PostCommentForComparedCommitWithContext is the same as PostCommentForComparedCommit with the addition of
  3460. // the ability to pass a context and additional request options.
  3461. //
  3462. // See PostCommentForComparedCommit for details on how to use this API operation.
  3463. //
  3464. // The context must be non-nil and will be used for request cancellation. If
  3465. // the context is nil a panic will occur. In the future the SDK may create
  3466. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3467. // for more information on using Contexts.
  3468. func (c *CodeCommit) PostCommentForComparedCommitWithContext(ctx aws.Context, input *PostCommentForComparedCommitInput, opts ...request.Option) (*PostCommentForComparedCommitOutput, error) {
  3469. req, out := c.PostCommentForComparedCommitRequest(input)
  3470. req.SetContext(ctx)
  3471. req.ApplyOptions(opts...)
  3472. return out, req.Send()
  3473. }
  3474. const opPostCommentForPullRequest = "PostCommentForPullRequest"
  3475. // PostCommentForPullRequestRequest generates a "aws/request.Request" representing the
  3476. // client's request for the PostCommentForPullRequest operation. The "output" return
  3477. // value will be populated with the request's response once the request completes
  3478. // successfully.
  3479. //
  3480. // Use "Send" method on the returned Request to send the API call to the service.
  3481. // the "output" return value is not valid until after Send returns without error.
  3482. //
  3483. // See PostCommentForPullRequest for more information on using the PostCommentForPullRequest
  3484. // API call, and error handling.
  3485. //
  3486. // This method is useful when you want to inject custom logic or configuration
  3487. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3488. //
  3489. //
  3490. // // Example sending a request using the PostCommentForPullRequestRequest method.
  3491. // req, resp := client.PostCommentForPullRequestRequest(params)
  3492. //
  3493. // err := req.Send()
  3494. // if err == nil { // resp is now filled
  3495. // fmt.Println(resp)
  3496. // }
  3497. //
  3498. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentForPullRequest
  3499. func (c *CodeCommit) PostCommentForPullRequestRequest(input *PostCommentForPullRequestInput) (req *request.Request, output *PostCommentForPullRequestOutput) {
  3500. op := &request.Operation{
  3501. Name: opPostCommentForPullRequest,
  3502. HTTPMethod: "POST",
  3503. HTTPPath: "/",
  3504. }
  3505. if input == nil {
  3506. input = &PostCommentForPullRequestInput{}
  3507. }
  3508. output = &PostCommentForPullRequestOutput{}
  3509. req = c.newRequest(op, input, output)
  3510. return
  3511. }
  3512. // PostCommentForPullRequest API operation for AWS CodeCommit.
  3513. //
  3514. // Posts a comment on a pull request.
  3515. //
  3516. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3517. // with awserr.Error's Code and Message methods to get detailed information about
  3518. // the error.
  3519. //
  3520. // See the AWS API reference guide for AWS CodeCommit's
  3521. // API operation PostCommentForPullRequest for usage and error information.
  3522. //
  3523. // Returned Error Codes:
  3524. // * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException"
  3525. // The pull request ID could not be found. Make sure that you have specified
  3526. // the correct repository name and pull request ID, and then try again.
  3527. //
  3528. // * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException"
  3529. // The pull request ID is not valid. Make sure that you have provided the full
  3530. // ID and that the pull request is in the specified repository, and then try
  3531. // again.
  3532. //
  3533. // * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException"
  3534. // A pull request ID is required, but none was provided.
  3535. //
  3536. // * ErrCodeRepositoryNotAssociatedWithPullRequestException "RepositoryNotAssociatedWithPullRequestException"
  3537. // The repository does not contain any pull requests with that pull request
  3538. // ID. Check to make sure you have provided the correct repository name for
  3539. // the pull request.
  3540. //
  3541. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  3542. // A repository name is required but was not specified.
  3543. //
  3544. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  3545. // The specified repository does not exist.
  3546. //
  3547. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  3548. // At least one specified repository name is not valid.
  3549. //
  3550. // This exception only occurs when a specified repository name is not valid.
  3551. // Other exceptions occur when a required repository parameter is missing, or
  3552. // when a specified repository does not exist.
  3553. //
  3554. // * ErrCodeClientRequestTokenRequiredException "ClientRequestTokenRequiredException"
  3555. // A client request token is required. A client request token is an unique,
  3556. // client-generated idempotency token that when provided in a request, ensures
  3557. // the request cannot be repeated with a changed parameter. If a request is
  3558. // received with the same parameters and a token is included, the request will
  3559. // return information about the initial request that used that token.
  3560. //
  3561. // * ErrCodeInvalidClientRequestTokenException "InvalidClientRequestTokenException"
  3562. // The client request token is not valid.
  3563. //
  3564. // * ErrCodeIdempotencyParameterMismatchException "IdempotencyParameterMismatchException"
  3565. // The client request token is not valid. Either the token is not in a valid
  3566. // format, or the token has been used in a previous request and cannot be re-used.
  3567. //
  3568. // * ErrCodeCommentContentRequiredException "CommentContentRequiredException"
  3569. // The comment is empty. You must provide some content for a comment. The content
  3570. // cannot be null.
  3571. //
  3572. // * ErrCodeCommentContentSizeLimitExceededException "CommentContentSizeLimitExceededException"
  3573. // The comment is too large. Comments are limited to 1,000 characters.
  3574. //
  3575. // * ErrCodeInvalidFileLocationException "InvalidFileLocationException"
  3576. // The location of the file is not valid. Make sure that you include the extension
  3577. // of the file as well as the file name.
  3578. //
  3579. // * ErrCodeInvalidRelativeFileVersionEnumException "InvalidRelativeFileVersionEnumException"
  3580. // Either the enum is not in a valid format, or the specified file version enum
  3581. // is not valid in respect to the current file version.
  3582. //
  3583. // * ErrCodePathRequiredException "PathRequiredException"
  3584. // The folderPath for a location cannot be null.
  3585. //
  3586. // * ErrCodeInvalidFilePositionException "InvalidFilePositionException"
  3587. // The position is not valid. Make sure that the line number exists in the version
  3588. // of the file you want to comment on.
  3589. //
  3590. // * ErrCodeCommitIdRequiredException "CommitIdRequiredException"
  3591. // A commit ID was not specified.
  3592. //
  3593. // * ErrCodeInvalidCommitIdException "InvalidCommitIdException"
  3594. // The specified commit ID is not valid.
  3595. //
  3596. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  3597. // An encryption integrity check failed.
  3598. //
  3599. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  3600. // An encryption key could not be accessed.
  3601. //
  3602. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  3603. // The encryption key is disabled.
  3604. //
  3605. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  3606. // No encryption key was found.
  3607. //
  3608. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  3609. // The encryption key is not available.
  3610. //
  3611. // * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException"
  3612. // The specified commit does not exist or no commit was specified, and the specified
  3613. // repository has no default branch.
  3614. //
  3615. // * ErrCodeInvalidPathException "InvalidPathException"
  3616. // The specified path is not valid.
  3617. //
  3618. // * ErrCodePathDoesNotExistException "PathDoesNotExistException"
  3619. // The specified path does not exist.
  3620. //
  3621. // * ErrCodePathRequiredException "PathRequiredException"
  3622. // The folderPath for a location cannot be null.
  3623. //
  3624. // * ErrCodeBeforeCommitIdAndAfterCommitIdAreSameException "BeforeCommitIdAndAfterCommitIdAreSameException"
  3625. // The before commit ID and the after commit ID are the same, which is not valid.
  3626. // The before commit ID and the after commit ID must be different commit IDs.
  3627. //
  3628. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentForPullRequest
  3629. func (c *CodeCommit) PostCommentForPullRequest(input *PostCommentForPullRequestInput) (*PostCommentForPullRequestOutput, error) {
  3630. req, out := c.PostCommentForPullRequestRequest(input)
  3631. return out, req.Send()
  3632. }
  3633. // PostCommentForPullRequestWithContext is the same as PostCommentForPullRequest with the addition of
  3634. // the ability to pass a context and additional request options.
  3635. //
  3636. // See PostCommentForPullRequest for details on how to use this API operation.
  3637. //
  3638. // The context must be non-nil and will be used for request cancellation. If
  3639. // the context is nil a panic will occur. In the future the SDK may create
  3640. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3641. // for more information on using Contexts.
  3642. func (c *CodeCommit) PostCommentForPullRequestWithContext(ctx aws.Context, input *PostCommentForPullRequestInput, opts ...request.Option) (*PostCommentForPullRequestOutput, error) {
  3643. req, out := c.PostCommentForPullRequestRequest(input)
  3644. req.SetContext(ctx)
  3645. req.ApplyOptions(opts...)
  3646. return out, req.Send()
  3647. }
  3648. const opPostCommentReply = "PostCommentReply"
  3649. // PostCommentReplyRequest generates a "aws/request.Request" representing the
  3650. // client's request for the PostCommentReply operation. The "output" return
  3651. // value will be populated with the request's response once the request completes
  3652. // successfully.
  3653. //
  3654. // Use "Send" method on the returned Request to send the API call to the service.
  3655. // the "output" return value is not valid until after Send returns without error.
  3656. //
  3657. // See PostCommentReply for more information on using the PostCommentReply
  3658. // API call, and error handling.
  3659. //
  3660. // This method is useful when you want to inject custom logic or configuration
  3661. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3662. //
  3663. //
  3664. // // Example sending a request using the PostCommentReplyRequest method.
  3665. // req, resp := client.PostCommentReplyRequest(params)
  3666. //
  3667. // err := req.Send()
  3668. // if err == nil { // resp is now filled
  3669. // fmt.Println(resp)
  3670. // }
  3671. //
  3672. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentReply
  3673. func (c *CodeCommit) PostCommentReplyRequest(input *PostCommentReplyInput) (req *request.Request, output *PostCommentReplyOutput) {
  3674. op := &request.Operation{
  3675. Name: opPostCommentReply,
  3676. HTTPMethod: "POST",
  3677. HTTPPath: "/",
  3678. }
  3679. if input == nil {
  3680. input = &PostCommentReplyInput{}
  3681. }
  3682. output = &PostCommentReplyOutput{}
  3683. req = c.newRequest(op, input, output)
  3684. return
  3685. }
  3686. // PostCommentReply API operation for AWS CodeCommit.
  3687. //
  3688. // Posts a comment in reply to an existing comment on a comparison between commits
  3689. // or a pull request.
  3690. //
  3691. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3692. // with awserr.Error's Code and Message methods to get detailed information about
  3693. // the error.
  3694. //
  3695. // See the AWS API reference guide for AWS CodeCommit's
  3696. // API operation PostCommentReply for usage and error information.
  3697. //
  3698. // Returned Error Codes:
  3699. // * ErrCodeClientRequestTokenRequiredException "ClientRequestTokenRequiredException"
  3700. // A client request token is required. A client request token is an unique,
  3701. // client-generated idempotency token that when provided in a request, ensures
  3702. // the request cannot be repeated with a changed parameter. If a request is
  3703. // received with the same parameters and a token is included, the request will
  3704. // return information about the initial request that used that token.
  3705. //
  3706. // * ErrCodeInvalidClientRequestTokenException "InvalidClientRequestTokenException"
  3707. // The client request token is not valid.
  3708. //
  3709. // * ErrCodeIdempotencyParameterMismatchException "IdempotencyParameterMismatchException"
  3710. // The client request token is not valid. Either the token is not in a valid
  3711. // format, or the token has been used in a previous request and cannot be re-used.
  3712. //
  3713. // * ErrCodeCommentContentRequiredException "CommentContentRequiredException"
  3714. // The comment is empty. You must provide some content for a comment. The content
  3715. // cannot be null.
  3716. //
  3717. // * ErrCodeCommentContentSizeLimitExceededException "CommentContentSizeLimitExceededException"
  3718. // The comment is too large. Comments are limited to 1,000 characters.
  3719. //
  3720. // * ErrCodeCommentDoesNotExistException "CommentDoesNotExistException"
  3721. // No comment exists with the provided ID. Verify that you have provided the
  3722. // correct ID, and then try again.
  3723. //
  3724. // * ErrCodeCommentIdRequiredException "CommentIdRequiredException"
  3725. // The comment ID is missing or null. A comment ID is required.
  3726. //
  3727. // * ErrCodeInvalidCommentIdException "InvalidCommentIdException"
  3728. // The comment ID is not in a valid format. Make sure that you have provided
  3729. // the full comment ID.
  3730. //
  3731. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentReply
  3732. func (c *CodeCommit) PostCommentReply(input *PostCommentReplyInput) (*PostCommentReplyOutput, error) {
  3733. req, out := c.PostCommentReplyRequest(input)
  3734. return out, req.Send()
  3735. }
  3736. // PostCommentReplyWithContext is the same as PostCommentReply with the addition of
  3737. // the ability to pass a context and additional request options.
  3738. //
  3739. // See PostCommentReply for details on how to use this API operation.
  3740. //
  3741. // The context must be non-nil and will be used for request cancellation. If
  3742. // the context is nil a panic will occur. In the future the SDK may create
  3743. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3744. // for more information on using Contexts.
  3745. func (c *CodeCommit) PostCommentReplyWithContext(ctx aws.Context, input *PostCommentReplyInput, opts ...request.Option) (*PostCommentReplyOutput, error) {
  3746. req, out := c.PostCommentReplyRequest(input)
  3747. req.SetContext(ctx)
  3748. req.ApplyOptions(opts...)
  3749. return out, req.Send()
  3750. }
  3751. const opPutFile = "PutFile"
  3752. // PutFileRequest generates a "aws/request.Request" representing the
  3753. // client's request for the PutFile operation. The "output" return
  3754. // value will be populated with the request's response once the request completes
  3755. // successfully.
  3756. //
  3757. // Use "Send" method on the returned Request to send the API call to the service.
  3758. // the "output" return value is not valid until after Send returns without error.
  3759. //
  3760. // See PutFile for more information on using the PutFile
  3761. // API call, and error handling.
  3762. //
  3763. // This method is useful when you want to inject custom logic or configuration
  3764. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3765. //
  3766. //
  3767. // // Example sending a request using the PutFileRequest method.
  3768. // req, resp := client.PutFileRequest(params)
  3769. //
  3770. // err := req.Send()
  3771. // if err == nil { // resp is now filled
  3772. // fmt.Println(resp)
  3773. // }
  3774. //
  3775. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PutFile
  3776. func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, output *PutFileOutput) {
  3777. op := &request.Operation{
  3778. Name: opPutFile,
  3779. HTTPMethod: "POST",
  3780. HTTPPath: "/",
  3781. }
  3782. if input == nil {
  3783. input = &PutFileInput{}
  3784. }
  3785. output = &PutFileOutput{}
  3786. req = c.newRequest(op, input, output)
  3787. return
  3788. }
  3789. // PutFile API operation for AWS CodeCommit.
  3790. //
  3791. // Adds or updates a file in a branch in an AWS CodeCommit repository, and generates
  3792. // a commit for the addition in the specified branch.
  3793. //
  3794. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3795. // with awserr.Error's Code and Message methods to get detailed information about
  3796. // the error.
  3797. //
  3798. // See the AWS API reference guide for AWS CodeCommit's
  3799. // API operation PutFile for usage and error information.
  3800. //
  3801. // Returned Error Codes:
  3802. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  3803. // A repository name is required but was not specified.
  3804. //
  3805. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  3806. // At least one specified repository name is not valid.
  3807. //
  3808. // This exception only occurs when a specified repository name is not valid.
  3809. // Other exceptions occur when a required repository parameter is missing, or
  3810. // when a specified repository does not exist.
  3811. //
  3812. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  3813. // The specified repository does not exist.
  3814. //
  3815. // * ErrCodeParentCommitIdRequiredException "ParentCommitIdRequiredException"
  3816. // A parent commit ID is required. To view the full commit ID of a branch in
  3817. // a repository, use GetBranch or a Git command (for example, git pull or git
  3818. // log).
  3819. //
  3820. // * ErrCodeInvalidParentCommitIdException "InvalidParentCommitIdException"
  3821. // The parent commit ID is not valid. The commit ID cannot be empty, and must
  3822. // match the head commit ID for the branch of the repository where you want
  3823. // to add or update a file.
  3824. //
  3825. // * ErrCodeParentCommitDoesNotExistException "ParentCommitDoesNotExistException"
  3826. // The parent commit ID is not valid because it does not exist. The specified
  3827. // parent commit ID does not exist in the specified branch of the repository.
  3828. //
  3829. // * ErrCodeParentCommitIdOutdatedException "ParentCommitIdOutdatedException"
  3830. // The file could not be added because the provided parent commit ID is not
  3831. // the current tip of the specified branch. To view the full commit ID of the
  3832. // current head of the branch, use GetBranch.
  3833. //
  3834. // * ErrCodeFileContentRequiredException "FileContentRequiredException"
  3835. // The file cannot be added because it is empty. Empty files cannot be added
  3836. // to the repository with this API.
  3837. //
  3838. // * ErrCodeFileContentSizeLimitExceededException "FileContentSizeLimitExceededException"
  3839. // The file cannot be added because it is too large. The maximum file size that
  3840. // can be added using PutFile is 6 MB. For files larger than 6 MB but smaller
  3841. // than 2 GB, add them using a Git client.
  3842. //
  3843. // * ErrCodePathRequiredException "PathRequiredException"
  3844. // The folderPath for a location cannot be null.
  3845. //
  3846. // * ErrCodeInvalidPathException "InvalidPathException"
  3847. // The specified path is not valid.
  3848. //
  3849. // * ErrCodeBranchNameRequiredException "BranchNameRequiredException"
  3850. // A branch name is required but was not specified.
  3851. //
  3852. // * ErrCodeInvalidBranchNameException "InvalidBranchNameException"
  3853. // The specified reference name is not valid.
  3854. //
  3855. // * ErrCodeBranchDoesNotExistException "BranchDoesNotExistException"
  3856. // The specified branch does not exist.
  3857. //
  3858. // * ErrCodeBranchNameIsTagNameException "BranchNameIsTagNameException"
  3859. // The specified branch name is not valid because it is a tag name. Type the
  3860. // name of a current branch in the repository. For a list of valid branch names,
  3861. // use ListBranches.
  3862. //
  3863. // * ErrCodeInvalidFileModeException "InvalidFileModeException"
  3864. // The specified file mode permission is not valid. For a list of valid file
  3865. // mode permissions, see PutFile.
  3866. //
  3867. // * ErrCodeNameLengthExceededException "NameLengthExceededException"
  3868. // The user name is not valid because it has exceeded the character limit for
  3869. // file names. File names, including the path to the file, cannot exceed the
  3870. // character limit.
  3871. //
  3872. // * ErrCodeInvalidEmailException "InvalidEmailException"
  3873. // The specified email address either contains one or more characters that are
  3874. // not allowed, or it exceeds the maximum number of characters allowed for an
  3875. // email address.
  3876. //
  3877. // * ErrCodeCommitMessageLengthExceededException "CommitMessageLengthExceededException"
  3878. // The commit message is too long. Provide a shorter string.
  3879. //
  3880. // * ErrCodeInvalidDeletionParameterException "InvalidDeletionParameterException"
  3881. // The specified deletion parameter is not valid.
  3882. //
  3883. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  3884. // An encryption integrity check failed.
  3885. //
  3886. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  3887. // An encryption key could not be accessed.
  3888. //
  3889. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  3890. // The encryption key is disabled.
  3891. //
  3892. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  3893. // No encryption key was found.
  3894. //
  3895. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  3896. // The encryption key is not available.
  3897. //
  3898. // * ErrCodeSameFileContentException "SameFileContentException"
  3899. // The file was not added or updated because the content of the file is exactly
  3900. // the same as the content of that file in the repository and branch that you
  3901. // specified.
  3902. //
  3903. // * ErrCodeFileNameConflictsWithDirectoryNameException "FileNameConflictsWithDirectoryNameException"
  3904. // A file cannot be added to the repository because the specified file name
  3905. // has the same name as a directory in this repository. Either provide another
  3906. // name for the file, or add the file in a directory that does not match the
  3907. // file name.
  3908. //
  3909. // * ErrCodeDirectoryNameConflictsWithFileNameException "DirectoryNameConflictsWithFileNameException"
  3910. // A file cannot be added to the repository because the specified path name
  3911. // has the same name as a file that already exists in this repository. Either
  3912. // provide a different name for the file, or specify a different path for the
  3913. // file.
  3914. //
  3915. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PutFile
  3916. func (c *CodeCommit) PutFile(input *PutFileInput) (*PutFileOutput, error) {
  3917. req, out := c.PutFileRequest(input)
  3918. return out, req.Send()
  3919. }
  3920. // PutFileWithContext is the same as PutFile with the addition of
  3921. // the ability to pass a context and additional request options.
  3922. //
  3923. // See PutFile for details on how to use this API operation.
  3924. //
  3925. // The context must be non-nil and will be used for request cancellation. If
  3926. // the context is nil a panic will occur. In the future the SDK may create
  3927. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3928. // for more information on using Contexts.
  3929. func (c *CodeCommit) PutFileWithContext(ctx aws.Context, input *PutFileInput, opts ...request.Option) (*PutFileOutput, error) {
  3930. req, out := c.PutFileRequest(input)
  3931. req.SetContext(ctx)
  3932. req.ApplyOptions(opts...)
  3933. return out, req.Send()
  3934. }
  3935. const opPutRepositoryTriggers = "PutRepositoryTriggers"
  3936. // PutRepositoryTriggersRequest generates a "aws/request.Request" representing the
  3937. // client's request for the PutRepositoryTriggers operation. The "output" return
  3938. // value will be populated with the request's response once the request completes
  3939. // successfully.
  3940. //
  3941. // Use "Send" method on the returned Request to send the API call to the service.
  3942. // the "output" return value is not valid until after Send returns without error.
  3943. //
  3944. // See PutRepositoryTriggers for more information on using the PutRepositoryTriggers
  3945. // API call, and error handling.
  3946. //
  3947. // This method is useful when you want to inject custom logic or configuration
  3948. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3949. //
  3950. //
  3951. // // Example sending a request using the PutRepositoryTriggersRequest method.
  3952. // req, resp := client.PutRepositoryTriggersRequest(params)
  3953. //
  3954. // err := req.Send()
  3955. // if err == nil { // resp is now filled
  3956. // fmt.Println(resp)
  3957. // }
  3958. //
  3959. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PutRepositoryTriggers
  3960. func (c *CodeCommit) PutRepositoryTriggersRequest(input *PutRepositoryTriggersInput) (req *request.Request, output *PutRepositoryTriggersOutput) {
  3961. op := &request.Operation{
  3962. Name: opPutRepositoryTriggers,
  3963. HTTPMethod: "POST",
  3964. HTTPPath: "/",
  3965. }
  3966. if input == nil {
  3967. input = &PutRepositoryTriggersInput{}
  3968. }
  3969. output = &PutRepositoryTriggersOutput{}
  3970. req = c.newRequest(op, input, output)
  3971. return
  3972. }
  3973. // PutRepositoryTriggers API operation for AWS CodeCommit.
  3974. //
  3975. // Replaces all triggers for a repository. This can be used to create or delete
  3976. // triggers.
  3977. //
  3978. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3979. // with awserr.Error's Code and Message methods to get detailed information about
  3980. // the error.
  3981. //
  3982. // See the AWS API reference guide for AWS CodeCommit's
  3983. // API operation PutRepositoryTriggers for usage and error information.
  3984. //
  3985. // Returned Error Codes:
  3986. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  3987. // The specified repository does not exist.
  3988. //
  3989. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  3990. // A repository name is required but was not specified.
  3991. //
  3992. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  3993. // At least one specified repository name is not valid.
  3994. //
  3995. // This exception only occurs when a specified repository name is not valid.
  3996. // Other exceptions occur when a required repository parameter is missing, or
  3997. // when a specified repository does not exist.
  3998. //
  3999. // * ErrCodeRepositoryTriggersListRequiredException "RepositoryTriggersListRequiredException"
  4000. // The list of triggers for the repository is required but was not specified.
  4001. //
  4002. // * ErrCodeMaximumRepositoryTriggersExceededException "MaximumRepositoryTriggersExceededException"
  4003. // The number of triggers allowed for the repository was exceeded.
  4004. //
  4005. // * ErrCodeInvalidRepositoryTriggerNameException "InvalidRepositoryTriggerNameException"
  4006. // The name of the trigger is not valid.
  4007. //
  4008. // * ErrCodeInvalidRepositoryTriggerDestinationArnException "InvalidRepositoryTriggerDestinationArnException"
  4009. // The Amazon Resource Name (ARN) for the trigger is not valid for the specified
  4010. // destination. The most common reason for this error is that the ARN does not
  4011. // meet the requirements for the service type.
  4012. //
  4013. // * ErrCodeInvalidRepositoryTriggerRegionException "InvalidRepositoryTriggerRegionException"
  4014. // The region for the trigger target does not match the region for the repository.
  4015. // Triggers must be created in the same region as the target for the trigger.
  4016. //
  4017. // * ErrCodeInvalidRepositoryTriggerCustomDataException "InvalidRepositoryTriggerCustomDataException"
  4018. // The custom data provided for the trigger is not valid.
  4019. //
  4020. // * ErrCodeMaximumBranchesExceededException "MaximumBranchesExceededException"
  4021. // The number of branches for the trigger was exceeded.
  4022. //
  4023. // * ErrCodeInvalidRepositoryTriggerBranchNameException "InvalidRepositoryTriggerBranchNameException"
  4024. // One or more branch names specified for the trigger is not valid.
  4025. //
  4026. // * ErrCodeInvalidRepositoryTriggerEventsException "InvalidRepositoryTriggerEventsException"
  4027. // One or more events specified for the trigger is not valid. Check to make
  4028. // sure that all events specified match the requirements for allowed events.
  4029. //
  4030. // * ErrCodeRepositoryTriggerNameRequiredException "RepositoryTriggerNameRequiredException"
  4031. // A name for the trigger is required but was not specified.
  4032. //
  4033. // * ErrCodeRepositoryTriggerDestinationArnRequiredException "RepositoryTriggerDestinationArnRequiredException"
  4034. // A destination ARN for the target service for the trigger is required but
  4035. // was not specified.
  4036. //
  4037. // * ErrCodeRepositoryTriggerBranchNameListRequiredException "RepositoryTriggerBranchNameListRequiredException"
  4038. // At least one branch name is required but was not specified in the trigger
  4039. // configuration.
  4040. //
  4041. // * ErrCodeRepositoryTriggerEventsListRequiredException "RepositoryTriggerEventsListRequiredException"
  4042. // At least one event for the trigger is required but was not specified.
  4043. //
  4044. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  4045. // An encryption integrity check failed.
  4046. //
  4047. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  4048. // An encryption key could not be accessed.
  4049. //
  4050. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  4051. // The encryption key is disabled.
  4052. //
  4053. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  4054. // No encryption key was found.
  4055. //
  4056. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  4057. // The encryption key is not available.
  4058. //
  4059. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PutRepositoryTriggers
  4060. func (c *CodeCommit) PutRepositoryTriggers(input *PutRepositoryTriggersInput) (*PutRepositoryTriggersOutput, error) {
  4061. req, out := c.PutRepositoryTriggersRequest(input)
  4062. return out, req.Send()
  4063. }
  4064. // PutRepositoryTriggersWithContext is the same as PutRepositoryTriggers with the addition of
  4065. // the ability to pass a context and additional request options.
  4066. //
  4067. // See PutRepositoryTriggers for details on how to use this API operation.
  4068. //
  4069. // The context must be non-nil and will be used for request cancellation. If
  4070. // the context is nil a panic will occur. In the future the SDK may create
  4071. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4072. // for more information on using Contexts.
  4073. func (c *CodeCommit) PutRepositoryTriggersWithContext(ctx aws.Context, input *PutRepositoryTriggersInput, opts ...request.Option) (*PutRepositoryTriggersOutput, error) {
  4074. req, out := c.PutRepositoryTriggersRequest(input)
  4075. req.SetContext(ctx)
  4076. req.ApplyOptions(opts...)
  4077. return out, req.Send()
  4078. }
  4079. const opTestRepositoryTriggers = "TestRepositoryTriggers"
  4080. // TestRepositoryTriggersRequest generates a "aws/request.Request" representing the
  4081. // client's request for the TestRepositoryTriggers operation. The "output" return
  4082. // value will be populated with the request's response once the request completes
  4083. // successfully.
  4084. //
  4085. // Use "Send" method on the returned Request to send the API call to the service.
  4086. // the "output" return value is not valid until after Send returns without error.
  4087. //
  4088. // See TestRepositoryTriggers for more information on using the TestRepositoryTriggers
  4089. // API call, and error handling.
  4090. //
  4091. // This method is useful when you want to inject custom logic or configuration
  4092. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4093. //
  4094. //
  4095. // // Example sending a request using the TestRepositoryTriggersRequest method.
  4096. // req, resp := client.TestRepositoryTriggersRequest(params)
  4097. //
  4098. // err := req.Send()
  4099. // if err == nil { // resp is now filled
  4100. // fmt.Println(resp)
  4101. // }
  4102. //
  4103. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/TestRepositoryTriggers
  4104. func (c *CodeCommit) TestRepositoryTriggersRequest(input *TestRepositoryTriggersInput) (req *request.Request, output *TestRepositoryTriggersOutput) {
  4105. op := &request.Operation{
  4106. Name: opTestRepositoryTriggers,
  4107. HTTPMethod: "POST",
  4108. HTTPPath: "/",
  4109. }
  4110. if input == nil {
  4111. input = &TestRepositoryTriggersInput{}
  4112. }
  4113. output = &TestRepositoryTriggersOutput{}
  4114. req = c.newRequest(op, input, output)
  4115. return
  4116. }
  4117. // TestRepositoryTriggers API operation for AWS CodeCommit.
  4118. //
  4119. // Tests the functionality of repository triggers by sending information to
  4120. // the trigger target. If real data is available in the repository, the test
  4121. // will send data from the last commit. If no data is available, sample data
  4122. // will be generated.
  4123. //
  4124. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4125. // with awserr.Error's Code and Message methods to get detailed information about
  4126. // the error.
  4127. //
  4128. // See the AWS API reference guide for AWS CodeCommit's
  4129. // API operation TestRepositoryTriggers for usage and error information.
  4130. //
  4131. // Returned Error Codes:
  4132. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  4133. // The specified repository does not exist.
  4134. //
  4135. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  4136. // A repository name is required but was not specified.
  4137. //
  4138. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  4139. // At least one specified repository name is not valid.
  4140. //
  4141. // This exception only occurs when a specified repository name is not valid.
  4142. // Other exceptions occur when a required repository parameter is missing, or
  4143. // when a specified repository does not exist.
  4144. //
  4145. // * ErrCodeRepositoryTriggersListRequiredException "RepositoryTriggersListRequiredException"
  4146. // The list of triggers for the repository is required but was not specified.
  4147. //
  4148. // * ErrCodeMaximumRepositoryTriggersExceededException "MaximumRepositoryTriggersExceededException"
  4149. // The number of triggers allowed for the repository was exceeded.
  4150. //
  4151. // * ErrCodeInvalidRepositoryTriggerNameException "InvalidRepositoryTriggerNameException"
  4152. // The name of the trigger is not valid.
  4153. //
  4154. // * ErrCodeInvalidRepositoryTriggerDestinationArnException "InvalidRepositoryTriggerDestinationArnException"
  4155. // The Amazon Resource Name (ARN) for the trigger is not valid for the specified
  4156. // destination. The most common reason for this error is that the ARN does not
  4157. // meet the requirements for the service type.
  4158. //
  4159. // * ErrCodeInvalidRepositoryTriggerRegionException "InvalidRepositoryTriggerRegionException"
  4160. // The region for the trigger target does not match the region for the repository.
  4161. // Triggers must be created in the same region as the target for the trigger.
  4162. //
  4163. // * ErrCodeInvalidRepositoryTriggerCustomDataException "InvalidRepositoryTriggerCustomDataException"
  4164. // The custom data provided for the trigger is not valid.
  4165. //
  4166. // * ErrCodeMaximumBranchesExceededException "MaximumBranchesExceededException"
  4167. // The number of branches for the trigger was exceeded.
  4168. //
  4169. // * ErrCodeInvalidRepositoryTriggerBranchNameException "InvalidRepositoryTriggerBranchNameException"
  4170. // One or more branch names specified for the trigger is not valid.
  4171. //
  4172. // * ErrCodeInvalidRepositoryTriggerEventsException "InvalidRepositoryTriggerEventsException"
  4173. // One or more events specified for the trigger is not valid. Check to make
  4174. // sure that all events specified match the requirements for allowed events.
  4175. //
  4176. // * ErrCodeRepositoryTriggerNameRequiredException "RepositoryTriggerNameRequiredException"
  4177. // A name for the trigger is required but was not specified.
  4178. //
  4179. // * ErrCodeRepositoryTriggerDestinationArnRequiredException "RepositoryTriggerDestinationArnRequiredException"
  4180. // A destination ARN for the target service for the trigger is required but
  4181. // was not specified.
  4182. //
  4183. // * ErrCodeRepositoryTriggerBranchNameListRequiredException "RepositoryTriggerBranchNameListRequiredException"
  4184. // At least one branch name is required but was not specified in the trigger
  4185. // configuration.
  4186. //
  4187. // * ErrCodeRepositoryTriggerEventsListRequiredException "RepositoryTriggerEventsListRequiredException"
  4188. // At least one event for the trigger is required but was not specified.
  4189. //
  4190. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  4191. // An encryption integrity check failed.
  4192. //
  4193. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  4194. // An encryption key could not be accessed.
  4195. //
  4196. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  4197. // The encryption key is disabled.
  4198. //
  4199. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  4200. // No encryption key was found.
  4201. //
  4202. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  4203. // The encryption key is not available.
  4204. //
  4205. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/TestRepositoryTriggers
  4206. func (c *CodeCommit) TestRepositoryTriggers(input *TestRepositoryTriggersInput) (*TestRepositoryTriggersOutput, error) {
  4207. req, out := c.TestRepositoryTriggersRequest(input)
  4208. return out, req.Send()
  4209. }
  4210. // TestRepositoryTriggersWithContext is the same as TestRepositoryTriggers with the addition of
  4211. // the ability to pass a context and additional request options.
  4212. //
  4213. // See TestRepositoryTriggers for details on how to use this API operation.
  4214. //
  4215. // The context must be non-nil and will be used for request cancellation. If
  4216. // the context is nil a panic will occur. In the future the SDK may create
  4217. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4218. // for more information on using Contexts.
  4219. func (c *CodeCommit) TestRepositoryTriggersWithContext(ctx aws.Context, input *TestRepositoryTriggersInput, opts ...request.Option) (*TestRepositoryTriggersOutput, error) {
  4220. req, out := c.TestRepositoryTriggersRequest(input)
  4221. req.SetContext(ctx)
  4222. req.ApplyOptions(opts...)
  4223. return out, req.Send()
  4224. }
  4225. const opUpdateComment = "UpdateComment"
  4226. // UpdateCommentRequest generates a "aws/request.Request" representing the
  4227. // client's request for the UpdateComment operation. The "output" return
  4228. // value will be populated with the request's response once the request completes
  4229. // successfully.
  4230. //
  4231. // Use "Send" method on the returned Request to send the API call to the service.
  4232. // the "output" return value is not valid until after Send returns without error.
  4233. //
  4234. // See UpdateComment for more information on using the UpdateComment
  4235. // API call, and error handling.
  4236. //
  4237. // This method is useful when you want to inject custom logic or configuration
  4238. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4239. //
  4240. //
  4241. // // Example sending a request using the UpdateCommentRequest method.
  4242. // req, resp := client.UpdateCommentRequest(params)
  4243. //
  4244. // err := req.Send()
  4245. // if err == nil { // resp is now filled
  4246. // fmt.Println(resp)
  4247. // }
  4248. //
  4249. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateComment
  4250. func (c *CodeCommit) UpdateCommentRequest(input *UpdateCommentInput) (req *request.Request, output *UpdateCommentOutput) {
  4251. op := &request.Operation{
  4252. Name: opUpdateComment,
  4253. HTTPMethod: "POST",
  4254. HTTPPath: "/",
  4255. }
  4256. if input == nil {
  4257. input = &UpdateCommentInput{}
  4258. }
  4259. output = &UpdateCommentOutput{}
  4260. req = c.newRequest(op, input, output)
  4261. return
  4262. }
  4263. // UpdateComment API operation for AWS CodeCommit.
  4264. //
  4265. // Replaces the contents of a comment.
  4266. //
  4267. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4268. // with awserr.Error's Code and Message methods to get detailed information about
  4269. // the error.
  4270. //
  4271. // See the AWS API reference guide for AWS CodeCommit's
  4272. // API operation UpdateComment for usage and error information.
  4273. //
  4274. // Returned Error Codes:
  4275. // * ErrCodeCommentContentRequiredException "CommentContentRequiredException"
  4276. // The comment is empty. You must provide some content for a comment. The content
  4277. // cannot be null.
  4278. //
  4279. // * ErrCodeCommentContentSizeLimitExceededException "CommentContentSizeLimitExceededException"
  4280. // The comment is too large. Comments are limited to 1,000 characters.
  4281. //
  4282. // * ErrCodeCommentDoesNotExistException "CommentDoesNotExistException"
  4283. // No comment exists with the provided ID. Verify that you have provided the
  4284. // correct ID, and then try again.
  4285. //
  4286. // * ErrCodeCommentIdRequiredException "CommentIdRequiredException"
  4287. // The comment ID is missing or null. A comment ID is required.
  4288. //
  4289. // * ErrCodeInvalidCommentIdException "InvalidCommentIdException"
  4290. // The comment ID is not in a valid format. Make sure that you have provided
  4291. // the full comment ID.
  4292. //
  4293. // * ErrCodeCommentNotCreatedByCallerException "CommentNotCreatedByCallerException"
  4294. // You cannot modify or delete this comment. Only comment authors can modify
  4295. // or delete their comments.
  4296. //
  4297. // * ErrCodeCommentDeletedException "CommentDeletedException"
  4298. // This comment has already been deleted. You cannot edit or delete a deleted
  4299. // comment.
  4300. //
  4301. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateComment
  4302. func (c *CodeCommit) UpdateComment(input *UpdateCommentInput) (*UpdateCommentOutput, error) {
  4303. req, out := c.UpdateCommentRequest(input)
  4304. return out, req.Send()
  4305. }
  4306. // UpdateCommentWithContext is the same as UpdateComment with the addition of
  4307. // the ability to pass a context and additional request options.
  4308. //
  4309. // See UpdateComment for details on how to use this API operation.
  4310. //
  4311. // The context must be non-nil and will be used for request cancellation. If
  4312. // the context is nil a panic will occur. In the future the SDK may create
  4313. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4314. // for more information on using Contexts.
  4315. func (c *CodeCommit) UpdateCommentWithContext(ctx aws.Context, input *UpdateCommentInput, opts ...request.Option) (*UpdateCommentOutput, error) {
  4316. req, out := c.UpdateCommentRequest(input)
  4317. req.SetContext(ctx)
  4318. req.ApplyOptions(opts...)
  4319. return out, req.Send()
  4320. }
  4321. const opUpdateDefaultBranch = "UpdateDefaultBranch"
  4322. // UpdateDefaultBranchRequest generates a "aws/request.Request" representing the
  4323. // client's request for the UpdateDefaultBranch operation. The "output" return
  4324. // value will be populated with the request's response once the request completes
  4325. // successfully.
  4326. //
  4327. // Use "Send" method on the returned Request to send the API call to the service.
  4328. // the "output" return value is not valid until after Send returns without error.
  4329. //
  4330. // See UpdateDefaultBranch for more information on using the UpdateDefaultBranch
  4331. // API call, and error handling.
  4332. //
  4333. // This method is useful when you want to inject custom logic or configuration
  4334. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4335. //
  4336. //
  4337. // // Example sending a request using the UpdateDefaultBranchRequest method.
  4338. // req, resp := client.UpdateDefaultBranchRequest(params)
  4339. //
  4340. // err := req.Send()
  4341. // if err == nil { // resp is now filled
  4342. // fmt.Println(resp)
  4343. // }
  4344. //
  4345. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateDefaultBranch
  4346. func (c *CodeCommit) UpdateDefaultBranchRequest(input *UpdateDefaultBranchInput) (req *request.Request, output *UpdateDefaultBranchOutput) {
  4347. op := &request.Operation{
  4348. Name: opUpdateDefaultBranch,
  4349. HTTPMethod: "POST",
  4350. HTTPPath: "/",
  4351. }
  4352. if input == nil {
  4353. input = &UpdateDefaultBranchInput{}
  4354. }
  4355. output = &UpdateDefaultBranchOutput{}
  4356. req = c.newRequest(op, input, output)
  4357. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4358. return
  4359. }
  4360. // UpdateDefaultBranch API operation for AWS CodeCommit.
  4361. //
  4362. // Sets or changes the default branch name for the specified repository.
  4363. //
  4364. // If you use this operation to change the default branch name to the current
  4365. // default branch name, a success message is returned even though the default
  4366. // branch did not change.
  4367. //
  4368. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4369. // with awserr.Error's Code and Message methods to get detailed information about
  4370. // the error.
  4371. //
  4372. // See the AWS API reference guide for AWS CodeCommit's
  4373. // API operation UpdateDefaultBranch for usage and error information.
  4374. //
  4375. // Returned Error Codes:
  4376. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  4377. // A repository name is required but was not specified.
  4378. //
  4379. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  4380. // The specified repository does not exist.
  4381. //
  4382. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  4383. // At least one specified repository name is not valid.
  4384. //
  4385. // This exception only occurs when a specified repository name is not valid.
  4386. // Other exceptions occur when a required repository parameter is missing, or
  4387. // when a specified repository does not exist.
  4388. //
  4389. // * ErrCodeBranchNameRequiredException "BranchNameRequiredException"
  4390. // A branch name is required but was not specified.
  4391. //
  4392. // * ErrCodeInvalidBranchNameException "InvalidBranchNameException"
  4393. // The specified reference name is not valid.
  4394. //
  4395. // * ErrCodeBranchDoesNotExistException "BranchDoesNotExistException"
  4396. // The specified branch does not exist.
  4397. //
  4398. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  4399. // An encryption integrity check failed.
  4400. //
  4401. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  4402. // An encryption key could not be accessed.
  4403. //
  4404. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  4405. // The encryption key is disabled.
  4406. //
  4407. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  4408. // No encryption key was found.
  4409. //
  4410. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  4411. // The encryption key is not available.
  4412. //
  4413. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateDefaultBranch
  4414. func (c *CodeCommit) UpdateDefaultBranch(input *UpdateDefaultBranchInput) (*UpdateDefaultBranchOutput, error) {
  4415. req, out := c.UpdateDefaultBranchRequest(input)
  4416. return out, req.Send()
  4417. }
  4418. // UpdateDefaultBranchWithContext is the same as UpdateDefaultBranch with the addition of
  4419. // the ability to pass a context and additional request options.
  4420. //
  4421. // See UpdateDefaultBranch for details on how to use this API operation.
  4422. //
  4423. // The context must be non-nil and will be used for request cancellation. If
  4424. // the context is nil a panic will occur. In the future the SDK may create
  4425. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4426. // for more information on using Contexts.
  4427. func (c *CodeCommit) UpdateDefaultBranchWithContext(ctx aws.Context, input *UpdateDefaultBranchInput, opts ...request.Option) (*UpdateDefaultBranchOutput, error) {
  4428. req, out := c.UpdateDefaultBranchRequest(input)
  4429. req.SetContext(ctx)
  4430. req.ApplyOptions(opts...)
  4431. return out, req.Send()
  4432. }
  4433. const opUpdatePullRequestDescription = "UpdatePullRequestDescription"
  4434. // UpdatePullRequestDescriptionRequest generates a "aws/request.Request" representing the
  4435. // client's request for the UpdatePullRequestDescription operation. The "output" return
  4436. // value will be populated with the request's response once the request completes
  4437. // successfully.
  4438. //
  4439. // Use "Send" method on the returned Request to send the API call to the service.
  4440. // the "output" return value is not valid until after Send returns without error.
  4441. //
  4442. // See UpdatePullRequestDescription for more information on using the UpdatePullRequestDescription
  4443. // API call, and error handling.
  4444. //
  4445. // This method is useful when you want to inject custom logic or configuration
  4446. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4447. //
  4448. //
  4449. // // Example sending a request using the UpdatePullRequestDescriptionRequest method.
  4450. // req, resp := client.UpdatePullRequestDescriptionRequest(params)
  4451. //
  4452. // err := req.Send()
  4453. // if err == nil { // resp is now filled
  4454. // fmt.Println(resp)
  4455. // }
  4456. //
  4457. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestDescription
  4458. func (c *CodeCommit) UpdatePullRequestDescriptionRequest(input *UpdatePullRequestDescriptionInput) (req *request.Request, output *UpdatePullRequestDescriptionOutput) {
  4459. op := &request.Operation{
  4460. Name: opUpdatePullRequestDescription,
  4461. HTTPMethod: "POST",
  4462. HTTPPath: "/",
  4463. }
  4464. if input == nil {
  4465. input = &UpdatePullRequestDescriptionInput{}
  4466. }
  4467. output = &UpdatePullRequestDescriptionOutput{}
  4468. req = c.newRequest(op, input, output)
  4469. return
  4470. }
  4471. // UpdatePullRequestDescription API operation for AWS CodeCommit.
  4472. //
  4473. // Replaces the contents of the description of a pull request.
  4474. //
  4475. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4476. // with awserr.Error's Code and Message methods to get detailed information about
  4477. // the error.
  4478. //
  4479. // See the AWS API reference guide for AWS CodeCommit's
  4480. // API operation UpdatePullRequestDescription for usage and error information.
  4481. //
  4482. // Returned Error Codes:
  4483. // * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException"
  4484. // The pull request ID could not be found. Make sure that you have specified
  4485. // the correct repository name and pull request ID, and then try again.
  4486. //
  4487. // * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException"
  4488. // The pull request ID is not valid. Make sure that you have provided the full
  4489. // ID and that the pull request is in the specified repository, and then try
  4490. // again.
  4491. //
  4492. // * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException"
  4493. // A pull request ID is required, but none was provided.
  4494. //
  4495. // * ErrCodeInvalidDescriptionException "InvalidDescriptionException"
  4496. // The pull request description is not valid. Descriptions are limited to 1,000
  4497. // characters in length.
  4498. //
  4499. // * ErrCodePullRequestAlreadyClosedException "PullRequestAlreadyClosedException"
  4500. // The pull request status cannot be updated because it is already closed.
  4501. //
  4502. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestDescription
  4503. func (c *CodeCommit) UpdatePullRequestDescription(input *UpdatePullRequestDescriptionInput) (*UpdatePullRequestDescriptionOutput, error) {
  4504. req, out := c.UpdatePullRequestDescriptionRequest(input)
  4505. return out, req.Send()
  4506. }
  4507. // UpdatePullRequestDescriptionWithContext is the same as UpdatePullRequestDescription with the addition of
  4508. // the ability to pass a context and additional request options.
  4509. //
  4510. // See UpdatePullRequestDescription for details on how to use this API operation.
  4511. //
  4512. // The context must be non-nil and will be used for request cancellation. If
  4513. // the context is nil a panic will occur. In the future the SDK may create
  4514. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4515. // for more information on using Contexts.
  4516. func (c *CodeCommit) UpdatePullRequestDescriptionWithContext(ctx aws.Context, input *UpdatePullRequestDescriptionInput, opts ...request.Option) (*UpdatePullRequestDescriptionOutput, error) {
  4517. req, out := c.UpdatePullRequestDescriptionRequest(input)
  4518. req.SetContext(ctx)
  4519. req.ApplyOptions(opts...)
  4520. return out, req.Send()
  4521. }
  4522. const opUpdatePullRequestStatus = "UpdatePullRequestStatus"
  4523. // UpdatePullRequestStatusRequest generates a "aws/request.Request" representing the
  4524. // client's request for the UpdatePullRequestStatus operation. The "output" return
  4525. // value will be populated with the request's response once the request completes
  4526. // successfully.
  4527. //
  4528. // Use "Send" method on the returned Request to send the API call to the service.
  4529. // the "output" return value is not valid until after Send returns without error.
  4530. //
  4531. // See UpdatePullRequestStatus for more information on using the UpdatePullRequestStatus
  4532. // API call, and error handling.
  4533. //
  4534. // This method is useful when you want to inject custom logic or configuration
  4535. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4536. //
  4537. //
  4538. // // Example sending a request using the UpdatePullRequestStatusRequest method.
  4539. // req, resp := client.UpdatePullRequestStatusRequest(params)
  4540. //
  4541. // err := req.Send()
  4542. // if err == nil { // resp is now filled
  4543. // fmt.Println(resp)
  4544. // }
  4545. //
  4546. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestStatus
  4547. func (c *CodeCommit) UpdatePullRequestStatusRequest(input *UpdatePullRequestStatusInput) (req *request.Request, output *UpdatePullRequestStatusOutput) {
  4548. op := &request.Operation{
  4549. Name: opUpdatePullRequestStatus,
  4550. HTTPMethod: "POST",
  4551. HTTPPath: "/",
  4552. }
  4553. if input == nil {
  4554. input = &UpdatePullRequestStatusInput{}
  4555. }
  4556. output = &UpdatePullRequestStatusOutput{}
  4557. req = c.newRequest(op, input, output)
  4558. return
  4559. }
  4560. // UpdatePullRequestStatus API operation for AWS CodeCommit.
  4561. //
  4562. // Updates the status of a pull request.
  4563. //
  4564. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4565. // with awserr.Error's Code and Message methods to get detailed information about
  4566. // the error.
  4567. //
  4568. // See the AWS API reference guide for AWS CodeCommit's
  4569. // API operation UpdatePullRequestStatus for usage and error information.
  4570. //
  4571. // Returned Error Codes:
  4572. // * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException"
  4573. // The pull request ID could not be found. Make sure that you have specified
  4574. // the correct repository name and pull request ID, and then try again.
  4575. //
  4576. // * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException"
  4577. // The pull request ID is not valid. Make sure that you have provided the full
  4578. // ID and that the pull request is in the specified repository, and then try
  4579. // again.
  4580. //
  4581. // * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException"
  4582. // A pull request ID is required, but none was provided.
  4583. //
  4584. // * ErrCodeInvalidPullRequestStatusUpdateException "InvalidPullRequestStatusUpdateException"
  4585. // The pull request status update is not valid. The only valid update is from
  4586. // OPEN to CLOSED.
  4587. //
  4588. // * ErrCodeInvalidPullRequestStatusException "InvalidPullRequestStatusException"
  4589. // The pull request status is not valid. The only valid values are OPEN and
  4590. // CLOSED.
  4591. //
  4592. // * ErrCodePullRequestStatusRequiredException "PullRequestStatusRequiredException"
  4593. // A pull request status is required, but none was provided.
  4594. //
  4595. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  4596. // An encryption integrity check failed.
  4597. //
  4598. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  4599. // An encryption key could not be accessed.
  4600. //
  4601. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  4602. // The encryption key is disabled.
  4603. //
  4604. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  4605. // No encryption key was found.
  4606. //
  4607. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  4608. // The encryption key is not available.
  4609. //
  4610. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestStatus
  4611. func (c *CodeCommit) UpdatePullRequestStatus(input *UpdatePullRequestStatusInput) (*UpdatePullRequestStatusOutput, error) {
  4612. req, out := c.UpdatePullRequestStatusRequest(input)
  4613. return out, req.Send()
  4614. }
  4615. // UpdatePullRequestStatusWithContext is the same as UpdatePullRequestStatus with the addition of
  4616. // the ability to pass a context and additional request options.
  4617. //
  4618. // See UpdatePullRequestStatus for details on how to use this API operation.
  4619. //
  4620. // The context must be non-nil and will be used for request cancellation. If
  4621. // the context is nil a panic will occur. In the future the SDK may create
  4622. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4623. // for more information on using Contexts.
  4624. func (c *CodeCommit) UpdatePullRequestStatusWithContext(ctx aws.Context, input *UpdatePullRequestStatusInput, opts ...request.Option) (*UpdatePullRequestStatusOutput, error) {
  4625. req, out := c.UpdatePullRequestStatusRequest(input)
  4626. req.SetContext(ctx)
  4627. req.ApplyOptions(opts...)
  4628. return out, req.Send()
  4629. }
  4630. const opUpdatePullRequestTitle = "UpdatePullRequestTitle"
  4631. // UpdatePullRequestTitleRequest generates a "aws/request.Request" representing the
  4632. // client's request for the UpdatePullRequestTitle operation. The "output" return
  4633. // value will be populated with the request's response once the request completes
  4634. // successfully.
  4635. //
  4636. // Use "Send" method on the returned Request to send the API call to the service.
  4637. // the "output" return value is not valid until after Send returns without error.
  4638. //
  4639. // See UpdatePullRequestTitle for more information on using the UpdatePullRequestTitle
  4640. // API call, and error handling.
  4641. //
  4642. // This method is useful when you want to inject custom logic or configuration
  4643. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4644. //
  4645. //
  4646. // // Example sending a request using the UpdatePullRequestTitleRequest method.
  4647. // req, resp := client.UpdatePullRequestTitleRequest(params)
  4648. //
  4649. // err := req.Send()
  4650. // if err == nil { // resp is now filled
  4651. // fmt.Println(resp)
  4652. // }
  4653. //
  4654. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestTitle
  4655. func (c *CodeCommit) UpdatePullRequestTitleRequest(input *UpdatePullRequestTitleInput) (req *request.Request, output *UpdatePullRequestTitleOutput) {
  4656. op := &request.Operation{
  4657. Name: opUpdatePullRequestTitle,
  4658. HTTPMethod: "POST",
  4659. HTTPPath: "/",
  4660. }
  4661. if input == nil {
  4662. input = &UpdatePullRequestTitleInput{}
  4663. }
  4664. output = &UpdatePullRequestTitleOutput{}
  4665. req = c.newRequest(op, input, output)
  4666. return
  4667. }
  4668. // UpdatePullRequestTitle API operation for AWS CodeCommit.
  4669. //
  4670. // Replaces the title of a pull request.
  4671. //
  4672. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4673. // with awserr.Error's Code and Message methods to get detailed information about
  4674. // the error.
  4675. //
  4676. // See the AWS API reference guide for AWS CodeCommit's
  4677. // API operation UpdatePullRequestTitle for usage and error information.
  4678. //
  4679. // Returned Error Codes:
  4680. // * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException"
  4681. // The pull request ID could not be found. Make sure that you have specified
  4682. // the correct repository name and pull request ID, and then try again.
  4683. //
  4684. // * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException"
  4685. // The pull request ID is not valid. Make sure that you have provided the full
  4686. // ID and that the pull request is in the specified repository, and then try
  4687. // again.
  4688. //
  4689. // * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException"
  4690. // A pull request ID is required, but none was provided.
  4691. //
  4692. // * ErrCodeTitleRequiredException "TitleRequiredException"
  4693. // A pull request title is required. It cannot be empty or null.
  4694. //
  4695. // * ErrCodeInvalidTitleException "InvalidTitleException"
  4696. // The title of the pull request is not valid. Pull request titles cannot exceed
  4697. // 100 characters in length.
  4698. //
  4699. // * ErrCodePullRequestAlreadyClosedException "PullRequestAlreadyClosedException"
  4700. // The pull request status cannot be updated because it is already closed.
  4701. //
  4702. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdatePullRequestTitle
  4703. func (c *CodeCommit) UpdatePullRequestTitle(input *UpdatePullRequestTitleInput) (*UpdatePullRequestTitleOutput, error) {
  4704. req, out := c.UpdatePullRequestTitleRequest(input)
  4705. return out, req.Send()
  4706. }
  4707. // UpdatePullRequestTitleWithContext is the same as UpdatePullRequestTitle with the addition of
  4708. // the ability to pass a context and additional request options.
  4709. //
  4710. // See UpdatePullRequestTitle for details on how to use this API operation.
  4711. //
  4712. // The context must be non-nil and will be used for request cancellation. If
  4713. // the context is nil a panic will occur. In the future the SDK may create
  4714. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4715. // for more information on using Contexts.
  4716. func (c *CodeCommit) UpdatePullRequestTitleWithContext(ctx aws.Context, input *UpdatePullRequestTitleInput, opts ...request.Option) (*UpdatePullRequestTitleOutput, error) {
  4717. req, out := c.UpdatePullRequestTitleRequest(input)
  4718. req.SetContext(ctx)
  4719. req.ApplyOptions(opts...)
  4720. return out, req.Send()
  4721. }
  4722. const opUpdateRepositoryDescription = "UpdateRepositoryDescription"
  4723. // UpdateRepositoryDescriptionRequest generates a "aws/request.Request" representing the
  4724. // client's request for the UpdateRepositoryDescription operation. The "output" return
  4725. // value will be populated with the request's response once the request completes
  4726. // successfully.
  4727. //
  4728. // Use "Send" method on the returned Request to send the API call to the service.
  4729. // the "output" return value is not valid until after Send returns without error.
  4730. //
  4731. // See UpdateRepositoryDescription for more information on using the UpdateRepositoryDescription
  4732. // API call, and error handling.
  4733. //
  4734. // This method is useful when you want to inject custom logic or configuration
  4735. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4736. //
  4737. //
  4738. // // Example sending a request using the UpdateRepositoryDescriptionRequest method.
  4739. // req, resp := client.UpdateRepositoryDescriptionRequest(params)
  4740. //
  4741. // err := req.Send()
  4742. // if err == nil { // resp is now filled
  4743. // fmt.Println(resp)
  4744. // }
  4745. //
  4746. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateRepositoryDescription
  4747. func (c *CodeCommit) UpdateRepositoryDescriptionRequest(input *UpdateRepositoryDescriptionInput) (req *request.Request, output *UpdateRepositoryDescriptionOutput) {
  4748. op := &request.Operation{
  4749. Name: opUpdateRepositoryDescription,
  4750. HTTPMethod: "POST",
  4751. HTTPPath: "/",
  4752. }
  4753. if input == nil {
  4754. input = &UpdateRepositoryDescriptionInput{}
  4755. }
  4756. output = &UpdateRepositoryDescriptionOutput{}
  4757. req = c.newRequest(op, input, output)
  4758. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4759. return
  4760. }
  4761. // UpdateRepositoryDescription API operation for AWS CodeCommit.
  4762. //
  4763. // Sets or changes the comment or description for a repository.
  4764. //
  4765. // The description field for a repository accepts all HTML characters and all
  4766. // valid Unicode characters. Applications that do not HTML-encode the description
  4767. // and display it in a web page could expose users to potentially malicious
  4768. // code. Make sure that you HTML-encode the description field in any application
  4769. // that uses this API to display the repository description on a web page.
  4770. //
  4771. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4772. // with awserr.Error's Code and Message methods to get detailed information about
  4773. // the error.
  4774. //
  4775. // See the AWS API reference guide for AWS CodeCommit's
  4776. // API operation UpdateRepositoryDescription for usage and error information.
  4777. //
  4778. // Returned Error Codes:
  4779. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  4780. // A repository name is required but was not specified.
  4781. //
  4782. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  4783. // The specified repository does not exist.
  4784. //
  4785. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  4786. // At least one specified repository name is not valid.
  4787. //
  4788. // This exception only occurs when a specified repository name is not valid.
  4789. // Other exceptions occur when a required repository parameter is missing, or
  4790. // when a specified repository does not exist.
  4791. //
  4792. // * ErrCodeInvalidRepositoryDescriptionException "InvalidRepositoryDescriptionException"
  4793. // The specified repository description is not valid.
  4794. //
  4795. // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException"
  4796. // An encryption integrity check failed.
  4797. //
  4798. // * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException"
  4799. // An encryption key could not be accessed.
  4800. //
  4801. // * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException"
  4802. // The encryption key is disabled.
  4803. //
  4804. // * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException"
  4805. // No encryption key was found.
  4806. //
  4807. // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException"
  4808. // The encryption key is not available.
  4809. //
  4810. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateRepositoryDescription
  4811. func (c *CodeCommit) UpdateRepositoryDescription(input *UpdateRepositoryDescriptionInput) (*UpdateRepositoryDescriptionOutput, error) {
  4812. req, out := c.UpdateRepositoryDescriptionRequest(input)
  4813. return out, req.Send()
  4814. }
  4815. // UpdateRepositoryDescriptionWithContext is the same as UpdateRepositoryDescription with the addition of
  4816. // the ability to pass a context and additional request options.
  4817. //
  4818. // See UpdateRepositoryDescription for details on how to use this API operation.
  4819. //
  4820. // The context must be non-nil and will be used for request cancellation. If
  4821. // the context is nil a panic will occur. In the future the SDK may create
  4822. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4823. // for more information on using Contexts.
  4824. func (c *CodeCommit) UpdateRepositoryDescriptionWithContext(ctx aws.Context, input *UpdateRepositoryDescriptionInput, opts ...request.Option) (*UpdateRepositoryDescriptionOutput, error) {
  4825. req, out := c.UpdateRepositoryDescriptionRequest(input)
  4826. req.SetContext(ctx)
  4827. req.ApplyOptions(opts...)
  4828. return out, req.Send()
  4829. }
  4830. const opUpdateRepositoryName = "UpdateRepositoryName"
  4831. // UpdateRepositoryNameRequest generates a "aws/request.Request" representing the
  4832. // client's request for the UpdateRepositoryName operation. The "output" return
  4833. // value will be populated with the request's response once the request completes
  4834. // successfully.
  4835. //
  4836. // Use "Send" method on the returned Request to send the API call to the service.
  4837. // the "output" return value is not valid until after Send returns without error.
  4838. //
  4839. // See UpdateRepositoryName for more information on using the UpdateRepositoryName
  4840. // API call, and error handling.
  4841. //
  4842. // This method is useful when you want to inject custom logic or configuration
  4843. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4844. //
  4845. //
  4846. // // Example sending a request using the UpdateRepositoryNameRequest method.
  4847. // req, resp := client.UpdateRepositoryNameRequest(params)
  4848. //
  4849. // err := req.Send()
  4850. // if err == nil { // resp is now filled
  4851. // fmt.Println(resp)
  4852. // }
  4853. //
  4854. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateRepositoryName
  4855. func (c *CodeCommit) UpdateRepositoryNameRequest(input *UpdateRepositoryNameInput) (req *request.Request, output *UpdateRepositoryNameOutput) {
  4856. op := &request.Operation{
  4857. Name: opUpdateRepositoryName,
  4858. HTTPMethod: "POST",
  4859. HTTPPath: "/",
  4860. }
  4861. if input == nil {
  4862. input = &UpdateRepositoryNameInput{}
  4863. }
  4864. output = &UpdateRepositoryNameOutput{}
  4865. req = c.newRequest(op, input, output)
  4866. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4867. return
  4868. }
  4869. // UpdateRepositoryName API operation for AWS CodeCommit.
  4870. //
  4871. // Renames a repository. The repository name must be unique across the calling
  4872. // AWS account. In addition, repository names are limited to 100 alphanumeric,
  4873. // dash, and underscore characters, and cannot include certain characters. The
  4874. // suffix ".git" is prohibited. For a full description of the limits on repository
  4875. // names, see Limits (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html)
  4876. // in the AWS CodeCommit User Guide.
  4877. //
  4878. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4879. // with awserr.Error's Code and Message methods to get detailed information about
  4880. // the error.
  4881. //
  4882. // See the AWS API reference guide for AWS CodeCommit's
  4883. // API operation UpdateRepositoryName for usage and error information.
  4884. //
  4885. // Returned Error Codes:
  4886. // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException"
  4887. // The specified repository does not exist.
  4888. //
  4889. // * ErrCodeRepositoryNameExistsException "RepositoryNameExistsException"
  4890. // The specified repository name already exists.
  4891. //
  4892. // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException"
  4893. // A repository name is required but was not specified.
  4894. //
  4895. // * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException"
  4896. // At least one specified repository name is not valid.
  4897. //
  4898. // This exception only occurs when a specified repository name is not valid.
  4899. // Other exceptions occur when a required repository parameter is missing, or
  4900. // when a specified repository does not exist.
  4901. //
  4902. // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/UpdateRepositoryName
  4903. func (c *CodeCommit) UpdateRepositoryName(input *UpdateRepositoryNameInput) (*UpdateRepositoryNameOutput, error) {
  4904. req, out := c.UpdateRepositoryNameRequest(input)
  4905. return out, req.Send()
  4906. }
  4907. // UpdateRepositoryNameWithContext is the same as UpdateRepositoryName with the addition of
  4908. // the ability to pass a context and additional request options.
  4909. //
  4910. // See UpdateRepositoryName for details on how to use this API operation.
  4911. //
  4912. // The context must be non-nil and will be used for request cancellation. If
  4913. // the context is nil a panic will occur. In the future the SDK may create
  4914. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4915. // for more information on using Contexts.
  4916. func (c *CodeCommit) UpdateRepositoryNameWithContext(ctx aws.Context, input *UpdateRepositoryNameInput, opts ...request.Option) (*UpdateRepositoryNameOutput, error) {
  4917. req, out := c.UpdateRepositoryNameRequest(input)
  4918. req.SetContext(ctx)
  4919. req.ApplyOptions(opts...)
  4920. return out, req.Send()
  4921. }
  4922. // Represents the input of a batch get repositories operation.
  4923. type BatchGetRepositoriesInput struct {
  4924. _ struct{} `type:"structure"`
  4925. // The names of the repositories to get information about.
  4926. //
  4927. // RepositoryNames is a required field
  4928. RepositoryNames []*string `locationName:"repositoryNames" type:"list" required:"true"`
  4929. }
  4930. // String returns the string representation
  4931. func (s BatchGetRepositoriesInput) String() string {
  4932. return awsutil.Prettify(s)
  4933. }
  4934. // GoString returns the string representation
  4935. func (s BatchGetRepositoriesInput) GoString() string {
  4936. return s.String()
  4937. }
  4938. // Validate inspects the fields of the type to determine if they are valid.
  4939. func (s *BatchGetRepositoriesInput) Validate() error {
  4940. invalidParams := request.ErrInvalidParams{Context: "BatchGetRepositoriesInput"}
  4941. if s.RepositoryNames == nil {
  4942. invalidParams.Add(request.NewErrParamRequired("RepositoryNames"))
  4943. }
  4944. if invalidParams.Len() > 0 {
  4945. return invalidParams
  4946. }
  4947. return nil
  4948. }
  4949. // SetRepositoryNames sets the RepositoryNames field's value.
  4950. func (s *BatchGetRepositoriesInput) SetRepositoryNames(v []*string) *BatchGetRepositoriesInput {
  4951. s.RepositoryNames = v
  4952. return s
  4953. }
  4954. // Represents the output of a batch get repositories operation.
  4955. type BatchGetRepositoriesOutput struct {
  4956. _ struct{} `type:"structure"`
  4957. // A list of repositories returned by the batch get repositories operation.
  4958. Repositories []*RepositoryMetadata `locationName:"repositories" type:"list"`
  4959. // Returns a list of repository names for which information could not be found.
  4960. RepositoriesNotFound []*string `locationName:"repositoriesNotFound" type:"list"`
  4961. }
  4962. // String returns the string representation
  4963. func (s BatchGetRepositoriesOutput) String() string {
  4964. return awsutil.Prettify(s)
  4965. }
  4966. // GoString returns the string representation
  4967. func (s BatchGetRepositoriesOutput) GoString() string {
  4968. return s.String()
  4969. }
  4970. // SetRepositories sets the Repositories field's value.
  4971. func (s *BatchGetRepositoriesOutput) SetRepositories(v []*RepositoryMetadata) *BatchGetRepositoriesOutput {
  4972. s.Repositories = v
  4973. return s
  4974. }
  4975. // SetRepositoriesNotFound sets the RepositoriesNotFound field's value.
  4976. func (s *BatchGetRepositoriesOutput) SetRepositoriesNotFound(v []*string) *BatchGetRepositoriesOutput {
  4977. s.RepositoriesNotFound = v
  4978. return s
  4979. }
  4980. // Returns information about a specific Git blob object.
  4981. type BlobMetadata struct {
  4982. _ struct{} `type:"structure"`
  4983. // The full ID of the blob.
  4984. BlobId *string `locationName:"blobId" type:"string"`
  4985. // The file mode permissions of the blob. File mode permission codes include:
  4986. //
  4987. // * 100644 indicates read/write
  4988. //
  4989. // * 100755 indicates read/write/execute
  4990. //
  4991. // * 160000 indicates a submodule
  4992. //
  4993. // * 120000 indicates a symlink
  4994. Mode *string `locationName:"mode" type:"string"`
  4995. // The path to the blob and any associated file name, if any.
  4996. Path *string `locationName:"path" type:"string"`
  4997. }
  4998. // String returns the string representation
  4999. func (s BlobMetadata) String() string {
  5000. return awsutil.Prettify(s)
  5001. }
  5002. // GoString returns the string representation
  5003. func (s BlobMetadata) GoString() string {
  5004. return s.String()
  5005. }
  5006. // SetBlobId sets the BlobId field's value.
  5007. func (s *BlobMetadata) SetBlobId(v string) *BlobMetadata {
  5008. s.BlobId = &v
  5009. return s
  5010. }
  5011. // SetMode sets the Mode field's value.
  5012. func (s *BlobMetadata) SetMode(v string) *BlobMetadata {
  5013. s.Mode = &v
  5014. return s
  5015. }
  5016. // SetPath sets the Path field's value.
  5017. func (s *BlobMetadata) SetPath(v string) *BlobMetadata {
  5018. s.Path = &v
  5019. return s
  5020. }
  5021. // Returns information about a branch.
  5022. type BranchInfo struct {
  5023. _ struct{} `type:"structure"`
  5024. // The name of the branch.
  5025. BranchName *string `locationName:"branchName" min:"1" type:"string"`
  5026. // The ID of the last commit made to the branch.
  5027. CommitId *string `locationName:"commitId" type:"string"`
  5028. }
  5029. // String returns the string representation
  5030. func (s BranchInfo) String() string {
  5031. return awsutil.Prettify(s)
  5032. }
  5033. // GoString returns the string representation
  5034. func (s BranchInfo) GoString() string {
  5035. return s.String()
  5036. }
  5037. // SetBranchName sets the BranchName field's value.
  5038. func (s *BranchInfo) SetBranchName(v string) *BranchInfo {
  5039. s.BranchName = &v
  5040. return s
  5041. }
  5042. // SetCommitId sets the CommitId field's value.
  5043. func (s *BranchInfo) SetCommitId(v string) *BranchInfo {
  5044. s.CommitId = &v
  5045. return s
  5046. }
  5047. // Returns information about a specific comment.
  5048. type Comment struct {
  5049. _ struct{} `type:"structure"`
  5050. // The Amazon Resource Name (ARN) of the person who posted the comment.
  5051. AuthorArn *string `locationName:"authorArn" type:"string"`
  5052. // A unique, client-generated idempotency token that when provided in a request,
  5053. // ensures the request cannot be repeated with a changed parameter. If a request
  5054. // is received with the same parameters and a token is included, the request
  5055. // will return information about the initial request that used that token.
  5056. ClientRequestToken *string `locationName:"clientRequestToken" type:"string"`
  5057. // The system-generated comment ID.
  5058. CommentId *string `locationName:"commentId" type:"string"`
  5059. // The content of the comment.
  5060. Content *string `locationName:"content" type:"string"`
  5061. // The date and time the comment was created, in timestamp format.
  5062. CreationDate *time.Time `locationName:"creationDate" type:"timestamp"`
  5063. // A Boolean value indicating whether the comment has been deleted.
  5064. Deleted *bool `locationName:"deleted" type:"boolean"`
  5065. // The ID of the comment for which this comment is a reply, if any.
  5066. InReplyTo *string `locationName:"inReplyTo" type:"string"`
  5067. // The date and time the comment was most recently modified, in timestamp format.
  5068. LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"`
  5069. }
  5070. // String returns the string representation
  5071. func (s Comment) String() string {
  5072. return awsutil.Prettify(s)
  5073. }
  5074. // GoString returns the string representation
  5075. func (s Comment) GoString() string {
  5076. return s.String()
  5077. }
  5078. // SetAuthorArn sets the AuthorArn field's value.
  5079. func (s *Comment) SetAuthorArn(v string) *Comment {
  5080. s.AuthorArn = &v
  5081. return s
  5082. }
  5083. // SetClientRequestToken sets the ClientRequestToken field's value.
  5084. func (s *Comment) SetClientRequestToken(v string) *Comment {
  5085. s.ClientRequestToken = &v
  5086. return s
  5087. }
  5088. // SetCommentId sets the CommentId field's value.
  5089. func (s *Comment) SetCommentId(v string) *Comment {
  5090. s.CommentId = &v
  5091. return s
  5092. }
  5093. // SetContent sets the Content field's value.
  5094. func (s *Comment) SetContent(v string) *Comment {
  5095. s.Content = &v
  5096. return s
  5097. }
  5098. // SetCreationDate sets the CreationDate field's value.
  5099. func (s *Comment) SetCreationDate(v time.Time) *Comment {
  5100. s.CreationDate = &v
  5101. return s
  5102. }
  5103. // SetDeleted sets the Deleted field's value.
  5104. func (s *Comment) SetDeleted(v bool) *Comment {
  5105. s.Deleted = &v
  5106. return s
  5107. }
  5108. // SetInReplyTo sets the InReplyTo field's value.
  5109. func (s *Comment) SetInReplyTo(v string) *Comment {
  5110. s.InReplyTo = &v
  5111. return s
  5112. }
  5113. // SetLastModifiedDate sets the LastModifiedDate field's value.
  5114. func (s *Comment) SetLastModifiedDate(v time.Time) *Comment {
  5115. s.LastModifiedDate = &v
  5116. return s
  5117. }
  5118. // Returns information about comments on the comparison between two commits.
  5119. type CommentsForComparedCommit struct {
  5120. _ struct{} `type:"structure"`
  5121. // The full blob ID of the commit used to establish the 'after' of the comparison.
  5122. AfterBlobId *string `locationName:"afterBlobId" type:"string"`
  5123. // The full commit ID of the commit used to establish the 'after' of the comparison.
  5124. AfterCommitId *string `locationName:"afterCommitId" type:"string"`
  5125. // The full blob ID of the commit used to establish the 'before' of the comparison.
  5126. BeforeBlobId *string `locationName:"beforeBlobId" type:"string"`
  5127. // The full commit ID of the commit used to establish the 'before' of the comparison.
  5128. BeforeCommitId *string `locationName:"beforeCommitId" type:"string"`
  5129. // An array of comment objects. Each comment object contains information about
  5130. // a comment on the comparison between commits.
  5131. Comments []*Comment `locationName:"comments" type:"list"`
  5132. // Location information about the comment on the comparison, including the file
  5133. // name, line number, and whether the version of the file where the comment
  5134. // was made is 'BEFORE' or 'AFTER'.
  5135. Location *Location `locationName:"location" type:"structure"`
  5136. // The name of the repository that contains the compared commits.
  5137. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  5138. }
  5139. // String returns the string representation
  5140. func (s CommentsForComparedCommit) String() string {
  5141. return awsutil.Prettify(s)
  5142. }
  5143. // GoString returns the string representation
  5144. func (s CommentsForComparedCommit) GoString() string {
  5145. return s.String()
  5146. }
  5147. // SetAfterBlobId sets the AfterBlobId field's value.
  5148. func (s *CommentsForComparedCommit) SetAfterBlobId(v string) *CommentsForComparedCommit {
  5149. s.AfterBlobId = &v
  5150. return s
  5151. }
  5152. // SetAfterCommitId sets the AfterCommitId field's value.
  5153. func (s *CommentsForComparedCommit) SetAfterCommitId(v string) *CommentsForComparedCommit {
  5154. s.AfterCommitId = &v
  5155. return s
  5156. }
  5157. // SetBeforeBlobId sets the BeforeBlobId field's value.
  5158. func (s *CommentsForComparedCommit) SetBeforeBlobId(v string) *CommentsForComparedCommit {
  5159. s.BeforeBlobId = &v
  5160. return s
  5161. }
  5162. // SetBeforeCommitId sets the BeforeCommitId field's value.
  5163. func (s *CommentsForComparedCommit) SetBeforeCommitId(v string) *CommentsForComparedCommit {
  5164. s.BeforeCommitId = &v
  5165. return s
  5166. }
  5167. // SetComments sets the Comments field's value.
  5168. func (s *CommentsForComparedCommit) SetComments(v []*Comment) *CommentsForComparedCommit {
  5169. s.Comments = v
  5170. return s
  5171. }
  5172. // SetLocation sets the Location field's value.
  5173. func (s *CommentsForComparedCommit) SetLocation(v *Location) *CommentsForComparedCommit {
  5174. s.Location = v
  5175. return s
  5176. }
  5177. // SetRepositoryName sets the RepositoryName field's value.
  5178. func (s *CommentsForComparedCommit) SetRepositoryName(v string) *CommentsForComparedCommit {
  5179. s.RepositoryName = &v
  5180. return s
  5181. }
  5182. // Returns information about comments on a pull request.
  5183. type CommentsForPullRequest struct {
  5184. _ struct{} `type:"structure"`
  5185. // The full blob ID of the file on which you want to comment on the source commit.
  5186. AfterBlobId *string `locationName:"afterBlobId" type:"string"`
  5187. // he full commit ID of the commit that was the tip of the source branch at
  5188. // the time the comment was made.
  5189. AfterCommitId *string `locationName:"afterCommitId" type:"string"`
  5190. // The full blob ID of the file on which you want to comment on the destination
  5191. // commit.
  5192. BeforeBlobId *string `locationName:"beforeBlobId" type:"string"`
  5193. // The full commit ID of the commit that was the tip of the destination branch
  5194. // when the pull request was created. This commit will be superceded by the
  5195. // after commit in the source branch when and if you merge the source branch
  5196. // into the destination branch.
  5197. BeforeCommitId *string `locationName:"beforeCommitId" type:"string"`
  5198. // An array of comment objects. Each comment object contains information about
  5199. // a comment on the pull request.
  5200. Comments []*Comment `locationName:"comments" type:"list"`
  5201. // Location information about the comment on the pull request, including the
  5202. // file name, line number, and whether the version of the file where the comment
  5203. // was made is 'BEFORE' (destination branch) or 'AFTER' (source branch).
  5204. Location *Location `locationName:"location" type:"structure"`
  5205. // The system-generated ID of the pull request.
  5206. PullRequestId *string `locationName:"pullRequestId" type:"string"`
  5207. // The name of the repository that contains the pull request.
  5208. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  5209. }
  5210. // String returns the string representation
  5211. func (s CommentsForPullRequest) String() string {
  5212. return awsutil.Prettify(s)
  5213. }
  5214. // GoString returns the string representation
  5215. func (s CommentsForPullRequest) GoString() string {
  5216. return s.String()
  5217. }
  5218. // SetAfterBlobId sets the AfterBlobId field's value.
  5219. func (s *CommentsForPullRequest) SetAfterBlobId(v string) *CommentsForPullRequest {
  5220. s.AfterBlobId = &v
  5221. return s
  5222. }
  5223. // SetAfterCommitId sets the AfterCommitId field's value.
  5224. func (s *CommentsForPullRequest) SetAfterCommitId(v string) *CommentsForPullRequest {
  5225. s.AfterCommitId = &v
  5226. return s
  5227. }
  5228. // SetBeforeBlobId sets the BeforeBlobId field's value.
  5229. func (s *CommentsForPullRequest) SetBeforeBlobId(v string) *CommentsForPullRequest {
  5230. s.BeforeBlobId = &v
  5231. return s
  5232. }
  5233. // SetBeforeCommitId sets the BeforeCommitId field's value.
  5234. func (s *CommentsForPullRequest) SetBeforeCommitId(v string) *CommentsForPullRequest {
  5235. s.BeforeCommitId = &v
  5236. return s
  5237. }
  5238. // SetComments sets the Comments field's value.
  5239. func (s *CommentsForPullRequest) SetComments(v []*Comment) *CommentsForPullRequest {
  5240. s.Comments = v
  5241. return s
  5242. }
  5243. // SetLocation sets the Location field's value.
  5244. func (s *CommentsForPullRequest) SetLocation(v *Location) *CommentsForPullRequest {
  5245. s.Location = v
  5246. return s
  5247. }
  5248. // SetPullRequestId sets the PullRequestId field's value.
  5249. func (s *CommentsForPullRequest) SetPullRequestId(v string) *CommentsForPullRequest {
  5250. s.PullRequestId = &v
  5251. return s
  5252. }
  5253. // SetRepositoryName sets the RepositoryName field's value.
  5254. func (s *CommentsForPullRequest) SetRepositoryName(v string) *CommentsForPullRequest {
  5255. s.RepositoryName = &v
  5256. return s
  5257. }
  5258. // Returns information about a specific commit.
  5259. type Commit struct {
  5260. _ struct{} `type:"structure"`
  5261. // Any additional data associated with the specified commit.
  5262. AdditionalData *string `locationName:"additionalData" type:"string"`
  5263. // Information about the author of the specified commit. Information includes
  5264. // the date in timestamp format with GMT offset, the name of the author, and
  5265. // the email address for the author, as configured in Git.
  5266. Author *UserInfo `locationName:"author" type:"structure"`
  5267. // The full SHA of the specified commit.
  5268. CommitId *string `locationName:"commitId" type:"string"`
  5269. // Information about the person who committed the specified commit, also known
  5270. // as the committer. Information includes the date in timestamp format with
  5271. // GMT offset, the name of the committer, and the email address for the committer,
  5272. // as configured in Git.
  5273. //
  5274. // For more information about the difference between an author and a committer
  5275. // in Git, see Viewing the Commit History (http://git-scm.com/book/ch2-3.html)
  5276. // in Pro Git by Scott Chacon and Ben Straub.
  5277. Committer *UserInfo `locationName:"committer" type:"structure"`
  5278. // The commit message associated with the specified commit.
  5279. Message *string `locationName:"message" type:"string"`
  5280. // A list of parent commits for the specified commit. Each parent commit ID
  5281. // is the full commit ID.
  5282. Parents []*string `locationName:"parents" type:"list"`
  5283. // Tree information for the specified commit.
  5284. TreeId *string `locationName:"treeId" type:"string"`
  5285. }
  5286. // String returns the string representation
  5287. func (s Commit) String() string {
  5288. return awsutil.Prettify(s)
  5289. }
  5290. // GoString returns the string representation
  5291. func (s Commit) GoString() string {
  5292. return s.String()
  5293. }
  5294. // SetAdditionalData sets the AdditionalData field's value.
  5295. func (s *Commit) SetAdditionalData(v string) *Commit {
  5296. s.AdditionalData = &v
  5297. return s
  5298. }
  5299. // SetAuthor sets the Author field's value.
  5300. func (s *Commit) SetAuthor(v *UserInfo) *Commit {
  5301. s.Author = v
  5302. return s
  5303. }
  5304. // SetCommitId sets the CommitId field's value.
  5305. func (s *Commit) SetCommitId(v string) *Commit {
  5306. s.CommitId = &v
  5307. return s
  5308. }
  5309. // SetCommitter sets the Committer field's value.
  5310. func (s *Commit) SetCommitter(v *UserInfo) *Commit {
  5311. s.Committer = v
  5312. return s
  5313. }
  5314. // SetMessage sets the Message field's value.
  5315. func (s *Commit) SetMessage(v string) *Commit {
  5316. s.Message = &v
  5317. return s
  5318. }
  5319. // SetParents sets the Parents field's value.
  5320. func (s *Commit) SetParents(v []*string) *Commit {
  5321. s.Parents = v
  5322. return s
  5323. }
  5324. // SetTreeId sets the TreeId field's value.
  5325. func (s *Commit) SetTreeId(v string) *Commit {
  5326. s.TreeId = &v
  5327. return s
  5328. }
  5329. // Represents the input of a create branch operation.
  5330. type CreateBranchInput struct {
  5331. _ struct{} `type:"structure"`
  5332. // The name of the new branch to create.
  5333. //
  5334. // BranchName is a required field
  5335. BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"`
  5336. // The ID of the commit to point the new branch to.
  5337. //
  5338. // CommitId is a required field
  5339. CommitId *string `locationName:"commitId" type:"string" required:"true"`
  5340. // The name of the repository in which you want to create the new branch.
  5341. //
  5342. // RepositoryName is a required field
  5343. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  5344. }
  5345. // String returns the string representation
  5346. func (s CreateBranchInput) String() string {
  5347. return awsutil.Prettify(s)
  5348. }
  5349. // GoString returns the string representation
  5350. func (s CreateBranchInput) GoString() string {
  5351. return s.String()
  5352. }
  5353. // Validate inspects the fields of the type to determine if they are valid.
  5354. func (s *CreateBranchInput) Validate() error {
  5355. invalidParams := request.ErrInvalidParams{Context: "CreateBranchInput"}
  5356. if s.BranchName == nil {
  5357. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  5358. }
  5359. if s.BranchName != nil && len(*s.BranchName) < 1 {
  5360. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  5361. }
  5362. if s.CommitId == nil {
  5363. invalidParams.Add(request.NewErrParamRequired("CommitId"))
  5364. }
  5365. if s.RepositoryName == nil {
  5366. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  5367. }
  5368. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  5369. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  5370. }
  5371. if invalidParams.Len() > 0 {
  5372. return invalidParams
  5373. }
  5374. return nil
  5375. }
  5376. // SetBranchName sets the BranchName field's value.
  5377. func (s *CreateBranchInput) SetBranchName(v string) *CreateBranchInput {
  5378. s.BranchName = &v
  5379. return s
  5380. }
  5381. // SetCommitId sets the CommitId field's value.
  5382. func (s *CreateBranchInput) SetCommitId(v string) *CreateBranchInput {
  5383. s.CommitId = &v
  5384. return s
  5385. }
  5386. // SetRepositoryName sets the RepositoryName field's value.
  5387. func (s *CreateBranchInput) SetRepositoryName(v string) *CreateBranchInput {
  5388. s.RepositoryName = &v
  5389. return s
  5390. }
  5391. type CreateBranchOutput struct {
  5392. _ struct{} `type:"structure"`
  5393. }
  5394. // String returns the string representation
  5395. func (s CreateBranchOutput) String() string {
  5396. return awsutil.Prettify(s)
  5397. }
  5398. // GoString returns the string representation
  5399. func (s CreateBranchOutput) GoString() string {
  5400. return s.String()
  5401. }
  5402. type CreatePullRequestInput struct {
  5403. _ struct{} `type:"structure"`
  5404. // A unique, client-generated idempotency token that when provided in a request,
  5405. // ensures the request cannot be repeated with a changed parameter. If a request
  5406. // is received with the same parameters and a token is included, the request
  5407. // will return information about the initial request that used that token.
  5408. //
  5409. // The AWS SDKs prepopulate client request tokens. If using an AWS SDK, you
  5410. // do not have to generate an idempotency token, as this will be done for you.
  5411. ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"`
  5412. // A description of the pull request.
  5413. Description *string `locationName:"description" type:"string"`
  5414. // The targets for the pull request, including the source of the code to be
  5415. // reviewed (the source branch), and the destination where the creator of the
  5416. // pull request intends the code to be merged after the pull request is closed
  5417. // (the destination branch).
  5418. //
  5419. // Targets is a required field
  5420. Targets []*Target `locationName:"targets" type:"list" required:"true"`
  5421. // The title of the pull request. This title will be used to identify the pull
  5422. // request to other users in the repository.
  5423. //
  5424. // Title is a required field
  5425. Title *string `locationName:"title" type:"string" required:"true"`
  5426. }
  5427. // String returns the string representation
  5428. func (s CreatePullRequestInput) String() string {
  5429. return awsutil.Prettify(s)
  5430. }
  5431. // GoString returns the string representation
  5432. func (s CreatePullRequestInput) GoString() string {
  5433. return s.String()
  5434. }
  5435. // Validate inspects the fields of the type to determine if they are valid.
  5436. func (s *CreatePullRequestInput) Validate() error {
  5437. invalidParams := request.ErrInvalidParams{Context: "CreatePullRequestInput"}
  5438. if s.Targets == nil {
  5439. invalidParams.Add(request.NewErrParamRequired("Targets"))
  5440. }
  5441. if s.Title == nil {
  5442. invalidParams.Add(request.NewErrParamRequired("Title"))
  5443. }
  5444. if s.Targets != nil {
  5445. for i, v := range s.Targets {
  5446. if v == nil {
  5447. continue
  5448. }
  5449. if err := v.Validate(); err != nil {
  5450. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams))
  5451. }
  5452. }
  5453. }
  5454. if invalidParams.Len() > 0 {
  5455. return invalidParams
  5456. }
  5457. return nil
  5458. }
  5459. // SetClientRequestToken sets the ClientRequestToken field's value.
  5460. func (s *CreatePullRequestInput) SetClientRequestToken(v string) *CreatePullRequestInput {
  5461. s.ClientRequestToken = &v
  5462. return s
  5463. }
  5464. // SetDescription sets the Description field's value.
  5465. func (s *CreatePullRequestInput) SetDescription(v string) *CreatePullRequestInput {
  5466. s.Description = &v
  5467. return s
  5468. }
  5469. // SetTargets sets the Targets field's value.
  5470. func (s *CreatePullRequestInput) SetTargets(v []*Target) *CreatePullRequestInput {
  5471. s.Targets = v
  5472. return s
  5473. }
  5474. // SetTitle sets the Title field's value.
  5475. func (s *CreatePullRequestInput) SetTitle(v string) *CreatePullRequestInput {
  5476. s.Title = &v
  5477. return s
  5478. }
  5479. type CreatePullRequestOutput struct {
  5480. _ struct{} `type:"structure"`
  5481. // Information about the newly created pull request.
  5482. //
  5483. // PullRequest is a required field
  5484. PullRequest *PullRequest `locationName:"pullRequest" type:"structure" required:"true"`
  5485. }
  5486. // String returns the string representation
  5487. func (s CreatePullRequestOutput) String() string {
  5488. return awsutil.Prettify(s)
  5489. }
  5490. // GoString returns the string representation
  5491. func (s CreatePullRequestOutput) GoString() string {
  5492. return s.String()
  5493. }
  5494. // SetPullRequest sets the PullRequest field's value.
  5495. func (s *CreatePullRequestOutput) SetPullRequest(v *PullRequest) *CreatePullRequestOutput {
  5496. s.PullRequest = v
  5497. return s
  5498. }
  5499. // Represents the input of a create repository operation.
  5500. type CreateRepositoryInput struct {
  5501. _ struct{} `type:"structure"`
  5502. // A comment or description about the new repository.
  5503. //
  5504. // The description field for a repository accepts all HTML characters and all
  5505. // valid Unicode characters. Applications that do not HTML-encode the description
  5506. // and display it in a web page could expose users to potentially malicious
  5507. // code. Make sure that you HTML-encode the description field in any application
  5508. // that uses this API to display the repository description on a web page.
  5509. RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
  5510. // The name of the new repository to be created.
  5511. //
  5512. // The repository name must be unique across the calling AWS account. In addition,
  5513. // repository names are limited to 100 alphanumeric, dash, and underscore characters,
  5514. // and cannot include certain characters. For a full description of the limits
  5515. // on repository names, see Limits (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html)
  5516. // in the AWS CodeCommit User Guide. The suffix ".git" is prohibited.
  5517. //
  5518. // RepositoryName is a required field
  5519. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  5520. }
  5521. // String returns the string representation
  5522. func (s CreateRepositoryInput) String() string {
  5523. return awsutil.Prettify(s)
  5524. }
  5525. // GoString returns the string representation
  5526. func (s CreateRepositoryInput) GoString() string {
  5527. return s.String()
  5528. }
  5529. // Validate inspects the fields of the type to determine if they are valid.
  5530. func (s *CreateRepositoryInput) Validate() error {
  5531. invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"}
  5532. if s.RepositoryName == nil {
  5533. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  5534. }
  5535. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  5536. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  5537. }
  5538. if invalidParams.Len() > 0 {
  5539. return invalidParams
  5540. }
  5541. return nil
  5542. }
  5543. // SetRepositoryDescription sets the RepositoryDescription field's value.
  5544. func (s *CreateRepositoryInput) SetRepositoryDescription(v string) *CreateRepositoryInput {
  5545. s.RepositoryDescription = &v
  5546. return s
  5547. }
  5548. // SetRepositoryName sets the RepositoryName field's value.
  5549. func (s *CreateRepositoryInput) SetRepositoryName(v string) *CreateRepositoryInput {
  5550. s.RepositoryName = &v
  5551. return s
  5552. }
  5553. // Represents the output of a create repository operation.
  5554. type CreateRepositoryOutput struct {
  5555. _ struct{} `type:"structure"`
  5556. // Information about the newly created repository.
  5557. RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"`
  5558. }
  5559. // String returns the string representation
  5560. func (s CreateRepositoryOutput) String() string {
  5561. return awsutil.Prettify(s)
  5562. }
  5563. // GoString returns the string representation
  5564. func (s CreateRepositoryOutput) GoString() string {
  5565. return s.String()
  5566. }
  5567. // SetRepositoryMetadata sets the RepositoryMetadata field's value.
  5568. func (s *CreateRepositoryOutput) SetRepositoryMetadata(v *RepositoryMetadata) *CreateRepositoryOutput {
  5569. s.RepositoryMetadata = v
  5570. return s
  5571. }
  5572. // Represents the input of a delete branch operation.
  5573. type DeleteBranchInput struct {
  5574. _ struct{} `type:"structure"`
  5575. // The name of the branch to delete.
  5576. //
  5577. // BranchName is a required field
  5578. BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"`
  5579. // The name of the repository that contains the branch to be deleted.
  5580. //
  5581. // RepositoryName is a required field
  5582. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  5583. }
  5584. // String returns the string representation
  5585. func (s DeleteBranchInput) String() string {
  5586. return awsutil.Prettify(s)
  5587. }
  5588. // GoString returns the string representation
  5589. func (s DeleteBranchInput) GoString() string {
  5590. return s.String()
  5591. }
  5592. // Validate inspects the fields of the type to determine if they are valid.
  5593. func (s *DeleteBranchInput) Validate() error {
  5594. invalidParams := request.ErrInvalidParams{Context: "DeleteBranchInput"}
  5595. if s.BranchName == nil {
  5596. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  5597. }
  5598. if s.BranchName != nil && len(*s.BranchName) < 1 {
  5599. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  5600. }
  5601. if s.RepositoryName == nil {
  5602. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  5603. }
  5604. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  5605. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  5606. }
  5607. if invalidParams.Len() > 0 {
  5608. return invalidParams
  5609. }
  5610. return nil
  5611. }
  5612. // SetBranchName sets the BranchName field's value.
  5613. func (s *DeleteBranchInput) SetBranchName(v string) *DeleteBranchInput {
  5614. s.BranchName = &v
  5615. return s
  5616. }
  5617. // SetRepositoryName sets the RepositoryName field's value.
  5618. func (s *DeleteBranchInput) SetRepositoryName(v string) *DeleteBranchInput {
  5619. s.RepositoryName = &v
  5620. return s
  5621. }
  5622. // Represents the output of a delete branch operation.
  5623. type DeleteBranchOutput struct {
  5624. _ struct{} `type:"structure"`
  5625. // Information about the branch deleted by the operation, including the branch
  5626. // name and the commit ID that was the tip of the branch.
  5627. DeletedBranch *BranchInfo `locationName:"deletedBranch" type:"structure"`
  5628. }
  5629. // String returns the string representation
  5630. func (s DeleteBranchOutput) String() string {
  5631. return awsutil.Prettify(s)
  5632. }
  5633. // GoString returns the string representation
  5634. func (s DeleteBranchOutput) GoString() string {
  5635. return s.String()
  5636. }
  5637. // SetDeletedBranch sets the DeletedBranch field's value.
  5638. func (s *DeleteBranchOutput) SetDeletedBranch(v *BranchInfo) *DeleteBranchOutput {
  5639. s.DeletedBranch = v
  5640. return s
  5641. }
  5642. type DeleteCommentContentInput struct {
  5643. _ struct{} `type:"structure"`
  5644. // The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit
  5645. // or GetCommentsForPullRequest.
  5646. //
  5647. // CommentId is a required field
  5648. CommentId *string `locationName:"commentId" type:"string" required:"true"`
  5649. }
  5650. // String returns the string representation
  5651. func (s DeleteCommentContentInput) String() string {
  5652. return awsutil.Prettify(s)
  5653. }
  5654. // GoString returns the string representation
  5655. func (s DeleteCommentContentInput) GoString() string {
  5656. return s.String()
  5657. }
  5658. // Validate inspects the fields of the type to determine if they are valid.
  5659. func (s *DeleteCommentContentInput) Validate() error {
  5660. invalidParams := request.ErrInvalidParams{Context: "DeleteCommentContentInput"}
  5661. if s.CommentId == nil {
  5662. invalidParams.Add(request.NewErrParamRequired("CommentId"))
  5663. }
  5664. if invalidParams.Len() > 0 {
  5665. return invalidParams
  5666. }
  5667. return nil
  5668. }
  5669. // SetCommentId sets the CommentId field's value.
  5670. func (s *DeleteCommentContentInput) SetCommentId(v string) *DeleteCommentContentInput {
  5671. s.CommentId = &v
  5672. return s
  5673. }
  5674. type DeleteCommentContentOutput struct {
  5675. _ struct{} `type:"structure"`
  5676. // Information about the comment you just deleted.
  5677. Comment *Comment `locationName:"comment" type:"structure"`
  5678. }
  5679. // String returns the string representation
  5680. func (s DeleteCommentContentOutput) String() string {
  5681. return awsutil.Prettify(s)
  5682. }
  5683. // GoString returns the string representation
  5684. func (s DeleteCommentContentOutput) GoString() string {
  5685. return s.String()
  5686. }
  5687. // SetComment sets the Comment field's value.
  5688. func (s *DeleteCommentContentOutput) SetComment(v *Comment) *DeleteCommentContentOutput {
  5689. s.Comment = v
  5690. return s
  5691. }
  5692. type DeleteFileInput struct {
  5693. _ struct{} `type:"structure"`
  5694. // The name of the branch where the commit will be made deleting the file.
  5695. //
  5696. // BranchName is a required field
  5697. BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"`
  5698. // The commit message you want to include as part of deleting the file. Commit
  5699. // messages are limited to 256 KB. If no message is specified, a default message
  5700. // will be used.
  5701. CommitMessage *string `locationName:"commitMessage" type:"string"`
  5702. // The email address for the commit that deletes the file. If no email address
  5703. // is specified, the email address will be left blank.
  5704. Email *string `locationName:"email" type:"string"`
  5705. // The fully-qualified path to the file that will be deleted, including the
  5706. // full name and extension of that file. For example, /examples/file.md is a
  5707. // fully qualified path to a file named file.md in a folder named examples.
  5708. //
  5709. // FilePath is a required field
  5710. FilePath *string `locationName:"filePath" type:"string" required:"true"`
  5711. // Specifies whether to delete the folder or directory that contains the file
  5712. // you want to delete if that file is the only object in the folder or directory.
  5713. // By default, empty folders will be deleted. This includes empty folders that
  5714. // are part of the directory structure. For example, if the path to a file is
  5715. // dir1/dir2/dir3/dir4, and dir2 and dir3 are empty, deleting the last file
  5716. // in dir4 will also delete the empty folders dir4, dir3, and dir2.
  5717. KeepEmptyFolders *bool `locationName:"keepEmptyFolders" type:"boolean"`
  5718. // The name of the author of the commit that deletes the file. If no name is
  5719. // specified, the user's ARN will be used as the author name and committer name.
  5720. Name *string `locationName:"name" type:"string"`
  5721. // The ID of the commit that is the tip of the branch where you want to create
  5722. // the commit that will delete the file. This must be the HEAD commit for the
  5723. // branch. The commit that deletes the file will be created from this commit
  5724. // ID.
  5725. //
  5726. // ParentCommitId is a required field
  5727. ParentCommitId *string `locationName:"parentCommitId" type:"string" required:"true"`
  5728. // The name of the repository that contains the file to delete.
  5729. //
  5730. // RepositoryName is a required field
  5731. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  5732. }
  5733. // String returns the string representation
  5734. func (s DeleteFileInput) String() string {
  5735. return awsutil.Prettify(s)
  5736. }
  5737. // GoString returns the string representation
  5738. func (s DeleteFileInput) GoString() string {
  5739. return s.String()
  5740. }
  5741. // Validate inspects the fields of the type to determine if they are valid.
  5742. func (s *DeleteFileInput) Validate() error {
  5743. invalidParams := request.ErrInvalidParams{Context: "DeleteFileInput"}
  5744. if s.BranchName == nil {
  5745. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  5746. }
  5747. if s.BranchName != nil && len(*s.BranchName) < 1 {
  5748. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  5749. }
  5750. if s.FilePath == nil {
  5751. invalidParams.Add(request.NewErrParamRequired("FilePath"))
  5752. }
  5753. if s.ParentCommitId == nil {
  5754. invalidParams.Add(request.NewErrParamRequired("ParentCommitId"))
  5755. }
  5756. if s.RepositoryName == nil {
  5757. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  5758. }
  5759. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  5760. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  5761. }
  5762. if invalidParams.Len() > 0 {
  5763. return invalidParams
  5764. }
  5765. return nil
  5766. }
  5767. // SetBranchName sets the BranchName field's value.
  5768. func (s *DeleteFileInput) SetBranchName(v string) *DeleteFileInput {
  5769. s.BranchName = &v
  5770. return s
  5771. }
  5772. // SetCommitMessage sets the CommitMessage field's value.
  5773. func (s *DeleteFileInput) SetCommitMessage(v string) *DeleteFileInput {
  5774. s.CommitMessage = &v
  5775. return s
  5776. }
  5777. // SetEmail sets the Email field's value.
  5778. func (s *DeleteFileInput) SetEmail(v string) *DeleteFileInput {
  5779. s.Email = &v
  5780. return s
  5781. }
  5782. // SetFilePath sets the FilePath field's value.
  5783. func (s *DeleteFileInput) SetFilePath(v string) *DeleteFileInput {
  5784. s.FilePath = &v
  5785. return s
  5786. }
  5787. // SetKeepEmptyFolders sets the KeepEmptyFolders field's value.
  5788. func (s *DeleteFileInput) SetKeepEmptyFolders(v bool) *DeleteFileInput {
  5789. s.KeepEmptyFolders = &v
  5790. return s
  5791. }
  5792. // SetName sets the Name field's value.
  5793. func (s *DeleteFileInput) SetName(v string) *DeleteFileInput {
  5794. s.Name = &v
  5795. return s
  5796. }
  5797. // SetParentCommitId sets the ParentCommitId field's value.
  5798. func (s *DeleteFileInput) SetParentCommitId(v string) *DeleteFileInput {
  5799. s.ParentCommitId = &v
  5800. return s
  5801. }
  5802. // SetRepositoryName sets the RepositoryName field's value.
  5803. func (s *DeleteFileInput) SetRepositoryName(v string) *DeleteFileInput {
  5804. s.RepositoryName = &v
  5805. return s
  5806. }
  5807. type DeleteFileOutput struct {
  5808. _ struct{} `type:"structure"`
  5809. // The blob ID removed from the tree as part of deleting the file.
  5810. //
  5811. // BlobId is a required field
  5812. BlobId *string `locationName:"blobId" type:"string" required:"true"`
  5813. // The full commit ID of the commit that contains the change that deletes the
  5814. // file.
  5815. //
  5816. // CommitId is a required field
  5817. CommitId *string `locationName:"commitId" type:"string" required:"true"`
  5818. // The fully-qualified path to the file that will be deleted, including the
  5819. // full name and extension of that file.
  5820. //
  5821. // FilePath is a required field
  5822. FilePath *string `locationName:"filePath" type:"string" required:"true"`
  5823. // The full SHA-1 pointer of the tree information for the commit that contains
  5824. // the delete file change.
  5825. //
  5826. // TreeId is a required field
  5827. TreeId *string `locationName:"treeId" type:"string" required:"true"`
  5828. }
  5829. // String returns the string representation
  5830. func (s DeleteFileOutput) String() string {
  5831. return awsutil.Prettify(s)
  5832. }
  5833. // GoString returns the string representation
  5834. func (s DeleteFileOutput) GoString() string {
  5835. return s.String()
  5836. }
  5837. // SetBlobId sets the BlobId field's value.
  5838. func (s *DeleteFileOutput) SetBlobId(v string) *DeleteFileOutput {
  5839. s.BlobId = &v
  5840. return s
  5841. }
  5842. // SetCommitId sets the CommitId field's value.
  5843. func (s *DeleteFileOutput) SetCommitId(v string) *DeleteFileOutput {
  5844. s.CommitId = &v
  5845. return s
  5846. }
  5847. // SetFilePath sets the FilePath field's value.
  5848. func (s *DeleteFileOutput) SetFilePath(v string) *DeleteFileOutput {
  5849. s.FilePath = &v
  5850. return s
  5851. }
  5852. // SetTreeId sets the TreeId field's value.
  5853. func (s *DeleteFileOutput) SetTreeId(v string) *DeleteFileOutput {
  5854. s.TreeId = &v
  5855. return s
  5856. }
  5857. // Represents the input of a delete repository operation.
  5858. type DeleteRepositoryInput struct {
  5859. _ struct{} `type:"structure"`
  5860. // The name of the repository to delete.
  5861. //
  5862. // RepositoryName is a required field
  5863. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  5864. }
  5865. // String returns the string representation
  5866. func (s DeleteRepositoryInput) String() string {
  5867. return awsutil.Prettify(s)
  5868. }
  5869. // GoString returns the string representation
  5870. func (s DeleteRepositoryInput) GoString() string {
  5871. return s.String()
  5872. }
  5873. // Validate inspects the fields of the type to determine if they are valid.
  5874. func (s *DeleteRepositoryInput) Validate() error {
  5875. invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"}
  5876. if s.RepositoryName == nil {
  5877. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  5878. }
  5879. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  5880. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  5881. }
  5882. if invalidParams.Len() > 0 {
  5883. return invalidParams
  5884. }
  5885. return nil
  5886. }
  5887. // SetRepositoryName sets the RepositoryName field's value.
  5888. func (s *DeleteRepositoryInput) SetRepositoryName(v string) *DeleteRepositoryInput {
  5889. s.RepositoryName = &v
  5890. return s
  5891. }
  5892. // Represents the output of a delete repository operation.
  5893. type DeleteRepositoryOutput struct {
  5894. _ struct{} `type:"structure"`
  5895. // The ID of the repository that was deleted.
  5896. RepositoryId *string `locationName:"repositoryId" type:"string"`
  5897. }
  5898. // String returns the string representation
  5899. func (s DeleteRepositoryOutput) String() string {
  5900. return awsutil.Prettify(s)
  5901. }
  5902. // GoString returns the string representation
  5903. func (s DeleteRepositoryOutput) GoString() string {
  5904. return s.String()
  5905. }
  5906. // SetRepositoryId sets the RepositoryId field's value.
  5907. func (s *DeleteRepositoryOutput) SetRepositoryId(v string) *DeleteRepositoryOutput {
  5908. s.RepositoryId = &v
  5909. return s
  5910. }
  5911. type DescribePullRequestEventsInput struct {
  5912. _ struct{} `type:"structure"`
  5913. // The Amazon Resource Name (ARN) of the user whose actions resulted in the
  5914. // event. Examples include updating the pull request with additional commits
  5915. // or changing the status of a pull request.
  5916. ActorArn *string `locationName:"actorArn" type:"string"`
  5917. // A non-negative integer used to limit the number of returned results. The
  5918. // default is 100 events, which is also the maximum number of events that can
  5919. // be returned in a result.
  5920. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  5921. // An enumeration token that when provided in a request, returns the next batch
  5922. // of the results.
  5923. NextToken *string `locationName:"nextToken" type:"string"`
  5924. // Optional. The pull request event type about which you want to return information.
  5925. PullRequestEventType *string `locationName:"pullRequestEventType" type:"string" enum:"PullRequestEventType"`
  5926. // The system-generated ID of the pull request. To get this ID, use ListPullRequests.
  5927. //
  5928. // PullRequestId is a required field
  5929. PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"`
  5930. }
  5931. // String returns the string representation
  5932. func (s DescribePullRequestEventsInput) String() string {
  5933. return awsutil.Prettify(s)
  5934. }
  5935. // GoString returns the string representation
  5936. func (s DescribePullRequestEventsInput) GoString() string {
  5937. return s.String()
  5938. }
  5939. // Validate inspects the fields of the type to determine if they are valid.
  5940. func (s *DescribePullRequestEventsInput) Validate() error {
  5941. invalidParams := request.ErrInvalidParams{Context: "DescribePullRequestEventsInput"}
  5942. if s.PullRequestId == nil {
  5943. invalidParams.Add(request.NewErrParamRequired("PullRequestId"))
  5944. }
  5945. if invalidParams.Len() > 0 {
  5946. return invalidParams
  5947. }
  5948. return nil
  5949. }
  5950. // SetActorArn sets the ActorArn field's value.
  5951. func (s *DescribePullRequestEventsInput) SetActorArn(v string) *DescribePullRequestEventsInput {
  5952. s.ActorArn = &v
  5953. return s
  5954. }
  5955. // SetMaxResults sets the MaxResults field's value.
  5956. func (s *DescribePullRequestEventsInput) SetMaxResults(v int64) *DescribePullRequestEventsInput {
  5957. s.MaxResults = &v
  5958. return s
  5959. }
  5960. // SetNextToken sets the NextToken field's value.
  5961. func (s *DescribePullRequestEventsInput) SetNextToken(v string) *DescribePullRequestEventsInput {
  5962. s.NextToken = &v
  5963. return s
  5964. }
  5965. // SetPullRequestEventType sets the PullRequestEventType field's value.
  5966. func (s *DescribePullRequestEventsInput) SetPullRequestEventType(v string) *DescribePullRequestEventsInput {
  5967. s.PullRequestEventType = &v
  5968. return s
  5969. }
  5970. // SetPullRequestId sets the PullRequestId field's value.
  5971. func (s *DescribePullRequestEventsInput) SetPullRequestId(v string) *DescribePullRequestEventsInput {
  5972. s.PullRequestId = &v
  5973. return s
  5974. }
  5975. type DescribePullRequestEventsOutput struct {
  5976. _ struct{} `type:"structure"`
  5977. // An enumeration token that can be used in a request to return the next batch
  5978. // of the results.
  5979. NextToken *string `locationName:"nextToken" type:"string"`
  5980. // Information about the pull request events.
  5981. //
  5982. // PullRequestEvents is a required field
  5983. PullRequestEvents []*PullRequestEvent `locationName:"pullRequestEvents" type:"list" required:"true"`
  5984. }
  5985. // String returns the string representation
  5986. func (s DescribePullRequestEventsOutput) String() string {
  5987. return awsutil.Prettify(s)
  5988. }
  5989. // GoString returns the string representation
  5990. func (s DescribePullRequestEventsOutput) GoString() string {
  5991. return s.String()
  5992. }
  5993. // SetNextToken sets the NextToken field's value.
  5994. func (s *DescribePullRequestEventsOutput) SetNextToken(v string) *DescribePullRequestEventsOutput {
  5995. s.NextToken = &v
  5996. return s
  5997. }
  5998. // SetPullRequestEvents sets the PullRequestEvents field's value.
  5999. func (s *DescribePullRequestEventsOutput) SetPullRequestEvents(v []*PullRequestEvent) *DescribePullRequestEventsOutput {
  6000. s.PullRequestEvents = v
  6001. return s
  6002. }
  6003. // Returns information about a set of differences for a commit specifier.
  6004. type Difference struct {
  6005. _ struct{} `type:"structure"`
  6006. // Information about an afterBlob data type object, including the ID, the file
  6007. // mode permission code, and the path.
  6008. AfterBlob *BlobMetadata `locationName:"afterBlob" type:"structure"`
  6009. // Information about a beforeBlob data type object, including the ID, the file
  6010. // mode permission code, and the path.
  6011. BeforeBlob *BlobMetadata `locationName:"beforeBlob" type:"structure"`
  6012. // Whether the change type of the difference is an addition (A), deletion (D),
  6013. // or modification (M).
  6014. ChangeType *string `locationName:"changeType" type:"string" enum:"ChangeTypeEnum"`
  6015. }
  6016. // String returns the string representation
  6017. func (s Difference) String() string {
  6018. return awsutil.Prettify(s)
  6019. }
  6020. // GoString returns the string representation
  6021. func (s Difference) GoString() string {
  6022. return s.String()
  6023. }
  6024. // SetAfterBlob sets the AfterBlob field's value.
  6025. func (s *Difference) SetAfterBlob(v *BlobMetadata) *Difference {
  6026. s.AfterBlob = v
  6027. return s
  6028. }
  6029. // SetBeforeBlob sets the BeforeBlob field's value.
  6030. func (s *Difference) SetBeforeBlob(v *BlobMetadata) *Difference {
  6031. s.BeforeBlob = v
  6032. return s
  6033. }
  6034. // SetChangeType sets the ChangeType field's value.
  6035. func (s *Difference) SetChangeType(v string) *Difference {
  6036. s.ChangeType = &v
  6037. return s
  6038. }
  6039. // Returns information about a file in a repository.
  6040. type File struct {
  6041. _ struct{} `type:"structure"`
  6042. // The fully-qualified path to the file in the repository.
  6043. AbsolutePath *string `locationName:"absolutePath" type:"string"`
  6044. // The blob ID that contains the file information.
  6045. BlobId *string `locationName:"blobId" type:"string"`
  6046. // The extrapolated file mode permissions for the file. Valid values include
  6047. // EXECUTABLE and NORMAL.
  6048. FileMode *string `locationName:"fileMode" type:"string" enum:"FileModeTypeEnum"`
  6049. // The relative path of the file from the folder where the query originated.
  6050. RelativePath *string `locationName:"relativePath" type:"string"`
  6051. }
  6052. // String returns the string representation
  6053. func (s File) String() string {
  6054. return awsutil.Prettify(s)
  6055. }
  6056. // GoString returns the string representation
  6057. func (s File) GoString() string {
  6058. return s.String()
  6059. }
  6060. // SetAbsolutePath sets the AbsolutePath field's value.
  6061. func (s *File) SetAbsolutePath(v string) *File {
  6062. s.AbsolutePath = &v
  6063. return s
  6064. }
  6065. // SetBlobId sets the BlobId field's value.
  6066. func (s *File) SetBlobId(v string) *File {
  6067. s.BlobId = &v
  6068. return s
  6069. }
  6070. // SetFileMode sets the FileMode field's value.
  6071. func (s *File) SetFileMode(v string) *File {
  6072. s.FileMode = &v
  6073. return s
  6074. }
  6075. // SetRelativePath sets the RelativePath field's value.
  6076. func (s *File) SetRelativePath(v string) *File {
  6077. s.RelativePath = &v
  6078. return s
  6079. }
  6080. // Returns information about a folder in a repository.
  6081. type Folder struct {
  6082. _ struct{} `type:"structure"`
  6083. // The fully-qualified path of the folder in the repository.
  6084. AbsolutePath *string `locationName:"absolutePath" type:"string"`
  6085. // The relative path of the specified folder from the folder where the query
  6086. // originated.
  6087. RelativePath *string `locationName:"relativePath" type:"string"`
  6088. // The full SHA-1 pointer of the tree information for the commit that contains
  6089. // the folder.
  6090. TreeId *string `locationName:"treeId" type:"string"`
  6091. }
  6092. // String returns the string representation
  6093. func (s Folder) String() string {
  6094. return awsutil.Prettify(s)
  6095. }
  6096. // GoString returns the string representation
  6097. func (s Folder) GoString() string {
  6098. return s.String()
  6099. }
  6100. // SetAbsolutePath sets the AbsolutePath field's value.
  6101. func (s *Folder) SetAbsolutePath(v string) *Folder {
  6102. s.AbsolutePath = &v
  6103. return s
  6104. }
  6105. // SetRelativePath sets the RelativePath field's value.
  6106. func (s *Folder) SetRelativePath(v string) *Folder {
  6107. s.RelativePath = &v
  6108. return s
  6109. }
  6110. // SetTreeId sets the TreeId field's value.
  6111. func (s *Folder) SetTreeId(v string) *Folder {
  6112. s.TreeId = &v
  6113. return s
  6114. }
  6115. // Represents the input of a get blob operation.
  6116. type GetBlobInput struct {
  6117. _ struct{} `type:"structure"`
  6118. // The ID of the blob, which is its SHA-1 pointer.
  6119. //
  6120. // BlobId is a required field
  6121. BlobId *string `locationName:"blobId" type:"string" required:"true"`
  6122. // The name of the repository that contains the blob.
  6123. //
  6124. // RepositoryName is a required field
  6125. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  6126. }
  6127. // String returns the string representation
  6128. func (s GetBlobInput) String() string {
  6129. return awsutil.Prettify(s)
  6130. }
  6131. // GoString returns the string representation
  6132. func (s GetBlobInput) GoString() string {
  6133. return s.String()
  6134. }
  6135. // Validate inspects the fields of the type to determine if they are valid.
  6136. func (s *GetBlobInput) Validate() error {
  6137. invalidParams := request.ErrInvalidParams{Context: "GetBlobInput"}
  6138. if s.BlobId == nil {
  6139. invalidParams.Add(request.NewErrParamRequired("BlobId"))
  6140. }
  6141. if s.RepositoryName == nil {
  6142. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6143. }
  6144. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  6145. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  6146. }
  6147. if invalidParams.Len() > 0 {
  6148. return invalidParams
  6149. }
  6150. return nil
  6151. }
  6152. // SetBlobId sets the BlobId field's value.
  6153. func (s *GetBlobInput) SetBlobId(v string) *GetBlobInput {
  6154. s.BlobId = &v
  6155. return s
  6156. }
  6157. // SetRepositoryName sets the RepositoryName field's value.
  6158. func (s *GetBlobInput) SetRepositoryName(v string) *GetBlobInput {
  6159. s.RepositoryName = &v
  6160. return s
  6161. }
  6162. // Represents the output of a get blob operation.
  6163. type GetBlobOutput struct {
  6164. _ struct{} `type:"structure"`
  6165. // The content of the blob, usually a file.
  6166. //
  6167. // Content is automatically base64 encoded/decoded by the SDK.
  6168. //
  6169. // Content is a required field
  6170. Content []byte `locationName:"content" type:"blob" required:"true"`
  6171. }
  6172. // String returns the string representation
  6173. func (s GetBlobOutput) String() string {
  6174. return awsutil.Prettify(s)
  6175. }
  6176. // GoString returns the string representation
  6177. func (s GetBlobOutput) GoString() string {
  6178. return s.String()
  6179. }
  6180. // SetContent sets the Content field's value.
  6181. func (s *GetBlobOutput) SetContent(v []byte) *GetBlobOutput {
  6182. s.Content = v
  6183. return s
  6184. }
  6185. // Represents the input of a get branch operation.
  6186. type GetBranchInput struct {
  6187. _ struct{} `type:"structure"`
  6188. // The name of the branch for which you want to retrieve information.
  6189. BranchName *string `locationName:"branchName" min:"1" type:"string"`
  6190. // The name of the repository that contains the branch for which you want to
  6191. // retrieve information.
  6192. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  6193. }
  6194. // String returns the string representation
  6195. func (s GetBranchInput) String() string {
  6196. return awsutil.Prettify(s)
  6197. }
  6198. // GoString returns the string representation
  6199. func (s GetBranchInput) GoString() string {
  6200. return s.String()
  6201. }
  6202. // Validate inspects the fields of the type to determine if they are valid.
  6203. func (s *GetBranchInput) Validate() error {
  6204. invalidParams := request.ErrInvalidParams{Context: "GetBranchInput"}
  6205. if s.BranchName != nil && len(*s.BranchName) < 1 {
  6206. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  6207. }
  6208. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  6209. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  6210. }
  6211. if invalidParams.Len() > 0 {
  6212. return invalidParams
  6213. }
  6214. return nil
  6215. }
  6216. // SetBranchName sets the BranchName field's value.
  6217. func (s *GetBranchInput) SetBranchName(v string) *GetBranchInput {
  6218. s.BranchName = &v
  6219. return s
  6220. }
  6221. // SetRepositoryName sets the RepositoryName field's value.
  6222. func (s *GetBranchInput) SetRepositoryName(v string) *GetBranchInput {
  6223. s.RepositoryName = &v
  6224. return s
  6225. }
  6226. // Represents the output of a get branch operation.
  6227. type GetBranchOutput struct {
  6228. _ struct{} `type:"structure"`
  6229. // The name of the branch.
  6230. Branch *BranchInfo `locationName:"branch" type:"structure"`
  6231. }
  6232. // String returns the string representation
  6233. func (s GetBranchOutput) String() string {
  6234. return awsutil.Prettify(s)
  6235. }
  6236. // GoString returns the string representation
  6237. func (s GetBranchOutput) GoString() string {
  6238. return s.String()
  6239. }
  6240. // SetBranch sets the Branch field's value.
  6241. func (s *GetBranchOutput) SetBranch(v *BranchInfo) *GetBranchOutput {
  6242. s.Branch = v
  6243. return s
  6244. }
  6245. type GetCommentInput struct {
  6246. _ struct{} `type:"structure"`
  6247. // The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit
  6248. // or GetCommentsForPullRequest.
  6249. //
  6250. // CommentId is a required field
  6251. CommentId *string `locationName:"commentId" type:"string" required:"true"`
  6252. }
  6253. // String returns the string representation
  6254. func (s GetCommentInput) String() string {
  6255. return awsutil.Prettify(s)
  6256. }
  6257. // GoString returns the string representation
  6258. func (s GetCommentInput) GoString() string {
  6259. return s.String()
  6260. }
  6261. // Validate inspects the fields of the type to determine if they are valid.
  6262. func (s *GetCommentInput) Validate() error {
  6263. invalidParams := request.ErrInvalidParams{Context: "GetCommentInput"}
  6264. if s.CommentId == nil {
  6265. invalidParams.Add(request.NewErrParamRequired("CommentId"))
  6266. }
  6267. if invalidParams.Len() > 0 {
  6268. return invalidParams
  6269. }
  6270. return nil
  6271. }
  6272. // SetCommentId sets the CommentId field's value.
  6273. func (s *GetCommentInput) SetCommentId(v string) *GetCommentInput {
  6274. s.CommentId = &v
  6275. return s
  6276. }
  6277. type GetCommentOutput struct {
  6278. _ struct{} `type:"structure"`
  6279. // The contents of the comment.
  6280. Comment *Comment `locationName:"comment" type:"structure"`
  6281. }
  6282. // String returns the string representation
  6283. func (s GetCommentOutput) String() string {
  6284. return awsutil.Prettify(s)
  6285. }
  6286. // GoString returns the string representation
  6287. func (s GetCommentOutput) GoString() string {
  6288. return s.String()
  6289. }
  6290. // SetComment sets the Comment field's value.
  6291. func (s *GetCommentOutput) SetComment(v *Comment) *GetCommentOutput {
  6292. s.Comment = v
  6293. return s
  6294. }
  6295. type GetCommentsForComparedCommitInput struct {
  6296. _ struct{} `type:"structure"`
  6297. // To establish the directionality of the comparison, the full commit ID of
  6298. // the 'after' commit.
  6299. //
  6300. // AfterCommitId is a required field
  6301. AfterCommitId *string `locationName:"afterCommitId" type:"string" required:"true"`
  6302. // To establish the directionality of the comparison, the full commit ID of
  6303. // the 'before' commit.
  6304. BeforeCommitId *string `locationName:"beforeCommitId" type:"string"`
  6305. // A non-negative integer used to limit the number of returned results. The
  6306. // default is 100 comments, and is configurable up to 500.
  6307. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  6308. // An enumeration token that when provided in a request, returns the next batch
  6309. // of the results.
  6310. NextToken *string `locationName:"nextToken" type:"string"`
  6311. // The name of the repository where you want to compare commits.
  6312. //
  6313. // RepositoryName is a required field
  6314. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  6315. }
  6316. // String returns the string representation
  6317. func (s GetCommentsForComparedCommitInput) String() string {
  6318. return awsutil.Prettify(s)
  6319. }
  6320. // GoString returns the string representation
  6321. func (s GetCommentsForComparedCommitInput) GoString() string {
  6322. return s.String()
  6323. }
  6324. // Validate inspects the fields of the type to determine if they are valid.
  6325. func (s *GetCommentsForComparedCommitInput) Validate() error {
  6326. invalidParams := request.ErrInvalidParams{Context: "GetCommentsForComparedCommitInput"}
  6327. if s.AfterCommitId == nil {
  6328. invalidParams.Add(request.NewErrParamRequired("AfterCommitId"))
  6329. }
  6330. if s.RepositoryName == nil {
  6331. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6332. }
  6333. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  6334. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  6335. }
  6336. if invalidParams.Len() > 0 {
  6337. return invalidParams
  6338. }
  6339. return nil
  6340. }
  6341. // SetAfterCommitId sets the AfterCommitId field's value.
  6342. func (s *GetCommentsForComparedCommitInput) SetAfterCommitId(v string) *GetCommentsForComparedCommitInput {
  6343. s.AfterCommitId = &v
  6344. return s
  6345. }
  6346. // SetBeforeCommitId sets the BeforeCommitId field's value.
  6347. func (s *GetCommentsForComparedCommitInput) SetBeforeCommitId(v string) *GetCommentsForComparedCommitInput {
  6348. s.BeforeCommitId = &v
  6349. return s
  6350. }
  6351. // SetMaxResults sets the MaxResults field's value.
  6352. func (s *GetCommentsForComparedCommitInput) SetMaxResults(v int64) *GetCommentsForComparedCommitInput {
  6353. s.MaxResults = &v
  6354. return s
  6355. }
  6356. // SetNextToken sets the NextToken field's value.
  6357. func (s *GetCommentsForComparedCommitInput) SetNextToken(v string) *GetCommentsForComparedCommitInput {
  6358. s.NextToken = &v
  6359. return s
  6360. }
  6361. // SetRepositoryName sets the RepositoryName field's value.
  6362. func (s *GetCommentsForComparedCommitInput) SetRepositoryName(v string) *GetCommentsForComparedCommitInput {
  6363. s.RepositoryName = &v
  6364. return s
  6365. }
  6366. type GetCommentsForComparedCommitOutput struct {
  6367. _ struct{} `type:"structure"`
  6368. // A list of comment objects on the compared commit.
  6369. CommentsForComparedCommitData []*CommentsForComparedCommit `locationName:"commentsForComparedCommitData" type:"list"`
  6370. // An enumeration token that can be used in a request to return the next batch
  6371. // of the results.
  6372. NextToken *string `locationName:"nextToken" type:"string"`
  6373. }
  6374. // String returns the string representation
  6375. func (s GetCommentsForComparedCommitOutput) String() string {
  6376. return awsutil.Prettify(s)
  6377. }
  6378. // GoString returns the string representation
  6379. func (s GetCommentsForComparedCommitOutput) GoString() string {
  6380. return s.String()
  6381. }
  6382. // SetCommentsForComparedCommitData sets the CommentsForComparedCommitData field's value.
  6383. func (s *GetCommentsForComparedCommitOutput) SetCommentsForComparedCommitData(v []*CommentsForComparedCommit) *GetCommentsForComparedCommitOutput {
  6384. s.CommentsForComparedCommitData = v
  6385. return s
  6386. }
  6387. // SetNextToken sets the NextToken field's value.
  6388. func (s *GetCommentsForComparedCommitOutput) SetNextToken(v string) *GetCommentsForComparedCommitOutput {
  6389. s.NextToken = &v
  6390. return s
  6391. }
  6392. type GetCommentsForPullRequestInput struct {
  6393. _ struct{} `type:"structure"`
  6394. // The full commit ID of the commit in the source branch that was the tip of
  6395. // the branch at the time the comment was made.
  6396. AfterCommitId *string `locationName:"afterCommitId" type:"string"`
  6397. // The full commit ID of the commit in the destination branch that was the tip
  6398. // of the branch at the time the pull request was created.
  6399. BeforeCommitId *string `locationName:"beforeCommitId" type:"string"`
  6400. // A non-negative integer used to limit the number of returned results. The
  6401. // default is 100 comments. You can return up to 500 comments with a single
  6402. // request.
  6403. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  6404. // An enumeration token that when provided in a request, returns the next batch
  6405. // of the results.
  6406. NextToken *string `locationName:"nextToken" type:"string"`
  6407. // The system-generated ID of the pull request. To get this ID, use ListPullRequests.
  6408. //
  6409. // PullRequestId is a required field
  6410. PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"`
  6411. // The name of the repository that contains the pull request.
  6412. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  6413. }
  6414. // String returns the string representation
  6415. func (s GetCommentsForPullRequestInput) String() string {
  6416. return awsutil.Prettify(s)
  6417. }
  6418. // GoString returns the string representation
  6419. func (s GetCommentsForPullRequestInput) GoString() string {
  6420. return s.String()
  6421. }
  6422. // Validate inspects the fields of the type to determine if they are valid.
  6423. func (s *GetCommentsForPullRequestInput) Validate() error {
  6424. invalidParams := request.ErrInvalidParams{Context: "GetCommentsForPullRequestInput"}
  6425. if s.PullRequestId == nil {
  6426. invalidParams.Add(request.NewErrParamRequired("PullRequestId"))
  6427. }
  6428. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  6429. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  6430. }
  6431. if invalidParams.Len() > 0 {
  6432. return invalidParams
  6433. }
  6434. return nil
  6435. }
  6436. // SetAfterCommitId sets the AfterCommitId field's value.
  6437. func (s *GetCommentsForPullRequestInput) SetAfterCommitId(v string) *GetCommentsForPullRequestInput {
  6438. s.AfterCommitId = &v
  6439. return s
  6440. }
  6441. // SetBeforeCommitId sets the BeforeCommitId field's value.
  6442. func (s *GetCommentsForPullRequestInput) SetBeforeCommitId(v string) *GetCommentsForPullRequestInput {
  6443. s.BeforeCommitId = &v
  6444. return s
  6445. }
  6446. // SetMaxResults sets the MaxResults field's value.
  6447. func (s *GetCommentsForPullRequestInput) SetMaxResults(v int64) *GetCommentsForPullRequestInput {
  6448. s.MaxResults = &v
  6449. return s
  6450. }
  6451. // SetNextToken sets the NextToken field's value.
  6452. func (s *GetCommentsForPullRequestInput) SetNextToken(v string) *GetCommentsForPullRequestInput {
  6453. s.NextToken = &v
  6454. return s
  6455. }
  6456. // SetPullRequestId sets the PullRequestId field's value.
  6457. func (s *GetCommentsForPullRequestInput) SetPullRequestId(v string) *GetCommentsForPullRequestInput {
  6458. s.PullRequestId = &v
  6459. return s
  6460. }
  6461. // SetRepositoryName sets the RepositoryName field's value.
  6462. func (s *GetCommentsForPullRequestInput) SetRepositoryName(v string) *GetCommentsForPullRequestInput {
  6463. s.RepositoryName = &v
  6464. return s
  6465. }
  6466. type GetCommentsForPullRequestOutput struct {
  6467. _ struct{} `type:"structure"`
  6468. // An array of comment objects on the pull request.
  6469. CommentsForPullRequestData []*CommentsForPullRequest `locationName:"commentsForPullRequestData" type:"list"`
  6470. // An enumeration token that can be used in a request to return the next batch
  6471. // of the results.
  6472. NextToken *string `locationName:"nextToken" type:"string"`
  6473. }
  6474. // String returns the string representation
  6475. func (s GetCommentsForPullRequestOutput) String() string {
  6476. return awsutil.Prettify(s)
  6477. }
  6478. // GoString returns the string representation
  6479. func (s GetCommentsForPullRequestOutput) GoString() string {
  6480. return s.String()
  6481. }
  6482. // SetCommentsForPullRequestData sets the CommentsForPullRequestData field's value.
  6483. func (s *GetCommentsForPullRequestOutput) SetCommentsForPullRequestData(v []*CommentsForPullRequest) *GetCommentsForPullRequestOutput {
  6484. s.CommentsForPullRequestData = v
  6485. return s
  6486. }
  6487. // SetNextToken sets the NextToken field's value.
  6488. func (s *GetCommentsForPullRequestOutput) SetNextToken(v string) *GetCommentsForPullRequestOutput {
  6489. s.NextToken = &v
  6490. return s
  6491. }
  6492. // Represents the input of a get commit operation.
  6493. type GetCommitInput struct {
  6494. _ struct{} `type:"structure"`
  6495. // The commit ID. Commit IDs are the full SHA of the commit.
  6496. //
  6497. // CommitId is a required field
  6498. CommitId *string `locationName:"commitId" type:"string" required:"true"`
  6499. // The name of the repository to which the commit was made.
  6500. //
  6501. // RepositoryName is a required field
  6502. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  6503. }
  6504. // String returns the string representation
  6505. func (s GetCommitInput) String() string {
  6506. return awsutil.Prettify(s)
  6507. }
  6508. // GoString returns the string representation
  6509. func (s GetCommitInput) GoString() string {
  6510. return s.String()
  6511. }
  6512. // Validate inspects the fields of the type to determine if they are valid.
  6513. func (s *GetCommitInput) Validate() error {
  6514. invalidParams := request.ErrInvalidParams{Context: "GetCommitInput"}
  6515. if s.CommitId == nil {
  6516. invalidParams.Add(request.NewErrParamRequired("CommitId"))
  6517. }
  6518. if s.RepositoryName == nil {
  6519. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6520. }
  6521. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  6522. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  6523. }
  6524. if invalidParams.Len() > 0 {
  6525. return invalidParams
  6526. }
  6527. return nil
  6528. }
  6529. // SetCommitId sets the CommitId field's value.
  6530. func (s *GetCommitInput) SetCommitId(v string) *GetCommitInput {
  6531. s.CommitId = &v
  6532. return s
  6533. }
  6534. // SetRepositoryName sets the RepositoryName field's value.
  6535. func (s *GetCommitInput) SetRepositoryName(v string) *GetCommitInput {
  6536. s.RepositoryName = &v
  6537. return s
  6538. }
  6539. // Represents the output of a get commit operation.
  6540. type GetCommitOutput struct {
  6541. _ struct{} `type:"structure"`
  6542. // A commit data type object that contains information about the specified commit.
  6543. //
  6544. // Commit is a required field
  6545. Commit *Commit `locationName:"commit" type:"structure" required:"true"`
  6546. }
  6547. // String returns the string representation
  6548. func (s GetCommitOutput) String() string {
  6549. return awsutil.Prettify(s)
  6550. }
  6551. // GoString returns the string representation
  6552. func (s GetCommitOutput) GoString() string {
  6553. return s.String()
  6554. }
  6555. // SetCommit sets the Commit field's value.
  6556. func (s *GetCommitOutput) SetCommit(v *Commit) *GetCommitOutput {
  6557. s.Commit = v
  6558. return s
  6559. }
  6560. type GetDifferencesInput struct {
  6561. _ struct{} `type:"structure"`
  6562. // The branch, tag, HEAD, or other fully qualified reference used to identify
  6563. // a commit.
  6564. //
  6565. // AfterCommitSpecifier is a required field
  6566. AfterCommitSpecifier *string `locationName:"afterCommitSpecifier" type:"string" required:"true"`
  6567. // The file path in which to check differences. Limits the results to this path.
  6568. // Can also be used to specify the changed name of a directory or folder, if
  6569. // it has changed. If not specified, differences will be shown for all paths.
  6570. AfterPath *string `locationName:"afterPath" type:"string"`
  6571. // The branch, tag, HEAD, or other fully qualified reference used to identify
  6572. // a commit. For example, the full commit ID. Optional. If not specified, all
  6573. // changes prior to the afterCommitSpecifier value will be shown. If you do
  6574. // not use beforeCommitSpecifier in your request, consider limiting the results
  6575. // with maxResults.
  6576. BeforeCommitSpecifier *string `locationName:"beforeCommitSpecifier" type:"string"`
  6577. // The file path in which to check for differences. Limits the results to this
  6578. // path. Can also be used to specify the previous name of a directory or folder.
  6579. // If beforePath and afterPath are not specified, differences will be shown
  6580. // for all paths.
  6581. BeforePath *string `locationName:"beforePath" type:"string"`
  6582. // A non-negative integer used to limit the number of returned results.
  6583. MaxResults *int64 `type:"integer"`
  6584. // An enumeration token that when provided in a request, returns the next batch
  6585. // of the results.
  6586. NextToken *string `type:"string"`
  6587. // The name of the repository where you want to get differences.
  6588. //
  6589. // RepositoryName is a required field
  6590. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  6591. }
  6592. // String returns the string representation
  6593. func (s GetDifferencesInput) String() string {
  6594. return awsutil.Prettify(s)
  6595. }
  6596. // GoString returns the string representation
  6597. func (s GetDifferencesInput) GoString() string {
  6598. return s.String()
  6599. }
  6600. // Validate inspects the fields of the type to determine if they are valid.
  6601. func (s *GetDifferencesInput) Validate() error {
  6602. invalidParams := request.ErrInvalidParams{Context: "GetDifferencesInput"}
  6603. if s.AfterCommitSpecifier == nil {
  6604. invalidParams.Add(request.NewErrParamRequired("AfterCommitSpecifier"))
  6605. }
  6606. if s.RepositoryName == nil {
  6607. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6608. }
  6609. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  6610. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  6611. }
  6612. if invalidParams.Len() > 0 {
  6613. return invalidParams
  6614. }
  6615. return nil
  6616. }
  6617. // SetAfterCommitSpecifier sets the AfterCommitSpecifier field's value.
  6618. func (s *GetDifferencesInput) SetAfterCommitSpecifier(v string) *GetDifferencesInput {
  6619. s.AfterCommitSpecifier = &v
  6620. return s
  6621. }
  6622. // SetAfterPath sets the AfterPath field's value.
  6623. func (s *GetDifferencesInput) SetAfterPath(v string) *GetDifferencesInput {
  6624. s.AfterPath = &v
  6625. return s
  6626. }
  6627. // SetBeforeCommitSpecifier sets the BeforeCommitSpecifier field's value.
  6628. func (s *GetDifferencesInput) SetBeforeCommitSpecifier(v string) *GetDifferencesInput {
  6629. s.BeforeCommitSpecifier = &v
  6630. return s
  6631. }
  6632. // SetBeforePath sets the BeforePath field's value.
  6633. func (s *GetDifferencesInput) SetBeforePath(v string) *GetDifferencesInput {
  6634. s.BeforePath = &v
  6635. return s
  6636. }
  6637. // SetMaxResults sets the MaxResults field's value.
  6638. func (s *GetDifferencesInput) SetMaxResults(v int64) *GetDifferencesInput {
  6639. s.MaxResults = &v
  6640. return s
  6641. }
  6642. // SetNextToken sets the NextToken field's value.
  6643. func (s *GetDifferencesInput) SetNextToken(v string) *GetDifferencesInput {
  6644. s.NextToken = &v
  6645. return s
  6646. }
  6647. // SetRepositoryName sets the RepositoryName field's value.
  6648. func (s *GetDifferencesInput) SetRepositoryName(v string) *GetDifferencesInput {
  6649. s.RepositoryName = &v
  6650. return s
  6651. }
  6652. type GetDifferencesOutput struct {
  6653. _ struct{} `type:"structure"`
  6654. // A differences data type object that contains information about the differences,
  6655. // including whether the difference is added, modified, or deleted (A, D, M).
  6656. Differences []*Difference `locationName:"differences" type:"list"`
  6657. // An enumeration token that can be used in a request to return the next batch
  6658. // of the results.
  6659. NextToken *string `type:"string"`
  6660. }
  6661. // String returns the string representation
  6662. func (s GetDifferencesOutput) String() string {
  6663. return awsutil.Prettify(s)
  6664. }
  6665. // GoString returns the string representation
  6666. func (s GetDifferencesOutput) GoString() string {
  6667. return s.String()
  6668. }
  6669. // SetDifferences sets the Differences field's value.
  6670. func (s *GetDifferencesOutput) SetDifferences(v []*Difference) *GetDifferencesOutput {
  6671. s.Differences = v
  6672. return s
  6673. }
  6674. // SetNextToken sets the NextToken field's value.
  6675. func (s *GetDifferencesOutput) SetNextToken(v string) *GetDifferencesOutput {
  6676. s.NextToken = &v
  6677. return s
  6678. }
  6679. type GetFileInput struct {
  6680. _ struct{} `type:"structure"`
  6681. // The fully-quaified reference that identifies the commit that contains the
  6682. // file. For example, you could specify a full commit ID, a tag, a branch name,
  6683. // or a reference such as refs/heads/master. If none is provided, then the head
  6684. // commit will be used.
  6685. CommitSpecifier *string `locationName:"commitSpecifier" type:"string"`
  6686. // The fully-qualified path to the file, including the full name and extension
  6687. // of the file. For example, /examples/file.md is the fully-qualified path to
  6688. // a file named file.md in a folder named examples.
  6689. //
  6690. // FilePath is a required field
  6691. FilePath *string `locationName:"filePath" type:"string" required:"true"`
  6692. // The name of the repository that contains the file.
  6693. //
  6694. // RepositoryName is a required field
  6695. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  6696. }
  6697. // String returns the string representation
  6698. func (s GetFileInput) String() string {
  6699. return awsutil.Prettify(s)
  6700. }
  6701. // GoString returns the string representation
  6702. func (s GetFileInput) GoString() string {
  6703. return s.String()
  6704. }
  6705. // Validate inspects the fields of the type to determine if they are valid.
  6706. func (s *GetFileInput) Validate() error {
  6707. invalidParams := request.ErrInvalidParams{Context: "GetFileInput"}
  6708. if s.FilePath == nil {
  6709. invalidParams.Add(request.NewErrParamRequired("FilePath"))
  6710. }
  6711. if s.RepositoryName == nil {
  6712. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6713. }
  6714. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  6715. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  6716. }
  6717. if invalidParams.Len() > 0 {
  6718. return invalidParams
  6719. }
  6720. return nil
  6721. }
  6722. // SetCommitSpecifier sets the CommitSpecifier field's value.
  6723. func (s *GetFileInput) SetCommitSpecifier(v string) *GetFileInput {
  6724. s.CommitSpecifier = &v
  6725. return s
  6726. }
  6727. // SetFilePath sets the FilePath field's value.
  6728. func (s *GetFileInput) SetFilePath(v string) *GetFileInput {
  6729. s.FilePath = &v
  6730. return s
  6731. }
  6732. // SetRepositoryName sets the RepositoryName field's value.
  6733. func (s *GetFileInput) SetRepositoryName(v string) *GetFileInput {
  6734. s.RepositoryName = &v
  6735. return s
  6736. }
  6737. type GetFileOutput struct {
  6738. _ struct{} `type:"structure"`
  6739. // The blob ID of the object that represents the file content.
  6740. //
  6741. // BlobId is a required field
  6742. BlobId *string `locationName:"blobId" type:"string" required:"true"`
  6743. // The full commit ID of the commit that contains the content returned by GetFile.
  6744. //
  6745. // CommitId is a required field
  6746. CommitId *string `locationName:"commitId" type:"string" required:"true"`
  6747. // The base-64 encoded binary data object that represents the content of the
  6748. // file.
  6749. //
  6750. // FileContent is automatically base64 encoded/decoded by the SDK.
  6751. //
  6752. // FileContent is a required field
  6753. FileContent []byte `locationName:"fileContent" type:"blob" required:"true"`
  6754. // The extrapolated file mode permissions of the blob. Valid values include
  6755. // strings such as EXECUTABLE and not numeric values.
  6756. //
  6757. // The file mode permissions returned by this API are not the standard file
  6758. // mode permission values, such as 100644, but rather extrapolated values. See
  6759. // below for a full list of supported return values.
  6760. //
  6761. // FileMode is a required field
  6762. FileMode *string `locationName:"fileMode" type:"string" required:"true" enum:"FileModeTypeEnum"`
  6763. // The fully qualified path to the specified file. This returns the name and
  6764. // extension of the file.
  6765. //
  6766. // FilePath is a required field
  6767. FilePath *string `locationName:"filePath" type:"string" required:"true"`
  6768. // The size of the contents of the file, in bytes.
  6769. //
  6770. // FileSize is a required field
  6771. FileSize *int64 `locationName:"fileSize" type:"long" required:"true"`
  6772. }
  6773. // String returns the string representation
  6774. func (s GetFileOutput) String() string {
  6775. return awsutil.Prettify(s)
  6776. }
  6777. // GoString returns the string representation
  6778. func (s GetFileOutput) GoString() string {
  6779. return s.String()
  6780. }
  6781. // SetBlobId sets the BlobId field's value.
  6782. func (s *GetFileOutput) SetBlobId(v string) *GetFileOutput {
  6783. s.BlobId = &v
  6784. return s
  6785. }
  6786. // SetCommitId sets the CommitId field's value.
  6787. func (s *GetFileOutput) SetCommitId(v string) *GetFileOutput {
  6788. s.CommitId = &v
  6789. return s
  6790. }
  6791. // SetFileContent sets the FileContent field's value.
  6792. func (s *GetFileOutput) SetFileContent(v []byte) *GetFileOutput {
  6793. s.FileContent = v
  6794. return s
  6795. }
  6796. // SetFileMode sets the FileMode field's value.
  6797. func (s *GetFileOutput) SetFileMode(v string) *GetFileOutput {
  6798. s.FileMode = &v
  6799. return s
  6800. }
  6801. // SetFilePath sets the FilePath field's value.
  6802. func (s *GetFileOutput) SetFilePath(v string) *GetFileOutput {
  6803. s.FilePath = &v
  6804. return s
  6805. }
  6806. // SetFileSize sets the FileSize field's value.
  6807. func (s *GetFileOutput) SetFileSize(v int64) *GetFileOutput {
  6808. s.FileSize = &v
  6809. return s
  6810. }
  6811. type GetFolderInput struct {
  6812. _ struct{} `type:"structure"`
  6813. // A fully-qualified reference used to identify a commit that contains the version
  6814. // of the folder's content to return. A fully-qualified reference can be a commit
  6815. // ID, branch name, tag, or reference such as HEAD. If no specifier is provided,
  6816. // the folder content will be returned as it exists in the HEAD commit.
  6817. CommitSpecifier *string `locationName:"commitSpecifier" type:"string"`
  6818. // The fully-qualified path to the folder whose contents will be returned, including
  6819. // the folder name. For example, /examples is a fully-qualified path to a folder
  6820. // named examples that was created off of the root directory (/) of a repository.
  6821. //
  6822. // FolderPath is a required field
  6823. FolderPath *string `locationName:"folderPath" type:"string" required:"true"`
  6824. // The name of the repository.
  6825. //
  6826. // RepositoryName is a required field
  6827. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  6828. }
  6829. // String returns the string representation
  6830. func (s GetFolderInput) String() string {
  6831. return awsutil.Prettify(s)
  6832. }
  6833. // GoString returns the string representation
  6834. func (s GetFolderInput) GoString() string {
  6835. return s.String()
  6836. }
  6837. // Validate inspects the fields of the type to determine if they are valid.
  6838. func (s *GetFolderInput) Validate() error {
  6839. invalidParams := request.ErrInvalidParams{Context: "GetFolderInput"}
  6840. if s.FolderPath == nil {
  6841. invalidParams.Add(request.NewErrParamRequired("FolderPath"))
  6842. }
  6843. if s.RepositoryName == nil {
  6844. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6845. }
  6846. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  6847. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  6848. }
  6849. if invalidParams.Len() > 0 {
  6850. return invalidParams
  6851. }
  6852. return nil
  6853. }
  6854. // SetCommitSpecifier sets the CommitSpecifier field's value.
  6855. func (s *GetFolderInput) SetCommitSpecifier(v string) *GetFolderInput {
  6856. s.CommitSpecifier = &v
  6857. return s
  6858. }
  6859. // SetFolderPath sets the FolderPath field's value.
  6860. func (s *GetFolderInput) SetFolderPath(v string) *GetFolderInput {
  6861. s.FolderPath = &v
  6862. return s
  6863. }
  6864. // SetRepositoryName sets the RepositoryName field's value.
  6865. func (s *GetFolderInput) SetRepositoryName(v string) *GetFolderInput {
  6866. s.RepositoryName = &v
  6867. return s
  6868. }
  6869. type GetFolderOutput struct {
  6870. _ struct{} `type:"structure"`
  6871. // The full commit ID used as a reference for which version of the folder content
  6872. // is returned.
  6873. //
  6874. // CommitId is a required field
  6875. CommitId *string `locationName:"commitId" type:"string" required:"true"`
  6876. // The list of files that exist in the specified folder, if any.
  6877. Files []*File `locationName:"files" type:"list"`
  6878. // The fully-qualified path of the folder whose contents are returned.
  6879. //
  6880. // FolderPath is a required field
  6881. FolderPath *string `locationName:"folderPath" type:"string" required:"true"`
  6882. // The list of folders that exist beneath the specified folder, if any.
  6883. SubFolders []*Folder `locationName:"subFolders" type:"list"`
  6884. // The list of submodules that exist in the specified folder, if any.
  6885. SubModules []*SubModule `locationName:"subModules" type:"list"`
  6886. // The list of symbolic links to other files and folders that exist in the specified
  6887. // folder, if any.
  6888. SymbolicLinks []*SymbolicLink `locationName:"symbolicLinks" type:"list"`
  6889. // The full SHA-1 pointer of the tree information for the commit that contains
  6890. // the folder.
  6891. TreeId *string `locationName:"treeId" type:"string"`
  6892. }
  6893. // String returns the string representation
  6894. func (s GetFolderOutput) String() string {
  6895. return awsutil.Prettify(s)
  6896. }
  6897. // GoString returns the string representation
  6898. func (s GetFolderOutput) GoString() string {
  6899. return s.String()
  6900. }
  6901. // SetCommitId sets the CommitId field's value.
  6902. func (s *GetFolderOutput) SetCommitId(v string) *GetFolderOutput {
  6903. s.CommitId = &v
  6904. return s
  6905. }
  6906. // SetFiles sets the Files field's value.
  6907. func (s *GetFolderOutput) SetFiles(v []*File) *GetFolderOutput {
  6908. s.Files = v
  6909. return s
  6910. }
  6911. // SetFolderPath sets the FolderPath field's value.
  6912. func (s *GetFolderOutput) SetFolderPath(v string) *GetFolderOutput {
  6913. s.FolderPath = &v
  6914. return s
  6915. }
  6916. // SetSubFolders sets the SubFolders field's value.
  6917. func (s *GetFolderOutput) SetSubFolders(v []*Folder) *GetFolderOutput {
  6918. s.SubFolders = v
  6919. return s
  6920. }
  6921. // SetSubModules sets the SubModules field's value.
  6922. func (s *GetFolderOutput) SetSubModules(v []*SubModule) *GetFolderOutput {
  6923. s.SubModules = v
  6924. return s
  6925. }
  6926. // SetSymbolicLinks sets the SymbolicLinks field's value.
  6927. func (s *GetFolderOutput) SetSymbolicLinks(v []*SymbolicLink) *GetFolderOutput {
  6928. s.SymbolicLinks = v
  6929. return s
  6930. }
  6931. // SetTreeId sets the TreeId field's value.
  6932. func (s *GetFolderOutput) SetTreeId(v string) *GetFolderOutput {
  6933. s.TreeId = &v
  6934. return s
  6935. }
  6936. type GetMergeConflictsInput struct {
  6937. _ struct{} `type:"structure"`
  6938. // The branch, tag, HEAD, or other fully qualified reference used to identify
  6939. // a commit. For example, a branch name or a full commit ID.
  6940. //
  6941. // DestinationCommitSpecifier is a required field
  6942. DestinationCommitSpecifier *string `locationName:"destinationCommitSpecifier" type:"string" required:"true"`
  6943. // The merge option or strategy you want to use to merge the code. The only
  6944. // valid value is FAST_FORWARD_MERGE.
  6945. //
  6946. // MergeOption is a required field
  6947. MergeOption *string `locationName:"mergeOption" type:"string" required:"true" enum:"MergeOptionTypeEnum"`
  6948. // The name of the repository where the pull request was created.
  6949. //
  6950. // RepositoryName is a required field
  6951. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  6952. // The branch, tag, HEAD, or other fully qualified reference used to identify
  6953. // a commit. For example, a branch name or a full commit ID.
  6954. //
  6955. // SourceCommitSpecifier is a required field
  6956. SourceCommitSpecifier *string `locationName:"sourceCommitSpecifier" type:"string" required:"true"`
  6957. }
  6958. // String returns the string representation
  6959. func (s GetMergeConflictsInput) String() string {
  6960. return awsutil.Prettify(s)
  6961. }
  6962. // GoString returns the string representation
  6963. func (s GetMergeConflictsInput) GoString() string {
  6964. return s.String()
  6965. }
  6966. // Validate inspects the fields of the type to determine if they are valid.
  6967. func (s *GetMergeConflictsInput) Validate() error {
  6968. invalidParams := request.ErrInvalidParams{Context: "GetMergeConflictsInput"}
  6969. if s.DestinationCommitSpecifier == nil {
  6970. invalidParams.Add(request.NewErrParamRequired("DestinationCommitSpecifier"))
  6971. }
  6972. if s.MergeOption == nil {
  6973. invalidParams.Add(request.NewErrParamRequired("MergeOption"))
  6974. }
  6975. if s.RepositoryName == nil {
  6976. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6977. }
  6978. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  6979. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  6980. }
  6981. if s.SourceCommitSpecifier == nil {
  6982. invalidParams.Add(request.NewErrParamRequired("SourceCommitSpecifier"))
  6983. }
  6984. if invalidParams.Len() > 0 {
  6985. return invalidParams
  6986. }
  6987. return nil
  6988. }
  6989. // SetDestinationCommitSpecifier sets the DestinationCommitSpecifier field's value.
  6990. func (s *GetMergeConflictsInput) SetDestinationCommitSpecifier(v string) *GetMergeConflictsInput {
  6991. s.DestinationCommitSpecifier = &v
  6992. return s
  6993. }
  6994. // SetMergeOption sets the MergeOption field's value.
  6995. func (s *GetMergeConflictsInput) SetMergeOption(v string) *GetMergeConflictsInput {
  6996. s.MergeOption = &v
  6997. return s
  6998. }
  6999. // SetRepositoryName sets the RepositoryName field's value.
  7000. func (s *GetMergeConflictsInput) SetRepositoryName(v string) *GetMergeConflictsInput {
  7001. s.RepositoryName = &v
  7002. return s
  7003. }
  7004. // SetSourceCommitSpecifier sets the SourceCommitSpecifier field's value.
  7005. func (s *GetMergeConflictsInput) SetSourceCommitSpecifier(v string) *GetMergeConflictsInput {
  7006. s.SourceCommitSpecifier = &v
  7007. return s
  7008. }
  7009. type GetMergeConflictsOutput struct {
  7010. _ struct{} `type:"structure"`
  7011. // The commit ID of the destination commit specifier that was used in the merge
  7012. // evaluation.
  7013. //
  7014. // DestinationCommitId is a required field
  7015. DestinationCommitId *string `locationName:"destinationCommitId" type:"string" required:"true"`
  7016. // A Boolean value that indicates whether the code is mergable by the specified
  7017. // merge option.
  7018. //
  7019. // Mergeable is a required field
  7020. Mergeable *bool `locationName:"mergeable" type:"boolean" required:"true"`
  7021. // The commit ID of the source commit specifier that was used in the merge evaluation.
  7022. //
  7023. // SourceCommitId is a required field
  7024. SourceCommitId *string `locationName:"sourceCommitId" type:"string" required:"true"`
  7025. }
  7026. // String returns the string representation
  7027. func (s GetMergeConflictsOutput) String() string {
  7028. return awsutil.Prettify(s)
  7029. }
  7030. // GoString returns the string representation
  7031. func (s GetMergeConflictsOutput) GoString() string {
  7032. return s.String()
  7033. }
  7034. // SetDestinationCommitId sets the DestinationCommitId field's value.
  7035. func (s *GetMergeConflictsOutput) SetDestinationCommitId(v string) *GetMergeConflictsOutput {
  7036. s.DestinationCommitId = &v
  7037. return s
  7038. }
  7039. // SetMergeable sets the Mergeable field's value.
  7040. func (s *GetMergeConflictsOutput) SetMergeable(v bool) *GetMergeConflictsOutput {
  7041. s.Mergeable = &v
  7042. return s
  7043. }
  7044. // SetSourceCommitId sets the SourceCommitId field's value.
  7045. func (s *GetMergeConflictsOutput) SetSourceCommitId(v string) *GetMergeConflictsOutput {
  7046. s.SourceCommitId = &v
  7047. return s
  7048. }
  7049. type GetPullRequestInput struct {
  7050. _ struct{} `type:"structure"`
  7051. // The system-generated ID of the pull request. To get this ID, use ListPullRequests.
  7052. //
  7053. // PullRequestId is a required field
  7054. PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"`
  7055. }
  7056. // String returns the string representation
  7057. func (s GetPullRequestInput) String() string {
  7058. return awsutil.Prettify(s)
  7059. }
  7060. // GoString returns the string representation
  7061. func (s GetPullRequestInput) GoString() string {
  7062. return s.String()
  7063. }
  7064. // Validate inspects the fields of the type to determine if they are valid.
  7065. func (s *GetPullRequestInput) Validate() error {
  7066. invalidParams := request.ErrInvalidParams{Context: "GetPullRequestInput"}
  7067. if s.PullRequestId == nil {
  7068. invalidParams.Add(request.NewErrParamRequired("PullRequestId"))
  7069. }
  7070. if invalidParams.Len() > 0 {
  7071. return invalidParams
  7072. }
  7073. return nil
  7074. }
  7075. // SetPullRequestId sets the PullRequestId field's value.
  7076. func (s *GetPullRequestInput) SetPullRequestId(v string) *GetPullRequestInput {
  7077. s.PullRequestId = &v
  7078. return s
  7079. }
  7080. type GetPullRequestOutput struct {
  7081. _ struct{} `type:"structure"`
  7082. // Information about the specified pull request.
  7083. //
  7084. // PullRequest is a required field
  7085. PullRequest *PullRequest `locationName:"pullRequest" type:"structure" required:"true"`
  7086. }
  7087. // String returns the string representation
  7088. func (s GetPullRequestOutput) String() string {
  7089. return awsutil.Prettify(s)
  7090. }
  7091. // GoString returns the string representation
  7092. func (s GetPullRequestOutput) GoString() string {
  7093. return s.String()
  7094. }
  7095. // SetPullRequest sets the PullRequest field's value.
  7096. func (s *GetPullRequestOutput) SetPullRequest(v *PullRequest) *GetPullRequestOutput {
  7097. s.PullRequest = v
  7098. return s
  7099. }
  7100. // Represents the input of a get repository operation.
  7101. type GetRepositoryInput struct {
  7102. _ struct{} `type:"structure"`
  7103. // The name of the repository to get information about.
  7104. //
  7105. // RepositoryName is a required field
  7106. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  7107. }
  7108. // String returns the string representation
  7109. func (s GetRepositoryInput) String() string {
  7110. return awsutil.Prettify(s)
  7111. }
  7112. // GoString returns the string representation
  7113. func (s GetRepositoryInput) GoString() string {
  7114. return s.String()
  7115. }
  7116. // Validate inspects the fields of the type to determine if they are valid.
  7117. func (s *GetRepositoryInput) Validate() error {
  7118. invalidParams := request.ErrInvalidParams{Context: "GetRepositoryInput"}
  7119. if s.RepositoryName == nil {
  7120. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  7121. }
  7122. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  7123. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  7124. }
  7125. if invalidParams.Len() > 0 {
  7126. return invalidParams
  7127. }
  7128. return nil
  7129. }
  7130. // SetRepositoryName sets the RepositoryName field's value.
  7131. func (s *GetRepositoryInput) SetRepositoryName(v string) *GetRepositoryInput {
  7132. s.RepositoryName = &v
  7133. return s
  7134. }
  7135. // Represents the output of a get repository operation.
  7136. type GetRepositoryOutput struct {
  7137. _ struct{} `type:"structure"`
  7138. // Information about the repository.
  7139. RepositoryMetadata *RepositoryMetadata `locationName:"repositoryMetadata" type:"structure"`
  7140. }
  7141. // String returns the string representation
  7142. func (s GetRepositoryOutput) String() string {
  7143. return awsutil.Prettify(s)
  7144. }
  7145. // GoString returns the string representation
  7146. func (s GetRepositoryOutput) GoString() string {
  7147. return s.String()
  7148. }
  7149. // SetRepositoryMetadata sets the RepositoryMetadata field's value.
  7150. func (s *GetRepositoryOutput) SetRepositoryMetadata(v *RepositoryMetadata) *GetRepositoryOutput {
  7151. s.RepositoryMetadata = v
  7152. return s
  7153. }
  7154. // Represents the input of a get repository triggers operation.
  7155. type GetRepositoryTriggersInput struct {
  7156. _ struct{} `type:"structure"`
  7157. // The name of the repository for which the trigger is configured.
  7158. //
  7159. // RepositoryName is a required field
  7160. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  7161. }
  7162. // String returns the string representation
  7163. func (s GetRepositoryTriggersInput) String() string {
  7164. return awsutil.Prettify(s)
  7165. }
  7166. // GoString returns the string representation
  7167. func (s GetRepositoryTriggersInput) GoString() string {
  7168. return s.String()
  7169. }
  7170. // Validate inspects the fields of the type to determine if they are valid.
  7171. func (s *GetRepositoryTriggersInput) Validate() error {
  7172. invalidParams := request.ErrInvalidParams{Context: "GetRepositoryTriggersInput"}
  7173. if s.RepositoryName == nil {
  7174. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  7175. }
  7176. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  7177. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  7178. }
  7179. if invalidParams.Len() > 0 {
  7180. return invalidParams
  7181. }
  7182. return nil
  7183. }
  7184. // SetRepositoryName sets the RepositoryName field's value.
  7185. func (s *GetRepositoryTriggersInput) SetRepositoryName(v string) *GetRepositoryTriggersInput {
  7186. s.RepositoryName = &v
  7187. return s
  7188. }
  7189. // Represents the output of a get repository triggers operation.
  7190. type GetRepositoryTriggersOutput struct {
  7191. _ struct{} `type:"structure"`
  7192. // The system-generated unique ID for the trigger.
  7193. ConfigurationId *string `locationName:"configurationId" type:"string"`
  7194. // The JSON block of configuration information for each trigger.
  7195. Triggers []*RepositoryTrigger `locationName:"triggers" type:"list"`
  7196. }
  7197. // String returns the string representation
  7198. func (s GetRepositoryTriggersOutput) String() string {
  7199. return awsutil.Prettify(s)
  7200. }
  7201. // GoString returns the string representation
  7202. func (s GetRepositoryTriggersOutput) GoString() string {
  7203. return s.String()
  7204. }
  7205. // SetConfigurationId sets the ConfigurationId field's value.
  7206. func (s *GetRepositoryTriggersOutput) SetConfigurationId(v string) *GetRepositoryTriggersOutput {
  7207. s.ConfigurationId = &v
  7208. return s
  7209. }
  7210. // SetTriggers sets the Triggers field's value.
  7211. func (s *GetRepositoryTriggersOutput) SetTriggers(v []*RepositoryTrigger) *GetRepositoryTriggersOutput {
  7212. s.Triggers = v
  7213. return s
  7214. }
  7215. // Represents the input of a list branches operation.
  7216. type ListBranchesInput struct {
  7217. _ struct{} `type:"structure"`
  7218. // An enumeration token that allows the operation to batch the results.
  7219. NextToken *string `locationName:"nextToken" type:"string"`
  7220. // The name of the repository that contains the branches.
  7221. //
  7222. // RepositoryName is a required field
  7223. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  7224. }
  7225. // String returns the string representation
  7226. func (s ListBranchesInput) String() string {
  7227. return awsutil.Prettify(s)
  7228. }
  7229. // GoString returns the string representation
  7230. func (s ListBranchesInput) GoString() string {
  7231. return s.String()
  7232. }
  7233. // Validate inspects the fields of the type to determine if they are valid.
  7234. func (s *ListBranchesInput) Validate() error {
  7235. invalidParams := request.ErrInvalidParams{Context: "ListBranchesInput"}
  7236. if s.RepositoryName == nil {
  7237. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  7238. }
  7239. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  7240. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  7241. }
  7242. if invalidParams.Len() > 0 {
  7243. return invalidParams
  7244. }
  7245. return nil
  7246. }
  7247. // SetNextToken sets the NextToken field's value.
  7248. func (s *ListBranchesInput) SetNextToken(v string) *ListBranchesInput {
  7249. s.NextToken = &v
  7250. return s
  7251. }
  7252. // SetRepositoryName sets the RepositoryName field's value.
  7253. func (s *ListBranchesInput) SetRepositoryName(v string) *ListBranchesInput {
  7254. s.RepositoryName = &v
  7255. return s
  7256. }
  7257. // Represents the output of a list branches operation.
  7258. type ListBranchesOutput struct {
  7259. _ struct{} `type:"structure"`
  7260. // The list of branch names.
  7261. Branches []*string `locationName:"branches" type:"list"`
  7262. // An enumeration token that returns the batch of the results.
  7263. NextToken *string `locationName:"nextToken" type:"string"`
  7264. }
  7265. // String returns the string representation
  7266. func (s ListBranchesOutput) String() string {
  7267. return awsutil.Prettify(s)
  7268. }
  7269. // GoString returns the string representation
  7270. func (s ListBranchesOutput) GoString() string {
  7271. return s.String()
  7272. }
  7273. // SetBranches sets the Branches field's value.
  7274. func (s *ListBranchesOutput) SetBranches(v []*string) *ListBranchesOutput {
  7275. s.Branches = v
  7276. return s
  7277. }
  7278. // SetNextToken sets the NextToken field's value.
  7279. func (s *ListBranchesOutput) SetNextToken(v string) *ListBranchesOutput {
  7280. s.NextToken = &v
  7281. return s
  7282. }
  7283. type ListPullRequestsInput struct {
  7284. _ struct{} `type:"structure"`
  7285. // Optional. The Amazon Resource Name (ARN) of the user who created the pull
  7286. // request. If used, this filters the results to pull requests created by that
  7287. // user.
  7288. AuthorArn *string `locationName:"authorArn" type:"string"`
  7289. // A non-negative integer used to limit the number of returned results.
  7290. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  7291. // An enumeration token that when provided in a request, returns the next batch
  7292. // of the results.
  7293. NextToken *string `locationName:"nextToken" type:"string"`
  7294. // Optional. The status of the pull request. If used, this refines the results
  7295. // to the pull requests that match the specified status.
  7296. PullRequestStatus *string `locationName:"pullRequestStatus" type:"string" enum:"PullRequestStatusEnum"`
  7297. // The name of the repository for which you want to list pull requests.
  7298. //
  7299. // RepositoryName is a required field
  7300. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  7301. }
  7302. // String returns the string representation
  7303. func (s ListPullRequestsInput) String() string {
  7304. return awsutil.Prettify(s)
  7305. }
  7306. // GoString returns the string representation
  7307. func (s ListPullRequestsInput) GoString() string {
  7308. return s.String()
  7309. }
  7310. // Validate inspects the fields of the type to determine if they are valid.
  7311. func (s *ListPullRequestsInput) Validate() error {
  7312. invalidParams := request.ErrInvalidParams{Context: "ListPullRequestsInput"}
  7313. if s.RepositoryName == nil {
  7314. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  7315. }
  7316. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  7317. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  7318. }
  7319. if invalidParams.Len() > 0 {
  7320. return invalidParams
  7321. }
  7322. return nil
  7323. }
  7324. // SetAuthorArn sets the AuthorArn field's value.
  7325. func (s *ListPullRequestsInput) SetAuthorArn(v string) *ListPullRequestsInput {
  7326. s.AuthorArn = &v
  7327. return s
  7328. }
  7329. // SetMaxResults sets the MaxResults field's value.
  7330. func (s *ListPullRequestsInput) SetMaxResults(v int64) *ListPullRequestsInput {
  7331. s.MaxResults = &v
  7332. return s
  7333. }
  7334. // SetNextToken sets the NextToken field's value.
  7335. func (s *ListPullRequestsInput) SetNextToken(v string) *ListPullRequestsInput {
  7336. s.NextToken = &v
  7337. return s
  7338. }
  7339. // SetPullRequestStatus sets the PullRequestStatus field's value.
  7340. func (s *ListPullRequestsInput) SetPullRequestStatus(v string) *ListPullRequestsInput {
  7341. s.PullRequestStatus = &v
  7342. return s
  7343. }
  7344. // SetRepositoryName sets the RepositoryName field's value.
  7345. func (s *ListPullRequestsInput) SetRepositoryName(v string) *ListPullRequestsInput {
  7346. s.RepositoryName = &v
  7347. return s
  7348. }
  7349. type ListPullRequestsOutput struct {
  7350. _ struct{} `type:"structure"`
  7351. // An enumeration token that when provided in a request, returns the next batch
  7352. // of the results.
  7353. NextToken *string `locationName:"nextToken" type:"string"`
  7354. // The system-generated IDs of the pull requests.
  7355. //
  7356. // PullRequestIds is a required field
  7357. PullRequestIds []*string `locationName:"pullRequestIds" type:"list" required:"true"`
  7358. }
  7359. // String returns the string representation
  7360. func (s ListPullRequestsOutput) String() string {
  7361. return awsutil.Prettify(s)
  7362. }
  7363. // GoString returns the string representation
  7364. func (s ListPullRequestsOutput) GoString() string {
  7365. return s.String()
  7366. }
  7367. // SetNextToken sets the NextToken field's value.
  7368. func (s *ListPullRequestsOutput) SetNextToken(v string) *ListPullRequestsOutput {
  7369. s.NextToken = &v
  7370. return s
  7371. }
  7372. // SetPullRequestIds sets the PullRequestIds field's value.
  7373. func (s *ListPullRequestsOutput) SetPullRequestIds(v []*string) *ListPullRequestsOutput {
  7374. s.PullRequestIds = v
  7375. return s
  7376. }
  7377. // Represents the input of a list repositories operation.
  7378. type ListRepositoriesInput struct {
  7379. _ struct{} `type:"structure"`
  7380. // An enumeration token that allows the operation to batch the results of the
  7381. // operation. Batch sizes are 1,000 for list repository operations. When the
  7382. // client sends the token back to AWS CodeCommit, another page of 1,000 records
  7383. // is retrieved.
  7384. NextToken *string `locationName:"nextToken" type:"string"`
  7385. // The order in which to sort the results of a list repositories operation.
  7386. Order *string `locationName:"order" type:"string" enum:"OrderEnum"`
  7387. // The criteria used to sort the results of a list repositories operation.
  7388. SortBy *string `locationName:"sortBy" type:"string" enum:"SortByEnum"`
  7389. }
  7390. // String returns the string representation
  7391. func (s ListRepositoriesInput) String() string {
  7392. return awsutil.Prettify(s)
  7393. }
  7394. // GoString returns the string representation
  7395. func (s ListRepositoriesInput) GoString() string {
  7396. return s.String()
  7397. }
  7398. // SetNextToken sets the NextToken field's value.
  7399. func (s *ListRepositoriesInput) SetNextToken(v string) *ListRepositoriesInput {
  7400. s.NextToken = &v
  7401. return s
  7402. }
  7403. // SetOrder sets the Order field's value.
  7404. func (s *ListRepositoriesInput) SetOrder(v string) *ListRepositoriesInput {
  7405. s.Order = &v
  7406. return s
  7407. }
  7408. // SetSortBy sets the SortBy field's value.
  7409. func (s *ListRepositoriesInput) SetSortBy(v string) *ListRepositoriesInput {
  7410. s.SortBy = &v
  7411. return s
  7412. }
  7413. // Represents the output of a list repositories operation.
  7414. type ListRepositoriesOutput struct {
  7415. _ struct{} `type:"structure"`
  7416. // An enumeration token that allows the operation to batch the results of the
  7417. // operation. Batch sizes are 1,000 for list repository operations. When the
  7418. // client sends the token back to AWS CodeCommit, another page of 1,000 records
  7419. // is retrieved.
  7420. NextToken *string `locationName:"nextToken" type:"string"`
  7421. // Lists the repositories called by the list repositories operation.
  7422. Repositories []*RepositoryNameIdPair `locationName:"repositories" type:"list"`
  7423. }
  7424. // String returns the string representation
  7425. func (s ListRepositoriesOutput) String() string {
  7426. return awsutil.Prettify(s)
  7427. }
  7428. // GoString returns the string representation
  7429. func (s ListRepositoriesOutput) GoString() string {
  7430. return s.String()
  7431. }
  7432. // SetNextToken sets the NextToken field's value.
  7433. func (s *ListRepositoriesOutput) SetNextToken(v string) *ListRepositoriesOutput {
  7434. s.NextToken = &v
  7435. return s
  7436. }
  7437. // SetRepositories sets the Repositories field's value.
  7438. func (s *ListRepositoriesOutput) SetRepositories(v []*RepositoryNameIdPair) *ListRepositoriesOutput {
  7439. s.Repositories = v
  7440. return s
  7441. }
  7442. // Returns information about the location of a change or comment in the comparison
  7443. // between two commits or a pull request.
  7444. type Location struct {
  7445. _ struct{} `type:"structure"`
  7446. // The name of the file being compared, including its extension and subdirectory,
  7447. // if any.
  7448. FilePath *string `locationName:"filePath" type:"string"`
  7449. // The position of a change within a compared file, in line number format.
  7450. FilePosition *int64 `locationName:"filePosition" type:"long"`
  7451. // In a comparison of commits or a pull request, whether the change is in the
  7452. // 'before' or 'after' of that comparison.
  7453. RelativeFileVersion *string `locationName:"relativeFileVersion" type:"string" enum:"RelativeFileVersionEnum"`
  7454. }
  7455. // String returns the string representation
  7456. func (s Location) String() string {
  7457. return awsutil.Prettify(s)
  7458. }
  7459. // GoString returns the string representation
  7460. func (s Location) GoString() string {
  7461. return s.String()
  7462. }
  7463. // SetFilePath sets the FilePath field's value.
  7464. func (s *Location) SetFilePath(v string) *Location {
  7465. s.FilePath = &v
  7466. return s
  7467. }
  7468. // SetFilePosition sets the FilePosition field's value.
  7469. func (s *Location) SetFilePosition(v int64) *Location {
  7470. s.FilePosition = &v
  7471. return s
  7472. }
  7473. // SetRelativeFileVersion sets the RelativeFileVersion field's value.
  7474. func (s *Location) SetRelativeFileVersion(v string) *Location {
  7475. s.RelativeFileVersion = &v
  7476. return s
  7477. }
  7478. // Returns information about a merge or potential merge between a source reference
  7479. // and a destination reference in a pull request.
  7480. type MergeMetadata struct {
  7481. _ struct{} `type:"structure"`
  7482. // A Boolean value indicating whether the merge has been made.
  7483. IsMerged *bool `locationName:"isMerged" type:"boolean"`
  7484. // The Amazon Resource Name (ARN) of the user who merged the branches.
  7485. MergedBy *string `locationName:"mergedBy" type:"string"`
  7486. }
  7487. // String returns the string representation
  7488. func (s MergeMetadata) String() string {
  7489. return awsutil.Prettify(s)
  7490. }
  7491. // GoString returns the string representation
  7492. func (s MergeMetadata) GoString() string {
  7493. return s.String()
  7494. }
  7495. // SetIsMerged sets the IsMerged field's value.
  7496. func (s *MergeMetadata) SetIsMerged(v bool) *MergeMetadata {
  7497. s.IsMerged = &v
  7498. return s
  7499. }
  7500. // SetMergedBy sets the MergedBy field's value.
  7501. func (s *MergeMetadata) SetMergedBy(v string) *MergeMetadata {
  7502. s.MergedBy = &v
  7503. return s
  7504. }
  7505. type MergePullRequestByFastForwardInput struct {
  7506. _ struct{} `type:"structure"`
  7507. // The system-generated ID of the pull request. To get this ID, use ListPullRequests.
  7508. //
  7509. // PullRequestId is a required field
  7510. PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"`
  7511. // The name of the repository where the pull request was created.
  7512. //
  7513. // RepositoryName is a required field
  7514. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  7515. // The full commit ID of the original or updated commit in the pull request
  7516. // source branch. Pass this value if you want an exception thrown if the current
  7517. // commit ID of the tip of the source branch does not match this commit ID.
  7518. SourceCommitId *string `locationName:"sourceCommitId" type:"string"`
  7519. }
  7520. // String returns the string representation
  7521. func (s MergePullRequestByFastForwardInput) String() string {
  7522. return awsutil.Prettify(s)
  7523. }
  7524. // GoString returns the string representation
  7525. func (s MergePullRequestByFastForwardInput) GoString() string {
  7526. return s.String()
  7527. }
  7528. // Validate inspects the fields of the type to determine if they are valid.
  7529. func (s *MergePullRequestByFastForwardInput) Validate() error {
  7530. invalidParams := request.ErrInvalidParams{Context: "MergePullRequestByFastForwardInput"}
  7531. if s.PullRequestId == nil {
  7532. invalidParams.Add(request.NewErrParamRequired("PullRequestId"))
  7533. }
  7534. if s.RepositoryName == nil {
  7535. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  7536. }
  7537. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  7538. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  7539. }
  7540. if invalidParams.Len() > 0 {
  7541. return invalidParams
  7542. }
  7543. return nil
  7544. }
  7545. // SetPullRequestId sets the PullRequestId field's value.
  7546. func (s *MergePullRequestByFastForwardInput) SetPullRequestId(v string) *MergePullRequestByFastForwardInput {
  7547. s.PullRequestId = &v
  7548. return s
  7549. }
  7550. // SetRepositoryName sets the RepositoryName field's value.
  7551. func (s *MergePullRequestByFastForwardInput) SetRepositoryName(v string) *MergePullRequestByFastForwardInput {
  7552. s.RepositoryName = &v
  7553. return s
  7554. }
  7555. // SetSourceCommitId sets the SourceCommitId field's value.
  7556. func (s *MergePullRequestByFastForwardInput) SetSourceCommitId(v string) *MergePullRequestByFastForwardInput {
  7557. s.SourceCommitId = &v
  7558. return s
  7559. }
  7560. type MergePullRequestByFastForwardOutput struct {
  7561. _ struct{} `type:"structure"`
  7562. // Information about the specified pull request, including information about
  7563. // the merge.
  7564. PullRequest *PullRequest `locationName:"pullRequest" type:"structure"`
  7565. }
  7566. // String returns the string representation
  7567. func (s MergePullRequestByFastForwardOutput) String() string {
  7568. return awsutil.Prettify(s)
  7569. }
  7570. // GoString returns the string representation
  7571. func (s MergePullRequestByFastForwardOutput) GoString() string {
  7572. return s.String()
  7573. }
  7574. // SetPullRequest sets the PullRequest field's value.
  7575. func (s *MergePullRequestByFastForwardOutput) SetPullRequest(v *PullRequest) *MergePullRequestByFastForwardOutput {
  7576. s.PullRequest = v
  7577. return s
  7578. }
  7579. type PostCommentForComparedCommitInput struct {
  7580. _ struct{} `type:"structure"`
  7581. // To establish the directionality of the comparison, the full commit ID of
  7582. // the 'after' commit.
  7583. //
  7584. // AfterCommitId is a required field
  7585. AfterCommitId *string `locationName:"afterCommitId" type:"string" required:"true"`
  7586. // To establish the directionality of the comparison, the full commit ID of
  7587. // the 'before' commit.
  7588. BeforeCommitId *string `locationName:"beforeCommitId" type:"string"`
  7589. // A unique, client-generated idempotency token that when provided in a request,
  7590. // ensures the request cannot be repeated with a changed parameter. If a request
  7591. // is received with the same parameters and a token is included, the request
  7592. // will return information about the initial request that used that token.
  7593. ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"`
  7594. // The content of the comment you want to make.
  7595. //
  7596. // Content is a required field
  7597. Content *string `locationName:"content" type:"string" required:"true"`
  7598. // The location of the comparison where you want to comment.
  7599. Location *Location `locationName:"location" type:"structure"`
  7600. // The name of the repository where you want to post a comment on the comparison
  7601. // between commits.
  7602. //
  7603. // RepositoryName is a required field
  7604. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  7605. }
  7606. // String returns the string representation
  7607. func (s PostCommentForComparedCommitInput) String() string {
  7608. return awsutil.Prettify(s)
  7609. }
  7610. // GoString returns the string representation
  7611. func (s PostCommentForComparedCommitInput) GoString() string {
  7612. return s.String()
  7613. }
  7614. // Validate inspects the fields of the type to determine if they are valid.
  7615. func (s *PostCommentForComparedCommitInput) Validate() error {
  7616. invalidParams := request.ErrInvalidParams{Context: "PostCommentForComparedCommitInput"}
  7617. if s.AfterCommitId == nil {
  7618. invalidParams.Add(request.NewErrParamRequired("AfterCommitId"))
  7619. }
  7620. if s.Content == nil {
  7621. invalidParams.Add(request.NewErrParamRequired("Content"))
  7622. }
  7623. if s.RepositoryName == nil {
  7624. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  7625. }
  7626. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  7627. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  7628. }
  7629. if invalidParams.Len() > 0 {
  7630. return invalidParams
  7631. }
  7632. return nil
  7633. }
  7634. // SetAfterCommitId sets the AfterCommitId field's value.
  7635. func (s *PostCommentForComparedCommitInput) SetAfterCommitId(v string) *PostCommentForComparedCommitInput {
  7636. s.AfterCommitId = &v
  7637. return s
  7638. }
  7639. // SetBeforeCommitId sets the BeforeCommitId field's value.
  7640. func (s *PostCommentForComparedCommitInput) SetBeforeCommitId(v string) *PostCommentForComparedCommitInput {
  7641. s.BeforeCommitId = &v
  7642. return s
  7643. }
  7644. // SetClientRequestToken sets the ClientRequestToken field's value.
  7645. func (s *PostCommentForComparedCommitInput) SetClientRequestToken(v string) *PostCommentForComparedCommitInput {
  7646. s.ClientRequestToken = &v
  7647. return s
  7648. }
  7649. // SetContent sets the Content field's value.
  7650. func (s *PostCommentForComparedCommitInput) SetContent(v string) *PostCommentForComparedCommitInput {
  7651. s.Content = &v
  7652. return s
  7653. }
  7654. // SetLocation sets the Location field's value.
  7655. func (s *PostCommentForComparedCommitInput) SetLocation(v *Location) *PostCommentForComparedCommitInput {
  7656. s.Location = v
  7657. return s
  7658. }
  7659. // SetRepositoryName sets the RepositoryName field's value.
  7660. func (s *PostCommentForComparedCommitInput) SetRepositoryName(v string) *PostCommentForComparedCommitInput {
  7661. s.RepositoryName = &v
  7662. return s
  7663. }
  7664. type PostCommentForComparedCommitOutput struct {
  7665. _ struct{} `type:"structure"`
  7666. // In the directionality you established, the blob ID of the 'after' blob.
  7667. AfterBlobId *string `locationName:"afterBlobId" type:"string"`
  7668. // In the directionality you established, the full commit ID of the 'after'
  7669. // commit.
  7670. AfterCommitId *string `locationName:"afterCommitId" type:"string"`
  7671. // In the directionality you established, the blob ID of the 'before' blob.
  7672. BeforeBlobId *string `locationName:"beforeBlobId" type:"string"`
  7673. // In the directionality you established, the full commit ID of the 'before'
  7674. // commit.
  7675. BeforeCommitId *string `locationName:"beforeCommitId" type:"string"`
  7676. // The content of the comment you posted.
  7677. Comment *Comment `locationName:"comment" type:"structure"`
  7678. // The location of the comment in the comparison between the two commits.
  7679. Location *Location `locationName:"location" type:"structure"`
  7680. // The name of the repository where you posted a comment on the comparison between
  7681. // commits.
  7682. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  7683. }
  7684. // String returns the string representation
  7685. func (s PostCommentForComparedCommitOutput) String() string {
  7686. return awsutil.Prettify(s)
  7687. }
  7688. // GoString returns the string representation
  7689. func (s PostCommentForComparedCommitOutput) GoString() string {
  7690. return s.String()
  7691. }
  7692. // SetAfterBlobId sets the AfterBlobId field's value.
  7693. func (s *PostCommentForComparedCommitOutput) SetAfterBlobId(v string) *PostCommentForComparedCommitOutput {
  7694. s.AfterBlobId = &v
  7695. return s
  7696. }
  7697. // SetAfterCommitId sets the AfterCommitId field's value.
  7698. func (s *PostCommentForComparedCommitOutput) SetAfterCommitId(v string) *PostCommentForComparedCommitOutput {
  7699. s.AfterCommitId = &v
  7700. return s
  7701. }
  7702. // SetBeforeBlobId sets the BeforeBlobId field's value.
  7703. func (s *PostCommentForComparedCommitOutput) SetBeforeBlobId(v string) *PostCommentForComparedCommitOutput {
  7704. s.BeforeBlobId = &v
  7705. return s
  7706. }
  7707. // SetBeforeCommitId sets the BeforeCommitId field's value.
  7708. func (s *PostCommentForComparedCommitOutput) SetBeforeCommitId(v string) *PostCommentForComparedCommitOutput {
  7709. s.BeforeCommitId = &v
  7710. return s
  7711. }
  7712. // SetComment sets the Comment field's value.
  7713. func (s *PostCommentForComparedCommitOutput) SetComment(v *Comment) *PostCommentForComparedCommitOutput {
  7714. s.Comment = v
  7715. return s
  7716. }
  7717. // SetLocation sets the Location field's value.
  7718. func (s *PostCommentForComparedCommitOutput) SetLocation(v *Location) *PostCommentForComparedCommitOutput {
  7719. s.Location = v
  7720. return s
  7721. }
  7722. // SetRepositoryName sets the RepositoryName field's value.
  7723. func (s *PostCommentForComparedCommitOutput) SetRepositoryName(v string) *PostCommentForComparedCommitOutput {
  7724. s.RepositoryName = &v
  7725. return s
  7726. }
  7727. type PostCommentForPullRequestInput struct {
  7728. _ struct{} `type:"structure"`
  7729. // The full commit ID of the commit in the source branch that is the current
  7730. // tip of the branch for the pull request when you post the comment.
  7731. //
  7732. // AfterCommitId is a required field
  7733. AfterCommitId *string `locationName:"afterCommitId" type:"string" required:"true"`
  7734. // The full commit ID of the commit in the destination branch that was the tip
  7735. // of the branch at the time the pull request was created.
  7736. //
  7737. // BeforeCommitId is a required field
  7738. BeforeCommitId *string `locationName:"beforeCommitId" type:"string" required:"true"`
  7739. // A unique, client-generated idempotency token that when provided in a request,
  7740. // ensures the request cannot be repeated with a changed parameter. If a request
  7741. // is received with the same parameters and a token is included, the request
  7742. // will return information about the initial request that used that token.
  7743. ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"`
  7744. // The content of your comment on the change.
  7745. //
  7746. // Content is a required field
  7747. Content *string `locationName:"content" type:"string" required:"true"`
  7748. // The location of the change where you want to post your comment. If no location
  7749. // is provided, the comment will be posted as a general comment on the pull
  7750. // request difference between the before commit ID and the after commit ID.
  7751. Location *Location `locationName:"location" type:"structure"`
  7752. // The system-generated ID of the pull request. To get this ID, use ListPullRequests.
  7753. //
  7754. // PullRequestId is a required field
  7755. PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"`
  7756. // The name of the repository where you want to post a comment on a pull request.
  7757. //
  7758. // RepositoryName is a required field
  7759. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  7760. }
  7761. // String returns the string representation
  7762. func (s PostCommentForPullRequestInput) String() string {
  7763. return awsutil.Prettify(s)
  7764. }
  7765. // GoString returns the string representation
  7766. func (s PostCommentForPullRequestInput) GoString() string {
  7767. return s.String()
  7768. }
  7769. // Validate inspects the fields of the type to determine if they are valid.
  7770. func (s *PostCommentForPullRequestInput) Validate() error {
  7771. invalidParams := request.ErrInvalidParams{Context: "PostCommentForPullRequestInput"}
  7772. if s.AfterCommitId == nil {
  7773. invalidParams.Add(request.NewErrParamRequired("AfterCommitId"))
  7774. }
  7775. if s.BeforeCommitId == nil {
  7776. invalidParams.Add(request.NewErrParamRequired("BeforeCommitId"))
  7777. }
  7778. if s.Content == nil {
  7779. invalidParams.Add(request.NewErrParamRequired("Content"))
  7780. }
  7781. if s.PullRequestId == nil {
  7782. invalidParams.Add(request.NewErrParamRequired("PullRequestId"))
  7783. }
  7784. if s.RepositoryName == nil {
  7785. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  7786. }
  7787. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  7788. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  7789. }
  7790. if invalidParams.Len() > 0 {
  7791. return invalidParams
  7792. }
  7793. return nil
  7794. }
  7795. // SetAfterCommitId sets the AfterCommitId field's value.
  7796. func (s *PostCommentForPullRequestInput) SetAfterCommitId(v string) *PostCommentForPullRequestInput {
  7797. s.AfterCommitId = &v
  7798. return s
  7799. }
  7800. // SetBeforeCommitId sets the BeforeCommitId field's value.
  7801. func (s *PostCommentForPullRequestInput) SetBeforeCommitId(v string) *PostCommentForPullRequestInput {
  7802. s.BeforeCommitId = &v
  7803. return s
  7804. }
  7805. // SetClientRequestToken sets the ClientRequestToken field's value.
  7806. func (s *PostCommentForPullRequestInput) SetClientRequestToken(v string) *PostCommentForPullRequestInput {
  7807. s.ClientRequestToken = &v
  7808. return s
  7809. }
  7810. // SetContent sets the Content field's value.
  7811. func (s *PostCommentForPullRequestInput) SetContent(v string) *PostCommentForPullRequestInput {
  7812. s.Content = &v
  7813. return s
  7814. }
  7815. // SetLocation sets the Location field's value.
  7816. func (s *PostCommentForPullRequestInput) SetLocation(v *Location) *PostCommentForPullRequestInput {
  7817. s.Location = v
  7818. return s
  7819. }
  7820. // SetPullRequestId sets the PullRequestId field's value.
  7821. func (s *PostCommentForPullRequestInput) SetPullRequestId(v string) *PostCommentForPullRequestInput {
  7822. s.PullRequestId = &v
  7823. return s
  7824. }
  7825. // SetRepositoryName sets the RepositoryName field's value.
  7826. func (s *PostCommentForPullRequestInput) SetRepositoryName(v string) *PostCommentForPullRequestInput {
  7827. s.RepositoryName = &v
  7828. return s
  7829. }
  7830. type PostCommentForPullRequestOutput struct {
  7831. _ struct{} `type:"structure"`
  7832. // In the directionality of the pull request, the blob ID of the 'after' blob.
  7833. AfterBlobId *string `locationName:"afterBlobId" type:"string"`
  7834. // The full commit ID of the commit in the destination branch where the pull
  7835. // request will be merged.
  7836. AfterCommitId *string `locationName:"afterCommitId" type:"string"`
  7837. // In the directionality of the pull request, the blob ID of the 'before' blob.
  7838. BeforeBlobId *string `locationName:"beforeBlobId" type:"string"`
  7839. // The full commit ID of the commit in the source branch used to create the
  7840. // pull request, or in the case of an updated pull request, the full commit
  7841. // ID of the commit used to update the pull request.
  7842. BeforeCommitId *string `locationName:"beforeCommitId" type:"string"`
  7843. // The content of the comment you posted.
  7844. Comment *Comment `locationName:"comment" type:"structure"`
  7845. // The location of the change where you posted your comment.
  7846. Location *Location `locationName:"location" type:"structure"`
  7847. // The system-generated ID of the pull request.
  7848. PullRequestId *string `locationName:"pullRequestId" type:"string"`
  7849. // The name of the repository where you posted a comment on a pull request.
  7850. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  7851. }
  7852. // String returns the string representation
  7853. func (s PostCommentForPullRequestOutput) String() string {
  7854. return awsutil.Prettify(s)
  7855. }
  7856. // GoString returns the string representation
  7857. func (s PostCommentForPullRequestOutput) GoString() string {
  7858. return s.String()
  7859. }
  7860. // SetAfterBlobId sets the AfterBlobId field's value.
  7861. func (s *PostCommentForPullRequestOutput) SetAfterBlobId(v string) *PostCommentForPullRequestOutput {
  7862. s.AfterBlobId = &v
  7863. return s
  7864. }
  7865. // SetAfterCommitId sets the AfterCommitId field's value.
  7866. func (s *PostCommentForPullRequestOutput) SetAfterCommitId(v string) *PostCommentForPullRequestOutput {
  7867. s.AfterCommitId = &v
  7868. return s
  7869. }
  7870. // SetBeforeBlobId sets the BeforeBlobId field's value.
  7871. func (s *PostCommentForPullRequestOutput) SetBeforeBlobId(v string) *PostCommentForPullRequestOutput {
  7872. s.BeforeBlobId = &v
  7873. return s
  7874. }
  7875. // SetBeforeCommitId sets the BeforeCommitId field's value.
  7876. func (s *PostCommentForPullRequestOutput) SetBeforeCommitId(v string) *PostCommentForPullRequestOutput {
  7877. s.BeforeCommitId = &v
  7878. return s
  7879. }
  7880. // SetComment sets the Comment field's value.
  7881. func (s *PostCommentForPullRequestOutput) SetComment(v *Comment) *PostCommentForPullRequestOutput {
  7882. s.Comment = v
  7883. return s
  7884. }
  7885. // SetLocation sets the Location field's value.
  7886. func (s *PostCommentForPullRequestOutput) SetLocation(v *Location) *PostCommentForPullRequestOutput {
  7887. s.Location = v
  7888. return s
  7889. }
  7890. // SetPullRequestId sets the PullRequestId field's value.
  7891. func (s *PostCommentForPullRequestOutput) SetPullRequestId(v string) *PostCommentForPullRequestOutput {
  7892. s.PullRequestId = &v
  7893. return s
  7894. }
  7895. // SetRepositoryName sets the RepositoryName field's value.
  7896. func (s *PostCommentForPullRequestOutput) SetRepositoryName(v string) *PostCommentForPullRequestOutput {
  7897. s.RepositoryName = &v
  7898. return s
  7899. }
  7900. type PostCommentReplyInput struct {
  7901. _ struct{} `type:"structure"`
  7902. // A unique, client-generated idempotency token that when provided in a request,
  7903. // ensures the request cannot be repeated with a changed parameter. If a request
  7904. // is received with the same parameters and a token is included, the request
  7905. // will return information about the initial request that used that token.
  7906. ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"`
  7907. // The contents of your reply to a comment.
  7908. //
  7909. // Content is a required field
  7910. Content *string `locationName:"content" type:"string" required:"true"`
  7911. // The system-generated ID of the comment to which you want to reply. To get
  7912. // this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.
  7913. //
  7914. // InReplyTo is a required field
  7915. InReplyTo *string `locationName:"inReplyTo" type:"string" required:"true"`
  7916. }
  7917. // String returns the string representation
  7918. func (s PostCommentReplyInput) String() string {
  7919. return awsutil.Prettify(s)
  7920. }
  7921. // GoString returns the string representation
  7922. func (s PostCommentReplyInput) GoString() string {
  7923. return s.String()
  7924. }
  7925. // Validate inspects the fields of the type to determine if they are valid.
  7926. func (s *PostCommentReplyInput) Validate() error {
  7927. invalidParams := request.ErrInvalidParams{Context: "PostCommentReplyInput"}
  7928. if s.Content == nil {
  7929. invalidParams.Add(request.NewErrParamRequired("Content"))
  7930. }
  7931. if s.InReplyTo == nil {
  7932. invalidParams.Add(request.NewErrParamRequired("InReplyTo"))
  7933. }
  7934. if invalidParams.Len() > 0 {
  7935. return invalidParams
  7936. }
  7937. return nil
  7938. }
  7939. // SetClientRequestToken sets the ClientRequestToken field's value.
  7940. func (s *PostCommentReplyInput) SetClientRequestToken(v string) *PostCommentReplyInput {
  7941. s.ClientRequestToken = &v
  7942. return s
  7943. }
  7944. // SetContent sets the Content field's value.
  7945. func (s *PostCommentReplyInput) SetContent(v string) *PostCommentReplyInput {
  7946. s.Content = &v
  7947. return s
  7948. }
  7949. // SetInReplyTo sets the InReplyTo field's value.
  7950. func (s *PostCommentReplyInput) SetInReplyTo(v string) *PostCommentReplyInput {
  7951. s.InReplyTo = &v
  7952. return s
  7953. }
  7954. type PostCommentReplyOutput struct {
  7955. _ struct{} `type:"structure"`
  7956. // Information about the reply to a comment.
  7957. Comment *Comment `locationName:"comment" type:"structure"`
  7958. }
  7959. // String returns the string representation
  7960. func (s PostCommentReplyOutput) String() string {
  7961. return awsutil.Prettify(s)
  7962. }
  7963. // GoString returns the string representation
  7964. func (s PostCommentReplyOutput) GoString() string {
  7965. return s.String()
  7966. }
  7967. // SetComment sets the Comment field's value.
  7968. func (s *PostCommentReplyOutput) SetComment(v *Comment) *PostCommentReplyOutput {
  7969. s.Comment = v
  7970. return s
  7971. }
  7972. // Returns information about a pull request.
  7973. type PullRequest struct {
  7974. _ struct{} `type:"structure"`
  7975. // The Amazon Resource Name (ARN) of the user who created the pull request.
  7976. AuthorArn *string `locationName:"authorArn" type:"string"`
  7977. // A unique, client-generated idempotency token that when provided in a request,
  7978. // ensures the request cannot be repeated with a changed parameter. If a request
  7979. // is received with the same parameters and a token is included, the request
  7980. // will return information about the initial request that used that token.
  7981. ClientRequestToken *string `locationName:"clientRequestToken" type:"string"`
  7982. // The date and time the pull request was originally created, in timestamp format.
  7983. CreationDate *time.Time `locationName:"creationDate" type:"timestamp"`
  7984. // The user-defined description of the pull request. This description can be
  7985. // used to clarify what should be reviewed and other details of the request.
  7986. Description *string `locationName:"description" type:"string"`
  7987. // The day and time of the last user or system activity on the pull request,
  7988. // in timestamp format.
  7989. LastActivityDate *time.Time `locationName:"lastActivityDate" type:"timestamp"`
  7990. // The system-generated ID of the pull request.
  7991. PullRequestId *string `locationName:"pullRequestId" type:"string"`
  7992. // The status of the pull request. Pull request status can only change from
  7993. // OPEN to CLOSED.
  7994. PullRequestStatus *string `locationName:"pullRequestStatus" type:"string" enum:"PullRequestStatusEnum"`
  7995. // The targets of the pull request, including the source branch and destination
  7996. // branch for the pull request.
  7997. PullRequestTargets []*PullRequestTarget `locationName:"pullRequestTargets" type:"list"`
  7998. // The user-defined title of the pull request. This title is displayed in the
  7999. // list of pull requests to other users of the repository.
  8000. Title *string `locationName:"title" type:"string"`
  8001. }
  8002. // String returns the string representation
  8003. func (s PullRequest) String() string {
  8004. return awsutil.Prettify(s)
  8005. }
  8006. // GoString returns the string representation
  8007. func (s PullRequest) GoString() string {
  8008. return s.String()
  8009. }
  8010. // SetAuthorArn sets the AuthorArn field's value.
  8011. func (s *PullRequest) SetAuthorArn(v string) *PullRequest {
  8012. s.AuthorArn = &v
  8013. return s
  8014. }
  8015. // SetClientRequestToken sets the ClientRequestToken field's value.
  8016. func (s *PullRequest) SetClientRequestToken(v string) *PullRequest {
  8017. s.ClientRequestToken = &v
  8018. return s
  8019. }
  8020. // SetCreationDate sets the CreationDate field's value.
  8021. func (s *PullRequest) SetCreationDate(v time.Time) *PullRequest {
  8022. s.CreationDate = &v
  8023. return s
  8024. }
  8025. // SetDescription sets the Description field's value.
  8026. func (s *PullRequest) SetDescription(v string) *PullRequest {
  8027. s.Description = &v
  8028. return s
  8029. }
  8030. // SetLastActivityDate sets the LastActivityDate field's value.
  8031. func (s *PullRequest) SetLastActivityDate(v time.Time) *PullRequest {
  8032. s.LastActivityDate = &v
  8033. return s
  8034. }
  8035. // SetPullRequestId sets the PullRequestId field's value.
  8036. func (s *PullRequest) SetPullRequestId(v string) *PullRequest {
  8037. s.PullRequestId = &v
  8038. return s
  8039. }
  8040. // SetPullRequestStatus sets the PullRequestStatus field's value.
  8041. func (s *PullRequest) SetPullRequestStatus(v string) *PullRequest {
  8042. s.PullRequestStatus = &v
  8043. return s
  8044. }
  8045. // SetPullRequestTargets sets the PullRequestTargets field's value.
  8046. func (s *PullRequest) SetPullRequestTargets(v []*PullRequestTarget) *PullRequest {
  8047. s.PullRequestTargets = v
  8048. return s
  8049. }
  8050. // SetTitle sets the Title field's value.
  8051. func (s *PullRequest) SetTitle(v string) *PullRequest {
  8052. s.Title = &v
  8053. return s
  8054. }
  8055. // Metadata about the pull request that is used when comparing the pull request
  8056. // source with its destination.
  8057. type PullRequestCreatedEventMetadata struct {
  8058. _ struct{} `type:"structure"`
  8059. // The commit ID of the tip of the branch specified as the destination branch
  8060. // when the pull request was created.
  8061. DestinationCommitId *string `locationName:"destinationCommitId" type:"string"`
  8062. // The commit ID of the most recent commit that the source branch and the destination
  8063. // branch have in common.
  8064. MergeBase *string `locationName:"mergeBase" type:"string"`
  8065. // The name of the repository where the pull request was created.
  8066. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  8067. // The commit ID on the source branch used when the pull request was created.
  8068. SourceCommitId *string `locationName:"sourceCommitId" type:"string"`
  8069. }
  8070. // String returns the string representation
  8071. func (s PullRequestCreatedEventMetadata) String() string {
  8072. return awsutil.Prettify(s)
  8073. }
  8074. // GoString returns the string representation
  8075. func (s PullRequestCreatedEventMetadata) GoString() string {
  8076. return s.String()
  8077. }
  8078. // SetDestinationCommitId sets the DestinationCommitId field's value.
  8079. func (s *PullRequestCreatedEventMetadata) SetDestinationCommitId(v string) *PullRequestCreatedEventMetadata {
  8080. s.DestinationCommitId = &v
  8081. return s
  8082. }
  8083. // SetMergeBase sets the MergeBase field's value.
  8084. func (s *PullRequestCreatedEventMetadata) SetMergeBase(v string) *PullRequestCreatedEventMetadata {
  8085. s.MergeBase = &v
  8086. return s
  8087. }
  8088. // SetRepositoryName sets the RepositoryName field's value.
  8089. func (s *PullRequestCreatedEventMetadata) SetRepositoryName(v string) *PullRequestCreatedEventMetadata {
  8090. s.RepositoryName = &v
  8091. return s
  8092. }
  8093. // SetSourceCommitId sets the SourceCommitId field's value.
  8094. func (s *PullRequestCreatedEventMetadata) SetSourceCommitId(v string) *PullRequestCreatedEventMetadata {
  8095. s.SourceCommitId = &v
  8096. return s
  8097. }
  8098. // Returns information about a pull request event.
  8099. type PullRequestEvent struct {
  8100. _ struct{} `type:"structure"`
  8101. // The Amazon Resource Name (ARN) of the user whose actions resulted in the
  8102. // event. Examples include updating the pull request with additional commits
  8103. // or changing the status of a pull request.
  8104. ActorArn *string `locationName:"actorArn" type:"string"`
  8105. // The day and time of the pull request event, in timestamp format.
  8106. EventDate *time.Time `locationName:"eventDate" type:"timestamp"`
  8107. // Information about the source and destination branches for the pull request.
  8108. PullRequestCreatedEventMetadata *PullRequestCreatedEventMetadata `locationName:"pullRequestCreatedEventMetadata" type:"structure"`
  8109. // The type of the pull request event, for example a status change event (PULL_REQUEST_STATUS_CHANGED)
  8110. // or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED).
  8111. PullRequestEventType *string `locationName:"pullRequestEventType" type:"string" enum:"PullRequestEventType"`
  8112. // The system-generated ID of the pull request.
  8113. PullRequestId *string `locationName:"pullRequestId" type:"string"`
  8114. // Information about the change in mergability state for the pull request event.
  8115. PullRequestMergedStateChangedEventMetadata *PullRequestMergedStateChangedEventMetadata `locationName:"pullRequestMergedStateChangedEventMetadata" type:"structure"`
  8116. // Information about the updated source branch for the pull request event.
  8117. PullRequestSourceReferenceUpdatedEventMetadata *PullRequestSourceReferenceUpdatedEventMetadata `locationName:"pullRequestSourceReferenceUpdatedEventMetadata" type:"structure"`
  8118. // Information about the change in status for the pull request event.
  8119. PullRequestStatusChangedEventMetadata *PullRequestStatusChangedEventMetadata `locationName:"pullRequestStatusChangedEventMetadata" type:"structure"`
  8120. }
  8121. // String returns the string representation
  8122. func (s PullRequestEvent) String() string {
  8123. return awsutil.Prettify(s)
  8124. }
  8125. // GoString returns the string representation
  8126. func (s PullRequestEvent) GoString() string {
  8127. return s.String()
  8128. }
  8129. // SetActorArn sets the ActorArn field's value.
  8130. func (s *PullRequestEvent) SetActorArn(v string) *PullRequestEvent {
  8131. s.ActorArn = &v
  8132. return s
  8133. }
  8134. // SetEventDate sets the EventDate field's value.
  8135. func (s *PullRequestEvent) SetEventDate(v time.Time) *PullRequestEvent {
  8136. s.EventDate = &v
  8137. return s
  8138. }
  8139. // SetPullRequestCreatedEventMetadata sets the PullRequestCreatedEventMetadata field's value.
  8140. func (s *PullRequestEvent) SetPullRequestCreatedEventMetadata(v *PullRequestCreatedEventMetadata) *PullRequestEvent {
  8141. s.PullRequestCreatedEventMetadata = v
  8142. return s
  8143. }
  8144. // SetPullRequestEventType sets the PullRequestEventType field's value.
  8145. func (s *PullRequestEvent) SetPullRequestEventType(v string) *PullRequestEvent {
  8146. s.PullRequestEventType = &v
  8147. return s
  8148. }
  8149. // SetPullRequestId sets the PullRequestId field's value.
  8150. func (s *PullRequestEvent) SetPullRequestId(v string) *PullRequestEvent {
  8151. s.PullRequestId = &v
  8152. return s
  8153. }
  8154. // SetPullRequestMergedStateChangedEventMetadata sets the PullRequestMergedStateChangedEventMetadata field's value.
  8155. func (s *PullRequestEvent) SetPullRequestMergedStateChangedEventMetadata(v *PullRequestMergedStateChangedEventMetadata) *PullRequestEvent {
  8156. s.PullRequestMergedStateChangedEventMetadata = v
  8157. return s
  8158. }
  8159. // SetPullRequestSourceReferenceUpdatedEventMetadata sets the PullRequestSourceReferenceUpdatedEventMetadata field's value.
  8160. func (s *PullRequestEvent) SetPullRequestSourceReferenceUpdatedEventMetadata(v *PullRequestSourceReferenceUpdatedEventMetadata) *PullRequestEvent {
  8161. s.PullRequestSourceReferenceUpdatedEventMetadata = v
  8162. return s
  8163. }
  8164. // SetPullRequestStatusChangedEventMetadata sets the PullRequestStatusChangedEventMetadata field's value.
  8165. func (s *PullRequestEvent) SetPullRequestStatusChangedEventMetadata(v *PullRequestStatusChangedEventMetadata) *PullRequestEvent {
  8166. s.PullRequestStatusChangedEventMetadata = v
  8167. return s
  8168. }
  8169. // Returns information about the change in the merge state for a pull request
  8170. // event.
  8171. type PullRequestMergedStateChangedEventMetadata struct {
  8172. _ struct{} `type:"structure"`
  8173. // The name of the branch that the pull request will be merged into.
  8174. DestinationReference *string `locationName:"destinationReference" type:"string"`
  8175. // Information about the merge state change event.
  8176. MergeMetadata *MergeMetadata `locationName:"mergeMetadata" type:"structure"`
  8177. // The name of the repository where the pull request was created.
  8178. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  8179. }
  8180. // String returns the string representation
  8181. func (s PullRequestMergedStateChangedEventMetadata) String() string {
  8182. return awsutil.Prettify(s)
  8183. }
  8184. // GoString returns the string representation
  8185. func (s PullRequestMergedStateChangedEventMetadata) GoString() string {
  8186. return s.String()
  8187. }
  8188. // SetDestinationReference sets the DestinationReference field's value.
  8189. func (s *PullRequestMergedStateChangedEventMetadata) SetDestinationReference(v string) *PullRequestMergedStateChangedEventMetadata {
  8190. s.DestinationReference = &v
  8191. return s
  8192. }
  8193. // SetMergeMetadata sets the MergeMetadata field's value.
  8194. func (s *PullRequestMergedStateChangedEventMetadata) SetMergeMetadata(v *MergeMetadata) *PullRequestMergedStateChangedEventMetadata {
  8195. s.MergeMetadata = v
  8196. return s
  8197. }
  8198. // SetRepositoryName sets the RepositoryName field's value.
  8199. func (s *PullRequestMergedStateChangedEventMetadata) SetRepositoryName(v string) *PullRequestMergedStateChangedEventMetadata {
  8200. s.RepositoryName = &v
  8201. return s
  8202. }
  8203. // Information about an update to the source branch of a pull request.
  8204. type PullRequestSourceReferenceUpdatedEventMetadata struct {
  8205. _ struct{} `type:"structure"`
  8206. // The full commit ID of the commit in the source branch that was the tip of
  8207. // the branch at the time the pull request was updated.
  8208. AfterCommitId *string `locationName:"afterCommitId" type:"string"`
  8209. // The full commit ID of the commit in the destination branch that was the tip
  8210. // of the branch at the time the pull request was updated.
  8211. BeforeCommitId *string `locationName:"beforeCommitId" type:"string"`
  8212. // The commit ID of the most recent commit that the source branch and the destination
  8213. // branch have in common.
  8214. MergeBase *string `locationName:"mergeBase" type:"string"`
  8215. // The name of the repository where the pull request was updated.
  8216. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  8217. }
  8218. // String returns the string representation
  8219. func (s PullRequestSourceReferenceUpdatedEventMetadata) String() string {
  8220. return awsutil.Prettify(s)
  8221. }
  8222. // GoString returns the string representation
  8223. func (s PullRequestSourceReferenceUpdatedEventMetadata) GoString() string {
  8224. return s.String()
  8225. }
  8226. // SetAfterCommitId sets the AfterCommitId field's value.
  8227. func (s *PullRequestSourceReferenceUpdatedEventMetadata) SetAfterCommitId(v string) *PullRequestSourceReferenceUpdatedEventMetadata {
  8228. s.AfterCommitId = &v
  8229. return s
  8230. }
  8231. // SetBeforeCommitId sets the BeforeCommitId field's value.
  8232. func (s *PullRequestSourceReferenceUpdatedEventMetadata) SetBeforeCommitId(v string) *PullRequestSourceReferenceUpdatedEventMetadata {
  8233. s.BeforeCommitId = &v
  8234. return s
  8235. }
  8236. // SetMergeBase sets the MergeBase field's value.
  8237. func (s *PullRequestSourceReferenceUpdatedEventMetadata) SetMergeBase(v string) *PullRequestSourceReferenceUpdatedEventMetadata {
  8238. s.MergeBase = &v
  8239. return s
  8240. }
  8241. // SetRepositoryName sets the RepositoryName field's value.
  8242. func (s *PullRequestSourceReferenceUpdatedEventMetadata) SetRepositoryName(v string) *PullRequestSourceReferenceUpdatedEventMetadata {
  8243. s.RepositoryName = &v
  8244. return s
  8245. }
  8246. // Information about a change to the status of a pull request.
  8247. type PullRequestStatusChangedEventMetadata struct {
  8248. _ struct{} `type:"structure"`
  8249. // The changed status of the pull request.
  8250. PullRequestStatus *string `locationName:"pullRequestStatus" type:"string" enum:"PullRequestStatusEnum"`
  8251. }
  8252. // String returns the string representation
  8253. func (s PullRequestStatusChangedEventMetadata) String() string {
  8254. return awsutil.Prettify(s)
  8255. }
  8256. // GoString returns the string representation
  8257. func (s PullRequestStatusChangedEventMetadata) GoString() string {
  8258. return s.String()
  8259. }
  8260. // SetPullRequestStatus sets the PullRequestStatus field's value.
  8261. func (s *PullRequestStatusChangedEventMetadata) SetPullRequestStatus(v string) *PullRequestStatusChangedEventMetadata {
  8262. s.PullRequestStatus = &v
  8263. return s
  8264. }
  8265. // Returns information about a pull request target.
  8266. type PullRequestTarget struct {
  8267. _ struct{} `type:"structure"`
  8268. // The full commit ID that is the tip of the destination branch. This is the
  8269. // commit where the pull request was or will be merged.
  8270. DestinationCommit *string `locationName:"destinationCommit" type:"string"`
  8271. // The branch of the repository where the pull request changes will be merged
  8272. // into. Also known as the destination branch.
  8273. DestinationReference *string `locationName:"destinationReference" type:"string"`
  8274. // The commit ID of the most recent commit that the source branch and the destination
  8275. // branch have in common.
  8276. MergeBase *string `locationName:"mergeBase" type:"string"`
  8277. // Returns metadata about the state of the merge, including whether the merge
  8278. // has been made.
  8279. MergeMetadata *MergeMetadata `locationName:"mergeMetadata" type:"structure"`
  8280. // The name of the repository that contains the pull request source and destination
  8281. // branches.
  8282. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  8283. // The full commit ID of the tip of the source branch used to create the pull
  8284. // request. If the pull request branch is updated by a push while the pull request
  8285. // is open, the commit ID will change to reflect the new tip of the branch.
  8286. SourceCommit *string `locationName:"sourceCommit" type:"string"`
  8287. // The branch of the repository that contains the changes for the pull request.
  8288. // Also known as the source branch.
  8289. SourceReference *string `locationName:"sourceReference" type:"string"`
  8290. }
  8291. // String returns the string representation
  8292. func (s PullRequestTarget) String() string {
  8293. return awsutil.Prettify(s)
  8294. }
  8295. // GoString returns the string representation
  8296. func (s PullRequestTarget) GoString() string {
  8297. return s.String()
  8298. }
  8299. // SetDestinationCommit sets the DestinationCommit field's value.
  8300. func (s *PullRequestTarget) SetDestinationCommit(v string) *PullRequestTarget {
  8301. s.DestinationCommit = &v
  8302. return s
  8303. }
  8304. // SetDestinationReference sets the DestinationReference field's value.
  8305. func (s *PullRequestTarget) SetDestinationReference(v string) *PullRequestTarget {
  8306. s.DestinationReference = &v
  8307. return s
  8308. }
  8309. // SetMergeBase sets the MergeBase field's value.
  8310. func (s *PullRequestTarget) SetMergeBase(v string) *PullRequestTarget {
  8311. s.MergeBase = &v
  8312. return s
  8313. }
  8314. // SetMergeMetadata sets the MergeMetadata field's value.
  8315. func (s *PullRequestTarget) SetMergeMetadata(v *MergeMetadata) *PullRequestTarget {
  8316. s.MergeMetadata = v
  8317. return s
  8318. }
  8319. // SetRepositoryName sets the RepositoryName field's value.
  8320. func (s *PullRequestTarget) SetRepositoryName(v string) *PullRequestTarget {
  8321. s.RepositoryName = &v
  8322. return s
  8323. }
  8324. // SetSourceCommit sets the SourceCommit field's value.
  8325. func (s *PullRequestTarget) SetSourceCommit(v string) *PullRequestTarget {
  8326. s.SourceCommit = &v
  8327. return s
  8328. }
  8329. // SetSourceReference sets the SourceReference field's value.
  8330. func (s *PullRequestTarget) SetSourceReference(v string) *PullRequestTarget {
  8331. s.SourceReference = &v
  8332. return s
  8333. }
  8334. type PutFileInput struct {
  8335. _ struct{} `type:"structure"`
  8336. // The name of the branch where you want to add or update the file. If this
  8337. // is an empty repository, this branch will be created.
  8338. //
  8339. // BranchName is a required field
  8340. BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"`
  8341. // A message about why this file was added or updated. While optional, adding
  8342. // a message is strongly encouraged in order to provide a more useful commit
  8343. // history for your repository.
  8344. CommitMessage *string `locationName:"commitMessage" type:"string"`
  8345. // An email address for the person adding or updating the file.
  8346. Email *string `locationName:"email" type:"string"`
  8347. // The content of the file, in binary object format.
  8348. //
  8349. // FileContent is automatically base64 encoded/decoded by the SDK.
  8350. //
  8351. // FileContent is a required field
  8352. FileContent []byte `locationName:"fileContent" type:"blob" required:"true"`
  8353. // The file mode permissions of the blob. Valid file mode permissions are listed
  8354. // below.
  8355. FileMode *string `locationName:"fileMode" type:"string" enum:"FileModeTypeEnum"`
  8356. // The name of the file you want to add or update, including the relative path
  8357. // to the file in the repository.
  8358. //
  8359. // If the path does not currently exist in the repository, the path will be
  8360. // created as part of adding the file.
  8361. //
  8362. // FilePath is a required field
  8363. FilePath *string `locationName:"filePath" type:"string" required:"true"`
  8364. // The name of the person adding or updating the file. While optional, adding
  8365. // a name is strongly encouraged in order to provide a more useful commit history
  8366. // for your repository.
  8367. Name *string `locationName:"name" type:"string"`
  8368. // The full commit ID of the head commit in the branch where you want to add
  8369. // or update the file. If this is an empty repository, no commit ID is required.
  8370. // If this is not an empty repository, a commit ID is required.
  8371. //
  8372. // The commit ID must match the ID of the head commit at the time of the operation,
  8373. // or an error will occur, and the file will not be added or updated.
  8374. ParentCommitId *string `locationName:"parentCommitId" type:"string"`
  8375. // The name of the repository where you want to add or update the file.
  8376. //
  8377. // RepositoryName is a required field
  8378. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  8379. }
  8380. // String returns the string representation
  8381. func (s PutFileInput) String() string {
  8382. return awsutil.Prettify(s)
  8383. }
  8384. // GoString returns the string representation
  8385. func (s PutFileInput) GoString() string {
  8386. return s.String()
  8387. }
  8388. // Validate inspects the fields of the type to determine if they are valid.
  8389. func (s *PutFileInput) Validate() error {
  8390. invalidParams := request.ErrInvalidParams{Context: "PutFileInput"}
  8391. if s.BranchName == nil {
  8392. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  8393. }
  8394. if s.BranchName != nil && len(*s.BranchName) < 1 {
  8395. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  8396. }
  8397. if s.FileContent == nil {
  8398. invalidParams.Add(request.NewErrParamRequired("FileContent"))
  8399. }
  8400. if s.FilePath == nil {
  8401. invalidParams.Add(request.NewErrParamRequired("FilePath"))
  8402. }
  8403. if s.RepositoryName == nil {
  8404. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  8405. }
  8406. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  8407. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  8408. }
  8409. if invalidParams.Len() > 0 {
  8410. return invalidParams
  8411. }
  8412. return nil
  8413. }
  8414. // SetBranchName sets the BranchName field's value.
  8415. func (s *PutFileInput) SetBranchName(v string) *PutFileInput {
  8416. s.BranchName = &v
  8417. return s
  8418. }
  8419. // SetCommitMessage sets the CommitMessage field's value.
  8420. func (s *PutFileInput) SetCommitMessage(v string) *PutFileInput {
  8421. s.CommitMessage = &v
  8422. return s
  8423. }
  8424. // SetEmail sets the Email field's value.
  8425. func (s *PutFileInput) SetEmail(v string) *PutFileInput {
  8426. s.Email = &v
  8427. return s
  8428. }
  8429. // SetFileContent sets the FileContent field's value.
  8430. func (s *PutFileInput) SetFileContent(v []byte) *PutFileInput {
  8431. s.FileContent = v
  8432. return s
  8433. }
  8434. // SetFileMode sets the FileMode field's value.
  8435. func (s *PutFileInput) SetFileMode(v string) *PutFileInput {
  8436. s.FileMode = &v
  8437. return s
  8438. }
  8439. // SetFilePath sets the FilePath field's value.
  8440. func (s *PutFileInput) SetFilePath(v string) *PutFileInput {
  8441. s.FilePath = &v
  8442. return s
  8443. }
  8444. // SetName sets the Name field's value.
  8445. func (s *PutFileInput) SetName(v string) *PutFileInput {
  8446. s.Name = &v
  8447. return s
  8448. }
  8449. // SetParentCommitId sets the ParentCommitId field's value.
  8450. func (s *PutFileInput) SetParentCommitId(v string) *PutFileInput {
  8451. s.ParentCommitId = &v
  8452. return s
  8453. }
  8454. // SetRepositoryName sets the RepositoryName field's value.
  8455. func (s *PutFileInput) SetRepositoryName(v string) *PutFileInput {
  8456. s.RepositoryName = &v
  8457. return s
  8458. }
  8459. type PutFileOutput struct {
  8460. _ struct{} `type:"structure"`
  8461. // The ID of the blob, which is its SHA-1 pointer.
  8462. //
  8463. // BlobId is a required field
  8464. BlobId *string `locationName:"blobId" type:"string" required:"true"`
  8465. // The full SHA of the commit that contains this file change.
  8466. //
  8467. // CommitId is a required field
  8468. CommitId *string `locationName:"commitId" type:"string" required:"true"`
  8469. // The full SHA-1 pointer of the tree information for the commit that contains
  8470. // this file change.
  8471. //
  8472. // TreeId is a required field
  8473. TreeId *string `locationName:"treeId" type:"string" required:"true"`
  8474. }
  8475. // String returns the string representation
  8476. func (s PutFileOutput) String() string {
  8477. return awsutil.Prettify(s)
  8478. }
  8479. // GoString returns the string representation
  8480. func (s PutFileOutput) GoString() string {
  8481. return s.String()
  8482. }
  8483. // SetBlobId sets the BlobId field's value.
  8484. func (s *PutFileOutput) SetBlobId(v string) *PutFileOutput {
  8485. s.BlobId = &v
  8486. return s
  8487. }
  8488. // SetCommitId sets the CommitId field's value.
  8489. func (s *PutFileOutput) SetCommitId(v string) *PutFileOutput {
  8490. s.CommitId = &v
  8491. return s
  8492. }
  8493. // SetTreeId sets the TreeId field's value.
  8494. func (s *PutFileOutput) SetTreeId(v string) *PutFileOutput {
  8495. s.TreeId = &v
  8496. return s
  8497. }
  8498. // Represents the input ofa put repository triggers operation.
  8499. type PutRepositoryTriggersInput struct {
  8500. _ struct{} `type:"structure"`
  8501. // The name of the repository where you want to create or update the trigger.
  8502. //
  8503. // RepositoryName is a required field
  8504. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  8505. // The JSON block of configuration information for each trigger.
  8506. //
  8507. // Triggers is a required field
  8508. Triggers []*RepositoryTrigger `locationName:"triggers" type:"list" required:"true"`
  8509. }
  8510. // String returns the string representation
  8511. func (s PutRepositoryTriggersInput) String() string {
  8512. return awsutil.Prettify(s)
  8513. }
  8514. // GoString returns the string representation
  8515. func (s PutRepositoryTriggersInput) GoString() string {
  8516. return s.String()
  8517. }
  8518. // Validate inspects the fields of the type to determine if they are valid.
  8519. func (s *PutRepositoryTriggersInput) Validate() error {
  8520. invalidParams := request.ErrInvalidParams{Context: "PutRepositoryTriggersInput"}
  8521. if s.RepositoryName == nil {
  8522. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  8523. }
  8524. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  8525. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  8526. }
  8527. if s.Triggers == nil {
  8528. invalidParams.Add(request.NewErrParamRequired("Triggers"))
  8529. }
  8530. if s.Triggers != nil {
  8531. for i, v := range s.Triggers {
  8532. if v == nil {
  8533. continue
  8534. }
  8535. if err := v.Validate(); err != nil {
  8536. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Triggers", i), err.(request.ErrInvalidParams))
  8537. }
  8538. }
  8539. }
  8540. if invalidParams.Len() > 0 {
  8541. return invalidParams
  8542. }
  8543. return nil
  8544. }
  8545. // SetRepositoryName sets the RepositoryName field's value.
  8546. func (s *PutRepositoryTriggersInput) SetRepositoryName(v string) *PutRepositoryTriggersInput {
  8547. s.RepositoryName = &v
  8548. return s
  8549. }
  8550. // SetTriggers sets the Triggers field's value.
  8551. func (s *PutRepositoryTriggersInput) SetTriggers(v []*RepositoryTrigger) *PutRepositoryTriggersInput {
  8552. s.Triggers = v
  8553. return s
  8554. }
  8555. // Represents the output of a put repository triggers operation.
  8556. type PutRepositoryTriggersOutput struct {
  8557. _ struct{} `type:"structure"`
  8558. // The system-generated unique ID for the create or update operation.
  8559. ConfigurationId *string `locationName:"configurationId" type:"string"`
  8560. }
  8561. // String returns the string representation
  8562. func (s PutRepositoryTriggersOutput) String() string {
  8563. return awsutil.Prettify(s)
  8564. }
  8565. // GoString returns the string representation
  8566. func (s PutRepositoryTriggersOutput) GoString() string {
  8567. return s.String()
  8568. }
  8569. // SetConfigurationId sets the ConfigurationId field's value.
  8570. func (s *PutRepositoryTriggersOutput) SetConfigurationId(v string) *PutRepositoryTriggersOutput {
  8571. s.ConfigurationId = &v
  8572. return s
  8573. }
  8574. // Information about a repository.
  8575. type RepositoryMetadata struct {
  8576. _ struct{} `type:"structure"`
  8577. // The ID of the AWS account associated with the repository.
  8578. AccountId *string `locationName:"accountId" type:"string"`
  8579. // The Amazon Resource Name (ARN) of the repository.
  8580. Arn *string `type:"string"`
  8581. // The URL to use for cloning the repository over HTTPS.
  8582. CloneUrlHttp *string `locationName:"cloneUrlHttp" type:"string"`
  8583. // The URL to use for cloning the repository over SSH.
  8584. CloneUrlSsh *string `locationName:"cloneUrlSsh" type:"string"`
  8585. // The date and time the repository was created, in timestamp format.
  8586. CreationDate *time.Time `locationName:"creationDate" type:"timestamp"`
  8587. // The repository's default branch name.
  8588. DefaultBranch *string `locationName:"defaultBranch" min:"1" type:"string"`
  8589. // The date and time the repository was last modified, in timestamp format.
  8590. LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"`
  8591. // A comment or description about the repository.
  8592. RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
  8593. // The ID of the repository.
  8594. RepositoryId *string `locationName:"repositoryId" type:"string"`
  8595. // The repository's name.
  8596. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  8597. }
  8598. // String returns the string representation
  8599. func (s RepositoryMetadata) String() string {
  8600. return awsutil.Prettify(s)
  8601. }
  8602. // GoString returns the string representation
  8603. func (s RepositoryMetadata) GoString() string {
  8604. return s.String()
  8605. }
  8606. // SetAccountId sets the AccountId field's value.
  8607. func (s *RepositoryMetadata) SetAccountId(v string) *RepositoryMetadata {
  8608. s.AccountId = &v
  8609. return s
  8610. }
  8611. // SetArn sets the Arn field's value.
  8612. func (s *RepositoryMetadata) SetArn(v string) *RepositoryMetadata {
  8613. s.Arn = &v
  8614. return s
  8615. }
  8616. // SetCloneUrlHttp sets the CloneUrlHttp field's value.
  8617. func (s *RepositoryMetadata) SetCloneUrlHttp(v string) *RepositoryMetadata {
  8618. s.CloneUrlHttp = &v
  8619. return s
  8620. }
  8621. // SetCloneUrlSsh sets the CloneUrlSsh field's value.
  8622. func (s *RepositoryMetadata) SetCloneUrlSsh(v string) *RepositoryMetadata {
  8623. s.CloneUrlSsh = &v
  8624. return s
  8625. }
  8626. // SetCreationDate sets the CreationDate field's value.
  8627. func (s *RepositoryMetadata) SetCreationDate(v time.Time) *RepositoryMetadata {
  8628. s.CreationDate = &v
  8629. return s
  8630. }
  8631. // SetDefaultBranch sets the DefaultBranch field's value.
  8632. func (s *RepositoryMetadata) SetDefaultBranch(v string) *RepositoryMetadata {
  8633. s.DefaultBranch = &v
  8634. return s
  8635. }
  8636. // SetLastModifiedDate sets the LastModifiedDate field's value.
  8637. func (s *RepositoryMetadata) SetLastModifiedDate(v time.Time) *RepositoryMetadata {
  8638. s.LastModifiedDate = &v
  8639. return s
  8640. }
  8641. // SetRepositoryDescription sets the RepositoryDescription field's value.
  8642. func (s *RepositoryMetadata) SetRepositoryDescription(v string) *RepositoryMetadata {
  8643. s.RepositoryDescription = &v
  8644. return s
  8645. }
  8646. // SetRepositoryId sets the RepositoryId field's value.
  8647. func (s *RepositoryMetadata) SetRepositoryId(v string) *RepositoryMetadata {
  8648. s.RepositoryId = &v
  8649. return s
  8650. }
  8651. // SetRepositoryName sets the RepositoryName field's value.
  8652. func (s *RepositoryMetadata) SetRepositoryName(v string) *RepositoryMetadata {
  8653. s.RepositoryName = &v
  8654. return s
  8655. }
  8656. // Information about a repository name and ID.
  8657. type RepositoryNameIdPair struct {
  8658. _ struct{} `type:"structure"`
  8659. // The ID associated with the repository.
  8660. RepositoryId *string `locationName:"repositoryId" type:"string"`
  8661. // The name associated with the repository.
  8662. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string"`
  8663. }
  8664. // String returns the string representation
  8665. func (s RepositoryNameIdPair) String() string {
  8666. return awsutil.Prettify(s)
  8667. }
  8668. // GoString returns the string representation
  8669. func (s RepositoryNameIdPair) GoString() string {
  8670. return s.String()
  8671. }
  8672. // SetRepositoryId sets the RepositoryId field's value.
  8673. func (s *RepositoryNameIdPair) SetRepositoryId(v string) *RepositoryNameIdPair {
  8674. s.RepositoryId = &v
  8675. return s
  8676. }
  8677. // SetRepositoryName sets the RepositoryName field's value.
  8678. func (s *RepositoryNameIdPair) SetRepositoryName(v string) *RepositoryNameIdPair {
  8679. s.RepositoryName = &v
  8680. return s
  8681. }
  8682. // Information about a trigger for a repository.
  8683. type RepositoryTrigger struct {
  8684. _ struct{} `type:"structure"`
  8685. // The branches that will be included in the trigger configuration. If you specify
  8686. // an empty array, the trigger will apply to all branches.
  8687. //
  8688. // While no content is required in the array, you must include the array itself.
  8689. Branches []*string `locationName:"branches" type:"list"`
  8690. // Any custom data associated with the trigger that will be included in the
  8691. // information sent to the target of the trigger.
  8692. CustomData *string `locationName:"customData" type:"string"`
  8693. // The ARN of the resource that is the target for a trigger. For example, the
  8694. // ARN of a topic in Amazon Simple Notification Service (SNS).
  8695. //
  8696. // DestinationArn is a required field
  8697. DestinationArn *string `locationName:"destinationArn" type:"string" required:"true"`
  8698. // The repository events that will cause the trigger to run actions in another
  8699. // service, such as sending a notification through Amazon Simple Notification
  8700. // Service (SNS).
  8701. //
  8702. // The valid value "all" cannot be used with any other values.
  8703. //
  8704. // Events is a required field
  8705. Events []*string `locationName:"events" type:"list" required:"true"`
  8706. // The name of the trigger.
  8707. //
  8708. // Name is a required field
  8709. Name *string `locationName:"name" type:"string" required:"true"`
  8710. }
  8711. // String returns the string representation
  8712. func (s RepositoryTrigger) String() string {
  8713. return awsutil.Prettify(s)
  8714. }
  8715. // GoString returns the string representation
  8716. func (s RepositoryTrigger) GoString() string {
  8717. return s.String()
  8718. }
  8719. // Validate inspects the fields of the type to determine if they are valid.
  8720. func (s *RepositoryTrigger) Validate() error {
  8721. invalidParams := request.ErrInvalidParams{Context: "RepositoryTrigger"}
  8722. if s.DestinationArn == nil {
  8723. invalidParams.Add(request.NewErrParamRequired("DestinationArn"))
  8724. }
  8725. if s.Events == nil {
  8726. invalidParams.Add(request.NewErrParamRequired("Events"))
  8727. }
  8728. if s.Name == nil {
  8729. invalidParams.Add(request.NewErrParamRequired("Name"))
  8730. }
  8731. if invalidParams.Len() > 0 {
  8732. return invalidParams
  8733. }
  8734. return nil
  8735. }
  8736. // SetBranches sets the Branches field's value.
  8737. func (s *RepositoryTrigger) SetBranches(v []*string) *RepositoryTrigger {
  8738. s.Branches = v
  8739. return s
  8740. }
  8741. // SetCustomData sets the CustomData field's value.
  8742. func (s *RepositoryTrigger) SetCustomData(v string) *RepositoryTrigger {
  8743. s.CustomData = &v
  8744. return s
  8745. }
  8746. // SetDestinationArn sets the DestinationArn field's value.
  8747. func (s *RepositoryTrigger) SetDestinationArn(v string) *RepositoryTrigger {
  8748. s.DestinationArn = &v
  8749. return s
  8750. }
  8751. // SetEvents sets the Events field's value.
  8752. func (s *RepositoryTrigger) SetEvents(v []*string) *RepositoryTrigger {
  8753. s.Events = v
  8754. return s
  8755. }
  8756. // SetName sets the Name field's value.
  8757. func (s *RepositoryTrigger) SetName(v string) *RepositoryTrigger {
  8758. s.Name = &v
  8759. return s
  8760. }
  8761. // A trigger failed to run.
  8762. type RepositoryTriggerExecutionFailure struct {
  8763. _ struct{} `type:"structure"`
  8764. // Additional message information about the trigger that did not run.
  8765. FailureMessage *string `locationName:"failureMessage" type:"string"`
  8766. // The name of the trigger that did not run.
  8767. Trigger *string `locationName:"trigger" type:"string"`
  8768. }
  8769. // String returns the string representation
  8770. func (s RepositoryTriggerExecutionFailure) String() string {
  8771. return awsutil.Prettify(s)
  8772. }
  8773. // GoString returns the string representation
  8774. func (s RepositoryTriggerExecutionFailure) GoString() string {
  8775. return s.String()
  8776. }
  8777. // SetFailureMessage sets the FailureMessage field's value.
  8778. func (s *RepositoryTriggerExecutionFailure) SetFailureMessage(v string) *RepositoryTriggerExecutionFailure {
  8779. s.FailureMessage = &v
  8780. return s
  8781. }
  8782. // SetTrigger sets the Trigger field's value.
  8783. func (s *RepositoryTriggerExecutionFailure) SetTrigger(v string) *RepositoryTriggerExecutionFailure {
  8784. s.Trigger = &v
  8785. return s
  8786. }
  8787. // Returns information about a submodule reference in a repository folder.
  8788. type SubModule struct {
  8789. _ struct{} `type:"structure"`
  8790. // The fully qualified path to the folder that contains the reference to the
  8791. // submodule.
  8792. AbsolutePath *string `locationName:"absolutePath" type:"string"`
  8793. // The commit ID that contains the reference to the submodule.
  8794. CommitId *string `locationName:"commitId" type:"string"`
  8795. // The relative path of the submodule from the folder where the query originated.
  8796. RelativePath *string `locationName:"relativePath" type:"string"`
  8797. }
  8798. // String returns the string representation
  8799. func (s SubModule) String() string {
  8800. return awsutil.Prettify(s)
  8801. }
  8802. // GoString returns the string representation
  8803. func (s SubModule) GoString() string {
  8804. return s.String()
  8805. }
  8806. // SetAbsolutePath sets the AbsolutePath field's value.
  8807. func (s *SubModule) SetAbsolutePath(v string) *SubModule {
  8808. s.AbsolutePath = &v
  8809. return s
  8810. }
  8811. // SetCommitId sets the CommitId field's value.
  8812. func (s *SubModule) SetCommitId(v string) *SubModule {
  8813. s.CommitId = &v
  8814. return s
  8815. }
  8816. // SetRelativePath sets the RelativePath field's value.
  8817. func (s *SubModule) SetRelativePath(v string) *SubModule {
  8818. s.RelativePath = &v
  8819. return s
  8820. }
  8821. // Returns information about a symbolic link in a repository folder.
  8822. type SymbolicLink struct {
  8823. _ struct{} `type:"structure"`
  8824. // The fully-qualified path to the folder that contains the symbolic link.
  8825. AbsolutePath *string `locationName:"absolutePath" type:"string"`
  8826. // The blob ID that contains the information about the symbolic link.
  8827. BlobId *string `locationName:"blobId" type:"string"`
  8828. // The file mode permissions of the blob that cotains information about the
  8829. // symbolic link.
  8830. FileMode *string `locationName:"fileMode" type:"string" enum:"FileModeTypeEnum"`
  8831. // The relative path of the symbolic link from the folder where the query originated.
  8832. RelativePath *string `locationName:"relativePath" type:"string"`
  8833. }
  8834. // String returns the string representation
  8835. func (s SymbolicLink) String() string {
  8836. return awsutil.Prettify(s)
  8837. }
  8838. // GoString returns the string representation
  8839. func (s SymbolicLink) GoString() string {
  8840. return s.String()
  8841. }
  8842. // SetAbsolutePath sets the AbsolutePath field's value.
  8843. func (s *SymbolicLink) SetAbsolutePath(v string) *SymbolicLink {
  8844. s.AbsolutePath = &v
  8845. return s
  8846. }
  8847. // SetBlobId sets the BlobId field's value.
  8848. func (s *SymbolicLink) SetBlobId(v string) *SymbolicLink {
  8849. s.BlobId = &v
  8850. return s
  8851. }
  8852. // SetFileMode sets the FileMode field's value.
  8853. func (s *SymbolicLink) SetFileMode(v string) *SymbolicLink {
  8854. s.FileMode = &v
  8855. return s
  8856. }
  8857. // SetRelativePath sets the RelativePath field's value.
  8858. func (s *SymbolicLink) SetRelativePath(v string) *SymbolicLink {
  8859. s.RelativePath = &v
  8860. return s
  8861. }
  8862. // Returns information about a target for a pull request.
  8863. type Target struct {
  8864. _ struct{} `type:"structure"`
  8865. // The branch of the repository where the pull request changes will be merged
  8866. // into. Also known as the destination branch.
  8867. DestinationReference *string `locationName:"destinationReference" type:"string"`
  8868. // The name of the repository that contains the pull request.
  8869. //
  8870. // RepositoryName is a required field
  8871. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  8872. // The branch of the repository that contains the changes for the pull request.
  8873. // Also known as the source branch.
  8874. //
  8875. // SourceReference is a required field
  8876. SourceReference *string `locationName:"sourceReference" type:"string" required:"true"`
  8877. }
  8878. // String returns the string representation
  8879. func (s Target) String() string {
  8880. return awsutil.Prettify(s)
  8881. }
  8882. // GoString returns the string representation
  8883. func (s Target) GoString() string {
  8884. return s.String()
  8885. }
  8886. // Validate inspects the fields of the type to determine if they are valid.
  8887. func (s *Target) Validate() error {
  8888. invalidParams := request.ErrInvalidParams{Context: "Target"}
  8889. if s.RepositoryName == nil {
  8890. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  8891. }
  8892. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  8893. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  8894. }
  8895. if s.SourceReference == nil {
  8896. invalidParams.Add(request.NewErrParamRequired("SourceReference"))
  8897. }
  8898. if invalidParams.Len() > 0 {
  8899. return invalidParams
  8900. }
  8901. return nil
  8902. }
  8903. // SetDestinationReference sets the DestinationReference field's value.
  8904. func (s *Target) SetDestinationReference(v string) *Target {
  8905. s.DestinationReference = &v
  8906. return s
  8907. }
  8908. // SetRepositoryName sets the RepositoryName field's value.
  8909. func (s *Target) SetRepositoryName(v string) *Target {
  8910. s.RepositoryName = &v
  8911. return s
  8912. }
  8913. // SetSourceReference sets the SourceReference field's value.
  8914. func (s *Target) SetSourceReference(v string) *Target {
  8915. s.SourceReference = &v
  8916. return s
  8917. }
  8918. // Represents the input of a test repository triggers operation.
  8919. type TestRepositoryTriggersInput struct {
  8920. _ struct{} `type:"structure"`
  8921. // The name of the repository in which to test the triggers.
  8922. //
  8923. // RepositoryName is a required field
  8924. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  8925. // The list of triggers to test.
  8926. //
  8927. // Triggers is a required field
  8928. Triggers []*RepositoryTrigger `locationName:"triggers" type:"list" required:"true"`
  8929. }
  8930. // String returns the string representation
  8931. func (s TestRepositoryTriggersInput) String() string {
  8932. return awsutil.Prettify(s)
  8933. }
  8934. // GoString returns the string representation
  8935. func (s TestRepositoryTriggersInput) GoString() string {
  8936. return s.String()
  8937. }
  8938. // Validate inspects the fields of the type to determine if they are valid.
  8939. func (s *TestRepositoryTriggersInput) Validate() error {
  8940. invalidParams := request.ErrInvalidParams{Context: "TestRepositoryTriggersInput"}
  8941. if s.RepositoryName == nil {
  8942. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  8943. }
  8944. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  8945. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  8946. }
  8947. if s.Triggers == nil {
  8948. invalidParams.Add(request.NewErrParamRequired("Triggers"))
  8949. }
  8950. if s.Triggers != nil {
  8951. for i, v := range s.Triggers {
  8952. if v == nil {
  8953. continue
  8954. }
  8955. if err := v.Validate(); err != nil {
  8956. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Triggers", i), err.(request.ErrInvalidParams))
  8957. }
  8958. }
  8959. }
  8960. if invalidParams.Len() > 0 {
  8961. return invalidParams
  8962. }
  8963. return nil
  8964. }
  8965. // SetRepositoryName sets the RepositoryName field's value.
  8966. func (s *TestRepositoryTriggersInput) SetRepositoryName(v string) *TestRepositoryTriggersInput {
  8967. s.RepositoryName = &v
  8968. return s
  8969. }
  8970. // SetTriggers sets the Triggers field's value.
  8971. func (s *TestRepositoryTriggersInput) SetTriggers(v []*RepositoryTrigger) *TestRepositoryTriggersInput {
  8972. s.Triggers = v
  8973. return s
  8974. }
  8975. // Represents the output of a test repository triggers operation.
  8976. type TestRepositoryTriggersOutput struct {
  8977. _ struct{} `type:"structure"`
  8978. // The list of triggers that were not able to be tested. This list provides
  8979. // the names of the triggers that could not be tested, separated by commas.
  8980. FailedExecutions []*RepositoryTriggerExecutionFailure `locationName:"failedExecutions" type:"list"`
  8981. // The list of triggers that were successfully tested. This list provides the
  8982. // names of the triggers that were successfully tested, separated by commas.
  8983. SuccessfulExecutions []*string `locationName:"successfulExecutions" type:"list"`
  8984. }
  8985. // String returns the string representation
  8986. func (s TestRepositoryTriggersOutput) String() string {
  8987. return awsutil.Prettify(s)
  8988. }
  8989. // GoString returns the string representation
  8990. func (s TestRepositoryTriggersOutput) GoString() string {
  8991. return s.String()
  8992. }
  8993. // SetFailedExecutions sets the FailedExecutions field's value.
  8994. func (s *TestRepositoryTriggersOutput) SetFailedExecutions(v []*RepositoryTriggerExecutionFailure) *TestRepositoryTriggersOutput {
  8995. s.FailedExecutions = v
  8996. return s
  8997. }
  8998. // SetSuccessfulExecutions sets the SuccessfulExecutions field's value.
  8999. func (s *TestRepositoryTriggersOutput) SetSuccessfulExecutions(v []*string) *TestRepositoryTriggersOutput {
  9000. s.SuccessfulExecutions = v
  9001. return s
  9002. }
  9003. type UpdateCommentInput struct {
  9004. _ struct{} `type:"structure"`
  9005. // The system-generated ID of the comment you want to update. To get this ID,
  9006. // use GetCommentsForComparedCommit or GetCommentsForPullRequest.
  9007. //
  9008. // CommentId is a required field
  9009. CommentId *string `locationName:"commentId" type:"string" required:"true"`
  9010. // The updated content with which you want to replace the existing content of
  9011. // the comment.
  9012. //
  9013. // Content is a required field
  9014. Content *string `locationName:"content" type:"string" required:"true"`
  9015. }
  9016. // String returns the string representation
  9017. func (s UpdateCommentInput) String() string {
  9018. return awsutil.Prettify(s)
  9019. }
  9020. // GoString returns the string representation
  9021. func (s UpdateCommentInput) GoString() string {
  9022. return s.String()
  9023. }
  9024. // Validate inspects the fields of the type to determine if they are valid.
  9025. func (s *UpdateCommentInput) Validate() error {
  9026. invalidParams := request.ErrInvalidParams{Context: "UpdateCommentInput"}
  9027. if s.CommentId == nil {
  9028. invalidParams.Add(request.NewErrParamRequired("CommentId"))
  9029. }
  9030. if s.Content == nil {
  9031. invalidParams.Add(request.NewErrParamRequired("Content"))
  9032. }
  9033. if invalidParams.Len() > 0 {
  9034. return invalidParams
  9035. }
  9036. return nil
  9037. }
  9038. // SetCommentId sets the CommentId field's value.
  9039. func (s *UpdateCommentInput) SetCommentId(v string) *UpdateCommentInput {
  9040. s.CommentId = &v
  9041. return s
  9042. }
  9043. // SetContent sets the Content field's value.
  9044. func (s *UpdateCommentInput) SetContent(v string) *UpdateCommentInput {
  9045. s.Content = &v
  9046. return s
  9047. }
  9048. type UpdateCommentOutput struct {
  9049. _ struct{} `type:"structure"`
  9050. // Information about the updated comment.
  9051. Comment *Comment `locationName:"comment" type:"structure"`
  9052. }
  9053. // String returns the string representation
  9054. func (s UpdateCommentOutput) String() string {
  9055. return awsutil.Prettify(s)
  9056. }
  9057. // GoString returns the string representation
  9058. func (s UpdateCommentOutput) GoString() string {
  9059. return s.String()
  9060. }
  9061. // SetComment sets the Comment field's value.
  9062. func (s *UpdateCommentOutput) SetComment(v *Comment) *UpdateCommentOutput {
  9063. s.Comment = v
  9064. return s
  9065. }
  9066. // Represents the input of an update default branch operation.
  9067. type UpdateDefaultBranchInput struct {
  9068. _ struct{} `type:"structure"`
  9069. // The name of the branch to set as the default.
  9070. //
  9071. // DefaultBranchName is a required field
  9072. DefaultBranchName *string `locationName:"defaultBranchName" min:"1" type:"string" required:"true"`
  9073. // The name of the repository to set or change the default branch for.
  9074. //
  9075. // RepositoryName is a required field
  9076. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  9077. }
  9078. // String returns the string representation
  9079. func (s UpdateDefaultBranchInput) String() string {
  9080. return awsutil.Prettify(s)
  9081. }
  9082. // GoString returns the string representation
  9083. func (s UpdateDefaultBranchInput) GoString() string {
  9084. return s.String()
  9085. }
  9086. // Validate inspects the fields of the type to determine if they are valid.
  9087. func (s *UpdateDefaultBranchInput) Validate() error {
  9088. invalidParams := request.ErrInvalidParams{Context: "UpdateDefaultBranchInput"}
  9089. if s.DefaultBranchName == nil {
  9090. invalidParams.Add(request.NewErrParamRequired("DefaultBranchName"))
  9091. }
  9092. if s.DefaultBranchName != nil && len(*s.DefaultBranchName) < 1 {
  9093. invalidParams.Add(request.NewErrParamMinLen("DefaultBranchName", 1))
  9094. }
  9095. if s.RepositoryName == nil {
  9096. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  9097. }
  9098. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  9099. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  9100. }
  9101. if invalidParams.Len() > 0 {
  9102. return invalidParams
  9103. }
  9104. return nil
  9105. }
  9106. // SetDefaultBranchName sets the DefaultBranchName field's value.
  9107. func (s *UpdateDefaultBranchInput) SetDefaultBranchName(v string) *UpdateDefaultBranchInput {
  9108. s.DefaultBranchName = &v
  9109. return s
  9110. }
  9111. // SetRepositoryName sets the RepositoryName field's value.
  9112. func (s *UpdateDefaultBranchInput) SetRepositoryName(v string) *UpdateDefaultBranchInput {
  9113. s.RepositoryName = &v
  9114. return s
  9115. }
  9116. type UpdateDefaultBranchOutput struct {
  9117. _ struct{} `type:"structure"`
  9118. }
  9119. // String returns the string representation
  9120. func (s UpdateDefaultBranchOutput) String() string {
  9121. return awsutil.Prettify(s)
  9122. }
  9123. // GoString returns the string representation
  9124. func (s UpdateDefaultBranchOutput) GoString() string {
  9125. return s.String()
  9126. }
  9127. type UpdatePullRequestDescriptionInput struct {
  9128. _ struct{} `type:"structure"`
  9129. // The updated content of the description for the pull request. This content
  9130. // will replace the existing description.
  9131. //
  9132. // Description is a required field
  9133. Description *string `locationName:"description" type:"string" required:"true"`
  9134. // The system-generated ID of the pull request. To get this ID, use ListPullRequests.
  9135. //
  9136. // PullRequestId is a required field
  9137. PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"`
  9138. }
  9139. // String returns the string representation
  9140. func (s UpdatePullRequestDescriptionInput) String() string {
  9141. return awsutil.Prettify(s)
  9142. }
  9143. // GoString returns the string representation
  9144. func (s UpdatePullRequestDescriptionInput) GoString() string {
  9145. return s.String()
  9146. }
  9147. // Validate inspects the fields of the type to determine if they are valid.
  9148. func (s *UpdatePullRequestDescriptionInput) Validate() error {
  9149. invalidParams := request.ErrInvalidParams{Context: "UpdatePullRequestDescriptionInput"}
  9150. if s.Description == nil {
  9151. invalidParams.Add(request.NewErrParamRequired("Description"))
  9152. }
  9153. if s.PullRequestId == nil {
  9154. invalidParams.Add(request.NewErrParamRequired("PullRequestId"))
  9155. }
  9156. if invalidParams.Len() > 0 {
  9157. return invalidParams
  9158. }
  9159. return nil
  9160. }
  9161. // SetDescription sets the Description field's value.
  9162. func (s *UpdatePullRequestDescriptionInput) SetDescription(v string) *UpdatePullRequestDescriptionInput {
  9163. s.Description = &v
  9164. return s
  9165. }
  9166. // SetPullRequestId sets the PullRequestId field's value.
  9167. func (s *UpdatePullRequestDescriptionInput) SetPullRequestId(v string) *UpdatePullRequestDescriptionInput {
  9168. s.PullRequestId = &v
  9169. return s
  9170. }
  9171. type UpdatePullRequestDescriptionOutput struct {
  9172. _ struct{} `type:"structure"`
  9173. // Information about the updated pull request.
  9174. //
  9175. // PullRequest is a required field
  9176. PullRequest *PullRequest `locationName:"pullRequest" type:"structure" required:"true"`
  9177. }
  9178. // String returns the string representation
  9179. func (s UpdatePullRequestDescriptionOutput) String() string {
  9180. return awsutil.Prettify(s)
  9181. }
  9182. // GoString returns the string representation
  9183. func (s UpdatePullRequestDescriptionOutput) GoString() string {
  9184. return s.String()
  9185. }
  9186. // SetPullRequest sets the PullRequest field's value.
  9187. func (s *UpdatePullRequestDescriptionOutput) SetPullRequest(v *PullRequest) *UpdatePullRequestDescriptionOutput {
  9188. s.PullRequest = v
  9189. return s
  9190. }
  9191. type UpdatePullRequestStatusInput struct {
  9192. _ struct{} `type:"structure"`
  9193. // The system-generated ID of the pull request. To get this ID, use ListPullRequests.
  9194. //
  9195. // PullRequestId is a required field
  9196. PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"`
  9197. // The status of the pull request. The only valid operations are to update the
  9198. // status from OPEN to OPEN, OPEN to CLOSED or from from CLOSED to CLOSED.
  9199. //
  9200. // PullRequestStatus is a required field
  9201. PullRequestStatus *string `locationName:"pullRequestStatus" type:"string" required:"true" enum:"PullRequestStatusEnum"`
  9202. }
  9203. // String returns the string representation
  9204. func (s UpdatePullRequestStatusInput) String() string {
  9205. return awsutil.Prettify(s)
  9206. }
  9207. // GoString returns the string representation
  9208. func (s UpdatePullRequestStatusInput) GoString() string {
  9209. return s.String()
  9210. }
  9211. // Validate inspects the fields of the type to determine if they are valid.
  9212. func (s *UpdatePullRequestStatusInput) Validate() error {
  9213. invalidParams := request.ErrInvalidParams{Context: "UpdatePullRequestStatusInput"}
  9214. if s.PullRequestId == nil {
  9215. invalidParams.Add(request.NewErrParamRequired("PullRequestId"))
  9216. }
  9217. if s.PullRequestStatus == nil {
  9218. invalidParams.Add(request.NewErrParamRequired("PullRequestStatus"))
  9219. }
  9220. if invalidParams.Len() > 0 {
  9221. return invalidParams
  9222. }
  9223. return nil
  9224. }
  9225. // SetPullRequestId sets the PullRequestId field's value.
  9226. func (s *UpdatePullRequestStatusInput) SetPullRequestId(v string) *UpdatePullRequestStatusInput {
  9227. s.PullRequestId = &v
  9228. return s
  9229. }
  9230. // SetPullRequestStatus sets the PullRequestStatus field's value.
  9231. func (s *UpdatePullRequestStatusInput) SetPullRequestStatus(v string) *UpdatePullRequestStatusInput {
  9232. s.PullRequestStatus = &v
  9233. return s
  9234. }
  9235. type UpdatePullRequestStatusOutput struct {
  9236. _ struct{} `type:"structure"`
  9237. // Information about the pull request.
  9238. //
  9239. // PullRequest is a required field
  9240. PullRequest *PullRequest `locationName:"pullRequest" type:"structure" required:"true"`
  9241. }
  9242. // String returns the string representation
  9243. func (s UpdatePullRequestStatusOutput) String() string {
  9244. return awsutil.Prettify(s)
  9245. }
  9246. // GoString returns the string representation
  9247. func (s UpdatePullRequestStatusOutput) GoString() string {
  9248. return s.String()
  9249. }
  9250. // SetPullRequest sets the PullRequest field's value.
  9251. func (s *UpdatePullRequestStatusOutput) SetPullRequest(v *PullRequest) *UpdatePullRequestStatusOutput {
  9252. s.PullRequest = v
  9253. return s
  9254. }
  9255. type UpdatePullRequestTitleInput struct {
  9256. _ struct{} `type:"structure"`
  9257. // The system-generated ID of the pull request. To get this ID, use ListPullRequests.
  9258. //
  9259. // PullRequestId is a required field
  9260. PullRequestId *string `locationName:"pullRequestId" type:"string" required:"true"`
  9261. // The updated title of the pull request. This will replace the existing title.
  9262. //
  9263. // Title is a required field
  9264. Title *string `locationName:"title" type:"string" required:"true"`
  9265. }
  9266. // String returns the string representation
  9267. func (s UpdatePullRequestTitleInput) String() string {
  9268. return awsutil.Prettify(s)
  9269. }
  9270. // GoString returns the string representation
  9271. func (s UpdatePullRequestTitleInput) GoString() string {
  9272. return s.String()
  9273. }
  9274. // Validate inspects the fields of the type to determine if they are valid.
  9275. func (s *UpdatePullRequestTitleInput) Validate() error {
  9276. invalidParams := request.ErrInvalidParams{Context: "UpdatePullRequestTitleInput"}
  9277. if s.PullRequestId == nil {
  9278. invalidParams.Add(request.NewErrParamRequired("PullRequestId"))
  9279. }
  9280. if s.Title == nil {
  9281. invalidParams.Add(request.NewErrParamRequired("Title"))
  9282. }
  9283. if invalidParams.Len() > 0 {
  9284. return invalidParams
  9285. }
  9286. return nil
  9287. }
  9288. // SetPullRequestId sets the PullRequestId field's value.
  9289. func (s *UpdatePullRequestTitleInput) SetPullRequestId(v string) *UpdatePullRequestTitleInput {
  9290. s.PullRequestId = &v
  9291. return s
  9292. }
  9293. // SetTitle sets the Title field's value.
  9294. func (s *UpdatePullRequestTitleInput) SetTitle(v string) *UpdatePullRequestTitleInput {
  9295. s.Title = &v
  9296. return s
  9297. }
  9298. type UpdatePullRequestTitleOutput struct {
  9299. _ struct{} `type:"structure"`
  9300. // Information about the updated pull request.
  9301. //
  9302. // PullRequest is a required field
  9303. PullRequest *PullRequest `locationName:"pullRequest" type:"structure" required:"true"`
  9304. }
  9305. // String returns the string representation
  9306. func (s UpdatePullRequestTitleOutput) String() string {
  9307. return awsutil.Prettify(s)
  9308. }
  9309. // GoString returns the string representation
  9310. func (s UpdatePullRequestTitleOutput) GoString() string {
  9311. return s.String()
  9312. }
  9313. // SetPullRequest sets the PullRequest field's value.
  9314. func (s *UpdatePullRequestTitleOutput) SetPullRequest(v *PullRequest) *UpdatePullRequestTitleOutput {
  9315. s.PullRequest = v
  9316. return s
  9317. }
  9318. // Represents the input of an update repository description operation.
  9319. type UpdateRepositoryDescriptionInput struct {
  9320. _ struct{} `type:"structure"`
  9321. // The new comment or description for the specified repository. Repository descriptions
  9322. // are limited to 1,000 characters.
  9323. RepositoryDescription *string `locationName:"repositoryDescription" type:"string"`
  9324. // The name of the repository to set or change the comment or description for.
  9325. //
  9326. // RepositoryName is a required field
  9327. RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"`
  9328. }
  9329. // String returns the string representation
  9330. func (s UpdateRepositoryDescriptionInput) String() string {
  9331. return awsutil.Prettify(s)
  9332. }
  9333. // GoString returns the string representation
  9334. func (s UpdateRepositoryDescriptionInput) GoString() string {
  9335. return s.String()
  9336. }
  9337. // Validate inspects the fields of the type to determine if they are valid.
  9338. func (s *UpdateRepositoryDescriptionInput) Validate() error {
  9339. invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryDescriptionInput"}
  9340. if s.RepositoryName == nil {
  9341. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  9342. }
  9343. if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
  9344. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
  9345. }
  9346. if invalidParams.Len() > 0 {
  9347. return invalidParams
  9348. }
  9349. return nil
  9350. }
  9351. // SetRepositoryDescription sets the RepositoryDescription field's value.
  9352. func (s *UpdateRepositoryDescriptionInput) SetRepositoryDescription(v string) *UpdateRepositoryDescriptionInput {
  9353. s.RepositoryDescription = &v
  9354. return s
  9355. }
  9356. // SetRepositoryName sets the RepositoryName field's value.
  9357. func (s *UpdateRepositoryDescriptionInput) SetRepositoryName(v string) *UpdateRepositoryDescriptionInput {
  9358. s.RepositoryName = &v
  9359. return s
  9360. }
  9361. type UpdateRepositoryDescriptionOutput struct {
  9362. _ struct{} `type:"structure"`
  9363. }
  9364. // String returns the string representation
  9365. func (s UpdateRepositoryDescriptionOutput) String() string {
  9366. return awsutil.Prettify(s)
  9367. }
  9368. // GoString returns the string representation
  9369. func (s UpdateRepositoryDescriptionOutput) GoString() string {
  9370. return s.String()
  9371. }
  9372. // Represents the input of an update repository description operation.
  9373. type UpdateRepositoryNameInput struct {
  9374. _ struct{} `type:"structure"`
  9375. // The new name for the repository.
  9376. //
  9377. // NewName is a required field
  9378. NewName *string `locationName:"newName" min:"1" type:"string" required:"true"`
  9379. // The existing name of the repository.
  9380. //
  9381. // OldName is a required field
  9382. OldName *string `locationName:"oldName" min:"1" type:"string" required:"true"`
  9383. }
  9384. // String returns the string representation
  9385. func (s UpdateRepositoryNameInput) String() string {
  9386. return awsutil.Prettify(s)
  9387. }
  9388. // GoString returns the string representation
  9389. func (s UpdateRepositoryNameInput) GoString() string {
  9390. return s.String()
  9391. }
  9392. // Validate inspects the fields of the type to determine if they are valid.
  9393. func (s *UpdateRepositoryNameInput) Validate() error {
  9394. invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryNameInput"}
  9395. if s.NewName == nil {
  9396. invalidParams.Add(request.NewErrParamRequired("NewName"))
  9397. }
  9398. if s.NewName != nil && len(*s.NewName) < 1 {
  9399. invalidParams.Add(request.NewErrParamMinLen("NewName", 1))
  9400. }
  9401. if s.OldName == nil {
  9402. invalidParams.Add(request.NewErrParamRequired("OldName"))
  9403. }
  9404. if s.OldName != nil && len(*s.OldName) < 1 {
  9405. invalidParams.Add(request.NewErrParamMinLen("OldName", 1))
  9406. }
  9407. if invalidParams.Len() > 0 {
  9408. return invalidParams
  9409. }
  9410. return nil
  9411. }
  9412. // SetNewName sets the NewName field's value.
  9413. func (s *UpdateRepositoryNameInput) SetNewName(v string) *UpdateRepositoryNameInput {
  9414. s.NewName = &v
  9415. return s
  9416. }
  9417. // SetOldName sets the OldName field's value.
  9418. func (s *UpdateRepositoryNameInput) SetOldName(v string) *UpdateRepositoryNameInput {
  9419. s.OldName = &v
  9420. return s
  9421. }
  9422. type UpdateRepositoryNameOutput struct {
  9423. _ struct{} `type:"structure"`
  9424. }
  9425. // String returns the string representation
  9426. func (s UpdateRepositoryNameOutput) String() string {
  9427. return awsutil.Prettify(s)
  9428. }
  9429. // GoString returns the string representation
  9430. func (s UpdateRepositoryNameOutput) GoString() string {
  9431. return s.String()
  9432. }
  9433. // Information about the user who made a specified commit.
  9434. type UserInfo struct {
  9435. _ struct{} `type:"structure"`
  9436. // The date when the specified commit was commited, in timestamp format with
  9437. // GMT offset.
  9438. Date *string `locationName:"date" type:"string"`
  9439. // The email address associated with the user who made the commit, if any.
  9440. Email *string `locationName:"email" type:"string"`
  9441. // The name of the user who made the specified commit.
  9442. Name *string `locationName:"name" type:"string"`
  9443. }
  9444. // String returns the string representation
  9445. func (s UserInfo) String() string {
  9446. return awsutil.Prettify(s)
  9447. }
  9448. // GoString returns the string representation
  9449. func (s UserInfo) GoString() string {
  9450. return s.String()
  9451. }
  9452. // SetDate sets the Date field's value.
  9453. func (s *UserInfo) SetDate(v string) *UserInfo {
  9454. s.Date = &v
  9455. return s
  9456. }
  9457. // SetEmail sets the Email field's value.
  9458. func (s *UserInfo) SetEmail(v string) *UserInfo {
  9459. s.Email = &v
  9460. return s
  9461. }
  9462. // SetName sets the Name field's value.
  9463. func (s *UserInfo) SetName(v string) *UserInfo {
  9464. s.Name = &v
  9465. return s
  9466. }
  9467. const (
  9468. // ChangeTypeEnumA is a ChangeTypeEnum enum value
  9469. ChangeTypeEnumA = "A"
  9470. // ChangeTypeEnumM is a ChangeTypeEnum enum value
  9471. ChangeTypeEnumM = "M"
  9472. // ChangeTypeEnumD is a ChangeTypeEnum enum value
  9473. ChangeTypeEnumD = "D"
  9474. )
  9475. const (
  9476. // FileModeTypeEnumExecutable is a FileModeTypeEnum enum value
  9477. FileModeTypeEnumExecutable = "EXECUTABLE"
  9478. // FileModeTypeEnumNormal is a FileModeTypeEnum enum value
  9479. FileModeTypeEnumNormal = "NORMAL"
  9480. // FileModeTypeEnumSymlink is a FileModeTypeEnum enum value
  9481. FileModeTypeEnumSymlink = "SYMLINK"
  9482. )
  9483. const (
  9484. // MergeOptionTypeEnumFastForwardMerge is a MergeOptionTypeEnum enum value
  9485. MergeOptionTypeEnumFastForwardMerge = "FAST_FORWARD_MERGE"
  9486. )
  9487. const (
  9488. // OrderEnumAscending is a OrderEnum enum value
  9489. OrderEnumAscending = "ascending"
  9490. // OrderEnumDescending is a OrderEnum enum value
  9491. OrderEnumDescending = "descending"
  9492. )
  9493. const (
  9494. // PullRequestEventTypePullRequestCreated is a PullRequestEventType enum value
  9495. PullRequestEventTypePullRequestCreated = "PULL_REQUEST_CREATED"
  9496. // PullRequestEventTypePullRequestStatusChanged is a PullRequestEventType enum value
  9497. PullRequestEventTypePullRequestStatusChanged = "PULL_REQUEST_STATUS_CHANGED"
  9498. // PullRequestEventTypePullRequestSourceReferenceUpdated is a PullRequestEventType enum value
  9499. PullRequestEventTypePullRequestSourceReferenceUpdated = "PULL_REQUEST_SOURCE_REFERENCE_UPDATED"
  9500. // PullRequestEventTypePullRequestMergeStateChanged is a PullRequestEventType enum value
  9501. PullRequestEventTypePullRequestMergeStateChanged = "PULL_REQUEST_MERGE_STATE_CHANGED"
  9502. )
  9503. const (
  9504. // PullRequestStatusEnumOpen is a PullRequestStatusEnum enum value
  9505. PullRequestStatusEnumOpen = "OPEN"
  9506. // PullRequestStatusEnumClosed is a PullRequestStatusEnum enum value
  9507. PullRequestStatusEnumClosed = "CLOSED"
  9508. )
  9509. const (
  9510. // RelativeFileVersionEnumBefore is a RelativeFileVersionEnum enum value
  9511. RelativeFileVersionEnumBefore = "BEFORE"
  9512. // RelativeFileVersionEnumAfter is a RelativeFileVersionEnum enum value
  9513. RelativeFileVersionEnumAfter = "AFTER"
  9514. )
  9515. const (
  9516. // RepositoryTriggerEventEnumAll is a RepositoryTriggerEventEnum enum value
  9517. RepositoryTriggerEventEnumAll = "all"
  9518. // RepositoryTriggerEventEnumUpdateReference is a RepositoryTriggerEventEnum enum value
  9519. RepositoryTriggerEventEnumUpdateReference = "updateReference"
  9520. // RepositoryTriggerEventEnumCreateReference is a RepositoryTriggerEventEnum enum value
  9521. RepositoryTriggerEventEnumCreateReference = "createReference"
  9522. // RepositoryTriggerEventEnumDeleteReference is a RepositoryTriggerEventEnum enum value
  9523. RepositoryTriggerEventEnumDeleteReference = "deleteReference"
  9524. )
  9525. const (
  9526. // SortByEnumRepositoryName is a SortByEnum enum value
  9527. SortByEnumRepositoryName = "repositoryName"
  9528. // SortByEnumLastModifiedDate is a SortByEnum enum value
  9529. SortByEnumLastModifiedDate = "lastModifiedDate"
  9530. )