api.go 137 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package cognitosync
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/restjson"
  11. )
  12. const opBulkPublish = "BulkPublish"
  13. // BulkPublishRequest generates a "aws/request.Request" representing the
  14. // client's request for the BulkPublish operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See BulkPublish for more information on using the BulkPublish
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the BulkPublishRequest method.
  29. // req, resp := client.BulkPublishRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/BulkPublish
  37. func (c *CognitoSync) BulkPublishRequest(input *BulkPublishInput) (req *request.Request, output *BulkPublishOutput) {
  38. op := &request.Operation{
  39. Name: opBulkPublish,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/identitypools/{IdentityPoolId}/bulkpublish",
  42. }
  43. if input == nil {
  44. input = &BulkPublishInput{}
  45. }
  46. output = &BulkPublishOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // BulkPublish API operation for Amazon Cognito Sync.
  51. //
  52. // Initiates a bulk publish of all existing datasets for an Identity Pool to
  53. // the configured stream. Customers are limited to one successful bulk publish
  54. // per 24 hours. Bulk publish is an asynchronous request, customers can see
  55. // the status of the request via the GetBulkPublishDetails operation.
  56. //
  57. // This API can only be called with developer credentials. You cannot call this
  58. // API with the temporary user credentials provided by Cognito Identity.
  59. //
  60. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  61. // with awserr.Error's Code and Message methods to get detailed information about
  62. // the error.
  63. //
  64. // See the AWS API reference guide for Amazon Cognito Sync's
  65. // API operation BulkPublish for usage and error information.
  66. //
  67. // Returned Error Codes:
  68. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  69. // Thrown when a user is not authorized to access the requested resource.
  70. //
  71. // * ErrCodeInvalidParameterException "InvalidParameterException"
  72. // Thrown when a request parameter does not comply with the associated constraints.
  73. //
  74. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  75. // Thrown if the resource doesn't exist.
  76. //
  77. // * ErrCodeInternalErrorException "InternalErrorException"
  78. // Indicates an internal service error.
  79. //
  80. // * ErrCodeDuplicateRequestException "DuplicateRequestException"
  81. // An exception thrown when there is an IN_PROGRESS bulk publish operation for
  82. // the given identity pool.
  83. //
  84. // * ErrCodeAlreadyStreamedException "AlreadyStreamedException"
  85. // An exception thrown when a bulk publish operation is requested less than
  86. // 24 hours after a previous bulk publish operation completed successfully.
  87. //
  88. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/BulkPublish
  89. func (c *CognitoSync) BulkPublish(input *BulkPublishInput) (*BulkPublishOutput, error) {
  90. req, out := c.BulkPublishRequest(input)
  91. return out, req.Send()
  92. }
  93. // BulkPublishWithContext is the same as BulkPublish with the addition of
  94. // the ability to pass a context and additional request options.
  95. //
  96. // See BulkPublish for details on how to use this API operation.
  97. //
  98. // The context must be non-nil and will be used for request cancellation. If
  99. // the context is nil a panic will occur. In the future the SDK may create
  100. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  101. // for more information on using Contexts.
  102. func (c *CognitoSync) BulkPublishWithContext(ctx aws.Context, input *BulkPublishInput, opts ...request.Option) (*BulkPublishOutput, error) {
  103. req, out := c.BulkPublishRequest(input)
  104. req.SetContext(ctx)
  105. req.ApplyOptions(opts...)
  106. return out, req.Send()
  107. }
  108. const opDeleteDataset = "DeleteDataset"
  109. // DeleteDatasetRequest generates a "aws/request.Request" representing the
  110. // client's request for the DeleteDataset operation. The "output" return
  111. // value will be populated with the request's response once the request completes
  112. // successfully.
  113. //
  114. // Use "Send" method on the returned Request to send the API call to the service.
  115. // the "output" return value is not valid until after Send returns without error.
  116. //
  117. // See DeleteDataset for more information on using the DeleteDataset
  118. // API call, and error handling.
  119. //
  120. // This method is useful when you want to inject custom logic or configuration
  121. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  122. //
  123. //
  124. // // Example sending a request using the DeleteDatasetRequest method.
  125. // req, resp := client.DeleteDatasetRequest(params)
  126. //
  127. // err := req.Send()
  128. // if err == nil { // resp is now filled
  129. // fmt.Println(resp)
  130. // }
  131. //
  132. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DeleteDataset
  133. func (c *CognitoSync) DeleteDatasetRequest(input *DeleteDatasetInput) (req *request.Request, output *DeleteDatasetOutput) {
  134. op := &request.Operation{
  135. Name: opDeleteDataset,
  136. HTTPMethod: "DELETE",
  137. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",
  138. }
  139. if input == nil {
  140. input = &DeleteDatasetInput{}
  141. }
  142. output = &DeleteDatasetOutput{}
  143. req = c.newRequest(op, input, output)
  144. return
  145. }
  146. // DeleteDataset API operation for Amazon Cognito Sync.
  147. //
  148. // Deletes the specific dataset. The dataset will be deleted permanently, and
  149. // the action can't be undone. Datasets that this dataset was merged with will
  150. // no longer report the merge. Any subsequent operation on this dataset will
  151. // result in a ResourceNotFoundException.
  152. //
  153. // This API can be called with temporary user credentials provided by Cognito
  154. // Identity or with developer credentials.
  155. //
  156. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  157. // with awserr.Error's Code and Message methods to get detailed information about
  158. // the error.
  159. //
  160. // See the AWS API reference guide for Amazon Cognito Sync's
  161. // API operation DeleteDataset for usage and error information.
  162. //
  163. // Returned Error Codes:
  164. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  165. // Thrown when a user is not authorized to access the requested resource.
  166. //
  167. // * ErrCodeInvalidParameterException "InvalidParameterException"
  168. // Thrown when a request parameter does not comply with the associated constraints.
  169. //
  170. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  171. // Thrown if the resource doesn't exist.
  172. //
  173. // * ErrCodeInternalErrorException "InternalErrorException"
  174. // Indicates an internal service error.
  175. //
  176. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  177. // Thrown if the request is throttled.
  178. //
  179. // * ErrCodeResourceConflictException "ResourceConflictException"
  180. // Thrown if an update can't be applied because the resource was changed by
  181. // another call and this would result in a conflict.
  182. //
  183. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DeleteDataset
  184. func (c *CognitoSync) DeleteDataset(input *DeleteDatasetInput) (*DeleteDatasetOutput, error) {
  185. req, out := c.DeleteDatasetRequest(input)
  186. return out, req.Send()
  187. }
  188. // DeleteDatasetWithContext is the same as DeleteDataset with the addition of
  189. // the ability to pass a context and additional request options.
  190. //
  191. // See DeleteDataset for details on how to use this API operation.
  192. //
  193. // The context must be non-nil and will be used for request cancellation. If
  194. // the context is nil a panic will occur. In the future the SDK may create
  195. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  196. // for more information on using Contexts.
  197. func (c *CognitoSync) DeleteDatasetWithContext(ctx aws.Context, input *DeleteDatasetInput, opts ...request.Option) (*DeleteDatasetOutput, error) {
  198. req, out := c.DeleteDatasetRequest(input)
  199. req.SetContext(ctx)
  200. req.ApplyOptions(opts...)
  201. return out, req.Send()
  202. }
  203. const opDescribeDataset = "DescribeDataset"
  204. // DescribeDatasetRequest generates a "aws/request.Request" representing the
  205. // client's request for the DescribeDataset operation. The "output" return
  206. // value will be populated with the request's response once the request completes
  207. // successfully.
  208. //
  209. // Use "Send" method on the returned Request to send the API call to the service.
  210. // the "output" return value is not valid until after Send returns without error.
  211. //
  212. // See DescribeDataset for more information on using the DescribeDataset
  213. // API call, and error handling.
  214. //
  215. // This method is useful when you want to inject custom logic or configuration
  216. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  217. //
  218. //
  219. // // Example sending a request using the DescribeDatasetRequest method.
  220. // req, resp := client.DescribeDatasetRequest(params)
  221. //
  222. // err := req.Send()
  223. // if err == nil { // resp is now filled
  224. // fmt.Println(resp)
  225. // }
  226. //
  227. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeDataset
  228. func (c *CognitoSync) DescribeDatasetRequest(input *DescribeDatasetInput) (req *request.Request, output *DescribeDatasetOutput) {
  229. op := &request.Operation{
  230. Name: opDescribeDataset,
  231. HTTPMethod: "GET",
  232. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",
  233. }
  234. if input == nil {
  235. input = &DescribeDatasetInput{}
  236. }
  237. output = &DescribeDatasetOutput{}
  238. req = c.newRequest(op, input, output)
  239. return
  240. }
  241. // DescribeDataset API operation for Amazon Cognito Sync.
  242. //
  243. // Gets meta data about a dataset by identity and dataset name. With Amazon
  244. // Cognito Sync, each identity has access only to its own data. Thus, the credentials
  245. // used to make this API call need to have access to the identity data.
  246. //
  247. // This API can be called with temporary user credentials provided by Cognito
  248. // Identity or with developer credentials. You should use Cognito Identity credentials
  249. // to make this API call.
  250. //
  251. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  252. // with awserr.Error's Code and Message methods to get detailed information about
  253. // the error.
  254. //
  255. // See the AWS API reference guide for Amazon Cognito Sync's
  256. // API operation DescribeDataset for usage and error information.
  257. //
  258. // Returned Error Codes:
  259. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  260. // Thrown when a user is not authorized to access the requested resource.
  261. //
  262. // * ErrCodeInvalidParameterException "InvalidParameterException"
  263. // Thrown when a request parameter does not comply with the associated constraints.
  264. //
  265. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  266. // Thrown if the resource doesn't exist.
  267. //
  268. // * ErrCodeInternalErrorException "InternalErrorException"
  269. // Indicates an internal service error.
  270. //
  271. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  272. // Thrown if the request is throttled.
  273. //
  274. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeDataset
  275. func (c *CognitoSync) DescribeDataset(input *DescribeDatasetInput) (*DescribeDatasetOutput, error) {
  276. req, out := c.DescribeDatasetRequest(input)
  277. return out, req.Send()
  278. }
  279. // DescribeDatasetWithContext is the same as DescribeDataset with the addition of
  280. // the ability to pass a context and additional request options.
  281. //
  282. // See DescribeDataset for details on how to use this API operation.
  283. //
  284. // The context must be non-nil and will be used for request cancellation. If
  285. // the context is nil a panic will occur. In the future the SDK may create
  286. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  287. // for more information on using Contexts.
  288. func (c *CognitoSync) DescribeDatasetWithContext(ctx aws.Context, input *DescribeDatasetInput, opts ...request.Option) (*DescribeDatasetOutput, error) {
  289. req, out := c.DescribeDatasetRequest(input)
  290. req.SetContext(ctx)
  291. req.ApplyOptions(opts...)
  292. return out, req.Send()
  293. }
  294. const opDescribeIdentityPoolUsage = "DescribeIdentityPoolUsage"
  295. // DescribeIdentityPoolUsageRequest generates a "aws/request.Request" representing the
  296. // client's request for the DescribeIdentityPoolUsage operation. The "output" return
  297. // value will be populated with the request's response once the request completes
  298. // successfully.
  299. //
  300. // Use "Send" method on the returned Request to send the API call to the service.
  301. // the "output" return value is not valid until after Send returns without error.
  302. //
  303. // See DescribeIdentityPoolUsage for more information on using the DescribeIdentityPoolUsage
  304. // API call, and error handling.
  305. //
  306. // This method is useful when you want to inject custom logic or configuration
  307. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  308. //
  309. //
  310. // // Example sending a request using the DescribeIdentityPoolUsageRequest method.
  311. // req, resp := client.DescribeIdentityPoolUsageRequest(params)
  312. //
  313. // err := req.Send()
  314. // if err == nil { // resp is now filled
  315. // fmt.Println(resp)
  316. // }
  317. //
  318. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityPoolUsage
  319. func (c *CognitoSync) DescribeIdentityPoolUsageRequest(input *DescribeIdentityPoolUsageInput) (req *request.Request, output *DescribeIdentityPoolUsageOutput) {
  320. op := &request.Operation{
  321. Name: opDescribeIdentityPoolUsage,
  322. HTTPMethod: "GET",
  323. HTTPPath: "/identitypools/{IdentityPoolId}",
  324. }
  325. if input == nil {
  326. input = &DescribeIdentityPoolUsageInput{}
  327. }
  328. output = &DescribeIdentityPoolUsageOutput{}
  329. req = c.newRequest(op, input, output)
  330. return
  331. }
  332. // DescribeIdentityPoolUsage API operation for Amazon Cognito Sync.
  333. //
  334. // Gets usage details (for example, data storage) about a particular identity
  335. // pool.
  336. //
  337. // This API can only be called with developer credentials. You cannot call this
  338. // API with the temporary user credentials provided by Cognito Identity.
  339. //
  340. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  341. // with awserr.Error's Code and Message methods to get detailed information about
  342. // the error.
  343. //
  344. // See the AWS API reference guide for Amazon Cognito Sync's
  345. // API operation DescribeIdentityPoolUsage for usage and error information.
  346. //
  347. // Returned Error Codes:
  348. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  349. // Thrown when a user is not authorized to access the requested resource.
  350. //
  351. // * ErrCodeInvalidParameterException "InvalidParameterException"
  352. // Thrown when a request parameter does not comply with the associated constraints.
  353. //
  354. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  355. // Thrown if the resource doesn't exist.
  356. //
  357. // * ErrCodeInternalErrorException "InternalErrorException"
  358. // Indicates an internal service error.
  359. //
  360. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  361. // Thrown if the request is throttled.
  362. //
  363. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityPoolUsage
  364. func (c *CognitoSync) DescribeIdentityPoolUsage(input *DescribeIdentityPoolUsageInput) (*DescribeIdentityPoolUsageOutput, error) {
  365. req, out := c.DescribeIdentityPoolUsageRequest(input)
  366. return out, req.Send()
  367. }
  368. // DescribeIdentityPoolUsageWithContext is the same as DescribeIdentityPoolUsage with the addition of
  369. // the ability to pass a context and additional request options.
  370. //
  371. // See DescribeIdentityPoolUsage for details on how to use this API operation.
  372. //
  373. // The context must be non-nil and will be used for request cancellation. If
  374. // the context is nil a panic will occur. In the future the SDK may create
  375. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  376. // for more information on using Contexts.
  377. func (c *CognitoSync) DescribeIdentityPoolUsageWithContext(ctx aws.Context, input *DescribeIdentityPoolUsageInput, opts ...request.Option) (*DescribeIdentityPoolUsageOutput, error) {
  378. req, out := c.DescribeIdentityPoolUsageRequest(input)
  379. req.SetContext(ctx)
  380. req.ApplyOptions(opts...)
  381. return out, req.Send()
  382. }
  383. const opDescribeIdentityUsage = "DescribeIdentityUsage"
  384. // DescribeIdentityUsageRequest generates a "aws/request.Request" representing the
  385. // client's request for the DescribeIdentityUsage operation. The "output" return
  386. // value will be populated with the request's response once the request completes
  387. // successfully.
  388. //
  389. // Use "Send" method on the returned Request to send the API call to the service.
  390. // the "output" return value is not valid until after Send returns without error.
  391. //
  392. // See DescribeIdentityUsage for more information on using the DescribeIdentityUsage
  393. // API call, and error handling.
  394. //
  395. // This method is useful when you want to inject custom logic or configuration
  396. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  397. //
  398. //
  399. // // Example sending a request using the DescribeIdentityUsageRequest method.
  400. // req, resp := client.DescribeIdentityUsageRequest(params)
  401. //
  402. // err := req.Send()
  403. // if err == nil { // resp is now filled
  404. // fmt.Println(resp)
  405. // }
  406. //
  407. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityUsage
  408. func (c *CognitoSync) DescribeIdentityUsageRequest(input *DescribeIdentityUsageInput) (req *request.Request, output *DescribeIdentityUsageOutput) {
  409. op := &request.Operation{
  410. Name: opDescribeIdentityUsage,
  411. HTTPMethod: "GET",
  412. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}",
  413. }
  414. if input == nil {
  415. input = &DescribeIdentityUsageInput{}
  416. }
  417. output = &DescribeIdentityUsageOutput{}
  418. req = c.newRequest(op, input, output)
  419. return
  420. }
  421. // DescribeIdentityUsage API operation for Amazon Cognito Sync.
  422. //
  423. // Gets usage information for an identity, including number of datasets and
  424. // data usage.
  425. //
  426. // This API can be called with temporary user credentials provided by Cognito
  427. // Identity or with developer credentials.
  428. //
  429. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  430. // with awserr.Error's Code and Message methods to get detailed information about
  431. // the error.
  432. //
  433. // See the AWS API reference guide for Amazon Cognito Sync's
  434. // API operation DescribeIdentityUsage for usage and error information.
  435. //
  436. // Returned Error Codes:
  437. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  438. // Thrown when a user is not authorized to access the requested resource.
  439. //
  440. // * ErrCodeInvalidParameterException "InvalidParameterException"
  441. // Thrown when a request parameter does not comply with the associated constraints.
  442. //
  443. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  444. // Thrown if the resource doesn't exist.
  445. //
  446. // * ErrCodeInternalErrorException "InternalErrorException"
  447. // Indicates an internal service error.
  448. //
  449. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  450. // Thrown if the request is throttled.
  451. //
  452. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityUsage
  453. func (c *CognitoSync) DescribeIdentityUsage(input *DescribeIdentityUsageInput) (*DescribeIdentityUsageOutput, error) {
  454. req, out := c.DescribeIdentityUsageRequest(input)
  455. return out, req.Send()
  456. }
  457. // DescribeIdentityUsageWithContext is the same as DescribeIdentityUsage with the addition of
  458. // the ability to pass a context and additional request options.
  459. //
  460. // See DescribeIdentityUsage for details on how to use this API operation.
  461. //
  462. // The context must be non-nil and will be used for request cancellation. If
  463. // the context is nil a panic will occur. In the future the SDK may create
  464. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  465. // for more information on using Contexts.
  466. func (c *CognitoSync) DescribeIdentityUsageWithContext(ctx aws.Context, input *DescribeIdentityUsageInput, opts ...request.Option) (*DescribeIdentityUsageOutput, error) {
  467. req, out := c.DescribeIdentityUsageRequest(input)
  468. req.SetContext(ctx)
  469. req.ApplyOptions(opts...)
  470. return out, req.Send()
  471. }
  472. const opGetBulkPublishDetails = "GetBulkPublishDetails"
  473. // GetBulkPublishDetailsRequest generates a "aws/request.Request" representing the
  474. // client's request for the GetBulkPublishDetails operation. The "output" return
  475. // value will be populated with the request's response once the request completes
  476. // successfully.
  477. //
  478. // Use "Send" method on the returned Request to send the API call to the service.
  479. // the "output" return value is not valid until after Send returns without error.
  480. //
  481. // See GetBulkPublishDetails for more information on using the GetBulkPublishDetails
  482. // API call, and error handling.
  483. //
  484. // This method is useful when you want to inject custom logic or configuration
  485. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  486. //
  487. //
  488. // // Example sending a request using the GetBulkPublishDetailsRequest method.
  489. // req, resp := client.GetBulkPublishDetailsRequest(params)
  490. //
  491. // err := req.Send()
  492. // if err == nil { // resp is now filled
  493. // fmt.Println(resp)
  494. // }
  495. //
  496. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetBulkPublishDetails
  497. func (c *CognitoSync) GetBulkPublishDetailsRequest(input *GetBulkPublishDetailsInput) (req *request.Request, output *GetBulkPublishDetailsOutput) {
  498. op := &request.Operation{
  499. Name: opGetBulkPublishDetails,
  500. HTTPMethod: "POST",
  501. HTTPPath: "/identitypools/{IdentityPoolId}/getBulkPublishDetails",
  502. }
  503. if input == nil {
  504. input = &GetBulkPublishDetailsInput{}
  505. }
  506. output = &GetBulkPublishDetailsOutput{}
  507. req = c.newRequest(op, input, output)
  508. return
  509. }
  510. // GetBulkPublishDetails API operation for Amazon Cognito Sync.
  511. //
  512. // Get the status of the last BulkPublish operation for an identity pool.
  513. //
  514. // This API can only be called with developer credentials. You cannot call this
  515. // API with the temporary user credentials provided by Cognito Identity.
  516. //
  517. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  518. // with awserr.Error's Code and Message methods to get detailed information about
  519. // the error.
  520. //
  521. // See the AWS API reference guide for Amazon Cognito Sync's
  522. // API operation GetBulkPublishDetails for usage and error information.
  523. //
  524. // Returned Error Codes:
  525. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  526. // Thrown when a user is not authorized to access the requested resource.
  527. //
  528. // * ErrCodeInvalidParameterException "InvalidParameterException"
  529. // Thrown when a request parameter does not comply with the associated constraints.
  530. //
  531. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  532. // Thrown if the resource doesn't exist.
  533. //
  534. // * ErrCodeInternalErrorException "InternalErrorException"
  535. // Indicates an internal service error.
  536. //
  537. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetBulkPublishDetails
  538. func (c *CognitoSync) GetBulkPublishDetails(input *GetBulkPublishDetailsInput) (*GetBulkPublishDetailsOutput, error) {
  539. req, out := c.GetBulkPublishDetailsRequest(input)
  540. return out, req.Send()
  541. }
  542. // GetBulkPublishDetailsWithContext is the same as GetBulkPublishDetails with the addition of
  543. // the ability to pass a context and additional request options.
  544. //
  545. // See GetBulkPublishDetails for details on how to use this API operation.
  546. //
  547. // The context must be non-nil and will be used for request cancellation. If
  548. // the context is nil a panic will occur. In the future the SDK may create
  549. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  550. // for more information on using Contexts.
  551. func (c *CognitoSync) GetBulkPublishDetailsWithContext(ctx aws.Context, input *GetBulkPublishDetailsInput, opts ...request.Option) (*GetBulkPublishDetailsOutput, error) {
  552. req, out := c.GetBulkPublishDetailsRequest(input)
  553. req.SetContext(ctx)
  554. req.ApplyOptions(opts...)
  555. return out, req.Send()
  556. }
  557. const opGetCognitoEvents = "GetCognitoEvents"
  558. // GetCognitoEventsRequest generates a "aws/request.Request" representing the
  559. // client's request for the GetCognitoEvents operation. The "output" return
  560. // value will be populated with the request's response once the request completes
  561. // successfully.
  562. //
  563. // Use "Send" method on the returned Request to send the API call to the service.
  564. // the "output" return value is not valid until after Send returns without error.
  565. //
  566. // See GetCognitoEvents for more information on using the GetCognitoEvents
  567. // API call, and error handling.
  568. //
  569. // This method is useful when you want to inject custom logic or configuration
  570. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  571. //
  572. //
  573. // // Example sending a request using the GetCognitoEventsRequest method.
  574. // req, resp := client.GetCognitoEventsRequest(params)
  575. //
  576. // err := req.Send()
  577. // if err == nil { // resp is now filled
  578. // fmt.Println(resp)
  579. // }
  580. //
  581. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetCognitoEvents
  582. func (c *CognitoSync) GetCognitoEventsRequest(input *GetCognitoEventsInput) (req *request.Request, output *GetCognitoEventsOutput) {
  583. op := &request.Operation{
  584. Name: opGetCognitoEvents,
  585. HTTPMethod: "GET",
  586. HTTPPath: "/identitypools/{IdentityPoolId}/events",
  587. }
  588. if input == nil {
  589. input = &GetCognitoEventsInput{}
  590. }
  591. output = &GetCognitoEventsOutput{}
  592. req = c.newRequest(op, input, output)
  593. return
  594. }
  595. // GetCognitoEvents API operation for Amazon Cognito Sync.
  596. //
  597. // Gets the events and the corresponding Lambda functions associated with an
  598. // identity pool.
  599. //
  600. // This API can only be called with developer credentials. You cannot call this
  601. // API with the temporary user credentials provided by Cognito Identity.
  602. //
  603. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  604. // with awserr.Error's Code and Message methods to get detailed information about
  605. // the error.
  606. //
  607. // See the AWS API reference guide for Amazon Cognito Sync's
  608. // API operation GetCognitoEvents for usage and error information.
  609. //
  610. // Returned Error Codes:
  611. // * ErrCodeInvalidParameterException "InvalidParameterException"
  612. // Thrown when a request parameter does not comply with the associated constraints.
  613. //
  614. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  615. // Thrown if the resource doesn't exist.
  616. //
  617. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  618. // Thrown when a user is not authorized to access the requested resource.
  619. //
  620. // * ErrCodeInternalErrorException "InternalErrorException"
  621. // Indicates an internal service error.
  622. //
  623. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  624. // Thrown if the request is throttled.
  625. //
  626. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetCognitoEvents
  627. func (c *CognitoSync) GetCognitoEvents(input *GetCognitoEventsInput) (*GetCognitoEventsOutput, error) {
  628. req, out := c.GetCognitoEventsRequest(input)
  629. return out, req.Send()
  630. }
  631. // GetCognitoEventsWithContext is the same as GetCognitoEvents with the addition of
  632. // the ability to pass a context and additional request options.
  633. //
  634. // See GetCognitoEvents for details on how to use this API operation.
  635. //
  636. // The context must be non-nil and will be used for request cancellation. If
  637. // the context is nil a panic will occur. In the future the SDK may create
  638. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  639. // for more information on using Contexts.
  640. func (c *CognitoSync) GetCognitoEventsWithContext(ctx aws.Context, input *GetCognitoEventsInput, opts ...request.Option) (*GetCognitoEventsOutput, error) {
  641. req, out := c.GetCognitoEventsRequest(input)
  642. req.SetContext(ctx)
  643. req.ApplyOptions(opts...)
  644. return out, req.Send()
  645. }
  646. const opGetIdentityPoolConfiguration = "GetIdentityPoolConfiguration"
  647. // GetIdentityPoolConfigurationRequest generates a "aws/request.Request" representing the
  648. // client's request for the GetIdentityPoolConfiguration operation. The "output" return
  649. // value will be populated with the request's response once the request completes
  650. // successfully.
  651. //
  652. // Use "Send" method on the returned Request to send the API call to the service.
  653. // the "output" return value is not valid until after Send returns without error.
  654. //
  655. // See GetIdentityPoolConfiguration for more information on using the GetIdentityPoolConfiguration
  656. // API call, and error handling.
  657. //
  658. // This method is useful when you want to inject custom logic or configuration
  659. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  660. //
  661. //
  662. // // Example sending a request using the GetIdentityPoolConfigurationRequest method.
  663. // req, resp := client.GetIdentityPoolConfigurationRequest(params)
  664. //
  665. // err := req.Send()
  666. // if err == nil { // resp is now filled
  667. // fmt.Println(resp)
  668. // }
  669. //
  670. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetIdentityPoolConfiguration
  671. func (c *CognitoSync) GetIdentityPoolConfigurationRequest(input *GetIdentityPoolConfigurationInput) (req *request.Request, output *GetIdentityPoolConfigurationOutput) {
  672. op := &request.Operation{
  673. Name: opGetIdentityPoolConfiguration,
  674. HTTPMethod: "GET",
  675. HTTPPath: "/identitypools/{IdentityPoolId}/configuration",
  676. }
  677. if input == nil {
  678. input = &GetIdentityPoolConfigurationInput{}
  679. }
  680. output = &GetIdentityPoolConfigurationOutput{}
  681. req = c.newRequest(op, input, output)
  682. return
  683. }
  684. // GetIdentityPoolConfiguration API operation for Amazon Cognito Sync.
  685. //
  686. // Gets the configuration settings of an identity pool.
  687. //
  688. // This API can only be called with developer credentials. You cannot call this
  689. // API with the temporary user credentials provided by Cognito Identity.
  690. //
  691. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  692. // with awserr.Error's Code and Message methods to get detailed information about
  693. // the error.
  694. //
  695. // See the AWS API reference guide for Amazon Cognito Sync's
  696. // API operation GetIdentityPoolConfiguration for usage and error information.
  697. //
  698. // Returned Error Codes:
  699. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  700. // Thrown when a user is not authorized to access the requested resource.
  701. //
  702. // * ErrCodeInvalidParameterException "InvalidParameterException"
  703. // Thrown when a request parameter does not comply with the associated constraints.
  704. //
  705. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  706. // Thrown if the resource doesn't exist.
  707. //
  708. // * ErrCodeInternalErrorException "InternalErrorException"
  709. // Indicates an internal service error.
  710. //
  711. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  712. // Thrown if the request is throttled.
  713. //
  714. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetIdentityPoolConfiguration
  715. func (c *CognitoSync) GetIdentityPoolConfiguration(input *GetIdentityPoolConfigurationInput) (*GetIdentityPoolConfigurationOutput, error) {
  716. req, out := c.GetIdentityPoolConfigurationRequest(input)
  717. return out, req.Send()
  718. }
  719. // GetIdentityPoolConfigurationWithContext is the same as GetIdentityPoolConfiguration with the addition of
  720. // the ability to pass a context and additional request options.
  721. //
  722. // See GetIdentityPoolConfiguration for details on how to use this API operation.
  723. //
  724. // The context must be non-nil and will be used for request cancellation. If
  725. // the context is nil a panic will occur. In the future the SDK may create
  726. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  727. // for more information on using Contexts.
  728. func (c *CognitoSync) GetIdentityPoolConfigurationWithContext(ctx aws.Context, input *GetIdentityPoolConfigurationInput, opts ...request.Option) (*GetIdentityPoolConfigurationOutput, error) {
  729. req, out := c.GetIdentityPoolConfigurationRequest(input)
  730. req.SetContext(ctx)
  731. req.ApplyOptions(opts...)
  732. return out, req.Send()
  733. }
  734. const opListDatasets = "ListDatasets"
  735. // ListDatasetsRequest generates a "aws/request.Request" representing the
  736. // client's request for the ListDatasets operation. The "output" return
  737. // value will be populated with the request's response once the request completes
  738. // successfully.
  739. //
  740. // Use "Send" method on the returned Request to send the API call to the service.
  741. // the "output" return value is not valid until after Send returns without error.
  742. //
  743. // See ListDatasets for more information on using the ListDatasets
  744. // API call, and error handling.
  745. //
  746. // This method is useful when you want to inject custom logic or configuration
  747. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  748. //
  749. //
  750. // // Example sending a request using the ListDatasetsRequest method.
  751. // req, resp := client.ListDatasetsRequest(params)
  752. //
  753. // err := req.Send()
  754. // if err == nil { // resp is now filled
  755. // fmt.Println(resp)
  756. // }
  757. //
  758. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListDatasets
  759. func (c *CognitoSync) ListDatasetsRequest(input *ListDatasetsInput) (req *request.Request, output *ListDatasetsOutput) {
  760. op := &request.Operation{
  761. Name: opListDatasets,
  762. HTTPMethod: "GET",
  763. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets",
  764. }
  765. if input == nil {
  766. input = &ListDatasetsInput{}
  767. }
  768. output = &ListDatasetsOutput{}
  769. req = c.newRequest(op, input, output)
  770. return
  771. }
  772. // ListDatasets API operation for Amazon Cognito Sync.
  773. //
  774. // Lists datasets for an identity. With Amazon Cognito Sync, each identity has
  775. // access only to its own data. Thus, the credentials used to make this API
  776. // call need to have access to the identity data.
  777. //
  778. // ListDatasets can be called with temporary user credentials provided by Cognito
  779. // Identity or with developer credentials. You should use the Cognito Identity
  780. // credentials to make this API call.
  781. //
  782. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  783. // with awserr.Error's Code and Message methods to get detailed information about
  784. // the error.
  785. //
  786. // See the AWS API reference guide for Amazon Cognito Sync's
  787. // API operation ListDatasets for usage and error information.
  788. //
  789. // Returned Error Codes:
  790. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  791. // Thrown when a user is not authorized to access the requested resource.
  792. //
  793. // * ErrCodeInvalidParameterException "InvalidParameterException"
  794. // Thrown when a request parameter does not comply with the associated constraints.
  795. //
  796. // * ErrCodeInternalErrorException "InternalErrorException"
  797. // Indicates an internal service error.
  798. //
  799. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  800. // Thrown if the request is throttled.
  801. //
  802. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListDatasets
  803. func (c *CognitoSync) ListDatasets(input *ListDatasetsInput) (*ListDatasetsOutput, error) {
  804. req, out := c.ListDatasetsRequest(input)
  805. return out, req.Send()
  806. }
  807. // ListDatasetsWithContext is the same as ListDatasets with the addition of
  808. // the ability to pass a context and additional request options.
  809. //
  810. // See ListDatasets for details on how to use this API operation.
  811. //
  812. // The context must be non-nil and will be used for request cancellation. If
  813. // the context is nil a panic will occur. In the future the SDK may create
  814. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  815. // for more information on using Contexts.
  816. func (c *CognitoSync) ListDatasetsWithContext(ctx aws.Context, input *ListDatasetsInput, opts ...request.Option) (*ListDatasetsOutput, error) {
  817. req, out := c.ListDatasetsRequest(input)
  818. req.SetContext(ctx)
  819. req.ApplyOptions(opts...)
  820. return out, req.Send()
  821. }
  822. const opListIdentityPoolUsage = "ListIdentityPoolUsage"
  823. // ListIdentityPoolUsageRequest generates a "aws/request.Request" representing the
  824. // client's request for the ListIdentityPoolUsage operation. The "output" return
  825. // value will be populated with the request's response once the request completes
  826. // successfully.
  827. //
  828. // Use "Send" method on the returned Request to send the API call to the service.
  829. // the "output" return value is not valid until after Send returns without error.
  830. //
  831. // See ListIdentityPoolUsage for more information on using the ListIdentityPoolUsage
  832. // API call, and error handling.
  833. //
  834. // This method is useful when you want to inject custom logic or configuration
  835. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  836. //
  837. //
  838. // // Example sending a request using the ListIdentityPoolUsageRequest method.
  839. // req, resp := client.ListIdentityPoolUsageRequest(params)
  840. //
  841. // err := req.Send()
  842. // if err == nil { // resp is now filled
  843. // fmt.Println(resp)
  844. // }
  845. //
  846. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListIdentityPoolUsage
  847. func (c *CognitoSync) ListIdentityPoolUsageRequest(input *ListIdentityPoolUsageInput) (req *request.Request, output *ListIdentityPoolUsageOutput) {
  848. op := &request.Operation{
  849. Name: opListIdentityPoolUsage,
  850. HTTPMethod: "GET",
  851. HTTPPath: "/identitypools",
  852. }
  853. if input == nil {
  854. input = &ListIdentityPoolUsageInput{}
  855. }
  856. output = &ListIdentityPoolUsageOutput{}
  857. req = c.newRequest(op, input, output)
  858. return
  859. }
  860. // ListIdentityPoolUsage API operation for Amazon Cognito Sync.
  861. //
  862. // Gets a list of identity pools registered with Cognito.
  863. //
  864. // ListIdentityPoolUsage can only be called with developer credentials. You
  865. // cannot make this API call with the temporary user credentials provided by
  866. // Cognito Identity.
  867. //
  868. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  869. // with awserr.Error's Code and Message methods to get detailed information about
  870. // the error.
  871. //
  872. // See the AWS API reference guide for Amazon Cognito Sync's
  873. // API operation ListIdentityPoolUsage for usage and error information.
  874. //
  875. // Returned Error Codes:
  876. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  877. // Thrown when a user is not authorized to access the requested resource.
  878. //
  879. // * ErrCodeInvalidParameterException "InvalidParameterException"
  880. // Thrown when a request parameter does not comply with the associated constraints.
  881. //
  882. // * ErrCodeInternalErrorException "InternalErrorException"
  883. // Indicates an internal service error.
  884. //
  885. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  886. // Thrown if the request is throttled.
  887. //
  888. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListIdentityPoolUsage
  889. func (c *CognitoSync) ListIdentityPoolUsage(input *ListIdentityPoolUsageInput) (*ListIdentityPoolUsageOutput, error) {
  890. req, out := c.ListIdentityPoolUsageRequest(input)
  891. return out, req.Send()
  892. }
  893. // ListIdentityPoolUsageWithContext is the same as ListIdentityPoolUsage with the addition of
  894. // the ability to pass a context and additional request options.
  895. //
  896. // See ListIdentityPoolUsage for details on how to use this API operation.
  897. //
  898. // The context must be non-nil and will be used for request cancellation. If
  899. // the context is nil a panic will occur. In the future the SDK may create
  900. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  901. // for more information on using Contexts.
  902. func (c *CognitoSync) ListIdentityPoolUsageWithContext(ctx aws.Context, input *ListIdentityPoolUsageInput, opts ...request.Option) (*ListIdentityPoolUsageOutput, error) {
  903. req, out := c.ListIdentityPoolUsageRequest(input)
  904. req.SetContext(ctx)
  905. req.ApplyOptions(opts...)
  906. return out, req.Send()
  907. }
  908. const opListRecords = "ListRecords"
  909. // ListRecordsRequest generates a "aws/request.Request" representing the
  910. // client's request for the ListRecords operation. The "output" return
  911. // value will be populated with the request's response once the request completes
  912. // successfully.
  913. //
  914. // Use "Send" method on the returned Request to send the API call to the service.
  915. // the "output" return value is not valid until after Send returns without error.
  916. //
  917. // See ListRecords for more information on using the ListRecords
  918. // API call, and error handling.
  919. //
  920. // This method is useful when you want to inject custom logic or configuration
  921. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  922. //
  923. //
  924. // // Example sending a request using the ListRecordsRequest method.
  925. // req, resp := client.ListRecordsRequest(params)
  926. //
  927. // err := req.Send()
  928. // if err == nil { // resp is now filled
  929. // fmt.Println(resp)
  930. // }
  931. //
  932. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListRecords
  933. func (c *CognitoSync) ListRecordsRequest(input *ListRecordsInput) (req *request.Request, output *ListRecordsOutput) {
  934. op := &request.Operation{
  935. Name: opListRecords,
  936. HTTPMethod: "GET",
  937. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records",
  938. }
  939. if input == nil {
  940. input = &ListRecordsInput{}
  941. }
  942. output = &ListRecordsOutput{}
  943. req = c.newRequest(op, input, output)
  944. return
  945. }
  946. // ListRecords API operation for Amazon Cognito Sync.
  947. //
  948. // Gets paginated records, optionally changed after a particular sync count
  949. // for a dataset and identity. With Amazon Cognito Sync, each identity has access
  950. // only to its own data. Thus, the credentials used to make this API call need
  951. // to have access to the identity data.
  952. //
  953. // ListRecords can be called with temporary user credentials provided by Cognito
  954. // Identity or with developer credentials. You should use Cognito Identity credentials
  955. // to make this API call.
  956. //
  957. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  958. // with awserr.Error's Code and Message methods to get detailed information about
  959. // the error.
  960. //
  961. // See the AWS API reference guide for Amazon Cognito Sync's
  962. // API operation ListRecords for usage and error information.
  963. //
  964. // Returned Error Codes:
  965. // * ErrCodeInvalidParameterException "InvalidParameterException"
  966. // Thrown when a request parameter does not comply with the associated constraints.
  967. //
  968. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  969. // Thrown when a user is not authorized to access the requested resource.
  970. //
  971. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  972. // Thrown if the request is throttled.
  973. //
  974. // * ErrCodeInternalErrorException "InternalErrorException"
  975. // Indicates an internal service error.
  976. //
  977. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListRecords
  978. func (c *CognitoSync) ListRecords(input *ListRecordsInput) (*ListRecordsOutput, error) {
  979. req, out := c.ListRecordsRequest(input)
  980. return out, req.Send()
  981. }
  982. // ListRecordsWithContext is the same as ListRecords with the addition of
  983. // the ability to pass a context and additional request options.
  984. //
  985. // See ListRecords for details on how to use this API operation.
  986. //
  987. // The context must be non-nil and will be used for request cancellation. If
  988. // the context is nil a panic will occur. In the future the SDK may create
  989. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  990. // for more information on using Contexts.
  991. func (c *CognitoSync) ListRecordsWithContext(ctx aws.Context, input *ListRecordsInput, opts ...request.Option) (*ListRecordsOutput, error) {
  992. req, out := c.ListRecordsRequest(input)
  993. req.SetContext(ctx)
  994. req.ApplyOptions(opts...)
  995. return out, req.Send()
  996. }
  997. const opRegisterDevice = "RegisterDevice"
  998. // RegisterDeviceRequest generates a "aws/request.Request" representing the
  999. // client's request for the RegisterDevice operation. The "output" return
  1000. // value will be populated with the request's response once the request completes
  1001. // successfully.
  1002. //
  1003. // Use "Send" method on the returned Request to send the API call to the service.
  1004. // the "output" return value is not valid until after Send returns without error.
  1005. //
  1006. // See RegisterDevice for more information on using the RegisterDevice
  1007. // API call, and error handling.
  1008. //
  1009. // This method is useful when you want to inject custom logic or configuration
  1010. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1011. //
  1012. //
  1013. // // Example sending a request using the RegisterDeviceRequest method.
  1014. // req, resp := client.RegisterDeviceRequest(params)
  1015. //
  1016. // err := req.Send()
  1017. // if err == nil { // resp is now filled
  1018. // fmt.Println(resp)
  1019. // }
  1020. //
  1021. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RegisterDevice
  1022. func (c *CognitoSync) RegisterDeviceRequest(input *RegisterDeviceInput) (req *request.Request, output *RegisterDeviceOutput) {
  1023. op := &request.Operation{
  1024. Name: opRegisterDevice,
  1025. HTTPMethod: "POST",
  1026. HTTPPath: "/identitypools/{IdentityPoolId}/identity/{IdentityId}/device",
  1027. }
  1028. if input == nil {
  1029. input = &RegisterDeviceInput{}
  1030. }
  1031. output = &RegisterDeviceOutput{}
  1032. req = c.newRequest(op, input, output)
  1033. return
  1034. }
  1035. // RegisterDevice API operation for Amazon Cognito Sync.
  1036. //
  1037. // Registers a device to receive push sync notifications.
  1038. //
  1039. // This API can only be called with temporary credentials provided by Cognito
  1040. // Identity. You cannot call this API with developer credentials.
  1041. //
  1042. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1043. // with awserr.Error's Code and Message methods to get detailed information about
  1044. // the error.
  1045. //
  1046. // See the AWS API reference guide for Amazon Cognito Sync's
  1047. // API operation RegisterDevice for usage and error information.
  1048. //
  1049. // Returned Error Codes:
  1050. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  1051. // Thrown when a user is not authorized to access the requested resource.
  1052. //
  1053. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1054. // Thrown when a request parameter does not comply with the associated constraints.
  1055. //
  1056. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1057. // Thrown if the resource doesn't exist.
  1058. //
  1059. // * ErrCodeInternalErrorException "InternalErrorException"
  1060. // Indicates an internal service error.
  1061. //
  1062. // * ErrCodeInvalidConfigurationException "InvalidConfigurationException"
  1063. //
  1064. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1065. // Thrown if the request is throttled.
  1066. //
  1067. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RegisterDevice
  1068. func (c *CognitoSync) RegisterDevice(input *RegisterDeviceInput) (*RegisterDeviceOutput, error) {
  1069. req, out := c.RegisterDeviceRequest(input)
  1070. return out, req.Send()
  1071. }
  1072. // RegisterDeviceWithContext is the same as RegisterDevice with the addition of
  1073. // the ability to pass a context and additional request options.
  1074. //
  1075. // See RegisterDevice for details on how to use this API operation.
  1076. //
  1077. // The context must be non-nil and will be used for request cancellation. If
  1078. // the context is nil a panic will occur. In the future the SDK may create
  1079. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1080. // for more information on using Contexts.
  1081. func (c *CognitoSync) RegisterDeviceWithContext(ctx aws.Context, input *RegisterDeviceInput, opts ...request.Option) (*RegisterDeviceOutput, error) {
  1082. req, out := c.RegisterDeviceRequest(input)
  1083. req.SetContext(ctx)
  1084. req.ApplyOptions(opts...)
  1085. return out, req.Send()
  1086. }
  1087. const opSetCognitoEvents = "SetCognitoEvents"
  1088. // SetCognitoEventsRequest generates a "aws/request.Request" representing the
  1089. // client's request for the SetCognitoEvents operation. The "output" return
  1090. // value will be populated with the request's response once the request completes
  1091. // successfully.
  1092. //
  1093. // Use "Send" method on the returned Request to send the API call to the service.
  1094. // the "output" return value is not valid until after Send returns without error.
  1095. //
  1096. // See SetCognitoEvents for more information on using the SetCognitoEvents
  1097. // API call, and error handling.
  1098. //
  1099. // This method is useful when you want to inject custom logic or configuration
  1100. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1101. //
  1102. //
  1103. // // Example sending a request using the SetCognitoEventsRequest method.
  1104. // req, resp := client.SetCognitoEventsRequest(params)
  1105. //
  1106. // err := req.Send()
  1107. // if err == nil { // resp is now filled
  1108. // fmt.Println(resp)
  1109. // }
  1110. //
  1111. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetCognitoEvents
  1112. func (c *CognitoSync) SetCognitoEventsRequest(input *SetCognitoEventsInput) (req *request.Request, output *SetCognitoEventsOutput) {
  1113. op := &request.Operation{
  1114. Name: opSetCognitoEvents,
  1115. HTTPMethod: "POST",
  1116. HTTPPath: "/identitypools/{IdentityPoolId}/events",
  1117. }
  1118. if input == nil {
  1119. input = &SetCognitoEventsInput{}
  1120. }
  1121. output = &SetCognitoEventsOutput{}
  1122. req = c.newRequest(op, input, output)
  1123. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1124. return
  1125. }
  1126. // SetCognitoEvents API operation for Amazon Cognito Sync.
  1127. //
  1128. // Sets the AWS Lambda function for a given event type for an identity pool.
  1129. // This request only updates the key/value pair specified. Other key/values
  1130. // pairs are not updated. To remove a key value pair, pass a empty value for
  1131. // the particular key.
  1132. //
  1133. // This API can only be called with developer credentials. You cannot call this
  1134. // API with the temporary user credentials provided by Cognito Identity.
  1135. //
  1136. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1137. // with awserr.Error's Code and Message methods to get detailed information about
  1138. // the error.
  1139. //
  1140. // See the AWS API reference guide for Amazon Cognito Sync's
  1141. // API operation SetCognitoEvents for usage and error information.
  1142. //
  1143. // Returned Error Codes:
  1144. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1145. // Thrown when a request parameter does not comply with the associated constraints.
  1146. //
  1147. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1148. // Thrown if the resource doesn't exist.
  1149. //
  1150. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  1151. // Thrown when a user is not authorized to access the requested resource.
  1152. //
  1153. // * ErrCodeInternalErrorException "InternalErrorException"
  1154. // Indicates an internal service error.
  1155. //
  1156. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1157. // Thrown if the request is throttled.
  1158. //
  1159. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetCognitoEvents
  1160. func (c *CognitoSync) SetCognitoEvents(input *SetCognitoEventsInput) (*SetCognitoEventsOutput, error) {
  1161. req, out := c.SetCognitoEventsRequest(input)
  1162. return out, req.Send()
  1163. }
  1164. // SetCognitoEventsWithContext is the same as SetCognitoEvents with the addition of
  1165. // the ability to pass a context and additional request options.
  1166. //
  1167. // See SetCognitoEvents for details on how to use this API operation.
  1168. //
  1169. // The context must be non-nil and will be used for request cancellation. If
  1170. // the context is nil a panic will occur. In the future the SDK may create
  1171. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1172. // for more information on using Contexts.
  1173. func (c *CognitoSync) SetCognitoEventsWithContext(ctx aws.Context, input *SetCognitoEventsInput, opts ...request.Option) (*SetCognitoEventsOutput, error) {
  1174. req, out := c.SetCognitoEventsRequest(input)
  1175. req.SetContext(ctx)
  1176. req.ApplyOptions(opts...)
  1177. return out, req.Send()
  1178. }
  1179. const opSetIdentityPoolConfiguration = "SetIdentityPoolConfiguration"
  1180. // SetIdentityPoolConfigurationRequest generates a "aws/request.Request" representing the
  1181. // client's request for the SetIdentityPoolConfiguration operation. The "output" return
  1182. // value will be populated with the request's response once the request completes
  1183. // successfully.
  1184. //
  1185. // Use "Send" method on the returned Request to send the API call to the service.
  1186. // the "output" return value is not valid until after Send returns without error.
  1187. //
  1188. // See SetIdentityPoolConfiguration for more information on using the SetIdentityPoolConfiguration
  1189. // API call, and error handling.
  1190. //
  1191. // This method is useful when you want to inject custom logic or configuration
  1192. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1193. //
  1194. //
  1195. // // Example sending a request using the SetIdentityPoolConfigurationRequest method.
  1196. // req, resp := client.SetIdentityPoolConfigurationRequest(params)
  1197. //
  1198. // err := req.Send()
  1199. // if err == nil { // resp is now filled
  1200. // fmt.Println(resp)
  1201. // }
  1202. //
  1203. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetIdentityPoolConfiguration
  1204. func (c *CognitoSync) SetIdentityPoolConfigurationRequest(input *SetIdentityPoolConfigurationInput) (req *request.Request, output *SetIdentityPoolConfigurationOutput) {
  1205. op := &request.Operation{
  1206. Name: opSetIdentityPoolConfiguration,
  1207. HTTPMethod: "POST",
  1208. HTTPPath: "/identitypools/{IdentityPoolId}/configuration",
  1209. }
  1210. if input == nil {
  1211. input = &SetIdentityPoolConfigurationInput{}
  1212. }
  1213. output = &SetIdentityPoolConfigurationOutput{}
  1214. req = c.newRequest(op, input, output)
  1215. return
  1216. }
  1217. // SetIdentityPoolConfiguration API operation for Amazon Cognito Sync.
  1218. //
  1219. // Sets the necessary configuration for push sync.
  1220. //
  1221. // This API can only be called with developer credentials. You cannot call this
  1222. // API with the temporary user credentials provided by Cognito Identity.
  1223. //
  1224. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1225. // with awserr.Error's Code and Message methods to get detailed information about
  1226. // the error.
  1227. //
  1228. // See the AWS API reference guide for Amazon Cognito Sync's
  1229. // API operation SetIdentityPoolConfiguration for usage and error information.
  1230. //
  1231. // Returned Error Codes:
  1232. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  1233. // Thrown when a user is not authorized to access the requested resource.
  1234. //
  1235. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1236. // Thrown when a request parameter does not comply with the associated constraints.
  1237. //
  1238. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1239. // Thrown if the resource doesn't exist.
  1240. //
  1241. // * ErrCodeInternalErrorException "InternalErrorException"
  1242. // Indicates an internal service error.
  1243. //
  1244. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1245. // Thrown if the request is throttled.
  1246. //
  1247. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  1248. // Thrown if there are parallel requests to modify a resource.
  1249. //
  1250. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetIdentityPoolConfiguration
  1251. func (c *CognitoSync) SetIdentityPoolConfiguration(input *SetIdentityPoolConfigurationInput) (*SetIdentityPoolConfigurationOutput, error) {
  1252. req, out := c.SetIdentityPoolConfigurationRequest(input)
  1253. return out, req.Send()
  1254. }
  1255. // SetIdentityPoolConfigurationWithContext is the same as SetIdentityPoolConfiguration with the addition of
  1256. // the ability to pass a context and additional request options.
  1257. //
  1258. // See SetIdentityPoolConfiguration for details on how to use this API operation.
  1259. //
  1260. // The context must be non-nil and will be used for request cancellation. If
  1261. // the context is nil a panic will occur. In the future the SDK may create
  1262. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1263. // for more information on using Contexts.
  1264. func (c *CognitoSync) SetIdentityPoolConfigurationWithContext(ctx aws.Context, input *SetIdentityPoolConfigurationInput, opts ...request.Option) (*SetIdentityPoolConfigurationOutput, error) {
  1265. req, out := c.SetIdentityPoolConfigurationRequest(input)
  1266. req.SetContext(ctx)
  1267. req.ApplyOptions(opts...)
  1268. return out, req.Send()
  1269. }
  1270. const opSubscribeToDataset = "SubscribeToDataset"
  1271. // SubscribeToDatasetRequest generates a "aws/request.Request" representing the
  1272. // client's request for the SubscribeToDataset operation. The "output" return
  1273. // value will be populated with the request's response once the request completes
  1274. // successfully.
  1275. //
  1276. // Use "Send" method on the returned Request to send the API call to the service.
  1277. // the "output" return value is not valid until after Send returns without error.
  1278. //
  1279. // See SubscribeToDataset for more information on using the SubscribeToDataset
  1280. // API call, and error handling.
  1281. //
  1282. // This method is useful when you want to inject custom logic or configuration
  1283. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1284. //
  1285. //
  1286. // // Example sending a request using the SubscribeToDatasetRequest method.
  1287. // req, resp := client.SubscribeToDatasetRequest(params)
  1288. //
  1289. // err := req.Send()
  1290. // if err == nil { // resp is now filled
  1291. // fmt.Println(resp)
  1292. // }
  1293. //
  1294. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDataset
  1295. func (c *CognitoSync) SubscribeToDatasetRequest(input *SubscribeToDatasetInput) (req *request.Request, output *SubscribeToDatasetOutput) {
  1296. op := &request.Operation{
  1297. Name: opSubscribeToDataset,
  1298. HTTPMethod: "POST",
  1299. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}",
  1300. }
  1301. if input == nil {
  1302. input = &SubscribeToDatasetInput{}
  1303. }
  1304. output = &SubscribeToDatasetOutput{}
  1305. req = c.newRequest(op, input, output)
  1306. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1307. return
  1308. }
  1309. // SubscribeToDataset API operation for Amazon Cognito Sync.
  1310. //
  1311. // Subscribes to receive notifications when a dataset is modified by another
  1312. // device.
  1313. //
  1314. // This API can only be called with temporary credentials provided by Cognito
  1315. // Identity. You cannot call this API with developer credentials.
  1316. //
  1317. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1318. // with awserr.Error's Code and Message methods to get detailed information about
  1319. // the error.
  1320. //
  1321. // See the AWS API reference guide for Amazon Cognito Sync's
  1322. // API operation SubscribeToDataset for usage and error information.
  1323. //
  1324. // Returned Error Codes:
  1325. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  1326. // Thrown when a user is not authorized to access the requested resource.
  1327. //
  1328. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1329. // Thrown when a request parameter does not comply with the associated constraints.
  1330. //
  1331. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1332. // Thrown if the resource doesn't exist.
  1333. //
  1334. // * ErrCodeInternalErrorException "InternalErrorException"
  1335. // Indicates an internal service error.
  1336. //
  1337. // * ErrCodeInvalidConfigurationException "InvalidConfigurationException"
  1338. //
  1339. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1340. // Thrown if the request is throttled.
  1341. //
  1342. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDataset
  1343. func (c *CognitoSync) SubscribeToDataset(input *SubscribeToDatasetInput) (*SubscribeToDatasetOutput, error) {
  1344. req, out := c.SubscribeToDatasetRequest(input)
  1345. return out, req.Send()
  1346. }
  1347. // SubscribeToDatasetWithContext is the same as SubscribeToDataset with the addition of
  1348. // the ability to pass a context and additional request options.
  1349. //
  1350. // See SubscribeToDataset for details on how to use this API operation.
  1351. //
  1352. // The context must be non-nil and will be used for request cancellation. If
  1353. // the context is nil a panic will occur. In the future the SDK may create
  1354. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1355. // for more information on using Contexts.
  1356. func (c *CognitoSync) SubscribeToDatasetWithContext(ctx aws.Context, input *SubscribeToDatasetInput, opts ...request.Option) (*SubscribeToDatasetOutput, error) {
  1357. req, out := c.SubscribeToDatasetRequest(input)
  1358. req.SetContext(ctx)
  1359. req.ApplyOptions(opts...)
  1360. return out, req.Send()
  1361. }
  1362. const opUnsubscribeFromDataset = "UnsubscribeFromDataset"
  1363. // UnsubscribeFromDatasetRequest generates a "aws/request.Request" representing the
  1364. // client's request for the UnsubscribeFromDataset operation. The "output" return
  1365. // value will be populated with the request's response once the request completes
  1366. // successfully.
  1367. //
  1368. // Use "Send" method on the returned Request to send the API call to the service.
  1369. // the "output" return value is not valid until after Send returns without error.
  1370. //
  1371. // See UnsubscribeFromDataset for more information on using the UnsubscribeFromDataset
  1372. // API call, and error handling.
  1373. //
  1374. // This method is useful when you want to inject custom logic or configuration
  1375. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1376. //
  1377. //
  1378. // // Example sending a request using the UnsubscribeFromDatasetRequest method.
  1379. // req, resp := client.UnsubscribeFromDatasetRequest(params)
  1380. //
  1381. // err := req.Send()
  1382. // if err == nil { // resp is now filled
  1383. // fmt.Println(resp)
  1384. // }
  1385. //
  1386. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UnsubscribeFromDataset
  1387. func (c *CognitoSync) UnsubscribeFromDatasetRequest(input *UnsubscribeFromDatasetInput) (req *request.Request, output *UnsubscribeFromDatasetOutput) {
  1388. op := &request.Operation{
  1389. Name: opUnsubscribeFromDataset,
  1390. HTTPMethod: "DELETE",
  1391. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}",
  1392. }
  1393. if input == nil {
  1394. input = &UnsubscribeFromDatasetInput{}
  1395. }
  1396. output = &UnsubscribeFromDatasetOutput{}
  1397. req = c.newRequest(op, input, output)
  1398. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1399. return
  1400. }
  1401. // UnsubscribeFromDataset API operation for Amazon Cognito Sync.
  1402. //
  1403. // Unsubscribes from receiving notifications when a dataset is modified by another
  1404. // device.
  1405. //
  1406. // This API can only be called with temporary credentials provided by Cognito
  1407. // Identity. You cannot call this API with developer credentials.
  1408. //
  1409. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1410. // with awserr.Error's Code and Message methods to get detailed information about
  1411. // the error.
  1412. //
  1413. // See the AWS API reference guide for Amazon Cognito Sync's
  1414. // API operation UnsubscribeFromDataset for usage and error information.
  1415. //
  1416. // Returned Error Codes:
  1417. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  1418. // Thrown when a user is not authorized to access the requested resource.
  1419. //
  1420. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1421. // Thrown when a request parameter does not comply with the associated constraints.
  1422. //
  1423. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1424. // Thrown if the resource doesn't exist.
  1425. //
  1426. // * ErrCodeInternalErrorException "InternalErrorException"
  1427. // Indicates an internal service error.
  1428. //
  1429. // * ErrCodeInvalidConfigurationException "InvalidConfigurationException"
  1430. //
  1431. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1432. // Thrown if the request is throttled.
  1433. //
  1434. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UnsubscribeFromDataset
  1435. func (c *CognitoSync) UnsubscribeFromDataset(input *UnsubscribeFromDatasetInput) (*UnsubscribeFromDatasetOutput, error) {
  1436. req, out := c.UnsubscribeFromDatasetRequest(input)
  1437. return out, req.Send()
  1438. }
  1439. // UnsubscribeFromDatasetWithContext is the same as UnsubscribeFromDataset with the addition of
  1440. // the ability to pass a context and additional request options.
  1441. //
  1442. // See UnsubscribeFromDataset for details on how to use this API operation.
  1443. //
  1444. // The context must be non-nil and will be used for request cancellation. If
  1445. // the context is nil a panic will occur. In the future the SDK may create
  1446. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1447. // for more information on using Contexts.
  1448. func (c *CognitoSync) UnsubscribeFromDatasetWithContext(ctx aws.Context, input *UnsubscribeFromDatasetInput, opts ...request.Option) (*UnsubscribeFromDatasetOutput, error) {
  1449. req, out := c.UnsubscribeFromDatasetRequest(input)
  1450. req.SetContext(ctx)
  1451. req.ApplyOptions(opts...)
  1452. return out, req.Send()
  1453. }
  1454. const opUpdateRecords = "UpdateRecords"
  1455. // UpdateRecordsRequest generates a "aws/request.Request" representing the
  1456. // client's request for the UpdateRecords operation. The "output" return
  1457. // value will be populated with the request's response once the request completes
  1458. // successfully.
  1459. //
  1460. // Use "Send" method on the returned Request to send the API call to the service.
  1461. // the "output" return value is not valid until after Send returns without error.
  1462. //
  1463. // See UpdateRecords for more information on using the UpdateRecords
  1464. // API call, and error handling.
  1465. //
  1466. // This method is useful when you want to inject custom logic or configuration
  1467. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1468. //
  1469. //
  1470. // // Example sending a request using the UpdateRecordsRequest method.
  1471. // req, resp := client.UpdateRecordsRequest(params)
  1472. //
  1473. // err := req.Send()
  1474. // if err == nil { // resp is now filled
  1475. // fmt.Println(resp)
  1476. // }
  1477. //
  1478. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UpdateRecords
  1479. func (c *CognitoSync) UpdateRecordsRequest(input *UpdateRecordsInput) (req *request.Request, output *UpdateRecordsOutput) {
  1480. op := &request.Operation{
  1481. Name: opUpdateRecords,
  1482. HTTPMethod: "POST",
  1483. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",
  1484. }
  1485. if input == nil {
  1486. input = &UpdateRecordsInput{}
  1487. }
  1488. output = &UpdateRecordsOutput{}
  1489. req = c.newRequest(op, input, output)
  1490. return
  1491. }
  1492. // UpdateRecords API operation for Amazon Cognito Sync.
  1493. //
  1494. // Posts updates to records and adds and deletes records for a dataset and user.
  1495. //
  1496. // The sync count in the record patch is your last known sync count for that
  1497. // record. The server will reject an UpdateRecords request with a ResourceConflictException
  1498. // if you try to patch a record with a new value but a stale sync count.
  1499. //
  1500. // For example, if the sync count on the server is 5 for a key called highScore
  1501. // and you try and submit a new highScore with sync count of 4, the request
  1502. // will be rejected. To obtain the current sync count for a record, call ListRecords.
  1503. // On a successful update of the record, the response returns the new sync count
  1504. // for that record. You should present that sync count the next time you try
  1505. // to update that same record. When the record does not exist, specify the sync
  1506. // count as 0.
  1507. //
  1508. // This API can be called with temporary user credentials provided by Cognito
  1509. // Identity or with developer credentials.
  1510. //
  1511. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1512. // with awserr.Error's Code and Message methods to get detailed information about
  1513. // the error.
  1514. //
  1515. // See the AWS API reference guide for Amazon Cognito Sync's
  1516. // API operation UpdateRecords for usage and error information.
  1517. //
  1518. // Returned Error Codes:
  1519. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1520. // Thrown when a request parameter does not comply with the associated constraints.
  1521. //
  1522. // * ErrCodeLimitExceededException "LimitExceededException"
  1523. // Thrown when the limit on the number of objects or operations has been exceeded.
  1524. //
  1525. // * ErrCodeNotAuthorizedException "NotAuthorizedException"
  1526. // Thrown when a user is not authorized to access the requested resource.
  1527. //
  1528. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1529. // Thrown if the resource doesn't exist.
  1530. //
  1531. // * ErrCodeResourceConflictException "ResourceConflictException"
  1532. // Thrown if an update can't be applied because the resource was changed by
  1533. // another call and this would result in a conflict.
  1534. //
  1535. // * ErrCodeInvalidLambdaFunctionOutputException "InvalidLambdaFunctionOutputException"
  1536. // The AWS Lambda function returned invalid output or an exception.
  1537. //
  1538. // * ErrCodeLambdaThrottledException "LambdaThrottledException"
  1539. // AWS Lambda throttled your account, please contact AWS Support
  1540. //
  1541. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1542. // Thrown if the request is throttled.
  1543. //
  1544. // * ErrCodeInternalErrorException "InternalErrorException"
  1545. // Indicates an internal service error.
  1546. //
  1547. // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UpdateRecords
  1548. func (c *CognitoSync) UpdateRecords(input *UpdateRecordsInput) (*UpdateRecordsOutput, error) {
  1549. req, out := c.UpdateRecordsRequest(input)
  1550. return out, req.Send()
  1551. }
  1552. // UpdateRecordsWithContext is the same as UpdateRecords with the addition of
  1553. // the ability to pass a context and additional request options.
  1554. //
  1555. // See UpdateRecords for details on how to use this API operation.
  1556. //
  1557. // The context must be non-nil and will be used for request cancellation. If
  1558. // the context is nil a panic will occur. In the future the SDK may create
  1559. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1560. // for more information on using Contexts.
  1561. func (c *CognitoSync) UpdateRecordsWithContext(ctx aws.Context, input *UpdateRecordsInput, opts ...request.Option) (*UpdateRecordsOutput, error) {
  1562. req, out := c.UpdateRecordsRequest(input)
  1563. req.SetContext(ctx)
  1564. req.ApplyOptions(opts...)
  1565. return out, req.Send()
  1566. }
  1567. // The input for the BulkPublish operation.
  1568. type BulkPublishInput struct {
  1569. _ struct{} `type:"structure"`
  1570. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1571. // created by Amazon Cognito. GUID generation is unique within a region.
  1572. //
  1573. // IdentityPoolId is a required field
  1574. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1575. }
  1576. // String returns the string representation
  1577. func (s BulkPublishInput) String() string {
  1578. return awsutil.Prettify(s)
  1579. }
  1580. // GoString returns the string representation
  1581. func (s BulkPublishInput) GoString() string {
  1582. return s.String()
  1583. }
  1584. // Validate inspects the fields of the type to determine if they are valid.
  1585. func (s *BulkPublishInput) Validate() error {
  1586. invalidParams := request.ErrInvalidParams{Context: "BulkPublishInput"}
  1587. if s.IdentityPoolId == nil {
  1588. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1589. }
  1590. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1591. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1592. }
  1593. if invalidParams.Len() > 0 {
  1594. return invalidParams
  1595. }
  1596. return nil
  1597. }
  1598. // SetIdentityPoolId sets the IdentityPoolId field's value.
  1599. func (s *BulkPublishInput) SetIdentityPoolId(v string) *BulkPublishInput {
  1600. s.IdentityPoolId = &v
  1601. return s
  1602. }
  1603. // The output for the BulkPublish operation.
  1604. type BulkPublishOutput struct {
  1605. _ struct{} `type:"structure"`
  1606. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1607. // created by Amazon Cognito. GUID generation is unique within a region.
  1608. IdentityPoolId *string `min:"1" type:"string"`
  1609. }
  1610. // String returns the string representation
  1611. func (s BulkPublishOutput) String() string {
  1612. return awsutil.Prettify(s)
  1613. }
  1614. // GoString returns the string representation
  1615. func (s BulkPublishOutput) GoString() string {
  1616. return s.String()
  1617. }
  1618. // SetIdentityPoolId sets the IdentityPoolId field's value.
  1619. func (s *BulkPublishOutput) SetIdentityPoolId(v string) *BulkPublishOutput {
  1620. s.IdentityPoolId = &v
  1621. return s
  1622. }
  1623. // Configuration options for configure Cognito streams.
  1624. type CognitoStreams struct {
  1625. _ struct{} `type:"structure"`
  1626. // The ARN of the role Amazon Cognito can assume in order to publish to the
  1627. // stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke
  1628. // PutRecord on your Cognito stream.
  1629. RoleArn *string `min:"20" type:"string"`
  1630. // The name of the Cognito stream to receive updates. This stream must be in
  1631. // the developers account and in the same region as the identity pool.
  1632. StreamName *string `min:"1" type:"string"`
  1633. // Status of the Cognito streams. Valid values are: ENABLED - Streaming of updates
  1634. // to identity pool is enabled.
  1635. //
  1636. // DISABLED - Streaming of updates to identity pool is disabled. Bulk publish
  1637. // will also fail if StreamingStatus is DISABLED.
  1638. StreamingStatus *string `type:"string" enum:"StreamingStatus"`
  1639. }
  1640. // String returns the string representation
  1641. func (s CognitoStreams) String() string {
  1642. return awsutil.Prettify(s)
  1643. }
  1644. // GoString returns the string representation
  1645. func (s CognitoStreams) GoString() string {
  1646. return s.String()
  1647. }
  1648. // Validate inspects the fields of the type to determine if they are valid.
  1649. func (s *CognitoStreams) Validate() error {
  1650. invalidParams := request.ErrInvalidParams{Context: "CognitoStreams"}
  1651. if s.RoleArn != nil && len(*s.RoleArn) < 20 {
  1652. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
  1653. }
  1654. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1655. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1656. }
  1657. if invalidParams.Len() > 0 {
  1658. return invalidParams
  1659. }
  1660. return nil
  1661. }
  1662. // SetRoleArn sets the RoleArn field's value.
  1663. func (s *CognitoStreams) SetRoleArn(v string) *CognitoStreams {
  1664. s.RoleArn = &v
  1665. return s
  1666. }
  1667. // SetStreamName sets the StreamName field's value.
  1668. func (s *CognitoStreams) SetStreamName(v string) *CognitoStreams {
  1669. s.StreamName = &v
  1670. return s
  1671. }
  1672. // SetStreamingStatus sets the StreamingStatus field's value.
  1673. func (s *CognitoStreams) SetStreamingStatus(v string) *CognitoStreams {
  1674. s.StreamingStatus = &v
  1675. return s
  1676. }
  1677. // A collection of data for an identity pool. An identity pool can have multiple
  1678. // datasets. A dataset is per identity and can be general or associated with
  1679. // a particular entity in an application (like a saved game). Datasets are automatically
  1680. // created if they don't exist. Data is synced by dataset, and a dataset can
  1681. // hold up to 1MB of key-value pairs.
  1682. type Dataset struct {
  1683. _ struct{} `type:"structure"`
  1684. // Date on which the dataset was created.
  1685. CreationDate *time.Time `type:"timestamp"`
  1686. // Total size in bytes of the records in this dataset.
  1687. DataStorage *int64 `type:"long"`
  1688. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  1689. // (underscore), '-' (dash), and '.' (dot).
  1690. DatasetName *string `min:"1" type:"string"`
  1691. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1692. // created by Amazon Cognito. GUID generation is unique within a region.
  1693. IdentityId *string `min:"1" type:"string"`
  1694. // The device that made the last change to this dataset.
  1695. LastModifiedBy *string `type:"string"`
  1696. // Date when the dataset was last modified.
  1697. LastModifiedDate *time.Time `type:"timestamp"`
  1698. // Number of records in this dataset.
  1699. NumRecords *int64 `type:"long"`
  1700. }
  1701. // String returns the string representation
  1702. func (s Dataset) String() string {
  1703. return awsutil.Prettify(s)
  1704. }
  1705. // GoString returns the string representation
  1706. func (s Dataset) GoString() string {
  1707. return s.String()
  1708. }
  1709. // SetCreationDate sets the CreationDate field's value.
  1710. func (s *Dataset) SetCreationDate(v time.Time) *Dataset {
  1711. s.CreationDate = &v
  1712. return s
  1713. }
  1714. // SetDataStorage sets the DataStorage field's value.
  1715. func (s *Dataset) SetDataStorage(v int64) *Dataset {
  1716. s.DataStorage = &v
  1717. return s
  1718. }
  1719. // SetDatasetName sets the DatasetName field's value.
  1720. func (s *Dataset) SetDatasetName(v string) *Dataset {
  1721. s.DatasetName = &v
  1722. return s
  1723. }
  1724. // SetIdentityId sets the IdentityId field's value.
  1725. func (s *Dataset) SetIdentityId(v string) *Dataset {
  1726. s.IdentityId = &v
  1727. return s
  1728. }
  1729. // SetLastModifiedBy sets the LastModifiedBy field's value.
  1730. func (s *Dataset) SetLastModifiedBy(v string) *Dataset {
  1731. s.LastModifiedBy = &v
  1732. return s
  1733. }
  1734. // SetLastModifiedDate sets the LastModifiedDate field's value.
  1735. func (s *Dataset) SetLastModifiedDate(v time.Time) *Dataset {
  1736. s.LastModifiedDate = &v
  1737. return s
  1738. }
  1739. // SetNumRecords sets the NumRecords field's value.
  1740. func (s *Dataset) SetNumRecords(v int64) *Dataset {
  1741. s.NumRecords = &v
  1742. return s
  1743. }
  1744. // A request to delete the specific dataset.
  1745. type DeleteDatasetInput struct {
  1746. _ struct{} `type:"structure"`
  1747. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  1748. // (underscore), '-' (dash), and '.' (dot).
  1749. //
  1750. // DatasetName is a required field
  1751. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  1752. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1753. // created by Amazon Cognito. GUID generation is unique within a region.
  1754. //
  1755. // IdentityId is a required field
  1756. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1757. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1758. // created by Amazon Cognito. GUID generation is unique within a region.
  1759. //
  1760. // IdentityPoolId is a required field
  1761. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1762. }
  1763. // String returns the string representation
  1764. func (s DeleteDatasetInput) String() string {
  1765. return awsutil.Prettify(s)
  1766. }
  1767. // GoString returns the string representation
  1768. func (s DeleteDatasetInput) GoString() string {
  1769. return s.String()
  1770. }
  1771. // Validate inspects the fields of the type to determine if they are valid.
  1772. func (s *DeleteDatasetInput) Validate() error {
  1773. invalidParams := request.ErrInvalidParams{Context: "DeleteDatasetInput"}
  1774. if s.DatasetName == nil {
  1775. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  1776. }
  1777. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  1778. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  1779. }
  1780. if s.IdentityId == nil {
  1781. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1782. }
  1783. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1784. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1785. }
  1786. if s.IdentityPoolId == nil {
  1787. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1788. }
  1789. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1790. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1791. }
  1792. if invalidParams.Len() > 0 {
  1793. return invalidParams
  1794. }
  1795. return nil
  1796. }
  1797. // SetDatasetName sets the DatasetName field's value.
  1798. func (s *DeleteDatasetInput) SetDatasetName(v string) *DeleteDatasetInput {
  1799. s.DatasetName = &v
  1800. return s
  1801. }
  1802. // SetIdentityId sets the IdentityId field's value.
  1803. func (s *DeleteDatasetInput) SetIdentityId(v string) *DeleteDatasetInput {
  1804. s.IdentityId = &v
  1805. return s
  1806. }
  1807. // SetIdentityPoolId sets the IdentityPoolId field's value.
  1808. func (s *DeleteDatasetInput) SetIdentityPoolId(v string) *DeleteDatasetInput {
  1809. s.IdentityPoolId = &v
  1810. return s
  1811. }
  1812. // Response to a successful DeleteDataset request.
  1813. type DeleteDatasetOutput struct {
  1814. _ struct{} `type:"structure"`
  1815. // A collection of data for an identity pool. An identity pool can have multiple
  1816. // datasets. A dataset is per identity and can be general or associated with
  1817. // a particular entity in an application (like a saved game). Datasets are automatically
  1818. // created if they don't exist. Data is synced by dataset, and a dataset can
  1819. // hold up to 1MB of key-value pairs.
  1820. Dataset *Dataset `type:"structure"`
  1821. }
  1822. // String returns the string representation
  1823. func (s DeleteDatasetOutput) String() string {
  1824. return awsutil.Prettify(s)
  1825. }
  1826. // GoString returns the string representation
  1827. func (s DeleteDatasetOutput) GoString() string {
  1828. return s.String()
  1829. }
  1830. // SetDataset sets the Dataset field's value.
  1831. func (s *DeleteDatasetOutput) SetDataset(v *Dataset) *DeleteDatasetOutput {
  1832. s.Dataset = v
  1833. return s
  1834. }
  1835. // A request for meta data about a dataset (creation date, number of records,
  1836. // size) by owner and dataset name.
  1837. type DescribeDatasetInput struct {
  1838. _ struct{} `type:"structure"`
  1839. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  1840. // (underscore), '-' (dash), and '.' (dot).
  1841. //
  1842. // DatasetName is a required field
  1843. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  1844. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1845. // created by Amazon Cognito. GUID generation is unique within a region.
  1846. //
  1847. // IdentityId is a required field
  1848. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1849. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1850. // created by Amazon Cognito. GUID generation is unique within a region.
  1851. //
  1852. // IdentityPoolId is a required field
  1853. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1854. }
  1855. // String returns the string representation
  1856. func (s DescribeDatasetInput) String() string {
  1857. return awsutil.Prettify(s)
  1858. }
  1859. // GoString returns the string representation
  1860. func (s DescribeDatasetInput) GoString() string {
  1861. return s.String()
  1862. }
  1863. // Validate inspects the fields of the type to determine if they are valid.
  1864. func (s *DescribeDatasetInput) Validate() error {
  1865. invalidParams := request.ErrInvalidParams{Context: "DescribeDatasetInput"}
  1866. if s.DatasetName == nil {
  1867. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  1868. }
  1869. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  1870. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  1871. }
  1872. if s.IdentityId == nil {
  1873. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1874. }
  1875. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1876. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1877. }
  1878. if s.IdentityPoolId == nil {
  1879. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1880. }
  1881. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1882. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1883. }
  1884. if invalidParams.Len() > 0 {
  1885. return invalidParams
  1886. }
  1887. return nil
  1888. }
  1889. // SetDatasetName sets the DatasetName field's value.
  1890. func (s *DescribeDatasetInput) SetDatasetName(v string) *DescribeDatasetInput {
  1891. s.DatasetName = &v
  1892. return s
  1893. }
  1894. // SetIdentityId sets the IdentityId field's value.
  1895. func (s *DescribeDatasetInput) SetIdentityId(v string) *DescribeDatasetInput {
  1896. s.IdentityId = &v
  1897. return s
  1898. }
  1899. // SetIdentityPoolId sets the IdentityPoolId field's value.
  1900. func (s *DescribeDatasetInput) SetIdentityPoolId(v string) *DescribeDatasetInput {
  1901. s.IdentityPoolId = &v
  1902. return s
  1903. }
  1904. // Response to a successful DescribeDataset request.
  1905. type DescribeDatasetOutput struct {
  1906. _ struct{} `type:"structure"`
  1907. // Meta data for a collection of data for an identity. An identity can have
  1908. // multiple datasets. A dataset can be general or associated with a particular
  1909. // entity in an application (like a saved game). Datasets are automatically
  1910. // created if they don't exist. Data is synced by dataset, and a dataset can
  1911. // hold up to 1MB of key-value pairs.
  1912. Dataset *Dataset `type:"structure"`
  1913. }
  1914. // String returns the string representation
  1915. func (s DescribeDatasetOutput) String() string {
  1916. return awsutil.Prettify(s)
  1917. }
  1918. // GoString returns the string representation
  1919. func (s DescribeDatasetOutput) GoString() string {
  1920. return s.String()
  1921. }
  1922. // SetDataset sets the Dataset field's value.
  1923. func (s *DescribeDatasetOutput) SetDataset(v *Dataset) *DescribeDatasetOutput {
  1924. s.Dataset = v
  1925. return s
  1926. }
  1927. // A request for usage information about the identity pool.
  1928. type DescribeIdentityPoolUsageInput struct {
  1929. _ struct{} `type:"structure"`
  1930. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1931. // created by Amazon Cognito. GUID generation is unique within a region.
  1932. //
  1933. // IdentityPoolId is a required field
  1934. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1935. }
  1936. // String returns the string representation
  1937. func (s DescribeIdentityPoolUsageInput) String() string {
  1938. return awsutil.Prettify(s)
  1939. }
  1940. // GoString returns the string representation
  1941. func (s DescribeIdentityPoolUsageInput) GoString() string {
  1942. return s.String()
  1943. }
  1944. // Validate inspects the fields of the type to determine if they are valid.
  1945. func (s *DescribeIdentityPoolUsageInput) Validate() error {
  1946. invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityPoolUsageInput"}
  1947. if s.IdentityPoolId == nil {
  1948. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1949. }
  1950. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1951. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1952. }
  1953. if invalidParams.Len() > 0 {
  1954. return invalidParams
  1955. }
  1956. return nil
  1957. }
  1958. // SetIdentityPoolId sets the IdentityPoolId field's value.
  1959. func (s *DescribeIdentityPoolUsageInput) SetIdentityPoolId(v string) *DescribeIdentityPoolUsageInput {
  1960. s.IdentityPoolId = &v
  1961. return s
  1962. }
  1963. // Response to a successful DescribeIdentityPoolUsage request.
  1964. type DescribeIdentityPoolUsageOutput struct {
  1965. _ struct{} `type:"structure"`
  1966. // Information about the usage of the identity pool.
  1967. IdentityPoolUsage *IdentityPoolUsage `type:"structure"`
  1968. }
  1969. // String returns the string representation
  1970. func (s DescribeIdentityPoolUsageOutput) String() string {
  1971. return awsutil.Prettify(s)
  1972. }
  1973. // GoString returns the string representation
  1974. func (s DescribeIdentityPoolUsageOutput) GoString() string {
  1975. return s.String()
  1976. }
  1977. // SetIdentityPoolUsage sets the IdentityPoolUsage field's value.
  1978. func (s *DescribeIdentityPoolUsageOutput) SetIdentityPoolUsage(v *IdentityPoolUsage) *DescribeIdentityPoolUsageOutput {
  1979. s.IdentityPoolUsage = v
  1980. return s
  1981. }
  1982. // A request for information about the usage of an identity pool.
  1983. type DescribeIdentityUsageInput struct {
  1984. _ struct{} `type:"structure"`
  1985. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1986. // created by Amazon Cognito. GUID generation is unique within a region.
  1987. //
  1988. // IdentityId is a required field
  1989. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1990. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1991. // created by Amazon Cognito. GUID generation is unique within a region.
  1992. //
  1993. // IdentityPoolId is a required field
  1994. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1995. }
  1996. // String returns the string representation
  1997. func (s DescribeIdentityUsageInput) String() string {
  1998. return awsutil.Prettify(s)
  1999. }
  2000. // GoString returns the string representation
  2001. func (s DescribeIdentityUsageInput) GoString() string {
  2002. return s.String()
  2003. }
  2004. // Validate inspects the fields of the type to determine if they are valid.
  2005. func (s *DescribeIdentityUsageInput) Validate() error {
  2006. invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityUsageInput"}
  2007. if s.IdentityId == nil {
  2008. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  2009. }
  2010. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2011. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2012. }
  2013. if s.IdentityPoolId == nil {
  2014. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2015. }
  2016. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2017. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2018. }
  2019. if invalidParams.Len() > 0 {
  2020. return invalidParams
  2021. }
  2022. return nil
  2023. }
  2024. // SetIdentityId sets the IdentityId field's value.
  2025. func (s *DescribeIdentityUsageInput) SetIdentityId(v string) *DescribeIdentityUsageInput {
  2026. s.IdentityId = &v
  2027. return s
  2028. }
  2029. // SetIdentityPoolId sets the IdentityPoolId field's value.
  2030. func (s *DescribeIdentityUsageInput) SetIdentityPoolId(v string) *DescribeIdentityUsageInput {
  2031. s.IdentityPoolId = &v
  2032. return s
  2033. }
  2034. // The response to a successful DescribeIdentityUsage request.
  2035. type DescribeIdentityUsageOutput struct {
  2036. _ struct{} `type:"structure"`
  2037. // Usage information for the identity.
  2038. IdentityUsage *IdentityUsage `type:"structure"`
  2039. }
  2040. // String returns the string representation
  2041. func (s DescribeIdentityUsageOutput) String() string {
  2042. return awsutil.Prettify(s)
  2043. }
  2044. // GoString returns the string representation
  2045. func (s DescribeIdentityUsageOutput) GoString() string {
  2046. return s.String()
  2047. }
  2048. // SetIdentityUsage sets the IdentityUsage field's value.
  2049. func (s *DescribeIdentityUsageOutput) SetIdentityUsage(v *IdentityUsage) *DescribeIdentityUsageOutput {
  2050. s.IdentityUsage = v
  2051. return s
  2052. }
  2053. // The input for the GetBulkPublishDetails operation.
  2054. type GetBulkPublishDetailsInput struct {
  2055. _ struct{} `type:"structure"`
  2056. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2057. // created by Amazon Cognito. GUID generation is unique within a region.
  2058. //
  2059. // IdentityPoolId is a required field
  2060. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2061. }
  2062. // String returns the string representation
  2063. func (s GetBulkPublishDetailsInput) String() string {
  2064. return awsutil.Prettify(s)
  2065. }
  2066. // GoString returns the string representation
  2067. func (s GetBulkPublishDetailsInput) GoString() string {
  2068. return s.String()
  2069. }
  2070. // Validate inspects the fields of the type to determine if they are valid.
  2071. func (s *GetBulkPublishDetailsInput) Validate() error {
  2072. invalidParams := request.ErrInvalidParams{Context: "GetBulkPublishDetailsInput"}
  2073. if s.IdentityPoolId == nil {
  2074. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2075. }
  2076. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2077. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2078. }
  2079. if invalidParams.Len() > 0 {
  2080. return invalidParams
  2081. }
  2082. return nil
  2083. }
  2084. // SetIdentityPoolId sets the IdentityPoolId field's value.
  2085. func (s *GetBulkPublishDetailsInput) SetIdentityPoolId(v string) *GetBulkPublishDetailsInput {
  2086. s.IdentityPoolId = &v
  2087. return s
  2088. }
  2089. // The output for the GetBulkPublishDetails operation.
  2090. type GetBulkPublishDetailsOutput struct {
  2091. _ struct{} `type:"structure"`
  2092. // If BulkPublishStatus is SUCCEEDED, the time the last bulk publish operation
  2093. // completed.
  2094. BulkPublishCompleteTime *time.Time `type:"timestamp"`
  2095. // The date/time at which the last bulk publish was initiated.
  2096. BulkPublishStartTime *time.Time `type:"timestamp"`
  2097. // Status of the last bulk publish operation, valid values are: NOT_STARTED
  2098. // - No bulk publish has been requested for this identity pool
  2099. //
  2100. // IN_PROGRESS - Data is being published to the configured stream
  2101. //
  2102. // SUCCEEDED - All data for the identity pool has been published to the configured
  2103. // stream
  2104. //
  2105. // FAILED - Some portion of the data has failed to publish, check FailureMessage
  2106. // for the cause.
  2107. BulkPublishStatus *string `type:"string" enum:"BulkPublishStatus"`
  2108. // If BulkPublishStatus is FAILED this field will contain the error message
  2109. // that caused the bulk publish to fail.
  2110. FailureMessage *string `type:"string"`
  2111. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2112. // created by Amazon Cognito. GUID generation is unique within a region.
  2113. IdentityPoolId *string `min:"1" type:"string"`
  2114. }
  2115. // String returns the string representation
  2116. func (s GetBulkPublishDetailsOutput) String() string {
  2117. return awsutil.Prettify(s)
  2118. }
  2119. // GoString returns the string representation
  2120. func (s GetBulkPublishDetailsOutput) GoString() string {
  2121. return s.String()
  2122. }
  2123. // SetBulkPublishCompleteTime sets the BulkPublishCompleteTime field's value.
  2124. func (s *GetBulkPublishDetailsOutput) SetBulkPublishCompleteTime(v time.Time) *GetBulkPublishDetailsOutput {
  2125. s.BulkPublishCompleteTime = &v
  2126. return s
  2127. }
  2128. // SetBulkPublishStartTime sets the BulkPublishStartTime field's value.
  2129. func (s *GetBulkPublishDetailsOutput) SetBulkPublishStartTime(v time.Time) *GetBulkPublishDetailsOutput {
  2130. s.BulkPublishStartTime = &v
  2131. return s
  2132. }
  2133. // SetBulkPublishStatus sets the BulkPublishStatus field's value.
  2134. func (s *GetBulkPublishDetailsOutput) SetBulkPublishStatus(v string) *GetBulkPublishDetailsOutput {
  2135. s.BulkPublishStatus = &v
  2136. return s
  2137. }
  2138. // SetFailureMessage sets the FailureMessage field's value.
  2139. func (s *GetBulkPublishDetailsOutput) SetFailureMessage(v string) *GetBulkPublishDetailsOutput {
  2140. s.FailureMessage = &v
  2141. return s
  2142. }
  2143. // SetIdentityPoolId sets the IdentityPoolId field's value.
  2144. func (s *GetBulkPublishDetailsOutput) SetIdentityPoolId(v string) *GetBulkPublishDetailsOutput {
  2145. s.IdentityPoolId = &v
  2146. return s
  2147. }
  2148. // A request for a list of the configured Cognito Events
  2149. type GetCognitoEventsInput struct {
  2150. _ struct{} `type:"structure"`
  2151. // The Cognito Identity Pool ID for the request
  2152. //
  2153. // IdentityPoolId is a required field
  2154. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2155. }
  2156. // String returns the string representation
  2157. func (s GetCognitoEventsInput) String() string {
  2158. return awsutil.Prettify(s)
  2159. }
  2160. // GoString returns the string representation
  2161. func (s GetCognitoEventsInput) GoString() string {
  2162. return s.String()
  2163. }
  2164. // Validate inspects the fields of the type to determine if they are valid.
  2165. func (s *GetCognitoEventsInput) Validate() error {
  2166. invalidParams := request.ErrInvalidParams{Context: "GetCognitoEventsInput"}
  2167. if s.IdentityPoolId == nil {
  2168. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2169. }
  2170. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2171. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2172. }
  2173. if invalidParams.Len() > 0 {
  2174. return invalidParams
  2175. }
  2176. return nil
  2177. }
  2178. // SetIdentityPoolId sets the IdentityPoolId field's value.
  2179. func (s *GetCognitoEventsInput) SetIdentityPoolId(v string) *GetCognitoEventsInput {
  2180. s.IdentityPoolId = &v
  2181. return s
  2182. }
  2183. // The response from the GetCognitoEvents request
  2184. type GetCognitoEventsOutput struct {
  2185. _ struct{} `type:"structure"`
  2186. // The Cognito Events returned from the GetCognitoEvents request
  2187. Events map[string]*string `type:"map"`
  2188. }
  2189. // String returns the string representation
  2190. func (s GetCognitoEventsOutput) String() string {
  2191. return awsutil.Prettify(s)
  2192. }
  2193. // GoString returns the string representation
  2194. func (s GetCognitoEventsOutput) GoString() string {
  2195. return s.String()
  2196. }
  2197. // SetEvents sets the Events field's value.
  2198. func (s *GetCognitoEventsOutput) SetEvents(v map[string]*string) *GetCognitoEventsOutput {
  2199. s.Events = v
  2200. return s
  2201. }
  2202. // The input for the GetIdentityPoolConfiguration operation.
  2203. type GetIdentityPoolConfigurationInput struct {
  2204. _ struct{} `type:"structure"`
  2205. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2206. // created by Amazon Cognito. This is the ID of the pool for which to return
  2207. // a configuration.
  2208. //
  2209. // IdentityPoolId is a required field
  2210. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2211. }
  2212. // String returns the string representation
  2213. func (s GetIdentityPoolConfigurationInput) String() string {
  2214. return awsutil.Prettify(s)
  2215. }
  2216. // GoString returns the string representation
  2217. func (s GetIdentityPoolConfigurationInput) GoString() string {
  2218. return s.String()
  2219. }
  2220. // Validate inspects the fields of the type to determine if they are valid.
  2221. func (s *GetIdentityPoolConfigurationInput) Validate() error {
  2222. invalidParams := request.ErrInvalidParams{Context: "GetIdentityPoolConfigurationInput"}
  2223. if s.IdentityPoolId == nil {
  2224. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2225. }
  2226. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2227. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2228. }
  2229. if invalidParams.Len() > 0 {
  2230. return invalidParams
  2231. }
  2232. return nil
  2233. }
  2234. // SetIdentityPoolId sets the IdentityPoolId field's value.
  2235. func (s *GetIdentityPoolConfigurationInput) SetIdentityPoolId(v string) *GetIdentityPoolConfigurationInput {
  2236. s.IdentityPoolId = &v
  2237. return s
  2238. }
  2239. // The output for the GetIdentityPoolConfiguration operation.
  2240. type GetIdentityPoolConfigurationOutput struct {
  2241. _ struct{} `type:"structure"`
  2242. // Options to apply to this identity pool for Amazon Cognito streams.
  2243. CognitoStreams *CognitoStreams `type:"structure"`
  2244. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2245. // created by Amazon Cognito.
  2246. IdentityPoolId *string `min:"1" type:"string"`
  2247. // Options to apply to this identity pool for push synchronization.
  2248. PushSync *PushSync `type:"structure"`
  2249. }
  2250. // String returns the string representation
  2251. func (s GetIdentityPoolConfigurationOutput) String() string {
  2252. return awsutil.Prettify(s)
  2253. }
  2254. // GoString returns the string representation
  2255. func (s GetIdentityPoolConfigurationOutput) GoString() string {
  2256. return s.String()
  2257. }
  2258. // SetCognitoStreams sets the CognitoStreams field's value.
  2259. func (s *GetIdentityPoolConfigurationOutput) SetCognitoStreams(v *CognitoStreams) *GetIdentityPoolConfigurationOutput {
  2260. s.CognitoStreams = v
  2261. return s
  2262. }
  2263. // SetIdentityPoolId sets the IdentityPoolId field's value.
  2264. func (s *GetIdentityPoolConfigurationOutput) SetIdentityPoolId(v string) *GetIdentityPoolConfigurationOutput {
  2265. s.IdentityPoolId = &v
  2266. return s
  2267. }
  2268. // SetPushSync sets the PushSync field's value.
  2269. func (s *GetIdentityPoolConfigurationOutput) SetPushSync(v *PushSync) *GetIdentityPoolConfigurationOutput {
  2270. s.PushSync = v
  2271. return s
  2272. }
  2273. // Usage information for the identity pool.
  2274. type IdentityPoolUsage struct {
  2275. _ struct{} `type:"structure"`
  2276. // Data storage information for the identity pool.
  2277. DataStorage *int64 `type:"long"`
  2278. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2279. // created by Amazon Cognito. GUID generation is unique within a region.
  2280. IdentityPoolId *string `min:"1" type:"string"`
  2281. // Date on which the identity pool was last modified.
  2282. LastModifiedDate *time.Time `type:"timestamp"`
  2283. // Number of sync sessions for the identity pool.
  2284. SyncSessionsCount *int64 `type:"long"`
  2285. }
  2286. // String returns the string representation
  2287. func (s IdentityPoolUsage) String() string {
  2288. return awsutil.Prettify(s)
  2289. }
  2290. // GoString returns the string representation
  2291. func (s IdentityPoolUsage) GoString() string {
  2292. return s.String()
  2293. }
  2294. // SetDataStorage sets the DataStorage field's value.
  2295. func (s *IdentityPoolUsage) SetDataStorage(v int64) *IdentityPoolUsage {
  2296. s.DataStorage = &v
  2297. return s
  2298. }
  2299. // SetIdentityPoolId sets the IdentityPoolId field's value.
  2300. func (s *IdentityPoolUsage) SetIdentityPoolId(v string) *IdentityPoolUsage {
  2301. s.IdentityPoolId = &v
  2302. return s
  2303. }
  2304. // SetLastModifiedDate sets the LastModifiedDate field's value.
  2305. func (s *IdentityPoolUsage) SetLastModifiedDate(v time.Time) *IdentityPoolUsage {
  2306. s.LastModifiedDate = &v
  2307. return s
  2308. }
  2309. // SetSyncSessionsCount sets the SyncSessionsCount field's value.
  2310. func (s *IdentityPoolUsage) SetSyncSessionsCount(v int64) *IdentityPoolUsage {
  2311. s.SyncSessionsCount = &v
  2312. return s
  2313. }
  2314. // Usage information for the identity.
  2315. type IdentityUsage struct {
  2316. _ struct{} `type:"structure"`
  2317. // Total data storage for this identity.
  2318. DataStorage *int64 `type:"long"`
  2319. // Number of datasets for the identity.
  2320. DatasetCount *int64 `type:"integer"`
  2321. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2322. // created by Amazon Cognito. GUID generation is unique within a region.
  2323. IdentityId *string `min:"1" type:"string"`
  2324. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2325. // created by Amazon Cognito. GUID generation is unique within a region.
  2326. IdentityPoolId *string `min:"1" type:"string"`
  2327. // Date on which the identity was last modified.
  2328. LastModifiedDate *time.Time `type:"timestamp"`
  2329. }
  2330. // String returns the string representation
  2331. func (s IdentityUsage) String() string {
  2332. return awsutil.Prettify(s)
  2333. }
  2334. // GoString returns the string representation
  2335. func (s IdentityUsage) GoString() string {
  2336. return s.String()
  2337. }
  2338. // SetDataStorage sets the DataStorage field's value.
  2339. func (s *IdentityUsage) SetDataStorage(v int64) *IdentityUsage {
  2340. s.DataStorage = &v
  2341. return s
  2342. }
  2343. // SetDatasetCount sets the DatasetCount field's value.
  2344. func (s *IdentityUsage) SetDatasetCount(v int64) *IdentityUsage {
  2345. s.DatasetCount = &v
  2346. return s
  2347. }
  2348. // SetIdentityId sets the IdentityId field's value.
  2349. func (s *IdentityUsage) SetIdentityId(v string) *IdentityUsage {
  2350. s.IdentityId = &v
  2351. return s
  2352. }
  2353. // SetIdentityPoolId sets the IdentityPoolId field's value.
  2354. func (s *IdentityUsage) SetIdentityPoolId(v string) *IdentityUsage {
  2355. s.IdentityPoolId = &v
  2356. return s
  2357. }
  2358. // SetLastModifiedDate sets the LastModifiedDate field's value.
  2359. func (s *IdentityUsage) SetLastModifiedDate(v time.Time) *IdentityUsage {
  2360. s.LastModifiedDate = &v
  2361. return s
  2362. }
  2363. // Request for a list of datasets for an identity.
  2364. type ListDatasetsInput struct {
  2365. _ struct{} `type:"structure"`
  2366. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2367. // created by Amazon Cognito. GUID generation is unique within a region.
  2368. //
  2369. // IdentityId is a required field
  2370. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  2371. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2372. // created by Amazon Cognito. GUID generation is unique within a region.
  2373. //
  2374. // IdentityPoolId is a required field
  2375. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2376. // The maximum number of results to be returned.
  2377. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  2378. // A pagination token for obtaining the next page of results.
  2379. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  2380. }
  2381. // String returns the string representation
  2382. func (s ListDatasetsInput) String() string {
  2383. return awsutil.Prettify(s)
  2384. }
  2385. // GoString returns the string representation
  2386. func (s ListDatasetsInput) GoString() string {
  2387. return s.String()
  2388. }
  2389. // Validate inspects the fields of the type to determine if they are valid.
  2390. func (s *ListDatasetsInput) Validate() error {
  2391. invalidParams := request.ErrInvalidParams{Context: "ListDatasetsInput"}
  2392. if s.IdentityId == nil {
  2393. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  2394. }
  2395. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2396. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2397. }
  2398. if s.IdentityPoolId == nil {
  2399. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2400. }
  2401. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2402. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2403. }
  2404. if invalidParams.Len() > 0 {
  2405. return invalidParams
  2406. }
  2407. return nil
  2408. }
  2409. // SetIdentityId sets the IdentityId field's value.
  2410. func (s *ListDatasetsInput) SetIdentityId(v string) *ListDatasetsInput {
  2411. s.IdentityId = &v
  2412. return s
  2413. }
  2414. // SetIdentityPoolId sets the IdentityPoolId field's value.
  2415. func (s *ListDatasetsInput) SetIdentityPoolId(v string) *ListDatasetsInput {
  2416. s.IdentityPoolId = &v
  2417. return s
  2418. }
  2419. // SetMaxResults sets the MaxResults field's value.
  2420. func (s *ListDatasetsInput) SetMaxResults(v int64) *ListDatasetsInput {
  2421. s.MaxResults = &v
  2422. return s
  2423. }
  2424. // SetNextToken sets the NextToken field's value.
  2425. func (s *ListDatasetsInput) SetNextToken(v string) *ListDatasetsInput {
  2426. s.NextToken = &v
  2427. return s
  2428. }
  2429. // Returned for a successful ListDatasets request.
  2430. type ListDatasetsOutput struct {
  2431. _ struct{} `type:"structure"`
  2432. // Number of datasets returned.
  2433. Count *int64 `type:"integer"`
  2434. // A set of datasets.
  2435. Datasets []*Dataset `type:"list"`
  2436. // A pagination token for obtaining the next page of results.
  2437. NextToken *string `type:"string"`
  2438. }
  2439. // String returns the string representation
  2440. func (s ListDatasetsOutput) String() string {
  2441. return awsutil.Prettify(s)
  2442. }
  2443. // GoString returns the string representation
  2444. func (s ListDatasetsOutput) GoString() string {
  2445. return s.String()
  2446. }
  2447. // SetCount sets the Count field's value.
  2448. func (s *ListDatasetsOutput) SetCount(v int64) *ListDatasetsOutput {
  2449. s.Count = &v
  2450. return s
  2451. }
  2452. // SetDatasets sets the Datasets field's value.
  2453. func (s *ListDatasetsOutput) SetDatasets(v []*Dataset) *ListDatasetsOutput {
  2454. s.Datasets = v
  2455. return s
  2456. }
  2457. // SetNextToken sets the NextToken field's value.
  2458. func (s *ListDatasetsOutput) SetNextToken(v string) *ListDatasetsOutput {
  2459. s.NextToken = &v
  2460. return s
  2461. }
  2462. // A request for usage information on an identity pool.
  2463. type ListIdentityPoolUsageInput struct {
  2464. _ struct{} `type:"structure"`
  2465. // The maximum number of results to be returned.
  2466. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  2467. // A pagination token for obtaining the next page of results.
  2468. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  2469. }
  2470. // String returns the string representation
  2471. func (s ListIdentityPoolUsageInput) String() string {
  2472. return awsutil.Prettify(s)
  2473. }
  2474. // GoString returns the string representation
  2475. func (s ListIdentityPoolUsageInput) GoString() string {
  2476. return s.String()
  2477. }
  2478. // SetMaxResults sets the MaxResults field's value.
  2479. func (s *ListIdentityPoolUsageInput) SetMaxResults(v int64) *ListIdentityPoolUsageInput {
  2480. s.MaxResults = &v
  2481. return s
  2482. }
  2483. // SetNextToken sets the NextToken field's value.
  2484. func (s *ListIdentityPoolUsageInput) SetNextToken(v string) *ListIdentityPoolUsageInput {
  2485. s.NextToken = &v
  2486. return s
  2487. }
  2488. // Returned for a successful ListIdentityPoolUsage request.
  2489. type ListIdentityPoolUsageOutput struct {
  2490. _ struct{} `type:"structure"`
  2491. // Total number of identities for the identity pool.
  2492. Count *int64 `type:"integer"`
  2493. // Usage information for the identity pools.
  2494. IdentityPoolUsages []*IdentityPoolUsage `type:"list"`
  2495. // The maximum number of results to be returned.
  2496. MaxResults *int64 `type:"integer"`
  2497. // A pagination token for obtaining the next page of results.
  2498. NextToken *string `type:"string"`
  2499. }
  2500. // String returns the string representation
  2501. func (s ListIdentityPoolUsageOutput) String() string {
  2502. return awsutil.Prettify(s)
  2503. }
  2504. // GoString returns the string representation
  2505. func (s ListIdentityPoolUsageOutput) GoString() string {
  2506. return s.String()
  2507. }
  2508. // SetCount sets the Count field's value.
  2509. func (s *ListIdentityPoolUsageOutput) SetCount(v int64) *ListIdentityPoolUsageOutput {
  2510. s.Count = &v
  2511. return s
  2512. }
  2513. // SetIdentityPoolUsages sets the IdentityPoolUsages field's value.
  2514. func (s *ListIdentityPoolUsageOutput) SetIdentityPoolUsages(v []*IdentityPoolUsage) *ListIdentityPoolUsageOutput {
  2515. s.IdentityPoolUsages = v
  2516. return s
  2517. }
  2518. // SetMaxResults sets the MaxResults field's value.
  2519. func (s *ListIdentityPoolUsageOutput) SetMaxResults(v int64) *ListIdentityPoolUsageOutput {
  2520. s.MaxResults = &v
  2521. return s
  2522. }
  2523. // SetNextToken sets the NextToken field's value.
  2524. func (s *ListIdentityPoolUsageOutput) SetNextToken(v string) *ListIdentityPoolUsageOutput {
  2525. s.NextToken = &v
  2526. return s
  2527. }
  2528. // A request for a list of records.
  2529. type ListRecordsInput struct {
  2530. _ struct{} `type:"structure"`
  2531. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  2532. // (underscore), '-' (dash), and '.' (dot).
  2533. //
  2534. // DatasetName is a required field
  2535. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  2536. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2537. // created by Amazon Cognito. GUID generation is unique within a region.
  2538. //
  2539. // IdentityId is a required field
  2540. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  2541. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2542. // created by Amazon Cognito. GUID generation is unique within a region.
  2543. //
  2544. // IdentityPoolId is a required field
  2545. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2546. // The last server sync count for this record.
  2547. LastSyncCount *int64 `location:"querystring" locationName:"lastSyncCount" type:"long"`
  2548. // The maximum number of results to be returned.
  2549. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  2550. // A pagination token for obtaining the next page of results.
  2551. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  2552. // A token containing a session ID, identity ID, and expiration.
  2553. SyncSessionToken *string `location:"querystring" locationName:"syncSessionToken" type:"string"`
  2554. }
  2555. // String returns the string representation
  2556. func (s ListRecordsInput) String() string {
  2557. return awsutil.Prettify(s)
  2558. }
  2559. // GoString returns the string representation
  2560. func (s ListRecordsInput) GoString() string {
  2561. return s.String()
  2562. }
  2563. // Validate inspects the fields of the type to determine if they are valid.
  2564. func (s *ListRecordsInput) Validate() error {
  2565. invalidParams := request.ErrInvalidParams{Context: "ListRecordsInput"}
  2566. if s.DatasetName == nil {
  2567. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  2568. }
  2569. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  2570. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  2571. }
  2572. if s.IdentityId == nil {
  2573. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  2574. }
  2575. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2576. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2577. }
  2578. if s.IdentityPoolId == nil {
  2579. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2580. }
  2581. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2582. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2583. }
  2584. if invalidParams.Len() > 0 {
  2585. return invalidParams
  2586. }
  2587. return nil
  2588. }
  2589. // SetDatasetName sets the DatasetName field's value.
  2590. func (s *ListRecordsInput) SetDatasetName(v string) *ListRecordsInput {
  2591. s.DatasetName = &v
  2592. return s
  2593. }
  2594. // SetIdentityId sets the IdentityId field's value.
  2595. func (s *ListRecordsInput) SetIdentityId(v string) *ListRecordsInput {
  2596. s.IdentityId = &v
  2597. return s
  2598. }
  2599. // SetIdentityPoolId sets the IdentityPoolId field's value.
  2600. func (s *ListRecordsInput) SetIdentityPoolId(v string) *ListRecordsInput {
  2601. s.IdentityPoolId = &v
  2602. return s
  2603. }
  2604. // SetLastSyncCount sets the LastSyncCount field's value.
  2605. func (s *ListRecordsInput) SetLastSyncCount(v int64) *ListRecordsInput {
  2606. s.LastSyncCount = &v
  2607. return s
  2608. }
  2609. // SetMaxResults sets the MaxResults field's value.
  2610. func (s *ListRecordsInput) SetMaxResults(v int64) *ListRecordsInput {
  2611. s.MaxResults = &v
  2612. return s
  2613. }
  2614. // SetNextToken sets the NextToken field's value.
  2615. func (s *ListRecordsInput) SetNextToken(v string) *ListRecordsInput {
  2616. s.NextToken = &v
  2617. return s
  2618. }
  2619. // SetSyncSessionToken sets the SyncSessionToken field's value.
  2620. func (s *ListRecordsInput) SetSyncSessionToken(v string) *ListRecordsInput {
  2621. s.SyncSessionToken = &v
  2622. return s
  2623. }
  2624. // Returned for a successful ListRecordsRequest.
  2625. type ListRecordsOutput struct {
  2626. _ struct{} `type:"structure"`
  2627. // Total number of records.
  2628. Count *int64 `type:"integer"`
  2629. // A boolean value specifying whether to delete the dataset locally.
  2630. DatasetDeletedAfterRequestedSyncCount *bool `type:"boolean"`
  2631. // Indicates whether the dataset exists.
  2632. DatasetExists *bool `type:"boolean"`
  2633. // Server sync count for this dataset.
  2634. DatasetSyncCount *int64 `type:"long"`
  2635. // The user/device that made the last change to this record.
  2636. LastModifiedBy *string `type:"string"`
  2637. // Names of merged datasets.
  2638. MergedDatasetNames []*string `type:"list"`
  2639. // A pagination token for obtaining the next page of results.
  2640. NextToken *string `type:"string"`
  2641. // A list of all records.
  2642. Records []*Record `type:"list"`
  2643. // A token containing a session ID, identity ID, and expiration.
  2644. SyncSessionToken *string `type:"string"`
  2645. }
  2646. // String returns the string representation
  2647. func (s ListRecordsOutput) String() string {
  2648. return awsutil.Prettify(s)
  2649. }
  2650. // GoString returns the string representation
  2651. func (s ListRecordsOutput) GoString() string {
  2652. return s.String()
  2653. }
  2654. // SetCount sets the Count field's value.
  2655. func (s *ListRecordsOutput) SetCount(v int64) *ListRecordsOutput {
  2656. s.Count = &v
  2657. return s
  2658. }
  2659. // SetDatasetDeletedAfterRequestedSyncCount sets the DatasetDeletedAfterRequestedSyncCount field's value.
  2660. func (s *ListRecordsOutput) SetDatasetDeletedAfterRequestedSyncCount(v bool) *ListRecordsOutput {
  2661. s.DatasetDeletedAfterRequestedSyncCount = &v
  2662. return s
  2663. }
  2664. // SetDatasetExists sets the DatasetExists field's value.
  2665. func (s *ListRecordsOutput) SetDatasetExists(v bool) *ListRecordsOutput {
  2666. s.DatasetExists = &v
  2667. return s
  2668. }
  2669. // SetDatasetSyncCount sets the DatasetSyncCount field's value.
  2670. func (s *ListRecordsOutput) SetDatasetSyncCount(v int64) *ListRecordsOutput {
  2671. s.DatasetSyncCount = &v
  2672. return s
  2673. }
  2674. // SetLastModifiedBy sets the LastModifiedBy field's value.
  2675. func (s *ListRecordsOutput) SetLastModifiedBy(v string) *ListRecordsOutput {
  2676. s.LastModifiedBy = &v
  2677. return s
  2678. }
  2679. // SetMergedDatasetNames sets the MergedDatasetNames field's value.
  2680. func (s *ListRecordsOutput) SetMergedDatasetNames(v []*string) *ListRecordsOutput {
  2681. s.MergedDatasetNames = v
  2682. return s
  2683. }
  2684. // SetNextToken sets the NextToken field's value.
  2685. func (s *ListRecordsOutput) SetNextToken(v string) *ListRecordsOutput {
  2686. s.NextToken = &v
  2687. return s
  2688. }
  2689. // SetRecords sets the Records field's value.
  2690. func (s *ListRecordsOutput) SetRecords(v []*Record) *ListRecordsOutput {
  2691. s.Records = v
  2692. return s
  2693. }
  2694. // SetSyncSessionToken sets the SyncSessionToken field's value.
  2695. func (s *ListRecordsOutput) SetSyncSessionToken(v string) *ListRecordsOutput {
  2696. s.SyncSessionToken = &v
  2697. return s
  2698. }
  2699. // Configuration options to be applied to the identity pool.
  2700. type PushSync struct {
  2701. _ struct{} `type:"structure"`
  2702. // List of SNS platform application ARNs that could be used by clients.
  2703. ApplicationArns []*string `type:"list"`
  2704. // A role configured to allow Cognito to call SNS on behalf of the developer.
  2705. RoleArn *string `min:"20" type:"string"`
  2706. }
  2707. // String returns the string representation
  2708. func (s PushSync) String() string {
  2709. return awsutil.Prettify(s)
  2710. }
  2711. // GoString returns the string representation
  2712. func (s PushSync) GoString() string {
  2713. return s.String()
  2714. }
  2715. // Validate inspects the fields of the type to determine if they are valid.
  2716. func (s *PushSync) Validate() error {
  2717. invalidParams := request.ErrInvalidParams{Context: "PushSync"}
  2718. if s.RoleArn != nil && len(*s.RoleArn) < 20 {
  2719. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
  2720. }
  2721. if invalidParams.Len() > 0 {
  2722. return invalidParams
  2723. }
  2724. return nil
  2725. }
  2726. // SetApplicationArns sets the ApplicationArns field's value.
  2727. func (s *PushSync) SetApplicationArns(v []*string) *PushSync {
  2728. s.ApplicationArns = v
  2729. return s
  2730. }
  2731. // SetRoleArn sets the RoleArn field's value.
  2732. func (s *PushSync) SetRoleArn(v string) *PushSync {
  2733. s.RoleArn = &v
  2734. return s
  2735. }
  2736. // The basic data structure of a dataset.
  2737. type Record struct {
  2738. _ struct{} `type:"structure"`
  2739. // The last modified date of the client device.
  2740. DeviceLastModifiedDate *time.Time `type:"timestamp"`
  2741. // The key for the record.
  2742. Key *string `min:"1" type:"string"`
  2743. // The user/device that made the last change to this record.
  2744. LastModifiedBy *string `type:"string"`
  2745. // The date on which the record was last modified.
  2746. LastModifiedDate *time.Time `type:"timestamp"`
  2747. // The server sync count for this record.
  2748. SyncCount *int64 `type:"long"`
  2749. // The value for the record.
  2750. Value *string `type:"string"`
  2751. }
  2752. // String returns the string representation
  2753. func (s Record) String() string {
  2754. return awsutil.Prettify(s)
  2755. }
  2756. // GoString returns the string representation
  2757. func (s Record) GoString() string {
  2758. return s.String()
  2759. }
  2760. // SetDeviceLastModifiedDate sets the DeviceLastModifiedDate field's value.
  2761. func (s *Record) SetDeviceLastModifiedDate(v time.Time) *Record {
  2762. s.DeviceLastModifiedDate = &v
  2763. return s
  2764. }
  2765. // SetKey sets the Key field's value.
  2766. func (s *Record) SetKey(v string) *Record {
  2767. s.Key = &v
  2768. return s
  2769. }
  2770. // SetLastModifiedBy sets the LastModifiedBy field's value.
  2771. func (s *Record) SetLastModifiedBy(v string) *Record {
  2772. s.LastModifiedBy = &v
  2773. return s
  2774. }
  2775. // SetLastModifiedDate sets the LastModifiedDate field's value.
  2776. func (s *Record) SetLastModifiedDate(v time.Time) *Record {
  2777. s.LastModifiedDate = &v
  2778. return s
  2779. }
  2780. // SetSyncCount sets the SyncCount field's value.
  2781. func (s *Record) SetSyncCount(v int64) *Record {
  2782. s.SyncCount = &v
  2783. return s
  2784. }
  2785. // SetValue sets the Value field's value.
  2786. func (s *Record) SetValue(v string) *Record {
  2787. s.Value = &v
  2788. return s
  2789. }
  2790. // An update operation for a record.
  2791. type RecordPatch struct {
  2792. _ struct{} `type:"structure"`
  2793. // The last modified date of the client device.
  2794. DeviceLastModifiedDate *time.Time `type:"timestamp"`
  2795. // The key associated with the record patch.
  2796. //
  2797. // Key is a required field
  2798. Key *string `min:"1" type:"string" required:"true"`
  2799. // An operation, either replace or remove.
  2800. //
  2801. // Op is a required field
  2802. Op *string `type:"string" required:"true" enum:"Operation"`
  2803. // Last known server sync count for this record. Set to 0 if unknown.
  2804. //
  2805. // SyncCount is a required field
  2806. SyncCount *int64 `type:"long" required:"true"`
  2807. // The value associated with the record patch.
  2808. Value *string `type:"string"`
  2809. }
  2810. // String returns the string representation
  2811. func (s RecordPatch) String() string {
  2812. return awsutil.Prettify(s)
  2813. }
  2814. // GoString returns the string representation
  2815. func (s RecordPatch) GoString() string {
  2816. return s.String()
  2817. }
  2818. // Validate inspects the fields of the type to determine if they are valid.
  2819. func (s *RecordPatch) Validate() error {
  2820. invalidParams := request.ErrInvalidParams{Context: "RecordPatch"}
  2821. if s.Key == nil {
  2822. invalidParams.Add(request.NewErrParamRequired("Key"))
  2823. }
  2824. if s.Key != nil && len(*s.Key) < 1 {
  2825. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  2826. }
  2827. if s.Op == nil {
  2828. invalidParams.Add(request.NewErrParamRequired("Op"))
  2829. }
  2830. if s.SyncCount == nil {
  2831. invalidParams.Add(request.NewErrParamRequired("SyncCount"))
  2832. }
  2833. if invalidParams.Len() > 0 {
  2834. return invalidParams
  2835. }
  2836. return nil
  2837. }
  2838. // SetDeviceLastModifiedDate sets the DeviceLastModifiedDate field's value.
  2839. func (s *RecordPatch) SetDeviceLastModifiedDate(v time.Time) *RecordPatch {
  2840. s.DeviceLastModifiedDate = &v
  2841. return s
  2842. }
  2843. // SetKey sets the Key field's value.
  2844. func (s *RecordPatch) SetKey(v string) *RecordPatch {
  2845. s.Key = &v
  2846. return s
  2847. }
  2848. // SetOp sets the Op field's value.
  2849. func (s *RecordPatch) SetOp(v string) *RecordPatch {
  2850. s.Op = &v
  2851. return s
  2852. }
  2853. // SetSyncCount sets the SyncCount field's value.
  2854. func (s *RecordPatch) SetSyncCount(v int64) *RecordPatch {
  2855. s.SyncCount = &v
  2856. return s
  2857. }
  2858. // SetValue sets the Value field's value.
  2859. func (s *RecordPatch) SetValue(v string) *RecordPatch {
  2860. s.Value = &v
  2861. return s
  2862. }
  2863. // A request to RegisterDevice.
  2864. type RegisterDeviceInput struct {
  2865. _ struct{} `type:"structure"`
  2866. // The unique ID for this identity.
  2867. //
  2868. // IdentityId is a required field
  2869. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  2870. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2871. // created by Amazon Cognito. Here, the ID of the pool that the identity belongs
  2872. // to.
  2873. //
  2874. // IdentityPoolId is a required field
  2875. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2876. // The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).
  2877. //
  2878. // Platform is a required field
  2879. Platform *string `type:"string" required:"true" enum:"Platform"`
  2880. // The push token.
  2881. //
  2882. // Token is a required field
  2883. Token *string `type:"string" required:"true"`
  2884. }
  2885. // String returns the string representation
  2886. func (s RegisterDeviceInput) String() string {
  2887. return awsutil.Prettify(s)
  2888. }
  2889. // GoString returns the string representation
  2890. func (s RegisterDeviceInput) GoString() string {
  2891. return s.String()
  2892. }
  2893. // Validate inspects the fields of the type to determine if they are valid.
  2894. func (s *RegisterDeviceInput) Validate() error {
  2895. invalidParams := request.ErrInvalidParams{Context: "RegisterDeviceInput"}
  2896. if s.IdentityId == nil {
  2897. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  2898. }
  2899. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2900. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2901. }
  2902. if s.IdentityPoolId == nil {
  2903. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2904. }
  2905. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2906. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2907. }
  2908. if s.Platform == nil {
  2909. invalidParams.Add(request.NewErrParamRequired("Platform"))
  2910. }
  2911. if s.Token == nil {
  2912. invalidParams.Add(request.NewErrParamRequired("Token"))
  2913. }
  2914. if invalidParams.Len() > 0 {
  2915. return invalidParams
  2916. }
  2917. return nil
  2918. }
  2919. // SetIdentityId sets the IdentityId field's value.
  2920. func (s *RegisterDeviceInput) SetIdentityId(v string) *RegisterDeviceInput {
  2921. s.IdentityId = &v
  2922. return s
  2923. }
  2924. // SetIdentityPoolId sets the IdentityPoolId field's value.
  2925. func (s *RegisterDeviceInput) SetIdentityPoolId(v string) *RegisterDeviceInput {
  2926. s.IdentityPoolId = &v
  2927. return s
  2928. }
  2929. // SetPlatform sets the Platform field's value.
  2930. func (s *RegisterDeviceInput) SetPlatform(v string) *RegisterDeviceInput {
  2931. s.Platform = &v
  2932. return s
  2933. }
  2934. // SetToken sets the Token field's value.
  2935. func (s *RegisterDeviceInput) SetToken(v string) *RegisterDeviceInput {
  2936. s.Token = &v
  2937. return s
  2938. }
  2939. // Response to a RegisterDevice request.
  2940. type RegisterDeviceOutput struct {
  2941. _ struct{} `type:"structure"`
  2942. // The unique ID generated for this device by Cognito.
  2943. DeviceId *string `min:"1" type:"string"`
  2944. }
  2945. // String returns the string representation
  2946. func (s RegisterDeviceOutput) String() string {
  2947. return awsutil.Prettify(s)
  2948. }
  2949. // GoString returns the string representation
  2950. func (s RegisterDeviceOutput) GoString() string {
  2951. return s.String()
  2952. }
  2953. // SetDeviceId sets the DeviceId field's value.
  2954. func (s *RegisterDeviceOutput) SetDeviceId(v string) *RegisterDeviceOutput {
  2955. s.DeviceId = &v
  2956. return s
  2957. }
  2958. // A request to configure Cognito Events"
  2959. type SetCognitoEventsInput struct {
  2960. _ struct{} `type:"structure"`
  2961. // The events to configure
  2962. //
  2963. // Events is a required field
  2964. Events map[string]*string `type:"map" required:"true"`
  2965. // The Cognito Identity Pool to use when configuring Cognito Events
  2966. //
  2967. // IdentityPoolId is a required field
  2968. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2969. }
  2970. // String returns the string representation
  2971. func (s SetCognitoEventsInput) String() string {
  2972. return awsutil.Prettify(s)
  2973. }
  2974. // GoString returns the string representation
  2975. func (s SetCognitoEventsInput) GoString() string {
  2976. return s.String()
  2977. }
  2978. // Validate inspects the fields of the type to determine if they are valid.
  2979. func (s *SetCognitoEventsInput) Validate() error {
  2980. invalidParams := request.ErrInvalidParams{Context: "SetCognitoEventsInput"}
  2981. if s.Events == nil {
  2982. invalidParams.Add(request.NewErrParamRequired("Events"))
  2983. }
  2984. if s.IdentityPoolId == nil {
  2985. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2986. }
  2987. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2988. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2989. }
  2990. if invalidParams.Len() > 0 {
  2991. return invalidParams
  2992. }
  2993. return nil
  2994. }
  2995. // SetEvents sets the Events field's value.
  2996. func (s *SetCognitoEventsInput) SetEvents(v map[string]*string) *SetCognitoEventsInput {
  2997. s.Events = v
  2998. return s
  2999. }
  3000. // SetIdentityPoolId sets the IdentityPoolId field's value.
  3001. func (s *SetCognitoEventsInput) SetIdentityPoolId(v string) *SetCognitoEventsInput {
  3002. s.IdentityPoolId = &v
  3003. return s
  3004. }
  3005. type SetCognitoEventsOutput struct {
  3006. _ struct{} `type:"structure"`
  3007. }
  3008. // String returns the string representation
  3009. func (s SetCognitoEventsOutput) String() string {
  3010. return awsutil.Prettify(s)
  3011. }
  3012. // GoString returns the string representation
  3013. func (s SetCognitoEventsOutput) GoString() string {
  3014. return s.String()
  3015. }
  3016. // The input for the SetIdentityPoolConfiguration operation.
  3017. type SetIdentityPoolConfigurationInput struct {
  3018. _ struct{} `type:"structure"`
  3019. // Options to apply to this identity pool for Amazon Cognito streams.
  3020. CognitoStreams *CognitoStreams `type:"structure"`
  3021. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  3022. // created by Amazon Cognito. This is the ID of the pool to modify.
  3023. //
  3024. // IdentityPoolId is a required field
  3025. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  3026. // Options to apply to this identity pool for push synchronization.
  3027. PushSync *PushSync `type:"structure"`
  3028. }
  3029. // String returns the string representation
  3030. func (s SetIdentityPoolConfigurationInput) String() string {
  3031. return awsutil.Prettify(s)
  3032. }
  3033. // GoString returns the string representation
  3034. func (s SetIdentityPoolConfigurationInput) GoString() string {
  3035. return s.String()
  3036. }
  3037. // Validate inspects the fields of the type to determine if they are valid.
  3038. func (s *SetIdentityPoolConfigurationInput) Validate() error {
  3039. invalidParams := request.ErrInvalidParams{Context: "SetIdentityPoolConfigurationInput"}
  3040. if s.IdentityPoolId == nil {
  3041. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  3042. }
  3043. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  3044. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  3045. }
  3046. if s.CognitoStreams != nil {
  3047. if err := s.CognitoStreams.Validate(); err != nil {
  3048. invalidParams.AddNested("CognitoStreams", err.(request.ErrInvalidParams))
  3049. }
  3050. }
  3051. if s.PushSync != nil {
  3052. if err := s.PushSync.Validate(); err != nil {
  3053. invalidParams.AddNested("PushSync", err.(request.ErrInvalidParams))
  3054. }
  3055. }
  3056. if invalidParams.Len() > 0 {
  3057. return invalidParams
  3058. }
  3059. return nil
  3060. }
  3061. // SetCognitoStreams sets the CognitoStreams field's value.
  3062. func (s *SetIdentityPoolConfigurationInput) SetCognitoStreams(v *CognitoStreams) *SetIdentityPoolConfigurationInput {
  3063. s.CognitoStreams = v
  3064. return s
  3065. }
  3066. // SetIdentityPoolId sets the IdentityPoolId field's value.
  3067. func (s *SetIdentityPoolConfigurationInput) SetIdentityPoolId(v string) *SetIdentityPoolConfigurationInput {
  3068. s.IdentityPoolId = &v
  3069. return s
  3070. }
  3071. // SetPushSync sets the PushSync field's value.
  3072. func (s *SetIdentityPoolConfigurationInput) SetPushSync(v *PushSync) *SetIdentityPoolConfigurationInput {
  3073. s.PushSync = v
  3074. return s
  3075. }
  3076. // The output for the SetIdentityPoolConfiguration operation
  3077. type SetIdentityPoolConfigurationOutput struct {
  3078. _ struct{} `type:"structure"`
  3079. // Options to apply to this identity pool for Amazon Cognito streams.
  3080. CognitoStreams *CognitoStreams `type:"structure"`
  3081. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  3082. // created by Amazon Cognito.
  3083. IdentityPoolId *string `min:"1" type:"string"`
  3084. // Options to apply to this identity pool for push synchronization.
  3085. PushSync *PushSync `type:"structure"`
  3086. }
  3087. // String returns the string representation
  3088. func (s SetIdentityPoolConfigurationOutput) String() string {
  3089. return awsutil.Prettify(s)
  3090. }
  3091. // GoString returns the string representation
  3092. func (s SetIdentityPoolConfigurationOutput) GoString() string {
  3093. return s.String()
  3094. }
  3095. // SetCognitoStreams sets the CognitoStreams field's value.
  3096. func (s *SetIdentityPoolConfigurationOutput) SetCognitoStreams(v *CognitoStreams) *SetIdentityPoolConfigurationOutput {
  3097. s.CognitoStreams = v
  3098. return s
  3099. }
  3100. // SetIdentityPoolId sets the IdentityPoolId field's value.
  3101. func (s *SetIdentityPoolConfigurationOutput) SetIdentityPoolId(v string) *SetIdentityPoolConfigurationOutput {
  3102. s.IdentityPoolId = &v
  3103. return s
  3104. }
  3105. // SetPushSync sets the PushSync field's value.
  3106. func (s *SetIdentityPoolConfigurationOutput) SetPushSync(v *PushSync) *SetIdentityPoolConfigurationOutput {
  3107. s.PushSync = v
  3108. return s
  3109. }
  3110. // A request to SubscribeToDatasetRequest.
  3111. type SubscribeToDatasetInput struct {
  3112. _ struct{} `type:"structure"`
  3113. // The name of the dataset to subcribe to.
  3114. //
  3115. // DatasetName is a required field
  3116. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  3117. // The unique ID generated for this device by Cognito.
  3118. //
  3119. // DeviceId is a required field
  3120. DeviceId *string `location:"uri" locationName:"DeviceId" min:"1" type:"string" required:"true"`
  3121. // Unique ID for this identity.
  3122. //
  3123. // IdentityId is a required field
  3124. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  3125. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  3126. // created by Amazon Cognito. The ID of the pool to which the identity belongs.
  3127. //
  3128. // IdentityPoolId is a required field
  3129. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  3130. }
  3131. // String returns the string representation
  3132. func (s SubscribeToDatasetInput) String() string {
  3133. return awsutil.Prettify(s)
  3134. }
  3135. // GoString returns the string representation
  3136. func (s SubscribeToDatasetInput) GoString() string {
  3137. return s.String()
  3138. }
  3139. // Validate inspects the fields of the type to determine if they are valid.
  3140. func (s *SubscribeToDatasetInput) Validate() error {
  3141. invalidParams := request.ErrInvalidParams{Context: "SubscribeToDatasetInput"}
  3142. if s.DatasetName == nil {
  3143. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  3144. }
  3145. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  3146. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  3147. }
  3148. if s.DeviceId == nil {
  3149. invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  3150. }
  3151. if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  3152. invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  3153. }
  3154. if s.IdentityId == nil {
  3155. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  3156. }
  3157. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  3158. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  3159. }
  3160. if s.IdentityPoolId == nil {
  3161. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  3162. }
  3163. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  3164. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  3165. }
  3166. if invalidParams.Len() > 0 {
  3167. return invalidParams
  3168. }
  3169. return nil
  3170. }
  3171. // SetDatasetName sets the DatasetName field's value.
  3172. func (s *SubscribeToDatasetInput) SetDatasetName(v string) *SubscribeToDatasetInput {
  3173. s.DatasetName = &v
  3174. return s
  3175. }
  3176. // SetDeviceId sets the DeviceId field's value.
  3177. func (s *SubscribeToDatasetInput) SetDeviceId(v string) *SubscribeToDatasetInput {
  3178. s.DeviceId = &v
  3179. return s
  3180. }
  3181. // SetIdentityId sets the IdentityId field's value.
  3182. func (s *SubscribeToDatasetInput) SetIdentityId(v string) *SubscribeToDatasetInput {
  3183. s.IdentityId = &v
  3184. return s
  3185. }
  3186. // SetIdentityPoolId sets the IdentityPoolId field's value.
  3187. func (s *SubscribeToDatasetInput) SetIdentityPoolId(v string) *SubscribeToDatasetInput {
  3188. s.IdentityPoolId = &v
  3189. return s
  3190. }
  3191. // Response to a SubscribeToDataset request.
  3192. type SubscribeToDatasetOutput struct {
  3193. _ struct{} `type:"structure"`
  3194. }
  3195. // String returns the string representation
  3196. func (s SubscribeToDatasetOutput) String() string {
  3197. return awsutil.Prettify(s)
  3198. }
  3199. // GoString returns the string representation
  3200. func (s SubscribeToDatasetOutput) GoString() string {
  3201. return s.String()
  3202. }
  3203. // A request to UnsubscribeFromDataset.
  3204. type UnsubscribeFromDatasetInput struct {
  3205. _ struct{} `type:"structure"`
  3206. // The name of the dataset from which to unsubcribe.
  3207. //
  3208. // DatasetName is a required field
  3209. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  3210. // The unique ID generated for this device by Cognito.
  3211. //
  3212. // DeviceId is a required field
  3213. DeviceId *string `location:"uri" locationName:"DeviceId" min:"1" type:"string" required:"true"`
  3214. // Unique ID for this identity.
  3215. //
  3216. // IdentityId is a required field
  3217. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  3218. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  3219. // created by Amazon Cognito. The ID of the pool to which this identity belongs.
  3220. //
  3221. // IdentityPoolId is a required field
  3222. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  3223. }
  3224. // String returns the string representation
  3225. func (s UnsubscribeFromDatasetInput) String() string {
  3226. return awsutil.Prettify(s)
  3227. }
  3228. // GoString returns the string representation
  3229. func (s UnsubscribeFromDatasetInput) GoString() string {
  3230. return s.String()
  3231. }
  3232. // Validate inspects the fields of the type to determine if they are valid.
  3233. func (s *UnsubscribeFromDatasetInput) Validate() error {
  3234. invalidParams := request.ErrInvalidParams{Context: "UnsubscribeFromDatasetInput"}
  3235. if s.DatasetName == nil {
  3236. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  3237. }
  3238. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  3239. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  3240. }
  3241. if s.DeviceId == nil {
  3242. invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  3243. }
  3244. if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  3245. invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  3246. }
  3247. if s.IdentityId == nil {
  3248. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  3249. }
  3250. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  3251. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  3252. }
  3253. if s.IdentityPoolId == nil {
  3254. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  3255. }
  3256. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  3257. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  3258. }
  3259. if invalidParams.Len() > 0 {
  3260. return invalidParams
  3261. }
  3262. return nil
  3263. }
  3264. // SetDatasetName sets the DatasetName field's value.
  3265. func (s *UnsubscribeFromDatasetInput) SetDatasetName(v string) *UnsubscribeFromDatasetInput {
  3266. s.DatasetName = &v
  3267. return s
  3268. }
  3269. // SetDeviceId sets the DeviceId field's value.
  3270. func (s *UnsubscribeFromDatasetInput) SetDeviceId(v string) *UnsubscribeFromDatasetInput {
  3271. s.DeviceId = &v
  3272. return s
  3273. }
  3274. // SetIdentityId sets the IdentityId field's value.
  3275. func (s *UnsubscribeFromDatasetInput) SetIdentityId(v string) *UnsubscribeFromDatasetInput {
  3276. s.IdentityId = &v
  3277. return s
  3278. }
  3279. // SetIdentityPoolId sets the IdentityPoolId field's value.
  3280. func (s *UnsubscribeFromDatasetInput) SetIdentityPoolId(v string) *UnsubscribeFromDatasetInput {
  3281. s.IdentityPoolId = &v
  3282. return s
  3283. }
  3284. // Response to an UnsubscribeFromDataset request.
  3285. type UnsubscribeFromDatasetOutput struct {
  3286. _ struct{} `type:"structure"`
  3287. }
  3288. // String returns the string representation
  3289. func (s UnsubscribeFromDatasetOutput) String() string {
  3290. return awsutil.Prettify(s)
  3291. }
  3292. // GoString returns the string representation
  3293. func (s UnsubscribeFromDatasetOutput) GoString() string {
  3294. return s.String()
  3295. }
  3296. // A request to post updates to records or add and delete records for a dataset
  3297. // and user.
  3298. type UpdateRecordsInput struct {
  3299. _ struct{} `type:"structure"`
  3300. // Intended to supply a device ID that will populate the lastModifiedBy field
  3301. // referenced in other methods. The ClientContext field is not yet implemented.
  3302. ClientContext *string `location:"header" locationName:"x-amz-Client-Context" type:"string"`
  3303. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  3304. // (underscore), '-' (dash), and '.' (dot).
  3305. //
  3306. // DatasetName is a required field
  3307. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  3308. // The unique ID generated for this device by Cognito.
  3309. DeviceId *string `min:"1" type:"string"`
  3310. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  3311. // created by Amazon Cognito. GUID generation is unique within a region.
  3312. //
  3313. // IdentityId is a required field
  3314. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  3315. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  3316. // created by Amazon Cognito. GUID generation is unique within a region.
  3317. //
  3318. // IdentityPoolId is a required field
  3319. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  3320. // A list of patch operations.
  3321. RecordPatches []*RecordPatch `type:"list"`
  3322. // The SyncSessionToken returned by a previous call to ListRecords for this
  3323. // dataset and identity.
  3324. //
  3325. // SyncSessionToken is a required field
  3326. SyncSessionToken *string `type:"string" required:"true"`
  3327. }
  3328. // String returns the string representation
  3329. func (s UpdateRecordsInput) String() string {
  3330. return awsutil.Prettify(s)
  3331. }
  3332. // GoString returns the string representation
  3333. func (s UpdateRecordsInput) GoString() string {
  3334. return s.String()
  3335. }
  3336. // Validate inspects the fields of the type to determine if they are valid.
  3337. func (s *UpdateRecordsInput) Validate() error {
  3338. invalidParams := request.ErrInvalidParams{Context: "UpdateRecordsInput"}
  3339. if s.DatasetName == nil {
  3340. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  3341. }
  3342. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  3343. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  3344. }
  3345. if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  3346. invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  3347. }
  3348. if s.IdentityId == nil {
  3349. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  3350. }
  3351. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  3352. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  3353. }
  3354. if s.IdentityPoolId == nil {
  3355. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  3356. }
  3357. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  3358. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  3359. }
  3360. if s.SyncSessionToken == nil {
  3361. invalidParams.Add(request.NewErrParamRequired("SyncSessionToken"))
  3362. }
  3363. if s.RecordPatches != nil {
  3364. for i, v := range s.RecordPatches {
  3365. if v == nil {
  3366. continue
  3367. }
  3368. if err := v.Validate(); err != nil {
  3369. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RecordPatches", i), err.(request.ErrInvalidParams))
  3370. }
  3371. }
  3372. }
  3373. if invalidParams.Len() > 0 {
  3374. return invalidParams
  3375. }
  3376. return nil
  3377. }
  3378. // SetClientContext sets the ClientContext field's value.
  3379. func (s *UpdateRecordsInput) SetClientContext(v string) *UpdateRecordsInput {
  3380. s.ClientContext = &v
  3381. return s
  3382. }
  3383. // SetDatasetName sets the DatasetName field's value.
  3384. func (s *UpdateRecordsInput) SetDatasetName(v string) *UpdateRecordsInput {
  3385. s.DatasetName = &v
  3386. return s
  3387. }
  3388. // SetDeviceId sets the DeviceId field's value.
  3389. func (s *UpdateRecordsInput) SetDeviceId(v string) *UpdateRecordsInput {
  3390. s.DeviceId = &v
  3391. return s
  3392. }
  3393. // SetIdentityId sets the IdentityId field's value.
  3394. func (s *UpdateRecordsInput) SetIdentityId(v string) *UpdateRecordsInput {
  3395. s.IdentityId = &v
  3396. return s
  3397. }
  3398. // SetIdentityPoolId sets the IdentityPoolId field's value.
  3399. func (s *UpdateRecordsInput) SetIdentityPoolId(v string) *UpdateRecordsInput {
  3400. s.IdentityPoolId = &v
  3401. return s
  3402. }
  3403. // SetRecordPatches sets the RecordPatches field's value.
  3404. func (s *UpdateRecordsInput) SetRecordPatches(v []*RecordPatch) *UpdateRecordsInput {
  3405. s.RecordPatches = v
  3406. return s
  3407. }
  3408. // SetSyncSessionToken sets the SyncSessionToken field's value.
  3409. func (s *UpdateRecordsInput) SetSyncSessionToken(v string) *UpdateRecordsInput {
  3410. s.SyncSessionToken = &v
  3411. return s
  3412. }
  3413. // Returned for a successful UpdateRecordsRequest.
  3414. type UpdateRecordsOutput struct {
  3415. _ struct{} `type:"structure"`
  3416. // A list of records that have been updated.
  3417. Records []*Record `type:"list"`
  3418. }
  3419. // String returns the string representation
  3420. func (s UpdateRecordsOutput) String() string {
  3421. return awsutil.Prettify(s)
  3422. }
  3423. // GoString returns the string representation
  3424. func (s UpdateRecordsOutput) GoString() string {
  3425. return s.String()
  3426. }
  3427. // SetRecords sets the Records field's value.
  3428. func (s *UpdateRecordsOutput) SetRecords(v []*Record) *UpdateRecordsOutput {
  3429. s.Records = v
  3430. return s
  3431. }
  3432. const (
  3433. // BulkPublishStatusNotStarted is a BulkPublishStatus enum value
  3434. BulkPublishStatusNotStarted = "NOT_STARTED"
  3435. // BulkPublishStatusInProgress is a BulkPublishStatus enum value
  3436. BulkPublishStatusInProgress = "IN_PROGRESS"
  3437. // BulkPublishStatusFailed is a BulkPublishStatus enum value
  3438. BulkPublishStatusFailed = "FAILED"
  3439. // BulkPublishStatusSucceeded is a BulkPublishStatus enum value
  3440. BulkPublishStatusSucceeded = "SUCCEEDED"
  3441. )
  3442. const (
  3443. // OperationReplace is a Operation enum value
  3444. OperationReplace = "replace"
  3445. // OperationRemove is a Operation enum value
  3446. OperationRemove = "remove"
  3447. )
  3448. const (
  3449. // PlatformApns is a Platform enum value
  3450. PlatformApns = "APNS"
  3451. // PlatformApnsSandbox is a Platform enum value
  3452. PlatformApnsSandbox = "APNS_SANDBOX"
  3453. // PlatformGcm is a Platform enum value
  3454. PlatformGcm = "GCM"
  3455. // PlatformAdm is a Platform enum value
  3456. PlatformAdm = "ADM"
  3457. )
  3458. const (
  3459. // StreamingStatusEnabled is a StreamingStatus enum value
  3460. StreamingStatusEnabled = "ENABLED"
  3461. // StreamingStatusDisabled is a StreamingStatus enum value
  3462. StreamingStatusDisabled = "DISABLED"
  3463. )