client.go 221 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793
  1. // This file is auto-generated, don't edit it. Thanks.
  2. package client
  3. import (
  4. openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
  5. openapiutil "github.com/alibabacloud-go/darabonba-openapi/v2/utils"
  6. "github.com/alibabacloud-go/tea/dara"
  7. )
  8. type Client struct {
  9. openapi.Client
  10. DisableSDKError *bool
  11. EnableValidate *bool
  12. }
  13. func NewClient(config *openapiutil.Config) (*Client, error) {
  14. client := new(Client)
  15. err := client.Init(config)
  16. return client, err
  17. }
  18. func (client *Client) Init(config *openapiutil.Config) (_err error) {
  19. _err = client.Client.Init(config)
  20. if _err != nil {
  21. return _err
  22. }
  23. client.EndpointRule = dara.String("central")
  24. client.EndpointMap = map[string]*string{
  25. "ap-southeast-1": dara.String("dysmsapi.ap-southeast-1.aliyuncs.com"),
  26. "ap-southeast-5": dara.String("dysmsapi.ap-southeast-5.aliyuncs.com"),
  27. "cn-beijing": dara.String("dysmsapi-proxy.cn-beijing.aliyuncs.com"),
  28. "cn-hongkong": dara.String("dysmsapi-xman.cn-hongkong.aliyuncs.com"),
  29. "eu-central-1": dara.String("dysmsapi.eu-central-1.aliyuncs.com"),
  30. "us-east-1": dara.String("dysmsapi.us-east-1.aliyuncs.com"),
  31. }
  32. _err = client.CheckConfig(config)
  33. if _err != nil {
  34. return _err
  35. }
  36. client.Endpoint, _err = client.GetEndpoint(dara.String("dysmsapi"), client.RegionId, client.EndpointRule, client.Network, client.Suffix, client.EndpointMap, client.Endpoint)
  37. if _err != nil {
  38. return _err
  39. }
  40. return nil
  41. }
  42. func (client *Client) GetEndpoint(productId *string, regionId *string, endpointRule *string, network *string, suffix *string, endpointMap map[string]*string, endpoint *string) (_result *string, _err error) {
  43. if !dara.IsNil(endpoint) {
  44. _result = endpoint
  45. return _result, _err
  46. }
  47. if !dara.IsNil(endpointMap) && !dara.IsNil(endpointMap[dara.StringValue(regionId)]) {
  48. _result = endpointMap[dara.StringValue(regionId)]
  49. return _result, _err
  50. }
  51. _body, _err := openapiutil.GetEndpointRules(productId, regionId, endpointRule, network, suffix)
  52. if _err != nil {
  53. return _result, _err
  54. }
  55. _result = _body
  56. return _result, _err
  57. }
  58. // Summary:
  59. //
  60. // 添加验证码签名信息
  61. //
  62. // @param request - AddExtCodeSignRequest
  63. //
  64. // @param runtime - runtime options for this request RuntimeOptions
  65. //
  66. // @return AddExtCodeSignResponse
  67. func (client *Client) AddExtCodeSignWithOptions(request *AddExtCodeSignRequest, runtime *dara.RuntimeOptions) (_result *AddExtCodeSignResponse, _err error) {
  68. if dara.BoolValue(client.EnableValidate) == true {
  69. _err = request.Validate()
  70. if _err != nil {
  71. return _result, _err
  72. }
  73. }
  74. query := map[string]interface{}{}
  75. if !dara.IsNil(request.ExtCode) {
  76. query["ExtCode"] = request.ExtCode
  77. }
  78. if !dara.IsNil(request.OwnerId) {
  79. query["OwnerId"] = request.OwnerId
  80. }
  81. if !dara.IsNil(request.ResourceOwnerAccount) {
  82. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  83. }
  84. if !dara.IsNil(request.ResourceOwnerId) {
  85. query["ResourceOwnerId"] = request.ResourceOwnerId
  86. }
  87. if !dara.IsNil(request.SignName) {
  88. query["SignName"] = request.SignName
  89. }
  90. req := &openapiutil.OpenApiRequest{
  91. Query: openapiutil.Query(query),
  92. }
  93. params := &openapiutil.Params{
  94. Action: dara.String("AddExtCodeSign"),
  95. Version: dara.String("2017-05-25"),
  96. Protocol: dara.String("HTTPS"),
  97. Pathname: dara.String("/"),
  98. Method: dara.String("POST"),
  99. AuthType: dara.String("AK"),
  100. Style: dara.String("RPC"),
  101. ReqBodyType: dara.String("formData"),
  102. BodyType: dara.String("json"),
  103. }
  104. _result = &AddExtCodeSignResponse{}
  105. _body, _err := client.CallApi(params, req, runtime)
  106. if _err != nil {
  107. return _result, _err
  108. }
  109. _err = dara.Convert(_body, &_result)
  110. return _result, _err
  111. }
  112. // Summary:
  113. //
  114. // 添加验证码签名信息
  115. //
  116. // @param request - AddExtCodeSignRequest
  117. //
  118. // @return AddExtCodeSignResponse
  119. func (client *Client) AddExtCodeSign(request *AddExtCodeSignRequest) (_result *AddExtCodeSignResponse, _err error) {
  120. runtime := &dara.RuntimeOptions{}
  121. _result = &AddExtCodeSignResponse{}
  122. _body, _err := client.AddExtCodeSignWithOptions(request, runtime)
  123. if _err != nil {
  124. return _result, _err
  125. }
  126. _result = _body
  127. return _result, _err
  128. }
  129. // Summary:
  130. //
  131. // Creates a short URL.
  132. //
  133. // Description:
  134. //
  135. // Before you call this operation, you must register the primary domain name of the source URL in the Short Message Service (SMS) console. After the domain name is registered, you can call this operation to create a short URL. For more information, see [Domain name registration](https://help.aliyun.com/document_detail/302325.html#title-mau-zdh-hd0).
  136. //
  137. // - You can create up to 3,000 short URLs within a natural day.
  138. //
  139. // - After a short URL is generated, a security review is required. Generally, the review takes 10 minutes to 2 hours to complete. Before the security review is passed, the short URL cannot be directly accessed.
  140. //
  141. // @param request - AddShortUrlRequest
  142. //
  143. // @param runtime - runtime options for this request RuntimeOptions
  144. //
  145. // @return AddShortUrlResponse
  146. func (client *Client) AddShortUrlWithOptions(request *AddShortUrlRequest, runtime *dara.RuntimeOptions) (_result *AddShortUrlResponse, _err error) {
  147. if dara.BoolValue(client.EnableValidate) == true {
  148. _err = request.Validate()
  149. if _err != nil {
  150. return _result, _err
  151. }
  152. }
  153. query := map[string]interface{}{}
  154. if !dara.IsNil(request.OwnerId) {
  155. query["OwnerId"] = request.OwnerId
  156. }
  157. if !dara.IsNil(request.ResourceOwnerAccount) {
  158. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  159. }
  160. if !dara.IsNil(request.ResourceOwnerId) {
  161. query["ResourceOwnerId"] = request.ResourceOwnerId
  162. }
  163. body := map[string]interface{}{}
  164. if !dara.IsNil(request.EffectiveDays) {
  165. body["EffectiveDays"] = request.EffectiveDays
  166. }
  167. if !dara.IsNil(request.ShortUrlName) {
  168. body["ShortUrlName"] = request.ShortUrlName
  169. }
  170. if !dara.IsNil(request.SourceUrl) {
  171. body["SourceUrl"] = request.SourceUrl
  172. }
  173. req := &openapiutil.OpenApiRequest{
  174. Query: openapiutil.Query(query),
  175. Body: openapiutil.ParseToMap(body),
  176. }
  177. params := &openapiutil.Params{
  178. Action: dara.String("AddShortUrl"),
  179. Version: dara.String("2017-05-25"),
  180. Protocol: dara.String("HTTPS"),
  181. Pathname: dara.String("/"),
  182. Method: dara.String("POST"),
  183. AuthType: dara.String("AK"),
  184. Style: dara.String("RPC"),
  185. ReqBodyType: dara.String("formData"),
  186. BodyType: dara.String("json"),
  187. }
  188. _result = &AddShortUrlResponse{}
  189. _body, _err := client.CallApi(params, req, runtime)
  190. if _err != nil {
  191. return _result, _err
  192. }
  193. _err = dara.Convert(_body, &_result)
  194. return _result, _err
  195. }
  196. // Summary:
  197. //
  198. // Creates a short URL.
  199. //
  200. // Description:
  201. //
  202. // Before you call this operation, you must register the primary domain name of the source URL in the Short Message Service (SMS) console. After the domain name is registered, you can call this operation to create a short URL. For more information, see [Domain name registration](https://help.aliyun.com/document_detail/302325.html#title-mau-zdh-hd0).
  203. //
  204. // - You can create up to 3,000 short URLs within a natural day.
  205. //
  206. // - After a short URL is generated, a security review is required. Generally, the review takes 10 minutes to 2 hours to complete. Before the security review is passed, the short URL cannot be directly accessed.
  207. //
  208. // @param request - AddShortUrlRequest
  209. //
  210. // @return AddShortUrlResponse
  211. func (client *Client) AddShortUrl(request *AddShortUrlRequest) (_result *AddShortUrlResponse, _err error) {
  212. runtime := &dara.RuntimeOptions{}
  213. _result = &AddShortUrlResponse{}
  214. _body, _err := client.AddShortUrlWithOptions(request, runtime)
  215. if _err != nil {
  216. return _result, _err
  217. }
  218. _result = _body
  219. return _result, _err
  220. }
  221. // Summary:
  222. //
  223. // Creates a signature.
  224. //
  225. // Description:
  226. //
  227. // You can call the AddSmsSign operation or use the [Short Message Service (SMS) console](https://dysms.console.aliyun.com/dysms.htm#/overview) to create an SMS signature. The signature must comply with the [SMS signature specifications](https://help.aliyun.com/document_detail/108076.html). You can call the QuerySmsSign operation or use the SMS console to query the review status of the signature.
  228. //
  229. // For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  230. //
  231. // ### QPS limit
  232. //
  233. // You can call this operation only once per second. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  234. //
  235. // >
  236. //
  237. // - You cannot cancel the review of a signature.
  238. //
  239. // - Individual users can create only one verification code signature, and can create only one general-purpose signature within a natural day. If you need to apply for multiple signatures, we recommend that you upgrade your account to an enterprise user.
  240. //
  241. // - If you need to use the same signature for messages sent to recipients both in and outside the Chinese mainland, the signature must be a general-purpose signature.
  242. //
  243. // - If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates.
  244. //
  245. // - An SMS signature must undergo a thorough review process before it can be approved for use.
  246. //
  247. // @param request - AddSmsSignRequest
  248. //
  249. // @param runtime - runtime options for this request RuntimeOptions
  250. //
  251. // @return AddSmsSignResponse
  252. func (client *Client) AddSmsSignWithOptions(request *AddSmsSignRequest, runtime *dara.RuntimeOptions) (_result *AddSmsSignResponse, _err error) {
  253. if dara.BoolValue(client.EnableValidate) == true {
  254. _err = request.Validate()
  255. if _err != nil {
  256. return _result, _err
  257. }
  258. }
  259. query := map[string]interface{}{}
  260. if !dara.IsNil(request.OwnerId) {
  261. query["OwnerId"] = request.OwnerId
  262. }
  263. if !dara.IsNil(request.Remark) {
  264. query["Remark"] = request.Remark
  265. }
  266. if !dara.IsNil(request.ResourceOwnerAccount) {
  267. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  268. }
  269. if !dara.IsNil(request.ResourceOwnerId) {
  270. query["ResourceOwnerId"] = request.ResourceOwnerId
  271. }
  272. if !dara.IsNil(request.SignName) {
  273. query["SignName"] = request.SignName
  274. }
  275. if !dara.IsNil(request.SignSource) {
  276. query["SignSource"] = request.SignSource
  277. }
  278. if !dara.IsNil(request.SignType) {
  279. query["SignType"] = request.SignType
  280. }
  281. body := map[string]interface{}{}
  282. if !dara.IsNil(request.SignFileList) {
  283. body["SignFileList"] = request.SignFileList
  284. }
  285. req := &openapiutil.OpenApiRequest{
  286. Query: openapiutil.Query(query),
  287. Body: openapiutil.ParseToMap(body),
  288. }
  289. params := &openapiutil.Params{
  290. Action: dara.String("AddSmsSign"),
  291. Version: dara.String("2017-05-25"),
  292. Protocol: dara.String("HTTPS"),
  293. Pathname: dara.String("/"),
  294. Method: dara.String("POST"),
  295. AuthType: dara.String("AK"),
  296. Style: dara.String("RPC"),
  297. ReqBodyType: dara.String("formData"),
  298. BodyType: dara.String("json"),
  299. }
  300. _result = &AddSmsSignResponse{}
  301. _body, _err := client.CallApi(params, req, runtime)
  302. if _err != nil {
  303. return _result, _err
  304. }
  305. _err = dara.Convert(_body, &_result)
  306. return _result, _err
  307. }
  308. // Summary:
  309. //
  310. // Creates a signature.
  311. //
  312. // Description:
  313. //
  314. // You can call the AddSmsSign operation or use the [Short Message Service (SMS) console](https://dysms.console.aliyun.com/dysms.htm#/overview) to create an SMS signature. The signature must comply with the [SMS signature specifications](https://help.aliyun.com/document_detail/108076.html). You can call the QuerySmsSign operation or use the SMS console to query the review status of the signature.
  315. //
  316. // For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  317. //
  318. // ### QPS limit
  319. //
  320. // You can call this operation only once per second. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  321. //
  322. // >
  323. //
  324. // - You cannot cancel the review of a signature.
  325. //
  326. // - Individual users can create only one verification code signature, and can create only one general-purpose signature within a natural day. If you need to apply for multiple signatures, we recommend that you upgrade your account to an enterprise user.
  327. //
  328. // - If you need to use the same signature for messages sent to recipients both in and outside the Chinese mainland, the signature must be a general-purpose signature.
  329. //
  330. // - If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates.
  331. //
  332. // - An SMS signature must undergo a thorough review process before it can be approved for use.
  333. //
  334. // @param request - AddSmsSignRequest
  335. //
  336. // @return AddSmsSignResponse
  337. func (client *Client) AddSmsSign(request *AddSmsSignRequest) (_result *AddSmsSignResponse, _err error) {
  338. runtime := &dara.RuntimeOptions{}
  339. _result = &AddSmsSignResponse{}
  340. _body, _err := client.AddSmsSignWithOptions(request, runtime)
  341. if _err != nil {
  342. return _result, _err
  343. }
  344. _result = _body
  345. return _result, _err
  346. }
  347. // Deprecated: OpenAPI AddSmsTemplate is deprecated, please use Dysmsapi::2017-05-25::CreateSmsTemplate instead.
  348. //
  349. // Summary:
  350. //
  351. // Creates a message template.
  352. //
  353. // Description:
  354. //
  355. // You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to apply for a message template. The template must comply with the [message template specifications](https://help.aliyun.com/document_detail/108253.html). You can call the [QuerySmsTemplate](https://help.aliyun.com/document_detail/419289.html) operation or use the Alibaba Cloud SMS console to check whether the message template is approved.
  356. //
  357. // >
  358. //
  359. // - Message templates pending approval can be withdrawn. You can withdraw a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  360. //
  361. // - Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  362. //
  363. // - If you call the AddSmsTemplate operation, you can apply for a maximum of 100 message templates in a calendar day. After you apply for a message template, we recommend that you wait for at least 30 seconds before you apply for another one. If you use the Alibaba Cloud SMS console, you can apply for an unlimited number of message templates.
  364. //
  365. // - Messages sent to the Chinese mainland and messages sent to countries or regions outside the Chinese mainland use separate message templates. Create message templates based on your needs.
  366. //
  367. // - If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates.
  368. //
  369. // - A signature must undergo a thorough review process before it can be approved for use. For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  370. //
  371. // ### QPS limits
  372. //
  373. // You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  374. //
  375. // @param request - AddSmsTemplateRequest
  376. //
  377. // @param runtime - runtime options for this request RuntimeOptions
  378. //
  379. // @return AddSmsTemplateResponse
  380. func (client *Client) AddSmsTemplateWithOptions(request *AddSmsTemplateRequest, runtime *dara.RuntimeOptions) (_result *AddSmsTemplateResponse, _err error) {
  381. if dara.BoolValue(client.EnableValidate) == true {
  382. _err = request.Validate()
  383. if _err != nil {
  384. return _result, _err
  385. }
  386. }
  387. query := map[string]interface{}{}
  388. if !dara.IsNil(request.OwnerId) {
  389. query["OwnerId"] = request.OwnerId
  390. }
  391. if !dara.IsNil(request.Remark) {
  392. query["Remark"] = request.Remark
  393. }
  394. if !dara.IsNil(request.ResourceOwnerAccount) {
  395. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  396. }
  397. if !dara.IsNil(request.ResourceOwnerId) {
  398. query["ResourceOwnerId"] = request.ResourceOwnerId
  399. }
  400. if !dara.IsNil(request.TemplateContent) {
  401. query["TemplateContent"] = request.TemplateContent
  402. }
  403. if !dara.IsNil(request.TemplateName) {
  404. query["TemplateName"] = request.TemplateName
  405. }
  406. if !dara.IsNil(request.TemplateType) {
  407. query["TemplateType"] = request.TemplateType
  408. }
  409. req := &openapiutil.OpenApiRequest{
  410. Query: openapiutil.Query(query),
  411. }
  412. params := &openapiutil.Params{
  413. Action: dara.String("AddSmsTemplate"),
  414. Version: dara.String("2017-05-25"),
  415. Protocol: dara.String("HTTPS"),
  416. Pathname: dara.String("/"),
  417. Method: dara.String("POST"),
  418. AuthType: dara.String("AK"),
  419. Style: dara.String("RPC"),
  420. ReqBodyType: dara.String("formData"),
  421. BodyType: dara.String("json"),
  422. }
  423. _result = &AddSmsTemplateResponse{}
  424. _body, _err := client.CallApi(params, req, runtime)
  425. if _err != nil {
  426. return _result, _err
  427. }
  428. _err = dara.Convert(_body, &_result)
  429. return _result, _err
  430. }
  431. // Deprecated: OpenAPI AddSmsTemplate is deprecated, please use Dysmsapi::2017-05-25::CreateSmsTemplate instead.
  432. //
  433. // Summary:
  434. //
  435. // Creates a message template.
  436. //
  437. // Description:
  438. //
  439. // You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to apply for a message template. The template must comply with the [message template specifications](https://help.aliyun.com/document_detail/108253.html). You can call the [QuerySmsTemplate](https://help.aliyun.com/document_detail/419289.html) operation or use the Alibaba Cloud SMS console to check whether the message template is approved.
  440. //
  441. // >
  442. //
  443. // - Message templates pending approval can be withdrawn. You can withdraw a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  444. //
  445. // - Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  446. //
  447. // - If you call the AddSmsTemplate operation, you can apply for a maximum of 100 message templates in a calendar day. After you apply for a message template, we recommend that you wait for at least 30 seconds before you apply for another one. If you use the Alibaba Cloud SMS console, you can apply for an unlimited number of message templates.
  448. //
  449. // - Messages sent to the Chinese mainland and messages sent to countries or regions outside the Chinese mainland use separate message templates. Create message templates based on your needs.
  450. //
  451. // - If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates.
  452. //
  453. // - A signature must undergo a thorough review process before it can be approved for use. For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  454. //
  455. // ### QPS limits
  456. //
  457. // You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  458. //
  459. // @param request - AddSmsTemplateRequest
  460. //
  461. // @return AddSmsTemplateResponse
  462. // Deprecated
  463. func (client *Client) AddSmsTemplate(request *AddSmsTemplateRequest) (_result *AddSmsTemplateResponse, _err error) {
  464. runtime := &dara.RuntimeOptions{}
  465. _result = &AddSmsTemplateResponse{}
  466. _body, _err := client.AddSmsTemplateWithOptions(request, runtime)
  467. if _err != nil {
  468. return _result, _err
  469. }
  470. _result = _body
  471. return _result, _err
  472. }
  473. // Summary:
  474. //
  475. // 更换签名的资质和授权书
  476. //
  477. // @param request - ChangeSignatureQualificationRequest
  478. //
  479. // @param runtime - runtime options for this request RuntimeOptions
  480. //
  481. // @return ChangeSignatureQualificationResponse
  482. func (client *Client) ChangeSignatureQualificationWithOptions(request *ChangeSignatureQualificationRequest, runtime *dara.RuntimeOptions) (_result *ChangeSignatureQualificationResponse, _err error) {
  483. if dara.BoolValue(client.EnableValidate) == true {
  484. _err = request.Validate()
  485. if _err != nil {
  486. return _result, _err
  487. }
  488. }
  489. query := map[string]interface{}{}
  490. if !dara.IsNil(request.AuthorizationLetterId) {
  491. query["AuthorizationLetterId"] = request.AuthorizationLetterId
  492. }
  493. if !dara.IsNil(request.OwnerId) {
  494. query["OwnerId"] = request.OwnerId
  495. }
  496. if !dara.IsNil(request.QualificationId) {
  497. query["QualificationId"] = request.QualificationId
  498. }
  499. if !dara.IsNil(request.ResourceOwnerAccount) {
  500. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  501. }
  502. if !dara.IsNil(request.ResourceOwnerId) {
  503. query["ResourceOwnerId"] = request.ResourceOwnerId
  504. }
  505. if !dara.IsNil(request.SignatureName) {
  506. query["SignatureName"] = request.SignatureName
  507. }
  508. req := &openapiutil.OpenApiRequest{
  509. Query: openapiutil.Query(query),
  510. }
  511. params := &openapiutil.Params{
  512. Action: dara.String("ChangeSignatureQualification"),
  513. Version: dara.String("2017-05-25"),
  514. Protocol: dara.String("HTTPS"),
  515. Pathname: dara.String("/"),
  516. Method: dara.String("POST"),
  517. AuthType: dara.String("AK"),
  518. Style: dara.String("RPC"),
  519. ReqBodyType: dara.String("formData"),
  520. BodyType: dara.String("json"),
  521. }
  522. _result = &ChangeSignatureQualificationResponse{}
  523. _body, _err := client.CallApi(params, req, runtime)
  524. if _err != nil {
  525. return _result, _err
  526. }
  527. _err = dara.Convert(_body, &_result)
  528. return _result, _err
  529. }
  530. // Summary:
  531. //
  532. // 更换签名的资质和授权书
  533. //
  534. // @param request - ChangeSignatureQualificationRequest
  535. //
  536. // @return ChangeSignatureQualificationResponse
  537. func (client *Client) ChangeSignatureQualification(request *ChangeSignatureQualificationRequest) (_result *ChangeSignatureQualificationResponse, _err error) {
  538. runtime := &dara.RuntimeOptions{}
  539. _result = &ChangeSignatureQualificationResponse{}
  540. _body, _err := client.ChangeSignatureQualificationWithOptions(request, runtime)
  541. if _err != nil {
  542. return _result, _err
  543. }
  544. _result = _body
  545. return _result, _err
  546. }
  547. // Summary:
  548. //
  549. // Queries whether some mobile phone numbers support card messages.
  550. //
  551. // Description:
  552. //
  553. // ### QPS limit
  554. //
  555. // You can call this operation up to 2,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  556. //
  557. // @param request - CheckMobilesCardSupportRequest
  558. //
  559. // @param runtime - runtime options for this request RuntimeOptions
  560. //
  561. // @return CheckMobilesCardSupportResponse
  562. func (client *Client) CheckMobilesCardSupportWithOptions(request *CheckMobilesCardSupportRequest, runtime *dara.RuntimeOptions) (_result *CheckMobilesCardSupportResponse, _err error) {
  563. if dara.BoolValue(client.EnableValidate) == true {
  564. _err = request.Validate()
  565. if _err != nil {
  566. return _result, _err
  567. }
  568. }
  569. query := map[string]interface{}{}
  570. if !dara.IsNil(request.Mobiles) {
  571. query["Mobiles"] = request.Mobiles
  572. }
  573. if !dara.IsNil(request.TemplateCode) {
  574. query["TemplateCode"] = request.TemplateCode
  575. }
  576. req := &openapiutil.OpenApiRequest{
  577. Query: openapiutil.Query(query),
  578. }
  579. params := &openapiutil.Params{
  580. Action: dara.String("CheckMobilesCardSupport"),
  581. Version: dara.String("2017-05-25"),
  582. Protocol: dara.String("HTTPS"),
  583. Pathname: dara.String("/"),
  584. Method: dara.String("POST"),
  585. AuthType: dara.String("AK"),
  586. Style: dara.String("RPC"),
  587. ReqBodyType: dara.String("formData"),
  588. BodyType: dara.String("json"),
  589. }
  590. _result = &CheckMobilesCardSupportResponse{}
  591. _body, _err := client.CallApi(params, req, runtime)
  592. if _err != nil {
  593. return _result, _err
  594. }
  595. _err = dara.Convert(_body, &_result)
  596. return _result, _err
  597. }
  598. // Summary:
  599. //
  600. // Queries whether some mobile phone numbers support card messages.
  601. //
  602. // Description:
  603. //
  604. // ### QPS limit
  605. //
  606. // You can call this operation up to 2,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  607. //
  608. // @param request - CheckMobilesCardSupportRequest
  609. //
  610. // @return CheckMobilesCardSupportResponse
  611. func (client *Client) CheckMobilesCardSupport(request *CheckMobilesCardSupportRequest) (_result *CheckMobilesCardSupportResponse, _err error) {
  612. runtime := &dara.RuntimeOptions{}
  613. _result = &CheckMobilesCardSupportResponse{}
  614. _body, _err := client.CheckMobilesCardSupportWithOptions(request, runtime)
  615. if _err != nil {
  616. return _result, _err
  617. }
  618. _result = _body
  619. return _result, _err
  620. }
  621. // Summary:
  622. //
  623. // Sends conversion rate information to Alibaba Cloud SMS.
  624. //
  625. // @param request - ConversionDataIntlRequest
  626. //
  627. // @param runtime - runtime options for this request RuntimeOptions
  628. //
  629. // @return ConversionDataIntlResponse
  630. func (client *Client) ConversionDataIntlWithOptions(request *ConversionDataIntlRequest, runtime *dara.RuntimeOptions) (_result *ConversionDataIntlResponse, _err error) {
  631. if dara.BoolValue(client.EnableValidate) == true {
  632. _err = request.Validate()
  633. if _err != nil {
  634. return _result, _err
  635. }
  636. }
  637. query := map[string]interface{}{}
  638. if !dara.IsNil(request.ConversionRate) {
  639. query["ConversionRate"] = request.ConversionRate
  640. }
  641. if !dara.IsNil(request.OwnerId) {
  642. query["OwnerId"] = request.OwnerId
  643. }
  644. if !dara.IsNil(request.ReportTime) {
  645. query["ReportTime"] = request.ReportTime
  646. }
  647. if !dara.IsNil(request.ResourceOwnerAccount) {
  648. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  649. }
  650. if !dara.IsNil(request.ResourceOwnerId) {
  651. query["ResourceOwnerId"] = request.ResourceOwnerId
  652. }
  653. req := &openapiutil.OpenApiRequest{
  654. Query: openapiutil.Query(query),
  655. }
  656. params := &openapiutil.Params{
  657. Action: dara.String("ConversionDataIntl"),
  658. Version: dara.String("2017-05-25"),
  659. Protocol: dara.String("HTTPS"),
  660. Pathname: dara.String("/"),
  661. Method: dara.String("POST"),
  662. AuthType: dara.String("AK"),
  663. Style: dara.String("RPC"),
  664. ReqBodyType: dara.String("formData"),
  665. BodyType: dara.String("json"),
  666. }
  667. _result = &ConversionDataIntlResponse{}
  668. _body, _err := client.CallApi(params, req, runtime)
  669. if _err != nil {
  670. return _result, _err
  671. }
  672. _err = dara.Convert(_body, &_result)
  673. return _result, _err
  674. }
  675. // Summary:
  676. //
  677. // Sends conversion rate information to Alibaba Cloud SMS.
  678. //
  679. // @param request - ConversionDataIntlRequest
  680. //
  681. // @return ConversionDataIntlResponse
  682. func (client *Client) ConversionDataIntl(request *ConversionDataIntlRequest) (_result *ConversionDataIntlResponse, _err error) {
  683. runtime := &dara.RuntimeOptions{}
  684. _result = &ConversionDataIntlResponse{}
  685. _body, _err := client.ConversionDataIntlWithOptions(request, runtime)
  686. if _err != nil {
  687. return _result, _err
  688. }
  689. _result = _body
  690. return _result, _err
  691. }
  692. // Summary:
  693. //
  694. // Creates a card message template.
  695. //
  696. // Description:
  697. //
  698. // The CreateCardSmsTemplate operation saves the card message template information, submits it to the mobile phone manufacturer for approval, and returns the message template ID.
  699. //
  700. // - If the type of the message template is not supported or events that are not supported by the mobile phone manufacturer are specified, the template is not submitted. For more information, see [Supported message templates](https://help.aliyun.com/document_detail/434611.html).
  701. //
  702. // - For information about sample card message templates, see [Sample card message templates](https://help.aliyun.com/document_detail/435361.html).
  703. //
  704. // ### QPS limit
  705. //
  706. // You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  707. //
  708. // @param tmpReq - CreateCardSmsTemplateRequest
  709. //
  710. // @param runtime - runtime options for this request RuntimeOptions
  711. //
  712. // @return CreateCardSmsTemplateResponse
  713. func (client *Client) CreateCardSmsTemplateWithOptions(tmpReq *CreateCardSmsTemplateRequest, runtime *dara.RuntimeOptions) (_result *CreateCardSmsTemplateResponse, _err error) {
  714. if dara.BoolValue(client.EnableValidate) == true {
  715. _err = tmpReq.Validate()
  716. if _err != nil {
  717. return _result, _err
  718. }
  719. }
  720. request := &CreateCardSmsTemplateShrinkRequest{}
  721. openapiutil.Convert(tmpReq, request)
  722. if !dara.IsNil(tmpReq.Template) {
  723. request.TemplateShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.Template, dara.String("Template"), dara.String("json"))
  724. }
  725. query := map[string]interface{}{}
  726. if !dara.IsNil(request.Factorys) {
  727. query["Factorys"] = request.Factorys
  728. }
  729. if !dara.IsNil(request.Memo) {
  730. query["Memo"] = request.Memo
  731. }
  732. if !dara.IsNil(request.TemplateShrink) {
  733. query["Template"] = request.TemplateShrink
  734. }
  735. if !dara.IsNil(request.TemplateName) {
  736. query["TemplateName"] = request.TemplateName
  737. }
  738. req := &openapiutil.OpenApiRequest{
  739. Query: openapiutil.Query(query),
  740. }
  741. params := &openapiutil.Params{
  742. Action: dara.String("CreateCardSmsTemplate"),
  743. Version: dara.String("2017-05-25"),
  744. Protocol: dara.String("HTTPS"),
  745. Pathname: dara.String("/"),
  746. Method: dara.String("POST"),
  747. AuthType: dara.String("AK"),
  748. Style: dara.String("RPC"),
  749. ReqBodyType: dara.String("formData"),
  750. BodyType: dara.String("json"),
  751. }
  752. _result = &CreateCardSmsTemplateResponse{}
  753. _body, _err := client.CallApi(params, req, runtime)
  754. if _err != nil {
  755. return _result, _err
  756. }
  757. _err = dara.Convert(_body, &_result)
  758. return _result, _err
  759. }
  760. // Summary:
  761. //
  762. // Creates a card message template.
  763. //
  764. // Description:
  765. //
  766. // The CreateCardSmsTemplate operation saves the card message template information, submits it to the mobile phone manufacturer for approval, and returns the message template ID.
  767. //
  768. // - If the type of the message template is not supported or events that are not supported by the mobile phone manufacturer are specified, the template is not submitted. For more information, see [Supported message templates](https://help.aliyun.com/document_detail/434611.html).
  769. //
  770. // - For information about sample card message templates, see [Sample card message templates](https://help.aliyun.com/document_detail/435361.html).
  771. //
  772. // ### QPS limit
  773. //
  774. // You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  775. //
  776. // @param request - CreateCardSmsTemplateRequest
  777. //
  778. // @return CreateCardSmsTemplateResponse
  779. func (client *Client) CreateCardSmsTemplate(request *CreateCardSmsTemplateRequest) (_result *CreateCardSmsTemplateResponse, _err error) {
  780. runtime := &dara.RuntimeOptions{}
  781. _result = &CreateCardSmsTemplateResponse{}
  782. _body, _err := client.CreateCardSmsTemplateWithOptions(request, runtime)
  783. if _err != nil {
  784. return _result, _err
  785. }
  786. _result = _body
  787. return _result, _err
  788. }
  789. // Summary:
  790. //
  791. // 数字短信签名操作订单
  792. //
  793. // @param tmpReq - CreateDigitalSignOrderRequest
  794. //
  795. // @param runtime - runtime options for this request RuntimeOptions
  796. //
  797. // @return CreateDigitalSignOrderResponse
  798. func (client *Client) CreateDigitalSignOrderWithOptions(tmpReq *CreateDigitalSignOrderRequest, runtime *dara.RuntimeOptions) (_result *CreateDigitalSignOrderResponse, _err error) {
  799. if dara.BoolValue(client.EnableValidate) == true {
  800. _err = tmpReq.Validate()
  801. if _err != nil {
  802. return _result, _err
  803. }
  804. }
  805. request := &CreateDigitalSignOrderShrinkRequest{}
  806. openapiutil.Convert(tmpReq, request)
  807. if !dara.IsNil(tmpReq.OrderContext) {
  808. request.OrderContextShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.OrderContext, dara.String("OrderContext"), dara.String("json"))
  809. }
  810. query := map[string]interface{}{}
  811. if !dara.IsNil(request.ExtendMessage) {
  812. query["ExtendMessage"] = request.ExtendMessage
  813. }
  814. if !dara.IsNil(request.OrderContextShrink) {
  815. query["OrderContext"] = request.OrderContextShrink
  816. }
  817. if !dara.IsNil(request.OrderType) {
  818. query["OrderType"] = request.OrderType
  819. }
  820. if !dara.IsNil(request.OwnerId) {
  821. query["OwnerId"] = request.OwnerId
  822. }
  823. if !dara.IsNil(request.QualificationId) {
  824. query["QualificationId"] = request.QualificationId
  825. }
  826. if !dara.IsNil(request.QualificationVersion) {
  827. query["QualificationVersion"] = request.QualificationVersion
  828. }
  829. if !dara.IsNil(request.ResourceOwnerAccount) {
  830. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  831. }
  832. if !dara.IsNil(request.ResourceOwnerId) {
  833. query["ResourceOwnerId"] = request.ResourceOwnerId
  834. }
  835. if !dara.IsNil(request.SignId) {
  836. query["SignId"] = request.SignId
  837. }
  838. if !dara.IsNil(request.SignIndustry) {
  839. query["SignIndustry"] = request.SignIndustry
  840. }
  841. if !dara.IsNil(request.SignName) {
  842. query["SignName"] = request.SignName
  843. }
  844. if !dara.IsNil(request.SignSource) {
  845. query["SignSource"] = request.SignSource
  846. }
  847. if !dara.IsNil(request.Submitter) {
  848. query["Submitter"] = request.Submitter
  849. }
  850. req := &openapiutil.OpenApiRequest{
  851. Query: openapiutil.Query(query),
  852. }
  853. params := &openapiutil.Params{
  854. Action: dara.String("CreateDigitalSignOrder"),
  855. Version: dara.String("2017-05-25"),
  856. Protocol: dara.String("HTTPS"),
  857. Pathname: dara.String("/"),
  858. Method: dara.String("POST"),
  859. AuthType: dara.String("AK"),
  860. Style: dara.String("RPC"),
  861. ReqBodyType: dara.String("formData"),
  862. BodyType: dara.String("json"),
  863. }
  864. _result = &CreateDigitalSignOrderResponse{}
  865. _body, _err := client.CallApi(params, req, runtime)
  866. if _err != nil {
  867. return _result, _err
  868. }
  869. _err = dara.Convert(_body, &_result)
  870. return _result, _err
  871. }
  872. // Summary:
  873. //
  874. // 数字短信签名操作订单
  875. //
  876. // @param request - CreateDigitalSignOrderRequest
  877. //
  878. // @return CreateDigitalSignOrderResponse
  879. func (client *Client) CreateDigitalSignOrder(request *CreateDigitalSignOrderRequest) (_result *CreateDigitalSignOrderResponse, _err error) {
  880. runtime := &dara.RuntimeOptions{}
  881. _result = &CreateDigitalSignOrderResponse{}
  882. _body, _err := client.CreateDigitalSignOrderWithOptions(request, runtime)
  883. if _err != nil {
  884. return _result, _err
  885. }
  886. _result = _body
  887. return _result, _err
  888. }
  889. // Summary:
  890. //
  891. // 创建数字短信模板
  892. //
  893. // @param request - CreateDigitalSmsTemplateRequest
  894. //
  895. // @param runtime - runtime options for this request RuntimeOptions
  896. //
  897. // @return CreateDigitalSmsTemplateResponse
  898. func (client *Client) CreateDigitalSmsTemplateWithOptions(request *CreateDigitalSmsTemplateRequest, runtime *dara.RuntimeOptions) (_result *CreateDigitalSmsTemplateResponse, _err error) {
  899. if dara.BoolValue(client.EnableValidate) == true {
  900. _err = request.Validate()
  901. if _err != nil {
  902. return _result, _err
  903. }
  904. }
  905. query := map[string]interface{}{}
  906. if !dara.IsNil(request.OwnerId) {
  907. query["OwnerId"] = request.OwnerId
  908. }
  909. if !dara.IsNil(request.Remark) {
  910. query["Remark"] = request.Remark
  911. }
  912. if !dara.IsNil(request.ResourceOwnerAccount) {
  913. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  914. }
  915. if !dara.IsNil(request.ResourceOwnerId) {
  916. query["ResourceOwnerId"] = request.ResourceOwnerId
  917. }
  918. if !dara.IsNil(request.SignName) {
  919. query["SignName"] = request.SignName
  920. }
  921. if !dara.IsNil(request.TemplateContents) {
  922. query["TemplateContents"] = request.TemplateContents
  923. }
  924. if !dara.IsNil(request.TemplateName) {
  925. query["TemplateName"] = request.TemplateName
  926. }
  927. req := &openapiutil.OpenApiRequest{
  928. Query: openapiutil.Query(query),
  929. }
  930. params := &openapiutil.Params{
  931. Action: dara.String("CreateDigitalSmsTemplate"),
  932. Version: dara.String("2017-05-25"),
  933. Protocol: dara.String("HTTPS"),
  934. Pathname: dara.String("/"),
  935. Method: dara.String("POST"),
  936. AuthType: dara.String("AK"),
  937. Style: dara.String("RPC"),
  938. ReqBodyType: dara.String("formData"),
  939. BodyType: dara.String("json"),
  940. }
  941. _result = &CreateDigitalSmsTemplateResponse{}
  942. _body, _err := client.CallApi(params, req, runtime)
  943. if _err != nil {
  944. return _result, _err
  945. }
  946. _err = dara.Convert(_body, &_result)
  947. return _result, _err
  948. }
  949. // Summary:
  950. //
  951. // 创建数字短信模板
  952. //
  953. // @param request - CreateDigitalSmsTemplateRequest
  954. //
  955. // @return CreateDigitalSmsTemplateResponse
  956. func (client *Client) CreateDigitalSmsTemplate(request *CreateDigitalSmsTemplateRequest) (_result *CreateDigitalSmsTemplateResponse, _err error) {
  957. runtime := &dara.RuntimeOptions{}
  958. _result = &CreateDigitalSmsTemplateResponse{}
  959. _body, _err := client.CreateDigitalSmsTemplateWithOptions(request, runtime)
  960. if _err != nil {
  961. return _result, _err
  962. }
  963. _result = _body
  964. return _result, _err
  965. }
  966. // Summary:
  967. //
  968. // Creates personalized short URLs. You can specify multiple mobile numbers and source URLs in the request. The operation returns the short URLs corresponding to the specified mobile numbers. You can obtain the click information of end users based on different short URLs. The click information helps you realize secondary marketing. QPS limit You can call this operation up to 500 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  969. //
  970. // @param request - CreateSmartShortUrlRequest
  971. //
  972. // @param runtime - runtime options for this request RuntimeOptions
  973. //
  974. // @return CreateSmartShortUrlResponse
  975. func (client *Client) CreateSmartShortUrlWithOptions(request *CreateSmartShortUrlRequest, runtime *dara.RuntimeOptions) (_result *CreateSmartShortUrlResponse, _err error) {
  976. if dara.BoolValue(client.EnableValidate) == true {
  977. _err = request.Validate()
  978. if _err != nil {
  979. return _result, _err
  980. }
  981. }
  982. query := map[string]interface{}{}
  983. if !dara.IsNil(request.OutId) {
  984. query["OutId"] = request.OutId
  985. }
  986. if !dara.IsNil(request.OwnerId) {
  987. query["OwnerId"] = request.OwnerId
  988. }
  989. if !dara.IsNil(request.PhoneNumbers) {
  990. query["PhoneNumbers"] = request.PhoneNumbers
  991. }
  992. if !dara.IsNil(request.ResourceOwnerAccount) {
  993. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  994. }
  995. if !dara.IsNil(request.ResourceOwnerId) {
  996. query["ResourceOwnerId"] = request.ResourceOwnerId
  997. }
  998. if !dara.IsNil(request.SourceUrl) {
  999. query["SourceUrl"] = request.SourceUrl
  1000. }
  1001. req := &openapiutil.OpenApiRequest{
  1002. Query: openapiutil.Query(query),
  1003. }
  1004. params := &openapiutil.Params{
  1005. Action: dara.String("CreateSmartShortUrl"),
  1006. Version: dara.String("2017-05-25"),
  1007. Protocol: dara.String("HTTPS"),
  1008. Pathname: dara.String("/"),
  1009. Method: dara.String("POST"),
  1010. AuthType: dara.String("AK"),
  1011. Style: dara.String("RPC"),
  1012. ReqBodyType: dara.String("formData"),
  1013. BodyType: dara.String("json"),
  1014. }
  1015. _result = &CreateSmartShortUrlResponse{}
  1016. _body, _err := client.CallApi(params, req, runtime)
  1017. if _err != nil {
  1018. return _result, _err
  1019. }
  1020. _err = dara.Convert(_body, &_result)
  1021. return _result, _err
  1022. }
  1023. // Summary:
  1024. //
  1025. // Creates personalized short URLs. You can specify multiple mobile numbers and source URLs in the request. The operation returns the short URLs corresponding to the specified mobile numbers. You can obtain the click information of end users based on different short URLs. The click information helps you realize secondary marketing. QPS limit You can call this operation up to 500 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1026. //
  1027. // @param request - CreateSmartShortUrlRequest
  1028. //
  1029. // @return CreateSmartShortUrlResponse
  1030. func (client *Client) CreateSmartShortUrl(request *CreateSmartShortUrlRequest) (_result *CreateSmartShortUrlResponse, _err error) {
  1031. runtime := &dara.RuntimeOptions{}
  1032. _result = &CreateSmartShortUrlResponse{}
  1033. _body, _err := client.CreateSmartShortUrlWithOptions(request, runtime)
  1034. if _err != nil {
  1035. return _result, _err
  1036. }
  1037. _result = _body
  1038. return _result, _err
  1039. }
  1040. // Summary:
  1041. //
  1042. // 创建APP-ICP备案对客openAPI
  1043. //
  1044. // @param request - CreateSmsAppIcpRecordRequest
  1045. //
  1046. // @param runtime - runtime options for this request RuntimeOptions
  1047. //
  1048. // @return CreateSmsAppIcpRecordResponse
  1049. func (client *Client) CreateSmsAppIcpRecordWithOptions(request *CreateSmsAppIcpRecordRequest, runtime *dara.RuntimeOptions) (_result *CreateSmsAppIcpRecordResponse, _err error) {
  1050. if dara.BoolValue(client.EnableValidate) == true {
  1051. _err = request.Validate()
  1052. if _err != nil {
  1053. return _result, _err
  1054. }
  1055. }
  1056. query := map[string]interface{}{}
  1057. if !dara.IsNil(request.AppApprovalDate) {
  1058. query["AppApprovalDate"] = request.AppApprovalDate
  1059. }
  1060. if !dara.IsNil(request.AppIcpLicenseNumber) {
  1061. query["AppIcpLicenseNumber"] = request.AppIcpLicenseNumber
  1062. }
  1063. if !dara.IsNil(request.AppIcpRecordPic) {
  1064. query["AppIcpRecordPic"] = request.AppIcpRecordPic
  1065. }
  1066. if !dara.IsNil(request.AppPrincipalUnitName) {
  1067. query["AppPrincipalUnitName"] = request.AppPrincipalUnitName
  1068. }
  1069. if !dara.IsNil(request.AppServiceName) {
  1070. query["AppServiceName"] = request.AppServiceName
  1071. }
  1072. if !dara.IsNil(request.Domain) {
  1073. query["Domain"] = request.Domain
  1074. }
  1075. if !dara.IsNil(request.OwnerId) {
  1076. query["OwnerId"] = request.OwnerId
  1077. }
  1078. if !dara.IsNil(request.ResourceOwnerAccount) {
  1079. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  1080. }
  1081. if !dara.IsNil(request.ResourceOwnerId) {
  1082. query["ResourceOwnerId"] = request.ResourceOwnerId
  1083. }
  1084. req := &openapiutil.OpenApiRequest{
  1085. Query: openapiutil.Query(query),
  1086. }
  1087. params := &openapiutil.Params{
  1088. Action: dara.String("CreateSmsAppIcpRecord"),
  1089. Version: dara.String("2017-05-25"),
  1090. Protocol: dara.String("HTTPS"),
  1091. Pathname: dara.String("/"),
  1092. Method: dara.String("POST"),
  1093. AuthType: dara.String("AK"),
  1094. Style: dara.String("RPC"),
  1095. ReqBodyType: dara.String("formData"),
  1096. BodyType: dara.String("json"),
  1097. }
  1098. _result = &CreateSmsAppIcpRecordResponse{}
  1099. _body, _err := client.CallApi(params, req, runtime)
  1100. if _err != nil {
  1101. return _result, _err
  1102. }
  1103. _err = dara.Convert(_body, &_result)
  1104. return _result, _err
  1105. }
  1106. // Summary:
  1107. //
  1108. // 创建APP-ICP备案对客openAPI
  1109. //
  1110. // @param request - CreateSmsAppIcpRecordRequest
  1111. //
  1112. // @return CreateSmsAppIcpRecordResponse
  1113. func (client *Client) CreateSmsAppIcpRecord(request *CreateSmsAppIcpRecordRequest) (_result *CreateSmsAppIcpRecordResponse, _err error) {
  1114. runtime := &dara.RuntimeOptions{}
  1115. _result = &CreateSmsAppIcpRecordResponse{}
  1116. _body, _err := client.CreateSmsAppIcpRecordWithOptions(request, runtime)
  1117. if _err != nil {
  1118. return _result, _err
  1119. }
  1120. _result = _body
  1121. return _result, _err
  1122. }
  1123. // Summary:
  1124. //
  1125. // 创建委托授权书
  1126. //
  1127. // @param tmpReq - CreateSmsAuthorizationLetterRequest
  1128. //
  1129. // @param runtime - runtime options for this request RuntimeOptions
  1130. //
  1131. // @return CreateSmsAuthorizationLetterResponse
  1132. func (client *Client) CreateSmsAuthorizationLetterWithOptions(tmpReq *CreateSmsAuthorizationLetterRequest, runtime *dara.RuntimeOptions) (_result *CreateSmsAuthorizationLetterResponse, _err error) {
  1133. if dara.BoolValue(client.EnableValidate) == true {
  1134. _err = tmpReq.Validate()
  1135. if _err != nil {
  1136. return _result, _err
  1137. }
  1138. }
  1139. request := &CreateSmsAuthorizationLetterShrinkRequest{}
  1140. openapiutil.Convert(tmpReq, request)
  1141. if !dara.IsNil(tmpReq.SignList) {
  1142. request.SignListShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.SignList, dara.String("SignList"), dara.String("json"))
  1143. }
  1144. query := map[string]interface{}{}
  1145. if !dara.IsNil(request.Authorization) {
  1146. query["Authorization"] = request.Authorization
  1147. }
  1148. if !dara.IsNil(request.AuthorizationLetterExpDate) {
  1149. query["AuthorizationLetterExpDate"] = request.AuthorizationLetterExpDate
  1150. }
  1151. if !dara.IsNil(request.AuthorizationLetterName) {
  1152. query["AuthorizationLetterName"] = request.AuthorizationLetterName
  1153. }
  1154. if !dara.IsNil(request.AuthorizationLetterPic) {
  1155. query["AuthorizationLetterPic"] = request.AuthorizationLetterPic
  1156. }
  1157. if !dara.IsNil(request.OrganizationCode) {
  1158. query["OrganizationCode"] = request.OrganizationCode
  1159. }
  1160. if !dara.IsNil(request.OwnerId) {
  1161. query["OwnerId"] = request.OwnerId
  1162. }
  1163. if !dara.IsNil(request.ProxyAuthorization) {
  1164. query["ProxyAuthorization"] = request.ProxyAuthorization
  1165. }
  1166. if !dara.IsNil(request.ResourceOwnerAccount) {
  1167. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  1168. }
  1169. if !dara.IsNil(request.ResourceOwnerId) {
  1170. query["ResourceOwnerId"] = request.ResourceOwnerId
  1171. }
  1172. if !dara.IsNil(request.SignListShrink) {
  1173. query["SignList"] = request.SignListShrink
  1174. }
  1175. req := &openapiutil.OpenApiRequest{
  1176. Query: openapiutil.Query(query),
  1177. }
  1178. params := &openapiutil.Params{
  1179. Action: dara.String("CreateSmsAuthorizationLetter"),
  1180. Version: dara.String("2017-05-25"),
  1181. Protocol: dara.String("HTTPS"),
  1182. Pathname: dara.String("/"),
  1183. Method: dara.String("POST"),
  1184. AuthType: dara.String("AK"),
  1185. Style: dara.String("RPC"),
  1186. ReqBodyType: dara.String("formData"),
  1187. BodyType: dara.String("json"),
  1188. }
  1189. _result = &CreateSmsAuthorizationLetterResponse{}
  1190. _body, _err := client.CallApi(params, req, runtime)
  1191. if _err != nil {
  1192. return _result, _err
  1193. }
  1194. _err = dara.Convert(_body, &_result)
  1195. return _result, _err
  1196. }
  1197. // Summary:
  1198. //
  1199. // 创建委托授权书
  1200. //
  1201. // @param request - CreateSmsAuthorizationLetterRequest
  1202. //
  1203. // @return CreateSmsAuthorizationLetterResponse
  1204. func (client *Client) CreateSmsAuthorizationLetter(request *CreateSmsAuthorizationLetterRequest) (_result *CreateSmsAuthorizationLetterResponse, _err error) {
  1205. runtime := &dara.RuntimeOptions{}
  1206. _result = &CreateSmsAuthorizationLetterResponse{}
  1207. _body, _err := client.CreateSmsAuthorizationLetterWithOptions(request, runtime)
  1208. if _err != nil {
  1209. return _result, _err
  1210. }
  1211. _result = _body
  1212. return _result, _err
  1213. }
  1214. // Summary:
  1215. //
  1216. // # Create SMS Signature
  1217. //
  1218. // Description:
  1219. //
  1220. // - For details about the announcement of changes to the new and original interfaces, see [Announcement on Updates to SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  1221. //
  1222. // - Individual authenticated users can apply for one formal signature per natural day under the same Alibaba Cloud account, while enterprise authenticated users have no current restrictions. For details on the differences in rights between individual and enterprise users, please refer to [User Guide](https://help.aliyun.com/zh/sms/user-guide/usage-notes?spm).
  1223. //
  1224. // - Signature information applied through the interface will be synchronized in the SMS service console. For operations related to signatures in the console, see [SMS Signatures](https://help.aliyun.com/zh/sms/user-guide/create-signatures?spm).
  1225. //
  1226. // - After submitting the signature application, you can query the signature review status and details via the [GetSmsSign](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-getsmssign?spm) interface. You can also [Configure Receipt Messages](https://help.aliyun.com/zh/sms/developer-reference/configure-delivery-receipts-1?spm) and obtain signature review status messages through SignSmsReport.
  1227. //
  1228. // @param tmpReq - CreateSmsSignRequest
  1229. //
  1230. // @param runtime - runtime options for this request RuntimeOptions
  1231. //
  1232. // @return CreateSmsSignResponse
  1233. func (client *Client) CreateSmsSignWithOptions(tmpReq *CreateSmsSignRequest, runtime *dara.RuntimeOptions) (_result *CreateSmsSignResponse, _err error) {
  1234. if dara.BoolValue(client.EnableValidate) == true {
  1235. _err = tmpReq.Validate()
  1236. if _err != nil {
  1237. return _result, _err
  1238. }
  1239. }
  1240. request := &CreateSmsSignShrinkRequest{}
  1241. openapiutil.Convert(tmpReq, request)
  1242. if !dara.IsNil(tmpReq.MoreData) {
  1243. request.MoreDataShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.MoreData, dara.String("MoreData"), dara.String("json"))
  1244. }
  1245. query := map[string]interface{}{}
  1246. if !dara.IsNil(request.AppIcpRecordId) {
  1247. query["AppIcpRecordId"] = request.AppIcpRecordId
  1248. }
  1249. if !dara.IsNil(request.ApplySceneContent) {
  1250. query["ApplySceneContent"] = request.ApplySceneContent
  1251. }
  1252. if !dara.IsNil(request.AuthorizationLetterId) {
  1253. query["AuthorizationLetterId"] = request.AuthorizationLetterId
  1254. }
  1255. if !dara.IsNil(request.MoreDataShrink) {
  1256. query["MoreData"] = request.MoreDataShrink
  1257. }
  1258. if !dara.IsNil(request.OwnerId) {
  1259. query["OwnerId"] = request.OwnerId
  1260. }
  1261. if !dara.IsNil(request.QualificationId) {
  1262. query["QualificationId"] = request.QualificationId
  1263. }
  1264. if !dara.IsNil(request.Remark) {
  1265. query["Remark"] = request.Remark
  1266. }
  1267. if !dara.IsNil(request.ResourceOwnerAccount) {
  1268. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  1269. }
  1270. if !dara.IsNil(request.ResourceOwnerId) {
  1271. query["ResourceOwnerId"] = request.ResourceOwnerId
  1272. }
  1273. if !dara.IsNil(request.SignName) {
  1274. query["SignName"] = request.SignName
  1275. }
  1276. if !dara.IsNil(request.SignSource) {
  1277. query["SignSource"] = request.SignSource
  1278. }
  1279. if !dara.IsNil(request.SignType) {
  1280. query["SignType"] = request.SignType
  1281. }
  1282. if !dara.IsNil(request.ThirdParty) {
  1283. query["ThirdParty"] = request.ThirdParty
  1284. }
  1285. if !dara.IsNil(request.TrademarkId) {
  1286. query["TrademarkId"] = request.TrademarkId
  1287. }
  1288. req := &openapiutil.OpenApiRequest{
  1289. Query: openapiutil.Query(query),
  1290. }
  1291. params := &openapiutil.Params{
  1292. Action: dara.String("CreateSmsSign"),
  1293. Version: dara.String("2017-05-25"),
  1294. Protocol: dara.String("HTTPS"),
  1295. Pathname: dara.String("/"),
  1296. Method: dara.String("POST"),
  1297. AuthType: dara.String("AK"),
  1298. Style: dara.String("RPC"),
  1299. ReqBodyType: dara.String("formData"),
  1300. BodyType: dara.String("json"),
  1301. }
  1302. _result = &CreateSmsSignResponse{}
  1303. _body, _err := client.CallApi(params, req, runtime)
  1304. if _err != nil {
  1305. return _result, _err
  1306. }
  1307. _err = dara.Convert(_body, &_result)
  1308. return _result, _err
  1309. }
  1310. // Summary:
  1311. //
  1312. // # Create SMS Signature
  1313. //
  1314. // Description:
  1315. //
  1316. // - For details about the announcement of changes to the new and original interfaces, see [Announcement on Updates to SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  1317. //
  1318. // - Individual authenticated users can apply for one formal signature per natural day under the same Alibaba Cloud account, while enterprise authenticated users have no current restrictions. For details on the differences in rights between individual and enterprise users, please refer to [User Guide](https://help.aliyun.com/zh/sms/user-guide/usage-notes?spm).
  1319. //
  1320. // - Signature information applied through the interface will be synchronized in the SMS service console. For operations related to signatures in the console, see [SMS Signatures](https://help.aliyun.com/zh/sms/user-guide/create-signatures?spm).
  1321. //
  1322. // - After submitting the signature application, you can query the signature review status and details via the [GetSmsSign](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-getsmssign?spm) interface. You can also [Configure Receipt Messages](https://help.aliyun.com/zh/sms/developer-reference/configure-delivery-receipts-1?spm) and obtain signature review status messages through SignSmsReport.
  1323. //
  1324. // @param request - CreateSmsSignRequest
  1325. //
  1326. // @return CreateSmsSignResponse
  1327. func (client *Client) CreateSmsSign(request *CreateSmsSignRequest) (_result *CreateSmsSignResponse, _err error) {
  1328. runtime := &dara.RuntimeOptions{}
  1329. _result = &CreateSmsSignResponse{}
  1330. _body, _err := client.CreateSmsSignWithOptions(request, runtime)
  1331. if _err != nil {
  1332. return _result, _err
  1333. }
  1334. _result = _body
  1335. return _result, _err
  1336. }
  1337. // Summary:
  1338. //
  1339. // # Create SMS Template
  1340. //
  1341. // Description:
  1342. //
  1343. // - For details about the changes of this new interface compared to the original one, please refer to [Announcement on the Update of SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  1344. //
  1345. // - It is recommended to apply for SMS templates via the API with at least a 30-second interval between each request.
  1346. //
  1347. // - The template information applied through the API will be synchronized in the SMS service console. For operations related to templates in the console, please refer to SMS Templates.
  1348. //
  1349. // - After submitting the template application, you can query the audit status and details using the GetSmsTemplate interface. You can also configure delivery receipts to obtain the audit status messages via TemplateSmsReport.
  1350. //
  1351. // - Domestic SMS templates are not interchangeable with international/Hong Kong, Macao, and Taiwan SMS templates. Please apply for templates based on your business scenario.
  1352. //
  1353. // - Only enterprise-verified users can apply for promotional messages and international/Hong Kong, Macao, and Taiwan messages. For differences in rights between personal and enterprise users, please refer to Usage Instructions.
  1354. //
  1355. // @param tmpReq - CreateSmsTemplateRequest
  1356. //
  1357. // @param runtime - runtime options for this request RuntimeOptions
  1358. //
  1359. // @return CreateSmsTemplateResponse
  1360. func (client *Client) CreateSmsTemplateWithOptions(tmpReq *CreateSmsTemplateRequest, runtime *dara.RuntimeOptions) (_result *CreateSmsTemplateResponse, _err error) {
  1361. if dara.BoolValue(client.EnableValidate) == true {
  1362. _err = tmpReq.Validate()
  1363. if _err != nil {
  1364. return _result, _err
  1365. }
  1366. }
  1367. request := &CreateSmsTemplateShrinkRequest{}
  1368. openapiutil.Convert(tmpReq, request)
  1369. if !dara.IsNil(tmpReq.MoreData) {
  1370. request.MoreDataShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.MoreData, dara.String("MoreData"), dara.String("json"))
  1371. }
  1372. query := map[string]interface{}{}
  1373. if !dara.IsNil(request.ApplySceneContent) {
  1374. query["ApplySceneContent"] = request.ApplySceneContent
  1375. }
  1376. if !dara.IsNil(request.IntlType) {
  1377. query["IntlType"] = request.IntlType
  1378. }
  1379. if !dara.IsNil(request.MoreDataShrink) {
  1380. query["MoreData"] = request.MoreDataShrink
  1381. }
  1382. if !dara.IsNil(request.OwnerId) {
  1383. query["OwnerId"] = request.OwnerId
  1384. }
  1385. if !dara.IsNil(request.RelatedSignName) {
  1386. query["RelatedSignName"] = request.RelatedSignName
  1387. }
  1388. if !dara.IsNil(request.Remark) {
  1389. query["Remark"] = request.Remark
  1390. }
  1391. if !dara.IsNil(request.ResourceOwnerAccount) {
  1392. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  1393. }
  1394. if !dara.IsNil(request.ResourceOwnerId) {
  1395. query["ResourceOwnerId"] = request.ResourceOwnerId
  1396. }
  1397. if !dara.IsNil(request.TemplateContent) {
  1398. query["TemplateContent"] = request.TemplateContent
  1399. }
  1400. if !dara.IsNil(request.TemplateName) {
  1401. query["TemplateName"] = request.TemplateName
  1402. }
  1403. if !dara.IsNil(request.TemplateRule) {
  1404. query["TemplateRule"] = request.TemplateRule
  1405. }
  1406. if !dara.IsNil(request.TemplateType) {
  1407. query["TemplateType"] = request.TemplateType
  1408. }
  1409. if !dara.IsNil(request.TrafficDriving) {
  1410. query["TrafficDriving"] = request.TrafficDriving
  1411. }
  1412. req := &openapiutil.OpenApiRequest{
  1413. Query: openapiutil.Query(query),
  1414. }
  1415. params := &openapiutil.Params{
  1416. Action: dara.String("CreateSmsTemplate"),
  1417. Version: dara.String("2017-05-25"),
  1418. Protocol: dara.String("HTTPS"),
  1419. Pathname: dara.String("/"),
  1420. Method: dara.String("POST"),
  1421. AuthType: dara.String("AK"),
  1422. Style: dara.String("RPC"),
  1423. ReqBodyType: dara.String("formData"),
  1424. BodyType: dara.String("json"),
  1425. }
  1426. _result = &CreateSmsTemplateResponse{}
  1427. _body, _err := client.CallApi(params, req, runtime)
  1428. if _err != nil {
  1429. return _result, _err
  1430. }
  1431. _err = dara.Convert(_body, &_result)
  1432. return _result, _err
  1433. }
  1434. // Summary:
  1435. //
  1436. // # Create SMS Template
  1437. //
  1438. // Description:
  1439. //
  1440. // - For details about the changes of this new interface compared to the original one, please refer to [Announcement on the Update of SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  1441. //
  1442. // - It is recommended to apply for SMS templates via the API with at least a 30-second interval between each request.
  1443. //
  1444. // - The template information applied through the API will be synchronized in the SMS service console. For operations related to templates in the console, please refer to SMS Templates.
  1445. //
  1446. // - After submitting the template application, you can query the audit status and details using the GetSmsTemplate interface. You can also configure delivery receipts to obtain the audit status messages via TemplateSmsReport.
  1447. //
  1448. // - Domestic SMS templates are not interchangeable with international/Hong Kong, Macao, and Taiwan SMS templates. Please apply for templates based on your business scenario.
  1449. //
  1450. // - Only enterprise-verified users can apply for promotional messages and international/Hong Kong, Macao, and Taiwan messages. For differences in rights between personal and enterprise users, please refer to Usage Instructions.
  1451. //
  1452. // @param request - CreateSmsTemplateRequest
  1453. //
  1454. // @return CreateSmsTemplateResponse
  1455. func (client *Client) CreateSmsTemplate(request *CreateSmsTemplateRequest) (_result *CreateSmsTemplateResponse, _err error) {
  1456. runtime := &dara.RuntimeOptions{}
  1457. _result = &CreateSmsTemplateResponse{}
  1458. _body, _err := client.CreateSmsTemplateWithOptions(request, runtime)
  1459. if _err != nil {
  1460. return _result, _err
  1461. }
  1462. _result = _body
  1463. return _result, _err
  1464. }
  1465. // Summary:
  1466. //
  1467. // 创建商标对客openAPI
  1468. //
  1469. // @param request - CreateSmsTrademarkRequest
  1470. //
  1471. // @param runtime - runtime options for this request RuntimeOptions
  1472. //
  1473. // @return CreateSmsTrademarkResponse
  1474. func (client *Client) CreateSmsTrademarkWithOptions(request *CreateSmsTrademarkRequest, runtime *dara.RuntimeOptions) (_result *CreateSmsTrademarkResponse, _err error) {
  1475. if dara.BoolValue(client.EnableValidate) == true {
  1476. _err = request.Validate()
  1477. if _err != nil {
  1478. return _result, _err
  1479. }
  1480. }
  1481. query := map[string]interface{}{}
  1482. if !dara.IsNil(request.OwnerId) {
  1483. query["OwnerId"] = request.OwnerId
  1484. }
  1485. if !dara.IsNil(request.ResourceOwnerAccount) {
  1486. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  1487. }
  1488. if !dara.IsNil(request.ResourceOwnerId) {
  1489. query["ResourceOwnerId"] = request.ResourceOwnerId
  1490. }
  1491. if !dara.IsNil(request.TrademarkApplicantName) {
  1492. query["TrademarkApplicantName"] = request.TrademarkApplicantName
  1493. }
  1494. if !dara.IsNil(request.TrademarkEffExpDate) {
  1495. query["TrademarkEffExpDate"] = request.TrademarkEffExpDate
  1496. }
  1497. if !dara.IsNil(request.TrademarkName) {
  1498. query["TrademarkName"] = request.TrademarkName
  1499. }
  1500. if !dara.IsNil(request.TrademarkPic) {
  1501. query["TrademarkPic"] = request.TrademarkPic
  1502. }
  1503. if !dara.IsNil(request.TrademarkRegistrationNumber) {
  1504. query["TrademarkRegistrationNumber"] = request.TrademarkRegistrationNumber
  1505. }
  1506. req := &openapiutil.OpenApiRequest{
  1507. Query: openapiutil.Query(query),
  1508. }
  1509. params := &openapiutil.Params{
  1510. Action: dara.String("CreateSmsTrademark"),
  1511. Version: dara.String("2017-05-25"),
  1512. Protocol: dara.String("HTTPS"),
  1513. Pathname: dara.String("/"),
  1514. Method: dara.String("POST"),
  1515. AuthType: dara.String("AK"),
  1516. Style: dara.String("RPC"),
  1517. ReqBodyType: dara.String("formData"),
  1518. BodyType: dara.String("json"),
  1519. }
  1520. _result = &CreateSmsTrademarkResponse{}
  1521. _body, _err := client.CallApi(params, req, runtime)
  1522. if _err != nil {
  1523. return _result, _err
  1524. }
  1525. _err = dara.Convert(_body, &_result)
  1526. return _result, _err
  1527. }
  1528. // Summary:
  1529. //
  1530. // 创建商标对客openAPI
  1531. //
  1532. // @param request - CreateSmsTrademarkRequest
  1533. //
  1534. // @return CreateSmsTrademarkResponse
  1535. func (client *Client) CreateSmsTrademark(request *CreateSmsTrademarkRequest) (_result *CreateSmsTrademarkResponse, _err error) {
  1536. runtime := &dara.RuntimeOptions{}
  1537. _result = &CreateSmsTrademarkResponse{}
  1538. _body, _err := client.CreateSmsTrademarkWithOptions(request, runtime)
  1539. if _err != nil {
  1540. return _result, _err
  1541. }
  1542. _result = _body
  1543. return _result, _err
  1544. }
  1545. // Summary:
  1546. //
  1547. // 删除验证码签名
  1548. //
  1549. // @param request - DeleteExtCodeSignRequest
  1550. //
  1551. // @param runtime - runtime options for this request RuntimeOptions
  1552. //
  1553. // @return DeleteExtCodeSignResponse
  1554. func (client *Client) DeleteExtCodeSignWithOptions(request *DeleteExtCodeSignRequest, runtime *dara.RuntimeOptions) (_result *DeleteExtCodeSignResponse, _err error) {
  1555. if dara.BoolValue(client.EnableValidate) == true {
  1556. _err = request.Validate()
  1557. if _err != nil {
  1558. return _result, _err
  1559. }
  1560. }
  1561. query := map[string]interface{}{}
  1562. if !dara.IsNil(request.ExtCode) {
  1563. query["ExtCode"] = request.ExtCode
  1564. }
  1565. if !dara.IsNil(request.OwnerId) {
  1566. query["OwnerId"] = request.OwnerId
  1567. }
  1568. if !dara.IsNil(request.ResourceOwnerAccount) {
  1569. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  1570. }
  1571. if !dara.IsNil(request.ResourceOwnerId) {
  1572. query["ResourceOwnerId"] = request.ResourceOwnerId
  1573. }
  1574. if !dara.IsNil(request.SignName) {
  1575. query["SignName"] = request.SignName
  1576. }
  1577. req := &openapiutil.OpenApiRequest{
  1578. Query: openapiutil.Query(query),
  1579. }
  1580. params := &openapiutil.Params{
  1581. Action: dara.String("DeleteExtCodeSign"),
  1582. Version: dara.String("2017-05-25"),
  1583. Protocol: dara.String("HTTPS"),
  1584. Pathname: dara.String("/"),
  1585. Method: dara.String("POST"),
  1586. AuthType: dara.String("AK"),
  1587. Style: dara.String("RPC"),
  1588. ReqBodyType: dara.String("formData"),
  1589. BodyType: dara.String("json"),
  1590. }
  1591. _result = &DeleteExtCodeSignResponse{}
  1592. _body, _err := client.CallApi(params, req, runtime)
  1593. if _err != nil {
  1594. return _result, _err
  1595. }
  1596. _err = dara.Convert(_body, &_result)
  1597. return _result, _err
  1598. }
  1599. // Summary:
  1600. //
  1601. // 删除验证码签名
  1602. //
  1603. // @param request - DeleteExtCodeSignRequest
  1604. //
  1605. // @return DeleteExtCodeSignResponse
  1606. func (client *Client) DeleteExtCodeSign(request *DeleteExtCodeSignRequest) (_result *DeleteExtCodeSignResponse, _err error) {
  1607. runtime := &dara.RuntimeOptions{}
  1608. _result = &DeleteExtCodeSignResponse{}
  1609. _body, _err := client.DeleteExtCodeSignWithOptions(request, runtime)
  1610. if _err != nil {
  1611. return _result, _err
  1612. }
  1613. _result = _body
  1614. return _result, _err
  1615. }
  1616. // Summary:
  1617. //
  1618. // Deletes a short URL. After you delete a short URL, it cannot be changed to its original state.
  1619. //
  1620. // Description:
  1621. //
  1622. // ### QPS limits
  1623. //
  1624. // You can call this operation up to 100 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1625. //
  1626. // @param request - DeleteShortUrlRequest
  1627. //
  1628. // @param runtime - runtime options for this request RuntimeOptions
  1629. //
  1630. // @return DeleteShortUrlResponse
  1631. func (client *Client) DeleteShortUrlWithOptions(request *DeleteShortUrlRequest, runtime *dara.RuntimeOptions) (_result *DeleteShortUrlResponse, _err error) {
  1632. if dara.BoolValue(client.EnableValidate) == true {
  1633. _err = request.Validate()
  1634. if _err != nil {
  1635. return _result, _err
  1636. }
  1637. }
  1638. query := map[string]interface{}{}
  1639. if !dara.IsNil(request.OwnerId) {
  1640. query["OwnerId"] = request.OwnerId
  1641. }
  1642. if !dara.IsNil(request.ResourceOwnerAccount) {
  1643. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  1644. }
  1645. if !dara.IsNil(request.ResourceOwnerId) {
  1646. query["ResourceOwnerId"] = request.ResourceOwnerId
  1647. }
  1648. body := map[string]interface{}{}
  1649. if !dara.IsNil(request.SourceUrl) {
  1650. body["SourceUrl"] = request.SourceUrl
  1651. }
  1652. req := &openapiutil.OpenApiRequest{
  1653. Query: openapiutil.Query(query),
  1654. Body: openapiutil.ParseToMap(body),
  1655. }
  1656. params := &openapiutil.Params{
  1657. Action: dara.String("DeleteShortUrl"),
  1658. Version: dara.String("2017-05-25"),
  1659. Protocol: dara.String("HTTPS"),
  1660. Pathname: dara.String("/"),
  1661. Method: dara.String("POST"),
  1662. AuthType: dara.String("AK"),
  1663. Style: dara.String("RPC"),
  1664. ReqBodyType: dara.String("formData"),
  1665. BodyType: dara.String("json"),
  1666. }
  1667. _result = &DeleteShortUrlResponse{}
  1668. _body, _err := client.CallApi(params, req, runtime)
  1669. if _err != nil {
  1670. return _result, _err
  1671. }
  1672. _err = dara.Convert(_body, &_result)
  1673. return _result, _err
  1674. }
  1675. // Summary:
  1676. //
  1677. // Deletes a short URL. After you delete a short URL, it cannot be changed to its original state.
  1678. //
  1679. // Description:
  1680. //
  1681. // ### QPS limits
  1682. //
  1683. // You can call this operation up to 100 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1684. //
  1685. // @param request - DeleteShortUrlRequest
  1686. //
  1687. // @return DeleteShortUrlResponse
  1688. func (client *Client) DeleteShortUrl(request *DeleteShortUrlRequest) (_result *DeleteShortUrlResponse, _err error) {
  1689. runtime := &dara.RuntimeOptions{}
  1690. _result = &DeleteShortUrlResponse{}
  1691. _body, _err := client.DeleteShortUrlWithOptions(request, runtime)
  1692. if _err != nil {
  1693. return _result, _err
  1694. }
  1695. _result = _body
  1696. return _result, _err
  1697. }
  1698. // Summary:
  1699. //
  1700. // 删除资质对客openAPI
  1701. //
  1702. // @param request - DeleteSmsQualificationRequest
  1703. //
  1704. // @param runtime - runtime options for this request RuntimeOptions
  1705. //
  1706. // @return DeleteSmsQualificationResponse
  1707. func (client *Client) DeleteSmsQualificationWithOptions(request *DeleteSmsQualificationRequest, runtime *dara.RuntimeOptions) (_result *DeleteSmsQualificationResponse, _err error) {
  1708. if dara.BoolValue(client.EnableValidate) == true {
  1709. _err = request.Validate()
  1710. if _err != nil {
  1711. return _result, _err
  1712. }
  1713. }
  1714. query := map[string]interface{}{}
  1715. if !dara.IsNil(request.OrderId) {
  1716. query["OrderId"] = request.OrderId
  1717. }
  1718. if !dara.IsNil(request.OwnerId) {
  1719. query["OwnerId"] = request.OwnerId
  1720. }
  1721. if !dara.IsNil(request.QualificationGroupId) {
  1722. query["QualificationGroupId"] = request.QualificationGroupId
  1723. }
  1724. if !dara.IsNil(request.ResourceOwnerAccount) {
  1725. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  1726. }
  1727. if !dara.IsNil(request.ResourceOwnerId) {
  1728. query["ResourceOwnerId"] = request.ResourceOwnerId
  1729. }
  1730. req := &openapiutil.OpenApiRequest{
  1731. Query: openapiutil.Query(query),
  1732. }
  1733. params := &openapiutil.Params{
  1734. Action: dara.String("DeleteSmsQualification"),
  1735. Version: dara.String("2017-05-25"),
  1736. Protocol: dara.String("HTTPS"),
  1737. Pathname: dara.String("/"),
  1738. Method: dara.String("POST"),
  1739. AuthType: dara.String("AK"),
  1740. Style: dara.String("RPC"),
  1741. ReqBodyType: dara.String("formData"),
  1742. BodyType: dara.String("json"),
  1743. }
  1744. _result = &DeleteSmsQualificationResponse{}
  1745. _body, _err := client.CallApi(params, req, runtime)
  1746. if _err != nil {
  1747. return _result, _err
  1748. }
  1749. _err = dara.Convert(_body, &_result)
  1750. return _result, _err
  1751. }
  1752. // Summary:
  1753. //
  1754. // 删除资质对客openAPI
  1755. //
  1756. // @param request - DeleteSmsQualificationRequest
  1757. //
  1758. // @return DeleteSmsQualificationResponse
  1759. func (client *Client) DeleteSmsQualification(request *DeleteSmsQualificationRequest) (_result *DeleteSmsQualificationResponse, _err error) {
  1760. runtime := &dara.RuntimeOptions{}
  1761. _result = &DeleteSmsQualificationResponse{}
  1762. _body, _err := client.DeleteSmsQualificationWithOptions(request, runtime)
  1763. if _err != nil {
  1764. return _result, _err
  1765. }
  1766. _result = _body
  1767. return _result, _err
  1768. }
  1769. // Summary:
  1770. //
  1771. // Deletes a signature.
  1772. //
  1773. // Description:
  1774. //
  1775. // You cannot delete a signature that has not been approved.
  1776. //
  1777. // - After you delete a signature, you cannot recover it. Proceed with caution.
  1778. //
  1779. // ### QPS limits
  1780. //
  1781. // You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1782. //
  1783. // @param request - DeleteSmsSignRequest
  1784. //
  1785. // @param runtime - runtime options for this request RuntimeOptions
  1786. //
  1787. // @return DeleteSmsSignResponse
  1788. func (client *Client) DeleteSmsSignWithOptions(request *DeleteSmsSignRequest, runtime *dara.RuntimeOptions) (_result *DeleteSmsSignResponse, _err error) {
  1789. if dara.BoolValue(client.EnableValidate) == true {
  1790. _err = request.Validate()
  1791. if _err != nil {
  1792. return _result, _err
  1793. }
  1794. }
  1795. query := map[string]interface{}{}
  1796. if !dara.IsNil(request.OwnerId) {
  1797. query["OwnerId"] = request.OwnerId
  1798. }
  1799. if !dara.IsNil(request.ResourceOwnerAccount) {
  1800. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  1801. }
  1802. if !dara.IsNil(request.ResourceOwnerId) {
  1803. query["ResourceOwnerId"] = request.ResourceOwnerId
  1804. }
  1805. if !dara.IsNil(request.SignName) {
  1806. query["SignName"] = request.SignName
  1807. }
  1808. req := &openapiutil.OpenApiRequest{
  1809. Query: openapiutil.Query(query),
  1810. }
  1811. params := &openapiutil.Params{
  1812. Action: dara.String("DeleteSmsSign"),
  1813. Version: dara.String("2017-05-25"),
  1814. Protocol: dara.String("HTTPS"),
  1815. Pathname: dara.String("/"),
  1816. Method: dara.String("POST"),
  1817. AuthType: dara.String("AK"),
  1818. Style: dara.String("RPC"),
  1819. ReqBodyType: dara.String("formData"),
  1820. BodyType: dara.String("json"),
  1821. }
  1822. _result = &DeleteSmsSignResponse{}
  1823. _body, _err := client.CallApi(params, req, runtime)
  1824. if _err != nil {
  1825. return _result, _err
  1826. }
  1827. _err = dara.Convert(_body, &_result)
  1828. return _result, _err
  1829. }
  1830. // Summary:
  1831. //
  1832. // Deletes a signature.
  1833. //
  1834. // Description:
  1835. //
  1836. // You cannot delete a signature that has not been approved.
  1837. //
  1838. // - After you delete a signature, you cannot recover it. Proceed with caution.
  1839. //
  1840. // ### QPS limits
  1841. //
  1842. // You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1843. //
  1844. // @param request - DeleteSmsSignRequest
  1845. //
  1846. // @return DeleteSmsSignResponse
  1847. func (client *Client) DeleteSmsSign(request *DeleteSmsSignRequest) (_result *DeleteSmsSignResponse, _err error) {
  1848. runtime := &dara.RuntimeOptions{}
  1849. _result = &DeleteSmsSignResponse{}
  1850. _body, _err := client.DeleteSmsSignWithOptions(request, runtime)
  1851. if _err != nil {
  1852. return _result, _err
  1853. }
  1854. _result = _body
  1855. return _result, _err
  1856. }
  1857. // Summary:
  1858. //
  1859. // Deletes a message template.
  1860. //
  1861. // Description:
  1862. //
  1863. // Message templates pending approval can be withdrawn. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  1864. //
  1865. // - Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  1866. //
  1867. // - You cannot recover deleted message templates. Proceed with caution.
  1868. //
  1869. // ### QPS limits
  1870. //
  1871. // You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1872. //
  1873. // @param request - DeleteSmsTemplateRequest
  1874. //
  1875. // @param runtime - runtime options for this request RuntimeOptions
  1876. //
  1877. // @return DeleteSmsTemplateResponse
  1878. func (client *Client) DeleteSmsTemplateWithOptions(request *DeleteSmsTemplateRequest, runtime *dara.RuntimeOptions) (_result *DeleteSmsTemplateResponse, _err error) {
  1879. if dara.BoolValue(client.EnableValidate) == true {
  1880. _err = request.Validate()
  1881. if _err != nil {
  1882. return _result, _err
  1883. }
  1884. }
  1885. query := map[string]interface{}{}
  1886. if !dara.IsNil(request.OwnerId) {
  1887. query["OwnerId"] = request.OwnerId
  1888. }
  1889. if !dara.IsNil(request.ResourceOwnerAccount) {
  1890. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  1891. }
  1892. if !dara.IsNil(request.ResourceOwnerId) {
  1893. query["ResourceOwnerId"] = request.ResourceOwnerId
  1894. }
  1895. if !dara.IsNil(request.TemplateCode) {
  1896. query["TemplateCode"] = request.TemplateCode
  1897. }
  1898. req := &openapiutil.OpenApiRequest{
  1899. Query: openapiutil.Query(query),
  1900. }
  1901. params := &openapiutil.Params{
  1902. Action: dara.String("DeleteSmsTemplate"),
  1903. Version: dara.String("2017-05-25"),
  1904. Protocol: dara.String("HTTPS"),
  1905. Pathname: dara.String("/"),
  1906. Method: dara.String("POST"),
  1907. AuthType: dara.String("AK"),
  1908. Style: dara.String("RPC"),
  1909. ReqBodyType: dara.String("formData"),
  1910. BodyType: dara.String("json"),
  1911. }
  1912. _result = &DeleteSmsTemplateResponse{}
  1913. _body, _err := client.CallApi(params, req, runtime)
  1914. if _err != nil {
  1915. return _result, _err
  1916. }
  1917. _err = dara.Convert(_body, &_result)
  1918. return _result, _err
  1919. }
  1920. // Summary:
  1921. //
  1922. // Deletes a message template.
  1923. //
  1924. // Description:
  1925. //
  1926. // Message templates pending approval can be withdrawn. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  1927. //
  1928. // - Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview).
  1929. //
  1930. // - You cannot recover deleted message templates. Proceed with caution.
  1931. //
  1932. // ### QPS limits
  1933. //
  1934. // You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  1935. //
  1936. // @param request - DeleteSmsTemplateRequest
  1937. //
  1938. // @return DeleteSmsTemplateResponse
  1939. func (client *Client) DeleteSmsTemplate(request *DeleteSmsTemplateRequest) (_result *DeleteSmsTemplateResponse, _err error) {
  1940. runtime := &dara.RuntimeOptions{}
  1941. _result = &DeleteSmsTemplateResponse{}
  1942. _body, _err := client.DeleteSmsTemplateWithOptions(request, runtime)
  1943. if _err != nil {
  1944. return _result, _err
  1945. }
  1946. _result = _body
  1947. return _result, _err
  1948. }
  1949. // Summary:
  1950. //
  1951. // # Query card sending details
  1952. //
  1953. // @param request - GetCardSmsDetailsRequest
  1954. //
  1955. // @param runtime - runtime options for this request RuntimeOptions
  1956. //
  1957. // @return GetCardSmsDetailsResponse
  1958. func (client *Client) GetCardSmsDetailsWithOptions(request *GetCardSmsDetailsRequest, runtime *dara.RuntimeOptions) (_result *GetCardSmsDetailsResponse, _err error) {
  1959. if dara.BoolValue(client.EnableValidate) == true {
  1960. _err = request.Validate()
  1961. if _err != nil {
  1962. return _result, _err
  1963. }
  1964. }
  1965. query := map[string]interface{}{}
  1966. if !dara.IsNil(request.BizCardId) {
  1967. query["BizCardId"] = request.BizCardId
  1968. }
  1969. if !dara.IsNil(request.BizDigitId) {
  1970. query["BizDigitId"] = request.BizDigitId
  1971. }
  1972. if !dara.IsNil(request.BizSmsId) {
  1973. query["BizSmsId"] = request.BizSmsId
  1974. }
  1975. if !dara.IsNil(request.CurrentPage) {
  1976. query["CurrentPage"] = request.CurrentPage
  1977. }
  1978. if !dara.IsNil(request.OwnerId) {
  1979. query["OwnerId"] = request.OwnerId
  1980. }
  1981. if !dara.IsNil(request.PageSize) {
  1982. query["PageSize"] = request.PageSize
  1983. }
  1984. if !dara.IsNil(request.PhoneNumber) {
  1985. query["PhoneNumber"] = request.PhoneNumber
  1986. }
  1987. if !dara.IsNil(request.ResourceOwnerAccount) {
  1988. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  1989. }
  1990. if !dara.IsNil(request.ResourceOwnerId) {
  1991. query["ResourceOwnerId"] = request.ResourceOwnerId
  1992. }
  1993. if !dara.IsNil(request.SendDate) {
  1994. query["SendDate"] = request.SendDate
  1995. }
  1996. req := &openapiutil.OpenApiRequest{
  1997. Query: openapiutil.Query(query),
  1998. }
  1999. params := &openapiutil.Params{
  2000. Action: dara.String("GetCardSmsDetails"),
  2001. Version: dara.String("2017-05-25"),
  2002. Protocol: dara.String("HTTPS"),
  2003. Pathname: dara.String("/"),
  2004. Method: dara.String("POST"),
  2005. AuthType: dara.String("AK"),
  2006. Style: dara.String("RPC"),
  2007. ReqBodyType: dara.String("formData"),
  2008. BodyType: dara.String("json"),
  2009. }
  2010. _result = &GetCardSmsDetailsResponse{}
  2011. _body, _err := client.CallApi(params, req, runtime)
  2012. if _err != nil {
  2013. return _result, _err
  2014. }
  2015. _err = dara.Convert(_body, &_result)
  2016. return _result, _err
  2017. }
  2018. // Summary:
  2019. //
  2020. // # Query card sending details
  2021. //
  2022. // @param request - GetCardSmsDetailsRequest
  2023. //
  2024. // @return GetCardSmsDetailsResponse
  2025. func (client *Client) GetCardSmsDetails(request *GetCardSmsDetailsRequest) (_result *GetCardSmsDetailsResponse, _err error) {
  2026. runtime := &dara.RuntimeOptions{}
  2027. _result = &GetCardSmsDetailsResponse{}
  2028. _body, _err := client.GetCardSmsDetailsWithOptions(request, runtime)
  2029. if _err != nil {
  2030. return _result, _err
  2031. }
  2032. _result = _body
  2033. return _result, _err
  2034. }
  2035. // Summary:
  2036. //
  2037. // Queries the short URLs of a card messages template.
  2038. //
  2039. // Description:
  2040. //
  2041. // ### QPS limit
  2042. //
  2043. // You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2044. //
  2045. // @param request - GetCardSmsLinkRequest
  2046. //
  2047. // @param runtime - runtime options for this request RuntimeOptions
  2048. //
  2049. // @return GetCardSmsLinkResponse
  2050. func (client *Client) GetCardSmsLinkWithOptions(request *GetCardSmsLinkRequest, runtime *dara.RuntimeOptions) (_result *GetCardSmsLinkResponse, _err error) {
  2051. if dara.BoolValue(client.EnableValidate) == true {
  2052. _err = request.Validate()
  2053. if _err != nil {
  2054. return _result, _err
  2055. }
  2056. }
  2057. query := map[string]interface{}{}
  2058. if !dara.IsNil(request.CardCodeType) {
  2059. query["CardCodeType"] = request.CardCodeType
  2060. }
  2061. if !dara.IsNil(request.CardLinkType) {
  2062. query["CardLinkType"] = request.CardLinkType
  2063. }
  2064. if !dara.IsNil(request.CardTemplateCode) {
  2065. query["CardTemplateCode"] = request.CardTemplateCode
  2066. }
  2067. if !dara.IsNil(request.CardTemplateParamJson) {
  2068. query["CardTemplateParamJson"] = request.CardTemplateParamJson
  2069. }
  2070. if !dara.IsNil(request.CustomShortCodeJson) {
  2071. query["CustomShortCodeJson"] = request.CustomShortCodeJson
  2072. }
  2073. if !dara.IsNil(request.Domain) {
  2074. query["Domain"] = request.Domain
  2075. }
  2076. if !dara.IsNil(request.OutId) {
  2077. query["OutId"] = request.OutId
  2078. }
  2079. if !dara.IsNil(request.PhoneNumberJson) {
  2080. query["PhoneNumberJson"] = request.PhoneNumberJson
  2081. }
  2082. if !dara.IsNil(request.SignNameJson) {
  2083. query["SignNameJson"] = request.SignNameJson
  2084. }
  2085. req := &openapiutil.OpenApiRequest{
  2086. Query: openapiutil.Query(query),
  2087. }
  2088. params := &openapiutil.Params{
  2089. Action: dara.String("GetCardSmsLink"),
  2090. Version: dara.String("2017-05-25"),
  2091. Protocol: dara.String("HTTPS"),
  2092. Pathname: dara.String("/"),
  2093. Method: dara.String("POST"),
  2094. AuthType: dara.String("AK"),
  2095. Style: dara.String("RPC"),
  2096. ReqBodyType: dara.String("formData"),
  2097. BodyType: dara.String("json"),
  2098. }
  2099. _result = &GetCardSmsLinkResponse{}
  2100. _body, _err := client.CallApi(params, req, runtime)
  2101. if _err != nil {
  2102. return _result, _err
  2103. }
  2104. _err = dara.Convert(_body, &_result)
  2105. return _result, _err
  2106. }
  2107. // Summary:
  2108. //
  2109. // Queries the short URLs of a card messages template.
  2110. //
  2111. // Description:
  2112. //
  2113. // ### QPS limit
  2114. //
  2115. // You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2116. //
  2117. // @param request - GetCardSmsLinkRequest
  2118. //
  2119. // @return GetCardSmsLinkResponse
  2120. func (client *Client) GetCardSmsLink(request *GetCardSmsLinkRequest) (_result *GetCardSmsLinkResponse, _err error) {
  2121. runtime := &dara.RuntimeOptions{}
  2122. _result = &GetCardSmsLinkResponse{}
  2123. _body, _err := client.GetCardSmsLinkWithOptions(request, runtime)
  2124. if _err != nil {
  2125. return _result, _err
  2126. }
  2127. _result = _body
  2128. return _result, _err
  2129. }
  2130. // Summary:
  2131. //
  2132. // Converts a resource uploaded to the specified Object Storage Service (OSS) bucket for unified management. Then, a resource ID is returned. You can manage the resource based on the ID.
  2133. //
  2134. // Description:
  2135. //
  2136. // ### QPS limit
  2137. //
  2138. // You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2139. //
  2140. // @param request - GetMediaResourceIdRequest
  2141. //
  2142. // @param runtime - runtime options for this request RuntimeOptions
  2143. //
  2144. // @return GetMediaResourceIdResponse
  2145. func (client *Client) GetMediaResourceIdWithOptions(request *GetMediaResourceIdRequest, runtime *dara.RuntimeOptions) (_result *GetMediaResourceIdResponse, _err error) {
  2146. if dara.BoolValue(client.EnableValidate) == true {
  2147. _err = request.Validate()
  2148. if _err != nil {
  2149. return _result, _err
  2150. }
  2151. }
  2152. query := map[string]interface{}{}
  2153. if !dara.IsNil(request.ExtendInfo) {
  2154. query["ExtendInfo"] = request.ExtendInfo
  2155. }
  2156. if !dara.IsNil(request.FileSize) {
  2157. query["FileSize"] = request.FileSize
  2158. }
  2159. if !dara.IsNil(request.Memo) {
  2160. query["Memo"] = request.Memo
  2161. }
  2162. if !dara.IsNil(request.OssKey) {
  2163. query["OssKey"] = request.OssKey
  2164. }
  2165. if !dara.IsNil(request.ResourceType) {
  2166. query["ResourceType"] = request.ResourceType
  2167. }
  2168. req := &openapiutil.OpenApiRequest{
  2169. Query: openapiutil.Query(query),
  2170. }
  2171. params := &openapiutil.Params{
  2172. Action: dara.String("GetMediaResourceId"),
  2173. Version: dara.String("2017-05-25"),
  2174. Protocol: dara.String("HTTPS"),
  2175. Pathname: dara.String("/"),
  2176. Method: dara.String("POST"),
  2177. AuthType: dara.String("AK"),
  2178. Style: dara.String("RPC"),
  2179. ReqBodyType: dara.String("formData"),
  2180. BodyType: dara.String("json"),
  2181. }
  2182. _result = &GetMediaResourceIdResponse{}
  2183. _body, _err := client.CallApi(params, req, runtime)
  2184. if _err != nil {
  2185. return _result, _err
  2186. }
  2187. _err = dara.Convert(_body, &_result)
  2188. return _result, _err
  2189. }
  2190. // Summary:
  2191. //
  2192. // Converts a resource uploaded to the specified Object Storage Service (OSS) bucket for unified management. Then, a resource ID is returned. You can manage the resource based on the ID.
  2193. //
  2194. // Description:
  2195. //
  2196. // ### QPS limit
  2197. //
  2198. // You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2199. //
  2200. // @param request - GetMediaResourceIdRequest
  2201. //
  2202. // @return GetMediaResourceIdResponse
  2203. func (client *Client) GetMediaResourceId(request *GetMediaResourceIdRequest) (_result *GetMediaResourceIdResponse, _err error) {
  2204. runtime := &dara.RuntimeOptions{}
  2205. _result = &GetMediaResourceIdResponse{}
  2206. _body, _err := client.GetMediaResourceIdWithOptions(request, runtime)
  2207. if _err != nil {
  2208. return _result, _err
  2209. }
  2210. _result = _body
  2211. return _result, _err
  2212. }
  2213. // Summary:
  2214. //
  2215. // Queries the OSS configuration information about card messages.
  2216. //
  2217. // Description:
  2218. //
  2219. // Resources such as images and videos used for card message templates can be uploaded to Object Storage Service (OSS) buckets for storage. For more information, see [Upload files to OSS](https://help.aliyun.com/document_detail/437303.html).
  2220. //
  2221. // ### QPS limit
  2222. //
  2223. // You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2224. //
  2225. // @param request - GetOSSInfoForCardTemplateRequest
  2226. //
  2227. // @param runtime - runtime options for this request RuntimeOptions
  2228. //
  2229. // @return GetOSSInfoForCardTemplateResponse
  2230. func (client *Client) GetOSSInfoForCardTemplateWithOptions(runtime *dara.RuntimeOptions) (_result *GetOSSInfoForCardTemplateResponse, _err error) {
  2231. req := &openapiutil.OpenApiRequest{}
  2232. params := &openapiutil.Params{
  2233. Action: dara.String("GetOSSInfoForCardTemplate"),
  2234. Version: dara.String("2017-05-25"),
  2235. Protocol: dara.String("HTTPS"),
  2236. Pathname: dara.String("/"),
  2237. Method: dara.String("POST"),
  2238. AuthType: dara.String("AK"),
  2239. Style: dara.String("RPC"),
  2240. ReqBodyType: dara.String("formData"),
  2241. BodyType: dara.String("json"),
  2242. }
  2243. _result = &GetOSSInfoForCardTemplateResponse{}
  2244. _body, _err := client.CallApi(params, req, runtime)
  2245. if _err != nil {
  2246. return _result, _err
  2247. }
  2248. _err = dara.Convert(_body, &_result)
  2249. return _result, _err
  2250. }
  2251. // Summary:
  2252. //
  2253. // Queries the OSS configuration information about card messages.
  2254. //
  2255. // Description:
  2256. //
  2257. // Resources such as images and videos used for card message templates can be uploaded to Object Storage Service (OSS) buckets for storage. For more information, see [Upload files to OSS](https://help.aliyun.com/document_detail/437303.html).
  2258. //
  2259. // ### QPS limit
  2260. //
  2261. // You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2262. //
  2263. // @return GetOSSInfoForCardTemplateResponse
  2264. func (client *Client) GetOSSInfoForCardTemplate() (_result *GetOSSInfoForCardTemplateResponse, _err error) {
  2265. runtime := &dara.RuntimeOptions{}
  2266. _result = &GetOSSInfoForCardTemplateResponse{}
  2267. _body, _err := client.GetOSSInfoForCardTemplateWithOptions(runtime)
  2268. if _err != nil {
  2269. return _result, _err
  2270. }
  2271. _result = _body
  2272. return _result, _err
  2273. }
  2274. // Summary:
  2275. //
  2276. // # SMS File Upload, Get Authorization Info
  2277. //
  2278. // Description:
  2279. //
  2280. // - When creating signatures or templates, you can upload materials such as login pages with links, backend page screenshots, software copyrights, supplementary agreements, etc. This helps the review personnel understand your business details. If there are multiple materials, they can be combined into one file, supporting png, jpg, jpeg, doc, docx, pdf formats.
  2281. //
  2282. // - For additional materials needed when creating signatures or templates, you can upload them to the OSS file system for storage. For file upload operations, refer to [OSS File Upload](https://help.aliyun.com/zh/sms/upload-files-through-oss).
  2283. //
  2284. // @param request - GetOSSInfoForUploadFileRequest
  2285. //
  2286. // @param runtime - runtime options for this request RuntimeOptions
  2287. //
  2288. // @return GetOSSInfoForUploadFileResponse
  2289. func (client *Client) GetOSSInfoForUploadFileWithOptions(request *GetOSSInfoForUploadFileRequest, runtime *dara.RuntimeOptions) (_result *GetOSSInfoForUploadFileResponse, _err error) {
  2290. if dara.BoolValue(client.EnableValidate) == true {
  2291. _err = request.Validate()
  2292. if _err != nil {
  2293. return _result, _err
  2294. }
  2295. }
  2296. query := map[string]interface{}{}
  2297. if !dara.IsNil(request.BizType) {
  2298. query["BizType"] = request.BizType
  2299. }
  2300. if !dara.IsNil(request.OwnerId) {
  2301. query["OwnerId"] = request.OwnerId
  2302. }
  2303. if !dara.IsNil(request.ResourceOwnerAccount) {
  2304. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  2305. }
  2306. if !dara.IsNil(request.ResourceOwnerId) {
  2307. query["ResourceOwnerId"] = request.ResourceOwnerId
  2308. }
  2309. req := &openapiutil.OpenApiRequest{
  2310. Query: openapiutil.Query(query),
  2311. }
  2312. params := &openapiutil.Params{
  2313. Action: dara.String("GetOSSInfoForUploadFile"),
  2314. Version: dara.String("2017-05-25"),
  2315. Protocol: dara.String("HTTPS"),
  2316. Pathname: dara.String("/"),
  2317. Method: dara.String("POST"),
  2318. AuthType: dara.String("AK"),
  2319. Style: dara.String("RPC"),
  2320. ReqBodyType: dara.String("formData"),
  2321. BodyType: dara.String("json"),
  2322. }
  2323. _result = &GetOSSInfoForUploadFileResponse{}
  2324. _body, _err := client.CallApi(params, req, runtime)
  2325. if _err != nil {
  2326. return _result, _err
  2327. }
  2328. _err = dara.Convert(_body, &_result)
  2329. return _result, _err
  2330. }
  2331. // Summary:
  2332. //
  2333. // # SMS File Upload, Get Authorization Info
  2334. //
  2335. // Description:
  2336. //
  2337. // - When creating signatures or templates, you can upload materials such as login pages with links, backend page screenshots, software copyrights, supplementary agreements, etc. This helps the review personnel understand your business details. If there are multiple materials, they can be combined into one file, supporting png, jpg, jpeg, doc, docx, pdf formats.
  2338. //
  2339. // - For additional materials needed when creating signatures or templates, you can upload them to the OSS file system for storage. For file upload operations, refer to [OSS File Upload](https://help.aliyun.com/zh/sms/upload-files-through-oss).
  2340. //
  2341. // @param request - GetOSSInfoForUploadFileRequest
  2342. //
  2343. // @return GetOSSInfoForUploadFileResponse
  2344. func (client *Client) GetOSSInfoForUploadFile(request *GetOSSInfoForUploadFileRequest) (_result *GetOSSInfoForUploadFileResponse, _err error) {
  2345. runtime := &dara.RuntimeOptions{}
  2346. _result = &GetOSSInfoForUploadFileResponse{}
  2347. _body, _err := client.GetOSSInfoForUploadFileWithOptions(request, runtime)
  2348. if _err != nil {
  2349. return _result, _err
  2350. }
  2351. _result = _body
  2352. return _result, _err
  2353. }
  2354. // Summary:
  2355. //
  2356. // 上传文件获取oss配置
  2357. //
  2358. // @param request - GetQualificationOssInfoRequest
  2359. //
  2360. // @param runtime - runtime options for this request RuntimeOptions
  2361. //
  2362. // @return GetQualificationOssInfoResponse
  2363. func (client *Client) GetQualificationOssInfoWithOptions(request *GetQualificationOssInfoRequest, runtime *dara.RuntimeOptions) (_result *GetQualificationOssInfoResponse, _err error) {
  2364. if dara.BoolValue(client.EnableValidate) == true {
  2365. _err = request.Validate()
  2366. if _err != nil {
  2367. return _result, _err
  2368. }
  2369. }
  2370. query := map[string]interface{}{}
  2371. if !dara.IsNil(request.BizType) {
  2372. query["BizType"] = request.BizType
  2373. }
  2374. if !dara.IsNil(request.OwnerId) {
  2375. query["OwnerId"] = request.OwnerId
  2376. }
  2377. if !dara.IsNil(request.ResourceOwnerAccount) {
  2378. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  2379. }
  2380. if !dara.IsNil(request.ResourceOwnerId) {
  2381. query["ResourceOwnerId"] = request.ResourceOwnerId
  2382. }
  2383. req := &openapiutil.OpenApiRequest{
  2384. Query: openapiutil.Query(query),
  2385. }
  2386. params := &openapiutil.Params{
  2387. Action: dara.String("GetQualificationOssInfo"),
  2388. Version: dara.String("2017-05-25"),
  2389. Protocol: dara.String("HTTPS"),
  2390. Pathname: dara.String("/"),
  2391. Method: dara.String("POST"),
  2392. AuthType: dara.String("AK"),
  2393. Style: dara.String("RPC"),
  2394. ReqBodyType: dara.String("formData"),
  2395. BodyType: dara.String("json"),
  2396. }
  2397. _result = &GetQualificationOssInfoResponse{}
  2398. _body, _err := client.CallApi(params, req, runtime)
  2399. if _err != nil {
  2400. return _result, _err
  2401. }
  2402. _err = dara.Convert(_body, &_result)
  2403. return _result, _err
  2404. }
  2405. // Summary:
  2406. //
  2407. // 上传文件获取oss配置
  2408. //
  2409. // @param request - GetQualificationOssInfoRequest
  2410. //
  2411. // @return GetQualificationOssInfoResponse
  2412. func (client *Client) GetQualificationOssInfo(request *GetQualificationOssInfoRequest) (_result *GetQualificationOssInfoResponse, _err error) {
  2413. runtime := &dara.RuntimeOptions{}
  2414. _result = &GetQualificationOssInfoResponse{}
  2415. _body, _err := client.GetQualificationOssInfoWithOptions(request, runtime)
  2416. if _err != nil {
  2417. return _result, _err
  2418. }
  2419. _result = _body
  2420. return _result, _err
  2421. }
  2422. // Summary:
  2423. //
  2424. // 获取OCR的OSS信息
  2425. //
  2426. // @param request - GetSmsOcrOssInfoRequest
  2427. //
  2428. // @param runtime - runtime options for this request RuntimeOptions
  2429. //
  2430. // @return GetSmsOcrOssInfoResponse
  2431. func (client *Client) GetSmsOcrOssInfoWithOptions(request *GetSmsOcrOssInfoRequest, runtime *dara.RuntimeOptions) (_result *GetSmsOcrOssInfoResponse, _err error) {
  2432. if dara.BoolValue(client.EnableValidate) == true {
  2433. _err = request.Validate()
  2434. if _err != nil {
  2435. return _result, _err
  2436. }
  2437. }
  2438. query := map[string]interface{}{}
  2439. if !dara.IsNil(request.OwnerId) {
  2440. query["OwnerId"] = request.OwnerId
  2441. }
  2442. if !dara.IsNil(request.ResourceOwnerAccount) {
  2443. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  2444. }
  2445. if !dara.IsNil(request.ResourceOwnerId) {
  2446. query["ResourceOwnerId"] = request.ResourceOwnerId
  2447. }
  2448. if !dara.IsNil(request.TaskType) {
  2449. query["TaskType"] = request.TaskType
  2450. }
  2451. req := &openapiutil.OpenApiRequest{
  2452. Query: openapiutil.Query(query),
  2453. }
  2454. params := &openapiutil.Params{
  2455. Action: dara.String("GetSmsOcrOssInfo"),
  2456. Version: dara.String("2017-05-25"),
  2457. Protocol: dara.String("HTTPS"),
  2458. Pathname: dara.String("/"),
  2459. Method: dara.String("POST"),
  2460. AuthType: dara.String("AK"),
  2461. Style: dara.String("RPC"),
  2462. ReqBodyType: dara.String("formData"),
  2463. BodyType: dara.String("json"),
  2464. }
  2465. _result = &GetSmsOcrOssInfoResponse{}
  2466. _body, _err := client.CallApi(params, req, runtime)
  2467. if _err != nil {
  2468. return _result, _err
  2469. }
  2470. _err = dara.Convert(_body, &_result)
  2471. return _result, _err
  2472. }
  2473. // Summary:
  2474. //
  2475. // 获取OCR的OSS信息
  2476. //
  2477. // @param request - GetSmsOcrOssInfoRequest
  2478. //
  2479. // @return GetSmsOcrOssInfoResponse
  2480. func (client *Client) GetSmsOcrOssInfo(request *GetSmsOcrOssInfoRequest) (_result *GetSmsOcrOssInfoResponse, _err error) {
  2481. runtime := &dara.RuntimeOptions{}
  2482. _result = &GetSmsOcrOssInfoResponse{}
  2483. _body, _err := client.GetSmsOcrOssInfoWithOptions(request, runtime)
  2484. if _err != nil {
  2485. return _result, _err
  2486. }
  2487. _result = _body
  2488. return _result, _err
  2489. }
  2490. // Summary:
  2491. //
  2492. // # Query SMS Signature Details
  2493. //
  2494. // Description:
  2495. //
  2496. // - For details about the changes of this new interface and the original one, please refer to [Announcement on the Update of SMS Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  2497. //
  2498. // - Review Time: Generally, after submitting the signature, Alibaba Cloud expects to complete the review within 2 hours (Review Business Hours: Monday to Sunday 9:00~21:00, with legal holidays postponed). It is recommended to submit your application before 18:00.
  2499. //
  2500. // - If the signature fails the review, the reason for the failure will be returned. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm), invoke the [UpdateSmsSign](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-updatesmssign?spm) API, or modify the unapproved SMS signature on the [Signature Management](https://dysms.console.aliyun.com/domestic/text/sign) page.
  2501. //
  2502. // @param request - GetSmsSignRequest
  2503. //
  2504. // @param runtime - runtime options for this request RuntimeOptions
  2505. //
  2506. // @return GetSmsSignResponse
  2507. func (client *Client) GetSmsSignWithOptions(request *GetSmsSignRequest, runtime *dara.RuntimeOptions) (_result *GetSmsSignResponse, _err error) {
  2508. if dara.BoolValue(client.EnableValidate) == true {
  2509. _err = request.Validate()
  2510. if _err != nil {
  2511. return _result, _err
  2512. }
  2513. }
  2514. query := map[string]interface{}{}
  2515. if !dara.IsNil(request.OwnerId) {
  2516. query["OwnerId"] = request.OwnerId
  2517. }
  2518. if !dara.IsNil(request.ResourceOwnerAccount) {
  2519. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  2520. }
  2521. if !dara.IsNil(request.ResourceOwnerId) {
  2522. query["ResourceOwnerId"] = request.ResourceOwnerId
  2523. }
  2524. if !dara.IsNil(request.SignName) {
  2525. query["SignName"] = request.SignName
  2526. }
  2527. req := &openapiutil.OpenApiRequest{
  2528. Query: openapiutil.Query(query),
  2529. }
  2530. params := &openapiutil.Params{
  2531. Action: dara.String("GetSmsSign"),
  2532. Version: dara.String("2017-05-25"),
  2533. Protocol: dara.String("HTTPS"),
  2534. Pathname: dara.String("/"),
  2535. Method: dara.String("POST"),
  2536. AuthType: dara.String("AK"),
  2537. Style: dara.String("RPC"),
  2538. ReqBodyType: dara.String("formData"),
  2539. BodyType: dara.String("json"),
  2540. }
  2541. _result = &GetSmsSignResponse{}
  2542. _body, _err := client.CallApi(params, req, runtime)
  2543. if _err != nil {
  2544. return _result, _err
  2545. }
  2546. _err = dara.Convert(_body, &_result)
  2547. return _result, _err
  2548. }
  2549. // Summary:
  2550. //
  2551. // # Query SMS Signature Details
  2552. //
  2553. // Description:
  2554. //
  2555. // - For details about the changes of this new interface and the original one, please refer to [Announcement on the Update of SMS Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  2556. //
  2557. // - Review Time: Generally, after submitting the signature, Alibaba Cloud expects to complete the review within 2 hours (Review Business Hours: Monday to Sunday 9:00~21:00, with legal holidays postponed). It is recommended to submit your application before 18:00.
  2558. //
  2559. // - If the signature fails the review, the reason for the failure will be returned. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm), invoke the [UpdateSmsSign](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-updatesmssign?spm) API, or modify the unapproved SMS signature on the [Signature Management](https://dysms.console.aliyun.com/domestic/text/sign) page.
  2560. //
  2561. // @param request - GetSmsSignRequest
  2562. //
  2563. // @return GetSmsSignResponse
  2564. func (client *Client) GetSmsSign(request *GetSmsSignRequest) (_result *GetSmsSignResponse, _err error) {
  2565. runtime := &dara.RuntimeOptions{}
  2566. _result = &GetSmsSignResponse{}
  2567. _body, _err := client.GetSmsSignWithOptions(request, runtime)
  2568. if _err != nil {
  2569. return _result, _err
  2570. }
  2571. _result = _body
  2572. return _result, _err
  2573. }
  2574. // Summary:
  2575. //
  2576. // # Query Text SMS Template Details
  2577. //
  2578. // Description:
  2579. //
  2580. // - For details about the announcement of changes to the new and original interfaces, see [Announcement on Updates to SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  2581. //
  2582. // - Review Time: Under normal circumstances, Alibaba Cloud expects to complete the review within 2 hours after template submission (review working hours: Monday to Sunday 9:00~21:00, with statutory holidays postponed). It is recommended to submit your application before 18:00.
  2583. //
  2584. // - If the template fails the review, the reason for the failure will be returned. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm=a2c4g.11186623.0.0.41fd339f3bPSCQ), invoke the [ModifySmsTemplate](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-modifysmstemplate?spm=a2c4g.11186623.0.0.5b1f6e8bQloFit) API or modify the SMS template on the [Template Management](https://dysms.console.aliyun.com/domestic/text/template) page.
  2585. //
  2586. // - The current QuerySmsTemplate interface queries the audit details of a single template by template code. The [QuerySmsTemplateList](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-querysmstemplatelist?spm=a2c4g.11186623.0.0.24086e8bO8cFn4) interface can query the template details of all templates under your current account.
  2587. //
  2588. // @param request - GetSmsTemplateRequest
  2589. //
  2590. // @param runtime - runtime options for this request RuntimeOptions
  2591. //
  2592. // @return GetSmsTemplateResponse
  2593. func (client *Client) GetSmsTemplateWithOptions(request *GetSmsTemplateRequest, runtime *dara.RuntimeOptions) (_result *GetSmsTemplateResponse, _err error) {
  2594. if dara.BoolValue(client.EnableValidate) == true {
  2595. _err = request.Validate()
  2596. if _err != nil {
  2597. return _result, _err
  2598. }
  2599. }
  2600. query := map[string]interface{}{}
  2601. if !dara.IsNil(request.OwnerId) {
  2602. query["OwnerId"] = request.OwnerId
  2603. }
  2604. if !dara.IsNil(request.ResourceOwnerAccount) {
  2605. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  2606. }
  2607. if !dara.IsNil(request.ResourceOwnerId) {
  2608. query["ResourceOwnerId"] = request.ResourceOwnerId
  2609. }
  2610. if !dara.IsNil(request.TemplateCode) {
  2611. query["TemplateCode"] = request.TemplateCode
  2612. }
  2613. req := &openapiutil.OpenApiRequest{
  2614. Query: openapiutil.Query(query),
  2615. }
  2616. params := &openapiutil.Params{
  2617. Action: dara.String("GetSmsTemplate"),
  2618. Version: dara.String("2017-05-25"),
  2619. Protocol: dara.String("HTTPS"),
  2620. Pathname: dara.String("/"),
  2621. Method: dara.String("POST"),
  2622. AuthType: dara.String("AK"),
  2623. Style: dara.String("RPC"),
  2624. ReqBodyType: dara.String("formData"),
  2625. BodyType: dara.String("json"),
  2626. }
  2627. _result = &GetSmsTemplateResponse{}
  2628. _body, _err := client.CallApi(params, req, runtime)
  2629. if _err != nil {
  2630. return _result, _err
  2631. }
  2632. _err = dara.Convert(_body, &_result)
  2633. return _result, _err
  2634. }
  2635. // Summary:
  2636. //
  2637. // # Query Text SMS Template Details
  2638. //
  2639. // Description:
  2640. //
  2641. // - For details about the announcement of changes to the new and original interfaces, see [Announcement on Updates to SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  2642. //
  2643. // - Review Time: Under normal circumstances, Alibaba Cloud expects to complete the review within 2 hours after template submission (review working hours: Monday to Sunday 9:00~21:00, with statutory holidays postponed). It is recommended to submit your application before 18:00.
  2644. //
  2645. // - If the template fails the review, the reason for the failure will be returned. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm=a2c4g.11186623.0.0.41fd339f3bPSCQ), invoke the [ModifySmsTemplate](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-modifysmstemplate?spm=a2c4g.11186623.0.0.5b1f6e8bQloFit) API or modify the SMS template on the [Template Management](https://dysms.console.aliyun.com/domestic/text/template) page.
  2646. //
  2647. // - The current QuerySmsTemplate interface queries the audit details of a single template by template code. The [QuerySmsTemplateList](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-querysmstemplatelist?spm=a2c4g.11186623.0.0.24086e8bO8cFn4) interface can query the template details of all templates under your current account.
  2648. //
  2649. // @param request - GetSmsTemplateRequest
  2650. //
  2651. // @return GetSmsTemplateResponse
  2652. func (client *Client) GetSmsTemplate(request *GetSmsTemplateRequest) (_result *GetSmsTemplateResponse, _err error) {
  2653. runtime := &dara.RuntimeOptions{}
  2654. _result = &GetSmsTemplateResponse{}
  2655. _body, _err := client.GetSmsTemplateWithOptions(request, runtime)
  2656. if _err != nil {
  2657. return _result, _err
  2658. }
  2659. _result = _body
  2660. return _result, _err
  2661. }
  2662. // Summary:
  2663. //
  2664. // 查询模板列表详情(新接口)
  2665. //
  2666. // @param tmpReq - GetSmsTemplateListRequest
  2667. //
  2668. // @param runtime - runtime options for this request RuntimeOptions
  2669. //
  2670. // @return GetSmsTemplateListResponse
  2671. func (client *Client) GetSmsTemplateListWithOptions(tmpReq *GetSmsTemplateListRequest, runtime *dara.RuntimeOptions) (_result *GetSmsTemplateListResponse, _err error) {
  2672. if dara.BoolValue(client.EnableValidate) == true {
  2673. _err = tmpReq.Validate()
  2674. if _err != nil {
  2675. return _result, _err
  2676. }
  2677. }
  2678. request := &GetSmsTemplateListShrinkRequest{}
  2679. openapiutil.Convert(tmpReq, request)
  2680. if !dara.IsNil(tmpReq.UsableStateList) {
  2681. request.UsableStateListShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.UsableStateList, dara.String("UsableStateList"), dara.String("json"))
  2682. }
  2683. query := map[string]interface{}{}
  2684. if !dara.IsNil(request.AuditStatus) {
  2685. query["AuditStatus"] = request.AuditStatus
  2686. }
  2687. if !dara.IsNil(request.OwnerId) {
  2688. query["OwnerId"] = request.OwnerId
  2689. }
  2690. if !dara.IsNil(request.PageIndex) {
  2691. query["PageIndex"] = request.PageIndex
  2692. }
  2693. if !dara.IsNil(request.PageSize) {
  2694. query["PageSize"] = request.PageSize
  2695. }
  2696. if !dara.IsNil(request.ResourceOwnerAccount) {
  2697. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  2698. }
  2699. if !dara.IsNil(request.ResourceOwnerId) {
  2700. query["ResourceOwnerId"] = request.ResourceOwnerId
  2701. }
  2702. if !dara.IsNil(request.SignName) {
  2703. query["SignName"] = request.SignName
  2704. }
  2705. if !dara.IsNil(request.TemplateCode) {
  2706. query["TemplateCode"] = request.TemplateCode
  2707. }
  2708. if !dara.IsNil(request.TemplateName) {
  2709. query["TemplateName"] = request.TemplateName
  2710. }
  2711. if !dara.IsNil(request.TemplateTag) {
  2712. query["TemplateTag"] = request.TemplateTag
  2713. }
  2714. if !dara.IsNil(request.TemplateType) {
  2715. query["TemplateType"] = request.TemplateType
  2716. }
  2717. if !dara.IsNil(request.UsableStateListShrink) {
  2718. query["UsableStateList"] = request.UsableStateListShrink
  2719. }
  2720. req := &openapiutil.OpenApiRequest{
  2721. Query: openapiutil.Query(query),
  2722. }
  2723. params := &openapiutil.Params{
  2724. Action: dara.String("GetSmsTemplateList"),
  2725. Version: dara.String("2017-05-25"),
  2726. Protocol: dara.String("HTTPS"),
  2727. Pathname: dara.String("/"),
  2728. Method: dara.String("POST"),
  2729. AuthType: dara.String("AK"),
  2730. Style: dara.String("RPC"),
  2731. ReqBodyType: dara.String("formData"),
  2732. BodyType: dara.String("json"),
  2733. }
  2734. _result = &GetSmsTemplateListResponse{}
  2735. _body, _err := client.CallApi(params, req, runtime)
  2736. if _err != nil {
  2737. return _result, _err
  2738. }
  2739. _err = dara.Convert(_body, &_result)
  2740. return _result, _err
  2741. }
  2742. // Summary:
  2743. //
  2744. // 查询模板列表详情(新接口)
  2745. //
  2746. // @param request - GetSmsTemplateListRequest
  2747. //
  2748. // @return GetSmsTemplateListResponse
  2749. func (client *Client) GetSmsTemplateList(request *GetSmsTemplateListRequest) (_result *GetSmsTemplateListResponse, _err error) {
  2750. runtime := &dara.RuntimeOptions{}
  2751. _result = &GetSmsTemplateListResponse{}
  2752. _body, _err := client.GetSmsTemplateListWithOptions(request, runtime)
  2753. if _err != nil {
  2754. return _result, _err
  2755. }
  2756. _result = _body
  2757. return _result, _err
  2758. }
  2759. // Summary:
  2760. //
  2761. // Queries the tags of a message template.
  2762. //
  2763. // Description:
  2764. //
  2765. // ### QPS limit
  2766. //
  2767. // You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2768. //
  2769. // @param request - ListTagResourcesRequest
  2770. //
  2771. // @param runtime - runtime options for this request RuntimeOptions
  2772. //
  2773. // @return ListTagResourcesResponse
  2774. func (client *Client) ListTagResourcesWithOptions(request *ListTagResourcesRequest, runtime *dara.RuntimeOptions) (_result *ListTagResourcesResponse, _err error) {
  2775. if dara.BoolValue(client.EnableValidate) == true {
  2776. _err = request.Validate()
  2777. if _err != nil {
  2778. return _result, _err
  2779. }
  2780. }
  2781. query := map[string]interface{}{}
  2782. if !dara.IsNil(request.NextToken) {
  2783. query["NextToken"] = request.NextToken
  2784. }
  2785. if !dara.IsNil(request.OwnerId) {
  2786. query["OwnerId"] = request.OwnerId
  2787. }
  2788. if !dara.IsNil(request.PageSize) {
  2789. query["PageSize"] = request.PageSize
  2790. }
  2791. if !dara.IsNil(request.ProdCode) {
  2792. query["ProdCode"] = request.ProdCode
  2793. }
  2794. if !dara.IsNil(request.RegionId) {
  2795. query["RegionId"] = request.RegionId
  2796. }
  2797. if !dara.IsNil(request.ResourceId) {
  2798. query["ResourceId"] = request.ResourceId
  2799. }
  2800. if !dara.IsNil(request.ResourceOwnerAccount) {
  2801. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  2802. }
  2803. if !dara.IsNil(request.ResourceOwnerId) {
  2804. query["ResourceOwnerId"] = request.ResourceOwnerId
  2805. }
  2806. if !dara.IsNil(request.ResourceType) {
  2807. query["ResourceType"] = request.ResourceType
  2808. }
  2809. if !dara.IsNil(request.Tag) {
  2810. query["Tag"] = request.Tag
  2811. }
  2812. req := &openapiutil.OpenApiRequest{
  2813. Query: openapiutil.Query(query),
  2814. }
  2815. params := &openapiutil.Params{
  2816. Action: dara.String("ListTagResources"),
  2817. Version: dara.String("2017-05-25"),
  2818. Protocol: dara.String("HTTPS"),
  2819. Pathname: dara.String("/"),
  2820. Method: dara.String("POST"),
  2821. AuthType: dara.String("AK"),
  2822. Style: dara.String("RPC"),
  2823. ReqBodyType: dara.String("formData"),
  2824. BodyType: dara.String("json"),
  2825. }
  2826. _result = &ListTagResourcesResponse{}
  2827. _body, _err := client.CallApi(params, req, runtime)
  2828. if _err != nil {
  2829. return _result, _err
  2830. }
  2831. _err = dara.Convert(_body, &_result)
  2832. return _result, _err
  2833. }
  2834. // Summary:
  2835. //
  2836. // Queries the tags of a message template.
  2837. //
  2838. // Description:
  2839. //
  2840. // ### QPS limit
  2841. //
  2842. // You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2843. //
  2844. // @param request - ListTagResourcesRequest
  2845. //
  2846. // @return ListTagResourcesResponse
  2847. func (client *Client) ListTagResources(request *ListTagResourcesRequest) (_result *ListTagResourcesResponse, _err error) {
  2848. runtime := &dara.RuntimeOptions{}
  2849. _result = &ListTagResourcesResponse{}
  2850. _body, _err := client.ListTagResourcesWithOptions(request, runtime)
  2851. if _err != nil {
  2852. return _result, _err
  2853. }
  2854. _result = _body
  2855. return _result, _err
  2856. }
  2857. // Summary:
  2858. //
  2859. // Modifies a rejected signature and submit it for approval. Signatures that are pending approval or have been approved cannot be modified.
  2860. //
  2861. // Description:
  2862. //
  2863. // You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to modify an existing signature and submit the signature for approval. The signature must comply with the [signature specifications](https://help.aliyun.com/document_detail/108076.html).
  2864. //
  2865. // For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  2866. //
  2867. // ### QPS limits
  2868. //
  2869. // You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2870. //
  2871. // >
  2872. //
  2873. // - Signatures pending approval cannot be modified.
  2874. //
  2875. // - You cannot modify a signature after it is approved. If you no longer need the signature, you can delete it.
  2876. //
  2877. // - If you are an individual user, you cannot apply for a new signature on the same day that your signature is rejected or deleted. We recommend that you modify the rejected signature and submit it again.
  2878. //
  2879. // @param request - ModifySmsSignRequest
  2880. //
  2881. // @param runtime - runtime options for this request RuntimeOptions
  2882. //
  2883. // @return ModifySmsSignResponse
  2884. func (client *Client) ModifySmsSignWithOptions(request *ModifySmsSignRequest, runtime *dara.RuntimeOptions) (_result *ModifySmsSignResponse, _err error) {
  2885. if dara.BoolValue(client.EnableValidate) == true {
  2886. _err = request.Validate()
  2887. if _err != nil {
  2888. return _result, _err
  2889. }
  2890. }
  2891. query := map[string]interface{}{}
  2892. if !dara.IsNil(request.OwnerId) {
  2893. query["OwnerId"] = request.OwnerId
  2894. }
  2895. if !dara.IsNil(request.Remark) {
  2896. query["Remark"] = request.Remark
  2897. }
  2898. if !dara.IsNil(request.ResourceOwnerAccount) {
  2899. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  2900. }
  2901. if !dara.IsNil(request.ResourceOwnerId) {
  2902. query["ResourceOwnerId"] = request.ResourceOwnerId
  2903. }
  2904. if !dara.IsNil(request.SignName) {
  2905. query["SignName"] = request.SignName
  2906. }
  2907. if !dara.IsNil(request.SignSource) {
  2908. query["SignSource"] = request.SignSource
  2909. }
  2910. if !dara.IsNil(request.SignType) {
  2911. query["SignType"] = request.SignType
  2912. }
  2913. body := map[string]interface{}{}
  2914. if !dara.IsNil(request.SignFileList) {
  2915. body["SignFileList"] = request.SignFileList
  2916. }
  2917. req := &openapiutil.OpenApiRequest{
  2918. Query: openapiutil.Query(query),
  2919. Body: openapiutil.ParseToMap(body),
  2920. }
  2921. params := &openapiutil.Params{
  2922. Action: dara.String("ModifySmsSign"),
  2923. Version: dara.String("2017-05-25"),
  2924. Protocol: dara.String("HTTPS"),
  2925. Pathname: dara.String("/"),
  2926. Method: dara.String("POST"),
  2927. AuthType: dara.String("AK"),
  2928. Style: dara.String("RPC"),
  2929. ReqBodyType: dara.String("formData"),
  2930. BodyType: dara.String("json"),
  2931. }
  2932. _result = &ModifySmsSignResponse{}
  2933. _body, _err := client.CallApi(params, req, runtime)
  2934. if _err != nil {
  2935. return _result, _err
  2936. }
  2937. _err = dara.Convert(_body, &_result)
  2938. return _result, _err
  2939. }
  2940. // Summary:
  2941. //
  2942. // Modifies a rejected signature and submit it for approval. Signatures that are pending approval or have been approved cannot be modified.
  2943. //
  2944. // Description:
  2945. //
  2946. // You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to modify an existing signature and submit the signature for approval. The signature must comply with the [signature specifications](https://help.aliyun.com/document_detail/108076.html).
  2947. //
  2948. // For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  2949. //
  2950. // ### QPS limits
  2951. //
  2952. // You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2953. //
  2954. // >
  2955. //
  2956. // - Signatures pending approval cannot be modified.
  2957. //
  2958. // - You cannot modify a signature after it is approved. If you no longer need the signature, you can delete it.
  2959. //
  2960. // - If you are an individual user, you cannot apply for a new signature on the same day that your signature is rejected or deleted. We recommend that you modify the rejected signature and submit it again.
  2961. //
  2962. // @param request - ModifySmsSignRequest
  2963. //
  2964. // @return ModifySmsSignResponse
  2965. func (client *Client) ModifySmsSign(request *ModifySmsSignRequest) (_result *ModifySmsSignResponse, _err error) {
  2966. runtime := &dara.RuntimeOptions{}
  2967. _result = &ModifySmsSignResponse{}
  2968. _body, _err := client.ModifySmsSignWithOptions(request, runtime)
  2969. if _err != nil {
  2970. return _result, _err
  2971. }
  2972. _result = _body
  2973. return _result, _err
  2974. }
  2975. // Deprecated: OpenAPI ModifySmsTemplate is deprecated, please use Dysmsapi::2017-05-25::UpdateSmsTemplate instead.
  2976. //
  2977. // Summary:
  2978. //
  2979. // Modifies the information of an unapproved message template and submits it for review again.
  2980. //
  2981. // Description:
  2982. //
  2983. // After you apply for a message template, if the template fails to pass the review, you can call this operation to modify the template and submit the template again. You can call this operation to modify only a template for a specific message type.
  2984. //
  2985. // The template content must comply with the [SMS template specifications](https://help.aliyun.com/document_detail/108253.html).
  2986. //
  2987. // For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  2988. //
  2989. // ### QPS limit
  2990. //
  2991. // You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  2992. //
  2993. // @param request - ModifySmsTemplateRequest
  2994. //
  2995. // @param runtime - runtime options for this request RuntimeOptions
  2996. //
  2997. // @return ModifySmsTemplateResponse
  2998. func (client *Client) ModifySmsTemplateWithOptions(request *ModifySmsTemplateRequest, runtime *dara.RuntimeOptions) (_result *ModifySmsTemplateResponse, _err error) {
  2999. if dara.BoolValue(client.EnableValidate) == true {
  3000. _err = request.Validate()
  3001. if _err != nil {
  3002. return _result, _err
  3003. }
  3004. }
  3005. query := map[string]interface{}{}
  3006. if !dara.IsNil(request.OwnerId) {
  3007. query["OwnerId"] = request.OwnerId
  3008. }
  3009. if !dara.IsNil(request.Remark) {
  3010. query["Remark"] = request.Remark
  3011. }
  3012. if !dara.IsNil(request.ResourceOwnerAccount) {
  3013. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  3014. }
  3015. if !dara.IsNil(request.ResourceOwnerId) {
  3016. query["ResourceOwnerId"] = request.ResourceOwnerId
  3017. }
  3018. if !dara.IsNil(request.TemplateCode) {
  3019. query["TemplateCode"] = request.TemplateCode
  3020. }
  3021. if !dara.IsNil(request.TemplateContent) {
  3022. query["TemplateContent"] = request.TemplateContent
  3023. }
  3024. if !dara.IsNil(request.TemplateName) {
  3025. query["TemplateName"] = request.TemplateName
  3026. }
  3027. if !dara.IsNil(request.TemplateType) {
  3028. query["TemplateType"] = request.TemplateType
  3029. }
  3030. req := &openapiutil.OpenApiRequest{
  3031. Query: openapiutil.Query(query),
  3032. }
  3033. params := &openapiutil.Params{
  3034. Action: dara.String("ModifySmsTemplate"),
  3035. Version: dara.String("2017-05-25"),
  3036. Protocol: dara.String("HTTPS"),
  3037. Pathname: dara.String("/"),
  3038. Method: dara.String("POST"),
  3039. AuthType: dara.String("AK"),
  3040. Style: dara.String("RPC"),
  3041. ReqBodyType: dara.String("formData"),
  3042. BodyType: dara.String("json"),
  3043. }
  3044. _result = &ModifySmsTemplateResponse{}
  3045. _body, _err := client.CallApi(params, req, runtime)
  3046. if _err != nil {
  3047. return _result, _err
  3048. }
  3049. _err = dara.Convert(_body, &_result)
  3050. return _result, _err
  3051. }
  3052. // Deprecated: OpenAPI ModifySmsTemplate is deprecated, please use Dysmsapi::2017-05-25::UpdateSmsTemplate instead.
  3053. //
  3054. // Summary:
  3055. //
  3056. // Modifies the information of an unapproved message template and submits it for review again.
  3057. //
  3058. // Description:
  3059. //
  3060. // After you apply for a message template, if the template fails to pass the review, you can call this operation to modify the template and submit the template again. You can call this operation to modify only a template for a specific message type.
  3061. //
  3062. // The template content must comply with the [SMS template specifications](https://help.aliyun.com/document_detail/108253.html).
  3063. //
  3064. // For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html).
  3065. //
  3066. // ### QPS limit
  3067. //
  3068. // You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  3069. //
  3070. // @param request - ModifySmsTemplateRequest
  3071. //
  3072. // @return ModifySmsTemplateResponse
  3073. // Deprecated
  3074. func (client *Client) ModifySmsTemplate(request *ModifySmsTemplateRequest) (_result *ModifySmsTemplateResponse, _err error) {
  3075. runtime := &dara.RuntimeOptions{}
  3076. _result = &ModifySmsTemplateResponse{}
  3077. _body, _err := client.ModifySmsTemplateWithOptions(request, runtime)
  3078. if _err != nil {
  3079. return _result, _err
  3080. }
  3081. _result = _body
  3082. return _result, _err
  3083. }
  3084. // Summary:
  3085. //
  3086. // Queries the review status of a message template.
  3087. //
  3088. // Description:
  3089. //
  3090. // ### QPS limit
  3091. //
  3092. // You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  3093. //
  3094. // @param request - QueryCardSmsTemplateRequest
  3095. //
  3096. // @param runtime - runtime options for this request RuntimeOptions
  3097. //
  3098. // @return QueryCardSmsTemplateResponse
  3099. func (client *Client) QueryCardSmsTemplateWithOptions(request *QueryCardSmsTemplateRequest, runtime *dara.RuntimeOptions) (_result *QueryCardSmsTemplateResponse, _err error) {
  3100. if dara.BoolValue(client.EnableValidate) == true {
  3101. _err = request.Validate()
  3102. if _err != nil {
  3103. return _result, _err
  3104. }
  3105. }
  3106. query := map[string]interface{}{}
  3107. if !dara.IsNil(request.TemplateCode) {
  3108. query["TemplateCode"] = request.TemplateCode
  3109. }
  3110. req := &openapiutil.OpenApiRequest{
  3111. Query: openapiutil.Query(query),
  3112. }
  3113. params := &openapiutil.Params{
  3114. Action: dara.String("QueryCardSmsTemplate"),
  3115. Version: dara.String("2017-05-25"),
  3116. Protocol: dara.String("HTTPS"),
  3117. Pathname: dara.String("/"),
  3118. Method: dara.String("POST"),
  3119. AuthType: dara.String("AK"),
  3120. Style: dara.String("RPC"),
  3121. ReqBodyType: dara.String("formData"),
  3122. BodyType: dara.String("json"),
  3123. }
  3124. _result = &QueryCardSmsTemplateResponse{}
  3125. _body, _err := client.CallApi(params, req, runtime)
  3126. if _err != nil {
  3127. return _result, _err
  3128. }
  3129. _err = dara.Convert(_body, &_result)
  3130. return _result, _err
  3131. }
  3132. // Summary:
  3133. //
  3134. // Queries the review status of a message template.
  3135. //
  3136. // Description:
  3137. //
  3138. // ### QPS limit
  3139. //
  3140. // You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  3141. //
  3142. // @param request - QueryCardSmsTemplateRequest
  3143. //
  3144. // @return QueryCardSmsTemplateResponse
  3145. func (client *Client) QueryCardSmsTemplate(request *QueryCardSmsTemplateRequest) (_result *QueryCardSmsTemplateResponse, _err error) {
  3146. runtime := &dara.RuntimeOptions{}
  3147. _result = &QueryCardSmsTemplateResponse{}
  3148. _body, _err := client.QueryCardSmsTemplateWithOptions(request, runtime)
  3149. if _err != nil {
  3150. return _result, _err
  3151. }
  3152. _result = _body
  3153. return _result, _err
  3154. }
  3155. // Summary:
  3156. //
  3157. // Queries sent card messages.
  3158. //
  3159. // Description:
  3160. //
  3161. // ### QPS limit
  3162. //
  3163. // You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  3164. //
  3165. // @param request - QueryCardSmsTemplateReportRequest
  3166. //
  3167. // @param runtime - runtime options for this request RuntimeOptions
  3168. //
  3169. // @return QueryCardSmsTemplateReportResponse
  3170. func (client *Client) QueryCardSmsTemplateReportWithOptions(request *QueryCardSmsTemplateReportRequest, runtime *dara.RuntimeOptions) (_result *QueryCardSmsTemplateReportResponse, _err error) {
  3171. if dara.BoolValue(client.EnableValidate) == true {
  3172. _err = request.Validate()
  3173. if _err != nil {
  3174. return _result, _err
  3175. }
  3176. }
  3177. query := map[string]interface{}{}
  3178. if !dara.IsNil(request.EndDate) {
  3179. query["EndDate"] = request.EndDate
  3180. }
  3181. if !dara.IsNil(request.StartDate) {
  3182. query["StartDate"] = request.StartDate
  3183. }
  3184. if !dara.IsNil(request.TemplateCodes) {
  3185. query["TemplateCodes"] = request.TemplateCodes
  3186. }
  3187. req := &openapiutil.OpenApiRequest{
  3188. Query: openapiutil.Query(query),
  3189. }
  3190. params := &openapiutil.Params{
  3191. Action: dara.String("QueryCardSmsTemplateReport"),
  3192. Version: dara.String("2017-05-25"),
  3193. Protocol: dara.String("HTTPS"),
  3194. Pathname: dara.String("/"),
  3195. Method: dara.String("POST"),
  3196. AuthType: dara.String("AK"),
  3197. Style: dara.String("RPC"),
  3198. ReqBodyType: dara.String("formData"),
  3199. BodyType: dara.String("json"),
  3200. }
  3201. _result = &QueryCardSmsTemplateReportResponse{}
  3202. _body, _err := client.CallApi(params, req, runtime)
  3203. if _err != nil {
  3204. return _result, _err
  3205. }
  3206. _err = dara.Convert(_body, &_result)
  3207. return _result, _err
  3208. }
  3209. // Summary:
  3210. //
  3211. // Queries sent card messages.
  3212. //
  3213. // Description:
  3214. //
  3215. // ### QPS limit
  3216. //
  3217. // You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  3218. //
  3219. // @param request - QueryCardSmsTemplateReportRequest
  3220. //
  3221. // @return QueryCardSmsTemplateReportResponse
  3222. func (client *Client) QueryCardSmsTemplateReport(request *QueryCardSmsTemplateReportRequest) (_result *QueryCardSmsTemplateReportResponse, _err error) {
  3223. runtime := &dara.RuntimeOptions{}
  3224. _result = &QueryCardSmsTemplateReportResponse{}
  3225. _body, _err := client.QueryCardSmsTemplateReportWithOptions(request, runtime)
  3226. if _err != nil {
  3227. return _result, _err
  3228. }
  3229. _result = _body
  3230. return _result, _err
  3231. }
  3232. // Summary:
  3233. //
  3234. // 获取数字短信签名通过签名name
  3235. //
  3236. // @param request - QueryDigitalSignByNameRequest
  3237. //
  3238. // @param runtime - runtime options for this request RuntimeOptions
  3239. //
  3240. // @return QueryDigitalSignByNameResponse
  3241. func (client *Client) QueryDigitalSignByNameWithOptions(request *QueryDigitalSignByNameRequest, runtime *dara.RuntimeOptions) (_result *QueryDigitalSignByNameResponse, _err error) {
  3242. if dara.BoolValue(client.EnableValidate) == true {
  3243. _err = request.Validate()
  3244. if _err != nil {
  3245. return _result, _err
  3246. }
  3247. }
  3248. query := map[string]interface{}{}
  3249. if !dara.IsNil(request.OwnerId) {
  3250. query["OwnerId"] = request.OwnerId
  3251. }
  3252. if !dara.IsNil(request.ResourceOwnerAccount) {
  3253. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  3254. }
  3255. if !dara.IsNil(request.ResourceOwnerId) {
  3256. query["ResourceOwnerId"] = request.ResourceOwnerId
  3257. }
  3258. if !dara.IsNil(request.SignName) {
  3259. query["SignName"] = request.SignName
  3260. }
  3261. req := &openapiutil.OpenApiRequest{
  3262. Query: openapiutil.Query(query),
  3263. }
  3264. params := &openapiutil.Params{
  3265. Action: dara.String("QueryDigitalSignByName"),
  3266. Version: dara.String("2017-05-25"),
  3267. Protocol: dara.String("HTTPS"),
  3268. Pathname: dara.String("/"),
  3269. Method: dara.String("POST"),
  3270. AuthType: dara.String("AK"),
  3271. Style: dara.String("RPC"),
  3272. ReqBodyType: dara.String("formData"),
  3273. BodyType: dara.String("json"),
  3274. }
  3275. _result = &QueryDigitalSignByNameResponse{}
  3276. _body, _err := client.CallApi(params, req, runtime)
  3277. if _err != nil {
  3278. return _result, _err
  3279. }
  3280. _err = dara.Convert(_body, &_result)
  3281. return _result, _err
  3282. }
  3283. // Summary:
  3284. //
  3285. // 获取数字短信签名通过签名name
  3286. //
  3287. // @param request - QueryDigitalSignByNameRequest
  3288. //
  3289. // @return QueryDigitalSignByNameResponse
  3290. func (client *Client) QueryDigitalSignByName(request *QueryDigitalSignByNameRequest) (_result *QueryDigitalSignByNameResponse, _err error) {
  3291. runtime := &dara.RuntimeOptions{}
  3292. _result = &QueryDigitalSignByNameResponse{}
  3293. _body, _err := client.QueryDigitalSignByNameWithOptions(request, runtime)
  3294. if _err != nil {
  3295. return _result, _err
  3296. }
  3297. _result = _body
  3298. return _result, _err
  3299. }
  3300. // Summary:
  3301. //
  3302. // 查询验证码签名
  3303. //
  3304. // @param request - QueryExtCodeSignRequest
  3305. //
  3306. // @param runtime - runtime options for this request RuntimeOptions
  3307. //
  3308. // @return QueryExtCodeSignResponse
  3309. func (client *Client) QueryExtCodeSignWithOptions(request *QueryExtCodeSignRequest, runtime *dara.RuntimeOptions) (_result *QueryExtCodeSignResponse, _err error) {
  3310. if dara.BoolValue(client.EnableValidate) == true {
  3311. _err = request.Validate()
  3312. if _err != nil {
  3313. return _result, _err
  3314. }
  3315. }
  3316. query := map[string]interface{}{}
  3317. if !dara.IsNil(request.ExtCode) {
  3318. query["ExtCode"] = request.ExtCode
  3319. }
  3320. if !dara.IsNil(request.OwnerId) {
  3321. query["OwnerId"] = request.OwnerId
  3322. }
  3323. if !dara.IsNil(request.PageNo) {
  3324. query["PageNo"] = request.PageNo
  3325. }
  3326. if !dara.IsNil(request.PageSize) {
  3327. query["PageSize"] = request.PageSize
  3328. }
  3329. if !dara.IsNil(request.ResourceOwnerAccount) {
  3330. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  3331. }
  3332. if !dara.IsNil(request.ResourceOwnerId) {
  3333. query["ResourceOwnerId"] = request.ResourceOwnerId
  3334. }
  3335. if !dara.IsNil(request.SignName) {
  3336. query["SignName"] = request.SignName
  3337. }
  3338. req := &openapiutil.OpenApiRequest{
  3339. Query: openapiutil.Query(query),
  3340. }
  3341. params := &openapiutil.Params{
  3342. Action: dara.String("QueryExtCodeSign"),
  3343. Version: dara.String("2017-05-25"),
  3344. Protocol: dara.String("HTTPS"),
  3345. Pathname: dara.String("/"),
  3346. Method: dara.String("POST"),
  3347. AuthType: dara.String("AK"),
  3348. Style: dara.String("RPC"),
  3349. ReqBodyType: dara.String("formData"),
  3350. BodyType: dara.String("json"),
  3351. }
  3352. _result = &QueryExtCodeSignResponse{}
  3353. _body, _err := client.CallApi(params, req, runtime)
  3354. if _err != nil {
  3355. return _result, _err
  3356. }
  3357. _err = dara.Convert(_body, &_result)
  3358. return _result, _err
  3359. }
  3360. // Summary:
  3361. //
  3362. // 查询验证码签名
  3363. //
  3364. // @param request - QueryExtCodeSignRequest
  3365. //
  3366. // @return QueryExtCodeSignResponse
  3367. func (client *Client) QueryExtCodeSign(request *QueryExtCodeSignRequest) (_result *QueryExtCodeSignResponse, _err error) {
  3368. runtime := &dara.RuntimeOptions{}
  3369. _result = &QueryExtCodeSignResponse{}
  3370. _body, _err := client.QueryExtCodeSignWithOptions(request, runtime)
  3371. if _err != nil {
  3372. return _result, _err
  3373. }
  3374. _result = _body
  3375. return _result, _err
  3376. }
  3377. // Summary:
  3378. //
  3379. // Queries whether some mobile phone numbers support card messages.
  3380. //
  3381. // @param tmpReq - QueryMobilesCardSupportRequest
  3382. //
  3383. // @param runtime - runtime options for this request RuntimeOptions
  3384. //
  3385. // @return QueryMobilesCardSupportResponse
  3386. func (client *Client) QueryMobilesCardSupportWithOptions(tmpReq *QueryMobilesCardSupportRequest, runtime *dara.RuntimeOptions) (_result *QueryMobilesCardSupportResponse, _err error) {
  3387. if dara.BoolValue(client.EnableValidate) == true {
  3388. _err = tmpReq.Validate()
  3389. if _err != nil {
  3390. return _result, _err
  3391. }
  3392. }
  3393. request := &QueryMobilesCardSupportShrinkRequest{}
  3394. openapiutil.Convert(tmpReq, request)
  3395. if !dara.IsNil(tmpReq.Mobiles) {
  3396. request.MobilesShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.Mobiles, dara.String("Mobiles"), dara.String("json"))
  3397. }
  3398. query := map[string]interface{}{}
  3399. if !dara.IsNil(request.EncryptType) {
  3400. query["EncryptType"] = request.EncryptType
  3401. }
  3402. if !dara.IsNil(request.MobilesShrink) {
  3403. query["Mobiles"] = request.MobilesShrink
  3404. }
  3405. if !dara.IsNil(request.TemplateCode) {
  3406. query["TemplateCode"] = request.TemplateCode
  3407. }
  3408. req := &openapiutil.OpenApiRequest{
  3409. Query: openapiutil.Query(query),
  3410. }
  3411. params := &openapiutil.Params{
  3412. Action: dara.String("QueryMobilesCardSupport"),
  3413. Version: dara.String("2017-05-25"),
  3414. Protocol: dara.String("HTTPS"),
  3415. Pathname: dara.String("/"),
  3416. Method: dara.String("POST"),
  3417. AuthType: dara.String("AK"),
  3418. Style: dara.String("RPC"),
  3419. ReqBodyType: dara.String("formData"),
  3420. BodyType: dara.String("json"),
  3421. }
  3422. _result = &QueryMobilesCardSupportResponse{}
  3423. _body, _err := client.CallApi(params, req, runtime)
  3424. if _err != nil {
  3425. return _result, _err
  3426. }
  3427. _err = dara.Convert(_body, &_result)
  3428. return _result, _err
  3429. }
  3430. // Summary:
  3431. //
  3432. // Queries whether some mobile phone numbers support card messages.
  3433. //
  3434. // @param request - QueryMobilesCardSupportRequest
  3435. //
  3436. // @return QueryMobilesCardSupportResponse
  3437. func (client *Client) QueryMobilesCardSupport(request *QueryMobilesCardSupportRequest) (_result *QueryMobilesCardSupportResponse, _err error) {
  3438. runtime := &dara.RuntimeOptions{}
  3439. _result = &QueryMobilesCardSupportResponse{}
  3440. _body, _err := client.QueryMobilesCardSupportWithOptions(request, runtime)
  3441. if _err != nil {
  3442. return _result, _err
  3443. }
  3444. _result = _body
  3445. return _result, _err
  3446. }
  3447. // Summary:
  3448. //
  3449. // Queries the information about clicks within a specific time range or related to a mobile number. QPS limit You can call this operation up to 100 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  3450. //
  3451. // @param request - QueryPageSmartShortUrlLogRequest
  3452. //
  3453. // @param runtime - runtime options for this request RuntimeOptions
  3454. //
  3455. // @return QueryPageSmartShortUrlLogResponse
  3456. func (client *Client) QueryPageSmartShortUrlLogWithOptions(request *QueryPageSmartShortUrlLogRequest, runtime *dara.RuntimeOptions) (_result *QueryPageSmartShortUrlLogResponse, _err error) {
  3457. if dara.BoolValue(client.EnableValidate) == true {
  3458. _err = request.Validate()
  3459. if _err != nil {
  3460. return _result, _err
  3461. }
  3462. }
  3463. query := map[string]interface{}{}
  3464. if !dara.IsNil(request.CreateDateEnd) {
  3465. query["CreateDateEnd"] = request.CreateDateEnd
  3466. }
  3467. if !dara.IsNil(request.CreateDateStart) {
  3468. query["CreateDateStart"] = request.CreateDateStart
  3469. }
  3470. if !dara.IsNil(request.OwnerId) {
  3471. query["OwnerId"] = request.OwnerId
  3472. }
  3473. if !dara.IsNil(request.PageNo) {
  3474. query["PageNo"] = request.PageNo
  3475. }
  3476. if !dara.IsNil(request.PageSize) {
  3477. query["PageSize"] = request.PageSize
  3478. }
  3479. if !dara.IsNil(request.PhoneNumber) {
  3480. query["PhoneNumber"] = request.PhoneNumber
  3481. }
  3482. if !dara.IsNil(request.ResourceOwnerAccount) {
  3483. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  3484. }
  3485. if !dara.IsNil(request.ResourceOwnerId) {
  3486. query["ResourceOwnerId"] = request.ResourceOwnerId
  3487. }
  3488. if !dara.IsNil(request.ShortUrl) {
  3489. query["ShortUrl"] = request.ShortUrl
  3490. }
  3491. req := &openapiutil.OpenApiRequest{
  3492. Query: openapiutil.Query(query),
  3493. }
  3494. params := &openapiutil.Params{
  3495. Action: dara.String("QueryPageSmartShortUrlLog"),
  3496. Version: dara.String("2017-05-25"),
  3497. Protocol: dara.String("HTTPS"),
  3498. Pathname: dara.String("/"),
  3499. Method: dara.String("POST"),
  3500. AuthType: dara.String("AK"),
  3501. Style: dara.String("RPC"),
  3502. ReqBodyType: dara.String("formData"),
  3503. BodyType: dara.String("json"),
  3504. }
  3505. _result = &QueryPageSmartShortUrlLogResponse{}
  3506. _body, _err := client.CallApi(params, req, runtime)
  3507. if _err != nil {
  3508. return _result, _err
  3509. }
  3510. _err = dara.Convert(_body, &_result)
  3511. return _result, _err
  3512. }
  3513. // Summary:
  3514. //
  3515. // Queries the information about clicks within a specific time range or related to a mobile number. QPS limit You can call this operation up to 100 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  3516. //
  3517. // @param request - QueryPageSmartShortUrlLogRequest
  3518. //
  3519. // @return QueryPageSmartShortUrlLogResponse
  3520. func (client *Client) QueryPageSmartShortUrlLog(request *QueryPageSmartShortUrlLogRequest) (_result *QueryPageSmartShortUrlLogResponse, _err error) {
  3521. runtime := &dara.RuntimeOptions{}
  3522. _result = &QueryPageSmartShortUrlLogResponse{}
  3523. _body, _err := client.QueryPageSmartShortUrlLogWithOptions(request, runtime)
  3524. if _err != nil {
  3525. return _result, _err
  3526. }
  3527. _result = _body
  3528. return _result, _err
  3529. }
  3530. // Summary:
  3531. //
  3532. // Queries the information about a message.
  3533. //
  3534. // @param request - QuerySendDetailsRequest
  3535. //
  3536. // @param runtime - runtime options for this request RuntimeOptions
  3537. //
  3538. // @return QuerySendDetailsResponse
  3539. func (client *Client) QuerySendDetailsWithOptions(request *QuerySendDetailsRequest, runtime *dara.RuntimeOptions) (_result *QuerySendDetailsResponse, _err error) {
  3540. if dara.BoolValue(client.EnableValidate) == true {
  3541. _err = request.Validate()
  3542. if _err != nil {
  3543. return _result, _err
  3544. }
  3545. }
  3546. query := map[string]interface{}{}
  3547. if !dara.IsNil(request.BizId) {
  3548. query["BizId"] = request.BizId
  3549. }
  3550. if !dara.IsNil(request.CurrentPage) {
  3551. query["CurrentPage"] = request.CurrentPage
  3552. }
  3553. if !dara.IsNil(request.OwnerId) {
  3554. query["OwnerId"] = request.OwnerId
  3555. }
  3556. if !dara.IsNil(request.PageSize) {
  3557. query["PageSize"] = request.PageSize
  3558. }
  3559. if !dara.IsNil(request.PhoneNumber) {
  3560. query["PhoneNumber"] = request.PhoneNumber
  3561. }
  3562. if !dara.IsNil(request.ResourceOwnerAccount) {
  3563. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  3564. }
  3565. if !dara.IsNil(request.ResourceOwnerId) {
  3566. query["ResourceOwnerId"] = request.ResourceOwnerId
  3567. }
  3568. if !dara.IsNil(request.SendDate) {
  3569. query["SendDate"] = request.SendDate
  3570. }
  3571. req := &openapiutil.OpenApiRequest{
  3572. Query: openapiutil.Query(query),
  3573. }
  3574. params := &openapiutil.Params{
  3575. Action: dara.String("QuerySendDetails"),
  3576. Version: dara.String("2017-05-25"),
  3577. Protocol: dara.String("HTTPS"),
  3578. Pathname: dara.String("/"),
  3579. Method: dara.String("POST"),
  3580. AuthType: dara.String("AK"),
  3581. Style: dara.String("RPC"),
  3582. ReqBodyType: dara.String("formData"),
  3583. BodyType: dara.String("json"),
  3584. }
  3585. _result = &QuerySendDetailsResponse{}
  3586. _body, _err := client.CallApi(params, req, runtime)
  3587. if _err != nil {
  3588. return _result, _err
  3589. }
  3590. _err = dara.Convert(_body, &_result)
  3591. return _result, _err
  3592. }
  3593. // Summary:
  3594. //
  3595. // Queries the information about a message.
  3596. //
  3597. // @param request - QuerySendDetailsRequest
  3598. //
  3599. // @return QuerySendDetailsResponse
  3600. func (client *Client) QuerySendDetails(request *QuerySendDetailsRequest) (_result *QuerySendDetailsResponse, _err error) {
  3601. runtime := &dara.RuntimeOptions{}
  3602. _result = &QuerySendDetailsResponse{}
  3603. _body, _err := client.QuerySendDetailsWithOptions(request, runtime)
  3604. if _err != nil {
  3605. return _result, _err
  3606. }
  3607. _result = _body
  3608. return _result, _err
  3609. }
  3610. // Summary:
  3611. //
  3612. // Queries message delivery details.
  3613. //
  3614. // Description:
  3615. //
  3616. // You can call the operation to query message delivery details, including the number of delivered messages, the number of messages with delivery receipts, and the time that a message is sent. If a large number of messages are sent on the specified date, you can specify the number of items displayed on each page and the number of pages to view the details by page.
  3617. //
  3618. // ### QPS limits
  3619. //
  3620. // You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  3621. //
  3622. // @param request - QuerySendStatisticsRequest
  3623. //
  3624. // @param runtime - runtime options for this request RuntimeOptions
  3625. //
  3626. // @return QuerySendStatisticsResponse
  3627. func (client *Client) QuerySendStatisticsWithOptions(request *QuerySendStatisticsRequest, runtime *dara.RuntimeOptions) (_result *QuerySendStatisticsResponse, _err error) {
  3628. if dara.BoolValue(client.EnableValidate) == true {
  3629. _err = request.Validate()
  3630. if _err != nil {
  3631. return _result, _err
  3632. }
  3633. }
  3634. query := map[string]interface{}{}
  3635. if !dara.IsNil(request.EndDate) {
  3636. query["EndDate"] = request.EndDate
  3637. }
  3638. if !dara.IsNil(request.IsGlobe) {
  3639. query["IsGlobe"] = request.IsGlobe
  3640. }
  3641. if !dara.IsNil(request.OwnerId) {
  3642. query["OwnerId"] = request.OwnerId
  3643. }
  3644. if !dara.IsNil(request.PageIndex) {
  3645. query["PageIndex"] = request.PageIndex
  3646. }
  3647. if !dara.IsNil(request.PageSize) {
  3648. query["PageSize"] = request.PageSize
  3649. }
  3650. if !dara.IsNil(request.ResourceOwnerAccount) {
  3651. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  3652. }
  3653. if !dara.IsNil(request.ResourceOwnerId) {
  3654. query["ResourceOwnerId"] = request.ResourceOwnerId
  3655. }
  3656. if !dara.IsNil(request.SignName) {
  3657. query["SignName"] = request.SignName
  3658. }
  3659. if !dara.IsNil(request.StartDate) {
  3660. query["StartDate"] = request.StartDate
  3661. }
  3662. if !dara.IsNil(request.TemplateType) {
  3663. query["TemplateType"] = request.TemplateType
  3664. }
  3665. req := &openapiutil.OpenApiRequest{
  3666. Query: openapiutil.Query(query),
  3667. }
  3668. params := &openapiutil.Params{
  3669. Action: dara.String("QuerySendStatistics"),
  3670. Version: dara.String("2017-05-25"),
  3671. Protocol: dara.String("HTTPS"),
  3672. Pathname: dara.String("/"),
  3673. Method: dara.String("POST"),
  3674. AuthType: dara.String("AK"),
  3675. Style: dara.String("RPC"),
  3676. ReqBodyType: dara.String("formData"),
  3677. BodyType: dara.String("json"),
  3678. }
  3679. _result = &QuerySendStatisticsResponse{}
  3680. _body, _err := client.CallApi(params, req, runtime)
  3681. if _err != nil {
  3682. return _result, _err
  3683. }
  3684. _err = dara.Convert(_body, &_result)
  3685. return _result, _err
  3686. }
  3687. // Summary:
  3688. //
  3689. // Queries message delivery details.
  3690. //
  3691. // Description:
  3692. //
  3693. // You can call the operation to query message delivery details, including the number of delivered messages, the number of messages with delivery receipts, and the time that a message is sent. If a large number of messages are sent on the specified date, you can specify the number of items displayed on each page and the number of pages to view the details by page.
  3694. //
  3695. // ### QPS limits
  3696. //
  3697. // You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  3698. //
  3699. // @param request - QuerySendStatisticsRequest
  3700. //
  3701. // @return QuerySendStatisticsResponse
  3702. func (client *Client) QuerySendStatistics(request *QuerySendStatisticsRequest) (_result *QuerySendStatisticsResponse, _err error) {
  3703. runtime := &dara.RuntimeOptions{}
  3704. _result = &QuerySendStatisticsResponse{}
  3705. _body, _err := client.QuerySendStatisticsWithOptions(request, runtime)
  3706. if _err != nil {
  3707. return _result, _err
  3708. }
  3709. _result = _body
  3710. return _result, _err
  3711. }
  3712. // Summary:
  3713. //
  3714. // Queries the status of a short URL.
  3715. //
  3716. // Description:
  3717. //
  3718. // ### QPS limits
  3719. //
  3720. // You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  3721. //
  3722. // @param request - QueryShortUrlRequest
  3723. //
  3724. // @param runtime - runtime options for this request RuntimeOptions
  3725. //
  3726. // @return QueryShortUrlResponse
  3727. func (client *Client) QueryShortUrlWithOptions(request *QueryShortUrlRequest, runtime *dara.RuntimeOptions) (_result *QueryShortUrlResponse, _err error) {
  3728. if dara.BoolValue(client.EnableValidate) == true {
  3729. _err = request.Validate()
  3730. if _err != nil {
  3731. return _result, _err
  3732. }
  3733. }
  3734. query := map[string]interface{}{}
  3735. if !dara.IsNil(request.OwnerId) {
  3736. query["OwnerId"] = request.OwnerId
  3737. }
  3738. if !dara.IsNil(request.ResourceOwnerAccount) {
  3739. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  3740. }
  3741. if !dara.IsNil(request.ResourceOwnerId) {
  3742. query["ResourceOwnerId"] = request.ResourceOwnerId
  3743. }
  3744. body := map[string]interface{}{}
  3745. if !dara.IsNil(request.ShortUrl) {
  3746. body["ShortUrl"] = request.ShortUrl
  3747. }
  3748. req := &openapiutil.OpenApiRequest{
  3749. Query: openapiutil.Query(query),
  3750. Body: openapiutil.ParseToMap(body),
  3751. }
  3752. params := &openapiutil.Params{
  3753. Action: dara.String("QueryShortUrl"),
  3754. Version: dara.String("2017-05-25"),
  3755. Protocol: dara.String("HTTPS"),
  3756. Pathname: dara.String("/"),
  3757. Method: dara.String("POST"),
  3758. AuthType: dara.String("AK"),
  3759. Style: dara.String("RPC"),
  3760. ReqBodyType: dara.String("formData"),
  3761. BodyType: dara.String("json"),
  3762. }
  3763. _result = &QueryShortUrlResponse{}
  3764. _body, _err := client.CallApi(params, req, runtime)
  3765. if _err != nil {
  3766. return _result, _err
  3767. }
  3768. _err = dara.Convert(_body, &_result)
  3769. return _result, _err
  3770. }
  3771. // Summary:
  3772. //
  3773. // Queries the status of a short URL.
  3774. //
  3775. // Description:
  3776. //
  3777. // ### QPS limits
  3778. //
  3779. // You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  3780. //
  3781. // @param request - QueryShortUrlRequest
  3782. //
  3783. // @return QueryShortUrlResponse
  3784. func (client *Client) QueryShortUrl(request *QueryShortUrlRequest) (_result *QueryShortUrlResponse, _err error) {
  3785. runtime := &dara.RuntimeOptions{}
  3786. _result = &QueryShortUrlResponse{}
  3787. _body, _err := client.QueryShortUrlWithOptions(request, runtime)
  3788. if _err != nil {
  3789. return _result, _err
  3790. }
  3791. _result = _body
  3792. return _result, _err
  3793. }
  3794. // Summary:
  3795. //
  3796. // 查询单个资质详情
  3797. //
  3798. // @param request - QuerySingleSmsQualificationRequest
  3799. //
  3800. // @param runtime - runtime options for this request RuntimeOptions
  3801. //
  3802. // @return QuerySingleSmsQualificationResponse
  3803. func (client *Client) QuerySingleSmsQualificationWithOptions(request *QuerySingleSmsQualificationRequest, runtime *dara.RuntimeOptions) (_result *QuerySingleSmsQualificationResponse, _err error) {
  3804. if dara.BoolValue(client.EnableValidate) == true {
  3805. _err = request.Validate()
  3806. if _err != nil {
  3807. return _result, _err
  3808. }
  3809. }
  3810. query := map[string]interface{}{}
  3811. if !dara.IsNil(request.OrderId) {
  3812. query["OrderId"] = request.OrderId
  3813. }
  3814. if !dara.IsNil(request.OwnerId) {
  3815. query["OwnerId"] = request.OwnerId
  3816. }
  3817. if !dara.IsNil(request.QualificationGroupId) {
  3818. query["QualificationGroupId"] = request.QualificationGroupId
  3819. }
  3820. if !dara.IsNil(request.ResourceOwnerAccount) {
  3821. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  3822. }
  3823. if !dara.IsNil(request.ResourceOwnerId) {
  3824. query["ResourceOwnerId"] = request.ResourceOwnerId
  3825. }
  3826. req := &openapiutil.OpenApiRequest{
  3827. Query: openapiutil.Query(query),
  3828. }
  3829. params := &openapiutil.Params{
  3830. Action: dara.String("QuerySingleSmsQualification"),
  3831. Version: dara.String("2017-05-25"),
  3832. Protocol: dara.String("HTTPS"),
  3833. Pathname: dara.String("/"),
  3834. Method: dara.String("POST"),
  3835. AuthType: dara.String("AK"),
  3836. Style: dara.String("RPC"),
  3837. ReqBodyType: dara.String("formData"),
  3838. BodyType: dara.String("json"),
  3839. }
  3840. _result = &QuerySingleSmsQualificationResponse{}
  3841. _body, _err := client.CallApi(params, req, runtime)
  3842. if _err != nil {
  3843. return _result, _err
  3844. }
  3845. _err = dara.Convert(_body, &_result)
  3846. return _result, _err
  3847. }
  3848. // Summary:
  3849. //
  3850. // 查询单个资质详情
  3851. //
  3852. // @param request - QuerySingleSmsQualificationRequest
  3853. //
  3854. // @return QuerySingleSmsQualificationResponse
  3855. func (client *Client) QuerySingleSmsQualification(request *QuerySingleSmsQualificationRequest) (_result *QuerySingleSmsQualificationResponse, _err error) {
  3856. runtime := &dara.RuntimeOptions{}
  3857. _result = &QuerySingleSmsQualificationResponse{}
  3858. _body, _err := client.QuerySingleSmsQualificationWithOptions(request, runtime)
  3859. if _err != nil {
  3860. return _result, _err
  3861. }
  3862. _result = _body
  3863. return _result, _err
  3864. }
  3865. // Summary:
  3866. //
  3867. // 查询APP-ICP备案对客openAPI
  3868. //
  3869. // @param tmpReq - QuerySmsAppIcpRecordRequest
  3870. //
  3871. // @param runtime - runtime options for this request RuntimeOptions
  3872. //
  3873. // @return QuerySmsAppIcpRecordResponse
  3874. func (client *Client) QuerySmsAppIcpRecordWithOptions(tmpReq *QuerySmsAppIcpRecordRequest, runtime *dara.RuntimeOptions) (_result *QuerySmsAppIcpRecordResponse, _err error) {
  3875. if dara.BoolValue(client.EnableValidate) == true {
  3876. _err = tmpReq.Validate()
  3877. if _err != nil {
  3878. return _result, _err
  3879. }
  3880. }
  3881. request := &QuerySmsAppIcpRecordShrinkRequest{}
  3882. openapiutil.Convert(tmpReq, request)
  3883. if !dara.IsNil(tmpReq.AppIcpRecordIdList) {
  3884. request.AppIcpRecordIdListShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.AppIcpRecordIdList, dara.String("AppIcpRecordIdList"), dara.String("json"))
  3885. }
  3886. query := map[string]interface{}{}
  3887. if !dara.IsNil(request.AppIcpRecordIdListShrink) {
  3888. query["AppIcpRecordIdList"] = request.AppIcpRecordIdListShrink
  3889. }
  3890. if !dara.IsNil(request.OwnerId) {
  3891. query["OwnerId"] = request.OwnerId
  3892. }
  3893. if !dara.IsNil(request.ResourceOwnerAccount) {
  3894. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  3895. }
  3896. if !dara.IsNil(request.ResourceOwnerId) {
  3897. query["ResourceOwnerId"] = request.ResourceOwnerId
  3898. }
  3899. req := &openapiutil.OpenApiRequest{
  3900. Query: openapiutil.Query(query),
  3901. }
  3902. params := &openapiutil.Params{
  3903. Action: dara.String("QuerySmsAppIcpRecord"),
  3904. Version: dara.String("2017-05-25"),
  3905. Protocol: dara.String("HTTPS"),
  3906. Pathname: dara.String("/"),
  3907. Method: dara.String("POST"),
  3908. AuthType: dara.String("AK"),
  3909. Style: dara.String("RPC"),
  3910. ReqBodyType: dara.String("formData"),
  3911. BodyType: dara.String("json"),
  3912. }
  3913. _result = &QuerySmsAppIcpRecordResponse{}
  3914. _body, _err := client.CallApi(params, req, runtime)
  3915. if _err != nil {
  3916. return _result, _err
  3917. }
  3918. _err = dara.Convert(_body, &_result)
  3919. return _result, _err
  3920. }
  3921. // Summary:
  3922. //
  3923. // 查询APP-ICP备案对客openAPI
  3924. //
  3925. // @param request - QuerySmsAppIcpRecordRequest
  3926. //
  3927. // @return QuerySmsAppIcpRecordResponse
  3928. func (client *Client) QuerySmsAppIcpRecord(request *QuerySmsAppIcpRecordRequest) (_result *QuerySmsAppIcpRecordResponse, _err error) {
  3929. runtime := &dara.RuntimeOptions{}
  3930. _result = &QuerySmsAppIcpRecordResponse{}
  3931. _body, _err := client.QuerySmsAppIcpRecordWithOptions(request, runtime)
  3932. if _err != nil {
  3933. return _result, _err
  3934. }
  3935. _result = _body
  3936. return _result, _err
  3937. }
  3938. // Summary:
  3939. //
  3940. // 查询委托授权书
  3941. //
  3942. // @param tmpReq - QuerySmsAuthorizationLetterRequest
  3943. //
  3944. // @param runtime - runtime options for this request RuntimeOptions
  3945. //
  3946. // @return QuerySmsAuthorizationLetterResponse
  3947. func (client *Client) QuerySmsAuthorizationLetterWithOptions(tmpReq *QuerySmsAuthorizationLetterRequest, runtime *dara.RuntimeOptions) (_result *QuerySmsAuthorizationLetterResponse, _err error) {
  3948. if dara.BoolValue(client.EnableValidate) == true {
  3949. _err = tmpReq.Validate()
  3950. if _err != nil {
  3951. return _result, _err
  3952. }
  3953. }
  3954. request := &QuerySmsAuthorizationLetterShrinkRequest{}
  3955. openapiutil.Convert(tmpReq, request)
  3956. if !dara.IsNil(tmpReq.AuthorizationLetterIdList) {
  3957. request.AuthorizationLetterIdListShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.AuthorizationLetterIdList, dara.String("AuthorizationLetterIdList"), dara.String("json"))
  3958. }
  3959. query := map[string]interface{}{}
  3960. if !dara.IsNil(request.AuthorizationLetterIdListShrink) {
  3961. query["AuthorizationLetterIdList"] = request.AuthorizationLetterIdListShrink
  3962. }
  3963. if !dara.IsNil(request.OrganizationCode) {
  3964. query["OrganizationCode"] = request.OrganizationCode
  3965. }
  3966. if !dara.IsNil(request.OwnerId) {
  3967. query["OwnerId"] = request.OwnerId
  3968. }
  3969. if !dara.IsNil(request.ResourceOwnerAccount) {
  3970. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  3971. }
  3972. if !dara.IsNil(request.ResourceOwnerId) {
  3973. query["ResourceOwnerId"] = request.ResourceOwnerId
  3974. }
  3975. if !dara.IsNil(request.SignName) {
  3976. query["SignName"] = request.SignName
  3977. }
  3978. if !dara.IsNil(request.State) {
  3979. query["State"] = request.State
  3980. }
  3981. if !dara.IsNil(request.Status) {
  3982. query["Status"] = request.Status
  3983. }
  3984. req := &openapiutil.OpenApiRequest{
  3985. Query: openapiutil.Query(query),
  3986. }
  3987. params := &openapiutil.Params{
  3988. Action: dara.String("QuerySmsAuthorizationLetter"),
  3989. Version: dara.String("2017-05-25"),
  3990. Protocol: dara.String("HTTPS"),
  3991. Pathname: dara.String("/"),
  3992. Method: dara.String("POST"),
  3993. AuthType: dara.String("AK"),
  3994. Style: dara.String("RPC"),
  3995. ReqBodyType: dara.String("formData"),
  3996. BodyType: dara.String("json"),
  3997. }
  3998. _result = &QuerySmsAuthorizationLetterResponse{}
  3999. _body, _err := client.CallApi(params, req, runtime)
  4000. if _err != nil {
  4001. return _result, _err
  4002. }
  4003. _err = dara.Convert(_body, &_result)
  4004. return _result, _err
  4005. }
  4006. // Summary:
  4007. //
  4008. // 查询委托授权书
  4009. //
  4010. // @param request - QuerySmsAuthorizationLetterRequest
  4011. //
  4012. // @return QuerySmsAuthorizationLetterResponse
  4013. func (client *Client) QuerySmsAuthorizationLetter(request *QuerySmsAuthorizationLetterRequest) (_result *QuerySmsAuthorizationLetterResponse, _err error) {
  4014. runtime := &dara.RuntimeOptions{}
  4015. _result = &QuerySmsAuthorizationLetterResponse{}
  4016. _body, _err := client.QuerySmsAuthorizationLetterWithOptions(request, runtime)
  4017. if _err != nil {
  4018. return _result, _err
  4019. }
  4020. _result = _body
  4021. return _result, _err
  4022. }
  4023. // Summary:
  4024. //
  4025. // 查询资质审核列表页
  4026. //
  4027. // @param request - QuerySmsQualificationRecordRequest
  4028. //
  4029. // @param runtime - runtime options for this request RuntimeOptions
  4030. //
  4031. // @return QuerySmsQualificationRecordResponse
  4032. func (client *Client) QuerySmsQualificationRecordWithOptions(request *QuerySmsQualificationRecordRequest, runtime *dara.RuntimeOptions) (_result *QuerySmsQualificationRecordResponse, _err error) {
  4033. if dara.BoolValue(client.EnableValidate) == true {
  4034. _err = request.Validate()
  4035. if _err != nil {
  4036. return _result, _err
  4037. }
  4038. }
  4039. query := map[string]interface{}{}
  4040. if !dara.IsNil(request.CompanyName) {
  4041. query["CompanyName"] = request.CompanyName
  4042. }
  4043. if !dara.IsNil(request.LegalPersonName) {
  4044. query["LegalPersonName"] = request.LegalPersonName
  4045. }
  4046. if !dara.IsNil(request.OwnerId) {
  4047. query["OwnerId"] = request.OwnerId
  4048. }
  4049. if !dara.IsNil(request.PageNo) {
  4050. query["PageNo"] = request.PageNo
  4051. }
  4052. if !dara.IsNil(request.PageSize) {
  4053. query["PageSize"] = request.PageSize
  4054. }
  4055. if !dara.IsNil(request.QualificationGroupName) {
  4056. query["QualificationGroupName"] = request.QualificationGroupName
  4057. }
  4058. if !dara.IsNil(request.ResourceOwnerAccount) {
  4059. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  4060. }
  4061. if !dara.IsNil(request.ResourceOwnerId) {
  4062. query["ResourceOwnerId"] = request.ResourceOwnerId
  4063. }
  4064. if !dara.IsNil(request.State) {
  4065. query["State"] = request.State
  4066. }
  4067. if !dara.IsNil(request.UseBySelf) {
  4068. query["UseBySelf"] = request.UseBySelf
  4069. }
  4070. if !dara.IsNil(request.WorkOrderId) {
  4071. query["WorkOrderId"] = request.WorkOrderId
  4072. }
  4073. req := &openapiutil.OpenApiRequest{
  4074. Query: openapiutil.Query(query),
  4075. }
  4076. params := &openapiutil.Params{
  4077. Action: dara.String("QuerySmsQualificationRecord"),
  4078. Version: dara.String("2017-05-25"),
  4079. Protocol: dara.String("HTTPS"),
  4080. Pathname: dara.String("/"),
  4081. Method: dara.String("POST"),
  4082. AuthType: dara.String("AK"),
  4083. Style: dara.String("RPC"),
  4084. ReqBodyType: dara.String("formData"),
  4085. BodyType: dara.String("json"),
  4086. }
  4087. _result = &QuerySmsQualificationRecordResponse{}
  4088. _body, _err := client.CallApi(params, req, runtime)
  4089. if _err != nil {
  4090. return _result, _err
  4091. }
  4092. _err = dara.Convert(_body, &_result)
  4093. return _result, _err
  4094. }
  4095. // Summary:
  4096. //
  4097. // 查询资质审核列表页
  4098. //
  4099. // @param request - QuerySmsQualificationRecordRequest
  4100. //
  4101. // @return QuerySmsQualificationRecordResponse
  4102. func (client *Client) QuerySmsQualificationRecord(request *QuerySmsQualificationRecordRequest) (_result *QuerySmsQualificationRecordResponse, _err error) {
  4103. runtime := &dara.RuntimeOptions{}
  4104. _result = &QuerySmsQualificationRecordResponse{}
  4105. _body, _err := client.QuerySmsQualificationRecordWithOptions(request, runtime)
  4106. if _err != nil {
  4107. return _result, _err
  4108. }
  4109. _result = _body
  4110. return _result, _err
  4111. }
  4112. // Summary:
  4113. //
  4114. // Queries the status of a signature.
  4115. //
  4116. // Description:
  4117. //
  4118. // After you apply for an SMS signature, you can query its status by using the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm) or calling the operation. If the signature is rejected, you can modify the signature based on the reason why it is rejected.
  4119. //
  4120. // ### QPS limits
  4121. //
  4122. // You can call this API operation up to 500 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4123. //
  4124. // @param request - QuerySmsSignRequest
  4125. //
  4126. // @param runtime - runtime options for this request RuntimeOptions
  4127. //
  4128. // @return QuerySmsSignResponse
  4129. func (client *Client) QuerySmsSignWithOptions(request *QuerySmsSignRequest, runtime *dara.RuntimeOptions) (_result *QuerySmsSignResponse, _err error) {
  4130. if dara.BoolValue(client.EnableValidate) == true {
  4131. _err = request.Validate()
  4132. if _err != nil {
  4133. return _result, _err
  4134. }
  4135. }
  4136. query := map[string]interface{}{}
  4137. if !dara.IsNil(request.OwnerId) {
  4138. query["OwnerId"] = request.OwnerId
  4139. }
  4140. if !dara.IsNil(request.ResourceOwnerAccount) {
  4141. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  4142. }
  4143. if !dara.IsNil(request.ResourceOwnerId) {
  4144. query["ResourceOwnerId"] = request.ResourceOwnerId
  4145. }
  4146. if !dara.IsNil(request.SignName) {
  4147. query["SignName"] = request.SignName
  4148. }
  4149. req := &openapiutil.OpenApiRequest{
  4150. Query: openapiutil.Query(query),
  4151. }
  4152. params := &openapiutil.Params{
  4153. Action: dara.String("QuerySmsSign"),
  4154. Version: dara.String("2017-05-25"),
  4155. Protocol: dara.String("HTTPS"),
  4156. Pathname: dara.String("/"),
  4157. Method: dara.String("POST"),
  4158. AuthType: dara.String("AK"),
  4159. Style: dara.String("RPC"),
  4160. ReqBodyType: dara.String("formData"),
  4161. BodyType: dara.String("json"),
  4162. }
  4163. _result = &QuerySmsSignResponse{}
  4164. _body, _err := client.CallApi(params, req, runtime)
  4165. if _err != nil {
  4166. return _result, _err
  4167. }
  4168. _err = dara.Convert(_body, &_result)
  4169. return _result, _err
  4170. }
  4171. // Summary:
  4172. //
  4173. // Queries the status of a signature.
  4174. //
  4175. // Description:
  4176. //
  4177. // After you apply for an SMS signature, you can query its status by using the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm) or calling the operation. If the signature is rejected, you can modify the signature based on the reason why it is rejected.
  4178. //
  4179. // ### QPS limits
  4180. //
  4181. // You can call this API operation up to 500 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4182. //
  4183. // @param request - QuerySmsSignRequest
  4184. //
  4185. // @return QuerySmsSignResponse
  4186. func (client *Client) QuerySmsSign(request *QuerySmsSignRequest) (_result *QuerySmsSignResponse, _err error) {
  4187. runtime := &dara.RuntimeOptions{}
  4188. _result = &QuerySmsSignResponse{}
  4189. _body, _err := client.QuerySmsSignWithOptions(request, runtime)
  4190. if _err != nil {
  4191. return _result, _err
  4192. }
  4193. _result = _body
  4194. return _result, _err
  4195. }
  4196. // Summary:
  4197. //
  4198. // Queries message signatures by page.
  4199. //
  4200. // Description:
  4201. //
  4202. // You can call this operation to query the details of message signatures, including the name, creation time, and approval status of each signature. If a message template is rejected, the reason is returned. Modify the message signature based on the reason.
  4203. //
  4204. // ### QPS limit
  4205. //
  4206. // You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4207. //
  4208. // @param request - QuerySmsSignListRequest
  4209. //
  4210. // @param runtime - runtime options for this request RuntimeOptions
  4211. //
  4212. // @return QuerySmsSignListResponse
  4213. func (client *Client) QuerySmsSignListWithOptions(request *QuerySmsSignListRequest, runtime *dara.RuntimeOptions) (_result *QuerySmsSignListResponse, _err error) {
  4214. if dara.BoolValue(client.EnableValidate) == true {
  4215. _err = request.Validate()
  4216. if _err != nil {
  4217. return _result, _err
  4218. }
  4219. }
  4220. query := map[string]interface{}{}
  4221. if !dara.IsNil(request.OwnerId) {
  4222. query["OwnerId"] = request.OwnerId
  4223. }
  4224. if !dara.IsNil(request.PageIndex) {
  4225. query["PageIndex"] = request.PageIndex
  4226. }
  4227. if !dara.IsNil(request.PageSize) {
  4228. query["PageSize"] = request.PageSize
  4229. }
  4230. if !dara.IsNil(request.ResourceOwnerAccount) {
  4231. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  4232. }
  4233. if !dara.IsNil(request.ResourceOwnerId) {
  4234. query["ResourceOwnerId"] = request.ResourceOwnerId
  4235. }
  4236. req := &openapiutil.OpenApiRequest{
  4237. Query: openapiutil.Query(query),
  4238. }
  4239. params := &openapiutil.Params{
  4240. Action: dara.String("QuerySmsSignList"),
  4241. Version: dara.String("2017-05-25"),
  4242. Protocol: dara.String("HTTPS"),
  4243. Pathname: dara.String("/"),
  4244. Method: dara.String("POST"),
  4245. AuthType: dara.String("AK"),
  4246. Style: dara.String("RPC"),
  4247. ReqBodyType: dara.String("formData"),
  4248. BodyType: dara.String("json"),
  4249. }
  4250. _result = &QuerySmsSignListResponse{}
  4251. _body, _err := client.CallApi(params, req, runtime)
  4252. if _err != nil {
  4253. return _result, _err
  4254. }
  4255. _err = dara.Convert(_body, &_result)
  4256. return _result, _err
  4257. }
  4258. // Summary:
  4259. //
  4260. // Queries message signatures by page.
  4261. //
  4262. // Description:
  4263. //
  4264. // You can call this operation to query the details of message signatures, including the name, creation time, and approval status of each signature. If a message template is rejected, the reason is returned. Modify the message signature based on the reason.
  4265. //
  4266. // ### QPS limit
  4267. //
  4268. // You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4269. //
  4270. // @param request - QuerySmsSignListRequest
  4271. //
  4272. // @return QuerySmsSignListResponse
  4273. func (client *Client) QuerySmsSignList(request *QuerySmsSignListRequest) (_result *QuerySmsSignListResponse, _err error) {
  4274. runtime := &dara.RuntimeOptions{}
  4275. _result = &QuerySmsSignListResponse{}
  4276. _body, _err := client.QuerySmsSignListWithOptions(request, runtime)
  4277. if _err != nil {
  4278. return _result, _err
  4279. }
  4280. _result = _body
  4281. return _result, _err
  4282. }
  4283. // Deprecated: OpenAPI QuerySmsTemplate is deprecated, please use Dysmsapi::2017-05-25::GetSmsTemplate instead.
  4284. //
  4285. // Summary:
  4286. //
  4287. // Queries the approval status of a message template.
  4288. //
  4289. // Description:
  4290. //
  4291. // After you create a message template, you can call this operation to query the approval status of the template. If a message template is rejected, the reason is returned. Modify the message template based on the reason.
  4292. //
  4293. // ### QPS limit
  4294. //
  4295. // You can call this operation up to 5,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4296. //
  4297. // @param request - QuerySmsTemplateRequest
  4298. //
  4299. // @param runtime - runtime options for this request RuntimeOptions
  4300. //
  4301. // @return QuerySmsTemplateResponse
  4302. func (client *Client) QuerySmsTemplateWithOptions(request *QuerySmsTemplateRequest, runtime *dara.RuntimeOptions) (_result *QuerySmsTemplateResponse, _err error) {
  4303. if dara.BoolValue(client.EnableValidate) == true {
  4304. _err = request.Validate()
  4305. if _err != nil {
  4306. return _result, _err
  4307. }
  4308. }
  4309. query := map[string]interface{}{}
  4310. if !dara.IsNil(request.OwnerId) {
  4311. query["OwnerId"] = request.OwnerId
  4312. }
  4313. if !dara.IsNil(request.ResourceOwnerAccount) {
  4314. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  4315. }
  4316. if !dara.IsNil(request.ResourceOwnerId) {
  4317. query["ResourceOwnerId"] = request.ResourceOwnerId
  4318. }
  4319. if !dara.IsNil(request.TemplateCode) {
  4320. query["TemplateCode"] = request.TemplateCode
  4321. }
  4322. req := &openapiutil.OpenApiRequest{
  4323. Query: openapiutil.Query(query),
  4324. }
  4325. params := &openapiutil.Params{
  4326. Action: dara.String("QuerySmsTemplate"),
  4327. Version: dara.String("2017-05-25"),
  4328. Protocol: dara.String("HTTPS"),
  4329. Pathname: dara.String("/"),
  4330. Method: dara.String("POST"),
  4331. AuthType: dara.String("AK"),
  4332. Style: dara.String("RPC"),
  4333. ReqBodyType: dara.String("formData"),
  4334. BodyType: dara.String("json"),
  4335. }
  4336. _result = &QuerySmsTemplateResponse{}
  4337. _body, _err := client.CallApi(params, req, runtime)
  4338. if _err != nil {
  4339. return _result, _err
  4340. }
  4341. _err = dara.Convert(_body, &_result)
  4342. return _result, _err
  4343. }
  4344. // Deprecated: OpenAPI QuerySmsTemplate is deprecated, please use Dysmsapi::2017-05-25::GetSmsTemplate instead.
  4345. //
  4346. // Summary:
  4347. //
  4348. // Queries the approval status of a message template.
  4349. //
  4350. // Description:
  4351. //
  4352. // After you create a message template, you can call this operation to query the approval status of the template. If a message template is rejected, the reason is returned. Modify the message template based on the reason.
  4353. //
  4354. // ### QPS limit
  4355. //
  4356. // You can call this operation up to 5,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4357. //
  4358. // @param request - QuerySmsTemplateRequest
  4359. //
  4360. // @return QuerySmsTemplateResponse
  4361. // Deprecated
  4362. func (client *Client) QuerySmsTemplate(request *QuerySmsTemplateRequest) (_result *QuerySmsTemplateResponse, _err error) {
  4363. runtime := &dara.RuntimeOptions{}
  4364. _result = &QuerySmsTemplateResponse{}
  4365. _body, _err := client.QuerySmsTemplateWithOptions(request, runtime)
  4366. if _err != nil {
  4367. return _result, _err
  4368. }
  4369. _result = _body
  4370. return _result, _err
  4371. }
  4372. // Summary:
  4373. //
  4374. // Queries message templates.
  4375. //
  4376. // Description:
  4377. //
  4378. // You can call this operation to query the details of message templates, including the name, creation time, and approval status of each template. If a message template is rejected, the reason is returned. Modify the message template based on the reason.
  4379. //
  4380. // ### QPS limit
  4381. //
  4382. // You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4383. //
  4384. // @param request - QuerySmsTemplateListRequest
  4385. //
  4386. // @param runtime - runtime options for this request RuntimeOptions
  4387. //
  4388. // @return QuerySmsTemplateListResponse
  4389. func (client *Client) QuerySmsTemplateListWithOptions(request *QuerySmsTemplateListRequest, runtime *dara.RuntimeOptions) (_result *QuerySmsTemplateListResponse, _err error) {
  4390. if dara.BoolValue(client.EnableValidate) == true {
  4391. _err = request.Validate()
  4392. if _err != nil {
  4393. return _result, _err
  4394. }
  4395. }
  4396. query := map[string]interface{}{}
  4397. if !dara.IsNil(request.OwnerId) {
  4398. query["OwnerId"] = request.OwnerId
  4399. }
  4400. if !dara.IsNil(request.PageIndex) {
  4401. query["PageIndex"] = request.PageIndex
  4402. }
  4403. if !dara.IsNil(request.PageSize) {
  4404. query["PageSize"] = request.PageSize
  4405. }
  4406. if !dara.IsNil(request.ResourceOwnerAccount) {
  4407. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  4408. }
  4409. if !dara.IsNil(request.ResourceOwnerId) {
  4410. query["ResourceOwnerId"] = request.ResourceOwnerId
  4411. }
  4412. req := &openapiutil.OpenApiRequest{
  4413. Query: openapiutil.Query(query),
  4414. }
  4415. params := &openapiutil.Params{
  4416. Action: dara.String("QuerySmsTemplateList"),
  4417. Version: dara.String("2017-05-25"),
  4418. Protocol: dara.String("HTTPS"),
  4419. Pathname: dara.String("/"),
  4420. Method: dara.String("POST"),
  4421. AuthType: dara.String("AK"),
  4422. Style: dara.String("RPC"),
  4423. ReqBodyType: dara.String("formData"),
  4424. BodyType: dara.String("json"),
  4425. }
  4426. _result = &QuerySmsTemplateListResponse{}
  4427. _body, _err := client.CallApi(params, req, runtime)
  4428. if _err != nil {
  4429. return _result, _err
  4430. }
  4431. _err = dara.Convert(_body, &_result)
  4432. return _result, _err
  4433. }
  4434. // Summary:
  4435. //
  4436. // Queries message templates.
  4437. //
  4438. // Description:
  4439. //
  4440. // You can call this operation to query the details of message templates, including the name, creation time, and approval status of each template. If a message template is rejected, the reason is returned. Modify the message template based on the reason.
  4441. //
  4442. // ### QPS limit
  4443. //
  4444. // You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4445. //
  4446. // @param request - QuerySmsTemplateListRequest
  4447. //
  4448. // @return QuerySmsTemplateListResponse
  4449. func (client *Client) QuerySmsTemplateList(request *QuerySmsTemplateListRequest) (_result *QuerySmsTemplateListResponse, _err error) {
  4450. runtime := &dara.RuntimeOptions{}
  4451. _result = &QuerySmsTemplateListResponse{}
  4452. _body, _err := client.QuerySmsTemplateListWithOptions(request, runtime)
  4453. if _err != nil {
  4454. return _result, _err
  4455. }
  4456. _result = _body
  4457. return _result, _err
  4458. }
  4459. // Summary:
  4460. //
  4461. // 查询商标对客openAPI
  4462. //
  4463. // @param tmpReq - QuerySmsTrademarkRequest
  4464. //
  4465. // @param runtime - runtime options for this request RuntimeOptions
  4466. //
  4467. // @return QuerySmsTrademarkResponse
  4468. func (client *Client) QuerySmsTrademarkWithOptions(tmpReq *QuerySmsTrademarkRequest, runtime *dara.RuntimeOptions) (_result *QuerySmsTrademarkResponse, _err error) {
  4469. if dara.BoolValue(client.EnableValidate) == true {
  4470. _err = tmpReq.Validate()
  4471. if _err != nil {
  4472. return _result, _err
  4473. }
  4474. }
  4475. request := &QuerySmsTrademarkShrinkRequest{}
  4476. openapiutil.Convert(tmpReq, request)
  4477. if !dara.IsNil(tmpReq.TrademarkIdList) {
  4478. request.TrademarkIdListShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.TrademarkIdList, dara.String("TrademarkIdList"), dara.String("json"))
  4479. }
  4480. query := map[string]interface{}{}
  4481. if !dara.IsNil(request.OwnerId) {
  4482. query["OwnerId"] = request.OwnerId
  4483. }
  4484. if !dara.IsNil(request.ResourceOwnerAccount) {
  4485. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  4486. }
  4487. if !dara.IsNil(request.ResourceOwnerId) {
  4488. query["ResourceOwnerId"] = request.ResourceOwnerId
  4489. }
  4490. if !dara.IsNil(request.TrademarkIdListShrink) {
  4491. query["TrademarkIdList"] = request.TrademarkIdListShrink
  4492. }
  4493. req := &openapiutil.OpenApiRequest{
  4494. Query: openapiutil.Query(query),
  4495. }
  4496. params := &openapiutil.Params{
  4497. Action: dara.String("QuerySmsTrademark"),
  4498. Version: dara.String("2017-05-25"),
  4499. Protocol: dara.String("HTTPS"),
  4500. Pathname: dara.String("/"),
  4501. Method: dara.String("POST"),
  4502. AuthType: dara.String("AK"),
  4503. Style: dara.String("RPC"),
  4504. ReqBodyType: dara.String("formData"),
  4505. BodyType: dara.String("json"),
  4506. }
  4507. _result = &QuerySmsTrademarkResponse{}
  4508. _body, _err := client.CallApi(params, req, runtime)
  4509. if _err != nil {
  4510. return _result, _err
  4511. }
  4512. _err = dara.Convert(_body, &_result)
  4513. return _result, _err
  4514. }
  4515. // Summary:
  4516. //
  4517. // 查询商标对客openAPI
  4518. //
  4519. // @param request - QuerySmsTrademarkRequest
  4520. //
  4521. // @return QuerySmsTrademarkResponse
  4522. func (client *Client) QuerySmsTrademark(request *QuerySmsTrademarkRequest) (_result *QuerySmsTrademarkResponse, _err error) {
  4523. runtime := &dara.RuntimeOptions{}
  4524. _result = &QuerySmsTrademarkResponse{}
  4525. _body, _err := client.QuerySmsTrademarkWithOptions(request, runtime)
  4526. if _err != nil {
  4527. return _result, _err
  4528. }
  4529. _result = _body
  4530. return _result, _err
  4531. }
  4532. // Summary:
  4533. //
  4534. // 验证手机验证码
  4535. //
  4536. // @param request - RequiredPhoneCodeRequest
  4537. //
  4538. // @param runtime - runtime options for this request RuntimeOptions
  4539. //
  4540. // @return RequiredPhoneCodeResponse
  4541. func (client *Client) RequiredPhoneCodeWithOptions(request *RequiredPhoneCodeRequest, runtime *dara.RuntimeOptions) (_result *RequiredPhoneCodeResponse, _err error) {
  4542. if dara.BoolValue(client.EnableValidate) == true {
  4543. _err = request.Validate()
  4544. if _err != nil {
  4545. return _result, _err
  4546. }
  4547. }
  4548. query := map[string]interface{}{}
  4549. if !dara.IsNil(request.OwnerId) {
  4550. query["OwnerId"] = request.OwnerId
  4551. }
  4552. if !dara.IsNil(request.PhoneNo) {
  4553. query["PhoneNo"] = request.PhoneNo
  4554. }
  4555. if !dara.IsNil(request.ResourceOwnerAccount) {
  4556. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  4557. }
  4558. if !dara.IsNil(request.ResourceOwnerId) {
  4559. query["ResourceOwnerId"] = request.ResourceOwnerId
  4560. }
  4561. req := &openapiutil.OpenApiRequest{
  4562. Query: openapiutil.Query(query),
  4563. }
  4564. params := &openapiutil.Params{
  4565. Action: dara.String("RequiredPhoneCode"),
  4566. Version: dara.String("2017-05-25"),
  4567. Protocol: dara.String("HTTPS"),
  4568. Pathname: dara.String("/"),
  4569. Method: dara.String("POST"),
  4570. AuthType: dara.String("AK"),
  4571. Style: dara.String("RPC"),
  4572. ReqBodyType: dara.String("formData"),
  4573. BodyType: dara.String("json"),
  4574. }
  4575. _result = &RequiredPhoneCodeResponse{}
  4576. _body, _err := client.CallApi(params, req, runtime)
  4577. if _err != nil {
  4578. return _result, _err
  4579. }
  4580. _err = dara.Convert(_body, &_result)
  4581. return _result, _err
  4582. }
  4583. // Summary:
  4584. //
  4585. // 验证手机验证码
  4586. //
  4587. // @param request - RequiredPhoneCodeRequest
  4588. //
  4589. // @return RequiredPhoneCodeResponse
  4590. func (client *Client) RequiredPhoneCode(request *RequiredPhoneCodeRequest) (_result *RequiredPhoneCodeResponse, _err error) {
  4591. runtime := &dara.RuntimeOptions{}
  4592. _result = &RequiredPhoneCodeResponse{}
  4593. _body, _err := client.RequiredPhoneCodeWithOptions(request, runtime)
  4594. if _err != nil {
  4595. return _result, _err
  4596. }
  4597. _result = _body
  4598. return _result, _err
  4599. }
  4600. // Summary:
  4601. //
  4602. // Sends multiple card messages at a time.
  4603. //
  4604. // Description:
  4605. //
  4606. // You can call the operation to send multiple card messages to a maximum of mobile phone numbers at a time. Different signatures and rollback settings can be specified for the mobile phone numbers.
  4607. //
  4608. // ### QPS limit
  4609. //
  4610. // You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4611. //
  4612. // @param request - SendBatchCardSmsRequest
  4613. //
  4614. // @param runtime - runtime options for this request RuntimeOptions
  4615. //
  4616. // @return SendBatchCardSmsResponse
  4617. func (client *Client) SendBatchCardSmsWithOptions(request *SendBatchCardSmsRequest, runtime *dara.RuntimeOptions) (_result *SendBatchCardSmsResponse, _err error) {
  4618. if dara.BoolValue(client.EnableValidate) == true {
  4619. _err = request.Validate()
  4620. if _err != nil {
  4621. return _result, _err
  4622. }
  4623. }
  4624. query := map[string]interface{}{}
  4625. if !dara.IsNil(request.CardTemplateCode) {
  4626. query["CardTemplateCode"] = request.CardTemplateCode
  4627. }
  4628. if !dara.IsNil(request.CardTemplateParamJson) {
  4629. query["CardTemplateParamJson"] = request.CardTemplateParamJson
  4630. }
  4631. if !dara.IsNil(request.DigitalTemplateCode) {
  4632. query["DigitalTemplateCode"] = request.DigitalTemplateCode
  4633. }
  4634. if !dara.IsNil(request.DigitalTemplateParamJson) {
  4635. query["DigitalTemplateParamJson"] = request.DigitalTemplateParamJson
  4636. }
  4637. if !dara.IsNil(request.FallbackType) {
  4638. query["FallbackType"] = request.FallbackType
  4639. }
  4640. if !dara.IsNil(request.OutId) {
  4641. query["OutId"] = request.OutId
  4642. }
  4643. if !dara.IsNil(request.PhoneNumberJson) {
  4644. query["PhoneNumberJson"] = request.PhoneNumberJson
  4645. }
  4646. if !dara.IsNil(request.SignNameJson) {
  4647. query["SignNameJson"] = request.SignNameJson
  4648. }
  4649. if !dara.IsNil(request.SmsTemplateCode) {
  4650. query["SmsTemplateCode"] = request.SmsTemplateCode
  4651. }
  4652. if !dara.IsNil(request.SmsTemplateParamJson) {
  4653. query["SmsTemplateParamJson"] = request.SmsTemplateParamJson
  4654. }
  4655. if !dara.IsNil(request.SmsUpExtendCodeJson) {
  4656. query["SmsUpExtendCodeJson"] = request.SmsUpExtendCodeJson
  4657. }
  4658. if !dara.IsNil(request.TemplateCode) {
  4659. query["TemplateCode"] = request.TemplateCode
  4660. }
  4661. if !dara.IsNil(request.TemplateParamJson) {
  4662. query["TemplateParamJson"] = request.TemplateParamJson
  4663. }
  4664. req := &openapiutil.OpenApiRequest{
  4665. Query: openapiutil.Query(query),
  4666. }
  4667. params := &openapiutil.Params{
  4668. Action: dara.String("SendBatchCardSms"),
  4669. Version: dara.String("2017-05-25"),
  4670. Protocol: dara.String("HTTPS"),
  4671. Pathname: dara.String("/"),
  4672. Method: dara.String("POST"),
  4673. AuthType: dara.String("AK"),
  4674. Style: dara.String("RPC"),
  4675. ReqBodyType: dara.String("formData"),
  4676. BodyType: dara.String("json"),
  4677. }
  4678. _result = &SendBatchCardSmsResponse{}
  4679. _body, _err := client.CallApi(params, req, runtime)
  4680. if _err != nil {
  4681. return _result, _err
  4682. }
  4683. _err = dara.Convert(_body, &_result)
  4684. return _result, _err
  4685. }
  4686. // Summary:
  4687. //
  4688. // Sends multiple card messages at a time.
  4689. //
  4690. // Description:
  4691. //
  4692. // You can call the operation to send multiple card messages to a maximum of mobile phone numbers at a time. Different signatures and rollback settings can be specified for the mobile phone numbers.
  4693. //
  4694. // ### QPS limit
  4695. //
  4696. // You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4697. //
  4698. // @param request - SendBatchCardSmsRequest
  4699. //
  4700. // @return SendBatchCardSmsResponse
  4701. func (client *Client) SendBatchCardSms(request *SendBatchCardSmsRequest) (_result *SendBatchCardSmsResponse, _err error) {
  4702. runtime := &dara.RuntimeOptions{}
  4703. _result = &SendBatchCardSmsResponse{}
  4704. _body, _err := client.SendBatchCardSmsWithOptions(request, runtime)
  4705. if _err != nil {
  4706. return _result, _err
  4707. }
  4708. _result = _body
  4709. return _result, _err
  4710. }
  4711. // Summary:
  4712. //
  4713. // Uses a single message template and multiple signatures to send messages to multiple recipients.
  4714. //
  4715. // Description:
  4716. //
  4717. // You can call the operation to send messages to a maximum of 100 recipients at a time.
  4718. //
  4719. // @param request - SendBatchSmsRequest
  4720. //
  4721. // @param runtime - runtime options for this request RuntimeOptions
  4722. //
  4723. // @return SendBatchSmsResponse
  4724. func (client *Client) SendBatchSmsWithOptions(request *SendBatchSmsRequest, runtime *dara.RuntimeOptions) (_result *SendBatchSmsResponse, _err error) {
  4725. if dara.BoolValue(client.EnableValidate) == true {
  4726. _err = request.Validate()
  4727. if _err != nil {
  4728. return _result, _err
  4729. }
  4730. }
  4731. query := map[string]interface{}{}
  4732. if !dara.IsNil(request.OutId) {
  4733. query["OutId"] = request.OutId
  4734. }
  4735. if !dara.IsNil(request.OwnerId) {
  4736. query["OwnerId"] = request.OwnerId
  4737. }
  4738. if !dara.IsNil(request.ResourceOwnerAccount) {
  4739. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  4740. }
  4741. if !dara.IsNil(request.ResourceOwnerId) {
  4742. query["ResourceOwnerId"] = request.ResourceOwnerId
  4743. }
  4744. if !dara.IsNil(request.TemplateCode) {
  4745. query["TemplateCode"] = request.TemplateCode
  4746. }
  4747. body := map[string]interface{}{}
  4748. if !dara.IsNil(request.PhoneNumberJson) {
  4749. body["PhoneNumberJson"] = request.PhoneNumberJson
  4750. }
  4751. if !dara.IsNil(request.SignNameJson) {
  4752. body["SignNameJson"] = request.SignNameJson
  4753. }
  4754. if !dara.IsNil(request.SmsUpExtendCodeJson) {
  4755. body["SmsUpExtendCodeJson"] = request.SmsUpExtendCodeJson
  4756. }
  4757. if !dara.IsNil(request.TemplateParamJson) {
  4758. body["TemplateParamJson"] = request.TemplateParamJson
  4759. }
  4760. req := &openapiutil.OpenApiRequest{
  4761. Query: openapiutil.Query(query),
  4762. Body: openapiutil.ParseToMap(body),
  4763. }
  4764. params := &openapiutil.Params{
  4765. Action: dara.String("SendBatchSms"),
  4766. Version: dara.String("2017-05-25"),
  4767. Protocol: dara.String("HTTPS"),
  4768. Pathname: dara.String("/"),
  4769. Method: dara.String("POST"),
  4770. AuthType: dara.String("AK"),
  4771. Style: dara.String("RPC"),
  4772. ReqBodyType: dara.String("formData"),
  4773. BodyType: dara.String("json"),
  4774. }
  4775. _result = &SendBatchSmsResponse{}
  4776. _body, _err := client.CallApi(params, req, runtime)
  4777. if _err != nil {
  4778. return _result, _err
  4779. }
  4780. _err = dara.Convert(_body, &_result)
  4781. return _result, _err
  4782. }
  4783. // Summary:
  4784. //
  4785. // Uses a single message template and multiple signatures to send messages to multiple recipients.
  4786. //
  4787. // Description:
  4788. //
  4789. // You can call the operation to send messages to a maximum of 100 recipients at a time.
  4790. //
  4791. // @param request - SendBatchSmsRequest
  4792. //
  4793. // @return SendBatchSmsResponse
  4794. func (client *Client) SendBatchSms(request *SendBatchSmsRequest) (_result *SendBatchSmsResponse, _err error) {
  4795. runtime := &dara.RuntimeOptions{}
  4796. _result = &SendBatchSmsResponse{}
  4797. _body, _err := client.SendBatchSmsWithOptions(request, runtime)
  4798. if _err != nil {
  4799. return _result, _err
  4800. }
  4801. _result = _body
  4802. return _result, _err
  4803. }
  4804. // Summary:
  4805. //
  4806. // Sends a card message.
  4807. //
  4808. // Description:
  4809. //
  4810. // Make sure that the message template that you want to use has been approved. If the mobile phone number of a recipient does not support card messages, the SendCardSms operation allows the rollback feature to ensure successful delivery.
  4811. //
  4812. // - When you call the SendCardSms operation to send card messages, the operation checks whether the mobile phone numbers of the recipients support card messages. If the mobile phone numbers do not support card messages, you can specify whether to enable rollback. Otherwise, the card message cannot be delivered.
  4813. //
  4814. // ### QPS limit
  4815. //
  4816. // You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4817. //
  4818. // @param request - SendCardSmsRequest
  4819. //
  4820. // @param runtime - runtime options for this request RuntimeOptions
  4821. //
  4822. // @return SendCardSmsResponse
  4823. func (client *Client) SendCardSmsWithOptions(request *SendCardSmsRequest, runtime *dara.RuntimeOptions) (_result *SendCardSmsResponse, _err error) {
  4824. if dara.BoolValue(client.EnableValidate) == true {
  4825. _err = request.Validate()
  4826. if _err != nil {
  4827. return _result, _err
  4828. }
  4829. }
  4830. query := map[string]interface{}{}
  4831. if !dara.IsNil(request.CardObjects) {
  4832. query["CardObjects"] = request.CardObjects
  4833. }
  4834. if !dara.IsNil(request.CardTemplateCode) {
  4835. query["CardTemplateCode"] = request.CardTemplateCode
  4836. }
  4837. if !dara.IsNil(request.DigitalTemplateCode) {
  4838. query["DigitalTemplateCode"] = request.DigitalTemplateCode
  4839. }
  4840. if !dara.IsNil(request.DigitalTemplateParam) {
  4841. query["DigitalTemplateParam"] = request.DigitalTemplateParam
  4842. }
  4843. if !dara.IsNil(request.FallbackType) {
  4844. query["FallbackType"] = request.FallbackType
  4845. }
  4846. if !dara.IsNil(request.OutId) {
  4847. query["OutId"] = request.OutId
  4848. }
  4849. if !dara.IsNil(request.SignName) {
  4850. query["SignName"] = request.SignName
  4851. }
  4852. if !dara.IsNil(request.SmsTemplateCode) {
  4853. query["SmsTemplateCode"] = request.SmsTemplateCode
  4854. }
  4855. if !dara.IsNil(request.SmsTemplateParam) {
  4856. query["SmsTemplateParam"] = request.SmsTemplateParam
  4857. }
  4858. if !dara.IsNil(request.SmsUpExtendCode) {
  4859. query["SmsUpExtendCode"] = request.SmsUpExtendCode
  4860. }
  4861. if !dara.IsNil(request.TemplateCode) {
  4862. query["TemplateCode"] = request.TemplateCode
  4863. }
  4864. if !dara.IsNil(request.TemplateParam) {
  4865. query["TemplateParam"] = request.TemplateParam
  4866. }
  4867. req := &openapiutil.OpenApiRequest{
  4868. Query: openapiutil.Query(query),
  4869. }
  4870. params := &openapiutil.Params{
  4871. Action: dara.String("SendCardSms"),
  4872. Version: dara.String("2017-05-25"),
  4873. Protocol: dara.String("HTTPS"),
  4874. Pathname: dara.String("/"),
  4875. Method: dara.String("POST"),
  4876. AuthType: dara.String("AK"),
  4877. Style: dara.String("RPC"),
  4878. ReqBodyType: dara.String("formData"),
  4879. BodyType: dara.String("json"),
  4880. }
  4881. _result = &SendCardSmsResponse{}
  4882. _body, _err := client.CallApi(params, req, runtime)
  4883. if _err != nil {
  4884. return _result, _err
  4885. }
  4886. _err = dara.Convert(_body, &_result)
  4887. return _result, _err
  4888. }
  4889. // Summary:
  4890. //
  4891. // Sends a card message.
  4892. //
  4893. // Description:
  4894. //
  4895. // Make sure that the message template that you want to use has been approved. If the mobile phone number of a recipient does not support card messages, the SendCardSms operation allows the rollback feature to ensure successful delivery.
  4896. //
  4897. // - When you call the SendCardSms operation to send card messages, the operation checks whether the mobile phone numbers of the recipients support card messages. If the mobile phone numbers do not support card messages, you can specify whether to enable rollback. Otherwise, the card message cannot be delivered.
  4898. //
  4899. // ### QPS limit
  4900. //
  4901. // You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  4902. //
  4903. // @param request - SendCardSmsRequest
  4904. //
  4905. // @return SendCardSmsResponse
  4906. func (client *Client) SendCardSms(request *SendCardSmsRequest) (_result *SendCardSmsResponse, _err error) {
  4907. runtime := &dara.RuntimeOptions{}
  4908. _result = &SendCardSmsResponse{}
  4909. _body, _err := client.SendCardSmsWithOptions(request, runtime)
  4910. if _err != nil {
  4911. return _result, _err
  4912. }
  4913. _result = _body
  4914. return _result, _err
  4915. }
  4916. // Summary:
  4917. //
  4918. // 发送物流短信
  4919. //
  4920. // @param request - SendLogisticsSmsRequest
  4921. //
  4922. // @param runtime - runtime options for this request RuntimeOptions
  4923. //
  4924. // @return SendLogisticsSmsResponse
  4925. func (client *Client) SendLogisticsSmsWithOptions(request *SendLogisticsSmsRequest, runtime *dara.RuntimeOptions) (_result *SendLogisticsSmsResponse, _err error) {
  4926. if dara.BoolValue(client.EnableValidate) == true {
  4927. _err = request.Validate()
  4928. if _err != nil {
  4929. return _result, _err
  4930. }
  4931. }
  4932. query := map[string]interface{}{}
  4933. if !dara.IsNil(request.ExpressCompanyCode) {
  4934. query["ExpressCompanyCode"] = request.ExpressCompanyCode
  4935. }
  4936. if !dara.IsNil(request.MailNo) {
  4937. query["MailNo"] = request.MailNo
  4938. }
  4939. if !dara.IsNil(request.OutId) {
  4940. query["OutId"] = request.OutId
  4941. }
  4942. if !dara.IsNil(request.OwnerId) {
  4943. query["OwnerId"] = request.OwnerId
  4944. }
  4945. if !dara.IsNil(request.PlatformCompanyCode) {
  4946. query["PlatformCompanyCode"] = request.PlatformCompanyCode
  4947. }
  4948. if !dara.IsNil(request.ResourceOwnerAccount) {
  4949. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  4950. }
  4951. if !dara.IsNil(request.ResourceOwnerId) {
  4952. query["ResourceOwnerId"] = request.ResourceOwnerId
  4953. }
  4954. if !dara.IsNil(request.SignName) {
  4955. query["SignName"] = request.SignName
  4956. }
  4957. if !dara.IsNil(request.TemplateCode) {
  4958. query["TemplateCode"] = request.TemplateCode
  4959. }
  4960. if !dara.IsNil(request.TemplateParam) {
  4961. query["TemplateParam"] = request.TemplateParam
  4962. }
  4963. req := &openapiutil.OpenApiRequest{
  4964. Query: openapiutil.Query(query),
  4965. }
  4966. params := &openapiutil.Params{
  4967. Action: dara.String("SendLogisticsSms"),
  4968. Version: dara.String("2017-05-25"),
  4969. Protocol: dara.String("HTTPS"),
  4970. Pathname: dara.String("/"),
  4971. Method: dara.String("POST"),
  4972. AuthType: dara.String("AK"),
  4973. Style: dara.String("RPC"),
  4974. ReqBodyType: dara.String("formData"),
  4975. BodyType: dara.String("json"),
  4976. }
  4977. _result = &SendLogisticsSmsResponse{}
  4978. _body, _err := client.CallApi(params, req, runtime)
  4979. if _err != nil {
  4980. return _result, _err
  4981. }
  4982. _err = dara.Convert(_body, &_result)
  4983. return _result, _err
  4984. }
  4985. // Summary:
  4986. //
  4987. // 发送物流短信
  4988. //
  4989. // @param request - SendLogisticsSmsRequest
  4990. //
  4991. // @return SendLogisticsSmsResponse
  4992. func (client *Client) SendLogisticsSms(request *SendLogisticsSmsRequest) (_result *SendLogisticsSmsResponse, _err error) {
  4993. runtime := &dara.RuntimeOptions{}
  4994. _result = &SendLogisticsSmsResponse{}
  4995. _body, _err := client.SendLogisticsSmsWithOptions(request, runtime)
  4996. if _err != nil {
  4997. return _result, _err
  4998. }
  4999. _result = _body
  5000. return _result, _err
  5001. }
  5002. // Summary:
  5003. //
  5004. // Sends a message. Before you call this operation, submit a message signature and message template, and make sure that the signature and template are approved.
  5005. //
  5006. // Description:
  5007. //
  5008. // This operation is mainly used to send a single message. In special scenarios, you can send multiple messages with the same content to a maximum of 1,000 mobile numbers. Note that group sending may be delayed.
  5009. //
  5010. // - To send messages with different signatures and template content to multiple mobile numbers in a single request, call the [SendBatchSms](https://help.aliyun.com/document_detail/102364.html) operation.
  5011. //
  5012. // - You are charged for using Alibaba Cloud Short Message Service (SMS) based on the amount of messages sent. For more information, see [Pricing](https://www.aliyun.com/price/product#/sms/detail).
  5013. //
  5014. // - If your verification code signature and general-purpose signature have the same name, the system uses the general-purpose signature to send messages by default.
  5015. //
  5016. // @param request - SendSmsRequest
  5017. //
  5018. // @param runtime - runtime options for this request RuntimeOptions
  5019. //
  5020. // @return SendSmsResponse
  5021. func (client *Client) SendSmsWithOptions(request *SendSmsRequest, runtime *dara.RuntimeOptions) (_result *SendSmsResponse, _err error) {
  5022. if dara.BoolValue(client.EnableValidate) == true {
  5023. _err = request.Validate()
  5024. if _err != nil {
  5025. return _result, _err
  5026. }
  5027. }
  5028. query := map[string]interface{}{}
  5029. if !dara.IsNil(request.OutId) {
  5030. query["OutId"] = request.OutId
  5031. }
  5032. if !dara.IsNil(request.OwnerId) {
  5033. query["OwnerId"] = request.OwnerId
  5034. }
  5035. if !dara.IsNil(request.PhoneNumbers) {
  5036. query["PhoneNumbers"] = request.PhoneNumbers
  5037. }
  5038. if !dara.IsNil(request.ResourceOwnerAccount) {
  5039. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  5040. }
  5041. if !dara.IsNil(request.ResourceOwnerId) {
  5042. query["ResourceOwnerId"] = request.ResourceOwnerId
  5043. }
  5044. if !dara.IsNil(request.SignName) {
  5045. query["SignName"] = request.SignName
  5046. }
  5047. if !dara.IsNil(request.SmsUpExtendCode) {
  5048. query["SmsUpExtendCode"] = request.SmsUpExtendCode
  5049. }
  5050. if !dara.IsNil(request.TemplateCode) {
  5051. query["TemplateCode"] = request.TemplateCode
  5052. }
  5053. if !dara.IsNil(request.TemplateParam) {
  5054. query["TemplateParam"] = request.TemplateParam
  5055. }
  5056. req := &openapiutil.OpenApiRequest{
  5057. Query: openapiutil.Query(query),
  5058. }
  5059. params := &openapiutil.Params{
  5060. Action: dara.String("SendSms"),
  5061. Version: dara.String("2017-05-25"),
  5062. Protocol: dara.String("HTTPS"),
  5063. Pathname: dara.String("/"),
  5064. Method: dara.String("POST"),
  5065. AuthType: dara.String("AK"),
  5066. Style: dara.String("RPC"),
  5067. ReqBodyType: dara.String("formData"),
  5068. BodyType: dara.String("json"),
  5069. }
  5070. _result = &SendSmsResponse{}
  5071. _body, _err := client.CallApi(params, req, runtime)
  5072. if _err != nil {
  5073. return _result, _err
  5074. }
  5075. _err = dara.Convert(_body, &_result)
  5076. return _result, _err
  5077. }
  5078. // Summary:
  5079. //
  5080. // Sends a message. Before you call this operation, submit a message signature and message template, and make sure that the signature and template are approved.
  5081. //
  5082. // Description:
  5083. //
  5084. // This operation is mainly used to send a single message. In special scenarios, you can send multiple messages with the same content to a maximum of 1,000 mobile numbers. Note that group sending may be delayed.
  5085. //
  5086. // - To send messages with different signatures and template content to multiple mobile numbers in a single request, call the [SendBatchSms](https://help.aliyun.com/document_detail/102364.html) operation.
  5087. //
  5088. // - You are charged for using Alibaba Cloud Short Message Service (SMS) based on the amount of messages sent. For more information, see [Pricing](https://www.aliyun.com/price/product#/sms/detail).
  5089. //
  5090. // - If your verification code signature and general-purpose signature have the same name, the system uses the general-purpose signature to send messages by default.
  5091. //
  5092. // @param request - SendSmsRequest
  5093. //
  5094. // @return SendSmsResponse
  5095. func (client *Client) SendSms(request *SendSmsRequest) (_result *SendSmsResponse, _err error) {
  5096. runtime := &dara.RuntimeOptions{}
  5097. _result = &SendSmsResponse{}
  5098. _body, _err := client.SendSmsWithOptions(request, runtime)
  5099. if _err != nil {
  5100. return _result, _err
  5101. }
  5102. _result = _body
  5103. return _result, _err
  5104. }
  5105. // Summary:
  5106. //
  5107. // Reports the status of an OTP message to Alibaba Cloud SMS.
  5108. //
  5109. // Description:
  5110. //
  5111. // Metrics:
  5112. //
  5113. // - Requested OTP messages
  5114. //
  5115. // - Verified OTP messages
  5116. //
  5117. // An OTP conversion rate is calculated based on the following formula: OTP conversion rate = Number of verified OTP messages/Number of requested OTP messages.
  5118. //
  5119. // > If you call the SmsConversion operation to query OTP conversion rates, your business may be affected. We recommend that you perform the following operations: 1. Call the SmsConversion operation in an asynchronous manner by configuring queues or events. 2. Manually degrade your services or use a circuit breaker to automatically degrade services.
  5120. //
  5121. // @param request - SmsConversionIntlRequest
  5122. //
  5123. // @param runtime - runtime options for this request RuntimeOptions
  5124. //
  5125. // @return SmsConversionIntlResponse
  5126. func (client *Client) SmsConversionIntlWithOptions(request *SmsConversionIntlRequest, runtime *dara.RuntimeOptions) (_result *SmsConversionIntlResponse, _err error) {
  5127. if dara.BoolValue(client.EnableValidate) == true {
  5128. _err = request.Validate()
  5129. if _err != nil {
  5130. return _result, _err
  5131. }
  5132. }
  5133. query := map[string]interface{}{}
  5134. if !dara.IsNil(request.ConversionTime) {
  5135. query["ConversionTime"] = request.ConversionTime
  5136. }
  5137. if !dara.IsNil(request.Delivered) {
  5138. query["Delivered"] = request.Delivered
  5139. }
  5140. if !dara.IsNil(request.MessageId) {
  5141. query["MessageId"] = request.MessageId
  5142. }
  5143. if !dara.IsNil(request.OwnerId) {
  5144. query["OwnerId"] = request.OwnerId
  5145. }
  5146. if !dara.IsNil(request.ResourceOwnerAccount) {
  5147. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  5148. }
  5149. if !dara.IsNil(request.ResourceOwnerId) {
  5150. query["ResourceOwnerId"] = request.ResourceOwnerId
  5151. }
  5152. req := &openapiutil.OpenApiRequest{
  5153. Query: openapiutil.Query(query),
  5154. }
  5155. params := &openapiutil.Params{
  5156. Action: dara.String("SmsConversionIntl"),
  5157. Version: dara.String("2017-05-25"),
  5158. Protocol: dara.String("HTTPS"),
  5159. Pathname: dara.String("/"),
  5160. Method: dara.String("POST"),
  5161. AuthType: dara.String("AK"),
  5162. Style: dara.String("RPC"),
  5163. ReqBodyType: dara.String("formData"),
  5164. BodyType: dara.String("json"),
  5165. }
  5166. _result = &SmsConversionIntlResponse{}
  5167. _body, _err := client.CallApi(params, req, runtime)
  5168. if _err != nil {
  5169. return _result, _err
  5170. }
  5171. _err = dara.Convert(_body, &_result)
  5172. return _result, _err
  5173. }
  5174. // Summary:
  5175. //
  5176. // Reports the status of an OTP message to Alibaba Cloud SMS.
  5177. //
  5178. // Description:
  5179. //
  5180. // Metrics:
  5181. //
  5182. // - Requested OTP messages
  5183. //
  5184. // - Verified OTP messages
  5185. //
  5186. // An OTP conversion rate is calculated based on the following formula: OTP conversion rate = Number of verified OTP messages/Number of requested OTP messages.
  5187. //
  5188. // > If you call the SmsConversion operation to query OTP conversion rates, your business may be affected. We recommend that you perform the following operations: 1. Call the SmsConversion operation in an asynchronous manner by configuring queues or events. 2. Manually degrade your services or use a circuit breaker to automatically degrade services.
  5189. //
  5190. // @param request - SmsConversionIntlRequest
  5191. //
  5192. // @return SmsConversionIntlResponse
  5193. func (client *Client) SmsConversionIntl(request *SmsConversionIntlRequest) (_result *SmsConversionIntlResponse, _err error) {
  5194. runtime := &dara.RuntimeOptions{}
  5195. _result = &SmsConversionIntlResponse{}
  5196. _body, _err := client.SmsConversionIntlWithOptions(request, runtime)
  5197. if _err != nil {
  5198. return _result, _err
  5199. }
  5200. _result = _body
  5201. return _result, _err
  5202. }
  5203. // Summary:
  5204. //
  5205. // 创建资质对客openAPI
  5206. //
  5207. // @param tmpReq - SubmitSmsQualificationRequest
  5208. //
  5209. // @param runtime - runtime options for this request RuntimeOptions
  5210. //
  5211. // @return SubmitSmsQualificationResponse
  5212. func (client *Client) SubmitSmsQualificationWithOptions(tmpReq *SubmitSmsQualificationRequest, runtime *dara.RuntimeOptions) (_result *SubmitSmsQualificationResponse, _err error) {
  5213. if dara.BoolValue(client.EnableValidate) == true {
  5214. _err = tmpReq.Validate()
  5215. if _err != nil {
  5216. return _result, _err
  5217. }
  5218. }
  5219. request := &SubmitSmsQualificationShrinkRequest{}
  5220. openapiutil.Convert(tmpReq, request)
  5221. if !dara.IsNil(tmpReq.BusinessLicensePics) {
  5222. request.BusinessLicensePicsShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.BusinessLicensePics, dara.String("BusinessLicensePics"), dara.String("json"))
  5223. }
  5224. if !dara.IsNil(tmpReq.OtherFiles) {
  5225. request.OtherFilesShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.OtherFiles, dara.String("OtherFiles"), dara.String("json"))
  5226. }
  5227. query := map[string]interface{}{}
  5228. if !dara.IsNil(request.AdminIDCardExpDate) {
  5229. query["AdminIDCardExpDate"] = request.AdminIDCardExpDate
  5230. }
  5231. if !dara.IsNil(request.AdminIDCardFrontFace) {
  5232. query["AdminIDCardFrontFace"] = request.AdminIDCardFrontFace
  5233. }
  5234. if !dara.IsNil(request.AdminIDCardNo) {
  5235. query["AdminIDCardNo"] = request.AdminIDCardNo
  5236. }
  5237. if !dara.IsNil(request.AdminIDCardPic) {
  5238. query["AdminIDCardPic"] = request.AdminIDCardPic
  5239. }
  5240. if !dara.IsNil(request.AdminIDCardType) {
  5241. query["AdminIDCardType"] = request.AdminIDCardType
  5242. }
  5243. if !dara.IsNil(request.AdminName) {
  5244. query["AdminName"] = request.AdminName
  5245. }
  5246. if !dara.IsNil(request.AdminPhoneNo) {
  5247. query["AdminPhoneNo"] = request.AdminPhoneNo
  5248. }
  5249. if !dara.IsNil(request.BusinessLicensePicsShrink) {
  5250. query["BusinessLicensePics"] = request.BusinessLicensePicsShrink
  5251. }
  5252. if !dara.IsNil(request.BussinessLicenseExpDate) {
  5253. query["BussinessLicenseExpDate"] = request.BussinessLicenseExpDate
  5254. }
  5255. if !dara.IsNil(request.CertifyCode) {
  5256. query["CertifyCode"] = request.CertifyCode
  5257. }
  5258. if !dara.IsNil(request.CompanyName) {
  5259. query["CompanyName"] = request.CompanyName
  5260. }
  5261. if !dara.IsNil(request.CompanyType) {
  5262. query["CompanyType"] = request.CompanyType
  5263. }
  5264. if !dara.IsNil(request.LegalPersonIDCardNo) {
  5265. query["LegalPersonIDCardNo"] = request.LegalPersonIDCardNo
  5266. }
  5267. if !dara.IsNil(request.LegalPersonIDCardType) {
  5268. query["LegalPersonIDCardType"] = request.LegalPersonIDCardType
  5269. }
  5270. if !dara.IsNil(request.LegalPersonIdCardBackSide) {
  5271. query["LegalPersonIdCardBackSide"] = request.LegalPersonIdCardBackSide
  5272. }
  5273. if !dara.IsNil(request.LegalPersonIdCardEffTime) {
  5274. query["LegalPersonIdCardEffTime"] = request.LegalPersonIdCardEffTime
  5275. }
  5276. if !dara.IsNil(request.LegalPersonIdCardFrontSide) {
  5277. query["LegalPersonIdCardFrontSide"] = request.LegalPersonIdCardFrontSide
  5278. }
  5279. if !dara.IsNil(request.LegalPersonName) {
  5280. query["LegalPersonName"] = request.LegalPersonName
  5281. }
  5282. if !dara.IsNil(request.OrganizationCode) {
  5283. query["OrganizationCode"] = request.OrganizationCode
  5284. }
  5285. if !dara.IsNil(request.OtherFilesShrink) {
  5286. query["OtherFiles"] = request.OtherFilesShrink
  5287. }
  5288. if !dara.IsNil(request.OwnerId) {
  5289. query["OwnerId"] = request.OwnerId
  5290. }
  5291. if !dara.IsNil(request.QualificationName) {
  5292. query["QualificationName"] = request.QualificationName
  5293. }
  5294. if !dara.IsNil(request.Remark) {
  5295. query["Remark"] = request.Remark
  5296. }
  5297. if !dara.IsNil(request.ResourceOwnerAccount) {
  5298. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  5299. }
  5300. if !dara.IsNil(request.ResourceOwnerId) {
  5301. query["ResourceOwnerId"] = request.ResourceOwnerId
  5302. }
  5303. if !dara.IsNil(request.UseBySelf) {
  5304. query["UseBySelf"] = request.UseBySelf
  5305. }
  5306. if !dara.IsNil(request.WhetherShare) {
  5307. query["WhetherShare"] = request.WhetherShare
  5308. }
  5309. req := &openapiutil.OpenApiRequest{
  5310. Query: openapiutil.Query(query),
  5311. }
  5312. params := &openapiutil.Params{
  5313. Action: dara.String("SubmitSmsQualification"),
  5314. Version: dara.String("2017-05-25"),
  5315. Protocol: dara.String("HTTPS"),
  5316. Pathname: dara.String("/"),
  5317. Method: dara.String("POST"),
  5318. AuthType: dara.String("AK"),
  5319. Style: dara.String("RPC"),
  5320. ReqBodyType: dara.String("formData"),
  5321. BodyType: dara.String("json"),
  5322. }
  5323. _result = &SubmitSmsQualificationResponse{}
  5324. _body, _err := client.CallApi(params, req, runtime)
  5325. if _err != nil {
  5326. return _result, _err
  5327. }
  5328. _err = dara.Convert(_body, &_result)
  5329. return _result, _err
  5330. }
  5331. // Summary:
  5332. //
  5333. // 创建资质对客openAPI
  5334. //
  5335. // @param request - SubmitSmsQualificationRequest
  5336. //
  5337. // @return SubmitSmsQualificationResponse
  5338. func (client *Client) SubmitSmsQualification(request *SubmitSmsQualificationRequest) (_result *SubmitSmsQualificationResponse, _err error) {
  5339. runtime := &dara.RuntimeOptions{}
  5340. _result = &SubmitSmsQualificationResponse{}
  5341. _body, _err := client.SubmitSmsQualificationWithOptions(request, runtime)
  5342. if _err != nil {
  5343. return _result, _err
  5344. }
  5345. _result = _body
  5346. return _result, _err
  5347. }
  5348. // Summary:
  5349. //
  5350. // Attaches tags to a message template.
  5351. //
  5352. // Description:
  5353. //
  5354. // ### QPS limit
  5355. //
  5356. // You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  5357. //
  5358. // @param request - TagResourcesRequest
  5359. //
  5360. // @param runtime - runtime options for this request RuntimeOptions
  5361. //
  5362. // @return TagResourcesResponse
  5363. func (client *Client) TagResourcesWithOptions(request *TagResourcesRequest, runtime *dara.RuntimeOptions) (_result *TagResourcesResponse, _err error) {
  5364. if dara.BoolValue(client.EnableValidate) == true {
  5365. _err = request.Validate()
  5366. if _err != nil {
  5367. return _result, _err
  5368. }
  5369. }
  5370. query := map[string]interface{}{}
  5371. if !dara.IsNil(request.OwnerId) {
  5372. query["OwnerId"] = request.OwnerId
  5373. }
  5374. if !dara.IsNil(request.ProdCode) {
  5375. query["ProdCode"] = request.ProdCode
  5376. }
  5377. if !dara.IsNil(request.RegionId) {
  5378. query["RegionId"] = request.RegionId
  5379. }
  5380. if !dara.IsNil(request.ResourceId) {
  5381. query["ResourceId"] = request.ResourceId
  5382. }
  5383. if !dara.IsNil(request.ResourceOwnerAccount) {
  5384. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  5385. }
  5386. if !dara.IsNil(request.ResourceOwnerId) {
  5387. query["ResourceOwnerId"] = request.ResourceOwnerId
  5388. }
  5389. if !dara.IsNil(request.ResourceType) {
  5390. query["ResourceType"] = request.ResourceType
  5391. }
  5392. if !dara.IsNil(request.Tag) {
  5393. query["Tag"] = request.Tag
  5394. }
  5395. req := &openapiutil.OpenApiRequest{
  5396. Query: openapiutil.Query(query),
  5397. }
  5398. params := &openapiutil.Params{
  5399. Action: dara.String("TagResources"),
  5400. Version: dara.String("2017-05-25"),
  5401. Protocol: dara.String("HTTPS"),
  5402. Pathname: dara.String("/"),
  5403. Method: dara.String("POST"),
  5404. AuthType: dara.String("AK"),
  5405. Style: dara.String("RPC"),
  5406. ReqBodyType: dara.String("formData"),
  5407. BodyType: dara.String("json"),
  5408. }
  5409. _result = &TagResourcesResponse{}
  5410. _body, _err := client.CallApi(params, req, runtime)
  5411. if _err != nil {
  5412. return _result, _err
  5413. }
  5414. _err = dara.Convert(_body, &_result)
  5415. return _result, _err
  5416. }
  5417. // Summary:
  5418. //
  5419. // Attaches tags to a message template.
  5420. //
  5421. // Description:
  5422. //
  5423. // ### QPS limit
  5424. //
  5425. // You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  5426. //
  5427. // @param request - TagResourcesRequest
  5428. //
  5429. // @return TagResourcesResponse
  5430. func (client *Client) TagResources(request *TagResourcesRequest) (_result *TagResourcesResponse, _err error) {
  5431. runtime := &dara.RuntimeOptions{}
  5432. _result = &TagResourcesResponse{}
  5433. _body, _err := client.TagResourcesWithOptions(request, runtime)
  5434. if _err != nil {
  5435. return _result, _err
  5436. }
  5437. _result = _body
  5438. return _result, _err
  5439. }
  5440. // Summary:
  5441. //
  5442. // Deletes tags from a message template.
  5443. //
  5444. // Description:
  5445. //
  5446. // ### QPS limit
  5447. //
  5448. // You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  5449. //
  5450. // @param request - UntagResourcesRequest
  5451. //
  5452. // @param runtime - runtime options for this request RuntimeOptions
  5453. //
  5454. // @return UntagResourcesResponse
  5455. func (client *Client) UntagResourcesWithOptions(request *UntagResourcesRequest, runtime *dara.RuntimeOptions) (_result *UntagResourcesResponse, _err error) {
  5456. if dara.BoolValue(client.EnableValidate) == true {
  5457. _err = request.Validate()
  5458. if _err != nil {
  5459. return _result, _err
  5460. }
  5461. }
  5462. query := map[string]interface{}{}
  5463. if !dara.IsNil(request.All) {
  5464. query["All"] = request.All
  5465. }
  5466. if !dara.IsNil(request.OwnerId) {
  5467. query["OwnerId"] = request.OwnerId
  5468. }
  5469. if !dara.IsNil(request.ProdCode) {
  5470. query["ProdCode"] = request.ProdCode
  5471. }
  5472. if !dara.IsNil(request.RegionId) {
  5473. query["RegionId"] = request.RegionId
  5474. }
  5475. if !dara.IsNil(request.ResourceId) {
  5476. query["ResourceId"] = request.ResourceId
  5477. }
  5478. if !dara.IsNil(request.ResourceOwnerAccount) {
  5479. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  5480. }
  5481. if !dara.IsNil(request.ResourceOwnerId) {
  5482. query["ResourceOwnerId"] = request.ResourceOwnerId
  5483. }
  5484. if !dara.IsNil(request.ResourceType) {
  5485. query["ResourceType"] = request.ResourceType
  5486. }
  5487. if !dara.IsNil(request.TagKey) {
  5488. query["TagKey"] = request.TagKey
  5489. }
  5490. req := &openapiutil.OpenApiRequest{
  5491. Query: openapiutil.Query(query),
  5492. }
  5493. params := &openapiutil.Params{
  5494. Action: dara.String("UntagResources"),
  5495. Version: dara.String("2017-05-25"),
  5496. Protocol: dara.String("HTTPS"),
  5497. Pathname: dara.String("/"),
  5498. Method: dara.String("POST"),
  5499. AuthType: dara.String("AK"),
  5500. Style: dara.String("RPC"),
  5501. ReqBodyType: dara.String("formData"),
  5502. BodyType: dara.String("json"),
  5503. }
  5504. _result = &UntagResourcesResponse{}
  5505. _body, _err := client.CallApi(params, req, runtime)
  5506. if _err != nil {
  5507. return _result, _err
  5508. }
  5509. _err = dara.Convert(_body, &_result)
  5510. return _result, _err
  5511. }
  5512. // Summary:
  5513. //
  5514. // Deletes tags from a message template.
  5515. //
  5516. // Description:
  5517. //
  5518. // ### QPS limit
  5519. //
  5520. // You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
  5521. //
  5522. // @param request - UntagResourcesRequest
  5523. //
  5524. // @return UntagResourcesResponse
  5525. func (client *Client) UntagResources(request *UntagResourcesRequest) (_result *UntagResourcesResponse, _err error) {
  5526. runtime := &dara.RuntimeOptions{}
  5527. _result = &UntagResourcesResponse{}
  5528. _body, _err := client.UntagResourcesWithOptions(request, runtime)
  5529. if _err != nil {
  5530. return _result, _err
  5531. }
  5532. _result = _body
  5533. return _result, _err
  5534. }
  5535. // Summary:
  5536. //
  5537. // 修改验证码签名
  5538. //
  5539. // @param request - UpdateExtCodeSignRequest
  5540. //
  5541. // @param runtime - runtime options for this request RuntimeOptions
  5542. //
  5543. // @return UpdateExtCodeSignResponse
  5544. func (client *Client) UpdateExtCodeSignWithOptions(request *UpdateExtCodeSignRequest, runtime *dara.RuntimeOptions) (_result *UpdateExtCodeSignResponse, _err error) {
  5545. if dara.BoolValue(client.EnableValidate) == true {
  5546. _err = request.Validate()
  5547. if _err != nil {
  5548. return _result, _err
  5549. }
  5550. }
  5551. query := map[string]interface{}{}
  5552. if !dara.IsNil(request.ExistExtCode) {
  5553. query["ExistExtCode"] = request.ExistExtCode
  5554. }
  5555. if !dara.IsNil(request.NewExtCode) {
  5556. query["NewExtCode"] = request.NewExtCode
  5557. }
  5558. if !dara.IsNil(request.OwnerId) {
  5559. query["OwnerId"] = request.OwnerId
  5560. }
  5561. if !dara.IsNil(request.ResourceOwnerAccount) {
  5562. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  5563. }
  5564. if !dara.IsNil(request.ResourceOwnerId) {
  5565. query["ResourceOwnerId"] = request.ResourceOwnerId
  5566. }
  5567. if !dara.IsNil(request.SignName) {
  5568. query["SignName"] = request.SignName
  5569. }
  5570. req := &openapiutil.OpenApiRequest{
  5571. Query: openapiutil.Query(query),
  5572. }
  5573. params := &openapiutil.Params{
  5574. Action: dara.String("UpdateExtCodeSign"),
  5575. Version: dara.String("2017-05-25"),
  5576. Protocol: dara.String("HTTPS"),
  5577. Pathname: dara.String("/"),
  5578. Method: dara.String("POST"),
  5579. AuthType: dara.String("AK"),
  5580. Style: dara.String("RPC"),
  5581. ReqBodyType: dara.String("formData"),
  5582. BodyType: dara.String("json"),
  5583. }
  5584. _result = &UpdateExtCodeSignResponse{}
  5585. _body, _err := client.CallApi(params, req, runtime)
  5586. if _err != nil {
  5587. return _result, _err
  5588. }
  5589. _err = dara.Convert(_body, &_result)
  5590. return _result, _err
  5591. }
  5592. // Summary:
  5593. //
  5594. // 修改验证码签名
  5595. //
  5596. // @param request - UpdateExtCodeSignRequest
  5597. //
  5598. // @return UpdateExtCodeSignResponse
  5599. func (client *Client) UpdateExtCodeSign(request *UpdateExtCodeSignRequest) (_result *UpdateExtCodeSignResponse, _err error) {
  5600. runtime := &dara.RuntimeOptions{}
  5601. _result = &UpdateExtCodeSignResponse{}
  5602. _body, _err := client.UpdateExtCodeSignWithOptions(request, runtime)
  5603. if _err != nil {
  5604. return _result, _err
  5605. }
  5606. _result = _body
  5607. return _result, _err
  5608. }
  5609. // Summary:
  5610. //
  5611. // 修改资质对客openAPI
  5612. //
  5613. // @param tmpReq - UpdateSmsQualificationRequest
  5614. //
  5615. // @param runtime - runtime options for this request RuntimeOptions
  5616. //
  5617. // @return UpdateSmsQualificationResponse
  5618. func (client *Client) UpdateSmsQualificationWithOptions(tmpReq *UpdateSmsQualificationRequest, runtime *dara.RuntimeOptions) (_result *UpdateSmsQualificationResponse, _err error) {
  5619. if dara.BoolValue(client.EnableValidate) == true {
  5620. _err = tmpReq.Validate()
  5621. if _err != nil {
  5622. return _result, _err
  5623. }
  5624. }
  5625. request := &UpdateSmsQualificationShrinkRequest{}
  5626. openapiutil.Convert(tmpReq, request)
  5627. if !dara.IsNil(tmpReq.BusinessLicensePics) {
  5628. request.BusinessLicensePicsShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.BusinessLicensePics, dara.String("BusinessLicensePics"), dara.String("json"))
  5629. }
  5630. if !dara.IsNil(tmpReq.OtherFiles) {
  5631. request.OtherFilesShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.OtherFiles, dara.String("OtherFiles"), dara.String("json"))
  5632. }
  5633. query := map[string]interface{}{}
  5634. if !dara.IsNil(request.AdminIDCardExpDate) {
  5635. query["AdminIDCardExpDate"] = request.AdminIDCardExpDate
  5636. }
  5637. if !dara.IsNil(request.AdminIDCardFrontFace) {
  5638. query["AdminIDCardFrontFace"] = request.AdminIDCardFrontFace
  5639. }
  5640. if !dara.IsNil(request.AdminIDCardNo) {
  5641. query["AdminIDCardNo"] = request.AdminIDCardNo
  5642. }
  5643. if !dara.IsNil(request.AdminIDCardPic) {
  5644. query["AdminIDCardPic"] = request.AdminIDCardPic
  5645. }
  5646. if !dara.IsNil(request.AdminIDCardType) {
  5647. query["AdminIDCardType"] = request.AdminIDCardType
  5648. }
  5649. if !dara.IsNil(request.AdminName) {
  5650. query["AdminName"] = request.AdminName
  5651. }
  5652. if !dara.IsNil(request.AdminPhoneNo) {
  5653. query["AdminPhoneNo"] = request.AdminPhoneNo
  5654. }
  5655. if !dara.IsNil(request.BusinessLicensePicsShrink) {
  5656. query["BusinessLicensePics"] = request.BusinessLicensePicsShrink
  5657. }
  5658. if !dara.IsNil(request.BussinessLicenseExpDate) {
  5659. query["BussinessLicenseExpDate"] = request.BussinessLicenseExpDate
  5660. }
  5661. if !dara.IsNil(request.CertifyCode) {
  5662. query["CertifyCode"] = request.CertifyCode
  5663. }
  5664. if !dara.IsNil(request.CompanyName) {
  5665. query["CompanyName"] = request.CompanyName
  5666. }
  5667. if !dara.IsNil(request.LegalPersonIDCardNo) {
  5668. query["LegalPersonIDCardNo"] = request.LegalPersonIDCardNo
  5669. }
  5670. if !dara.IsNil(request.LegalPersonIDCardType) {
  5671. query["LegalPersonIDCardType"] = request.LegalPersonIDCardType
  5672. }
  5673. if !dara.IsNil(request.LegalPersonIdCardBackSide) {
  5674. query["LegalPersonIdCardBackSide"] = request.LegalPersonIdCardBackSide
  5675. }
  5676. if !dara.IsNil(request.LegalPersonIdCardEffTime) {
  5677. query["LegalPersonIdCardEffTime"] = request.LegalPersonIdCardEffTime
  5678. }
  5679. if !dara.IsNil(request.LegalPersonIdCardFrontSide) {
  5680. query["LegalPersonIdCardFrontSide"] = request.LegalPersonIdCardFrontSide
  5681. }
  5682. if !dara.IsNil(request.LegalPersonName) {
  5683. query["LegalPersonName"] = request.LegalPersonName
  5684. }
  5685. if !dara.IsNil(request.OrderId) {
  5686. query["OrderId"] = request.OrderId
  5687. }
  5688. if !dara.IsNil(request.OtherFilesShrink) {
  5689. query["OtherFiles"] = request.OtherFilesShrink
  5690. }
  5691. if !dara.IsNil(request.OwnerId) {
  5692. query["OwnerId"] = request.OwnerId
  5693. }
  5694. if !dara.IsNil(request.QualificationGroupId) {
  5695. query["QualificationGroupId"] = request.QualificationGroupId
  5696. }
  5697. if !dara.IsNil(request.ResourceOwnerAccount) {
  5698. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  5699. }
  5700. if !dara.IsNil(request.ResourceOwnerId) {
  5701. query["ResourceOwnerId"] = request.ResourceOwnerId
  5702. }
  5703. req := &openapiutil.OpenApiRequest{
  5704. Query: openapiutil.Query(query),
  5705. }
  5706. params := &openapiutil.Params{
  5707. Action: dara.String("UpdateSmsQualification"),
  5708. Version: dara.String("2017-05-25"),
  5709. Protocol: dara.String("HTTPS"),
  5710. Pathname: dara.String("/"),
  5711. Method: dara.String("POST"),
  5712. AuthType: dara.String("AK"),
  5713. Style: dara.String("RPC"),
  5714. ReqBodyType: dara.String("formData"),
  5715. BodyType: dara.String("json"),
  5716. }
  5717. _result = &UpdateSmsQualificationResponse{}
  5718. _body, _err := client.CallApi(params, req, runtime)
  5719. if _err != nil {
  5720. return _result, _err
  5721. }
  5722. _err = dara.Convert(_body, &_result)
  5723. return _result, _err
  5724. }
  5725. // Summary:
  5726. //
  5727. // 修改资质对客openAPI
  5728. //
  5729. // @param request - UpdateSmsQualificationRequest
  5730. //
  5731. // @return UpdateSmsQualificationResponse
  5732. func (client *Client) UpdateSmsQualification(request *UpdateSmsQualificationRequest) (_result *UpdateSmsQualificationResponse, _err error) {
  5733. runtime := &dara.RuntimeOptions{}
  5734. _result = &UpdateSmsQualificationResponse{}
  5735. _body, _err := client.UpdateSmsQualificationWithOptions(request, runtime)
  5736. if _err != nil {
  5737. return _result, _err
  5738. }
  5739. _result = _body
  5740. return _result, _err
  5741. }
  5742. // Summary:
  5743. //
  5744. // # Update Text SMS Signature
  5745. //
  5746. // Description:
  5747. //
  5748. // - For details about the changes of this new interface and the original one, please refer to [Announcement on the Update of SMS Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  5749. //
  5750. // - Only signatures that have not passed the review can be modified. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm) and call this interface to modify and resubmit for review after modification.
  5751. //
  5752. // - Signature information applied through the interface will be synchronized in the SMS service console. For operations related to signatures in the console, please see [SMS Signatures](https://help.aliyun.com/zh/sms/user-guide/create-signatures?spm).
  5753. //
  5754. // @param tmpReq - UpdateSmsSignRequest
  5755. //
  5756. // @param runtime - runtime options for this request RuntimeOptions
  5757. //
  5758. // @return UpdateSmsSignResponse
  5759. func (client *Client) UpdateSmsSignWithOptions(tmpReq *UpdateSmsSignRequest, runtime *dara.RuntimeOptions) (_result *UpdateSmsSignResponse, _err error) {
  5760. if dara.BoolValue(client.EnableValidate) == true {
  5761. _err = tmpReq.Validate()
  5762. if _err != nil {
  5763. return _result, _err
  5764. }
  5765. }
  5766. request := &UpdateSmsSignShrinkRequest{}
  5767. openapiutil.Convert(tmpReq, request)
  5768. if !dara.IsNil(tmpReq.MoreData) {
  5769. request.MoreDataShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.MoreData, dara.String("MoreData"), dara.String("json"))
  5770. }
  5771. query := map[string]interface{}{}
  5772. if !dara.IsNil(request.AppIcpRecordId) {
  5773. query["AppIcpRecordId"] = request.AppIcpRecordId
  5774. }
  5775. if !dara.IsNil(request.ApplySceneContent) {
  5776. query["ApplySceneContent"] = request.ApplySceneContent
  5777. }
  5778. if !dara.IsNil(request.AuthorizationLetterId) {
  5779. query["AuthorizationLetterId"] = request.AuthorizationLetterId
  5780. }
  5781. if !dara.IsNil(request.MoreDataShrink) {
  5782. query["MoreData"] = request.MoreDataShrink
  5783. }
  5784. if !dara.IsNil(request.OwnerId) {
  5785. query["OwnerId"] = request.OwnerId
  5786. }
  5787. if !dara.IsNil(request.QualificationId) {
  5788. query["QualificationId"] = request.QualificationId
  5789. }
  5790. if !dara.IsNil(request.Remark) {
  5791. query["Remark"] = request.Remark
  5792. }
  5793. if !dara.IsNil(request.ResourceOwnerAccount) {
  5794. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  5795. }
  5796. if !dara.IsNil(request.ResourceOwnerId) {
  5797. query["ResourceOwnerId"] = request.ResourceOwnerId
  5798. }
  5799. if !dara.IsNil(request.SignName) {
  5800. query["SignName"] = request.SignName
  5801. }
  5802. if !dara.IsNil(request.SignSource) {
  5803. query["SignSource"] = request.SignSource
  5804. }
  5805. if !dara.IsNil(request.SignType) {
  5806. query["SignType"] = request.SignType
  5807. }
  5808. if !dara.IsNil(request.ThirdParty) {
  5809. query["ThirdParty"] = request.ThirdParty
  5810. }
  5811. if !dara.IsNil(request.TrademarkId) {
  5812. query["TrademarkId"] = request.TrademarkId
  5813. }
  5814. req := &openapiutil.OpenApiRequest{
  5815. Query: openapiutil.Query(query),
  5816. }
  5817. params := &openapiutil.Params{
  5818. Action: dara.String("UpdateSmsSign"),
  5819. Version: dara.String("2017-05-25"),
  5820. Protocol: dara.String("HTTPS"),
  5821. Pathname: dara.String("/"),
  5822. Method: dara.String("POST"),
  5823. AuthType: dara.String("AK"),
  5824. Style: dara.String("RPC"),
  5825. ReqBodyType: dara.String("formData"),
  5826. BodyType: dara.String("json"),
  5827. }
  5828. _result = &UpdateSmsSignResponse{}
  5829. _body, _err := client.CallApi(params, req, runtime)
  5830. if _err != nil {
  5831. return _result, _err
  5832. }
  5833. _err = dara.Convert(_body, &_result)
  5834. return _result, _err
  5835. }
  5836. // Summary:
  5837. //
  5838. // # Update Text SMS Signature
  5839. //
  5840. // Description:
  5841. //
  5842. // - For details about the changes of this new interface and the original one, please refer to [Announcement on the Update of SMS Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  5843. //
  5844. // - Only signatures that have not passed the review can be modified. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm) and call this interface to modify and resubmit for review after modification.
  5845. //
  5846. // - Signature information applied through the interface will be synchronized in the SMS service console. For operations related to signatures in the console, please see [SMS Signatures](https://help.aliyun.com/zh/sms/user-guide/create-signatures?spm).
  5847. //
  5848. // @param request - UpdateSmsSignRequest
  5849. //
  5850. // @return UpdateSmsSignResponse
  5851. func (client *Client) UpdateSmsSign(request *UpdateSmsSignRequest) (_result *UpdateSmsSignResponse, _err error) {
  5852. runtime := &dara.RuntimeOptions{}
  5853. _result = &UpdateSmsSignResponse{}
  5854. _body, _err := client.UpdateSmsSignWithOptions(request, runtime)
  5855. if _err != nil {
  5856. return _result, _err
  5857. }
  5858. _result = _body
  5859. return _result, _err
  5860. }
  5861. // Summary:
  5862. //
  5863. // # Update Text SMS Template
  5864. //
  5865. // Description:
  5866. //
  5867. // - For details about the changes of this new interface compared to the original one, please refer to [Announcement on SMS Service Update: Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  5868. //
  5869. // - Only templates that have not passed the review can be modified. Please refer to [Handling Suggestions for Failed SMS Template Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm=a2c4g.11186623.0.0.4bf5561ajcFtMQ) and call this interface to modify and resubmit for review.
  5870. //
  5871. // - Modifications made through the interface will be synchronized in the SMS service console. For related operations on templates in the console, see [SMS Templates](https://help.aliyun.com/zh/sms/user-guide/message-templates/?spm=a2c4g.11186623.0.0.35a947464Itaxp).
  5872. //
  5873. // ### QPS Limit
  5874. //
  5875. // The single-user QPS limit for this interface is 1000 times/second. Exceeding this limit will result in API throttling, which may impact your business. Please make calls reasonably.
  5876. //
  5877. // @param tmpReq - UpdateSmsTemplateRequest
  5878. //
  5879. // @param runtime - runtime options for this request RuntimeOptions
  5880. //
  5881. // @return UpdateSmsTemplateResponse
  5882. func (client *Client) UpdateSmsTemplateWithOptions(tmpReq *UpdateSmsTemplateRequest, runtime *dara.RuntimeOptions) (_result *UpdateSmsTemplateResponse, _err error) {
  5883. if dara.BoolValue(client.EnableValidate) == true {
  5884. _err = tmpReq.Validate()
  5885. if _err != nil {
  5886. return _result, _err
  5887. }
  5888. }
  5889. request := &UpdateSmsTemplateShrinkRequest{}
  5890. openapiutil.Convert(tmpReq, request)
  5891. if !dara.IsNil(tmpReq.MoreData) {
  5892. request.MoreDataShrink = openapiutil.ArrayToStringWithSpecifiedStyle(tmpReq.MoreData, dara.String("MoreData"), dara.String("json"))
  5893. }
  5894. query := map[string]interface{}{}
  5895. if !dara.IsNil(request.ApplySceneContent) {
  5896. query["ApplySceneContent"] = request.ApplySceneContent
  5897. }
  5898. if !dara.IsNil(request.IntlType) {
  5899. query["IntlType"] = request.IntlType
  5900. }
  5901. if !dara.IsNil(request.MoreDataShrink) {
  5902. query["MoreData"] = request.MoreDataShrink
  5903. }
  5904. if !dara.IsNil(request.OwnerId) {
  5905. query["OwnerId"] = request.OwnerId
  5906. }
  5907. if !dara.IsNil(request.RelatedSignName) {
  5908. query["RelatedSignName"] = request.RelatedSignName
  5909. }
  5910. if !dara.IsNil(request.Remark) {
  5911. query["Remark"] = request.Remark
  5912. }
  5913. if !dara.IsNil(request.ResourceOwnerAccount) {
  5914. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  5915. }
  5916. if !dara.IsNil(request.ResourceOwnerId) {
  5917. query["ResourceOwnerId"] = request.ResourceOwnerId
  5918. }
  5919. if !dara.IsNil(request.TemplateCode) {
  5920. query["TemplateCode"] = request.TemplateCode
  5921. }
  5922. if !dara.IsNil(request.TemplateContent) {
  5923. query["TemplateContent"] = request.TemplateContent
  5924. }
  5925. if !dara.IsNil(request.TemplateName) {
  5926. query["TemplateName"] = request.TemplateName
  5927. }
  5928. if !dara.IsNil(request.TemplateRule) {
  5929. query["TemplateRule"] = request.TemplateRule
  5930. }
  5931. if !dara.IsNil(request.TemplateType) {
  5932. query["TemplateType"] = request.TemplateType
  5933. }
  5934. if !dara.IsNil(request.TrafficDriving) {
  5935. query["TrafficDriving"] = request.TrafficDriving
  5936. }
  5937. req := &openapiutil.OpenApiRequest{
  5938. Query: openapiutil.Query(query),
  5939. }
  5940. params := &openapiutil.Params{
  5941. Action: dara.String("UpdateSmsTemplate"),
  5942. Version: dara.String("2017-05-25"),
  5943. Protocol: dara.String("HTTPS"),
  5944. Pathname: dara.String("/"),
  5945. Method: dara.String("POST"),
  5946. AuthType: dara.String("AK"),
  5947. Style: dara.String("RPC"),
  5948. ReqBodyType: dara.String("formData"),
  5949. BodyType: dara.String("json"),
  5950. }
  5951. _result = &UpdateSmsTemplateResponse{}
  5952. _body, _err := client.CallApi(params, req, runtime)
  5953. if _err != nil {
  5954. return _result, _err
  5955. }
  5956. _err = dara.Convert(_body, &_result)
  5957. return _result, _err
  5958. }
  5959. // Summary:
  5960. //
  5961. // # Update Text SMS Template
  5962. //
  5963. // Description:
  5964. //
  5965. // - For details about the changes of this new interface compared to the original one, please refer to [Announcement on SMS Service Update: Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface).
  5966. //
  5967. // - Only templates that have not passed the review can be modified. Please refer to [Handling Suggestions for Failed SMS Template Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm=a2c4g.11186623.0.0.4bf5561ajcFtMQ) and call this interface to modify and resubmit for review.
  5968. //
  5969. // - Modifications made through the interface will be synchronized in the SMS service console. For related operations on templates in the console, see [SMS Templates](https://help.aliyun.com/zh/sms/user-guide/message-templates/?spm=a2c4g.11186623.0.0.35a947464Itaxp).
  5970. //
  5971. // ### QPS Limit
  5972. //
  5973. // The single-user QPS limit for this interface is 1000 times/second. Exceeding this limit will result in API throttling, which may impact your business. Please make calls reasonably.
  5974. //
  5975. // @param request - UpdateSmsTemplateRequest
  5976. //
  5977. // @return UpdateSmsTemplateResponse
  5978. func (client *Client) UpdateSmsTemplate(request *UpdateSmsTemplateRequest) (_result *UpdateSmsTemplateResponse, _err error) {
  5979. runtime := &dara.RuntimeOptions{}
  5980. _result = &UpdateSmsTemplateResponse{}
  5981. _body, _err := client.UpdateSmsTemplateWithOptions(request, runtime)
  5982. if _err != nil {
  5983. return _result, _err
  5984. }
  5985. _result = _body
  5986. return _result, _err
  5987. }
  5988. // Summary:
  5989. //
  5990. // 发送手机验证码
  5991. //
  5992. // @param request - ValidPhoneCodeRequest
  5993. //
  5994. // @param runtime - runtime options for this request RuntimeOptions
  5995. //
  5996. // @return ValidPhoneCodeResponse
  5997. func (client *Client) ValidPhoneCodeWithOptions(request *ValidPhoneCodeRequest, runtime *dara.RuntimeOptions) (_result *ValidPhoneCodeResponse, _err error) {
  5998. if dara.BoolValue(client.EnableValidate) == true {
  5999. _err = request.Validate()
  6000. if _err != nil {
  6001. return _result, _err
  6002. }
  6003. }
  6004. query := map[string]interface{}{}
  6005. if !dara.IsNil(request.CertifyCode) {
  6006. query["CertifyCode"] = request.CertifyCode
  6007. }
  6008. if !dara.IsNil(request.OwnerId) {
  6009. query["OwnerId"] = request.OwnerId
  6010. }
  6011. if !dara.IsNil(request.PhoneNo) {
  6012. query["PhoneNo"] = request.PhoneNo
  6013. }
  6014. if !dara.IsNil(request.ResourceOwnerAccount) {
  6015. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  6016. }
  6017. if !dara.IsNil(request.ResourceOwnerId) {
  6018. query["ResourceOwnerId"] = request.ResourceOwnerId
  6019. }
  6020. req := &openapiutil.OpenApiRequest{
  6021. Query: openapiutil.Query(query),
  6022. }
  6023. params := &openapiutil.Params{
  6024. Action: dara.String("ValidPhoneCode"),
  6025. Version: dara.String("2017-05-25"),
  6026. Protocol: dara.String("HTTPS"),
  6027. Pathname: dara.String("/"),
  6028. Method: dara.String("POST"),
  6029. AuthType: dara.String("AK"),
  6030. Style: dara.String("RPC"),
  6031. ReqBodyType: dara.String("formData"),
  6032. BodyType: dara.String("json"),
  6033. }
  6034. _result = &ValidPhoneCodeResponse{}
  6035. _body, _err := client.CallApi(params, req, runtime)
  6036. if _err != nil {
  6037. return _result, _err
  6038. }
  6039. _err = dara.Convert(_body, &_result)
  6040. return _result, _err
  6041. }
  6042. // Summary:
  6043. //
  6044. // 发送手机验证码
  6045. //
  6046. // @param request - ValidPhoneCodeRequest
  6047. //
  6048. // @return ValidPhoneCodeResponse
  6049. func (client *Client) ValidPhoneCode(request *ValidPhoneCodeRequest) (_result *ValidPhoneCodeResponse, _err error) {
  6050. runtime := &dara.RuntimeOptions{}
  6051. _result = &ValidPhoneCodeResponse{}
  6052. _body, _err := client.ValidPhoneCodeWithOptions(request, runtime)
  6053. if _err != nil {
  6054. return _result, _err
  6055. }
  6056. _result = _body
  6057. return _result, _err
  6058. }
  6059. // Summary:
  6060. //
  6061. // 物流短信运单号校验
  6062. //
  6063. // @param request - VerifyLogisticsSmsMailNoRequest
  6064. //
  6065. // @param runtime - runtime options for this request RuntimeOptions
  6066. //
  6067. // @return VerifyLogisticsSmsMailNoResponse
  6068. func (client *Client) VerifyLogisticsSmsMailNoWithOptions(request *VerifyLogisticsSmsMailNoRequest, runtime *dara.RuntimeOptions) (_result *VerifyLogisticsSmsMailNoResponse, _err error) {
  6069. if dara.BoolValue(client.EnableValidate) == true {
  6070. _err = request.Validate()
  6071. if _err != nil {
  6072. return _result, _err
  6073. }
  6074. }
  6075. query := map[string]interface{}{}
  6076. if !dara.IsNil(request.ExpressCompanyCode) {
  6077. query["ExpressCompanyCode"] = request.ExpressCompanyCode
  6078. }
  6079. if !dara.IsNil(request.MailNo) {
  6080. query["MailNo"] = request.MailNo
  6081. }
  6082. if !dara.IsNil(request.OwnerId) {
  6083. query["OwnerId"] = request.OwnerId
  6084. }
  6085. if !dara.IsNil(request.PlatformCompanyCode) {
  6086. query["PlatformCompanyCode"] = request.PlatformCompanyCode
  6087. }
  6088. if !dara.IsNil(request.ResourceOwnerAccount) {
  6089. query["ResourceOwnerAccount"] = request.ResourceOwnerAccount
  6090. }
  6091. if !dara.IsNil(request.ResourceOwnerId) {
  6092. query["ResourceOwnerId"] = request.ResourceOwnerId
  6093. }
  6094. req := &openapiutil.OpenApiRequest{
  6095. Query: openapiutil.Query(query),
  6096. }
  6097. params := &openapiutil.Params{
  6098. Action: dara.String("VerifyLogisticsSmsMailNo"),
  6099. Version: dara.String("2017-05-25"),
  6100. Protocol: dara.String("HTTPS"),
  6101. Pathname: dara.String("/"),
  6102. Method: dara.String("POST"),
  6103. AuthType: dara.String("AK"),
  6104. Style: dara.String("RPC"),
  6105. ReqBodyType: dara.String("formData"),
  6106. BodyType: dara.String("json"),
  6107. }
  6108. _result = &VerifyLogisticsSmsMailNoResponse{}
  6109. _body, _err := client.CallApi(params, req, runtime)
  6110. if _err != nil {
  6111. return _result, _err
  6112. }
  6113. _err = dara.Convert(_body, &_result)
  6114. return _result, _err
  6115. }
  6116. // Summary:
  6117. //
  6118. // 物流短信运单号校验
  6119. //
  6120. // @param request - VerifyLogisticsSmsMailNoRequest
  6121. //
  6122. // @return VerifyLogisticsSmsMailNoResponse
  6123. func (client *Client) VerifyLogisticsSmsMailNo(request *VerifyLogisticsSmsMailNoRequest) (_result *VerifyLogisticsSmsMailNoResponse, _err error) {
  6124. runtime := &dara.RuntimeOptions{}
  6125. _result = &VerifyLogisticsSmsMailNoResponse{}
  6126. _body, _err := client.VerifyLogisticsSmsMailNoWithOptions(request, runtime)
  6127. if _err != nil {
  6128. return _result, _err
  6129. }
  6130. _result = _body
  6131. return _result, _err
  6132. }