api.go 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package simpledb provides a client for Amazon SimpleDB.
  3. package simpledb
  4. import (
  5. "fmt"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/query"
  10. )
  11. const opBatchDeleteAttributes = "BatchDeleteAttributes"
  12. // BatchDeleteAttributesRequest generates a "aws/request.Request" representing the
  13. // client's request for the BatchDeleteAttributes operation. The "output" return
  14. // value can be used to capture response data after the request's "Send" method
  15. // is called.
  16. //
  17. // Creating a request object using this method should be used when you want to inject
  18. // custom logic into the request's lifecycle using a custom handler, or if you want to
  19. // access properties on the request object before or after sending the request. If
  20. // you just want the service response, call the BatchDeleteAttributes method directly
  21. // instead.
  22. //
  23. // Note: You must call the "Send" method on the returned request object in order
  24. // to execute the request.
  25. //
  26. // // Example sending a request using the BatchDeleteAttributesRequest method.
  27. // req, resp := client.BatchDeleteAttributesRequest(params)
  28. //
  29. // err := req.Send()
  30. // if err == nil { // resp is now filled
  31. // fmt.Println(resp)
  32. // }
  33. //
  34. func (c *SimpleDB) BatchDeleteAttributesRequest(input *BatchDeleteAttributesInput) (req *request.Request, output *BatchDeleteAttributesOutput) {
  35. op := &request.Operation{
  36. Name: opBatchDeleteAttributes,
  37. HTTPMethod: "POST",
  38. HTTPPath: "/",
  39. }
  40. if input == nil {
  41. input = &BatchDeleteAttributesInput{}
  42. }
  43. req = c.newRequest(op, input, output)
  44. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  45. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  46. output = &BatchDeleteAttributesOutput{}
  47. req.Data = output
  48. return
  49. }
  50. // Performs multiple DeleteAttributes operations in a single call, which reduces
  51. // round trips and latencies. This enables Amazon SimpleDB to optimize requests,
  52. // which generally yields better throughput.
  53. //
  54. // If you specify BatchDeleteAttributes without attributes or values, all
  55. // the attributes for the item are deleted.
  56. //
  57. // BatchDeleteAttributes is an idempotent operation; running it multiple times
  58. // on the same item or attribute doesn't result in an error.
  59. //
  60. // The BatchDeleteAttributes operation succeeds or fails in its entirety.
  61. // There are no partial deletes. You can execute multiple BatchDeleteAttributes
  62. // operations and other operations in parallel. However, large numbers of concurrent
  63. // BatchDeleteAttributes calls can result in Service Unavailable (503) responses.
  64. //
  65. // This operation is vulnerable to exceeding the maximum URL size when making
  66. // a REST request using the HTTP GET method.
  67. //
  68. // This operation does not support conditions using Expected.X.Name, Expected.X.Value,
  69. // or Expected.X.Exists.
  70. //
  71. // The following limitations are enforced for this operation: 1 MB request
  72. // size 25 item limit per BatchDeleteAttributes operation
  73. func (c *SimpleDB) BatchDeleteAttributes(input *BatchDeleteAttributesInput) (*BatchDeleteAttributesOutput, error) {
  74. req, out := c.BatchDeleteAttributesRequest(input)
  75. err := req.Send()
  76. return out, err
  77. }
  78. const opBatchPutAttributes = "BatchPutAttributes"
  79. // BatchPutAttributesRequest generates a "aws/request.Request" representing the
  80. // client's request for the BatchPutAttributes operation. The "output" return
  81. // value can be used to capture response data after the request's "Send" method
  82. // is called.
  83. //
  84. // Creating a request object using this method should be used when you want to inject
  85. // custom logic into the request's lifecycle using a custom handler, or if you want to
  86. // access properties on the request object before or after sending the request. If
  87. // you just want the service response, call the BatchPutAttributes method directly
  88. // instead.
  89. //
  90. // Note: You must call the "Send" method on the returned request object in order
  91. // to execute the request.
  92. //
  93. // // Example sending a request using the BatchPutAttributesRequest method.
  94. // req, resp := client.BatchPutAttributesRequest(params)
  95. //
  96. // err := req.Send()
  97. // if err == nil { // resp is now filled
  98. // fmt.Println(resp)
  99. // }
  100. //
  101. func (c *SimpleDB) BatchPutAttributesRequest(input *BatchPutAttributesInput) (req *request.Request, output *BatchPutAttributesOutput) {
  102. op := &request.Operation{
  103. Name: opBatchPutAttributes,
  104. HTTPMethod: "POST",
  105. HTTPPath: "/",
  106. }
  107. if input == nil {
  108. input = &BatchPutAttributesInput{}
  109. }
  110. req = c.newRequest(op, input, output)
  111. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  112. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  113. output = &BatchPutAttributesOutput{}
  114. req.Data = output
  115. return
  116. }
  117. // The BatchPutAttributes operation creates or replaces attributes within one
  118. // or more items. By using this operation, the client can perform multiple PutAttribute
  119. // operation with a single call. This helps yield savings in round trips and
  120. // latencies, enabling Amazon SimpleDB to optimize requests and generally produce
  121. // better throughput.
  122. //
  123. // The client may specify the item name with the Item.X.ItemName parameter.
  124. // The client may specify new attributes using a combination of the Item.X.Attribute.Y.Name
  125. // and Item.X.Attribute.Y.Value parameters. The client may specify the first
  126. // attribute for the first item using the parameters Item.0.Attribute.0.Name
  127. // and Item.0.Attribute.0.Value, and for the second attribute for the first
  128. // item by the parameters Item.0.Attribute.1.Name and Item.0.Attribute.1.Value,
  129. // and so on.
  130. //
  131. // Attributes are uniquely identified within an item by their name/value combination.
  132. // For example, a single item can have the attributes { "first_name", "first_value"
  133. // } and { "first_name", "second_value" }. However, it cannot have two attribute
  134. // instances where both the Item.X.Attribute.Y.Name and Item.X.Attribute.Y.Value
  135. // are the same.
  136. //
  137. // Optionally, the requester can supply the Replace parameter for each individual
  138. // value. Setting this value to true will cause the new attribute values to
  139. // replace the existing attribute values. For example, if an item I has the
  140. // attributes { 'a', '1' }, { 'b', '2'} and { 'b', '3' } and the requester does
  141. // a BatchPutAttributes of {'I', 'b', '4' } with the Replace parameter set to
  142. // true, the final attributes of the item will be { 'a', '1' } and { 'b', '4'
  143. // }, replacing the previous values of the 'b' attribute with the new value.
  144. //
  145. // You cannot specify an empty string as an item or as an attribute name.
  146. // The BatchPutAttributes operation succeeds or fails in its entirety. There
  147. // are no partial puts. This operation is vulnerable to exceeding the maximum
  148. // URL size when making a REST request using the HTTP GET method. This operation
  149. // does not support conditions using Expected.X.Name, Expected.X.Value, or Expected.X.Exists.
  150. // You can execute multiple BatchPutAttributes operations and other operations
  151. // in parallel. However, large numbers of concurrent BatchPutAttributes calls
  152. // can result in Service Unavailable (503) responses.
  153. //
  154. // The following limitations are enforced for this operation: 256 attribute
  155. // name-value pairs per item 1 MB request size 1 billion attributes per domain
  156. // 10 GB of total user data storage per domain 25 item limit per BatchPutAttributes
  157. // operation
  158. func (c *SimpleDB) BatchPutAttributes(input *BatchPutAttributesInput) (*BatchPutAttributesOutput, error) {
  159. req, out := c.BatchPutAttributesRequest(input)
  160. err := req.Send()
  161. return out, err
  162. }
  163. const opCreateDomain = "CreateDomain"
  164. // CreateDomainRequest generates a "aws/request.Request" representing the
  165. // client's request for the CreateDomain operation. The "output" return
  166. // value can be used to capture response data after the request's "Send" method
  167. // is called.
  168. //
  169. // Creating a request object using this method should be used when you want to inject
  170. // custom logic into the request's lifecycle using a custom handler, or if you want to
  171. // access properties on the request object before or after sending the request. If
  172. // you just want the service response, call the CreateDomain method directly
  173. // instead.
  174. //
  175. // Note: You must call the "Send" method on the returned request object in order
  176. // to execute the request.
  177. //
  178. // // Example sending a request using the CreateDomainRequest method.
  179. // req, resp := client.CreateDomainRequest(params)
  180. //
  181. // err := req.Send()
  182. // if err == nil { // resp is now filled
  183. // fmt.Println(resp)
  184. // }
  185. //
  186. func (c *SimpleDB) CreateDomainRequest(input *CreateDomainInput) (req *request.Request, output *CreateDomainOutput) {
  187. op := &request.Operation{
  188. Name: opCreateDomain,
  189. HTTPMethod: "POST",
  190. HTTPPath: "/",
  191. }
  192. if input == nil {
  193. input = &CreateDomainInput{}
  194. }
  195. req = c.newRequest(op, input, output)
  196. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  197. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  198. output = &CreateDomainOutput{}
  199. req.Data = output
  200. return
  201. }
  202. // The CreateDomain operation creates a new domain. The domain name should be
  203. // unique among the domains associated with the Access Key ID provided in the
  204. // request. The CreateDomain operation may take 10 or more seconds to complete.
  205. //
  206. // CreateDomain is an idempotent operation; running it multiple times using
  207. // the same domain name will not result in an error response. The client can
  208. // create up to 100 domains per account.
  209. //
  210. // If the client requires additional domains, go to http://aws.amazon.com/contact-us/simpledb-limit-request/
  211. // (http://aws.amazon.com/contact-us/simpledb-limit-request/).
  212. func (c *SimpleDB) CreateDomain(input *CreateDomainInput) (*CreateDomainOutput, error) {
  213. req, out := c.CreateDomainRequest(input)
  214. err := req.Send()
  215. return out, err
  216. }
  217. const opDeleteAttributes = "DeleteAttributes"
  218. // DeleteAttributesRequest generates a "aws/request.Request" representing the
  219. // client's request for the DeleteAttributes operation. The "output" return
  220. // value can be used to capture response data after the request's "Send" method
  221. // is called.
  222. //
  223. // Creating a request object using this method should be used when you want to inject
  224. // custom logic into the request's lifecycle using a custom handler, or if you want to
  225. // access properties on the request object before or after sending the request. If
  226. // you just want the service response, call the DeleteAttributes method directly
  227. // instead.
  228. //
  229. // Note: You must call the "Send" method on the returned request object in order
  230. // to execute the request.
  231. //
  232. // // Example sending a request using the DeleteAttributesRequest method.
  233. // req, resp := client.DeleteAttributesRequest(params)
  234. //
  235. // err := req.Send()
  236. // if err == nil { // resp is now filled
  237. // fmt.Println(resp)
  238. // }
  239. //
  240. func (c *SimpleDB) DeleteAttributesRequest(input *DeleteAttributesInput) (req *request.Request, output *DeleteAttributesOutput) {
  241. op := &request.Operation{
  242. Name: opDeleteAttributes,
  243. HTTPMethod: "POST",
  244. HTTPPath: "/",
  245. }
  246. if input == nil {
  247. input = &DeleteAttributesInput{}
  248. }
  249. req = c.newRequest(op, input, output)
  250. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  251. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  252. output = &DeleteAttributesOutput{}
  253. req.Data = output
  254. return
  255. }
  256. // Deletes one or more attributes associated with an item. If all attributes
  257. // of the item are deleted, the item is deleted.
  258. //
  259. // If DeleteAttributes is called without being passed any attributes or values
  260. // specified, all the attributes for the item are deleted. DeleteAttributes
  261. // is an idempotent operation; running it multiple times on the same item or
  262. // attribute does not result in an error response.
  263. //
  264. // Because Amazon SimpleDB makes multiple copies of item data and uses an
  265. // eventual consistency update model, performing a GetAttributes or Select operation
  266. // (read) immediately after a DeleteAttributes or PutAttributes operation (write)
  267. // might not return updated item data.
  268. func (c *SimpleDB) DeleteAttributes(input *DeleteAttributesInput) (*DeleteAttributesOutput, error) {
  269. req, out := c.DeleteAttributesRequest(input)
  270. err := req.Send()
  271. return out, err
  272. }
  273. const opDeleteDomain = "DeleteDomain"
  274. // DeleteDomainRequest generates a "aws/request.Request" representing the
  275. // client's request for the DeleteDomain operation. The "output" return
  276. // value can be used to capture response data after the request's "Send" method
  277. // is called.
  278. //
  279. // Creating a request object using this method should be used when you want to inject
  280. // custom logic into the request's lifecycle using a custom handler, or if you want to
  281. // access properties on the request object before or after sending the request. If
  282. // you just want the service response, call the DeleteDomain method directly
  283. // instead.
  284. //
  285. // Note: You must call the "Send" method on the returned request object in order
  286. // to execute the request.
  287. //
  288. // // Example sending a request using the DeleteDomainRequest method.
  289. // req, resp := client.DeleteDomainRequest(params)
  290. //
  291. // err := req.Send()
  292. // if err == nil { // resp is now filled
  293. // fmt.Println(resp)
  294. // }
  295. //
  296. func (c *SimpleDB) DeleteDomainRequest(input *DeleteDomainInput) (req *request.Request, output *DeleteDomainOutput) {
  297. op := &request.Operation{
  298. Name: opDeleteDomain,
  299. HTTPMethod: "POST",
  300. HTTPPath: "/",
  301. }
  302. if input == nil {
  303. input = &DeleteDomainInput{}
  304. }
  305. req = c.newRequest(op, input, output)
  306. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  307. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  308. output = &DeleteDomainOutput{}
  309. req.Data = output
  310. return
  311. }
  312. // The DeleteDomain operation deletes a domain. Any items (and their attributes)
  313. // in the domain are deleted as well. The DeleteDomain operation might take
  314. // 10 or more seconds to complete.
  315. //
  316. // Running DeleteDomain on a domain that does not exist or running the function
  317. // multiple times using the same domain name will not result in an error response.
  318. func (c *SimpleDB) DeleteDomain(input *DeleteDomainInput) (*DeleteDomainOutput, error) {
  319. req, out := c.DeleteDomainRequest(input)
  320. err := req.Send()
  321. return out, err
  322. }
  323. const opDomainMetadata = "DomainMetadata"
  324. // DomainMetadataRequest generates a "aws/request.Request" representing the
  325. // client's request for the DomainMetadata operation. The "output" return
  326. // value can be used to capture response data after the request's "Send" method
  327. // is called.
  328. //
  329. // Creating a request object using this method should be used when you want to inject
  330. // custom logic into the request's lifecycle using a custom handler, or if you want to
  331. // access properties on the request object before or after sending the request. If
  332. // you just want the service response, call the DomainMetadata method directly
  333. // instead.
  334. //
  335. // Note: You must call the "Send" method on the returned request object in order
  336. // to execute the request.
  337. //
  338. // // Example sending a request using the DomainMetadataRequest method.
  339. // req, resp := client.DomainMetadataRequest(params)
  340. //
  341. // err := req.Send()
  342. // if err == nil { // resp is now filled
  343. // fmt.Println(resp)
  344. // }
  345. //
  346. func (c *SimpleDB) DomainMetadataRequest(input *DomainMetadataInput) (req *request.Request, output *DomainMetadataOutput) {
  347. op := &request.Operation{
  348. Name: opDomainMetadata,
  349. HTTPMethod: "POST",
  350. HTTPPath: "/",
  351. }
  352. if input == nil {
  353. input = &DomainMetadataInput{}
  354. }
  355. req = c.newRequest(op, input, output)
  356. output = &DomainMetadataOutput{}
  357. req.Data = output
  358. return
  359. }
  360. // Returns information about the domain, including when the domain was created,
  361. // the number of items and attributes in the domain, and the size of the attribute
  362. // names and values.
  363. func (c *SimpleDB) DomainMetadata(input *DomainMetadataInput) (*DomainMetadataOutput, error) {
  364. req, out := c.DomainMetadataRequest(input)
  365. err := req.Send()
  366. return out, err
  367. }
  368. const opGetAttributes = "GetAttributes"
  369. // GetAttributesRequest generates a "aws/request.Request" representing the
  370. // client's request for the GetAttributes operation. The "output" return
  371. // value can be used to capture response data after the request's "Send" method
  372. // is called.
  373. //
  374. // Creating a request object using this method should be used when you want to inject
  375. // custom logic into the request's lifecycle using a custom handler, or if you want to
  376. // access properties on the request object before or after sending the request. If
  377. // you just want the service response, call the GetAttributes method directly
  378. // instead.
  379. //
  380. // Note: You must call the "Send" method on the returned request object in order
  381. // to execute the request.
  382. //
  383. // // Example sending a request using the GetAttributesRequest method.
  384. // req, resp := client.GetAttributesRequest(params)
  385. //
  386. // err := req.Send()
  387. // if err == nil { // resp is now filled
  388. // fmt.Println(resp)
  389. // }
  390. //
  391. func (c *SimpleDB) GetAttributesRequest(input *GetAttributesInput) (req *request.Request, output *GetAttributesOutput) {
  392. op := &request.Operation{
  393. Name: opGetAttributes,
  394. HTTPMethod: "POST",
  395. HTTPPath: "/",
  396. }
  397. if input == nil {
  398. input = &GetAttributesInput{}
  399. }
  400. req = c.newRequest(op, input, output)
  401. output = &GetAttributesOutput{}
  402. req.Data = output
  403. return
  404. }
  405. // Returns all of the attributes associated with the specified item. Optionally,
  406. // the attributes returned can be limited to one or more attributes by specifying
  407. // an attribute name parameter.
  408. //
  409. // If the item does not exist on the replica that was accessed for this operation,
  410. // an empty set is returned. The system does not return an error as it cannot
  411. // guarantee the item does not exist on other replicas.
  412. //
  413. // If GetAttributes is called without being passed any attribute names, all
  414. // the attributes for the item are returned.
  415. func (c *SimpleDB) GetAttributes(input *GetAttributesInput) (*GetAttributesOutput, error) {
  416. req, out := c.GetAttributesRequest(input)
  417. err := req.Send()
  418. return out, err
  419. }
  420. const opListDomains = "ListDomains"
  421. // ListDomainsRequest generates a "aws/request.Request" representing the
  422. // client's request for the ListDomains operation. The "output" return
  423. // value can be used to capture response data after the request's "Send" method
  424. // is called.
  425. //
  426. // Creating a request object using this method should be used when you want to inject
  427. // custom logic into the request's lifecycle using a custom handler, or if you want to
  428. // access properties on the request object before or after sending the request. If
  429. // you just want the service response, call the ListDomains method directly
  430. // instead.
  431. //
  432. // Note: You must call the "Send" method on the returned request object in order
  433. // to execute the request.
  434. //
  435. // // Example sending a request using the ListDomainsRequest method.
  436. // req, resp := client.ListDomainsRequest(params)
  437. //
  438. // err := req.Send()
  439. // if err == nil { // resp is now filled
  440. // fmt.Println(resp)
  441. // }
  442. //
  443. func (c *SimpleDB) ListDomainsRequest(input *ListDomainsInput) (req *request.Request, output *ListDomainsOutput) {
  444. op := &request.Operation{
  445. Name: opListDomains,
  446. HTTPMethod: "POST",
  447. HTTPPath: "/",
  448. Paginator: &request.Paginator{
  449. InputTokens: []string{"NextToken"},
  450. OutputTokens: []string{"NextToken"},
  451. LimitToken: "MaxNumberOfDomains",
  452. TruncationToken: "",
  453. },
  454. }
  455. if input == nil {
  456. input = &ListDomainsInput{}
  457. }
  458. req = c.newRequest(op, input, output)
  459. output = &ListDomainsOutput{}
  460. req.Data = output
  461. return
  462. }
  463. // The ListDomains operation lists all domains associated with the Access Key
  464. // ID. It returns domain names up to the limit set by MaxNumberOfDomains (#MaxNumberOfDomains).
  465. // A NextToken (#NextToken) is returned if there are more than MaxNumberOfDomains
  466. // domains. Calling ListDomains successive times with the NextToken provided
  467. // by the operation returns up to MaxNumberOfDomains more domain names with
  468. // each successive operation call.
  469. func (c *SimpleDB) ListDomains(input *ListDomainsInput) (*ListDomainsOutput, error) {
  470. req, out := c.ListDomainsRequest(input)
  471. err := req.Send()
  472. return out, err
  473. }
  474. // ListDomainsPages iterates over the pages of a ListDomains operation,
  475. // calling the "fn" function with the response data for each page. To stop
  476. // iterating, return false from the fn function.
  477. //
  478. // See ListDomains method for more information on how to use this operation.
  479. //
  480. // Note: This operation can generate multiple requests to a service.
  481. //
  482. // // Example iterating over at most 3 pages of a ListDomains operation.
  483. // pageNum := 0
  484. // err := client.ListDomainsPages(params,
  485. // func(page *ListDomainsOutput, lastPage bool) bool {
  486. // pageNum++
  487. // fmt.Println(page)
  488. // return pageNum <= 3
  489. // })
  490. //
  491. func (c *SimpleDB) ListDomainsPages(input *ListDomainsInput, fn func(p *ListDomainsOutput, lastPage bool) (shouldContinue bool)) error {
  492. page, _ := c.ListDomainsRequest(input)
  493. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  494. return page.EachPage(func(p interface{}, lastPage bool) bool {
  495. return fn(p.(*ListDomainsOutput), lastPage)
  496. })
  497. }
  498. const opPutAttributes = "PutAttributes"
  499. // PutAttributesRequest generates a "aws/request.Request" representing the
  500. // client's request for the PutAttributes operation. The "output" return
  501. // value can be used to capture response data after the request's "Send" method
  502. // is called.
  503. //
  504. // Creating a request object using this method should be used when you want to inject
  505. // custom logic into the request's lifecycle using a custom handler, or if you want to
  506. // access properties on the request object before or after sending the request. If
  507. // you just want the service response, call the PutAttributes method directly
  508. // instead.
  509. //
  510. // Note: You must call the "Send" method on the returned request object in order
  511. // to execute the request.
  512. //
  513. // // Example sending a request using the PutAttributesRequest method.
  514. // req, resp := client.PutAttributesRequest(params)
  515. //
  516. // err := req.Send()
  517. // if err == nil { // resp is now filled
  518. // fmt.Println(resp)
  519. // }
  520. //
  521. func (c *SimpleDB) PutAttributesRequest(input *PutAttributesInput) (req *request.Request, output *PutAttributesOutput) {
  522. op := &request.Operation{
  523. Name: opPutAttributes,
  524. HTTPMethod: "POST",
  525. HTTPPath: "/",
  526. }
  527. if input == nil {
  528. input = &PutAttributesInput{}
  529. }
  530. req = c.newRequest(op, input, output)
  531. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  532. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  533. output = &PutAttributesOutput{}
  534. req.Data = output
  535. return
  536. }
  537. // The PutAttributes operation creates or replaces attributes in an item. The
  538. // client may specify new attributes using a combination of the Attribute.X.Name
  539. // and Attribute.X.Value parameters. The client specifies the first attribute
  540. // by the parameters Attribute.0.Name and Attribute.0.Value, the second attribute
  541. // by the parameters Attribute.1.Name and Attribute.1.Value, and so on.
  542. //
  543. // Attributes are uniquely identified in an item by their name/value combination.
  544. // For example, a single item can have the attributes { "first_name", "first_value"
  545. // } and { "first_name", second_value" }. However, it cannot have two attribute
  546. // instances where both the Attribute.X.Name and Attribute.X.Value are the same.
  547. //
  548. // Optionally, the requestor can supply the Replace parameter for each individual
  549. // attribute. Setting this value to true causes the new attribute value to replace
  550. // the existing attribute value(s). For example, if an item has the attributes
  551. // { 'a', '1' }, { 'b', '2'} and { 'b', '3' } and the requestor calls PutAttributes
  552. // using the attributes { 'b', '4' } with the Replace parameter set to true,
  553. // the final attributes of the item are changed to { 'a', '1' } and { 'b', '4'
  554. // }, which replaces the previous values of the 'b' attribute with the new value.
  555. //
  556. // Using PutAttributes to replace attribute values that do not exist will
  557. // not result in an error response. You cannot specify an empty string as
  558. // an attribute name.
  559. //
  560. // Because Amazon SimpleDB makes multiple copies of client data and uses an
  561. // eventual consistency update model, an immediate GetAttributes or Select operation
  562. // (read) immediately after a PutAttributes or DeleteAttributes operation (write)
  563. // might not return the updated data.
  564. //
  565. // The following limitations are enforced for this operation: 256 total attribute
  566. // name-value pairs per item One billion attributes per domain 10 GB of total
  567. // user data storage per domain
  568. func (c *SimpleDB) PutAttributes(input *PutAttributesInput) (*PutAttributesOutput, error) {
  569. req, out := c.PutAttributesRequest(input)
  570. err := req.Send()
  571. return out, err
  572. }
  573. const opSelect = "Select"
  574. // SelectRequest generates a "aws/request.Request" representing the
  575. // client's request for the Select operation. The "output" return
  576. // value can be used to capture response data after the request's "Send" method
  577. // is called.
  578. //
  579. // Creating a request object using this method should be used when you want to inject
  580. // custom logic into the request's lifecycle using a custom handler, or if you want to
  581. // access properties on the request object before or after sending the request. If
  582. // you just want the service response, call the Select method directly
  583. // instead.
  584. //
  585. // Note: You must call the "Send" method on the returned request object in order
  586. // to execute the request.
  587. //
  588. // // Example sending a request using the SelectRequest method.
  589. // req, resp := client.SelectRequest(params)
  590. //
  591. // err := req.Send()
  592. // if err == nil { // resp is now filled
  593. // fmt.Println(resp)
  594. // }
  595. //
  596. func (c *SimpleDB) SelectRequest(input *SelectInput) (req *request.Request, output *SelectOutput) {
  597. op := &request.Operation{
  598. Name: opSelect,
  599. HTTPMethod: "POST",
  600. HTTPPath: "/",
  601. Paginator: &request.Paginator{
  602. InputTokens: []string{"NextToken"},
  603. OutputTokens: []string{"NextToken"},
  604. LimitToken: "",
  605. TruncationToken: "",
  606. },
  607. }
  608. if input == nil {
  609. input = &SelectInput{}
  610. }
  611. req = c.newRequest(op, input, output)
  612. output = &SelectOutput{}
  613. req.Data = output
  614. return
  615. }
  616. // The Select operation returns a set of attributes for ItemNames that match
  617. // the select expression. Select is similar to the standard SQL SELECT statement.
  618. //
  619. // The total size of the response cannot exceed 1 MB in total size. Amazon
  620. // SimpleDB automatically adjusts the number of items returned per page to enforce
  621. // this limit. For example, if the client asks to retrieve 2500 items, but each
  622. // individual item is 10 kB in size, the system returns 100 items and an appropriate
  623. // NextToken so the client can access the next page of results.
  624. //
  625. // For information on how to construct select expressions, see Using Select
  626. // to Create Amazon SimpleDB Queries in the Developer Guide.
  627. func (c *SimpleDB) Select(input *SelectInput) (*SelectOutput, error) {
  628. req, out := c.SelectRequest(input)
  629. err := req.Send()
  630. return out, err
  631. }
  632. // SelectPages iterates over the pages of a Select operation,
  633. // calling the "fn" function with the response data for each page. To stop
  634. // iterating, return false from the fn function.
  635. //
  636. // See Select method for more information on how to use this operation.
  637. //
  638. // Note: This operation can generate multiple requests to a service.
  639. //
  640. // // Example iterating over at most 3 pages of a Select operation.
  641. // pageNum := 0
  642. // err := client.SelectPages(params,
  643. // func(page *SelectOutput, lastPage bool) bool {
  644. // pageNum++
  645. // fmt.Println(page)
  646. // return pageNum <= 3
  647. // })
  648. //
  649. func (c *SimpleDB) SelectPages(input *SelectInput, fn func(p *SelectOutput, lastPage bool) (shouldContinue bool)) error {
  650. page, _ := c.SelectRequest(input)
  651. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  652. return page.EachPage(func(p interface{}, lastPage bool) bool {
  653. return fn(p.(*SelectOutput), lastPage)
  654. })
  655. }
  656. type Attribute struct {
  657. _ struct{} `type:"structure"`
  658. AlternateNameEncoding *string `type:"string"`
  659. AlternateValueEncoding *string `type:"string"`
  660. // The name of the attribute.
  661. Name *string `type:"string" required:"true"`
  662. // The value of the attribute.
  663. Value *string `type:"string" required:"true"`
  664. }
  665. // String returns the string representation
  666. func (s Attribute) String() string {
  667. return awsutil.Prettify(s)
  668. }
  669. // GoString returns the string representation
  670. func (s Attribute) GoString() string {
  671. return s.String()
  672. }
  673. type BatchDeleteAttributesInput struct {
  674. _ struct{} `type:"structure"`
  675. // The name of the domain in which the attributes are being deleted.
  676. DomainName *string `type:"string" required:"true"`
  677. // A list of items on which to perform the operation.
  678. Items []*DeletableItem `locationNameList:"Item" type:"list" flattened:"true" required:"true"`
  679. }
  680. // String returns the string representation
  681. func (s BatchDeleteAttributesInput) String() string {
  682. return awsutil.Prettify(s)
  683. }
  684. // GoString returns the string representation
  685. func (s BatchDeleteAttributesInput) GoString() string {
  686. return s.String()
  687. }
  688. // Validate inspects the fields of the type to determine if they are valid.
  689. func (s *BatchDeleteAttributesInput) Validate() error {
  690. invalidParams := request.ErrInvalidParams{Context: "BatchDeleteAttributesInput"}
  691. if s.DomainName == nil {
  692. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  693. }
  694. if s.Items == nil {
  695. invalidParams.Add(request.NewErrParamRequired("Items"))
  696. }
  697. if s.Items != nil {
  698. for i, v := range s.Items {
  699. if v == nil {
  700. continue
  701. }
  702. if err := v.Validate(); err != nil {
  703. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  704. }
  705. }
  706. }
  707. if invalidParams.Len() > 0 {
  708. return invalidParams
  709. }
  710. return nil
  711. }
  712. type BatchDeleteAttributesOutput struct {
  713. _ struct{} `type:"structure"`
  714. }
  715. // String returns the string representation
  716. func (s BatchDeleteAttributesOutput) String() string {
  717. return awsutil.Prettify(s)
  718. }
  719. // GoString returns the string representation
  720. func (s BatchDeleteAttributesOutput) GoString() string {
  721. return s.String()
  722. }
  723. type BatchPutAttributesInput struct {
  724. _ struct{} `type:"structure"`
  725. // The name of the domain in which the attributes are being stored.
  726. DomainName *string `type:"string" required:"true"`
  727. // A list of items on which to perform the operation.
  728. Items []*ReplaceableItem `locationNameList:"Item" type:"list" flattened:"true" required:"true"`
  729. }
  730. // String returns the string representation
  731. func (s BatchPutAttributesInput) String() string {
  732. return awsutil.Prettify(s)
  733. }
  734. // GoString returns the string representation
  735. func (s BatchPutAttributesInput) GoString() string {
  736. return s.String()
  737. }
  738. // Validate inspects the fields of the type to determine if they are valid.
  739. func (s *BatchPutAttributesInput) Validate() error {
  740. invalidParams := request.ErrInvalidParams{Context: "BatchPutAttributesInput"}
  741. if s.DomainName == nil {
  742. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  743. }
  744. if s.Items == nil {
  745. invalidParams.Add(request.NewErrParamRequired("Items"))
  746. }
  747. if s.Items != nil {
  748. for i, v := range s.Items {
  749. if v == nil {
  750. continue
  751. }
  752. if err := v.Validate(); err != nil {
  753. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  754. }
  755. }
  756. }
  757. if invalidParams.Len() > 0 {
  758. return invalidParams
  759. }
  760. return nil
  761. }
  762. type BatchPutAttributesOutput struct {
  763. _ struct{} `type:"structure"`
  764. }
  765. // String returns the string representation
  766. func (s BatchPutAttributesOutput) String() string {
  767. return awsutil.Prettify(s)
  768. }
  769. // GoString returns the string representation
  770. func (s BatchPutAttributesOutput) GoString() string {
  771. return s.String()
  772. }
  773. type CreateDomainInput struct {
  774. _ struct{} `type:"structure"`
  775. // The name of the domain to create. The name can range between 3 and 255 characters
  776. // and can contain the following characters: a-z, A-Z, 0-9, '_', '-', and '.'.
  777. DomainName *string `type:"string" required:"true"`
  778. }
  779. // String returns the string representation
  780. func (s CreateDomainInput) String() string {
  781. return awsutil.Prettify(s)
  782. }
  783. // GoString returns the string representation
  784. func (s CreateDomainInput) GoString() string {
  785. return s.String()
  786. }
  787. // Validate inspects the fields of the type to determine if they are valid.
  788. func (s *CreateDomainInput) Validate() error {
  789. invalidParams := request.ErrInvalidParams{Context: "CreateDomainInput"}
  790. if s.DomainName == nil {
  791. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  792. }
  793. if invalidParams.Len() > 0 {
  794. return invalidParams
  795. }
  796. return nil
  797. }
  798. type CreateDomainOutput struct {
  799. _ struct{} `type:"structure"`
  800. }
  801. // String returns the string representation
  802. func (s CreateDomainOutput) String() string {
  803. return awsutil.Prettify(s)
  804. }
  805. // GoString returns the string representation
  806. func (s CreateDomainOutput) GoString() string {
  807. return s.String()
  808. }
  809. type DeletableAttribute struct {
  810. _ struct{} `type:"structure"`
  811. // The name of the attribute.
  812. Name *string `type:"string" required:"true"`
  813. // The value of the attribute.
  814. Value *string `type:"string"`
  815. }
  816. // String returns the string representation
  817. func (s DeletableAttribute) String() string {
  818. return awsutil.Prettify(s)
  819. }
  820. // GoString returns the string representation
  821. func (s DeletableAttribute) GoString() string {
  822. return s.String()
  823. }
  824. // Validate inspects the fields of the type to determine if they are valid.
  825. func (s *DeletableAttribute) Validate() error {
  826. invalidParams := request.ErrInvalidParams{Context: "DeletableAttribute"}
  827. if s.Name == nil {
  828. invalidParams.Add(request.NewErrParamRequired("Name"))
  829. }
  830. if invalidParams.Len() > 0 {
  831. return invalidParams
  832. }
  833. return nil
  834. }
  835. type DeletableItem struct {
  836. _ struct{} `type:"structure"`
  837. Attributes []*DeletableAttribute `locationNameList:"Attribute" type:"list" flattened:"true"`
  838. Name *string `locationName:"ItemName" type:"string" required:"true"`
  839. }
  840. // String returns the string representation
  841. func (s DeletableItem) String() string {
  842. return awsutil.Prettify(s)
  843. }
  844. // GoString returns the string representation
  845. func (s DeletableItem) GoString() string {
  846. return s.String()
  847. }
  848. // Validate inspects the fields of the type to determine if they are valid.
  849. func (s *DeletableItem) Validate() error {
  850. invalidParams := request.ErrInvalidParams{Context: "DeletableItem"}
  851. if s.Name == nil {
  852. invalidParams.Add(request.NewErrParamRequired("Name"))
  853. }
  854. if s.Attributes != nil {
  855. for i, v := range s.Attributes {
  856. if v == nil {
  857. continue
  858. }
  859. if err := v.Validate(); err != nil {
  860. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  861. }
  862. }
  863. }
  864. if invalidParams.Len() > 0 {
  865. return invalidParams
  866. }
  867. return nil
  868. }
  869. type DeleteAttributesInput struct {
  870. _ struct{} `type:"structure"`
  871. // A list of Attributes. Similar to columns on a spreadsheet, attributes represent
  872. // categories of data that can be assigned to items.
  873. Attributes []*DeletableAttribute `locationNameList:"Attribute" type:"list" flattened:"true"`
  874. // The name of the domain in which to perform the operation.
  875. DomainName *string `type:"string" required:"true"`
  876. // The update condition which, if specified, determines whether the specified
  877. // attributes will be deleted or not. The update condition must be satisfied
  878. // in order for this request to be processed and the attributes to be deleted.
  879. Expected *UpdateCondition `type:"structure"`
  880. // The name of the item. Similar to rows on a spreadsheet, items represent individual
  881. // objects that contain one or more value-attribute pairs.
  882. ItemName *string `type:"string" required:"true"`
  883. }
  884. // String returns the string representation
  885. func (s DeleteAttributesInput) String() string {
  886. return awsutil.Prettify(s)
  887. }
  888. // GoString returns the string representation
  889. func (s DeleteAttributesInput) GoString() string {
  890. return s.String()
  891. }
  892. // Validate inspects the fields of the type to determine if they are valid.
  893. func (s *DeleteAttributesInput) Validate() error {
  894. invalidParams := request.ErrInvalidParams{Context: "DeleteAttributesInput"}
  895. if s.DomainName == nil {
  896. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  897. }
  898. if s.ItemName == nil {
  899. invalidParams.Add(request.NewErrParamRequired("ItemName"))
  900. }
  901. if s.Attributes != nil {
  902. for i, v := range s.Attributes {
  903. if v == nil {
  904. continue
  905. }
  906. if err := v.Validate(); err != nil {
  907. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  908. }
  909. }
  910. }
  911. if invalidParams.Len() > 0 {
  912. return invalidParams
  913. }
  914. return nil
  915. }
  916. type DeleteAttributesOutput struct {
  917. _ struct{} `type:"structure"`
  918. }
  919. // String returns the string representation
  920. func (s DeleteAttributesOutput) String() string {
  921. return awsutil.Prettify(s)
  922. }
  923. // GoString returns the string representation
  924. func (s DeleteAttributesOutput) GoString() string {
  925. return s.String()
  926. }
  927. type DeleteDomainInput struct {
  928. _ struct{} `type:"structure"`
  929. // The name of the domain to delete.
  930. DomainName *string `type:"string" required:"true"`
  931. }
  932. // String returns the string representation
  933. func (s DeleteDomainInput) String() string {
  934. return awsutil.Prettify(s)
  935. }
  936. // GoString returns the string representation
  937. func (s DeleteDomainInput) GoString() string {
  938. return s.String()
  939. }
  940. // Validate inspects the fields of the type to determine if they are valid.
  941. func (s *DeleteDomainInput) Validate() error {
  942. invalidParams := request.ErrInvalidParams{Context: "DeleteDomainInput"}
  943. if s.DomainName == nil {
  944. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  945. }
  946. if invalidParams.Len() > 0 {
  947. return invalidParams
  948. }
  949. return nil
  950. }
  951. type DeleteDomainOutput struct {
  952. _ struct{} `type:"structure"`
  953. }
  954. // String returns the string representation
  955. func (s DeleteDomainOutput) String() string {
  956. return awsutil.Prettify(s)
  957. }
  958. // GoString returns the string representation
  959. func (s DeleteDomainOutput) GoString() string {
  960. return s.String()
  961. }
  962. type DomainMetadataInput struct {
  963. _ struct{} `type:"structure"`
  964. // The name of the domain for which to display the metadata of.
  965. DomainName *string `type:"string" required:"true"`
  966. }
  967. // String returns the string representation
  968. func (s DomainMetadataInput) String() string {
  969. return awsutil.Prettify(s)
  970. }
  971. // GoString returns the string representation
  972. func (s DomainMetadataInput) GoString() string {
  973. return s.String()
  974. }
  975. // Validate inspects the fields of the type to determine if they are valid.
  976. func (s *DomainMetadataInput) Validate() error {
  977. invalidParams := request.ErrInvalidParams{Context: "DomainMetadataInput"}
  978. if s.DomainName == nil {
  979. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  980. }
  981. if invalidParams.Len() > 0 {
  982. return invalidParams
  983. }
  984. return nil
  985. }
  986. type DomainMetadataOutput struct {
  987. _ struct{} `type:"structure"`
  988. // The number of unique attribute names in the domain.
  989. AttributeNameCount *int64 `type:"integer"`
  990. // The total size of all unique attribute names in the domain, in bytes.
  991. AttributeNamesSizeBytes *int64 `type:"long"`
  992. // The number of all attribute name/value pairs in the domain.
  993. AttributeValueCount *int64 `type:"integer"`
  994. // The total size of all attribute values in the domain, in bytes.
  995. AttributeValuesSizeBytes *int64 `type:"long"`
  996. // The number of all items in the domain.
  997. ItemCount *int64 `type:"integer"`
  998. // The total size of all item names in the domain, in bytes.
  999. ItemNamesSizeBytes *int64 `type:"long"`
  1000. // The data and time when metadata was calculated, in Epoch (UNIX) seconds.
  1001. Timestamp *int64 `type:"integer"`
  1002. }
  1003. // String returns the string representation
  1004. func (s DomainMetadataOutput) String() string {
  1005. return awsutil.Prettify(s)
  1006. }
  1007. // GoString returns the string representation
  1008. func (s DomainMetadataOutput) GoString() string {
  1009. return s.String()
  1010. }
  1011. type GetAttributesInput struct {
  1012. _ struct{} `type:"structure"`
  1013. // The names of the attributes.
  1014. AttributeNames []*string `locationNameList:"AttributeName" type:"list" flattened:"true"`
  1015. // Determines whether or not strong consistency should be enforced when data
  1016. // is read from SimpleDB. If true, any data previously written to SimpleDB will
  1017. // be returned. Otherwise, results will be consistent eventually, and the client
  1018. // may not see data that was written immediately before your read.
  1019. ConsistentRead *bool `type:"boolean"`
  1020. // The name of the domain in which to perform the operation.
  1021. DomainName *string `type:"string" required:"true"`
  1022. // The name of the item.
  1023. ItemName *string `type:"string" required:"true"`
  1024. }
  1025. // String returns the string representation
  1026. func (s GetAttributesInput) String() string {
  1027. return awsutil.Prettify(s)
  1028. }
  1029. // GoString returns the string representation
  1030. func (s GetAttributesInput) GoString() string {
  1031. return s.String()
  1032. }
  1033. // Validate inspects the fields of the type to determine if they are valid.
  1034. func (s *GetAttributesInput) Validate() error {
  1035. invalidParams := request.ErrInvalidParams{Context: "GetAttributesInput"}
  1036. if s.DomainName == nil {
  1037. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  1038. }
  1039. if s.ItemName == nil {
  1040. invalidParams.Add(request.NewErrParamRequired("ItemName"))
  1041. }
  1042. if invalidParams.Len() > 0 {
  1043. return invalidParams
  1044. }
  1045. return nil
  1046. }
  1047. type GetAttributesOutput struct {
  1048. _ struct{} `type:"structure"`
  1049. // The list of attributes returned by the operation.
  1050. Attributes []*Attribute `locationNameList:"Attribute" type:"list" flattened:"true"`
  1051. }
  1052. // String returns the string representation
  1053. func (s GetAttributesOutput) String() string {
  1054. return awsutil.Prettify(s)
  1055. }
  1056. // GoString returns the string representation
  1057. func (s GetAttributesOutput) GoString() string {
  1058. return s.String()
  1059. }
  1060. type Item struct {
  1061. _ struct{} `type:"structure"`
  1062. AlternateNameEncoding *string `type:"string"`
  1063. // A list of attributes.
  1064. Attributes []*Attribute `locationNameList:"Attribute" type:"list" flattened:"true" required:"true"`
  1065. // The name of the item.
  1066. Name *string `type:"string" required:"true"`
  1067. }
  1068. // String returns the string representation
  1069. func (s Item) String() string {
  1070. return awsutil.Prettify(s)
  1071. }
  1072. // GoString returns the string representation
  1073. func (s Item) GoString() string {
  1074. return s.String()
  1075. }
  1076. type ListDomainsInput struct {
  1077. _ struct{} `type:"structure"`
  1078. // The maximum number of domain names you want returned. The range is 1 to 100.
  1079. // The default setting is 100.
  1080. MaxNumberOfDomains *int64 `type:"integer"`
  1081. // A string informing Amazon SimpleDB where to start the next list of domain
  1082. // names.
  1083. NextToken *string `type:"string"`
  1084. }
  1085. // String returns the string representation
  1086. func (s ListDomainsInput) String() string {
  1087. return awsutil.Prettify(s)
  1088. }
  1089. // GoString returns the string representation
  1090. func (s ListDomainsInput) GoString() string {
  1091. return s.String()
  1092. }
  1093. type ListDomainsOutput struct {
  1094. _ struct{} `type:"structure"`
  1095. // A list of domain names that match the expression.
  1096. DomainNames []*string `locationNameList:"DomainName" type:"list" flattened:"true"`
  1097. // An opaque token indicating that there are more domains than the specified
  1098. // MaxNumberOfDomains still available.
  1099. NextToken *string `type:"string"`
  1100. }
  1101. // String returns the string representation
  1102. func (s ListDomainsOutput) String() string {
  1103. return awsutil.Prettify(s)
  1104. }
  1105. // GoString returns the string representation
  1106. func (s ListDomainsOutput) GoString() string {
  1107. return s.String()
  1108. }
  1109. type PutAttributesInput struct {
  1110. _ struct{} `type:"structure"`
  1111. // The list of attributes.
  1112. Attributes []*ReplaceableAttribute `locationNameList:"Attribute" type:"list" flattened:"true" required:"true"`
  1113. // The name of the domain in which to perform the operation.
  1114. DomainName *string `type:"string" required:"true"`
  1115. // The update condition which, if specified, determines whether the specified
  1116. // attributes will be updated or not. The update condition must be satisfied
  1117. // in order for this request to be processed and the attributes to be updated.
  1118. Expected *UpdateCondition `type:"structure"`
  1119. // The name of the item.
  1120. ItemName *string `type:"string" required:"true"`
  1121. }
  1122. // String returns the string representation
  1123. func (s PutAttributesInput) String() string {
  1124. return awsutil.Prettify(s)
  1125. }
  1126. // GoString returns the string representation
  1127. func (s PutAttributesInput) GoString() string {
  1128. return s.String()
  1129. }
  1130. // Validate inspects the fields of the type to determine if they are valid.
  1131. func (s *PutAttributesInput) Validate() error {
  1132. invalidParams := request.ErrInvalidParams{Context: "PutAttributesInput"}
  1133. if s.Attributes == nil {
  1134. invalidParams.Add(request.NewErrParamRequired("Attributes"))
  1135. }
  1136. if s.DomainName == nil {
  1137. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  1138. }
  1139. if s.ItemName == nil {
  1140. invalidParams.Add(request.NewErrParamRequired("ItemName"))
  1141. }
  1142. if s.Attributes != nil {
  1143. for i, v := range s.Attributes {
  1144. if v == nil {
  1145. continue
  1146. }
  1147. if err := v.Validate(); err != nil {
  1148. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  1149. }
  1150. }
  1151. }
  1152. if invalidParams.Len() > 0 {
  1153. return invalidParams
  1154. }
  1155. return nil
  1156. }
  1157. type PutAttributesOutput struct {
  1158. _ struct{} `type:"structure"`
  1159. }
  1160. // String returns the string representation
  1161. func (s PutAttributesOutput) String() string {
  1162. return awsutil.Prettify(s)
  1163. }
  1164. // GoString returns the string representation
  1165. func (s PutAttributesOutput) GoString() string {
  1166. return s.String()
  1167. }
  1168. type ReplaceableAttribute struct {
  1169. _ struct{} `type:"structure"`
  1170. // The name of the replaceable attribute.
  1171. Name *string `type:"string" required:"true"`
  1172. // A flag specifying whether or not to replace the attribute/value pair or to
  1173. // add a new attribute/value pair. The default setting is false.
  1174. Replace *bool `type:"boolean"`
  1175. // The value of the replaceable attribute.
  1176. Value *string `type:"string" required:"true"`
  1177. }
  1178. // String returns the string representation
  1179. func (s ReplaceableAttribute) String() string {
  1180. return awsutil.Prettify(s)
  1181. }
  1182. // GoString returns the string representation
  1183. func (s ReplaceableAttribute) GoString() string {
  1184. return s.String()
  1185. }
  1186. // Validate inspects the fields of the type to determine if they are valid.
  1187. func (s *ReplaceableAttribute) Validate() error {
  1188. invalidParams := request.ErrInvalidParams{Context: "ReplaceableAttribute"}
  1189. if s.Name == nil {
  1190. invalidParams.Add(request.NewErrParamRequired("Name"))
  1191. }
  1192. if s.Value == nil {
  1193. invalidParams.Add(request.NewErrParamRequired("Value"))
  1194. }
  1195. if invalidParams.Len() > 0 {
  1196. return invalidParams
  1197. }
  1198. return nil
  1199. }
  1200. type ReplaceableItem struct {
  1201. _ struct{} `type:"structure"`
  1202. // The list of attributes for a replaceable item.
  1203. Attributes []*ReplaceableAttribute `locationNameList:"Attribute" type:"list" flattened:"true" required:"true"`
  1204. // The name of the replaceable item.
  1205. Name *string `locationName:"ItemName" type:"string" required:"true"`
  1206. }
  1207. // String returns the string representation
  1208. func (s ReplaceableItem) String() string {
  1209. return awsutil.Prettify(s)
  1210. }
  1211. // GoString returns the string representation
  1212. func (s ReplaceableItem) GoString() string {
  1213. return s.String()
  1214. }
  1215. // Validate inspects the fields of the type to determine if they are valid.
  1216. func (s *ReplaceableItem) Validate() error {
  1217. invalidParams := request.ErrInvalidParams{Context: "ReplaceableItem"}
  1218. if s.Attributes == nil {
  1219. invalidParams.Add(request.NewErrParamRequired("Attributes"))
  1220. }
  1221. if s.Name == nil {
  1222. invalidParams.Add(request.NewErrParamRequired("Name"))
  1223. }
  1224. if s.Attributes != nil {
  1225. for i, v := range s.Attributes {
  1226. if v == nil {
  1227. continue
  1228. }
  1229. if err := v.Validate(); err != nil {
  1230. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  1231. }
  1232. }
  1233. }
  1234. if invalidParams.Len() > 0 {
  1235. return invalidParams
  1236. }
  1237. return nil
  1238. }
  1239. type SelectInput struct {
  1240. _ struct{} `type:"structure"`
  1241. // Determines whether or not strong consistency should be enforced when data
  1242. // is read from SimpleDB. If true, any data previously written to SimpleDB will
  1243. // be returned. Otherwise, results will be consistent eventually, and the client
  1244. // may not see data that was written immediately before your read.
  1245. ConsistentRead *bool `type:"boolean"`
  1246. // A string informing Amazon SimpleDB where to start the next list of ItemNames.
  1247. NextToken *string `type:"string"`
  1248. // The expression used to query the domain.
  1249. SelectExpression *string `type:"string" required:"true"`
  1250. }
  1251. // String returns the string representation
  1252. func (s SelectInput) String() string {
  1253. return awsutil.Prettify(s)
  1254. }
  1255. // GoString returns the string representation
  1256. func (s SelectInput) GoString() string {
  1257. return s.String()
  1258. }
  1259. // Validate inspects the fields of the type to determine if they are valid.
  1260. func (s *SelectInput) Validate() error {
  1261. invalidParams := request.ErrInvalidParams{Context: "SelectInput"}
  1262. if s.SelectExpression == nil {
  1263. invalidParams.Add(request.NewErrParamRequired("SelectExpression"))
  1264. }
  1265. if invalidParams.Len() > 0 {
  1266. return invalidParams
  1267. }
  1268. return nil
  1269. }
  1270. type SelectOutput struct {
  1271. _ struct{} `type:"structure"`
  1272. // A list of items that match the select expression.
  1273. Items []*Item `locationNameList:"Item" type:"list" flattened:"true"`
  1274. // An opaque token indicating that more items than MaxNumberOfItems were matched,
  1275. // the response size exceeded 1 megabyte, or the execution time exceeded 5 seconds.
  1276. NextToken *string `type:"string"`
  1277. }
  1278. // String returns the string representation
  1279. func (s SelectOutput) String() string {
  1280. return awsutil.Prettify(s)
  1281. }
  1282. // GoString returns the string representation
  1283. func (s SelectOutput) GoString() string {
  1284. return s.String()
  1285. }
  1286. // Specifies the conditions under which data should be updated. If an update
  1287. // condition is specified for a request, the data will only be updated if the
  1288. // condition is satisfied. For example, if an attribute with a specific name
  1289. // and value exists, or if a specific attribute doesn't exist.
  1290. type UpdateCondition struct {
  1291. _ struct{} `type:"structure"`
  1292. // A value specifying whether or not the specified attribute must exist with
  1293. // the specified value in order for the update condition to be satisfied. Specify
  1294. // true if the attribute must exist for the update condition to be satisfied.
  1295. // Specify false if the attribute should not exist in order for the update condition
  1296. // to be satisfied.
  1297. Exists *bool `type:"boolean"`
  1298. // The name of the attribute involved in the condition.
  1299. Name *string `type:"string"`
  1300. // The value of an attribute. This value can only be specified when the Exists
  1301. // parameter is equal to true.
  1302. Value *string `type:"string"`
  1303. }
  1304. // String returns the string representation
  1305. func (s UpdateCondition) String() string {
  1306. return awsutil.Prettify(s)
  1307. }
  1308. // GoString returns the string representation
  1309. func (s UpdateCondition) GoString() string {
  1310. return s.String()
  1311. }