|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468 |
- // Copyright 2019 Google LLC.
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- // Code generated file. DO NOT EDIT.
-
- // Package tagmanager provides access to the Tag Manager API.
- //
- // For product documentation, see: https://developers.google.com/tag-manager/api/v2/
- //
- // Creating a client
- //
- // Usage example:
- //
- // import "google.golang.org/api/tagmanager/v2"
- // ...
- // ctx := context.Background()
- // tagmanagerService, err := tagmanager.NewService(ctx)
- //
- // In this example, Google Application Default Credentials are used for authentication.
- //
- // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
- //
- // Other authentication options
- //
- // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
- //
- // tagmanagerService, err := tagmanager.NewService(ctx, option.WithScopes(tagmanager.TagmanagerReadonlyScope))
- //
- // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
- //
- // tagmanagerService, err := tagmanager.NewService(ctx, option.WithAPIKey("AIza..."))
- //
- // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
- //
- // config := &oauth2.Config{...}
- // // ...
- // token, err := config.Exchange(ctx, ...)
- // tagmanagerService, err := tagmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
- //
- // See https://godoc.org/google.golang.org/api/option/ for details on options.
- package tagmanager // import "google.golang.org/api/tagmanager/v2"
-
- import (
- "bytes"
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "strconv"
- "strings"
-
- gensupport "google.golang.org/api/gensupport"
- googleapi "google.golang.org/api/googleapi"
- option "google.golang.org/api/option"
- htransport "google.golang.org/api/transport/http"
- )
-
- // Always reference these packages, just in case the auto-generated code
- // below doesn't.
- var _ = bytes.NewBuffer
- var _ = strconv.Itoa
- var _ = fmt.Sprintf
- var _ = json.NewDecoder
- var _ = io.Copy
- var _ = url.Parse
- var _ = gensupport.MarshalJSON
- var _ = googleapi.Version
- var _ = errors.New
- var _ = strings.Replace
- var _ = context.Canceled
-
- const apiId = "tagmanager:v2"
- const apiName = "tagmanager"
- const apiVersion = "v2"
- const basePath = "https://www.googleapis.com/tagmanager/v2/"
-
- // OAuth2 scopes used by this API.
- const (
- // Delete your Google Tag Manager containers
- TagmanagerDeleteContainersScope = "https://www.googleapis.com/auth/tagmanager.delete.containers"
-
- // Manage your Google Tag Manager container and its subcomponents,
- // excluding versioning and publishing
- TagmanagerEditContainersScope = "https://www.googleapis.com/auth/tagmanager.edit.containers"
-
- // Manage your Google Tag Manager container versions
- TagmanagerEditContainerversionsScope = "https://www.googleapis.com/auth/tagmanager.edit.containerversions"
-
- // View and manage your Google Tag Manager accounts
- TagmanagerManageAccountsScope = "https://www.googleapis.com/auth/tagmanager.manage.accounts"
-
- // Manage user permissions of your Google Tag Manager account and
- // container
- TagmanagerManageUsersScope = "https://www.googleapis.com/auth/tagmanager.manage.users"
-
- // Publish your Google Tag Manager container versions
- TagmanagerPublishScope = "https://www.googleapis.com/auth/tagmanager.publish"
-
- // View your Google Tag Manager container and its subcomponents
- TagmanagerReadonlyScope = "https://www.googleapis.com/auth/tagmanager.readonly"
- )
-
- // NewService creates a new Service.
- func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
- scopesOption := option.WithScopes(
- "https://www.googleapis.com/auth/tagmanager.delete.containers",
- "https://www.googleapis.com/auth/tagmanager.edit.containers",
- "https://www.googleapis.com/auth/tagmanager.edit.containerversions",
- "https://www.googleapis.com/auth/tagmanager.manage.accounts",
- "https://www.googleapis.com/auth/tagmanager.manage.users",
- "https://www.googleapis.com/auth/tagmanager.publish",
- "https://www.googleapis.com/auth/tagmanager.readonly",
- )
- // NOTE: prepend, so we don't override user-specified scopes.
- opts = append([]option.ClientOption{scopesOption}, opts...)
- client, endpoint, err := htransport.NewClient(ctx, opts...)
- if err != nil {
- return nil, err
- }
- s, err := New(client)
- if err != nil {
- return nil, err
- }
- if endpoint != "" {
- s.BasePath = endpoint
- }
- return s, nil
- }
-
- // New creates a new Service. It uses the provided http.Client for requests.
- //
- // Deprecated: please use NewService instead.
- // To provide a custom HTTP client, use option.WithHTTPClient.
- // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
- func New(client *http.Client) (*Service, error) {
- if client == nil {
- return nil, errors.New("client is nil")
- }
- s := &Service{client: client, BasePath: basePath}
- s.Accounts = NewAccountsService(s)
- return s, nil
- }
-
- type Service struct {
- client *http.Client
- BasePath string // API endpoint base URL
- UserAgent string // optional additional User-Agent fragment
-
- Accounts *AccountsService
- }
-
- func (s *Service) userAgent() string {
- if s.UserAgent == "" {
- return googleapi.UserAgent
- }
- return googleapi.UserAgent + " " + s.UserAgent
- }
-
- func NewAccountsService(s *Service) *AccountsService {
- rs := &AccountsService{s: s}
- rs.Containers = NewAccountsContainersService(s)
- rs.UserPermissions = NewAccountsUserPermissionsService(s)
- return rs
- }
-
- type AccountsService struct {
- s *Service
-
- Containers *AccountsContainersService
-
- UserPermissions *AccountsUserPermissionsService
- }
-
- func NewAccountsContainersService(s *Service) *AccountsContainersService {
- rs := &AccountsContainersService{s: s}
- rs.Environments = NewAccountsContainersEnvironmentsService(s)
- rs.VersionHeaders = NewAccountsContainersVersionHeadersService(s)
- rs.Versions = NewAccountsContainersVersionsService(s)
- rs.Workspaces = NewAccountsContainersWorkspacesService(s)
- return rs
- }
-
- type AccountsContainersService struct {
- s *Service
-
- Environments *AccountsContainersEnvironmentsService
-
- VersionHeaders *AccountsContainersVersionHeadersService
-
- Versions *AccountsContainersVersionsService
-
- Workspaces *AccountsContainersWorkspacesService
- }
-
- func NewAccountsContainersEnvironmentsService(s *Service) *AccountsContainersEnvironmentsService {
- rs := &AccountsContainersEnvironmentsService{s: s}
- return rs
- }
-
- type AccountsContainersEnvironmentsService struct {
- s *Service
- }
-
- func NewAccountsContainersVersionHeadersService(s *Service) *AccountsContainersVersionHeadersService {
- rs := &AccountsContainersVersionHeadersService{s: s}
- return rs
- }
-
- type AccountsContainersVersionHeadersService struct {
- s *Service
- }
-
- func NewAccountsContainersVersionsService(s *Service) *AccountsContainersVersionsService {
- rs := &AccountsContainersVersionsService{s: s}
- return rs
- }
-
- type AccountsContainersVersionsService struct {
- s *Service
- }
-
- func NewAccountsContainersWorkspacesService(s *Service) *AccountsContainersWorkspacesService {
- rs := &AccountsContainersWorkspacesService{s: s}
- rs.BuiltInVariables = NewAccountsContainersWorkspacesBuiltInVariablesService(s)
- rs.Folders = NewAccountsContainersWorkspacesFoldersService(s)
- rs.Tags = NewAccountsContainersWorkspacesTagsService(s)
- rs.Triggers = NewAccountsContainersWorkspacesTriggersService(s)
- rs.Variables = NewAccountsContainersWorkspacesVariablesService(s)
- rs.Zones = NewAccountsContainersWorkspacesZonesService(s)
- return rs
- }
-
- type AccountsContainersWorkspacesService struct {
- s *Service
-
- BuiltInVariables *AccountsContainersWorkspacesBuiltInVariablesService
-
- Folders *AccountsContainersWorkspacesFoldersService
-
- Tags *AccountsContainersWorkspacesTagsService
-
- Triggers *AccountsContainersWorkspacesTriggersService
-
- Variables *AccountsContainersWorkspacesVariablesService
-
- Zones *AccountsContainersWorkspacesZonesService
- }
-
- func NewAccountsContainersWorkspacesBuiltInVariablesService(s *Service) *AccountsContainersWorkspacesBuiltInVariablesService {
- rs := &AccountsContainersWorkspacesBuiltInVariablesService{s: s}
- return rs
- }
-
- type AccountsContainersWorkspacesBuiltInVariablesService struct {
- s *Service
- }
-
- func NewAccountsContainersWorkspacesFoldersService(s *Service) *AccountsContainersWorkspacesFoldersService {
- rs := &AccountsContainersWorkspacesFoldersService{s: s}
- return rs
- }
-
- type AccountsContainersWorkspacesFoldersService struct {
- s *Service
- }
-
- func NewAccountsContainersWorkspacesTagsService(s *Service) *AccountsContainersWorkspacesTagsService {
- rs := &AccountsContainersWorkspacesTagsService{s: s}
- return rs
- }
-
- type AccountsContainersWorkspacesTagsService struct {
- s *Service
- }
-
- func NewAccountsContainersWorkspacesTriggersService(s *Service) *AccountsContainersWorkspacesTriggersService {
- rs := &AccountsContainersWorkspacesTriggersService{s: s}
- return rs
- }
-
- type AccountsContainersWorkspacesTriggersService struct {
- s *Service
- }
-
- func NewAccountsContainersWorkspacesVariablesService(s *Service) *AccountsContainersWorkspacesVariablesService {
- rs := &AccountsContainersWorkspacesVariablesService{s: s}
- return rs
- }
-
- type AccountsContainersWorkspacesVariablesService struct {
- s *Service
- }
-
- func NewAccountsContainersWorkspacesZonesService(s *Service) *AccountsContainersWorkspacesZonesService {
- rs := &AccountsContainersWorkspacesZonesService{s: s}
- return rs
- }
-
- type AccountsContainersWorkspacesZonesService struct {
- s *Service
- }
-
- func NewAccountsUserPermissionsService(s *Service) *AccountsUserPermissionsService {
- rs := &AccountsUserPermissionsService{s: s}
- return rs
- }
-
- type AccountsUserPermissionsService struct {
- s *Service
- }
-
- // Account: Represents a Google Tag Manager Account.
- type Account struct {
- // AccountId: The Account ID uniquely identifies the GTM Account.
- AccountId string `json:"accountId,omitempty"`
-
- // Fingerprint: The fingerprint of the GTM Account as computed at
- // storage time. This value is recomputed whenever the account is
- // modified.
- Fingerprint string `json:"fingerprint,omitempty"`
-
- // Name: Account display name.
- Name string `json:"name,omitempty"`
-
- // Path: GTM Account's API relative path.
- Path string `json:"path,omitempty"`
-
- // ShareData: Whether the account shares data anonymously with Google
- // and others. This flag enables benchmarking by sharing your data in an
- // anonymous form. Google will remove all identifiable information about
- // your website, combine the data with hundreds of other anonymous sites
- // and report aggregate trends in the benchmarking service.
- ShareData bool `json:"shareData,omitempty"`
-
- // TagManagerUrl: Auto generated link to the tag manager UI
- TagManagerUrl string `json:"tagManagerUrl,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Account) MarshalJSON() ([]byte, error) {
- type NoMethod Account
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // AccountAccess: Defines the Google Tag Manager Account access
- // permissions.
- type AccountAccess struct {
- // Permission: Whether the user has no access, user access, or admin
- // access to an account.
- //
- // Possible values:
- // "accountPermissionUnspecified"
- // "admin"
- // "noAccess"
- // "user"
- Permission string `json:"permission,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Permission") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Permission") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *AccountAccess) MarshalJSON() ([]byte, error) {
- type NoMethod AccountAccess
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // BuiltInVariable: Built-in variables are a special category of
- // variables that are pre-created and non-customizable. They provide
- // common functionality like accessing propeties of the gtm data layer,
- // monitoring clicks, or accessing elements of a page URL.
- type BuiltInVariable struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // Name: Name of the built-in variable to be used to refer to the
- // built-in variable.
- Name string `json:"name,omitempty"`
-
- // Path: GTM BuiltInVariable's API relative path.
- Path string `json:"path,omitempty"`
-
- // Type: Type of built-in variable.
- //
- // Possible values:
- // "advertiserId"
- // "advertisingTrackingEnabled"
- // "ampBrowserLanguage"
- // "ampCanonicalHost"
- // "ampCanonicalPath"
- // "ampCanonicalUrl"
- // "ampClientId"
- // "ampClientMaxScrollX"
- // "ampClientMaxScrollY"
- // "ampClientScreenHeight"
- // "ampClientScreenWidth"
- // "ampClientScrollX"
- // "ampClientScrollY"
- // "ampClientTimestamp"
- // "ampClientTimezone"
- // "ampGtmEvent"
- // "ampPageDownloadTime"
- // "ampPageLoadTime"
- // "ampPageViewId"
- // "ampReferrer"
- // "ampTitle"
- // "ampTotalEngagedTime"
- // "appId"
- // "appName"
- // "appVersionCode"
- // "appVersionName"
- // "builtInVariableTypeUnspecified"
- // "clickClasses"
- // "clickElement"
- // "clickId"
- // "clickTarget"
- // "clickText"
- // "clickUrl"
- // "containerId"
- // "containerVersion"
- // "debugMode"
- // "deviceName"
- // "elementVisibilityFirstTime"
- // "elementVisibilityRatio"
- // "elementVisibilityRecentTime"
- // "elementVisibilityTime"
- // "environmentName"
- // "errorLine"
- // "errorMessage"
- // "errorUrl"
- // "event"
- // "eventName"
- // "firebaseEventParameterCampaign"
- // "firebaseEventParameterCampaignAclid"
- // "firebaseEventParameterCampaignAnid"
- // "firebaseEventParameterCampaignClickTimestamp"
- // "firebaseEventParameterCampaignContent"
- // "firebaseEventParameterCampaignCp1"
- // "firebaseEventParameterCampaignGclid"
- // "firebaseEventParameterCampaignSource"
- // "firebaseEventParameterCampaignTerm"
- // "firebaseEventParameterCurrency"
- // "firebaseEventParameterDynamicLinkAcceptTime"
- // "firebaseEventParameterDynamicLinkLinkid"
- // "firebaseEventParameterNotificationMessageDeviceTime"
- // "firebaseEventParameterNotificationMessageId"
- // "firebaseEventParameterNotificationMessageName"
- // "firebaseEventParameterNotificationMessageTime"
- // "firebaseEventParameterNotificationTopic"
- // "firebaseEventParameterPreviousAppVersion"
- // "firebaseEventParameterPreviousOsVersion"
- // "firebaseEventParameterPrice"
- // "firebaseEventParameterProductId"
- // "firebaseEventParameterQuantity"
- // "firebaseEventParameterValue"
- // "formClasses"
- // "formElement"
- // "formId"
- // "formTarget"
- // "formText"
- // "formUrl"
- // "historySource"
- // "htmlId"
- // "language"
- // "newHistoryFragment"
- // "newHistoryState"
- // "oldHistoryFragment"
- // "oldHistoryState"
- // "osVersion"
- // "pageHostname"
- // "pagePath"
- // "pageUrl"
- // "platform"
- // "randomNumber"
- // "referrer"
- // "resolution"
- // "scrollDepthDirection"
- // "scrollDepthThreshold"
- // "scrollDepthUnits"
- // "sdkVersion"
- // "videoCurrentTime"
- // "videoDuration"
- // "videoPercent"
- // "videoProvider"
- // "videoStatus"
- // "videoTitle"
- // "videoUrl"
- // "videoVisible"
- Type string `json:"type,omitempty"`
-
- // WorkspaceId: GTM Workspace ID.
- WorkspaceId string `json:"workspaceId,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *BuiltInVariable) MarshalJSON() ([]byte, error) {
- type NoMethod BuiltInVariable
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Condition: Represents a predicate.
- type Condition struct {
- // Parameter: A list of named parameters (key/value), depending on the
- // condition's type. Notes:
- // - For binary operators, include parameters named arg0 and arg1 for
- // specifying the left and right operands, respectively.
- // - At this time, the left operand (arg0) must be a reference to a
- // variable.
- // - For case-insensitive Regex matching, include a boolean parameter
- // named ignore_case that is set to true. If not specified or set to any
- // other value, the matching will be case sensitive.
- // - To negate an operator, include a boolean parameter named negate
- // boolean parameter that is set to true.
- Parameter []*Parameter `json:"parameter,omitempty"`
-
- // Type: The type of operator for this condition.
- //
- // Possible values:
- // "conditionTypeUnspecified"
- // "contains"
- // "cssSelector"
- // "endsWith"
- // "equals"
- // "greater"
- // "greaterOrEquals"
- // "less"
- // "lessOrEquals"
- // "matchRegex"
- // "startsWith"
- // "urlMatches"
- Type string `json:"type,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Parameter") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Parameter") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Condition) MarshalJSON() ([]byte, error) {
- type NoMethod Condition
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Container: Represents a Google Tag Manager Container, which specifies
- // the platform tags will run on, manages workspaces, and retains
- // container versions.
- type Container struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // ContainerId: The Container ID uniquely identifies the GTM Container.
- ContainerId string `json:"containerId,omitempty"`
-
- // DomainName: List of domain names associated with the Container.
- DomainName []string `json:"domainName,omitempty"`
-
- // Fingerprint: The fingerprint of the GTM Container as computed at
- // storage time. This value is recomputed whenever the account is
- // modified.
- Fingerprint string `json:"fingerprint,omitempty"`
-
- // Name: Container display name.
- Name string `json:"name,omitempty"`
-
- // Notes: Container Notes.
- Notes string `json:"notes,omitempty"`
-
- // Path: GTM Container's API relative path.
- Path string `json:"path,omitempty"`
-
- // PublicId: Container Public ID.
- PublicId string `json:"publicId,omitempty"`
-
- // TagManagerUrl: Auto generated link to the tag manager UI
- TagManagerUrl string `json:"tagManagerUrl,omitempty"`
-
- // UsageContext: List of Usage Contexts for the Container. Valid values
- // include: web, android, or ios.
- //
- // Possible values:
- // "amp"
- // "android"
- // "androidSdk5"
- // "ios"
- // "iosSdk5"
- // "usageContextUnspecified"
- // "web"
- UsageContext []string `json:"usageContext,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Container) MarshalJSON() ([]byte, error) {
- type NoMethod Container
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ContainerAccess: Defines the Google Tag Manager Container access
- // permissions.
- type ContainerAccess struct {
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // Permission: List of Container permissions.
- //
- // Possible values:
- // "approve"
- // "containerPermissionUnspecified"
- // "edit"
- // "noAccess"
- // "publish"
- // "read"
- Permission string `json:"permission,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "ContainerId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ContainerId") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ContainerAccess) MarshalJSON() ([]byte, error) {
- type NoMethod ContainerAccess
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ContainerVersion: Represents a Google Tag Manager Container Version.
- type ContainerVersion struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // BuiltInVariable: The built-in variables in the container that this
- // version was taken from.
- BuiltInVariable []*BuiltInVariable `json:"builtInVariable,omitempty"`
-
- // Container: The container that this version was taken from.
- Container *Container `json:"container,omitempty"`
-
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // ContainerVersionId: The Container Version ID uniquely identifies the
- // GTM Container Version.
- ContainerVersionId string `json:"containerVersionId,omitempty"`
-
- // CustomTemplate: The custom templates in the container that this
- // version was taken from.
- CustomTemplate []*CustomTemplate `json:"customTemplate,omitempty"`
-
- // Deleted: A value of true indicates this container version has been
- // deleted.
- Deleted bool `json:"deleted,omitempty"`
-
- // Description: Container version description.
- Description string `json:"description,omitempty"`
-
- // Fingerprint: The fingerprint of the GTM Container Version as computed
- // at storage time. This value is recomputed whenever the container
- // version is modified.
- Fingerprint string `json:"fingerprint,omitempty"`
-
- // Folder: The folders in the container that this version was taken
- // from.
- Folder []*Folder `json:"folder,omitempty"`
-
- // Name: Container version display name.
- Name string `json:"name,omitempty"`
-
- // Path: GTM ContainerVersions's API relative path.
- Path string `json:"path,omitempty"`
-
- // Tag: The tags in the container that this version was taken from.
- Tag []*Tag `json:"tag,omitempty"`
-
- // TagManagerUrl: Auto generated link to the tag manager UI
- TagManagerUrl string `json:"tagManagerUrl,omitempty"`
-
- // Trigger: The triggers in the container that this version was taken
- // from.
- Trigger []*Trigger `json:"trigger,omitempty"`
-
- // Variable: The variables in the container that this version was taken
- // from.
- Variable []*Variable `json:"variable,omitempty"`
-
- // Zone: The zones in the container that this version was taken from.
- Zone []*Zone `json:"zone,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ContainerVersion) MarshalJSON() ([]byte, error) {
- type NoMethod ContainerVersion
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ContainerVersionHeader: Represents a Google Tag Manager Container
- // Version Header.
- type ContainerVersionHeader struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // ContainerVersionId: The Container Version ID uniquely identifies the
- // GTM Container Version.
- ContainerVersionId string `json:"containerVersionId,omitempty"`
-
- // Deleted: A value of true indicates this container version has been
- // deleted.
- Deleted bool `json:"deleted,omitempty"`
-
- // Name: Container version display name.
- Name string `json:"name,omitempty"`
-
- // NumCustomTemplates: Number of custom templates in the container
- // version.
- NumCustomTemplates string `json:"numCustomTemplates,omitempty"`
-
- // NumMacros: Number of macros in the container version.
- NumMacros string `json:"numMacros,omitempty"`
-
- // NumRules: Number of rules in the container version.
- NumRules string `json:"numRules,omitempty"`
-
- // NumTags: Number of tags in the container version.
- NumTags string `json:"numTags,omitempty"`
-
- // NumTriggers: Number of triggers in the container version.
- NumTriggers string `json:"numTriggers,omitempty"`
-
- // NumVariables: Number of variables in the container version.
- NumVariables string `json:"numVariables,omitempty"`
-
- // NumZones: Number of zones in the container version.
- NumZones string `json:"numZones,omitempty"`
-
- // Path: GTM Container Versions's API relative path.
- Path string `json:"path,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ContainerVersionHeader) MarshalJSON() ([]byte, error) {
- type NoMethod ContainerVersionHeader
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- type CreateBuiltInVariableResponse struct {
- // BuiltInVariable: List of created built-in variables.
- BuiltInVariable []*BuiltInVariable `json:"builtInVariable,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "BuiltInVariable") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "BuiltInVariable") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *CreateBuiltInVariableResponse) MarshalJSON() ([]byte, error) {
- type NoMethod CreateBuiltInVariableResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // CreateContainerVersionRequestVersionOptions: Options for new
- // container versions.
- type CreateContainerVersionRequestVersionOptions struct {
- // Name: The name of the container version to be created.
- Name string `json:"name,omitempty"`
-
- // Notes: The notes of the container version to be created.
- Notes string `json:"notes,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Name") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Name") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *CreateContainerVersionRequestVersionOptions) MarshalJSON() ([]byte, error) {
- type NoMethod CreateContainerVersionRequestVersionOptions
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // CreateContainerVersionResponse: Create container versions response.
- type CreateContainerVersionResponse struct {
- // CompilerError: Compiler errors or not.
- CompilerError bool `json:"compilerError,omitempty"`
-
- // ContainerVersion: The container version created.
- ContainerVersion *ContainerVersion `json:"containerVersion,omitempty"`
-
- // NewWorkspacePath: Auto generated workspace path created as a result
- // of version creation. This field should only be populated if the
- // created version was not a quick preview.
- NewWorkspacePath string `json:"newWorkspacePath,omitempty"`
-
- // SyncStatus: Whether version creation failed when syncing the
- // workspace to the latest container version.
- SyncStatus *SyncStatus `json:"syncStatus,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "CompilerError") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "CompilerError") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *CreateContainerVersionResponse) MarshalJSON() ([]byte, error) {
- type NoMethod CreateContainerVersionResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // CustomTemplate: Represents a Google Tag Manager Custom Template's
- // contents.
- type CustomTemplate struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // Fingerprint: The fingerprint of the GTM Custom Template as computed
- // at storage time. This value is recomputed whenever the template is
- // modified.
- Fingerprint string `json:"fingerprint,omitempty"`
-
- // Name: Custom Template display name.
- Name string `json:"name,omitempty"`
-
- // Path: GTM Custom Template's API relative path.
- Path string `json:"path,omitempty"`
-
- // TagManagerUrl: Auto generated link to the tag manager UI
- TagManagerUrl string `json:"tagManagerUrl,omitempty"`
-
- // TemplateData: The custom template in text format.
- TemplateData string `json:"templateData,omitempty"`
-
- // TemplateId: The Custom Template ID uniquely identifies the GTM custom
- // template.
- TemplateId string `json:"templateId,omitempty"`
-
- // WorkspaceId: GTM Workspace ID.
- WorkspaceId string `json:"workspaceId,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *CustomTemplate) MarshalJSON() ([]byte, error) {
- type NoMethod CustomTemplate
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Entity: A workspace entity that may represent a tag, trigger,
- // variable, or folder in addition to its status in the workspace.
- type Entity struct {
- // ChangeStatus: Represents how the entity has been changed in the
- // workspace.
- //
- // Possible values:
- // "added"
- // "changeStatusUnspecified"
- // "deleted"
- // "none"
- // "updated"
- ChangeStatus string `json:"changeStatus,omitempty"`
-
- // Folder: The Folder being represented by the entity.
- Folder *Folder `json:"folder,omitempty"`
-
- // Tag: The tag being represented by the entity.
- Tag *Tag `json:"tag,omitempty"`
-
- // Trigger: The trigger being represented by the entity.
- Trigger *Trigger `json:"trigger,omitempty"`
-
- // Variable: The variable being represented by the entity.
- Variable *Variable `json:"variable,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "ChangeStatus") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ChangeStatus") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Entity) MarshalJSON() ([]byte, error) {
- type NoMethod Entity
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Environment: Represents a Google Tag Manager Environment. Note that a
- // user can create, delete and update environments of type USER, but can
- // only update the enable_debug and url fields of environments of other
- // types.
- type Environment struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // AuthorizationCode: The environment authorization code.
- AuthorizationCode string `json:"authorizationCode,omitempty"`
-
- // AuthorizationTimestamp: The last update time-stamp for the
- // authorization code.
- AuthorizationTimestamp *Timestamp `json:"authorizationTimestamp,omitempty"`
-
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // ContainerVersionId: Represents a link to a container version.
- ContainerVersionId string `json:"containerVersionId,omitempty"`
-
- // Description: The environment description. Can be set or changed only
- // on USER type environments.
- Description string `json:"description,omitempty"`
-
- // EnableDebug: Whether or not to enable debug by default for the
- // environment.
- EnableDebug bool `json:"enableDebug,omitempty"`
-
- // EnvironmentId: GTM Environment ID uniquely identifies the GTM
- // Environment.
- EnvironmentId string `json:"environmentId,omitempty"`
-
- // Fingerprint: The fingerprint of the GTM environment as computed at
- // storage time. This value is recomputed whenever the environment is
- // modified.
- Fingerprint string `json:"fingerprint,omitempty"`
-
- // Name: The environment display name. Can be set or changed only on
- // USER type environments.
- Name string `json:"name,omitempty"`
-
- // Path: GTM Environment's API relative path.
- Path string `json:"path,omitempty"`
-
- // TagManagerUrl: Auto generated link to the tag manager UI
- TagManagerUrl string `json:"tagManagerUrl,omitempty"`
-
- // Type: The type of this environment.
- //
- // Possible values:
- // "latest"
- // "live"
- // "user"
- // "workspace"
- Type string `json:"type,omitempty"`
-
- // Url: Default preview page url for the environment.
- Url string `json:"url,omitempty"`
-
- // WorkspaceId: Represents a link to a quick preview of a workspace.
- WorkspaceId string `json:"workspaceId,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Environment) MarshalJSON() ([]byte, error) {
- type NoMethod Environment
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Folder: Represents a Google Tag Manager Folder.
- type Folder struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // Fingerprint: The fingerprint of the GTM Folder as computed at storage
- // time. This value is recomputed whenever the folder is modified.
- Fingerprint string `json:"fingerprint,omitempty"`
-
- // FolderId: The Folder ID uniquely identifies the GTM Folder.
- FolderId string `json:"folderId,omitempty"`
-
- // Name: Folder display name.
- Name string `json:"name,omitempty"`
-
- // Notes: User notes on how to apply this folder in the container.
- Notes string `json:"notes,omitempty"`
-
- // Path: GTM Folder's API relative path.
- Path string `json:"path,omitempty"`
-
- // TagManagerUrl: Auto generated link to the tag manager UI
- TagManagerUrl string `json:"tagManagerUrl,omitempty"`
-
- // WorkspaceId: GTM Workspace ID.
- WorkspaceId string `json:"workspaceId,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Folder) MarshalJSON() ([]byte, error) {
- type NoMethod Folder
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // FolderEntities: Represents a Google Tag Manager Folder's contents.
- type FolderEntities struct {
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // Tag: The list of tags inside the folder.
- Tag []*Tag `json:"tag,omitempty"`
-
- // Trigger: The list of triggers inside the folder.
- Trigger []*Trigger `json:"trigger,omitempty"`
-
- // Variable: The list of variables inside the folder.
- Variable []*Variable `json:"variable,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "NextPageToken") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "NextPageToken") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *FolderEntities) MarshalJSON() ([]byte, error) {
- type NoMethod FolderEntities
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GetWorkspaceStatusResponse: The changes that have occurred in the
- // workspace since the base container version.
- type GetWorkspaceStatusResponse struct {
- // MergeConflict: The merge conflict after sync.
- MergeConflict []*MergeConflict `json:"mergeConflict,omitempty"`
-
- // WorkspaceChange: Entities that have been changed in the workspace.
- WorkspaceChange []*Entity `json:"workspaceChange,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "MergeConflict") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "MergeConflict") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GetWorkspaceStatusResponse) MarshalJSON() ([]byte, error) {
- type NoMethod GetWorkspaceStatusResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListAccountsResponse: List Accounts Response.
- type ListAccountsResponse struct {
- // Account: List of GTM Accounts that a user has access to.
- Account []*Account `json:"account,omitempty"`
-
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Account") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Account") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListAccountsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListAccountsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListContainerVersionsResponse: List container versions response.
- type ListContainerVersionsResponse struct {
- // ContainerVersionHeader: All container version headers of a GTM
- // Container.
- ContainerVersionHeader []*ContainerVersionHeader `json:"containerVersionHeader,omitempty"`
-
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g.
- // "ContainerVersionHeader") to unconditionally include in API requests.
- // By default, fields with empty values are omitted from API requests.
- // However, any non-pointer, non-interface field appearing in
- // ForceSendFields will be sent to the server regardless of whether the
- // field is empty or not. This may be used to include empty fields in
- // Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ContainerVersionHeader")
- // to include in API requests with the JSON null value. By default,
- // fields with empty values are omitted from API requests. However, any
- // field with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListContainerVersionsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListContainerVersionsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListContainersResponse: List Containers Response.
- type ListContainersResponse struct {
- // Container: All Containers of a GTM Account.
- Container []*Container `json:"container,omitempty"`
-
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Container") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Container") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListContainersResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListContainersResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListEnabledBuiltInVariablesResponse: A list of enabled built-in
- // variables.
- type ListEnabledBuiltInVariablesResponse struct {
- // BuiltInVariable: All GTM BuiltInVariables of a GTM container.
- BuiltInVariable []*BuiltInVariable `json:"builtInVariable,omitempty"`
-
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "BuiltInVariable") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "BuiltInVariable") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListEnabledBuiltInVariablesResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListEnabledBuiltInVariablesResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListEnvironmentsResponse: List Environments Response.
- type ListEnvironmentsResponse struct {
- // Environment: All Environments of a GTM Container.
- Environment []*Environment `json:"environment,omitempty"`
-
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Environment") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Environment") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListEnvironmentsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListEnvironmentsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListFoldersResponse: List Folders Response.
- type ListFoldersResponse struct {
- // Folder: All GTM Folders of a GTM Container.
- Folder []*Folder `json:"folder,omitempty"`
-
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Folder") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Folder") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListFoldersResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListFoldersResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListTagsResponse: List Tags Response.
- type ListTagsResponse struct {
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // Tag: All GTM Tags of a GTM Container.
- Tag []*Tag `json:"tag,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "NextPageToken") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "NextPageToken") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListTagsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListTagsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListTriggersResponse: List triggers response.
- type ListTriggersResponse struct {
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // Trigger: All GTM Triggers of a GTM Container.
- Trigger []*Trigger `json:"trigger,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "NextPageToken") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "NextPageToken") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListTriggersResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListTriggersResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListUserPermissionsResponse: List user permissions response.
- type ListUserPermissionsResponse struct {
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // UserPermission: All GTM UserPermissions of a GTM Account.
- UserPermission []*UserPermission `json:"userPermission,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "NextPageToken") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "NextPageToken") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListUserPermissionsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListUserPermissionsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListVariablesResponse: List Variables Response.
- type ListVariablesResponse struct {
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // Variable: All GTM Variables of a GTM Container.
- Variable []*Variable `json:"variable,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "NextPageToken") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "NextPageToken") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListVariablesResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListVariablesResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListWorkspacesResponse: A list of workspaces in a container.
- type ListWorkspacesResponse struct {
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // Workspace: All Workspaces of a GTM Container.
- Workspace []*Workspace `json:"workspace,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "NextPageToken") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "NextPageToken") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListWorkspacesResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListWorkspacesResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- type ListZonesResponse struct {
- // NextPageToken: Continuation token for fetching the next page of
- // results.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // Zone: All GTM Zones of a GTM Container.
- Zone []*Zone `json:"zone,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "NextPageToken") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "NextPageToken") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListZonesResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListZonesResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // MergeConflict: Represents a merge conflict.
- type MergeConflict struct {
- // EntityInBaseVersion: The base version entity (since the latest sync
- // operation) that has conflicting changes compared to the workspace. If
- // this field is missing, it means the workspace entity is deleted from
- // the base version.
- EntityInBaseVersion *Entity `json:"entityInBaseVersion,omitempty"`
-
- // EntityInWorkspace: The workspace entity that has conflicting changes
- // compared to the base version. If an entity is deleted in a workspace,
- // it will still appear with a deleted change status.
- EntityInWorkspace *Entity `json:"entityInWorkspace,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "EntityInBaseVersion")
- // to unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "EntityInBaseVersion") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *MergeConflict) MarshalJSON() ([]byte, error) {
- type NoMethod MergeConflict
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Parameter: Represents a Google Tag Manager Parameter.
- type Parameter struct {
- // Key: The named key that uniquely identifies a parameter. Required for
- // top-level parameters, as well as map values. Ignored for list values.
- Key string `json:"key,omitempty"`
-
- // List: This list parameter's parameters (keys will be ignored).
- List []*Parameter `json:"list,omitempty"`
-
- // Map: This map parameter's parameters (must have keys; keys must be
- // unique).
- Map []*Parameter `json:"map,omitempty"`
-
- // Type: The parameter type. Valid values are:
- // - boolean: The value represents a boolean, represented as 'true' or
- // 'false'
- // - integer: The value represents a 64-bit signed integer value, in
- // base 10
- // - list: A list of parameters should be specified
- // - map: A map of parameters should be specified
- // - template: The value represents any text; this can include variable
- // references (even variable references that might return non-string
- // types)
- //
- // Possible values:
- // "boolean"
- // "integer"
- // "list"
- // "map"
- // "template"
- // "typeUnspecified"
- Type string `json:"type,omitempty"`
-
- // Value: A parameter's value (may contain variable references such as
- // "{{myVariable}}") as appropriate to the specified type.
- Value string `json:"value,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Key") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Key") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Parameter) MarshalJSON() ([]byte, error) {
- type NoMethod Parameter
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // PublishContainerVersionResponse: Publish container version response.
- type PublishContainerVersionResponse struct {
- // CompilerError: Compiler errors or not.
- CompilerError bool `json:"compilerError,omitempty"`
-
- // ContainerVersion: The container version created.
- ContainerVersion *ContainerVersion `json:"containerVersion,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "CompilerError") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "CompilerError") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *PublishContainerVersionResponse) MarshalJSON() ([]byte, error) {
- type NoMethod PublishContainerVersionResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // QuickPreviewResponse: Response to quick previewing a workspace.
- type QuickPreviewResponse struct {
- // CompilerError: Were there compiler errors or not.
- CompilerError bool `json:"compilerError,omitempty"`
-
- // ContainerVersion: The quick previewed container version.
- ContainerVersion *ContainerVersion `json:"containerVersion,omitempty"`
-
- // SyncStatus: Whether quick previewing failed when syncing the
- // workspace to the latest container version.
- SyncStatus *SyncStatus `json:"syncStatus,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "CompilerError") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "CompilerError") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *QuickPreviewResponse) MarshalJSON() ([]byte, error) {
- type NoMethod QuickPreviewResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RevertBuiltInVariableResponse: The result of reverting a built-in
- // variable in a workspace.
- type RevertBuiltInVariableResponse struct {
- // Enabled: Whether the built-in variable is enabled after reversion.
- Enabled bool `json:"enabled,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Enabled") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Enabled") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RevertBuiltInVariableResponse) MarshalJSON() ([]byte, error) {
- type NoMethod RevertBuiltInVariableResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RevertFolderResponse: The result of reverting folder changes in a
- // workspace.
- type RevertFolderResponse struct {
- // Folder: Folder as it appears in the latest container version since
- // the last workspace synchronization operation. If no folder is
- // present, that means the folder was deleted in the latest container
- // version.
- Folder *Folder `json:"folder,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Folder") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Folder") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RevertFolderResponse) MarshalJSON() ([]byte, error) {
- type NoMethod RevertFolderResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RevertTagResponse: The result of reverting a tag in a workspace.
- type RevertTagResponse struct {
- // Tag: Tag as it appears in the latest container version since the last
- // workspace synchronization operation. If no tag is present, that means
- // the tag was deleted in the latest container version.
- Tag *Tag `json:"tag,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Tag") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Tag") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RevertTagResponse) MarshalJSON() ([]byte, error) {
- type NoMethod RevertTagResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RevertTriggerResponse: The result of reverting a trigger in a
- // workspace.
- type RevertTriggerResponse struct {
- // Trigger: Trigger as it appears in the latest container version since
- // the last workspace synchronization operation. If no trigger is
- // present, that means the trigger was deleted in the latest container
- // version.
- Trigger *Trigger `json:"trigger,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Trigger") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Trigger") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RevertTriggerResponse) MarshalJSON() ([]byte, error) {
- type NoMethod RevertTriggerResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RevertVariableResponse: The result of reverting a variable in a
- // workspace.
- type RevertVariableResponse struct {
- // Variable: Variable as it appears in the latest container version
- // since the last workspace synchronization operation. If no variable is
- // present, that means the variable was deleted in the latest container
- // version.
- Variable *Variable `json:"variable,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Variable") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Variable") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RevertVariableResponse) MarshalJSON() ([]byte, error) {
- type NoMethod RevertVariableResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RevertZoneResponse: The result of reverting a zone in a workspace.
- type RevertZoneResponse struct {
- // Zone: Zone as it appears in the latest container version since the
- // last workspace synchronization operation. If no zone is present, that
- // means the zone was deleted in the latest container version.
- Zone *Zone `json:"zone,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Zone") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Zone") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RevertZoneResponse) MarshalJSON() ([]byte, error) {
- type NoMethod RevertZoneResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // SetupTag: Represents a reference to atag that fires before another
- // tag in order to set up dependencies.
- type SetupTag struct {
- // StopOnSetupFailure: If true, fire the main tag if and only if the
- // setup tag fires successfully. If false, fire the main tag regardless
- // of setup tag firing status.
- StopOnSetupFailure bool `json:"stopOnSetupFailure,omitempty"`
-
- // TagName: The name of the setup tag.
- TagName string `json:"tagName,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "StopOnSetupFailure")
- // to unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "StopOnSetupFailure") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *SetupTag) MarshalJSON() ([]byte, error) {
- type NoMethod SetupTag
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // SyncStatus: The status of a workspace after synchronization.
- type SyncStatus struct {
- // MergeConflict: Synchornization operation detected a merge conflict.
- MergeConflict bool `json:"mergeConflict,omitempty"`
-
- // SyncError: An error occurred during the synchronization operation.
- SyncError bool `json:"syncError,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "MergeConflict") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "MergeConflict") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *SyncStatus) MarshalJSON() ([]byte, error) {
- type NoMethod SyncStatus
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // SyncWorkspaceResponse: A response after synchronizing the workspace
- // to the latest container version.
- type SyncWorkspaceResponse struct {
- // MergeConflict: The merge conflict after sync. If this field is not
- // empty, the sync is still treated as successful. But a version cannot
- // be created until all conflicts are resolved.
- MergeConflict []*MergeConflict `json:"mergeConflict,omitempty"`
-
- // SyncStatus: Indicates whether synchronization caused a merge conflict
- // or sync error.
- SyncStatus *SyncStatus `json:"syncStatus,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "MergeConflict") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "MergeConflict") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *SyncWorkspaceResponse) MarshalJSON() ([]byte, error) {
- type NoMethod SyncWorkspaceResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Tag: Represents a Google Tag Manager Tag.
- type Tag struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // BlockingRuleId: Blocking rule IDs. If any of the listed rules
- // evaluate to true, the tag will not fire.
- BlockingRuleId []string `json:"blockingRuleId,omitempty"`
-
- // BlockingTriggerId: Blocking trigger IDs. If any of the listed
- // triggers evaluate to true, the tag will not fire.
- BlockingTriggerId []string `json:"blockingTriggerId,omitempty"`
-
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // Fingerprint: The fingerprint of the GTM Tag as computed at storage
- // time. This value is recomputed whenever the tag is modified.
- Fingerprint string `json:"fingerprint,omitempty"`
-
- // FiringRuleId: Firing rule IDs. A tag will fire when any of the listed
- // rules are true and all of its blockingRuleIds (if any specified) are
- // false.
- FiringRuleId []string `json:"firingRuleId,omitempty"`
-
- // FiringTriggerId: Firing trigger IDs. A tag will fire when any of the
- // listed triggers are true and all of its blockingTriggerIds (if any
- // specified) are false.
- FiringTriggerId []string `json:"firingTriggerId,omitempty"`
-
- // LiveOnly: If set to true, this tag will only fire in the live
- // environment (e.g. not in preview or debug mode).
- LiveOnly bool `json:"liveOnly,omitempty"`
-
- // Name: Tag display name.
- Name string `json:"name,omitempty"`
-
- // Notes: User notes on how to apply this tag in the container.
- Notes string `json:"notes,omitempty"`
-
- // Parameter: The tag's parameters.
- Parameter []*Parameter `json:"parameter,omitempty"`
-
- // ParentFolderId: Parent folder id.
- ParentFolderId string `json:"parentFolderId,omitempty"`
-
- // Path: GTM Tag's API relative path.
- Path string `json:"path,omitempty"`
-
- // Paused: Indicates whether the tag is paused, which prevents the tag
- // from firing.
- Paused bool `json:"paused,omitempty"`
-
- // Priority: User defined numeric priority of the tag. Tags are fired
- // asynchronously in order of priority. Tags with higher numeric value
- // fire first. A tag's priority can be a positive or negative value. The
- // default value is 0.
- Priority *Parameter `json:"priority,omitempty"`
-
- // ScheduleEndMs: The end timestamp in milliseconds to schedule a tag.
- ScheduleEndMs int64 `json:"scheduleEndMs,omitempty,string"`
-
- // ScheduleStartMs: The start timestamp in milliseconds to schedule a
- // tag.
- ScheduleStartMs int64 `json:"scheduleStartMs,omitempty,string"`
-
- // SetupTag: The list of setup tags. Currently we only allow one.
- SetupTag []*SetupTag `json:"setupTag,omitempty"`
-
- // TagFiringOption: Option to fire this tag.
- //
- // Possible values:
- // "oncePerEvent"
- // "oncePerLoad"
- // "tagFiringOptionUnspecified"
- // "unlimited"
- TagFiringOption string `json:"tagFiringOption,omitempty"`
-
- // TagId: The Tag ID uniquely identifies the GTM Tag.
- TagId string `json:"tagId,omitempty"`
-
- // TagManagerUrl: Auto generated link to the tag manager UI
- TagManagerUrl string `json:"tagManagerUrl,omitempty"`
-
- // TeardownTag: The list of teardown tags. Currently we only allow one.
- TeardownTag []*TeardownTag `json:"teardownTag,omitempty"`
-
- // Type: GTM Tag Type.
- Type string `json:"type,omitempty"`
-
- // WorkspaceId: GTM Workspace ID.
- WorkspaceId string `json:"workspaceId,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Tag) MarshalJSON() ([]byte, error) {
- type NoMethod Tag
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // TeardownTag: Represents a tag that fires after another tag in order
- // to tear down dependencies.
- type TeardownTag struct {
- // StopTeardownOnFailure: If true, fire the teardown tag if and only if
- // the main tag fires successfully. If false, fire the teardown tag
- // regardless of main tag firing status.
- StopTeardownOnFailure bool `json:"stopTeardownOnFailure,omitempty"`
-
- // TagName: The name of the teardown tag.
- TagName string `json:"tagName,omitempty"`
-
- // ForceSendFields is a list of field names (e.g.
- // "StopTeardownOnFailure") to unconditionally include in API requests.
- // By default, fields with empty values are omitted from API requests.
- // However, any non-pointer, non-interface field appearing in
- // ForceSendFields will be sent to the server regardless of whether the
- // field is empty or not. This may be used to include empty fields in
- // Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "StopTeardownOnFailure") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *TeardownTag) MarshalJSON() ([]byte, error) {
- type NoMethod TeardownTag
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Timestamp: A Timestamp represents a point in time independent of any
- // time zone or local calendar, encoded as a count of seconds and
- // fractions of seconds at nanosecond resolution. The count is relative
- // to an epoch at UTC midnight on January 1, 1970, in the proleptic
- // Gregorian calendar which extends the Gregorian calendar backwards to
- // year one.
- //
- // All minutes are 60 seconds long. Leap seconds are "smeared" so that
- // no leap second table is needed for interpretation, using a [24-hour
- // linear smear](https://developers.google.com/time/smear).
- //
- // The range is from 0001-01-01T00:00:00Z to
- // 9999-12-31T23:59:59.999999999Z. By restricting to that range, we
- // ensure that we can convert to and from [RFC
- // 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
- //
- // # Examples
- //
- // Example 1: Compute Timestamp from POSIX `time()`.
- //
- // Timestamp timestamp; timestamp.set_seconds(time(NULL));
- // timestamp.set_nanos(0);
- //
- // Example 2: Compute Timestamp from POSIX `gettimeofday()`.
- //
- // struct timeval tv; gettimeofday(&tv, NULL);
- //
- // Timestamp timestamp; timestamp.set_seconds(tv.tv_sec);
- // timestamp.set_nanos(tv.tv_usec * 1000);
- //
- // Example 3: Compute Timestamp from Win32
- // `GetSystemTimeAsFileTime()`.
- //
- // FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks =
- // (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
- //
- // // A Windows tick is 100 nanoseconds. Windows epoch
- // 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch
- // 1970-01-01T00:00:00Z. Timestamp timestamp;
- // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
- // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
- //
- // Example 4: Compute Timestamp from Java
- // `System.currentTimeMillis()`.
- //
- // long millis = System.currentTimeMillis();
- //
- // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis /
- // 1000) .setNanos((int) ((millis % 1000) *
- // 1000000)).build();
- //
- //
- //
- // Example 5: Compute Timestamp from current time in Python.
- //
- // timestamp = Timestamp() timestamp.GetCurrentTime()
- //
- // # JSON Mapping
- //
- // In JSON format, the Timestamp type is encoded as a string in the [RFC
- // 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
- // format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
- // where {year} is always expressed using four digits while {month},
- // {day}, {hour}, {min}, and {sec} are zero-padded to two digits each.
- // The fractional seconds, which can go up to 9 digits (i.e. up to 1
- // nanosecond resolution), are optional. The "Z" suffix indicates the
- // timezone ("UTC"); the timezone is required. A proto3 JSON serializer
- // should always use UTC (as indicated by "Z") when printing the
- // Timestamp type and a proto3 JSON parser should be able to accept both
- // UTC and other timezones (as indicated by an offset).
- //
- // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
- // 01:30 UTC on January 15, 2017.
- //
- // In JavaScript, one can convert a Date object to this format using the
- // standard
- // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScrip
- // t/Reference/Global_Objects/Date/toISOString) method. In Python, a
- // standard `datetime.datetime` object can be converted to this format
- // using
- // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime
- // ) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in
- // Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
- // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D ) to obtain a formatter capable of generating timestamps in this
- // format.
- type Timestamp struct {
- // Nanos: Non-negative fractions of a second at nanosecond resolution.
- // Negative second values with fractions must still have non-negative
- // nanos values that count forward in time. Must be from 0 to
- // 999,999,999 inclusive.
- Nanos int64 `json:"nanos,omitempty"`
-
- // Seconds: Represents seconds of UTC time since Unix epoch
- // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
- // 9999-12-31T23:59:59Z inclusive.
- Seconds int64 `json:"seconds,omitempty,string"`
-
- // ForceSendFields is a list of field names (e.g. "Nanos") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Nanos") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Timestamp) MarshalJSON() ([]byte, error) {
- type NoMethod Timestamp
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Trigger: Represents a Google Tag Manager Trigger
- type Trigger struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // AutoEventFilter: Used in the case of auto event tracking.
- AutoEventFilter []*Condition `json:"autoEventFilter,omitempty"`
-
- // CheckValidation: Whether or not we should only fire tags if the form
- // submit or link click event is not cancelled by some other event
- // handler (e.g. because of validation). Only valid for Form Submission
- // and Link Click triggers.
- CheckValidation *Parameter `json:"checkValidation,omitempty"`
-
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // ContinuousTimeMinMilliseconds: A visibility trigger minimum
- // continuous visible time (in milliseconds). Only valid for AMP
- // Visibility trigger.
- ContinuousTimeMinMilliseconds *Parameter `json:"continuousTimeMinMilliseconds,omitempty"`
-
- // CustomEventFilter: Used in the case of custom event, which is fired
- // iff all Conditions are true.
- CustomEventFilter []*Condition `json:"customEventFilter,omitempty"`
-
- // EventName: Name of the GTM event that is fired. Only valid for Timer
- // triggers.
- EventName *Parameter `json:"eventName,omitempty"`
-
- // Filter: The trigger will only fire iff all Conditions are true.
- Filter []*Condition `json:"filter,omitempty"`
-
- // Fingerprint: The fingerprint of the GTM Trigger as computed at
- // storage time. This value is recomputed whenever the trigger is
- // modified.
- Fingerprint string `json:"fingerprint,omitempty"`
-
- // HorizontalScrollPercentageList: List of integer percentage values for
- // scroll triggers. The trigger will fire when each percentage is
- // reached when the view is scrolled horizontally. Only valid for AMP
- // scroll triggers.
- HorizontalScrollPercentageList *Parameter `json:"horizontalScrollPercentageList,omitempty"`
-
- // Interval: Time between triggering recurring Timer Events (in
- // milliseconds). Only valid for Timer triggers.
- Interval *Parameter `json:"interval,omitempty"`
-
- // IntervalSeconds: Time between Timer Events to fire (in seconds). Only
- // valid for AMP Timer trigger.
- IntervalSeconds *Parameter `json:"intervalSeconds,omitempty"`
-
- // Limit: Limit of the number of GTM events this Timer Trigger will
- // fire. If no limit is set, we will continue to fire GTM events until
- // the user leaves the page. Only valid for Timer triggers.
- Limit *Parameter `json:"limit,omitempty"`
-
- // MaxTimerLengthSeconds: Max time to fire Timer Events (in seconds).
- // Only valid for AMP Timer trigger.
- MaxTimerLengthSeconds *Parameter `json:"maxTimerLengthSeconds,omitempty"`
-
- // Name: Trigger display name.
- Name string `json:"name,omitempty"`
-
- // Notes: User notes on how to apply this trigger in the container.
- Notes string `json:"notes,omitempty"`
-
- // Parameter: Additional parameters.
- Parameter []*Parameter `json:"parameter,omitempty"`
-
- // ParentFolderId: Parent folder id.
- ParentFolderId string `json:"parentFolderId,omitempty"`
-
- // Path: GTM Trigger's API relative path.
- Path string `json:"path,omitempty"`
-
- // Selector: A click trigger CSS selector (i.e. "a", "button" etc.).
- // Only valid for AMP Click trigger.
- Selector *Parameter `json:"selector,omitempty"`
-
- // TagManagerUrl: Auto generated link to the tag manager UI
- TagManagerUrl string `json:"tagManagerUrl,omitempty"`
-
- // TotalTimeMinMilliseconds: A visibility trigger minimum total visible
- // time (in milliseconds). Only valid for AMP Visibility trigger.
- TotalTimeMinMilliseconds *Parameter `json:"totalTimeMinMilliseconds,omitempty"`
-
- // TriggerId: The Trigger ID uniquely identifies the GTM Trigger.
- TriggerId string `json:"triggerId,omitempty"`
-
- // Type: Defines the data layer event that causes this trigger.
- //
- // Possible values:
- // "always"
- // "ampClick"
- // "ampScroll"
- // "ampTimer"
- // "ampVisibility"
- // "click"
- // "customEvent"
- // "domReady"
- // "elementVisibility"
- // "eventTypeUnspecified"
- // "firebaseAppException"
- // "firebaseAppUpdate"
- // "firebaseCampaign"
- // "firebaseFirstOpen"
- // "firebaseInAppPurchase"
- // "firebaseNotificationDismiss"
- // "firebaseNotificationForeground"
- // "firebaseNotificationOpen"
- // "firebaseNotificationReceive"
- // "firebaseOsUpdate"
- // "firebaseSessionStart"
- // "firebaseUserEngagement"
- // "formSubmission"
- // "historyChange"
- // "jsError"
- // "linkClick"
- // "pageview"
- // "scrollDepth"
- // "timer"
- // "windowLoaded"
- // "youTubeVideo"
- Type string `json:"type,omitempty"`
-
- // UniqueTriggerId: Globally unique id of the trigger that
- // auto-generates this (a Form Submit, Link Click or Timer listener) if
- // any. Used to make incompatible auto-events work together with trigger
- // filtering based on trigger ids. This value is populated during output
- // generation since the tags implied by triggers don't exist until then.
- // Only valid for Form Submit, Link Click and Timer triggers.
- UniqueTriggerId *Parameter `json:"uniqueTriggerId,omitempty"`
-
- // VerticalScrollPercentageList: List of integer percentage values for
- // scroll triggers. The trigger will fire when each percentage is
- // reached when the view is scrolled vertically. Only valid for AMP
- // scroll triggers.
- VerticalScrollPercentageList *Parameter `json:"verticalScrollPercentageList,omitempty"`
-
- // VisibilitySelector: A visibility trigger CSS selector (i.e. "#id").
- // Only valid for AMP Visibility trigger.
- VisibilitySelector *Parameter `json:"visibilitySelector,omitempty"`
-
- // VisiblePercentageMax: A visibility trigger maximum percent
- // visibility. Only valid for AMP Visibility trigger.
- VisiblePercentageMax *Parameter `json:"visiblePercentageMax,omitempty"`
-
- // VisiblePercentageMin: A visibility trigger minimum percent
- // visibility. Only valid for AMP Visibility trigger.
- VisiblePercentageMin *Parameter `json:"visiblePercentageMin,omitempty"`
-
- // WaitForTags: Whether or not we should delay the form submissions or
- // link opening until all of the tags have fired (by preventing the
- // default action and later simulating the default action). Only valid
- // for Form Submission and Link Click triggers.
- WaitForTags *Parameter `json:"waitForTags,omitempty"`
-
- // WaitForTagsTimeout: How long to wait (in milliseconds) for tags to
- // fire when 'waits_for_tags' above evaluates to true. Only valid for
- // Form Submission and Link Click triggers.
- WaitForTagsTimeout *Parameter `json:"waitForTagsTimeout,omitempty"`
-
- // WorkspaceId: GTM Workspace ID.
- WorkspaceId string `json:"workspaceId,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Trigger) MarshalJSON() ([]byte, error) {
- type NoMethod Trigger
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // UserPermission: Represents a user's permissions to an account and its
- // container.
- type UserPermission struct {
- // AccountAccess: GTM Account access permissions.
- AccountAccess *AccountAccess `json:"accountAccess,omitempty"`
-
- // AccountId: The Account ID uniquely identifies the GTM Account.
- AccountId string `json:"accountId,omitempty"`
-
- // ContainerAccess: GTM Container access permissions.
- ContainerAccess []*ContainerAccess `json:"containerAccess,omitempty"`
-
- // EmailAddress: User's email address.
- EmailAddress string `json:"emailAddress,omitempty"`
-
- // Path: GTM UserPermission's API relative path.
- Path string `json:"path,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountAccess") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountAccess") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *UserPermission) MarshalJSON() ([]byte, error) {
- type NoMethod UserPermission
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Variable: Represents a Google Tag Manager Variable.
- type Variable struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // DisablingTriggerId: For mobile containers only: A list of trigger IDs
- // for disabling conditional variables; the variable is enabled if one
- // of the enabling trigger is true while all the disabling trigger are
- // false. Treated as an unordered set.
- DisablingTriggerId []string `json:"disablingTriggerId,omitempty"`
-
- // EnablingTriggerId: For mobile containers only: A list of trigger IDs
- // for enabling conditional variables; the variable is enabled if one of
- // the enabling triggers is true while all the disabling triggers are
- // false. Treated as an unordered set.
- EnablingTriggerId []string `json:"enablingTriggerId,omitempty"`
-
- // Fingerprint: The fingerprint of the GTM Variable as computed at
- // storage time. This value is recomputed whenever the variable is
- // modified.
- Fingerprint string `json:"fingerprint,omitempty"`
-
- // FormatValue: Option to convert a variable value to other value.
- FormatValue *VariableFormatValue `json:"formatValue,omitempty"`
-
- // Name: Variable display name.
- Name string `json:"name,omitempty"`
-
- // Notes: User notes on how to apply this variable in the container.
- Notes string `json:"notes,omitempty"`
-
- // Parameter: The variable's parameters.
- Parameter []*Parameter `json:"parameter,omitempty"`
-
- // ParentFolderId: Parent folder id.
- ParentFolderId string `json:"parentFolderId,omitempty"`
-
- // Path: GTM Variable's API relative path.
- Path string `json:"path,omitempty"`
-
- // ScheduleEndMs: The end timestamp in milliseconds to schedule a
- // variable.
- ScheduleEndMs int64 `json:"scheduleEndMs,omitempty,string"`
-
- // ScheduleStartMs: The start timestamp in milliseconds to schedule a
- // variable.
- ScheduleStartMs int64 `json:"scheduleStartMs,omitempty,string"`
-
- // TagManagerUrl: Auto generated link to the tag manager UI
- TagManagerUrl string `json:"tagManagerUrl,omitempty"`
-
- // Type: GTM Variable Type.
- Type string `json:"type,omitempty"`
-
- // VariableId: The Variable ID uniquely identifies the GTM Variable.
- VariableId string `json:"variableId,omitempty"`
-
- // WorkspaceId: GTM Workspace ID.
- WorkspaceId string `json:"workspaceId,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Variable) MarshalJSON() ([]byte, error) {
- type NoMethod Variable
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- type VariableFormatValue struct {
- // CaseConversionType: The option to convert a string-type variable
- // value to either lowercase or uppercase.
- //
- // Possible values:
- // "lowercase"
- // "none"
- // "uppercase"
- CaseConversionType string `json:"caseConversionType,omitempty"`
-
- // ConvertFalseToValue: The value to convert if a variable value is
- // false.
- ConvertFalseToValue *Parameter `json:"convertFalseToValue,omitempty"`
-
- // ConvertNullToValue: The value to convert if a variable value is null.
- ConvertNullToValue *Parameter `json:"convertNullToValue,omitempty"`
-
- // ConvertTrueToValue: The value to convert if a variable value is true.
- ConvertTrueToValue *Parameter `json:"convertTrueToValue,omitempty"`
-
- // ConvertUndefinedToValue: The value to convert if a variable value is
- // undefined.
- ConvertUndefinedToValue *Parameter `json:"convertUndefinedToValue,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "CaseConversionType")
- // to unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "CaseConversionType") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *VariableFormatValue) MarshalJSON() ([]byte, error) {
- type NoMethod VariableFormatValue
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Workspace: Represents a Google Tag Manager Container Workspace.
- type Workspace struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // Description: Workspace description.
- Description string `json:"description,omitempty"`
-
- // Fingerprint: The fingerprint of the GTM Workspace as computed at
- // storage time. This value is recomputed whenever the workspace is
- // modified.
- Fingerprint string `json:"fingerprint,omitempty"`
-
- // Name: Workspace display name.
- Name string `json:"name,omitempty"`
-
- // Path: GTM Workspace's API relative path.
- Path string `json:"path,omitempty"`
-
- // TagManagerUrl: Auto generated link to the tag manager UI
- TagManagerUrl string `json:"tagManagerUrl,omitempty"`
-
- // WorkspaceId: The Workspace ID uniquely identifies the GTM Workspace.
- WorkspaceId string `json:"workspaceId,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Workspace) MarshalJSON() ([]byte, error) {
- type NoMethod Workspace
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Zone: Represents a Google Tag Manager Zone's contents.
- type Zone struct {
- // AccountId: GTM Account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // Boundary: This Zone's boundary.
- Boundary *ZoneBoundary `json:"boundary,omitempty"`
-
- // ChildContainer: Containers that are children of this Zone.
- ChildContainer []*ZoneChildContainer `json:"childContainer,omitempty"`
-
- // ContainerId: GTM Container ID.
- ContainerId string `json:"containerId,omitempty"`
-
- // Fingerprint: The fingerprint of the GTM Zone as computed at storage
- // time. This value is recomputed whenever the zone is modified.
- Fingerprint string `json:"fingerprint,omitempty"`
-
- // Name: Zone display name.
- Name string `json:"name,omitempty"`
-
- // Notes: User notes on how to apply this zone in the container.
- Notes string `json:"notes,omitempty"`
-
- // Path: GTM Zone's API relative path.
- Path string `json:"path,omitempty"`
-
- // TagManagerUrl: Auto generated link to the tag manager UI
- TagManagerUrl string `json:"tagManagerUrl,omitempty"`
-
- // TypeRestriction: This Zone's type restrictions.
- TypeRestriction *ZoneTypeRestriction `json:"typeRestriction,omitempty"`
-
- // WorkspaceId: GTM Workspace ID.
- WorkspaceId string `json:"workspaceId,omitempty"`
-
- // ZoneId: The Zone ID uniquely identifies the GTM Zone.
- ZoneId string `json:"zoneId,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Zone) MarshalJSON() ([]byte, error) {
- type NoMethod Zone
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ZoneBoundary: Represents a Zone's boundaries.
- type ZoneBoundary struct {
- // Condition: The conditions that, when conjoined, make up the boundary.
- Condition []*Condition `json:"condition,omitempty"`
-
- // CustomEvaluationTriggerId: Custom evaluation trigger IDs. A zone will
- // evaluate its boundary conditions when any of the listed triggers are
- // true.
- CustomEvaluationTriggerId []string `json:"customEvaluationTriggerId,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Condition") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Condition") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ZoneBoundary) MarshalJSON() ([]byte, error) {
- type NoMethod ZoneBoundary
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ZoneChildContainer: Represents a child container of a Zone.
- type ZoneChildContainer struct {
- // Nickname: The zone's nickname for the child container.
- Nickname string `json:"nickname,omitempty"`
-
- // PublicId: The child container's public id.
- PublicId string `json:"publicId,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Nickname") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Nickname") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ZoneChildContainer) MarshalJSON() ([]byte, error) {
- type NoMethod ZoneChildContainer
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ZoneTypeRestriction: Represents a Zone's type restrictions.
- type ZoneTypeRestriction struct {
- // Enable: True if type restrictions have been enabled for this Zone.
- Enable bool `json:"enable,omitempty"`
-
- // WhitelistedTypeId: List of type public ids that have been whitelisted
- // for use in this Zone.
- WhitelistedTypeId []string `json:"whitelistedTypeId,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Enable") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Enable") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ZoneTypeRestriction) MarshalJSON() ([]byte, error) {
- type NoMethod ZoneTypeRestriction
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // method id "tagmanager.accounts.get":
-
- type AccountsGetCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a GTM Account.
- func (r *AccountsService) Get(path string) *AccountsGetCall {
- c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.get" call.
- // Exactly one of *Account or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Account.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Account{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a GTM Account.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.get",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Accounts's API relative path. Example: accounts/{account_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "response": {
- // "$ref": "Account"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.manage.accounts",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.list":
-
- type AccountsListCall struct {
- s *Service
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists all GTM Accounts that a user has access to.
- func (r *AccountsService) List() *AccountsListCall {
- c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "accounts")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.list" call.
- // Exactly one of *ListAccountsResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListAccountsResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*ListAccountsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListAccountsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists all GTM Accounts that a user has access to.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.list",
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // }
- // },
- // "path": "accounts",
- // "response": {
- // "$ref": "ListAccountsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.manage.accounts",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsListCall) Pages(ctx context.Context, f func(*ListAccountsResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.update":
-
- type AccountsUpdateCall struct {
- s *Service
- path string
- account *Account
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates a GTM Account.
- func (r *AccountsService) Update(path string, account *Account) *AccountsUpdateCall {
- c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.account = account
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the account in
- // storage.
- func (c *AccountsUpdateCall) Fingerprint(fingerprint string) *AccountsUpdateCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.update" call.
- // Exactly one of *Account or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Account.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Account{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates a GTM Account.",
- // "httpMethod": "PUT",
- // "id": "tagmanager.accounts.update",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the account in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Accounts's API relative path. Example: accounts/{account_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "request": {
- // "$ref": "Account"
- // },
- // "response": {
- // "$ref": "Account"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.manage.accounts"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.create":
-
- type AccountsContainersCreateCall struct {
- s *Service
- parent string
- container *Container
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a Container.
- func (r *AccountsContainersService) Create(parent string, container *Container) *AccountsContainersCreateCall {
- c := &AccountsContainersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- c.container = container
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersCreateCall) Fields(s ...googleapi.Field) *AccountsContainersCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersCreateCall) Context(ctx context.Context) *AccountsContainersCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.container)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/containers")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.create" call.
- // Exactly one of *Container or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *Container.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersCreateCall) Do(opts ...googleapi.CallOption) (*Container, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Container{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a Container.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM Account's API relative path. Example: accounts/{account_id}.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/containers",
- // "request": {
- // "$ref": "Container"
- // },
- // "response": {
- // "$ref": "Container"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.delete":
-
- type AccountsContainersDeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes a Container.
- func (r *AccountsContainersService) Delete(path string) *AccountsContainersDeleteCall {
- c := &AccountsContainersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersDeleteCall) Fields(s ...googleapi.Field) *AccountsContainersDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersDeleteCall) Context(ctx context.Context) *AccountsContainersDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.delete" call.
- func (c *AccountsContainersDeleteCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Deletes a Container.",
- // "httpMethod": "DELETE",
- // "id": "tagmanager.accounts.containers.delete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.delete.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.get":
-
- type AccountsContainersGetCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a Container.
- func (r *AccountsContainersService) Get(path string) *AccountsContainersGetCall {
- c := &AccountsContainersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersGetCall) Fields(s ...googleapi.Field) *AccountsContainersGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersGetCall) IfNoneMatch(entityTag string) *AccountsContainersGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersGetCall) Context(ctx context.Context) *AccountsContainersGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.get" call.
- // Exactly one of *Container or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *Container.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersGetCall) Do(opts ...googleapi.CallOption) (*Container, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Container{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a Container.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.get",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "response": {
- // "$ref": "Container"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.list":
-
- type AccountsContainersListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists all Containers that belongs to a GTM Account.
- func (r *AccountsContainersService) List(parent string) *AccountsContainersListCall {
- c := &AccountsContainersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsContainersListCall) PageToken(pageToken string) *AccountsContainersListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersListCall) Fields(s ...googleapi.Field) *AccountsContainersListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersListCall) IfNoneMatch(entityTag string) *AccountsContainersListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersListCall) Context(ctx context.Context) *AccountsContainersListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/containers")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.list" call.
- // Exactly one of *ListContainersResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListContainersResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersListCall) Do(opts ...googleapi.CallOption) (*ListContainersResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListContainersResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists all Containers that belongs to a GTM Account.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "GTM Accounts's API relative path. Example: accounts/{account_id}.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/containers",
- // "response": {
- // "$ref": "ListContainersResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsContainersListCall) Pages(ctx context.Context, f func(*ListContainersResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.containers.update":
-
- type AccountsContainersUpdateCall struct {
- s *Service
- path string
- container *Container
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates a Container.
- func (r *AccountsContainersService) Update(path string, container *Container) *AccountsContainersUpdateCall {
- c := &AccountsContainersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.container = container
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the container in
- // storage.
- func (c *AccountsContainersUpdateCall) Fingerprint(fingerprint string) *AccountsContainersUpdateCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersUpdateCall) Fields(s ...googleapi.Field) *AccountsContainersUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersUpdateCall) Context(ctx context.Context) *AccountsContainersUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.container)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.update" call.
- // Exactly one of *Container or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *Container.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersUpdateCall) Do(opts ...googleapi.CallOption) (*Container, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Container{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates a Container.",
- // "httpMethod": "PUT",
- // "id": "tagmanager.accounts.containers.update",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the container in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "request": {
- // "$ref": "Container"
- // },
- // "response": {
- // "$ref": "Container"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.environments.create":
-
- type AccountsContainersEnvironmentsCreateCall struct {
- s *Service
- parent string
- environment *Environment
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a GTM Environment.
- func (r *AccountsContainersEnvironmentsService) Create(parent string, environment *Environment) *AccountsContainersEnvironmentsCreateCall {
- c := &AccountsContainersEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- c.environment = environment
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersEnvironmentsCreateCall) Fields(s ...googleapi.Field) *AccountsContainersEnvironmentsCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersEnvironmentsCreateCall) Context(ctx context.Context) *AccountsContainersEnvironmentsCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersEnvironmentsCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.environment)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/environments")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.environments.create" call.
- // Exactly one of *Environment or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *Environment.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*Environment, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Environment{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a GTM Environment.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.environments.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/environments",
- // "request": {
- // "$ref": "Environment"
- // },
- // "response": {
- // "$ref": "Environment"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.environments.delete":
-
- type AccountsContainersEnvironmentsDeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes a GTM Environment.
- func (r *AccountsContainersEnvironmentsService) Delete(path string) *AccountsContainersEnvironmentsDeleteCall {
- c := &AccountsContainersEnvironmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *AccountsContainersEnvironmentsDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersEnvironmentsDeleteCall) Context(ctx context.Context) *AccountsContainersEnvironmentsDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersEnvironmentsDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.environments.delete" call.
- func (c *AccountsContainersEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Deletes a GTM Environment.",
- // "httpMethod": "DELETE",
- // "id": "tagmanager.accounts.containers.environments.delete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Environment's API relative path. Example: accounts/{account_id}/containers/{container_id}/environments/{environment_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.environments.get":
-
- type AccountsContainersEnvironmentsGetCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a GTM Environment.
- func (r *AccountsContainersEnvironmentsService) Get(path string) *AccountsContainersEnvironmentsGetCall {
- c := &AccountsContainersEnvironmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersEnvironmentsGetCall) Fields(s ...googleapi.Field) *AccountsContainersEnvironmentsGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersEnvironmentsGetCall) IfNoneMatch(entityTag string) *AccountsContainersEnvironmentsGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersEnvironmentsGetCall) Context(ctx context.Context) *AccountsContainersEnvironmentsGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersEnvironmentsGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.environments.get" call.
- // Exactly one of *Environment or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *Environment.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*Environment, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Environment{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a GTM Environment.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.environments.get",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Environment's API relative path. Example: accounts/{account_id}/containers/{container_id}/environments/{environment_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "response": {
- // "$ref": "Environment"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.environments.list":
-
- type AccountsContainersEnvironmentsListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists all GTM Environments of a GTM Container.
- func (r *AccountsContainersEnvironmentsService) List(parent string) *AccountsContainersEnvironmentsListCall {
- c := &AccountsContainersEnvironmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsContainersEnvironmentsListCall) PageToken(pageToken string) *AccountsContainersEnvironmentsListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersEnvironmentsListCall) Fields(s ...googleapi.Field) *AccountsContainersEnvironmentsListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersEnvironmentsListCall) IfNoneMatch(entityTag string) *AccountsContainersEnvironmentsListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersEnvironmentsListCall) Context(ctx context.Context) *AccountsContainersEnvironmentsListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersEnvironmentsListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersEnvironmentsListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/environments")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.environments.list" call.
- // Exactly one of *ListEnvironmentsResponse or error will be non-nil.
- // Any non-2xx status code is an error. Response headers are in either
- // *ListEnvironmentsResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersEnvironmentsListCall) Do(opts ...googleapi.CallOption) (*ListEnvironmentsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListEnvironmentsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists all GTM Environments of a GTM Container.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.environments.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/environments",
- // "response": {
- // "$ref": "ListEnvironmentsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsContainersEnvironmentsListCall) Pages(ctx context.Context, f func(*ListEnvironmentsResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.containers.environments.reauthorize":
-
- type AccountsContainersEnvironmentsReauthorizeCall struct {
- s *Service
- path string
- environment *Environment
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Reauthorize: Re-generates the authorization code for a GTM
- // Environment.
- func (r *AccountsContainersEnvironmentsService) Reauthorize(path string, environment *Environment) *AccountsContainersEnvironmentsReauthorizeCall {
- c := &AccountsContainersEnvironmentsReauthorizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.environment = environment
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersEnvironmentsReauthorizeCall) Fields(s ...googleapi.Field) *AccountsContainersEnvironmentsReauthorizeCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersEnvironmentsReauthorizeCall) Context(ctx context.Context) *AccountsContainersEnvironmentsReauthorizeCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersEnvironmentsReauthorizeCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersEnvironmentsReauthorizeCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.environment)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:reauthorize")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.environments.reauthorize" call.
- // Exactly one of *Environment or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *Environment.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersEnvironmentsReauthorizeCall) Do(opts ...googleapi.CallOption) (*Environment, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Environment{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Re-generates the authorization code for a GTM Environment.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.environments.reauthorize",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Environment's API relative path. Example: accounts/{account_id}/containers/{container_id}/environments/{environment_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:reauthorize",
- // "request": {
- // "$ref": "Environment"
- // },
- // "response": {
- // "$ref": "Environment"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.publish"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.environments.update":
-
- type AccountsContainersEnvironmentsUpdateCall struct {
- s *Service
- path string
- environment *Environment
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates a GTM Environment.
- func (r *AccountsContainersEnvironmentsService) Update(path string, environment *Environment) *AccountsContainersEnvironmentsUpdateCall {
- c := &AccountsContainersEnvironmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.environment = environment
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the environment in
- // storage.
- func (c *AccountsContainersEnvironmentsUpdateCall) Fingerprint(fingerprint string) *AccountsContainersEnvironmentsUpdateCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersEnvironmentsUpdateCall) Fields(s ...googleapi.Field) *AccountsContainersEnvironmentsUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersEnvironmentsUpdateCall) Context(ctx context.Context) *AccountsContainersEnvironmentsUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersEnvironmentsUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersEnvironmentsUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.environment)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.environments.update" call.
- // Exactly one of *Environment or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *Environment.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersEnvironmentsUpdateCall) Do(opts ...googleapi.CallOption) (*Environment, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Environment{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates a GTM Environment.",
- // "httpMethod": "PUT",
- // "id": "tagmanager.accounts.containers.environments.update",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the environment in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Environment's API relative path. Example: accounts/{account_id}/containers/{container_id}/environments/{environment_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "request": {
- // "$ref": "Environment"
- // },
- // "response": {
- // "$ref": "Environment"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.version_headers.latest":
-
- type AccountsContainersVersionHeadersLatestCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Latest: Gets the latest container version header
- func (r *AccountsContainersVersionHeadersService) Latest(parent string) *AccountsContainersVersionHeadersLatestCall {
- c := &AccountsContainersVersionHeadersLatestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersVersionHeadersLatestCall) Fields(s ...googleapi.Field) *AccountsContainersVersionHeadersLatestCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersVersionHeadersLatestCall) IfNoneMatch(entityTag string) *AccountsContainersVersionHeadersLatestCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersVersionHeadersLatestCall) Context(ctx context.Context) *AccountsContainersVersionHeadersLatestCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersVersionHeadersLatestCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersVersionHeadersLatestCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/version_headers:latest")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.version_headers.latest" call.
- // Exactly one of *ContainerVersionHeader or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ContainerVersionHeader.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersVersionHeadersLatestCall) Do(opts ...googleapi.CallOption) (*ContainerVersionHeader, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ContainerVersionHeader{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets the latest container version header",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.version_headers.latest",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/version_headers:latest",
- // "response": {
- // "$ref": "ContainerVersionHeader"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.version_headers.list":
-
- type AccountsContainersVersionHeadersListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists all Container Versions of a GTM Container.
- func (r *AccountsContainersVersionHeadersService) List(parent string) *AccountsContainersVersionHeadersListCall {
- c := &AccountsContainersVersionHeadersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // IncludeDeleted sets the optional parameter "includeDeleted": Also
- // retrieve deleted (archived) versions when true.
- func (c *AccountsContainersVersionHeadersListCall) IncludeDeleted(includeDeleted bool) *AccountsContainersVersionHeadersListCall {
- c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsContainersVersionHeadersListCall) PageToken(pageToken string) *AccountsContainersVersionHeadersListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersVersionHeadersListCall) Fields(s ...googleapi.Field) *AccountsContainersVersionHeadersListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersVersionHeadersListCall) IfNoneMatch(entityTag string) *AccountsContainersVersionHeadersListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersVersionHeadersListCall) Context(ctx context.Context) *AccountsContainersVersionHeadersListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersVersionHeadersListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersVersionHeadersListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/version_headers")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.version_headers.list" call.
- // Exactly one of *ListContainerVersionsResponse or error will be
- // non-nil. Any non-2xx status code is an error. Response headers are in
- // either *ListContainerVersionsResponse.ServerResponse.Header or (if a
- // response was returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersVersionHeadersListCall) Do(opts ...googleapi.CallOption) (*ListContainerVersionsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListContainerVersionsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists all Container Versions of a GTM Container.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.version_headers.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "includeDeleted": {
- // "description": "Also retrieve deleted (archived) versions when true.",
- // "location": "query",
- // "type": "boolean"
- // },
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/version_headers",
- // "response": {
- // "$ref": "ListContainerVersionsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.edit.containerversions",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsContainersVersionHeadersListCall) Pages(ctx context.Context, f func(*ListContainerVersionsResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.containers.versions.delete":
-
- type AccountsContainersVersionsDeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes a Container Version.
- func (r *AccountsContainersVersionsService) Delete(path string) *AccountsContainersVersionsDeleteCall {
- c := &AccountsContainersVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersVersionsDeleteCall) Fields(s ...googleapi.Field) *AccountsContainersVersionsDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersVersionsDeleteCall) Context(ctx context.Context) *AccountsContainersVersionsDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersVersionsDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.versions.delete" call.
- func (c *AccountsContainersVersionsDeleteCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Deletes a Container Version.",
- // "httpMethod": "DELETE",
- // "id": "tagmanager.accounts.containers.versions.delete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containerversions"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.versions.get":
-
- type AccountsContainersVersionsGetCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a Container Version.
- func (r *AccountsContainersVersionsService) Get(path string) *AccountsContainersVersionsGetCall {
- c := &AccountsContainersVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // ContainerVersionId sets the optional parameter "containerVersionId":
- // The GTM ContainerVersion ID. Specify published to retrieve the
- // currently published version.
- func (c *AccountsContainersVersionsGetCall) ContainerVersionId(containerVersionId string) *AccountsContainersVersionsGetCall {
- c.urlParams_.Set("containerVersionId", containerVersionId)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersVersionsGetCall) Fields(s ...googleapi.Field) *AccountsContainersVersionsGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersVersionsGetCall) IfNoneMatch(entityTag string) *AccountsContainersVersionsGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersVersionsGetCall) Context(ctx context.Context) *AccountsContainersVersionsGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersVersionsGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersVersionsGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.versions.get" call.
- // Exactly one of *ContainerVersion or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ContainerVersion.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersVersionsGetCall) Do(opts ...googleapi.CallOption) (*ContainerVersion, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ContainerVersion{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a Container Version.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.versions.get",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "containerVersionId": {
- // "description": "The GTM ContainerVersion ID. Specify published to retrieve the currently published version.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "response": {
- // "$ref": "ContainerVersion"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.edit.containerversions",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.versions.live":
-
- type AccountsContainersVersionsLiveCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Live: Gets the live (i.e. published) container version
- func (r *AccountsContainersVersionsService) Live(parent string) *AccountsContainersVersionsLiveCall {
- c := &AccountsContainersVersionsLiveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersVersionsLiveCall) Fields(s ...googleapi.Field) *AccountsContainersVersionsLiveCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersVersionsLiveCall) IfNoneMatch(entityTag string) *AccountsContainersVersionsLiveCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersVersionsLiveCall) Context(ctx context.Context) *AccountsContainersVersionsLiveCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersVersionsLiveCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersVersionsLiveCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/versions:live")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.versions.live" call.
- // Exactly one of *ContainerVersion or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ContainerVersion.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersVersionsLiveCall) Do(opts ...googleapi.CallOption) (*ContainerVersion, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ContainerVersion{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets the live (i.e. published) container version",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.versions.live",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/versions:live",
- // "response": {
- // "$ref": "ContainerVersion"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.versions.publish":
-
- type AccountsContainersVersionsPublishCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Publish: Publishes a Container Version.
- func (r *AccountsContainersVersionsService) Publish(path string) *AccountsContainersVersionsPublishCall {
- c := &AccountsContainersVersionsPublishCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the container version
- // in storage.
- func (c *AccountsContainersVersionsPublishCall) Fingerprint(fingerprint string) *AccountsContainersVersionsPublishCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersVersionsPublishCall) Fields(s ...googleapi.Field) *AccountsContainersVersionsPublishCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersVersionsPublishCall) Context(ctx context.Context) *AccountsContainersVersionsPublishCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersVersionsPublishCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersVersionsPublishCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:publish")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.versions.publish" call.
- // Exactly one of *PublishContainerVersionResponse or error will be
- // non-nil. Any non-2xx status code is an error. Response headers are in
- // either *PublishContainerVersionResponse.ServerResponse.Header or (if
- // a response was returned at all) in error.(*googleapi.Error).Header.
- // Use googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersVersionsPublishCall) Do(opts ...googleapi.CallOption) (*PublishContainerVersionResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &PublishContainerVersionResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Publishes a Container Version.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.versions.publish",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the container version in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:publish",
- // "response": {
- // "$ref": "PublishContainerVersionResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.publish"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.versions.set_latest":
-
- type AccountsContainersVersionsSetLatestCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // SetLatest: Sets the latest version used for synchronization of
- // workspaces when detecting conflicts and errors.
- func (r *AccountsContainersVersionsService) SetLatest(path string) *AccountsContainersVersionsSetLatestCall {
- c := &AccountsContainersVersionsSetLatestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersVersionsSetLatestCall) Fields(s ...googleapi.Field) *AccountsContainersVersionsSetLatestCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersVersionsSetLatestCall) Context(ctx context.Context) *AccountsContainersVersionsSetLatestCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersVersionsSetLatestCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersVersionsSetLatestCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:set_latest")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.versions.set_latest" call.
- // Exactly one of *ContainerVersion or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ContainerVersion.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersVersionsSetLatestCall) Do(opts ...googleapi.CallOption) (*ContainerVersion, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ContainerVersion{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Sets the latest version used for synchronization of workspaces when detecting conflicts and errors.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.versions.set_latest",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:set_latest",
- // "response": {
- // "$ref": "ContainerVersion"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.versions.undelete":
-
- type AccountsContainersVersionsUndeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Undelete: Undeletes a Container Version.
- func (r *AccountsContainersVersionsService) Undelete(path string) *AccountsContainersVersionsUndeleteCall {
- c := &AccountsContainersVersionsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersVersionsUndeleteCall) Fields(s ...googleapi.Field) *AccountsContainersVersionsUndeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersVersionsUndeleteCall) Context(ctx context.Context) *AccountsContainersVersionsUndeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersVersionsUndeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersVersionsUndeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:undelete")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.versions.undelete" call.
- // Exactly one of *ContainerVersion or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ContainerVersion.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersVersionsUndeleteCall) Do(opts ...googleapi.CallOption) (*ContainerVersion, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ContainerVersion{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Undeletes a Container Version.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.versions.undelete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:undelete",
- // "response": {
- // "$ref": "ContainerVersion"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containerversions"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.versions.update":
-
- type AccountsContainersVersionsUpdateCall struct {
- s *Service
- path string
- containerversion *ContainerVersion
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates a Container Version.
- func (r *AccountsContainersVersionsService) Update(path string, containerversion *ContainerVersion) *AccountsContainersVersionsUpdateCall {
- c := &AccountsContainersVersionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.containerversion = containerversion
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the container version
- // in storage.
- func (c *AccountsContainersVersionsUpdateCall) Fingerprint(fingerprint string) *AccountsContainersVersionsUpdateCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersVersionsUpdateCall) Fields(s ...googleapi.Field) *AccountsContainersVersionsUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersVersionsUpdateCall) Context(ctx context.Context) *AccountsContainersVersionsUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersVersionsUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersVersionsUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.containerversion)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.versions.update" call.
- // Exactly one of *ContainerVersion or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ContainerVersion.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersVersionsUpdateCall) Do(opts ...googleapi.CallOption) (*ContainerVersion, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ContainerVersion{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates a Container Version.",
- // "httpMethod": "PUT",
- // "id": "tagmanager.accounts.containers.versions.update",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the container version in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "request": {
- // "$ref": "ContainerVersion"
- // },
- // "response": {
- // "$ref": "ContainerVersion"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containerversions"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.create":
-
- type AccountsContainersWorkspacesCreateCall struct {
- s *Service
- parent string
- workspace *Workspace
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a Workspace.
- func (r *AccountsContainersWorkspacesService) Create(parent string, workspace *Workspace) *AccountsContainersWorkspacesCreateCall {
- c := &AccountsContainersWorkspacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- c.workspace = workspace
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesCreateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesCreateCall) Context(ctx context.Context) *AccountsContainersWorkspacesCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.workspace)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/workspaces")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.create" call.
- // Exactly one of *Workspace or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *Workspace.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesCreateCall) Do(opts ...googleapi.CallOption) (*Workspace, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Workspace{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a Workspace.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM parent Container's API relative path. Example: accounts/{account_id}/containers/{container_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/workspaces",
- // "request": {
- // "$ref": "Workspace"
- // },
- // "response": {
- // "$ref": "Workspace"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.create_version":
-
- type AccountsContainersWorkspacesCreateVersionCall struct {
- s *Service
- path string
- createcontainerversionrequestversionoptions *CreateContainerVersionRequestVersionOptions
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // CreateVersion: Creates a Container Version from the entities present
- // in the workspace, deletes the workspace, and sets the base container
- // version to the newly created version.
- func (r *AccountsContainersWorkspacesService) CreateVersion(path string, createcontainerversionrequestversionoptions *CreateContainerVersionRequestVersionOptions) *AccountsContainersWorkspacesCreateVersionCall {
- c := &AccountsContainersWorkspacesCreateVersionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.createcontainerversionrequestversionoptions = createcontainerversionrequestversionoptions
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesCreateVersionCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesCreateVersionCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesCreateVersionCall) Context(ctx context.Context) *AccountsContainersWorkspacesCreateVersionCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesCreateVersionCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesCreateVersionCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.createcontainerversionrequestversionoptions)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:create_version")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.create_version" call.
- // Exactly one of *CreateContainerVersionResponse or error will be
- // non-nil. Any non-2xx status code is an error. Response headers are in
- // either *CreateContainerVersionResponse.ServerResponse.Header or (if a
- // response was returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesCreateVersionCall) Do(opts ...googleapi.CallOption) (*CreateContainerVersionResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &CreateContainerVersionResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a Container Version from the entities present in the workspace, deletes the workspace, and sets the base container version to the newly created version.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.create_version",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:create_version",
- // "request": {
- // "$ref": "CreateContainerVersionRequestVersionOptions"
- // },
- // "response": {
- // "$ref": "CreateContainerVersionResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containerversions"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.delete":
-
- type AccountsContainersWorkspacesDeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes a Workspace.
- func (r *AccountsContainersWorkspacesService) Delete(path string) *AccountsContainersWorkspacesDeleteCall {
- c := &AccountsContainersWorkspacesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesDeleteCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesDeleteCall) Context(ctx context.Context) *AccountsContainersWorkspacesDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.delete" call.
- func (c *AccountsContainersWorkspacesDeleteCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Deletes a Workspace.",
- // "httpMethod": "DELETE",
- // "id": "tagmanager.accounts.containers.workspaces.delete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.delete.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.get":
-
- type AccountsContainersWorkspacesGetCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a Workspace.
- func (r *AccountsContainersWorkspacesService) Get(path string) *AccountsContainersWorkspacesGetCall {
- c := &AccountsContainersWorkspacesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesGetCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesGetCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesGetCall) Context(ctx context.Context) *AccountsContainersWorkspacesGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.get" call.
- // Exactly one of *Workspace or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *Workspace.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesGetCall) Do(opts ...googleapi.CallOption) (*Workspace, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Workspace{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a Workspace.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.get",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "response": {
- // "$ref": "Workspace"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.getStatus":
-
- type AccountsContainersWorkspacesGetStatusCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // GetStatus: Finds conflicting and modified entities in the workspace.
- func (r *AccountsContainersWorkspacesService) GetStatus(path string) *AccountsContainersWorkspacesGetStatusCall {
- c := &AccountsContainersWorkspacesGetStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesGetStatusCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesGetStatusCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesGetStatusCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesGetStatusCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesGetStatusCall) Context(ctx context.Context) *AccountsContainersWorkspacesGetStatusCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesGetStatusCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesGetStatusCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}/status")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.getStatus" call.
- // Exactly one of *GetWorkspaceStatusResponse or error will be non-nil.
- // Any non-2xx status code is an error. Response headers are in either
- // *GetWorkspaceStatusResponse.ServerResponse.Header or (if a response
- // was returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesGetStatusCall) Do(opts ...googleapi.CallOption) (*GetWorkspaceStatusResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &GetWorkspaceStatusResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Finds conflicting and modified entities in the workspace.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.getStatus",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}/status",
- // "response": {
- // "$ref": "GetWorkspaceStatusResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.list":
-
- type AccountsContainersWorkspacesListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists all Workspaces that belong to a GTM Container.
- func (r *AccountsContainersWorkspacesService) List(parent string) *AccountsContainersWorkspacesListCall {
- c := &AccountsContainersWorkspacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsContainersWorkspacesListCall) PageToken(pageToken string) *AccountsContainersWorkspacesListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesListCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesListCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesListCall) Context(ctx context.Context) *AccountsContainersWorkspacesListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/workspaces")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.list" call.
- // Exactly one of *ListWorkspacesResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListWorkspacesResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesListCall) Do(opts ...googleapi.CallOption) (*ListWorkspacesResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListWorkspacesResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists all Workspaces that belong to a GTM Container.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "GTM parent Container's API relative path. Example: accounts/{account_id}/containers/{container_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/workspaces",
- // "response": {
- // "$ref": "ListWorkspacesResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsContainersWorkspacesListCall) Pages(ctx context.Context, f func(*ListWorkspacesResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.containers.workspaces.quick_preview":
-
- type AccountsContainersWorkspacesQuickPreviewCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // QuickPreview: Quick previews a workspace by creating a fake container
- // version from all entities in the provided workspace.
- func (r *AccountsContainersWorkspacesService) QuickPreview(path string) *AccountsContainersWorkspacesQuickPreviewCall {
- c := &AccountsContainersWorkspacesQuickPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesQuickPreviewCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesQuickPreviewCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesQuickPreviewCall) Context(ctx context.Context) *AccountsContainersWorkspacesQuickPreviewCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesQuickPreviewCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesQuickPreviewCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:quick_preview")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.quick_preview" call.
- // Exactly one of *QuickPreviewResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *QuickPreviewResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesQuickPreviewCall) Do(opts ...googleapi.CallOption) (*QuickPreviewResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &QuickPreviewResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Quick previews a workspace by creating a fake container version from all entities in the provided workspace.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.quick_preview",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:quick_preview",
- // "response": {
- // "$ref": "QuickPreviewResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containerversions"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.resolve_conflict":
-
- type AccountsContainersWorkspacesResolveConflictCall struct {
- s *Service
- path string
- entity *Entity
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // ResolveConflict: Resolves a merge conflict for a workspace entity by
- // updating it to the resolved entity passed in the request.
- func (r *AccountsContainersWorkspacesService) ResolveConflict(path string, entity *Entity) *AccountsContainersWorkspacesResolveConflictCall {
- c := &AccountsContainersWorkspacesResolveConflictCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.entity = entity
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the
- // entity_in_workspace in the merge conflict.
- func (c *AccountsContainersWorkspacesResolveConflictCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesResolveConflictCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesResolveConflictCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesResolveConflictCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesResolveConflictCall) Context(ctx context.Context) *AccountsContainersWorkspacesResolveConflictCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesResolveConflictCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesResolveConflictCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.entity)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:resolve_conflict")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.resolve_conflict" call.
- func (c *AccountsContainersWorkspacesResolveConflictCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Resolves a merge conflict for a workspace entity by updating it to the resolved entity passed in the request.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.resolve_conflict",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the entity_in_workspace in the merge conflict.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:resolve_conflict",
- // "request": {
- // "$ref": "Entity"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.sync":
-
- type AccountsContainersWorkspacesSyncCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Sync: Syncs a workspace to the latest container version by updating
- // all unmodified workspace entities and displaying conflicts for
- // modified entities.
- func (r *AccountsContainersWorkspacesService) Sync(path string) *AccountsContainersWorkspacesSyncCall {
- c := &AccountsContainersWorkspacesSyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesSyncCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesSyncCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesSyncCall) Context(ctx context.Context) *AccountsContainersWorkspacesSyncCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesSyncCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesSyncCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:sync")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.sync" call.
- // Exactly one of *SyncWorkspaceResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *SyncWorkspaceResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesSyncCall) Do(opts ...googleapi.CallOption) (*SyncWorkspaceResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &SyncWorkspaceResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Syncs a workspace to the latest container version by updating all unmodified workspace entities and displaying conflicts for modified entities.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.sync",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:sync",
- // "response": {
- // "$ref": "SyncWorkspaceResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.update":
-
- type AccountsContainersWorkspacesUpdateCall struct {
- s *Service
- path string
- workspace *Workspace
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates a Workspace.
- func (r *AccountsContainersWorkspacesService) Update(path string, workspace *Workspace) *AccountsContainersWorkspacesUpdateCall {
- c := &AccountsContainersWorkspacesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.workspace = workspace
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the workspace in
- // storage.
- func (c *AccountsContainersWorkspacesUpdateCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesUpdateCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesUpdateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesUpdateCall) Context(ctx context.Context) *AccountsContainersWorkspacesUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.workspace)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.update" call.
- // Exactly one of *Workspace or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *Workspace.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesUpdateCall) Do(opts ...googleapi.CallOption) (*Workspace, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Workspace{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates a Workspace.",
- // "httpMethod": "PUT",
- // "id": "tagmanager.accounts.containers.workspaces.update",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the workspace in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "request": {
- // "$ref": "Workspace"
- // },
- // "response": {
- // "$ref": "Workspace"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.built_in_variables.create":
-
- type AccountsContainersWorkspacesBuiltInVariablesCreateCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates one or more GTM Built-In Variables.
- func (r *AccountsContainersWorkspacesBuiltInVariablesService) Create(parent string) *AccountsContainersWorkspacesBuiltInVariablesCreateCall {
- c := &AccountsContainersWorkspacesBuiltInVariablesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // Type sets the optional parameter "type": The types of built-in
- // variables to enable.
- //
- // Possible values:
- // "advertiserId"
- // "advertisingTrackingEnabled"
- // "ampBrowserLanguage"
- // "ampCanonicalHost"
- // "ampCanonicalPath"
- // "ampCanonicalUrl"
- // "ampClientId"
- // "ampClientMaxScrollX"
- // "ampClientMaxScrollY"
- // "ampClientScreenHeight"
- // "ampClientScreenWidth"
- // "ampClientScrollX"
- // "ampClientScrollY"
- // "ampClientTimestamp"
- // "ampClientTimezone"
- // "ampGtmEvent"
- // "ampPageDownloadTime"
- // "ampPageLoadTime"
- // "ampPageViewId"
- // "ampReferrer"
- // "ampTitle"
- // "ampTotalEngagedTime"
- // "appId"
- // "appName"
- // "appVersionCode"
- // "appVersionName"
- // "builtInVariableTypeUnspecified"
- // "clickClasses"
- // "clickElement"
- // "clickId"
- // "clickTarget"
- // "clickText"
- // "clickUrl"
- // "containerId"
- // "containerVersion"
- // "debugMode"
- // "deviceName"
- // "elementVisibilityFirstTime"
- // "elementVisibilityRatio"
- // "elementVisibilityRecentTime"
- // "elementVisibilityTime"
- // "environmentName"
- // "errorLine"
- // "errorMessage"
- // "errorUrl"
- // "event"
- // "eventName"
- // "firebaseEventParameterCampaign"
- // "firebaseEventParameterCampaignAclid"
- // "firebaseEventParameterCampaignAnid"
- // "firebaseEventParameterCampaignClickTimestamp"
- // "firebaseEventParameterCampaignContent"
- // "firebaseEventParameterCampaignCp1"
- // "firebaseEventParameterCampaignGclid"
- // "firebaseEventParameterCampaignSource"
- // "firebaseEventParameterCampaignTerm"
- // "firebaseEventParameterCurrency"
- // "firebaseEventParameterDynamicLinkAcceptTime"
- // "firebaseEventParameterDynamicLinkLinkid"
- // "firebaseEventParameterNotificationMessageDeviceTime"
- // "firebaseEventParameterNotificationMessageId"
- // "firebaseEventParameterNotificationMessageName"
- // "firebaseEventParameterNotificationMessageTime"
- // "firebaseEventParameterNotificationTopic"
- // "firebaseEventParameterPreviousAppVersion"
- // "firebaseEventParameterPreviousOsVersion"
- // "firebaseEventParameterPrice"
- // "firebaseEventParameterProductId"
- // "firebaseEventParameterQuantity"
- // "firebaseEventParameterValue"
- // "formClasses"
- // "formElement"
- // "formId"
- // "formTarget"
- // "formText"
- // "formUrl"
- // "historySource"
- // "htmlId"
- // "language"
- // "newHistoryFragment"
- // "newHistoryState"
- // "oldHistoryFragment"
- // "oldHistoryState"
- // "osVersion"
- // "pageHostname"
- // "pagePath"
- // "pageUrl"
- // "platform"
- // "randomNumber"
- // "referrer"
- // "resolution"
- // "scrollDepthDirection"
- // "scrollDepthThreshold"
- // "scrollDepthUnits"
- // "sdkVersion"
- // "videoCurrentTime"
- // "videoDuration"
- // "videoPercent"
- // "videoProvider"
- // "videoStatus"
- // "videoTitle"
- // "videoUrl"
- // "videoVisible"
- func (c *AccountsContainersWorkspacesBuiltInVariablesCreateCall) Type(type_ ...string) *AccountsContainersWorkspacesBuiltInVariablesCreateCall {
- c.urlParams_.SetMulti("type", append([]string{}, type_...))
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesBuiltInVariablesCreateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesBuiltInVariablesCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesBuiltInVariablesCreateCall) Context(ctx context.Context) *AccountsContainersWorkspacesBuiltInVariablesCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesBuiltInVariablesCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesBuiltInVariablesCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/built_in_variables")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.built_in_variables.create" call.
- // Exactly one of *CreateBuiltInVariableResponse or error will be
- // non-nil. Any non-2xx status code is an error. Response headers are in
- // either *CreateBuiltInVariableResponse.ServerResponse.Header or (if a
- // response was returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesBuiltInVariablesCreateCall) Do(opts ...googleapi.CallOption) (*CreateBuiltInVariableResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &CreateBuiltInVariableResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates one or more GTM Built-In Variables.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.built_in_variables.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "type": {
- // "description": "The types of built-in variables to enable.",
- // "enum": [
- // "advertiserId",
- // "advertisingTrackingEnabled",
- // "ampBrowserLanguage",
- // "ampCanonicalHost",
- // "ampCanonicalPath",
- // "ampCanonicalUrl",
- // "ampClientId",
- // "ampClientMaxScrollX",
- // "ampClientMaxScrollY",
- // "ampClientScreenHeight",
- // "ampClientScreenWidth",
- // "ampClientScrollX",
- // "ampClientScrollY",
- // "ampClientTimestamp",
- // "ampClientTimezone",
- // "ampGtmEvent",
- // "ampPageDownloadTime",
- // "ampPageLoadTime",
- // "ampPageViewId",
- // "ampReferrer",
- // "ampTitle",
- // "ampTotalEngagedTime",
- // "appId",
- // "appName",
- // "appVersionCode",
- // "appVersionName",
- // "builtInVariableTypeUnspecified",
- // "clickClasses",
- // "clickElement",
- // "clickId",
- // "clickTarget",
- // "clickText",
- // "clickUrl",
- // "containerId",
- // "containerVersion",
- // "debugMode",
- // "deviceName",
- // "elementVisibilityFirstTime",
- // "elementVisibilityRatio",
- // "elementVisibilityRecentTime",
- // "elementVisibilityTime",
- // "environmentName",
- // "errorLine",
- // "errorMessage",
- // "errorUrl",
- // "event",
- // "eventName",
- // "firebaseEventParameterCampaign",
- // "firebaseEventParameterCampaignAclid",
- // "firebaseEventParameterCampaignAnid",
- // "firebaseEventParameterCampaignClickTimestamp",
- // "firebaseEventParameterCampaignContent",
- // "firebaseEventParameterCampaignCp1",
- // "firebaseEventParameterCampaignGclid",
- // "firebaseEventParameterCampaignSource",
- // "firebaseEventParameterCampaignTerm",
- // "firebaseEventParameterCurrency",
- // "firebaseEventParameterDynamicLinkAcceptTime",
- // "firebaseEventParameterDynamicLinkLinkid",
- // "firebaseEventParameterNotificationMessageDeviceTime",
- // "firebaseEventParameterNotificationMessageId",
- // "firebaseEventParameterNotificationMessageName",
- // "firebaseEventParameterNotificationMessageTime",
- // "firebaseEventParameterNotificationTopic",
- // "firebaseEventParameterPreviousAppVersion",
- // "firebaseEventParameterPreviousOsVersion",
- // "firebaseEventParameterPrice",
- // "firebaseEventParameterProductId",
- // "firebaseEventParameterQuantity",
- // "firebaseEventParameterValue",
- // "formClasses",
- // "formElement",
- // "formId",
- // "formTarget",
- // "formText",
- // "formUrl",
- // "historySource",
- // "htmlId",
- // "language",
- // "newHistoryFragment",
- // "newHistoryState",
- // "oldHistoryFragment",
- // "oldHistoryState",
- // "osVersion",
- // "pageHostname",
- // "pagePath",
- // "pageUrl",
- // "platform",
- // "randomNumber",
- // "referrer",
- // "resolution",
- // "scrollDepthDirection",
- // "scrollDepthThreshold",
- // "scrollDepthUnits",
- // "sdkVersion",
- // "videoCurrentTime",
- // "videoDuration",
- // "videoPercent",
- // "videoProvider",
- // "videoStatus",
- // "videoTitle",
- // "videoUrl",
- // "videoVisible"
- // ],
- // "enumDescriptions": [
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // ""
- // ],
- // "location": "query",
- // "repeated": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/built_in_variables",
- // "response": {
- // "$ref": "CreateBuiltInVariableResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.built_in_variables.delete":
-
- type AccountsContainersWorkspacesBuiltInVariablesDeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes one or more GTM Built-In Variables.
- func (r *AccountsContainersWorkspacesBuiltInVariablesService) Delete(path string) *AccountsContainersWorkspacesBuiltInVariablesDeleteCall {
- c := &AccountsContainersWorkspacesBuiltInVariablesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Type sets the optional parameter "type": The types of built-in
- // variables to delete.
- //
- // Possible values:
- // "advertiserId"
- // "advertisingTrackingEnabled"
- // "ampBrowserLanguage"
- // "ampCanonicalHost"
- // "ampCanonicalPath"
- // "ampCanonicalUrl"
- // "ampClientId"
- // "ampClientMaxScrollX"
- // "ampClientMaxScrollY"
- // "ampClientScreenHeight"
- // "ampClientScreenWidth"
- // "ampClientScrollX"
- // "ampClientScrollY"
- // "ampClientTimestamp"
- // "ampClientTimezone"
- // "ampGtmEvent"
- // "ampPageDownloadTime"
- // "ampPageLoadTime"
- // "ampPageViewId"
- // "ampReferrer"
- // "ampTitle"
- // "ampTotalEngagedTime"
- // "appId"
- // "appName"
- // "appVersionCode"
- // "appVersionName"
- // "builtInVariableTypeUnspecified"
- // "clickClasses"
- // "clickElement"
- // "clickId"
- // "clickTarget"
- // "clickText"
- // "clickUrl"
- // "containerId"
- // "containerVersion"
- // "debugMode"
- // "deviceName"
- // "elementVisibilityFirstTime"
- // "elementVisibilityRatio"
- // "elementVisibilityRecentTime"
- // "elementVisibilityTime"
- // "environmentName"
- // "errorLine"
- // "errorMessage"
- // "errorUrl"
- // "event"
- // "eventName"
- // "firebaseEventParameterCampaign"
- // "firebaseEventParameterCampaignAclid"
- // "firebaseEventParameterCampaignAnid"
- // "firebaseEventParameterCampaignClickTimestamp"
- // "firebaseEventParameterCampaignContent"
- // "firebaseEventParameterCampaignCp1"
- // "firebaseEventParameterCampaignGclid"
- // "firebaseEventParameterCampaignSource"
- // "firebaseEventParameterCampaignTerm"
- // "firebaseEventParameterCurrency"
- // "firebaseEventParameterDynamicLinkAcceptTime"
- // "firebaseEventParameterDynamicLinkLinkid"
- // "firebaseEventParameterNotificationMessageDeviceTime"
- // "firebaseEventParameterNotificationMessageId"
- // "firebaseEventParameterNotificationMessageName"
- // "firebaseEventParameterNotificationMessageTime"
- // "firebaseEventParameterNotificationTopic"
- // "firebaseEventParameterPreviousAppVersion"
- // "firebaseEventParameterPreviousOsVersion"
- // "firebaseEventParameterPrice"
- // "firebaseEventParameterProductId"
- // "firebaseEventParameterQuantity"
- // "firebaseEventParameterValue"
- // "formClasses"
- // "formElement"
- // "formId"
- // "formTarget"
- // "formText"
- // "formUrl"
- // "historySource"
- // "htmlId"
- // "language"
- // "newHistoryFragment"
- // "newHistoryState"
- // "oldHistoryFragment"
- // "oldHistoryState"
- // "osVersion"
- // "pageHostname"
- // "pagePath"
- // "pageUrl"
- // "platform"
- // "randomNumber"
- // "referrer"
- // "resolution"
- // "scrollDepthDirection"
- // "scrollDepthThreshold"
- // "scrollDepthUnits"
- // "sdkVersion"
- // "videoCurrentTime"
- // "videoDuration"
- // "videoPercent"
- // "videoProvider"
- // "videoStatus"
- // "videoTitle"
- // "videoUrl"
- // "videoVisible"
- func (c *AccountsContainersWorkspacesBuiltInVariablesDeleteCall) Type(type_ ...string) *AccountsContainersWorkspacesBuiltInVariablesDeleteCall {
- c.urlParams_.SetMulti("type", append([]string{}, type_...))
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesBuiltInVariablesDeleteCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesBuiltInVariablesDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesBuiltInVariablesDeleteCall) Context(ctx context.Context) *AccountsContainersWorkspacesBuiltInVariablesDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesBuiltInVariablesDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesBuiltInVariablesDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.built_in_variables.delete" call.
- func (c *AccountsContainersWorkspacesBuiltInVariablesDeleteCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Deletes one or more GTM Built-In Variables.",
- // "httpMethod": "DELETE",
- // "id": "tagmanager.accounts.containers.workspaces.built_in_variables.delete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM BuiltInVariable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/built_in_variables",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "type": {
- // "description": "The types of built-in variables to delete.",
- // "enum": [
- // "advertiserId",
- // "advertisingTrackingEnabled",
- // "ampBrowserLanguage",
- // "ampCanonicalHost",
- // "ampCanonicalPath",
- // "ampCanonicalUrl",
- // "ampClientId",
- // "ampClientMaxScrollX",
- // "ampClientMaxScrollY",
- // "ampClientScreenHeight",
- // "ampClientScreenWidth",
- // "ampClientScrollX",
- // "ampClientScrollY",
- // "ampClientTimestamp",
- // "ampClientTimezone",
- // "ampGtmEvent",
- // "ampPageDownloadTime",
- // "ampPageLoadTime",
- // "ampPageViewId",
- // "ampReferrer",
- // "ampTitle",
- // "ampTotalEngagedTime",
- // "appId",
- // "appName",
- // "appVersionCode",
- // "appVersionName",
- // "builtInVariableTypeUnspecified",
- // "clickClasses",
- // "clickElement",
- // "clickId",
- // "clickTarget",
- // "clickText",
- // "clickUrl",
- // "containerId",
- // "containerVersion",
- // "debugMode",
- // "deviceName",
- // "elementVisibilityFirstTime",
- // "elementVisibilityRatio",
- // "elementVisibilityRecentTime",
- // "elementVisibilityTime",
- // "environmentName",
- // "errorLine",
- // "errorMessage",
- // "errorUrl",
- // "event",
- // "eventName",
- // "firebaseEventParameterCampaign",
- // "firebaseEventParameterCampaignAclid",
- // "firebaseEventParameterCampaignAnid",
- // "firebaseEventParameterCampaignClickTimestamp",
- // "firebaseEventParameterCampaignContent",
- // "firebaseEventParameterCampaignCp1",
- // "firebaseEventParameterCampaignGclid",
- // "firebaseEventParameterCampaignSource",
- // "firebaseEventParameterCampaignTerm",
- // "firebaseEventParameterCurrency",
- // "firebaseEventParameterDynamicLinkAcceptTime",
- // "firebaseEventParameterDynamicLinkLinkid",
- // "firebaseEventParameterNotificationMessageDeviceTime",
- // "firebaseEventParameterNotificationMessageId",
- // "firebaseEventParameterNotificationMessageName",
- // "firebaseEventParameterNotificationMessageTime",
- // "firebaseEventParameterNotificationTopic",
- // "firebaseEventParameterPreviousAppVersion",
- // "firebaseEventParameterPreviousOsVersion",
- // "firebaseEventParameterPrice",
- // "firebaseEventParameterProductId",
- // "firebaseEventParameterQuantity",
- // "firebaseEventParameterValue",
- // "formClasses",
- // "formElement",
- // "formId",
- // "formTarget",
- // "formText",
- // "formUrl",
- // "historySource",
- // "htmlId",
- // "language",
- // "newHistoryFragment",
- // "newHistoryState",
- // "oldHistoryFragment",
- // "oldHistoryState",
- // "osVersion",
- // "pageHostname",
- // "pagePath",
- // "pageUrl",
- // "platform",
- // "randomNumber",
- // "referrer",
- // "resolution",
- // "scrollDepthDirection",
- // "scrollDepthThreshold",
- // "scrollDepthUnits",
- // "sdkVersion",
- // "videoCurrentTime",
- // "videoDuration",
- // "videoPercent",
- // "videoProvider",
- // "videoStatus",
- // "videoTitle",
- // "videoUrl",
- // "videoVisible"
- // ],
- // "enumDescriptions": [
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // ""
- // ],
- // "location": "query",
- // "repeated": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.built_in_variables.list":
-
- type AccountsContainersWorkspacesBuiltInVariablesListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists all the enabled Built-In Variables of a GTM Container.
- func (r *AccountsContainersWorkspacesBuiltInVariablesService) List(parent string) *AccountsContainersWorkspacesBuiltInVariablesListCall {
- c := &AccountsContainersWorkspacesBuiltInVariablesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsContainersWorkspacesBuiltInVariablesListCall) PageToken(pageToken string) *AccountsContainersWorkspacesBuiltInVariablesListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesBuiltInVariablesListCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesBuiltInVariablesListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesBuiltInVariablesListCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesBuiltInVariablesListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesBuiltInVariablesListCall) Context(ctx context.Context) *AccountsContainersWorkspacesBuiltInVariablesListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesBuiltInVariablesListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesBuiltInVariablesListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/built_in_variables")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.built_in_variables.list" call.
- // Exactly one of *ListEnabledBuiltInVariablesResponse or error will be
- // non-nil. Any non-2xx status code is an error. Response headers are in
- // either *ListEnabledBuiltInVariablesResponse.ServerResponse.Header or
- // (if a response was returned at all) in
- // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
- // whether the returned error was because http.StatusNotModified was
- // returned.
- func (c *AccountsContainersWorkspacesBuiltInVariablesListCall) Do(opts ...googleapi.CallOption) (*ListEnabledBuiltInVariablesResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListEnabledBuiltInVariablesResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists all the enabled Built-In Variables of a GTM Container.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.built_in_variables.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/built_in_variables",
- // "response": {
- // "$ref": "ListEnabledBuiltInVariablesResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsContainersWorkspacesBuiltInVariablesListCall) Pages(ctx context.Context, f func(*ListEnabledBuiltInVariablesResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.containers.workspaces.built_in_variables.revert":
-
- type AccountsContainersWorkspacesBuiltInVariablesRevertCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Revert: Reverts changes to a GTM Built-In Variables in a GTM
- // Workspace.
- func (r *AccountsContainersWorkspacesBuiltInVariablesService) Revert(path string) *AccountsContainersWorkspacesBuiltInVariablesRevertCall {
- c := &AccountsContainersWorkspacesBuiltInVariablesRevertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Type sets the optional parameter "type": The type of built-in
- // variable to revert.
- //
- // Possible values:
- // "advertiserId"
- // "advertisingTrackingEnabled"
- // "ampBrowserLanguage"
- // "ampCanonicalHost"
- // "ampCanonicalPath"
- // "ampCanonicalUrl"
- // "ampClientId"
- // "ampClientMaxScrollX"
- // "ampClientMaxScrollY"
- // "ampClientScreenHeight"
- // "ampClientScreenWidth"
- // "ampClientScrollX"
- // "ampClientScrollY"
- // "ampClientTimestamp"
- // "ampClientTimezone"
- // "ampGtmEvent"
- // "ampPageDownloadTime"
- // "ampPageLoadTime"
- // "ampPageViewId"
- // "ampReferrer"
- // "ampTitle"
- // "ampTotalEngagedTime"
- // "appId"
- // "appName"
- // "appVersionCode"
- // "appVersionName"
- // "builtInVariableTypeUnspecified"
- // "clickClasses"
- // "clickElement"
- // "clickId"
- // "clickTarget"
- // "clickText"
- // "clickUrl"
- // "containerId"
- // "containerVersion"
- // "debugMode"
- // "deviceName"
- // "elementVisibilityFirstTime"
- // "elementVisibilityRatio"
- // "elementVisibilityRecentTime"
- // "elementVisibilityTime"
- // "environmentName"
- // "errorLine"
- // "errorMessage"
- // "errorUrl"
- // "event"
- // "eventName"
- // "firebaseEventParameterCampaign"
- // "firebaseEventParameterCampaignAclid"
- // "firebaseEventParameterCampaignAnid"
- // "firebaseEventParameterCampaignClickTimestamp"
- // "firebaseEventParameterCampaignContent"
- // "firebaseEventParameterCampaignCp1"
- // "firebaseEventParameterCampaignGclid"
- // "firebaseEventParameterCampaignSource"
- // "firebaseEventParameterCampaignTerm"
- // "firebaseEventParameterCurrency"
- // "firebaseEventParameterDynamicLinkAcceptTime"
- // "firebaseEventParameterDynamicLinkLinkid"
- // "firebaseEventParameterNotificationMessageDeviceTime"
- // "firebaseEventParameterNotificationMessageId"
- // "firebaseEventParameterNotificationMessageName"
- // "firebaseEventParameterNotificationMessageTime"
- // "firebaseEventParameterNotificationTopic"
- // "firebaseEventParameterPreviousAppVersion"
- // "firebaseEventParameterPreviousOsVersion"
- // "firebaseEventParameterPrice"
- // "firebaseEventParameterProductId"
- // "firebaseEventParameterQuantity"
- // "firebaseEventParameterValue"
- // "formClasses"
- // "formElement"
- // "formId"
- // "formTarget"
- // "formText"
- // "formUrl"
- // "historySource"
- // "htmlId"
- // "language"
- // "newHistoryFragment"
- // "newHistoryState"
- // "oldHistoryFragment"
- // "oldHistoryState"
- // "osVersion"
- // "pageHostname"
- // "pagePath"
- // "pageUrl"
- // "platform"
- // "randomNumber"
- // "referrer"
- // "resolution"
- // "scrollDepthDirection"
- // "scrollDepthThreshold"
- // "scrollDepthUnits"
- // "sdkVersion"
- // "videoCurrentTime"
- // "videoDuration"
- // "videoPercent"
- // "videoProvider"
- // "videoStatus"
- // "videoTitle"
- // "videoUrl"
- // "videoVisible"
- func (c *AccountsContainersWorkspacesBuiltInVariablesRevertCall) Type(type_ string) *AccountsContainersWorkspacesBuiltInVariablesRevertCall {
- c.urlParams_.Set("type", type_)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesBuiltInVariablesRevertCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesBuiltInVariablesRevertCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesBuiltInVariablesRevertCall) Context(ctx context.Context) *AccountsContainersWorkspacesBuiltInVariablesRevertCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesBuiltInVariablesRevertCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesBuiltInVariablesRevertCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}/built_in_variables:revert")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.built_in_variables.revert" call.
- // Exactly one of *RevertBuiltInVariableResponse or error will be
- // non-nil. Any non-2xx status code is an error. Response headers are in
- // either *RevertBuiltInVariableResponse.ServerResponse.Header or (if a
- // response was returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesBuiltInVariablesRevertCall) Do(opts ...googleapi.CallOption) (*RevertBuiltInVariableResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &RevertBuiltInVariableResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Reverts changes to a GTM Built-In Variables in a GTM Workspace.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.built_in_variables.revert",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM BuiltInVariable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/built_in_variables",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "type": {
- // "description": "The type of built-in variable to revert.",
- // "enum": [
- // "advertiserId",
- // "advertisingTrackingEnabled",
- // "ampBrowserLanguage",
- // "ampCanonicalHost",
- // "ampCanonicalPath",
- // "ampCanonicalUrl",
- // "ampClientId",
- // "ampClientMaxScrollX",
- // "ampClientMaxScrollY",
- // "ampClientScreenHeight",
- // "ampClientScreenWidth",
- // "ampClientScrollX",
- // "ampClientScrollY",
- // "ampClientTimestamp",
- // "ampClientTimezone",
- // "ampGtmEvent",
- // "ampPageDownloadTime",
- // "ampPageLoadTime",
- // "ampPageViewId",
- // "ampReferrer",
- // "ampTitle",
- // "ampTotalEngagedTime",
- // "appId",
- // "appName",
- // "appVersionCode",
- // "appVersionName",
- // "builtInVariableTypeUnspecified",
- // "clickClasses",
- // "clickElement",
- // "clickId",
- // "clickTarget",
- // "clickText",
- // "clickUrl",
- // "containerId",
- // "containerVersion",
- // "debugMode",
- // "deviceName",
- // "elementVisibilityFirstTime",
- // "elementVisibilityRatio",
- // "elementVisibilityRecentTime",
- // "elementVisibilityTime",
- // "environmentName",
- // "errorLine",
- // "errorMessage",
- // "errorUrl",
- // "event",
- // "eventName",
- // "firebaseEventParameterCampaign",
- // "firebaseEventParameterCampaignAclid",
- // "firebaseEventParameterCampaignAnid",
- // "firebaseEventParameterCampaignClickTimestamp",
- // "firebaseEventParameterCampaignContent",
- // "firebaseEventParameterCampaignCp1",
- // "firebaseEventParameterCampaignGclid",
- // "firebaseEventParameterCampaignSource",
- // "firebaseEventParameterCampaignTerm",
- // "firebaseEventParameterCurrency",
- // "firebaseEventParameterDynamicLinkAcceptTime",
- // "firebaseEventParameterDynamicLinkLinkid",
- // "firebaseEventParameterNotificationMessageDeviceTime",
- // "firebaseEventParameterNotificationMessageId",
- // "firebaseEventParameterNotificationMessageName",
- // "firebaseEventParameterNotificationMessageTime",
- // "firebaseEventParameterNotificationTopic",
- // "firebaseEventParameterPreviousAppVersion",
- // "firebaseEventParameterPreviousOsVersion",
- // "firebaseEventParameterPrice",
- // "firebaseEventParameterProductId",
- // "firebaseEventParameterQuantity",
- // "firebaseEventParameterValue",
- // "formClasses",
- // "formElement",
- // "formId",
- // "formTarget",
- // "formText",
- // "formUrl",
- // "historySource",
- // "htmlId",
- // "language",
- // "newHistoryFragment",
- // "newHistoryState",
- // "oldHistoryFragment",
- // "oldHistoryState",
- // "osVersion",
- // "pageHostname",
- // "pagePath",
- // "pageUrl",
- // "platform",
- // "randomNumber",
- // "referrer",
- // "resolution",
- // "scrollDepthDirection",
- // "scrollDepthThreshold",
- // "scrollDepthUnits",
- // "sdkVersion",
- // "videoCurrentTime",
- // "videoDuration",
- // "videoPercent",
- // "videoProvider",
- // "videoStatus",
- // "videoTitle",
- // "videoUrl",
- // "videoVisible"
- // ],
- // "enumDescriptions": [
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // "",
- // ""
- // ],
- // "location": "query",
- // "type": "string"
- // }
- // },
- // "path": "{+path}/built_in_variables:revert",
- // "response": {
- // "$ref": "RevertBuiltInVariableResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.folders.create":
-
- type AccountsContainersWorkspacesFoldersCreateCall struct {
- s *Service
- parent string
- folder *Folder
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a GTM Folder.
- func (r *AccountsContainersWorkspacesFoldersService) Create(parent string, folder *Folder) *AccountsContainersWorkspacesFoldersCreateCall {
- c := &AccountsContainersWorkspacesFoldersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- c.folder = folder
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesFoldersCreateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesFoldersCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesFoldersCreateCall) Context(ctx context.Context) *AccountsContainersWorkspacesFoldersCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesFoldersCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesFoldersCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.folder)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/folders")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.folders.create" call.
- // Exactly one of *Folder or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Folder.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *AccountsContainersWorkspacesFoldersCreateCall) Do(opts ...googleapi.CallOption) (*Folder, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Folder{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a GTM Folder.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.folders.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/folders",
- // "request": {
- // "$ref": "Folder"
- // },
- // "response": {
- // "$ref": "Folder"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.folders.delete":
-
- type AccountsContainersWorkspacesFoldersDeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes a GTM Folder.
- func (r *AccountsContainersWorkspacesFoldersService) Delete(path string) *AccountsContainersWorkspacesFoldersDeleteCall {
- c := &AccountsContainersWorkspacesFoldersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesFoldersDeleteCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesFoldersDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesFoldersDeleteCall) Context(ctx context.Context) *AccountsContainersWorkspacesFoldersDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesFoldersDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesFoldersDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.folders.delete" call.
- func (c *AccountsContainersWorkspacesFoldersDeleteCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Deletes a GTM Folder.",
- // "httpMethod": "DELETE",
- // "id": "tagmanager.accounts.containers.workspaces.folders.delete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.folders.entities":
-
- type AccountsContainersWorkspacesFoldersEntitiesCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Entities: List all entities in a GTM Folder.
- func (r *AccountsContainersWorkspacesFoldersService) Entities(path string) *AccountsContainersWorkspacesFoldersEntitiesCall {
- c := &AccountsContainersWorkspacesFoldersEntitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsContainersWorkspacesFoldersEntitiesCall) PageToken(pageToken string) *AccountsContainersWorkspacesFoldersEntitiesCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesFoldersEntitiesCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesFoldersEntitiesCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesFoldersEntitiesCall) Context(ctx context.Context) *AccountsContainersWorkspacesFoldersEntitiesCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesFoldersEntitiesCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesFoldersEntitiesCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:entities")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.folders.entities" call.
- // Exactly one of *FolderEntities or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *FolderEntities.ServerResponse.Header or (if a response was returned
- // at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesFoldersEntitiesCall) Do(opts ...googleapi.CallOption) (*FolderEntities, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &FolderEntities{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "List all entities in a GTM Folder.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.folders.entities",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:entities",
- // "response": {
- // "$ref": "FolderEntities"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsContainersWorkspacesFoldersEntitiesCall) Pages(ctx context.Context, f func(*FolderEntities) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.containers.workspaces.folders.get":
-
- type AccountsContainersWorkspacesFoldersGetCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a GTM Folder.
- func (r *AccountsContainersWorkspacesFoldersService) Get(path string) *AccountsContainersWorkspacesFoldersGetCall {
- c := &AccountsContainersWorkspacesFoldersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesFoldersGetCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesFoldersGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesFoldersGetCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesFoldersGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesFoldersGetCall) Context(ctx context.Context) *AccountsContainersWorkspacesFoldersGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesFoldersGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesFoldersGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.folders.get" call.
- // Exactly one of *Folder or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Folder.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *AccountsContainersWorkspacesFoldersGetCall) Do(opts ...googleapi.CallOption) (*Folder, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Folder{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a GTM Folder.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.folders.get",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "response": {
- // "$ref": "Folder"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.folders.list":
-
- type AccountsContainersWorkspacesFoldersListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists all GTM Folders of a Container.
- func (r *AccountsContainersWorkspacesFoldersService) List(parent string) *AccountsContainersWorkspacesFoldersListCall {
- c := &AccountsContainersWorkspacesFoldersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsContainersWorkspacesFoldersListCall) PageToken(pageToken string) *AccountsContainersWorkspacesFoldersListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesFoldersListCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesFoldersListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesFoldersListCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesFoldersListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesFoldersListCall) Context(ctx context.Context) *AccountsContainersWorkspacesFoldersListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesFoldersListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesFoldersListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/folders")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.folders.list" call.
- // Exactly one of *ListFoldersResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListFoldersResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesFoldersListCall) Do(opts ...googleapi.CallOption) (*ListFoldersResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListFoldersResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists all GTM Folders of a Container.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.folders.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/folders",
- // "response": {
- // "$ref": "ListFoldersResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsContainersWorkspacesFoldersListCall) Pages(ctx context.Context, f func(*ListFoldersResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.containers.workspaces.folders.move_entities_to_folder":
-
- type AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall struct {
- s *Service
- path string
- folder *Folder
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // MoveEntitiesToFolder: Moves entities to a GTM Folder.
- func (r *AccountsContainersWorkspacesFoldersService) MoveEntitiesToFolder(path string, folder *Folder) *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall {
- c := &AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.folder = folder
- return c
- }
-
- // TagId sets the optional parameter "tagId": The tags to be moved to
- // the folder.
- func (c *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall) TagId(tagId ...string) *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall {
- c.urlParams_.SetMulti("tagId", append([]string{}, tagId...))
- return c
- }
-
- // TriggerId sets the optional parameter "triggerId": The triggers to be
- // moved to the folder.
- func (c *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall) TriggerId(triggerId ...string) *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall {
- c.urlParams_.SetMulti("triggerId", append([]string{}, triggerId...))
- return c
- }
-
- // VariableId sets the optional parameter "variableId": The variables to
- // be moved to the folder.
- func (c *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall) VariableId(variableId ...string) *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall {
- c.urlParams_.SetMulti("variableId", append([]string{}, variableId...))
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall) Context(ctx context.Context) *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.folder)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:move_entities_to_folder")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.folders.move_entities_to_folder" call.
- func (c *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Moves entities to a GTM Folder.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.folders.move_entities_to_folder",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "tagId": {
- // "description": "The tags to be moved to the folder.",
- // "location": "query",
- // "repeated": true,
- // "type": "string"
- // },
- // "triggerId": {
- // "description": "The triggers to be moved to the folder.",
- // "location": "query",
- // "repeated": true,
- // "type": "string"
- // },
- // "variableId": {
- // "description": "The variables to be moved to the folder.",
- // "location": "query",
- // "repeated": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:move_entities_to_folder",
- // "request": {
- // "$ref": "Folder"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.folders.revert":
-
- type AccountsContainersWorkspacesFoldersRevertCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Revert: Reverts changes to a GTM Folder in a GTM Workspace.
- func (r *AccountsContainersWorkspacesFoldersService) Revert(path string) *AccountsContainersWorkspacesFoldersRevertCall {
- c := &AccountsContainersWorkspacesFoldersRevertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the tag in storage.
- func (c *AccountsContainersWorkspacesFoldersRevertCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesFoldersRevertCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesFoldersRevertCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesFoldersRevertCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesFoldersRevertCall) Context(ctx context.Context) *AccountsContainersWorkspacesFoldersRevertCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesFoldersRevertCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesFoldersRevertCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:revert")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.folders.revert" call.
- // Exactly one of *RevertFolderResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *RevertFolderResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesFoldersRevertCall) Do(opts ...googleapi.CallOption) (*RevertFolderResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &RevertFolderResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Reverts changes to a GTM Folder in a GTM Workspace.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.folders.revert",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the tag in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:revert",
- // "response": {
- // "$ref": "RevertFolderResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.folders.update":
-
- type AccountsContainersWorkspacesFoldersUpdateCall struct {
- s *Service
- path string
- folder *Folder
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates a GTM Folder.
- func (r *AccountsContainersWorkspacesFoldersService) Update(path string, folder *Folder) *AccountsContainersWorkspacesFoldersUpdateCall {
- c := &AccountsContainersWorkspacesFoldersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.folder = folder
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the folder in storage.
- func (c *AccountsContainersWorkspacesFoldersUpdateCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesFoldersUpdateCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesFoldersUpdateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesFoldersUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesFoldersUpdateCall) Context(ctx context.Context) *AccountsContainersWorkspacesFoldersUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesFoldersUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesFoldersUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.folder)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.folders.update" call.
- // Exactly one of *Folder or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Folder.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *AccountsContainersWorkspacesFoldersUpdateCall) Do(opts ...googleapi.CallOption) (*Folder, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Folder{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates a GTM Folder.",
- // "httpMethod": "PUT",
- // "id": "tagmanager.accounts.containers.workspaces.folders.update",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the folder in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "request": {
- // "$ref": "Folder"
- // },
- // "response": {
- // "$ref": "Folder"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.tags.create":
-
- type AccountsContainersWorkspacesTagsCreateCall struct {
- s *Service
- parent string
- tag *Tag
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a GTM Tag.
- func (r *AccountsContainersWorkspacesTagsService) Create(parent string, tag *Tag) *AccountsContainersWorkspacesTagsCreateCall {
- c := &AccountsContainersWorkspacesTagsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- c.tag = tag
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTagsCreateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTagsCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTagsCreateCall) Context(ctx context.Context) *AccountsContainersWorkspacesTagsCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTagsCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTagsCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.tag)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/tags")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.tags.create" call.
- // Exactly one of *Tag or error will be non-nil. Any non-2xx status code
- // is an error. Response headers are in either
- // *Tag.ServerResponse.Header or (if a response was returned at all) in
- // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
- // whether the returned error was because http.StatusNotModified was
- // returned.
- func (c *AccountsContainersWorkspacesTagsCreateCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Tag{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a GTM Tag.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.tags.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/tags",
- // "request": {
- // "$ref": "Tag"
- // },
- // "response": {
- // "$ref": "Tag"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.tags.delete":
-
- type AccountsContainersWorkspacesTagsDeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes a GTM Tag.
- func (r *AccountsContainersWorkspacesTagsService) Delete(path string) *AccountsContainersWorkspacesTagsDeleteCall {
- c := &AccountsContainersWorkspacesTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTagsDeleteCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTagsDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTagsDeleteCall) Context(ctx context.Context) *AccountsContainersWorkspacesTagsDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTagsDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.tags.delete" call.
- func (c *AccountsContainersWorkspacesTagsDeleteCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Deletes a GTM Tag.",
- // "httpMethod": "DELETE",
- // "id": "tagmanager.accounts.containers.workspaces.tags.delete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Tag's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.tags.get":
-
- type AccountsContainersWorkspacesTagsGetCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a GTM Tag.
- func (r *AccountsContainersWorkspacesTagsService) Get(path string) *AccountsContainersWorkspacesTagsGetCall {
- c := &AccountsContainersWorkspacesTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTagsGetCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTagsGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesTagsGetCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesTagsGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTagsGetCall) Context(ctx context.Context) *AccountsContainersWorkspacesTagsGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTagsGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTagsGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.tags.get" call.
- // Exactly one of *Tag or error will be non-nil. Any non-2xx status code
- // is an error. Response headers are in either
- // *Tag.ServerResponse.Header or (if a response was returned at all) in
- // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
- // whether the returned error was because http.StatusNotModified was
- // returned.
- func (c *AccountsContainersWorkspacesTagsGetCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Tag{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a GTM Tag.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.tags.get",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Tag's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "response": {
- // "$ref": "Tag"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.tags.list":
-
- type AccountsContainersWorkspacesTagsListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists all GTM Tags of a Container.
- func (r *AccountsContainersWorkspacesTagsService) List(parent string) *AccountsContainersWorkspacesTagsListCall {
- c := &AccountsContainersWorkspacesTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsContainersWorkspacesTagsListCall) PageToken(pageToken string) *AccountsContainersWorkspacesTagsListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTagsListCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTagsListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesTagsListCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesTagsListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTagsListCall) Context(ctx context.Context) *AccountsContainersWorkspacesTagsListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTagsListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTagsListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/tags")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.tags.list" call.
- // Exactly one of *ListTagsResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListTagsResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesTagsListCall) Do(opts ...googleapi.CallOption) (*ListTagsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListTagsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists all GTM Tags of a Container.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.tags.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/tags",
- // "response": {
- // "$ref": "ListTagsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsContainersWorkspacesTagsListCall) Pages(ctx context.Context, f func(*ListTagsResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.containers.workspaces.tags.revert":
-
- type AccountsContainersWorkspacesTagsRevertCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Revert: Reverts changes to a GTM Tag in a GTM Workspace.
- func (r *AccountsContainersWorkspacesTagsService) Revert(path string) *AccountsContainersWorkspacesTagsRevertCall {
- c := &AccountsContainersWorkspacesTagsRevertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of thetag in storage.
- func (c *AccountsContainersWorkspacesTagsRevertCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesTagsRevertCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTagsRevertCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTagsRevertCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTagsRevertCall) Context(ctx context.Context) *AccountsContainersWorkspacesTagsRevertCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTagsRevertCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTagsRevertCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:revert")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.tags.revert" call.
- // Exactly one of *RevertTagResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *RevertTagResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesTagsRevertCall) Do(opts ...googleapi.CallOption) (*RevertTagResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &RevertTagResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Reverts changes to a GTM Tag in a GTM Workspace.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.tags.revert",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of thetag in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Tag's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:revert",
- // "response": {
- // "$ref": "RevertTagResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.tags.update":
-
- type AccountsContainersWorkspacesTagsUpdateCall struct {
- s *Service
- path string
- tag *Tag
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates a GTM Tag.
- func (r *AccountsContainersWorkspacesTagsService) Update(path string, tag *Tag) *AccountsContainersWorkspacesTagsUpdateCall {
- c := &AccountsContainersWorkspacesTagsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.tag = tag
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the tag in storage.
- func (c *AccountsContainersWorkspacesTagsUpdateCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesTagsUpdateCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTagsUpdateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTagsUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTagsUpdateCall) Context(ctx context.Context) *AccountsContainersWorkspacesTagsUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTagsUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.tag)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.tags.update" call.
- // Exactly one of *Tag or error will be non-nil. Any non-2xx status code
- // is an error. Response headers are in either
- // *Tag.ServerResponse.Header or (if a response was returned at all) in
- // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
- // whether the returned error was because http.StatusNotModified was
- // returned.
- func (c *AccountsContainersWorkspacesTagsUpdateCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Tag{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates a GTM Tag.",
- // "httpMethod": "PUT",
- // "id": "tagmanager.accounts.containers.workspaces.tags.update",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the tag in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Tag's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "request": {
- // "$ref": "Tag"
- // },
- // "response": {
- // "$ref": "Tag"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.triggers.create":
-
- type AccountsContainersWorkspacesTriggersCreateCall struct {
- s *Service
- parent string
- trigger *Trigger
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a GTM Trigger.
- func (r *AccountsContainersWorkspacesTriggersService) Create(parent string, trigger *Trigger) *AccountsContainersWorkspacesTriggersCreateCall {
- c := &AccountsContainersWorkspacesTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- c.trigger = trigger
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTriggersCreateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTriggersCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTriggersCreateCall) Context(ctx context.Context) *AccountsContainersWorkspacesTriggersCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTriggersCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTriggersCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.trigger)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/triggers")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.triggers.create" call.
- // Exactly one of *Trigger or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Trigger.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *AccountsContainersWorkspacesTriggersCreateCall) Do(opts ...googleapi.CallOption) (*Trigger, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Trigger{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a GTM Trigger.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.triggers.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM Workspaces's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/triggers",
- // "request": {
- // "$ref": "Trigger"
- // },
- // "response": {
- // "$ref": "Trigger"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.triggers.delete":
-
- type AccountsContainersWorkspacesTriggersDeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes a GTM Trigger.
- func (r *AccountsContainersWorkspacesTriggersService) Delete(path string) *AccountsContainersWorkspacesTriggersDeleteCall {
- c := &AccountsContainersWorkspacesTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTriggersDeleteCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTriggersDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTriggersDeleteCall) Context(ctx context.Context) *AccountsContainersWorkspacesTriggersDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTriggersDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTriggersDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.triggers.delete" call.
- func (c *AccountsContainersWorkspacesTriggersDeleteCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Deletes a GTM Trigger.",
- // "httpMethod": "DELETE",
- // "id": "tagmanager.accounts.containers.workspaces.triggers.delete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Trigger's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.triggers.get":
-
- type AccountsContainersWorkspacesTriggersGetCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a GTM Trigger.
- func (r *AccountsContainersWorkspacesTriggersService) Get(path string) *AccountsContainersWorkspacesTriggersGetCall {
- c := &AccountsContainersWorkspacesTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTriggersGetCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTriggersGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesTriggersGetCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesTriggersGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTriggersGetCall) Context(ctx context.Context) *AccountsContainersWorkspacesTriggersGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTriggersGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTriggersGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.triggers.get" call.
- // Exactly one of *Trigger or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Trigger.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *AccountsContainersWorkspacesTriggersGetCall) Do(opts ...googleapi.CallOption) (*Trigger, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Trigger{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a GTM Trigger.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.triggers.get",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Trigger's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "response": {
- // "$ref": "Trigger"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.triggers.list":
-
- type AccountsContainersWorkspacesTriggersListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists all GTM Triggers of a Container.
- func (r *AccountsContainersWorkspacesTriggersService) List(parent string) *AccountsContainersWorkspacesTriggersListCall {
- c := &AccountsContainersWorkspacesTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsContainersWorkspacesTriggersListCall) PageToken(pageToken string) *AccountsContainersWorkspacesTriggersListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTriggersListCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTriggersListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesTriggersListCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesTriggersListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTriggersListCall) Context(ctx context.Context) *AccountsContainersWorkspacesTriggersListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTriggersListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTriggersListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/triggers")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.triggers.list" call.
- // Exactly one of *ListTriggersResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListTriggersResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesTriggersListCall) Do(opts ...googleapi.CallOption) (*ListTriggersResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListTriggersResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists all GTM Triggers of a Container.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.triggers.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "GTM Workspaces's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/triggers",
- // "response": {
- // "$ref": "ListTriggersResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsContainersWorkspacesTriggersListCall) Pages(ctx context.Context, f func(*ListTriggersResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.containers.workspaces.triggers.revert":
-
- type AccountsContainersWorkspacesTriggersRevertCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Revert: Reverts changes to a GTM Trigger in a GTM Workspace.
- func (r *AccountsContainersWorkspacesTriggersService) Revert(path string) *AccountsContainersWorkspacesTriggersRevertCall {
- c := &AccountsContainersWorkspacesTriggersRevertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the trigger in
- // storage.
- func (c *AccountsContainersWorkspacesTriggersRevertCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesTriggersRevertCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTriggersRevertCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTriggersRevertCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTriggersRevertCall) Context(ctx context.Context) *AccountsContainersWorkspacesTriggersRevertCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTriggersRevertCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTriggersRevertCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:revert")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.triggers.revert" call.
- // Exactly one of *RevertTriggerResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *RevertTriggerResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesTriggersRevertCall) Do(opts ...googleapi.CallOption) (*RevertTriggerResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &RevertTriggerResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Reverts changes to a GTM Trigger in a GTM Workspace.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.triggers.revert",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the trigger in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Trigger's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:revert",
- // "response": {
- // "$ref": "RevertTriggerResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.triggers.update":
-
- type AccountsContainersWorkspacesTriggersUpdateCall struct {
- s *Service
- path string
- trigger *Trigger
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates a GTM Trigger.
- func (r *AccountsContainersWorkspacesTriggersService) Update(path string, trigger *Trigger) *AccountsContainersWorkspacesTriggersUpdateCall {
- c := &AccountsContainersWorkspacesTriggersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.trigger = trigger
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the trigger in
- // storage.
- func (c *AccountsContainersWorkspacesTriggersUpdateCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesTriggersUpdateCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesTriggersUpdateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesTriggersUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesTriggersUpdateCall) Context(ctx context.Context) *AccountsContainersWorkspacesTriggersUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesTriggersUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesTriggersUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.trigger)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.triggers.update" call.
- // Exactly one of *Trigger or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Trigger.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *AccountsContainersWorkspacesTriggersUpdateCall) Do(opts ...googleapi.CallOption) (*Trigger, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Trigger{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates a GTM Trigger.",
- // "httpMethod": "PUT",
- // "id": "tagmanager.accounts.containers.workspaces.triggers.update",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the trigger in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Trigger's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "request": {
- // "$ref": "Trigger"
- // },
- // "response": {
- // "$ref": "Trigger"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.variables.create":
-
- type AccountsContainersWorkspacesVariablesCreateCall struct {
- s *Service
- parent string
- variable *Variable
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a GTM Variable.
- func (r *AccountsContainersWorkspacesVariablesService) Create(parent string, variable *Variable) *AccountsContainersWorkspacesVariablesCreateCall {
- c := &AccountsContainersWorkspacesVariablesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- c.variable = variable
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesVariablesCreateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesVariablesCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesVariablesCreateCall) Context(ctx context.Context) *AccountsContainersWorkspacesVariablesCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesVariablesCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesVariablesCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.variable)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/variables")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.variables.create" call.
- // Exactly one of *Variable or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Variable.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesVariablesCreateCall) Do(opts ...googleapi.CallOption) (*Variable, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Variable{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a GTM Variable.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.variables.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/variables",
- // "request": {
- // "$ref": "Variable"
- // },
- // "response": {
- // "$ref": "Variable"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.variables.delete":
-
- type AccountsContainersWorkspacesVariablesDeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes a GTM Variable.
- func (r *AccountsContainersWorkspacesVariablesService) Delete(path string) *AccountsContainersWorkspacesVariablesDeleteCall {
- c := &AccountsContainersWorkspacesVariablesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesVariablesDeleteCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesVariablesDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesVariablesDeleteCall) Context(ctx context.Context) *AccountsContainersWorkspacesVariablesDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesVariablesDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesVariablesDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.variables.delete" call.
- func (c *AccountsContainersWorkspacesVariablesDeleteCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Deletes a GTM Variable.",
- // "httpMethod": "DELETE",
- // "id": "tagmanager.accounts.containers.workspaces.variables.delete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Variable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variable_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.variables.get":
-
- type AccountsContainersWorkspacesVariablesGetCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a GTM Variable.
- func (r *AccountsContainersWorkspacesVariablesService) Get(path string) *AccountsContainersWorkspacesVariablesGetCall {
- c := &AccountsContainersWorkspacesVariablesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesVariablesGetCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesVariablesGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesVariablesGetCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesVariablesGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesVariablesGetCall) Context(ctx context.Context) *AccountsContainersWorkspacesVariablesGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesVariablesGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesVariablesGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.variables.get" call.
- // Exactly one of *Variable or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Variable.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesVariablesGetCall) Do(opts ...googleapi.CallOption) (*Variable, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Variable{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a GTM Variable.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.variables.get",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Variable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variable_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "response": {
- // "$ref": "Variable"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.variables.list":
-
- type AccountsContainersWorkspacesVariablesListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists all GTM Variables of a Container.
- func (r *AccountsContainersWorkspacesVariablesService) List(parent string) *AccountsContainersWorkspacesVariablesListCall {
- c := &AccountsContainersWorkspacesVariablesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsContainersWorkspacesVariablesListCall) PageToken(pageToken string) *AccountsContainersWorkspacesVariablesListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesVariablesListCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesVariablesListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesVariablesListCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesVariablesListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesVariablesListCall) Context(ctx context.Context) *AccountsContainersWorkspacesVariablesListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesVariablesListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesVariablesListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/variables")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.variables.list" call.
- // Exactly one of *ListVariablesResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListVariablesResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesVariablesListCall) Do(opts ...googleapi.CallOption) (*ListVariablesResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListVariablesResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists all GTM Variables of a Container.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.variables.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/variables",
- // "response": {
- // "$ref": "ListVariablesResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsContainersWorkspacesVariablesListCall) Pages(ctx context.Context, f func(*ListVariablesResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.containers.workspaces.variables.revert":
-
- type AccountsContainersWorkspacesVariablesRevertCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Revert: Reverts changes to a GTM Variable in a GTM Workspace.
- func (r *AccountsContainersWorkspacesVariablesService) Revert(path string) *AccountsContainersWorkspacesVariablesRevertCall {
- c := &AccountsContainersWorkspacesVariablesRevertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the variable in
- // storage.
- func (c *AccountsContainersWorkspacesVariablesRevertCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesVariablesRevertCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesVariablesRevertCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesVariablesRevertCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesVariablesRevertCall) Context(ctx context.Context) *AccountsContainersWorkspacesVariablesRevertCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesVariablesRevertCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesVariablesRevertCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:revert")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.variables.revert" call.
- // Exactly one of *RevertVariableResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *RevertVariableResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesVariablesRevertCall) Do(opts ...googleapi.CallOption) (*RevertVariableResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &RevertVariableResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Reverts changes to a GTM Variable in a GTM Workspace.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.variables.revert",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the variable in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Variable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variable_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:revert",
- // "response": {
- // "$ref": "RevertVariableResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.variables.update":
-
- type AccountsContainersWorkspacesVariablesUpdateCall struct {
- s *Service
- path string
- variable *Variable
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates a GTM Variable.
- func (r *AccountsContainersWorkspacesVariablesService) Update(path string, variable *Variable) *AccountsContainersWorkspacesVariablesUpdateCall {
- c := &AccountsContainersWorkspacesVariablesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.variable = variable
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the variable in
- // storage.
- func (c *AccountsContainersWorkspacesVariablesUpdateCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesVariablesUpdateCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesVariablesUpdateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesVariablesUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesVariablesUpdateCall) Context(ctx context.Context) *AccountsContainersWorkspacesVariablesUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesVariablesUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesVariablesUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.variable)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.variables.update" call.
- // Exactly one of *Variable or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Variable.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesVariablesUpdateCall) Do(opts ...googleapi.CallOption) (*Variable, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Variable{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates a GTM Variable.",
- // "httpMethod": "PUT",
- // "id": "tagmanager.accounts.containers.workspaces.variables.update",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the variable in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Variable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variable_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "request": {
- // "$ref": "Variable"
- // },
- // "response": {
- // "$ref": "Variable"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.zones.create":
-
- type AccountsContainersWorkspacesZonesCreateCall struct {
- s *Service
- parent string
- zone *Zone
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a GTM Zone.
- func (r *AccountsContainersWorkspacesZonesService) Create(parent string, zone *Zone) *AccountsContainersWorkspacesZonesCreateCall {
- c := &AccountsContainersWorkspacesZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- c.zone = zone
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesZonesCreateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesZonesCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesZonesCreateCall) Context(ctx context.Context) *AccountsContainersWorkspacesZonesCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesZonesCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesZonesCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.zone)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/zones")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.zones.create" call.
- // Exactly one of *Zone or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Zone.ServerResponse.Header or (if a response was returned at all) in
- // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
- // whether the returned error was because http.StatusNotModified was
- // returned.
- func (c *AccountsContainersWorkspacesZonesCreateCall) Do(opts ...googleapi.CallOption) (*Zone, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Zone{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a GTM Zone.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.zones.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/zones",
- // "request": {
- // "$ref": "Zone"
- // },
- // "response": {
- // "$ref": "Zone"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.zones.delete":
-
- type AccountsContainersWorkspacesZonesDeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes a GTM Zone.
- func (r *AccountsContainersWorkspacesZonesService) Delete(path string) *AccountsContainersWorkspacesZonesDeleteCall {
- c := &AccountsContainersWorkspacesZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesZonesDeleteCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesZonesDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesZonesDeleteCall) Context(ctx context.Context) *AccountsContainersWorkspacesZonesDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesZonesDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.zones.delete" call.
- func (c *AccountsContainersWorkspacesZonesDeleteCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Deletes a GTM Zone.",
- // "httpMethod": "DELETE",
- // "id": "tagmanager.accounts.containers.workspaces.zones.delete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Zone's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.zones.get":
-
- type AccountsContainersWorkspacesZonesGetCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a GTM Zone.
- func (r *AccountsContainersWorkspacesZonesService) Get(path string) *AccountsContainersWorkspacesZonesGetCall {
- c := &AccountsContainersWorkspacesZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesZonesGetCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesZonesGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesZonesGetCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesZonesGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesZonesGetCall) Context(ctx context.Context) *AccountsContainersWorkspacesZonesGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesZonesGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesZonesGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.zones.get" call.
- // Exactly one of *Zone or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Zone.ServerResponse.Header or (if a response was returned at all) in
- // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
- // whether the returned error was because http.StatusNotModified was
- // returned.
- func (c *AccountsContainersWorkspacesZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Zone{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a GTM Zone.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.zones.get",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM Zone's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "response": {
- // "$ref": "Zone"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.zones.list":
-
- type AccountsContainersWorkspacesZonesListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists all GTM Zones of a GTM container workspace.
- func (r *AccountsContainersWorkspacesZonesService) List(parent string) *AccountsContainersWorkspacesZonesListCall {
- c := &AccountsContainersWorkspacesZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsContainersWorkspacesZonesListCall) PageToken(pageToken string) *AccountsContainersWorkspacesZonesListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesZonesListCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesZonesListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsContainersWorkspacesZonesListCall) IfNoneMatch(entityTag string) *AccountsContainersWorkspacesZonesListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesZonesListCall) Context(ctx context.Context) *AccountsContainersWorkspacesZonesListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesZonesListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesZonesListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/zones")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.zones.list" call.
- // Exactly one of *ListZonesResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListZonesResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesZonesListCall) Do(opts ...googleapi.CallOption) (*ListZonesResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListZonesResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists all GTM Zones of a GTM container workspace.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.containers.workspaces.zones.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/zones",
- // "response": {
- // "$ref": "ListZonesResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers",
- // "https://www.googleapis.com/auth/tagmanager.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsContainersWorkspacesZonesListCall) Pages(ctx context.Context, f func(*ListZonesResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.containers.workspaces.zones.revert":
-
- type AccountsContainersWorkspacesZonesRevertCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Revert: Reverts changes to a GTM Zone in a GTM Workspace.
- func (r *AccountsContainersWorkspacesZonesService) Revert(path string) *AccountsContainersWorkspacesZonesRevertCall {
- c := &AccountsContainersWorkspacesZonesRevertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the zone in storage.
- func (c *AccountsContainersWorkspacesZonesRevertCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesZonesRevertCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesZonesRevertCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesZonesRevertCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesZonesRevertCall) Context(ctx context.Context) *AccountsContainersWorkspacesZonesRevertCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesZonesRevertCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesZonesRevertCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}:revert")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.zones.revert" call.
- // Exactly one of *RevertZoneResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *RevertZoneResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsContainersWorkspacesZonesRevertCall) Do(opts ...googleapi.CallOption) (*RevertZoneResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &RevertZoneResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Reverts changes to a GTM Zone in a GTM Workspace.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.containers.workspaces.zones.revert",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the zone in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Zone's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}:revert",
- // "response": {
- // "$ref": "RevertZoneResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.containers.workspaces.zones.update":
-
- type AccountsContainersWorkspacesZonesUpdateCall struct {
- s *Service
- path string
- zone *Zone
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates a GTM Zone.
- func (r *AccountsContainersWorkspacesZonesService) Update(path string, zone *Zone) *AccountsContainersWorkspacesZonesUpdateCall {
- c := &AccountsContainersWorkspacesZonesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.zone = zone
- return c
- }
-
- // Fingerprint sets the optional parameter "fingerprint": When provided,
- // this fingerprint must match the fingerprint of the zone in storage.
- func (c *AccountsContainersWorkspacesZonesUpdateCall) Fingerprint(fingerprint string) *AccountsContainersWorkspacesZonesUpdateCall {
- c.urlParams_.Set("fingerprint", fingerprint)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsContainersWorkspacesZonesUpdateCall) Fields(s ...googleapi.Field) *AccountsContainersWorkspacesZonesUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsContainersWorkspacesZonesUpdateCall) Context(ctx context.Context) *AccountsContainersWorkspacesZonesUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsContainersWorkspacesZonesUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsContainersWorkspacesZonesUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.zone)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.containers.workspaces.zones.update" call.
- // Exactly one of *Zone or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Zone.ServerResponse.Header or (if a response was returned at all) in
- // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
- // whether the returned error was because http.StatusNotModified was
- // returned.
- func (c *AccountsContainersWorkspacesZonesUpdateCall) Do(opts ...googleapi.CallOption) (*Zone, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Zone{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates a GTM Zone.",
- // "httpMethod": "PUT",
- // "id": "tagmanager.accounts.containers.workspaces.zones.update",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "fingerprint": {
- // "description": "When provided, this fingerprint must match the fingerprint of the zone in storage.",
- // "location": "query",
- // "type": "string"
- // },
- // "path": {
- // "description": "GTM Zone's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "request": {
- // "$ref": "Zone"
- // },
- // "response": {
- // "$ref": "Zone"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.edit.containers"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.user_permissions.create":
-
- type AccountsUserPermissionsCreateCall struct {
- s *Service
- parent string
- userpermission *UserPermission
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a user's Account & Container access.
- func (r *AccountsUserPermissionsService) Create(parent string, userpermission *UserPermission) *AccountsUserPermissionsCreateCall {
- c := &AccountsUserPermissionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- c.userpermission = userpermission
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsUserPermissionsCreateCall) Fields(s ...googleapi.Field) *AccountsUserPermissionsCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsUserPermissionsCreateCall) Context(ctx context.Context) *AccountsUserPermissionsCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsUserPermissionsCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsUserPermissionsCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.userpermission)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/user_permissions")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.user_permissions.create" call.
- // Exactly one of *UserPermission or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *UserPermission.ServerResponse.Header or (if a response was returned
- // at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsUserPermissionsCreateCall) Do(opts ...googleapi.CallOption) (*UserPermission, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &UserPermission{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a user's Account \u0026 Container access.",
- // "httpMethod": "POST",
- // "id": "tagmanager.accounts.user_permissions.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "GTM Account's API relative path. Example: accounts/{account_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/user_permissions",
- // "request": {
- // "$ref": "UserPermission"
- // },
- // "response": {
- // "$ref": "UserPermission"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.manage.users"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.user_permissions.delete":
-
- type AccountsUserPermissionsDeleteCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Removes a user from the account, revoking access to it and
- // all of its containers.
- func (r *AccountsUserPermissionsService) Delete(path string) *AccountsUserPermissionsDeleteCall {
- c := &AccountsUserPermissionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsUserPermissionsDeleteCall) Fields(s ...googleapi.Field) *AccountsUserPermissionsDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsUserPermissionsDeleteCall) Context(ctx context.Context) *AccountsUserPermissionsDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsUserPermissionsDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsUserPermissionsDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.user_permissions.delete" call.
- func (c *AccountsUserPermissionsDeleteCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Removes a user from the account, revoking access to it and all of its containers.",
- // "httpMethod": "DELETE",
- // "id": "tagmanager.accounts.user_permissions.delete",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM UserPermission's API relative path. Example: accounts/{account_id}/user_permissions/{user_permission_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.manage.users"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.user_permissions.get":
-
- type AccountsUserPermissionsGetCall struct {
- s *Service
- path string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a user's Account & Container access.
- func (r *AccountsUserPermissionsService) Get(path string) *AccountsUserPermissionsGetCall {
- c := &AccountsUserPermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsUserPermissionsGetCall) Fields(s ...googleapi.Field) *AccountsUserPermissionsGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsUserPermissionsGetCall) IfNoneMatch(entityTag string) *AccountsUserPermissionsGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsUserPermissionsGetCall) Context(ctx context.Context) *AccountsUserPermissionsGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsUserPermissionsGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsUserPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.user_permissions.get" call.
- // Exactly one of *UserPermission or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *UserPermission.ServerResponse.Header or (if a response was returned
- // at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsUserPermissionsGetCall) Do(opts ...googleapi.CallOption) (*UserPermission, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &UserPermission{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a user's Account \u0026 Container access.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.user_permissions.get",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM UserPermission's API relative path. Example: accounts/{account_id}/user_permissions/{user_permission_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "response": {
- // "$ref": "UserPermission"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.manage.users"
- // ]
- // }
-
- }
-
- // method id "tagmanager.accounts.user_permissions.list":
-
- type AccountsUserPermissionsListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: List all users that have access to the account along with
- // Account and Container user access granted to each of them.
- func (r *AccountsUserPermissionsService) List(parent string) *AccountsUserPermissionsListCall {
- c := &AccountsUserPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": Continuation token
- // for fetching the next page of results.
- func (c *AccountsUserPermissionsListCall) PageToken(pageToken string) *AccountsUserPermissionsListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsUserPermissionsListCall) Fields(s ...googleapi.Field) *AccountsUserPermissionsListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *AccountsUserPermissionsListCall) IfNoneMatch(entityTag string) *AccountsUserPermissionsListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsUserPermissionsListCall) Context(ctx context.Context) *AccountsUserPermissionsListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsUserPermissionsListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsUserPermissionsListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+parent}/user_permissions")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.user_permissions.list" call.
- // Exactly one of *ListUserPermissionsResponse or error will be non-nil.
- // Any non-2xx status code is an error. Response headers are in either
- // *ListUserPermissionsResponse.ServerResponse.Header or (if a response
- // was returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsUserPermissionsListCall) Do(opts ...googleapi.CallOption) (*ListUserPermissionsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListUserPermissionsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "List all users that have access to the account along with Account and Container user access granted to each of them.",
- // "httpMethod": "GET",
- // "id": "tagmanager.accounts.user_permissions.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "pageToken": {
- // "description": "Continuation token for fetching the next page of results.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "GTM Accounts's API relative path. Example: accounts/{account_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+parent}/user_permissions",
- // "response": {
- // "$ref": "ListUserPermissionsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.manage.users"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *AccountsUserPermissionsListCall) Pages(ctx context.Context, f func(*ListUserPermissionsResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "tagmanager.accounts.user_permissions.update":
-
- type AccountsUserPermissionsUpdateCall struct {
- s *Service
- path string
- userpermission *UserPermission
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates a user's Account & Container access.
- func (r *AccountsUserPermissionsService) Update(path string, userpermission *UserPermission) *AccountsUserPermissionsUpdateCall {
- c := &AccountsUserPermissionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.path = path
- c.userpermission = userpermission
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *AccountsUserPermissionsUpdateCall) Fields(s ...googleapi.Field) *AccountsUserPermissionsUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *AccountsUserPermissionsUpdateCall) Context(ctx context.Context) *AccountsUserPermissionsUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *AccountsUserPermissionsUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *AccountsUserPermissionsUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.userpermission)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "{+path}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "path": c.path,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "tagmanager.accounts.user_permissions.update" call.
- // Exactly one of *UserPermission or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *UserPermission.ServerResponse.Header or (if a response was returned
- // at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *AccountsUserPermissionsUpdateCall) Do(opts ...googleapi.CallOption) (*UserPermission, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &UserPermission{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates a user's Account \u0026 Container access.",
- // "httpMethod": "PUT",
- // "id": "tagmanager.accounts.user_permissions.update",
- // "parameterOrder": [
- // "path"
- // ],
- // "parameters": {
- // "path": {
- // "description": "GTM UserPermission's API relative path. Example: accounts/{account_id}/user_permissions/{user_permission_id}",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "{+path}",
- // "request": {
- // "$ref": "UserPermission"
- // },
- // "response": {
- // "$ref": "UserPermission"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/tagmanager.manage.users"
- // ]
- // }
-
- }
|