container-gen.go 464 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999
  1. // Copyright 2018 Google Inc. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package container provides access to the Kubernetes Engine API.
  6. //
  7. // See https://cloud.google.com/container-engine/
  8. //
  9. // Usage example:
  10. //
  11. // import "google.golang.org/api/container/v1"
  12. // ...
  13. // containerService, err := container.New(oauthHttpClient)
  14. package container // import "google.golang.org/api/container/v1"
  15. import (
  16. "bytes"
  17. "context"
  18. "encoding/json"
  19. "errors"
  20. "fmt"
  21. "io"
  22. "net/http"
  23. "net/url"
  24. "strconv"
  25. "strings"
  26. gensupport "google.golang.org/api/gensupport"
  27. googleapi "google.golang.org/api/googleapi"
  28. )
  29. // Always reference these packages, just in case the auto-generated code
  30. // below doesn't.
  31. var _ = bytes.NewBuffer
  32. var _ = strconv.Itoa
  33. var _ = fmt.Sprintf
  34. var _ = json.NewDecoder
  35. var _ = io.Copy
  36. var _ = url.Parse
  37. var _ = gensupport.MarshalJSON
  38. var _ = googleapi.Version
  39. var _ = errors.New
  40. var _ = strings.Replace
  41. var _ = context.Canceled
  42. const apiId = "container:v1"
  43. const apiName = "container"
  44. const apiVersion = "v1"
  45. const basePath = "https://container.googleapis.com/"
  46. // OAuth2 scopes used by this API.
  47. const (
  48. // View and manage your data across Google Cloud Platform services
  49. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  50. )
  51. func New(client *http.Client) (*Service, error) {
  52. if client == nil {
  53. return nil, errors.New("client is nil")
  54. }
  55. s := &Service{client: client, BasePath: basePath}
  56. s.Projects = NewProjectsService(s)
  57. return s, nil
  58. }
  59. type Service struct {
  60. client *http.Client
  61. BasePath string // API endpoint base URL
  62. UserAgent string // optional additional User-Agent fragment
  63. Projects *ProjectsService
  64. }
  65. func (s *Service) userAgent() string {
  66. if s.UserAgent == "" {
  67. return googleapi.UserAgent
  68. }
  69. return googleapi.UserAgent + " " + s.UserAgent
  70. }
  71. func NewProjectsService(s *Service) *ProjectsService {
  72. rs := &ProjectsService{s: s}
  73. rs.Locations = NewProjectsLocationsService(s)
  74. rs.Zones = NewProjectsZonesService(s)
  75. return rs
  76. }
  77. type ProjectsService struct {
  78. s *Service
  79. Locations *ProjectsLocationsService
  80. Zones *ProjectsZonesService
  81. }
  82. func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
  83. rs := &ProjectsLocationsService{s: s}
  84. rs.Clusters = NewProjectsLocationsClustersService(s)
  85. rs.Operations = NewProjectsLocationsOperationsService(s)
  86. return rs
  87. }
  88. type ProjectsLocationsService struct {
  89. s *Service
  90. Clusters *ProjectsLocationsClustersService
  91. Operations *ProjectsLocationsOperationsService
  92. }
  93. func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService {
  94. rs := &ProjectsLocationsClustersService{s: s}
  95. rs.NodePools = NewProjectsLocationsClustersNodePoolsService(s)
  96. return rs
  97. }
  98. type ProjectsLocationsClustersService struct {
  99. s *Service
  100. NodePools *ProjectsLocationsClustersNodePoolsService
  101. }
  102. func NewProjectsLocationsClustersNodePoolsService(s *Service) *ProjectsLocationsClustersNodePoolsService {
  103. rs := &ProjectsLocationsClustersNodePoolsService{s: s}
  104. return rs
  105. }
  106. type ProjectsLocationsClustersNodePoolsService struct {
  107. s *Service
  108. }
  109. func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
  110. rs := &ProjectsLocationsOperationsService{s: s}
  111. return rs
  112. }
  113. type ProjectsLocationsOperationsService struct {
  114. s *Service
  115. }
  116. func NewProjectsZonesService(s *Service) *ProjectsZonesService {
  117. rs := &ProjectsZonesService{s: s}
  118. rs.Clusters = NewProjectsZonesClustersService(s)
  119. rs.Operations = NewProjectsZonesOperationsService(s)
  120. return rs
  121. }
  122. type ProjectsZonesService struct {
  123. s *Service
  124. Clusters *ProjectsZonesClustersService
  125. Operations *ProjectsZonesOperationsService
  126. }
  127. func NewProjectsZonesClustersService(s *Service) *ProjectsZonesClustersService {
  128. rs := &ProjectsZonesClustersService{s: s}
  129. rs.NodePools = NewProjectsZonesClustersNodePoolsService(s)
  130. return rs
  131. }
  132. type ProjectsZonesClustersService struct {
  133. s *Service
  134. NodePools *ProjectsZonesClustersNodePoolsService
  135. }
  136. func NewProjectsZonesClustersNodePoolsService(s *Service) *ProjectsZonesClustersNodePoolsService {
  137. rs := &ProjectsZonesClustersNodePoolsService{s: s}
  138. return rs
  139. }
  140. type ProjectsZonesClustersNodePoolsService struct {
  141. s *Service
  142. }
  143. func NewProjectsZonesOperationsService(s *Service) *ProjectsZonesOperationsService {
  144. rs := &ProjectsZonesOperationsService{s: s}
  145. return rs
  146. }
  147. type ProjectsZonesOperationsService struct {
  148. s *Service
  149. }
  150. // AcceleratorConfig: AcceleratorConfig represents a Hardware
  151. // Accelerator request.
  152. type AcceleratorConfig struct {
  153. // AcceleratorCount: The number of the accelerator cards exposed to an
  154. // instance.
  155. AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"`
  156. // AcceleratorType: The accelerator type resource name. List of
  157. // supported accelerators
  158. // [here](/compute/docs/gpus/#Introduction)
  159. AcceleratorType string `json:"acceleratorType,omitempty"`
  160. // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to
  161. // unconditionally include in API requests. By default, fields with
  162. // empty values are omitted from API requests. However, any non-pointer,
  163. // non-interface field appearing in ForceSendFields will be sent to the
  164. // server regardless of whether the field is empty or not. This may be
  165. // used to include empty fields in Patch requests.
  166. ForceSendFields []string `json:"-"`
  167. // NullFields is a list of field names (e.g. "AcceleratorCount") to
  168. // include in API requests with the JSON null value. By default, fields
  169. // with empty values are omitted from API requests. However, any field
  170. // with an empty value appearing in NullFields will be sent to the
  171. // server as null. It is an error if a field in this list has a
  172. // non-empty value. This may be used to include null fields in Patch
  173. // requests.
  174. NullFields []string `json:"-"`
  175. }
  176. func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) {
  177. type NoMethod AcceleratorConfig
  178. raw := NoMethod(*s)
  179. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  180. }
  181. // AddonsConfig: Configuration for the addons that can be automatically
  182. // spun up in the
  183. // cluster, enabling additional functionality.
  184. type AddonsConfig struct {
  185. // HorizontalPodAutoscaling: Configuration for the horizontal pod
  186. // autoscaling feature, which
  187. // increases or decreases the number of replica pods a replication
  188. // controller
  189. // has based on the resource usage of the existing pods.
  190. HorizontalPodAutoscaling *HorizontalPodAutoscaling `json:"horizontalPodAutoscaling,omitempty"`
  191. // HttpLoadBalancing: Configuration for the HTTP (L7) load balancing
  192. // controller addon, which
  193. // makes it easy to set up HTTP load balancers for services in a
  194. // cluster.
  195. HttpLoadBalancing *HttpLoadBalancing `json:"httpLoadBalancing,omitempty"`
  196. // KubernetesDashboard: Configuration for the Kubernetes Dashboard.
  197. KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"`
  198. // NetworkPolicyConfig: Configuration for NetworkPolicy. This only
  199. // tracks whether the addon
  200. // is enabled or not on the Master, it does not track whether network
  201. // policy
  202. // is enabled for the nodes.
  203. NetworkPolicyConfig *NetworkPolicyConfig `json:"networkPolicyConfig,omitempty"`
  204. // ForceSendFields is a list of field names (e.g.
  205. // "HorizontalPodAutoscaling") to unconditionally include in API
  206. // requests. By default, fields with empty values are omitted from API
  207. // requests. However, any non-pointer, non-interface field appearing in
  208. // ForceSendFields will be sent to the server regardless of whether the
  209. // field is empty or not. This may be used to include empty fields in
  210. // Patch requests.
  211. ForceSendFields []string `json:"-"`
  212. // NullFields is a list of field names (e.g. "HorizontalPodAutoscaling")
  213. // to include in API requests with the JSON null value. By default,
  214. // fields with empty values are omitted from API requests. However, any
  215. // field with an empty value appearing in NullFields will be sent to the
  216. // server as null. It is an error if a field in this list has a
  217. // non-empty value. This may be used to include null fields in Patch
  218. // requests.
  219. NullFields []string `json:"-"`
  220. }
  221. func (s *AddonsConfig) MarshalJSON() ([]byte, error) {
  222. type NoMethod AddonsConfig
  223. raw := NoMethod(*s)
  224. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  225. }
  226. // AutoUpgradeOptions: AutoUpgradeOptions defines the set of options for
  227. // the user to control how
  228. // the Auto Upgrades will proceed.
  229. type AutoUpgradeOptions struct {
  230. // AutoUpgradeStartTime: [Output only] This field is set when upgrades
  231. // are about to commence
  232. // with the approximate start time for the upgrades,
  233. // in
  234. // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
  235. AutoUpgradeStartTime string `json:"autoUpgradeStartTime,omitempty"`
  236. // Description: [Output only] This field is set when upgrades are about
  237. // to commence
  238. // with the description of the upgrade.
  239. Description string `json:"description,omitempty"`
  240. // ForceSendFields is a list of field names (e.g.
  241. // "AutoUpgradeStartTime") to unconditionally include in API requests.
  242. // By default, fields with empty values are omitted from API requests.
  243. // However, any non-pointer, non-interface field appearing in
  244. // ForceSendFields will be sent to the server regardless of whether the
  245. // field is empty or not. This may be used to include empty fields in
  246. // Patch requests.
  247. ForceSendFields []string `json:"-"`
  248. // NullFields is a list of field names (e.g. "AutoUpgradeStartTime") to
  249. // include in API requests with the JSON null value. By default, fields
  250. // with empty values are omitted from API requests. However, any field
  251. // with an empty value appearing in NullFields will be sent to the
  252. // server as null. It is an error if a field in this list has a
  253. // non-empty value. This may be used to include null fields in Patch
  254. // requests.
  255. NullFields []string `json:"-"`
  256. }
  257. func (s *AutoUpgradeOptions) MarshalJSON() ([]byte, error) {
  258. type NoMethod AutoUpgradeOptions
  259. raw := NoMethod(*s)
  260. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  261. }
  262. // CancelOperationRequest: CancelOperationRequest cancels a single
  263. // operation.
  264. type CancelOperationRequest struct {
  265. // Name: The name (project, location, operation id) of the operation to
  266. // cancel.
  267. // Specified in the format 'projects/*/locations/*/operations/*'.
  268. Name string `json:"name,omitempty"`
  269. // OperationId: Deprecated. The server-assigned `name` of the
  270. // operation.
  271. // This field has been deprecated and replaced by the name field.
  272. OperationId string `json:"operationId,omitempty"`
  273. // ProjectId: Deprecated. The Google Developers Console [project ID or
  274. // project
  275. // number](https://support.google.com/cloud/answer/6158840).
  276. // This
  277. // field has been deprecated and replaced by the name field.
  278. ProjectId string `json:"projectId,omitempty"`
  279. // Zone: Deprecated. The name of the Google Compute
  280. // Engine
  281. // [zone](/compute/docs/zones#available) in which the operation
  282. // resides.
  283. // This field has been deprecated and replaced by the name field.
  284. Zone string `json:"zone,omitempty"`
  285. // ForceSendFields is a list of field names (e.g. "Name") to
  286. // unconditionally include in API requests. By default, fields with
  287. // empty values are omitted from API requests. However, any non-pointer,
  288. // non-interface field appearing in ForceSendFields will be sent to the
  289. // server regardless of whether the field is empty or not. This may be
  290. // used to include empty fields in Patch requests.
  291. ForceSendFields []string `json:"-"`
  292. // NullFields is a list of field names (e.g. "Name") to include in API
  293. // requests with the JSON null value. By default, fields with empty
  294. // values are omitted from API requests. However, any field with an
  295. // empty value appearing in NullFields will be sent to the server as
  296. // null. It is an error if a field in this list has a non-empty value.
  297. // This may be used to include null fields in Patch requests.
  298. NullFields []string `json:"-"`
  299. }
  300. func (s *CancelOperationRequest) MarshalJSON() ([]byte, error) {
  301. type NoMethod CancelOperationRequest
  302. raw := NoMethod(*s)
  303. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  304. }
  305. // CidrBlock: CidrBlock contains an optional name and one CIDR block.
  306. type CidrBlock struct {
  307. // CidrBlock: cidr_block must be specified in CIDR notation.
  308. CidrBlock string `json:"cidrBlock,omitempty"`
  309. // DisplayName: display_name is an optional field for users to identify
  310. // CIDR blocks.
  311. DisplayName string `json:"displayName,omitempty"`
  312. // ForceSendFields is a list of field names (e.g. "CidrBlock") to
  313. // unconditionally include in API requests. By default, fields with
  314. // empty values are omitted from API requests. However, any non-pointer,
  315. // non-interface field appearing in ForceSendFields will be sent to the
  316. // server regardless of whether the field is empty or not. This may be
  317. // used to include empty fields in Patch requests.
  318. ForceSendFields []string `json:"-"`
  319. // NullFields is a list of field names (e.g. "CidrBlock") to include in
  320. // API requests with the JSON null value. By default, fields with empty
  321. // values are omitted from API requests. However, any field with an
  322. // empty value appearing in NullFields will be sent to the server as
  323. // null. It is an error if a field in this list has a non-empty value.
  324. // This may be used to include null fields in Patch requests.
  325. NullFields []string `json:"-"`
  326. }
  327. func (s *CidrBlock) MarshalJSON() ([]byte, error) {
  328. type NoMethod CidrBlock
  329. raw := NoMethod(*s)
  330. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  331. }
  332. // ClientCertificateConfig: Configuration for client certificates on the
  333. // cluster.
  334. type ClientCertificateConfig struct {
  335. // IssueClientCertificate: Issue a client certificate.
  336. IssueClientCertificate bool `json:"issueClientCertificate,omitempty"`
  337. // ForceSendFields is a list of field names (e.g.
  338. // "IssueClientCertificate") to unconditionally include in API requests.
  339. // By default, fields with empty values are omitted from API requests.
  340. // However, any non-pointer, non-interface field appearing in
  341. // ForceSendFields will be sent to the server regardless of whether the
  342. // field is empty or not. This may be used to include empty fields in
  343. // Patch requests.
  344. ForceSendFields []string `json:"-"`
  345. // NullFields is a list of field names (e.g. "IssueClientCertificate")
  346. // to include in API requests with the JSON null value. By default,
  347. // fields with empty values are omitted from API requests. However, any
  348. // field with an empty value appearing in NullFields will be sent to the
  349. // server as null. It is an error if a field in this list has a
  350. // non-empty value. This may be used to include null fields in Patch
  351. // requests.
  352. NullFields []string `json:"-"`
  353. }
  354. func (s *ClientCertificateConfig) MarshalJSON() ([]byte, error) {
  355. type NoMethod ClientCertificateConfig
  356. raw := NoMethod(*s)
  357. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  358. }
  359. // Cluster: A Google Kubernetes Engine cluster.
  360. type Cluster struct {
  361. // AddonsConfig: Configurations for the various addons available to run
  362. // in the cluster.
  363. AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"`
  364. // ClusterIpv4Cidr: The IP address range of the container pods in this
  365. // cluster,
  366. // in
  367. // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
  368. //
  369. // notation (e.g. `10.96.0.0/14`). Leave blank to have
  370. // one automatically chosen or specify a `/14` block in `10.0.0.0/8`.
  371. ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"`
  372. // Conditions: Which conditions caused the current cluster state.
  373. Conditions []*StatusCondition `json:"conditions,omitempty"`
  374. // CreateTime: [Output only] The time the cluster was created,
  375. // in
  376. // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
  377. CreateTime string `json:"createTime,omitempty"`
  378. // CurrentMasterVersion: [Output only] The current software version of
  379. // the master endpoint.
  380. CurrentMasterVersion string `json:"currentMasterVersion,omitempty"`
  381. // CurrentNodeCount: [Output only] The number of nodes currently in the
  382. // cluster. Deprecated.
  383. // Call Kubernetes API directly to retrieve node information.
  384. CurrentNodeCount int64 `json:"currentNodeCount,omitempty"`
  385. // CurrentNodeVersion: [Output only] Deprecated,
  386. // use
  387. // [NodePool.version](/kubernetes-engine/docs/reference/rest/v1/proje
  388. // cts.zones.clusters.nodePool)
  389. // instead. The current version of the node software components. If they
  390. // are
  391. // currently at multiple versions because they're in the process of
  392. // being
  393. // upgraded, this reflects the minimum version of all nodes.
  394. CurrentNodeVersion string `json:"currentNodeVersion,omitempty"`
  395. // Description: An optional description of this cluster.
  396. Description string `json:"description,omitempty"`
  397. // EnableKubernetesAlpha: Kubernetes alpha features are enabled on this
  398. // cluster. This includes alpha
  399. // API groups (e.g. v1alpha1) and features that may not be production
  400. // ready in
  401. // the kubernetes version of the master and nodes.
  402. // The cluster has no SLA for uptime and master/node upgrades are
  403. // disabled.
  404. // Alpha enabled clusters are automatically deleted thirty days
  405. // after
  406. // creation.
  407. EnableKubernetesAlpha bool `json:"enableKubernetesAlpha,omitempty"`
  408. // Endpoint: [Output only] The IP address of this cluster's master
  409. // endpoint.
  410. // The endpoint can be accessed from the internet
  411. // at
  412. // `https://username:password@endpoint/`.
  413. //
  414. // See the `masterAuth` property of this resource for username
  415. // and
  416. // password information.
  417. Endpoint string `json:"endpoint,omitempty"`
  418. // ExpireTime: [Output only] The time the cluster will be
  419. // automatically
  420. // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
  421. // format.
  422. ExpireTime string `json:"expireTime,omitempty"`
  423. // InitialClusterVersion: The initial Kubernetes version for this
  424. // cluster. Valid versions are those
  425. // found in validMasterVersions returned by getServerConfig. The
  426. // version can
  427. // be upgraded over time; such upgrades are reflected
  428. // in
  429. // currentMasterVersion and currentNodeVersion.
  430. //
  431. // Users may specify either explicit versions offered by
  432. // Kubernetes Engine or version aliases, which have the following
  433. // behavior:
  434. //
  435. // - "latest": picks the highest valid Kubernetes version
  436. // - "1.X": picks the highest valid patch+gke.N patch in the 1.X
  437. // version
  438. // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
  439. // - "1.X.Y-gke.N": picks an explicit Kubernetes version
  440. // - "","-": picks the default Kubernetes version
  441. InitialClusterVersion string `json:"initialClusterVersion,omitempty"`
  442. // InitialNodeCount: The number of nodes to create in this cluster. You
  443. // must ensure that your
  444. // Compute Engine <a href="/compute/docs/resource-quotas">resource
  445. // quota</a>
  446. // is sufficient for this number of instances. You must also have
  447. // available
  448. // firewall and routes quota.
  449. // For requests, this field should only be used in lieu of a
  450. // "node_pool" object, since this configuration (along with
  451. // the
  452. // "node_config") will be used to create a "NodePool" object with
  453. // an
  454. // auto-generated name. Do not use this and a node_pool at the same
  455. // time.
  456. InitialNodeCount int64 `json:"initialNodeCount,omitempty"`
  457. // InstanceGroupUrls: Deprecated. Use node_pools.instance_group_urls.
  458. InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"`
  459. // IpAllocationPolicy: Configuration for cluster IP allocation.
  460. IpAllocationPolicy *IPAllocationPolicy `json:"ipAllocationPolicy,omitempty"`
  461. // LabelFingerprint: The fingerprint of the set of labels for this
  462. // cluster.
  463. LabelFingerprint string `json:"labelFingerprint,omitempty"`
  464. // LegacyAbac: Configuration for the legacy ABAC authorization mode.
  465. LegacyAbac *LegacyAbac `json:"legacyAbac,omitempty"`
  466. // Location: [Output only] The name of the Google Compute
  467. // Engine
  468. // [zone](/compute/docs/regions-zones/regions-zones#available)
  469. // or
  470. // [region](/compute/docs/regions-zones/regions-zones#available) in
  471. // which
  472. // the cluster resides.
  473. Location string `json:"location,omitempty"`
  474. // Locations: The list of Google Compute
  475. // Engine
  476. // [zones](/compute/docs/zones#available) in which the cluster's
  477. // nodes
  478. // should be located.
  479. Locations []string `json:"locations,omitempty"`
  480. // LoggingService: The logging service the cluster should use to write
  481. // logs.
  482. // Currently available options:
  483. //
  484. // * `logging.googleapis.com` - the Google Cloud Logging service.
  485. // * `none` - no logs will be exported from the cluster.
  486. // * if left as an empty string,`logging.googleapis.com` will be used.
  487. LoggingService string `json:"loggingService,omitempty"`
  488. // MaintenancePolicy: Configure the maintenance policy for this cluster.
  489. MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"`
  490. // MasterAuth: The authentication information for accessing the master
  491. // endpoint.
  492. // If unspecified, the defaults are used:
  493. // For clusters before v1.12, if master_auth is unspecified, `username`
  494. // will
  495. // be set to "admin", a random password will be generated, and a
  496. // client
  497. // certificate will be issued.
  498. MasterAuth *MasterAuth `json:"masterAuth,omitempty"`
  499. // MasterAuthorizedNetworksConfig: The configuration options for master
  500. // authorized networks feature.
  501. MasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"masterAuthorizedNetworksConfig,omitempty"`
  502. // MonitoringService: The monitoring service the cluster should use to
  503. // write metrics.
  504. // Currently available options:
  505. //
  506. // * `monitoring.googleapis.com` - the Google Cloud Monitoring
  507. // service.
  508. // * `none` - no metrics will be exported from the cluster.
  509. // * if left as an empty string, `monitoring.googleapis.com` will be
  510. // used.
  511. MonitoringService string `json:"monitoringService,omitempty"`
  512. // Name: The name of this cluster. The name must be unique within this
  513. // project
  514. // and zone, and can be up to 40 characters with the following
  515. // restrictions:
  516. //
  517. // * Lowercase letters, numbers, and hyphens only.
  518. // * Must start with a letter.
  519. // * Must end with a number or a letter.
  520. Name string `json:"name,omitempty"`
  521. // Network: The name of the Google Compute
  522. // Engine
  523. // [network](/compute/docs/networks-and-firewalls#networks) to which
  524. // the
  525. // cluster is connected. If left unspecified, the `default` network
  526. // will be used.
  527. Network string `json:"network,omitempty"`
  528. // NetworkConfig: Configuration for cluster networking.
  529. NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
  530. // NetworkPolicy: Configuration options for the NetworkPolicy feature.
  531. NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"`
  532. // NodeConfig: Parameters used in creating the cluster's nodes.
  533. // See `nodeConfig` for the description of its properties.
  534. // For requests, this field should only be used in lieu of a
  535. // "node_pool" object, since this configuration (along with
  536. // the
  537. // "initial_node_count") will be used to create a "NodePool" object with
  538. // an
  539. // auto-generated name. Do not use this and a node_pool at the same
  540. // time.
  541. // For responses, this field will be populated with the node
  542. // configuration of
  543. // the first node pool.
  544. //
  545. // If unspecified, the defaults are used.
  546. NodeConfig *NodeConfig `json:"nodeConfig,omitempty"`
  547. // NodeIpv4CidrSize: [Output only] The size of the address space on each
  548. // node for hosting
  549. // containers. This is provisioned from within the
  550. // `container_ipv4_cidr`
  551. // range.
  552. NodeIpv4CidrSize int64 `json:"nodeIpv4CidrSize,omitempty"`
  553. // NodePools: The node pools associated with this cluster.
  554. // This field should not be set if "node_config" or "initial_node_count"
  555. // are
  556. // specified.
  557. NodePools []*NodePool `json:"nodePools,omitempty"`
  558. // PrivateClusterConfig: Configuration for private cluster.
  559. PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"`
  560. // ResourceLabels: The resource labels for the cluster to use to
  561. // annotate any related
  562. // Google Compute Engine resources.
  563. ResourceLabels map[string]string `json:"resourceLabels,omitempty"`
  564. // SelfLink: [Output only] Server-defined URL for the resource.
  565. SelfLink string `json:"selfLink,omitempty"`
  566. // ServicesIpv4Cidr: [Output only] The IP address range of the
  567. // Kubernetes services in
  568. // this cluster,
  569. // in
  570. // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
  571. //
  572. // notation (e.g. `1.2.3.4/29`). Service addresses are
  573. // typically put in the last `/16` from the container CIDR.
  574. ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"`
  575. // Status: [Output only] The current status of this cluster.
  576. //
  577. // Possible values:
  578. // "STATUS_UNSPECIFIED" - Not set.
  579. // "PROVISIONING" - The PROVISIONING state indicates the cluster is
  580. // being created.
  581. // "RUNNING" - The RUNNING state indicates the cluster has been
  582. // created and is fully
  583. // usable.
  584. // "RECONCILING" - The RECONCILING state indicates that some work is
  585. // actively being done on
  586. // the cluster, such as upgrading the master or node software. Details
  587. // can
  588. // be found in the `statusMessage` field.
  589. // "STOPPING" - The STOPPING state indicates the cluster is being
  590. // deleted.
  591. // "ERROR" - The ERROR state indicates the cluster may be unusable.
  592. // Details
  593. // can be found in the `statusMessage` field.
  594. // "DEGRADED" - The DEGRADED state indicates the cluster requires user
  595. // action to restore
  596. // full functionality. Details can be found in the `statusMessage`
  597. // field.
  598. Status string `json:"status,omitempty"`
  599. // StatusMessage: [Output only] Additional information about the current
  600. // status of this
  601. // cluster, if available.
  602. StatusMessage string `json:"statusMessage,omitempty"`
  603. // Subnetwork: The name of the Google Compute
  604. // Engine
  605. // [subnetwork](/compute/docs/subnetworks) to which the
  606. // cluster is connected.
  607. Subnetwork string `json:"subnetwork,omitempty"`
  608. // Zone: [Output only] The name of the Google Compute
  609. // Engine
  610. // [zone](/compute/docs/zones#available) in which the
  611. // cluster
  612. // resides.
  613. // This field is deprecated, use location instead.
  614. Zone string `json:"zone,omitempty"`
  615. // ServerResponse contains the HTTP response code and headers from the
  616. // server.
  617. googleapi.ServerResponse `json:"-"`
  618. // ForceSendFields is a list of field names (e.g. "AddonsConfig") to
  619. // unconditionally include in API requests. By default, fields with
  620. // empty values are omitted from API requests. However, any non-pointer,
  621. // non-interface field appearing in ForceSendFields will be sent to the
  622. // server regardless of whether the field is empty or not. This may be
  623. // used to include empty fields in Patch requests.
  624. ForceSendFields []string `json:"-"`
  625. // NullFields is a list of field names (e.g. "AddonsConfig") to include
  626. // in API requests with the JSON null value. By default, fields with
  627. // empty values are omitted from API requests. However, any field with
  628. // an empty value appearing in NullFields will be sent to the server as
  629. // null. It is an error if a field in this list has a non-empty value.
  630. // This may be used to include null fields in Patch requests.
  631. NullFields []string `json:"-"`
  632. }
  633. func (s *Cluster) MarshalJSON() ([]byte, error) {
  634. type NoMethod Cluster
  635. raw := NoMethod(*s)
  636. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  637. }
  638. // ClusterUpdate: ClusterUpdate describes an update to the cluster.
  639. // Exactly one update can
  640. // be applied to a cluster with each request, so at most one field can
  641. // be
  642. // provided.
  643. type ClusterUpdate struct {
  644. // DesiredAddonsConfig: Configurations for the various addons available
  645. // to run in the cluster.
  646. DesiredAddonsConfig *AddonsConfig `json:"desiredAddonsConfig,omitempty"`
  647. // DesiredImageType: The desired image type for the node pool.
  648. // NOTE: Set the "desired_node_pool" field as well.
  649. DesiredImageType string `json:"desiredImageType,omitempty"`
  650. // DesiredLocations: The desired list of Google Compute
  651. // Engine
  652. // [zones](/compute/docs/zones#available) in which the cluster's
  653. // nodes
  654. // should be located. Changing the locations a cluster is in will
  655. // result
  656. // in nodes being either created or removed from the cluster, depending
  657. // on
  658. // whether locations are being added or removed.
  659. //
  660. // This list must always include the cluster's primary zone.
  661. DesiredLocations []string `json:"desiredLocations,omitempty"`
  662. // DesiredMasterAuthorizedNetworksConfig: The desired configuration
  663. // options for master authorized networks feature.
  664. DesiredMasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"desiredMasterAuthorizedNetworksConfig,omitempty"`
  665. // DesiredMasterVersion: The Kubernetes version to change the master
  666. // to.
  667. //
  668. // Users may specify either explicit versions offered by
  669. // Kubernetes Engine or version aliases, which have the following
  670. // behavior:
  671. //
  672. // - "latest": picks the highest valid Kubernetes version
  673. // - "1.X": picks the highest valid patch+gke.N patch in the 1.X
  674. // version
  675. // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
  676. // - "1.X.Y-gke.N": picks an explicit Kubernetes version
  677. // - "-": picks the default Kubernetes version
  678. DesiredMasterVersion string `json:"desiredMasterVersion,omitempty"`
  679. // DesiredMonitoringService: The monitoring service the cluster should
  680. // use to write metrics.
  681. // Currently available options:
  682. //
  683. // * "monitoring.googleapis.com" - the Google Cloud Monitoring service
  684. // * "none" - no metrics will be exported from the cluster
  685. DesiredMonitoringService string `json:"desiredMonitoringService,omitempty"`
  686. // DesiredNodePoolAutoscaling: Autoscaler configuration for the node
  687. // pool specified in
  688. // desired_node_pool_id. If there is only one pool in the
  689. // cluster and desired_node_pool_id is not provided then
  690. // the change applies to that single node pool.
  691. DesiredNodePoolAutoscaling *NodePoolAutoscaling `json:"desiredNodePoolAutoscaling,omitempty"`
  692. // DesiredNodePoolId: The node pool to be upgraded. This field is
  693. // mandatory if
  694. // "desired_node_version", "desired_image_family"
  695. // or
  696. // "desired_node_pool_autoscaling" is specified and there is more than
  697. // one
  698. // node pool on the cluster.
  699. DesiredNodePoolId string `json:"desiredNodePoolId,omitempty"`
  700. // DesiredNodeVersion: The Kubernetes version to change the nodes to
  701. // (typically an
  702. // upgrade).
  703. //
  704. // Users may specify either explicit versions offered by
  705. // Kubernetes Engine or version aliases, which have the following
  706. // behavior:
  707. //
  708. // - "latest": picks the highest valid Kubernetes version
  709. // - "1.X": picks the highest valid patch+gke.N patch in the 1.X
  710. // version
  711. // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
  712. // - "1.X.Y-gke.N": picks an explicit Kubernetes version
  713. // - "-": picks the Kubernetes master version
  714. DesiredNodeVersion string `json:"desiredNodeVersion,omitempty"`
  715. // ForceSendFields is a list of field names (e.g. "DesiredAddonsConfig")
  716. // to unconditionally include in API requests. By default, fields with
  717. // empty values are omitted from API requests. However, any non-pointer,
  718. // non-interface field appearing in ForceSendFields will be sent to the
  719. // server regardless of whether the field is empty or not. This may be
  720. // used to include empty fields in Patch requests.
  721. ForceSendFields []string `json:"-"`
  722. // NullFields is a list of field names (e.g. "DesiredAddonsConfig") to
  723. // include in API requests with the JSON null value. By default, fields
  724. // with empty values are omitted from API requests. However, any field
  725. // with an empty value appearing in NullFields will be sent to the
  726. // server as null. It is an error if a field in this list has a
  727. // non-empty value. This may be used to include null fields in Patch
  728. // requests.
  729. NullFields []string `json:"-"`
  730. }
  731. func (s *ClusterUpdate) MarshalJSON() ([]byte, error) {
  732. type NoMethod ClusterUpdate
  733. raw := NoMethod(*s)
  734. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  735. }
  736. // CompleteIPRotationRequest: CompleteIPRotationRequest moves the
  737. // cluster master back into single-IP mode.
  738. type CompleteIPRotationRequest struct {
  739. // ClusterId: Deprecated. The name of the cluster.
  740. // This field has been deprecated and replaced by the name field.
  741. ClusterId string `json:"clusterId,omitempty"`
  742. // Name: The name (project, location, cluster id) of the cluster to
  743. // complete IP
  744. // rotation. Specified in the format
  745. // 'projects/*/locations/*/clusters/*'.
  746. Name string `json:"name,omitempty"`
  747. // ProjectId: Deprecated. The Google Developers Console [project ID or
  748. // project
  749. // number](https://developers.google.com/console/help/new/#projec
  750. // tnumber).
  751. // This field has been deprecated and replaced by the name field.
  752. ProjectId string `json:"projectId,omitempty"`
  753. // Zone: Deprecated. The name of the Google Compute
  754. // Engine
  755. // [zone](/compute/docs/zones#available) in which the
  756. // cluster
  757. // resides.
  758. // This field has been deprecated and replaced by the name field.
  759. Zone string `json:"zone,omitempty"`
  760. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  761. // unconditionally include in API requests. By default, fields with
  762. // empty values are omitted from API requests. However, any non-pointer,
  763. // non-interface field appearing in ForceSendFields will be sent to the
  764. // server regardless of whether the field is empty or not. This may be
  765. // used to include empty fields in Patch requests.
  766. ForceSendFields []string `json:"-"`
  767. // NullFields is a list of field names (e.g. "ClusterId") to include in
  768. // API requests with the JSON null value. By default, fields with empty
  769. // values are omitted from API requests. However, any field with an
  770. // empty value appearing in NullFields will be sent to the server as
  771. // null. It is an error if a field in this list has a non-empty value.
  772. // This may be used to include null fields in Patch requests.
  773. NullFields []string `json:"-"`
  774. }
  775. func (s *CompleteIPRotationRequest) MarshalJSON() ([]byte, error) {
  776. type NoMethod CompleteIPRotationRequest
  777. raw := NoMethod(*s)
  778. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  779. }
  780. // CreateClusterRequest: CreateClusterRequest creates a cluster.
  781. type CreateClusterRequest struct {
  782. // Cluster: A
  783. // [cluster
  784. // resource](/container-engine/reference/rest/v1/projects.zones.
  785. // clusters)
  786. Cluster *Cluster `json:"cluster,omitempty"`
  787. // Parent: The parent (project and location) where the cluster will be
  788. // created.
  789. // Specified in the format 'projects/*/locations/*'.
  790. Parent string `json:"parent,omitempty"`
  791. // ProjectId: Deprecated. The Google Developers Console [project ID or
  792. // project
  793. // number](https://support.google.com/cloud/answer/6158840).
  794. // This
  795. // field has been deprecated and replaced by the parent field.
  796. ProjectId string `json:"projectId,omitempty"`
  797. // Zone: Deprecated. The name of the Google Compute
  798. // Engine
  799. // [zone](/compute/docs/zones#available) in which the
  800. // cluster
  801. // resides.
  802. // This field has been deprecated and replaced by the parent field.
  803. Zone string `json:"zone,omitempty"`
  804. // ForceSendFields is a list of field names (e.g. "Cluster") to
  805. // unconditionally include in API requests. By default, fields with
  806. // empty values are omitted from API requests. However, any non-pointer,
  807. // non-interface field appearing in ForceSendFields will be sent to the
  808. // server regardless of whether the field is empty or not. This may be
  809. // used to include empty fields in Patch requests.
  810. ForceSendFields []string `json:"-"`
  811. // NullFields is a list of field names (e.g. "Cluster") to include in
  812. // API requests with the JSON null value. By default, fields with empty
  813. // values are omitted from API requests. However, any field with an
  814. // empty value appearing in NullFields will be sent to the server as
  815. // null. It is an error if a field in this list has a non-empty value.
  816. // This may be used to include null fields in Patch requests.
  817. NullFields []string `json:"-"`
  818. }
  819. func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) {
  820. type NoMethod CreateClusterRequest
  821. raw := NoMethod(*s)
  822. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  823. }
  824. // CreateNodePoolRequest: CreateNodePoolRequest creates a node pool for
  825. // a cluster.
  826. type CreateNodePoolRequest struct {
  827. // ClusterId: Deprecated. The name of the cluster.
  828. // This field has been deprecated and replaced by the parent field.
  829. ClusterId string `json:"clusterId,omitempty"`
  830. // NodePool: The node pool to create.
  831. NodePool *NodePool `json:"nodePool,omitempty"`
  832. // Parent: The parent (project, location, cluster id) where the node
  833. // pool will be
  834. // created. Specified in the format
  835. // 'projects/*/locations/*/clusters/*'.
  836. Parent string `json:"parent,omitempty"`
  837. // ProjectId: Deprecated. The Google Developers Console [project ID or
  838. // project
  839. // number](https://developers.google.com/console/help/new/#projec
  840. // tnumber).
  841. // This field has been deprecated and replaced by the parent field.
  842. ProjectId string `json:"projectId,omitempty"`
  843. // Zone: Deprecated. The name of the Google Compute
  844. // Engine
  845. // [zone](/compute/docs/zones#available) in which the
  846. // cluster
  847. // resides.
  848. // This field has been deprecated and replaced by the parent field.
  849. Zone string `json:"zone,omitempty"`
  850. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  851. // unconditionally include in API requests. By default, fields with
  852. // empty values are omitted from API requests. However, any non-pointer,
  853. // non-interface field appearing in ForceSendFields will be sent to the
  854. // server regardless of whether the field is empty or not. This may be
  855. // used to include empty fields in Patch requests.
  856. ForceSendFields []string `json:"-"`
  857. // NullFields is a list of field names (e.g. "ClusterId") to include in
  858. // API requests with the JSON null value. By default, fields with empty
  859. // values are omitted from API requests. However, any field with an
  860. // empty value appearing in NullFields will be sent to the server as
  861. // null. It is an error if a field in this list has a non-empty value.
  862. // This may be used to include null fields in Patch requests.
  863. NullFields []string `json:"-"`
  864. }
  865. func (s *CreateNodePoolRequest) MarshalJSON() ([]byte, error) {
  866. type NoMethod CreateNodePoolRequest
  867. raw := NoMethod(*s)
  868. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  869. }
  870. // DailyMaintenanceWindow: Time window specified for daily maintenance
  871. // operations.
  872. type DailyMaintenanceWindow struct {
  873. // Duration: [Output only] Duration of the time window, automatically
  874. // chosen to be
  875. // smallest possible in the given scenario.
  876. // Duration will be in
  877. // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
  878. // format "PTnHnMnS".
  879. Duration string `json:"duration,omitempty"`
  880. // StartTime: Time within the maintenance window to start the
  881. // maintenance operations.
  882. // Time format should be in
  883. // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
  884. // format "HH:MM”, where HH : [00-23] and MM : [00-59] GMT.
  885. StartTime string `json:"startTime,omitempty"`
  886. // ForceSendFields is a list of field names (e.g. "Duration") to
  887. // unconditionally include in API requests. By default, fields with
  888. // empty values are omitted from API requests. However, any non-pointer,
  889. // non-interface field appearing in ForceSendFields will be sent to the
  890. // server regardless of whether the field is empty or not. This may be
  891. // used to include empty fields in Patch requests.
  892. ForceSendFields []string `json:"-"`
  893. // NullFields is a list of field names (e.g. "Duration") to include in
  894. // API requests with the JSON null value. By default, fields with empty
  895. // values are omitted from API requests. However, any field with an
  896. // empty value appearing in NullFields will be sent to the server as
  897. // null. It is an error if a field in this list has a non-empty value.
  898. // This may be used to include null fields in Patch requests.
  899. NullFields []string `json:"-"`
  900. }
  901. func (s *DailyMaintenanceWindow) MarshalJSON() ([]byte, error) {
  902. type NoMethod DailyMaintenanceWindow
  903. raw := NoMethod(*s)
  904. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  905. }
  906. // Empty: A generic empty message that you can re-use to avoid defining
  907. // duplicated
  908. // empty messages in your APIs. A typical example is to use it as the
  909. // request
  910. // or the response type of an API method. For instance:
  911. //
  912. // service Foo {
  913. // rpc Bar(google.protobuf.Empty) returns
  914. // (google.protobuf.Empty);
  915. // }
  916. //
  917. // The JSON representation for `Empty` is empty JSON object `{}`.
  918. type Empty struct {
  919. // ServerResponse contains the HTTP response code and headers from the
  920. // server.
  921. googleapi.ServerResponse `json:"-"`
  922. }
  923. // HorizontalPodAutoscaling: Configuration options for the horizontal
  924. // pod autoscaling feature, which
  925. // increases or decreases the number of replica pods a replication
  926. // controller
  927. // has based on the resource usage of the existing pods.
  928. type HorizontalPodAutoscaling struct {
  929. // Disabled: Whether the Horizontal Pod Autoscaling feature is enabled
  930. // in the cluster.
  931. // When enabled, it ensures that a Heapster pod is running in the
  932. // cluster,
  933. // which is also used by the Cloud Monitoring service.
  934. Disabled bool `json:"disabled,omitempty"`
  935. // ForceSendFields is a list of field names (e.g. "Disabled") to
  936. // unconditionally include in API requests. By default, fields with
  937. // empty values are omitted from API requests. However, any non-pointer,
  938. // non-interface field appearing in ForceSendFields will be sent to the
  939. // server regardless of whether the field is empty or not. This may be
  940. // used to include empty fields in Patch requests.
  941. ForceSendFields []string `json:"-"`
  942. // NullFields is a list of field names (e.g. "Disabled") to include in
  943. // API requests with the JSON null value. By default, fields with empty
  944. // values are omitted from API requests. However, any field with an
  945. // empty value appearing in NullFields will be sent to the server as
  946. // null. It is an error if a field in this list has a non-empty value.
  947. // This may be used to include null fields in Patch requests.
  948. NullFields []string `json:"-"`
  949. }
  950. func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) {
  951. type NoMethod HorizontalPodAutoscaling
  952. raw := NoMethod(*s)
  953. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  954. }
  955. // HttpLoadBalancing: Configuration options for the HTTP (L7) load
  956. // balancing controller addon,
  957. // which makes it easy to set up HTTP load balancers for services in a
  958. // cluster.
  959. type HttpLoadBalancing struct {
  960. // Disabled: Whether the HTTP Load Balancing controller is enabled in
  961. // the cluster.
  962. // When enabled, it runs a small pod in the cluster that manages the
  963. // load
  964. // balancers.
  965. Disabled bool `json:"disabled,omitempty"`
  966. // ForceSendFields is a list of field names (e.g. "Disabled") to
  967. // unconditionally include in API requests. By default, fields with
  968. // empty values are omitted from API requests. However, any non-pointer,
  969. // non-interface field appearing in ForceSendFields will be sent to the
  970. // server regardless of whether the field is empty or not. This may be
  971. // used to include empty fields in Patch requests.
  972. ForceSendFields []string `json:"-"`
  973. // NullFields is a list of field names (e.g. "Disabled") to include in
  974. // API requests with the JSON null value. By default, fields with empty
  975. // values are omitted from API requests. However, any field with an
  976. // empty value appearing in NullFields will be sent to the server as
  977. // null. It is an error if a field in this list has a non-empty value.
  978. // This may be used to include null fields in Patch requests.
  979. NullFields []string `json:"-"`
  980. }
  981. func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) {
  982. type NoMethod HttpLoadBalancing
  983. raw := NoMethod(*s)
  984. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  985. }
  986. // IPAllocationPolicy: Configuration for controlling how IPs are
  987. // allocated in the cluster.
  988. type IPAllocationPolicy struct {
  989. // ClusterIpv4Cidr: This field is deprecated, use
  990. // cluster_ipv4_cidr_block.
  991. ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"`
  992. // ClusterIpv4CidrBlock: The IP address range for the cluster pod IPs.
  993. // If this field is set, then
  994. // `cluster.cluster_ipv4_cidr` must be left blank.
  995. //
  996. // This field is only applicable when `use_ip_aliases` is true.
  997. //
  998. // Set to blank to have a range chosen with the default size.
  999. //
  1000. // Set to /netmask (e.g. `/14`) to have a range chosen with a
  1001. // specific
  1002. // netmask.
  1003. //
  1004. // Set to
  1005. // a
  1006. // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
  1007. //
  1008. // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks
  1009. // (e.g.
  1010. // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific
  1011. // range
  1012. // to use.
  1013. ClusterIpv4CidrBlock string `json:"clusterIpv4CidrBlock,omitempty"`
  1014. // ClusterSecondaryRangeName: The name of the secondary range to be used
  1015. // for the cluster CIDR
  1016. // block. The secondary range will be used for pod IP
  1017. // addresses. This must be an existing secondary range associated
  1018. // with the cluster subnetwork.
  1019. //
  1020. // This field is only applicable with use_ip_aliases is true
  1021. // and
  1022. // create_subnetwork is false.
  1023. ClusterSecondaryRangeName string `json:"clusterSecondaryRangeName,omitempty"`
  1024. // CreateSubnetwork: Whether a new subnetwork will be created
  1025. // automatically for the cluster.
  1026. //
  1027. // This field is only applicable when `use_ip_aliases` is true.
  1028. CreateSubnetwork bool `json:"createSubnetwork,omitempty"`
  1029. // NodeIpv4Cidr: This field is deprecated, use node_ipv4_cidr_block.
  1030. NodeIpv4Cidr string `json:"nodeIpv4Cidr,omitempty"`
  1031. // NodeIpv4CidrBlock: The IP address range of the instance IPs in this
  1032. // cluster.
  1033. //
  1034. // This is applicable only if `create_subnetwork` is true.
  1035. //
  1036. // Set to blank to have a range chosen with the default size.
  1037. //
  1038. // Set to /netmask (e.g. `/14`) to have a range chosen with a
  1039. // specific
  1040. // netmask.
  1041. //
  1042. // Set to
  1043. // a
  1044. // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
  1045. //
  1046. // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks
  1047. // (e.g.
  1048. // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific
  1049. // range
  1050. // to use.
  1051. NodeIpv4CidrBlock string `json:"nodeIpv4CidrBlock,omitempty"`
  1052. // ServicesIpv4Cidr: This field is deprecated, use
  1053. // services_ipv4_cidr_block.
  1054. ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"`
  1055. // ServicesIpv4CidrBlock: The IP address range of the services IPs in
  1056. // this cluster. If blank, a range
  1057. // will be automatically chosen with the default size.
  1058. //
  1059. // This field is only applicable when `use_ip_aliases` is true.
  1060. //
  1061. // Set to blank to have a range chosen with the default size.
  1062. //
  1063. // Set to /netmask (e.g. `/14`) to have a range chosen with a
  1064. // specific
  1065. // netmask.
  1066. //
  1067. // Set to
  1068. // a
  1069. // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
  1070. //
  1071. // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks
  1072. // (e.g.
  1073. // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific
  1074. // range
  1075. // to use.
  1076. ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"`
  1077. // ServicesSecondaryRangeName: The name of the secondary range to be
  1078. // used as for the services
  1079. // CIDR block. The secondary range will be used for service
  1080. // ClusterIPs. This must be an existing secondary range associated
  1081. // with the cluster subnetwork.
  1082. //
  1083. // This field is only applicable with use_ip_aliases is true
  1084. // and
  1085. // create_subnetwork is false.
  1086. ServicesSecondaryRangeName string `json:"servicesSecondaryRangeName,omitempty"`
  1087. // SubnetworkName: A custom subnetwork name to be used if
  1088. // `create_subnetwork` is true. If
  1089. // this field is empty, then an automatic name will be chosen for the
  1090. // new
  1091. // subnetwork.
  1092. SubnetworkName string `json:"subnetworkName,omitempty"`
  1093. // UseIpAliases: Whether alias IPs will be used for pod IPs in the
  1094. // cluster.
  1095. UseIpAliases bool `json:"useIpAliases,omitempty"`
  1096. // ForceSendFields is a list of field names (e.g. "ClusterIpv4Cidr") to
  1097. // unconditionally include in API requests. By default, fields with
  1098. // empty values are omitted from API requests. However, any non-pointer,
  1099. // non-interface field appearing in ForceSendFields will be sent to the
  1100. // server regardless of whether the field is empty or not. This may be
  1101. // used to include empty fields in Patch requests.
  1102. ForceSendFields []string `json:"-"`
  1103. // NullFields is a list of field names (e.g. "ClusterIpv4Cidr") to
  1104. // include in API requests with the JSON null value. By default, fields
  1105. // with empty values are omitted from API requests. However, any field
  1106. // with an empty value appearing in NullFields will be sent to the
  1107. // server as null. It is an error if a field in this list has a
  1108. // non-empty value. This may be used to include null fields in Patch
  1109. // requests.
  1110. NullFields []string `json:"-"`
  1111. }
  1112. func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) {
  1113. type NoMethod IPAllocationPolicy
  1114. raw := NoMethod(*s)
  1115. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1116. }
  1117. // KubernetesDashboard: Configuration for the Kubernetes Dashboard.
  1118. type KubernetesDashboard struct {
  1119. // Disabled: Whether the Kubernetes Dashboard is enabled for this
  1120. // cluster.
  1121. Disabled bool `json:"disabled,omitempty"`
  1122. // ForceSendFields is a list of field names (e.g. "Disabled") to
  1123. // unconditionally include in API requests. By default, fields with
  1124. // empty values are omitted from API requests. However, any non-pointer,
  1125. // non-interface field appearing in ForceSendFields will be sent to the
  1126. // server regardless of whether the field is empty or not. This may be
  1127. // used to include empty fields in Patch requests.
  1128. ForceSendFields []string `json:"-"`
  1129. // NullFields is a list of field names (e.g. "Disabled") to include in
  1130. // API requests with the JSON null value. By default, fields with empty
  1131. // values are omitted from API requests. However, any field with an
  1132. // empty value appearing in NullFields will be sent to the server as
  1133. // null. It is an error if a field in this list has a non-empty value.
  1134. // This may be used to include null fields in Patch requests.
  1135. NullFields []string `json:"-"`
  1136. }
  1137. func (s *KubernetesDashboard) MarshalJSON() ([]byte, error) {
  1138. type NoMethod KubernetesDashboard
  1139. raw := NoMethod(*s)
  1140. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1141. }
  1142. // LegacyAbac: Configuration for the legacy Attribute Based Access
  1143. // Control authorization
  1144. // mode.
  1145. type LegacyAbac struct {
  1146. // Enabled: Whether the ABAC authorizer is enabled for this cluster.
  1147. // When enabled,
  1148. // identities in the system, including service accounts, nodes,
  1149. // and
  1150. // controllers, will have statically granted permissions beyond
  1151. // those
  1152. // provided by the RBAC configuration or IAM.
  1153. Enabled bool `json:"enabled,omitempty"`
  1154. // ForceSendFields is a list of field names (e.g. "Enabled") to
  1155. // unconditionally include in API requests. By default, fields with
  1156. // empty values are omitted from API requests. However, any non-pointer,
  1157. // non-interface field appearing in ForceSendFields will be sent to the
  1158. // server regardless of whether the field is empty or not. This may be
  1159. // used to include empty fields in Patch requests.
  1160. ForceSendFields []string `json:"-"`
  1161. // NullFields is a list of field names (e.g. "Enabled") to include in
  1162. // API requests with the JSON null value. By default, fields with empty
  1163. // values are omitted from API requests. However, any field with an
  1164. // empty value appearing in NullFields will be sent to the server as
  1165. // null. It is an error if a field in this list has a non-empty value.
  1166. // This may be used to include null fields in Patch requests.
  1167. NullFields []string `json:"-"`
  1168. }
  1169. func (s *LegacyAbac) MarshalJSON() ([]byte, error) {
  1170. type NoMethod LegacyAbac
  1171. raw := NoMethod(*s)
  1172. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1173. }
  1174. // ListClustersResponse: ListClustersResponse is the result of
  1175. // ListClustersRequest.
  1176. type ListClustersResponse struct {
  1177. // Clusters: A list of clusters in the project in the specified zone,
  1178. // or
  1179. // across all ones.
  1180. Clusters []*Cluster `json:"clusters,omitempty"`
  1181. // MissingZones: If any zones are listed here, the list of clusters
  1182. // returned
  1183. // may be missing those zones.
  1184. MissingZones []string `json:"missingZones,omitempty"`
  1185. // ServerResponse contains the HTTP response code and headers from the
  1186. // server.
  1187. googleapi.ServerResponse `json:"-"`
  1188. // ForceSendFields is a list of field names (e.g. "Clusters") to
  1189. // unconditionally include in API requests. By default, fields with
  1190. // empty values are omitted from API requests. However, any non-pointer,
  1191. // non-interface field appearing in ForceSendFields will be sent to the
  1192. // server regardless of whether the field is empty or not. This may be
  1193. // used to include empty fields in Patch requests.
  1194. ForceSendFields []string `json:"-"`
  1195. // NullFields is a list of field names (e.g. "Clusters") to include in
  1196. // API requests with the JSON null value. By default, fields with empty
  1197. // values are omitted from API requests. However, any field with an
  1198. // empty value appearing in NullFields will be sent to the server as
  1199. // null. It is an error if a field in this list has a non-empty value.
  1200. // This may be used to include null fields in Patch requests.
  1201. NullFields []string `json:"-"`
  1202. }
  1203. func (s *ListClustersResponse) MarshalJSON() ([]byte, error) {
  1204. type NoMethod ListClustersResponse
  1205. raw := NoMethod(*s)
  1206. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1207. }
  1208. // ListNodePoolsResponse: ListNodePoolsResponse is the result of
  1209. // ListNodePoolsRequest.
  1210. type ListNodePoolsResponse struct {
  1211. // NodePools: A list of node pools for a cluster.
  1212. NodePools []*NodePool `json:"nodePools,omitempty"`
  1213. // ServerResponse contains the HTTP response code and headers from the
  1214. // server.
  1215. googleapi.ServerResponse `json:"-"`
  1216. // ForceSendFields is a list of field names (e.g. "NodePools") to
  1217. // unconditionally include in API requests. By default, fields with
  1218. // empty values are omitted from API requests. However, any non-pointer,
  1219. // non-interface field appearing in ForceSendFields will be sent to the
  1220. // server regardless of whether the field is empty or not. This may be
  1221. // used to include empty fields in Patch requests.
  1222. ForceSendFields []string `json:"-"`
  1223. // NullFields is a list of field names (e.g. "NodePools") to include in
  1224. // API requests with the JSON null value. By default, fields with empty
  1225. // values are omitted from API requests. However, any field with an
  1226. // empty value appearing in NullFields will be sent to the server as
  1227. // null. It is an error if a field in this list has a non-empty value.
  1228. // This may be used to include null fields in Patch requests.
  1229. NullFields []string `json:"-"`
  1230. }
  1231. func (s *ListNodePoolsResponse) MarshalJSON() ([]byte, error) {
  1232. type NoMethod ListNodePoolsResponse
  1233. raw := NoMethod(*s)
  1234. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1235. }
  1236. // ListOperationsResponse: ListOperationsResponse is the result of
  1237. // ListOperationsRequest.
  1238. type ListOperationsResponse struct {
  1239. // MissingZones: If any zones are listed here, the list of operations
  1240. // returned
  1241. // may be missing the operations from those zones.
  1242. MissingZones []string `json:"missingZones,omitempty"`
  1243. // Operations: A list of operations in the project in the specified
  1244. // zone.
  1245. Operations []*Operation `json:"operations,omitempty"`
  1246. // ServerResponse contains the HTTP response code and headers from the
  1247. // server.
  1248. googleapi.ServerResponse `json:"-"`
  1249. // ForceSendFields is a list of field names (e.g. "MissingZones") to
  1250. // unconditionally include in API requests. By default, fields with
  1251. // empty values are omitted from API requests. However, any non-pointer,
  1252. // non-interface field appearing in ForceSendFields will be sent to the
  1253. // server regardless of whether the field is empty or not. This may be
  1254. // used to include empty fields in Patch requests.
  1255. ForceSendFields []string `json:"-"`
  1256. // NullFields is a list of field names (e.g. "MissingZones") to include
  1257. // in API requests with the JSON null value. By default, fields with
  1258. // empty values are omitted from API requests. However, any field with
  1259. // an empty value appearing in NullFields will be sent to the server as
  1260. // null. It is an error if a field in this list has a non-empty value.
  1261. // This may be used to include null fields in Patch requests.
  1262. NullFields []string `json:"-"`
  1263. }
  1264. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1265. type NoMethod ListOperationsResponse
  1266. raw := NoMethod(*s)
  1267. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1268. }
  1269. // MaintenancePolicy: MaintenancePolicy defines the maintenance policy
  1270. // to be used for the cluster.
  1271. type MaintenancePolicy struct {
  1272. // Window: Specifies the maintenance window in which maintenance may be
  1273. // performed.
  1274. Window *MaintenanceWindow `json:"window,omitempty"`
  1275. // ForceSendFields is a list of field names (e.g. "Window") to
  1276. // unconditionally include in API requests. By default, fields with
  1277. // empty values are omitted from API requests. However, any non-pointer,
  1278. // non-interface field appearing in ForceSendFields will be sent to the
  1279. // server regardless of whether the field is empty or not. This may be
  1280. // used to include empty fields in Patch requests.
  1281. ForceSendFields []string `json:"-"`
  1282. // NullFields is a list of field names (e.g. "Window") to include in API
  1283. // requests with the JSON null value. By default, fields with empty
  1284. // values are omitted from API requests. However, any field with an
  1285. // empty value appearing in NullFields will be sent to the server as
  1286. // null. It is an error if a field in this list has a non-empty value.
  1287. // This may be used to include null fields in Patch requests.
  1288. NullFields []string `json:"-"`
  1289. }
  1290. func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) {
  1291. type NoMethod MaintenancePolicy
  1292. raw := NoMethod(*s)
  1293. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1294. }
  1295. // MaintenanceWindow: MaintenanceWindow defines the maintenance window
  1296. // to be used for the cluster.
  1297. type MaintenanceWindow struct {
  1298. // DailyMaintenanceWindow: DailyMaintenanceWindow specifies a daily
  1299. // maintenance operation window.
  1300. DailyMaintenanceWindow *DailyMaintenanceWindow `json:"dailyMaintenanceWindow,omitempty"`
  1301. // ForceSendFields is a list of field names (e.g.
  1302. // "DailyMaintenanceWindow") to unconditionally include in API requests.
  1303. // By default, fields with empty values are omitted from API requests.
  1304. // However, any non-pointer, non-interface field appearing in
  1305. // ForceSendFields will be sent to the server regardless of whether the
  1306. // field is empty or not. This may be used to include empty fields in
  1307. // Patch requests.
  1308. ForceSendFields []string `json:"-"`
  1309. // NullFields is a list of field names (e.g. "DailyMaintenanceWindow")
  1310. // to include in API requests with the JSON null value. By default,
  1311. // fields with empty values are omitted from API requests. However, any
  1312. // field with an empty value appearing in NullFields will be sent to the
  1313. // server as null. It is an error if a field in this list has a
  1314. // non-empty value. This may be used to include null fields in Patch
  1315. // requests.
  1316. NullFields []string `json:"-"`
  1317. }
  1318. func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
  1319. type NoMethod MaintenanceWindow
  1320. raw := NoMethod(*s)
  1321. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1322. }
  1323. // MasterAuth: The authentication information for accessing the master
  1324. // endpoint.
  1325. // Authentication can be done using HTTP basic auth or using
  1326. // client
  1327. // certificates.
  1328. type MasterAuth struct {
  1329. // ClientCertificate: [Output only] Base64-encoded public certificate
  1330. // used by clients to
  1331. // authenticate to the cluster endpoint.
  1332. ClientCertificate string `json:"clientCertificate,omitempty"`
  1333. // ClientCertificateConfig: Configuration for client certificate
  1334. // authentication on the cluster. For
  1335. // clusters before v1.12, if no configuration is specified, a
  1336. // client
  1337. // certificate is issued.
  1338. ClientCertificateConfig *ClientCertificateConfig `json:"clientCertificateConfig,omitempty"`
  1339. // ClientKey: [Output only] Base64-encoded private key used by clients
  1340. // to authenticate
  1341. // to the cluster endpoint.
  1342. ClientKey string `json:"clientKey,omitempty"`
  1343. // ClusterCaCertificate: [Output only] Base64-encoded public certificate
  1344. // that is the root of
  1345. // trust for the cluster.
  1346. ClusterCaCertificate string `json:"clusterCaCertificate,omitempty"`
  1347. // Password: The password to use for HTTP basic authentication to the
  1348. // master endpoint.
  1349. // Because the master endpoint is open to the Internet, you should
  1350. // create a
  1351. // strong password. If a password is provided for cluster creation,
  1352. // username
  1353. // must be non-empty.
  1354. Password string `json:"password,omitempty"`
  1355. // Username: The username to use for HTTP basic authentication to the
  1356. // master endpoint.
  1357. // For clusters v1.6.0 and later, basic authentication can be disabled
  1358. // by
  1359. // leaving username unspecified (or setting it to the empty string).
  1360. Username string `json:"username,omitempty"`
  1361. // ForceSendFields is a list of field names (e.g. "ClientCertificate")
  1362. // to unconditionally include in API requests. By default, fields with
  1363. // empty values are omitted from API requests. However, any non-pointer,
  1364. // non-interface field appearing in ForceSendFields will be sent to the
  1365. // server regardless of whether the field is empty or not. This may be
  1366. // used to include empty fields in Patch requests.
  1367. ForceSendFields []string `json:"-"`
  1368. // NullFields is a list of field names (e.g. "ClientCertificate") to
  1369. // include in API requests with the JSON null value. By default, fields
  1370. // with empty values are omitted from API requests. However, any field
  1371. // with an empty value appearing in NullFields will be sent to the
  1372. // server as null. It is an error if a field in this list has a
  1373. // non-empty value. This may be used to include null fields in Patch
  1374. // requests.
  1375. NullFields []string `json:"-"`
  1376. }
  1377. func (s *MasterAuth) MarshalJSON() ([]byte, error) {
  1378. type NoMethod MasterAuth
  1379. raw := NoMethod(*s)
  1380. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1381. }
  1382. // MasterAuthorizedNetworksConfig: Configuration options for the master
  1383. // authorized networks feature. Enabled
  1384. // master authorized networks will disallow all external traffic to
  1385. // access
  1386. // Kubernetes master through HTTPS except traffic from the given CIDR
  1387. // blocks,
  1388. // Google Compute Engine Public IPs and Google Prod IPs.
  1389. type MasterAuthorizedNetworksConfig struct {
  1390. // CidrBlocks: cidr_blocks define up to 10 external networks that could
  1391. // access
  1392. // Kubernetes master through HTTPS.
  1393. CidrBlocks []*CidrBlock `json:"cidrBlocks,omitempty"`
  1394. // Enabled: Whether or not master authorized networks is enabled.
  1395. Enabled bool `json:"enabled,omitempty"`
  1396. // ForceSendFields is a list of field names (e.g. "CidrBlocks") to
  1397. // unconditionally include in API requests. By default, fields with
  1398. // empty values are omitted from API requests. However, any non-pointer,
  1399. // non-interface field appearing in ForceSendFields will be sent to the
  1400. // server regardless of whether the field is empty or not. This may be
  1401. // used to include empty fields in Patch requests.
  1402. ForceSendFields []string `json:"-"`
  1403. // NullFields is a list of field names (e.g. "CidrBlocks") to include in
  1404. // API requests with the JSON null value. By default, fields with empty
  1405. // values are omitted from API requests. However, any field with an
  1406. // empty value appearing in NullFields will be sent to the server as
  1407. // null. It is an error if a field in this list has a non-empty value.
  1408. // This may be used to include null fields in Patch requests.
  1409. NullFields []string `json:"-"`
  1410. }
  1411. func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) {
  1412. type NoMethod MasterAuthorizedNetworksConfig
  1413. raw := NoMethod(*s)
  1414. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1415. }
  1416. // NetworkConfig: NetworkConfig reports the relative names of network &
  1417. // subnetwork.
  1418. type NetworkConfig struct {
  1419. // Network: Output only. The relative name of the Google Compute
  1420. // Engine
  1421. // network(/compute/docs/networks-and-firewalls#networks) to which
  1422. // the cluster is connected.
  1423. // Example: projects/my-project/global/networks/my-network
  1424. Network string `json:"network,omitempty"`
  1425. // Subnetwork: Output only. The relative name of the Google Compute
  1426. // Engine
  1427. // [subnetwork](/compute/docs/vpc) to which the cluster is
  1428. // connected.
  1429. // Example:
  1430. // projects/my-project/regions/us-central1/subnetworks/my-subnet
  1431. Subnetwork string `json:"subnetwork,omitempty"`
  1432. // ForceSendFields is a list of field names (e.g. "Network") to
  1433. // unconditionally include in API requests. By default, fields with
  1434. // empty values are omitted from API requests. However, any non-pointer,
  1435. // non-interface field appearing in ForceSendFields will be sent to the
  1436. // server regardless of whether the field is empty or not. This may be
  1437. // used to include empty fields in Patch requests.
  1438. ForceSendFields []string `json:"-"`
  1439. // NullFields is a list of field names (e.g. "Network") to include in
  1440. // API requests with the JSON null value. By default, fields with empty
  1441. // values are omitted from API requests. However, any field with an
  1442. // empty value appearing in NullFields will be sent to the server as
  1443. // null. It is an error if a field in this list has a non-empty value.
  1444. // This may be used to include null fields in Patch requests.
  1445. NullFields []string `json:"-"`
  1446. }
  1447. func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
  1448. type NoMethod NetworkConfig
  1449. raw := NoMethod(*s)
  1450. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1451. }
  1452. // NetworkPolicy: Configuration options for the NetworkPolicy
  1453. // feature.
  1454. // https://kubernetes.io/docs/concepts/services-networking/netwo
  1455. // rkpolicies/
  1456. type NetworkPolicy struct {
  1457. // Enabled: Whether network policy is enabled on the cluster.
  1458. Enabled bool `json:"enabled,omitempty"`
  1459. // Provider: The selected network policy provider.
  1460. //
  1461. // Possible values:
  1462. // "PROVIDER_UNSPECIFIED" - Not set
  1463. // "CALICO" - Tigera (Calico Felix).
  1464. Provider string `json:"provider,omitempty"`
  1465. // ForceSendFields is a list of field names (e.g. "Enabled") to
  1466. // unconditionally include in API requests. By default, fields with
  1467. // empty values are omitted from API requests. However, any non-pointer,
  1468. // non-interface field appearing in ForceSendFields will be sent to the
  1469. // server regardless of whether the field is empty or not. This may be
  1470. // used to include empty fields in Patch requests.
  1471. ForceSendFields []string `json:"-"`
  1472. // NullFields is a list of field names (e.g. "Enabled") to include in
  1473. // API requests with the JSON null value. By default, fields with empty
  1474. // values are omitted from API requests. However, any field with an
  1475. // empty value appearing in NullFields will be sent to the server as
  1476. // null. It is an error if a field in this list has a non-empty value.
  1477. // This may be used to include null fields in Patch requests.
  1478. NullFields []string `json:"-"`
  1479. }
  1480. func (s *NetworkPolicy) MarshalJSON() ([]byte, error) {
  1481. type NoMethod NetworkPolicy
  1482. raw := NoMethod(*s)
  1483. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1484. }
  1485. // NetworkPolicyConfig: Configuration for NetworkPolicy. This only
  1486. // tracks whether the addon
  1487. // is enabled or not on the Master, it does not track whether network
  1488. // policy
  1489. // is enabled for the nodes.
  1490. type NetworkPolicyConfig struct {
  1491. // Disabled: Whether NetworkPolicy is enabled for this cluster.
  1492. Disabled bool `json:"disabled,omitempty"`
  1493. // ForceSendFields is a list of field names (e.g. "Disabled") to
  1494. // unconditionally include in API requests. By default, fields with
  1495. // empty values are omitted from API requests. However, any non-pointer,
  1496. // non-interface field appearing in ForceSendFields will be sent to the
  1497. // server regardless of whether the field is empty or not. This may be
  1498. // used to include empty fields in Patch requests.
  1499. ForceSendFields []string `json:"-"`
  1500. // NullFields is a list of field names (e.g. "Disabled") to include in
  1501. // API requests with the JSON null value. By default, fields with empty
  1502. // values are omitted from API requests. However, any field with an
  1503. // empty value appearing in NullFields will be sent to the server as
  1504. // null. It is an error if a field in this list has a non-empty value.
  1505. // This may be used to include null fields in Patch requests.
  1506. NullFields []string `json:"-"`
  1507. }
  1508. func (s *NetworkPolicyConfig) MarshalJSON() ([]byte, error) {
  1509. type NoMethod NetworkPolicyConfig
  1510. raw := NoMethod(*s)
  1511. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1512. }
  1513. // NodeConfig: Parameters that describe the nodes in a cluster.
  1514. type NodeConfig struct {
  1515. // Accelerators: A list of hardware accelerators to be attached to each
  1516. // node.
  1517. // See https://cloud.google.com/compute/docs/gpus for more information
  1518. // about
  1519. // support for GPUs.
  1520. Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"`
  1521. // DiskSizeGb: Size of the disk attached to each node, specified in
  1522. // GB.
  1523. // The smallest allowed disk size is 10GB.
  1524. //
  1525. // If unspecified, the default disk size is 100GB.
  1526. DiskSizeGb int64 `json:"diskSizeGb,omitempty"`
  1527. // DiskType: Type of the disk attached to each node (e.g. 'pd-standard'
  1528. // or 'pd-ssd')
  1529. //
  1530. // If unspecified, the default disk type is 'pd-standard'
  1531. DiskType string `json:"diskType,omitempty"`
  1532. // ImageType: The image type to use for this node. Note that for a given
  1533. // image type,
  1534. // the latest version of it will be used.
  1535. ImageType string `json:"imageType,omitempty"`
  1536. // Labels: The map of Kubernetes labels (key/value pairs) to be applied
  1537. // to each node.
  1538. // These will added in addition to any default label(s) that
  1539. // Kubernetes may apply to the node.
  1540. // In case of conflict in label keys, the applied set may differ
  1541. // depending on
  1542. // the Kubernetes version -- it's best to assume the behavior is
  1543. // undefined
  1544. // and conflicts should be avoided.
  1545. // For more information, including usage and the valid values,
  1546. // see:
  1547. // https://kubernetes.io/docs/concepts/overview/working-with-objects
  1548. // /labels/
  1549. Labels map[string]string `json:"labels,omitempty"`
  1550. // LocalSsdCount: The number of local SSD disks to be attached to the
  1551. // node.
  1552. //
  1553. // The limit for this value is dependant upon the maximum number
  1554. // of
  1555. // disks available on a machine per zone.
  1556. // See:
  1557. // https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_l
  1558. // imits
  1559. // for more information.
  1560. LocalSsdCount int64 `json:"localSsdCount,omitempty"`
  1561. // MachineType: The name of a Google Compute Engine
  1562. // [machine
  1563. // type](/compute/docs/machine-types) (e.g.
  1564. // `n1-standard-1`).
  1565. //
  1566. // If unspecified, the default machine type is
  1567. // `n1-standard-1`.
  1568. MachineType string `json:"machineType,omitempty"`
  1569. // Metadata: The metadata key/value pairs assigned to instances in the
  1570. // cluster.
  1571. //
  1572. // Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128
  1573. // bytes
  1574. // in length. These are reflected as part of a URL in the metadata
  1575. // server.
  1576. // Additionally, to avoid ambiguity, keys must not conflict with any
  1577. // other
  1578. // metadata keys for the project or be one of the reserved keys:
  1579. // "cluster-location"
  1580. // "cluster-name"
  1581. // "cluster-uid"
  1582. // "configure-sh"
  1583. // "enable-os-login"
  1584. // "gci-update-strategy"
  1585. // "gci-ensure-gke-docker"
  1586. // "instance-template"
  1587. // "kube-env"
  1588. // "startup-script"
  1589. // "user-data"
  1590. //
  1591. // Values are free-form strings, and only have meaning as interpreted
  1592. // by
  1593. // the image running in the instance. The only restriction placed on
  1594. // them is
  1595. // that each value's size must be less than or equal to 32 KB.
  1596. //
  1597. // The total size of all keys and values must be less than 512 KB.
  1598. Metadata map[string]string `json:"metadata,omitempty"`
  1599. // MinCpuPlatform: Minimum CPU platform to be used by this instance. The
  1600. // instance may be
  1601. // scheduled on the specified or newer CPU platform. Applicable values
  1602. // are the
  1603. // friendly names of CPU platforms, such as
  1604. // <code>minCpuPlatform: &quot;Intel Haswell&quot;</code>
  1605. // or
  1606. // <code>minCpuPlatform: &quot;Intel Sandy Bridge&quot;</code>. For
  1607. // more
  1608. // information, read [how to specify min
  1609. // CPU
  1610. // platform](https://cloud.google.com/compute/docs/instances/specify-
  1611. // min-cpu-platform)
  1612. MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
  1613. // OauthScopes: The set of Google API scopes to be made available on all
  1614. // of the
  1615. // node VMs under the "default" service account.
  1616. //
  1617. // The following scopes are recommended, but not required, and by
  1618. // default are
  1619. // not included:
  1620. //
  1621. // * `https://www.googleapis.com/auth/compute` is required for
  1622. // mounting
  1623. // persistent storage on your nodes.
  1624. // * `https://www.googleapis.com/auth/devstorage.read_only` is required
  1625. // for
  1626. // communicating with **gcr.io**
  1627. // (the [Google Container Registry](/container-registry/)).
  1628. //
  1629. // If unspecified, no scopes are added, unless Cloud Logging or
  1630. // Cloud
  1631. // Monitoring are enabled, in which case their required scopes will be
  1632. // added.
  1633. OauthScopes []string `json:"oauthScopes,omitempty"`
  1634. // Preemptible: Whether the nodes are created as preemptible VM
  1635. // instances.
  1636. // See:
  1637. // https://cloud.google.com/compute/docs/instances/preemptible for
  1638. // more
  1639. // information about preemptible VM instances.
  1640. Preemptible bool `json:"preemptible,omitempty"`
  1641. // ServiceAccount: The Google Cloud Platform Service Account to be used
  1642. // by the node VMs. If
  1643. // no Service Account is specified, the "default" service account is
  1644. // used.
  1645. ServiceAccount string `json:"serviceAccount,omitempty"`
  1646. // Tags: The list of instance tags applied to all nodes. Tags are used
  1647. // to identify
  1648. // valid sources or targets for network firewalls and are specified
  1649. // by
  1650. // the client during cluster or node pool creation. Each tag within the
  1651. // list
  1652. // must comply with RFC1035.
  1653. Tags []string `json:"tags,omitempty"`
  1654. // Taints: List of kubernetes taints to be applied to each node.
  1655. //
  1656. // For more information, including usage and the valid values,
  1657. // see:
  1658. // https://kubernetes.io/docs/concepts/configuration/taint-and-toler
  1659. // ation/
  1660. Taints []*NodeTaint `json:"taints,omitempty"`
  1661. // ForceSendFields is a list of field names (e.g. "Accelerators") to
  1662. // unconditionally include in API requests. By default, fields with
  1663. // empty values are omitted from API requests. However, any non-pointer,
  1664. // non-interface field appearing in ForceSendFields will be sent to the
  1665. // server regardless of whether the field is empty or not. This may be
  1666. // used to include empty fields in Patch requests.
  1667. ForceSendFields []string `json:"-"`
  1668. // NullFields is a list of field names (e.g. "Accelerators") to include
  1669. // in API requests with the JSON null value. By default, fields with
  1670. // empty values are omitted from API requests. However, any field with
  1671. // an empty value appearing in NullFields will be sent to the server as
  1672. // null. It is an error if a field in this list has a non-empty value.
  1673. // This may be used to include null fields in Patch requests.
  1674. NullFields []string `json:"-"`
  1675. }
  1676. func (s *NodeConfig) MarshalJSON() ([]byte, error) {
  1677. type NoMethod NodeConfig
  1678. raw := NoMethod(*s)
  1679. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1680. }
  1681. // NodeManagement: NodeManagement defines the set of node management
  1682. // services turned on for the
  1683. // node pool.
  1684. type NodeManagement struct {
  1685. // AutoRepair: A flag that specifies whether the node auto-repair is
  1686. // enabled for the node
  1687. // pool. If enabled, the nodes in this node pool will be monitored and,
  1688. // if
  1689. // they fail health checks too many times, an automatic repair action
  1690. // will be
  1691. // triggered.
  1692. AutoRepair bool `json:"autoRepair,omitempty"`
  1693. // AutoUpgrade: A flag that specifies whether node auto-upgrade is
  1694. // enabled for the node
  1695. // pool. If enabled, node auto-upgrade helps keep the nodes in your node
  1696. // pool
  1697. // up to date with the latest release version of Kubernetes.
  1698. AutoUpgrade bool `json:"autoUpgrade,omitempty"`
  1699. // UpgradeOptions: Specifies the Auto Upgrade knobs for the node pool.
  1700. UpgradeOptions *AutoUpgradeOptions `json:"upgradeOptions,omitempty"`
  1701. // ForceSendFields is a list of field names (e.g. "AutoRepair") to
  1702. // unconditionally include in API requests. By default, fields with
  1703. // empty values are omitted from API requests. However, any non-pointer,
  1704. // non-interface field appearing in ForceSendFields will be sent to the
  1705. // server regardless of whether the field is empty or not. This may be
  1706. // used to include empty fields in Patch requests.
  1707. ForceSendFields []string `json:"-"`
  1708. // NullFields is a list of field names (e.g. "AutoRepair") to include in
  1709. // API requests with the JSON null value. By default, fields with empty
  1710. // values are omitted from API requests. However, any field with an
  1711. // empty value appearing in NullFields will be sent to the server as
  1712. // null. It is an error if a field in this list has a non-empty value.
  1713. // This may be used to include null fields in Patch requests.
  1714. NullFields []string `json:"-"`
  1715. }
  1716. func (s *NodeManagement) MarshalJSON() ([]byte, error) {
  1717. type NoMethod NodeManagement
  1718. raw := NoMethod(*s)
  1719. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1720. }
  1721. // NodePool: NodePool contains the name and configuration for a
  1722. // cluster's node pool.
  1723. // Node pools are a set of nodes (i.e. VM's), with a common
  1724. // configuration and
  1725. // specification, under the control of the cluster master. They may have
  1726. // a set
  1727. // of Kubernetes labels applied to them, which may be used to reference
  1728. // them
  1729. // during pod scheduling. They may also be resized up or down, to
  1730. // accommodate
  1731. // the workload.
  1732. type NodePool struct {
  1733. // Autoscaling: Autoscaler configuration for this NodePool. Autoscaler
  1734. // is enabled
  1735. // only if a valid configuration is present.
  1736. Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"`
  1737. // Conditions: Which conditions caused the current node pool state.
  1738. Conditions []*StatusCondition `json:"conditions,omitempty"`
  1739. // Config: The node configuration of the pool.
  1740. Config *NodeConfig `json:"config,omitempty"`
  1741. // InitialNodeCount: The initial node count for the pool. You must
  1742. // ensure that your
  1743. // Compute Engine <a href="/compute/docs/resource-quotas">resource
  1744. // quota</a>
  1745. // is sufficient for this number of instances. You must also have
  1746. // available
  1747. // firewall and routes quota.
  1748. InitialNodeCount int64 `json:"initialNodeCount,omitempty"`
  1749. // InstanceGroupUrls: [Output only] The resource URLs of the [managed
  1750. // instance
  1751. // groups](/compute/docs/instance-groups/creating-groups-of-mana
  1752. // ged-instances)
  1753. // associated with this node pool.
  1754. InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"`
  1755. // Management: NodeManagement configuration for this NodePool.
  1756. Management *NodeManagement `json:"management,omitempty"`
  1757. // Name: The name of the node pool.
  1758. Name string `json:"name,omitempty"`
  1759. // SelfLink: [Output only] Server-defined URL for the resource.
  1760. SelfLink string `json:"selfLink,omitempty"`
  1761. // Status: [Output only] The status of the nodes in this pool instance.
  1762. //
  1763. // Possible values:
  1764. // "STATUS_UNSPECIFIED" - Not set.
  1765. // "PROVISIONING" - The PROVISIONING state indicates the node pool is
  1766. // being created.
  1767. // "RUNNING" - The RUNNING state indicates the node pool has been
  1768. // created
  1769. // and is fully usable.
  1770. // "RUNNING_WITH_ERROR" - The RUNNING_WITH_ERROR state indicates the
  1771. // node pool has been created
  1772. // and is partially usable. Some error state has occurred and
  1773. // some
  1774. // functionality may be impaired. Customer may need to reissue a
  1775. // request
  1776. // or trigger a new update.
  1777. // "RECONCILING" - The RECONCILING state indicates that some work is
  1778. // actively being done on
  1779. // the node pool, such as upgrading node software. Details can
  1780. // be found in the `statusMessage` field.
  1781. // "STOPPING" - The STOPPING state indicates the node pool is being
  1782. // deleted.
  1783. // "ERROR" - The ERROR state indicates the node pool may be unusable.
  1784. // Details
  1785. // can be found in the `statusMessage` field.
  1786. Status string `json:"status,omitempty"`
  1787. // StatusMessage: [Output only] Additional information about the current
  1788. // status of this
  1789. // node pool instance, if available.
  1790. StatusMessage string `json:"statusMessage,omitempty"`
  1791. // Version: The version of the Kubernetes of this node.
  1792. Version string `json:"version,omitempty"`
  1793. // ServerResponse contains the HTTP response code and headers from the
  1794. // server.
  1795. googleapi.ServerResponse `json:"-"`
  1796. // ForceSendFields is a list of field names (e.g. "Autoscaling") to
  1797. // unconditionally include in API requests. By default, fields with
  1798. // empty values are omitted from API requests. However, any non-pointer,
  1799. // non-interface field appearing in ForceSendFields will be sent to the
  1800. // server regardless of whether the field is empty or not. This may be
  1801. // used to include empty fields in Patch requests.
  1802. ForceSendFields []string `json:"-"`
  1803. // NullFields is a list of field names (e.g. "Autoscaling") to include
  1804. // in API requests with the JSON null value. By default, fields with
  1805. // empty values are omitted from API requests. However, any field with
  1806. // an empty value appearing in NullFields will be sent to the server as
  1807. // null. It is an error if a field in this list has a non-empty value.
  1808. // This may be used to include null fields in Patch requests.
  1809. NullFields []string `json:"-"`
  1810. }
  1811. func (s *NodePool) MarshalJSON() ([]byte, error) {
  1812. type NoMethod NodePool
  1813. raw := NoMethod(*s)
  1814. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1815. }
  1816. // NodePoolAutoscaling: NodePoolAutoscaling contains information
  1817. // required by cluster autoscaler to
  1818. // adjust the size of the node pool to the current cluster usage.
  1819. type NodePoolAutoscaling struct {
  1820. // Enabled: Is autoscaling enabled for this node pool.
  1821. Enabled bool `json:"enabled,omitempty"`
  1822. // MaxNodeCount: Maximum number of nodes in the NodePool. Must be >=
  1823. // min_node_count. There
  1824. // has to enough quota to scale up the cluster.
  1825. MaxNodeCount int64 `json:"maxNodeCount,omitempty"`
  1826. // MinNodeCount: Minimum number of nodes in the NodePool. Must be >= 1
  1827. // and <=
  1828. // max_node_count.
  1829. MinNodeCount int64 `json:"minNodeCount,omitempty"`
  1830. // ForceSendFields is a list of field names (e.g. "Enabled") to
  1831. // unconditionally include in API requests. By default, fields with
  1832. // empty values are omitted from API requests. However, any non-pointer,
  1833. // non-interface field appearing in ForceSendFields will be sent to the
  1834. // server regardless of whether the field is empty or not. This may be
  1835. // used to include empty fields in Patch requests.
  1836. ForceSendFields []string `json:"-"`
  1837. // NullFields is a list of field names (e.g. "Enabled") to include in
  1838. // API requests with the JSON null value. By default, fields with empty
  1839. // values are omitted from API requests. However, any field with an
  1840. // empty value appearing in NullFields will be sent to the server as
  1841. // null. It is an error if a field in this list has a non-empty value.
  1842. // This may be used to include null fields in Patch requests.
  1843. NullFields []string `json:"-"`
  1844. }
  1845. func (s *NodePoolAutoscaling) MarshalJSON() ([]byte, error) {
  1846. type NoMethod NodePoolAutoscaling
  1847. raw := NoMethod(*s)
  1848. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1849. }
  1850. // NodeTaint: Kubernetes taint is comprised of three fields: key, value,
  1851. // and effect. Effect
  1852. // can only be one of three types: NoSchedule, PreferNoSchedule or
  1853. // NoExecute.
  1854. //
  1855. // For more information, including usage and the valid values,
  1856. // see:
  1857. // https://kubernetes.io/docs/concepts/configuration/taint-and-toler
  1858. // ation/
  1859. type NodeTaint struct {
  1860. // Effect: Effect for taint.
  1861. //
  1862. // Possible values:
  1863. // "EFFECT_UNSPECIFIED" - Not set
  1864. // "NO_SCHEDULE" - NoSchedule
  1865. // "PREFER_NO_SCHEDULE" - PreferNoSchedule
  1866. // "NO_EXECUTE" - NoExecute
  1867. Effect string `json:"effect,omitempty"`
  1868. // Key: Key for taint.
  1869. Key string `json:"key,omitempty"`
  1870. // Value: Value for taint.
  1871. Value string `json:"value,omitempty"`
  1872. // ForceSendFields is a list of field names (e.g. "Effect") to
  1873. // unconditionally include in API requests. By default, fields with
  1874. // empty values are omitted from API requests. However, any non-pointer,
  1875. // non-interface field appearing in ForceSendFields will be sent to the
  1876. // server regardless of whether the field is empty or not. This may be
  1877. // used to include empty fields in Patch requests.
  1878. ForceSendFields []string `json:"-"`
  1879. // NullFields is a list of field names (e.g. "Effect") to include in API
  1880. // requests with the JSON null value. By default, fields with empty
  1881. // values are omitted from API requests. However, any field with an
  1882. // empty value appearing in NullFields will be sent to the server as
  1883. // null. It is an error if a field in this list has a non-empty value.
  1884. // This may be used to include null fields in Patch requests.
  1885. NullFields []string `json:"-"`
  1886. }
  1887. func (s *NodeTaint) MarshalJSON() ([]byte, error) {
  1888. type NoMethod NodeTaint
  1889. raw := NoMethod(*s)
  1890. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1891. }
  1892. // Operation: This operation resource represents operations that may
  1893. // have happened or are
  1894. // happening on the cluster. All fields are output only.
  1895. type Operation struct {
  1896. // ClusterConditions: Which conditions caused the current cluster state.
  1897. ClusterConditions []*StatusCondition `json:"clusterConditions,omitempty"`
  1898. // Detail: Detailed operation progress, if available.
  1899. Detail string `json:"detail,omitempty"`
  1900. // EndTime: [Output only] The time the operation completed,
  1901. // in
  1902. // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
  1903. EndTime string `json:"endTime,omitempty"`
  1904. // Location: [Output only] The name of the Google Compute
  1905. // Engine
  1906. // [zone](/compute/docs/regions-zones/regions-zones#available)
  1907. // or
  1908. // [region](/compute/docs/regions-zones/regions-zones#available) in
  1909. // which
  1910. // the cluster resides.
  1911. Location string `json:"location,omitempty"`
  1912. // Name: The server-assigned ID for the operation.
  1913. Name string `json:"name,omitempty"`
  1914. // NodepoolConditions: Which conditions caused the current node pool
  1915. // state.
  1916. NodepoolConditions []*StatusCondition `json:"nodepoolConditions,omitempty"`
  1917. // OperationType: The operation type.
  1918. //
  1919. // Possible values:
  1920. // "TYPE_UNSPECIFIED" - Not set.
  1921. // "CREATE_CLUSTER" - Cluster create.
  1922. // "DELETE_CLUSTER" - Cluster delete.
  1923. // "UPGRADE_MASTER" - A master upgrade.
  1924. // "UPGRADE_NODES" - A node upgrade.
  1925. // "REPAIR_CLUSTER" - Cluster repair.
  1926. // "UPDATE_CLUSTER" - Cluster update.
  1927. // "CREATE_NODE_POOL" - Node pool create.
  1928. // "DELETE_NODE_POOL" - Node pool delete.
  1929. // "SET_NODE_POOL_MANAGEMENT" - Set node pool management.
  1930. // "AUTO_REPAIR_NODES" - Automatic node pool repair.
  1931. // "AUTO_UPGRADE_NODES" - Automatic node upgrade.
  1932. // "SET_LABELS" - Set labels.
  1933. // "SET_MASTER_AUTH" - Set/generate master auth materials
  1934. // "SET_NODE_POOL_SIZE" - Set node pool size.
  1935. // "SET_NETWORK_POLICY" - Updates network policy for a cluster.
  1936. // "SET_MAINTENANCE_POLICY" - Set the maintenance policy.
  1937. OperationType string `json:"operationType,omitempty"`
  1938. // SelfLink: Server-defined URL for the resource.
  1939. SelfLink string `json:"selfLink,omitempty"`
  1940. // StartTime: [Output only] The time the operation started,
  1941. // in
  1942. // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
  1943. StartTime string `json:"startTime,omitempty"`
  1944. // Status: The current status of the operation.
  1945. //
  1946. // Possible values:
  1947. // "STATUS_UNSPECIFIED" - Not set.
  1948. // "PENDING" - The operation has been created.
  1949. // "RUNNING" - The operation is currently running.
  1950. // "DONE" - The operation is done, either cancelled or completed.
  1951. // "ABORTING" - The operation is aborting.
  1952. Status string `json:"status,omitempty"`
  1953. // StatusMessage: If an error has occurred, a textual description of the
  1954. // error.
  1955. StatusMessage string `json:"statusMessage,omitempty"`
  1956. // TargetLink: Server-defined URL for the target of the operation.
  1957. TargetLink string `json:"targetLink,omitempty"`
  1958. // Zone: The name of the Google Compute
  1959. // Engine
  1960. // [zone](/compute/docs/zones#available) in which the operation
  1961. // is taking place.
  1962. // This field is deprecated, use location instead.
  1963. Zone string `json:"zone,omitempty"`
  1964. // ServerResponse contains the HTTP response code and headers from the
  1965. // server.
  1966. googleapi.ServerResponse `json:"-"`
  1967. // ForceSendFields is a list of field names (e.g. "ClusterConditions")
  1968. // to unconditionally include in API requests. By default, fields with
  1969. // empty values are omitted from API requests. However, any non-pointer,
  1970. // non-interface field appearing in ForceSendFields will be sent to the
  1971. // server regardless of whether the field is empty or not. This may be
  1972. // used to include empty fields in Patch requests.
  1973. ForceSendFields []string `json:"-"`
  1974. // NullFields is a list of field names (e.g. "ClusterConditions") to
  1975. // include in API requests with the JSON null value. By default, fields
  1976. // with empty values are omitted from API requests. However, any field
  1977. // with an empty value appearing in NullFields will be sent to the
  1978. // server as null. It is an error if a field in this list has a
  1979. // non-empty value. This may be used to include null fields in Patch
  1980. // requests.
  1981. NullFields []string `json:"-"`
  1982. }
  1983. func (s *Operation) MarshalJSON() ([]byte, error) {
  1984. type NoMethod Operation
  1985. raw := NoMethod(*s)
  1986. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1987. }
  1988. // PrivateClusterConfig: Configuration options for private clusters.
  1989. type PrivateClusterConfig struct {
  1990. // EnablePrivateEndpoint: Whether the master's internal IP address is
  1991. // used as the cluster endpoint.
  1992. EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"`
  1993. // EnablePrivateNodes: Whether nodes have internal IP addresses only. If
  1994. // enabled, all nodes are
  1995. // given only RFC 1918 private addresses and communicate with the master
  1996. // via
  1997. // private networking.
  1998. EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty"`
  1999. // MasterIpv4CidrBlock: The IP range in CIDR notation to use for the
  2000. // hosted master network. This
  2001. // range will be used for assigning internal IP addresses to the master
  2002. // or
  2003. // set of masters, as well as the ILB VIP. This range must not overlap
  2004. // with
  2005. // any other ranges in use within the cluster's network.
  2006. MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"`
  2007. // PrivateEndpoint: Output only. The internal IP address of this
  2008. // cluster's master endpoint.
  2009. PrivateEndpoint string `json:"privateEndpoint,omitempty"`
  2010. // PublicEndpoint: Output only. The external IP address of this
  2011. // cluster's master endpoint.
  2012. PublicEndpoint string `json:"publicEndpoint,omitempty"`
  2013. // ForceSendFields is a list of field names (e.g.
  2014. // "EnablePrivateEndpoint") to unconditionally include in API requests.
  2015. // By default, fields with empty values are omitted from API requests.
  2016. // However, any non-pointer, non-interface field appearing in
  2017. // ForceSendFields will be sent to the server regardless of whether the
  2018. // field is empty or not. This may be used to include empty fields in
  2019. // Patch requests.
  2020. ForceSendFields []string `json:"-"`
  2021. // NullFields is a list of field names (e.g. "EnablePrivateEndpoint") to
  2022. // include in API requests with the JSON null value. By default, fields
  2023. // with empty values are omitted from API requests. However, any field
  2024. // with an empty value appearing in NullFields will be sent to the
  2025. // server as null. It is an error if a field in this list has a
  2026. // non-empty value. This may be used to include null fields in Patch
  2027. // requests.
  2028. NullFields []string `json:"-"`
  2029. }
  2030. func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) {
  2031. type NoMethod PrivateClusterConfig
  2032. raw := NoMethod(*s)
  2033. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2034. }
  2035. // RollbackNodePoolUpgradeRequest: RollbackNodePoolUpgradeRequest
  2036. // rollbacks the previously Aborted or Failed
  2037. // NodePool upgrade. This will be an no-op if the last upgrade
  2038. // successfully
  2039. // completed.
  2040. type RollbackNodePoolUpgradeRequest struct {
  2041. // ClusterId: Deprecated. The name of the cluster to rollback.
  2042. // This field has been deprecated and replaced by the name field.
  2043. ClusterId string `json:"clusterId,omitempty"`
  2044. // Name: The name (project, location, cluster, node pool id) of the node
  2045. // poll to
  2046. // rollback upgrade.
  2047. // Specified in the format
  2048. // 'projects/*/locations/*/clusters/*/nodePools/*'.
  2049. Name string `json:"name,omitempty"`
  2050. // NodePoolId: Deprecated. The name of the node pool to rollback.
  2051. // This field has been deprecated and replaced by the name field.
  2052. NodePoolId string `json:"nodePoolId,omitempty"`
  2053. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2054. // project
  2055. // number](https://support.google.com/cloud/answer/6158840).
  2056. // This
  2057. // field has been deprecated and replaced by the name field.
  2058. ProjectId string `json:"projectId,omitempty"`
  2059. // Zone: Deprecated. The name of the Google Compute
  2060. // Engine
  2061. // [zone](/compute/docs/zones#available) in which the
  2062. // cluster
  2063. // resides.
  2064. // This field has been deprecated and replaced by the name field.
  2065. Zone string `json:"zone,omitempty"`
  2066. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2067. // unconditionally include in API requests. By default, fields with
  2068. // empty values are omitted from API requests. However, any non-pointer,
  2069. // non-interface field appearing in ForceSendFields will be sent to the
  2070. // server regardless of whether the field is empty or not. This may be
  2071. // used to include empty fields in Patch requests.
  2072. ForceSendFields []string `json:"-"`
  2073. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2074. // API requests with the JSON null value. By default, fields with empty
  2075. // values are omitted from API requests. However, any field with an
  2076. // empty value appearing in NullFields will be sent to the server as
  2077. // null. It is an error if a field in this list has a non-empty value.
  2078. // This may be used to include null fields in Patch requests.
  2079. NullFields []string `json:"-"`
  2080. }
  2081. func (s *RollbackNodePoolUpgradeRequest) MarshalJSON() ([]byte, error) {
  2082. type NoMethod RollbackNodePoolUpgradeRequest
  2083. raw := NoMethod(*s)
  2084. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2085. }
  2086. // ServerConfig: Kubernetes Engine service configuration.
  2087. type ServerConfig struct {
  2088. // DefaultClusterVersion: Version of Kubernetes the service deploys by
  2089. // default.
  2090. DefaultClusterVersion string `json:"defaultClusterVersion,omitempty"`
  2091. // DefaultImageType: Default image type.
  2092. DefaultImageType string `json:"defaultImageType,omitempty"`
  2093. // ValidImageTypes: List of valid image types.
  2094. ValidImageTypes []string `json:"validImageTypes,omitempty"`
  2095. // ValidMasterVersions: List of valid master versions.
  2096. ValidMasterVersions []string `json:"validMasterVersions,omitempty"`
  2097. // ValidNodeVersions: List of valid node upgrade target versions.
  2098. ValidNodeVersions []string `json:"validNodeVersions,omitempty"`
  2099. // ServerResponse contains the HTTP response code and headers from the
  2100. // server.
  2101. googleapi.ServerResponse `json:"-"`
  2102. // ForceSendFields is a list of field names (e.g.
  2103. // "DefaultClusterVersion") to unconditionally include in API requests.
  2104. // By default, fields with empty values are omitted from API requests.
  2105. // However, any non-pointer, non-interface field appearing in
  2106. // ForceSendFields will be sent to the server regardless of whether the
  2107. // field is empty or not. This may be used to include empty fields in
  2108. // Patch requests.
  2109. ForceSendFields []string `json:"-"`
  2110. // NullFields is a list of field names (e.g. "DefaultClusterVersion") to
  2111. // include in API requests with the JSON null value. By default, fields
  2112. // with empty values are omitted from API requests. However, any field
  2113. // with an empty value appearing in NullFields will be sent to the
  2114. // server as null. It is an error if a field in this list has a
  2115. // non-empty value. This may be used to include null fields in Patch
  2116. // requests.
  2117. NullFields []string `json:"-"`
  2118. }
  2119. func (s *ServerConfig) MarshalJSON() ([]byte, error) {
  2120. type NoMethod ServerConfig
  2121. raw := NoMethod(*s)
  2122. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2123. }
  2124. // SetAddonsConfigRequest: SetAddonsConfigRequest sets the addons
  2125. // associated with the cluster.
  2126. type SetAddonsConfigRequest struct {
  2127. // AddonsConfig: The desired configurations for the various addons
  2128. // available to run in the
  2129. // cluster.
  2130. AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"`
  2131. // ClusterId: Deprecated. The name of the cluster to upgrade.
  2132. // This field has been deprecated and replaced by the name field.
  2133. ClusterId string `json:"clusterId,omitempty"`
  2134. // Name: The name (project, location, cluster) of the cluster to set
  2135. // addons.
  2136. // Specified in the format 'projects/*/locations/*/clusters/*'.
  2137. Name string `json:"name,omitempty"`
  2138. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2139. // project
  2140. // number](https://support.google.com/cloud/answer/6158840).
  2141. // This
  2142. // field has been deprecated and replaced by the name field.
  2143. ProjectId string `json:"projectId,omitempty"`
  2144. // Zone: Deprecated. The name of the Google Compute
  2145. // Engine
  2146. // [zone](/compute/docs/zones#available) in which the
  2147. // cluster
  2148. // resides.
  2149. // This field has been deprecated and replaced by the name field.
  2150. Zone string `json:"zone,omitempty"`
  2151. // ForceSendFields is a list of field names (e.g. "AddonsConfig") to
  2152. // unconditionally include in API requests. By default, fields with
  2153. // empty values are omitted from API requests. However, any non-pointer,
  2154. // non-interface field appearing in ForceSendFields will be sent to the
  2155. // server regardless of whether the field is empty or not. This may be
  2156. // used to include empty fields in Patch requests.
  2157. ForceSendFields []string `json:"-"`
  2158. // NullFields is a list of field names (e.g. "AddonsConfig") to include
  2159. // in API requests with the JSON null value. By default, fields with
  2160. // empty values are omitted from API requests. However, any field with
  2161. // an empty value appearing in NullFields will be sent to the server as
  2162. // null. It is an error if a field in this list has a non-empty value.
  2163. // This may be used to include null fields in Patch requests.
  2164. NullFields []string `json:"-"`
  2165. }
  2166. func (s *SetAddonsConfigRequest) MarshalJSON() ([]byte, error) {
  2167. type NoMethod SetAddonsConfigRequest
  2168. raw := NoMethod(*s)
  2169. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2170. }
  2171. // SetLabelsRequest: SetLabelsRequest sets the Google Cloud Platform
  2172. // labels on a Google Container
  2173. // Engine cluster, which will in turn set them for Google Compute
  2174. // Engine
  2175. // resources used by that cluster
  2176. type SetLabelsRequest struct {
  2177. // ClusterId: Deprecated. The name of the cluster.
  2178. // This field has been deprecated and replaced by the name field.
  2179. ClusterId string `json:"clusterId,omitempty"`
  2180. // LabelFingerprint: The fingerprint of the previous set of labels for
  2181. // this resource,
  2182. // used to detect conflicts. The fingerprint is initially generated
  2183. // by
  2184. // Kubernetes Engine and changes after every request to modify or
  2185. // update
  2186. // labels. You must always provide an up-to-date fingerprint hash
  2187. // when
  2188. // updating or changing labels. Make a <code>get()</code> request to
  2189. // the
  2190. // resource to get the latest fingerprint.
  2191. LabelFingerprint string `json:"labelFingerprint,omitempty"`
  2192. // Name: The name (project, location, cluster id) of the cluster to set
  2193. // labels.
  2194. // Specified in the format 'projects/*/locations/*/clusters/*'.
  2195. Name string `json:"name,omitempty"`
  2196. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2197. // project
  2198. // number](https://developers.google.com/console/help/new/#projec
  2199. // tnumber).
  2200. // This field has been deprecated and replaced by the name field.
  2201. ProjectId string `json:"projectId,omitempty"`
  2202. // ResourceLabels: The labels to set for that cluster.
  2203. ResourceLabels map[string]string `json:"resourceLabels,omitempty"`
  2204. // Zone: Deprecated. The name of the Google Compute
  2205. // Engine
  2206. // [zone](/compute/docs/zones#available) in which the
  2207. // cluster
  2208. // resides.
  2209. // This field has been deprecated and replaced by the name field.
  2210. Zone string `json:"zone,omitempty"`
  2211. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2212. // unconditionally include in API requests. By default, fields with
  2213. // empty values are omitted from API requests. However, any non-pointer,
  2214. // non-interface field appearing in ForceSendFields will be sent to the
  2215. // server regardless of whether the field is empty or not. This may be
  2216. // used to include empty fields in Patch requests.
  2217. ForceSendFields []string `json:"-"`
  2218. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2219. // API requests with the JSON null value. By default, fields with empty
  2220. // values are omitted from API requests. However, any field with an
  2221. // empty value appearing in NullFields will be sent to the server as
  2222. // null. It is an error if a field in this list has a non-empty value.
  2223. // This may be used to include null fields in Patch requests.
  2224. NullFields []string `json:"-"`
  2225. }
  2226. func (s *SetLabelsRequest) MarshalJSON() ([]byte, error) {
  2227. type NoMethod SetLabelsRequest
  2228. raw := NoMethod(*s)
  2229. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2230. }
  2231. // SetLegacyAbacRequest: SetLegacyAbacRequest enables or disables the
  2232. // ABAC authorization mechanism for
  2233. // a cluster.
  2234. type SetLegacyAbacRequest struct {
  2235. // ClusterId: Deprecated. The name of the cluster to update.
  2236. // This field has been deprecated and replaced by the name field.
  2237. ClusterId string `json:"clusterId,omitempty"`
  2238. // Enabled: Whether ABAC authorization will be enabled in the cluster.
  2239. Enabled bool `json:"enabled,omitempty"`
  2240. // Name: The name (project, location, cluster id) of the cluster to set
  2241. // legacy abac.
  2242. // Specified in the format 'projects/*/locations/*/clusters/*'.
  2243. Name string `json:"name,omitempty"`
  2244. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2245. // project
  2246. // number](https://support.google.com/cloud/answer/6158840).
  2247. // This
  2248. // field has been deprecated and replaced by the name field.
  2249. ProjectId string `json:"projectId,omitempty"`
  2250. // Zone: Deprecated. The name of the Google Compute
  2251. // Engine
  2252. // [zone](/compute/docs/zones#available) in which the
  2253. // cluster
  2254. // resides.
  2255. // This field has been deprecated and replaced by the name field.
  2256. Zone string `json:"zone,omitempty"`
  2257. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2258. // unconditionally include in API requests. By default, fields with
  2259. // empty values are omitted from API requests. However, any non-pointer,
  2260. // non-interface field appearing in ForceSendFields will be sent to the
  2261. // server regardless of whether the field is empty or not. This may be
  2262. // used to include empty fields in Patch requests.
  2263. ForceSendFields []string `json:"-"`
  2264. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2265. // API requests with the JSON null value. By default, fields with empty
  2266. // values are omitted from API requests. However, any field with an
  2267. // empty value appearing in NullFields will be sent to the server as
  2268. // null. It is an error if a field in this list has a non-empty value.
  2269. // This may be used to include null fields in Patch requests.
  2270. NullFields []string `json:"-"`
  2271. }
  2272. func (s *SetLegacyAbacRequest) MarshalJSON() ([]byte, error) {
  2273. type NoMethod SetLegacyAbacRequest
  2274. raw := NoMethod(*s)
  2275. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2276. }
  2277. // SetLocationsRequest: SetLocationsRequest sets the locations of the
  2278. // cluster.
  2279. type SetLocationsRequest struct {
  2280. // ClusterId: Deprecated. The name of the cluster to upgrade.
  2281. // This field has been deprecated and replaced by the name field.
  2282. ClusterId string `json:"clusterId,omitempty"`
  2283. // Locations: The desired list of Google Compute
  2284. // Engine
  2285. // [zones](/compute/docs/zones#available) in which the cluster's
  2286. // nodes
  2287. // should be located. Changing the locations a cluster is in will
  2288. // result
  2289. // in nodes being either created or removed from the cluster, depending
  2290. // on
  2291. // whether locations are being added or removed.
  2292. //
  2293. // This list must always include the cluster's primary zone.
  2294. Locations []string `json:"locations,omitempty"`
  2295. // Name: The name (project, location, cluster) of the cluster to set
  2296. // locations.
  2297. // Specified in the format 'projects/*/locations/*/clusters/*'.
  2298. Name string `json:"name,omitempty"`
  2299. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2300. // project
  2301. // number](https://support.google.com/cloud/answer/6158840).
  2302. // This
  2303. // field has been deprecated and replaced by the name field.
  2304. ProjectId string `json:"projectId,omitempty"`
  2305. // Zone: Deprecated. The name of the Google Compute
  2306. // Engine
  2307. // [zone](/compute/docs/zones#available) in which the
  2308. // cluster
  2309. // resides.
  2310. // This field has been deprecated and replaced by the name field.
  2311. Zone string `json:"zone,omitempty"`
  2312. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2313. // unconditionally include in API requests. By default, fields with
  2314. // empty values are omitted from API requests. However, any non-pointer,
  2315. // non-interface field appearing in ForceSendFields will be sent to the
  2316. // server regardless of whether the field is empty or not. This may be
  2317. // used to include empty fields in Patch requests.
  2318. ForceSendFields []string `json:"-"`
  2319. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2320. // API requests with the JSON null value. By default, fields with empty
  2321. // values are omitted from API requests. However, any field with an
  2322. // empty value appearing in NullFields will be sent to the server as
  2323. // null. It is an error if a field in this list has a non-empty value.
  2324. // This may be used to include null fields in Patch requests.
  2325. NullFields []string `json:"-"`
  2326. }
  2327. func (s *SetLocationsRequest) MarshalJSON() ([]byte, error) {
  2328. type NoMethod SetLocationsRequest
  2329. raw := NoMethod(*s)
  2330. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2331. }
  2332. // SetLoggingServiceRequest: SetLoggingServiceRequest sets the logging
  2333. // service of a cluster.
  2334. type SetLoggingServiceRequest struct {
  2335. // ClusterId: Deprecated. The name of the cluster to upgrade.
  2336. // This field has been deprecated and replaced by the name field.
  2337. ClusterId string `json:"clusterId,omitempty"`
  2338. // LoggingService: The logging service the cluster should use to write
  2339. // metrics.
  2340. // Currently available options:
  2341. //
  2342. // * "logging.googleapis.com" - the Google Cloud Logging service
  2343. // * "none" - no metrics will be exported from the cluster
  2344. LoggingService string `json:"loggingService,omitempty"`
  2345. // Name: The name (project, location, cluster) of the cluster to set
  2346. // logging.
  2347. // Specified in the format 'projects/*/locations/*/clusters/*'.
  2348. Name string `json:"name,omitempty"`
  2349. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2350. // project
  2351. // number](https://support.google.com/cloud/answer/6158840).
  2352. // This
  2353. // field has been deprecated and replaced by the name field.
  2354. ProjectId string `json:"projectId,omitempty"`
  2355. // Zone: Deprecated. The name of the Google Compute
  2356. // Engine
  2357. // [zone](/compute/docs/zones#available) in which the
  2358. // cluster
  2359. // resides.
  2360. // This field has been deprecated and replaced by the name field.
  2361. Zone string `json:"zone,omitempty"`
  2362. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2363. // unconditionally include in API requests. By default, fields with
  2364. // empty values are omitted from API requests. However, any non-pointer,
  2365. // non-interface field appearing in ForceSendFields will be sent to the
  2366. // server regardless of whether the field is empty or not. This may be
  2367. // used to include empty fields in Patch requests.
  2368. ForceSendFields []string `json:"-"`
  2369. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2370. // API requests with the JSON null value. By default, fields with empty
  2371. // values are omitted from API requests. However, any field with an
  2372. // empty value appearing in NullFields will be sent to the server as
  2373. // null. It is an error if a field in this list has a non-empty value.
  2374. // This may be used to include null fields in Patch requests.
  2375. NullFields []string `json:"-"`
  2376. }
  2377. func (s *SetLoggingServiceRequest) MarshalJSON() ([]byte, error) {
  2378. type NoMethod SetLoggingServiceRequest
  2379. raw := NoMethod(*s)
  2380. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2381. }
  2382. // SetMaintenancePolicyRequest: SetMaintenancePolicyRequest sets the
  2383. // maintenance policy for a cluster.
  2384. type SetMaintenancePolicyRequest struct {
  2385. // ClusterId: The name of the cluster to update.
  2386. ClusterId string `json:"clusterId,omitempty"`
  2387. // MaintenancePolicy: The maintenance policy to be set for the cluster.
  2388. // An empty field
  2389. // clears the existing maintenance policy.
  2390. MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"`
  2391. // Name: The name (project, location, cluster id) of the cluster to set
  2392. // maintenance
  2393. // policy.
  2394. // Specified in the format 'projects/*/locations/*/clusters/*'.
  2395. Name string `json:"name,omitempty"`
  2396. // ProjectId: The Google Developers Console [project ID or
  2397. // project
  2398. // number](https://support.google.com/cloud/answer/6158840).
  2399. ProjectId string `json:"projectId,omitempty"`
  2400. // Zone: The name of the Google Compute
  2401. // Engine
  2402. // [zone](/compute/docs/zones#available) in which the cluster
  2403. // resides.
  2404. Zone string `json:"zone,omitempty"`
  2405. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2406. // unconditionally include in API requests. By default, fields with
  2407. // empty values are omitted from API requests. However, any non-pointer,
  2408. // non-interface field appearing in ForceSendFields will be sent to the
  2409. // server regardless of whether the field is empty or not. This may be
  2410. // used to include empty fields in Patch requests.
  2411. ForceSendFields []string `json:"-"`
  2412. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2413. // API requests with the JSON null value. By default, fields with empty
  2414. // values are omitted from API requests. However, any field with an
  2415. // empty value appearing in NullFields will be sent to the server as
  2416. // null. It is an error if a field in this list has a non-empty value.
  2417. // This may be used to include null fields in Patch requests.
  2418. NullFields []string `json:"-"`
  2419. }
  2420. func (s *SetMaintenancePolicyRequest) MarshalJSON() ([]byte, error) {
  2421. type NoMethod SetMaintenancePolicyRequest
  2422. raw := NoMethod(*s)
  2423. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2424. }
  2425. // SetMasterAuthRequest: SetMasterAuthRequest updates the admin password
  2426. // of a cluster.
  2427. type SetMasterAuthRequest struct {
  2428. // Action: The exact form of action to be taken on the master auth.
  2429. //
  2430. // Possible values:
  2431. // "UNKNOWN" - Operation is unknown and will error out.
  2432. // "SET_PASSWORD" - Set the password to a user generated value.
  2433. // "GENERATE_PASSWORD" - Generate a new password and set it to that.
  2434. // "SET_USERNAME" - Set the username. If an empty username is
  2435. // provided, basic authentication
  2436. // is disabled for the cluster. If a non-empty username is provided,
  2437. // basic
  2438. // authentication is enabled, with either a provided password or a
  2439. // generated
  2440. // one.
  2441. Action string `json:"action,omitempty"`
  2442. // ClusterId: Deprecated. The name of the cluster to upgrade.
  2443. // This field has been deprecated and replaced by the name field.
  2444. ClusterId string `json:"clusterId,omitempty"`
  2445. // Name: The name (project, location, cluster) of the cluster to set
  2446. // auth.
  2447. // Specified in the format 'projects/*/locations/*/clusters/*'.
  2448. Name string `json:"name,omitempty"`
  2449. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2450. // project
  2451. // number](https://support.google.com/cloud/answer/6158840).
  2452. // This
  2453. // field has been deprecated and replaced by the name field.
  2454. ProjectId string `json:"projectId,omitempty"`
  2455. // Update: A description of the update.
  2456. Update *MasterAuth `json:"update,omitempty"`
  2457. // Zone: Deprecated. The name of the Google Compute
  2458. // Engine
  2459. // [zone](/compute/docs/zones#available) in which the
  2460. // cluster
  2461. // resides.
  2462. // This field has been deprecated and replaced by the name field.
  2463. Zone string `json:"zone,omitempty"`
  2464. // ForceSendFields is a list of field names (e.g. "Action") to
  2465. // unconditionally include in API requests. By default, fields with
  2466. // empty values are omitted from API requests. However, any non-pointer,
  2467. // non-interface field appearing in ForceSendFields will be sent to the
  2468. // server regardless of whether the field is empty or not. This may be
  2469. // used to include empty fields in Patch requests.
  2470. ForceSendFields []string `json:"-"`
  2471. // NullFields is a list of field names (e.g. "Action") to include in API
  2472. // requests with the JSON null value. By default, fields with empty
  2473. // values are omitted from API requests. However, any field with an
  2474. // empty value appearing in NullFields will be sent to the server as
  2475. // null. It is an error if a field in this list has a non-empty value.
  2476. // This may be used to include null fields in Patch requests.
  2477. NullFields []string `json:"-"`
  2478. }
  2479. func (s *SetMasterAuthRequest) MarshalJSON() ([]byte, error) {
  2480. type NoMethod SetMasterAuthRequest
  2481. raw := NoMethod(*s)
  2482. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2483. }
  2484. // SetMonitoringServiceRequest: SetMonitoringServiceRequest sets the
  2485. // monitoring service of a cluster.
  2486. type SetMonitoringServiceRequest struct {
  2487. // ClusterId: Deprecated. The name of the cluster to upgrade.
  2488. // This field has been deprecated and replaced by the name field.
  2489. ClusterId string `json:"clusterId,omitempty"`
  2490. // MonitoringService: The monitoring service the cluster should use to
  2491. // write metrics.
  2492. // Currently available options:
  2493. //
  2494. // * "monitoring.googleapis.com" - the Google Cloud Monitoring service
  2495. // * "none" - no metrics will be exported from the cluster
  2496. MonitoringService string `json:"monitoringService,omitempty"`
  2497. // Name: The name (project, location, cluster) of the cluster to set
  2498. // monitoring.
  2499. // Specified in the format 'projects/*/locations/*/clusters/*'.
  2500. Name string `json:"name,omitempty"`
  2501. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2502. // project
  2503. // number](https://support.google.com/cloud/answer/6158840).
  2504. // This
  2505. // field has been deprecated and replaced by the name field.
  2506. ProjectId string `json:"projectId,omitempty"`
  2507. // Zone: Deprecated. The name of the Google Compute
  2508. // Engine
  2509. // [zone](/compute/docs/zones#available) in which the
  2510. // cluster
  2511. // resides.
  2512. // This field has been deprecated and replaced by the name field.
  2513. Zone string `json:"zone,omitempty"`
  2514. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2515. // unconditionally include in API requests. By default, fields with
  2516. // empty values are omitted from API requests. However, any non-pointer,
  2517. // non-interface field appearing in ForceSendFields will be sent to the
  2518. // server regardless of whether the field is empty or not. This may be
  2519. // used to include empty fields in Patch requests.
  2520. ForceSendFields []string `json:"-"`
  2521. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2522. // API requests with the JSON null value. By default, fields with empty
  2523. // values are omitted from API requests. However, any field with an
  2524. // empty value appearing in NullFields will be sent to the server as
  2525. // null. It is an error if a field in this list has a non-empty value.
  2526. // This may be used to include null fields in Patch requests.
  2527. NullFields []string `json:"-"`
  2528. }
  2529. func (s *SetMonitoringServiceRequest) MarshalJSON() ([]byte, error) {
  2530. type NoMethod SetMonitoringServiceRequest
  2531. raw := NoMethod(*s)
  2532. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2533. }
  2534. // SetNetworkPolicyRequest: SetNetworkPolicyRequest enables/disables
  2535. // network policy for a cluster.
  2536. type SetNetworkPolicyRequest struct {
  2537. // ClusterId: Deprecated. The name of the cluster.
  2538. // This field has been deprecated and replaced by the name field.
  2539. ClusterId string `json:"clusterId,omitempty"`
  2540. // Name: The name (project, location, cluster id) of the cluster to set
  2541. // networking
  2542. // policy. Specified in the format 'projects/*/locations/*/clusters/*'.
  2543. Name string `json:"name,omitempty"`
  2544. // NetworkPolicy: Configuration options for the NetworkPolicy feature.
  2545. NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"`
  2546. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2547. // project
  2548. // number](https://developers.google.com/console/help/new/#projec
  2549. // tnumber).
  2550. // This field has been deprecated and replaced by the name field.
  2551. ProjectId string `json:"projectId,omitempty"`
  2552. // Zone: Deprecated. The name of the Google Compute
  2553. // Engine
  2554. // [zone](/compute/docs/zones#available) in which the
  2555. // cluster
  2556. // resides.
  2557. // This field has been deprecated and replaced by the name field.
  2558. Zone string `json:"zone,omitempty"`
  2559. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2560. // unconditionally include in API requests. By default, fields with
  2561. // empty values are omitted from API requests. However, any non-pointer,
  2562. // non-interface field appearing in ForceSendFields will be sent to the
  2563. // server regardless of whether the field is empty or not. This may be
  2564. // used to include empty fields in Patch requests.
  2565. ForceSendFields []string `json:"-"`
  2566. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2567. // API requests with the JSON null value. By default, fields with empty
  2568. // values are omitted from API requests. However, any field with an
  2569. // empty value appearing in NullFields will be sent to the server as
  2570. // null. It is an error if a field in this list has a non-empty value.
  2571. // This may be used to include null fields in Patch requests.
  2572. NullFields []string `json:"-"`
  2573. }
  2574. func (s *SetNetworkPolicyRequest) MarshalJSON() ([]byte, error) {
  2575. type NoMethod SetNetworkPolicyRequest
  2576. raw := NoMethod(*s)
  2577. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2578. }
  2579. // SetNodePoolAutoscalingRequest: SetNodePoolAutoscalingRequest sets the
  2580. // autoscaler settings of a node pool.
  2581. type SetNodePoolAutoscalingRequest struct {
  2582. // Autoscaling: Autoscaling configuration for the node pool.
  2583. Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"`
  2584. // ClusterId: Deprecated. The name of the cluster to upgrade.
  2585. // This field has been deprecated and replaced by the name field.
  2586. ClusterId string `json:"clusterId,omitempty"`
  2587. // Name: The name (project, location, cluster, node pool) of the node
  2588. // pool to set
  2589. // autoscaler settings. Specified in the
  2590. // format
  2591. // 'projects/*/locations/*/clusters/*/nodePools/*'.
  2592. Name string `json:"name,omitempty"`
  2593. // NodePoolId: Deprecated. The name of the node pool to upgrade.
  2594. // This field has been deprecated and replaced by the name field.
  2595. NodePoolId string `json:"nodePoolId,omitempty"`
  2596. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2597. // project
  2598. // number](https://support.google.com/cloud/answer/6158840).
  2599. // This
  2600. // field has been deprecated and replaced by the name field.
  2601. ProjectId string `json:"projectId,omitempty"`
  2602. // Zone: Deprecated. The name of the Google Compute
  2603. // Engine
  2604. // [zone](/compute/docs/zones#available) in which the
  2605. // cluster
  2606. // resides.
  2607. // This field has been deprecated and replaced by the name field.
  2608. Zone string `json:"zone,omitempty"`
  2609. // ForceSendFields is a list of field names (e.g. "Autoscaling") to
  2610. // unconditionally include in API requests. By default, fields with
  2611. // empty values are omitted from API requests. However, any non-pointer,
  2612. // non-interface field appearing in ForceSendFields will be sent to the
  2613. // server regardless of whether the field is empty or not. This may be
  2614. // used to include empty fields in Patch requests.
  2615. ForceSendFields []string `json:"-"`
  2616. // NullFields is a list of field names (e.g. "Autoscaling") to include
  2617. // in API requests with the JSON null value. By default, fields with
  2618. // empty values are omitted from API requests. However, any field with
  2619. // an empty value appearing in NullFields will be sent to the server as
  2620. // null. It is an error if a field in this list has a non-empty value.
  2621. // This may be used to include null fields in Patch requests.
  2622. NullFields []string `json:"-"`
  2623. }
  2624. func (s *SetNodePoolAutoscalingRequest) MarshalJSON() ([]byte, error) {
  2625. type NoMethod SetNodePoolAutoscalingRequest
  2626. raw := NoMethod(*s)
  2627. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2628. }
  2629. // SetNodePoolManagementRequest: SetNodePoolManagementRequest sets the
  2630. // node management properties of a node
  2631. // pool.
  2632. type SetNodePoolManagementRequest struct {
  2633. // ClusterId: Deprecated. The name of the cluster to update.
  2634. // This field has been deprecated and replaced by the name field.
  2635. ClusterId string `json:"clusterId,omitempty"`
  2636. // Management: NodeManagement configuration for the node pool.
  2637. Management *NodeManagement `json:"management,omitempty"`
  2638. // Name: The name (project, location, cluster, node pool id) of the node
  2639. // pool to set
  2640. // management properties. Specified in the
  2641. // format
  2642. // 'projects/*/locations/*/clusters/*/nodePools/*'.
  2643. Name string `json:"name,omitempty"`
  2644. // NodePoolId: Deprecated. The name of the node pool to update.
  2645. // This field has been deprecated and replaced by the name field.
  2646. NodePoolId string `json:"nodePoolId,omitempty"`
  2647. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2648. // project
  2649. // number](https://support.google.com/cloud/answer/6158840).
  2650. // This
  2651. // field has been deprecated and replaced by the name field.
  2652. ProjectId string `json:"projectId,omitempty"`
  2653. // Zone: Deprecated. The name of the Google Compute
  2654. // Engine
  2655. // [zone](/compute/docs/zones#available) in which the
  2656. // cluster
  2657. // resides.
  2658. // This field has been deprecated and replaced by the name field.
  2659. Zone string `json:"zone,omitempty"`
  2660. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2661. // unconditionally include in API requests. By default, fields with
  2662. // empty values are omitted from API requests. However, any non-pointer,
  2663. // non-interface field appearing in ForceSendFields will be sent to the
  2664. // server regardless of whether the field is empty or not. This may be
  2665. // used to include empty fields in Patch requests.
  2666. ForceSendFields []string `json:"-"`
  2667. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2668. // API requests with the JSON null value. By default, fields with empty
  2669. // values are omitted from API requests. However, any field with an
  2670. // empty value appearing in NullFields will be sent to the server as
  2671. // null. It is an error if a field in this list has a non-empty value.
  2672. // This may be used to include null fields in Patch requests.
  2673. NullFields []string `json:"-"`
  2674. }
  2675. func (s *SetNodePoolManagementRequest) MarshalJSON() ([]byte, error) {
  2676. type NoMethod SetNodePoolManagementRequest
  2677. raw := NoMethod(*s)
  2678. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2679. }
  2680. // SetNodePoolSizeRequest: SetNodePoolSizeRequest sets the size a
  2681. // node
  2682. // pool.
  2683. type SetNodePoolSizeRequest struct {
  2684. // ClusterId: Deprecated. The name of the cluster to update.
  2685. // This field has been deprecated and replaced by the name field.
  2686. ClusterId string `json:"clusterId,omitempty"`
  2687. // Name: The name (project, location, cluster, node pool id) of the node
  2688. // pool to set
  2689. // size.
  2690. // Specified in the format
  2691. // 'projects/*/locations/*/clusters/*/nodePools/*'.
  2692. Name string `json:"name,omitempty"`
  2693. // NodeCount: The desired node count for the pool.
  2694. NodeCount int64 `json:"nodeCount,omitempty"`
  2695. // NodePoolId: Deprecated. The name of the node pool to update.
  2696. // This field has been deprecated and replaced by the name field.
  2697. NodePoolId string `json:"nodePoolId,omitempty"`
  2698. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2699. // project
  2700. // number](https://support.google.com/cloud/answer/6158840).
  2701. // This
  2702. // field has been deprecated and replaced by the name field.
  2703. ProjectId string `json:"projectId,omitempty"`
  2704. // Zone: Deprecated. The name of the Google Compute
  2705. // Engine
  2706. // [zone](/compute/docs/zones#available) in which the
  2707. // cluster
  2708. // resides.
  2709. // This field has been deprecated and replaced by the name field.
  2710. Zone string `json:"zone,omitempty"`
  2711. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2712. // unconditionally include in API requests. By default, fields with
  2713. // empty values are omitted from API requests. However, any non-pointer,
  2714. // non-interface field appearing in ForceSendFields will be sent to the
  2715. // server regardless of whether the field is empty or not. This may be
  2716. // used to include empty fields in Patch requests.
  2717. ForceSendFields []string `json:"-"`
  2718. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2719. // API requests with the JSON null value. By default, fields with empty
  2720. // values are omitted from API requests. However, any field with an
  2721. // empty value appearing in NullFields will be sent to the server as
  2722. // null. It is an error if a field in this list has a non-empty value.
  2723. // This may be used to include null fields in Patch requests.
  2724. NullFields []string `json:"-"`
  2725. }
  2726. func (s *SetNodePoolSizeRequest) MarshalJSON() ([]byte, error) {
  2727. type NoMethod SetNodePoolSizeRequest
  2728. raw := NoMethod(*s)
  2729. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2730. }
  2731. // StartIPRotationRequest: StartIPRotationRequest creates a new IP for
  2732. // the cluster and then performs
  2733. // a node upgrade on each node pool to point to the new IP.
  2734. type StartIPRotationRequest struct {
  2735. // ClusterId: Deprecated. The name of the cluster.
  2736. // This field has been deprecated and replaced by the name field.
  2737. ClusterId string `json:"clusterId,omitempty"`
  2738. // Name: The name (project, location, cluster id) of the cluster to
  2739. // start IP
  2740. // rotation. Specified in the format
  2741. // 'projects/*/locations/*/clusters/*'.
  2742. Name string `json:"name,omitempty"`
  2743. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2744. // project
  2745. // number](https://developers.google.com/console/help/new/#projec
  2746. // tnumber).
  2747. // This field has been deprecated and replaced by the name field.
  2748. ProjectId string `json:"projectId,omitempty"`
  2749. // RotateCredentials: Whether to rotate credentials during IP rotation.
  2750. RotateCredentials bool `json:"rotateCredentials,omitempty"`
  2751. // Zone: Deprecated. The name of the Google Compute
  2752. // Engine
  2753. // [zone](/compute/docs/zones#available) in which the
  2754. // cluster
  2755. // resides.
  2756. // This field has been deprecated and replaced by the name field.
  2757. Zone string `json:"zone,omitempty"`
  2758. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2759. // unconditionally include in API requests. By default, fields with
  2760. // empty values are omitted from API requests. However, any non-pointer,
  2761. // non-interface field appearing in ForceSendFields will be sent to the
  2762. // server regardless of whether the field is empty or not. This may be
  2763. // used to include empty fields in Patch requests.
  2764. ForceSendFields []string `json:"-"`
  2765. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2766. // API requests with the JSON null value. By default, fields with empty
  2767. // values are omitted from API requests. However, any field with an
  2768. // empty value appearing in NullFields will be sent to the server as
  2769. // null. It is an error if a field in this list has a non-empty value.
  2770. // This may be used to include null fields in Patch requests.
  2771. NullFields []string `json:"-"`
  2772. }
  2773. func (s *StartIPRotationRequest) MarshalJSON() ([]byte, error) {
  2774. type NoMethod StartIPRotationRequest
  2775. raw := NoMethod(*s)
  2776. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2777. }
  2778. // StatusCondition: StatusCondition describes why a cluster or a node
  2779. // pool has a certain status
  2780. // (e.g., ERROR or DEGRADED).
  2781. type StatusCondition struct {
  2782. // Code: Machine-friendly representation of the condition
  2783. //
  2784. // Possible values:
  2785. // "UNKNOWN" - UNKNOWN indicates a generic condition.
  2786. // "GCE_STOCKOUT" - GCE_STOCKOUT indicates a Google Compute Engine
  2787. // stockout.
  2788. // "GKE_SERVICE_ACCOUNT_DELETED" - GKE_SERVICE_ACCOUNT_DELETED
  2789. // indicates that the user deleted their robot
  2790. // service account.
  2791. // "GCE_QUOTA_EXCEEDED" - Google Compute Engine quota was exceeded.
  2792. // "SET_BY_OPERATOR" - Cluster state was manually changed by an SRE
  2793. // due to a system logic error.
  2794. // More codes TBA
  2795. Code string `json:"code,omitempty"`
  2796. // Message: Human-friendly representation of the condition
  2797. Message string `json:"message,omitempty"`
  2798. // ForceSendFields is a list of field names (e.g. "Code") to
  2799. // unconditionally include in API requests. By default, fields with
  2800. // empty values are omitted from API requests. However, any non-pointer,
  2801. // non-interface field appearing in ForceSendFields will be sent to the
  2802. // server regardless of whether the field is empty or not. This may be
  2803. // used to include empty fields in Patch requests.
  2804. ForceSendFields []string `json:"-"`
  2805. // NullFields is a list of field names (e.g. "Code") to include in API
  2806. // requests with the JSON null value. By default, fields with empty
  2807. // values are omitted from API requests. However, any field with an
  2808. // empty value appearing in NullFields will be sent to the server as
  2809. // null. It is an error if a field in this list has a non-empty value.
  2810. // This may be used to include null fields in Patch requests.
  2811. NullFields []string `json:"-"`
  2812. }
  2813. func (s *StatusCondition) MarshalJSON() ([]byte, error) {
  2814. type NoMethod StatusCondition
  2815. raw := NoMethod(*s)
  2816. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2817. }
  2818. // UpdateClusterRequest: UpdateClusterRequest updates the settings of a
  2819. // cluster.
  2820. type UpdateClusterRequest struct {
  2821. // ClusterId: Deprecated. The name of the cluster to upgrade.
  2822. // This field has been deprecated and replaced by the name field.
  2823. ClusterId string `json:"clusterId,omitempty"`
  2824. // Name: The name (project, location, cluster) of the cluster to
  2825. // update.
  2826. // Specified in the format 'projects/*/locations/*/clusters/*'.
  2827. Name string `json:"name,omitempty"`
  2828. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2829. // project
  2830. // number](https://support.google.com/cloud/answer/6158840).
  2831. // This
  2832. // field has been deprecated and replaced by the name field.
  2833. ProjectId string `json:"projectId,omitempty"`
  2834. // Update: A description of the update.
  2835. Update *ClusterUpdate `json:"update,omitempty"`
  2836. // Zone: Deprecated. The name of the Google Compute
  2837. // Engine
  2838. // [zone](/compute/docs/zones#available) in which the
  2839. // cluster
  2840. // resides.
  2841. // This field has been deprecated and replaced by the name field.
  2842. Zone string `json:"zone,omitempty"`
  2843. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2844. // unconditionally include in API requests. By default, fields with
  2845. // empty values are omitted from API requests. However, any non-pointer,
  2846. // non-interface field appearing in ForceSendFields will be sent to the
  2847. // server regardless of whether the field is empty or not. This may be
  2848. // used to include empty fields in Patch requests.
  2849. ForceSendFields []string `json:"-"`
  2850. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2851. // API requests with the JSON null value. By default, fields with empty
  2852. // values are omitted from API requests. However, any field with an
  2853. // empty value appearing in NullFields will be sent to the server as
  2854. // null. It is an error if a field in this list has a non-empty value.
  2855. // This may be used to include null fields in Patch requests.
  2856. NullFields []string `json:"-"`
  2857. }
  2858. func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) {
  2859. type NoMethod UpdateClusterRequest
  2860. raw := NoMethod(*s)
  2861. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2862. }
  2863. // UpdateMasterRequest: UpdateMasterRequest updates the master of the
  2864. // cluster.
  2865. type UpdateMasterRequest struct {
  2866. // ClusterId: Deprecated. The name of the cluster to upgrade.
  2867. // This field has been deprecated and replaced by the name field.
  2868. ClusterId string `json:"clusterId,omitempty"`
  2869. // MasterVersion: The Kubernetes version to change the master to.
  2870. //
  2871. // Users may specify either explicit versions offered by Kubernetes
  2872. // Engine or
  2873. // version aliases, which have the following behavior:
  2874. //
  2875. // - "latest": picks the highest valid Kubernetes version
  2876. // - "1.X": picks the highest valid patch+gke.N patch in the 1.X
  2877. // version
  2878. // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
  2879. // - "1.X.Y-gke.N": picks an explicit Kubernetes version
  2880. // - "-": picks the default Kubernetes version
  2881. MasterVersion string `json:"masterVersion,omitempty"`
  2882. // Name: The name (project, location, cluster) of the cluster to
  2883. // update.
  2884. // Specified in the format 'projects/*/locations/*/clusters/*'.
  2885. Name string `json:"name,omitempty"`
  2886. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2887. // project
  2888. // number](https://support.google.com/cloud/answer/6158840).
  2889. // This
  2890. // field has been deprecated and replaced by the name field.
  2891. ProjectId string `json:"projectId,omitempty"`
  2892. // Zone: Deprecated. The name of the Google Compute
  2893. // Engine
  2894. // [zone](/compute/docs/zones#available) in which the
  2895. // cluster
  2896. // resides.
  2897. // This field has been deprecated and replaced by the name field.
  2898. Zone string `json:"zone,omitempty"`
  2899. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2900. // unconditionally include in API requests. By default, fields with
  2901. // empty values are omitted from API requests. However, any non-pointer,
  2902. // non-interface field appearing in ForceSendFields will be sent to the
  2903. // server regardless of whether the field is empty or not. This may be
  2904. // used to include empty fields in Patch requests.
  2905. ForceSendFields []string `json:"-"`
  2906. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2907. // API requests with the JSON null value. By default, fields with empty
  2908. // values are omitted from API requests. However, any field with an
  2909. // empty value appearing in NullFields will be sent to the server as
  2910. // null. It is an error if a field in this list has a non-empty value.
  2911. // This may be used to include null fields in Patch requests.
  2912. NullFields []string `json:"-"`
  2913. }
  2914. func (s *UpdateMasterRequest) MarshalJSON() ([]byte, error) {
  2915. type NoMethod UpdateMasterRequest
  2916. raw := NoMethod(*s)
  2917. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2918. }
  2919. // UpdateNodePoolRequest: UpdateNodePoolRequests update a node pool's
  2920. // image and/or version.
  2921. type UpdateNodePoolRequest struct {
  2922. // ClusterId: Deprecated. The name of the cluster to upgrade.
  2923. // This field has been deprecated and replaced by the name field.
  2924. ClusterId string `json:"clusterId,omitempty"`
  2925. // ImageType: The desired image type for the node pool.
  2926. ImageType string `json:"imageType,omitempty"`
  2927. // Name: The name (project, location, cluster, node pool) of the node
  2928. // pool to
  2929. // update. Specified in the
  2930. // format
  2931. // 'projects/*/locations/*/clusters/*/nodePools/*'.
  2932. Name string `json:"name,omitempty"`
  2933. // NodePoolId: Deprecated. The name of the node pool to upgrade.
  2934. // This field has been deprecated and replaced by the name field.
  2935. NodePoolId string `json:"nodePoolId,omitempty"`
  2936. // NodeVersion: The Kubernetes version to change the nodes to (typically
  2937. // an
  2938. // upgrade).
  2939. //
  2940. // Users may specify either explicit versions offered by Kubernetes
  2941. // Engine or
  2942. // version aliases, which have the following behavior:
  2943. //
  2944. // - "latest": picks the highest valid Kubernetes version
  2945. // - "1.X": picks the highest valid patch+gke.N patch in the 1.X
  2946. // version
  2947. // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
  2948. // - "1.X.Y-gke.N": picks an explicit Kubernetes version
  2949. // - "-": picks the Kubernetes master version
  2950. NodeVersion string `json:"nodeVersion,omitempty"`
  2951. // ProjectId: Deprecated. The Google Developers Console [project ID or
  2952. // project
  2953. // number](https://support.google.com/cloud/answer/6158840).
  2954. // This
  2955. // field has been deprecated and replaced by the name field.
  2956. ProjectId string `json:"projectId,omitempty"`
  2957. // Zone: Deprecated. The name of the Google Compute
  2958. // Engine
  2959. // [zone](/compute/docs/zones#available) in which the
  2960. // cluster
  2961. // resides.
  2962. // This field has been deprecated and replaced by the name field.
  2963. Zone string `json:"zone,omitempty"`
  2964. // ForceSendFields is a list of field names (e.g. "ClusterId") to
  2965. // unconditionally include in API requests. By default, fields with
  2966. // empty values are omitted from API requests. However, any non-pointer,
  2967. // non-interface field appearing in ForceSendFields will be sent to the
  2968. // server regardless of whether the field is empty or not. This may be
  2969. // used to include empty fields in Patch requests.
  2970. ForceSendFields []string `json:"-"`
  2971. // NullFields is a list of field names (e.g. "ClusterId") to include in
  2972. // API requests with the JSON null value. By default, fields with empty
  2973. // values are omitted from API requests. However, any field with an
  2974. // empty value appearing in NullFields will be sent to the server as
  2975. // null. It is an error if a field in this list has a non-empty value.
  2976. // This may be used to include null fields in Patch requests.
  2977. NullFields []string `json:"-"`
  2978. }
  2979. func (s *UpdateNodePoolRequest) MarshalJSON() ([]byte, error) {
  2980. type NoMethod UpdateNodePoolRequest
  2981. raw := NoMethod(*s)
  2982. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2983. }
  2984. // method id "container.projects.locations.getServerConfig":
  2985. type ProjectsLocationsGetServerConfigCall struct {
  2986. s *Service
  2987. name string
  2988. urlParams_ gensupport.URLParams
  2989. ifNoneMatch_ string
  2990. ctx_ context.Context
  2991. header_ http.Header
  2992. }
  2993. // GetServerConfig: Returns configuration info about the Kubernetes
  2994. // Engine service.
  2995. func (r *ProjectsLocationsService) GetServerConfig(name string) *ProjectsLocationsGetServerConfigCall {
  2996. c := &ProjectsLocationsGetServerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2997. c.name = name
  2998. return c
  2999. }
  3000. // ProjectId sets the optional parameter "projectId": Deprecated. The
  3001. // Google Developers Console [project ID or
  3002. // project
  3003. // number](https://support.google.com/cloud/answer/6158840).
  3004. // This
  3005. // field has been deprecated and replaced by the name field.
  3006. func (c *ProjectsLocationsGetServerConfigCall) ProjectId(projectId string) *ProjectsLocationsGetServerConfigCall {
  3007. c.urlParams_.Set("projectId", projectId)
  3008. return c
  3009. }
  3010. // Zone sets the optional parameter "zone": Deprecated. The name of the
  3011. // Google Compute Engine
  3012. // [zone](/compute/docs/zones#available) to return operations for.
  3013. // This field has been deprecated and replaced by the name field.
  3014. func (c *ProjectsLocationsGetServerConfigCall) Zone(zone string) *ProjectsLocationsGetServerConfigCall {
  3015. c.urlParams_.Set("zone", zone)
  3016. return c
  3017. }
  3018. // Fields allows partial responses to be retrieved. See
  3019. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3020. // for more information.
  3021. func (c *ProjectsLocationsGetServerConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetServerConfigCall {
  3022. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3023. return c
  3024. }
  3025. // IfNoneMatch sets the optional parameter which makes the operation
  3026. // fail if the object's ETag matches the given value. This is useful for
  3027. // getting updates only after the object has changed since the last
  3028. // request. Use googleapi.IsNotModified to check whether the response
  3029. // error from Do is the result of In-None-Match.
  3030. func (c *ProjectsLocationsGetServerConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetServerConfigCall {
  3031. c.ifNoneMatch_ = entityTag
  3032. return c
  3033. }
  3034. // Context sets the context to be used in this call's Do method. Any
  3035. // pending HTTP request will be aborted if the provided context is
  3036. // canceled.
  3037. func (c *ProjectsLocationsGetServerConfigCall) Context(ctx context.Context) *ProjectsLocationsGetServerConfigCall {
  3038. c.ctx_ = ctx
  3039. return c
  3040. }
  3041. // Header returns an http.Header that can be modified by the caller to
  3042. // add HTTP headers to the request.
  3043. func (c *ProjectsLocationsGetServerConfigCall) Header() http.Header {
  3044. if c.header_ == nil {
  3045. c.header_ = make(http.Header)
  3046. }
  3047. return c.header_
  3048. }
  3049. func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Response, error) {
  3050. reqHeaders := make(http.Header)
  3051. for k, v := range c.header_ {
  3052. reqHeaders[k] = v
  3053. }
  3054. reqHeaders.Set("User-Agent", c.s.userAgent())
  3055. if c.ifNoneMatch_ != "" {
  3056. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3057. }
  3058. var body io.Reader = nil
  3059. c.urlParams_.Set("alt", alt)
  3060. c.urlParams_.Set("prettyPrint", "false")
  3061. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/serverConfig")
  3062. urls += "?" + c.urlParams_.Encode()
  3063. req, err := http.NewRequest("GET", urls, body)
  3064. if err != nil {
  3065. return nil, err
  3066. }
  3067. req.Header = reqHeaders
  3068. googleapi.Expand(req.URL, map[string]string{
  3069. "name": c.name,
  3070. })
  3071. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3072. }
  3073. // Do executes the "container.projects.locations.getServerConfig" call.
  3074. // Exactly one of *ServerConfig or error will be non-nil. Any non-2xx
  3075. // status code is an error. Response headers are in either
  3076. // *ServerConfig.ServerResponse.Header or (if a response was returned at
  3077. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3078. // to check whether the returned error was because
  3079. // http.StatusNotModified was returned.
  3080. func (c *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, error) {
  3081. gensupport.SetOptions(c.urlParams_, opts...)
  3082. res, err := c.doRequest("json")
  3083. if res != nil && res.StatusCode == http.StatusNotModified {
  3084. if res.Body != nil {
  3085. res.Body.Close()
  3086. }
  3087. return nil, &googleapi.Error{
  3088. Code: res.StatusCode,
  3089. Header: res.Header,
  3090. }
  3091. }
  3092. if err != nil {
  3093. return nil, err
  3094. }
  3095. defer googleapi.CloseBody(res)
  3096. if err := googleapi.CheckResponse(res); err != nil {
  3097. return nil, err
  3098. }
  3099. ret := &ServerConfig{
  3100. ServerResponse: googleapi.ServerResponse{
  3101. Header: res.Header,
  3102. HTTPStatusCode: res.StatusCode,
  3103. },
  3104. }
  3105. target := &ret
  3106. if err := gensupport.DecodeResponse(target, res); err != nil {
  3107. return nil, err
  3108. }
  3109. return ret, nil
  3110. // {
  3111. // "description": "Returns configuration info about the Kubernetes Engine service.",
  3112. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverConfig",
  3113. // "httpMethod": "GET",
  3114. // "id": "container.projects.locations.getServerConfig",
  3115. // "parameterOrder": [
  3116. // "name"
  3117. // ],
  3118. // "parameters": {
  3119. // "name": {
  3120. // "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.",
  3121. // "location": "path",
  3122. // "pattern": "^projects/[^/]+/locations/[^/]+$",
  3123. // "required": true,
  3124. // "type": "string"
  3125. // },
  3126. // "projectId": {
  3127. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  3128. // "location": "query",
  3129. // "type": "string"
  3130. // },
  3131. // "zone": {
  3132. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.",
  3133. // "location": "query",
  3134. // "type": "string"
  3135. // }
  3136. // },
  3137. // "path": "v1/{+name}/serverConfig",
  3138. // "response": {
  3139. // "$ref": "ServerConfig"
  3140. // },
  3141. // "scopes": [
  3142. // "https://www.googleapis.com/auth/cloud-platform"
  3143. // ]
  3144. // }
  3145. }
  3146. // method id "container.projects.locations.clusters.completeIpRotation":
  3147. type ProjectsLocationsClustersCompleteIpRotationCall struct {
  3148. s *Service
  3149. name string
  3150. completeiprotationrequest *CompleteIPRotationRequest
  3151. urlParams_ gensupport.URLParams
  3152. ctx_ context.Context
  3153. header_ http.Header
  3154. }
  3155. // CompleteIpRotation: Completes master IP rotation.
  3156. func (r *ProjectsLocationsClustersService) CompleteIpRotation(name string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsLocationsClustersCompleteIpRotationCall {
  3157. c := &ProjectsLocationsClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3158. c.name = name
  3159. c.completeiprotationrequest = completeiprotationrequest
  3160. return c
  3161. }
  3162. // Fields allows partial responses to be retrieved. See
  3163. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3164. // for more information.
  3165. func (c *ProjectsLocationsClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCompleteIpRotationCall {
  3166. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3167. return c
  3168. }
  3169. // Context sets the context to be used in this call's Do method. Any
  3170. // pending HTTP request will be aborted if the provided context is
  3171. // canceled.
  3172. func (c *ProjectsLocationsClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersCompleteIpRotationCall {
  3173. c.ctx_ = ctx
  3174. return c
  3175. }
  3176. // Header returns an http.Header that can be modified by the caller to
  3177. // add HTTP headers to the request.
  3178. func (c *ProjectsLocationsClustersCompleteIpRotationCall) Header() http.Header {
  3179. if c.header_ == nil {
  3180. c.header_ = make(http.Header)
  3181. }
  3182. return c.header_
  3183. }
  3184. func (c *ProjectsLocationsClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) {
  3185. reqHeaders := make(http.Header)
  3186. for k, v := range c.header_ {
  3187. reqHeaders[k] = v
  3188. }
  3189. reqHeaders.Set("User-Agent", c.s.userAgent())
  3190. var body io.Reader = nil
  3191. body, err := googleapi.WithoutDataWrapper.JSONReader(c.completeiprotationrequest)
  3192. if err != nil {
  3193. return nil, err
  3194. }
  3195. reqHeaders.Set("Content-Type", "application/json")
  3196. c.urlParams_.Set("alt", alt)
  3197. c.urlParams_.Set("prettyPrint", "false")
  3198. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:completeIpRotation")
  3199. urls += "?" + c.urlParams_.Encode()
  3200. req, err := http.NewRequest("POST", urls, body)
  3201. if err != nil {
  3202. return nil, err
  3203. }
  3204. req.Header = reqHeaders
  3205. googleapi.Expand(req.URL, map[string]string{
  3206. "name": c.name,
  3207. })
  3208. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3209. }
  3210. // Do executes the "container.projects.locations.clusters.completeIpRotation" call.
  3211. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3212. // status code is an error. Response headers are in either
  3213. // *Operation.ServerResponse.Header or (if a response was returned at
  3214. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3215. // to check whether the returned error was because
  3216. // http.StatusNotModified was returned.
  3217. func (c *ProjectsLocationsClustersCompleteIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3218. gensupport.SetOptions(c.urlParams_, opts...)
  3219. res, err := c.doRequest("json")
  3220. if res != nil && res.StatusCode == http.StatusNotModified {
  3221. if res.Body != nil {
  3222. res.Body.Close()
  3223. }
  3224. return nil, &googleapi.Error{
  3225. Code: res.StatusCode,
  3226. Header: res.Header,
  3227. }
  3228. }
  3229. if err != nil {
  3230. return nil, err
  3231. }
  3232. defer googleapi.CloseBody(res)
  3233. if err := googleapi.CheckResponse(res); err != nil {
  3234. return nil, err
  3235. }
  3236. ret := &Operation{
  3237. ServerResponse: googleapi.ServerResponse{
  3238. Header: res.Header,
  3239. HTTPStatusCode: res.StatusCode,
  3240. },
  3241. }
  3242. target := &ret
  3243. if err := gensupport.DecodeResponse(target, res); err != nil {
  3244. return nil, err
  3245. }
  3246. return ret, nil
  3247. // {
  3248. // "description": "Completes master IP rotation.",
  3249. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:completeIpRotation",
  3250. // "httpMethod": "POST",
  3251. // "id": "container.projects.locations.clusters.completeIpRotation",
  3252. // "parameterOrder": [
  3253. // "name"
  3254. // ],
  3255. // "parameters": {
  3256. // "name": {
  3257. // "description": "The name (project, location, cluster id) of the cluster to complete IP\nrotation. Specified in the format 'projects/*/locations/*/clusters/*'.",
  3258. // "location": "path",
  3259. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  3260. // "required": true,
  3261. // "type": "string"
  3262. // }
  3263. // },
  3264. // "path": "v1/{+name}:completeIpRotation",
  3265. // "request": {
  3266. // "$ref": "CompleteIPRotationRequest"
  3267. // },
  3268. // "response": {
  3269. // "$ref": "Operation"
  3270. // },
  3271. // "scopes": [
  3272. // "https://www.googleapis.com/auth/cloud-platform"
  3273. // ]
  3274. // }
  3275. }
  3276. // method id "container.projects.locations.clusters.create":
  3277. type ProjectsLocationsClustersCreateCall struct {
  3278. s *Service
  3279. parent string
  3280. createclusterrequest *CreateClusterRequest
  3281. urlParams_ gensupport.URLParams
  3282. ctx_ context.Context
  3283. header_ http.Header
  3284. }
  3285. // Create: Creates a cluster, consisting of the specified number and
  3286. // type of Google
  3287. // Compute Engine instances.
  3288. //
  3289. // By default, the cluster is created in the project's
  3290. // [default
  3291. // network](/compute/docs/networks-and-firewalls#networks).
  3292. //
  3293. // One firewall is added for the cluster. After cluster creation,
  3294. // the cluster creates routes for each node to allow the containers
  3295. // on that node to communicate with all other instances in
  3296. // the
  3297. // cluster.
  3298. //
  3299. // Finally, an entry is added to the project's global metadata
  3300. // indicating
  3301. // which CIDR range is being used by the cluster.
  3302. func (r *ProjectsLocationsClustersService) Create(parent string, createclusterrequest *CreateClusterRequest) *ProjectsLocationsClustersCreateCall {
  3303. c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3304. c.parent = parent
  3305. c.createclusterrequest = createclusterrequest
  3306. return c
  3307. }
  3308. // Fields allows partial responses to be retrieved. See
  3309. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3310. // for more information.
  3311. func (c *ProjectsLocationsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreateCall {
  3312. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3313. return c
  3314. }
  3315. // Context sets the context to be used in this call's Do method. Any
  3316. // pending HTTP request will be aborted if the provided context is
  3317. // canceled.
  3318. func (c *ProjectsLocationsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersCreateCall {
  3319. c.ctx_ = ctx
  3320. return c
  3321. }
  3322. // Header returns an http.Header that can be modified by the caller to
  3323. // add HTTP headers to the request.
  3324. func (c *ProjectsLocationsClustersCreateCall) Header() http.Header {
  3325. if c.header_ == nil {
  3326. c.header_ = make(http.Header)
  3327. }
  3328. return c.header_
  3329. }
  3330. func (c *ProjectsLocationsClustersCreateCall) doRequest(alt string) (*http.Response, error) {
  3331. reqHeaders := make(http.Header)
  3332. for k, v := range c.header_ {
  3333. reqHeaders[k] = v
  3334. }
  3335. reqHeaders.Set("User-Agent", c.s.userAgent())
  3336. var body io.Reader = nil
  3337. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest)
  3338. if err != nil {
  3339. return nil, err
  3340. }
  3341. reqHeaders.Set("Content-Type", "application/json")
  3342. c.urlParams_.Set("alt", alt)
  3343. c.urlParams_.Set("prettyPrint", "false")
  3344. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clusters")
  3345. urls += "?" + c.urlParams_.Encode()
  3346. req, err := http.NewRequest("POST", urls, body)
  3347. if err != nil {
  3348. return nil, err
  3349. }
  3350. req.Header = reqHeaders
  3351. googleapi.Expand(req.URL, map[string]string{
  3352. "parent": c.parent,
  3353. })
  3354. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3355. }
  3356. // Do executes the "container.projects.locations.clusters.create" call.
  3357. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3358. // status code is an error. Response headers are in either
  3359. // *Operation.ServerResponse.Header or (if a response was returned at
  3360. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3361. // to check whether the returned error was because
  3362. // http.StatusNotModified was returned.
  3363. func (c *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3364. gensupport.SetOptions(c.urlParams_, opts...)
  3365. res, err := c.doRequest("json")
  3366. if res != nil && res.StatusCode == http.StatusNotModified {
  3367. if res.Body != nil {
  3368. res.Body.Close()
  3369. }
  3370. return nil, &googleapi.Error{
  3371. Code: res.StatusCode,
  3372. Header: res.Header,
  3373. }
  3374. }
  3375. if err != nil {
  3376. return nil, err
  3377. }
  3378. defer googleapi.CloseBody(res)
  3379. if err := googleapi.CheckResponse(res); err != nil {
  3380. return nil, err
  3381. }
  3382. ret := &Operation{
  3383. ServerResponse: googleapi.ServerResponse{
  3384. Header: res.Header,
  3385. HTTPStatusCode: res.StatusCode,
  3386. },
  3387. }
  3388. target := &ret
  3389. if err := gensupport.DecodeResponse(target, res); err != nil {
  3390. return nil, err
  3391. }
  3392. return ret, nil
  3393. // {
  3394. // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.",
  3395. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters",
  3396. // "httpMethod": "POST",
  3397. // "id": "container.projects.locations.clusters.create",
  3398. // "parameterOrder": [
  3399. // "parent"
  3400. // ],
  3401. // "parameters": {
  3402. // "parent": {
  3403. // "description": "The parent (project and location) where the cluster will be created.\nSpecified in the format 'projects/*/locations/*'.",
  3404. // "location": "path",
  3405. // "pattern": "^projects/[^/]+/locations/[^/]+$",
  3406. // "required": true,
  3407. // "type": "string"
  3408. // }
  3409. // },
  3410. // "path": "v1/{+parent}/clusters",
  3411. // "request": {
  3412. // "$ref": "CreateClusterRequest"
  3413. // },
  3414. // "response": {
  3415. // "$ref": "Operation"
  3416. // },
  3417. // "scopes": [
  3418. // "https://www.googleapis.com/auth/cloud-platform"
  3419. // ]
  3420. // }
  3421. }
  3422. // method id "container.projects.locations.clusters.delete":
  3423. type ProjectsLocationsClustersDeleteCall struct {
  3424. s *Service
  3425. name string
  3426. urlParams_ gensupport.URLParams
  3427. ctx_ context.Context
  3428. header_ http.Header
  3429. }
  3430. // Delete: Deletes the cluster, including the Kubernetes endpoint and
  3431. // all worker
  3432. // nodes.
  3433. //
  3434. // Firewalls and routes that were configured during cluster creation
  3435. // are also deleted.
  3436. //
  3437. // Other Google Compute Engine resources that might be in use by the
  3438. // cluster
  3439. // (e.g. load balancer resources) will not be deleted if they weren't
  3440. // present
  3441. // at the initial create time.
  3442. func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall {
  3443. c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3444. c.name = name
  3445. return c
  3446. }
  3447. // ClusterId sets the optional parameter "clusterId": Deprecated. The
  3448. // name of the cluster to delete.
  3449. // This field has been deprecated and replaced by the name field.
  3450. func (c *ProjectsLocationsClustersDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersDeleteCall {
  3451. c.urlParams_.Set("clusterId", clusterId)
  3452. return c
  3453. }
  3454. // ProjectId sets the optional parameter "projectId": Deprecated. The
  3455. // Google Developers Console [project ID or
  3456. // project
  3457. // number](https://support.google.com/cloud/answer/6158840).
  3458. // This
  3459. // field has been deprecated and replaced by the name field.
  3460. func (c *ProjectsLocationsClustersDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersDeleteCall {
  3461. c.urlParams_.Set("projectId", projectId)
  3462. return c
  3463. }
  3464. // Zone sets the optional parameter "zone": Deprecated. The name of the
  3465. // Google Compute Engine
  3466. // [zone](/compute/docs/zones#available) in which the
  3467. // cluster
  3468. // resides.
  3469. // This field has been deprecated and replaced by the name field.
  3470. func (c *ProjectsLocationsClustersDeleteCall) Zone(zone string) *ProjectsLocationsClustersDeleteCall {
  3471. c.urlParams_.Set("zone", zone)
  3472. return c
  3473. }
  3474. // Fields allows partial responses to be retrieved. See
  3475. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3476. // for more information.
  3477. func (c *ProjectsLocationsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersDeleteCall {
  3478. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3479. return c
  3480. }
  3481. // Context sets the context to be used in this call's Do method. Any
  3482. // pending HTTP request will be aborted if the provided context is
  3483. // canceled.
  3484. func (c *ProjectsLocationsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersDeleteCall {
  3485. c.ctx_ = ctx
  3486. return c
  3487. }
  3488. // Header returns an http.Header that can be modified by the caller to
  3489. // add HTTP headers to the request.
  3490. func (c *ProjectsLocationsClustersDeleteCall) Header() http.Header {
  3491. if c.header_ == nil {
  3492. c.header_ = make(http.Header)
  3493. }
  3494. return c.header_
  3495. }
  3496. func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
  3497. reqHeaders := make(http.Header)
  3498. for k, v := range c.header_ {
  3499. reqHeaders[k] = v
  3500. }
  3501. reqHeaders.Set("User-Agent", c.s.userAgent())
  3502. var body io.Reader = nil
  3503. c.urlParams_.Set("alt", alt)
  3504. c.urlParams_.Set("prettyPrint", "false")
  3505. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3506. urls += "?" + c.urlParams_.Encode()
  3507. req, err := http.NewRequest("DELETE", urls, body)
  3508. if err != nil {
  3509. return nil, err
  3510. }
  3511. req.Header = reqHeaders
  3512. googleapi.Expand(req.URL, map[string]string{
  3513. "name": c.name,
  3514. })
  3515. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3516. }
  3517. // Do executes the "container.projects.locations.clusters.delete" call.
  3518. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3519. // status code is an error. Response headers are in either
  3520. // *Operation.ServerResponse.Header or (if a response was returned at
  3521. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3522. // to check whether the returned error was because
  3523. // http.StatusNotModified was returned.
  3524. func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3525. gensupport.SetOptions(c.urlParams_, opts...)
  3526. res, err := c.doRequest("json")
  3527. if res != nil && res.StatusCode == http.StatusNotModified {
  3528. if res.Body != nil {
  3529. res.Body.Close()
  3530. }
  3531. return nil, &googleapi.Error{
  3532. Code: res.StatusCode,
  3533. Header: res.Header,
  3534. }
  3535. }
  3536. if err != nil {
  3537. return nil, err
  3538. }
  3539. defer googleapi.CloseBody(res)
  3540. if err := googleapi.CheckResponse(res); err != nil {
  3541. return nil, err
  3542. }
  3543. ret := &Operation{
  3544. ServerResponse: googleapi.ServerResponse{
  3545. Header: res.Header,
  3546. HTTPStatusCode: res.StatusCode,
  3547. },
  3548. }
  3549. target := &ret
  3550. if err := gensupport.DecodeResponse(target, res); err != nil {
  3551. return nil, err
  3552. }
  3553. return ret, nil
  3554. // {
  3555. // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.",
  3556. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}",
  3557. // "httpMethod": "DELETE",
  3558. // "id": "container.projects.locations.clusters.delete",
  3559. // "parameterOrder": [
  3560. // "name"
  3561. // ],
  3562. // "parameters": {
  3563. // "clusterId": {
  3564. // "description": "Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.",
  3565. // "location": "query",
  3566. // "type": "string"
  3567. // },
  3568. // "name": {
  3569. // "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  3570. // "location": "path",
  3571. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  3572. // "required": true,
  3573. // "type": "string"
  3574. // },
  3575. // "projectId": {
  3576. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  3577. // "location": "query",
  3578. // "type": "string"
  3579. // },
  3580. // "zone": {
  3581. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  3582. // "location": "query",
  3583. // "type": "string"
  3584. // }
  3585. // },
  3586. // "path": "v1/{+name}",
  3587. // "response": {
  3588. // "$ref": "Operation"
  3589. // },
  3590. // "scopes": [
  3591. // "https://www.googleapis.com/auth/cloud-platform"
  3592. // ]
  3593. // }
  3594. }
  3595. // method id "container.projects.locations.clusters.get":
  3596. type ProjectsLocationsClustersGetCall struct {
  3597. s *Service
  3598. name string
  3599. urlParams_ gensupport.URLParams
  3600. ifNoneMatch_ string
  3601. ctx_ context.Context
  3602. header_ http.Header
  3603. }
  3604. // Get: Gets the details of a specific cluster.
  3605. func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsClustersGetCall {
  3606. c := &ProjectsLocationsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3607. c.name = name
  3608. return c
  3609. }
  3610. // ClusterId sets the optional parameter "clusterId": Deprecated. The
  3611. // name of the cluster to retrieve.
  3612. // This field has been deprecated and replaced by the name field.
  3613. func (c *ProjectsLocationsClustersGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersGetCall {
  3614. c.urlParams_.Set("clusterId", clusterId)
  3615. return c
  3616. }
  3617. // ProjectId sets the optional parameter "projectId": Deprecated. The
  3618. // Google Developers Console [project ID or
  3619. // project
  3620. // number](https://support.google.com/cloud/answer/6158840).
  3621. // This
  3622. // field has been deprecated and replaced by the name field.
  3623. func (c *ProjectsLocationsClustersGetCall) ProjectId(projectId string) *ProjectsLocationsClustersGetCall {
  3624. c.urlParams_.Set("projectId", projectId)
  3625. return c
  3626. }
  3627. // Zone sets the optional parameter "zone": Deprecated. The name of the
  3628. // Google Compute Engine
  3629. // [zone](/compute/docs/zones#available) in which the
  3630. // cluster
  3631. // resides.
  3632. // This field has been deprecated and replaced by the name field.
  3633. func (c *ProjectsLocationsClustersGetCall) Zone(zone string) *ProjectsLocationsClustersGetCall {
  3634. c.urlParams_.Set("zone", zone)
  3635. return c
  3636. }
  3637. // Fields allows partial responses to be retrieved. See
  3638. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3639. // for more information.
  3640. func (c *ProjectsLocationsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCall {
  3641. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3642. return c
  3643. }
  3644. // IfNoneMatch sets the optional parameter which makes the operation
  3645. // fail if the object's ETag matches the given value. This is useful for
  3646. // getting updates only after the object has changed since the last
  3647. // request. Use googleapi.IsNotModified to check whether the response
  3648. // error from Do is the result of In-None-Match.
  3649. func (c *ProjectsLocationsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCall {
  3650. c.ifNoneMatch_ = entityTag
  3651. return c
  3652. }
  3653. // Context sets the context to be used in this call's Do method. Any
  3654. // pending HTTP request will be aborted if the provided context is
  3655. // canceled.
  3656. func (c *ProjectsLocationsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCall {
  3657. c.ctx_ = ctx
  3658. return c
  3659. }
  3660. // Header returns an http.Header that can be modified by the caller to
  3661. // add HTTP headers to the request.
  3662. func (c *ProjectsLocationsClustersGetCall) Header() http.Header {
  3663. if c.header_ == nil {
  3664. c.header_ = make(http.Header)
  3665. }
  3666. return c.header_
  3667. }
  3668. func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response, error) {
  3669. reqHeaders := make(http.Header)
  3670. for k, v := range c.header_ {
  3671. reqHeaders[k] = v
  3672. }
  3673. reqHeaders.Set("User-Agent", c.s.userAgent())
  3674. if c.ifNoneMatch_ != "" {
  3675. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3676. }
  3677. var body io.Reader = nil
  3678. c.urlParams_.Set("alt", alt)
  3679. c.urlParams_.Set("prettyPrint", "false")
  3680. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3681. urls += "?" + c.urlParams_.Encode()
  3682. req, err := http.NewRequest("GET", urls, body)
  3683. if err != nil {
  3684. return nil, err
  3685. }
  3686. req.Header = reqHeaders
  3687. googleapi.Expand(req.URL, map[string]string{
  3688. "name": c.name,
  3689. })
  3690. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3691. }
  3692. // Do executes the "container.projects.locations.clusters.get" call.
  3693. // Exactly one of *Cluster or error will be non-nil. Any non-2xx status
  3694. // code is an error. Response headers are in either
  3695. // *Cluster.ServerResponse.Header or (if a response was returned at all)
  3696. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3697. // check whether the returned error was because http.StatusNotModified
  3698. // was returned.
  3699. func (c *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) {
  3700. gensupport.SetOptions(c.urlParams_, opts...)
  3701. res, err := c.doRequest("json")
  3702. if res != nil && res.StatusCode == http.StatusNotModified {
  3703. if res.Body != nil {
  3704. res.Body.Close()
  3705. }
  3706. return nil, &googleapi.Error{
  3707. Code: res.StatusCode,
  3708. Header: res.Header,
  3709. }
  3710. }
  3711. if err != nil {
  3712. return nil, err
  3713. }
  3714. defer googleapi.CloseBody(res)
  3715. if err := googleapi.CheckResponse(res); err != nil {
  3716. return nil, err
  3717. }
  3718. ret := &Cluster{
  3719. ServerResponse: googleapi.ServerResponse{
  3720. Header: res.Header,
  3721. HTTPStatusCode: res.StatusCode,
  3722. },
  3723. }
  3724. target := &ret
  3725. if err := gensupport.DecodeResponse(target, res); err != nil {
  3726. return nil, err
  3727. }
  3728. return ret, nil
  3729. // {
  3730. // "description": "Gets the details of a specific cluster.",
  3731. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}",
  3732. // "httpMethod": "GET",
  3733. // "id": "container.projects.locations.clusters.get",
  3734. // "parameterOrder": [
  3735. // "name"
  3736. // ],
  3737. // "parameters": {
  3738. // "clusterId": {
  3739. // "description": "Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.",
  3740. // "location": "query",
  3741. // "type": "string"
  3742. // },
  3743. // "name": {
  3744. // "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  3745. // "location": "path",
  3746. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  3747. // "required": true,
  3748. // "type": "string"
  3749. // },
  3750. // "projectId": {
  3751. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  3752. // "location": "query",
  3753. // "type": "string"
  3754. // },
  3755. // "zone": {
  3756. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  3757. // "location": "query",
  3758. // "type": "string"
  3759. // }
  3760. // },
  3761. // "path": "v1/{+name}",
  3762. // "response": {
  3763. // "$ref": "Cluster"
  3764. // },
  3765. // "scopes": [
  3766. // "https://www.googleapis.com/auth/cloud-platform"
  3767. // ]
  3768. // }
  3769. }
  3770. // method id "container.projects.locations.clusters.list":
  3771. type ProjectsLocationsClustersListCall struct {
  3772. s *Service
  3773. parent string
  3774. urlParams_ gensupport.URLParams
  3775. ifNoneMatch_ string
  3776. ctx_ context.Context
  3777. header_ http.Header
  3778. }
  3779. // List: Lists all clusters owned by a project in either the specified
  3780. // zone or all
  3781. // zones.
  3782. func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocationsClustersListCall {
  3783. c := &ProjectsLocationsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3784. c.parent = parent
  3785. return c
  3786. }
  3787. // ProjectId sets the optional parameter "projectId": Deprecated. The
  3788. // Google Developers Console [project ID or
  3789. // project
  3790. // number](https://support.google.com/cloud/answer/6158840).
  3791. // This
  3792. // field has been deprecated and replaced by the parent field.
  3793. func (c *ProjectsLocationsClustersListCall) ProjectId(projectId string) *ProjectsLocationsClustersListCall {
  3794. c.urlParams_.Set("projectId", projectId)
  3795. return c
  3796. }
  3797. // Zone sets the optional parameter "zone": Deprecated. The name of the
  3798. // Google Compute Engine
  3799. // [zone](/compute/docs/zones#available) in which the cluster
  3800. // resides, or "-" for all zones.
  3801. // This field has been deprecated and replaced by the parent field.
  3802. func (c *ProjectsLocationsClustersListCall) Zone(zone string) *ProjectsLocationsClustersListCall {
  3803. c.urlParams_.Set("zone", zone)
  3804. return c
  3805. }
  3806. // Fields allows partial responses to be retrieved. See
  3807. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3808. // for more information.
  3809. func (c *ProjectsLocationsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersListCall {
  3810. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3811. return c
  3812. }
  3813. // IfNoneMatch sets the optional parameter which makes the operation
  3814. // fail if the object's ETag matches the given value. This is useful for
  3815. // getting updates only after the object has changed since the last
  3816. // request. Use googleapi.IsNotModified to check whether the response
  3817. // error from Do is the result of In-None-Match.
  3818. func (c *ProjectsLocationsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersListCall {
  3819. c.ifNoneMatch_ = entityTag
  3820. return c
  3821. }
  3822. // Context sets the context to be used in this call's Do method. Any
  3823. // pending HTTP request will be aborted if the provided context is
  3824. // canceled.
  3825. func (c *ProjectsLocationsClustersListCall) Context(ctx context.Context) *ProjectsLocationsClustersListCall {
  3826. c.ctx_ = ctx
  3827. return c
  3828. }
  3829. // Header returns an http.Header that can be modified by the caller to
  3830. // add HTTP headers to the request.
  3831. func (c *ProjectsLocationsClustersListCall) Header() http.Header {
  3832. if c.header_ == nil {
  3833. c.header_ = make(http.Header)
  3834. }
  3835. return c.header_
  3836. }
  3837. func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Response, error) {
  3838. reqHeaders := make(http.Header)
  3839. for k, v := range c.header_ {
  3840. reqHeaders[k] = v
  3841. }
  3842. reqHeaders.Set("User-Agent", c.s.userAgent())
  3843. if c.ifNoneMatch_ != "" {
  3844. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3845. }
  3846. var body io.Reader = nil
  3847. c.urlParams_.Set("alt", alt)
  3848. c.urlParams_.Set("prettyPrint", "false")
  3849. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clusters")
  3850. urls += "?" + c.urlParams_.Encode()
  3851. req, err := http.NewRequest("GET", urls, body)
  3852. if err != nil {
  3853. return nil, err
  3854. }
  3855. req.Header = reqHeaders
  3856. googleapi.Expand(req.URL, map[string]string{
  3857. "parent": c.parent,
  3858. })
  3859. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3860. }
  3861. // Do executes the "container.projects.locations.clusters.list" call.
  3862. // Exactly one of *ListClustersResponse or error will be non-nil. Any
  3863. // non-2xx status code is an error. Response headers are in either
  3864. // *ListClustersResponse.ServerResponse.Header or (if a response was
  3865. // returned at all) in error.(*googleapi.Error).Header. Use
  3866. // googleapi.IsNotModified to check whether the returned error was
  3867. // because http.StatusNotModified was returned.
  3868. func (c *ProjectsLocationsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) {
  3869. gensupport.SetOptions(c.urlParams_, opts...)
  3870. res, err := c.doRequest("json")
  3871. if res != nil && res.StatusCode == http.StatusNotModified {
  3872. if res.Body != nil {
  3873. res.Body.Close()
  3874. }
  3875. return nil, &googleapi.Error{
  3876. Code: res.StatusCode,
  3877. Header: res.Header,
  3878. }
  3879. }
  3880. if err != nil {
  3881. return nil, err
  3882. }
  3883. defer googleapi.CloseBody(res)
  3884. if err := googleapi.CheckResponse(res); err != nil {
  3885. return nil, err
  3886. }
  3887. ret := &ListClustersResponse{
  3888. ServerResponse: googleapi.ServerResponse{
  3889. Header: res.Header,
  3890. HTTPStatusCode: res.StatusCode,
  3891. },
  3892. }
  3893. target := &ret
  3894. if err := gensupport.DecodeResponse(target, res); err != nil {
  3895. return nil, err
  3896. }
  3897. return ret, nil
  3898. // {
  3899. // "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.",
  3900. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters",
  3901. // "httpMethod": "GET",
  3902. // "id": "container.projects.locations.clusters.list",
  3903. // "parameterOrder": [
  3904. // "parent"
  3905. // ],
  3906. // "parameters": {
  3907. // "parent": {
  3908. // "description": "The parent (project and location) where the clusters will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.",
  3909. // "location": "path",
  3910. // "pattern": "^projects/[^/]+/locations/[^/]+$",
  3911. // "required": true,
  3912. // "type": "string"
  3913. // },
  3914. // "projectId": {
  3915. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.",
  3916. // "location": "query",
  3917. // "type": "string"
  3918. // },
  3919. // "zone": {
  3920. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.",
  3921. // "location": "query",
  3922. // "type": "string"
  3923. // }
  3924. // },
  3925. // "path": "v1/{+parent}/clusters",
  3926. // "response": {
  3927. // "$ref": "ListClustersResponse"
  3928. // },
  3929. // "scopes": [
  3930. // "https://www.googleapis.com/auth/cloud-platform"
  3931. // ]
  3932. // }
  3933. }
  3934. // method id "container.projects.locations.clusters.setAddons":
  3935. type ProjectsLocationsClustersSetAddonsCall struct {
  3936. s *Service
  3937. name string
  3938. setaddonsconfigrequest *SetAddonsConfigRequest
  3939. urlParams_ gensupport.URLParams
  3940. ctx_ context.Context
  3941. header_ http.Header
  3942. }
  3943. // SetAddons: Sets the addons for a specific cluster.
  3944. func (r *ProjectsLocationsClustersService) SetAddons(name string, setaddonsconfigrequest *SetAddonsConfigRequest) *ProjectsLocationsClustersSetAddonsCall {
  3945. c := &ProjectsLocationsClustersSetAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3946. c.name = name
  3947. c.setaddonsconfigrequest = setaddonsconfigrequest
  3948. return c
  3949. }
  3950. // Fields allows partial responses to be retrieved. See
  3951. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3952. // for more information.
  3953. func (c *ProjectsLocationsClustersSetAddonsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetAddonsCall {
  3954. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3955. return c
  3956. }
  3957. // Context sets the context to be used in this call's Do method. Any
  3958. // pending HTTP request will be aborted if the provided context is
  3959. // canceled.
  3960. func (c *ProjectsLocationsClustersSetAddonsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetAddonsCall {
  3961. c.ctx_ = ctx
  3962. return c
  3963. }
  3964. // Header returns an http.Header that can be modified by the caller to
  3965. // add HTTP headers to the request.
  3966. func (c *ProjectsLocationsClustersSetAddonsCall) Header() http.Header {
  3967. if c.header_ == nil {
  3968. c.header_ = make(http.Header)
  3969. }
  3970. return c.header_
  3971. }
  3972. func (c *ProjectsLocationsClustersSetAddonsCall) doRequest(alt string) (*http.Response, error) {
  3973. reqHeaders := make(http.Header)
  3974. for k, v := range c.header_ {
  3975. reqHeaders[k] = v
  3976. }
  3977. reqHeaders.Set("User-Agent", c.s.userAgent())
  3978. var body io.Reader = nil
  3979. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setaddonsconfigrequest)
  3980. if err != nil {
  3981. return nil, err
  3982. }
  3983. reqHeaders.Set("Content-Type", "application/json")
  3984. c.urlParams_.Set("alt", alt)
  3985. c.urlParams_.Set("prettyPrint", "false")
  3986. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setAddons")
  3987. urls += "?" + c.urlParams_.Encode()
  3988. req, err := http.NewRequest("POST", urls, body)
  3989. if err != nil {
  3990. return nil, err
  3991. }
  3992. req.Header = reqHeaders
  3993. googleapi.Expand(req.URL, map[string]string{
  3994. "name": c.name,
  3995. })
  3996. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3997. }
  3998. // Do executes the "container.projects.locations.clusters.setAddons" call.
  3999. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4000. // status code is an error. Response headers are in either
  4001. // *Operation.ServerResponse.Header or (if a response was returned at
  4002. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4003. // to check whether the returned error was because
  4004. // http.StatusNotModified was returned.
  4005. func (c *ProjectsLocationsClustersSetAddonsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4006. gensupport.SetOptions(c.urlParams_, opts...)
  4007. res, err := c.doRequest("json")
  4008. if res != nil && res.StatusCode == http.StatusNotModified {
  4009. if res.Body != nil {
  4010. res.Body.Close()
  4011. }
  4012. return nil, &googleapi.Error{
  4013. Code: res.StatusCode,
  4014. Header: res.Header,
  4015. }
  4016. }
  4017. if err != nil {
  4018. return nil, err
  4019. }
  4020. defer googleapi.CloseBody(res)
  4021. if err := googleapi.CheckResponse(res); err != nil {
  4022. return nil, err
  4023. }
  4024. ret := &Operation{
  4025. ServerResponse: googleapi.ServerResponse{
  4026. Header: res.Header,
  4027. HTTPStatusCode: res.StatusCode,
  4028. },
  4029. }
  4030. target := &ret
  4031. if err := gensupport.DecodeResponse(target, res); err != nil {
  4032. return nil, err
  4033. }
  4034. return ret, nil
  4035. // {
  4036. // "description": "Sets the addons for a specific cluster.",
  4037. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setAddons",
  4038. // "httpMethod": "POST",
  4039. // "id": "container.projects.locations.clusters.setAddons",
  4040. // "parameterOrder": [
  4041. // "name"
  4042. // ],
  4043. // "parameters": {
  4044. // "name": {
  4045. // "description": "The name (project, location, cluster) of the cluster to set addons.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  4046. // "location": "path",
  4047. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  4048. // "required": true,
  4049. // "type": "string"
  4050. // }
  4051. // },
  4052. // "path": "v1/{+name}:setAddons",
  4053. // "request": {
  4054. // "$ref": "SetAddonsConfigRequest"
  4055. // },
  4056. // "response": {
  4057. // "$ref": "Operation"
  4058. // },
  4059. // "scopes": [
  4060. // "https://www.googleapis.com/auth/cloud-platform"
  4061. // ]
  4062. // }
  4063. }
  4064. // method id "container.projects.locations.clusters.setLegacyAbac":
  4065. type ProjectsLocationsClustersSetLegacyAbacCall struct {
  4066. s *Service
  4067. name string
  4068. setlegacyabacrequest *SetLegacyAbacRequest
  4069. urlParams_ gensupport.URLParams
  4070. ctx_ context.Context
  4071. header_ http.Header
  4072. }
  4073. // SetLegacyAbac: Enables or disables the ABAC authorization mechanism
  4074. // on a cluster.
  4075. func (r *ProjectsLocationsClustersService) SetLegacyAbac(name string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsLocationsClustersSetLegacyAbacCall {
  4076. c := &ProjectsLocationsClustersSetLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4077. c.name = name
  4078. c.setlegacyabacrequest = setlegacyabacrequest
  4079. return c
  4080. }
  4081. // Fields allows partial responses to be retrieved. See
  4082. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4083. // for more information.
  4084. func (c *ProjectsLocationsClustersSetLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLegacyAbacCall {
  4085. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4086. return c
  4087. }
  4088. // Context sets the context to be used in this call's Do method. Any
  4089. // pending HTTP request will be aborted if the provided context is
  4090. // canceled.
  4091. func (c *ProjectsLocationsClustersSetLegacyAbacCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLegacyAbacCall {
  4092. c.ctx_ = ctx
  4093. return c
  4094. }
  4095. // Header returns an http.Header that can be modified by the caller to
  4096. // add HTTP headers to the request.
  4097. func (c *ProjectsLocationsClustersSetLegacyAbacCall) Header() http.Header {
  4098. if c.header_ == nil {
  4099. c.header_ = make(http.Header)
  4100. }
  4101. return c.header_
  4102. }
  4103. func (c *ProjectsLocationsClustersSetLegacyAbacCall) doRequest(alt string) (*http.Response, error) {
  4104. reqHeaders := make(http.Header)
  4105. for k, v := range c.header_ {
  4106. reqHeaders[k] = v
  4107. }
  4108. reqHeaders.Set("User-Agent", c.s.userAgent())
  4109. var body io.Reader = nil
  4110. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlegacyabacrequest)
  4111. if err != nil {
  4112. return nil, err
  4113. }
  4114. reqHeaders.Set("Content-Type", "application/json")
  4115. c.urlParams_.Set("alt", alt)
  4116. c.urlParams_.Set("prettyPrint", "false")
  4117. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setLegacyAbac")
  4118. urls += "?" + c.urlParams_.Encode()
  4119. req, err := http.NewRequest("POST", urls, body)
  4120. if err != nil {
  4121. return nil, err
  4122. }
  4123. req.Header = reqHeaders
  4124. googleapi.Expand(req.URL, map[string]string{
  4125. "name": c.name,
  4126. })
  4127. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4128. }
  4129. // Do executes the "container.projects.locations.clusters.setLegacyAbac" call.
  4130. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4131. // status code is an error. Response headers are in either
  4132. // *Operation.ServerResponse.Header or (if a response was returned at
  4133. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4134. // to check whether the returned error was because
  4135. // http.StatusNotModified was returned.
  4136. func (c *ProjectsLocationsClustersSetLegacyAbacCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4137. gensupport.SetOptions(c.urlParams_, opts...)
  4138. res, err := c.doRequest("json")
  4139. if res != nil && res.StatusCode == http.StatusNotModified {
  4140. if res.Body != nil {
  4141. res.Body.Close()
  4142. }
  4143. return nil, &googleapi.Error{
  4144. Code: res.StatusCode,
  4145. Header: res.Header,
  4146. }
  4147. }
  4148. if err != nil {
  4149. return nil, err
  4150. }
  4151. defer googleapi.CloseBody(res)
  4152. if err := googleapi.CheckResponse(res); err != nil {
  4153. return nil, err
  4154. }
  4155. ret := &Operation{
  4156. ServerResponse: googleapi.ServerResponse{
  4157. Header: res.Header,
  4158. HTTPStatusCode: res.StatusCode,
  4159. },
  4160. }
  4161. target := &ret
  4162. if err := gensupport.DecodeResponse(target, res); err != nil {
  4163. return nil, err
  4164. }
  4165. return ret, nil
  4166. // {
  4167. // "description": "Enables or disables the ABAC authorization mechanism on a cluster.",
  4168. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLegacyAbac",
  4169. // "httpMethod": "POST",
  4170. // "id": "container.projects.locations.clusters.setLegacyAbac",
  4171. // "parameterOrder": [
  4172. // "name"
  4173. // ],
  4174. // "parameters": {
  4175. // "name": {
  4176. // "description": "The name (project, location, cluster id) of the cluster to set legacy abac.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  4177. // "location": "path",
  4178. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  4179. // "required": true,
  4180. // "type": "string"
  4181. // }
  4182. // },
  4183. // "path": "v1/{+name}:setLegacyAbac",
  4184. // "request": {
  4185. // "$ref": "SetLegacyAbacRequest"
  4186. // },
  4187. // "response": {
  4188. // "$ref": "Operation"
  4189. // },
  4190. // "scopes": [
  4191. // "https://www.googleapis.com/auth/cloud-platform"
  4192. // ]
  4193. // }
  4194. }
  4195. // method id "container.projects.locations.clusters.setLocations":
  4196. type ProjectsLocationsClustersSetLocationsCall struct {
  4197. s *Service
  4198. name string
  4199. setlocationsrequest *SetLocationsRequest
  4200. urlParams_ gensupport.URLParams
  4201. ctx_ context.Context
  4202. header_ http.Header
  4203. }
  4204. // SetLocations: Sets the locations for a specific cluster.
  4205. func (r *ProjectsLocationsClustersService) SetLocations(name string, setlocationsrequest *SetLocationsRequest) *ProjectsLocationsClustersSetLocationsCall {
  4206. c := &ProjectsLocationsClustersSetLocationsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4207. c.name = name
  4208. c.setlocationsrequest = setlocationsrequest
  4209. return c
  4210. }
  4211. // Fields allows partial responses to be retrieved. See
  4212. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4213. // for more information.
  4214. func (c *ProjectsLocationsClustersSetLocationsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLocationsCall {
  4215. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4216. return c
  4217. }
  4218. // Context sets the context to be used in this call's Do method. Any
  4219. // pending HTTP request will be aborted if the provided context is
  4220. // canceled.
  4221. func (c *ProjectsLocationsClustersSetLocationsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLocationsCall {
  4222. c.ctx_ = ctx
  4223. return c
  4224. }
  4225. // Header returns an http.Header that can be modified by the caller to
  4226. // add HTTP headers to the request.
  4227. func (c *ProjectsLocationsClustersSetLocationsCall) Header() http.Header {
  4228. if c.header_ == nil {
  4229. c.header_ = make(http.Header)
  4230. }
  4231. return c.header_
  4232. }
  4233. func (c *ProjectsLocationsClustersSetLocationsCall) doRequest(alt string) (*http.Response, error) {
  4234. reqHeaders := make(http.Header)
  4235. for k, v := range c.header_ {
  4236. reqHeaders[k] = v
  4237. }
  4238. reqHeaders.Set("User-Agent", c.s.userAgent())
  4239. var body io.Reader = nil
  4240. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlocationsrequest)
  4241. if err != nil {
  4242. return nil, err
  4243. }
  4244. reqHeaders.Set("Content-Type", "application/json")
  4245. c.urlParams_.Set("alt", alt)
  4246. c.urlParams_.Set("prettyPrint", "false")
  4247. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setLocations")
  4248. urls += "?" + c.urlParams_.Encode()
  4249. req, err := http.NewRequest("POST", urls, body)
  4250. if err != nil {
  4251. return nil, err
  4252. }
  4253. req.Header = reqHeaders
  4254. googleapi.Expand(req.URL, map[string]string{
  4255. "name": c.name,
  4256. })
  4257. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4258. }
  4259. // Do executes the "container.projects.locations.clusters.setLocations" call.
  4260. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4261. // status code is an error. Response headers are in either
  4262. // *Operation.ServerResponse.Header or (if a response was returned at
  4263. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4264. // to check whether the returned error was because
  4265. // http.StatusNotModified was returned.
  4266. func (c *ProjectsLocationsClustersSetLocationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4267. gensupport.SetOptions(c.urlParams_, opts...)
  4268. res, err := c.doRequest("json")
  4269. if res != nil && res.StatusCode == http.StatusNotModified {
  4270. if res.Body != nil {
  4271. res.Body.Close()
  4272. }
  4273. return nil, &googleapi.Error{
  4274. Code: res.StatusCode,
  4275. Header: res.Header,
  4276. }
  4277. }
  4278. if err != nil {
  4279. return nil, err
  4280. }
  4281. defer googleapi.CloseBody(res)
  4282. if err := googleapi.CheckResponse(res); err != nil {
  4283. return nil, err
  4284. }
  4285. ret := &Operation{
  4286. ServerResponse: googleapi.ServerResponse{
  4287. Header: res.Header,
  4288. HTTPStatusCode: res.StatusCode,
  4289. },
  4290. }
  4291. target := &ret
  4292. if err := gensupport.DecodeResponse(target, res); err != nil {
  4293. return nil, err
  4294. }
  4295. return ret, nil
  4296. // {
  4297. // "description": "Sets the locations for a specific cluster.",
  4298. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLocations",
  4299. // "httpMethod": "POST",
  4300. // "id": "container.projects.locations.clusters.setLocations",
  4301. // "parameterOrder": [
  4302. // "name"
  4303. // ],
  4304. // "parameters": {
  4305. // "name": {
  4306. // "description": "The name (project, location, cluster) of the cluster to set locations.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  4307. // "location": "path",
  4308. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  4309. // "required": true,
  4310. // "type": "string"
  4311. // }
  4312. // },
  4313. // "path": "v1/{+name}:setLocations",
  4314. // "request": {
  4315. // "$ref": "SetLocationsRequest"
  4316. // },
  4317. // "response": {
  4318. // "$ref": "Operation"
  4319. // },
  4320. // "scopes": [
  4321. // "https://www.googleapis.com/auth/cloud-platform"
  4322. // ]
  4323. // }
  4324. }
  4325. // method id "container.projects.locations.clusters.setLogging":
  4326. type ProjectsLocationsClustersSetLoggingCall struct {
  4327. s *Service
  4328. name string
  4329. setloggingservicerequest *SetLoggingServiceRequest
  4330. urlParams_ gensupport.URLParams
  4331. ctx_ context.Context
  4332. header_ http.Header
  4333. }
  4334. // SetLogging: Sets the logging service for a specific cluster.
  4335. func (r *ProjectsLocationsClustersService) SetLogging(name string, setloggingservicerequest *SetLoggingServiceRequest) *ProjectsLocationsClustersSetLoggingCall {
  4336. c := &ProjectsLocationsClustersSetLoggingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4337. c.name = name
  4338. c.setloggingservicerequest = setloggingservicerequest
  4339. return c
  4340. }
  4341. // Fields allows partial responses to be retrieved. See
  4342. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4343. // for more information.
  4344. func (c *ProjectsLocationsClustersSetLoggingCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLoggingCall {
  4345. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4346. return c
  4347. }
  4348. // Context sets the context to be used in this call's Do method. Any
  4349. // pending HTTP request will be aborted if the provided context is
  4350. // canceled.
  4351. func (c *ProjectsLocationsClustersSetLoggingCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLoggingCall {
  4352. c.ctx_ = ctx
  4353. return c
  4354. }
  4355. // Header returns an http.Header that can be modified by the caller to
  4356. // add HTTP headers to the request.
  4357. func (c *ProjectsLocationsClustersSetLoggingCall) Header() http.Header {
  4358. if c.header_ == nil {
  4359. c.header_ = make(http.Header)
  4360. }
  4361. return c.header_
  4362. }
  4363. func (c *ProjectsLocationsClustersSetLoggingCall) doRequest(alt string) (*http.Response, error) {
  4364. reqHeaders := make(http.Header)
  4365. for k, v := range c.header_ {
  4366. reqHeaders[k] = v
  4367. }
  4368. reqHeaders.Set("User-Agent", c.s.userAgent())
  4369. var body io.Reader = nil
  4370. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setloggingservicerequest)
  4371. if err != nil {
  4372. return nil, err
  4373. }
  4374. reqHeaders.Set("Content-Type", "application/json")
  4375. c.urlParams_.Set("alt", alt)
  4376. c.urlParams_.Set("prettyPrint", "false")
  4377. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setLogging")
  4378. urls += "?" + c.urlParams_.Encode()
  4379. req, err := http.NewRequest("POST", urls, body)
  4380. if err != nil {
  4381. return nil, err
  4382. }
  4383. req.Header = reqHeaders
  4384. googleapi.Expand(req.URL, map[string]string{
  4385. "name": c.name,
  4386. })
  4387. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4388. }
  4389. // Do executes the "container.projects.locations.clusters.setLogging" call.
  4390. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4391. // status code is an error. Response headers are in either
  4392. // *Operation.ServerResponse.Header or (if a response was returned at
  4393. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4394. // to check whether the returned error was because
  4395. // http.StatusNotModified was returned.
  4396. func (c *ProjectsLocationsClustersSetLoggingCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4397. gensupport.SetOptions(c.urlParams_, opts...)
  4398. res, err := c.doRequest("json")
  4399. if res != nil && res.StatusCode == http.StatusNotModified {
  4400. if res.Body != nil {
  4401. res.Body.Close()
  4402. }
  4403. return nil, &googleapi.Error{
  4404. Code: res.StatusCode,
  4405. Header: res.Header,
  4406. }
  4407. }
  4408. if err != nil {
  4409. return nil, err
  4410. }
  4411. defer googleapi.CloseBody(res)
  4412. if err := googleapi.CheckResponse(res); err != nil {
  4413. return nil, err
  4414. }
  4415. ret := &Operation{
  4416. ServerResponse: googleapi.ServerResponse{
  4417. Header: res.Header,
  4418. HTTPStatusCode: res.StatusCode,
  4419. },
  4420. }
  4421. target := &ret
  4422. if err := gensupport.DecodeResponse(target, res); err != nil {
  4423. return nil, err
  4424. }
  4425. return ret, nil
  4426. // {
  4427. // "description": "Sets the logging service for a specific cluster.",
  4428. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLogging",
  4429. // "httpMethod": "POST",
  4430. // "id": "container.projects.locations.clusters.setLogging",
  4431. // "parameterOrder": [
  4432. // "name"
  4433. // ],
  4434. // "parameters": {
  4435. // "name": {
  4436. // "description": "The name (project, location, cluster) of the cluster to set logging.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  4437. // "location": "path",
  4438. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  4439. // "required": true,
  4440. // "type": "string"
  4441. // }
  4442. // },
  4443. // "path": "v1/{+name}:setLogging",
  4444. // "request": {
  4445. // "$ref": "SetLoggingServiceRequest"
  4446. // },
  4447. // "response": {
  4448. // "$ref": "Operation"
  4449. // },
  4450. // "scopes": [
  4451. // "https://www.googleapis.com/auth/cloud-platform"
  4452. // ]
  4453. // }
  4454. }
  4455. // method id "container.projects.locations.clusters.setMaintenancePolicy":
  4456. type ProjectsLocationsClustersSetMaintenancePolicyCall struct {
  4457. s *Service
  4458. name string
  4459. setmaintenancepolicyrequest *SetMaintenancePolicyRequest
  4460. urlParams_ gensupport.URLParams
  4461. ctx_ context.Context
  4462. header_ http.Header
  4463. }
  4464. // SetMaintenancePolicy: Sets the maintenance policy for a cluster.
  4465. func (r *ProjectsLocationsClustersService) SetMaintenancePolicy(name string, setmaintenancepolicyrequest *SetMaintenancePolicyRequest) *ProjectsLocationsClustersSetMaintenancePolicyCall {
  4466. c := &ProjectsLocationsClustersSetMaintenancePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4467. c.name = name
  4468. c.setmaintenancepolicyrequest = setmaintenancepolicyrequest
  4469. return c
  4470. }
  4471. // Fields allows partial responses to be retrieved. See
  4472. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4473. // for more information.
  4474. func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMaintenancePolicyCall {
  4475. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4476. return c
  4477. }
  4478. // Context sets the context to be used in this call's Do method. Any
  4479. // pending HTTP request will be aborted if the provided context is
  4480. // canceled.
  4481. func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMaintenancePolicyCall {
  4482. c.ctx_ = ctx
  4483. return c
  4484. }
  4485. // Header returns an http.Header that can be modified by the caller to
  4486. // add HTTP headers to the request.
  4487. func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Header() http.Header {
  4488. if c.header_ == nil {
  4489. c.header_ = make(http.Header)
  4490. }
  4491. return c.header_
  4492. }
  4493. func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) {
  4494. reqHeaders := make(http.Header)
  4495. for k, v := range c.header_ {
  4496. reqHeaders[k] = v
  4497. }
  4498. reqHeaders.Set("User-Agent", c.s.userAgent())
  4499. var body io.Reader = nil
  4500. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmaintenancepolicyrequest)
  4501. if err != nil {
  4502. return nil, err
  4503. }
  4504. reqHeaders.Set("Content-Type", "application/json")
  4505. c.urlParams_.Set("alt", alt)
  4506. c.urlParams_.Set("prettyPrint", "false")
  4507. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMaintenancePolicy")
  4508. urls += "?" + c.urlParams_.Encode()
  4509. req, err := http.NewRequest("POST", urls, body)
  4510. if err != nil {
  4511. return nil, err
  4512. }
  4513. req.Header = reqHeaders
  4514. googleapi.Expand(req.URL, map[string]string{
  4515. "name": c.name,
  4516. })
  4517. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4518. }
  4519. // Do executes the "container.projects.locations.clusters.setMaintenancePolicy" call.
  4520. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4521. // status code is an error. Response headers are in either
  4522. // *Operation.ServerResponse.Header or (if a response was returned at
  4523. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4524. // to check whether the returned error was because
  4525. // http.StatusNotModified was returned.
  4526. func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4527. gensupport.SetOptions(c.urlParams_, opts...)
  4528. res, err := c.doRequest("json")
  4529. if res != nil && res.StatusCode == http.StatusNotModified {
  4530. if res.Body != nil {
  4531. res.Body.Close()
  4532. }
  4533. return nil, &googleapi.Error{
  4534. Code: res.StatusCode,
  4535. Header: res.Header,
  4536. }
  4537. }
  4538. if err != nil {
  4539. return nil, err
  4540. }
  4541. defer googleapi.CloseBody(res)
  4542. if err := googleapi.CheckResponse(res); err != nil {
  4543. return nil, err
  4544. }
  4545. ret := &Operation{
  4546. ServerResponse: googleapi.ServerResponse{
  4547. Header: res.Header,
  4548. HTTPStatusCode: res.StatusCode,
  4549. },
  4550. }
  4551. target := &ret
  4552. if err := gensupport.DecodeResponse(target, res); err != nil {
  4553. return nil, err
  4554. }
  4555. return ret, nil
  4556. // {
  4557. // "description": "Sets the maintenance policy for a cluster.",
  4558. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMaintenancePolicy",
  4559. // "httpMethod": "POST",
  4560. // "id": "container.projects.locations.clusters.setMaintenancePolicy",
  4561. // "parameterOrder": [
  4562. // "name"
  4563. // ],
  4564. // "parameters": {
  4565. // "name": {
  4566. // "description": "The name (project, location, cluster id) of the cluster to set maintenance\npolicy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  4567. // "location": "path",
  4568. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  4569. // "required": true,
  4570. // "type": "string"
  4571. // }
  4572. // },
  4573. // "path": "v1/{+name}:setMaintenancePolicy",
  4574. // "request": {
  4575. // "$ref": "SetMaintenancePolicyRequest"
  4576. // },
  4577. // "response": {
  4578. // "$ref": "Operation"
  4579. // },
  4580. // "scopes": [
  4581. // "https://www.googleapis.com/auth/cloud-platform"
  4582. // ]
  4583. // }
  4584. }
  4585. // method id "container.projects.locations.clusters.setMasterAuth":
  4586. type ProjectsLocationsClustersSetMasterAuthCall struct {
  4587. s *Service
  4588. name string
  4589. setmasterauthrequest *SetMasterAuthRequest
  4590. urlParams_ gensupport.URLParams
  4591. ctx_ context.Context
  4592. header_ http.Header
  4593. }
  4594. // SetMasterAuth: Used to set master auth materials. Currently supports
  4595. // :-
  4596. // Changing the admin password for a specific cluster.
  4597. // This can be either via password generation or explicitly set the
  4598. // password.
  4599. func (r *ProjectsLocationsClustersService) SetMasterAuth(name string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsLocationsClustersSetMasterAuthCall {
  4600. c := &ProjectsLocationsClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4601. c.name = name
  4602. c.setmasterauthrequest = setmasterauthrequest
  4603. return c
  4604. }
  4605. // Fields allows partial responses to be retrieved. See
  4606. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4607. // for more information.
  4608. func (c *ProjectsLocationsClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMasterAuthCall {
  4609. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4610. return c
  4611. }
  4612. // Context sets the context to be used in this call's Do method. Any
  4613. // pending HTTP request will be aborted if the provided context is
  4614. // canceled.
  4615. func (c *ProjectsLocationsClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMasterAuthCall {
  4616. c.ctx_ = ctx
  4617. return c
  4618. }
  4619. // Header returns an http.Header that can be modified by the caller to
  4620. // add HTTP headers to the request.
  4621. func (c *ProjectsLocationsClustersSetMasterAuthCall) Header() http.Header {
  4622. if c.header_ == nil {
  4623. c.header_ = make(http.Header)
  4624. }
  4625. return c.header_
  4626. }
  4627. func (c *ProjectsLocationsClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) {
  4628. reqHeaders := make(http.Header)
  4629. for k, v := range c.header_ {
  4630. reqHeaders[k] = v
  4631. }
  4632. reqHeaders.Set("User-Agent", c.s.userAgent())
  4633. var body io.Reader = nil
  4634. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmasterauthrequest)
  4635. if err != nil {
  4636. return nil, err
  4637. }
  4638. reqHeaders.Set("Content-Type", "application/json")
  4639. c.urlParams_.Set("alt", alt)
  4640. c.urlParams_.Set("prettyPrint", "false")
  4641. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMasterAuth")
  4642. urls += "?" + c.urlParams_.Encode()
  4643. req, err := http.NewRequest("POST", urls, body)
  4644. if err != nil {
  4645. return nil, err
  4646. }
  4647. req.Header = reqHeaders
  4648. googleapi.Expand(req.URL, map[string]string{
  4649. "name": c.name,
  4650. })
  4651. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4652. }
  4653. // Do executes the "container.projects.locations.clusters.setMasterAuth" call.
  4654. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4655. // status code is an error. Response headers are in either
  4656. // *Operation.ServerResponse.Header or (if a response was returned at
  4657. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4658. // to check whether the returned error was because
  4659. // http.StatusNotModified was returned.
  4660. func (c *ProjectsLocationsClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4661. gensupport.SetOptions(c.urlParams_, opts...)
  4662. res, err := c.doRequest("json")
  4663. if res != nil && res.StatusCode == http.StatusNotModified {
  4664. if res.Body != nil {
  4665. res.Body.Close()
  4666. }
  4667. return nil, &googleapi.Error{
  4668. Code: res.StatusCode,
  4669. Header: res.Header,
  4670. }
  4671. }
  4672. if err != nil {
  4673. return nil, err
  4674. }
  4675. defer googleapi.CloseBody(res)
  4676. if err := googleapi.CheckResponse(res); err != nil {
  4677. return nil, err
  4678. }
  4679. ret := &Operation{
  4680. ServerResponse: googleapi.ServerResponse{
  4681. Header: res.Header,
  4682. HTTPStatusCode: res.StatusCode,
  4683. },
  4684. }
  4685. target := &ret
  4686. if err := gensupport.DecodeResponse(target, res); err != nil {
  4687. return nil, err
  4688. }
  4689. return ret, nil
  4690. // {
  4691. // "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set the password.",
  4692. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth",
  4693. // "httpMethod": "POST",
  4694. // "id": "container.projects.locations.clusters.setMasterAuth",
  4695. // "parameterOrder": [
  4696. // "name"
  4697. // ],
  4698. // "parameters": {
  4699. // "name": {
  4700. // "description": "The name (project, location, cluster) of the cluster to set auth.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  4701. // "location": "path",
  4702. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  4703. // "required": true,
  4704. // "type": "string"
  4705. // }
  4706. // },
  4707. // "path": "v1/{+name}:setMasterAuth",
  4708. // "request": {
  4709. // "$ref": "SetMasterAuthRequest"
  4710. // },
  4711. // "response": {
  4712. // "$ref": "Operation"
  4713. // },
  4714. // "scopes": [
  4715. // "https://www.googleapis.com/auth/cloud-platform"
  4716. // ]
  4717. // }
  4718. }
  4719. // method id "container.projects.locations.clusters.setMonitoring":
  4720. type ProjectsLocationsClustersSetMonitoringCall struct {
  4721. s *Service
  4722. name string
  4723. setmonitoringservicerequest *SetMonitoringServiceRequest
  4724. urlParams_ gensupport.URLParams
  4725. ctx_ context.Context
  4726. header_ http.Header
  4727. }
  4728. // SetMonitoring: Sets the monitoring service for a specific cluster.
  4729. func (r *ProjectsLocationsClustersService) SetMonitoring(name string, setmonitoringservicerequest *SetMonitoringServiceRequest) *ProjectsLocationsClustersSetMonitoringCall {
  4730. c := &ProjectsLocationsClustersSetMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4731. c.name = name
  4732. c.setmonitoringservicerequest = setmonitoringservicerequest
  4733. return c
  4734. }
  4735. // Fields allows partial responses to be retrieved. See
  4736. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4737. // for more information.
  4738. func (c *ProjectsLocationsClustersSetMonitoringCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMonitoringCall {
  4739. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4740. return c
  4741. }
  4742. // Context sets the context to be used in this call's Do method. Any
  4743. // pending HTTP request will be aborted if the provided context is
  4744. // canceled.
  4745. func (c *ProjectsLocationsClustersSetMonitoringCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMonitoringCall {
  4746. c.ctx_ = ctx
  4747. return c
  4748. }
  4749. // Header returns an http.Header that can be modified by the caller to
  4750. // add HTTP headers to the request.
  4751. func (c *ProjectsLocationsClustersSetMonitoringCall) Header() http.Header {
  4752. if c.header_ == nil {
  4753. c.header_ = make(http.Header)
  4754. }
  4755. return c.header_
  4756. }
  4757. func (c *ProjectsLocationsClustersSetMonitoringCall) doRequest(alt string) (*http.Response, error) {
  4758. reqHeaders := make(http.Header)
  4759. for k, v := range c.header_ {
  4760. reqHeaders[k] = v
  4761. }
  4762. reqHeaders.Set("User-Agent", c.s.userAgent())
  4763. var body io.Reader = nil
  4764. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmonitoringservicerequest)
  4765. if err != nil {
  4766. return nil, err
  4767. }
  4768. reqHeaders.Set("Content-Type", "application/json")
  4769. c.urlParams_.Set("alt", alt)
  4770. c.urlParams_.Set("prettyPrint", "false")
  4771. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMonitoring")
  4772. urls += "?" + c.urlParams_.Encode()
  4773. req, err := http.NewRequest("POST", urls, body)
  4774. if err != nil {
  4775. return nil, err
  4776. }
  4777. req.Header = reqHeaders
  4778. googleapi.Expand(req.URL, map[string]string{
  4779. "name": c.name,
  4780. })
  4781. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4782. }
  4783. // Do executes the "container.projects.locations.clusters.setMonitoring" call.
  4784. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4785. // status code is an error. Response headers are in either
  4786. // *Operation.ServerResponse.Header or (if a response was returned at
  4787. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4788. // to check whether the returned error was because
  4789. // http.StatusNotModified was returned.
  4790. func (c *ProjectsLocationsClustersSetMonitoringCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4791. gensupport.SetOptions(c.urlParams_, opts...)
  4792. res, err := c.doRequest("json")
  4793. if res != nil && res.StatusCode == http.StatusNotModified {
  4794. if res.Body != nil {
  4795. res.Body.Close()
  4796. }
  4797. return nil, &googleapi.Error{
  4798. Code: res.StatusCode,
  4799. Header: res.Header,
  4800. }
  4801. }
  4802. if err != nil {
  4803. return nil, err
  4804. }
  4805. defer googleapi.CloseBody(res)
  4806. if err := googleapi.CheckResponse(res); err != nil {
  4807. return nil, err
  4808. }
  4809. ret := &Operation{
  4810. ServerResponse: googleapi.ServerResponse{
  4811. Header: res.Header,
  4812. HTTPStatusCode: res.StatusCode,
  4813. },
  4814. }
  4815. target := &ret
  4816. if err := gensupport.DecodeResponse(target, res); err != nil {
  4817. return nil, err
  4818. }
  4819. return ret, nil
  4820. // {
  4821. // "description": "Sets the monitoring service for a specific cluster.",
  4822. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMonitoring",
  4823. // "httpMethod": "POST",
  4824. // "id": "container.projects.locations.clusters.setMonitoring",
  4825. // "parameterOrder": [
  4826. // "name"
  4827. // ],
  4828. // "parameters": {
  4829. // "name": {
  4830. // "description": "The name (project, location, cluster) of the cluster to set monitoring.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  4831. // "location": "path",
  4832. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  4833. // "required": true,
  4834. // "type": "string"
  4835. // }
  4836. // },
  4837. // "path": "v1/{+name}:setMonitoring",
  4838. // "request": {
  4839. // "$ref": "SetMonitoringServiceRequest"
  4840. // },
  4841. // "response": {
  4842. // "$ref": "Operation"
  4843. // },
  4844. // "scopes": [
  4845. // "https://www.googleapis.com/auth/cloud-platform"
  4846. // ]
  4847. // }
  4848. }
  4849. // method id "container.projects.locations.clusters.setNetworkPolicy":
  4850. type ProjectsLocationsClustersSetNetworkPolicyCall struct {
  4851. s *Service
  4852. name string
  4853. setnetworkpolicyrequest *SetNetworkPolicyRequest
  4854. urlParams_ gensupport.URLParams
  4855. ctx_ context.Context
  4856. header_ http.Header
  4857. }
  4858. // SetNetworkPolicy: Enables/Disables Network Policy for a cluster.
  4859. func (r *ProjectsLocationsClustersService) SetNetworkPolicy(name string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsLocationsClustersSetNetworkPolicyCall {
  4860. c := &ProjectsLocationsClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4861. c.name = name
  4862. c.setnetworkpolicyrequest = setnetworkpolicyrequest
  4863. return c
  4864. }
  4865. // Fields allows partial responses to be retrieved. See
  4866. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4867. // for more information.
  4868. func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetNetworkPolicyCall {
  4869. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4870. return c
  4871. }
  4872. // Context sets the context to be used in this call's Do method. Any
  4873. // pending HTTP request will be aborted if the provided context is
  4874. // canceled.
  4875. func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsLocationsClustersSetNetworkPolicyCall {
  4876. c.ctx_ = ctx
  4877. return c
  4878. }
  4879. // Header returns an http.Header that can be modified by the caller to
  4880. // add HTTP headers to the request.
  4881. func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Header() http.Header {
  4882. if c.header_ == nil {
  4883. c.header_ = make(http.Header)
  4884. }
  4885. return c.header_
  4886. }
  4887. func (c *ProjectsLocationsClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) {
  4888. reqHeaders := make(http.Header)
  4889. for k, v := range c.header_ {
  4890. reqHeaders[k] = v
  4891. }
  4892. reqHeaders.Set("User-Agent", c.s.userAgent())
  4893. var body io.Reader = nil
  4894. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnetworkpolicyrequest)
  4895. if err != nil {
  4896. return nil, err
  4897. }
  4898. reqHeaders.Set("Content-Type", "application/json")
  4899. c.urlParams_.Set("alt", alt)
  4900. c.urlParams_.Set("prettyPrint", "false")
  4901. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setNetworkPolicy")
  4902. urls += "?" + c.urlParams_.Encode()
  4903. req, err := http.NewRequest("POST", urls, body)
  4904. if err != nil {
  4905. return nil, err
  4906. }
  4907. req.Header = reqHeaders
  4908. googleapi.Expand(req.URL, map[string]string{
  4909. "name": c.name,
  4910. })
  4911. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4912. }
  4913. // Do executes the "container.projects.locations.clusters.setNetworkPolicy" call.
  4914. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4915. // status code is an error. Response headers are in either
  4916. // *Operation.ServerResponse.Header or (if a response was returned at
  4917. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4918. // to check whether the returned error was because
  4919. // http.StatusNotModified was returned.
  4920. func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4921. gensupport.SetOptions(c.urlParams_, opts...)
  4922. res, err := c.doRequest("json")
  4923. if res != nil && res.StatusCode == http.StatusNotModified {
  4924. if res.Body != nil {
  4925. res.Body.Close()
  4926. }
  4927. return nil, &googleapi.Error{
  4928. Code: res.StatusCode,
  4929. Header: res.Header,
  4930. }
  4931. }
  4932. if err != nil {
  4933. return nil, err
  4934. }
  4935. defer googleapi.CloseBody(res)
  4936. if err := googleapi.CheckResponse(res); err != nil {
  4937. return nil, err
  4938. }
  4939. ret := &Operation{
  4940. ServerResponse: googleapi.ServerResponse{
  4941. Header: res.Header,
  4942. HTTPStatusCode: res.StatusCode,
  4943. },
  4944. }
  4945. target := &ret
  4946. if err := gensupport.DecodeResponse(target, res); err != nil {
  4947. return nil, err
  4948. }
  4949. return ret, nil
  4950. // {
  4951. // "description": "Enables/Disables Network Policy for a cluster.",
  4952. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy",
  4953. // "httpMethod": "POST",
  4954. // "id": "container.projects.locations.clusters.setNetworkPolicy",
  4955. // "parameterOrder": [
  4956. // "name"
  4957. // ],
  4958. // "parameters": {
  4959. // "name": {
  4960. // "description": "The name (project, location, cluster id) of the cluster to set networking\npolicy. Specified in the format 'projects/*/locations/*/clusters/*'.",
  4961. // "location": "path",
  4962. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  4963. // "required": true,
  4964. // "type": "string"
  4965. // }
  4966. // },
  4967. // "path": "v1/{+name}:setNetworkPolicy",
  4968. // "request": {
  4969. // "$ref": "SetNetworkPolicyRequest"
  4970. // },
  4971. // "response": {
  4972. // "$ref": "Operation"
  4973. // },
  4974. // "scopes": [
  4975. // "https://www.googleapis.com/auth/cloud-platform"
  4976. // ]
  4977. // }
  4978. }
  4979. // method id "container.projects.locations.clusters.setResourceLabels":
  4980. type ProjectsLocationsClustersSetResourceLabelsCall struct {
  4981. s *Service
  4982. name string
  4983. setlabelsrequest *SetLabelsRequest
  4984. urlParams_ gensupport.URLParams
  4985. ctx_ context.Context
  4986. header_ http.Header
  4987. }
  4988. // SetResourceLabels: Sets labels on a cluster.
  4989. func (r *ProjectsLocationsClustersService) SetResourceLabels(name string, setlabelsrequest *SetLabelsRequest) *ProjectsLocationsClustersSetResourceLabelsCall {
  4990. c := &ProjectsLocationsClustersSetResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4991. c.name = name
  4992. c.setlabelsrequest = setlabelsrequest
  4993. return c
  4994. }
  4995. // Fields allows partial responses to be retrieved. See
  4996. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4997. // for more information.
  4998. func (c *ProjectsLocationsClustersSetResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetResourceLabelsCall {
  4999. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5000. return c
  5001. }
  5002. // Context sets the context to be used in this call's Do method. Any
  5003. // pending HTTP request will be aborted if the provided context is
  5004. // canceled.
  5005. func (c *ProjectsLocationsClustersSetResourceLabelsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetResourceLabelsCall {
  5006. c.ctx_ = ctx
  5007. return c
  5008. }
  5009. // Header returns an http.Header that can be modified by the caller to
  5010. // add HTTP headers to the request.
  5011. func (c *ProjectsLocationsClustersSetResourceLabelsCall) Header() http.Header {
  5012. if c.header_ == nil {
  5013. c.header_ = make(http.Header)
  5014. }
  5015. return c.header_
  5016. }
  5017. func (c *ProjectsLocationsClustersSetResourceLabelsCall) doRequest(alt string) (*http.Response, error) {
  5018. reqHeaders := make(http.Header)
  5019. for k, v := range c.header_ {
  5020. reqHeaders[k] = v
  5021. }
  5022. reqHeaders.Set("User-Agent", c.s.userAgent())
  5023. var body io.Reader = nil
  5024. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlabelsrequest)
  5025. if err != nil {
  5026. return nil, err
  5027. }
  5028. reqHeaders.Set("Content-Type", "application/json")
  5029. c.urlParams_.Set("alt", alt)
  5030. c.urlParams_.Set("prettyPrint", "false")
  5031. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setResourceLabels")
  5032. urls += "?" + c.urlParams_.Encode()
  5033. req, err := http.NewRequest("POST", urls, body)
  5034. if err != nil {
  5035. return nil, err
  5036. }
  5037. req.Header = reqHeaders
  5038. googleapi.Expand(req.URL, map[string]string{
  5039. "name": c.name,
  5040. })
  5041. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5042. }
  5043. // Do executes the "container.projects.locations.clusters.setResourceLabels" call.
  5044. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5045. // status code is an error. Response headers are in either
  5046. // *Operation.ServerResponse.Header or (if a response was returned at
  5047. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5048. // to check whether the returned error was because
  5049. // http.StatusNotModified was returned.
  5050. func (c *ProjectsLocationsClustersSetResourceLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5051. gensupport.SetOptions(c.urlParams_, opts...)
  5052. res, err := c.doRequest("json")
  5053. if res != nil && res.StatusCode == http.StatusNotModified {
  5054. if res.Body != nil {
  5055. res.Body.Close()
  5056. }
  5057. return nil, &googleapi.Error{
  5058. Code: res.StatusCode,
  5059. Header: res.Header,
  5060. }
  5061. }
  5062. if err != nil {
  5063. return nil, err
  5064. }
  5065. defer googleapi.CloseBody(res)
  5066. if err := googleapi.CheckResponse(res); err != nil {
  5067. return nil, err
  5068. }
  5069. ret := &Operation{
  5070. ServerResponse: googleapi.ServerResponse{
  5071. Header: res.Header,
  5072. HTTPStatusCode: res.StatusCode,
  5073. },
  5074. }
  5075. target := &ret
  5076. if err := gensupport.DecodeResponse(target, res); err != nil {
  5077. return nil, err
  5078. }
  5079. return ret, nil
  5080. // {
  5081. // "description": "Sets labels on a cluster.",
  5082. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setResourceLabels",
  5083. // "httpMethod": "POST",
  5084. // "id": "container.projects.locations.clusters.setResourceLabels",
  5085. // "parameterOrder": [
  5086. // "name"
  5087. // ],
  5088. // "parameters": {
  5089. // "name": {
  5090. // "description": "The name (project, location, cluster id) of the cluster to set labels.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  5091. // "location": "path",
  5092. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  5093. // "required": true,
  5094. // "type": "string"
  5095. // }
  5096. // },
  5097. // "path": "v1/{+name}:setResourceLabels",
  5098. // "request": {
  5099. // "$ref": "SetLabelsRequest"
  5100. // },
  5101. // "response": {
  5102. // "$ref": "Operation"
  5103. // },
  5104. // "scopes": [
  5105. // "https://www.googleapis.com/auth/cloud-platform"
  5106. // ]
  5107. // }
  5108. }
  5109. // method id "container.projects.locations.clusters.startIpRotation":
  5110. type ProjectsLocationsClustersStartIpRotationCall struct {
  5111. s *Service
  5112. name string
  5113. startiprotationrequest *StartIPRotationRequest
  5114. urlParams_ gensupport.URLParams
  5115. ctx_ context.Context
  5116. header_ http.Header
  5117. }
  5118. // StartIpRotation: Start master IP rotation.
  5119. func (r *ProjectsLocationsClustersService) StartIpRotation(name string, startiprotationrequest *StartIPRotationRequest) *ProjectsLocationsClustersStartIpRotationCall {
  5120. c := &ProjectsLocationsClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5121. c.name = name
  5122. c.startiprotationrequest = startiprotationrequest
  5123. return c
  5124. }
  5125. // Fields allows partial responses to be retrieved. See
  5126. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5127. // for more information.
  5128. func (c *ProjectsLocationsClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersStartIpRotationCall {
  5129. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5130. return c
  5131. }
  5132. // Context sets the context to be used in this call's Do method. Any
  5133. // pending HTTP request will be aborted if the provided context is
  5134. // canceled.
  5135. func (c *ProjectsLocationsClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersStartIpRotationCall {
  5136. c.ctx_ = ctx
  5137. return c
  5138. }
  5139. // Header returns an http.Header that can be modified by the caller to
  5140. // add HTTP headers to the request.
  5141. func (c *ProjectsLocationsClustersStartIpRotationCall) Header() http.Header {
  5142. if c.header_ == nil {
  5143. c.header_ = make(http.Header)
  5144. }
  5145. return c.header_
  5146. }
  5147. func (c *ProjectsLocationsClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) {
  5148. reqHeaders := make(http.Header)
  5149. for k, v := range c.header_ {
  5150. reqHeaders[k] = v
  5151. }
  5152. reqHeaders.Set("User-Agent", c.s.userAgent())
  5153. var body io.Reader = nil
  5154. body, err := googleapi.WithoutDataWrapper.JSONReader(c.startiprotationrequest)
  5155. if err != nil {
  5156. return nil, err
  5157. }
  5158. reqHeaders.Set("Content-Type", "application/json")
  5159. c.urlParams_.Set("alt", alt)
  5160. c.urlParams_.Set("prettyPrint", "false")
  5161. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:startIpRotation")
  5162. urls += "?" + c.urlParams_.Encode()
  5163. req, err := http.NewRequest("POST", urls, body)
  5164. if err != nil {
  5165. return nil, err
  5166. }
  5167. req.Header = reqHeaders
  5168. googleapi.Expand(req.URL, map[string]string{
  5169. "name": c.name,
  5170. })
  5171. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5172. }
  5173. // Do executes the "container.projects.locations.clusters.startIpRotation" call.
  5174. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5175. // status code is an error. Response headers are in either
  5176. // *Operation.ServerResponse.Header or (if a response was returned at
  5177. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5178. // to check whether the returned error was because
  5179. // http.StatusNotModified was returned.
  5180. func (c *ProjectsLocationsClustersStartIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5181. gensupport.SetOptions(c.urlParams_, opts...)
  5182. res, err := c.doRequest("json")
  5183. if res != nil && res.StatusCode == http.StatusNotModified {
  5184. if res.Body != nil {
  5185. res.Body.Close()
  5186. }
  5187. return nil, &googleapi.Error{
  5188. Code: res.StatusCode,
  5189. Header: res.Header,
  5190. }
  5191. }
  5192. if err != nil {
  5193. return nil, err
  5194. }
  5195. defer googleapi.CloseBody(res)
  5196. if err := googleapi.CheckResponse(res); err != nil {
  5197. return nil, err
  5198. }
  5199. ret := &Operation{
  5200. ServerResponse: googleapi.ServerResponse{
  5201. Header: res.Header,
  5202. HTTPStatusCode: res.StatusCode,
  5203. },
  5204. }
  5205. target := &ret
  5206. if err := gensupport.DecodeResponse(target, res); err != nil {
  5207. return nil, err
  5208. }
  5209. return ret, nil
  5210. // {
  5211. // "description": "Start master IP rotation.",
  5212. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation",
  5213. // "httpMethod": "POST",
  5214. // "id": "container.projects.locations.clusters.startIpRotation",
  5215. // "parameterOrder": [
  5216. // "name"
  5217. // ],
  5218. // "parameters": {
  5219. // "name": {
  5220. // "description": "The name (project, location, cluster id) of the cluster to start IP\nrotation. Specified in the format 'projects/*/locations/*/clusters/*'.",
  5221. // "location": "path",
  5222. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  5223. // "required": true,
  5224. // "type": "string"
  5225. // }
  5226. // },
  5227. // "path": "v1/{+name}:startIpRotation",
  5228. // "request": {
  5229. // "$ref": "StartIPRotationRequest"
  5230. // },
  5231. // "response": {
  5232. // "$ref": "Operation"
  5233. // },
  5234. // "scopes": [
  5235. // "https://www.googleapis.com/auth/cloud-platform"
  5236. // ]
  5237. // }
  5238. }
  5239. // method id "container.projects.locations.clusters.update":
  5240. type ProjectsLocationsClustersUpdateCall struct {
  5241. s *Service
  5242. name string
  5243. updateclusterrequest *UpdateClusterRequest
  5244. urlParams_ gensupport.URLParams
  5245. ctx_ context.Context
  5246. header_ http.Header
  5247. }
  5248. // Update: Updates the settings of a specific cluster.
  5249. func (r *ProjectsLocationsClustersService) Update(name string, updateclusterrequest *UpdateClusterRequest) *ProjectsLocationsClustersUpdateCall {
  5250. c := &ProjectsLocationsClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5251. c.name = name
  5252. c.updateclusterrequest = updateclusterrequest
  5253. return c
  5254. }
  5255. // Fields allows partial responses to be retrieved. See
  5256. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5257. // for more information.
  5258. func (c *ProjectsLocationsClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateCall {
  5259. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5260. return c
  5261. }
  5262. // Context sets the context to be used in this call's Do method. Any
  5263. // pending HTTP request will be aborted if the provided context is
  5264. // canceled.
  5265. func (c *ProjectsLocationsClustersUpdateCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateCall {
  5266. c.ctx_ = ctx
  5267. return c
  5268. }
  5269. // Header returns an http.Header that can be modified by the caller to
  5270. // add HTTP headers to the request.
  5271. func (c *ProjectsLocationsClustersUpdateCall) Header() http.Header {
  5272. if c.header_ == nil {
  5273. c.header_ = make(http.Header)
  5274. }
  5275. return c.header_
  5276. }
  5277. func (c *ProjectsLocationsClustersUpdateCall) doRequest(alt string) (*http.Response, error) {
  5278. reqHeaders := make(http.Header)
  5279. for k, v := range c.header_ {
  5280. reqHeaders[k] = v
  5281. }
  5282. reqHeaders.Set("User-Agent", c.s.userAgent())
  5283. var body io.Reader = nil
  5284. body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest)
  5285. if err != nil {
  5286. return nil, err
  5287. }
  5288. reqHeaders.Set("Content-Type", "application/json")
  5289. c.urlParams_.Set("alt", alt)
  5290. c.urlParams_.Set("prettyPrint", "false")
  5291. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5292. urls += "?" + c.urlParams_.Encode()
  5293. req, err := http.NewRequest("PUT", urls, body)
  5294. if err != nil {
  5295. return nil, err
  5296. }
  5297. req.Header = reqHeaders
  5298. googleapi.Expand(req.URL, map[string]string{
  5299. "name": c.name,
  5300. })
  5301. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5302. }
  5303. // Do executes the "container.projects.locations.clusters.update" call.
  5304. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5305. // status code is an error. Response headers are in either
  5306. // *Operation.ServerResponse.Header or (if a response was returned at
  5307. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5308. // to check whether the returned error was because
  5309. // http.StatusNotModified was returned.
  5310. func (c *ProjectsLocationsClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5311. gensupport.SetOptions(c.urlParams_, opts...)
  5312. res, err := c.doRequest("json")
  5313. if res != nil && res.StatusCode == http.StatusNotModified {
  5314. if res.Body != nil {
  5315. res.Body.Close()
  5316. }
  5317. return nil, &googleapi.Error{
  5318. Code: res.StatusCode,
  5319. Header: res.Header,
  5320. }
  5321. }
  5322. if err != nil {
  5323. return nil, err
  5324. }
  5325. defer googleapi.CloseBody(res)
  5326. if err := googleapi.CheckResponse(res); err != nil {
  5327. return nil, err
  5328. }
  5329. ret := &Operation{
  5330. ServerResponse: googleapi.ServerResponse{
  5331. Header: res.Header,
  5332. HTTPStatusCode: res.StatusCode,
  5333. },
  5334. }
  5335. target := &ret
  5336. if err := gensupport.DecodeResponse(target, res); err != nil {
  5337. return nil, err
  5338. }
  5339. return ret, nil
  5340. // {
  5341. // "description": "Updates the settings of a specific cluster.",
  5342. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}",
  5343. // "httpMethod": "PUT",
  5344. // "id": "container.projects.locations.clusters.update",
  5345. // "parameterOrder": [
  5346. // "name"
  5347. // ],
  5348. // "parameters": {
  5349. // "name": {
  5350. // "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  5351. // "location": "path",
  5352. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  5353. // "required": true,
  5354. // "type": "string"
  5355. // }
  5356. // },
  5357. // "path": "v1/{+name}",
  5358. // "request": {
  5359. // "$ref": "UpdateClusterRequest"
  5360. // },
  5361. // "response": {
  5362. // "$ref": "Operation"
  5363. // },
  5364. // "scopes": [
  5365. // "https://www.googleapis.com/auth/cloud-platform"
  5366. // ]
  5367. // }
  5368. }
  5369. // method id "container.projects.locations.clusters.updateMaster":
  5370. type ProjectsLocationsClustersUpdateMasterCall struct {
  5371. s *Service
  5372. name string
  5373. updatemasterrequest *UpdateMasterRequest
  5374. urlParams_ gensupport.URLParams
  5375. ctx_ context.Context
  5376. header_ http.Header
  5377. }
  5378. // UpdateMaster: Updates the master for a specific cluster.
  5379. func (r *ProjectsLocationsClustersService) UpdateMaster(name string, updatemasterrequest *UpdateMasterRequest) *ProjectsLocationsClustersUpdateMasterCall {
  5380. c := &ProjectsLocationsClustersUpdateMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5381. c.name = name
  5382. c.updatemasterrequest = updatemasterrequest
  5383. return c
  5384. }
  5385. // Fields allows partial responses to be retrieved. See
  5386. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5387. // for more information.
  5388. func (c *ProjectsLocationsClustersUpdateMasterCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateMasterCall {
  5389. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5390. return c
  5391. }
  5392. // Context sets the context to be used in this call's Do method. Any
  5393. // pending HTTP request will be aborted if the provided context is
  5394. // canceled.
  5395. func (c *ProjectsLocationsClustersUpdateMasterCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateMasterCall {
  5396. c.ctx_ = ctx
  5397. return c
  5398. }
  5399. // Header returns an http.Header that can be modified by the caller to
  5400. // add HTTP headers to the request.
  5401. func (c *ProjectsLocationsClustersUpdateMasterCall) Header() http.Header {
  5402. if c.header_ == nil {
  5403. c.header_ = make(http.Header)
  5404. }
  5405. return c.header_
  5406. }
  5407. func (c *ProjectsLocationsClustersUpdateMasterCall) doRequest(alt string) (*http.Response, error) {
  5408. reqHeaders := make(http.Header)
  5409. for k, v := range c.header_ {
  5410. reqHeaders[k] = v
  5411. }
  5412. reqHeaders.Set("User-Agent", c.s.userAgent())
  5413. var body io.Reader = nil
  5414. body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatemasterrequest)
  5415. if err != nil {
  5416. return nil, err
  5417. }
  5418. reqHeaders.Set("Content-Type", "application/json")
  5419. c.urlParams_.Set("alt", alt)
  5420. c.urlParams_.Set("prettyPrint", "false")
  5421. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:updateMaster")
  5422. urls += "?" + c.urlParams_.Encode()
  5423. req, err := http.NewRequest("POST", urls, body)
  5424. if err != nil {
  5425. return nil, err
  5426. }
  5427. req.Header = reqHeaders
  5428. googleapi.Expand(req.URL, map[string]string{
  5429. "name": c.name,
  5430. })
  5431. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5432. }
  5433. // Do executes the "container.projects.locations.clusters.updateMaster" call.
  5434. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5435. // status code is an error. Response headers are in either
  5436. // *Operation.ServerResponse.Header or (if a response was returned at
  5437. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5438. // to check whether the returned error was because
  5439. // http.StatusNotModified was returned.
  5440. func (c *ProjectsLocationsClustersUpdateMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5441. gensupport.SetOptions(c.urlParams_, opts...)
  5442. res, err := c.doRequest("json")
  5443. if res != nil && res.StatusCode == http.StatusNotModified {
  5444. if res.Body != nil {
  5445. res.Body.Close()
  5446. }
  5447. return nil, &googleapi.Error{
  5448. Code: res.StatusCode,
  5449. Header: res.Header,
  5450. }
  5451. }
  5452. if err != nil {
  5453. return nil, err
  5454. }
  5455. defer googleapi.CloseBody(res)
  5456. if err := googleapi.CheckResponse(res); err != nil {
  5457. return nil, err
  5458. }
  5459. ret := &Operation{
  5460. ServerResponse: googleapi.ServerResponse{
  5461. Header: res.Header,
  5462. HTTPStatusCode: res.StatusCode,
  5463. },
  5464. }
  5465. target := &ret
  5466. if err := gensupport.DecodeResponse(target, res); err != nil {
  5467. return nil, err
  5468. }
  5469. return ret, nil
  5470. // {
  5471. // "description": "Updates the master for a specific cluster.",
  5472. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:updateMaster",
  5473. // "httpMethod": "POST",
  5474. // "id": "container.projects.locations.clusters.updateMaster",
  5475. // "parameterOrder": [
  5476. // "name"
  5477. // ],
  5478. // "parameters": {
  5479. // "name": {
  5480. // "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  5481. // "location": "path",
  5482. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  5483. // "required": true,
  5484. // "type": "string"
  5485. // }
  5486. // },
  5487. // "path": "v1/{+name}:updateMaster",
  5488. // "request": {
  5489. // "$ref": "UpdateMasterRequest"
  5490. // },
  5491. // "response": {
  5492. // "$ref": "Operation"
  5493. // },
  5494. // "scopes": [
  5495. // "https://www.googleapis.com/auth/cloud-platform"
  5496. // ]
  5497. // }
  5498. }
  5499. // method id "container.projects.locations.clusters.nodePools.create":
  5500. type ProjectsLocationsClustersNodePoolsCreateCall struct {
  5501. s *Service
  5502. parent string
  5503. createnodepoolrequest *CreateNodePoolRequest
  5504. urlParams_ gensupport.URLParams
  5505. ctx_ context.Context
  5506. header_ http.Header
  5507. }
  5508. // Create: Creates a node pool for a cluster.
  5509. func (r *ProjectsLocationsClustersNodePoolsService) Create(parent string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsLocationsClustersNodePoolsCreateCall {
  5510. c := &ProjectsLocationsClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5511. c.parent = parent
  5512. c.createnodepoolrequest = createnodepoolrequest
  5513. return c
  5514. }
  5515. // Fields allows partial responses to be retrieved. See
  5516. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5517. // for more information.
  5518. func (c *ProjectsLocationsClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsCreateCall {
  5519. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5520. return c
  5521. }
  5522. // Context sets the context to be used in this call's Do method. Any
  5523. // pending HTTP request will be aborted if the provided context is
  5524. // canceled.
  5525. func (c *ProjectsLocationsClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsCreateCall {
  5526. c.ctx_ = ctx
  5527. return c
  5528. }
  5529. // Header returns an http.Header that can be modified by the caller to
  5530. // add HTTP headers to the request.
  5531. func (c *ProjectsLocationsClustersNodePoolsCreateCall) Header() http.Header {
  5532. if c.header_ == nil {
  5533. c.header_ = make(http.Header)
  5534. }
  5535. return c.header_
  5536. }
  5537. func (c *ProjectsLocationsClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) {
  5538. reqHeaders := make(http.Header)
  5539. for k, v := range c.header_ {
  5540. reqHeaders[k] = v
  5541. }
  5542. reqHeaders.Set("User-Agent", c.s.userAgent())
  5543. var body io.Reader = nil
  5544. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest)
  5545. if err != nil {
  5546. return nil, err
  5547. }
  5548. reqHeaders.Set("Content-Type", "application/json")
  5549. c.urlParams_.Set("alt", alt)
  5550. c.urlParams_.Set("prettyPrint", "false")
  5551. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nodePools")
  5552. urls += "?" + c.urlParams_.Encode()
  5553. req, err := http.NewRequest("POST", urls, body)
  5554. if err != nil {
  5555. return nil, err
  5556. }
  5557. req.Header = reqHeaders
  5558. googleapi.Expand(req.URL, map[string]string{
  5559. "parent": c.parent,
  5560. })
  5561. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5562. }
  5563. // Do executes the "container.projects.locations.clusters.nodePools.create" call.
  5564. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5565. // status code is an error. Response headers are in either
  5566. // *Operation.ServerResponse.Header or (if a response was returned at
  5567. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5568. // to check whether the returned error was because
  5569. // http.StatusNotModified was returned.
  5570. func (c *ProjectsLocationsClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5571. gensupport.SetOptions(c.urlParams_, opts...)
  5572. res, err := c.doRequest("json")
  5573. if res != nil && res.StatusCode == http.StatusNotModified {
  5574. if res.Body != nil {
  5575. res.Body.Close()
  5576. }
  5577. return nil, &googleapi.Error{
  5578. Code: res.StatusCode,
  5579. Header: res.Header,
  5580. }
  5581. }
  5582. if err != nil {
  5583. return nil, err
  5584. }
  5585. defer googleapi.CloseBody(res)
  5586. if err := googleapi.CheckResponse(res); err != nil {
  5587. return nil, err
  5588. }
  5589. ret := &Operation{
  5590. ServerResponse: googleapi.ServerResponse{
  5591. Header: res.Header,
  5592. HTTPStatusCode: res.StatusCode,
  5593. },
  5594. }
  5595. target := &ret
  5596. if err := gensupport.DecodeResponse(target, res); err != nil {
  5597. return nil, err
  5598. }
  5599. return ret, nil
  5600. // {
  5601. // "description": "Creates a node pool for a cluster.",
  5602. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools",
  5603. // "httpMethod": "POST",
  5604. // "id": "container.projects.locations.clusters.nodePools.create",
  5605. // "parameterOrder": [
  5606. // "parent"
  5607. // ],
  5608. // "parameters": {
  5609. // "parent": {
  5610. // "description": "The parent (project, location, cluster id) where the node pool will be\ncreated. Specified in the format\n'projects/*/locations/*/clusters/*'.",
  5611. // "location": "path",
  5612. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  5613. // "required": true,
  5614. // "type": "string"
  5615. // }
  5616. // },
  5617. // "path": "v1/{+parent}/nodePools",
  5618. // "request": {
  5619. // "$ref": "CreateNodePoolRequest"
  5620. // },
  5621. // "response": {
  5622. // "$ref": "Operation"
  5623. // },
  5624. // "scopes": [
  5625. // "https://www.googleapis.com/auth/cloud-platform"
  5626. // ]
  5627. // }
  5628. }
  5629. // method id "container.projects.locations.clusters.nodePools.delete":
  5630. type ProjectsLocationsClustersNodePoolsDeleteCall struct {
  5631. s *Service
  5632. name string
  5633. urlParams_ gensupport.URLParams
  5634. ctx_ context.Context
  5635. header_ http.Header
  5636. }
  5637. // Delete: Deletes a node pool from a cluster.
  5638. func (r *ProjectsLocationsClustersNodePoolsService) Delete(name string) *ProjectsLocationsClustersNodePoolsDeleteCall {
  5639. c := &ProjectsLocationsClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5640. c.name = name
  5641. return c
  5642. }
  5643. // ClusterId sets the optional parameter "clusterId": Deprecated. The
  5644. // name of the cluster.
  5645. // This field has been deprecated and replaced by the name field.
  5646. func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsDeleteCall {
  5647. c.urlParams_.Set("clusterId", clusterId)
  5648. return c
  5649. }
  5650. // NodePoolId sets the optional parameter "nodePoolId": Deprecated. The
  5651. // name of the node pool to delete.
  5652. // This field has been deprecated and replaced by the name field.
  5653. func (c *ProjectsLocationsClustersNodePoolsDeleteCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsDeleteCall {
  5654. c.urlParams_.Set("nodePoolId", nodePoolId)
  5655. return c
  5656. }
  5657. // ProjectId sets the optional parameter "projectId": Deprecated. The
  5658. // Google Developers Console [project ID or
  5659. // project
  5660. // number](https://developers.google.com/console/help/new/#projec
  5661. // tnumber).
  5662. // This field has been deprecated and replaced by the name field.
  5663. func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsDeleteCall {
  5664. c.urlParams_.Set("projectId", projectId)
  5665. return c
  5666. }
  5667. // Zone sets the optional parameter "zone": Deprecated. The name of the
  5668. // Google Compute Engine
  5669. // [zone](/compute/docs/zones#available) in which the
  5670. // cluster
  5671. // resides.
  5672. // This field has been deprecated and replaced by the name field.
  5673. func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsDeleteCall {
  5674. c.urlParams_.Set("zone", zone)
  5675. return c
  5676. }
  5677. // Fields allows partial responses to be retrieved. See
  5678. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5679. // for more information.
  5680. func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsDeleteCall {
  5681. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5682. return c
  5683. }
  5684. // Context sets the context to be used in this call's Do method. Any
  5685. // pending HTTP request will be aborted if the provided context is
  5686. // canceled.
  5687. func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsDeleteCall {
  5688. c.ctx_ = ctx
  5689. return c
  5690. }
  5691. // Header returns an http.Header that can be modified by the caller to
  5692. // add HTTP headers to the request.
  5693. func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Header() http.Header {
  5694. if c.header_ == nil {
  5695. c.header_ = make(http.Header)
  5696. }
  5697. return c.header_
  5698. }
  5699. func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5700. reqHeaders := make(http.Header)
  5701. for k, v := range c.header_ {
  5702. reqHeaders[k] = v
  5703. }
  5704. reqHeaders.Set("User-Agent", c.s.userAgent())
  5705. var body io.Reader = nil
  5706. c.urlParams_.Set("alt", alt)
  5707. c.urlParams_.Set("prettyPrint", "false")
  5708. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5709. urls += "?" + c.urlParams_.Encode()
  5710. req, err := http.NewRequest("DELETE", urls, body)
  5711. if err != nil {
  5712. return nil, err
  5713. }
  5714. req.Header = reqHeaders
  5715. googleapi.Expand(req.URL, map[string]string{
  5716. "name": c.name,
  5717. })
  5718. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5719. }
  5720. // Do executes the "container.projects.locations.clusters.nodePools.delete" call.
  5721. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5722. // status code is an error. Response headers are in either
  5723. // *Operation.ServerResponse.Header or (if a response was returned at
  5724. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5725. // to check whether the returned error was because
  5726. // http.StatusNotModified was returned.
  5727. func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5728. gensupport.SetOptions(c.urlParams_, opts...)
  5729. res, err := c.doRequest("json")
  5730. if res != nil && res.StatusCode == http.StatusNotModified {
  5731. if res.Body != nil {
  5732. res.Body.Close()
  5733. }
  5734. return nil, &googleapi.Error{
  5735. Code: res.StatusCode,
  5736. Header: res.Header,
  5737. }
  5738. }
  5739. if err != nil {
  5740. return nil, err
  5741. }
  5742. defer googleapi.CloseBody(res)
  5743. if err := googleapi.CheckResponse(res); err != nil {
  5744. return nil, err
  5745. }
  5746. ret := &Operation{
  5747. ServerResponse: googleapi.ServerResponse{
  5748. Header: res.Header,
  5749. HTTPStatusCode: res.StatusCode,
  5750. },
  5751. }
  5752. target := &ret
  5753. if err := gensupport.DecodeResponse(target, res); err != nil {
  5754. return nil, err
  5755. }
  5756. return ret, nil
  5757. // {
  5758. // "description": "Deletes a node pool from a cluster.",
  5759. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}",
  5760. // "httpMethod": "DELETE",
  5761. // "id": "container.projects.locations.clusters.nodePools.delete",
  5762. // "parameterOrder": [
  5763. // "name"
  5764. // ],
  5765. // "parameters": {
  5766. // "clusterId": {
  5767. // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.",
  5768. // "location": "query",
  5769. // "type": "string"
  5770. // },
  5771. // "name": {
  5772. // "description": "The name (project, location, cluster, node pool id) of the node pool to\ndelete. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.",
  5773. // "location": "path",
  5774. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$",
  5775. // "required": true,
  5776. // "type": "string"
  5777. // },
  5778. // "nodePoolId": {
  5779. // "description": "Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.",
  5780. // "location": "query",
  5781. // "type": "string"
  5782. // },
  5783. // "projectId": {
  5784. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.",
  5785. // "location": "query",
  5786. // "type": "string"
  5787. // },
  5788. // "zone": {
  5789. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  5790. // "location": "query",
  5791. // "type": "string"
  5792. // }
  5793. // },
  5794. // "path": "v1/{+name}",
  5795. // "response": {
  5796. // "$ref": "Operation"
  5797. // },
  5798. // "scopes": [
  5799. // "https://www.googleapis.com/auth/cloud-platform"
  5800. // ]
  5801. // }
  5802. }
  5803. // method id "container.projects.locations.clusters.nodePools.get":
  5804. type ProjectsLocationsClustersNodePoolsGetCall struct {
  5805. s *Service
  5806. name string
  5807. urlParams_ gensupport.URLParams
  5808. ifNoneMatch_ string
  5809. ctx_ context.Context
  5810. header_ http.Header
  5811. }
  5812. // Get: Retrieves the node pool requested.
  5813. func (r *ProjectsLocationsClustersNodePoolsService) Get(name string) *ProjectsLocationsClustersNodePoolsGetCall {
  5814. c := &ProjectsLocationsClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5815. c.name = name
  5816. return c
  5817. }
  5818. // ClusterId sets the optional parameter "clusterId": Deprecated. The
  5819. // name of the cluster.
  5820. // This field has been deprecated and replaced by the name field.
  5821. func (c *ProjectsLocationsClustersNodePoolsGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsGetCall {
  5822. c.urlParams_.Set("clusterId", clusterId)
  5823. return c
  5824. }
  5825. // NodePoolId sets the optional parameter "nodePoolId": Deprecated. The
  5826. // name of the node pool.
  5827. // This field has been deprecated and replaced by the name field.
  5828. func (c *ProjectsLocationsClustersNodePoolsGetCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsGetCall {
  5829. c.urlParams_.Set("nodePoolId", nodePoolId)
  5830. return c
  5831. }
  5832. // ProjectId sets the optional parameter "projectId": Deprecated. The
  5833. // Google Developers Console [project ID or
  5834. // project
  5835. // number](https://developers.google.com/console/help/new/#projec
  5836. // tnumber).
  5837. // This field has been deprecated and replaced by the name field.
  5838. func (c *ProjectsLocationsClustersNodePoolsGetCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsGetCall {
  5839. c.urlParams_.Set("projectId", projectId)
  5840. return c
  5841. }
  5842. // Zone sets the optional parameter "zone": Deprecated. The name of the
  5843. // Google Compute Engine
  5844. // [zone](/compute/docs/zones#available) in which the
  5845. // cluster
  5846. // resides.
  5847. // This field has been deprecated and replaced by the name field.
  5848. func (c *ProjectsLocationsClustersNodePoolsGetCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsGetCall {
  5849. c.urlParams_.Set("zone", zone)
  5850. return c
  5851. }
  5852. // Fields allows partial responses to be retrieved. See
  5853. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5854. // for more information.
  5855. func (c *ProjectsLocationsClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsGetCall {
  5856. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5857. return c
  5858. }
  5859. // IfNoneMatch sets the optional parameter which makes the operation
  5860. // fail if the object's ETag matches the given value. This is useful for
  5861. // getting updates only after the object has changed since the last
  5862. // request. Use googleapi.IsNotModified to check whether the response
  5863. // error from Do is the result of In-None-Match.
  5864. func (c *ProjectsLocationsClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsGetCall {
  5865. c.ifNoneMatch_ = entityTag
  5866. return c
  5867. }
  5868. // Context sets the context to be used in this call's Do method. Any
  5869. // pending HTTP request will be aborted if the provided context is
  5870. // canceled.
  5871. func (c *ProjectsLocationsClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsGetCall {
  5872. c.ctx_ = ctx
  5873. return c
  5874. }
  5875. // Header returns an http.Header that can be modified by the caller to
  5876. // add HTTP headers to the request.
  5877. func (c *ProjectsLocationsClustersNodePoolsGetCall) Header() http.Header {
  5878. if c.header_ == nil {
  5879. c.header_ = make(http.Header)
  5880. }
  5881. return c.header_
  5882. }
  5883. func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) {
  5884. reqHeaders := make(http.Header)
  5885. for k, v := range c.header_ {
  5886. reqHeaders[k] = v
  5887. }
  5888. reqHeaders.Set("User-Agent", c.s.userAgent())
  5889. if c.ifNoneMatch_ != "" {
  5890. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5891. }
  5892. var body io.Reader = nil
  5893. c.urlParams_.Set("alt", alt)
  5894. c.urlParams_.Set("prettyPrint", "false")
  5895. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5896. urls += "?" + c.urlParams_.Encode()
  5897. req, err := http.NewRequest("GET", urls, body)
  5898. if err != nil {
  5899. return nil, err
  5900. }
  5901. req.Header = reqHeaders
  5902. googleapi.Expand(req.URL, map[string]string{
  5903. "name": c.name,
  5904. })
  5905. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5906. }
  5907. // Do executes the "container.projects.locations.clusters.nodePools.get" call.
  5908. // Exactly one of *NodePool or error will be non-nil. Any non-2xx status
  5909. // code is an error. Response headers are in either
  5910. // *NodePool.ServerResponse.Header or (if a response was returned at
  5911. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5912. // to check whether the returned error was because
  5913. // http.StatusNotModified was returned.
  5914. func (c *ProjectsLocationsClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, error) {
  5915. gensupport.SetOptions(c.urlParams_, opts...)
  5916. res, err := c.doRequest("json")
  5917. if res != nil && res.StatusCode == http.StatusNotModified {
  5918. if res.Body != nil {
  5919. res.Body.Close()
  5920. }
  5921. return nil, &googleapi.Error{
  5922. Code: res.StatusCode,
  5923. Header: res.Header,
  5924. }
  5925. }
  5926. if err != nil {
  5927. return nil, err
  5928. }
  5929. defer googleapi.CloseBody(res)
  5930. if err := googleapi.CheckResponse(res); err != nil {
  5931. return nil, err
  5932. }
  5933. ret := &NodePool{
  5934. ServerResponse: googleapi.ServerResponse{
  5935. Header: res.Header,
  5936. HTTPStatusCode: res.StatusCode,
  5937. },
  5938. }
  5939. target := &ret
  5940. if err := gensupport.DecodeResponse(target, res); err != nil {
  5941. return nil, err
  5942. }
  5943. return ret, nil
  5944. // {
  5945. // "description": "Retrieves the node pool requested.",
  5946. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}",
  5947. // "httpMethod": "GET",
  5948. // "id": "container.projects.locations.clusters.nodePools.get",
  5949. // "parameterOrder": [
  5950. // "name"
  5951. // ],
  5952. // "parameters": {
  5953. // "clusterId": {
  5954. // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.",
  5955. // "location": "query",
  5956. // "type": "string"
  5957. // },
  5958. // "name": {
  5959. // "description": "The name (project, location, cluster, node pool id) of the node pool to\nget. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.",
  5960. // "location": "path",
  5961. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$",
  5962. // "required": true,
  5963. // "type": "string"
  5964. // },
  5965. // "nodePoolId": {
  5966. // "description": "Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.",
  5967. // "location": "query",
  5968. // "type": "string"
  5969. // },
  5970. // "projectId": {
  5971. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.",
  5972. // "location": "query",
  5973. // "type": "string"
  5974. // },
  5975. // "zone": {
  5976. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  5977. // "location": "query",
  5978. // "type": "string"
  5979. // }
  5980. // },
  5981. // "path": "v1/{+name}",
  5982. // "response": {
  5983. // "$ref": "NodePool"
  5984. // },
  5985. // "scopes": [
  5986. // "https://www.googleapis.com/auth/cloud-platform"
  5987. // ]
  5988. // }
  5989. }
  5990. // method id "container.projects.locations.clusters.nodePools.list":
  5991. type ProjectsLocationsClustersNodePoolsListCall struct {
  5992. s *Service
  5993. parent string
  5994. urlParams_ gensupport.URLParams
  5995. ifNoneMatch_ string
  5996. ctx_ context.Context
  5997. header_ http.Header
  5998. }
  5999. // List: Lists the node pools for a cluster.
  6000. func (r *ProjectsLocationsClustersNodePoolsService) List(parent string) *ProjectsLocationsClustersNodePoolsListCall {
  6001. c := &ProjectsLocationsClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6002. c.parent = parent
  6003. return c
  6004. }
  6005. // ClusterId sets the optional parameter "clusterId": Deprecated. The
  6006. // name of the cluster.
  6007. // This field has been deprecated and replaced by the parent field.
  6008. func (c *ProjectsLocationsClustersNodePoolsListCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsListCall {
  6009. c.urlParams_.Set("clusterId", clusterId)
  6010. return c
  6011. }
  6012. // ProjectId sets the optional parameter "projectId": Deprecated. The
  6013. // Google Developers Console [project ID or
  6014. // project
  6015. // number](https://developers.google.com/console/help/new/#projec
  6016. // tnumber).
  6017. // This field has been deprecated and replaced by the parent field.
  6018. func (c *ProjectsLocationsClustersNodePoolsListCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsListCall {
  6019. c.urlParams_.Set("projectId", projectId)
  6020. return c
  6021. }
  6022. // Zone sets the optional parameter "zone": Deprecated. The name of the
  6023. // Google Compute Engine
  6024. // [zone](/compute/docs/zones#available) in which the
  6025. // cluster
  6026. // resides.
  6027. // This field has been deprecated and replaced by the parent field.
  6028. func (c *ProjectsLocationsClustersNodePoolsListCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsListCall {
  6029. c.urlParams_.Set("zone", zone)
  6030. return c
  6031. }
  6032. // Fields allows partial responses to be retrieved. See
  6033. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6034. // for more information.
  6035. func (c *ProjectsLocationsClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsListCall {
  6036. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6037. return c
  6038. }
  6039. // IfNoneMatch sets the optional parameter which makes the operation
  6040. // fail if the object's ETag matches the given value. This is useful for
  6041. // getting updates only after the object has changed since the last
  6042. // request. Use googleapi.IsNotModified to check whether the response
  6043. // error from Do is the result of In-None-Match.
  6044. func (c *ProjectsLocationsClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsListCall {
  6045. c.ifNoneMatch_ = entityTag
  6046. return c
  6047. }
  6048. // Context sets the context to be used in this call's Do method. Any
  6049. // pending HTTP request will be aborted if the provided context is
  6050. // canceled.
  6051. func (c *ProjectsLocationsClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsListCall {
  6052. c.ctx_ = ctx
  6053. return c
  6054. }
  6055. // Header returns an http.Header that can be modified by the caller to
  6056. // add HTTP headers to the request.
  6057. func (c *ProjectsLocationsClustersNodePoolsListCall) Header() http.Header {
  6058. if c.header_ == nil {
  6059. c.header_ = make(http.Header)
  6060. }
  6061. return c.header_
  6062. }
  6063. func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) {
  6064. reqHeaders := make(http.Header)
  6065. for k, v := range c.header_ {
  6066. reqHeaders[k] = v
  6067. }
  6068. reqHeaders.Set("User-Agent", c.s.userAgent())
  6069. if c.ifNoneMatch_ != "" {
  6070. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6071. }
  6072. var body io.Reader = nil
  6073. c.urlParams_.Set("alt", alt)
  6074. c.urlParams_.Set("prettyPrint", "false")
  6075. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nodePools")
  6076. urls += "?" + c.urlParams_.Encode()
  6077. req, err := http.NewRequest("GET", urls, body)
  6078. if err != nil {
  6079. return nil, err
  6080. }
  6081. req.Header = reqHeaders
  6082. googleapi.Expand(req.URL, map[string]string{
  6083. "parent": c.parent,
  6084. })
  6085. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6086. }
  6087. // Do executes the "container.projects.locations.clusters.nodePools.list" call.
  6088. // Exactly one of *ListNodePoolsResponse or error will be non-nil. Any
  6089. // non-2xx status code is an error. Response headers are in either
  6090. // *ListNodePoolsResponse.ServerResponse.Header or (if a response was
  6091. // returned at all) in error.(*googleapi.Error).Header. Use
  6092. // googleapi.IsNotModified to check whether the returned error was
  6093. // because http.StatusNotModified was returned.
  6094. func (c *ProjectsLocationsClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, error) {
  6095. gensupport.SetOptions(c.urlParams_, opts...)
  6096. res, err := c.doRequest("json")
  6097. if res != nil && res.StatusCode == http.StatusNotModified {
  6098. if res.Body != nil {
  6099. res.Body.Close()
  6100. }
  6101. return nil, &googleapi.Error{
  6102. Code: res.StatusCode,
  6103. Header: res.Header,
  6104. }
  6105. }
  6106. if err != nil {
  6107. return nil, err
  6108. }
  6109. defer googleapi.CloseBody(res)
  6110. if err := googleapi.CheckResponse(res); err != nil {
  6111. return nil, err
  6112. }
  6113. ret := &ListNodePoolsResponse{
  6114. ServerResponse: googleapi.ServerResponse{
  6115. Header: res.Header,
  6116. HTTPStatusCode: res.StatusCode,
  6117. },
  6118. }
  6119. target := &ret
  6120. if err := gensupport.DecodeResponse(target, res); err != nil {
  6121. return nil, err
  6122. }
  6123. return ret, nil
  6124. // {
  6125. // "description": "Lists the node pools for a cluster.",
  6126. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools",
  6127. // "httpMethod": "GET",
  6128. // "id": "container.projects.locations.clusters.nodePools.list",
  6129. // "parameterOrder": [
  6130. // "parent"
  6131. // ],
  6132. // "parameters": {
  6133. // "clusterId": {
  6134. // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.",
  6135. // "location": "query",
  6136. // "type": "string"
  6137. // },
  6138. // "parent": {
  6139. // "description": "The parent (project, location, cluster id) where the node pools will be\nlisted. Specified in the format 'projects/*/locations/*/clusters/*'.",
  6140. // "location": "path",
  6141. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
  6142. // "required": true,
  6143. // "type": "string"
  6144. // },
  6145. // "projectId": {
  6146. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.",
  6147. // "location": "query",
  6148. // "type": "string"
  6149. // },
  6150. // "zone": {
  6151. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.",
  6152. // "location": "query",
  6153. // "type": "string"
  6154. // }
  6155. // },
  6156. // "path": "v1/{+parent}/nodePools",
  6157. // "response": {
  6158. // "$ref": "ListNodePoolsResponse"
  6159. // },
  6160. // "scopes": [
  6161. // "https://www.googleapis.com/auth/cloud-platform"
  6162. // ]
  6163. // }
  6164. }
  6165. // method id "container.projects.locations.clusters.nodePools.rollback":
  6166. type ProjectsLocationsClustersNodePoolsRollbackCall struct {
  6167. s *Service
  6168. name string
  6169. rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest
  6170. urlParams_ gensupport.URLParams
  6171. ctx_ context.Context
  6172. header_ http.Header
  6173. }
  6174. // Rollback: Roll back the previously Aborted or Failed NodePool
  6175. // upgrade.
  6176. // This will be an no-op if the last upgrade successfully completed.
  6177. func (r *ProjectsLocationsClustersNodePoolsService) Rollback(name string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsLocationsClustersNodePoolsRollbackCall {
  6178. c := &ProjectsLocationsClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6179. c.name = name
  6180. c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest
  6181. return c
  6182. }
  6183. // Fields allows partial responses to be retrieved. See
  6184. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6185. // for more information.
  6186. func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsRollbackCall {
  6187. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6188. return c
  6189. }
  6190. // Context sets the context to be used in this call's Do method. Any
  6191. // pending HTTP request will be aborted if the provided context is
  6192. // canceled.
  6193. func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsRollbackCall {
  6194. c.ctx_ = ctx
  6195. return c
  6196. }
  6197. // Header returns an http.Header that can be modified by the caller to
  6198. // add HTTP headers to the request.
  6199. func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Header() http.Header {
  6200. if c.header_ == nil {
  6201. c.header_ = make(http.Header)
  6202. }
  6203. return c.header_
  6204. }
  6205. func (c *ProjectsLocationsClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) {
  6206. reqHeaders := make(http.Header)
  6207. for k, v := range c.header_ {
  6208. reqHeaders[k] = v
  6209. }
  6210. reqHeaders.Set("User-Agent", c.s.userAgent())
  6211. var body io.Reader = nil
  6212. body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbacknodepoolupgraderequest)
  6213. if err != nil {
  6214. return nil, err
  6215. }
  6216. reqHeaders.Set("Content-Type", "application/json")
  6217. c.urlParams_.Set("alt", alt)
  6218. c.urlParams_.Set("prettyPrint", "false")
  6219. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rollback")
  6220. urls += "?" + c.urlParams_.Encode()
  6221. req, err := http.NewRequest("POST", urls, body)
  6222. if err != nil {
  6223. return nil, err
  6224. }
  6225. req.Header = reqHeaders
  6226. googleapi.Expand(req.URL, map[string]string{
  6227. "name": c.name,
  6228. })
  6229. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6230. }
  6231. // Do executes the "container.projects.locations.clusters.nodePools.rollback" call.
  6232. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6233. // status code is an error. Response headers are in either
  6234. // *Operation.ServerResponse.Header or (if a response was returned at
  6235. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6236. // to check whether the returned error was because
  6237. // http.StatusNotModified was returned.
  6238. func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6239. gensupport.SetOptions(c.urlParams_, opts...)
  6240. res, err := c.doRequest("json")
  6241. if res != nil && res.StatusCode == http.StatusNotModified {
  6242. if res.Body != nil {
  6243. res.Body.Close()
  6244. }
  6245. return nil, &googleapi.Error{
  6246. Code: res.StatusCode,
  6247. Header: res.Header,
  6248. }
  6249. }
  6250. if err != nil {
  6251. return nil, err
  6252. }
  6253. defer googleapi.CloseBody(res)
  6254. if err := googleapi.CheckResponse(res); err != nil {
  6255. return nil, err
  6256. }
  6257. ret := &Operation{
  6258. ServerResponse: googleapi.ServerResponse{
  6259. Header: res.Header,
  6260. HTTPStatusCode: res.StatusCode,
  6261. },
  6262. }
  6263. target := &ret
  6264. if err := gensupport.DecodeResponse(target, res); err != nil {
  6265. return nil, err
  6266. }
  6267. return ret, nil
  6268. // {
  6269. // "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.",
  6270. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback",
  6271. // "httpMethod": "POST",
  6272. // "id": "container.projects.locations.clusters.nodePools.rollback",
  6273. // "parameterOrder": [
  6274. // "name"
  6275. // ],
  6276. // "parameters": {
  6277. // "name": {
  6278. // "description": "The name (project, location, cluster, node pool id) of the node poll to\nrollback upgrade.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.",
  6279. // "location": "path",
  6280. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$",
  6281. // "required": true,
  6282. // "type": "string"
  6283. // }
  6284. // },
  6285. // "path": "v1/{+name}:rollback",
  6286. // "request": {
  6287. // "$ref": "RollbackNodePoolUpgradeRequest"
  6288. // },
  6289. // "response": {
  6290. // "$ref": "Operation"
  6291. // },
  6292. // "scopes": [
  6293. // "https://www.googleapis.com/auth/cloud-platform"
  6294. // ]
  6295. // }
  6296. }
  6297. // method id "container.projects.locations.clusters.nodePools.setAutoscaling":
  6298. type ProjectsLocationsClustersNodePoolsSetAutoscalingCall struct {
  6299. s *Service
  6300. name string
  6301. setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest
  6302. urlParams_ gensupport.URLParams
  6303. ctx_ context.Context
  6304. header_ http.Header
  6305. }
  6306. // SetAutoscaling: Sets the autoscaling settings for a specific node
  6307. // pool.
  6308. func (r *ProjectsLocationsClustersNodePoolsService) SetAutoscaling(name string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall {
  6309. c := &ProjectsLocationsClustersNodePoolsSetAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6310. c.name = name
  6311. c.setnodepoolautoscalingrequest = setnodepoolautoscalingrequest
  6312. return c
  6313. }
  6314. // Fields allows partial responses to be retrieved. See
  6315. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6316. // for more information.
  6317. func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall {
  6318. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6319. return c
  6320. }
  6321. // Context sets the context to be used in this call's Do method. Any
  6322. // pending HTTP request will be aborted if the provided context is
  6323. // canceled.
  6324. func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall {
  6325. c.ctx_ = ctx
  6326. return c
  6327. }
  6328. // Header returns an http.Header that can be modified by the caller to
  6329. // add HTTP headers to the request.
  6330. func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Header() http.Header {
  6331. if c.header_ == nil {
  6332. c.header_ = make(http.Header)
  6333. }
  6334. return c.header_
  6335. }
  6336. func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) doRequest(alt string) (*http.Response, error) {
  6337. reqHeaders := make(http.Header)
  6338. for k, v := range c.header_ {
  6339. reqHeaders[k] = v
  6340. }
  6341. reqHeaders.Set("User-Agent", c.s.userAgent())
  6342. var body io.Reader = nil
  6343. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolautoscalingrequest)
  6344. if err != nil {
  6345. return nil, err
  6346. }
  6347. reqHeaders.Set("Content-Type", "application/json")
  6348. c.urlParams_.Set("alt", alt)
  6349. c.urlParams_.Set("prettyPrint", "false")
  6350. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setAutoscaling")
  6351. urls += "?" + c.urlParams_.Encode()
  6352. req, err := http.NewRequest("POST", urls, body)
  6353. if err != nil {
  6354. return nil, err
  6355. }
  6356. req.Header = reqHeaders
  6357. googleapi.Expand(req.URL, map[string]string{
  6358. "name": c.name,
  6359. })
  6360. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6361. }
  6362. // Do executes the "container.projects.locations.clusters.nodePools.setAutoscaling" call.
  6363. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6364. // status code is an error. Response headers are in either
  6365. // *Operation.ServerResponse.Header or (if a response was returned at
  6366. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6367. // to check whether the returned error was because
  6368. // http.StatusNotModified was returned.
  6369. func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6370. gensupport.SetOptions(c.urlParams_, opts...)
  6371. res, err := c.doRequest("json")
  6372. if res != nil && res.StatusCode == http.StatusNotModified {
  6373. if res.Body != nil {
  6374. res.Body.Close()
  6375. }
  6376. return nil, &googleapi.Error{
  6377. Code: res.StatusCode,
  6378. Header: res.Header,
  6379. }
  6380. }
  6381. if err != nil {
  6382. return nil, err
  6383. }
  6384. defer googleapi.CloseBody(res)
  6385. if err := googleapi.CheckResponse(res); err != nil {
  6386. return nil, err
  6387. }
  6388. ret := &Operation{
  6389. ServerResponse: googleapi.ServerResponse{
  6390. Header: res.Header,
  6391. HTTPStatusCode: res.StatusCode,
  6392. },
  6393. }
  6394. target := &ret
  6395. if err := gensupport.DecodeResponse(target, res); err != nil {
  6396. return nil, err
  6397. }
  6398. return ret, nil
  6399. // {
  6400. // "description": "Sets the autoscaling settings for a specific node pool.",
  6401. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setAutoscaling",
  6402. // "httpMethod": "POST",
  6403. // "id": "container.projects.locations.clusters.nodePools.setAutoscaling",
  6404. // "parameterOrder": [
  6405. // "name"
  6406. // ],
  6407. // "parameters": {
  6408. // "name": {
  6409. // "description": "The name (project, location, cluster, node pool) of the node pool to set\nautoscaler settings. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.",
  6410. // "location": "path",
  6411. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$",
  6412. // "required": true,
  6413. // "type": "string"
  6414. // }
  6415. // },
  6416. // "path": "v1/{+name}:setAutoscaling",
  6417. // "request": {
  6418. // "$ref": "SetNodePoolAutoscalingRequest"
  6419. // },
  6420. // "response": {
  6421. // "$ref": "Operation"
  6422. // },
  6423. // "scopes": [
  6424. // "https://www.googleapis.com/auth/cloud-platform"
  6425. // ]
  6426. // }
  6427. }
  6428. // method id "container.projects.locations.clusters.nodePools.setManagement":
  6429. type ProjectsLocationsClustersNodePoolsSetManagementCall struct {
  6430. s *Service
  6431. name string
  6432. setnodepoolmanagementrequest *SetNodePoolManagementRequest
  6433. urlParams_ gensupport.URLParams
  6434. ctx_ context.Context
  6435. header_ http.Header
  6436. }
  6437. // SetManagement: Sets the NodeManagement options for a node pool.
  6438. func (r *ProjectsLocationsClustersNodePoolsService) SetManagement(name string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsLocationsClustersNodePoolsSetManagementCall {
  6439. c := &ProjectsLocationsClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6440. c.name = name
  6441. c.setnodepoolmanagementrequest = setnodepoolmanagementrequest
  6442. return c
  6443. }
  6444. // Fields allows partial responses to be retrieved. See
  6445. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6446. // for more information.
  6447. func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetManagementCall {
  6448. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6449. return c
  6450. }
  6451. // Context sets the context to be used in this call's Do method. Any
  6452. // pending HTTP request will be aborted if the provided context is
  6453. // canceled.
  6454. func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetManagementCall {
  6455. c.ctx_ = ctx
  6456. return c
  6457. }
  6458. // Header returns an http.Header that can be modified by the caller to
  6459. // add HTTP headers to the request.
  6460. func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Header() http.Header {
  6461. if c.header_ == nil {
  6462. c.header_ = make(http.Header)
  6463. }
  6464. return c.header_
  6465. }
  6466. func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) {
  6467. reqHeaders := make(http.Header)
  6468. for k, v := range c.header_ {
  6469. reqHeaders[k] = v
  6470. }
  6471. reqHeaders.Set("User-Agent", c.s.userAgent())
  6472. var body io.Reader = nil
  6473. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolmanagementrequest)
  6474. if err != nil {
  6475. return nil, err
  6476. }
  6477. reqHeaders.Set("Content-Type", "application/json")
  6478. c.urlParams_.Set("alt", alt)
  6479. c.urlParams_.Set("prettyPrint", "false")
  6480. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setManagement")
  6481. urls += "?" + c.urlParams_.Encode()
  6482. req, err := http.NewRequest("POST", urls, body)
  6483. if err != nil {
  6484. return nil, err
  6485. }
  6486. req.Header = reqHeaders
  6487. googleapi.Expand(req.URL, map[string]string{
  6488. "name": c.name,
  6489. })
  6490. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6491. }
  6492. // Do executes the "container.projects.locations.clusters.nodePools.setManagement" call.
  6493. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6494. // status code is an error. Response headers are in either
  6495. // *Operation.ServerResponse.Header or (if a response was returned at
  6496. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6497. // to check whether the returned error was because
  6498. // http.StatusNotModified was returned.
  6499. func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6500. gensupport.SetOptions(c.urlParams_, opts...)
  6501. res, err := c.doRequest("json")
  6502. if res != nil && res.StatusCode == http.StatusNotModified {
  6503. if res.Body != nil {
  6504. res.Body.Close()
  6505. }
  6506. return nil, &googleapi.Error{
  6507. Code: res.StatusCode,
  6508. Header: res.Header,
  6509. }
  6510. }
  6511. if err != nil {
  6512. return nil, err
  6513. }
  6514. defer googleapi.CloseBody(res)
  6515. if err := googleapi.CheckResponse(res); err != nil {
  6516. return nil, err
  6517. }
  6518. ret := &Operation{
  6519. ServerResponse: googleapi.ServerResponse{
  6520. Header: res.Header,
  6521. HTTPStatusCode: res.StatusCode,
  6522. },
  6523. }
  6524. target := &ret
  6525. if err := gensupport.DecodeResponse(target, res); err != nil {
  6526. return nil, err
  6527. }
  6528. return ret, nil
  6529. // {
  6530. // "description": "Sets the NodeManagement options for a node pool.",
  6531. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setManagement",
  6532. // "httpMethod": "POST",
  6533. // "id": "container.projects.locations.clusters.nodePools.setManagement",
  6534. // "parameterOrder": [
  6535. // "name"
  6536. // ],
  6537. // "parameters": {
  6538. // "name": {
  6539. // "description": "The name (project, location, cluster, node pool id) of the node pool to set\nmanagement properties. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.",
  6540. // "location": "path",
  6541. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$",
  6542. // "required": true,
  6543. // "type": "string"
  6544. // }
  6545. // },
  6546. // "path": "v1/{+name}:setManagement",
  6547. // "request": {
  6548. // "$ref": "SetNodePoolManagementRequest"
  6549. // },
  6550. // "response": {
  6551. // "$ref": "Operation"
  6552. // },
  6553. // "scopes": [
  6554. // "https://www.googleapis.com/auth/cloud-platform"
  6555. // ]
  6556. // }
  6557. }
  6558. // method id "container.projects.locations.clusters.nodePools.setSize":
  6559. type ProjectsLocationsClustersNodePoolsSetSizeCall struct {
  6560. s *Service
  6561. name string
  6562. setnodepoolsizerequest *SetNodePoolSizeRequest
  6563. urlParams_ gensupport.URLParams
  6564. ctx_ context.Context
  6565. header_ http.Header
  6566. }
  6567. // SetSize: Sets the size for a specific node pool.
  6568. func (r *ProjectsLocationsClustersNodePoolsService) SetSize(name string, setnodepoolsizerequest *SetNodePoolSizeRequest) *ProjectsLocationsClustersNodePoolsSetSizeCall {
  6569. c := &ProjectsLocationsClustersNodePoolsSetSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6570. c.name = name
  6571. c.setnodepoolsizerequest = setnodepoolsizerequest
  6572. return c
  6573. }
  6574. // Fields allows partial responses to be retrieved. See
  6575. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6576. // for more information.
  6577. func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetSizeCall {
  6578. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6579. return c
  6580. }
  6581. // Context sets the context to be used in this call's Do method. Any
  6582. // pending HTTP request will be aborted if the provided context is
  6583. // canceled.
  6584. func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetSizeCall {
  6585. c.ctx_ = ctx
  6586. return c
  6587. }
  6588. // Header returns an http.Header that can be modified by the caller to
  6589. // add HTTP headers to the request.
  6590. func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Header() http.Header {
  6591. if c.header_ == nil {
  6592. c.header_ = make(http.Header)
  6593. }
  6594. return c.header_
  6595. }
  6596. func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) {
  6597. reqHeaders := make(http.Header)
  6598. for k, v := range c.header_ {
  6599. reqHeaders[k] = v
  6600. }
  6601. reqHeaders.Set("User-Agent", c.s.userAgent())
  6602. var body io.Reader = nil
  6603. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolsizerequest)
  6604. if err != nil {
  6605. return nil, err
  6606. }
  6607. reqHeaders.Set("Content-Type", "application/json")
  6608. c.urlParams_.Set("alt", alt)
  6609. c.urlParams_.Set("prettyPrint", "false")
  6610. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setSize")
  6611. urls += "?" + c.urlParams_.Encode()
  6612. req, err := http.NewRequest("POST", urls, body)
  6613. if err != nil {
  6614. return nil, err
  6615. }
  6616. req.Header = reqHeaders
  6617. googleapi.Expand(req.URL, map[string]string{
  6618. "name": c.name,
  6619. })
  6620. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6621. }
  6622. // Do executes the "container.projects.locations.clusters.nodePools.setSize" call.
  6623. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6624. // status code is an error. Response headers are in either
  6625. // *Operation.ServerResponse.Header or (if a response was returned at
  6626. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6627. // to check whether the returned error was because
  6628. // http.StatusNotModified was returned.
  6629. func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6630. gensupport.SetOptions(c.urlParams_, opts...)
  6631. res, err := c.doRequest("json")
  6632. if res != nil && res.StatusCode == http.StatusNotModified {
  6633. if res.Body != nil {
  6634. res.Body.Close()
  6635. }
  6636. return nil, &googleapi.Error{
  6637. Code: res.StatusCode,
  6638. Header: res.Header,
  6639. }
  6640. }
  6641. if err != nil {
  6642. return nil, err
  6643. }
  6644. defer googleapi.CloseBody(res)
  6645. if err := googleapi.CheckResponse(res); err != nil {
  6646. return nil, err
  6647. }
  6648. ret := &Operation{
  6649. ServerResponse: googleapi.ServerResponse{
  6650. Header: res.Header,
  6651. HTTPStatusCode: res.StatusCode,
  6652. },
  6653. }
  6654. target := &ret
  6655. if err := gensupport.DecodeResponse(target, res); err != nil {
  6656. return nil, err
  6657. }
  6658. return ret, nil
  6659. // {
  6660. // "description": "Sets the size for a specific node pool.",
  6661. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setSize",
  6662. // "httpMethod": "POST",
  6663. // "id": "container.projects.locations.clusters.nodePools.setSize",
  6664. // "parameterOrder": [
  6665. // "name"
  6666. // ],
  6667. // "parameters": {
  6668. // "name": {
  6669. // "description": "The name (project, location, cluster, node pool id) of the node pool to set\nsize.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.",
  6670. // "location": "path",
  6671. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$",
  6672. // "required": true,
  6673. // "type": "string"
  6674. // }
  6675. // },
  6676. // "path": "v1/{+name}:setSize",
  6677. // "request": {
  6678. // "$ref": "SetNodePoolSizeRequest"
  6679. // },
  6680. // "response": {
  6681. // "$ref": "Operation"
  6682. // },
  6683. // "scopes": [
  6684. // "https://www.googleapis.com/auth/cloud-platform"
  6685. // ]
  6686. // }
  6687. }
  6688. // method id "container.projects.locations.clusters.nodePools.update":
  6689. type ProjectsLocationsClustersNodePoolsUpdateCall struct {
  6690. s *Service
  6691. name string
  6692. updatenodepoolrequest *UpdateNodePoolRequest
  6693. urlParams_ gensupport.URLParams
  6694. ctx_ context.Context
  6695. header_ http.Header
  6696. }
  6697. // Update: Updates the version and/or image type for a specific node
  6698. // pool.
  6699. func (r *ProjectsLocationsClustersNodePoolsService) Update(name string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsLocationsClustersNodePoolsUpdateCall {
  6700. c := &ProjectsLocationsClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6701. c.name = name
  6702. c.updatenodepoolrequest = updatenodepoolrequest
  6703. return c
  6704. }
  6705. // Fields allows partial responses to be retrieved. See
  6706. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6707. // for more information.
  6708. func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsUpdateCall {
  6709. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6710. return c
  6711. }
  6712. // Context sets the context to be used in this call's Do method. Any
  6713. // pending HTTP request will be aborted if the provided context is
  6714. // canceled.
  6715. func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsUpdateCall {
  6716. c.ctx_ = ctx
  6717. return c
  6718. }
  6719. // Header returns an http.Header that can be modified by the caller to
  6720. // add HTTP headers to the request.
  6721. func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Header() http.Header {
  6722. if c.header_ == nil {
  6723. c.header_ = make(http.Header)
  6724. }
  6725. return c.header_
  6726. }
  6727. func (c *ProjectsLocationsClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) {
  6728. reqHeaders := make(http.Header)
  6729. for k, v := range c.header_ {
  6730. reqHeaders[k] = v
  6731. }
  6732. reqHeaders.Set("User-Agent", c.s.userAgent())
  6733. var body io.Reader = nil
  6734. body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatenodepoolrequest)
  6735. if err != nil {
  6736. return nil, err
  6737. }
  6738. reqHeaders.Set("Content-Type", "application/json")
  6739. c.urlParams_.Set("alt", alt)
  6740. c.urlParams_.Set("prettyPrint", "false")
  6741. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6742. urls += "?" + c.urlParams_.Encode()
  6743. req, err := http.NewRequest("PUT", urls, body)
  6744. if err != nil {
  6745. return nil, err
  6746. }
  6747. req.Header = reqHeaders
  6748. googleapi.Expand(req.URL, map[string]string{
  6749. "name": c.name,
  6750. })
  6751. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6752. }
  6753. // Do executes the "container.projects.locations.clusters.nodePools.update" call.
  6754. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6755. // status code is an error. Response headers are in either
  6756. // *Operation.ServerResponse.Header or (if a response was returned at
  6757. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6758. // to check whether the returned error was because
  6759. // http.StatusNotModified was returned.
  6760. func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6761. gensupport.SetOptions(c.urlParams_, opts...)
  6762. res, err := c.doRequest("json")
  6763. if res != nil && res.StatusCode == http.StatusNotModified {
  6764. if res.Body != nil {
  6765. res.Body.Close()
  6766. }
  6767. return nil, &googleapi.Error{
  6768. Code: res.StatusCode,
  6769. Header: res.Header,
  6770. }
  6771. }
  6772. if err != nil {
  6773. return nil, err
  6774. }
  6775. defer googleapi.CloseBody(res)
  6776. if err := googleapi.CheckResponse(res); err != nil {
  6777. return nil, err
  6778. }
  6779. ret := &Operation{
  6780. ServerResponse: googleapi.ServerResponse{
  6781. Header: res.Header,
  6782. HTTPStatusCode: res.StatusCode,
  6783. },
  6784. }
  6785. target := &ret
  6786. if err := gensupport.DecodeResponse(target, res); err != nil {
  6787. return nil, err
  6788. }
  6789. return ret, nil
  6790. // {
  6791. // "description": "Updates the version and/or image type for a specific node pool.",
  6792. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}",
  6793. // "httpMethod": "PUT",
  6794. // "id": "container.projects.locations.clusters.nodePools.update",
  6795. // "parameterOrder": [
  6796. // "name"
  6797. // ],
  6798. // "parameters": {
  6799. // "name": {
  6800. // "description": "The name (project, location, cluster, node pool) of the node pool to\nupdate. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.",
  6801. // "location": "path",
  6802. // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$",
  6803. // "required": true,
  6804. // "type": "string"
  6805. // }
  6806. // },
  6807. // "path": "v1/{+name}",
  6808. // "request": {
  6809. // "$ref": "UpdateNodePoolRequest"
  6810. // },
  6811. // "response": {
  6812. // "$ref": "Operation"
  6813. // },
  6814. // "scopes": [
  6815. // "https://www.googleapis.com/auth/cloud-platform"
  6816. // ]
  6817. // }
  6818. }
  6819. // method id "container.projects.locations.operations.cancel":
  6820. type ProjectsLocationsOperationsCancelCall struct {
  6821. s *Service
  6822. name string
  6823. canceloperationrequest *CancelOperationRequest
  6824. urlParams_ gensupport.URLParams
  6825. ctx_ context.Context
  6826. header_ http.Header
  6827. }
  6828. // Cancel: Cancels the specified operation.
  6829. func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  6830. c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6831. c.name = name
  6832. c.canceloperationrequest = canceloperationrequest
  6833. return c
  6834. }
  6835. // Fields allows partial responses to be retrieved. See
  6836. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6837. // for more information.
  6838. func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  6839. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6840. return c
  6841. }
  6842. // Context sets the context to be used in this call's Do method. Any
  6843. // pending HTTP request will be aborted if the provided context is
  6844. // canceled.
  6845. func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  6846. c.ctx_ = ctx
  6847. return c
  6848. }
  6849. // Header returns an http.Header that can be modified by the caller to
  6850. // add HTTP headers to the request.
  6851. func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  6852. if c.header_ == nil {
  6853. c.header_ = make(http.Header)
  6854. }
  6855. return c.header_
  6856. }
  6857. func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  6858. reqHeaders := make(http.Header)
  6859. for k, v := range c.header_ {
  6860. reqHeaders[k] = v
  6861. }
  6862. reqHeaders.Set("User-Agent", c.s.userAgent())
  6863. var body io.Reader = nil
  6864. body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  6865. if err != nil {
  6866. return nil, err
  6867. }
  6868. reqHeaders.Set("Content-Type", "application/json")
  6869. c.urlParams_.Set("alt", alt)
  6870. c.urlParams_.Set("prettyPrint", "false")
  6871. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  6872. urls += "?" + c.urlParams_.Encode()
  6873. req, err := http.NewRequest("POST", urls, body)
  6874. if err != nil {
  6875. return nil, err
  6876. }
  6877. req.Header = reqHeaders
  6878. googleapi.Expand(req.URL, map[string]string{
  6879. "name": c.name,
  6880. })
  6881. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6882. }
  6883. // Do executes the "container.projects.locations.operations.cancel" call.
  6884. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  6885. // code is an error. Response headers are in either
  6886. // *Empty.ServerResponse.Header or (if a response was returned at all)
  6887. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6888. // check whether the returned error was because http.StatusNotModified
  6889. // was returned.
  6890. func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6891. gensupport.SetOptions(c.urlParams_, opts...)
  6892. res, err := c.doRequest("json")
  6893. if res != nil && res.StatusCode == http.StatusNotModified {
  6894. if res.Body != nil {
  6895. res.Body.Close()
  6896. }
  6897. return nil, &googleapi.Error{
  6898. Code: res.StatusCode,
  6899. Header: res.Header,
  6900. }
  6901. }
  6902. if err != nil {
  6903. return nil, err
  6904. }
  6905. defer googleapi.CloseBody(res)
  6906. if err := googleapi.CheckResponse(res); err != nil {
  6907. return nil, err
  6908. }
  6909. ret := &Empty{
  6910. ServerResponse: googleapi.ServerResponse{
  6911. Header: res.Header,
  6912. HTTPStatusCode: res.StatusCode,
  6913. },
  6914. }
  6915. target := &ret
  6916. if err := gensupport.DecodeResponse(target, res); err != nil {
  6917. return nil, err
  6918. }
  6919. return ret, nil
  6920. // {
  6921. // "description": "Cancels the specified operation.",
  6922. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
  6923. // "httpMethod": "POST",
  6924. // "id": "container.projects.locations.operations.cancel",
  6925. // "parameterOrder": [
  6926. // "name"
  6927. // ],
  6928. // "parameters": {
  6929. // "name": {
  6930. // "description": "The name (project, location, operation id) of the operation to cancel.\nSpecified in the format 'projects/*/locations/*/operations/*'.",
  6931. // "location": "path",
  6932. // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
  6933. // "required": true,
  6934. // "type": "string"
  6935. // }
  6936. // },
  6937. // "path": "v1/{+name}:cancel",
  6938. // "request": {
  6939. // "$ref": "CancelOperationRequest"
  6940. // },
  6941. // "response": {
  6942. // "$ref": "Empty"
  6943. // },
  6944. // "scopes": [
  6945. // "https://www.googleapis.com/auth/cloud-platform"
  6946. // ]
  6947. // }
  6948. }
  6949. // method id "container.projects.locations.operations.get":
  6950. type ProjectsLocationsOperationsGetCall struct {
  6951. s *Service
  6952. name string
  6953. urlParams_ gensupport.URLParams
  6954. ifNoneMatch_ string
  6955. ctx_ context.Context
  6956. header_ http.Header
  6957. }
  6958. // Get: Gets the specified operation.
  6959. func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  6960. c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6961. c.name = name
  6962. return c
  6963. }
  6964. // OperationId sets the optional parameter "operationId": Deprecated.
  6965. // The server-assigned `name` of the operation.
  6966. // This field has been deprecated and replaced by the name field.
  6967. func (c *ProjectsLocationsOperationsGetCall) OperationId(operationId string) *ProjectsLocationsOperationsGetCall {
  6968. c.urlParams_.Set("operationId", operationId)
  6969. return c
  6970. }
  6971. // ProjectId sets the optional parameter "projectId": Deprecated. The
  6972. // Google Developers Console [project ID or
  6973. // project
  6974. // number](https://support.google.com/cloud/answer/6158840).
  6975. // This
  6976. // field has been deprecated and replaced by the name field.
  6977. func (c *ProjectsLocationsOperationsGetCall) ProjectId(projectId string) *ProjectsLocationsOperationsGetCall {
  6978. c.urlParams_.Set("projectId", projectId)
  6979. return c
  6980. }
  6981. // Zone sets the optional parameter "zone": Deprecated. The name of the
  6982. // Google Compute Engine
  6983. // [zone](/compute/docs/zones#available) in which the
  6984. // cluster
  6985. // resides.
  6986. // This field has been deprecated and replaced by the name field.
  6987. func (c *ProjectsLocationsOperationsGetCall) Zone(zone string) *ProjectsLocationsOperationsGetCall {
  6988. c.urlParams_.Set("zone", zone)
  6989. return c
  6990. }
  6991. // Fields allows partial responses to be retrieved. See
  6992. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6993. // for more information.
  6994. func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  6995. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6996. return c
  6997. }
  6998. // IfNoneMatch sets the optional parameter which makes the operation
  6999. // fail if the object's ETag matches the given value. This is useful for
  7000. // getting updates only after the object has changed since the last
  7001. // request. Use googleapi.IsNotModified to check whether the response
  7002. // error from Do is the result of In-None-Match.
  7003. func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  7004. c.ifNoneMatch_ = entityTag
  7005. return c
  7006. }
  7007. // Context sets the context to be used in this call's Do method. Any
  7008. // pending HTTP request will be aborted if the provided context is
  7009. // canceled.
  7010. func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  7011. c.ctx_ = ctx
  7012. return c
  7013. }
  7014. // Header returns an http.Header that can be modified by the caller to
  7015. // add HTTP headers to the request.
  7016. func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  7017. if c.header_ == nil {
  7018. c.header_ = make(http.Header)
  7019. }
  7020. return c.header_
  7021. }
  7022. func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  7023. reqHeaders := make(http.Header)
  7024. for k, v := range c.header_ {
  7025. reqHeaders[k] = v
  7026. }
  7027. reqHeaders.Set("User-Agent", c.s.userAgent())
  7028. if c.ifNoneMatch_ != "" {
  7029. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7030. }
  7031. var body io.Reader = nil
  7032. c.urlParams_.Set("alt", alt)
  7033. c.urlParams_.Set("prettyPrint", "false")
  7034. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7035. urls += "?" + c.urlParams_.Encode()
  7036. req, err := http.NewRequest("GET", urls, body)
  7037. if err != nil {
  7038. return nil, err
  7039. }
  7040. req.Header = reqHeaders
  7041. googleapi.Expand(req.URL, map[string]string{
  7042. "name": c.name,
  7043. })
  7044. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7045. }
  7046. // Do executes the "container.projects.locations.operations.get" call.
  7047. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7048. // status code is an error. Response headers are in either
  7049. // *Operation.ServerResponse.Header or (if a response was returned at
  7050. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7051. // to check whether the returned error was because
  7052. // http.StatusNotModified was returned.
  7053. func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7054. gensupport.SetOptions(c.urlParams_, opts...)
  7055. res, err := c.doRequest("json")
  7056. if res != nil && res.StatusCode == http.StatusNotModified {
  7057. if res.Body != nil {
  7058. res.Body.Close()
  7059. }
  7060. return nil, &googleapi.Error{
  7061. Code: res.StatusCode,
  7062. Header: res.Header,
  7063. }
  7064. }
  7065. if err != nil {
  7066. return nil, err
  7067. }
  7068. defer googleapi.CloseBody(res)
  7069. if err := googleapi.CheckResponse(res); err != nil {
  7070. return nil, err
  7071. }
  7072. ret := &Operation{
  7073. ServerResponse: googleapi.ServerResponse{
  7074. Header: res.Header,
  7075. HTTPStatusCode: res.StatusCode,
  7076. },
  7077. }
  7078. target := &ret
  7079. if err := gensupport.DecodeResponse(target, res); err != nil {
  7080. return nil, err
  7081. }
  7082. return ret, nil
  7083. // {
  7084. // "description": "Gets the specified operation.",
  7085. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
  7086. // "httpMethod": "GET",
  7087. // "id": "container.projects.locations.operations.get",
  7088. // "parameterOrder": [
  7089. // "name"
  7090. // ],
  7091. // "parameters": {
  7092. // "name": {
  7093. // "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.",
  7094. // "location": "path",
  7095. // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
  7096. // "required": true,
  7097. // "type": "string"
  7098. // },
  7099. // "operationId": {
  7100. // "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.",
  7101. // "location": "query",
  7102. // "type": "string"
  7103. // },
  7104. // "projectId": {
  7105. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  7106. // "location": "query",
  7107. // "type": "string"
  7108. // },
  7109. // "zone": {
  7110. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  7111. // "location": "query",
  7112. // "type": "string"
  7113. // }
  7114. // },
  7115. // "path": "v1/{+name}",
  7116. // "response": {
  7117. // "$ref": "Operation"
  7118. // },
  7119. // "scopes": [
  7120. // "https://www.googleapis.com/auth/cloud-platform"
  7121. // ]
  7122. // }
  7123. }
  7124. // method id "container.projects.locations.operations.list":
  7125. type ProjectsLocationsOperationsListCall struct {
  7126. s *Service
  7127. parent string
  7128. urlParams_ gensupport.URLParams
  7129. ifNoneMatch_ string
  7130. ctx_ context.Context
  7131. header_ http.Header
  7132. }
  7133. // List: Lists all operations in a project in a specific zone or all
  7134. // zones.
  7135. func (r *ProjectsLocationsOperationsService) List(parent string) *ProjectsLocationsOperationsListCall {
  7136. c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7137. c.parent = parent
  7138. return c
  7139. }
  7140. // ProjectId sets the optional parameter "projectId": Deprecated. The
  7141. // Google Developers Console [project ID or
  7142. // project
  7143. // number](https://support.google.com/cloud/answer/6158840).
  7144. // This
  7145. // field has been deprecated and replaced by the parent field.
  7146. func (c *ProjectsLocationsOperationsListCall) ProjectId(projectId string) *ProjectsLocationsOperationsListCall {
  7147. c.urlParams_.Set("projectId", projectId)
  7148. return c
  7149. }
  7150. // Zone sets the optional parameter "zone": Deprecated. The name of the
  7151. // Google Compute Engine
  7152. // [zone](/compute/docs/zones#available) to return operations for, or
  7153. // `-` for
  7154. // all zones. This field has been deprecated and replaced by the parent
  7155. // field.
  7156. func (c *ProjectsLocationsOperationsListCall) Zone(zone string) *ProjectsLocationsOperationsListCall {
  7157. c.urlParams_.Set("zone", zone)
  7158. return c
  7159. }
  7160. // Fields allows partial responses to be retrieved. See
  7161. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7162. // for more information.
  7163. func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  7164. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7165. return c
  7166. }
  7167. // IfNoneMatch sets the optional parameter which makes the operation
  7168. // fail if the object's ETag matches the given value. This is useful for
  7169. // getting updates only after the object has changed since the last
  7170. // request. Use googleapi.IsNotModified to check whether the response
  7171. // error from Do is the result of In-None-Match.
  7172. func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  7173. c.ifNoneMatch_ = entityTag
  7174. return c
  7175. }
  7176. // Context sets the context to be used in this call's Do method. Any
  7177. // pending HTTP request will be aborted if the provided context is
  7178. // canceled.
  7179. func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  7180. c.ctx_ = ctx
  7181. return c
  7182. }
  7183. // Header returns an http.Header that can be modified by the caller to
  7184. // add HTTP headers to the request.
  7185. func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  7186. if c.header_ == nil {
  7187. c.header_ = make(http.Header)
  7188. }
  7189. return c.header_
  7190. }
  7191. func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  7192. reqHeaders := make(http.Header)
  7193. for k, v := range c.header_ {
  7194. reqHeaders[k] = v
  7195. }
  7196. reqHeaders.Set("User-Agent", c.s.userAgent())
  7197. if c.ifNoneMatch_ != "" {
  7198. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7199. }
  7200. var body io.Reader = nil
  7201. c.urlParams_.Set("alt", alt)
  7202. c.urlParams_.Set("prettyPrint", "false")
  7203. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/operations")
  7204. urls += "?" + c.urlParams_.Encode()
  7205. req, err := http.NewRequest("GET", urls, body)
  7206. if err != nil {
  7207. return nil, err
  7208. }
  7209. req.Header = reqHeaders
  7210. googleapi.Expand(req.URL, map[string]string{
  7211. "parent": c.parent,
  7212. })
  7213. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7214. }
  7215. // Do executes the "container.projects.locations.operations.list" call.
  7216. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  7217. // non-2xx status code is an error. Response headers are in either
  7218. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  7219. // returned at all) in error.(*googleapi.Error).Header. Use
  7220. // googleapi.IsNotModified to check whether the returned error was
  7221. // because http.StatusNotModified was returned.
  7222. func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  7223. gensupport.SetOptions(c.urlParams_, opts...)
  7224. res, err := c.doRequest("json")
  7225. if res != nil && res.StatusCode == http.StatusNotModified {
  7226. if res.Body != nil {
  7227. res.Body.Close()
  7228. }
  7229. return nil, &googleapi.Error{
  7230. Code: res.StatusCode,
  7231. Header: res.Header,
  7232. }
  7233. }
  7234. if err != nil {
  7235. return nil, err
  7236. }
  7237. defer googleapi.CloseBody(res)
  7238. if err := googleapi.CheckResponse(res); err != nil {
  7239. return nil, err
  7240. }
  7241. ret := &ListOperationsResponse{
  7242. ServerResponse: googleapi.ServerResponse{
  7243. Header: res.Header,
  7244. HTTPStatusCode: res.StatusCode,
  7245. },
  7246. }
  7247. target := &ret
  7248. if err := gensupport.DecodeResponse(target, res); err != nil {
  7249. return nil, err
  7250. }
  7251. return ret, nil
  7252. // {
  7253. // "description": "Lists all operations in a project in a specific zone or all zones.",
  7254. // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations",
  7255. // "httpMethod": "GET",
  7256. // "id": "container.projects.locations.operations.list",
  7257. // "parameterOrder": [
  7258. // "parent"
  7259. // ],
  7260. // "parameters": {
  7261. // "parent": {
  7262. // "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.",
  7263. // "location": "path",
  7264. // "pattern": "^projects/[^/]+/locations/[^/]+$",
  7265. // "required": true,
  7266. // "type": "string"
  7267. // },
  7268. // "projectId": {
  7269. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.",
  7270. // "location": "query",
  7271. // "type": "string"
  7272. // },
  7273. // "zone": {
  7274. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.",
  7275. // "location": "query",
  7276. // "type": "string"
  7277. // }
  7278. // },
  7279. // "path": "v1/{+parent}/operations",
  7280. // "response": {
  7281. // "$ref": "ListOperationsResponse"
  7282. // },
  7283. // "scopes": [
  7284. // "https://www.googleapis.com/auth/cloud-platform"
  7285. // ]
  7286. // }
  7287. }
  7288. // method id "container.projects.zones.getServerconfig":
  7289. type ProjectsZonesGetServerconfigCall struct {
  7290. s *Service
  7291. projectId string
  7292. zone string
  7293. urlParams_ gensupport.URLParams
  7294. ifNoneMatch_ string
  7295. ctx_ context.Context
  7296. header_ http.Header
  7297. }
  7298. // GetServerconfig: Returns configuration info about the Kubernetes
  7299. // Engine service.
  7300. func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *ProjectsZonesGetServerconfigCall {
  7301. c := &ProjectsZonesGetServerconfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7302. c.projectId = projectId
  7303. c.zone = zone
  7304. return c
  7305. }
  7306. // Name sets the optional parameter "name": The name (project and
  7307. // location) of the server config to get
  7308. // Specified in the format 'projects/*/locations/*'.
  7309. func (c *ProjectsZonesGetServerconfigCall) Name(name string) *ProjectsZonesGetServerconfigCall {
  7310. c.urlParams_.Set("name", name)
  7311. return c
  7312. }
  7313. // Fields allows partial responses to be retrieved. See
  7314. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7315. // for more information.
  7316. func (c *ProjectsZonesGetServerconfigCall) Fields(s ...googleapi.Field) *ProjectsZonesGetServerconfigCall {
  7317. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7318. return c
  7319. }
  7320. // IfNoneMatch sets the optional parameter which makes the operation
  7321. // fail if the object's ETag matches the given value. This is useful for
  7322. // getting updates only after the object has changed since the last
  7323. // request. Use googleapi.IsNotModified to check whether the response
  7324. // error from Do is the result of In-None-Match.
  7325. func (c *ProjectsZonesGetServerconfigCall) IfNoneMatch(entityTag string) *ProjectsZonesGetServerconfigCall {
  7326. c.ifNoneMatch_ = entityTag
  7327. return c
  7328. }
  7329. // Context sets the context to be used in this call's Do method. Any
  7330. // pending HTTP request will be aborted if the provided context is
  7331. // canceled.
  7332. func (c *ProjectsZonesGetServerconfigCall) Context(ctx context.Context) *ProjectsZonesGetServerconfigCall {
  7333. c.ctx_ = ctx
  7334. return c
  7335. }
  7336. // Header returns an http.Header that can be modified by the caller to
  7337. // add HTTP headers to the request.
  7338. func (c *ProjectsZonesGetServerconfigCall) Header() http.Header {
  7339. if c.header_ == nil {
  7340. c.header_ = make(http.Header)
  7341. }
  7342. return c.header_
  7343. }
  7344. func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) {
  7345. reqHeaders := make(http.Header)
  7346. for k, v := range c.header_ {
  7347. reqHeaders[k] = v
  7348. }
  7349. reqHeaders.Set("User-Agent", c.s.userAgent())
  7350. if c.ifNoneMatch_ != "" {
  7351. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7352. }
  7353. var body io.Reader = nil
  7354. c.urlParams_.Set("alt", alt)
  7355. c.urlParams_.Set("prettyPrint", "false")
  7356. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/serverconfig")
  7357. urls += "?" + c.urlParams_.Encode()
  7358. req, err := http.NewRequest("GET", urls, body)
  7359. if err != nil {
  7360. return nil, err
  7361. }
  7362. req.Header = reqHeaders
  7363. googleapi.Expand(req.URL, map[string]string{
  7364. "projectId": c.projectId,
  7365. "zone": c.zone,
  7366. })
  7367. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7368. }
  7369. // Do executes the "container.projects.zones.getServerconfig" call.
  7370. // Exactly one of *ServerConfig or error will be non-nil. Any non-2xx
  7371. // status code is an error. Response headers are in either
  7372. // *ServerConfig.ServerResponse.Header or (if a response was returned at
  7373. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7374. // to check whether the returned error was because
  7375. // http.StatusNotModified was returned.
  7376. func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, error) {
  7377. gensupport.SetOptions(c.urlParams_, opts...)
  7378. res, err := c.doRequest("json")
  7379. if res != nil && res.StatusCode == http.StatusNotModified {
  7380. if res.Body != nil {
  7381. res.Body.Close()
  7382. }
  7383. return nil, &googleapi.Error{
  7384. Code: res.StatusCode,
  7385. Header: res.Header,
  7386. }
  7387. }
  7388. if err != nil {
  7389. return nil, err
  7390. }
  7391. defer googleapi.CloseBody(res)
  7392. if err := googleapi.CheckResponse(res); err != nil {
  7393. return nil, err
  7394. }
  7395. ret := &ServerConfig{
  7396. ServerResponse: googleapi.ServerResponse{
  7397. Header: res.Header,
  7398. HTTPStatusCode: res.StatusCode,
  7399. },
  7400. }
  7401. target := &ret
  7402. if err := gensupport.DecodeResponse(target, res); err != nil {
  7403. return nil, err
  7404. }
  7405. return ret, nil
  7406. // {
  7407. // "description": "Returns configuration info about the Kubernetes Engine service.",
  7408. // "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig",
  7409. // "httpMethod": "GET",
  7410. // "id": "container.projects.zones.getServerconfig",
  7411. // "parameterOrder": [
  7412. // "projectId",
  7413. // "zone"
  7414. // ],
  7415. // "parameters": {
  7416. // "name": {
  7417. // "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.",
  7418. // "location": "query",
  7419. // "type": "string"
  7420. // },
  7421. // "projectId": {
  7422. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  7423. // "location": "path",
  7424. // "required": true,
  7425. // "type": "string"
  7426. // },
  7427. // "zone": {
  7428. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.",
  7429. // "location": "path",
  7430. // "required": true,
  7431. // "type": "string"
  7432. // }
  7433. // },
  7434. // "path": "v1/projects/{projectId}/zones/{zone}/serverconfig",
  7435. // "response": {
  7436. // "$ref": "ServerConfig"
  7437. // },
  7438. // "scopes": [
  7439. // "https://www.googleapis.com/auth/cloud-platform"
  7440. // ]
  7441. // }
  7442. }
  7443. // method id "container.projects.zones.clusters.addons":
  7444. type ProjectsZonesClustersAddonsCall struct {
  7445. s *Service
  7446. projectId string
  7447. zone string
  7448. clusterId string
  7449. setaddonsconfigrequest *SetAddonsConfigRequest
  7450. urlParams_ gensupport.URLParams
  7451. ctx_ context.Context
  7452. header_ http.Header
  7453. }
  7454. // Addons: Sets the addons for a specific cluster.
  7455. func (r *ProjectsZonesClustersService) Addons(projectId string, zone string, clusterId string, setaddonsconfigrequest *SetAddonsConfigRequest) *ProjectsZonesClustersAddonsCall {
  7456. c := &ProjectsZonesClustersAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7457. c.projectId = projectId
  7458. c.zone = zone
  7459. c.clusterId = clusterId
  7460. c.setaddonsconfigrequest = setaddonsconfigrequest
  7461. return c
  7462. }
  7463. // Fields allows partial responses to be retrieved. See
  7464. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7465. // for more information.
  7466. func (c *ProjectsZonesClustersAddonsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersAddonsCall {
  7467. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7468. return c
  7469. }
  7470. // Context sets the context to be used in this call's Do method. Any
  7471. // pending HTTP request will be aborted if the provided context is
  7472. // canceled.
  7473. func (c *ProjectsZonesClustersAddonsCall) Context(ctx context.Context) *ProjectsZonesClustersAddonsCall {
  7474. c.ctx_ = ctx
  7475. return c
  7476. }
  7477. // Header returns an http.Header that can be modified by the caller to
  7478. // add HTTP headers to the request.
  7479. func (c *ProjectsZonesClustersAddonsCall) Header() http.Header {
  7480. if c.header_ == nil {
  7481. c.header_ = make(http.Header)
  7482. }
  7483. return c.header_
  7484. }
  7485. func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response, error) {
  7486. reqHeaders := make(http.Header)
  7487. for k, v := range c.header_ {
  7488. reqHeaders[k] = v
  7489. }
  7490. reqHeaders.Set("User-Agent", c.s.userAgent())
  7491. var body io.Reader = nil
  7492. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setaddonsconfigrequest)
  7493. if err != nil {
  7494. return nil, err
  7495. }
  7496. reqHeaders.Set("Content-Type", "application/json")
  7497. c.urlParams_.Set("alt", alt)
  7498. c.urlParams_.Set("prettyPrint", "false")
  7499. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons")
  7500. urls += "?" + c.urlParams_.Encode()
  7501. req, err := http.NewRequest("POST", urls, body)
  7502. if err != nil {
  7503. return nil, err
  7504. }
  7505. req.Header = reqHeaders
  7506. googleapi.Expand(req.URL, map[string]string{
  7507. "projectId": c.projectId,
  7508. "zone": c.zone,
  7509. "clusterId": c.clusterId,
  7510. })
  7511. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7512. }
  7513. // Do executes the "container.projects.zones.clusters.addons" call.
  7514. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7515. // status code is an error. Response headers are in either
  7516. // *Operation.ServerResponse.Header or (if a response was returned at
  7517. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7518. // to check whether the returned error was because
  7519. // http.StatusNotModified was returned.
  7520. func (c *ProjectsZonesClustersAddonsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7521. gensupport.SetOptions(c.urlParams_, opts...)
  7522. res, err := c.doRequest("json")
  7523. if res != nil && res.StatusCode == http.StatusNotModified {
  7524. if res.Body != nil {
  7525. res.Body.Close()
  7526. }
  7527. return nil, &googleapi.Error{
  7528. Code: res.StatusCode,
  7529. Header: res.Header,
  7530. }
  7531. }
  7532. if err != nil {
  7533. return nil, err
  7534. }
  7535. defer googleapi.CloseBody(res)
  7536. if err := googleapi.CheckResponse(res); err != nil {
  7537. return nil, err
  7538. }
  7539. ret := &Operation{
  7540. ServerResponse: googleapi.ServerResponse{
  7541. Header: res.Header,
  7542. HTTPStatusCode: res.StatusCode,
  7543. },
  7544. }
  7545. target := &ret
  7546. if err := gensupport.DecodeResponse(target, res); err != nil {
  7547. return nil, err
  7548. }
  7549. return ret, nil
  7550. // {
  7551. // "description": "Sets the addons for a specific cluster.",
  7552. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons",
  7553. // "httpMethod": "POST",
  7554. // "id": "container.projects.zones.clusters.addons",
  7555. // "parameterOrder": [
  7556. // "projectId",
  7557. // "zone",
  7558. // "clusterId"
  7559. // ],
  7560. // "parameters": {
  7561. // "clusterId": {
  7562. // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.",
  7563. // "location": "path",
  7564. // "required": true,
  7565. // "type": "string"
  7566. // },
  7567. // "projectId": {
  7568. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  7569. // "location": "path",
  7570. // "required": true,
  7571. // "type": "string"
  7572. // },
  7573. // "zone": {
  7574. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  7575. // "location": "path",
  7576. // "required": true,
  7577. // "type": "string"
  7578. // }
  7579. // },
  7580. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons",
  7581. // "request": {
  7582. // "$ref": "SetAddonsConfigRequest"
  7583. // },
  7584. // "response": {
  7585. // "$ref": "Operation"
  7586. // },
  7587. // "scopes": [
  7588. // "https://www.googleapis.com/auth/cloud-platform"
  7589. // ]
  7590. // }
  7591. }
  7592. // method id "container.projects.zones.clusters.completeIpRotation":
  7593. type ProjectsZonesClustersCompleteIpRotationCall struct {
  7594. s *Service
  7595. projectId string
  7596. zone string
  7597. clusterId string
  7598. completeiprotationrequest *CompleteIPRotationRequest
  7599. urlParams_ gensupport.URLParams
  7600. ctx_ context.Context
  7601. header_ http.Header
  7602. }
  7603. // CompleteIpRotation: Completes master IP rotation.
  7604. func (r *ProjectsZonesClustersService) CompleteIpRotation(projectId string, zone string, clusterId string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsZonesClustersCompleteIpRotationCall {
  7605. c := &ProjectsZonesClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7606. c.projectId = projectId
  7607. c.zone = zone
  7608. c.clusterId = clusterId
  7609. c.completeiprotationrequest = completeiprotationrequest
  7610. return c
  7611. }
  7612. // Fields allows partial responses to be retrieved. See
  7613. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7614. // for more information.
  7615. func (c *ProjectsZonesClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCompleteIpRotationCall {
  7616. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7617. return c
  7618. }
  7619. // Context sets the context to be used in this call's Do method. Any
  7620. // pending HTTP request will be aborted if the provided context is
  7621. // canceled.
  7622. func (c *ProjectsZonesClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersCompleteIpRotationCall {
  7623. c.ctx_ = ctx
  7624. return c
  7625. }
  7626. // Header returns an http.Header that can be modified by the caller to
  7627. // add HTTP headers to the request.
  7628. func (c *ProjectsZonesClustersCompleteIpRotationCall) Header() http.Header {
  7629. if c.header_ == nil {
  7630. c.header_ = make(http.Header)
  7631. }
  7632. return c.header_
  7633. }
  7634. func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) {
  7635. reqHeaders := make(http.Header)
  7636. for k, v := range c.header_ {
  7637. reqHeaders[k] = v
  7638. }
  7639. reqHeaders.Set("User-Agent", c.s.userAgent())
  7640. var body io.Reader = nil
  7641. body, err := googleapi.WithoutDataWrapper.JSONReader(c.completeiprotationrequest)
  7642. if err != nil {
  7643. return nil, err
  7644. }
  7645. reqHeaders.Set("Content-Type", "application/json")
  7646. c.urlParams_.Set("alt", alt)
  7647. c.urlParams_.Set("prettyPrint", "false")
  7648. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation")
  7649. urls += "?" + c.urlParams_.Encode()
  7650. req, err := http.NewRequest("POST", urls, body)
  7651. if err != nil {
  7652. return nil, err
  7653. }
  7654. req.Header = reqHeaders
  7655. googleapi.Expand(req.URL, map[string]string{
  7656. "projectId": c.projectId,
  7657. "zone": c.zone,
  7658. "clusterId": c.clusterId,
  7659. })
  7660. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7661. }
  7662. // Do executes the "container.projects.zones.clusters.completeIpRotation" call.
  7663. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7664. // status code is an error. Response headers are in either
  7665. // *Operation.ServerResponse.Header or (if a response was returned at
  7666. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7667. // to check whether the returned error was because
  7668. // http.StatusNotModified was returned.
  7669. func (c *ProjectsZonesClustersCompleteIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7670. gensupport.SetOptions(c.urlParams_, opts...)
  7671. res, err := c.doRequest("json")
  7672. if res != nil && res.StatusCode == http.StatusNotModified {
  7673. if res.Body != nil {
  7674. res.Body.Close()
  7675. }
  7676. return nil, &googleapi.Error{
  7677. Code: res.StatusCode,
  7678. Header: res.Header,
  7679. }
  7680. }
  7681. if err != nil {
  7682. return nil, err
  7683. }
  7684. defer googleapi.CloseBody(res)
  7685. if err := googleapi.CheckResponse(res); err != nil {
  7686. return nil, err
  7687. }
  7688. ret := &Operation{
  7689. ServerResponse: googleapi.ServerResponse{
  7690. Header: res.Header,
  7691. HTTPStatusCode: res.StatusCode,
  7692. },
  7693. }
  7694. target := &ret
  7695. if err := gensupport.DecodeResponse(target, res); err != nil {
  7696. return nil, err
  7697. }
  7698. return ret, nil
  7699. // {
  7700. // "description": "Completes master IP rotation.",
  7701. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation",
  7702. // "httpMethod": "POST",
  7703. // "id": "container.projects.zones.clusters.completeIpRotation",
  7704. // "parameterOrder": [
  7705. // "projectId",
  7706. // "zone",
  7707. // "clusterId"
  7708. // ],
  7709. // "parameters": {
  7710. // "clusterId": {
  7711. // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.",
  7712. // "location": "path",
  7713. // "required": true,
  7714. // "type": "string"
  7715. // },
  7716. // "projectId": {
  7717. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.",
  7718. // "location": "path",
  7719. // "required": true,
  7720. // "type": "string"
  7721. // },
  7722. // "zone": {
  7723. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  7724. // "location": "path",
  7725. // "required": true,
  7726. // "type": "string"
  7727. // }
  7728. // },
  7729. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation",
  7730. // "request": {
  7731. // "$ref": "CompleteIPRotationRequest"
  7732. // },
  7733. // "response": {
  7734. // "$ref": "Operation"
  7735. // },
  7736. // "scopes": [
  7737. // "https://www.googleapis.com/auth/cloud-platform"
  7738. // ]
  7739. // }
  7740. }
  7741. // method id "container.projects.zones.clusters.create":
  7742. type ProjectsZonesClustersCreateCall struct {
  7743. s *Service
  7744. projectId string
  7745. zone string
  7746. createclusterrequest *CreateClusterRequest
  7747. urlParams_ gensupport.URLParams
  7748. ctx_ context.Context
  7749. header_ http.Header
  7750. }
  7751. // Create: Creates a cluster, consisting of the specified number and
  7752. // type of Google
  7753. // Compute Engine instances.
  7754. //
  7755. // By default, the cluster is created in the project's
  7756. // [default
  7757. // network](/compute/docs/networks-and-firewalls#networks).
  7758. //
  7759. // One firewall is added for the cluster. After cluster creation,
  7760. // the cluster creates routes for each node to allow the containers
  7761. // on that node to communicate with all other instances in
  7762. // the
  7763. // cluster.
  7764. //
  7765. // Finally, an entry is added to the project's global metadata
  7766. // indicating
  7767. // which CIDR range is being used by the cluster.
  7768. func (r *ProjectsZonesClustersService) Create(projectId string, zone string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall {
  7769. c := &ProjectsZonesClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7770. c.projectId = projectId
  7771. c.zone = zone
  7772. c.createclusterrequest = createclusterrequest
  7773. return c
  7774. }
  7775. // Fields allows partial responses to be retrieved. See
  7776. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7777. // for more information.
  7778. func (c *ProjectsZonesClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCreateCall {
  7779. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7780. return c
  7781. }
  7782. // Context sets the context to be used in this call's Do method. Any
  7783. // pending HTTP request will be aborted if the provided context is
  7784. // canceled.
  7785. func (c *ProjectsZonesClustersCreateCall) Context(ctx context.Context) *ProjectsZonesClustersCreateCall {
  7786. c.ctx_ = ctx
  7787. return c
  7788. }
  7789. // Header returns an http.Header that can be modified by the caller to
  7790. // add HTTP headers to the request.
  7791. func (c *ProjectsZonesClustersCreateCall) Header() http.Header {
  7792. if c.header_ == nil {
  7793. c.header_ = make(http.Header)
  7794. }
  7795. return c.header_
  7796. }
  7797. func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) {
  7798. reqHeaders := make(http.Header)
  7799. for k, v := range c.header_ {
  7800. reqHeaders[k] = v
  7801. }
  7802. reqHeaders.Set("User-Agent", c.s.userAgent())
  7803. var body io.Reader = nil
  7804. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest)
  7805. if err != nil {
  7806. return nil, err
  7807. }
  7808. reqHeaders.Set("Content-Type", "application/json")
  7809. c.urlParams_.Set("alt", alt)
  7810. c.urlParams_.Set("prettyPrint", "false")
  7811. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters")
  7812. urls += "?" + c.urlParams_.Encode()
  7813. req, err := http.NewRequest("POST", urls, body)
  7814. if err != nil {
  7815. return nil, err
  7816. }
  7817. req.Header = reqHeaders
  7818. googleapi.Expand(req.URL, map[string]string{
  7819. "projectId": c.projectId,
  7820. "zone": c.zone,
  7821. })
  7822. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7823. }
  7824. // Do executes the "container.projects.zones.clusters.create" call.
  7825. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7826. // status code is an error. Response headers are in either
  7827. // *Operation.ServerResponse.Header or (if a response was returned at
  7828. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7829. // to check whether the returned error was because
  7830. // http.StatusNotModified was returned.
  7831. func (c *ProjectsZonesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7832. gensupport.SetOptions(c.urlParams_, opts...)
  7833. res, err := c.doRequest("json")
  7834. if res != nil && res.StatusCode == http.StatusNotModified {
  7835. if res.Body != nil {
  7836. res.Body.Close()
  7837. }
  7838. return nil, &googleapi.Error{
  7839. Code: res.StatusCode,
  7840. Header: res.Header,
  7841. }
  7842. }
  7843. if err != nil {
  7844. return nil, err
  7845. }
  7846. defer googleapi.CloseBody(res)
  7847. if err := googleapi.CheckResponse(res); err != nil {
  7848. return nil, err
  7849. }
  7850. ret := &Operation{
  7851. ServerResponse: googleapi.ServerResponse{
  7852. Header: res.Header,
  7853. HTTPStatusCode: res.StatusCode,
  7854. },
  7855. }
  7856. target := &ret
  7857. if err := gensupport.DecodeResponse(target, res); err != nil {
  7858. return nil, err
  7859. }
  7860. return ret, nil
  7861. // {
  7862. // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.",
  7863. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters",
  7864. // "httpMethod": "POST",
  7865. // "id": "container.projects.zones.clusters.create",
  7866. // "parameterOrder": [
  7867. // "projectId",
  7868. // "zone"
  7869. // ],
  7870. // "parameters": {
  7871. // "projectId": {
  7872. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.",
  7873. // "location": "path",
  7874. // "required": true,
  7875. // "type": "string"
  7876. // },
  7877. // "zone": {
  7878. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.",
  7879. // "location": "path",
  7880. // "required": true,
  7881. // "type": "string"
  7882. // }
  7883. // },
  7884. // "path": "v1/projects/{projectId}/zones/{zone}/clusters",
  7885. // "request": {
  7886. // "$ref": "CreateClusterRequest"
  7887. // },
  7888. // "response": {
  7889. // "$ref": "Operation"
  7890. // },
  7891. // "scopes": [
  7892. // "https://www.googleapis.com/auth/cloud-platform"
  7893. // ]
  7894. // }
  7895. }
  7896. // method id "container.projects.zones.clusters.delete":
  7897. type ProjectsZonesClustersDeleteCall struct {
  7898. s *Service
  7899. projectId string
  7900. zone string
  7901. clusterId string
  7902. urlParams_ gensupport.URLParams
  7903. ctx_ context.Context
  7904. header_ http.Header
  7905. }
  7906. // Delete: Deletes the cluster, including the Kubernetes endpoint and
  7907. // all worker
  7908. // nodes.
  7909. //
  7910. // Firewalls and routes that were configured during cluster creation
  7911. // are also deleted.
  7912. //
  7913. // Other Google Compute Engine resources that might be in use by the
  7914. // cluster
  7915. // (e.g. load balancer resources) will not be deleted if they weren't
  7916. // present
  7917. // at the initial create time.
  7918. func (r *ProjectsZonesClustersService) Delete(projectId string, zone string, clusterId string) *ProjectsZonesClustersDeleteCall {
  7919. c := &ProjectsZonesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7920. c.projectId = projectId
  7921. c.zone = zone
  7922. c.clusterId = clusterId
  7923. return c
  7924. }
  7925. // Name sets the optional parameter "name": The name (project, location,
  7926. // cluster) of the cluster to delete.
  7927. // Specified in the format 'projects/*/locations/*/clusters/*'.
  7928. func (c *ProjectsZonesClustersDeleteCall) Name(name string) *ProjectsZonesClustersDeleteCall {
  7929. c.urlParams_.Set("name", name)
  7930. return c
  7931. }
  7932. // Fields allows partial responses to be retrieved. See
  7933. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7934. // for more information.
  7935. func (c *ProjectsZonesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersDeleteCall {
  7936. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7937. return c
  7938. }
  7939. // Context sets the context to be used in this call's Do method. Any
  7940. // pending HTTP request will be aborted if the provided context is
  7941. // canceled.
  7942. func (c *ProjectsZonesClustersDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersDeleteCall {
  7943. c.ctx_ = ctx
  7944. return c
  7945. }
  7946. // Header returns an http.Header that can be modified by the caller to
  7947. // add HTTP headers to the request.
  7948. func (c *ProjectsZonesClustersDeleteCall) Header() http.Header {
  7949. if c.header_ == nil {
  7950. c.header_ = make(http.Header)
  7951. }
  7952. return c.header_
  7953. }
  7954. func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
  7955. reqHeaders := make(http.Header)
  7956. for k, v := range c.header_ {
  7957. reqHeaders[k] = v
  7958. }
  7959. reqHeaders.Set("User-Agent", c.s.userAgent())
  7960. var body io.Reader = nil
  7961. c.urlParams_.Set("alt", alt)
  7962. c.urlParams_.Set("prettyPrint", "false")
  7963. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}")
  7964. urls += "?" + c.urlParams_.Encode()
  7965. req, err := http.NewRequest("DELETE", urls, body)
  7966. if err != nil {
  7967. return nil, err
  7968. }
  7969. req.Header = reqHeaders
  7970. googleapi.Expand(req.URL, map[string]string{
  7971. "projectId": c.projectId,
  7972. "zone": c.zone,
  7973. "clusterId": c.clusterId,
  7974. })
  7975. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7976. }
  7977. // Do executes the "container.projects.zones.clusters.delete" call.
  7978. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7979. // status code is an error. Response headers are in either
  7980. // *Operation.ServerResponse.Header or (if a response was returned at
  7981. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7982. // to check whether the returned error was because
  7983. // http.StatusNotModified was returned.
  7984. func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7985. gensupport.SetOptions(c.urlParams_, opts...)
  7986. res, err := c.doRequest("json")
  7987. if res != nil && res.StatusCode == http.StatusNotModified {
  7988. if res.Body != nil {
  7989. res.Body.Close()
  7990. }
  7991. return nil, &googleapi.Error{
  7992. Code: res.StatusCode,
  7993. Header: res.Header,
  7994. }
  7995. }
  7996. if err != nil {
  7997. return nil, err
  7998. }
  7999. defer googleapi.CloseBody(res)
  8000. if err := googleapi.CheckResponse(res); err != nil {
  8001. return nil, err
  8002. }
  8003. ret := &Operation{
  8004. ServerResponse: googleapi.ServerResponse{
  8005. Header: res.Header,
  8006. HTTPStatusCode: res.StatusCode,
  8007. },
  8008. }
  8009. target := &ret
  8010. if err := gensupport.DecodeResponse(target, res); err != nil {
  8011. return nil, err
  8012. }
  8013. return ret, nil
  8014. // {
  8015. // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.",
  8016. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}",
  8017. // "httpMethod": "DELETE",
  8018. // "id": "container.projects.zones.clusters.delete",
  8019. // "parameterOrder": [
  8020. // "projectId",
  8021. // "zone",
  8022. // "clusterId"
  8023. // ],
  8024. // "parameters": {
  8025. // "clusterId": {
  8026. // "description": "Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.",
  8027. // "location": "path",
  8028. // "required": true,
  8029. // "type": "string"
  8030. // },
  8031. // "name": {
  8032. // "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  8033. // "location": "query",
  8034. // "type": "string"
  8035. // },
  8036. // "projectId": {
  8037. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  8038. // "location": "path",
  8039. // "required": true,
  8040. // "type": "string"
  8041. // },
  8042. // "zone": {
  8043. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  8044. // "location": "path",
  8045. // "required": true,
  8046. // "type": "string"
  8047. // }
  8048. // },
  8049. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}",
  8050. // "response": {
  8051. // "$ref": "Operation"
  8052. // },
  8053. // "scopes": [
  8054. // "https://www.googleapis.com/auth/cloud-platform"
  8055. // ]
  8056. // }
  8057. }
  8058. // method id "container.projects.zones.clusters.get":
  8059. type ProjectsZonesClustersGetCall struct {
  8060. s *Service
  8061. projectId string
  8062. zone string
  8063. clusterId string
  8064. urlParams_ gensupport.URLParams
  8065. ifNoneMatch_ string
  8066. ctx_ context.Context
  8067. header_ http.Header
  8068. }
  8069. // Get: Gets the details of a specific cluster.
  8070. func (r *ProjectsZonesClustersService) Get(projectId string, zone string, clusterId string) *ProjectsZonesClustersGetCall {
  8071. c := &ProjectsZonesClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8072. c.projectId = projectId
  8073. c.zone = zone
  8074. c.clusterId = clusterId
  8075. return c
  8076. }
  8077. // Name sets the optional parameter "name": The name (project, location,
  8078. // cluster) of the cluster to retrieve.
  8079. // Specified in the format 'projects/*/locations/*/clusters/*'.
  8080. func (c *ProjectsZonesClustersGetCall) Name(name string) *ProjectsZonesClustersGetCall {
  8081. c.urlParams_.Set("name", name)
  8082. return c
  8083. }
  8084. // Fields allows partial responses to be retrieved. See
  8085. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8086. // for more information.
  8087. func (c *ProjectsZonesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersGetCall {
  8088. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8089. return c
  8090. }
  8091. // IfNoneMatch sets the optional parameter which makes the operation
  8092. // fail if the object's ETag matches the given value. This is useful for
  8093. // getting updates only after the object has changed since the last
  8094. // request. Use googleapi.IsNotModified to check whether the response
  8095. // error from Do is the result of In-None-Match.
  8096. func (c *ProjectsZonesClustersGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersGetCall {
  8097. c.ifNoneMatch_ = entityTag
  8098. return c
  8099. }
  8100. // Context sets the context to be used in this call's Do method. Any
  8101. // pending HTTP request will be aborted if the provided context is
  8102. // canceled.
  8103. func (c *ProjectsZonesClustersGetCall) Context(ctx context.Context) *ProjectsZonesClustersGetCall {
  8104. c.ctx_ = ctx
  8105. return c
  8106. }
  8107. // Header returns an http.Header that can be modified by the caller to
  8108. // add HTTP headers to the request.
  8109. func (c *ProjectsZonesClustersGetCall) Header() http.Header {
  8110. if c.header_ == nil {
  8111. c.header_ = make(http.Header)
  8112. }
  8113. return c.header_
  8114. }
  8115. func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) {
  8116. reqHeaders := make(http.Header)
  8117. for k, v := range c.header_ {
  8118. reqHeaders[k] = v
  8119. }
  8120. reqHeaders.Set("User-Agent", c.s.userAgent())
  8121. if c.ifNoneMatch_ != "" {
  8122. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8123. }
  8124. var body io.Reader = nil
  8125. c.urlParams_.Set("alt", alt)
  8126. c.urlParams_.Set("prettyPrint", "false")
  8127. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}")
  8128. urls += "?" + c.urlParams_.Encode()
  8129. req, err := http.NewRequest("GET", urls, body)
  8130. if err != nil {
  8131. return nil, err
  8132. }
  8133. req.Header = reqHeaders
  8134. googleapi.Expand(req.URL, map[string]string{
  8135. "projectId": c.projectId,
  8136. "zone": c.zone,
  8137. "clusterId": c.clusterId,
  8138. })
  8139. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8140. }
  8141. // Do executes the "container.projects.zones.clusters.get" call.
  8142. // Exactly one of *Cluster or error will be non-nil. Any non-2xx status
  8143. // code is an error. Response headers are in either
  8144. // *Cluster.ServerResponse.Header or (if a response was returned at all)
  8145. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8146. // check whether the returned error was because http.StatusNotModified
  8147. // was returned.
  8148. func (c *ProjectsZonesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) {
  8149. gensupport.SetOptions(c.urlParams_, opts...)
  8150. res, err := c.doRequest("json")
  8151. if res != nil && res.StatusCode == http.StatusNotModified {
  8152. if res.Body != nil {
  8153. res.Body.Close()
  8154. }
  8155. return nil, &googleapi.Error{
  8156. Code: res.StatusCode,
  8157. Header: res.Header,
  8158. }
  8159. }
  8160. if err != nil {
  8161. return nil, err
  8162. }
  8163. defer googleapi.CloseBody(res)
  8164. if err := googleapi.CheckResponse(res); err != nil {
  8165. return nil, err
  8166. }
  8167. ret := &Cluster{
  8168. ServerResponse: googleapi.ServerResponse{
  8169. Header: res.Header,
  8170. HTTPStatusCode: res.StatusCode,
  8171. },
  8172. }
  8173. target := &ret
  8174. if err := gensupport.DecodeResponse(target, res); err != nil {
  8175. return nil, err
  8176. }
  8177. return ret, nil
  8178. // {
  8179. // "description": "Gets the details of a specific cluster.",
  8180. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}",
  8181. // "httpMethod": "GET",
  8182. // "id": "container.projects.zones.clusters.get",
  8183. // "parameterOrder": [
  8184. // "projectId",
  8185. // "zone",
  8186. // "clusterId"
  8187. // ],
  8188. // "parameters": {
  8189. // "clusterId": {
  8190. // "description": "Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.",
  8191. // "location": "path",
  8192. // "required": true,
  8193. // "type": "string"
  8194. // },
  8195. // "name": {
  8196. // "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.",
  8197. // "location": "query",
  8198. // "type": "string"
  8199. // },
  8200. // "projectId": {
  8201. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  8202. // "location": "path",
  8203. // "required": true,
  8204. // "type": "string"
  8205. // },
  8206. // "zone": {
  8207. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  8208. // "location": "path",
  8209. // "required": true,
  8210. // "type": "string"
  8211. // }
  8212. // },
  8213. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}",
  8214. // "response": {
  8215. // "$ref": "Cluster"
  8216. // },
  8217. // "scopes": [
  8218. // "https://www.googleapis.com/auth/cloud-platform"
  8219. // ]
  8220. // }
  8221. }
  8222. // method id "container.projects.zones.clusters.legacyAbac":
  8223. type ProjectsZonesClustersLegacyAbacCall struct {
  8224. s *Service
  8225. projectId string
  8226. zone string
  8227. clusterId string
  8228. setlegacyabacrequest *SetLegacyAbacRequest
  8229. urlParams_ gensupport.URLParams
  8230. ctx_ context.Context
  8231. header_ http.Header
  8232. }
  8233. // LegacyAbac: Enables or disables the ABAC authorization mechanism on a
  8234. // cluster.
  8235. func (r *ProjectsZonesClustersService) LegacyAbac(projectId string, zone string, clusterId string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsZonesClustersLegacyAbacCall {
  8236. c := &ProjectsZonesClustersLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8237. c.projectId = projectId
  8238. c.zone = zone
  8239. c.clusterId = clusterId
  8240. c.setlegacyabacrequest = setlegacyabacrequest
  8241. return c
  8242. }
  8243. // Fields allows partial responses to be retrieved. See
  8244. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8245. // for more information.
  8246. func (c *ProjectsZonesClustersLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLegacyAbacCall {
  8247. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8248. return c
  8249. }
  8250. // Context sets the context to be used in this call's Do method. Any
  8251. // pending HTTP request will be aborted if the provided context is
  8252. // canceled.
  8253. func (c *ProjectsZonesClustersLegacyAbacCall) Context(ctx context.Context) *ProjectsZonesClustersLegacyAbacCall {
  8254. c.ctx_ = ctx
  8255. return c
  8256. }
  8257. // Header returns an http.Header that can be modified by the caller to
  8258. // add HTTP headers to the request.
  8259. func (c *ProjectsZonesClustersLegacyAbacCall) Header() http.Header {
  8260. if c.header_ == nil {
  8261. c.header_ = make(http.Header)
  8262. }
  8263. return c.header_
  8264. }
  8265. func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Response, error) {
  8266. reqHeaders := make(http.Header)
  8267. for k, v := range c.header_ {
  8268. reqHeaders[k] = v
  8269. }
  8270. reqHeaders.Set("User-Agent", c.s.userAgent())
  8271. var body io.Reader = nil
  8272. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlegacyabacrequest)
  8273. if err != nil {
  8274. return nil, err
  8275. }
  8276. reqHeaders.Set("Content-Type", "application/json")
  8277. c.urlParams_.Set("alt", alt)
  8278. c.urlParams_.Set("prettyPrint", "false")
  8279. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac")
  8280. urls += "?" + c.urlParams_.Encode()
  8281. req, err := http.NewRequest("POST", urls, body)
  8282. if err != nil {
  8283. return nil, err
  8284. }
  8285. req.Header = reqHeaders
  8286. googleapi.Expand(req.URL, map[string]string{
  8287. "projectId": c.projectId,
  8288. "zone": c.zone,
  8289. "clusterId": c.clusterId,
  8290. })
  8291. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8292. }
  8293. // Do executes the "container.projects.zones.clusters.legacyAbac" call.
  8294. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8295. // status code is an error. Response headers are in either
  8296. // *Operation.ServerResponse.Header or (if a response was returned at
  8297. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8298. // to check whether the returned error was because
  8299. // http.StatusNotModified was returned.
  8300. func (c *ProjectsZonesClustersLegacyAbacCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8301. gensupport.SetOptions(c.urlParams_, opts...)
  8302. res, err := c.doRequest("json")
  8303. if res != nil && res.StatusCode == http.StatusNotModified {
  8304. if res.Body != nil {
  8305. res.Body.Close()
  8306. }
  8307. return nil, &googleapi.Error{
  8308. Code: res.StatusCode,
  8309. Header: res.Header,
  8310. }
  8311. }
  8312. if err != nil {
  8313. return nil, err
  8314. }
  8315. defer googleapi.CloseBody(res)
  8316. if err := googleapi.CheckResponse(res); err != nil {
  8317. return nil, err
  8318. }
  8319. ret := &Operation{
  8320. ServerResponse: googleapi.ServerResponse{
  8321. Header: res.Header,
  8322. HTTPStatusCode: res.StatusCode,
  8323. },
  8324. }
  8325. target := &ret
  8326. if err := gensupport.DecodeResponse(target, res); err != nil {
  8327. return nil, err
  8328. }
  8329. return ret, nil
  8330. // {
  8331. // "description": "Enables or disables the ABAC authorization mechanism on a cluster.",
  8332. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac",
  8333. // "httpMethod": "POST",
  8334. // "id": "container.projects.zones.clusters.legacyAbac",
  8335. // "parameterOrder": [
  8336. // "projectId",
  8337. // "zone",
  8338. // "clusterId"
  8339. // ],
  8340. // "parameters": {
  8341. // "clusterId": {
  8342. // "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.",
  8343. // "location": "path",
  8344. // "required": true,
  8345. // "type": "string"
  8346. // },
  8347. // "projectId": {
  8348. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  8349. // "location": "path",
  8350. // "required": true,
  8351. // "type": "string"
  8352. // },
  8353. // "zone": {
  8354. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  8355. // "location": "path",
  8356. // "required": true,
  8357. // "type": "string"
  8358. // }
  8359. // },
  8360. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac",
  8361. // "request": {
  8362. // "$ref": "SetLegacyAbacRequest"
  8363. // },
  8364. // "response": {
  8365. // "$ref": "Operation"
  8366. // },
  8367. // "scopes": [
  8368. // "https://www.googleapis.com/auth/cloud-platform"
  8369. // ]
  8370. // }
  8371. }
  8372. // method id "container.projects.zones.clusters.list":
  8373. type ProjectsZonesClustersListCall struct {
  8374. s *Service
  8375. projectId string
  8376. zone string
  8377. urlParams_ gensupport.URLParams
  8378. ifNoneMatch_ string
  8379. ctx_ context.Context
  8380. header_ http.Header
  8381. }
  8382. // List: Lists all clusters owned by a project in either the specified
  8383. // zone or all
  8384. // zones.
  8385. func (r *ProjectsZonesClustersService) List(projectId string, zone string) *ProjectsZonesClustersListCall {
  8386. c := &ProjectsZonesClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8387. c.projectId = projectId
  8388. c.zone = zone
  8389. return c
  8390. }
  8391. // Parent sets the optional parameter "parent": The parent (project and
  8392. // location) where the clusters will be listed.
  8393. // Specified in the format 'projects/*/locations/*'.
  8394. // Location "-" matches all zones and all regions.
  8395. func (c *ProjectsZonesClustersListCall) Parent(parent string) *ProjectsZonesClustersListCall {
  8396. c.urlParams_.Set("parent", parent)
  8397. return c
  8398. }
  8399. // Fields allows partial responses to be retrieved. See
  8400. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8401. // for more information.
  8402. func (c *ProjectsZonesClustersListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersListCall {
  8403. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8404. return c
  8405. }
  8406. // IfNoneMatch sets the optional parameter which makes the operation
  8407. // fail if the object's ETag matches the given value. This is useful for
  8408. // getting updates only after the object has changed since the last
  8409. // request. Use googleapi.IsNotModified to check whether the response
  8410. // error from Do is the result of In-None-Match.
  8411. func (c *ProjectsZonesClustersListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersListCall {
  8412. c.ifNoneMatch_ = entityTag
  8413. return c
  8414. }
  8415. // Context sets the context to be used in this call's Do method. Any
  8416. // pending HTTP request will be aborted if the provided context is
  8417. // canceled.
  8418. func (c *ProjectsZonesClustersListCall) Context(ctx context.Context) *ProjectsZonesClustersListCall {
  8419. c.ctx_ = ctx
  8420. return c
  8421. }
  8422. // Header returns an http.Header that can be modified by the caller to
  8423. // add HTTP headers to the request.
  8424. func (c *ProjectsZonesClustersListCall) Header() http.Header {
  8425. if c.header_ == nil {
  8426. c.header_ = make(http.Header)
  8427. }
  8428. return c.header_
  8429. }
  8430. func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) {
  8431. reqHeaders := make(http.Header)
  8432. for k, v := range c.header_ {
  8433. reqHeaders[k] = v
  8434. }
  8435. reqHeaders.Set("User-Agent", c.s.userAgent())
  8436. if c.ifNoneMatch_ != "" {
  8437. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8438. }
  8439. var body io.Reader = nil
  8440. c.urlParams_.Set("alt", alt)
  8441. c.urlParams_.Set("prettyPrint", "false")
  8442. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters")
  8443. urls += "?" + c.urlParams_.Encode()
  8444. req, err := http.NewRequest("GET", urls, body)
  8445. if err != nil {
  8446. return nil, err
  8447. }
  8448. req.Header = reqHeaders
  8449. googleapi.Expand(req.URL, map[string]string{
  8450. "projectId": c.projectId,
  8451. "zone": c.zone,
  8452. })
  8453. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8454. }
  8455. // Do executes the "container.projects.zones.clusters.list" call.
  8456. // Exactly one of *ListClustersResponse or error will be non-nil. Any
  8457. // non-2xx status code is an error. Response headers are in either
  8458. // *ListClustersResponse.ServerResponse.Header or (if a response was
  8459. // returned at all) in error.(*googleapi.Error).Header. Use
  8460. // googleapi.IsNotModified to check whether the returned error was
  8461. // because http.StatusNotModified was returned.
  8462. func (c *ProjectsZonesClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) {
  8463. gensupport.SetOptions(c.urlParams_, opts...)
  8464. res, err := c.doRequest("json")
  8465. if res != nil && res.StatusCode == http.StatusNotModified {
  8466. if res.Body != nil {
  8467. res.Body.Close()
  8468. }
  8469. return nil, &googleapi.Error{
  8470. Code: res.StatusCode,
  8471. Header: res.Header,
  8472. }
  8473. }
  8474. if err != nil {
  8475. return nil, err
  8476. }
  8477. defer googleapi.CloseBody(res)
  8478. if err := googleapi.CheckResponse(res); err != nil {
  8479. return nil, err
  8480. }
  8481. ret := &ListClustersResponse{
  8482. ServerResponse: googleapi.ServerResponse{
  8483. Header: res.Header,
  8484. HTTPStatusCode: res.StatusCode,
  8485. },
  8486. }
  8487. target := &ret
  8488. if err := gensupport.DecodeResponse(target, res); err != nil {
  8489. return nil, err
  8490. }
  8491. return ret, nil
  8492. // {
  8493. // "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.",
  8494. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters",
  8495. // "httpMethod": "GET",
  8496. // "id": "container.projects.zones.clusters.list",
  8497. // "parameterOrder": [
  8498. // "projectId",
  8499. // "zone"
  8500. // ],
  8501. // "parameters": {
  8502. // "parent": {
  8503. // "description": "The parent (project and location) where the clusters will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.",
  8504. // "location": "query",
  8505. // "type": "string"
  8506. // },
  8507. // "projectId": {
  8508. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.",
  8509. // "location": "path",
  8510. // "required": true,
  8511. // "type": "string"
  8512. // },
  8513. // "zone": {
  8514. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.",
  8515. // "location": "path",
  8516. // "required": true,
  8517. // "type": "string"
  8518. // }
  8519. // },
  8520. // "path": "v1/projects/{projectId}/zones/{zone}/clusters",
  8521. // "response": {
  8522. // "$ref": "ListClustersResponse"
  8523. // },
  8524. // "scopes": [
  8525. // "https://www.googleapis.com/auth/cloud-platform"
  8526. // ]
  8527. // }
  8528. }
  8529. // method id "container.projects.zones.clusters.locations":
  8530. type ProjectsZonesClustersLocationsCall struct {
  8531. s *Service
  8532. projectId string
  8533. zone string
  8534. clusterId string
  8535. setlocationsrequest *SetLocationsRequest
  8536. urlParams_ gensupport.URLParams
  8537. ctx_ context.Context
  8538. header_ http.Header
  8539. }
  8540. // Locations: Sets the locations for a specific cluster.
  8541. func (r *ProjectsZonesClustersService) Locations(projectId string, zone string, clusterId string, setlocationsrequest *SetLocationsRequest) *ProjectsZonesClustersLocationsCall {
  8542. c := &ProjectsZonesClustersLocationsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8543. c.projectId = projectId
  8544. c.zone = zone
  8545. c.clusterId = clusterId
  8546. c.setlocationsrequest = setlocationsrequest
  8547. return c
  8548. }
  8549. // Fields allows partial responses to be retrieved. See
  8550. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8551. // for more information.
  8552. func (c *ProjectsZonesClustersLocationsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLocationsCall {
  8553. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8554. return c
  8555. }
  8556. // Context sets the context to be used in this call's Do method. Any
  8557. // pending HTTP request will be aborted if the provided context is
  8558. // canceled.
  8559. func (c *ProjectsZonesClustersLocationsCall) Context(ctx context.Context) *ProjectsZonesClustersLocationsCall {
  8560. c.ctx_ = ctx
  8561. return c
  8562. }
  8563. // Header returns an http.Header that can be modified by the caller to
  8564. // add HTTP headers to the request.
  8565. func (c *ProjectsZonesClustersLocationsCall) Header() http.Header {
  8566. if c.header_ == nil {
  8567. c.header_ = make(http.Header)
  8568. }
  8569. return c.header_
  8570. }
  8571. func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Response, error) {
  8572. reqHeaders := make(http.Header)
  8573. for k, v := range c.header_ {
  8574. reqHeaders[k] = v
  8575. }
  8576. reqHeaders.Set("User-Agent", c.s.userAgent())
  8577. var body io.Reader = nil
  8578. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlocationsrequest)
  8579. if err != nil {
  8580. return nil, err
  8581. }
  8582. reqHeaders.Set("Content-Type", "application/json")
  8583. c.urlParams_.Set("alt", alt)
  8584. c.urlParams_.Set("prettyPrint", "false")
  8585. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations")
  8586. urls += "?" + c.urlParams_.Encode()
  8587. req, err := http.NewRequest("POST", urls, body)
  8588. if err != nil {
  8589. return nil, err
  8590. }
  8591. req.Header = reqHeaders
  8592. googleapi.Expand(req.URL, map[string]string{
  8593. "projectId": c.projectId,
  8594. "zone": c.zone,
  8595. "clusterId": c.clusterId,
  8596. })
  8597. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8598. }
  8599. // Do executes the "container.projects.zones.clusters.locations" call.
  8600. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8601. // status code is an error. Response headers are in either
  8602. // *Operation.ServerResponse.Header or (if a response was returned at
  8603. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8604. // to check whether the returned error was because
  8605. // http.StatusNotModified was returned.
  8606. func (c *ProjectsZonesClustersLocationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8607. gensupport.SetOptions(c.urlParams_, opts...)
  8608. res, err := c.doRequest("json")
  8609. if res != nil && res.StatusCode == http.StatusNotModified {
  8610. if res.Body != nil {
  8611. res.Body.Close()
  8612. }
  8613. return nil, &googleapi.Error{
  8614. Code: res.StatusCode,
  8615. Header: res.Header,
  8616. }
  8617. }
  8618. if err != nil {
  8619. return nil, err
  8620. }
  8621. defer googleapi.CloseBody(res)
  8622. if err := googleapi.CheckResponse(res); err != nil {
  8623. return nil, err
  8624. }
  8625. ret := &Operation{
  8626. ServerResponse: googleapi.ServerResponse{
  8627. Header: res.Header,
  8628. HTTPStatusCode: res.StatusCode,
  8629. },
  8630. }
  8631. target := &ret
  8632. if err := gensupport.DecodeResponse(target, res); err != nil {
  8633. return nil, err
  8634. }
  8635. return ret, nil
  8636. // {
  8637. // "description": "Sets the locations for a specific cluster.",
  8638. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations",
  8639. // "httpMethod": "POST",
  8640. // "id": "container.projects.zones.clusters.locations",
  8641. // "parameterOrder": [
  8642. // "projectId",
  8643. // "zone",
  8644. // "clusterId"
  8645. // ],
  8646. // "parameters": {
  8647. // "clusterId": {
  8648. // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.",
  8649. // "location": "path",
  8650. // "required": true,
  8651. // "type": "string"
  8652. // },
  8653. // "projectId": {
  8654. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  8655. // "location": "path",
  8656. // "required": true,
  8657. // "type": "string"
  8658. // },
  8659. // "zone": {
  8660. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  8661. // "location": "path",
  8662. // "required": true,
  8663. // "type": "string"
  8664. // }
  8665. // },
  8666. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations",
  8667. // "request": {
  8668. // "$ref": "SetLocationsRequest"
  8669. // },
  8670. // "response": {
  8671. // "$ref": "Operation"
  8672. // },
  8673. // "scopes": [
  8674. // "https://www.googleapis.com/auth/cloud-platform"
  8675. // ]
  8676. // }
  8677. }
  8678. // method id "container.projects.zones.clusters.logging":
  8679. type ProjectsZonesClustersLoggingCall struct {
  8680. s *Service
  8681. projectId string
  8682. zone string
  8683. clusterId string
  8684. setloggingservicerequest *SetLoggingServiceRequest
  8685. urlParams_ gensupport.URLParams
  8686. ctx_ context.Context
  8687. header_ http.Header
  8688. }
  8689. // Logging: Sets the logging service for a specific cluster.
  8690. func (r *ProjectsZonesClustersService) Logging(projectId string, zone string, clusterId string, setloggingservicerequest *SetLoggingServiceRequest) *ProjectsZonesClustersLoggingCall {
  8691. c := &ProjectsZonesClustersLoggingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8692. c.projectId = projectId
  8693. c.zone = zone
  8694. c.clusterId = clusterId
  8695. c.setloggingservicerequest = setloggingservicerequest
  8696. return c
  8697. }
  8698. // Fields allows partial responses to be retrieved. See
  8699. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8700. // for more information.
  8701. func (c *ProjectsZonesClustersLoggingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLoggingCall {
  8702. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8703. return c
  8704. }
  8705. // Context sets the context to be used in this call's Do method. Any
  8706. // pending HTTP request will be aborted if the provided context is
  8707. // canceled.
  8708. func (c *ProjectsZonesClustersLoggingCall) Context(ctx context.Context) *ProjectsZonesClustersLoggingCall {
  8709. c.ctx_ = ctx
  8710. return c
  8711. }
  8712. // Header returns an http.Header that can be modified by the caller to
  8713. // add HTTP headers to the request.
  8714. func (c *ProjectsZonesClustersLoggingCall) Header() http.Header {
  8715. if c.header_ == nil {
  8716. c.header_ = make(http.Header)
  8717. }
  8718. return c.header_
  8719. }
  8720. func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response, error) {
  8721. reqHeaders := make(http.Header)
  8722. for k, v := range c.header_ {
  8723. reqHeaders[k] = v
  8724. }
  8725. reqHeaders.Set("User-Agent", c.s.userAgent())
  8726. var body io.Reader = nil
  8727. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setloggingservicerequest)
  8728. if err != nil {
  8729. return nil, err
  8730. }
  8731. reqHeaders.Set("Content-Type", "application/json")
  8732. c.urlParams_.Set("alt", alt)
  8733. c.urlParams_.Set("prettyPrint", "false")
  8734. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging")
  8735. urls += "?" + c.urlParams_.Encode()
  8736. req, err := http.NewRequest("POST", urls, body)
  8737. if err != nil {
  8738. return nil, err
  8739. }
  8740. req.Header = reqHeaders
  8741. googleapi.Expand(req.URL, map[string]string{
  8742. "projectId": c.projectId,
  8743. "zone": c.zone,
  8744. "clusterId": c.clusterId,
  8745. })
  8746. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8747. }
  8748. // Do executes the "container.projects.zones.clusters.logging" call.
  8749. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8750. // status code is an error. Response headers are in either
  8751. // *Operation.ServerResponse.Header or (if a response was returned at
  8752. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8753. // to check whether the returned error was because
  8754. // http.StatusNotModified was returned.
  8755. func (c *ProjectsZonesClustersLoggingCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8756. gensupport.SetOptions(c.urlParams_, opts...)
  8757. res, err := c.doRequest("json")
  8758. if res != nil && res.StatusCode == http.StatusNotModified {
  8759. if res.Body != nil {
  8760. res.Body.Close()
  8761. }
  8762. return nil, &googleapi.Error{
  8763. Code: res.StatusCode,
  8764. Header: res.Header,
  8765. }
  8766. }
  8767. if err != nil {
  8768. return nil, err
  8769. }
  8770. defer googleapi.CloseBody(res)
  8771. if err := googleapi.CheckResponse(res); err != nil {
  8772. return nil, err
  8773. }
  8774. ret := &Operation{
  8775. ServerResponse: googleapi.ServerResponse{
  8776. Header: res.Header,
  8777. HTTPStatusCode: res.StatusCode,
  8778. },
  8779. }
  8780. target := &ret
  8781. if err := gensupport.DecodeResponse(target, res); err != nil {
  8782. return nil, err
  8783. }
  8784. return ret, nil
  8785. // {
  8786. // "description": "Sets the logging service for a specific cluster.",
  8787. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging",
  8788. // "httpMethod": "POST",
  8789. // "id": "container.projects.zones.clusters.logging",
  8790. // "parameterOrder": [
  8791. // "projectId",
  8792. // "zone",
  8793. // "clusterId"
  8794. // ],
  8795. // "parameters": {
  8796. // "clusterId": {
  8797. // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.",
  8798. // "location": "path",
  8799. // "required": true,
  8800. // "type": "string"
  8801. // },
  8802. // "projectId": {
  8803. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  8804. // "location": "path",
  8805. // "required": true,
  8806. // "type": "string"
  8807. // },
  8808. // "zone": {
  8809. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  8810. // "location": "path",
  8811. // "required": true,
  8812. // "type": "string"
  8813. // }
  8814. // },
  8815. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging",
  8816. // "request": {
  8817. // "$ref": "SetLoggingServiceRequest"
  8818. // },
  8819. // "response": {
  8820. // "$ref": "Operation"
  8821. // },
  8822. // "scopes": [
  8823. // "https://www.googleapis.com/auth/cloud-platform"
  8824. // ]
  8825. // }
  8826. }
  8827. // method id "container.projects.zones.clusters.master":
  8828. type ProjectsZonesClustersMasterCall struct {
  8829. s *Service
  8830. projectId string
  8831. zone string
  8832. clusterId string
  8833. updatemasterrequest *UpdateMasterRequest
  8834. urlParams_ gensupport.URLParams
  8835. ctx_ context.Context
  8836. header_ http.Header
  8837. }
  8838. // Master: Updates the master for a specific cluster.
  8839. func (r *ProjectsZonesClustersService) Master(projectId string, zone string, clusterId string, updatemasterrequest *UpdateMasterRequest) *ProjectsZonesClustersMasterCall {
  8840. c := &ProjectsZonesClustersMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8841. c.projectId = projectId
  8842. c.zone = zone
  8843. c.clusterId = clusterId
  8844. c.updatemasterrequest = updatemasterrequest
  8845. return c
  8846. }
  8847. // Fields allows partial responses to be retrieved. See
  8848. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8849. // for more information.
  8850. func (c *ProjectsZonesClustersMasterCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMasterCall {
  8851. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8852. return c
  8853. }
  8854. // Context sets the context to be used in this call's Do method. Any
  8855. // pending HTTP request will be aborted if the provided context is
  8856. // canceled.
  8857. func (c *ProjectsZonesClustersMasterCall) Context(ctx context.Context) *ProjectsZonesClustersMasterCall {
  8858. c.ctx_ = ctx
  8859. return c
  8860. }
  8861. // Header returns an http.Header that can be modified by the caller to
  8862. // add HTTP headers to the request.
  8863. func (c *ProjectsZonesClustersMasterCall) Header() http.Header {
  8864. if c.header_ == nil {
  8865. c.header_ = make(http.Header)
  8866. }
  8867. return c.header_
  8868. }
  8869. func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response, error) {
  8870. reqHeaders := make(http.Header)
  8871. for k, v := range c.header_ {
  8872. reqHeaders[k] = v
  8873. }
  8874. reqHeaders.Set("User-Agent", c.s.userAgent())
  8875. var body io.Reader = nil
  8876. body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatemasterrequest)
  8877. if err != nil {
  8878. return nil, err
  8879. }
  8880. reqHeaders.Set("Content-Type", "application/json")
  8881. c.urlParams_.Set("alt", alt)
  8882. c.urlParams_.Set("prettyPrint", "false")
  8883. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master")
  8884. urls += "?" + c.urlParams_.Encode()
  8885. req, err := http.NewRequest("POST", urls, body)
  8886. if err != nil {
  8887. return nil, err
  8888. }
  8889. req.Header = reqHeaders
  8890. googleapi.Expand(req.URL, map[string]string{
  8891. "projectId": c.projectId,
  8892. "zone": c.zone,
  8893. "clusterId": c.clusterId,
  8894. })
  8895. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8896. }
  8897. // Do executes the "container.projects.zones.clusters.master" call.
  8898. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8899. // status code is an error. Response headers are in either
  8900. // *Operation.ServerResponse.Header or (if a response was returned at
  8901. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8902. // to check whether the returned error was because
  8903. // http.StatusNotModified was returned.
  8904. func (c *ProjectsZonesClustersMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8905. gensupport.SetOptions(c.urlParams_, opts...)
  8906. res, err := c.doRequest("json")
  8907. if res != nil && res.StatusCode == http.StatusNotModified {
  8908. if res.Body != nil {
  8909. res.Body.Close()
  8910. }
  8911. return nil, &googleapi.Error{
  8912. Code: res.StatusCode,
  8913. Header: res.Header,
  8914. }
  8915. }
  8916. if err != nil {
  8917. return nil, err
  8918. }
  8919. defer googleapi.CloseBody(res)
  8920. if err := googleapi.CheckResponse(res); err != nil {
  8921. return nil, err
  8922. }
  8923. ret := &Operation{
  8924. ServerResponse: googleapi.ServerResponse{
  8925. Header: res.Header,
  8926. HTTPStatusCode: res.StatusCode,
  8927. },
  8928. }
  8929. target := &ret
  8930. if err := gensupport.DecodeResponse(target, res); err != nil {
  8931. return nil, err
  8932. }
  8933. return ret, nil
  8934. // {
  8935. // "description": "Updates the master for a specific cluster.",
  8936. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master",
  8937. // "httpMethod": "POST",
  8938. // "id": "container.projects.zones.clusters.master",
  8939. // "parameterOrder": [
  8940. // "projectId",
  8941. // "zone",
  8942. // "clusterId"
  8943. // ],
  8944. // "parameters": {
  8945. // "clusterId": {
  8946. // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.",
  8947. // "location": "path",
  8948. // "required": true,
  8949. // "type": "string"
  8950. // },
  8951. // "projectId": {
  8952. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  8953. // "location": "path",
  8954. // "required": true,
  8955. // "type": "string"
  8956. // },
  8957. // "zone": {
  8958. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  8959. // "location": "path",
  8960. // "required": true,
  8961. // "type": "string"
  8962. // }
  8963. // },
  8964. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master",
  8965. // "request": {
  8966. // "$ref": "UpdateMasterRequest"
  8967. // },
  8968. // "response": {
  8969. // "$ref": "Operation"
  8970. // },
  8971. // "scopes": [
  8972. // "https://www.googleapis.com/auth/cloud-platform"
  8973. // ]
  8974. // }
  8975. }
  8976. // method id "container.projects.zones.clusters.monitoring":
  8977. type ProjectsZonesClustersMonitoringCall struct {
  8978. s *Service
  8979. projectId string
  8980. zone string
  8981. clusterId string
  8982. setmonitoringservicerequest *SetMonitoringServiceRequest
  8983. urlParams_ gensupport.URLParams
  8984. ctx_ context.Context
  8985. header_ http.Header
  8986. }
  8987. // Monitoring: Sets the monitoring service for a specific cluster.
  8988. func (r *ProjectsZonesClustersService) Monitoring(projectId string, zone string, clusterId string, setmonitoringservicerequest *SetMonitoringServiceRequest) *ProjectsZonesClustersMonitoringCall {
  8989. c := &ProjectsZonesClustersMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8990. c.projectId = projectId
  8991. c.zone = zone
  8992. c.clusterId = clusterId
  8993. c.setmonitoringservicerequest = setmonitoringservicerequest
  8994. return c
  8995. }
  8996. // Fields allows partial responses to be retrieved. See
  8997. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8998. // for more information.
  8999. func (c *ProjectsZonesClustersMonitoringCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMonitoringCall {
  9000. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9001. return c
  9002. }
  9003. // Context sets the context to be used in this call's Do method. Any
  9004. // pending HTTP request will be aborted if the provided context is
  9005. // canceled.
  9006. func (c *ProjectsZonesClustersMonitoringCall) Context(ctx context.Context) *ProjectsZonesClustersMonitoringCall {
  9007. c.ctx_ = ctx
  9008. return c
  9009. }
  9010. // Header returns an http.Header that can be modified by the caller to
  9011. // add HTTP headers to the request.
  9012. func (c *ProjectsZonesClustersMonitoringCall) Header() http.Header {
  9013. if c.header_ == nil {
  9014. c.header_ = make(http.Header)
  9015. }
  9016. return c.header_
  9017. }
  9018. func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Response, error) {
  9019. reqHeaders := make(http.Header)
  9020. for k, v := range c.header_ {
  9021. reqHeaders[k] = v
  9022. }
  9023. reqHeaders.Set("User-Agent", c.s.userAgent())
  9024. var body io.Reader = nil
  9025. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmonitoringservicerequest)
  9026. if err != nil {
  9027. return nil, err
  9028. }
  9029. reqHeaders.Set("Content-Type", "application/json")
  9030. c.urlParams_.Set("alt", alt)
  9031. c.urlParams_.Set("prettyPrint", "false")
  9032. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring")
  9033. urls += "?" + c.urlParams_.Encode()
  9034. req, err := http.NewRequest("POST", urls, body)
  9035. if err != nil {
  9036. return nil, err
  9037. }
  9038. req.Header = reqHeaders
  9039. googleapi.Expand(req.URL, map[string]string{
  9040. "projectId": c.projectId,
  9041. "zone": c.zone,
  9042. "clusterId": c.clusterId,
  9043. })
  9044. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9045. }
  9046. // Do executes the "container.projects.zones.clusters.monitoring" call.
  9047. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  9048. // status code is an error. Response headers are in either
  9049. // *Operation.ServerResponse.Header or (if a response was returned at
  9050. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9051. // to check whether the returned error was because
  9052. // http.StatusNotModified was returned.
  9053. func (c *ProjectsZonesClustersMonitoringCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9054. gensupport.SetOptions(c.urlParams_, opts...)
  9055. res, err := c.doRequest("json")
  9056. if res != nil && res.StatusCode == http.StatusNotModified {
  9057. if res.Body != nil {
  9058. res.Body.Close()
  9059. }
  9060. return nil, &googleapi.Error{
  9061. Code: res.StatusCode,
  9062. Header: res.Header,
  9063. }
  9064. }
  9065. if err != nil {
  9066. return nil, err
  9067. }
  9068. defer googleapi.CloseBody(res)
  9069. if err := googleapi.CheckResponse(res); err != nil {
  9070. return nil, err
  9071. }
  9072. ret := &Operation{
  9073. ServerResponse: googleapi.ServerResponse{
  9074. Header: res.Header,
  9075. HTTPStatusCode: res.StatusCode,
  9076. },
  9077. }
  9078. target := &ret
  9079. if err := gensupport.DecodeResponse(target, res); err != nil {
  9080. return nil, err
  9081. }
  9082. return ret, nil
  9083. // {
  9084. // "description": "Sets the monitoring service for a specific cluster.",
  9085. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring",
  9086. // "httpMethod": "POST",
  9087. // "id": "container.projects.zones.clusters.monitoring",
  9088. // "parameterOrder": [
  9089. // "projectId",
  9090. // "zone",
  9091. // "clusterId"
  9092. // ],
  9093. // "parameters": {
  9094. // "clusterId": {
  9095. // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.",
  9096. // "location": "path",
  9097. // "required": true,
  9098. // "type": "string"
  9099. // },
  9100. // "projectId": {
  9101. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  9102. // "location": "path",
  9103. // "required": true,
  9104. // "type": "string"
  9105. // },
  9106. // "zone": {
  9107. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  9108. // "location": "path",
  9109. // "required": true,
  9110. // "type": "string"
  9111. // }
  9112. // },
  9113. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring",
  9114. // "request": {
  9115. // "$ref": "SetMonitoringServiceRequest"
  9116. // },
  9117. // "response": {
  9118. // "$ref": "Operation"
  9119. // },
  9120. // "scopes": [
  9121. // "https://www.googleapis.com/auth/cloud-platform"
  9122. // ]
  9123. // }
  9124. }
  9125. // method id "container.projects.zones.clusters.resourceLabels":
  9126. type ProjectsZonesClustersResourceLabelsCall struct {
  9127. s *Service
  9128. projectId string
  9129. zone string
  9130. clusterId string
  9131. setlabelsrequest *SetLabelsRequest
  9132. urlParams_ gensupport.URLParams
  9133. ctx_ context.Context
  9134. header_ http.Header
  9135. }
  9136. // ResourceLabels: Sets labels on a cluster.
  9137. func (r *ProjectsZonesClustersService) ResourceLabels(projectId string, zone string, clusterId string, setlabelsrequest *SetLabelsRequest) *ProjectsZonesClustersResourceLabelsCall {
  9138. c := &ProjectsZonesClustersResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9139. c.projectId = projectId
  9140. c.zone = zone
  9141. c.clusterId = clusterId
  9142. c.setlabelsrequest = setlabelsrequest
  9143. return c
  9144. }
  9145. // Fields allows partial responses to be retrieved. See
  9146. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9147. // for more information.
  9148. func (c *ProjectsZonesClustersResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersResourceLabelsCall {
  9149. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9150. return c
  9151. }
  9152. // Context sets the context to be used in this call's Do method. Any
  9153. // pending HTTP request will be aborted if the provided context is
  9154. // canceled.
  9155. func (c *ProjectsZonesClustersResourceLabelsCall) Context(ctx context.Context) *ProjectsZonesClustersResourceLabelsCall {
  9156. c.ctx_ = ctx
  9157. return c
  9158. }
  9159. // Header returns an http.Header that can be modified by the caller to
  9160. // add HTTP headers to the request.
  9161. func (c *ProjectsZonesClustersResourceLabelsCall) Header() http.Header {
  9162. if c.header_ == nil {
  9163. c.header_ = make(http.Header)
  9164. }
  9165. return c.header_
  9166. }
  9167. func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.Response, error) {
  9168. reqHeaders := make(http.Header)
  9169. for k, v := range c.header_ {
  9170. reqHeaders[k] = v
  9171. }
  9172. reqHeaders.Set("User-Agent", c.s.userAgent())
  9173. var body io.Reader = nil
  9174. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlabelsrequest)
  9175. if err != nil {
  9176. return nil, err
  9177. }
  9178. reqHeaders.Set("Content-Type", "application/json")
  9179. c.urlParams_.Set("alt", alt)
  9180. c.urlParams_.Set("prettyPrint", "false")
  9181. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels")
  9182. urls += "?" + c.urlParams_.Encode()
  9183. req, err := http.NewRequest("POST", urls, body)
  9184. if err != nil {
  9185. return nil, err
  9186. }
  9187. req.Header = reqHeaders
  9188. googleapi.Expand(req.URL, map[string]string{
  9189. "projectId": c.projectId,
  9190. "zone": c.zone,
  9191. "clusterId": c.clusterId,
  9192. })
  9193. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9194. }
  9195. // Do executes the "container.projects.zones.clusters.resourceLabels" call.
  9196. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  9197. // status code is an error. Response headers are in either
  9198. // *Operation.ServerResponse.Header or (if a response was returned at
  9199. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9200. // to check whether the returned error was because
  9201. // http.StatusNotModified was returned.
  9202. func (c *ProjectsZonesClustersResourceLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9203. gensupport.SetOptions(c.urlParams_, opts...)
  9204. res, err := c.doRequest("json")
  9205. if res != nil && res.StatusCode == http.StatusNotModified {
  9206. if res.Body != nil {
  9207. res.Body.Close()
  9208. }
  9209. return nil, &googleapi.Error{
  9210. Code: res.StatusCode,
  9211. Header: res.Header,
  9212. }
  9213. }
  9214. if err != nil {
  9215. return nil, err
  9216. }
  9217. defer googleapi.CloseBody(res)
  9218. if err := googleapi.CheckResponse(res); err != nil {
  9219. return nil, err
  9220. }
  9221. ret := &Operation{
  9222. ServerResponse: googleapi.ServerResponse{
  9223. Header: res.Header,
  9224. HTTPStatusCode: res.StatusCode,
  9225. },
  9226. }
  9227. target := &ret
  9228. if err := gensupport.DecodeResponse(target, res); err != nil {
  9229. return nil, err
  9230. }
  9231. return ret, nil
  9232. // {
  9233. // "description": "Sets labels on a cluster.",
  9234. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels",
  9235. // "httpMethod": "POST",
  9236. // "id": "container.projects.zones.clusters.resourceLabels",
  9237. // "parameterOrder": [
  9238. // "projectId",
  9239. // "zone",
  9240. // "clusterId"
  9241. // ],
  9242. // "parameters": {
  9243. // "clusterId": {
  9244. // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.",
  9245. // "location": "path",
  9246. // "required": true,
  9247. // "type": "string"
  9248. // },
  9249. // "projectId": {
  9250. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.",
  9251. // "location": "path",
  9252. // "required": true,
  9253. // "type": "string"
  9254. // },
  9255. // "zone": {
  9256. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  9257. // "location": "path",
  9258. // "required": true,
  9259. // "type": "string"
  9260. // }
  9261. // },
  9262. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels",
  9263. // "request": {
  9264. // "$ref": "SetLabelsRequest"
  9265. // },
  9266. // "response": {
  9267. // "$ref": "Operation"
  9268. // },
  9269. // "scopes": [
  9270. // "https://www.googleapis.com/auth/cloud-platform"
  9271. // ]
  9272. // }
  9273. }
  9274. // method id "container.projects.zones.clusters.setMaintenancePolicy":
  9275. type ProjectsZonesClustersSetMaintenancePolicyCall struct {
  9276. s *Service
  9277. projectId string
  9278. zone string
  9279. clusterId string
  9280. setmaintenancepolicyrequest *SetMaintenancePolicyRequest
  9281. urlParams_ gensupport.URLParams
  9282. ctx_ context.Context
  9283. header_ http.Header
  9284. }
  9285. // SetMaintenancePolicy: Sets the maintenance policy for a cluster.
  9286. func (r *ProjectsZonesClustersService) SetMaintenancePolicy(projectId string, zone string, clusterId string, setmaintenancepolicyrequest *SetMaintenancePolicyRequest) *ProjectsZonesClustersSetMaintenancePolicyCall {
  9287. c := &ProjectsZonesClustersSetMaintenancePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9288. c.projectId = projectId
  9289. c.zone = zone
  9290. c.clusterId = clusterId
  9291. c.setmaintenancepolicyrequest = setmaintenancepolicyrequest
  9292. return c
  9293. }
  9294. // Fields allows partial responses to be retrieved. See
  9295. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9296. // for more information.
  9297. func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMaintenancePolicyCall {
  9298. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9299. return c
  9300. }
  9301. // Context sets the context to be used in this call's Do method. Any
  9302. // pending HTTP request will be aborted if the provided context is
  9303. // canceled.
  9304. func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetMaintenancePolicyCall {
  9305. c.ctx_ = ctx
  9306. return c
  9307. }
  9308. // Header returns an http.Header that can be modified by the caller to
  9309. // add HTTP headers to the request.
  9310. func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Header() http.Header {
  9311. if c.header_ == nil {
  9312. c.header_ = make(http.Header)
  9313. }
  9314. return c.header_
  9315. }
  9316. func (c *ProjectsZonesClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) {
  9317. reqHeaders := make(http.Header)
  9318. for k, v := range c.header_ {
  9319. reqHeaders[k] = v
  9320. }
  9321. reqHeaders.Set("User-Agent", c.s.userAgent())
  9322. var body io.Reader = nil
  9323. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmaintenancepolicyrequest)
  9324. if err != nil {
  9325. return nil, err
  9326. }
  9327. reqHeaders.Set("Content-Type", "application/json")
  9328. c.urlParams_.Set("alt", alt)
  9329. c.urlParams_.Set("prettyPrint", "false")
  9330. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy")
  9331. urls += "?" + c.urlParams_.Encode()
  9332. req, err := http.NewRequest("POST", urls, body)
  9333. if err != nil {
  9334. return nil, err
  9335. }
  9336. req.Header = reqHeaders
  9337. googleapi.Expand(req.URL, map[string]string{
  9338. "projectId": c.projectId,
  9339. "zone": c.zone,
  9340. "clusterId": c.clusterId,
  9341. })
  9342. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9343. }
  9344. // Do executes the "container.projects.zones.clusters.setMaintenancePolicy" call.
  9345. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  9346. // status code is an error. Response headers are in either
  9347. // *Operation.ServerResponse.Header or (if a response was returned at
  9348. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9349. // to check whether the returned error was because
  9350. // http.StatusNotModified was returned.
  9351. func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9352. gensupport.SetOptions(c.urlParams_, opts...)
  9353. res, err := c.doRequest("json")
  9354. if res != nil && res.StatusCode == http.StatusNotModified {
  9355. if res.Body != nil {
  9356. res.Body.Close()
  9357. }
  9358. return nil, &googleapi.Error{
  9359. Code: res.StatusCode,
  9360. Header: res.Header,
  9361. }
  9362. }
  9363. if err != nil {
  9364. return nil, err
  9365. }
  9366. defer googleapi.CloseBody(res)
  9367. if err := googleapi.CheckResponse(res); err != nil {
  9368. return nil, err
  9369. }
  9370. ret := &Operation{
  9371. ServerResponse: googleapi.ServerResponse{
  9372. Header: res.Header,
  9373. HTTPStatusCode: res.StatusCode,
  9374. },
  9375. }
  9376. target := &ret
  9377. if err := gensupport.DecodeResponse(target, res); err != nil {
  9378. return nil, err
  9379. }
  9380. return ret, nil
  9381. // {
  9382. // "description": "Sets the maintenance policy for a cluster.",
  9383. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy",
  9384. // "httpMethod": "POST",
  9385. // "id": "container.projects.zones.clusters.setMaintenancePolicy",
  9386. // "parameterOrder": [
  9387. // "projectId",
  9388. // "zone",
  9389. // "clusterId"
  9390. // ],
  9391. // "parameters": {
  9392. // "clusterId": {
  9393. // "description": "The name of the cluster to update.",
  9394. // "location": "path",
  9395. // "required": true,
  9396. // "type": "string"
  9397. // },
  9398. // "projectId": {
  9399. // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).",
  9400. // "location": "path",
  9401. // "required": true,
  9402. // "type": "string"
  9403. // },
  9404. // "zone": {
  9405. // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.",
  9406. // "location": "path",
  9407. // "required": true,
  9408. // "type": "string"
  9409. // }
  9410. // },
  9411. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy",
  9412. // "request": {
  9413. // "$ref": "SetMaintenancePolicyRequest"
  9414. // },
  9415. // "response": {
  9416. // "$ref": "Operation"
  9417. // },
  9418. // "scopes": [
  9419. // "https://www.googleapis.com/auth/cloud-platform"
  9420. // ]
  9421. // }
  9422. }
  9423. // method id "container.projects.zones.clusters.setMasterAuth":
  9424. type ProjectsZonesClustersSetMasterAuthCall struct {
  9425. s *Service
  9426. projectId string
  9427. zone string
  9428. clusterId string
  9429. setmasterauthrequest *SetMasterAuthRequest
  9430. urlParams_ gensupport.URLParams
  9431. ctx_ context.Context
  9432. header_ http.Header
  9433. }
  9434. // SetMasterAuth: Used to set master auth materials. Currently supports
  9435. // :-
  9436. // Changing the admin password for a specific cluster.
  9437. // This can be either via password generation or explicitly set the
  9438. // password.
  9439. func (r *ProjectsZonesClustersService) SetMasterAuth(projectId string, zone string, clusterId string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsZonesClustersSetMasterAuthCall {
  9440. c := &ProjectsZonesClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9441. c.projectId = projectId
  9442. c.zone = zone
  9443. c.clusterId = clusterId
  9444. c.setmasterauthrequest = setmasterauthrequest
  9445. return c
  9446. }
  9447. // Fields allows partial responses to be retrieved. See
  9448. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9449. // for more information.
  9450. func (c *ProjectsZonesClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMasterAuthCall {
  9451. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9452. return c
  9453. }
  9454. // Context sets the context to be used in this call's Do method. Any
  9455. // pending HTTP request will be aborted if the provided context is
  9456. // canceled.
  9457. func (c *ProjectsZonesClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsZonesClustersSetMasterAuthCall {
  9458. c.ctx_ = ctx
  9459. return c
  9460. }
  9461. // Header returns an http.Header that can be modified by the caller to
  9462. // add HTTP headers to the request.
  9463. func (c *ProjectsZonesClustersSetMasterAuthCall) Header() http.Header {
  9464. if c.header_ == nil {
  9465. c.header_ = make(http.Header)
  9466. }
  9467. return c.header_
  9468. }
  9469. func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) {
  9470. reqHeaders := make(http.Header)
  9471. for k, v := range c.header_ {
  9472. reqHeaders[k] = v
  9473. }
  9474. reqHeaders.Set("User-Agent", c.s.userAgent())
  9475. var body io.Reader = nil
  9476. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmasterauthrequest)
  9477. if err != nil {
  9478. return nil, err
  9479. }
  9480. reqHeaders.Set("Content-Type", "application/json")
  9481. c.urlParams_.Set("alt", alt)
  9482. c.urlParams_.Set("prettyPrint", "false")
  9483. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth")
  9484. urls += "?" + c.urlParams_.Encode()
  9485. req, err := http.NewRequest("POST", urls, body)
  9486. if err != nil {
  9487. return nil, err
  9488. }
  9489. req.Header = reqHeaders
  9490. googleapi.Expand(req.URL, map[string]string{
  9491. "projectId": c.projectId,
  9492. "zone": c.zone,
  9493. "clusterId": c.clusterId,
  9494. })
  9495. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9496. }
  9497. // Do executes the "container.projects.zones.clusters.setMasterAuth" call.
  9498. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  9499. // status code is an error. Response headers are in either
  9500. // *Operation.ServerResponse.Header or (if a response was returned at
  9501. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9502. // to check whether the returned error was because
  9503. // http.StatusNotModified was returned.
  9504. func (c *ProjectsZonesClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9505. gensupport.SetOptions(c.urlParams_, opts...)
  9506. res, err := c.doRequest("json")
  9507. if res != nil && res.StatusCode == http.StatusNotModified {
  9508. if res.Body != nil {
  9509. res.Body.Close()
  9510. }
  9511. return nil, &googleapi.Error{
  9512. Code: res.StatusCode,
  9513. Header: res.Header,
  9514. }
  9515. }
  9516. if err != nil {
  9517. return nil, err
  9518. }
  9519. defer googleapi.CloseBody(res)
  9520. if err := googleapi.CheckResponse(res); err != nil {
  9521. return nil, err
  9522. }
  9523. ret := &Operation{
  9524. ServerResponse: googleapi.ServerResponse{
  9525. Header: res.Header,
  9526. HTTPStatusCode: res.StatusCode,
  9527. },
  9528. }
  9529. target := &ret
  9530. if err := gensupport.DecodeResponse(target, res); err != nil {
  9531. return nil, err
  9532. }
  9533. return ret, nil
  9534. // {
  9535. // "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set the password.",
  9536. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth",
  9537. // "httpMethod": "POST",
  9538. // "id": "container.projects.zones.clusters.setMasterAuth",
  9539. // "parameterOrder": [
  9540. // "projectId",
  9541. // "zone",
  9542. // "clusterId"
  9543. // ],
  9544. // "parameters": {
  9545. // "clusterId": {
  9546. // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.",
  9547. // "location": "path",
  9548. // "required": true,
  9549. // "type": "string"
  9550. // },
  9551. // "projectId": {
  9552. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  9553. // "location": "path",
  9554. // "required": true,
  9555. // "type": "string"
  9556. // },
  9557. // "zone": {
  9558. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  9559. // "location": "path",
  9560. // "required": true,
  9561. // "type": "string"
  9562. // }
  9563. // },
  9564. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth",
  9565. // "request": {
  9566. // "$ref": "SetMasterAuthRequest"
  9567. // },
  9568. // "response": {
  9569. // "$ref": "Operation"
  9570. // },
  9571. // "scopes": [
  9572. // "https://www.googleapis.com/auth/cloud-platform"
  9573. // ]
  9574. // }
  9575. }
  9576. // method id "container.projects.zones.clusters.setNetworkPolicy":
  9577. type ProjectsZonesClustersSetNetworkPolicyCall struct {
  9578. s *Service
  9579. projectId string
  9580. zone string
  9581. clusterId string
  9582. setnetworkpolicyrequest *SetNetworkPolicyRequest
  9583. urlParams_ gensupport.URLParams
  9584. ctx_ context.Context
  9585. header_ http.Header
  9586. }
  9587. // SetNetworkPolicy: Enables/Disables Network Policy for a cluster.
  9588. func (r *ProjectsZonesClustersService) SetNetworkPolicy(projectId string, zone string, clusterId string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsZonesClustersSetNetworkPolicyCall {
  9589. c := &ProjectsZonesClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9590. c.projectId = projectId
  9591. c.zone = zone
  9592. c.clusterId = clusterId
  9593. c.setnetworkpolicyrequest = setnetworkpolicyrequest
  9594. return c
  9595. }
  9596. // Fields allows partial responses to be retrieved. See
  9597. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9598. // for more information.
  9599. func (c *ProjectsZonesClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetNetworkPolicyCall {
  9600. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9601. return c
  9602. }
  9603. // Context sets the context to be used in this call's Do method. Any
  9604. // pending HTTP request will be aborted if the provided context is
  9605. // canceled.
  9606. func (c *ProjectsZonesClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetNetworkPolicyCall {
  9607. c.ctx_ = ctx
  9608. return c
  9609. }
  9610. // Header returns an http.Header that can be modified by the caller to
  9611. // add HTTP headers to the request.
  9612. func (c *ProjectsZonesClustersSetNetworkPolicyCall) Header() http.Header {
  9613. if c.header_ == nil {
  9614. c.header_ = make(http.Header)
  9615. }
  9616. return c.header_
  9617. }
  9618. func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) {
  9619. reqHeaders := make(http.Header)
  9620. for k, v := range c.header_ {
  9621. reqHeaders[k] = v
  9622. }
  9623. reqHeaders.Set("User-Agent", c.s.userAgent())
  9624. var body io.Reader = nil
  9625. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnetworkpolicyrequest)
  9626. if err != nil {
  9627. return nil, err
  9628. }
  9629. reqHeaders.Set("Content-Type", "application/json")
  9630. c.urlParams_.Set("alt", alt)
  9631. c.urlParams_.Set("prettyPrint", "false")
  9632. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy")
  9633. urls += "?" + c.urlParams_.Encode()
  9634. req, err := http.NewRequest("POST", urls, body)
  9635. if err != nil {
  9636. return nil, err
  9637. }
  9638. req.Header = reqHeaders
  9639. googleapi.Expand(req.URL, map[string]string{
  9640. "projectId": c.projectId,
  9641. "zone": c.zone,
  9642. "clusterId": c.clusterId,
  9643. })
  9644. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9645. }
  9646. // Do executes the "container.projects.zones.clusters.setNetworkPolicy" call.
  9647. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  9648. // status code is an error. Response headers are in either
  9649. // *Operation.ServerResponse.Header or (if a response was returned at
  9650. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9651. // to check whether the returned error was because
  9652. // http.StatusNotModified was returned.
  9653. func (c *ProjectsZonesClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9654. gensupport.SetOptions(c.urlParams_, opts...)
  9655. res, err := c.doRequest("json")
  9656. if res != nil && res.StatusCode == http.StatusNotModified {
  9657. if res.Body != nil {
  9658. res.Body.Close()
  9659. }
  9660. return nil, &googleapi.Error{
  9661. Code: res.StatusCode,
  9662. Header: res.Header,
  9663. }
  9664. }
  9665. if err != nil {
  9666. return nil, err
  9667. }
  9668. defer googleapi.CloseBody(res)
  9669. if err := googleapi.CheckResponse(res); err != nil {
  9670. return nil, err
  9671. }
  9672. ret := &Operation{
  9673. ServerResponse: googleapi.ServerResponse{
  9674. Header: res.Header,
  9675. HTTPStatusCode: res.StatusCode,
  9676. },
  9677. }
  9678. target := &ret
  9679. if err := gensupport.DecodeResponse(target, res); err != nil {
  9680. return nil, err
  9681. }
  9682. return ret, nil
  9683. // {
  9684. // "description": "Enables/Disables Network Policy for a cluster.",
  9685. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy",
  9686. // "httpMethod": "POST",
  9687. // "id": "container.projects.zones.clusters.setNetworkPolicy",
  9688. // "parameterOrder": [
  9689. // "projectId",
  9690. // "zone",
  9691. // "clusterId"
  9692. // ],
  9693. // "parameters": {
  9694. // "clusterId": {
  9695. // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.",
  9696. // "location": "path",
  9697. // "required": true,
  9698. // "type": "string"
  9699. // },
  9700. // "projectId": {
  9701. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.",
  9702. // "location": "path",
  9703. // "required": true,
  9704. // "type": "string"
  9705. // },
  9706. // "zone": {
  9707. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  9708. // "location": "path",
  9709. // "required": true,
  9710. // "type": "string"
  9711. // }
  9712. // },
  9713. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy",
  9714. // "request": {
  9715. // "$ref": "SetNetworkPolicyRequest"
  9716. // },
  9717. // "response": {
  9718. // "$ref": "Operation"
  9719. // },
  9720. // "scopes": [
  9721. // "https://www.googleapis.com/auth/cloud-platform"
  9722. // ]
  9723. // }
  9724. }
  9725. // method id "container.projects.zones.clusters.startIpRotation":
  9726. type ProjectsZonesClustersStartIpRotationCall struct {
  9727. s *Service
  9728. projectId string
  9729. zone string
  9730. clusterId string
  9731. startiprotationrequest *StartIPRotationRequest
  9732. urlParams_ gensupport.URLParams
  9733. ctx_ context.Context
  9734. header_ http.Header
  9735. }
  9736. // StartIpRotation: Start master IP rotation.
  9737. func (r *ProjectsZonesClustersService) StartIpRotation(projectId string, zone string, clusterId string, startiprotationrequest *StartIPRotationRequest) *ProjectsZonesClustersStartIpRotationCall {
  9738. c := &ProjectsZonesClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9739. c.projectId = projectId
  9740. c.zone = zone
  9741. c.clusterId = clusterId
  9742. c.startiprotationrequest = startiprotationrequest
  9743. return c
  9744. }
  9745. // Fields allows partial responses to be retrieved. See
  9746. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9747. // for more information.
  9748. func (c *ProjectsZonesClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersStartIpRotationCall {
  9749. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9750. return c
  9751. }
  9752. // Context sets the context to be used in this call's Do method. Any
  9753. // pending HTTP request will be aborted if the provided context is
  9754. // canceled.
  9755. func (c *ProjectsZonesClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersStartIpRotationCall {
  9756. c.ctx_ = ctx
  9757. return c
  9758. }
  9759. // Header returns an http.Header that can be modified by the caller to
  9760. // add HTTP headers to the request.
  9761. func (c *ProjectsZonesClustersStartIpRotationCall) Header() http.Header {
  9762. if c.header_ == nil {
  9763. c.header_ = make(http.Header)
  9764. }
  9765. return c.header_
  9766. }
  9767. func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) {
  9768. reqHeaders := make(http.Header)
  9769. for k, v := range c.header_ {
  9770. reqHeaders[k] = v
  9771. }
  9772. reqHeaders.Set("User-Agent", c.s.userAgent())
  9773. var body io.Reader = nil
  9774. body, err := googleapi.WithoutDataWrapper.JSONReader(c.startiprotationrequest)
  9775. if err != nil {
  9776. return nil, err
  9777. }
  9778. reqHeaders.Set("Content-Type", "application/json")
  9779. c.urlParams_.Set("alt", alt)
  9780. c.urlParams_.Set("prettyPrint", "false")
  9781. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation")
  9782. urls += "?" + c.urlParams_.Encode()
  9783. req, err := http.NewRequest("POST", urls, body)
  9784. if err != nil {
  9785. return nil, err
  9786. }
  9787. req.Header = reqHeaders
  9788. googleapi.Expand(req.URL, map[string]string{
  9789. "projectId": c.projectId,
  9790. "zone": c.zone,
  9791. "clusterId": c.clusterId,
  9792. })
  9793. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9794. }
  9795. // Do executes the "container.projects.zones.clusters.startIpRotation" call.
  9796. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  9797. // status code is an error. Response headers are in either
  9798. // *Operation.ServerResponse.Header or (if a response was returned at
  9799. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9800. // to check whether the returned error was because
  9801. // http.StatusNotModified was returned.
  9802. func (c *ProjectsZonesClustersStartIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9803. gensupport.SetOptions(c.urlParams_, opts...)
  9804. res, err := c.doRequest("json")
  9805. if res != nil && res.StatusCode == http.StatusNotModified {
  9806. if res.Body != nil {
  9807. res.Body.Close()
  9808. }
  9809. return nil, &googleapi.Error{
  9810. Code: res.StatusCode,
  9811. Header: res.Header,
  9812. }
  9813. }
  9814. if err != nil {
  9815. return nil, err
  9816. }
  9817. defer googleapi.CloseBody(res)
  9818. if err := googleapi.CheckResponse(res); err != nil {
  9819. return nil, err
  9820. }
  9821. ret := &Operation{
  9822. ServerResponse: googleapi.ServerResponse{
  9823. Header: res.Header,
  9824. HTTPStatusCode: res.StatusCode,
  9825. },
  9826. }
  9827. target := &ret
  9828. if err := gensupport.DecodeResponse(target, res); err != nil {
  9829. return nil, err
  9830. }
  9831. return ret, nil
  9832. // {
  9833. // "description": "Start master IP rotation.",
  9834. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation",
  9835. // "httpMethod": "POST",
  9836. // "id": "container.projects.zones.clusters.startIpRotation",
  9837. // "parameterOrder": [
  9838. // "projectId",
  9839. // "zone",
  9840. // "clusterId"
  9841. // ],
  9842. // "parameters": {
  9843. // "clusterId": {
  9844. // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.",
  9845. // "location": "path",
  9846. // "required": true,
  9847. // "type": "string"
  9848. // },
  9849. // "projectId": {
  9850. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.",
  9851. // "location": "path",
  9852. // "required": true,
  9853. // "type": "string"
  9854. // },
  9855. // "zone": {
  9856. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  9857. // "location": "path",
  9858. // "required": true,
  9859. // "type": "string"
  9860. // }
  9861. // },
  9862. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation",
  9863. // "request": {
  9864. // "$ref": "StartIPRotationRequest"
  9865. // },
  9866. // "response": {
  9867. // "$ref": "Operation"
  9868. // },
  9869. // "scopes": [
  9870. // "https://www.googleapis.com/auth/cloud-platform"
  9871. // ]
  9872. // }
  9873. }
  9874. // method id "container.projects.zones.clusters.update":
  9875. type ProjectsZonesClustersUpdateCall struct {
  9876. s *Service
  9877. projectId string
  9878. zone string
  9879. clusterId string
  9880. updateclusterrequest *UpdateClusterRequest
  9881. urlParams_ gensupport.URLParams
  9882. ctx_ context.Context
  9883. header_ http.Header
  9884. }
  9885. // Update: Updates the settings of a specific cluster.
  9886. func (r *ProjectsZonesClustersService) Update(projectId string, zone string, clusterId string, updateclusterrequest *UpdateClusterRequest) *ProjectsZonesClustersUpdateCall {
  9887. c := &ProjectsZonesClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9888. c.projectId = projectId
  9889. c.zone = zone
  9890. c.clusterId = clusterId
  9891. c.updateclusterrequest = updateclusterrequest
  9892. return c
  9893. }
  9894. // Fields allows partial responses to be retrieved. See
  9895. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9896. // for more information.
  9897. func (c *ProjectsZonesClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersUpdateCall {
  9898. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9899. return c
  9900. }
  9901. // Context sets the context to be used in this call's Do method. Any
  9902. // pending HTTP request will be aborted if the provided context is
  9903. // canceled.
  9904. func (c *ProjectsZonesClustersUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersUpdateCall {
  9905. c.ctx_ = ctx
  9906. return c
  9907. }
  9908. // Header returns an http.Header that can be modified by the caller to
  9909. // add HTTP headers to the request.
  9910. func (c *ProjectsZonesClustersUpdateCall) Header() http.Header {
  9911. if c.header_ == nil {
  9912. c.header_ = make(http.Header)
  9913. }
  9914. return c.header_
  9915. }
  9916. func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) {
  9917. reqHeaders := make(http.Header)
  9918. for k, v := range c.header_ {
  9919. reqHeaders[k] = v
  9920. }
  9921. reqHeaders.Set("User-Agent", c.s.userAgent())
  9922. var body io.Reader = nil
  9923. body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest)
  9924. if err != nil {
  9925. return nil, err
  9926. }
  9927. reqHeaders.Set("Content-Type", "application/json")
  9928. c.urlParams_.Set("alt", alt)
  9929. c.urlParams_.Set("prettyPrint", "false")
  9930. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}")
  9931. urls += "?" + c.urlParams_.Encode()
  9932. req, err := http.NewRequest("PUT", urls, body)
  9933. if err != nil {
  9934. return nil, err
  9935. }
  9936. req.Header = reqHeaders
  9937. googleapi.Expand(req.URL, map[string]string{
  9938. "projectId": c.projectId,
  9939. "zone": c.zone,
  9940. "clusterId": c.clusterId,
  9941. })
  9942. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9943. }
  9944. // Do executes the "container.projects.zones.clusters.update" call.
  9945. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  9946. // status code is an error. Response headers are in either
  9947. // *Operation.ServerResponse.Header or (if a response was returned at
  9948. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9949. // to check whether the returned error was because
  9950. // http.StatusNotModified was returned.
  9951. func (c *ProjectsZonesClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9952. gensupport.SetOptions(c.urlParams_, opts...)
  9953. res, err := c.doRequest("json")
  9954. if res != nil && res.StatusCode == http.StatusNotModified {
  9955. if res.Body != nil {
  9956. res.Body.Close()
  9957. }
  9958. return nil, &googleapi.Error{
  9959. Code: res.StatusCode,
  9960. Header: res.Header,
  9961. }
  9962. }
  9963. if err != nil {
  9964. return nil, err
  9965. }
  9966. defer googleapi.CloseBody(res)
  9967. if err := googleapi.CheckResponse(res); err != nil {
  9968. return nil, err
  9969. }
  9970. ret := &Operation{
  9971. ServerResponse: googleapi.ServerResponse{
  9972. Header: res.Header,
  9973. HTTPStatusCode: res.StatusCode,
  9974. },
  9975. }
  9976. target := &ret
  9977. if err := gensupport.DecodeResponse(target, res); err != nil {
  9978. return nil, err
  9979. }
  9980. return ret, nil
  9981. // {
  9982. // "description": "Updates the settings of a specific cluster.",
  9983. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}",
  9984. // "httpMethod": "PUT",
  9985. // "id": "container.projects.zones.clusters.update",
  9986. // "parameterOrder": [
  9987. // "projectId",
  9988. // "zone",
  9989. // "clusterId"
  9990. // ],
  9991. // "parameters": {
  9992. // "clusterId": {
  9993. // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.",
  9994. // "location": "path",
  9995. // "required": true,
  9996. // "type": "string"
  9997. // },
  9998. // "projectId": {
  9999. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  10000. // "location": "path",
  10001. // "required": true,
  10002. // "type": "string"
  10003. // },
  10004. // "zone": {
  10005. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  10006. // "location": "path",
  10007. // "required": true,
  10008. // "type": "string"
  10009. // }
  10010. // },
  10011. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}",
  10012. // "request": {
  10013. // "$ref": "UpdateClusterRequest"
  10014. // },
  10015. // "response": {
  10016. // "$ref": "Operation"
  10017. // },
  10018. // "scopes": [
  10019. // "https://www.googleapis.com/auth/cloud-platform"
  10020. // ]
  10021. // }
  10022. }
  10023. // method id "container.projects.zones.clusters.nodePools.autoscaling":
  10024. type ProjectsZonesClustersNodePoolsAutoscalingCall struct {
  10025. s *Service
  10026. projectId string
  10027. zone string
  10028. clusterId string
  10029. nodePoolId string
  10030. setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest
  10031. urlParams_ gensupport.URLParams
  10032. ctx_ context.Context
  10033. header_ http.Header
  10034. }
  10035. // Autoscaling: Sets the autoscaling settings for a specific node pool.
  10036. func (r *ProjectsZonesClustersNodePoolsService) Autoscaling(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsZonesClustersNodePoolsAutoscalingCall {
  10037. c := &ProjectsZonesClustersNodePoolsAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10038. c.projectId = projectId
  10039. c.zone = zone
  10040. c.clusterId = clusterId
  10041. c.nodePoolId = nodePoolId
  10042. c.setnodepoolautoscalingrequest = setnodepoolautoscalingrequest
  10043. return c
  10044. }
  10045. // Fields allows partial responses to be retrieved. See
  10046. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10047. // for more information.
  10048. func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsAutoscalingCall {
  10049. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10050. return c
  10051. }
  10052. // Context sets the context to be used in this call's Do method. Any
  10053. // pending HTTP request will be aborted if the provided context is
  10054. // canceled.
  10055. func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsAutoscalingCall {
  10056. c.ctx_ = ctx
  10057. return c
  10058. }
  10059. // Header returns an http.Header that can be modified by the caller to
  10060. // add HTTP headers to the request.
  10061. func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Header() http.Header {
  10062. if c.header_ == nil {
  10063. c.header_ = make(http.Header)
  10064. }
  10065. return c.header_
  10066. }
  10067. func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (*http.Response, error) {
  10068. reqHeaders := make(http.Header)
  10069. for k, v := range c.header_ {
  10070. reqHeaders[k] = v
  10071. }
  10072. reqHeaders.Set("User-Agent", c.s.userAgent())
  10073. var body io.Reader = nil
  10074. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolautoscalingrequest)
  10075. if err != nil {
  10076. return nil, err
  10077. }
  10078. reqHeaders.Set("Content-Type", "application/json")
  10079. c.urlParams_.Set("alt", alt)
  10080. c.urlParams_.Set("prettyPrint", "false")
  10081. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling")
  10082. urls += "?" + c.urlParams_.Encode()
  10083. req, err := http.NewRequest("POST", urls, body)
  10084. if err != nil {
  10085. return nil, err
  10086. }
  10087. req.Header = reqHeaders
  10088. googleapi.Expand(req.URL, map[string]string{
  10089. "projectId": c.projectId,
  10090. "zone": c.zone,
  10091. "clusterId": c.clusterId,
  10092. "nodePoolId": c.nodePoolId,
  10093. })
  10094. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10095. }
  10096. // Do executes the "container.projects.zones.clusters.nodePools.autoscaling" call.
  10097. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  10098. // status code is an error. Response headers are in either
  10099. // *Operation.ServerResponse.Header or (if a response was returned at
  10100. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10101. // to check whether the returned error was because
  10102. // http.StatusNotModified was returned.
  10103. func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  10104. gensupport.SetOptions(c.urlParams_, opts...)
  10105. res, err := c.doRequest("json")
  10106. if res != nil && res.StatusCode == http.StatusNotModified {
  10107. if res.Body != nil {
  10108. res.Body.Close()
  10109. }
  10110. return nil, &googleapi.Error{
  10111. Code: res.StatusCode,
  10112. Header: res.Header,
  10113. }
  10114. }
  10115. if err != nil {
  10116. return nil, err
  10117. }
  10118. defer googleapi.CloseBody(res)
  10119. if err := googleapi.CheckResponse(res); err != nil {
  10120. return nil, err
  10121. }
  10122. ret := &Operation{
  10123. ServerResponse: googleapi.ServerResponse{
  10124. Header: res.Header,
  10125. HTTPStatusCode: res.StatusCode,
  10126. },
  10127. }
  10128. target := &ret
  10129. if err := gensupport.DecodeResponse(target, res); err != nil {
  10130. return nil, err
  10131. }
  10132. return ret, nil
  10133. // {
  10134. // "description": "Sets the autoscaling settings for a specific node pool.",
  10135. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling",
  10136. // "httpMethod": "POST",
  10137. // "id": "container.projects.zones.clusters.nodePools.autoscaling",
  10138. // "parameterOrder": [
  10139. // "projectId",
  10140. // "zone",
  10141. // "clusterId",
  10142. // "nodePoolId"
  10143. // ],
  10144. // "parameters": {
  10145. // "clusterId": {
  10146. // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.",
  10147. // "location": "path",
  10148. // "required": true,
  10149. // "type": "string"
  10150. // },
  10151. // "nodePoolId": {
  10152. // "description": "Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.",
  10153. // "location": "path",
  10154. // "required": true,
  10155. // "type": "string"
  10156. // },
  10157. // "projectId": {
  10158. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  10159. // "location": "path",
  10160. // "required": true,
  10161. // "type": "string"
  10162. // },
  10163. // "zone": {
  10164. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  10165. // "location": "path",
  10166. // "required": true,
  10167. // "type": "string"
  10168. // }
  10169. // },
  10170. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling",
  10171. // "request": {
  10172. // "$ref": "SetNodePoolAutoscalingRequest"
  10173. // },
  10174. // "response": {
  10175. // "$ref": "Operation"
  10176. // },
  10177. // "scopes": [
  10178. // "https://www.googleapis.com/auth/cloud-platform"
  10179. // ]
  10180. // }
  10181. }
  10182. // method id "container.projects.zones.clusters.nodePools.create":
  10183. type ProjectsZonesClustersNodePoolsCreateCall struct {
  10184. s *Service
  10185. projectId string
  10186. zone string
  10187. clusterId string
  10188. createnodepoolrequest *CreateNodePoolRequest
  10189. urlParams_ gensupport.URLParams
  10190. ctx_ context.Context
  10191. header_ http.Header
  10192. }
  10193. // Create: Creates a node pool for a cluster.
  10194. func (r *ProjectsZonesClustersNodePoolsService) Create(projectId string, zone string, clusterId string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsZonesClustersNodePoolsCreateCall {
  10195. c := &ProjectsZonesClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10196. c.projectId = projectId
  10197. c.zone = zone
  10198. c.clusterId = clusterId
  10199. c.createnodepoolrequest = createnodepoolrequest
  10200. return c
  10201. }
  10202. // Fields allows partial responses to be retrieved. See
  10203. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10204. // for more information.
  10205. func (c *ProjectsZonesClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsCreateCall {
  10206. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10207. return c
  10208. }
  10209. // Context sets the context to be used in this call's Do method. Any
  10210. // pending HTTP request will be aborted if the provided context is
  10211. // canceled.
  10212. func (c *ProjectsZonesClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsCreateCall {
  10213. c.ctx_ = ctx
  10214. return c
  10215. }
  10216. // Header returns an http.Header that can be modified by the caller to
  10217. // add HTTP headers to the request.
  10218. func (c *ProjectsZonesClustersNodePoolsCreateCall) Header() http.Header {
  10219. if c.header_ == nil {
  10220. c.header_ = make(http.Header)
  10221. }
  10222. return c.header_
  10223. }
  10224. func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) {
  10225. reqHeaders := make(http.Header)
  10226. for k, v := range c.header_ {
  10227. reqHeaders[k] = v
  10228. }
  10229. reqHeaders.Set("User-Agent", c.s.userAgent())
  10230. var body io.Reader = nil
  10231. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest)
  10232. if err != nil {
  10233. return nil, err
  10234. }
  10235. reqHeaders.Set("Content-Type", "application/json")
  10236. c.urlParams_.Set("alt", alt)
  10237. c.urlParams_.Set("prettyPrint", "false")
  10238. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools")
  10239. urls += "?" + c.urlParams_.Encode()
  10240. req, err := http.NewRequest("POST", urls, body)
  10241. if err != nil {
  10242. return nil, err
  10243. }
  10244. req.Header = reqHeaders
  10245. googleapi.Expand(req.URL, map[string]string{
  10246. "projectId": c.projectId,
  10247. "zone": c.zone,
  10248. "clusterId": c.clusterId,
  10249. })
  10250. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10251. }
  10252. // Do executes the "container.projects.zones.clusters.nodePools.create" call.
  10253. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  10254. // status code is an error. Response headers are in either
  10255. // *Operation.ServerResponse.Header or (if a response was returned at
  10256. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10257. // to check whether the returned error was because
  10258. // http.StatusNotModified was returned.
  10259. func (c *ProjectsZonesClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  10260. gensupport.SetOptions(c.urlParams_, opts...)
  10261. res, err := c.doRequest("json")
  10262. if res != nil && res.StatusCode == http.StatusNotModified {
  10263. if res.Body != nil {
  10264. res.Body.Close()
  10265. }
  10266. return nil, &googleapi.Error{
  10267. Code: res.StatusCode,
  10268. Header: res.Header,
  10269. }
  10270. }
  10271. if err != nil {
  10272. return nil, err
  10273. }
  10274. defer googleapi.CloseBody(res)
  10275. if err := googleapi.CheckResponse(res); err != nil {
  10276. return nil, err
  10277. }
  10278. ret := &Operation{
  10279. ServerResponse: googleapi.ServerResponse{
  10280. Header: res.Header,
  10281. HTTPStatusCode: res.StatusCode,
  10282. },
  10283. }
  10284. target := &ret
  10285. if err := gensupport.DecodeResponse(target, res); err != nil {
  10286. return nil, err
  10287. }
  10288. return ret, nil
  10289. // {
  10290. // "description": "Creates a node pool for a cluster.",
  10291. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools",
  10292. // "httpMethod": "POST",
  10293. // "id": "container.projects.zones.clusters.nodePools.create",
  10294. // "parameterOrder": [
  10295. // "projectId",
  10296. // "zone",
  10297. // "clusterId"
  10298. // ],
  10299. // "parameters": {
  10300. // "clusterId": {
  10301. // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.",
  10302. // "location": "path",
  10303. // "required": true,
  10304. // "type": "string"
  10305. // },
  10306. // "projectId": {
  10307. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.",
  10308. // "location": "path",
  10309. // "required": true,
  10310. // "type": "string"
  10311. // },
  10312. // "zone": {
  10313. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.",
  10314. // "location": "path",
  10315. // "required": true,
  10316. // "type": "string"
  10317. // }
  10318. // },
  10319. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools",
  10320. // "request": {
  10321. // "$ref": "CreateNodePoolRequest"
  10322. // },
  10323. // "response": {
  10324. // "$ref": "Operation"
  10325. // },
  10326. // "scopes": [
  10327. // "https://www.googleapis.com/auth/cloud-platform"
  10328. // ]
  10329. // }
  10330. }
  10331. // method id "container.projects.zones.clusters.nodePools.delete":
  10332. type ProjectsZonesClustersNodePoolsDeleteCall struct {
  10333. s *Service
  10334. projectId string
  10335. zone string
  10336. clusterId string
  10337. nodePoolId string
  10338. urlParams_ gensupport.URLParams
  10339. ctx_ context.Context
  10340. header_ http.Header
  10341. }
  10342. // Delete: Deletes a node pool from a cluster.
  10343. func (r *ProjectsZonesClustersNodePoolsService) Delete(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsDeleteCall {
  10344. c := &ProjectsZonesClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10345. c.projectId = projectId
  10346. c.zone = zone
  10347. c.clusterId = clusterId
  10348. c.nodePoolId = nodePoolId
  10349. return c
  10350. }
  10351. // Name sets the optional parameter "name": The name (project, location,
  10352. // cluster, node pool id) of the node pool to
  10353. // delete. Specified in the
  10354. // format
  10355. // 'projects/*/locations/*/clusters/*/nodePools/*'.
  10356. func (c *ProjectsZonesClustersNodePoolsDeleteCall) Name(name string) *ProjectsZonesClustersNodePoolsDeleteCall {
  10357. c.urlParams_.Set("name", name)
  10358. return c
  10359. }
  10360. // Fields allows partial responses to be retrieved. See
  10361. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10362. // for more information.
  10363. func (c *ProjectsZonesClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsDeleteCall {
  10364. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10365. return c
  10366. }
  10367. // Context sets the context to be used in this call's Do method. Any
  10368. // pending HTTP request will be aborted if the provided context is
  10369. // canceled.
  10370. func (c *ProjectsZonesClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsDeleteCall {
  10371. c.ctx_ = ctx
  10372. return c
  10373. }
  10374. // Header returns an http.Header that can be modified by the caller to
  10375. // add HTTP headers to the request.
  10376. func (c *ProjectsZonesClustersNodePoolsDeleteCall) Header() http.Header {
  10377. if c.header_ == nil {
  10378. c.header_ = make(http.Header)
  10379. }
  10380. return c.header_
  10381. }
  10382. func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
  10383. reqHeaders := make(http.Header)
  10384. for k, v := range c.header_ {
  10385. reqHeaders[k] = v
  10386. }
  10387. reqHeaders.Set("User-Agent", c.s.userAgent())
  10388. var body io.Reader = nil
  10389. c.urlParams_.Set("alt", alt)
  10390. c.urlParams_.Set("prettyPrint", "false")
  10391. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}")
  10392. urls += "?" + c.urlParams_.Encode()
  10393. req, err := http.NewRequest("DELETE", urls, body)
  10394. if err != nil {
  10395. return nil, err
  10396. }
  10397. req.Header = reqHeaders
  10398. googleapi.Expand(req.URL, map[string]string{
  10399. "projectId": c.projectId,
  10400. "zone": c.zone,
  10401. "clusterId": c.clusterId,
  10402. "nodePoolId": c.nodePoolId,
  10403. })
  10404. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10405. }
  10406. // Do executes the "container.projects.zones.clusters.nodePools.delete" call.
  10407. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  10408. // status code is an error. Response headers are in either
  10409. // *Operation.ServerResponse.Header or (if a response was returned at
  10410. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10411. // to check whether the returned error was because
  10412. // http.StatusNotModified was returned.
  10413. func (c *ProjectsZonesClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  10414. gensupport.SetOptions(c.urlParams_, opts...)
  10415. res, err := c.doRequest("json")
  10416. if res != nil && res.StatusCode == http.StatusNotModified {
  10417. if res.Body != nil {
  10418. res.Body.Close()
  10419. }
  10420. return nil, &googleapi.Error{
  10421. Code: res.StatusCode,
  10422. Header: res.Header,
  10423. }
  10424. }
  10425. if err != nil {
  10426. return nil, err
  10427. }
  10428. defer googleapi.CloseBody(res)
  10429. if err := googleapi.CheckResponse(res); err != nil {
  10430. return nil, err
  10431. }
  10432. ret := &Operation{
  10433. ServerResponse: googleapi.ServerResponse{
  10434. Header: res.Header,
  10435. HTTPStatusCode: res.StatusCode,
  10436. },
  10437. }
  10438. target := &ret
  10439. if err := gensupport.DecodeResponse(target, res); err != nil {
  10440. return nil, err
  10441. }
  10442. return ret, nil
  10443. // {
  10444. // "description": "Deletes a node pool from a cluster.",
  10445. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}",
  10446. // "httpMethod": "DELETE",
  10447. // "id": "container.projects.zones.clusters.nodePools.delete",
  10448. // "parameterOrder": [
  10449. // "projectId",
  10450. // "zone",
  10451. // "clusterId",
  10452. // "nodePoolId"
  10453. // ],
  10454. // "parameters": {
  10455. // "clusterId": {
  10456. // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.",
  10457. // "location": "path",
  10458. // "required": true,
  10459. // "type": "string"
  10460. // },
  10461. // "name": {
  10462. // "description": "The name (project, location, cluster, node pool id) of the node pool to\ndelete. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.",
  10463. // "location": "query",
  10464. // "type": "string"
  10465. // },
  10466. // "nodePoolId": {
  10467. // "description": "Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.",
  10468. // "location": "path",
  10469. // "required": true,
  10470. // "type": "string"
  10471. // },
  10472. // "projectId": {
  10473. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.",
  10474. // "location": "path",
  10475. // "required": true,
  10476. // "type": "string"
  10477. // },
  10478. // "zone": {
  10479. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  10480. // "location": "path",
  10481. // "required": true,
  10482. // "type": "string"
  10483. // }
  10484. // },
  10485. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}",
  10486. // "response": {
  10487. // "$ref": "Operation"
  10488. // },
  10489. // "scopes": [
  10490. // "https://www.googleapis.com/auth/cloud-platform"
  10491. // ]
  10492. // }
  10493. }
  10494. // method id "container.projects.zones.clusters.nodePools.get":
  10495. type ProjectsZonesClustersNodePoolsGetCall struct {
  10496. s *Service
  10497. projectId string
  10498. zone string
  10499. clusterId string
  10500. nodePoolId string
  10501. urlParams_ gensupport.URLParams
  10502. ifNoneMatch_ string
  10503. ctx_ context.Context
  10504. header_ http.Header
  10505. }
  10506. // Get: Retrieves the node pool requested.
  10507. func (r *ProjectsZonesClustersNodePoolsService) Get(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsGetCall {
  10508. c := &ProjectsZonesClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10509. c.projectId = projectId
  10510. c.zone = zone
  10511. c.clusterId = clusterId
  10512. c.nodePoolId = nodePoolId
  10513. return c
  10514. }
  10515. // Name sets the optional parameter "name": The name (project, location,
  10516. // cluster, node pool id) of the node pool to
  10517. // get. Specified in the
  10518. // format
  10519. // 'projects/*/locations/*/clusters/*/nodePools/*'.
  10520. func (c *ProjectsZonesClustersNodePoolsGetCall) Name(name string) *ProjectsZonesClustersNodePoolsGetCall {
  10521. c.urlParams_.Set("name", name)
  10522. return c
  10523. }
  10524. // Fields allows partial responses to be retrieved. See
  10525. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10526. // for more information.
  10527. func (c *ProjectsZonesClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsGetCall {
  10528. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10529. return c
  10530. }
  10531. // IfNoneMatch sets the optional parameter which makes the operation
  10532. // fail if the object's ETag matches the given value. This is useful for
  10533. // getting updates only after the object has changed since the last
  10534. // request. Use googleapi.IsNotModified to check whether the response
  10535. // error from Do is the result of In-None-Match.
  10536. func (c *ProjectsZonesClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsGetCall {
  10537. c.ifNoneMatch_ = entityTag
  10538. return c
  10539. }
  10540. // Context sets the context to be used in this call's Do method. Any
  10541. // pending HTTP request will be aborted if the provided context is
  10542. // canceled.
  10543. func (c *ProjectsZonesClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsGetCall {
  10544. c.ctx_ = ctx
  10545. return c
  10546. }
  10547. // Header returns an http.Header that can be modified by the caller to
  10548. // add HTTP headers to the request.
  10549. func (c *ProjectsZonesClustersNodePoolsGetCall) Header() http.Header {
  10550. if c.header_ == nil {
  10551. c.header_ = make(http.Header)
  10552. }
  10553. return c.header_
  10554. }
  10555. func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) {
  10556. reqHeaders := make(http.Header)
  10557. for k, v := range c.header_ {
  10558. reqHeaders[k] = v
  10559. }
  10560. reqHeaders.Set("User-Agent", c.s.userAgent())
  10561. if c.ifNoneMatch_ != "" {
  10562. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10563. }
  10564. var body io.Reader = nil
  10565. c.urlParams_.Set("alt", alt)
  10566. c.urlParams_.Set("prettyPrint", "false")
  10567. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}")
  10568. urls += "?" + c.urlParams_.Encode()
  10569. req, err := http.NewRequest("GET", urls, body)
  10570. if err != nil {
  10571. return nil, err
  10572. }
  10573. req.Header = reqHeaders
  10574. googleapi.Expand(req.URL, map[string]string{
  10575. "projectId": c.projectId,
  10576. "zone": c.zone,
  10577. "clusterId": c.clusterId,
  10578. "nodePoolId": c.nodePoolId,
  10579. })
  10580. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10581. }
  10582. // Do executes the "container.projects.zones.clusters.nodePools.get" call.
  10583. // Exactly one of *NodePool or error will be non-nil. Any non-2xx status
  10584. // code is an error. Response headers are in either
  10585. // *NodePool.ServerResponse.Header or (if a response was returned at
  10586. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10587. // to check whether the returned error was because
  10588. // http.StatusNotModified was returned.
  10589. func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, error) {
  10590. gensupport.SetOptions(c.urlParams_, opts...)
  10591. res, err := c.doRequest("json")
  10592. if res != nil && res.StatusCode == http.StatusNotModified {
  10593. if res.Body != nil {
  10594. res.Body.Close()
  10595. }
  10596. return nil, &googleapi.Error{
  10597. Code: res.StatusCode,
  10598. Header: res.Header,
  10599. }
  10600. }
  10601. if err != nil {
  10602. return nil, err
  10603. }
  10604. defer googleapi.CloseBody(res)
  10605. if err := googleapi.CheckResponse(res); err != nil {
  10606. return nil, err
  10607. }
  10608. ret := &NodePool{
  10609. ServerResponse: googleapi.ServerResponse{
  10610. Header: res.Header,
  10611. HTTPStatusCode: res.StatusCode,
  10612. },
  10613. }
  10614. target := &ret
  10615. if err := gensupport.DecodeResponse(target, res); err != nil {
  10616. return nil, err
  10617. }
  10618. return ret, nil
  10619. // {
  10620. // "description": "Retrieves the node pool requested.",
  10621. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}",
  10622. // "httpMethod": "GET",
  10623. // "id": "container.projects.zones.clusters.nodePools.get",
  10624. // "parameterOrder": [
  10625. // "projectId",
  10626. // "zone",
  10627. // "clusterId",
  10628. // "nodePoolId"
  10629. // ],
  10630. // "parameters": {
  10631. // "clusterId": {
  10632. // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.",
  10633. // "location": "path",
  10634. // "required": true,
  10635. // "type": "string"
  10636. // },
  10637. // "name": {
  10638. // "description": "The name (project, location, cluster, node pool id) of the node pool to\nget. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.",
  10639. // "location": "query",
  10640. // "type": "string"
  10641. // },
  10642. // "nodePoolId": {
  10643. // "description": "Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.",
  10644. // "location": "path",
  10645. // "required": true,
  10646. // "type": "string"
  10647. // },
  10648. // "projectId": {
  10649. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.",
  10650. // "location": "path",
  10651. // "required": true,
  10652. // "type": "string"
  10653. // },
  10654. // "zone": {
  10655. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  10656. // "location": "path",
  10657. // "required": true,
  10658. // "type": "string"
  10659. // }
  10660. // },
  10661. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}",
  10662. // "response": {
  10663. // "$ref": "NodePool"
  10664. // },
  10665. // "scopes": [
  10666. // "https://www.googleapis.com/auth/cloud-platform"
  10667. // ]
  10668. // }
  10669. }
  10670. // method id "container.projects.zones.clusters.nodePools.list":
  10671. type ProjectsZonesClustersNodePoolsListCall struct {
  10672. s *Service
  10673. projectId string
  10674. zone string
  10675. clusterId string
  10676. urlParams_ gensupport.URLParams
  10677. ifNoneMatch_ string
  10678. ctx_ context.Context
  10679. header_ http.Header
  10680. }
  10681. // List: Lists the node pools for a cluster.
  10682. func (r *ProjectsZonesClustersNodePoolsService) List(projectId string, zone string, clusterId string) *ProjectsZonesClustersNodePoolsListCall {
  10683. c := &ProjectsZonesClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10684. c.projectId = projectId
  10685. c.zone = zone
  10686. c.clusterId = clusterId
  10687. return c
  10688. }
  10689. // Parent sets the optional parameter "parent": The parent (project,
  10690. // location, cluster id) where the node pools will be
  10691. // listed. Specified in the format 'projects/*/locations/*/clusters/*'.
  10692. func (c *ProjectsZonesClustersNodePoolsListCall) Parent(parent string) *ProjectsZonesClustersNodePoolsListCall {
  10693. c.urlParams_.Set("parent", parent)
  10694. return c
  10695. }
  10696. // Fields allows partial responses to be retrieved. See
  10697. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10698. // for more information.
  10699. func (c *ProjectsZonesClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsListCall {
  10700. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10701. return c
  10702. }
  10703. // IfNoneMatch sets the optional parameter which makes the operation
  10704. // fail if the object's ETag matches the given value. This is useful for
  10705. // getting updates only after the object has changed since the last
  10706. // request. Use googleapi.IsNotModified to check whether the response
  10707. // error from Do is the result of In-None-Match.
  10708. func (c *ProjectsZonesClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsListCall {
  10709. c.ifNoneMatch_ = entityTag
  10710. return c
  10711. }
  10712. // Context sets the context to be used in this call's Do method. Any
  10713. // pending HTTP request will be aborted if the provided context is
  10714. // canceled.
  10715. func (c *ProjectsZonesClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsListCall {
  10716. c.ctx_ = ctx
  10717. return c
  10718. }
  10719. // Header returns an http.Header that can be modified by the caller to
  10720. // add HTTP headers to the request.
  10721. func (c *ProjectsZonesClustersNodePoolsListCall) Header() http.Header {
  10722. if c.header_ == nil {
  10723. c.header_ = make(http.Header)
  10724. }
  10725. return c.header_
  10726. }
  10727. func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) {
  10728. reqHeaders := make(http.Header)
  10729. for k, v := range c.header_ {
  10730. reqHeaders[k] = v
  10731. }
  10732. reqHeaders.Set("User-Agent", c.s.userAgent())
  10733. if c.ifNoneMatch_ != "" {
  10734. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10735. }
  10736. var body io.Reader = nil
  10737. c.urlParams_.Set("alt", alt)
  10738. c.urlParams_.Set("prettyPrint", "false")
  10739. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools")
  10740. urls += "?" + c.urlParams_.Encode()
  10741. req, err := http.NewRequest("GET", urls, body)
  10742. if err != nil {
  10743. return nil, err
  10744. }
  10745. req.Header = reqHeaders
  10746. googleapi.Expand(req.URL, map[string]string{
  10747. "projectId": c.projectId,
  10748. "zone": c.zone,
  10749. "clusterId": c.clusterId,
  10750. })
  10751. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10752. }
  10753. // Do executes the "container.projects.zones.clusters.nodePools.list" call.
  10754. // Exactly one of *ListNodePoolsResponse or error will be non-nil. Any
  10755. // non-2xx status code is an error. Response headers are in either
  10756. // *ListNodePoolsResponse.ServerResponse.Header or (if a response was
  10757. // returned at all) in error.(*googleapi.Error).Header. Use
  10758. // googleapi.IsNotModified to check whether the returned error was
  10759. // because http.StatusNotModified was returned.
  10760. func (c *ProjectsZonesClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, error) {
  10761. gensupport.SetOptions(c.urlParams_, opts...)
  10762. res, err := c.doRequest("json")
  10763. if res != nil && res.StatusCode == http.StatusNotModified {
  10764. if res.Body != nil {
  10765. res.Body.Close()
  10766. }
  10767. return nil, &googleapi.Error{
  10768. Code: res.StatusCode,
  10769. Header: res.Header,
  10770. }
  10771. }
  10772. if err != nil {
  10773. return nil, err
  10774. }
  10775. defer googleapi.CloseBody(res)
  10776. if err := googleapi.CheckResponse(res); err != nil {
  10777. return nil, err
  10778. }
  10779. ret := &ListNodePoolsResponse{
  10780. ServerResponse: googleapi.ServerResponse{
  10781. Header: res.Header,
  10782. HTTPStatusCode: res.StatusCode,
  10783. },
  10784. }
  10785. target := &ret
  10786. if err := gensupport.DecodeResponse(target, res); err != nil {
  10787. return nil, err
  10788. }
  10789. return ret, nil
  10790. // {
  10791. // "description": "Lists the node pools for a cluster.",
  10792. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools",
  10793. // "httpMethod": "GET",
  10794. // "id": "container.projects.zones.clusters.nodePools.list",
  10795. // "parameterOrder": [
  10796. // "projectId",
  10797. // "zone",
  10798. // "clusterId"
  10799. // ],
  10800. // "parameters": {
  10801. // "clusterId": {
  10802. // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.",
  10803. // "location": "path",
  10804. // "required": true,
  10805. // "type": "string"
  10806. // },
  10807. // "parent": {
  10808. // "description": "The parent (project, location, cluster id) where the node pools will be\nlisted. Specified in the format 'projects/*/locations/*/clusters/*'.",
  10809. // "location": "query",
  10810. // "type": "string"
  10811. // },
  10812. // "projectId": {
  10813. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.",
  10814. // "location": "path",
  10815. // "required": true,
  10816. // "type": "string"
  10817. // },
  10818. // "zone": {
  10819. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.",
  10820. // "location": "path",
  10821. // "required": true,
  10822. // "type": "string"
  10823. // }
  10824. // },
  10825. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools",
  10826. // "response": {
  10827. // "$ref": "ListNodePoolsResponse"
  10828. // },
  10829. // "scopes": [
  10830. // "https://www.googleapis.com/auth/cloud-platform"
  10831. // ]
  10832. // }
  10833. }
  10834. // method id "container.projects.zones.clusters.nodePools.rollback":
  10835. type ProjectsZonesClustersNodePoolsRollbackCall struct {
  10836. s *Service
  10837. projectId string
  10838. zone string
  10839. clusterId string
  10840. nodePoolId string
  10841. rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest
  10842. urlParams_ gensupport.URLParams
  10843. ctx_ context.Context
  10844. header_ http.Header
  10845. }
  10846. // Rollback: Roll back the previously Aborted or Failed NodePool
  10847. // upgrade.
  10848. // This will be an no-op if the last upgrade successfully completed.
  10849. func (r *ProjectsZonesClustersNodePoolsService) Rollback(projectId string, zone string, clusterId string, nodePoolId string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsZonesClustersNodePoolsRollbackCall {
  10850. c := &ProjectsZonesClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10851. c.projectId = projectId
  10852. c.zone = zone
  10853. c.clusterId = clusterId
  10854. c.nodePoolId = nodePoolId
  10855. c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest
  10856. return c
  10857. }
  10858. // Fields allows partial responses to be retrieved. See
  10859. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10860. // for more information.
  10861. func (c *ProjectsZonesClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsRollbackCall {
  10862. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10863. return c
  10864. }
  10865. // Context sets the context to be used in this call's Do method. Any
  10866. // pending HTTP request will be aborted if the provided context is
  10867. // canceled.
  10868. func (c *ProjectsZonesClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsRollbackCall {
  10869. c.ctx_ = ctx
  10870. return c
  10871. }
  10872. // Header returns an http.Header that can be modified by the caller to
  10873. // add HTTP headers to the request.
  10874. func (c *ProjectsZonesClustersNodePoolsRollbackCall) Header() http.Header {
  10875. if c.header_ == nil {
  10876. c.header_ = make(http.Header)
  10877. }
  10878. return c.header_
  10879. }
  10880. func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) {
  10881. reqHeaders := make(http.Header)
  10882. for k, v := range c.header_ {
  10883. reqHeaders[k] = v
  10884. }
  10885. reqHeaders.Set("User-Agent", c.s.userAgent())
  10886. var body io.Reader = nil
  10887. body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbacknodepoolupgraderequest)
  10888. if err != nil {
  10889. return nil, err
  10890. }
  10891. reqHeaders.Set("Content-Type", "application/json")
  10892. c.urlParams_.Set("alt", alt)
  10893. c.urlParams_.Set("prettyPrint", "false")
  10894. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback")
  10895. urls += "?" + c.urlParams_.Encode()
  10896. req, err := http.NewRequest("POST", urls, body)
  10897. if err != nil {
  10898. return nil, err
  10899. }
  10900. req.Header = reqHeaders
  10901. googleapi.Expand(req.URL, map[string]string{
  10902. "projectId": c.projectId,
  10903. "zone": c.zone,
  10904. "clusterId": c.clusterId,
  10905. "nodePoolId": c.nodePoolId,
  10906. })
  10907. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10908. }
  10909. // Do executes the "container.projects.zones.clusters.nodePools.rollback" call.
  10910. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  10911. // status code is an error. Response headers are in either
  10912. // *Operation.ServerResponse.Header or (if a response was returned at
  10913. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10914. // to check whether the returned error was because
  10915. // http.StatusNotModified was returned.
  10916. func (c *ProjectsZonesClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  10917. gensupport.SetOptions(c.urlParams_, opts...)
  10918. res, err := c.doRequest("json")
  10919. if res != nil && res.StatusCode == http.StatusNotModified {
  10920. if res.Body != nil {
  10921. res.Body.Close()
  10922. }
  10923. return nil, &googleapi.Error{
  10924. Code: res.StatusCode,
  10925. Header: res.Header,
  10926. }
  10927. }
  10928. if err != nil {
  10929. return nil, err
  10930. }
  10931. defer googleapi.CloseBody(res)
  10932. if err := googleapi.CheckResponse(res); err != nil {
  10933. return nil, err
  10934. }
  10935. ret := &Operation{
  10936. ServerResponse: googleapi.ServerResponse{
  10937. Header: res.Header,
  10938. HTTPStatusCode: res.StatusCode,
  10939. },
  10940. }
  10941. target := &ret
  10942. if err := gensupport.DecodeResponse(target, res); err != nil {
  10943. return nil, err
  10944. }
  10945. return ret, nil
  10946. // {
  10947. // "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.",
  10948. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback",
  10949. // "httpMethod": "POST",
  10950. // "id": "container.projects.zones.clusters.nodePools.rollback",
  10951. // "parameterOrder": [
  10952. // "projectId",
  10953. // "zone",
  10954. // "clusterId",
  10955. // "nodePoolId"
  10956. // ],
  10957. // "parameters": {
  10958. // "clusterId": {
  10959. // "description": "Deprecated. The name of the cluster to rollback.\nThis field has been deprecated and replaced by the name field.",
  10960. // "location": "path",
  10961. // "required": true,
  10962. // "type": "string"
  10963. // },
  10964. // "nodePoolId": {
  10965. // "description": "Deprecated. The name of the node pool to rollback.\nThis field has been deprecated and replaced by the name field.",
  10966. // "location": "path",
  10967. // "required": true,
  10968. // "type": "string"
  10969. // },
  10970. // "projectId": {
  10971. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  10972. // "location": "path",
  10973. // "required": true,
  10974. // "type": "string"
  10975. // },
  10976. // "zone": {
  10977. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  10978. // "location": "path",
  10979. // "required": true,
  10980. // "type": "string"
  10981. // }
  10982. // },
  10983. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback",
  10984. // "request": {
  10985. // "$ref": "RollbackNodePoolUpgradeRequest"
  10986. // },
  10987. // "response": {
  10988. // "$ref": "Operation"
  10989. // },
  10990. // "scopes": [
  10991. // "https://www.googleapis.com/auth/cloud-platform"
  10992. // ]
  10993. // }
  10994. }
  10995. // method id "container.projects.zones.clusters.nodePools.setManagement":
  10996. type ProjectsZonesClustersNodePoolsSetManagementCall struct {
  10997. s *Service
  10998. projectId string
  10999. zone string
  11000. clusterId string
  11001. nodePoolId string
  11002. setnodepoolmanagementrequest *SetNodePoolManagementRequest
  11003. urlParams_ gensupport.URLParams
  11004. ctx_ context.Context
  11005. header_ http.Header
  11006. }
  11007. // SetManagement: Sets the NodeManagement options for a node pool.
  11008. func (r *ProjectsZonesClustersNodePoolsService) SetManagement(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsZonesClustersNodePoolsSetManagementCall {
  11009. c := &ProjectsZonesClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11010. c.projectId = projectId
  11011. c.zone = zone
  11012. c.clusterId = clusterId
  11013. c.nodePoolId = nodePoolId
  11014. c.setnodepoolmanagementrequest = setnodepoolmanagementrequest
  11015. return c
  11016. }
  11017. // Fields allows partial responses to be retrieved. See
  11018. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11019. // for more information.
  11020. func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetManagementCall {
  11021. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11022. return c
  11023. }
  11024. // Context sets the context to be used in this call's Do method. Any
  11025. // pending HTTP request will be aborted if the provided context is
  11026. // canceled.
  11027. func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetManagementCall {
  11028. c.ctx_ = ctx
  11029. return c
  11030. }
  11031. // Header returns an http.Header that can be modified by the caller to
  11032. // add HTTP headers to the request.
  11033. func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Header() http.Header {
  11034. if c.header_ == nil {
  11035. c.header_ = make(http.Header)
  11036. }
  11037. return c.header_
  11038. }
  11039. func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) {
  11040. reqHeaders := make(http.Header)
  11041. for k, v := range c.header_ {
  11042. reqHeaders[k] = v
  11043. }
  11044. reqHeaders.Set("User-Agent", c.s.userAgent())
  11045. var body io.Reader = nil
  11046. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolmanagementrequest)
  11047. if err != nil {
  11048. return nil, err
  11049. }
  11050. reqHeaders.Set("Content-Type", "application/json")
  11051. c.urlParams_.Set("alt", alt)
  11052. c.urlParams_.Set("prettyPrint", "false")
  11053. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement")
  11054. urls += "?" + c.urlParams_.Encode()
  11055. req, err := http.NewRequest("POST", urls, body)
  11056. if err != nil {
  11057. return nil, err
  11058. }
  11059. req.Header = reqHeaders
  11060. googleapi.Expand(req.URL, map[string]string{
  11061. "projectId": c.projectId,
  11062. "zone": c.zone,
  11063. "clusterId": c.clusterId,
  11064. "nodePoolId": c.nodePoolId,
  11065. })
  11066. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11067. }
  11068. // Do executes the "container.projects.zones.clusters.nodePools.setManagement" call.
  11069. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  11070. // status code is an error. Response headers are in either
  11071. // *Operation.ServerResponse.Header or (if a response was returned at
  11072. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11073. // to check whether the returned error was because
  11074. // http.StatusNotModified was returned.
  11075. func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  11076. gensupport.SetOptions(c.urlParams_, opts...)
  11077. res, err := c.doRequest("json")
  11078. if res != nil && res.StatusCode == http.StatusNotModified {
  11079. if res.Body != nil {
  11080. res.Body.Close()
  11081. }
  11082. return nil, &googleapi.Error{
  11083. Code: res.StatusCode,
  11084. Header: res.Header,
  11085. }
  11086. }
  11087. if err != nil {
  11088. return nil, err
  11089. }
  11090. defer googleapi.CloseBody(res)
  11091. if err := googleapi.CheckResponse(res); err != nil {
  11092. return nil, err
  11093. }
  11094. ret := &Operation{
  11095. ServerResponse: googleapi.ServerResponse{
  11096. Header: res.Header,
  11097. HTTPStatusCode: res.StatusCode,
  11098. },
  11099. }
  11100. target := &ret
  11101. if err := gensupport.DecodeResponse(target, res); err != nil {
  11102. return nil, err
  11103. }
  11104. return ret, nil
  11105. // {
  11106. // "description": "Sets the NodeManagement options for a node pool.",
  11107. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement",
  11108. // "httpMethod": "POST",
  11109. // "id": "container.projects.zones.clusters.nodePools.setManagement",
  11110. // "parameterOrder": [
  11111. // "projectId",
  11112. // "zone",
  11113. // "clusterId",
  11114. // "nodePoolId"
  11115. // ],
  11116. // "parameters": {
  11117. // "clusterId": {
  11118. // "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.",
  11119. // "location": "path",
  11120. // "required": true,
  11121. // "type": "string"
  11122. // },
  11123. // "nodePoolId": {
  11124. // "description": "Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.",
  11125. // "location": "path",
  11126. // "required": true,
  11127. // "type": "string"
  11128. // },
  11129. // "projectId": {
  11130. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  11131. // "location": "path",
  11132. // "required": true,
  11133. // "type": "string"
  11134. // },
  11135. // "zone": {
  11136. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  11137. // "location": "path",
  11138. // "required": true,
  11139. // "type": "string"
  11140. // }
  11141. // },
  11142. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement",
  11143. // "request": {
  11144. // "$ref": "SetNodePoolManagementRequest"
  11145. // },
  11146. // "response": {
  11147. // "$ref": "Operation"
  11148. // },
  11149. // "scopes": [
  11150. // "https://www.googleapis.com/auth/cloud-platform"
  11151. // ]
  11152. // }
  11153. }
  11154. // method id "container.projects.zones.clusters.nodePools.setSize":
  11155. type ProjectsZonesClustersNodePoolsSetSizeCall struct {
  11156. s *Service
  11157. projectId string
  11158. zone string
  11159. clusterId string
  11160. nodePoolId string
  11161. setnodepoolsizerequest *SetNodePoolSizeRequest
  11162. urlParams_ gensupport.URLParams
  11163. ctx_ context.Context
  11164. header_ http.Header
  11165. }
  11166. // SetSize: Sets the size for a specific node pool.
  11167. func (r *ProjectsZonesClustersNodePoolsService) SetSize(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolsizerequest *SetNodePoolSizeRequest) *ProjectsZonesClustersNodePoolsSetSizeCall {
  11168. c := &ProjectsZonesClustersNodePoolsSetSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11169. c.projectId = projectId
  11170. c.zone = zone
  11171. c.clusterId = clusterId
  11172. c.nodePoolId = nodePoolId
  11173. c.setnodepoolsizerequest = setnodepoolsizerequest
  11174. return c
  11175. }
  11176. // Fields allows partial responses to be retrieved. See
  11177. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11178. // for more information.
  11179. func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetSizeCall {
  11180. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11181. return c
  11182. }
  11183. // Context sets the context to be used in this call's Do method. Any
  11184. // pending HTTP request will be aborted if the provided context is
  11185. // canceled.
  11186. func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetSizeCall {
  11187. c.ctx_ = ctx
  11188. return c
  11189. }
  11190. // Header returns an http.Header that can be modified by the caller to
  11191. // add HTTP headers to the request.
  11192. func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Header() http.Header {
  11193. if c.header_ == nil {
  11194. c.header_ = make(http.Header)
  11195. }
  11196. return c.header_
  11197. }
  11198. func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) {
  11199. reqHeaders := make(http.Header)
  11200. for k, v := range c.header_ {
  11201. reqHeaders[k] = v
  11202. }
  11203. reqHeaders.Set("User-Agent", c.s.userAgent())
  11204. var body io.Reader = nil
  11205. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolsizerequest)
  11206. if err != nil {
  11207. return nil, err
  11208. }
  11209. reqHeaders.Set("Content-Type", "application/json")
  11210. c.urlParams_.Set("alt", alt)
  11211. c.urlParams_.Set("prettyPrint", "false")
  11212. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize")
  11213. urls += "?" + c.urlParams_.Encode()
  11214. req, err := http.NewRequest("POST", urls, body)
  11215. if err != nil {
  11216. return nil, err
  11217. }
  11218. req.Header = reqHeaders
  11219. googleapi.Expand(req.URL, map[string]string{
  11220. "projectId": c.projectId,
  11221. "zone": c.zone,
  11222. "clusterId": c.clusterId,
  11223. "nodePoolId": c.nodePoolId,
  11224. })
  11225. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11226. }
  11227. // Do executes the "container.projects.zones.clusters.nodePools.setSize" call.
  11228. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  11229. // status code is an error. Response headers are in either
  11230. // *Operation.ServerResponse.Header or (if a response was returned at
  11231. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11232. // to check whether the returned error was because
  11233. // http.StatusNotModified was returned.
  11234. func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  11235. gensupport.SetOptions(c.urlParams_, opts...)
  11236. res, err := c.doRequest("json")
  11237. if res != nil && res.StatusCode == http.StatusNotModified {
  11238. if res.Body != nil {
  11239. res.Body.Close()
  11240. }
  11241. return nil, &googleapi.Error{
  11242. Code: res.StatusCode,
  11243. Header: res.Header,
  11244. }
  11245. }
  11246. if err != nil {
  11247. return nil, err
  11248. }
  11249. defer googleapi.CloseBody(res)
  11250. if err := googleapi.CheckResponse(res); err != nil {
  11251. return nil, err
  11252. }
  11253. ret := &Operation{
  11254. ServerResponse: googleapi.ServerResponse{
  11255. Header: res.Header,
  11256. HTTPStatusCode: res.StatusCode,
  11257. },
  11258. }
  11259. target := &ret
  11260. if err := gensupport.DecodeResponse(target, res); err != nil {
  11261. return nil, err
  11262. }
  11263. return ret, nil
  11264. // {
  11265. // "description": "Sets the size for a specific node pool.",
  11266. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize",
  11267. // "httpMethod": "POST",
  11268. // "id": "container.projects.zones.clusters.nodePools.setSize",
  11269. // "parameterOrder": [
  11270. // "projectId",
  11271. // "zone",
  11272. // "clusterId",
  11273. // "nodePoolId"
  11274. // ],
  11275. // "parameters": {
  11276. // "clusterId": {
  11277. // "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.",
  11278. // "location": "path",
  11279. // "required": true,
  11280. // "type": "string"
  11281. // },
  11282. // "nodePoolId": {
  11283. // "description": "Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.",
  11284. // "location": "path",
  11285. // "required": true,
  11286. // "type": "string"
  11287. // },
  11288. // "projectId": {
  11289. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  11290. // "location": "path",
  11291. // "required": true,
  11292. // "type": "string"
  11293. // },
  11294. // "zone": {
  11295. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  11296. // "location": "path",
  11297. // "required": true,
  11298. // "type": "string"
  11299. // }
  11300. // },
  11301. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize",
  11302. // "request": {
  11303. // "$ref": "SetNodePoolSizeRequest"
  11304. // },
  11305. // "response": {
  11306. // "$ref": "Operation"
  11307. // },
  11308. // "scopes": [
  11309. // "https://www.googleapis.com/auth/cloud-platform"
  11310. // ]
  11311. // }
  11312. }
  11313. // method id "container.projects.zones.clusters.nodePools.update":
  11314. type ProjectsZonesClustersNodePoolsUpdateCall struct {
  11315. s *Service
  11316. projectId string
  11317. zone string
  11318. clusterId string
  11319. nodePoolId string
  11320. updatenodepoolrequest *UpdateNodePoolRequest
  11321. urlParams_ gensupport.URLParams
  11322. ctx_ context.Context
  11323. header_ http.Header
  11324. }
  11325. // Update: Updates the version and/or image type for a specific node
  11326. // pool.
  11327. func (r *ProjectsZonesClustersNodePoolsService) Update(projectId string, zone string, clusterId string, nodePoolId string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsZonesClustersNodePoolsUpdateCall {
  11328. c := &ProjectsZonesClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11329. c.projectId = projectId
  11330. c.zone = zone
  11331. c.clusterId = clusterId
  11332. c.nodePoolId = nodePoolId
  11333. c.updatenodepoolrequest = updatenodepoolrequest
  11334. return c
  11335. }
  11336. // Fields allows partial responses to be retrieved. See
  11337. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11338. // for more information.
  11339. func (c *ProjectsZonesClustersNodePoolsUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsUpdateCall {
  11340. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11341. return c
  11342. }
  11343. // Context sets the context to be used in this call's Do method. Any
  11344. // pending HTTP request will be aborted if the provided context is
  11345. // canceled.
  11346. func (c *ProjectsZonesClustersNodePoolsUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsUpdateCall {
  11347. c.ctx_ = ctx
  11348. return c
  11349. }
  11350. // Header returns an http.Header that can be modified by the caller to
  11351. // add HTTP headers to the request.
  11352. func (c *ProjectsZonesClustersNodePoolsUpdateCall) Header() http.Header {
  11353. if c.header_ == nil {
  11354. c.header_ = make(http.Header)
  11355. }
  11356. return c.header_
  11357. }
  11358. func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) {
  11359. reqHeaders := make(http.Header)
  11360. for k, v := range c.header_ {
  11361. reqHeaders[k] = v
  11362. }
  11363. reqHeaders.Set("User-Agent", c.s.userAgent())
  11364. var body io.Reader = nil
  11365. body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatenodepoolrequest)
  11366. if err != nil {
  11367. return nil, err
  11368. }
  11369. reqHeaders.Set("Content-Type", "application/json")
  11370. c.urlParams_.Set("alt", alt)
  11371. c.urlParams_.Set("prettyPrint", "false")
  11372. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update")
  11373. urls += "?" + c.urlParams_.Encode()
  11374. req, err := http.NewRequest("POST", urls, body)
  11375. if err != nil {
  11376. return nil, err
  11377. }
  11378. req.Header = reqHeaders
  11379. googleapi.Expand(req.URL, map[string]string{
  11380. "projectId": c.projectId,
  11381. "zone": c.zone,
  11382. "clusterId": c.clusterId,
  11383. "nodePoolId": c.nodePoolId,
  11384. })
  11385. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11386. }
  11387. // Do executes the "container.projects.zones.clusters.nodePools.update" call.
  11388. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  11389. // status code is an error. Response headers are in either
  11390. // *Operation.ServerResponse.Header or (if a response was returned at
  11391. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11392. // to check whether the returned error was because
  11393. // http.StatusNotModified was returned.
  11394. func (c *ProjectsZonesClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  11395. gensupport.SetOptions(c.urlParams_, opts...)
  11396. res, err := c.doRequest("json")
  11397. if res != nil && res.StatusCode == http.StatusNotModified {
  11398. if res.Body != nil {
  11399. res.Body.Close()
  11400. }
  11401. return nil, &googleapi.Error{
  11402. Code: res.StatusCode,
  11403. Header: res.Header,
  11404. }
  11405. }
  11406. if err != nil {
  11407. return nil, err
  11408. }
  11409. defer googleapi.CloseBody(res)
  11410. if err := googleapi.CheckResponse(res); err != nil {
  11411. return nil, err
  11412. }
  11413. ret := &Operation{
  11414. ServerResponse: googleapi.ServerResponse{
  11415. Header: res.Header,
  11416. HTTPStatusCode: res.StatusCode,
  11417. },
  11418. }
  11419. target := &ret
  11420. if err := gensupport.DecodeResponse(target, res); err != nil {
  11421. return nil, err
  11422. }
  11423. return ret, nil
  11424. // {
  11425. // "description": "Updates the version and/or image type for a specific node pool.",
  11426. // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update",
  11427. // "httpMethod": "POST",
  11428. // "id": "container.projects.zones.clusters.nodePools.update",
  11429. // "parameterOrder": [
  11430. // "projectId",
  11431. // "zone",
  11432. // "clusterId",
  11433. // "nodePoolId"
  11434. // ],
  11435. // "parameters": {
  11436. // "clusterId": {
  11437. // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.",
  11438. // "location": "path",
  11439. // "required": true,
  11440. // "type": "string"
  11441. // },
  11442. // "nodePoolId": {
  11443. // "description": "Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.",
  11444. // "location": "path",
  11445. // "required": true,
  11446. // "type": "string"
  11447. // },
  11448. // "projectId": {
  11449. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  11450. // "location": "path",
  11451. // "required": true,
  11452. // "type": "string"
  11453. // },
  11454. // "zone": {
  11455. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  11456. // "location": "path",
  11457. // "required": true,
  11458. // "type": "string"
  11459. // }
  11460. // },
  11461. // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update",
  11462. // "request": {
  11463. // "$ref": "UpdateNodePoolRequest"
  11464. // },
  11465. // "response": {
  11466. // "$ref": "Operation"
  11467. // },
  11468. // "scopes": [
  11469. // "https://www.googleapis.com/auth/cloud-platform"
  11470. // ]
  11471. // }
  11472. }
  11473. // method id "container.projects.zones.operations.cancel":
  11474. type ProjectsZonesOperationsCancelCall struct {
  11475. s *Service
  11476. projectId string
  11477. zone string
  11478. operationId string
  11479. canceloperationrequest *CancelOperationRequest
  11480. urlParams_ gensupport.URLParams
  11481. ctx_ context.Context
  11482. header_ http.Header
  11483. }
  11484. // Cancel: Cancels the specified operation.
  11485. func (r *ProjectsZonesOperationsService) Cancel(projectId string, zone string, operationId string, canceloperationrequest *CancelOperationRequest) *ProjectsZonesOperationsCancelCall {
  11486. c := &ProjectsZonesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11487. c.projectId = projectId
  11488. c.zone = zone
  11489. c.operationId = operationId
  11490. c.canceloperationrequest = canceloperationrequest
  11491. return c
  11492. }
  11493. // Fields allows partial responses to be retrieved. See
  11494. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11495. // for more information.
  11496. func (c *ProjectsZonesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsCancelCall {
  11497. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11498. return c
  11499. }
  11500. // Context sets the context to be used in this call's Do method. Any
  11501. // pending HTTP request will be aborted if the provided context is
  11502. // canceled.
  11503. func (c *ProjectsZonesOperationsCancelCall) Context(ctx context.Context) *ProjectsZonesOperationsCancelCall {
  11504. c.ctx_ = ctx
  11505. return c
  11506. }
  11507. // Header returns an http.Header that can be modified by the caller to
  11508. // add HTTP headers to the request.
  11509. func (c *ProjectsZonesOperationsCancelCall) Header() http.Header {
  11510. if c.header_ == nil {
  11511. c.header_ = make(http.Header)
  11512. }
  11513. return c.header_
  11514. }
  11515. func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  11516. reqHeaders := make(http.Header)
  11517. for k, v := range c.header_ {
  11518. reqHeaders[k] = v
  11519. }
  11520. reqHeaders.Set("User-Agent", c.s.userAgent())
  11521. var body io.Reader = nil
  11522. body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  11523. if err != nil {
  11524. return nil, err
  11525. }
  11526. reqHeaders.Set("Content-Type", "application/json")
  11527. c.urlParams_.Set("alt", alt)
  11528. c.urlParams_.Set("prettyPrint", "false")
  11529. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel")
  11530. urls += "?" + c.urlParams_.Encode()
  11531. req, err := http.NewRequest("POST", urls, body)
  11532. if err != nil {
  11533. return nil, err
  11534. }
  11535. req.Header = reqHeaders
  11536. googleapi.Expand(req.URL, map[string]string{
  11537. "projectId": c.projectId,
  11538. "zone": c.zone,
  11539. "operationId": c.operationId,
  11540. })
  11541. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11542. }
  11543. // Do executes the "container.projects.zones.operations.cancel" call.
  11544. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  11545. // code is an error. Response headers are in either
  11546. // *Empty.ServerResponse.Header or (if a response was returned at all)
  11547. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  11548. // check whether the returned error was because http.StatusNotModified
  11549. // was returned.
  11550. func (c *ProjectsZonesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  11551. gensupport.SetOptions(c.urlParams_, opts...)
  11552. res, err := c.doRequest("json")
  11553. if res != nil && res.StatusCode == http.StatusNotModified {
  11554. if res.Body != nil {
  11555. res.Body.Close()
  11556. }
  11557. return nil, &googleapi.Error{
  11558. Code: res.StatusCode,
  11559. Header: res.Header,
  11560. }
  11561. }
  11562. if err != nil {
  11563. return nil, err
  11564. }
  11565. defer googleapi.CloseBody(res)
  11566. if err := googleapi.CheckResponse(res); err != nil {
  11567. return nil, err
  11568. }
  11569. ret := &Empty{
  11570. ServerResponse: googleapi.ServerResponse{
  11571. Header: res.Header,
  11572. HTTPStatusCode: res.StatusCode,
  11573. },
  11574. }
  11575. target := &ret
  11576. if err := gensupport.DecodeResponse(target, res); err != nil {
  11577. return nil, err
  11578. }
  11579. return ret, nil
  11580. // {
  11581. // "description": "Cancels the specified operation.",
  11582. // "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel",
  11583. // "httpMethod": "POST",
  11584. // "id": "container.projects.zones.operations.cancel",
  11585. // "parameterOrder": [
  11586. // "projectId",
  11587. // "zone",
  11588. // "operationId"
  11589. // ],
  11590. // "parameters": {
  11591. // "operationId": {
  11592. // "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.",
  11593. // "location": "path",
  11594. // "required": true,
  11595. // "type": "string"
  11596. // },
  11597. // "projectId": {
  11598. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  11599. // "location": "path",
  11600. // "required": true,
  11601. // "type": "string"
  11602. // },
  11603. // "zone": {
  11604. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field has been deprecated and replaced by the name field.",
  11605. // "location": "path",
  11606. // "required": true,
  11607. // "type": "string"
  11608. // }
  11609. // },
  11610. // "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel",
  11611. // "request": {
  11612. // "$ref": "CancelOperationRequest"
  11613. // },
  11614. // "response": {
  11615. // "$ref": "Empty"
  11616. // },
  11617. // "scopes": [
  11618. // "https://www.googleapis.com/auth/cloud-platform"
  11619. // ]
  11620. // }
  11621. }
  11622. // method id "container.projects.zones.operations.get":
  11623. type ProjectsZonesOperationsGetCall struct {
  11624. s *Service
  11625. projectId string
  11626. zone string
  11627. operationId string
  11628. urlParams_ gensupport.URLParams
  11629. ifNoneMatch_ string
  11630. ctx_ context.Context
  11631. header_ http.Header
  11632. }
  11633. // Get: Gets the specified operation.
  11634. func (r *ProjectsZonesOperationsService) Get(projectId string, zone string, operationId string) *ProjectsZonesOperationsGetCall {
  11635. c := &ProjectsZonesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11636. c.projectId = projectId
  11637. c.zone = zone
  11638. c.operationId = operationId
  11639. return c
  11640. }
  11641. // Name sets the optional parameter "name": The name (project, location,
  11642. // operation id) of the operation to get.
  11643. // Specified in the format 'projects/*/locations/*/operations/*'.
  11644. func (c *ProjectsZonesOperationsGetCall) Name(name string) *ProjectsZonesOperationsGetCall {
  11645. c.urlParams_.Set("name", name)
  11646. return c
  11647. }
  11648. // Fields allows partial responses to be retrieved. See
  11649. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11650. // for more information.
  11651. func (c *ProjectsZonesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsGetCall {
  11652. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11653. return c
  11654. }
  11655. // IfNoneMatch sets the optional parameter which makes the operation
  11656. // fail if the object's ETag matches the given value. This is useful for
  11657. // getting updates only after the object has changed since the last
  11658. // request. Use googleapi.IsNotModified to check whether the response
  11659. // error from Do is the result of In-None-Match.
  11660. func (c *ProjectsZonesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsGetCall {
  11661. c.ifNoneMatch_ = entityTag
  11662. return c
  11663. }
  11664. // Context sets the context to be used in this call's Do method. Any
  11665. // pending HTTP request will be aborted if the provided context is
  11666. // canceled.
  11667. func (c *ProjectsZonesOperationsGetCall) Context(ctx context.Context) *ProjectsZonesOperationsGetCall {
  11668. c.ctx_ = ctx
  11669. return c
  11670. }
  11671. // Header returns an http.Header that can be modified by the caller to
  11672. // add HTTP headers to the request.
  11673. func (c *ProjectsZonesOperationsGetCall) Header() http.Header {
  11674. if c.header_ == nil {
  11675. c.header_ = make(http.Header)
  11676. }
  11677. return c.header_
  11678. }
  11679. func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  11680. reqHeaders := make(http.Header)
  11681. for k, v := range c.header_ {
  11682. reqHeaders[k] = v
  11683. }
  11684. reqHeaders.Set("User-Agent", c.s.userAgent())
  11685. if c.ifNoneMatch_ != "" {
  11686. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11687. }
  11688. var body io.Reader = nil
  11689. c.urlParams_.Set("alt", alt)
  11690. c.urlParams_.Set("prettyPrint", "false")
  11691. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/operations/{operationId}")
  11692. urls += "?" + c.urlParams_.Encode()
  11693. req, err := http.NewRequest("GET", urls, body)
  11694. if err != nil {
  11695. return nil, err
  11696. }
  11697. req.Header = reqHeaders
  11698. googleapi.Expand(req.URL, map[string]string{
  11699. "projectId": c.projectId,
  11700. "zone": c.zone,
  11701. "operationId": c.operationId,
  11702. })
  11703. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11704. }
  11705. // Do executes the "container.projects.zones.operations.get" call.
  11706. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  11707. // status code is an error. Response headers are in either
  11708. // *Operation.ServerResponse.Header or (if a response was returned at
  11709. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11710. // to check whether the returned error was because
  11711. // http.StatusNotModified was returned.
  11712. func (c *ProjectsZonesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  11713. gensupport.SetOptions(c.urlParams_, opts...)
  11714. res, err := c.doRequest("json")
  11715. if res != nil && res.StatusCode == http.StatusNotModified {
  11716. if res.Body != nil {
  11717. res.Body.Close()
  11718. }
  11719. return nil, &googleapi.Error{
  11720. Code: res.StatusCode,
  11721. Header: res.Header,
  11722. }
  11723. }
  11724. if err != nil {
  11725. return nil, err
  11726. }
  11727. defer googleapi.CloseBody(res)
  11728. if err := googleapi.CheckResponse(res); err != nil {
  11729. return nil, err
  11730. }
  11731. ret := &Operation{
  11732. ServerResponse: googleapi.ServerResponse{
  11733. Header: res.Header,
  11734. HTTPStatusCode: res.StatusCode,
  11735. },
  11736. }
  11737. target := &ret
  11738. if err := gensupport.DecodeResponse(target, res); err != nil {
  11739. return nil, err
  11740. }
  11741. return ret, nil
  11742. // {
  11743. // "description": "Gets the specified operation.",
  11744. // "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}",
  11745. // "httpMethod": "GET",
  11746. // "id": "container.projects.zones.operations.get",
  11747. // "parameterOrder": [
  11748. // "projectId",
  11749. // "zone",
  11750. // "operationId"
  11751. // ],
  11752. // "parameters": {
  11753. // "name": {
  11754. // "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.",
  11755. // "location": "query",
  11756. // "type": "string"
  11757. // },
  11758. // "operationId": {
  11759. // "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.",
  11760. // "location": "path",
  11761. // "required": true,
  11762. // "type": "string"
  11763. // },
  11764. // "projectId": {
  11765. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.",
  11766. // "location": "path",
  11767. // "required": true,
  11768. // "type": "string"
  11769. // },
  11770. // "zone": {
  11771. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.",
  11772. // "location": "path",
  11773. // "required": true,
  11774. // "type": "string"
  11775. // }
  11776. // },
  11777. // "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}",
  11778. // "response": {
  11779. // "$ref": "Operation"
  11780. // },
  11781. // "scopes": [
  11782. // "https://www.googleapis.com/auth/cloud-platform"
  11783. // ]
  11784. // }
  11785. }
  11786. // method id "container.projects.zones.operations.list":
  11787. type ProjectsZonesOperationsListCall struct {
  11788. s *Service
  11789. projectId string
  11790. zone string
  11791. urlParams_ gensupport.URLParams
  11792. ifNoneMatch_ string
  11793. ctx_ context.Context
  11794. header_ http.Header
  11795. }
  11796. // List: Lists all operations in a project in a specific zone or all
  11797. // zones.
  11798. func (r *ProjectsZonesOperationsService) List(projectId string, zone string) *ProjectsZonesOperationsListCall {
  11799. c := &ProjectsZonesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11800. c.projectId = projectId
  11801. c.zone = zone
  11802. return c
  11803. }
  11804. // Parent sets the optional parameter "parent": The parent (project and
  11805. // location) where the operations will be listed.
  11806. // Specified in the format 'projects/*/locations/*'.
  11807. // Location "-" matches all zones and all regions.
  11808. func (c *ProjectsZonesOperationsListCall) Parent(parent string) *ProjectsZonesOperationsListCall {
  11809. c.urlParams_.Set("parent", parent)
  11810. return c
  11811. }
  11812. // Fields allows partial responses to be retrieved. See
  11813. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11814. // for more information.
  11815. func (c *ProjectsZonesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsListCall {
  11816. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11817. return c
  11818. }
  11819. // IfNoneMatch sets the optional parameter which makes the operation
  11820. // fail if the object's ETag matches the given value. This is useful for
  11821. // getting updates only after the object has changed since the last
  11822. // request. Use googleapi.IsNotModified to check whether the response
  11823. // error from Do is the result of In-None-Match.
  11824. func (c *ProjectsZonesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsListCall {
  11825. c.ifNoneMatch_ = entityTag
  11826. return c
  11827. }
  11828. // Context sets the context to be used in this call's Do method. Any
  11829. // pending HTTP request will be aborted if the provided context is
  11830. // canceled.
  11831. func (c *ProjectsZonesOperationsListCall) Context(ctx context.Context) *ProjectsZonesOperationsListCall {
  11832. c.ctx_ = ctx
  11833. return c
  11834. }
  11835. // Header returns an http.Header that can be modified by the caller to
  11836. // add HTTP headers to the request.
  11837. func (c *ProjectsZonesOperationsListCall) Header() http.Header {
  11838. if c.header_ == nil {
  11839. c.header_ = make(http.Header)
  11840. }
  11841. return c.header_
  11842. }
  11843. func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) {
  11844. reqHeaders := make(http.Header)
  11845. for k, v := range c.header_ {
  11846. reqHeaders[k] = v
  11847. }
  11848. reqHeaders.Set("User-Agent", c.s.userAgent())
  11849. if c.ifNoneMatch_ != "" {
  11850. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11851. }
  11852. var body io.Reader = nil
  11853. c.urlParams_.Set("alt", alt)
  11854. c.urlParams_.Set("prettyPrint", "false")
  11855. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/operations")
  11856. urls += "?" + c.urlParams_.Encode()
  11857. req, err := http.NewRequest("GET", urls, body)
  11858. if err != nil {
  11859. return nil, err
  11860. }
  11861. req.Header = reqHeaders
  11862. googleapi.Expand(req.URL, map[string]string{
  11863. "projectId": c.projectId,
  11864. "zone": c.zone,
  11865. })
  11866. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11867. }
  11868. // Do executes the "container.projects.zones.operations.list" call.
  11869. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  11870. // non-2xx status code is an error. Response headers are in either
  11871. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  11872. // returned at all) in error.(*googleapi.Error).Header. Use
  11873. // googleapi.IsNotModified to check whether the returned error was
  11874. // because http.StatusNotModified was returned.
  11875. func (c *ProjectsZonesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  11876. gensupport.SetOptions(c.urlParams_, opts...)
  11877. res, err := c.doRequest("json")
  11878. if res != nil && res.StatusCode == http.StatusNotModified {
  11879. if res.Body != nil {
  11880. res.Body.Close()
  11881. }
  11882. return nil, &googleapi.Error{
  11883. Code: res.StatusCode,
  11884. Header: res.Header,
  11885. }
  11886. }
  11887. if err != nil {
  11888. return nil, err
  11889. }
  11890. defer googleapi.CloseBody(res)
  11891. if err := googleapi.CheckResponse(res); err != nil {
  11892. return nil, err
  11893. }
  11894. ret := &ListOperationsResponse{
  11895. ServerResponse: googleapi.ServerResponse{
  11896. Header: res.Header,
  11897. HTTPStatusCode: res.StatusCode,
  11898. },
  11899. }
  11900. target := &ret
  11901. if err := gensupport.DecodeResponse(target, res); err != nil {
  11902. return nil, err
  11903. }
  11904. return ret, nil
  11905. // {
  11906. // "description": "Lists all operations in a project in a specific zone or all zones.",
  11907. // "flatPath": "v1/projects/{projectId}/zones/{zone}/operations",
  11908. // "httpMethod": "GET",
  11909. // "id": "container.projects.zones.operations.list",
  11910. // "parameterOrder": [
  11911. // "projectId",
  11912. // "zone"
  11913. // ],
  11914. // "parameters": {
  11915. // "parent": {
  11916. // "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.",
  11917. // "location": "query",
  11918. // "type": "string"
  11919. // },
  11920. // "projectId": {
  11921. // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.",
  11922. // "location": "path",
  11923. // "required": true,
  11924. // "type": "string"
  11925. // },
  11926. // "zone": {
  11927. // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.",
  11928. // "location": "path",
  11929. // "required": true,
  11930. // "type": "string"
  11931. // }
  11932. // },
  11933. // "path": "v1/projects/{projectId}/zones/{zone}/operations",
  11934. // "response": {
  11935. // "$ref": "ListOperationsResponse"
  11936. // },
  11937. // "scopes": [
  11938. // "https://www.googleapis.com/auth/cloud-platform"
  11939. // ]
  11940. // }
  11941. }