api.go 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package cognitosync provides a client for Amazon Cognito Sync.
  3. package cognitosync
  4. import (
  5. "fmt"
  6. "time"
  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 can be used to capture response data after the request's "Send" method
  16. // is called.
  17. //
  18. // Creating a request object using this method should be used when you want to inject
  19. // custom logic into the request's lifecycle using a custom handler, or if you want to
  20. // access properties on the request object before or after sending the request. If
  21. // you just want the service response, call the BulkPublish method directly
  22. // instead.
  23. //
  24. // Note: You must call the "Send" method on the returned request object in order
  25. // to execute the request.
  26. //
  27. // // Example sending a request using the BulkPublishRequest method.
  28. // req, resp := client.BulkPublishRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *CognitoSync) BulkPublishRequest(input *BulkPublishInput) (req *request.Request, output *BulkPublishOutput) {
  36. op := &request.Operation{
  37. Name: opBulkPublish,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/identitypools/{IdentityPoolId}/bulkpublish",
  40. }
  41. if input == nil {
  42. input = &BulkPublishInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &BulkPublishOutput{}
  46. req.Data = output
  47. return
  48. }
  49. // Initiates a bulk publish of all existing datasets for an Identity Pool to
  50. // the configured stream. Customers are limited to one successful bulk publish
  51. // per 24 hours. Bulk publish is an asynchronous request, customers can see
  52. // the status of the request via the GetBulkPublishDetails operation.
  53. //
  54. // This API can only be called with developer credentials. You cannot call
  55. // this API with the temporary user credentials provided by Cognito Identity.
  56. func (c *CognitoSync) BulkPublish(input *BulkPublishInput) (*BulkPublishOutput, error) {
  57. req, out := c.BulkPublishRequest(input)
  58. err := req.Send()
  59. return out, err
  60. }
  61. const opDeleteDataset = "DeleteDataset"
  62. // DeleteDatasetRequest generates a "aws/request.Request" representing the
  63. // client's request for the DeleteDataset operation. The "output" return
  64. // value can be used to capture response data after the request's "Send" method
  65. // is called.
  66. //
  67. // Creating a request object using this method should be used when you want to inject
  68. // custom logic into the request's lifecycle using a custom handler, or if you want to
  69. // access properties on the request object before or after sending the request. If
  70. // you just want the service response, call the DeleteDataset method directly
  71. // instead.
  72. //
  73. // Note: You must call the "Send" method on the returned request object in order
  74. // to execute the request.
  75. //
  76. // // Example sending a request using the DeleteDatasetRequest method.
  77. // req, resp := client.DeleteDatasetRequest(params)
  78. //
  79. // err := req.Send()
  80. // if err == nil { // resp is now filled
  81. // fmt.Println(resp)
  82. // }
  83. //
  84. func (c *CognitoSync) DeleteDatasetRequest(input *DeleteDatasetInput) (req *request.Request, output *DeleteDatasetOutput) {
  85. op := &request.Operation{
  86. Name: opDeleteDataset,
  87. HTTPMethod: "DELETE",
  88. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",
  89. }
  90. if input == nil {
  91. input = &DeleteDatasetInput{}
  92. }
  93. req = c.newRequest(op, input, output)
  94. output = &DeleteDatasetOutput{}
  95. req.Data = output
  96. return
  97. }
  98. // Deletes the specific dataset. The dataset will be deleted permanently, and
  99. // the action can't be undone. Datasets that this dataset was merged with will
  100. // no longer report the merge. Any subsequent operation on this dataset will
  101. // result in a ResourceNotFoundException.
  102. //
  103. // This API can be called with temporary user credentials provided by Cognito
  104. // Identity or with developer credentials.
  105. func (c *CognitoSync) DeleteDataset(input *DeleteDatasetInput) (*DeleteDatasetOutput, error) {
  106. req, out := c.DeleteDatasetRequest(input)
  107. err := req.Send()
  108. return out, err
  109. }
  110. const opDescribeDataset = "DescribeDataset"
  111. // DescribeDatasetRequest generates a "aws/request.Request" representing the
  112. // client's request for the DescribeDataset operation. The "output" return
  113. // value can be used to capture response data after the request's "Send" method
  114. // is called.
  115. //
  116. // Creating a request object using this method should be used when you want to inject
  117. // custom logic into the request's lifecycle using a custom handler, or if you want to
  118. // access properties on the request object before or after sending the request. If
  119. // you just want the service response, call the DescribeDataset method directly
  120. // instead.
  121. //
  122. // Note: You must call the "Send" method on the returned request object in order
  123. // to execute the request.
  124. //
  125. // // Example sending a request using the DescribeDatasetRequest method.
  126. // req, resp := client.DescribeDatasetRequest(params)
  127. //
  128. // err := req.Send()
  129. // if err == nil { // resp is now filled
  130. // fmt.Println(resp)
  131. // }
  132. //
  133. func (c *CognitoSync) DescribeDatasetRequest(input *DescribeDatasetInput) (req *request.Request, output *DescribeDatasetOutput) {
  134. op := &request.Operation{
  135. Name: opDescribeDataset,
  136. HTTPMethod: "GET",
  137. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",
  138. }
  139. if input == nil {
  140. input = &DescribeDatasetInput{}
  141. }
  142. req = c.newRequest(op, input, output)
  143. output = &DescribeDatasetOutput{}
  144. req.Data = output
  145. return
  146. }
  147. // Gets meta data about a dataset by identity and dataset name. With Amazon
  148. // Cognito Sync, each identity has access only to its own data. Thus, the credentials
  149. // used to make this API call need to have access to the identity data.
  150. //
  151. // This API can be called with temporary user credentials provided by Cognito
  152. // Identity or with developer credentials. You should use Cognito Identity credentials
  153. // to make this API call.
  154. func (c *CognitoSync) DescribeDataset(input *DescribeDatasetInput) (*DescribeDatasetOutput, error) {
  155. req, out := c.DescribeDatasetRequest(input)
  156. err := req.Send()
  157. return out, err
  158. }
  159. const opDescribeIdentityPoolUsage = "DescribeIdentityPoolUsage"
  160. // DescribeIdentityPoolUsageRequest generates a "aws/request.Request" representing the
  161. // client's request for the DescribeIdentityPoolUsage operation. The "output" return
  162. // value can be used to capture response data after the request's "Send" method
  163. // is called.
  164. //
  165. // Creating a request object using this method should be used when you want to inject
  166. // custom logic into the request's lifecycle using a custom handler, or if you want to
  167. // access properties on the request object before or after sending the request. If
  168. // you just want the service response, call the DescribeIdentityPoolUsage method directly
  169. // instead.
  170. //
  171. // Note: You must call the "Send" method on the returned request object in order
  172. // to execute the request.
  173. //
  174. // // Example sending a request using the DescribeIdentityPoolUsageRequest method.
  175. // req, resp := client.DescribeIdentityPoolUsageRequest(params)
  176. //
  177. // err := req.Send()
  178. // if err == nil { // resp is now filled
  179. // fmt.Println(resp)
  180. // }
  181. //
  182. func (c *CognitoSync) DescribeIdentityPoolUsageRequest(input *DescribeIdentityPoolUsageInput) (req *request.Request, output *DescribeIdentityPoolUsageOutput) {
  183. op := &request.Operation{
  184. Name: opDescribeIdentityPoolUsage,
  185. HTTPMethod: "GET",
  186. HTTPPath: "/identitypools/{IdentityPoolId}",
  187. }
  188. if input == nil {
  189. input = &DescribeIdentityPoolUsageInput{}
  190. }
  191. req = c.newRequest(op, input, output)
  192. output = &DescribeIdentityPoolUsageOutput{}
  193. req.Data = output
  194. return
  195. }
  196. // Gets usage details (for example, data storage) about a particular identity
  197. // pool.
  198. //
  199. // This API can only be called with developer credentials. You cannot call
  200. // this API with the temporary user credentials provided by Cognito Identity.
  201. func (c *CognitoSync) DescribeIdentityPoolUsage(input *DescribeIdentityPoolUsageInput) (*DescribeIdentityPoolUsageOutput, error) {
  202. req, out := c.DescribeIdentityPoolUsageRequest(input)
  203. err := req.Send()
  204. return out, err
  205. }
  206. const opDescribeIdentityUsage = "DescribeIdentityUsage"
  207. // DescribeIdentityUsageRequest generates a "aws/request.Request" representing the
  208. // client's request for the DescribeIdentityUsage operation. The "output" return
  209. // value can be used to capture response data after the request's "Send" method
  210. // is called.
  211. //
  212. // Creating a request object using this method should be used when you want to inject
  213. // custom logic into the request's lifecycle using a custom handler, or if you want to
  214. // access properties on the request object before or after sending the request. If
  215. // you just want the service response, call the DescribeIdentityUsage method directly
  216. // instead.
  217. //
  218. // Note: You must call the "Send" method on the returned request object in order
  219. // to execute the request.
  220. //
  221. // // Example sending a request using the DescribeIdentityUsageRequest method.
  222. // req, resp := client.DescribeIdentityUsageRequest(params)
  223. //
  224. // err := req.Send()
  225. // if err == nil { // resp is now filled
  226. // fmt.Println(resp)
  227. // }
  228. //
  229. func (c *CognitoSync) DescribeIdentityUsageRequest(input *DescribeIdentityUsageInput) (req *request.Request, output *DescribeIdentityUsageOutput) {
  230. op := &request.Operation{
  231. Name: opDescribeIdentityUsage,
  232. HTTPMethod: "GET",
  233. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}",
  234. }
  235. if input == nil {
  236. input = &DescribeIdentityUsageInput{}
  237. }
  238. req = c.newRequest(op, input, output)
  239. output = &DescribeIdentityUsageOutput{}
  240. req.Data = output
  241. return
  242. }
  243. // Gets usage information for an identity, including number of datasets and
  244. // data usage.
  245. //
  246. // This API can be called with temporary user credentials provided by Cognito
  247. // Identity or with developer credentials.
  248. func (c *CognitoSync) DescribeIdentityUsage(input *DescribeIdentityUsageInput) (*DescribeIdentityUsageOutput, error) {
  249. req, out := c.DescribeIdentityUsageRequest(input)
  250. err := req.Send()
  251. return out, err
  252. }
  253. const opGetBulkPublishDetails = "GetBulkPublishDetails"
  254. // GetBulkPublishDetailsRequest generates a "aws/request.Request" representing the
  255. // client's request for the GetBulkPublishDetails operation. The "output" return
  256. // value can be used to capture response data after the request's "Send" method
  257. // is called.
  258. //
  259. // Creating a request object using this method should be used when you want to inject
  260. // custom logic into the request's lifecycle using a custom handler, or if you want to
  261. // access properties on the request object before or after sending the request. If
  262. // you just want the service response, call the GetBulkPublishDetails method directly
  263. // instead.
  264. //
  265. // Note: You must call the "Send" method on the returned request object in order
  266. // to execute the request.
  267. //
  268. // // Example sending a request using the GetBulkPublishDetailsRequest method.
  269. // req, resp := client.GetBulkPublishDetailsRequest(params)
  270. //
  271. // err := req.Send()
  272. // if err == nil { // resp is now filled
  273. // fmt.Println(resp)
  274. // }
  275. //
  276. func (c *CognitoSync) GetBulkPublishDetailsRequest(input *GetBulkPublishDetailsInput) (req *request.Request, output *GetBulkPublishDetailsOutput) {
  277. op := &request.Operation{
  278. Name: opGetBulkPublishDetails,
  279. HTTPMethod: "POST",
  280. HTTPPath: "/identitypools/{IdentityPoolId}/getBulkPublishDetails",
  281. }
  282. if input == nil {
  283. input = &GetBulkPublishDetailsInput{}
  284. }
  285. req = c.newRequest(op, input, output)
  286. output = &GetBulkPublishDetailsOutput{}
  287. req.Data = output
  288. return
  289. }
  290. // Get the status of the last BulkPublish operation for an identity pool.
  291. //
  292. // This API can only be called with developer credentials. You cannot call
  293. // this API with the temporary user credentials provided by Cognito Identity.
  294. func (c *CognitoSync) GetBulkPublishDetails(input *GetBulkPublishDetailsInput) (*GetBulkPublishDetailsOutput, error) {
  295. req, out := c.GetBulkPublishDetailsRequest(input)
  296. err := req.Send()
  297. return out, err
  298. }
  299. const opGetCognitoEvents = "GetCognitoEvents"
  300. // GetCognitoEventsRequest generates a "aws/request.Request" representing the
  301. // client's request for the GetCognitoEvents operation. The "output" return
  302. // value can be used to capture response data after the request's "Send" method
  303. // is called.
  304. //
  305. // Creating a request object using this method should be used when you want to inject
  306. // custom logic into the request's lifecycle using a custom handler, or if you want to
  307. // access properties on the request object before or after sending the request. If
  308. // you just want the service response, call the GetCognitoEvents method directly
  309. // instead.
  310. //
  311. // Note: You must call the "Send" method on the returned request object in order
  312. // to execute the request.
  313. //
  314. // // Example sending a request using the GetCognitoEventsRequest method.
  315. // req, resp := client.GetCognitoEventsRequest(params)
  316. //
  317. // err := req.Send()
  318. // if err == nil { // resp is now filled
  319. // fmt.Println(resp)
  320. // }
  321. //
  322. func (c *CognitoSync) GetCognitoEventsRequest(input *GetCognitoEventsInput) (req *request.Request, output *GetCognitoEventsOutput) {
  323. op := &request.Operation{
  324. Name: opGetCognitoEvents,
  325. HTTPMethod: "GET",
  326. HTTPPath: "/identitypools/{IdentityPoolId}/events",
  327. }
  328. if input == nil {
  329. input = &GetCognitoEventsInput{}
  330. }
  331. req = c.newRequest(op, input, output)
  332. output = &GetCognitoEventsOutput{}
  333. req.Data = output
  334. return
  335. }
  336. // Gets the events and the corresponding Lambda functions associated with an
  337. // identity pool.
  338. //
  339. // This API can only be called with developer credentials. You cannot call
  340. // this API with the temporary user credentials provided by Cognito Identity.
  341. func (c *CognitoSync) GetCognitoEvents(input *GetCognitoEventsInput) (*GetCognitoEventsOutput, error) {
  342. req, out := c.GetCognitoEventsRequest(input)
  343. err := req.Send()
  344. return out, err
  345. }
  346. const opGetIdentityPoolConfiguration = "GetIdentityPoolConfiguration"
  347. // GetIdentityPoolConfigurationRequest generates a "aws/request.Request" representing the
  348. // client's request for the GetIdentityPoolConfiguration operation. The "output" return
  349. // value can be used to capture response data after the request's "Send" method
  350. // is called.
  351. //
  352. // Creating a request object using this method should be used when you want to inject
  353. // custom logic into the request's lifecycle using a custom handler, or if you want to
  354. // access properties on the request object before or after sending the request. If
  355. // you just want the service response, call the GetIdentityPoolConfiguration method directly
  356. // instead.
  357. //
  358. // Note: You must call the "Send" method on the returned request object in order
  359. // to execute the request.
  360. //
  361. // // Example sending a request using the GetIdentityPoolConfigurationRequest method.
  362. // req, resp := client.GetIdentityPoolConfigurationRequest(params)
  363. //
  364. // err := req.Send()
  365. // if err == nil { // resp is now filled
  366. // fmt.Println(resp)
  367. // }
  368. //
  369. func (c *CognitoSync) GetIdentityPoolConfigurationRequest(input *GetIdentityPoolConfigurationInput) (req *request.Request, output *GetIdentityPoolConfigurationOutput) {
  370. op := &request.Operation{
  371. Name: opGetIdentityPoolConfiguration,
  372. HTTPMethod: "GET",
  373. HTTPPath: "/identitypools/{IdentityPoolId}/configuration",
  374. }
  375. if input == nil {
  376. input = &GetIdentityPoolConfigurationInput{}
  377. }
  378. req = c.newRequest(op, input, output)
  379. output = &GetIdentityPoolConfigurationOutput{}
  380. req.Data = output
  381. return
  382. }
  383. // Gets the configuration settings of an identity pool.
  384. //
  385. // This API can only be called with developer credentials. You cannot call
  386. // this API with the temporary user credentials provided by Cognito Identity.
  387. func (c *CognitoSync) GetIdentityPoolConfiguration(input *GetIdentityPoolConfigurationInput) (*GetIdentityPoolConfigurationOutput, error) {
  388. req, out := c.GetIdentityPoolConfigurationRequest(input)
  389. err := req.Send()
  390. return out, err
  391. }
  392. const opListDatasets = "ListDatasets"
  393. // ListDatasetsRequest generates a "aws/request.Request" representing the
  394. // client's request for the ListDatasets operation. The "output" return
  395. // value can be used to capture response data after the request's "Send" method
  396. // is called.
  397. //
  398. // Creating a request object using this method should be used when you want to inject
  399. // custom logic into the request's lifecycle using a custom handler, or if you want to
  400. // access properties on the request object before or after sending the request. If
  401. // you just want the service response, call the ListDatasets method directly
  402. // instead.
  403. //
  404. // Note: You must call the "Send" method on the returned request object in order
  405. // to execute the request.
  406. //
  407. // // Example sending a request using the ListDatasetsRequest method.
  408. // req, resp := client.ListDatasetsRequest(params)
  409. //
  410. // err := req.Send()
  411. // if err == nil { // resp is now filled
  412. // fmt.Println(resp)
  413. // }
  414. //
  415. func (c *CognitoSync) ListDatasetsRequest(input *ListDatasetsInput) (req *request.Request, output *ListDatasetsOutput) {
  416. op := &request.Operation{
  417. Name: opListDatasets,
  418. HTTPMethod: "GET",
  419. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets",
  420. }
  421. if input == nil {
  422. input = &ListDatasetsInput{}
  423. }
  424. req = c.newRequest(op, input, output)
  425. output = &ListDatasetsOutput{}
  426. req.Data = output
  427. return
  428. }
  429. // Lists datasets for an identity. With Amazon Cognito Sync, each identity has
  430. // access only to its own data. Thus, the credentials used to make this API
  431. // call need to have access to the identity data.
  432. //
  433. // ListDatasets can be called with temporary user credentials provided by Cognito
  434. // Identity or with developer credentials. You should use the Cognito Identity
  435. // credentials to make this API call.
  436. func (c *CognitoSync) ListDatasets(input *ListDatasetsInput) (*ListDatasetsOutput, error) {
  437. req, out := c.ListDatasetsRequest(input)
  438. err := req.Send()
  439. return out, err
  440. }
  441. const opListIdentityPoolUsage = "ListIdentityPoolUsage"
  442. // ListIdentityPoolUsageRequest generates a "aws/request.Request" representing the
  443. // client's request for the ListIdentityPoolUsage operation. The "output" return
  444. // value can be used to capture response data after the request's "Send" method
  445. // is called.
  446. //
  447. // Creating a request object using this method should be used when you want to inject
  448. // custom logic into the request's lifecycle using a custom handler, or if you want to
  449. // access properties on the request object before or after sending the request. If
  450. // you just want the service response, call the ListIdentityPoolUsage method directly
  451. // instead.
  452. //
  453. // Note: You must call the "Send" method on the returned request object in order
  454. // to execute the request.
  455. //
  456. // // Example sending a request using the ListIdentityPoolUsageRequest method.
  457. // req, resp := client.ListIdentityPoolUsageRequest(params)
  458. //
  459. // err := req.Send()
  460. // if err == nil { // resp is now filled
  461. // fmt.Println(resp)
  462. // }
  463. //
  464. func (c *CognitoSync) ListIdentityPoolUsageRequest(input *ListIdentityPoolUsageInput) (req *request.Request, output *ListIdentityPoolUsageOutput) {
  465. op := &request.Operation{
  466. Name: opListIdentityPoolUsage,
  467. HTTPMethod: "GET",
  468. HTTPPath: "/identitypools",
  469. }
  470. if input == nil {
  471. input = &ListIdentityPoolUsageInput{}
  472. }
  473. req = c.newRequest(op, input, output)
  474. output = &ListIdentityPoolUsageOutput{}
  475. req.Data = output
  476. return
  477. }
  478. // Gets a list of identity pools registered with Cognito.
  479. //
  480. // ListIdentityPoolUsage can only be called with developer credentials. You
  481. // cannot make this API call with the temporary user credentials provided by
  482. // Cognito Identity.
  483. func (c *CognitoSync) ListIdentityPoolUsage(input *ListIdentityPoolUsageInput) (*ListIdentityPoolUsageOutput, error) {
  484. req, out := c.ListIdentityPoolUsageRequest(input)
  485. err := req.Send()
  486. return out, err
  487. }
  488. const opListRecords = "ListRecords"
  489. // ListRecordsRequest generates a "aws/request.Request" representing the
  490. // client's request for the ListRecords operation. The "output" return
  491. // value can be used to capture response data after the request's "Send" method
  492. // is called.
  493. //
  494. // Creating a request object using this method should be used when you want to inject
  495. // custom logic into the request's lifecycle using a custom handler, or if you want to
  496. // access properties on the request object before or after sending the request. If
  497. // you just want the service response, call the ListRecords method directly
  498. // instead.
  499. //
  500. // Note: You must call the "Send" method on the returned request object in order
  501. // to execute the request.
  502. //
  503. // // Example sending a request using the ListRecordsRequest method.
  504. // req, resp := client.ListRecordsRequest(params)
  505. //
  506. // err := req.Send()
  507. // if err == nil { // resp is now filled
  508. // fmt.Println(resp)
  509. // }
  510. //
  511. func (c *CognitoSync) ListRecordsRequest(input *ListRecordsInput) (req *request.Request, output *ListRecordsOutput) {
  512. op := &request.Operation{
  513. Name: opListRecords,
  514. HTTPMethod: "GET",
  515. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records",
  516. }
  517. if input == nil {
  518. input = &ListRecordsInput{}
  519. }
  520. req = c.newRequest(op, input, output)
  521. output = &ListRecordsOutput{}
  522. req.Data = output
  523. return
  524. }
  525. // Gets paginated records, optionally changed after a particular sync count
  526. // for a dataset and identity. With Amazon Cognito Sync, each identity has access
  527. // only to its own data. Thus, the credentials used to make this API call need
  528. // to have access to the identity data.
  529. //
  530. // ListRecords can be called with temporary user credentials provided by Cognito
  531. // Identity or with developer credentials. You should use Cognito Identity credentials
  532. // to make this API call.
  533. func (c *CognitoSync) ListRecords(input *ListRecordsInput) (*ListRecordsOutput, error) {
  534. req, out := c.ListRecordsRequest(input)
  535. err := req.Send()
  536. return out, err
  537. }
  538. const opRegisterDevice = "RegisterDevice"
  539. // RegisterDeviceRequest generates a "aws/request.Request" representing the
  540. // client's request for the RegisterDevice operation. The "output" return
  541. // value can be used to capture response data after the request's "Send" method
  542. // is called.
  543. //
  544. // Creating a request object using this method should be used when you want to inject
  545. // custom logic into the request's lifecycle using a custom handler, or if you want to
  546. // access properties on the request object before or after sending the request. If
  547. // you just want the service response, call the RegisterDevice method directly
  548. // instead.
  549. //
  550. // Note: You must call the "Send" method on the returned request object in order
  551. // to execute the request.
  552. //
  553. // // Example sending a request using the RegisterDeviceRequest method.
  554. // req, resp := client.RegisterDeviceRequest(params)
  555. //
  556. // err := req.Send()
  557. // if err == nil { // resp is now filled
  558. // fmt.Println(resp)
  559. // }
  560. //
  561. func (c *CognitoSync) RegisterDeviceRequest(input *RegisterDeviceInput) (req *request.Request, output *RegisterDeviceOutput) {
  562. op := &request.Operation{
  563. Name: opRegisterDevice,
  564. HTTPMethod: "POST",
  565. HTTPPath: "/identitypools/{IdentityPoolId}/identity/{IdentityId}/device",
  566. }
  567. if input == nil {
  568. input = &RegisterDeviceInput{}
  569. }
  570. req = c.newRequest(op, input, output)
  571. output = &RegisterDeviceOutput{}
  572. req.Data = output
  573. return
  574. }
  575. // Registers a device to receive push sync notifications.
  576. //
  577. // This API can only be called with temporary credentials provided by Cognito
  578. // Identity. You cannot call this API with developer credentials.
  579. func (c *CognitoSync) RegisterDevice(input *RegisterDeviceInput) (*RegisterDeviceOutput, error) {
  580. req, out := c.RegisterDeviceRequest(input)
  581. err := req.Send()
  582. return out, err
  583. }
  584. const opSetCognitoEvents = "SetCognitoEvents"
  585. // SetCognitoEventsRequest generates a "aws/request.Request" representing the
  586. // client's request for the SetCognitoEvents operation. The "output" return
  587. // value can be used to capture response data after the request's "Send" method
  588. // is called.
  589. //
  590. // Creating a request object using this method should be used when you want to inject
  591. // custom logic into the request's lifecycle using a custom handler, or if you want to
  592. // access properties on the request object before or after sending the request. If
  593. // you just want the service response, call the SetCognitoEvents method directly
  594. // instead.
  595. //
  596. // Note: You must call the "Send" method on the returned request object in order
  597. // to execute the request.
  598. //
  599. // // Example sending a request using the SetCognitoEventsRequest method.
  600. // req, resp := client.SetCognitoEventsRequest(params)
  601. //
  602. // err := req.Send()
  603. // if err == nil { // resp is now filled
  604. // fmt.Println(resp)
  605. // }
  606. //
  607. func (c *CognitoSync) SetCognitoEventsRequest(input *SetCognitoEventsInput) (req *request.Request, output *SetCognitoEventsOutput) {
  608. op := &request.Operation{
  609. Name: opSetCognitoEvents,
  610. HTTPMethod: "POST",
  611. HTTPPath: "/identitypools/{IdentityPoolId}/events",
  612. }
  613. if input == nil {
  614. input = &SetCognitoEventsInput{}
  615. }
  616. req = c.newRequest(op, input, output)
  617. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  618. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  619. output = &SetCognitoEventsOutput{}
  620. req.Data = output
  621. return
  622. }
  623. // Sets the AWS Lambda function for a given event type for an identity pool.
  624. // This request only updates the key/value pair specified. Other key/values
  625. // pairs are not updated. To remove a key value pair, pass a empty value for
  626. // the particular key.
  627. //
  628. // This API can only be called with developer credentials. You cannot call
  629. // this API with the temporary user credentials provided by Cognito Identity.
  630. func (c *CognitoSync) SetCognitoEvents(input *SetCognitoEventsInput) (*SetCognitoEventsOutput, error) {
  631. req, out := c.SetCognitoEventsRequest(input)
  632. err := req.Send()
  633. return out, err
  634. }
  635. const opSetIdentityPoolConfiguration = "SetIdentityPoolConfiguration"
  636. // SetIdentityPoolConfigurationRequest generates a "aws/request.Request" representing the
  637. // client's request for the SetIdentityPoolConfiguration operation. The "output" return
  638. // value can be used to capture response data after the request's "Send" method
  639. // is called.
  640. //
  641. // Creating a request object using this method should be used when you want to inject
  642. // custom logic into the request's lifecycle using a custom handler, or if you want to
  643. // access properties on the request object before or after sending the request. If
  644. // you just want the service response, call the SetIdentityPoolConfiguration method directly
  645. // instead.
  646. //
  647. // Note: You must call the "Send" method on the returned request object in order
  648. // to execute the request.
  649. //
  650. // // Example sending a request using the SetIdentityPoolConfigurationRequest method.
  651. // req, resp := client.SetIdentityPoolConfigurationRequest(params)
  652. //
  653. // err := req.Send()
  654. // if err == nil { // resp is now filled
  655. // fmt.Println(resp)
  656. // }
  657. //
  658. func (c *CognitoSync) SetIdentityPoolConfigurationRequest(input *SetIdentityPoolConfigurationInput) (req *request.Request, output *SetIdentityPoolConfigurationOutput) {
  659. op := &request.Operation{
  660. Name: opSetIdentityPoolConfiguration,
  661. HTTPMethod: "POST",
  662. HTTPPath: "/identitypools/{IdentityPoolId}/configuration",
  663. }
  664. if input == nil {
  665. input = &SetIdentityPoolConfigurationInput{}
  666. }
  667. req = c.newRequest(op, input, output)
  668. output = &SetIdentityPoolConfigurationOutput{}
  669. req.Data = output
  670. return
  671. }
  672. // Sets the necessary configuration for push sync.
  673. //
  674. // This API can only be called with developer credentials. You cannot call
  675. // this API with the temporary user credentials provided by Cognito Identity.
  676. func (c *CognitoSync) SetIdentityPoolConfiguration(input *SetIdentityPoolConfigurationInput) (*SetIdentityPoolConfigurationOutput, error) {
  677. req, out := c.SetIdentityPoolConfigurationRequest(input)
  678. err := req.Send()
  679. return out, err
  680. }
  681. const opSubscribeToDataset = "SubscribeToDataset"
  682. // SubscribeToDatasetRequest generates a "aws/request.Request" representing the
  683. // client's request for the SubscribeToDataset operation. The "output" return
  684. // value can be used to capture response data after the request's "Send" method
  685. // is called.
  686. //
  687. // Creating a request object using this method should be used when you want to inject
  688. // custom logic into the request's lifecycle using a custom handler, or if you want to
  689. // access properties on the request object before or after sending the request. If
  690. // you just want the service response, call the SubscribeToDataset method directly
  691. // instead.
  692. //
  693. // Note: You must call the "Send" method on the returned request object in order
  694. // to execute the request.
  695. //
  696. // // Example sending a request using the SubscribeToDatasetRequest method.
  697. // req, resp := client.SubscribeToDatasetRequest(params)
  698. //
  699. // err := req.Send()
  700. // if err == nil { // resp is now filled
  701. // fmt.Println(resp)
  702. // }
  703. //
  704. func (c *CognitoSync) SubscribeToDatasetRequest(input *SubscribeToDatasetInput) (req *request.Request, output *SubscribeToDatasetOutput) {
  705. op := &request.Operation{
  706. Name: opSubscribeToDataset,
  707. HTTPMethod: "POST",
  708. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}",
  709. }
  710. if input == nil {
  711. input = &SubscribeToDatasetInput{}
  712. }
  713. req = c.newRequest(op, input, output)
  714. output = &SubscribeToDatasetOutput{}
  715. req.Data = output
  716. return
  717. }
  718. // Subscribes to receive notifications when a dataset is modified by another
  719. // device.
  720. //
  721. // This API can only be called with temporary credentials provided by Cognito
  722. // Identity. You cannot call this API with developer credentials.
  723. func (c *CognitoSync) SubscribeToDataset(input *SubscribeToDatasetInput) (*SubscribeToDatasetOutput, error) {
  724. req, out := c.SubscribeToDatasetRequest(input)
  725. err := req.Send()
  726. return out, err
  727. }
  728. const opUnsubscribeFromDataset = "UnsubscribeFromDataset"
  729. // UnsubscribeFromDatasetRequest generates a "aws/request.Request" representing the
  730. // client's request for the UnsubscribeFromDataset operation. The "output" return
  731. // value can be used to capture response data after the request's "Send" method
  732. // is called.
  733. //
  734. // Creating a request object using this method should be used when you want to inject
  735. // custom logic into the request's lifecycle using a custom handler, or if you want to
  736. // access properties on the request object before or after sending the request. If
  737. // you just want the service response, call the UnsubscribeFromDataset method directly
  738. // instead.
  739. //
  740. // Note: You must call the "Send" method on the returned request object in order
  741. // to execute the request.
  742. //
  743. // // Example sending a request using the UnsubscribeFromDatasetRequest method.
  744. // req, resp := client.UnsubscribeFromDatasetRequest(params)
  745. //
  746. // err := req.Send()
  747. // if err == nil { // resp is now filled
  748. // fmt.Println(resp)
  749. // }
  750. //
  751. func (c *CognitoSync) UnsubscribeFromDatasetRequest(input *UnsubscribeFromDatasetInput) (req *request.Request, output *UnsubscribeFromDatasetOutput) {
  752. op := &request.Operation{
  753. Name: opUnsubscribeFromDataset,
  754. HTTPMethod: "DELETE",
  755. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}",
  756. }
  757. if input == nil {
  758. input = &UnsubscribeFromDatasetInput{}
  759. }
  760. req = c.newRequest(op, input, output)
  761. output = &UnsubscribeFromDatasetOutput{}
  762. req.Data = output
  763. return
  764. }
  765. // Unsubscribes from receiving notifications when a dataset is modified by another
  766. // device.
  767. //
  768. // This API can only be called with temporary credentials provided by Cognito
  769. // Identity. You cannot call this API with developer credentials.
  770. func (c *CognitoSync) UnsubscribeFromDataset(input *UnsubscribeFromDatasetInput) (*UnsubscribeFromDatasetOutput, error) {
  771. req, out := c.UnsubscribeFromDatasetRequest(input)
  772. err := req.Send()
  773. return out, err
  774. }
  775. const opUpdateRecords = "UpdateRecords"
  776. // UpdateRecordsRequest generates a "aws/request.Request" representing the
  777. // client's request for the UpdateRecords operation. The "output" return
  778. // value can be used to capture response data after the request's "Send" method
  779. // is called.
  780. //
  781. // Creating a request object using this method should be used when you want to inject
  782. // custom logic into the request's lifecycle using a custom handler, or if you want to
  783. // access properties on the request object before or after sending the request. If
  784. // you just want the service response, call the UpdateRecords method directly
  785. // instead.
  786. //
  787. // Note: You must call the "Send" method on the returned request object in order
  788. // to execute the request.
  789. //
  790. // // Example sending a request using the UpdateRecordsRequest method.
  791. // req, resp := client.UpdateRecordsRequest(params)
  792. //
  793. // err := req.Send()
  794. // if err == nil { // resp is now filled
  795. // fmt.Println(resp)
  796. // }
  797. //
  798. func (c *CognitoSync) UpdateRecordsRequest(input *UpdateRecordsInput) (req *request.Request, output *UpdateRecordsOutput) {
  799. op := &request.Operation{
  800. Name: opUpdateRecords,
  801. HTTPMethod: "POST",
  802. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",
  803. }
  804. if input == nil {
  805. input = &UpdateRecordsInput{}
  806. }
  807. req = c.newRequest(op, input, output)
  808. output = &UpdateRecordsOutput{}
  809. req.Data = output
  810. return
  811. }
  812. // Posts updates to records and adds and deletes records for a dataset and user.
  813. //
  814. // The sync count in the record patch is your last known sync count for that
  815. // record. The server will reject an UpdateRecords request with a ResourceConflictException
  816. // if you try to patch a record with a new value but a stale sync count.
  817. //
  818. // For example, if the sync count on the server is 5 for a key called highScore
  819. // and you try and submit a new highScore with sync count of 4, the request
  820. // will be rejected. To obtain the current sync count for a record, call ListRecords.
  821. // On a successful update of the record, the response returns the new sync count
  822. // for that record. You should present that sync count the next time you try
  823. // to update that same record. When the record does not exist, specify the sync
  824. // count as 0.
  825. //
  826. // This API can be called with temporary user credentials provided by Cognito
  827. // Identity or with developer credentials.
  828. func (c *CognitoSync) UpdateRecords(input *UpdateRecordsInput) (*UpdateRecordsOutput, error) {
  829. req, out := c.UpdateRecordsRequest(input)
  830. err := req.Send()
  831. return out, err
  832. }
  833. // The input for the BulkPublish operation.
  834. type BulkPublishInput struct {
  835. _ struct{} `type:"structure"`
  836. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  837. // created by Amazon Cognito. GUID generation is unique within a region.
  838. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  839. }
  840. // String returns the string representation
  841. func (s BulkPublishInput) String() string {
  842. return awsutil.Prettify(s)
  843. }
  844. // GoString returns the string representation
  845. func (s BulkPublishInput) GoString() string {
  846. return s.String()
  847. }
  848. // Validate inspects the fields of the type to determine if they are valid.
  849. func (s *BulkPublishInput) Validate() error {
  850. invalidParams := request.ErrInvalidParams{Context: "BulkPublishInput"}
  851. if s.IdentityPoolId == nil {
  852. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  853. }
  854. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  855. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  856. }
  857. if invalidParams.Len() > 0 {
  858. return invalidParams
  859. }
  860. return nil
  861. }
  862. // The output for the BulkPublish operation.
  863. type BulkPublishOutput struct {
  864. _ struct{} `type:"structure"`
  865. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  866. // created by Amazon Cognito. GUID generation is unique within a region.
  867. IdentityPoolId *string `min:"1" type:"string"`
  868. }
  869. // String returns the string representation
  870. func (s BulkPublishOutput) String() string {
  871. return awsutil.Prettify(s)
  872. }
  873. // GoString returns the string representation
  874. func (s BulkPublishOutput) GoString() string {
  875. return s.String()
  876. }
  877. // Configuration options for configure Cognito streams.
  878. type CognitoStreams struct {
  879. _ struct{} `type:"structure"`
  880. // The ARN of the role Amazon Cognito can assume in order to publish to the
  881. // stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke
  882. // PutRecord on your Cognito stream.
  883. RoleArn *string `min:"20" type:"string"`
  884. // The name of the Cognito stream to receive updates. This stream must be in
  885. // the developers account and in the same region as the identity pool.
  886. StreamName *string `min:"1" type:"string"`
  887. // Status of the Cognito streams. Valid values are: ENABLED - Streaming of updates
  888. // to identity pool is enabled.
  889. //
  890. // DISABLED - Streaming of updates to identity pool is disabled. Bulk publish
  891. // will also fail if StreamingStatus is DISABLED.
  892. StreamingStatus *string `type:"string" enum:"StreamingStatus"`
  893. }
  894. // String returns the string representation
  895. func (s CognitoStreams) String() string {
  896. return awsutil.Prettify(s)
  897. }
  898. // GoString returns the string representation
  899. func (s CognitoStreams) GoString() string {
  900. return s.String()
  901. }
  902. // Validate inspects the fields of the type to determine if they are valid.
  903. func (s *CognitoStreams) Validate() error {
  904. invalidParams := request.ErrInvalidParams{Context: "CognitoStreams"}
  905. if s.RoleArn != nil && len(*s.RoleArn) < 20 {
  906. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
  907. }
  908. if s.StreamName != nil && len(*s.StreamName) < 1 {
  909. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  910. }
  911. if invalidParams.Len() > 0 {
  912. return invalidParams
  913. }
  914. return nil
  915. }
  916. // A collection of data for an identity pool. An identity pool can have multiple
  917. // datasets. A dataset is per identity and can be general or associated with
  918. // a particular entity in an application (like a saved game). Datasets are automatically
  919. // created if they don't exist. Data is synced by dataset, and a dataset can
  920. // hold up to 1MB of key-value pairs.
  921. type Dataset struct {
  922. _ struct{} `type:"structure"`
  923. // Date on which the dataset was created.
  924. CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  925. // Total size in bytes of the records in this dataset.
  926. DataStorage *int64 `type:"long"`
  927. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  928. // (underscore), '-' (dash), and '.' (dot).
  929. DatasetName *string `min:"1" type:"string"`
  930. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  931. // created by Amazon Cognito. GUID generation is unique within a region.
  932. IdentityId *string `min:"1" type:"string"`
  933. // The device that made the last change to this dataset.
  934. LastModifiedBy *string `type:"string"`
  935. // Date when the dataset was last modified.
  936. LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  937. // Number of records in this dataset.
  938. NumRecords *int64 `type:"long"`
  939. }
  940. // String returns the string representation
  941. func (s Dataset) String() string {
  942. return awsutil.Prettify(s)
  943. }
  944. // GoString returns the string representation
  945. func (s Dataset) GoString() string {
  946. return s.String()
  947. }
  948. // A request to delete the specific dataset.
  949. type DeleteDatasetInput struct {
  950. _ struct{} `type:"structure"`
  951. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  952. // (underscore), '-' (dash), and '.' (dot).
  953. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  954. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  955. // created by Amazon Cognito. GUID generation is unique within a region.
  956. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  957. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  958. // created by Amazon Cognito. GUID generation is unique within a region.
  959. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  960. }
  961. // String returns the string representation
  962. func (s DeleteDatasetInput) String() string {
  963. return awsutil.Prettify(s)
  964. }
  965. // GoString returns the string representation
  966. func (s DeleteDatasetInput) GoString() string {
  967. return s.String()
  968. }
  969. // Validate inspects the fields of the type to determine if they are valid.
  970. func (s *DeleteDatasetInput) Validate() error {
  971. invalidParams := request.ErrInvalidParams{Context: "DeleteDatasetInput"}
  972. if s.DatasetName == nil {
  973. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  974. }
  975. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  976. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  977. }
  978. if s.IdentityId == nil {
  979. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  980. }
  981. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  982. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  983. }
  984. if s.IdentityPoolId == nil {
  985. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  986. }
  987. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  988. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  989. }
  990. if invalidParams.Len() > 0 {
  991. return invalidParams
  992. }
  993. return nil
  994. }
  995. // Response to a successful DeleteDataset request.
  996. type DeleteDatasetOutput struct {
  997. _ struct{} `type:"structure"`
  998. // A collection of data for an identity pool. An identity pool can have multiple
  999. // datasets. A dataset is per identity and can be general or associated with
  1000. // a particular entity in an application (like a saved game). Datasets are automatically
  1001. // created if they don't exist. Data is synced by dataset, and a dataset can
  1002. // hold up to 1MB of key-value pairs.
  1003. Dataset *Dataset `type:"structure"`
  1004. }
  1005. // String returns the string representation
  1006. func (s DeleteDatasetOutput) String() string {
  1007. return awsutil.Prettify(s)
  1008. }
  1009. // GoString returns the string representation
  1010. func (s DeleteDatasetOutput) GoString() string {
  1011. return s.String()
  1012. }
  1013. // A request for meta data about a dataset (creation date, number of records,
  1014. // size) by owner and dataset name.
  1015. type DescribeDatasetInput struct {
  1016. _ struct{} `type:"structure"`
  1017. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  1018. // (underscore), '-' (dash), and '.' (dot).
  1019. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  1020. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1021. // created by Amazon Cognito. GUID generation is unique within a region.
  1022. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1023. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1024. // created by Amazon Cognito. GUID generation is unique within a region.
  1025. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1026. }
  1027. // String returns the string representation
  1028. func (s DescribeDatasetInput) String() string {
  1029. return awsutil.Prettify(s)
  1030. }
  1031. // GoString returns the string representation
  1032. func (s DescribeDatasetInput) GoString() string {
  1033. return s.String()
  1034. }
  1035. // Validate inspects the fields of the type to determine if they are valid.
  1036. func (s *DescribeDatasetInput) Validate() error {
  1037. invalidParams := request.ErrInvalidParams{Context: "DescribeDatasetInput"}
  1038. if s.DatasetName == nil {
  1039. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  1040. }
  1041. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  1042. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  1043. }
  1044. if s.IdentityId == nil {
  1045. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1046. }
  1047. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1048. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1049. }
  1050. if s.IdentityPoolId == nil {
  1051. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1052. }
  1053. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1054. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1055. }
  1056. if invalidParams.Len() > 0 {
  1057. return invalidParams
  1058. }
  1059. return nil
  1060. }
  1061. // Response to a successful DescribeDataset request.
  1062. type DescribeDatasetOutput struct {
  1063. _ struct{} `type:"structure"`
  1064. // Meta data for a collection of data for an identity. An identity can have
  1065. // multiple datasets. A dataset can be general or associated with a particular
  1066. // entity in an application (like a saved game). Datasets are automatically
  1067. // created if they don't exist. Data is synced by dataset, and a dataset can
  1068. // hold up to 1MB of key-value pairs.
  1069. Dataset *Dataset `type:"structure"`
  1070. }
  1071. // String returns the string representation
  1072. func (s DescribeDatasetOutput) String() string {
  1073. return awsutil.Prettify(s)
  1074. }
  1075. // GoString returns the string representation
  1076. func (s DescribeDatasetOutput) GoString() string {
  1077. return s.String()
  1078. }
  1079. // A request for usage information about the identity pool.
  1080. type DescribeIdentityPoolUsageInput struct {
  1081. _ struct{} `type:"structure"`
  1082. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1083. // created by Amazon Cognito. GUID generation is unique within a region.
  1084. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1085. }
  1086. // String returns the string representation
  1087. func (s DescribeIdentityPoolUsageInput) String() string {
  1088. return awsutil.Prettify(s)
  1089. }
  1090. // GoString returns the string representation
  1091. func (s DescribeIdentityPoolUsageInput) GoString() string {
  1092. return s.String()
  1093. }
  1094. // Validate inspects the fields of the type to determine if they are valid.
  1095. func (s *DescribeIdentityPoolUsageInput) Validate() error {
  1096. invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityPoolUsageInput"}
  1097. if s.IdentityPoolId == nil {
  1098. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1099. }
  1100. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1101. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1102. }
  1103. if invalidParams.Len() > 0 {
  1104. return invalidParams
  1105. }
  1106. return nil
  1107. }
  1108. // Response to a successful DescribeIdentityPoolUsage request.
  1109. type DescribeIdentityPoolUsageOutput struct {
  1110. _ struct{} `type:"structure"`
  1111. // Information about the usage of the identity pool.
  1112. IdentityPoolUsage *IdentityPoolUsage `type:"structure"`
  1113. }
  1114. // String returns the string representation
  1115. func (s DescribeIdentityPoolUsageOutput) String() string {
  1116. return awsutil.Prettify(s)
  1117. }
  1118. // GoString returns the string representation
  1119. func (s DescribeIdentityPoolUsageOutput) GoString() string {
  1120. return s.String()
  1121. }
  1122. // A request for information about the usage of an identity pool.
  1123. type DescribeIdentityUsageInput struct {
  1124. _ struct{} `type:"structure"`
  1125. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1126. // created by Amazon Cognito. GUID generation is unique within a region.
  1127. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1128. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1129. // created by Amazon Cognito. GUID generation is unique within a region.
  1130. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1131. }
  1132. // String returns the string representation
  1133. func (s DescribeIdentityUsageInput) String() string {
  1134. return awsutil.Prettify(s)
  1135. }
  1136. // GoString returns the string representation
  1137. func (s DescribeIdentityUsageInput) GoString() string {
  1138. return s.String()
  1139. }
  1140. // Validate inspects the fields of the type to determine if they are valid.
  1141. func (s *DescribeIdentityUsageInput) Validate() error {
  1142. invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityUsageInput"}
  1143. if s.IdentityId == nil {
  1144. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1145. }
  1146. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1147. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1148. }
  1149. if s.IdentityPoolId == nil {
  1150. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1151. }
  1152. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1153. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1154. }
  1155. if invalidParams.Len() > 0 {
  1156. return invalidParams
  1157. }
  1158. return nil
  1159. }
  1160. // The response to a successful DescribeIdentityUsage request.
  1161. type DescribeIdentityUsageOutput struct {
  1162. _ struct{} `type:"structure"`
  1163. // Usage information for the identity.
  1164. IdentityUsage *IdentityUsage `type:"structure"`
  1165. }
  1166. // String returns the string representation
  1167. func (s DescribeIdentityUsageOutput) String() string {
  1168. return awsutil.Prettify(s)
  1169. }
  1170. // GoString returns the string representation
  1171. func (s DescribeIdentityUsageOutput) GoString() string {
  1172. return s.String()
  1173. }
  1174. // The input for the GetBulkPublishDetails operation.
  1175. type GetBulkPublishDetailsInput struct {
  1176. _ struct{} `type:"structure"`
  1177. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1178. // created by Amazon Cognito. GUID generation is unique within a region.
  1179. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1180. }
  1181. // String returns the string representation
  1182. func (s GetBulkPublishDetailsInput) String() string {
  1183. return awsutil.Prettify(s)
  1184. }
  1185. // GoString returns the string representation
  1186. func (s GetBulkPublishDetailsInput) GoString() string {
  1187. return s.String()
  1188. }
  1189. // Validate inspects the fields of the type to determine if they are valid.
  1190. func (s *GetBulkPublishDetailsInput) Validate() error {
  1191. invalidParams := request.ErrInvalidParams{Context: "GetBulkPublishDetailsInput"}
  1192. if s.IdentityPoolId == nil {
  1193. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1194. }
  1195. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1196. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1197. }
  1198. if invalidParams.Len() > 0 {
  1199. return invalidParams
  1200. }
  1201. return nil
  1202. }
  1203. // The output for the GetBulkPublishDetails operation.
  1204. type GetBulkPublishDetailsOutput struct {
  1205. _ struct{} `type:"structure"`
  1206. // If BulkPublishStatus is SUCCEEDED, the time the last bulk publish operation
  1207. // completed.
  1208. BulkPublishCompleteTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1209. // The date/time at which the last bulk publish was initiated.
  1210. BulkPublishStartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1211. // Status of the last bulk publish operation, valid values are: NOT_STARTED
  1212. // - No bulk publish has been requested for this identity pool
  1213. //
  1214. // IN_PROGRESS - Data is being published to the configured stream
  1215. //
  1216. // SUCCEEDED - All data for the identity pool has been published to the configured
  1217. // stream
  1218. //
  1219. // FAILED - Some portion of the data has failed to publish, check FailureMessage
  1220. // for the cause.
  1221. BulkPublishStatus *string `type:"string" enum:"BulkPublishStatus"`
  1222. // If BulkPublishStatus is FAILED this field will contain the error message
  1223. // that caused the bulk publish to fail.
  1224. FailureMessage *string `type:"string"`
  1225. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1226. // created by Amazon Cognito. GUID generation is unique within a region.
  1227. IdentityPoolId *string `min:"1" type:"string"`
  1228. }
  1229. // String returns the string representation
  1230. func (s GetBulkPublishDetailsOutput) String() string {
  1231. return awsutil.Prettify(s)
  1232. }
  1233. // GoString returns the string representation
  1234. func (s GetBulkPublishDetailsOutput) GoString() string {
  1235. return s.String()
  1236. }
  1237. // A request for a list of the configured Cognito Events
  1238. type GetCognitoEventsInput struct {
  1239. _ struct{} `type:"structure"`
  1240. // The Cognito Identity Pool ID for the request
  1241. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1242. }
  1243. // String returns the string representation
  1244. func (s GetCognitoEventsInput) String() string {
  1245. return awsutil.Prettify(s)
  1246. }
  1247. // GoString returns the string representation
  1248. func (s GetCognitoEventsInput) GoString() string {
  1249. return s.String()
  1250. }
  1251. // Validate inspects the fields of the type to determine if they are valid.
  1252. func (s *GetCognitoEventsInput) Validate() error {
  1253. invalidParams := request.ErrInvalidParams{Context: "GetCognitoEventsInput"}
  1254. if s.IdentityPoolId == nil {
  1255. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1256. }
  1257. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1258. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1259. }
  1260. if invalidParams.Len() > 0 {
  1261. return invalidParams
  1262. }
  1263. return nil
  1264. }
  1265. // The response from the GetCognitoEvents request
  1266. type GetCognitoEventsOutput struct {
  1267. _ struct{} `type:"structure"`
  1268. // The Cognito Events returned from the GetCognitoEvents request
  1269. Events map[string]*string `type:"map"`
  1270. }
  1271. // String returns the string representation
  1272. func (s GetCognitoEventsOutput) String() string {
  1273. return awsutil.Prettify(s)
  1274. }
  1275. // GoString returns the string representation
  1276. func (s GetCognitoEventsOutput) GoString() string {
  1277. return s.String()
  1278. }
  1279. // The input for the GetIdentityPoolConfiguration operation.
  1280. type GetIdentityPoolConfigurationInput struct {
  1281. _ struct{} `type:"structure"`
  1282. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1283. // created by Amazon Cognito. This is the ID of the pool for which to return
  1284. // a configuration.
  1285. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1286. }
  1287. // String returns the string representation
  1288. func (s GetIdentityPoolConfigurationInput) String() string {
  1289. return awsutil.Prettify(s)
  1290. }
  1291. // GoString returns the string representation
  1292. func (s GetIdentityPoolConfigurationInput) GoString() string {
  1293. return s.String()
  1294. }
  1295. // Validate inspects the fields of the type to determine if they are valid.
  1296. func (s *GetIdentityPoolConfigurationInput) Validate() error {
  1297. invalidParams := request.ErrInvalidParams{Context: "GetIdentityPoolConfigurationInput"}
  1298. if s.IdentityPoolId == nil {
  1299. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1300. }
  1301. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1302. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1303. }
  1304. if invalidParams.Len() > 0 {
  1305. return invalidParams
  1306. }
  1307. return nil
  1308. }
  1309. // The output for the GetIdentityPoolConfiguration operation.
  1310. type GetIdentityPoolConfigurationOutput struct {
  1311. _ struct{} `type:"structure"`
  1312. // Options to apply to this identity pool for Amazon Cognito streams.
  1313. CognitoStreams *CognitoStreams `type:"structure"`
  1314. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1315. // created by Amazon Cognito.
  1316. IdentityPoolId *string `min:"1" type:"string"`
  1317. // Options to apply to this identity pool for push synchronization.
  1318. PushSync *PushSync `type:"structure"`
  1319. }
  1320. // String returns the string representation
  1321. func (s GetIdentityPoolConfigurationOutput) String() string {
  1322. return awsutil.Prettify(s)
  1323. }
  1324. // GoString returns the string representation
  1325. func (s GetIdentityPoolConfigurationOutput) GoString() string {
  1326. return s.String()
  1327. }
  1328. // Usage information for the identity pool.
  1329. type IdentityPoolUsage struct {
  1330. _ struct{} `type:"structure"`
  1331. // Data storage information for the identity pool.
  1332. DataStorage *int64 `type:"long"`
  1333. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1334. // created by Amazon Cognito. GUID generation is unique within a region.
  1335. IdentityPoolId *string `min:"1" type:"string"`
  1336. // Date on which the identity pool was last modified.
  1337. LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1338. // Number of sync sessions for the identity pool.
  1339. SyncSessionsCount *int64 `type:"long"`
  1340. }
  1341. // String returns the string representation
  1342. func (s IdentityPoolUsage) String() string {
  1343. return awsutil.Prettify(s)
  1344. }
  1345. // GoString returns the string representation
  1346. func (s IdentityPoolUsage) GoString() string {
  1347. return s.String()
  1348. }
  1349. // Usage information for the identity.
  1350. type IdentityUsage struct {
  1351. _ struct{} `type:"structure"`
  1352. // Total data storage for this identity.
  1353. DataStorage *int64 `type:"long"`
  1354. // Number of datasets for the identity.
  1355. DatasetCount *int64 `type:"integer"`
  1356. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1357. // created by Amazon Cognito. GUID generation is unique within a region.
  1358. IdentityId *string `min:"1" type:"string"`
  1359. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1360. // created by Amazon Cognito. GUID generation is unique within a region.
  1361. IdentityPoolId *string `min:"1" type:"string"`
  1362. // Date on which the identity was last modified.
  1363. LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1364. }
  1365. // String returns the string representation
  1366. func (s IdentityUsage) String() string {
  1367. return awsutil.Prettify(s)
  1368. }
  1369. // GoString returns the string representation
  1370. func (s IdentityUsage) GoString() string {
  1371. return s.String()
  1372. }
  1373. // Request for a list of datasets for an identity.
  1374. type ListDatasetsInput struct {
  1375. _ struct{} `type:"structure"`
  1376. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1377. // created by Amazon Cognito. GUID generation is unique within a region.
  1378. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1379. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1380. // created by Amazon Cognito. GUID generation is unique within a region.
  1381. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1382. // The maximum number of results to be returned.
  1383. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  1384. // A pagination token for obtaining the next page of results.
  1385. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  1386. }
  1387. // String returns the string representation
  1388. func (s ListDatasetsInput) String() string {
  1389. return awsutil.Prettify(s)
  1390. }
  1391. // GoString returns the string representation
  1392. func (s ListDatasetsInput) GoString() string {
  1393. return s.String()
  1394. }
  1395. // Validate inspects the fields of the type to determine if they are valid.
  1396. func (s *ListDatasetsInput) Validate() error {
  1397. invalidParams := request.ErrInvalidParams{Context: "ListDatasetsInput"}
  1398. if s.IdentityId == nil {
  1399. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1400. }
  1401. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1402. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1403. }
  1404. if s.IdentityPoolId == nil {
  1405. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1406. }
  1407. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1408. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1409. }
  1410. if invalidParams.Len() > 0 {
  1411. return invalidParams
  1412. }
  1413. return nil
  1414. }
  1415. // Returned for a successful ListDatasets request.
  1416. type ListDatasetsOutput struct {
  1417. _ struct{} `type:"structure"`
  1418. // Number of datasets returned.
  1419. Count *int64 `type:"integer"`
  1420. // A set of datasets.
  1421. Datasets []*Dataset `type:"list"`
  1422. // A pagination token for obtaining the next page of results.
  1423. NextToken *string `type:"string"`
  1424. }
  1425. // String returns the string representation
  1426. func (s ListDatasetsOutput) String() string {
  1427. return awsutil.Prettify(s)
  1428. }
  1429. // GoString returns the string representation
  1430. func (s ListDatasetsOutput) GoString() string {
  1431. return s.String()
  1432. }
  1433. // A request for usage information on an identity pool.
  1434. type ListIdentityPoolUsageInput struct {
  1435. _ struct{} `type:"structure"`
  1436. // The maximum number of results to be returned.
  1437. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  1438. // A pagination token for obtaining the next page of results.
  1439. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  1440. }
  1441. // String returns the string representation
  1442. func (s ListIdentityPoolUsageInput) String() string {
  1443. return awsutil.Prettify(s)
  1444. }
  1445. // GoString returns the string representation
  1446. func (s ListIdentityPoolUsageInput) GoString() string {
  1447. return s.String()
  1448. }
  1449. // Returned for a successful ListIdentityPoolUsage request.
  1450. type ListIdentityPoolUsageOutput struct {
  1451. _ struct{} `type:"structure"`
  1452. // Total number of identities for the identity pool.
  1453. Count *int64 `type:"integer"`
  1454. // Usage information for the identity pools.
  1455. IdentityPoolUsages []*IdentityPoolUsage `type:"list"`
  1456. // The maximum number of results to be returned.
  1457. MaxResults *int64 `type:"integer"`
  1458. // A pagination token for obtaining the next page of results.
  1459. NextToken *string `type:"string"`
  1460. }
  1461. // String returns the string representation
  1462. func (s ListIdentityPoolUsageOutput) String() string {
  1463. return awsutil.Prettify(s)
  1464. }
  1465. // GoString returns the string representation
  1466. func (s ListIdentityPoolUsageOutput) GoString() string {
  1467. return s.String()
  1468. }
  1469. // A request for a list of records.
  1470. type ListRecordsInput struct {
  1471. _ struct{} `type:"structure"`
  1472. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  1473. // (underscore), '-' (dash), and '.' (dot).
  1474. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  1475. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1476. // created by Amazon Cognito. GUID generation is unique within a region.
  1477. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1478. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1479. // created by Amazon Cognito. GUID generation is unique within a region.
  1480. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1481. // The last server sync count for this record.
  1482. LastSyncCount *int64 `location:"querystring" locationName:"lastSyncCount" type:"long"`
  1483. // The maximum number of results to be returned.
  1484. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  1485. // A pagination token for obtaining the next page of results.
  1486. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  1487. // A token containing a session ID, identity ID, and expiration.
  1488. SyncSessionToken *string `location:"querystring" locationName:"syncSessionToken" type:"string"`
  1489. }
  1490. // String returns the string representation
  1491. func (s ListRecordsInput) String() string {
  1492. return awsutil.Prettify(s)
  1493. }
  1494. // GoString returns the string representation
  1495. func (s ListRecordsInput) GoString() string {
  1496. return s.String()
  1497. }
  1498. // Validate inspects the fields of the type to determine if they are valid.
  1499. func (s *ListRecordsInput) Validate() error {
  1500. invalidParams := request.ErrInvalidParams{Context: "ListRecordsInput"}
  1501. if s.DatasetName == nil {
  1502. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  1503. }
  1504. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  1505. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  1506. }
  1507. if s.IdentityId == nil {
  1508. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1509. }
  1510. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1511. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1512. }
  1513. if s.IdentityPoolId == nil {
  1514. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1515. }
  1516. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1517. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1518. }
  1519. if invalidParams.Len() > 0 {
  1520. return invalidParams
  1521. }
  1522. return nil
  1523. }
  1524. // Returned for a successful ListRecordsRequest.
  1525. type ListRecordsOutput struct {
  1526. _ struct{} `type:"structure"`
  1527. // Total number of records.
  1528. Count *int64 `type:"integer"`
  1529. // A boolean value specifying whether to delete the dataset locally.
  1530. DatasetDeletedAfterRequestedSyncCount *bool `type:"boolean"`
  1531. // Indicates whether the dataset exists.
  1532. DatasetExists *bool `type:"boolean"`
  1533. // Server sync count for this dataset.
  1534. DatasetSyncCount *int64 `type:"long"`
  1535. // The user/device that made the last change to this record.
  1536. LastModifiedBy *string `type:"string"`
  1537. // Names of merged datasets.
  1538. MergedDatasetNames []*string `type:"list"`
  1539. // A pagination token for obtaining the next page of results.
  1540. NextToken *string `type:"string"`
  1541. // A list of all records.
  1542. Records []*Record `type:"list"`
  1543. // A token containing a session ID, identity ID, and expiration.
  1544. SyncSessionToken *string `type:"string"`
  1545. }
  1546. // String returns the string representation
  1547. func (s ListRecordsOutput) String() string {
  1548. return awsutil.Prettify(s)
  1549. }
  1550. // GoString returns the string representation
  1551. func (s ListRecordsOutput) GoString() string {
  1552. return s.String()
  1553. }
  1554. // Configuration options to be applied to the identity pool.
  1555. type PushSync struct {
  1556. _ struct{} `type:"structure"`
  1557. // List of SNS platform application ARNs that could be used by clients.
  1558. ApplicationArns []*string `type:"list"`
  1559. // A role configured to allow Cognito to call SNS on behalf of the developer.
  1560. RoleArn *string `min:"20" type:"string"`
  1561. }
  1562. // String returns the string representation
  1563. func (s PushSync) String() string {
  1564. return awsutil.Prettify(s)
  1565. }
  1566. // GoString returns the string representation
  1567. func (s PushSync) GoString() string {
  1568. return s.String()
  1569. }
  1570. // Validate inspects the fields of the type to determine if they are valid.
  1571. func (s *PushSync) Validate() error {
  1572. invalidParams := request.ErrInvalidParams{Context: "PushSync"}
  1573. if s.RoleArn != nil && len(*s.RoleArn) < 20 {
  1574. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
  1575. }
  1576. if invalidParams.Len() > 0 {
  1577. return invalidParams
  1578. }
  1579. return nil
  1580. }
  1581. // The basic data structure of a dataset.
  1582. type Record struct {
  1583. _ struct{} `type:"structure"`
  1584. // The last modified date of the client device.
  1585. DeviceLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1586. // The key for the record.
  1587. Key *string `min:"1" type:"string"`
  1588. // The user/device that made the last change to this record.
  1589. LastModifiedBy *string `type:"string"`
  1590. // The date on which the record was last modified.
  1591. LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1592. // The server sync count for this record.
  1593. SyncCount *int64 `type:"long"`
  1594. // The value for the record.
  1595. Value *string `type:"string"`
  1596. }
  1597. // String returns the string representation
  1598. func (s Record) String() string {
  1599. return awsutil.Prettify(s)
  1600. }
  1601. // GoString returns the string representation
  1602. func (s Record) GoString() string {
  1603. return s.String()
  1604. }
  1605. // An update operation for a record.
  1606. type RecordPatch struct {
  1607. _ struct{} `type:"structure"`
  1608. // The last modified date of the client device.
  1609. DeviceLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1610. // The key associated with the record patch.
  1611. Key *string `min:"1" type:"string" required:"true"`
  1612. // An operation, either replace or remove.
  1613. Op *string `type:"string" required:"true" enum:"Operation"`
  1614. // Last known server sync count for this record. Set to 0 if unknown.
  1615. SyncCount *int64 `type:"long" required:"true"`
  1616. // The value associated with the record patch.
  1617. Value *string `type:"string"`
  1618. }
  1619. // String returns the string representation
  1620. func (s RecordPatch) String() string {
  1621. return awsutil.Prettify(s)
  1622. }
  1623. // GoString returns the string representation
  1624. func (s RecordPatch) GoString() string {
  1625. return s.String()
  1626. }
  1627. // Validate inspects the fields of the type to determine if they are valid.
  1628. func (s *RecordPatch) Validate() error {
  1629. invalidParams := request.ErrInvalidParams{Context: "RecordPatch"}
  1630. if s.Key == nil {
  1631. invalidParams.Add(request.NewErrParamRequired("Key"))
  1632. }
  1633. if s.Key != nil && len(*s.Key) < 1 {
  1634. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  1635. }
  1636. if s.Op == nil {
  1637. invalidParams.Add(request.NewErrParamRequired("Op"))
  1638. }
  1639. if s.SyncCount == nil {
  1640. invalidParams.Add(request.NewErrParamRequired("SyncCount"))
  1641. }
  1642. if invalidParams.Len() > 0 {
  1643. return invalidParams
  1644. }
  1645. return nil
  1646. }
  1647. // A request to RegisterDevice.
  1648. type RegisterDeviceInput struct {
  1649. _ struct{} `type:"structure"`
  1650. // The unique ID for this identity.
  1651. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1652. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1653. // created by Amazon Cognito. Here, the ID of the pool that the identity belongs
  1654. // to.
  1655. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1656. // The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).
  1657. Platform *string `type:"string" required:"true" enum:"Platform"`
  1658. // The push token.
  1659. Token *string `type:"string" required:"true"`
  1660. }
  1661. // String returns the string representation
  1662. func (s RegisterDeviceInput) String() string {
  1663. return awsutil.Prettify(s)
  1664. }
  1665. // GoString returns the string representation
  1666. func (s RegisterDeviceInput) GoString() string {
  1667. return s.String()
  1668. }
  1669. // Validate inspects the fields of the type to determine if they are valid.
  1670. func (s *RegisterDeviceInput) Validate() error {
  1671. invalidParams := request.ErrInvalidParams{Context: "RegisterDeviceInput"}
  1672. if s.IdentityId == nil {
  1673. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1674. }
  1675. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1676. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1677. }
  1678. if s.IdentityPoolId == nil {
  1679. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1680. }
  1681. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1682. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1683. }
  1684. if s.Platform == nil {
  1685. invalidParams.Add(request.NewErrParamRequired("Platform"))
  1686. }
  1687. if s.Token == nil {
  1688. invalidParams.Add(request.NewErrParamRequired("Token"))
  1689. }
  1690. if invalidParams.Len() > 0 {
  1691. return invalidParams
  1692. }
  1693. return nil
  1694. }
  1695. // Response to a RegisterDevice request.
  1696. type RegisterDeviceOutput struct {
  1697. _ struct{} `type:"structure"`
  1698. // The unique ID generated for this device by Cognito.
  1699. DeviceId *string `min:"1" type:"string"`
  1700. }
  1701. // String returns the string representation
  1702. func (s RegisterDeviceOutput) String() string {
  1703. return awsutil.Prettify(s)
  1704. }
  1705. // GoString returns the string representation
  1706. func (s RegisterDeviceOutput) GoString() string {
  1707. return s.String()
  1708. }
  1709. // A request to configure Cognito Events"
  1710. //
  1711. // "
  1712. type SetCognitoEventsInput struct {
  1713. _ struct{} `type:"structure"`
  1714. // The events to configure
  1715. Events map[string]*string `type:"map" required:"true"`
  1716. // The Cognito Identity Pool to use when configuring Cognito Events
  1717. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1718. }
  1719. // String returns the string representation
  1720. func (s SetCognitoEventsInput) String() string {
  1721. return awsutil.Prettify(s)
  1722. }
  1723. // GoString returns the string representation
  1724. func (s SetCognitoEventsInput) GoString() string {
  1725. return s.String()
  1726. }
  1727. // Validate inspects the fields of the type to determine if they are valid.
  1728. func (s *SetCognitoEventsInput) Validate() error {
  1729. invalidParams := request.ErrInvalidParams{Context: "SetCognitoEventsInput"}
  1730. if s.Events == nil {
  1731. invalidParams.Add(request.NewErrParamRequired("Events"))
  1732. }
  1733. if s.IdentityPoolId == nil {
  1734. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1735. }
  1736. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1737. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1738. }
  1739. if invalidParams.Len() > 0 {
  1740. return invalidParams
  1741. }
  1742. return nil
  1743. }
  1744. type SetCognitoEventsOutput struct {
  1745. _ struct{} `type:"structure"`
  1746. }
  1747. // String returns the string representation
  1748. func (s SetCognitoEventsOutput) String() string {
  1749. return awsutil.Prettify(s)
  1750. }
  1751. // GoString returns the string representation
  1752. func (s SetCognitoEventsOutput) GoString() string {
  1753. return s.String()
  1754. }
  1755. // The input for the SetIdentityPoolConfiguration operation.
  1756. type SetIdentityPoolConfigurationInput struct {
  1757. _ struct{} `type:"structure"`
  1758. // Options to apply to this identity pool for Amazon Cognito streams.
  1759. CognitoStreams *CognitoStreams `type:"structure"`
  1760. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1761. // created by Amazon Cognito. This is the ID of the pool to modify.
  1762. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1763. // Options to apply to this identity pool for push synchronization.
  1764. PushSync *PushSync `type:"structure"`
  1765. }
  1766. // String returns the string representation
  1767. func (s SetIdentityPoolConfigurationInput) String() string {
  1768. return awsutil.Prettify(s)
  1769. }
  1770. // GoString returns the string representation
  1771. func (s SetIdentityPoolConfigurationInput) GoString() string {
  1772. return s.String()
  1773. }
  1774. // Validate inspects the fields of the type to determine if they are valid.
  1775. func (s *SetIdentityPoolConfigurationInput) Validate() error {
  1776. invalidParams := request.ErrInvalidParams{Context: "SetIdentityPoolConfigurationInput"}
  1777. if s.IdentityPoolId == nil {
  1778. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1779. }
  1780. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1781. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1782. }
  1783. if s.CognitoStreams != nil {
  1784. if err := s.CognitoStreams.Validate(); err != nil {
  1785. invalidParams.AddNested("CognitoStreams", err.(request.ErrInvalidParams))
  1786. }
  1787. }
  1788. if s.PushSync != nil {
  1789. if err := s.PushSync.Validate(); err != nil {
  1790. invalidParams.AddNested("PushSync", err.(request.ErrInvalidParams))
  1791. }
  1792. }
  1793. if invalidParams.Len() > 0 {
  1794. return invalidParams
  1795. }
  1796. return nil
  1797. }
  1798. // The output for the SetIdentityPoolConfiguration operation
  1799. type SetIdentityPoolConfigurationOutput struct {
  1800. _ struct{} `type:"structure"`
  1801. // Options to apply to this identity pool for Amazon Cognito streams.
  1802. CognitoStreams *CognitoStreams `type:"structure"`
  1803. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1804. // created by Amazon Cognito.
  1805. IdentityPoolId *string `min:"1" type:"string"`
  1806. // Options to apply to this identity pool for push synchronization.
  1807. PushSync *PushSync `type:"structure"`
  1808. }
  1809. // String returns the string representation
  1810. func (s SetIdentityPoolConfigurationOutput) String() string {
  1811. return awsutil.Prettify(s)
  1812. }
  1813. // GoString returns the string representation
  1814. func (s SetIdentityPoolConfigurationOutput) GoString() string {
  1815. return s.String()
  1816. }
  1817. // A request to SubscribeToDatasetRequest.
  1818. type SubscribeToDatasetInput struct {
  1819. _ struct{} `type:"structure"`
  1820. // The name of the dataset to subcribe to.
  1821. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  1822. // The unique ID generated for this device by Cognito.
  1823. DeviceId *string `location:"uri" locationName:"DeviceId" min:"1" type:"string" required:"true"`
  1824. // Unique ID for this identity.
  1825. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1826. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1827. // created by Amazon Cognito. The ID of the pool to which the identity belongs.
  1828. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1829. }
  1830. // String returns the string representation
  1831. func (s SubscribeToDatasetInput) String() string {
  1832. return awsutil.Prettify(s)
  1833. }
  1834. // GoString returns the string representation
  1835. func (s SubscribeToDatasetInput) GoString() string {
  1836. return s.String()
  1837. }
  1838. // Validate inspects the fields of the type to determine if they are valid.
  1839. func (s *SubscribeToDatasetInput) Validate() error {
  1840. invalidParams := request.ErrInvalidParams{Context: "SubscribeToDatasetInput"}
  1841. if s.DatasetName == nil {
  1842. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  1843. }
  1844. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  1845. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  1846. }
  1847. if s.DeviceId == nil {
  1848. invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  1849. }
  1850. if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  1851. invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  1852. }
  1853. if s.IdentityId == nil {
  1854. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1855. }
  1856. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1857. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1858. }
  1859. if s.IdentityPoolId == nil {
  1860. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1861. }
  1862. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1863. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1864. }
  1865. if invalidParams.Len() > 0 {
  1866. return invalidParams
  1867. }
  1868. return nil
  1869. }
  1870. // Response to a SubscribeToDataset request.
  1871. type SubscribeToDatasetOutput struct {
  1872. _ struct{} `type:"structure"`
  1873. }
  1874. // String returns the string representation
  1875. func (s SubscribeToDatasetOutput) String() string {
  1876. return awsutil.Prettify(s)
  1877. }
  1878. // GoString returns the string representation
  1879. func (s SubscribeToDatasetOutput) GoString() string {
  1880. return s.String()
  1881. }
  1882. // A request to UnsubscribeFromDataset.
  1883. type UnsubscribeFromDatasetInput struct {
  1884. _ struct{} `type:"structure"`
  1885. // The name of the dataset from which to unsubcribe.
  1886. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  1887. // The unique ID generated for this device by Cognito.
  1888. DeviceId *string `location:"uri" locationName:"DeviceId" min:"1" type:"string" required:"true"`
  1889. // Unique ID for this identity.
  1890. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1891. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1892. // created by Amazon Cognito. The ID of the pool to which this identity belongs.
  1893. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1894. }
  1895. // String returns the string representation
  1896. func (s UnsubscribeFromDatasetInput) String() string {
  1897. return awsutil.Prettify(s)
  1898. }
  1899. // GoString returns the string representation
  1900. func (s UnsubscribeFromDatasetInput) GoString() string {
  1901. return s.String()
  1902. }
  1903. // Validate inspects the fields of the type to determine if they are valid.
  1904. func (s *UnsubscribeFromDatasetInput) Validate() error {
  1905. invalidParams := request.ErrInvalidParams{Context: "UnsubscribeFromDatasetInput"}
  1906. if s.DatasetName == nil {
  1907. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  1908. }
  1909. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  1910. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  1911. }
  1912. if s.DeviceId == nil {
  1913. invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  1914. }
  1915. if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  1916. invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  1917. }
  1918. if s.IdentityId == nil {
  1919. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1920. }
  1921. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1922. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1923. }
  1924. if s.IdentityPoolId == nil {
  1925. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1926. }
  1927. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1928. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1929. }
  1930. if invalidParams.Len() > 0 {
  1931. return invalidParams
  1932. }
  1933. return nil
  1934. }
  1935. // Response to an UnsubscribeFromDataset request.
  1936. type UnsubscribeFromDatasetOutput struct {
  1937. _ struct{} `type:"structure"`
  1938. }
  1939. // String returns the string representation
  1940. func (s UnsubscribeFromDatasetOutput) String() string {
  1941. return awsutil.Prettify(s)
  1942. }
  1943. // GoString returns the string representation
  1944. func (s UnsubscribeFromDatasetOutput) GoString() string {
  1945. return s.String()
  1946. }
  1947. // A request to post updates to records or add and delete records for a dataset
  1948. // and user.
  1949. type UpdateRecordsInput struct {
  1950. _ struct{} `type:"structure"`
  1951. // Intended to supply a device ID that will populate the lastModifiedBy field
  1952. // referenced in other methods. The ClientContext field is not yet implemented.
  1953. ClientContext *string `location:"header" locationName:"x-amz-Client-Context" type:"string"`
  1954. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  1955. // (underscore), '-' (dash), and '.' (dot).
  1956. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  1957. // The unique ID generated for this device by Cognito.
  1958. DeviceId *string `min:"1" type:"string"`
  1959. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1960. // created by Amazon Cognito. GUID generation is unique within a region.
  1961. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1962. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1963. // created by Amazon Cognito. GUID generation is unique within a region.
  1964. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1965. // A list of patch operations.
  1966. RecordPatches []*RecordPatch `type:"list"`
  1967. // The SyncSessionToken returned by a previous call to ListRecords for this
  1968. // dataset and identity.
  1969. SyncSessionToken *string `type:"string" required:"true"`
  1970. }
  1971. // String returns the string representation
  1972. func (s UpdateRecordsInput) String() string {
  1973. return awsutil.Prettify(s)
  1974. }
  1975. // GoString returns the string representation
  1976. func (s UpdateRecordsInput) GoString() string {
  1977. return s.String()
  1978. }
  1979. // Validate inspects the fields of the type to determine if they are valid.
  1980. func (s *UpdateRecordsInput) Validate() error {
  1981. invalidParams := request.ErrInvalidParams{Context: "UpdateRecordsInput"}
  1982. if s.DatasetName == nil {
  1983. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  1984. }
  1985. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  1986. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  1987. }
  1988. if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  1989. invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  1990. }
  1991. if s.IdentityId == nil {
  1992. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1993. }
  1994. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1995. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1996. }
  1997. if s.IdentityPoolId == nil {
  1998. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1999. }
  2000. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2001. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2002. }
  2003. if s.SyncSessionToken == nil {
  2004. invalidParams.Add(request.NewErrParamRequired("SyncSessionToken"))
  2005. }
  2006. if s.RecordPatches != nil {
  2007. for i, v := range s.RecordPatches {
  2008. if v == nil {
  2009. continue
  2010. }
  2011. if err := v.Validate(); err != nil {
  2012. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RecordPatches", i), err.(request.ErrInvalidParams))
  2013. }
  2014. }
  2015. }
  2016. if invalidParams.Len() > 0 {
  2017. return invalidParams
  2018. }
  2019. return nil
  2020. }
  2021. // Returned for a successful UpdateRecordsRequest.
  2022. type UpdateRecordsOutput struct {
  2023. _ struct{} `type:"structure"`
  2024. // A list of records that have been updated.
  2025. Records []*Record `type:"list"`
  2026. }
  2027. // String returns the string representation
  2028. func (s UpdateRecordsOutput) String() string {
  2029. return awsutil.Prettify(s)
  2030. }
  2031. // GoString returns the string representation
  2032. func (s UpdateRecordsOutput) GoString() string {
  2033. return s.String()
  2034. }
  2035. const (
  2036. // @enum BulkPublishStatus
  2037. BulkPublishStatusNotStarted = "NOT_STARTED"
  2038. // @enum BulkPublishStatus
  2039. BulkPublishStatusInProgress = "IN_PROGRESS"
  2040. // @enum BulkPublishStatus
  2041. BulkPublishStatusFailed = "FAILED"
  2042. // @enum BulkPublishStatus
  2043. BulkPublishStatusSucceeded = "SUCCEEDED"
  2044. )
  2045. const (
  2046. // @enum Operation
  2047. OperationReplace = "replace"
  2048. // @enum Operation
  2049. OperationRemove = "remove"
  2050. )
  2051. const (
  2052. // @enum Platform
  2053. PlatformApns = "APNS"
  2054. // @enum Platform
  2055. PlatformApnsSandbox = "APNS_SANDBOX"
  2056. // @enum Platform
  2057. PlatformGcm = "GCM"
  2058. // @enum Platform
  2059. PlatformAdm = "ADM"
  2060. )
  2061. const (
  2062. // @enum StreamingStatus
  2063. StreamingStatusEnabled = "ENABLED"
  2064. // @enum StreamingStatus
  2065. StreamingStatusDisabled = "DISABLED"
  2066. )