api.go 85 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package iot1clickprojects
  3. import (
  4. "time"
  5. "github.com/aws/aws-sdk-go/aws"
  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/restjson"
  10. )
  11. const opAssociateDeviceWithPlacement = "AssociateDeviceWithPlacement"
  12. // AssociateDeviceWithPlacementRequest generates a "aws/request.Request" representing the
  13. // client's request for the AssociateDeviceWithPlacement operation. The "output" return
  14. // value will be populated with the request's response once the request completes
  15. // successfully.
  16. //
  17. // Use "Send" method on the returned Request to send the API call to the service.
  18. // the "output" return value is not valid until after Send returns without error.
  19. //
  20. // See AssociateDeviceWithPlacement for more information on using the AssociateDeviceWithPlacement
  21. // API call, and error handling.
  22. //
  23. // This method is useful when you want to inject custom logic or configuration
  24. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  25. //
  26. //
  27. // // Example sending a request using the AssociateDeviceWithPlacementRequest method.
  28. // req, resp := client.AssociateDeviceWithPlacementRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/AssociateDeviceWithPlacement
  36. func (c *IoT1ClickProjects) AssociateDeviceWithPlacementRequest(input *AssociateDeviceWithPlacementInput) (req *request.Request, output *AssociateDeviceWithPlacementOutput) {
  37. op := &request.Operation{
  38. Name: opAssociateDeviceWithPlacement,
  39. HTTPMethod: "PUT",
  40. HTTPPath: "/projects/{projectName}/placements/{placementName}/devices/{deviceTemplateName}",
  41. }
  42. if input == nil {
  43. input = &AssociateDeviceWithPlacementInput{}
  44. }
  45. output = &AssociateDeviceWithPlacementOutput{}
  46. req = c.newRequest(op, input, output)
  47. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  48. return
  49. }
  50. // AssociateDeviceWithPlacement API operation for AWS IoT 1-Click Projects Service.
  51. //
  52. // Associates a physical device with a placement.
  53. //
  54. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  55. // with awserr.Error's Code and Message methods to get detailed information about
  56. // the error.
  57. //
  58. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  59. // API operation AssociateDeviceWithPlacement for usage and error information.
  60. //
  61. // Returned Error Codes:
  62. // * ErrCodeInternalFailureException "InternalFailureException"
  63. //
  64. // * ErrCodeInvalidRequestException "InvalidRequestException"
  65. //
  66. // * ErrCodeResourceConflictException "ResourceConflictException"
  67. //
  68. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  69. //
  70. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/AssociateDeviceWithPlacement
  71. func (c *IoT1ClickProjects) AssociateDeviceWithPlacement(input *AssociateDeviceWithPlacementInput) (*AssociateDeviceWithPlacementOutput, error) {
  72. req, out := c.AssociateDeviceWithPlacementRequest(input)
  73. return out, req.Send()
  74. }
  75. // AssociateDeviceWithPlacementWithContext is the same as AssociateDeviceWithPlacement with the addition of
  76. // the ability to pass a context and additional request options.
  77. //
  78. // See AssociateDeviceWithPlacement for details on how to use this API operation.
  79. //
  80. // The context must be non-nil and will be used for request cancellation. If
  81. // the context is nil a panic will occur. In the future the SDK may create
  82. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  83. // for more information on using Contexts.
  84. func (c *IoT1ClickProjects) AssociateDeviceWithPlacementWithContext(ctx aws.Context, input *AssociateDeviceWithPlacementInput, opts ...request.Option) (*AssociateDeviceWithPlacementOutput, error) {
  85. req, out := c.AssociateDeviceWithPlacementRequest(input)
  86. req.SetContext(ctx)
  87. req.ApplyOptions(opts...)
  88. return out, req.Send()
  89. }
  90. const opCreatePlacement = "CreatePlacement"
  91. // CreatePlacementRequest generates a "aws/request.Request" representing the
  92. // client's request for the CreatePlacement operation. The "output" return
  93. // value will be populated with the request's response once the request completes
  94. // successfully.
  95. //
  96. // Use "Send" method on the returned Request to send the API call to the service.
  97. // the "output" return value is not valid until after Send returns without error.
  98. //
  99. // See CreatePlacement for more information on using the CreatePlacement
  100. // API call, and error handling.
  101. //
  102. // This method is useful when you want to inject custom logic or configuration
  103. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  104. //
  105. //
  106. // // Example sending a request using the CreatePlacementRequest method.
  107. // req, resp := client.CreatePlacementRequest(params)
  108. //
  109. // err := req.Send()
  110. // if err == nil { // resp is now filled
  111. // fmt.Println(resp)
  112. // }
  113. //
  114. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/CreatePlacement
  115. func (c *IoT1ClickProjects) CreatePlacementRequest(input *CreatePlacementInput) (req *request.Request, output *CreatePlacementOutput) {
  116. op := &request.Operation{
  117. Name: opCreatePlacement,
  118. HTTPMethod: "POST",
  119. HTTPPath: "/projects/{projectName}/placements",
  120. }
  121. if input == nil {
  122. input = &CreatePlacementInput{}
  123. }
  124. output = &CreatePlacementOutput{}
  125. req = c.newRequest(op, input, output)
  126. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  127. return
  128. }
  129. // CreatePlacement API operation for AWS IoT 1-Click Projects Service.
  130. //
  131. // Creates an empty placement.
  132. //
  133. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  134. // with awserr.Error's Code and Message methods to get detailed information about
  135. // the error.
  136. //
  137. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  138. // API operation CreatePlacement for usage and error information.
  139. //
  140. // Returned Error Codes:
  141. // * ErrCodeInternalFailureException "InternalFailureException"
  142. //
  143. // * ErrCodeInvalidRequestException "InvalidRequestException"
  144. //
  145. // * ErrCodeResourceConflictException "ResourceConflictException"
  146. //
  147. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  148. //
  149. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/CreatePlacement
  150. func (c *IoT1ClickProjects) CreatePlacement(input *CreatePlacementInput) (*CreatePlacementOutput, error) {
  151. req, out := c.CreatePlacementRequest(input)
  152. return out, req.Send()
  153. }
  154. // CreatePlacementWithContext is the same as CreatePlacement with the addition of
  155. // the ability to pass a context and additional request options.
  156. //
  157. // See CreatePlacement for details on how to use this API operation.
  158. //
  159. // The context must be non-nil and will be used for request cancellation. If
  160. // the context is nil a panic will occur. In the future the SDK may create
  161. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  162. // for more information on using Contexts.
  163. func (c *IoT1ClickProjects) CreatePlacementWithContext(ctx aws.Context, input *CreatePlacementInput, opts ...request.Option) (*CreatePlacementOutput, error) {
  164. req, out := c.CreatePlacementRequest(input)
  165. req.SetContext(ctx)
  166. req.ApplyOptions(opts...)
  167. return out, req.Send()
  168. }
  169. const opCreateProject = "CreateProject"
  170. // CreateProjectRequest generates a "aws/request.Request" representing the
  171. // client's request for the CreateProject operation. The "output" return
  172. // value will be populated with the request's response once the request completes
  173. // successfully.
  174. //
  175. // Use "Send" method on the returned Request to send the API call to the service.
  176. // the "output" return value is not valid until after Send returns without error.
  177. //
  178. // See CreateProject for more information on using the CreateProject
  179. // API call, and error handling.
  180. //
  181. // This method is useful when you want to inject custom logic or configuration
  182. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  183. //
  184. //
  185. // // Example sending a request using the CreateProjectRequest method.
  186. // req, resp := client.CreateProjectRequest(params)
  187. //
  188. // err := req.Send()
  189. // if err == nil { // resp is now filled
  190. // fmt.Println(resp)
  191. // }
  192. //
  193. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/CreateProject
  194. func (c *IoT1ClickProjects) CreateProjectRequest(input *CreateProjectInput) (req *request.Request, output *CreateProjectOutput) {
  195. op := &request.Operation{
  196. Name: opCreateProject,
  197. HTTPMethod: "POST",
  198. HTTPPath: "/projects",
  199. }
  200. if input == nil {
  201. input = &CreateProjectInput{}
  202. }
  203. output = &CreateProjectOutput{}
  204. req = c.newRequest(op, input, output)
  205. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  206. return
  207. }
  208. // CreateProject API operation for AWS IoT 1-Click Projects Service.
  209. //
  210. // Creates an empty project with a placement template. A project contains zero
  211. // or more placements that adhere to the placement template defined in the project.
  212. //
  213. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  214. // with awserr.Error's Code and Message methods to get detailed information about
  215. // the error.
  216. //
  217. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  218. // API operation CreateProject for usage and error information.
  219. //
  220. // Returned Error Codes:
  221. // * ErrCodeInternalFailureException "InternalFailureException"
  222. //
  223. // * ErrCodeInvalidRequestException "InvalidRequestException"
  224. //
  225. // * ErrCodeResourceConflictException "ResourceConflictException"
  226. //
  227. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/CreateProject
  228. func (c *IoT1ClickProjects) CreateProject(input *CreateProjectInput) (*CreateProjectOutput, error) {
  229. req, out := c.CreateProjectRequest(input)
  230. return out, req.Send()
  231. }
  232. // CreateProjectWithContext is the same as CreateProject with the addition of
  233. // the ability to pass a context and additional request options.
  234. //
  235. // See CreateProject for details on how to use this API operation.
  236. //
  237. // The context must be non-nil and will be used for request cancellation. If
  238. // the context is nil a panic will occur. In the future the SDK may create
  239. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  240. // for more information on using Contexts.
  241. func (c *IoT1ClickProjects) CreateProjectWithContext(ctx aws.Context, input *CreateProjectInput, opts ...request.Option) (*CreateProjectOutput, error) {
  242. req, out := c.CreateProjectRequest(input)
  243. req.SetContext(ctx)
  244. req.ApplyOptions(opts...)
  245. return out, req.Send()
  246. }
  247. const opDeletePlacement = "DeletePlacement"
  248. // DeletePlacementRequest generates a "aws/request.Request" representing the
  249. // client's request for the DeletePlacement operation. The "output" return
  250. // value will be populated with the request's response once the request completes
  251. // successfully.
  252. //
  253. // Use "Send" method on the returned Request to send the API call to the service.
  254. // the "output" return value is not valid until after Send returns without error.
  255. //
  256. // See DeletePlacement for more information on using the DeletePlacement
  257. // API call, and error handling.
  258. //
  259. // This method is useful when you want to inject custom logic or configuration
  260. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  261. //
  262. //
  263. // // Example sending a request using the DeletePlacementRequest method.
  264. // req, resp := client.DeletePlacementRequest(params)
  265. //
  266. // err := req.Send()
  267. // if err == nil { // resp is now filled
  268. // fmt.Println(resp)
  269. // }
  270. //
  271. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/DeletePlacement
  272. func (c *IoT1ClickProjects) DeletePlacementRequest(input *DeletePlacementInput) (req *request.Request, output *DeletePlacementOutput) {
  273. op := &request.Operation{
  274. Name: opDeletePlacement,
  275. HTTPMethod: "DELETE",
  276. HTTPPath: "/projects/{projectName}/placements/{placementName}",
  277. }
  278. if input == nil {
  279. input = &DeletePlacementInput{}
  280. }
  281. output = &DeletePlacementOutput{}
  282. req = c.newRequest(op, input, output)
  283. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  284. return
  285. }
  286. // DeletePlacement API operation for AWS IoT 1-Click Projects Service.
  287. //
  288. // Deletes a placement. To delete a placement, it must not have any devices
  289. // associated with it.
  290. //
  291. // When you delete a placement, all associated data becomes irretrievable.
  292. //
  293. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  294. // with awserr.Error's Code and Message methods to get detailed information about
  295. // the error.
  296. //
  297. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  298. // API operation DeletePlacement for usage and error information.
  299. //
  300. // Returned Error Codes:
  301. // * ErrCodeInternalFailureException "InternalFailureException"
  302. //
  303. // * ErrCodeInvalidRequestException "InvalidRequestException"
  304. //
  305. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  306. //
  307. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  308. //
  309. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/DeletePlacement
  310. func (c *IoT1ClickProjects) DeletePlacement(input *DeletePlacementInput) (*DeletePlacementOutput, error) {
  311. req, out := c.DeletePlacementRequest(input)
  312. return out, req.Send()
  313. }
  314. // DeletePlacementWithContext is the same as DeletePlacement with the addition of
  315. // the ability to pass a context and additional request options.
  316. //
  317. // See DeletePlacement for details on how to use this API operation.
  318. //
  319. // The context must be non-nil and will be used for request cancellation. If
  320. // the context is nil a panic will occur. In the future the SDK may create
  321. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  322. // for more information on using Contexts.
  323. func (c *IoT1ClickProjects) DeletePlacementWithContext(ctx aws.Context, input *DeletePlacementInput, opts ...request.Option) (*DeletePlacementOutput, error) {
  324. req, out := c.DeletePlacementRequest(input)
  325. req.SetContext(ctx)
  326. req.ApplyOptions(opts...)
  327. return out, req.Send()
  328. }
  329. const opDeleteProject = "DeleteProject"
  330. // DeleteProjectRequest generates a "aws/request.Request" representing the
  331. // client's request for the DeleteProject operation. The "output" return
  332. // value will be populated with the request's response once the request completes
  333. // successfully.
  334. //
  335. // Use "Send" method on the returned Request to send the API call to the service.
  336. // the "output" return value is not valid until after Send returns without error.
  337. //
  338. // See DeleteProject for more information on using the DeleteProject
  339. // API call, and error handling.
  340. //
  341. // This method is useful when you want to inject custom logic or configuration
  342. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  343. //
  344. //
  345. // // Example sending a request using the DeleteProjectRequest method.
  346. // req, resp := client.DeleteProjectRequest(params)
  347. //
  348. // err := req.Send()
  349. // if err == nil { // resp is now filled
  350. // fmt.Println(resp)
  351. // }
  352. //
  353. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/DeleteProject
  354. func (c *IoT1ClickProjects) DeleteProjectRequest(input *DeleteProjectInput) (req *request.Request, output *DeleteProjectOutput) {
  355. op := &request.Operation{
  356. Name: opDeleteProject,
  357. HTTPMethod: "DELETE",
  358. HTTPPath: "/projects/{projectName}",
  359. }
  360. if input == nil {
  361. input = &DeleteProjectInput{}
  362. }
  363. output = &DeleteProjectOutput{}
  364. req = c.newRequest(op, input, output)
  365. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  366. return
  367. }
  368. // DeleteProject API operation for AWS IoT 1-Click Projects Service.
  369. //
  370. // Deletes a project. To delete a project, it must not have any placements associated
  371. // with it.
  372. //
  373. // When you delete a project, all associated data becomes irretrievable.
  374. //
  375. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  376. // with awserr.Error's Code and Message methods to get detailed information about
  377. // the error.
  378. //
  379. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  380. // API operation DeleteProject for usage and error information.
  381. //
  382. // Returned Error Codes:
  383. // * ErrCodeInternalFailureException "InternalFailureException"
  384. //
  385. // * ErrCodeInvalidRequestException "InvalidRequestException"
  386. //
  387. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  388. //
  389. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  390. //
  391. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/DeleteProject
  392. func (c *IoT1ClickProjects) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) {
  393. req, out := c.DeleteProjectRequest(input)
  394. return out, req.Send()
  395. }
  396. // DeleteProjectWithContext is the same as DeleteProject with the addition of
  397. // the ability to pass a context and additional request options.
  398. //
  399. // See DeleteProject for details on how to use this API operation.
  400. //
  401. // The context must be non-nil and will be used for request cancellation. If
  402. // the context is nil a panic will occur. In the future the SDK may create
  403. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  404. // for more information on using Contexts.
  405. func (c *IoT1ClickProjects) DeleteProjectWithContext(ctx aws.Context, input *DeleteProjectInput, opts ...request.Option) (*DeleteProjectOutput, error) {
  406. req, out := c.DeleteProjectRequest(input)
  407. req.SetContext(ctx)
  408. req.ApplyOptions(opts...)
  409. return out, req.Send()
  410. }
  411. const opDescribePlacement = "DescribePlacement"
  412. // DescribePlacementRequest generates a "aws/request.Request" representing the
  413. // client's request for the DescribePlacement operation. The "output" return
  414. // value will be populated with the request's response once the request completes
  415. // successfully.
  416. //
  417. // Use "Send" method on the returned Request to send the API call to the service.
  418. // the "output" return value is not valid until after Send returns without error.
  419. //
  420. // See DescribePlacement for more information on using the DescribePlacement
  421. // API call, and error handling.
  422. //
  423. // This method is useful when you want to inject custom logic or configuration
  424. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  425. //
  426. //
  427. // // Example sending a request using the DescribePlacementRequest method.
  428. // req, resp := client.DescribePlacementRequest(params)
  429. //
  430. // err := req.Send()
  431. // if err == nil { // resp is now filled
  432. // fmt.Println(resp)
  433. // }
  434. //
  435. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/DescribePlacement
  436. func (c *IoT1ClickProjects) DescribePlacementRequest(input *DescribePlacementInput) (req *request.Request, output *DescribePlacementOutput) {
  437. op := &request.Operation{
  438. Name: opDescribePlacement,
  439. HTTPMethod: "GET",
  440. HTTPPath: "/projects/{projectName}/placements/{placementName}",
  441. }
  442. if input == nil {
  443. input = &DescribePlacementInput{}
  444. }
  445. output = &DescribePlacementOutput{}
  446. req = c.newRequest(op, input, output)
  447. return
  448. }
  449. // DescribePlacement API operation for AWS IoT 1-Click Projects Service.
  450. //
  451. // Describes a placement in a project.
  452. //
  453. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  454. // with awserr.Error's Code and Message methods to get detailed information about
  455. // the error.
  456. //
  457. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  458. // API operation DescribePlacement for usage and error information.
  459. //
  460. // Returned Error Codes:
  461. // * ErrCodeInternalFailureException "InternalFailureException"
  462. //
  463. // * ErrCodeInvalidRequestException "InvalidRequestException"
  464. //
  465. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  466. //
  467. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/DescribePlacement
  468. func (c *IoT1ClickProjects) DescribePlacement(input *DescribePlacementInput) (*DescribePlacementOutput, error) {
  469. req, out := c.DescribePlacementRequest(input)
  470. return out, req.Send()
  471. }
  472. // DescribePlacementWithContext is the same as DescribePlacement with the addition of
  473. // the ability to pass a context and additional request options.
  474. //
  475. // See DescribePlacement for details on how to use this API operation.
  476. //
  477. // The context must be non-nil and will be used for request cancellation. If
  478. // the context is nil a panic will occur. In the future the SDK may create
  479. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  480. // for more information on using Contexts.
  481. func (c *IoT1ClickProjects) DescribePlacementWithContext(ctx aws.Context, input *DescribePlacementInput, opts ...request.Option) (*DescribePlacementOutput, error) {
  482. req, out := c.DescribePlacementRequest(input)
  483. req.SetContext(ctx)
  484. req.ApplyOptions(opts...)
  485. return out, req.Send()
  486. }
  487. const opDescribeProject = "DescribeProject"
  488. // DescribeProjectRequest generates a "aws/request.Request" representing the
  489. // client's request for the DescribeProject operation. The "output" return
  490. // value will be populated with the request's response once the request completes
  491. // successfully.
  492. //
  493. // Use "Send" method on the returned Request to send the API call to the service.
  494. // the "output" return value is not valid until after Send returns without error.
  495. //
  496. // See DescribeProject for more information on using the DescribeProject
  497. // API call, and error handling.
  498. //
  499. // This method is useful when you want to inject custom logic or configuration
  500. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  501. //
  502. //
  503. // // Example sending a request using the DescribeProjectRequest method.
  504. // req, resp := client.DescribeProjectRequest(params)
  505. //
  506. // err := req.Send()
  507. // if err == nil { // resp is now filled
  508. // fmt.Println(resp)
  509. // }
  510. //
  511. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/DescribeProject
  512. func (c *IoT1ClickProjects) DescribeProjectRequest(input *DescribeProjectInput) (req *request.Request, output *DescribeProjectOutput) {
  513. op := &request.Operation{
  514. Name: opDescribeProject,
  515. HTTPMethod: "GET",
  516. HTTPPath: "/projects/{projectName}",
  517. }
  518. if input == nil {
  519. input = &DescribeProjectInput{}
  520. }
  521. output = &DescribeProjectOutput{}
  522. req = c.newRequest(op, input, output)
  523. return
  524. }
  525. // DescribeProject API operation for AWS IoT 1-Click Projects Service.
  526. //
  527. // Returns an object describing a project.
  528. //
  529. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  530. // with awserr.Error's Code and Message methods to get detailed information about
  531. // the error.
  532. //
  533. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  534. // API operation DescribeProject for usage and error information.
  535. //
  536. // Returned Error Codes:
  537. // * ErrCodeInternalFailureException "InternalFailureException"
  538. //
  539. // * ErrCodeInvalidRequestException "InvalidRequestException"
  540. //
  541. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  542. //
  543. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/DescribeProject
  544. func (c *IoT1ClickProjects) DescribeProject(input *DescribeProjectInput) (*DescribeProjectOutput, error) {
  545. req, out := c.DescribeProjectRequest(input)
  546. return out, req.Send()
  547. }
  548. // DescribeProjectWithContext is the same as DescribeProject with the addition of
  549. // the ability to pass a context and additional request options.
  550. //
  551. // See DescribeProject for details on how to use this API operation.
  552. //
  553. // The context must be non-nil and will be used for request cancellation. If
  554. // the context is nil a panic will occur. In the future the SDK may create
  555. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  556. // for more information on using Contexts.
  557. func (c *IoT1ClickProjects) DescribeProjectWithContext(ctx aws.Context, input *DescribeProjectInput, opts ...request.Option) (*DescribeProjectOutput, error) {
  558. req, out := c.DescribeProjectRequest(input)
  559. req.SetContext(ctx)
  560. req.ApplyOptions(opts...)
  561. return out, req.Send()
  562. }
  563. const opDisassociateDeviceFromPlacement = "DisassociateDeviceFromPlacement"
  564. // DisassociateDeviceFromPlacementRequest generates a "aws/request.Request" representing the
  565. // client's request for the DisassociateDeviceFromPlacement operation. The "output" return
  566. // value will be populated with the request's response once the request completes
  567. // successfully.
  568. //
  569. // Use "Send" method on the returned Request to send the API call to the service.
  570. // the "output" return value is not valid until after Send returns without error.
  571. //
  572. // See DisassociateDeviceFromPlacement for more information on using the DisassociateDeviceFromPlacement
  573. // API call, and error handling.
  574. //
  575. // This method is useful when you want to inject custom logic or configuration
  576. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  577. //
  578. //
  579. // // Example sending a request using the DisassociateDeviceFromPlacementRequest method.
  580. // req, resp := client.DisassociateDeviceFromPlacementRequest(params)
  581. //
  582. // err := req.Send()
  583. // if err == nil { // resp is now filled
  584. // fmt.Println(resp)
  585. // }
  586. //
  587. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/DisassociateDeviceFromPlacement
  588. func (c *IoT1ClickProjects) DisassociateDeviceFromPlacementRequest(input *DisassociateDeviceFromPlacementInput) (req *request.Request, output *DisassociateDeviceFromPlacementOutput) {
  589. op := &request.Operation{
  590. Name: opDisassociateDeviceFromPlacement,
  591. HTTPMethod: "DELETE",
  592. HTTPPath: "/projects/{projectName}/placements/{placementName}/devices/{deviceTemplateName}",
  593. }
  594. if input == nil {
  595. input = &DisassociateDeviceFromPlacementInput{}
  596. }
  597. output = &DisassociateDeviceFromPlacementOutput{}
  598. req = c.newRequest(op, input, output)
  599. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  600. return
  601. }
  602. // DisassociateDeviceFromPlacement API operation for AWS IoT 1-Click Projects Service.
  603. //
  604. // Removes a physical device from a placement.
  605. //
  606. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  607. // with awserr.Error's Code and Message methods to get detailed information about
  608. // the error.
  609. //
  610. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  611. // API operation DisassociateDeviceFromPlacement for usage and error information.
  612. //
  613. // Returned Error Codes:
  614. // * ErrCodeInternalFailureException "InternalFailureException"
  615. //
  616. // * ErrCodeInvalidRequestException "InvalidRequestException"
  617. //
  618. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  619. //
  620. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  621. //
  622. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/DisassociateDeviceFromPlacement
  623. func (c *IoT1ClickProjects) DisassociateDeviceFromPlacement(input *DisassociateDeviceFromPlacementInput) (*DisassociateDeviceFromPlacementOutput, error) {
  624. req, out := c.DisassociateDeviceFromPlacementRequest(input)
  625. return out, req.Send()
  626. }
  627. // DisassociateDeviceFromPlacementWithContext is the same as DisassociateDeviceFromPlacement with the addition of
  628. // the ability to pass a context and additional request options.
  629. //
  630. // See DisassociateDeviceFromPlacement for details on how to use this API operation.
  631. //
  632. // The context must be non-nil and will be used for request cancellation. If
  633. // the context is nil a panic will occur. In the future the SDK may create
  634. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  635. // for more information on using Contexts.
  636. func (c *IoT1ClickProjects) DisassociateDeviceFromPlacementWithContext(ctx aws.Context, input *DisassociateDeviceFromPlacementInput, opts ...request.Option) (*DisassociateDeviceFromPlacementOutput, error) {
  637. req, out := c.DisassociateDeviceFromPlacementRequest(input)
  638. req.SetContext(ctx)
  639. req.ApplyOptions(opts...)
  640. return out, req.Send()
  641. }
  642. const opGetDevicesInPlacement = "GetDevicesInPlacement"
  643. // GetDevicesInPlacementRequest generates a "aws/request.Request" representing the
  644. // client's request for the GetDevicesInPlacement operation. The "output" return
  645. // value will be populated with the request's response once the request completes
  646. // successfully.
  647. //
  648. // Use "Send" method on the returned Request to send the API call to the service.
  649. // the "output" return value is not valid until after Send returns without error.
  650. //
  651. // See GetDevicesInPlacement for more information on using the GetDevicesInPlacement
  652. // API call, and error handling.
  653. //
  654. // This method is useful when you want to inject custom logic or configuration
  655. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  656. //
  657. //
  658. // // Example sending a request using the GetDevicesInPlacementRequest method.
  659. // req, resp := client.GetDevicesInPlacementRequest(params)
  660. //
  661. // err := req.Send()
  662. // if err == nil { // resp is now filled
  663. // fmt.Println(resp)
  664. // }
  665. //
  666. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/GetDevicesInPlacement
  667. func (c *IoT1ClickProjects) GetDevicesInPlacementRequest(input *GetDevicesInPlacementInput) (req *request.Request, output *GetDevicesInPlacementOutput) {
  668. op := &request.Operation{
  669. Name: opGetDevicesInPlacement,
  670. HTTPMethod: "GET",
  671. HTTPPath: "/projects/{projectName}/placements/{placementName}/devices",
  672. }
  673. if input == nil {
  674. input = &GetDevicesInPlacementInput{}
  675. }
  676. output = &GetDevicesInPlacementOutput{}
  677. req = c.newRequest(op, input, output)
  678. return
  679. }
  680. // GetDevicesInPlacement API operation for AWS IoT 1-Click Projects Service.
  681. //
  682. // Returns an object enumerating the devices in a placement.
  683. //
  684. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  685. // with awserr.Error's Code and Message methods to get detailed information about
  686. // the error.
  687. //
  688. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  689. // API operation GetDevicesInPlacement for usage and error information.
  690. //
  691. // Returned Error Codes:
  692. // * ErrCodeInternalFailureException "InternalFailureException"
  693. //
  694. // * ErrCodeInvalidRequestException "InvalidRequestException"
  695. //
  696. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  697. //
  698. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/GetDevicesInPlacement
  699. func (c *IoT1ClickProjects) GetDevicesInPlacement(input *GetDevicesInPlacementInput) (*GetDevicesInPlacementOutput, error) {
  700. req, out := c.GetDevicesInPlacementRequest(input)
  701. return out, req.Send()
  702. }
  703. // GetDevicesInPlacementWithContext is the same as GetDevicesInPlacement with the addition of
  704. // the ability to pass a context and additional request options.
  705. //
  706. // See GetDevicesInPlacement for details on how to use this API operation.
  707. //
  708. // The context must be non-nil and will be used for request cancellation. If
  709. // the context is nil a panic will occur. In the future the SDK may create
  710. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  711. // for more information on using Contexts.
  712. func (c *IoT1ClickProjects) GetDevicesInPlacementWithContext(ctx aws.Context, input *GetDevicesInPlacementInput, opts ...request.Option) (*GetDevicesInPlacementOutput, error) {
  713. req, out := c.GetDevicesInPlacementRequest(input)
  714. req.SetContext(ctx)
  715. req.ApplyOptions(opts...)
  716. return out, req.Send()
  717. }
  718. const opListPlacements = "ListPlacements"
  719. // ListPlacementsRequest generates a "aws/request.Request" representing the
  720. // client's request for the ListPlacements operation. The "output" return
  721. // value will be populated with the request's response once the request completes
  722. // successfully.
  723. //
  724. // Use "Send" method on the returned Request to send the API call to the service.
  725. // the "output" return value is not valid until after Send returns without error.
  726. //
  727. // See ListPlacements for more information on using the ListPlacements
  728. // API call, and error handling.
  729. //
  730. // This method is useful when you want to inject custom logic or configuration
  731. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  732. //
  733. //
  734. // // Example sending a request using the ListPlacementsRequest method.
  735. // req, resp := client.ListPlacementsRequest(params)
  736. //
  737. // err := req.Send()
  738. // if err == nil { // resp is now filled
  739. // fmt.Println(resp)
  740. // }
  741. //
  742. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/ListPlacements
  743. func (c *IoT1ClickProjects) ListPlacementsRequest(input *ListPlacementsInput) (req *request.Request, output *ListPlacementsOutput) {
  744. op := &request.Operation{
  745. Name: opListPlacements,
  746. HTTPMethod: "GET",
  747. HTTPPath: "/projects/{projectName}/placements",
  748. }
  749. if input == nil {
  750. input = &ListPlacementsInput{}
  751. }
  752. output = &ListPlacementsOutput{}
  753. req = c.newRequest(op, input, output)
  754. return
  755. }
  756. // ListPlacements API operation for AWS IoT 1-Click Projects Service.
  757. //
  758. // Lists the placement(s) of a project.
  759. //
  760. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  761. // with awserr.Error's Code and Message methods to get detailed information about
  762. // the error.
  763. //
  764. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  765. // API operation ListPlacements for usage and error information.
  766. //
  767. // Returned Error Codes:
  768. // * ErrCodeInternalFailureException "InternalFailureException"
  769. //
  770. // * ErrCodeInvalidRequestException "InvalidRequestException"
  771. //
  772. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  773. //
  774. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/ListPlacements
  775. func (c *IoT1ClickProjects) ListPlacements(input *ListPlacementsInput) (*ListPlacementsOutput, error) {
  776. req, out := c.ListPlacementsRequest(input)
  777. return out, req.Send()
  778. }
  779. // ListPlacementsWithContext is the same as ListPlacements with the addition of
  780. // the ability to pass a context and additional request options.
  781. //
  782. // See ListPlacements for details on how to use this API operation.
  783. //
  784. // The context must be non-nil and will be used for request cancellation. If
  785. // the context is nil a panic will occur. In the future the SDK may create
  786. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  787. // for more information on using Contexts.
  788. func (c *IoT1ClickProjects) ListPlacementsWithContext(ctx aws.Context, input *ListPlacementsInput, opts ...request.Option) (*ListPlacementsOutput, error) {
  789. req, out := c.ListPlacementsRequest(input)
  790. req.SetContext(ctx)
  791. req.ApplyOptions(opts...)
  792. return out, req.Send()
  793. }
  794. const opListProjects = "ListProjects"
  795. // ListProjectsRequest generates a "aws/request.Request" representing the
  796. // client's request for the ListProjects operation. The "output" return
  797. // value will be populated with the request's response once the request completes
  798. // successfully.
  799. //
  800. // Use "Send" method on the returned Request to send the API call to the service.
  801. // the "output" return value is not valid until after Send returns without error.
  802. //
  803. // See ListProjects for more information on using the ListProjects
  804. // API call, and error handling.
  805. //
  806. // This method is useful when you want to inject custom logic or configuration
  807. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  808. //
  809. //
  810. // // Example sending a request using the ListProjectsRequest method.
  811. // req, resp := client.ListProjectsRequest(params)
  812. //
  813. // err := req.Send()
  814. // if err == nil { // resp is now filled
  815. // fmt.Println(resp)
  816. // }
  817. //
  818. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/ListProjects
  819. func (c *IoT1ClickProjects) ListProjectsRequest(input *ListProjectsInput) (req *request.Request, output *ListProjectsOutput) {
  820. op := &request.Operation{
  821. Name: opListProjects,
  822. HTTPMethod: "GET",
  823. HTTPPath: "/projects",
  824. }
  825. if input == nil {
  826. input = &ListProjectsInput{}
  827. }
  828. output = &ListProjectsOutput{}
  829. req = c.newRequest(op, input, output)
  830. return
  831. }
  832. // ListProjects API operation for AWS IoT 1-Click Projects Service.
  833. //
  834. // Lists the AWS IoT 1-Click project(s) associated with your AWS account and
  835. // region.
  836. //
  837. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  838. // with awserr.Error's Code and Message methods to get detailed information about
  839. // the error.
  840. //
  841. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  842. // API operation ListProjects for usage and error information.
  843. //
  844. // Returned Error Codes:
  845. // * ErrCodeInternalFailureException "InternalFailureException"
  846. //
  847. // * ErrCodeInvalidRequestException "InvalidRequestException"
  848. //
  849. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/ListProjects
  850. func (c *IoT1ClickProjects) ListProjects(input *ListProjectsInput) (*ListProjectsOutput, error) {
  851. req, out := c.ListProjectsRequest(input)
  852. return out, req.Send()
  853. }
  854. // ListProjectsWithContext is the same as ListProjects with the addition of
  855. // the ability to pass a context and additional request options.
  856. //
  857. // See ListProjects for details on how to use this API operation.
  858. //
  859. // The context must be non-nil and will be used for request cancellation. If
  860. // the context is nil a panic will occur. In the future the SDK may create
  861. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  862. // for more information on using Contexts.
  863. func (c *IoT1ClickProjects) ListProjectsWithContext(ctx aws.Context, input *ListProjectsInput, opts ...request.Option) (*ListProjectsOutput, error) {
  864. req, out := c.ListProjectsRequest(input)
  865. req.SetContext(ctx)
  866. req.ApplyOptions(opts...)
  867. return out, req.Send()
  868. }
  869. const opUpdatePlacement = "UpdatePlacement"
  870. // UpdatePlacementRequest generates a "aws/request.Request" representing the
  871. // client's request for the UpdatePlacement operation. The "output" return
  872. // value will be populated with the request's response once the request completes
  873. // successfully.
  874. //
  875. // Use "Send" method on the returned Request to send the API call to the service.
  876. // the "output" return value is not valid until after Send returns without error.
  877. //
  878. // See UpdatePlacement for more information on using the UpdatePlacement
  879. // API call, and error handling.
  880. //
  881. // This method is useful when you want to inject custom logic or configuration
  882. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  883. //
  884. //
  885. // // Example sending a request using the UpdatePlacementRequest method.
  886. // req, resp := client.UpdatePlacementRequest(params)
  887. //
  888. // err := req.Send()
  889. // if err == nil { // resp is now filled
  890. // fmt.Println(resp)
  891. // }
  892. //
  893. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/UpdatePlacement
  894. func (c *IoT1ClickProjects) UpdatePlacementRequest(input *UpdatePlacementInput) (req *request.Request, output *UpdatePlacementOutput) {
  895. op := &request.Operation{
  896. Name: opUpdatePlacement,
  897. HTTPMethod: "PUT",
  898. HTTPPath: "/projects/{projectName}/placements/{placementName}",
  899. }
  900. if input == nil {
  901. input = &UpdatePlacementInput{}
  902. }
  903. output = &UpdatePlacementOutput{}
  904. req = c.newRequest(op, input, output)
  905. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  906. return
  907. }
  908. // UpdatePlacement API operation for AWS IoT 1-Click Projects Service.
  909. //
  910. // Updates a placement with the given attributes. To clear an attribute, pass
  911. // an empty value (i.e., "").
  912. //
  913. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  914. // with awserr.Error's Code and Message methods to get detailed information about
  915. // the error.
  916. //
  917. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  918. // API operation UpdatePlacement for usage and error information.
  919. //
  920. // Returned Error Codes:
  921. // * ErrCodeInternalFailureException "InternalFailureException"
  922. //
  923. // * ErrCodeInvalidRequestException "InvalidRequestException"
  924. //
  925. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  926. //
  927. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  928. //
  929. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/UpdatePlacement
  930. func (c *IoT1ClickProjects) UpdatePlacement(input *UpdatePlacementInput) (*UpdatePlacementOutput, error) {
  931. req, out := c.UpdatePlacementRequest(input)
  932. return out, req.Send()
  933. }
  934. // UpdatePlacementWithContext is the same as UpdatePlacement with the addition of
  935. // the ability to pass a context and additional request options.
  936. //
  937. // See UpdatePlacement for details on how to use this API operation.
  938. //
  939. // The context must be non-nil and will be used for request cancellation. If
  940. // the context is nil a panic will occur. In the future the SDK may create
  941. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  942. // for more information on using Contexts.
  943. func (c *IoT1ClickProjects) UpdatePlacementWithContext(ctx aws.Context, input *UpdatePlacementInput, opts ...request.Option) (*UpdatePlacementOutput, error) {
  944. req, out := c.UpdatePlacementRequest(input)
  945. req.SetContext(ctx)
  946. req.ApplyOptions(opts...)
  947. return out, req.Send()
  948. }
  949. const opUpdateProject = "UpdateProject"
  950. // UpdateProjectRequest generates a "aws/request.Request" representing the
  951. // client's request for the UpdateProject operation. The "output" return
  952. // value will be populated with the request's response once the request completes
  953. // successfully.
  954. //
  955. // Use "Send" method on the returned Request to send the API call to the service.
  956. // the "output" return value is not valid until after Send returns without error.
  957. //
  958. // See UpdateProject for more information on using the UpdateProject
  959. // API call, and error handling.
  960. //
  961. // This method is useful when you want to inject custom logic or configuration
  962. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  963. //
  964. //
  965. // // Example sending a request using the UpdateProjectRequest method.
  966. // req, resp := client.UpdateProjectRequest(params)
  967. //
  968. // err := req.Send()
  969. // if err == nil { // resp is now filled
  970. // fmt.Println(resp)
  971. // }
  972. //
  973. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/UpdateProject
  974. func (c *IoT1ClickProjects) UpdateProjectRequest(input *UpdateProjectInput) (req *request.Request, output *UpdateProjectOutput) {
  975. op := &request.Operation{
  976. Name: opUpdateProject,
  977. HTTPMethod: "PUT",
  978. HTTPPath: "/projects/{projectName}",
  979. }
  980. if input == nil {
  981. input = &UpdateProjectInput{}
  982. }
  983. output = &UpdateProjectOutput{}
  984. req = c.newRequest(op, input, output)
  985. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  986. return
  987. }
  988. // UpdateProject API operation for AWS IoT 1-Click Projects Service.
  989. //
  990. // Updates a project associated with your AWS account and region. With the exception
  991. // of device template names, you can pass just the values that need to be updated
  992. // because the update request will change only the values that are provided.
  993. // To clear a value, pass the empty string (i.e., "").
  994. //
  995. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  996. // with awserr.Error's Code and Message methods to get detailed information about
  997. // the error.
  998. //
  999. // See the AWS API reference guide for AWS IoT 1-Click Projects Service's
  1000. // API operation UpdateProject for usage and error information.
  1001. //
  1002. // Returned Error Codes:
  1003. // * ErrCodeInternalFailureException "InternalFailureException"
  1004. //
  1005. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1006. //
  1007. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1008. //
  1009. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1010. //
  1011. // See also, https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14/UpdateProject
  1012. func (c *IoT1ClickProjects) UpdateProject(input *UpdateProjectInput) (*UpdateProjectOutput, error) {
  1013. req, out := c.UpdateProjectRequest(input)
  1014. return out, req.Send()
  1015. }
  1016. // UpdateProjectWithContext is the same as UpdateProject with the addition of
  1017. // the ability to pass a context and additional request options.
  1018. //
  1019. // See UpdateProject for details on how to use this API operation.
  1020. //
  1021. // The context must be non-nil and will be used for request cancellation. If
  1022. // the context is nil a panic will occur. In the future the SDK may create
  1023. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1024. // for more information on using Contexts.
  1025. func (c *IoT1ClickProjects) UpdateProjectWithContext(ctx aws.Context, input *UpdateProjectInput, opts ...request.Option) (*UpdateProjectOutput, error) {
  1026. req, out := c.UpdateProjectRequest(input)
  1027. req.SetContext(ctx)
  1028. req.ApplyOptions(opts...)
  1029. return out, req.Send()
  1030. }
  1031. type AssociateDeviceWithPlacementInput struct {
  1032. _ struct{} `type:"structure"`
  1033. // The ID of the physical device to be associated with the given placement in
  1034. // the project. Note that a mandatory 4 character prefix is required for all
  1035. // deviceId values.
  1036. //
  1037. // DeviceId is a required field
  1038. DeviceId *string `locationName:"deviceId" min:"1" type:"string" required:"true"`
  1039. // The device template name to associate with the device ID.
  1040. //
  1041. // DeviceTemplateName is a required field
  1042. DeviceTemplateName *string `location:"uri" locationName:"deviceTemplateName" min:"1" type:"string" required:"true"`
  1043. // The name of the placement in which to associate the device.
  1044. //
  1045. // PlacementName is a required field
  1046. PlacementName *string `location:"uri" locationName:"placementName" min:"1" type:"string" required:"true"`
  1047. // The name of the project containing the placement in which to associate the
  1048. // device.
  1049. //
  1050. // ProjectName is a required field
  1051. ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"`
  1052. }
  1053. // String returns the string representation
  1054. func (s AssociateDeviceWithPlacementInput) String() string {
  1055. return awsutil.Prettify(s)
  1056. }
  1057. // GoString returns the string representation
  1058. func (s AssociateDeviceWithPlacementInput) GoString() string {
  1059. return s.String()
  1060. }
  1061. // Validate inspects the fields of the type to determine if they are valid.
  1062. func (s *AssociateDeviceWithPlacementInput) Validate() error {
  1063. invalidParams := request.ErrInvalidParams{Context: "AssociateDeviceWithPlacementInput"}
  1064. if s.DeviceId == nil {
  1065. invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  1066. }
  1067. if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  1068. invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  1069. }
  1070. if s.DeviceTemplateName == nil {
  1071. invalidParams.Add(request.NewErrParamRequired("DeviceTemplateName"))
  1072. }
  1073. if s.DeviceTemplateName != nil && len(*s.DeviceTemplateName) < 1 {
  1074. invalidParams.Add(request.NewErrParamMinLen("DeviceTemplateName", 1))
  1075. }
  1076. if s.PlacementName == nil {
  1077. invalidParams.Add(request.NewErrParamRequired("PlacementName"))
  1078. }
  1079. if s.PlacementName != nil && len(*s.PlacementName) < 1 {
  1080. invalidParams.Add(request.NewErrParamMinLen("PlacementName", 1))
  1081. }
  1082. if s.ProjectName == nil {
  1083. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  1084. }
  1085. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  1086. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  1087. }
  1088. if invalidParams.Len() > 0 {
  1089. return invalidParams
  1090. }
  1091. return nil
  1092. }
  1093. // SetDeviceId sets the DeviceId field's value.
  1094. func (s *AssociateDeviceWithPlacementInput) SetDeviceId(v string) *AssociateDeviceWithPlacementInput {
  1095. s.DeviceId = &v
  1096. return s
  1097. }
  1098. // SetDeviceTemplateName sets the DeviceTemplateName field's value.
  1099. func (s *AssociateDeviceWithPlacementInput) SetDeviceTemplateName(v string) *AssociateDeviceWithPlacementInput {
  1100. s.DeviceTemplateName = &v
  1101. return s
  1102. }
  1103. // SetPlacementName sets the PlacementName field's value.
  1104. func (s *AssociateDeviceWithPlacementInput) SetPlacementName(v string) *AssociateDeviceWithPlacementInput {
  1105. s.PlacementName = &v
  1106. return s
  1107. }
  1108. // SetProjectName sets the ProjectName field's value.
  1109. func (s *AssociateDeviceWithPlacementInput) SetProjectName(v string) *AssociateDeviceWithPlacementInput {
  1110. s.ProjectName = &v
  1111. return s
  1112. }
  1113. type AssociateDeviceWithPlacementOutput struct {
  1114. _ struct{} `type:"structure"`
  1115. }
  1116. // String returns the string representation
  1117. func (s AssociateDeviceWithPlacementOutput) String() string {
  1118. return awsutil.Prettify(s)
  1119. }
  1120. // GoString returns the string representation
  1121. func (s AssociateDeviceWithPlacementOutput) GoString() string {
  1122. return s.String()
  1123. }
  1124. type CreatePlacementInput struct {
  1125. _ struct{} `type:"structure"`
  1126. // Optional user-defined key/value pairs providing contextual data (such as
  1127. // location or function) for the placement.
  1128. Attributes map[string]*string `locationName:"attributes" type:"map"`
  1129. // The name of the placement to be created.
  1130. //
  1131. // PlacementName is a required field
  1132. PlacementName *string `locationName:"placementName" min:"1" type:"string" required:"true"`
  1133. // The name of the project in which to create the placement.
  1134. //
  1135. // ProjectName is a required field
  1136. ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"`
  1137. }
  1138. // String returns the string representation
  1139. func (s CreatePlacementInput) String() string {
  1140. return awsutil.Prettify(s)
  1141. }
  1142. // GoString returns the string representation
  1143. func (s CreatePlacementInput) GoString() string {
  1144. return s.String()
  1145. }
  1146. // Validate inspects the fields of the type to determine if they are valid.
  1147. func (s *CreatePlacementInput) Validate() error {
  1148. invalidParams := request.ErrInvalidParams{Context: "CreatePlacementInput"}
  1149. if s.PlacementName == nil {
  1150. invalidParams.Add(request.NewErrParamRequired("PlacementName"))
  1151. }
  1152. if s.PlacementName != nil && len(*s.PlacementName) < 1 {
  1153. invalidParams.Add(request.NewErrParamMinLen("PlacementName", 1))
  1154. }
  1155. if s.ProjectName == nil {
  1156. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  1157. }
  1158. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  1159. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  1160. }
  1161. if invalidParams.Len() > 0 {
  1162. return invalidParams
  1163. }
  1164. return nil
  1165. }
  1166. // SetAttributes sets the Attributes field's value.
  1167. func (s *CreatePlacementInput) SetAttributes(v map[string]*string) *CreatePlacementInput {
  1168. s.Attributes = v
  1169. return s
  1170. }
  1171. // SetPlacementName sets the PlacementName field's value.
  1172. func (s *CreatePlacementInput) SetPlacementName(v string) *CreatePlacementInput {
  1173. s.PlacementName = &v
  1174. return s
  1175. }
  1176. // SetProjectName sets the ProjectName field's value.
  1177. func (s *CreatePlacementInput) SetProjectName(v string) *CreatePlacementInput {
  1178. s.ProjectName = &v
  1179. return s
  1180. }
  1181. type CreatePlacementOutput struct {
  1182. _ struct{} `type:"structure"`
  1183. }
  1184. // String returns the string representation
  1185. func (s CreatePlacementOutput) String() string {
  1186. return awsutil.Prettify(s)
  1187. }
  1188. // GoString returns the string representation
  1189. func (s CreatePlacementOutput) GoString() string {
  1190. return s.String()
  1191. }
  1192. type CreateProjectInput struct {
  1193. _ struct{} `type:"structure"`
  1194. // An optional description for the project.
  1195. Description *string `locationName:"description" type:"string"`
  1196. // The schema defining the placement to be created. A placement template defines
  1197. // placement default attributes and device templates. You cannot add or remove
  1198. // device templates after the project has been created. However, you can update
  1199. // callbackOverrides for the device templates using the UpdateProject API.
  1200. PlacementTemplate *PlacementTemplate `locationName:"placementTemplate" type:"structure"`
  1201. // The name of the project to create.
  1202. //
  1203. // ProjectName is a required field
  1204. ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"`
  1205. }
  1206. // String returns the string representation
  1207. func (s CreateProjectInput) String() string {
  1208. return awsutil.Prettify(s)
  1209. }
  1210. // GoString returns the string representation
  1211. func (s CreateProjectInput) GoString() string {
  1212. return s.String()
  1213. }
  1214. // Validate inspects the fields of the type to determine if they are valid.
  1215. func (s *CreateProjectInput) Validate() error {
  1216. invalidParams := request.ErrInvalidParams{Context: "CreateProjectInput"}
  1217. if s.ProjectName == nil {
  1218. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  1219. }
  1220. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  1221. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  1222. }
  1223. if invalidParams.Len() > 0 {
  1224. return invalidParams
  1225. }
  1226. return nil
  1227. }
  1228. // SetDescription sets the Description field's value.
  1229. func (s *CreateProjectInput) SetDescription(v string) *CreateProjectInput {
  1230. s.Description = &v
  1231. return s
  1232. }
  1233. // SetPlacementTemplate sets the PlacementTemplate field's value.
  1234. func (s *CreateProjectInput) SetPlacementTemplate(v *PlacementTemplate) *CreateProjectInput {
  1235. s.PlacementTemplate = v
  1236. return s
  1237. }
  1238. // SetProjectName sets the ProjectName field's value.
  1239. func (s *CreateProjectInput) SetProjectName(v string) *CreateProjectInput {
  1240. s.ProjectName = &v
  1241. return s
  1242. }
  1243. type CreateProjectOutput struct {
  1244. _ struct{} `type:"structure"`
  1245. }
  1246. // String returns the string representation
  1247. func (s CreateProjectOutput) String() string {
  1248. return awsutil.Prettify(s)
  1249. }
  1250. // GoString returns the string representation
  1251. func (s CreateProjectOutput) GoString() string {
  1252. return s.String()
  1253. }
  1254. type DeletePlacementInput struct {
  1255. _ struct{} `type:"structure"`
  1256. // The name of the empty placement to delete.
  1257. //
  1258. // PlacementName is a required field
  1259. PlacementName *string `location:"uri" locationName:"placementName" min:"1" type:"string" required:"true"`
  1260. // The project containing the empty placement to delete.
  1261. //
  1262. // ProjectName is a required field
  1263. ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"`
  1264. }
  1265. // String returns the string representation
  1266. func (s DeletePlacementInput) String() string {
  1267. return awsutil.Prettify(s)
  1268. }
  1269. // GoString returns the string representation
  1270. func (s DeletePlacementInput) GoString() string {
  1271. return s.String()
  1272. }
  1273. // Validate inspects the fields of the type to determine if they are valid.
  1274. func (s *DeletePlacementInput) Validate() error {
  1275. invalidParams := request.ErrInvalidParams{Context: "DeletePlacementInput"}
  1276. if s.PlacementName == nil {
  1277. invalidParams.Add(request.NewErrParamRequired("PlacementName"))
  1278. }
  1279. if s.PlacementName != nil && len(*s.PlacementName) < 1 {
  1280. invalidParams.Add(request.NewErrParamMinLen("PlacementName", 1))
  1281. }
  1282. if s.ProjectName == nil {
  1283. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  1284. }
  1285. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  1286. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  1287. }
  1288. if invalidParams.Len() > 0 {
  1289. return invalidParams
  1290. }
  1291. return nil
  1292. }
  1293. // SetPlacementName sets the PlacementName field's value.
  1294. func (s *DeletePlacementInput) SetPlacementName(v string) *DeletePlacementInput {
  1295. s.PlacementName = &v
  1296. return s
  1297. }
  1298. // SetProjectName sets the ProjectName field's value.
  1299. func (s *DeletePlacementInput) SetProjectName(v string) *DeletePlacementInput {
  1300. s.ProjectName = &v
  1301. return s
  1302. }
  1303. type DeletePlacementOutput struct {
  1304. _ struct{} `type:"structure"`
  1305. }
  1306. // String returns the string representation
  1307. func (s DeletePlacementOutput) String() string {
  1308. return awsutil.Prettify(s)
  1309. }
  1310. // GoString returns the string representation
  1311. func (s DeletePlacementOutput) GoString() string {
  1312. return s.String()
  1313. }
  1314. type DeleteProjectInput struct {
  1315. _ struct{} `type:"structure"`
  1316. // The name of the empty project to delete.
  1317. //
  1318. // ProjectName is a required field
  1319. ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"`
  1320. }
  1321. // String returns the string representation
  1322. func (s DeleteProjectInput) String() string {
  1323. return awsutil.Prettify(s)
  1324. }
  1325. // GoString returns the string representation
  1326. func (s DeleteProjectInput) GoString() string {
  1327. return s.String()
  1328. }
  1329. // Validate inspects the fields of the type to determine if they are valid.
  1330. func (s *DeleteProjectInput) Validate() error {
  1331. invalidParams := request.ErrInvalidParams{Context: "DeleteProjectInput"}
  1332. if s.ProjectName == nil {
  1333. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  1334. }
  1335. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  1336. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  1337. }
  1338. if invalidParams.Len() > 0 {
  1339. return invalidParams
  1340. }
  1341. return nil
  1342. }
  1343. // SetProjectName sets the ProjectName field's value.
  1344. func (s *DeleteProjectInput) SetProjectName(v string) *DeleteProjectInput {
  1345. s.ProjectName = &v
  1346. return s
  1347. }
  1348. type DeleteProjectOutput struct {
  1349. _ struct{} `type:"structure"`
  1350. }
  1351. // String returns the string representation
  1352. func (s DeleteProjectOutput) String() string {
  1353. return awsutil.Prettify(s)
  1354. }
  1355. // GoString returns the string representation
  1356. func (s DeleteProjectOutput) GoString() string {
  1357. return s.String()
  1358. }
  1359. type DescribePlacementInput struct {
  1360. _ struct{} `type:"structure"`
  1361. // The name of the placement within a project.
  1362. //
  1363. // PlacementName is a required field
  1364. PlacementName *string `location:"uri" locationName:"placementName" min:"1" type:"string" required:"true"`
  1365. // The project containing the placement to be described.
  1366. //
  1367. // ProjectName is a required field
  1368. ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"`
  1369. }
  1370. // String returns the string representation
  1371. func (s DescribePlacementInput) String() string {
  1372. return awsutil.Prettify(s)
  1373. }
  1374. // GoString returns the string representation
  1375. func (s DescribePlacementInput) GoString() string {
  1376. return s.String()
  1377. }
  1378. // Validate inspects the fields of the type to determine if they are valid.
  1379. func (s *DescribePlacementInput) Validate() error {
  1380. invalidParams := request.ErrInvalidParams{Context: "DescribePlacementInput"}
  1381. if s.PlacementName == nil {
  1382. invalidParams.Add(request.NewErrParamRequired("PlacementName"))
  1383. }
  1384. if s.PlacementName != nil && len(*s.PlacementName) < 1 {
  1385. invalidParams.Add(request.NewErrParamMinLen("PlacementName", 1))
  1386. }
  1387. if s.ProjectName == nil {
  1388. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  1389. }
  1390. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  1391. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  1392. }
  1393. if invalidParams.Len() > 0 {
  1394. return invalidParams
  1395. }
  1396. return nil
  1397. }
  1398. // SetPlacementName sets the PlacementName field's value.
  1399. func (s *DescribePlacementInput) SetPlacementName(v string) *DescribePlacementInput {
  1400. s.PlacementName = &v
  1401. return s
  1402. }
  1403. // SetProjectName sets the ProjectName field's value.
  1404. func (s *DescribePlacementInput) SetProjectName(v string) *DescribePlacementInput {
  1405. s.ProjectName = &v
  1406. return s
  1407. }
  1408. type DescribePlacementOutput struct {
  1409. _ struct{} `type:"structure"`
  1410. // An object describing the placement.
  1411. //
  1412. // Placement is a required field
  1413. Placement *PlacementDescription `locationName:"placement" type:"structure" required:"true"`
  1414. }
  1415. // String returns the string representation
  1416. func (s DescribePlacementOutput) String() string {
  1417. return awsutil.Prettify(s)
  1418. }
  1419. // GoString returns the string representation
  1420. func (s DescribePlacementOutput) GoString() string {
  1421. return s.String()
  1422. }
  1423. // SetPlacement sets the Placement field's value.
  1424. func (s *DescribePlacementOutput) SetPlacement(v *PlacementDescription) *DescribePlacementOutput {
  1425. s.Placement = v
  1426. return s
  1427. }
  1428. type DescribeProjectInput struct {
  1429. _ struct{} `type:"structure"`
  1430. // The name of the project to be described.
  1431. //
  1432. // ProjectName is a required field
  1433. ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"`
  1434. }
  1435. // String returns the string representation
  1436. func (s DescribeProjectInput) String() string {
  1437. return awsutil.Prettify(s)
  1438. }
  1439. // GoString returns the string representation
  1440. func (s DescribeProjectInput) GoString() string {
  1441. return s.String()
  1442. }
  1443. // Validate inspects the fields of the type to determine if they are valid.
  1444. func (s *DescribeProjectInput) Validate() error {
  1445. invalidParams := request.ErrInvalidParams{Context: "DescribeProjectInput"}
  1446. if s.ProjectName == nil {
  1447. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  1448. }
  1449. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  1450. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  1451. }
  1452. if invalidParams.Len() > 0 {
  1453. return invalidParams
  1454. }
  1455. return nil
  1456. }
  1457. // SetProjectName sets the ProjectName field's value.
  1458. func (s *DescribeProjectInput) SetProjectName(v string) *DescribeProjectInput {
  1459. s.ProjectName = &v
  1460. return s
  1461. }
  1462. type DescribeProjectOutput struct {
  1463. _ struct{} `type:"structure"`
  1464. // An object describing the project.
  1465. //
  1466. // Project is a required field
  1467. Project *ProjectDescription `locationName:"project" type:"structure" required:"true"`
  1468. }
  1469. // String returns the string representation
  1470. func (s DescribeProjectOutput) String() string {
  1471. return awsutil.Prettify(s)
  1472. }
  1473. // GoString returns the string representation
  1474. func (s DescribeProjectOutput) GoString() string {
  1475. return s.String()
  1476. }
  1477. // SetProject sets the Project field's value.
  1478. func (s *DescribeProjectOutput) SetProject(v *ProjectDescription) *DescribeProjectOutput {
  1479. s.Project = v
  1480. return s
  1481. }
  1482. // An object representing a device for a placement template (see PlacementTemplate).
  1483. type DeviceTemplate struct {
  1484. _ struct{} `type:"structure"`
  1485. // An optional Lambda function to invoke instead of the default Lambda function
  1486. // provided by the placement template.
  1487. CallbackOverrides map[string]*string `locationName:"callbackOverrides" type:"map"`
  1488. // The device type, which currently must be "button".
  1489. DeviceType *string `locationName:"deviceType" type:"string"`
  1490. }
  1491. // String returns the string representation
  1492. func (s DeviceTemplate) String() string {
  1493. return awsutil.Prettify(s)
  1494. }
  1495. // GoString returns the string representation
  1496. func (s DeviceTemplate) GoString() string {
  1497. return s.String()
  1498. }
  1499. // SetCallbackOverrides sets the CallbackOverrides field's value.
  1500. func (s *DeviceTemplate) SetCallbackOverrides(v map[string]*string) *DeviceTemplate {
  1501. s.CallbackOverrides = v
  1502. return s
  1503. }
  1504. // SetDeviceType sets the DeviceType field's value.
  1505. func (s *DeviceTemplate) SetDeviceType(v string) *DeviceTemplate {
  1506. s.DeviceType = &v
  1507. return s
  1508. }
  1509. type DisassociateDeviceFromPlacementInput struct {
  1510. _ struct{} `type:"structure"`
  1511. // The device ID that should be removed from the placement.
  1512. //
  1513. // DeviceTemplateName is a required field
  1514. DeviceTemplateName *string `location:"uri" locationName:"deviceTemplateName" min:"1" type:"string" required:"true"`
  1515. // The name of the placement that the device should be removed from.
  1516. //
  1517. // PlacementName is a required field
  1518. PlacementName *string `location:"uri" locationName:"placementName" min:"1" type:"string" required:"true"`
  1519. // The name of the project that contains the placement.
  1520. //
  1521. // ProjectName is a required field
  1522. ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"`
  1523. }
  1524. // String returns the string representation
  1525. func (s DisassociateDeviceFromPlacementInput) String() string {
  1526. return awsutil.Prettify(s)
  1527. }
  1528. // GoString returns the string representation
  1529. func (s DisassociateDeviceFromPlacementInput) GoString() string {
  1530. return s.String()
  1531. }
  1532. // Validate inspects the fields of the type to determine if they are valid.
  1533. func (s *DisassociateDeviceFromPlacementInput) Validate() error {
  1534. invalidParams := request.ErrInvalidParams{Context: "DisassociateDeviceFromPlacementInput"}
  1535. if s.DeviceTemplateName == nil {
  1536. invalidParams.Add(request.NewErrParamRequired("DeviceTemplateName"))
  1537. }
  1538. if s.DeviceTemplateName != nil && len(*s.DeviceTemplateName) < 1 {
  1539. invalidParams.Add(request.NewErrParamMinLen("DeviceTemplateName", 1))
  1540. }
  1541. if s.PlacementName == nil {
  1542. invalidParams.Add(request.NewErrParamRequired("PlacementName"))
  1543. }
  1544. if s.PlacementName != nil && len(*s.PlacementName) < 1 {
  1545. invalidParams.Add(request.NewErrParamMinLen("PlacementName", 1))
  1546. }
  1547. if s.ProjectName == nil {
  1548. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  1549. }
  1550. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  1551. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  1552. }
  1553. if invalidParams.Len() > 0 {
  1554. return invalidParams
  1555. }
  1556. return nil
  1557. }
  1558. // SetDeviceTemplateName sets the DeviceTemplateName field's value.
  1559. func (s *DisassociateDeviceFromPlacementInput) SetDeviceTemplateName(v string) *DisassociateDeviceFromPlacementInput {
  1560. s.DeviceTemplateName = &v
  1561. return s
  1562. }
  1563. // SetPlacementName sets the PlacementName field's value.
  1564. func (s *DisassociateDeviceFromPlacementInput) SetPlacementName(v string) *DisassociateDeviceFromPlacementInput {
  1565. s.PlacementName = &v
  1566. return s
  1567. }
  1568. // SetProjectName sets the ProjectName field's value.
  1569. func (s *DisassociateDeviceFromPlacementInput) SetProjectName(v string) *DisassociateDeviceFromPlacementInput {
  1570. s.ProjectName = &v
  1571. return s
  1572. }
  1573. type DisassociateDeviceFromPlacementOutput struct {
  1574. _ struct{} `type:"structure"`
  1575. }
  1576. // String returns the string representation
  1577. func (s DisassociateDeviceFromPlacementOutput) String() string {
  1578. return awsutil.Prettify(s)
  1579. }
  1580. // GoString returns the string representation
  1581. func (s DisassociateDeviceFromPlacementOutput) GoString() string {
  1582. return s.String()
  1583. }
  1584. type GetDevicesInPlacementInput struct {
  1585. _ struct{} `type:"structure"`
  1586. // The name of the placement to get the devices from.
  1587. //
  1588. // PlacementName is a required field
  1589. PlacementName *string `location:"uri" locationName:"placementName" min:"1" type:"string" required:"true"`
  1590. // The name of the project containing the placement.
  1591. //
  1592. // ProjectName is a required field
  1593. ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"`
  1594. }
  1595. // String returns the string representation
  1596. func (s GetDevicesInPlacementInput) String() string {
  1597. return awsutil.Prettify(s)
  1598. }
  1599. // GoString returns the string representation
  1600. func (s GetDevicesInPlacementInput) GoString() string {
  1601. return s.String()
  1602. }
  1603. // Validate inspects the fields of the type to determine if they are valid.
  1604. func (s *GetDevicesInPlacementInput) Validate() error {
  1605. invalidParams := request.ErrInvalidParams{Context: "GetDevicesInPlacementInput"}
  1606. if s.PlacementName == nil {
  1607. invalidParams.Add(request.NewErrParamRequired("PlacementName"))
  1608. }
  1609. if s.PlacementName != nil && len(*s.PlacementName) < 1 {
  1610. invalidParams.Add(request.NewErrParamMinLen("PlacementName", 1))
  1611. }
  1612. if s.ProjectName == nil {
  1613. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  1614. }
  1615. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  1616. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  1617. }
  1618. if invalidParams.Len() > 0 {
  1619. return invalidParams
  1620. }
  1621. return nil
  1622. }
  1623. // SetPlacementName sets the PlacementName field's value.
  1624. func (s *GetDevicesInPlacementInput) SetPlacementName(v string) *GetDevicesInPlacementInput {
  1625. s.PlacementName = &v
  1626. return s
  1627. }
  1628. // SetProjectName sets the ProjectName field's value.
  1629. func (s *GetDevicesInPlacementInput) SetProjectName(v string) *GetDevicesInPlacementInput {
  1630. s.ProjectName = &v
  1631. return s
  1632. }
  1633. type GetDevicesInPlacementOutput struct {
  1634. _ struct{} `type:"structure"`
  1635. // An object containing the devices (zero or more) within the placement.
  1636. //
  1637. // Devices is a required field
  1638. Devices map[string]*string `locationName:"devices" type:"map" required:"true"`
  1639. }
  1640. // String returns the string representation
  1641. func (s GetDevicesInPlacementOutput) String() string {
  1642. return awsutil.Prettify(s)
  1643. }
  1644. // GoString returns the string representation
  1645. func (s GetDevicesInPlacementOutput) GoString() string {
  1646. return s.String()
  1647. }
  1648. // SetDevices sets the Devices field's value.
  1649. func (s *GetDevicesInPlacementOutput) SetDevices(v map[string]*string) *GetDevicesInPlacementOutput {
  1650. s.Devices = v
  1651. return s
  1652. }
  1653. type ListPlacementsInput struct {
  1654. _ struct{} `type:"structure"`
  1655. // The maximum number of results to return per request. If not set, a default
  1656. // value of 100 is used.
  1657. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  1658. // The token to retrieve the next set of results.
  1659. NextToken *string `location:"querystring" locationName:"nextToken" min:"1" type:"string"`
  1660. // The project containing the placements to be listed.
  1661. //
  1662. // ProjectName is a required field
  1663. ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"`
  1664. }
  1665. // String returns the string representation
  1666. func (s ListPlacementsInput) String() string {
  1667. return awsutil.Prettify(s)
  1668. }
  1669. // GoString returns the string representation
  1670. func (s ListPlacementsInput) GoString() string {
  1671. return s.String()
  1672. }
  1673. // Validate inspects the fields of the type to determine if they are valid.
  1674. func (s *ListPlacementsInput) Validate() error {
  1675. invalidParams := request.ErrInvalidParams{Context: "ListPlacementsInput"}
  1676. if s.MaxResults != nil && *s.MaxResults < 1 {
  1677. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1678. }
  1679. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1680. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1681. }
  1682. if s.ProjectName == nil {
  1683. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  1684. }
  1685. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  1686. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  1687. }
  1688. if invalidParams.Len() > 0 {
  1689. return invalidParams
  1690. }
  1691. return nil
  1692. }
  1693. // SetMaxResults sets the MaxResults field's value.
  1694. func (s *ListPlacementsInput) SetMaxResults(v int64) *ListPlacementsInput {
  1695. s.MaxResults = &v
  1696. return s
  1697. }
  1698. // SetNextToken sets the NextToken field's value.
  1699. func (s *ListPlacementsInput) SetNextToken(v string) *ListPlacementsInput {
  1700. s.NextToken = &v
  1701. return s
  1702. }
  1703. // SetProjectName sets the ProjectName field's value.
  1704. func (s *ListPlacementsInput) SetProjectName(v string) *ListPlacementsInput {
  1705. s.ProjectName = &v
  1706. return s
  1707. }
  1708. type ListPlacementsOutput struct {
  1709. _ struct{} `type:"structure"`
  1710. // The token used to retrieve the next set of results - will be effectively
  1711. // empty if there are no further results.
  1712. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  1713. // An object listing the requested placements.
  1714. //
  1715. // Placements is a required field
  1716. Placements []*PlacementSummary `locationName:"placements" type:"list" required:"true"`
  1717. }
  1718. // String returns the string representation
  1719. func (s ListPlacementsOutput) String() string {
  1720. return awsutil.Prettify(s)
  1721. }
  1722. // GoString returns the string representation
  1723. func (s ListPlacementsOutput) GoString() string {
  1724. return s.String()
  1725. }
  1726. // SetNextToken sets the NextToken field's value.
  1727. func (s *ListPlacementsOutput) SetNextToken(v string) *ListPlacementsOutput {
  1728. s.NextToken = &v
  1729. return s
  1730. }
  1731. // SetPlacements sets the Placements field's value.
  1732. func (s *ListPlacementsOutput) SetPlacements(v []*PlacementSummary) *ListPlacementsOutput {
  1733. s.Placements = v
  1734. return s
  1735. }
  1736. type ListProjectsInput struct {
  1737. _ struct{} `type:"structure"`
  1738. // The maximum number of results to return per request. If not set, a default
  1739. // value of 100 is used.
  1740. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  1741. // The token to retrieve the next set of results.
  1742. NextToken *string `location:"querystring" locationName:"nextToken" min:"1" type:"string"`
  1743. }
  1744. // String returns the string representation
  1745. func (s ListProjectsInput) String() string {
  1746. return awsutil.Prettify(s)
  1747. }
  1748. // GoString returns the string representation
  1749. func (s ListProjectsInput) GoString() string {
  1750. return s.String()
  1751. }
  1752. // Validate inspects the fields of the type to determine if they are valid.
  1753. func (s *ListProjectsInput) Validate() error {
  1754. invalidParams := request.ErrInvalidParams{Context: "ListProjectsInput"}
  1755. if s.MaxResults != nil && *s.MaxResults < 1 {
  1756. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1757. }
  1758. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1759. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1760. }
  1761. if invalidParams.Len() > 0 {
  1762. return invalidParams
  1763. }
  1764. return nil
  1765. }
  1766. // SetMaxResults sets the MaxResults field's value.
  1767. func (s *ListProjectsInput) SetMaxResults(v int64) *ListProjectsInput {
  1768. s.MaxResults = &v
  1769. return s
  1770. }
  1771. // SetNextToken sets the NextToken field's value.
  1772. func (s *ListProjectsInput) SetNextToken(v string) *ListProjectsInput {
  1773. s.NextToken = &v
  1774. return s
  1775. }
  1776. type ListProjectsOutput struct {
  1777. _ struct{} `type:"structure"`
  1778. // The token used to retrieve the next set of results - will be effectively
  1779. // empty if there are no further results.
  1780. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  1781. // An object containing the list of projects.
  1782. //
  1783. // Projects is a required field
  1784. Projects []*ProjectSummary `locationName:"projects" type:"list" required:"true"`
  1785. }
  1786. // String returns the string representation
  1787. func (s ListProjectsOutput) String() string {
  1788. return awsutil.Prettify(s)
  1789. }
  1790. // GoString returns the string representation
  1791. func (s ListProjectsOutput) GoString() string {
  1792. return s.String()
  1793. }
  1794. // SetNextToken sets the NextToken field's value.
  1795. func (s *ListProjectsOutput) SetNextToken(v string) *ListProjectsOutput {
  1796. s.NextToken = &v
  1797. return s
  1798. }
  1799. // SetProjects sets the Projects field's value.
  1800. func (s *ListProjectsOutput) SetProjects(v []*ProjectSummary) *ListProjectsOutput {
  1801. s.Projects = v
  1802. return s
  1803. }
  1804. // An object describing a project's placement.
  1805. type PlacementDescription struct {
  1806. _ struct{} `type:"structure"`
  1807. // The user-defined attributes associated with the placement.
  1808. //
  1809. // Attributes is a required field
  1810. Attributes map[string]*string `locationName:"attributes" type:"map" required:"true"`
  1811. // The date when the placement was initially created, in UNIX epoch time format.
  1812. //
  1813. // CreatedDate is a required field
  1814. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" required:"true"`
  1815. // The name of the placement.
  1816. //
  1817. // PlacementName is a required field
  1818. PlacementName *string `locationName:"placementName" min:"1" type:"string" required:"true"`
  1819. // The name of the project containing the placement.
  1820. //
  1821. // ProjectName is a required field
  1822. ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"`
  1823. // The date when the placement was last updated, in UNIX epoch time format.
  1824. // If the placement was not updated, then createdDate and updatedDate are the
  1825. // same.
  1826. //
  1827. // UpdatedDate is a required field
  1828. UpdatedDate *time.Time `locationName:"updatedDate" type:"timestamp" required:"true"`
  1829. }
  1830. // String returns the string representation
  1831. func (s PlacementDescription) String() string {
  1832. return awsutil.Prettify(s)
  1833. }
  1834. // GoString returns the string representation
  1835. func (s PlacementDescription) GoString() string {
  1836. return s.String()
  1837. }
  1838. // SetAttributes sets the Attributes field's value.
  1839. func (s *PlacementDescription) SetAttributes(v map[string]*string) *PlacementDescription {
  1840. s.Attributes = v
  1841. return s
  1842. }
  1843. // SetCreatedDate sets the CreatedDate field's value.
  1844. func (s *PlacementDescription) SetCreatedDate(v time.Time) *PlacementDescription {
  1845. s.CreatedDate = &v
  1846. return s
  1847. }
  1848. // SetPlacementName sets the PlacementName field's value.
  1849. func (s *PlacementDescription) SetPlacementName(v string) *PlacementDescription {
  1850. s.PlacementName = &v
  1851. return s
  1852. }
  1853. // SetProjectName sets the ProjectName field's value.
  1854. func (s *PlacementDescription) SetProjectName(v string) *PlacementDescription {
  1855. s.ProjectName = &v
  1856. return s
  1857. }
  1858. // SetUpdatedDate sets the UpdatedDate field's value.
  1859. func (s *PlacementDescription) SetUpdatedDate(v time.Time) *PlacementDescription {
  1860. s.UpdatedDate = &v
  1861. return s
  1862. }
  1863. // An object providing summary information for a particular placement.
  1864. type PlacementSummary struct {
  1865. _ struct{} `type:"structure"`
  1866. // The date when the placement was originally created, in UNIX epoch time format.
  1867. //
  1868. // CreatedDate is a required field
  1869. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" required:"true"`
  1870. // The name of the placement being summarized.
  1871. //
  1872. // PlacementName is a required field
  1873. PlacementName *string `locationName:"placementName" min:"1" type:"string" required:"true"`
  1874. // The name of the project containing the placement.
  1875. //
  1876. // ProjectName is a required field
  1877. ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"`
  1878. // The date when the placement was last updated, in UNIX epoch time format.
  1879. // If the placement was not updated, then createdDate and updatedDate are the
  1880. // same.
  1881. //
  1882. // UpdatedDate is a required field
  1883. UpdatedDate *time.Time `locationName:"updatedDate" type:"timestamp" required:"true"`
  1884. }
  1885. // String returns the string representation
  1886. func (s PlacementSummary) String() string {
  1887. return awsutil.Prettify(s)
  1888. }
  1889. // GoString returns the string representation
  1890. func (s PlacementSummary) GoString() string {
  1891. return s.String()
  1892. }
  1893. // SetCreatedDate sets the CreatedDate field's value.
  1894. func (s *PlacementSummary) SetCreatedDate(v time.Time) *PlacementSummary {
  1895. s.CreatedDate = &v
  1896. return s
  1897. }
  1898. // SetPlacementName sets the PlacementName field's value.
  1899. func (s *PlacementSummary) SetPlacementName(v string) *PlacementSummary {
  1900. s.PlacementName = &v
  1901. return s
  1902. }
  1903. // SetProjectName sets the ProjectName field's value.
  1904. func (s *PlacementSummary) SetProjectName(v string) *PlacementSummary {
  1905. s.ProjectName = &v
  1906. return s
  1907. }
  1908. // SetUpdatedDate sets the UpdatedDate field's value.
  1909. func (s *PlacementSummary) SetUpdatedDate(v time.Time) *PlacementSummary {
  1910. s.UpdatedDate = &v
  1911. return s
  1912. }
  1913. // An object defining the template for a placement.
  1914. type PlacementTemplate struct {
  1915. _ struct{} `type:"structure"`
  1916. // The default attributes (key/value pairs) to be applied to all placements
  1917. // using this template.
  1918. DefaultAttributes map[string]*string `locationName:"defaultAttributes" type:"map"`
  1919. // An object specifying the DeviceTemplate for all placements using this (PlacementTemplate)
  1920. // template.
  1921. DeviceTemplates map[string]*DeviceTemplate `locationName:"deviceTemplates" type:"map"`
  1922. }
  1923. // String returns the string representation
  1924. func (s PlacementTemplate) String() string {
  1925. return awsutil.Prettify(s)
  1926. }
  1927. // GoString returns the string representation
  1928. func (s PlacementTemplate) GoString() string {
  1929. return s.String()
  1930. }
  1931. // SetDefaultAttributes sets the DefaultAttributes field's value.
  1932. func (s *PlacementTemplate) SetDefaultAttributes(v map[string]*string) *PlacementTemplate {
  1933. s.DefaultAttributes = v
  1934. return s
  1935. }
  1936. // SetDeviceTemplates sets the DeviceTemplates field's value.
  1937. func (s *PlacementTemplate) SetDeviceTemplates(v map[string]*DeviceTemplate) *PlacementTemplate {
  1938. s.DeviceTemplates = v
  1939. return s
  1940. }
  1941. // An object providing detailed information for a particular project associated
  1942. // with an AWS account and region.
  1943. type ProjectDescription struct {
  1944. _ struct{} `type:"structure"`
  1945. // The date when the project was originally created, in UNIX epoch time format.
  1946. //
  1947. // CreatedDate is a required field
  1948. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" required:"true"`
  1949. // The description of the project.
  1950. Description *string `locationName:"description" type:"string"`
  1951. // An object describing the project's placement specifications.
  1952. PlacementTemplate *PlacementTemplate `locationName:"placementTemplate" type:"structure"`
  1953. // The name of the project for which to obtain information from.
  1954. //
  1955. // ProjectName is a required field
  1956. ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"`
  1957. // The date when the project was last updated, in UNIX epoch time format. If
  1958. // the project was not updated, then createdDate and updatedDate are the same.
  1959. //
  1960. // UpdatedDate is a required field
  1961. UpdatedDate *time.Time `locationName:"updatedDate" type:"timestamp" required:"true"`
  1962. }
  1963. // String returns the string representation
  1964. func (s ProjectDescription) String() string {
  1965. return awsutil.Prettify(s)
  1966. }
  1967. // GoString returns the string representation
  1968. func (s ProjectDescription) GoString() string {
  1969. return s.String()
  1970. }
  1971. // SetCreatedDate sets the CreatedDate field's value.
  1972. func (s *ProjectDescription) SetCreatedDate(v time.Time) *ProjectDescription {
  1973. s.CreatedDate = &v
  1974. return s
  1975. }
  1976. // SetDescription sets the Description field's value.
  1977. func (s *ProjectDescription) SetDescription(v string) *ProjectDescription {
  1978. s.Description = &v
  1979. return s
  1980. }
  1981. // SetPlacementTemplate sets the PlacementTemplate field's value.
  1982. func (s *ProjectDescription) SetPlacementTemplate(v *PlacementTemplate) *ProjectDescription {
  1983. s.PlacementTemplate = v
  1984. return s
  1985. }
  1986. // SetProjectName sets the ProjectName field's value.
  1987. func (s *ProjectDescription) SetProjectName(v string) *ProjectDescription {
  1988. s.ProjectName = &v
  1989. return s
  1990. }
  1991. // SetUpdatedDate sets the UpdatedDate field's value.
  1992. func (s *ProjectDescription) SetUpdatedDate(v time.Time) *ProjectDescription {
  1993. s.UpdatedDate = &v
  1994. return s
  1995. }
  1996. // An object providing summary information for a particular project for an associated
  1997. // AWS account and region.
  1998. type ProjectSummary struct {
  1999. _ struct{} `type:"structure"`
  2000. // The date when the project was originally created, in UNIX epoch time format.
  2001. //
  2002. // CreatedDate is a required field
  2003. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" required:"true"`
  2004. // The name of the project being summarized.
  2005. //
  2006. // ProjectName is a required field
  2007. ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"`
  2008. // The date when the project was last updated, in UNIX epoch time format. If
  2009. // the project was not updated, then createdDate and updatedDate are the same.
  2010. //
  2011. // UpdatedDate is a required field
  2012. UpdatedDate *time.Time `locationName:"updatedDate" type:"timestamp" required:"true"`
  2013. }
  2014. // String returns the string representation
  2015. func (s ProjectSummary) String() string {
  2016. return awsutil.Prettify(s)
  2017. }
  2018. // GoString returns the string representation
  2019. func (s ProjectSummary) GoString() string {
  2020. return s.String()
  2021. }
  2022. // SetCreatedDate sets the CreatedDate field's value.
  2023. func (s *ProjectSummary) SetCreatedDate(v time.Time) *ProjectSummary {
  2024. s.CreatedDate = &v
  2025. return s
  2026. }
  2027. // SetProjectName sets the ProjectName field's value.
  2028. func (s *ProjectSummary) SetProjectName(v string) *ProjectSummary {
  2029. s.ProjectName = &v
  2030. return s
  2031. }
  2032. // SetUpdatedDate sets the UpdatedDate field's value.
  2033. func (s *ProjectSummary) SetUpdatedDate(v time.Time) *ProjectSummary {
  2034. s.UpdatedDate = &v
  2035. return s
  2036. }
  2037. type UpdatePlacementInput struct {
  2038. _ struct{} `type:"structure"`
  2039. // The user-defined object of attributes used to update the placement. The maximum
  2040. // number of key/value pairs is 50.
  2041. Attributes map[string]*string `locationName:"attributes" type:"map"`
  2042. // The name of the placement to update.
  2043. //
  2044. // PlacementName is a required field
  2045. PlacementName *string `location:"uri" locationName:"placementName" min:"1" type:"string" required:"true"`
  2046. // The name of the project containing the placement to be updated.
  2047. //
  2048. // ProjectName is a required field
  2049. ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"`
  2050. }
  2051. // String returns the string representation
  2052. func (s UpdatePlacementInput) String() string {
  2053. return awsutil.Prettify(s)
  2054. }
  2055. // GoString returns the string representation
  2056. func (s UpdatePlacementInput) GoString() string {
  2057. return s.String()
  2058. }
  2059. // Validate inspects the fields of the type to determine if they are valid.
  2060. func (s *UpdatePlacementInput) Validate() error {
  2061. invalidParams := request.ErrInvalidParams{Context: "UpdatePlacementInput"}
  2062. if s.PlacementName == nil {
  2063. invalidParams.Add(request.NewErrParamRequired("PlacementName"))
  2064. }
  2065. if s.PlacementName != nil && len(*s.PlacementName) < 1 {
  2066. invalidParams.Add(request.NewErrParamMinLen("PlacementName", 1))
  2067. }
  2068. if s.ProjectName == nil {
  2069. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  2070. }
  2071. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  2072. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  2073. }
  2074. if invalidParams.Len() > 0 {
  2075. return invalidParams
  2076. }
  2077. return nil
  2078. }
  2079. // SetAttributes sets the Attributes field's value.
  2080. func (s *UpdatePlacementInput) SetAttributes(v map[string]*string) *UpdatePlacementInput {
  2081. s.Attributes = v
  2082. return s
  2083. }
  2084. // SetPlacementName sets the PlacementName field's value.
  2085. func (s *UpdatePlacementInput) SetPlacementName(v string) *UpdatePlacementInput {
  2086. s.PlacementName = &v
  2087. return s
  2088. }
  2089. // SetProjectName sets the ProjectName field's value.
  2090. func (s *UpdatePlacementInput) SetProjectName(v string) *UpdatePlacementInput {
  2091. s.ProjectName = &v
  2092. return s
  2093. }
  2094. type UpdatePlacementOutput struct {
  2095. _ struct{} `type:"structure"`
  2096. }
  2097. // String returns the string representation
  2098. func (s UpdatePlacementOutput) String() string {
  2099. return awsutil.Prettify(s)
  2100. }
  2101. // GoString returns the string representation
  2102. func (s UpdatePlacementOutput) GoString() string {
  2103. return s.String()
  2104. }
  2105. type UpdateProjectInput struct {
  2106. _ struct{} `type:"structure"`
  2107. // An optional user-defined description for the project.
  2108. Description *string `locationName:"description" type:"string"`
  2109. // An object defining the project update. Once a project has been created, you
  2110. // cannot add device template names to the project. However, for a given placementTemplate,
  2111. // you can update the associated callbackOverrides for the device definition
  2112. // using this API.
  2113. PlacementTemplate *PlacementTemplate `locationName:"placementTemplate" type:"structure"`
  2114. // The name of the project to be updated.
  2115. //
  2116. // ProjectName is a required field
  2117. ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"`
  2118. }
  2119. // String returns the string representation
  2120. func (s UpdateProjectInput) String() string {
  2121. return awsutil.Prettify(s)
  2122. }
  2123. // GoString returns the string representation
  2124. func (s UpdateProjectInput) GoString() string {
  2125. return s.String()
  2126. }
  2127. // Validate inspects the fields of the type to determine if they are valid.
  2128. func (s *UpdateProjectInput) Validate() error {
  2129. invalidParams := request.ErrInvalidParams{Context: "UpdateProjectInput"}
  2130. if s.ProjectName == nil {
  2131. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  2132. }
  2133. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  2134. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  2135. }
  2136. if invalidParams.Len() > 0 {
  2137. return invalidParams
  2138. }
  2139. return nil
  2140. }
  2141. // SetDescription sets the Description field's value.
  2142. func (s *UpdateProjectInput) SetDescription(v string) *UpdateProjectInput {
  2143. s.Description = &v
  2144. return s
  2145. }
  2146. // SetPlacementTemplate sets the PlacementTemplate field's value.
  2147. func (s *UpdateProjectInput) SetPlacementTemplate(v *PlacementTemplate) *UpdateProjectInput {
  2148. s.PlacementTemplate = v
  2149. return s
  2150. }
  2151. // SetProjectName sets the ProjectName field's value.
  2152. func (s *UpdateProjectInput) SetProjectName(v string) *UpdateProjectInput {
  2153. s.ProjectName = &v
  2154. return s
  2155. }
  2156. type UpdateProjectOutput struct {
  2157. _ struct{} `type:"structure"`
  2158. }
  2159. // String returns the string representation
  2160. func (s UpdateProjectOutput) String() string {
  2161. return awsutil.Prettify(s)
  2162. }
  2163. // GoString returns the string representation
  2164. func (s UpdateProjectOutput) GoString() string {
  2165. return s.String()
  2166. }