amazonka-iot1click-devices (empty) → 2.0
raw patch · 56 files changed
+4367/−0 lines, 56 filesdep +amazonka-coredep +amazonka-iot1click-devicesdep +amazonka-test
Dependencies added: amazonka-core, amazonka-iot1click-devices, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-iot1click-devices.cabal +101/−0
- fixture/ClaimDevicesByClaimCode.yaml +10/−0
- fixture/ClaimDevicesByClaimCodeResponse.proto +0/−0
- fixture/DescribeDevice.yaml +10/−0
- fixture/DescribeDeviceResponse.proto +0/−0
- fixture/FinalizeDeviceClaim.yaml +10/−0
- fixture/FinalizeDeviceClaimResponse.proto +0/−0
- fixture/GetDeviceMethods.yaml +10/−0
- fixture/GetDeviceMethodsResponse.proto +0/−0
- fixture/InitiateDeviceClaim.yaml +10/−0
- fixture/InitiateDeviceClaimResponse.proto +0/−0
- fixture/InvokeDeviceMethod.yaml +10/−0
- fixture/InvokeDeviceMethodResponse.proto +0/−0
- fixture/ListDeviceEvents.yaml +10/−0
- fixture/ListDeviceEventsResponse.proto +0/−0
- fixture/ListDevices.yaml +10/−0
- fixture/ListDevicesResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UnclaimDevice.yaml +10/−0
- fixture/UnclaimDeviceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateDeviceState.yaml +10/−0
- fixture/UpdateDeviceStateResponse.proto +0/−0
- gen/Amazonka/IoT1ClickDevices.hs +195/−0
- gen/Amazonka/IoT1ClickDevices/ClaimDevicesByClaimCode.hs +184/−0
- gen/Amazonka/IoT1ClickDevices/DescribeDevice.hs +159/−0
- gen/Amazonka/IoT1ClickDevices/FinalizeDeviceClaim.hs +195/−0
- gen/Amazonka/IoT1ClickDevices/GetDeviceMethods.hs +160/−0
- gen/Amazonka/IoT1ClickDevices/InitiateDeviceClaim.hs +166/−0
- gen/Amazonka/IoT1ClickDevices/InvokeDeviceMethod.hs +198/−0
- gen/Amazonka/IoT1ClickDevices/Lens.hs +137/−0
- gen/Amazonka/IoT1ClickDevices/ListDeviceEvents.hs +272/−0
- gen/Amazonka/IoT1ClickDevices/ListDevices.hs +224/−0
- gen/Amazonka/IoT1ClickDevices/ListTagsForResource.hs +168/−0
- gen/Amazonka/IoT1ClickDevices/TagResource.hs +153/−0
- gen/Amazonka/IoT1ClickDevices/Types.hs +199/−0
- gen/Amazonka/IoT1ClickDevices/Types/Attributes.hs +52/−0
- gen/Amazonka/IoT1ClickDevices/Types/Device.hs +95/−0
- gen/Amazonka/IoT1ClickDevices/Types/DeviceDescription.hs +148/−0
- gen/Amazonka/IoT1ClickDevices/Types/DeviceEvent.hs +83/−0
- gen/Amazonka/IoT1ClickDevices/Types/DeviceMethod.hs +91/−0
- gen/Amazonka/IoT1ClickDevices/UnclaimDevice.hs +161/−0
- gen/Amazonka/IoT1ClickDevices/UntagResource.hs +141/−0
- gen/Amazonka/IoT1ClickDevices/UpdateDeviceState.hs +171/−0
- gen/Amazonka/IoT1ClickDevices/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/Gen/IoT1ClickDevices.hs +298/−0
- test/Test/Amazonka/IoT1ClickDevices.hs +20/−0
- test/Test/Amazonka/IoT1ClickDevices/Internal.hs +8/−0
+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,44 @@+# Amazon IoT 1-Click Devices Service SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2018-05-14@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-iot1click-devices)+and the [AWS API Reference](https://aws.amazon.com/documentation/).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information, sending requests,+and receiving responses.++Lenses are used for constructing and manipulating types,+due to the depth of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++See [Amazonka.IoT1ClickDevices](http://hackage.haskell.org/package/amazonka-iot1click-devices/docs/Amazonka-IoT1ClickDevices.html)+or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`amazonka-iot1click-devices` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).++Parts of the code are derived from AWS service descriptions, licensed under Apache 2.0.+Source files subject to this contain an additional licensing clause in their header.
+ amazonka-iot1click-devices.cabal view
@@ -0,0 +1,101 @@+cabal-version: 2.2+name: amazonka-iot1click-devices+version: 2.0+synopsis: Amazon IoT 1-Click Devices Service SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: MPL-2.0+license-file: LICENSE+author: Brendan Hay+maintainer:+ Brendan Hay <brendan.g.hay+amazonka@gmail.com>, Jack Kelly <jack@jackkelly.name>++copyright: Copyright (c) 2013-2023 Brendan Hay+category: AWS+build-type: Simple+extra-source-files:+ fixture/*.proto+ fixture/*.yaml+ README.md+ src/.gitkeep++description:+ Derived from API version @2018-05-14@ of the AWS service descriptions, licensed under Apache 2.0.+ .+ The types from this library are intended to be used with <http://hackage.haskell.org/package/amazonka amazonka>,+ which provides mechanisms for specifying AuthN/AuthZ information, sending requests, and receiving responses.+ .+ It is recommended to use generic lenses or optics from packages such as <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify optional fields and deconstruct responses.+ .+ Generated lenses can be found in "Amazonka.IoT1ClickDevices.Lens" and are+ suitable for use with a lens package such as <http://hackage.haskell.org/package/lens lens> or <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Amazonka.IoT1ClickDevices" and the <https://aws.amazon.com/documentation/ AWS documentation> to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git+ subdir: amazonka-iot1click-devices++library+ default-language: Haskell2010+ hs-source-dirs: src gen+ ghc-options:+ -Wall -fwarn-incomplete-uni-patterns+ -fwarn-incomplete-record-updates -funbox-strict-fields++ exposed-modules:+ Amazonka.IoT1ClickDevices+ Amazonka.IoT1ClickDevices.ClaimDevicesByClaimCode+ Amazonka.IoT1ClickDevices.DescribeDevice+ Amazonka.IoT1ClickDevices.FinalizeDeviceClaim+ Amazonka.IoT1ClickDevices.GetDeviceMethods+ Amazonka.IoT1ClickDevices.InitiateDeviceClaim+ Amazonka.IoT1ClickDevices.InvokeDeviceMethod+ Amazonka.IoT1ClickDevices.Lens+ Amazonka.IoT1ClickDevices.ListDeviceEvents+ Amazonka.IoT1ClickDevices.ListDevices+ Amazonka.IoT1ClickDevices.ListTagsForResource+ Amazonka.IoT1ClickDevices.TagResource+ Amazonka.IoT1ClickDevices.Types+ Amazonka.IoT1ClickDevices.Types.Attributes+ Amazonka.IoT1ClickDevices.Types.Device+ Amazonka.IoT1ClickDevices.Types.DeviceDescription+ Amazonka.IoT1ClickDevices.Types.DeviceEvent+ Amazonka.IoT1ClickDevices.Types.DeviceMethod+ Amazonka.IoT1ClickDevices.UnclaimDevice+ Amazonka.IoT1ClickDevices.UntagResource+ Amazonka.IoT1ClickDevices.UpdateDeviceState+ Amazonka.IoT1ClickDevices.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-iot1click-devices-test+ type: exitcode-stdio-1.0+ default-language: Haskell2010+ hs-source-dirs: test+ main-is: Main.hs+ ghc-options: -Wall -threaded++ -- This section is encoded by the template and any modules added by+ -- hand outside these namespaces will not correctly be added to the+ -- distribution package.+ other-modules:+ Test.Amazonka.Gen.IoT1ClickDevices+ Test.Amazonka.IoT1ClickDevices+ Test.Amazonka.IoT1ClickDevices.Internal++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , amazonka-iot1click-devices+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/ClaimDevicesByClaimCode.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ClaimDevicesByClaimCodeResponse.proto view
+ fixture/DescribeDevice.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeDeviceResponse.proto view
+ fixture/FinalizeDeviceClaim.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/FinalizeDeviceClaimResponse.proto view
+ fixture/GetDeviceMethods.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/GetDeviceMethodsResponse.proto view
+ fixture/InitiateDeviceClaim.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/InitiateDeviceClaimResponse.proto view
+ fixture/InvokeDeviceMethod.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/InvokeDeviceMethodResponse.proto view
+ fixture/ListDeviceEvents.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListDeviceEventsResponse.proto view
+ fixture/ListDevices.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListDevicesResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListTagsForResourceResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/TagResourceResponse.proto view
+ fixture/UnclaimDevice.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UnclaimDeviceResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UntagResourceResponse.proto view
+ fixture/UpdateDeviceState.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/devices.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: devices.iot1click.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdateDeviceStateResponse.proto view
+ gen/Amazonka/IoT1ClickDevices.hs view
@@ -0,0 +1,195 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.IoT1ClickDevices+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Derived from API version @2018-05-14@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Describes all of the AWS IoT 1-Click device-related API operations for+-- the service. Also provides sample requests, responses, and errors for+-- the supported web services protocols.+module Amazonka.IoT1ClickDevices+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** ForbiddenException+ _ForbiddenException,++ -- ** InternalFailureException+ _InternalFailureException,++ -- ** InvalidRequestException+ _InvalidRequestException,++ -- ** PreconditionFailedException+ _PreconditionFailedException,++ -- ** RangeNotSatisfiableException+ _RangeNotSatisfiableException,++ -- ** ResourceConflictException+ _ResourceConflictException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** ClaimDevicesByClaimCode+ ClaimDevicesByClaimCode (ClaimDevicesByClaimCode'),+ newClaimDevicesByClaimCode,+ ClaimDevicesByClaimCodeResponse (ClaimDevicesByClaimCodeResponse'),+ newClaimDevicesByClaimCodeResponse,++ -- ** DescribeDevice+ DescribeDevice (DescribeDevice'),+ newDescribeDevice,+ DescribeDeviceResponse (DescribeDeviceResponse'),+ newDescribeDeviceResponse,++ -- ** FinalizeDeviceClaim+ FinalizeDeviceClaim (FinalizeDeviceClaim'),+ newFinalizeDeviceClaim,+ FinalizeDeviceClaimResponse (FinalizeDeviceClaimResponse'),+ newFinalizeDeviceClaimResponse,++ -- ** GetDeviceMethods+ GetDeviceMethods (GetDeviceMethods'),+ newGetDeviceMethods,+ GetDeviceMethodsResponse (GetDeviceMethodsResponse'),+ newGetDeviceMethodsResponse,++ -- ** InitiateDeviceClaim+ InitiateDeviceClaim (InitiateDeviceClaim'),+ newInitiateDeviceClaim,+ InitiateDeviceClaimResponse (InitiateDeviceClaimResponse'),+ newInitiateDeviceClaimResponse,++ -- ** InvokeDeviceMethod+ InvokeDeviceMethod (InvokeDeviceMethod'),+ newInvokeDeviceMethod,+ InvokeDeviceMethodResponse (InvokeDeviceMethodResponse'),+ newInvokeDeviceMethodResponse,++ -- ** ListDeviceEvents (Paginated)+ ListDeviceEvents (ListDeviceEvents'),+ newListDeviceEvents,+ ListDeviceEventsResponse (ListDeviceEventsResponse'),+ newListDeviceEventsResponse,++ -- ** ListDevices (Paginated)+ ListDevices (ListDevices'),+ newListDevices,+ ListDevicesResponse (ListDevicesResponse'),+ newListDevicesResponse,++ -- ** ListTagsForResource+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UnclaimDevice+ UnclaimDevice (UnclaimDevice'),+ newUnclaimDevice,+ UnclaimDeviceResponse (UnclaimDeviceResponse'),+ newUnclaimDeviceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateDeviceState+ UpdateDeviceState (UpdateDeviceState'),+ newUpdateDeviceState,+ UpdateDeviceStateResponse (UpdateDeviceStateResponse'),+ newUpdateDeviceStateResponse,++ -- * Types++ -- ** Attributes+ Attributes (Attributes'),+ newAttributes,++ -- ** Device+ Device (Device'),+ newDevice,++ -- ** DeviceDescription+ DeviceDescription (DeviceDescription'),+ newDeviceDescription,++ -- ** DeviceEvent+ DeviceEvent (DeviceEvent'),+ newDeviceEvent,++ -- ** DeviceMethod+ DeviceMethod (DeviceMethod'),+ newDeviceMethod,+ )+where++import Amazonka.IoT1ClickDevices.ClaimDevicesByClaimCode+import Amazonka.IoT1ClickDevices.DescribeDevice+import Amazonka.IoT1ClickDevices.FinalizeDeviceClaim+import Amazonka.IoT1ClickDevices.GetDeviceMethods+import Amazonka.IoT1ClickDevices.InitiateDeviceClaim+import Amazonka.IoT1ClickDevices.InvokeDeviceMethod+import Amazonka.IoT1ClickDevices.Lens+import Amazonka.IoT1ClickDevices.ListDeviceEvents+import Amazonka.IoT1ClickDevices.ListDevices+import Amazonka.IoT1ClickDevices.ListTagsForResource+import Amazonka.IoT1ClickDevices.TagResource+import Amazonka.IoT1ClickDevices.Types+import Amazonka.IoT1ClickDevices.UnclaimDevice+import Amazonka.IoT1ClickDevices.UntagResource+import Amazonka.IoT1ClickDevices.UpdateDeviceState+import Amazonka.IoT1ClickDevices.Waiters++-- $errors+-- Error matchers are designed for use with the functions provided by+-- <http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.+-- This allows catching (and rethrowing) service specific errors returned+-- by 'IoT1ClickDevices'.++-- $operations+-- Some AWS operations return results that are incomplete and require subsequent+-- requests in order to obtain the entire result set. The process of sending+-- subsequent requests to continue where a previous request left off is called+-- pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+-- 1000 objects at a time, and you must send subsequent requests with the+-- appropriate Marker in order to retrieve the next page of results.+--+-- Operations that have an 'AWSPager' instance can transparently perform subsequent+-- requests, correctly setting Markers and other request facets to iterate through+-- the entire result set of a truncated API operation. Operations which support+-- this have an additional note in the documentation.+--+-- Many operations have the ability to filter results on the server side. See the+-- individual operation parameters for details.++-- $waiters+-- Waiters poll by repeatedly sending a request until some remote success condition+-- configured by the 'Wait' specification is fulfilled. The 'Wait' specification+-- determines how many attempts should be made, in addition to delay and retry strategies.
+ gen/Amazonka/IoT1ClickDevices/ClaimDevicesByClaimCode.hs view
@@ -0,0 +1,184 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.ClaimDevicesByClaimCode+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Adds device(s) to your account (i.e., claim one or more devices) if and+-- only if you received a claim code with the device(s).+module Amazonka.IoT1ClickDevices.ClaimDevicesByClaimCode+ ( -- * Creating a Request+ ClaimDevicesByClaimCode (..),+ newClaimDevicesByClaimCode,++ -- * Request Lenses+ claimDevicesByClaimCode_claimCode,++ -- * Destructuring the Response+ ClaimDevicesByClaimCodeResponse (..),+ newClaimDevicesByClaimCodeResponse,++ -- * Response Lenses+ claimDevicesByClaimCodeResponse_claimCode,+ claimDevicesByClaimCodeResponse_total,+ claimDevicesByClaimCodeResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newClaimDevicesByClaimCode' smart constructor.+data ClaimDevicesByClaimCode = ClaimDevicesByClaimCode'+ { -- | The claim code, starting with \"C-\", as provided by the device+ -- manufacturer.+ claimCode :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ClaimDevicesByClaimCode' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'claimCode', 'claimDevicesByClaimCode_claimCode' - The claim code, starting with \"C-\", as provided by the device+-- manufacturer.+newClaimDevicesByClaimCode ::+ -- | 'claimCode'+ Prelude.Text ->+ ClaimDevicesByClaimCode+newClaimDevicesByClaimCode pClaimCode_ =+ ClaimDevicesByClaimCode' {claimCode = pClaimCode_}++-- | The claim code, starting with \"C-\", as provided by the device+-- manufacturer.+claimDevicesByClaimCode_claimCode :: Lens.Lens' ClaimDevicesByClaimCode Prelude.Text+claimDevicesByClaimCode_claimCode = Lens.lens (\ClaimDevicesByClaimCode' {claimCode} -> claimCode) (\s@ClaimDevicesByClaimCode' {} a -> s {claimCode = a} :: ClaimDevicesByClaimCode)++instance Core.AWSRequest ClaimDevicesByClaimCode where+ type+ AWSResponse ClaimDevicesByClaimCode =+ ClaimDevicesByClaimCodeResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ClaimDevicesByClaimCodeResponse'+ Prelude.<$> (x Data..?> "claimCode")+ Prelude.<*> (x Data..?> "total")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ClaimDevicesByClaimCode where+ hashWithSalt _salt ClaimDevicesByClaimCode' {..} =+ _salt `Prelude.hashWithSalt` claimCode++instance Prelude.NFData ClaimDevicesByClaimCode where+ rnf ClaimDevicesByClaimCode' {..} =+ Prelude.rnf claimCode++instance Data.ToHeaders ClaimDevicesByClaimCode where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ClaimDevicesByClaimCode where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath ClaimDevicesByClaimCode where+ toPath ClaimDevicesByClaimCode' {..} =+ Prelude.mconcat ["/claims/", Data.toBS claimCode]++instance Data.ToQuery ClaimDevicesByClaimCode where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newClaimDevicesByClaimCodeResponse' smart constructor.+data ClaimDevicesByClaimCodeResponse = ClaimDevicesByClaimCodeResponse'+ { -- | The claim code provided by the device manufacturer.+ claimCode :: Prelude.Maybe Prelude.Text,+ -- | The total number of devices associated with the claim code that has been+ -- processed in the claim request.+ total :: Prelude.Maybe Prelude.Int,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ClaimDevicesByClaimCodeResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'claimCode', 'claimDevicesByClaimCodeResponse_claimCode' - The claim code provided by the device manufacturer.+--+-- 'total', 'claimDevicesByClaimCodeResponse_total' - The total number of devices associated with the claim code that has been+-- processed in the claim request.+--+-- 'httpStatus', 'claimDevicesByClaimCodeResponse_httpStatus' - The response's http status code.+newClaimDevicesByClaimCodeResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ClaimDevicesByClaimCodeResponse+newClaimDevicesByClaimCodeResponse pHttpStatus_ =+ ClaimDevicesByClaimCodeResponse'+ { claimCode =+ Prelude.Nothing,+ total = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The claim code provided by the device manufacturer.+claimDevicesByClaimCodeResponse_claimCode :: Lens.Lens' ClaimDevicesByClaimCodeResponse (Prelude.Maybe Prelude.Text)+claimDevicesByClaimCodeResponse_claimCode = Lens.lens (\ClaimDevicesByClaimCodeResponse' {claimCode} -> claimCode) (\s@ClaimDevicesByClaimCodeResponse' {} a -> s {claimCode = a} :: ClaimDevicesByClaimCodeResponse)++-- | The total number of devices associated with the claim code that has been+-- processed in the claim request.+claimDevicesByClaimCodeResponse_total :: Lens.Lens' ClaimDevicesByClaimCodeResponse (Prelude.Maybe Prelude.Int)+claimDevicesByClaimCodeResponse_total = Lens.lens (\ClaimDevicesByClaimCodeResponse' {total} -> total) (\s@ClaimDevicesByClaimCodeResponse' {} a -> s {total = a} :: ClaimDevicesByClaimCodeResponse)++-- | The response's http status code.+claimDevicesByClaimCodeResponse_httpStatus :: Lens.Lens' ClaimDevicesByClaimCodeResponse Prelude.Int+claimDevicesByClaimCodeResponse_httpStatus = Lens.lens (\ClaimDevicesByClaimCodeResponse' {httpStatus} -> httpStatus) (\s@ClaimDevicesByClaimCodeResponse' {} a -> s {httpStatus = a} :: ClaimDevicesByClaimCodeResponse)++instance+ Prelude.NFData+ ClaimDevicesByClaimCodeResponse+ where+ rnf ClaimDevicesByClaimCodeResponse' {..} =+ Prelude.rnf claimCode+ `Prelude.seq` Prelude.rnf total+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickDevices/DescribeDevice.hs view
@@ -0,0 +1,159 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.DescribeDevice+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Given a device ID, returns a DescribeDeviceResponse object describing+-- the details of the device.+module Amazonka.IoT1ClickDevices.DescribeDevice+ ( -- * Creating a Request+ DescribeDevice (..),+ newDescribeDevice,++ -- * Request Lenses+ describeDevice_deviceId,++ -- * Destructuring the Response+ DescribeDeviceResponse (..),+ newDescribeDeviceResponse,++ -- * Response Lenses+ describeDeviceResponse_deviceDescription,+ describeDeviceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeDevice' smart constructor.+data DescribeDevice = DescribeDevice'+ { -- | The unique identifier of the device.+ deviceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeDevice' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'deviceId', 'describeDevice_deviceId' - The unique identifier of the device.+newDescribeDevice ::+ -- | 'deviceId'+ Prelude.Text ->+ DescribeDevice+newDescribeDevice pDeviceId_ =+ DescribeDevice' {deviceId = pDeviceId_}++-- | The unique identifier of the device.+describeDevice_deviceId :: Lens.Lens' DescribeDevice Prelude.Text+describeDevice_deviceId = Lens.lens (\DescribeDevice' {deviceId} -> deviceId) (\s@DescribeDevice' {} a -> s {deviceId = a} :: DescribeDevice)++instance Core.AWSRequest DescribeDevice where+ type+ AWSResponse DescribeDevice =+ DescribeDeviceResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeDeviceResponse'+ Prelude.<$> (x Data..?> "deviceDescription")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeDevice where+ hashWithSalt _salt DescribeDevice' {..} =+ _salt `Prelude.hashWithSalt` deviceId++instance Prelude.NFData DescribeDevice where+ rnf DescribeDevice' {..} = Prelude.rnf deviceId++instance Data.ToHeaders DescribeDevice where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeDevice where+ toPath DescribeDevice' {..} =+ Prelude.mconcat ["/devices/", Data.toBS deviceId]++instance Data.ToQuery DescribeDevice where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeDeviceResponse' smart constructor.+data DescribeDeviceResponse = DescribeDeviceResponse'+ { -- | Device details.+ deviceDescription :: Prelude.Maybe DeviceDescription,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeDeviceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'deviceDescription', 'describeDeviceResponse_deviceDescription' - Device details.+--+-- 'httpStatus', 'describeDeviceResponse_httpStatus' - The response's http status code.+newDescribeDeviceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeDeviceResponse+newDescribeDeviceResponse pHttpStatus_ =+ DescribeDeviceResponse'+ { deviceDescription =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Device details.+describeDeviceResponse_deviceDescription :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe DeviceDescription)+describeDeviceResponse_deviceDescription = Lens.lens (\DescribeDeviceResponse' {deviceDescription} -> deviceDescription) (\s@DescribeDeviceResponse' {} a -> s {deviceDescription = a} :: DescribeDeviceResponse)++-- | The response's http status code.+describeDeviceResponse_httpStatus :: Lens.Lens' DescribeDeviceResponse Prelude.Int+describeDeviceResponse_httpStatus = Lens.lens (\DescribeDeviceResponse' {httpStatus} -> httpStatus) (\s@DescribeDeviceResponse' {} a -> s {httpStatus = a} :: DescribeDeviceResponse)++instance Prelude.NFData DescribeDeviceResponse where+ rnf DescribeDeviceResponse' {..} =+ Prelude.rnf deviceDescription+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickDevices/FinalizeDeviceClaim.hs view
@@ -0,0 +1,195 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.FinalizeDeviceClaim+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Given a device ID, finalizes the claim request for the associated+-- device.+--+-- Claiming a device consists of initiating a claim, then publishing a+-- device event, and finalizing the claim. For a device of type button, a+-- device event can be published by simply clicking the device.+module Amazonka.IoT1ClickDevices.FinalizeDeviceClaim+ ( -- * Creating a Request+ FinalizeDeviceClaim (..),+ newFinalizeDeviceClaim,++ -- * Request Lenses+ finalizeDeviceClaim_tags,+ finalizeDeviceClaim_deviceId,++ -- * Destructuring the Response+ FinalizeDeviceClaimResponse (..),+ newFinalizeDeviceClaimResponse,++ -- * Response Lenses+ finalizeDeviceClaimResponse_state,+ finalizeDeviceClaimResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newFinalizeDeviceClaim' smart constructor.+data FinalizeDeviceClaim = FinalizeDeviceClaim'+ { -- | A collection of key\/value pairs defining the resource tags. For+ -- example, { \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For+ -- more information, see+ -- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The unique identifier of the device.+ deviceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FinalizeDeviceClaim' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tags', 'finalizeDeviceClaim_tags' - A collection of key\/value pairs defining the resource tags. For+-- example, { \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For+-- more information, see+-- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+--+-- 'deviceId', 'finalizeDeviceClaim_deviceId' - The unique identifier of the device.+newFinalizeDeviceClaim ::+ -- | 'deviceId'+ Prelude.Text ->+ FinalizeDeviceClaim+newFinalizeDeviceClaim pDeviceId_ =+ FinalizeDeviceClaim'+ { tags = Prelude.Nothing,+ deviceId = pDeviceId_+ }++-- | A collection of key\/value pairs defining the resource tags. For+-- example, { \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For+-- more information, see+-- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+finalizeDeviceClaim_tags :: Lens.Lens' FinalizeDeviceClaim (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+finalizeDeviceClaim_tags = Lens.lens (\FinalizeDeviceClaim' {tags} -> tags) (\s@FinalizeDeviceClaim' {} a -> s {tags = a} :: FinalizeDeviceClaim) Prelude.. Lens.mapping Lens.coerced++-- | The unique identifier of the device.+finalizeDeviceClaim_deviceId :: Lens.Lens' FinalizeDeviceClaim Prelude.Text+finalizeDeviceClaim_deviceId = Lens.lens (\FinalizeDeviceClaim' {deviceId} -> deviceId) (\s@FinalizeDeviceClaim' {} a -> s {deviceId = a} :: FinalizeDeviceClaim)++instance Core.AWSRequest FinalizeDeviceClaim where+ type+ AWSResponse FinalizeDeviceClaim =+ FinalizeDeviceClaimResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ FinalizeDeviceClaimResponse'+ Prelude.<$> (x Data..?> "state")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable FinalizeDeviceClaim where+ hashWithSalt _salt FinalizeDeviceClaim' {..} =+ _salt+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` deviceId++instance Prelude.NFData FinalizeDeviceClaim where+ rnf FinalizeDeviceClaim' {..} =+ Prelude.rnf tags `Prelude.seq` Prelude.rnf deviceId++instance Data.ToHeaders FinalizeDeviceClaim where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON FinalizeDeviceClaim where+ toJSON FinalizeDeviceClaim' {..} =+ Data.object+ ( Prelude.catMaybes+ [("tags" Data..=) Prelude.<$> tags]+ )++instance Data.ToPath FinalizeDeviceClaim where+ toPath FinalizeDeviceClaim' {..} =+ Prelude.mconcat+ ["/devices/", Data.toBS deviceId, "/finalize-claim"]++instance Data.ToQuery FinalizeDeviceClaim where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newFinalizeDeviceClaimResponse' smart constructor.+data FinalizeDeviceClaimResponse = FinalizeDeviceClaimResponse'+ { -- | The device\'s final claim state.+ state :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FinalizeDeviceClaimResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'state', 'finalizeDeviceClaimResponse_state' - The device\'s final claim state.+--+-- 'httpStatus', 'finalizeDeviceClaimResponse_httpStatus' - The response's http status code.+newFinalizeDeviceClaimResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ FinalizeDeviceClaimResponse+newFinalizeDeviceClaimResponse pHttpStatus_ =+ FinalizeDeviceClaimResponse'+ { state =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The device\'s final claim state.+finalizeDeviceClaimResponse_state :: Lens.Lens' FinalizeDeviceClaimResponse (Prelude.Maybe Prelude.Text)+finalizeDeviceClaimResponse_state = Lens.lens (\FinalizeDeviceClaimResponse' {state} -> state) (\s@FinalizeDeviceClaimResponse' {} a -> s {state = a} :: FinalizeDeviceClaimResponse)++-- | The response's http status code.+finalizeDeviceClaimResponse_httpStatus :: Lens.Lens' FinalizeDeviceClaimResponse Prelude.Int+finalizeDeviceClaimResponse_httpStatus = Lens.lens (\FinalizeDeviceClaimResponse' {httpStatus} -> httpStatus) (\s@FinalizeDeviceClaimResponse' {} a -> s {httpStatus = a} :: FinalizeDeviceClaimResponse)++instance Prelude.NFData FinalizeDeviceClaimResponse where+ rnf FinalizeDeviceClaimResponse' {..} =+ Prelude.rnf state+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickDevices/GetDeviceMethods.hs view
@@ -0,0 +1,160 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.GetDeviceMethods+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Given a device ID, returns the invokable methods associated with the+-- device.+module Amazonka.IoT1ClickDevices.GetDeviceMethods+ ( -- * Creating a Request+ GetDeviceMethods (..),+ newGetDeviceMethods,++ -- * Request Lenses+ getDeviceMethods_deviceId,++ -- * Destructuring the Response+ GetDeviceMethodsResponse (..),+ newGetDeviceMethodsResponse,++ -- * Response Lenses+ getDeviceMethodsResponse_deviceMethods,+ getDeviceMethodsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetDeviceMethods' smart constructor.+data GetDeviceMethods = GetDeviceMethods'+ { -- | The unique identifier of the device.+ deviceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetDeviceMethods' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'deviceId', 'getDeviceMethods_deviceId' - The unique identifier of the device.+newGetDeviceMethods ::+ -- | 'deviceId'+ Prelude.Text ->+ GetDeviceMethods+newGetDeviceMethods pDeviceId_ =+ GetDeviceMethods' {deviceId = pDeviceId_}++-- | The unique identifier of the device.+getDeviceMethods_deviceId :: Lens.Lens' GetDeviceMethods Prelude.Text+getDeviceMethods_deviceId = Lens.lens (\GetDeviceMethods' {deviceId} -> deviceId) (\s@GetDeviceMethods' {} a -> s {deviceId = a} :: GetDeviceMethods)++instance Core.AWSRequest GetDeviceMethods where+ type+ AWSResponse GetDeviceMethods =+ GetDeviceMethodsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetDeviceMethodsResponse'+ Prelude.<$> (x Data..?> "deviceMethods" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetDeviceMethods where+ hashWithSalt _salt GetDeviceMethods' {..} =+ _salt `Prelude.hashWithSalt` deviceId++instance Prelude.NFData GetDeviceMethods where+ rnf GetDeviceMethods' {..} = Prelude.rnf deviceId++instance Data.ToHeaders GetDeviceMethods where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetDeviceMethods where+ toPath GetDeviceMethods' {..} =+ Prelude.mconcat+ ["/devices/", Data.toBS deviceId, "/methods"]++instance Data.ToQuery GetDeviceMethods where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetDeviceMethodsResponse' smart constructor.+data GetDeviceMethodsResponse = GetDeviceMethodsResponse'+ { -- | List of available device APIs.+ deviceMethods :: Prelude.Maybe [DeviceMethod],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetDeviceMethodsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'deviceMethods', 'getDeviceMethodsResponse_deviceMethods' - List of available device APIs.+--+-- 'httpStatus', 'getDeviceMethodsResponse_httpStatus' - The response's http status code.+newGetDeviceMethodsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetDeviceMethodsResponse+newGetDeviceMethodsResponse pHttpStatus_ =+ GetDeviceMethodsResponse'+ { deviceMethods =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | List of available device APIs.+getDeviceMethodsResponse_deviceMethods :: Lens.Lens' GetDeviceMethodsResponse (Prelude.Maybe [DeviceMethod])+getDeviceMethodsResponse_deviceMethods = Lens.lens (\GetDeviceMethodsResponse' {deviceMethods} -> deviceMethods) (\s@GetDeviceMethodsResponse' {} a -> s {deviceMethods = a} :: GetDeviceMethodsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getDeviceMethodsResponse_httpStatus :: Lens.Lens' GetDeviceMethodsResponse Prelude.Int+getDeviceMethodsResponse_httpStatus = Lens.lens (\GetDeviceMethodsResponse' {httpStatus} -> httpStatus) (\s@GetDeviceMethodsResponse' {} a -> s {httpStatus = a} :: GetDeviceMethodsResponse)++instance Prelude.NFData GetDeviceMethodsResponse where+ rnf GetDeviceMethodsResponse' {..} =+ Prelude.rnf deviceMethods+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickDevices/InitiateDeviceClaim.hs view
@@ -0,0 +1,166 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.InitiateDeviceClaim+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Given a device ID, initiates a claim request for the associated device.+--+-- Claiming a device consists of initiating a claim, then publishing a+-- device event, and finalizing the claim. For a device of type button, a+-- device event can be published by simply clicking the device.+module Amazonka.IoT1ClickDevices.InitiateDeviceClaim+ ( -- * Creating a Request+ InitiateDeviceClaim (..),+ newInitiateDeviceClaim,++ -- * Request Lenses+ initiateDeviceClaim_deviceId,++ -- * Destructuring the Response+ InitiateDeviceClaimResponse (..),+ newInitiateDeviceClaimResponse,++ -- * Response Lenses+ initiateDeviceClaimResponse_state,+ initiateDeviceClaimResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newInitiateDeviceClaim' smart constructor.+data InitiateDeviceClaim = InitiateDeviceClaim'+ { -- | The unique identifier of the device.+ deviceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'InitiateDeviceClaim' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'deviceId', 'initiateDeviceClaim_deviceId' - The unique identifier of the device.+newInitiateDeviceClaim ::+ -- | 'deviceId'+ Prelude.Text ->+ InitiateDeviceClaim+newInitiateDeviceClaim pDeviceId_ =+ InitiateDeviceClaim' {deviceId = pDeviceId_}++-- | The unique identifier of the device.+initiateDeviceClaim_deviceId :: Lens.Lens' InitiateDeviceClaim Prelude.Text+initiateDeviceClaim_deviceId = Lens.lens (\InitiateDeviceClaim' {deviceId} -> deviceId) (\s@InitiateDeviceClaim' {} a -> s {deviceId = a} :: InitiateDeviceClaim)++instance Core.AWSRequest InitiateDeviceClaim where+ type+ AWSResponse InitiateDeviceClaim =+ InitiateDeviceClaimResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ InitiateDeviceClaimResponse'+ Prelude.<$> (x Data..?> "state")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable InitiateDeviceClaim where+ hashWithSalt _salt InitiateDeviceClaim' {..} =+ _salt `Prelude.hashWithSalt` deviceId++instance Prelude.NFData InitiateDeviceClaim where+ rnf InitiateDeviceClaim' {..} = Prelude.rnf deviceId++instance Data.ToHeaders InitiateDeviceClaim where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON InitiateDeviceClaim where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath InitiateDeviceClaim where+ toPath InitiateDeviceClaim' {..} =+ Prelude.mconcat+ ["/devices/", Data.toBS deviceId, "/initiate-claim"]++instance Data.ToQuery InitiateDeviceClaim where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newInitiateDeviceClaimResponse' smart constructor.+data InitiateDeviceClaimResponse = InitiateDeviceClaimResponse'+ { -- | The device\'s final claim state.+ state :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'InitiateDeviceClaimResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'state', 'initiateDeviceClaimResponse_state' - The device\'s final claim state.+--+-- 'httpStatus', 'initiateDeviceClaimResponse_httpStatus' - The response's http status code.+newInitiateDeviceClaimResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ InitiateDeviceClaimResponse+newInitiateDeviceClaimResponse pHttpStatus_ =+ InitiateDeviceClaimResponse'+ { state =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The device\'s final claim state.+initiateDeviceClaimResponse_state :: Lens.Lens' InitiateDeviceClaimResponse (Prelude.Maybe Prelude.Text)+initiateDeviceClaimResponse_state = Lens.lens (\InitiateDeviceClaimResponse' {state} -> state) (\s@InitiateDeviceClaimResponse' {} a -> s {state = a} :: InitiateDeviceClaimResponse)++-- | The response's http status code.+initiateDeviceClaimResponse_httpStatus :: Lens.Lens' InitiateDeviceClaimResponse Prelude.Int+initiateDeviceClaimResponse_httpStatus = Lens.lens (\InitiateDeviceClaimResponse' {httpStatus} -> httpStatus) (\s@InitiateDeviceClaimResponse' {} a -> s {httpStatus = a} :: InitiateDeviceClaimResponse)++instance Prelude.NFData InitiateDeviceClaimResponse where+ rnf InitiateDeviceClaimResponse' {..} =+ Prelude.rnf state+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickDevices/InvokeDeviceMethod.hs view
@@ -0,0 +1,198 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.InvokeDeviceMethod+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Given a device ID, issues a request to invoke a named device method+-- (with possible parameters). See the \"Example POST\" code snippet below.+module Amazonka.IoT1ClickDevices.InvokeDeviceMethod+ ( -- * Creating a Request+ InvokeDeviceMethod (..),+ newInvokeDeviceMethod,++ -- * Request Lenses+ invokeDeviceMethod_deviceMethod,+ invokeDeviceMethod_deviceMethodParameters,+ invokeDeviceMethod_deviceId,++ -- * Destructuring the Response+ InvokeDeviceMethodResponse (..),+ newInvokeDeviceMethodResponse,++ -- * Response Lenses+ invokeDeviceMethodResponse_deviceMethodResponse,+ invokeDeviceMethodResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newInvokeDeviceMethod' smart constructor.+data InvokeDeviceMethod = InvokeDeviceMethod'+ { -- | The device method to invoke.+ deviceMethod :: Prelude.Maybe DeviceMethod,+ -- | A JSON encoded string containing the device method request parameters.+ deviceMethodParameters :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier of the device.+ deviceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'InvokeDeviceMethod' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'deviceMethod', 'invokeDeviceMethod_deviceMethod' - The device method to invoke.+--+-- 'deviceMethodParameters', 'invokeDeviceMethod_deviceMethodParameters' - A JSON encoded string containing the device method request parameters.+--+-- 'deviceId', 'invokeDeviceMethod_deviceId' - The unique identifier of the device.+newInvokeDeviceMethod ::+ -- | 'deviceId'+ Prelude.Text ->+ InvokeDeviceMethod+newInvokeDeviceMethod pDeviceId_ =+ InvokeDeviceMethod'+ { deviceMethod = Prelude.Nothing,+ deviceMethodParameters = Prelude.Nothing,+ deviceId = pDeviceId_+ }++-- | The device method to invoke.+invokeDeviceMethod_deviceMethod :: Lens.Lens' InvokeDeviceMethod (Prelude.Maybe DeviceMethod)+invokeDeviceMethod_deviceMethod = Lens.lens (\InvokeDeviceMethod' {deviceMethod} -> deviceMethod) (\s@InvokeDeviceMethod' {} a -> s {deviceMethod = a} :: InvokeDeviceMethod)++-- | A JSON encoded string containing the device method request parameters.+invokeDeviceMethod_deviceMethodParameters :: Lens.Lens' InvokeDeviceMethod (Prelude.Maybe Prelude.Text)+invokeDeviceMethod_deviceMethodParameters = Lens.lens (\InvokeDeviceMethod' {deviceMethodParameters} -> deviceMethodParameters) (\s@InvokeDeviceMethod' {} a -> s {deviceMethodParameters = a} :: InvokeDeviceMethod)++-- | The unique identifier of the device.+invokeDeviceMethod_deviceId :: Lens.Lens' InvokeDeviceMethod Prelude.Text+invokeDeviceMethod_deviceId = Lens.lens (\InvokeDeviceMethod' {deviceId} -> deviceId) (\s@InvokeDeviceMethod' {} a -> s {deviceId = a} :: InvokeDeviceMethod)++instance Core.AWSRequest InvokeDeviceMethod where+ type+ AWSResponse InvokeDeviceMethod =+ InvokeDeviceMethodResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ InvokeDeviceMethodResponse'+ Prelude.<$> (x Data..?> "deviceMethodResponse")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable InvokeDeviceMethod where+ hashWithSalt _salt InvokeDeviceMethod' {..} =+ _salt+ `Prelude.hashWithSalt` deviceMethod+ `Prelude.hashWithSalt` deviceMethodParameters+ `Prelude.hashWithSalt` deviceId++instance Prelude.NFData InvokeDeviceMethod where+ rnf InvokeDeviceMethod' {..} =+ Prelude.rnf deviceMethod+ `Prelude.seq` Prelude.rnf deviceMethodParameters+ `Prelude.seq` Prelude.rnf deviceId++instance Data.ToHeaders InvokeDeviceMethod where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON InvokeDeviceMethod where+ toJSON InvokeDeviceMethod' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("deviceMethod" Data..=) Prelude.<$> deviceMethod,+ ("deviceMethodParameters" Data..=)+ Prelude.<$> deviceMethodParameters+ ]+ )++instance Data.ToPath InvokeDeviceMethod where+ toPath InvokeDeviceMethod' {..} =+ Prelude.mconcat+ ["/devices/", Data.toBS deviceId, "/methods"]++instance Data.ToQuery InvokeDeviceMethod where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newInvokeDeviceMethodResponse' smart constructor.+data InvokeDeviceMethodResponse = InvokeDeviceMethodResponse'+ { -- | A JSON encoded string containing the device method response.+ deviceMethodResponse :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'InvokeDeviceMethodResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'deviceMethodResponse', 'invokeDeviceMethodResponse_deviceMethodResponse' - A JSON encoded string containing the device method response.+--+-- 'httpStatus', 'invokeDeviceMethodResponse_httpStatus' - The response's http status code.+newInvokeDeviceMethodResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ InvokeDeviceMethodResponse+newInvokeDeviceMethodResponse pHttpStatus_ =+ InvokeDeviceMethodResponse'+ { deviceMethodResponse =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A JSON encoded string containing the device method response.+invokeDeviceMethodResponse_deviceMethodResponse :: Lens.Lens' InvokeDeviceMethodResponse (Prelude.Maybe Prelude.Text)+invokeDeviceMethodResponse_deviceMethodResponse = Lens.lens (\InvokeDeviceMethodResponse' {deviceMethodResponse} -> deviceMethodResponse) (\s@InvokeDeviceMethodResponse' {} a -> s {deviceMethodResponse = a} :: InvokeDeviceMethodResponse)++-- | The response's http status code.+invokeDeviceMethodResponse_httpStatus :: Lens.Lens' InvokeDeviceMethodResponse Prelude.Int+invokeDeviceMethodResponse_httpStatus = Lens.lens (\InvokeDeviceMethodResponse' {httpStatus} -> httpStatus) (\s@InvokeDeviceMethodResponse' {} a -> s {httpStatus = a} :: InvokeDeviceMethodResponse)++instance Prelude.NFData InvokeDeviceMethodResponse where+ rnf InvokeDeviceMethodResponse' {..} =+ Prelude.rnf deviceMethodResponse+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickDevices/Lens.hs view
@@ -0,0 +1,137 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.Lens+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.IoT1ClickDevices.Lens+ ( -- * Operations++ -- ** ClaimDevicesByClaimCode+ claimDevicesByClaimCode_claimCode,+ claimDevicesByClaimCodeResponse_claimCode,+ claimDevicesByClaimCodeResponse_total,+ claimDevicesByClaimCodeResponse_httpStatus,++ -- ** DescribeDevice+ describeDevice_deviceId,+ describeDeviceResponse_deviceDescription,+ describeDeviceResponse_httpStatus,++ -- ** FinalizeDeviceClaim+ finalizeDeviceClaim_tags,+ finalizeDeviceClaim_deviceId,+ finalizeDeviceClaimResponse_state,+ finalizeDeviceClaimResponse_httpStatus,++ -- ** GetDeviceMethods+ getDeviceMethods_deviceId,+ getDeviceMethodsResponse_deviceMethods,+ getDeviceMethodsResponse_httpStatus,++ -- ** InitiateDeviceClaim+ initiateDeviceClaim_deviceId,+ initiateDeviceClaimResponse_state,+ initiateDeviceClaimResponse_httpStatus,++ -- ** InvokeDeviceMethod+ invokeDeviceMethod_deviceMethod,+ invokeDeviceMethod_deviceMethodParameters,+ invokeDeviceMethod_deviceId,+ invokeDeviceMethodResponse_deviceMethodResponse,+ invokeDeviceMethodResponse_httpStatus,++ -- ** ListDeviceEvents+ listDeviceEvents_maxResults,+ listDeviceEvents_nextToken,+ listDeviceEvents_deviceId,+ listDeviceEvents_fromTimeStamp,+ listDeviceEvents_toTimeStamp,+ listDeviceEventsResponse_events,+ listDeviceEventsResponse_nextToken,+ listDeviceEventsResponse_httpStatus,++ -- ** ListDevices+ listDevices_deviceType,+ listDevices_maxResults,+ listDevices_nextToken,+ listDevicesResponse_devices,+ listDevicesResponse_nextToken,+ listDevicesResponse_httpStatus,++ -- ** ListTagsForResource+ listTagsForResource_resourceArn,+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,++ -- ** TagResource+ tagResource_resourceArn,+ tagResource_tags,++ -- ** UnclaimDevice+ unclaimDevice_deviceId,+ unclaimDeviceResponse_state,+ unclaimDeviceResponse_httpStatus,++ -- ** UntagResource+ untagResource_tagKeys,+ untagResource_resourceArn,++ -- ** UpdateDeviceState+ updateDeviceState_enabled,+ updateDeviceState_deviceId,+ updateDeviceStateResponse_httpStatus,++ -- * Types++ -- ** Attributes++ -- ** Device+ device_attributes,+ device_deviceId,+ device_type,++ -- ** DeviceDescription+ deviceDescription_arn,+ deviceDescription_attributes,+ deviceDescription_deviceId,+ deviceDescription_enabled,+ deviceDescription_remainingLife,+ deviceDescription_tags,+ deviceDescription_type,++ -- ** DeviceEvent+ deviceEvent_device,+ deviceEvent_stdEvent,++ -- ** DeviceMethod+ deviceMethod_deviceType,+ deviceMethod_methodName,+ )+where++import Amazonka.IoT1ClickDevices.ClaimDevicesByClaimCode+import Amazonka.IoT1ClickDevices.DescribeDevice+import Amazonka.IoT1ClickDevices.FinalizeDeviceClaim+import Amazonka.IoT1ClickDevices.GetDeviceMethods+import Amazonka.IoT1ClickDevices.InitiateDeviceClaim+import Amazonka.IoT1ClickDevices.InvokeDeviceMethod+import Amazonka.IoT1ClickDevices.ListDeviceEvents+import Amazonka.IoT1ClickDevices.ListDevices+import Amazonka.IoT1ClickDevices.ListTagsForResource+import Amazonka.IoT1ClickDevices.TagResource+import Amazonka.IoT1ClickDevices.Types.Attributes+import Amazonka.IoT1ClickDevices.Types.Device+import Amazonka.IoT1ClickDevices.Types.DeviceDescription+import Amazonka.IoT1ClickDevices.Types.DeviceEvent+import Amazonka.IoT1ClickDevices.Types.DeviceMethod+import Amazonka.IoT1ClickDevices.UnclaimDevice+import Amazonka.IoT1ClickDevices.UntagResource+import Amazonka.IoT1ClickDevices.UpdateDeviceState
+ gen/Amazonka/IoT1ClickDevices/ListDeviceEvents.hs view
@@ -0,0 +1,272 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.ListDeviceEvents+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Using a device ID, returns a DeviceEventsResponse object containing an+-- array of events for the device.+--+-- This operation returns paginated results.+module Amazonka.IoT1ClickDevices.ListDeviceEvents+ ( -- * Creating a Request+ ListDeviceEvents (..),+ newListDeviceEvents,++ -- * Request Lenses+ listDeviceEvents_maxResults,+ listDeviceEvents_nextToken,+ listDeviceEvents_deviceId,+ listDeviceEvents_fromTimeStamp,+ listDeviceEvents_toTimeStamp,++ -- * Destructuring the Response+ ListDeviceEventsResponse (..),+ newListDeviceEventsResponse,++ -- * Response Lenses+ listDeviceEventsResponse_events,+ listDeviceEventsResponse_nextToken,+ listDeviceEventsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListDeviceEvents' smart constructor.+data ListDeviceEvents = ListDeviceEvents'+ { -- | The maximum number of results to return per request. If not set, a+ -- default value of 100 is used.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to retrieve the next set of results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier of the device.+ deviceId :: Prelude.Text,+ -- | The start date for the device event query, in ISO8061 format. For+ -- example, 2018-03-28T15:45:12.880Z+ fromTimeStamp :: Data.ISO8601,+ -- | The end date for the device event query, in ISO8061 format. For example,+ -- 2018-03-28T15:45:12.880Z+ toTimeStamp :: Data.ISO8601+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListDeviceEvents' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listDeviceEvents_maxResults' - The maximum number of results to return per request. If not set, a+-- default value of 100 is used.+--+-- 'nextToken', 'listDeviceEvents_nextToken' - The token to retrieve the next set of results.+--+-- 'deviceId', 'listDeviceEvents_deviceId' - The unique identifier of the device.+--+-- 'fromTimeStamp', 'listDeviceEvents_fromTimeStamp' - The start date for the device event query, in ISO8061 format. For+-- example, 2018-03-28T15:45:12.880Z+--+-- 'toTimeStamp', 'listDeviceEvents_toTimeStamp' - The end date for the device event query, in ISO8061 format. For example,+-- 2018-03-28T15:45:12.880Z+newListDeviceEvents ::+ -- | 'deviceId'+ Prelude.Text ->+ -- | 'fromTimeStamp'+ Prelude.UTCTime ->+ -- | 'toTimeStamp'+ Prelude.UTCTime ->+ ListDeviceEvents+newListDeviceEvents+ pDeviceId_+ pFromTimeStamp_+ pToTimeStamp_ =+ ListDeviceEvents'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ deviceId = pDeviceId_,+ fromTimeStamp = Data._Time Lens.# pFromTimeStamp_,+ toTimeStamp = Data._Time Lens.# pToTimeStamp_+ }++-- | The maximum number of results to return per request. If not set, a+-- default value of 100 is used.+listDeviceEvents_maxResults :: Lens.Lens' ListDeviceEvents (Prelude.Maybe Prelude.Natural)+listDeviceEvents_maxResults = Lens.lens (\ListDeviceEvents' {maxResults} -> maxResults) (\s@ListDeviceEvents' {} a -> s {maxResults = a} :: ListDeviceEvents)++-- | The token to retrieve the next set of results.+listDeviceEvents_nextToken :: Lens.Lens' ListDeviceEvents (Prelude.Maybe Prelude.Text)+listDeviceEvents_nextToken = Lens.lens (\ListDeviceEvents' {nextToken} -> nextToken) (\s@ListDeviceEvents' {} a -> s {nextToken = a} :: ListDeviceEvents)++-- | The unique identifier of the device.+listDeviceEvents_deviceId :: Lens.Lens' ListDeviceEvents Prelude.Text+listDeviceEvents_deviceId = Lens.lens (\ListDeviceEvents' {deviceId} -> deviceId) (\s@ListDeviceEvents' {} a -> s {deviceId = a} :: ListDeviceEvents)++-- | The start date for the device event query, in ISO8061 format. For+-- example, 2018-03-28T15:45:12.880Z+listDeviceEvents_fromTimeStamp :: Lens.Lens' ListDeviceEvents Prelude.UTCTime+listDeviceEvents_fromTimeStamp = Lens.lens (\ListDeviceEvents' {fromTimeStamp} -> fromTimeStamp) (\s@ListDeviceEvents' {} a -> s {fromTimeStamp = a} :: ListDeviceEvents) Prelude.. Data._Time++-- | The end date for the device event query, in ISO8061 format. For example,+-- 2018-03-28T15:45:12.880Z+listDeviceEvents_toTimeStamp :: Lens.Lens' ListDeviceEvents Prelude.UTCTime+listDeviceEvents_toTimeStamp = Lens.lens (\ListDeviceEvents' {toTimeStamp} -> toTimeStamp) (\s@ListDeviceEvents' {} a -> s {toTimeStamp = a} :: ListDeviceEvents) Prelude.. Data._Time++instance Core.AWSPager ListDeviceEvents where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listDeviceEventsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listDeviceEventsResponse_events+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listDeviceEvents_nextToken+ Lens..~ rs+ Lens.^? listDeviceEventsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListDeviceEvents where+ type+ AWSResponse ListDeviceEvents =+ ListDeviceEventsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListDeviceEventsResponse'+ Prelude.<$> (x Data..?> "events" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListDeviceEvents where+ hashWithSalt _salt ListDeviceEvents' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` deviceId+ `Prelude.hashWithSalt` fromTimeStamp+ `Prelude.hashWithSalt` toTimeStamp++instance Prelude.NFData ListDeviceEvents where+ rnf ListDeviceEvents' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf deviceId+ `Prelude.seq` Prelude.rnf fromTimeStamp+ `Prelude.seq` Prelude.rnf toTimeStamp++instance Data.ToHeaders ListDeviceEvents where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListDeviceEvents where+ toPath ListDeviceEvents' {..} =+ Prelude.mconcat+ ["/devices/", Data.toBS deviceId, "/events"]++instance Data.ToQuery ListDeviceEvents where+ toQuery ListDeviceEvents' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken,+ "fromTimeStamp" Data.=: fromTimeStamp,+ "toTimeStamp" Data.=: toTimeStamp+ ]++-- | /See:/ 'newListDeviceEventsResponse' smart constructor.+data ListDeviceEventsResponse = ListDeviceEventsResponse'+ { -- | An array of zero or more elements describing the event(s) associated+ -- with the device.+ events :: Prelude.Maybe [DeviceEvent],+ -- | The token to retrieve the next set of results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListDeviceEventsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'events', 'listDeviceEventsResponse_events' - An array of zero or more elements describing the event(s) associated+-- with the device.+--+-- 'nextToken', 'listDeviceEventsResponse_nextToken' - The token to retrieve the next set of results.+--+-- 'httpStatus', 'listDeviceEventsResponse_httpStatus' - The response's http status code.+newListDeviceEventsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListDeviceEventsResponse+newListDeviceEventsResponse pHttpStatus_ =+ ListDeviceEventsResponse'+ { events = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of zero or more elements describing the event(s) associated+-- with the device.+listDeviceEventsResponse_events :: Lens.Lens' ListDeviceEventsResponse (Prelude.Maybe [DeviceEvent])+listDeviceEventsResponse_events = Lens.lens (\ListDeviceEventsResponse' {events} -> events) (\s@ListDeviceEventsResponse' {} a -> s {events = a} :: ListDeviceEventsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to retrieve the next set of results.+listDeviceEventsResponse_nextToken :: Lens.Lens' ListDeviceEventsResponse (Prelude.Maybe Prelude.Text)+listDeviceEventsResponse_nextToken = Lens.lens (\ListDeviceEventsResponse' {nextToken} -> nextToken) (\s@ListDeviceEventsResponse' {} a -> s {nextToken = a} :: ListDeviceEventsResponse)++-- | The response's http status code.+listDeviceEventsResponse_httpStatus :: Lens.Lens' ListDeviceEventsResponse Prelude.Int+listDeviceEventsResponse_httpStatus = Lens.lens (\ListDeviceEventsResponse' {httpStatus} -> httpStatus) (\s@ListDeviceEventsResponse' {} a -> s {httpStatus = a} :: ListDeviceEventsResponse)++instance Prelude.NFData ListDeviceEventsResponse where+ rnf ListDeviceEventsResponse' {..} =+ Prelude.rnf events+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickDevices/ListDevices.hs view
@@ -0,0 +1,224 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.ListDevices+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the 1-Click compatible devices associated with your AWS account.+--+-- This operation returns paginated results.+module Amazonka.IoT1ClickDevices.ListDevices+ ( -- * Creating a Request+ ListDevices (..),+ newListDevices,++ -- * Request Lenses+ listDevices_deviceType,+ listDevices_maxResults,+ listDevices_nextToken,++ -- * Destructuring the Response+ ListDevicesResponse (..),+ newListDevicesResponse,++ -- * Response Lenses+ listDevicesResponse_devices,+ listDevicesResponse_nextToken,+ listDevicesResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListDevices' smart constructor.+data ListDevices = ListDevices'+ { -- | The type of the device, such as \"button\".+ deviceType :: Prelude.Maybe Prelude.Text,+ -- | The maximum number of results to return per request. If not set, a+ -- default value of 100 is used.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to retrieve the next set of results.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListDevices' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'deviceType', 'listDevices_deviceType' - The type of the device, such as \"button\".+--+-- 'maxResults', 'listDevices_maxResults' - The maximum number of results to return per request. If not set, a+-- default value of 100 is used.+--+-- 'nextToken', 'listDevices_nextToken' - The token to retrieve the next set of results.+newListDevices ::+ ListDevices+newListDevices =+ ListDevices'+ { deviceType = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The type of the device, such as \"button\".+listDevices_deviceType :: Lens.Lens' ListDevices (Prelude.Maybe Prelude.Text)+listDevices_deviceType = Lens.lens (\ListDevices' {deviceType} -> deviceType) (\s@ListDevices' {} a -> s {deviceType = a} :: ListDevices)++-- | The maximum number of results to return per request. If not set, a+-- default value of 100 is used.+listDevices_maxResults :: Lens.Lens' ListDevices (Prelude.Maybe Prelude.Natural)+listDevices_maxResults = Lens.lens (\ListDevices' {maxResults} -> maxResults) (\s@ListDevices' {} a -> s {maxResults = a} :: ListDevices)++-- | The token to retrieve the next set of results.+listDevices_nextToken :: Lens.Lens' ListDevices (Prelude.Maybe Prelude.Text)+listDevices_nextToken = Lens.lens (\ListDevices' {nextToken} -> nextToken) (\s@ListDevices' {} a -> s {nextToken = a} :: ListDevices)++instance Core.AWSPager ListDevices where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listDevicesResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listDevicesResponse_devices+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listDevices_nextToken+ Lens..~ rs+ Lens.^? listDevicesResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListDevices where+ type AWSResponse ListDevices = ListDevicesResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListDevicesResponse'+ Prelude.<$> (x Data..?> "devices" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListDevices where+ hashWithSalt _salt ListDevices' {..} =+ _salt+ `Prelude.hashWithSalt` deviceType+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListDevices where+ rnf ListDevices' {..} =+ Prelude.rnf deviceType+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListDevices where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListDevices where+ toPath = Prelude.const "/devices"++instance Data.ToQuery ListDevices where+ toQuery ListDevices' {..} =+ Prelude.mconcat+ [ "deviceType" Data.=: deviceType,+ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListDevicesResponse' smart constructor.+data ListDevicesResponse = ListDevicesResponse'+ { -- | A list of devices.+ devices :: Prelude.Maybe [DeviceDescription],+ -- | The token to retrieve the next set of results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListDevicesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'devices', 'listDevicesResponse_devices' - A list of devices.+--+-- 'nextToken', 'listDevicesResponse_nextToken' - The token to retrieve the next set of results.+--+-- 'httpStatus', 'listDevicesResponse_httpStatus' - The response's http status code.+newListDevicesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListDevicesResponse+newListDevicesResponse pHttpStatus_ =+ ListDevicesResponse'+ { devices = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A list of devices.+listDevicesResponse_devices :: Lens.Lens' ListDevicesResponse (Prelude.Maybe [DeviceDescription])+listDevicesResponse_devices = Lens.lens (\ListDevicesResponse' {devices} -> devices) (\s@ListDevicesResponse' {} a -> s {devices = a} :: ListDevicesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to retrieve the next set of results.+listDevicesResponse_nextToken :: Lens.Lens' ListDevicesResponse (Prelude.Maybe Prelude.Text)+listDevicesResponse_nextToken = Lens.lens (\ListDevicesResponse' {nextToken} -> nextToken) (\s@ListDevicesResponse' {} a -> s {nextToken = a} :: ListDevicesResponse)++-- | The response's http status code.+listDevicesResponse_httpStatus :: Lens.Lens' ListDevicesResponse Prelude.Int+listDevicesResponse_httpStatus = Lens.lens (\ListDevicesResponse' {httpStatus} -> httpStatus) (\s@ListDevicesResponse' {} a -> s {httpStatus = a} :: ListDevicesResponse)++instance Prelude.NFData ListDevicesResponse where+ rnf ListDevicesResponse' {..} =+ Prelude.rnf devices+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickDevices/ListTagsForResource.hs view
@@ -0,0 +1,168 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.ListTagsForResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the tags associated with the specified resource ARN.+module Amazonka.IoT1ClickDevices.ListTagsForResource+ ( -- * Creating a Request+ ListTagsForResource (..),+ newListTagsForResource,++ -- * Request Lenses+ listTagsForResource_resourceArn,++ -- * Destructuring the Response+ ListTagsForResourceResponse (..),+ newListTagsForResourceResponse,++ -- * Response Lenses+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+ { -- | The ARN of the resource.+ resourceArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'listTagsForResource_resourceArn' - The ARN of the resource.+newListTagsForResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceArn_ =+ ListTagsForResource' {resourceArn = pResourceArn_}++-- | The ARN of the resource.+listTagsForResource_resourceArn :: Lens.Lens' ListTagsForResource Prelude.Text+listTagsForResource_resourceArn = Lens.lens (\ListTagsForResource' {resourceArn} -> resourceArn) (\s@ListTagsForResource' {} a -> s {resourceArn = a} :: ListTagsForResource)++instance Core.AWSRequest ListTagsForResource where+ type+ AWSResponse ListTagsForResource =+ ListTagsForResourceResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListTagsForResourceResponse'+ Prelude.<$> (x Data..?> "tags" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListTagsForResource where+ hashWithSalt _salt ListTagsForResource' {..} =+ _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ListTagsForResource where+ rnf ListTagsForResource' {..} =+ Prelude.rnf resourceArn++instance Data.ToHeaders ListTagsForResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListTagsForResource where+ toPath ListTagsForResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery ListTagsForResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+ { -- | A collection of key\/value pairs defining the resource tags. For+ -- example, { \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For+ -- more information, see+ -- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tags', 'listTagsForResourceResponse_tags' - A collection of key\/value pairs defining the resource tags. For+-- example, { \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For+-- more information, see+-- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+ ListTagsForResourceResponse'+ { tags =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A collection of key\/value pairs defining the resource tags. For+-- example, { \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For+-- more information, see+-- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+listTagsForResourceResponse_tags = Lens.lens (\ListTagsForResourceResponse' {tags} -> tags) (\s@ListTagsForResourceResponse' {} a -> s {tags = a} :: ListTagsForResourceResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listTagsForResourceResponse_httpStatus :: Lens.Lens' ListTagsForResourceResponse Prelude.Int+listTagsForResourceResponse_httpStatus = Lens.lens (\ListTagsForResourceResponse' {httpStatus} -> httpStatus) (\s@ListTagsForResourceResponse' {} a -> s {httpStatus = a} :: ListTagsForResourceResponse)++instance Prelude.NFData ListTagsForResourceResponse where+ rnf ListTagsForResourceResponse' {..} =+ Prelude.rnf tags+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickDevices/TagResource.hs view
@@ -0,0 +1,153 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.TagResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Adds or updates the tags associated with the resource ARN. See+-- <https://docs.aws.amazon.com/iot-1-click/latest/developerguide/1click-appendix.html#1click-limits AWS IoT 1-Click Service Limits>+-- for the maximum number of tags allowed per resource.+module Amazonka.IoT1ClickDevices.TagResource+ ( -- * Creating a Request+ TagResource (..),+ newTagResource,++ -- * Request Lenses+ tagResource_resourceArn,+ tagResource_tags,++ -- * Destructuring the Response+ TagResourceResponse (..),+ newTagResourceResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+ { -- | The ARN of the resource.+ resourceArn :: Prelude.Text,+ -- | A collection of key\/value pairs defining the resource tags. For+ -- example, { \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For+ -- more information, see+ -- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+ tags :: Prelude.HashMap Prelude.Text Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'tagResource_resourceArn' - The ARN of the resource.+--+-- 'tags', 'tagResource_tags' - A collection of key\/value pairs defining the resource tags. For+-- example, { \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For+-- more information, see+-- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+newTagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ TagResource+newTagResource pResourceArn_ =+ TagResource'+ { resourceArn = pResourceArn_,+ tags = Prelude.mempty+ }++-- | The ARN of the resource.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | A collection of key\/value pairs defining the resource tags. For+-- example, { \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For+-- more information, see+-- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+tagResource_tags :: Lens.Lens' TagResource (Prelude.HashMap Prelude.Text Prelude.Text)+tagResource_tags = Lens.lens (\TagResource' {tags} -> tags) (\s@TagResource' {} a -> s {tags = a} :: TagResource) Prelude.. Lens.coerced++instance Core.AWSRequest TagResource where+ type AWSResponse TagResource = TagResourceResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response = Response.receiveNull TagResourceResponse'++instance Prelude.Hashable TagResource where+ hashWithSalt _salt TagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` tags++instance Prelude.NFData TagResource where+ rnf TagResource' {..} =+ Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf tags++instance Data.ToHeaders TagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON TagResource where+ toJSON TagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("tags" Data..= tags)]+ )++instance Data.ToPath TagResource where+ toPath TagResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery TagResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newTagResourceResponse' smart constructor.+data TagResourceResponse = TagResourceResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newTagResourceResponse ::+ TagResourceResponse+newTagResourceResponse = TagResourceResponse'++instance Prelude.NFData TagResourceResponse where+ rnf _ = ()
+ gen/Amazonka/IoT1ClickDevices/Types.hs view
@@ -0,0 +1,199 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.Types+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.IoT1ClickDevices.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _ForbiddenException,+ _InternalFailureException,+ _InvalidRequestException,+ _PreconditionFailedException,+ _RangeNotSatisfiableException,+ _ResourceConflictException,+ _ResourceNotFoundException,++ -- * Attributes+ Attributes (..),+ newAttributes,++ -- * Device+ Device (..),+ newDevice,+ device_attributes,+ device_deviceId,+ device_type,++ -- * DeviceDescription+ DeviceDescription (..),+ newDeviceDescription,+ deviceDescription_arn,+ deviceDescription_attributes,+ deviceDescription_deviceId,+ deviceDescription_enabled,+ deviceDescription_remainingLife,+ deviceDescription_tags,+ deviceDescription_type,++ -- * DeviceEvent+ DeviceEvent (..),+ newDeviceEvent,+ deviceEvent_device,+ deviceEvent_stdEvent,++ -- * DeviceMethod+ DeviceMethod (..),+ newDeviceMethod,+ deviceMethod_deviceType,+ deviceMethod_methodName,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import Amazonka.IoT1ClickDevices.Types.Attributes+import Amazonka.IoT1ClickDevices.Types.Device+import Amazonka.IoT1ClickDevices.Types.DeviceDescription+import Amazonka.IoT1ClickDevices.Types.DeviceEvent+import Amazonka.IoT1ClickDevices.Types.DeviceMethod+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2018-05-14@ of the Amazon IoT 1-Click Devices Service SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "IoT1ClickDevices",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "devices.iot1click",+ Core.signingName = "iot1click",+ Core.version = "2018-05-14",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error = Core.parseJSONError "IoT1ClickDevices",+ Core.retry = retry+ }+ where+ retry =+ Core.Exponential+ { Core.base = 5.0e-2,+ Core.growth = 2,+ Core.attempts = 5,+ Core.check = check+ }+ check e+ | Lens.has (Core.hasStatus 502) e =+ Prelude.Just "bad_gateway"+ | Lens.has (Core.hasStatus 504) e =+ Prelude.Just "gateway_timeout"+ | Lens.has (Core.hasStatus 500) e =+ Prelude.Just "general_server_error"+ | Lens.has (Core.hasStatus 509) e =+ Prelude.Just "limit_exceeded"+ | Lens.has+ ( Core.hasCode "RequestThrottledException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "request_throttled_exception"+ | Lens.has (Core.hasStatus 503) e =+ Prelude.Just "service_unavailable"+ | Lens.has+ ( Core.hasCode "ThrottledException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throttled_exception"+ | Lens.has+ ( Core.hasCode "Throttling"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throttling"+ | Lens.has+ ( Core.hasCode "ThrottlingException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throttling_exception"+ | Lens.has+ ( Core.hasCode+ "ProvisionedThroughputExceededException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throughput_exceeded"+ | Lens.has (Core.hasStatus 429) e =+ Prelude.Just "too_many_requests"+ | Prelude.otherwise = Prelude.Nothing++-- | Prism for ForbiddenException' errors.+_ForbiddenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ForbiddenException =+ Core._MatchServiceError+ defaultService+ "ForbiddenException"+ Prelude.. Core.hasStatus 403++-- | Prism for InternalFailureException' errors.+_InternalFailureException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalFailureException =+ Core._MatchServiceError+ defaultService+ "InternalFailureException"+ Prelude.. Core.hasStatus 500++-- | Prism for InvalidRequestException' errors.+_InvalidRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidRequestException =+ Core._MatchServiceError+ defaultService+ "InvalidRequestException"+ Prelude.. Core.hasStatus 400++-- | Prism for PreconditionFailedException' errors.+_PreconditionFailedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_PreconditionFailedException =+ Core._MatchServiceError+ defaultService+ "PreconditionFailedException"+ Prelude.. Core.hasStatus 412++-- | Prism for RangeNotSatisfiableException' errors.+_RangeNotSatisfiableException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_RangeNotSatisfiableException =+ Core._MatchServiceError+ defaultService+ "RangeNotSatisfiableException"+ Prelude.. Core.hasStatus 416++-- | Prism for ResourceConflictException' errors.+_ResourceConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceConflictException =+ Core._MatchServiceError+ defaultService+ "ResourceConflictException"+ Prelude.. Core.hasStatus 409++-- | Prism for ResourceNotFoundException' errors.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"+ Prelude.. Core.hasStatus 404
+ gen/Amazonka/IoT1ClickDevices/Types/Attributes.hs view
@@ -0,0 +1,52 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.Types.Attributes+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.IoT1ClickDevices.Types.Attributes where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | /See:/ 'newAttributes' smart constructor.+data Attributes = Attributes'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Attributes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newAttributes ::+ Attributes+newAttributes = Attributes'++instance Data.FromJSON Attributes where+ parseJSON =+ Data.withObject+ "Attributes"+ (\x -> Prelude.pure Attributes')++instance Prelude.Hashable Attributes where+ hashWithSalt _salt _ =+ _salt `Prelude.hashWithSalt` ()++instance Prelude.NFData Attributes where+ rnf _ = ()
+ gen/Amazonka/IoT1ClickDevices/Types/Device.hs view
@@ -0,0 +1,95 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.Types.Device+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.IoT1ClickDevices.Types.Device where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types.Attributes+import qualified Amazonka.Prelude as Prelude++-- | /See:/ 'newDevice' smart constructor.+data Device = Device'+ { -- | The user specified attributes associated with the device for an event.+ attributes :: Prelude.Maybe Attributes,+ -- | The unique identifier of the device.+ deviceId :: Prelude.Maybe Prelude.Text,+ -- | The device type, such as \"button\".+ type' :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Device' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'device_attributes' - The user specified attributes associated with the device for an event.+--+-- 'deviceId', 'device_deviceId' - The unique identifier of the device.+--+-- 'type'', 'device_type' - The device type, such as \"button\".+newDevice ::+ Device+newDevice =+ Device'+ { attributes = Prelude.Nothing,+ deviceId = Prelude.Nothing,+ type' = Prelude.Nothing+ }++-- | The user specified attributes associated with the device for an event.+device_attributes :: Lens.Lens' Device (Prelude.Maybe Attributes)+device_attributes = Lens.lens (\Device' {attributes} -> attributes) (\s@Device' {} a -> s {attributes = a} :: Device)++-- | The unique identifier of the device.+device_deviceId :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)+device_deviceId = Lens.lens (\Device' {deviceId} -> deviceId) (\s@Device' {} a -> s {deviceId = a} :: Device)++-- | The device type, such as \"button\".+device_type :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)+device_type = Lens.lens (\Device' {type'} -> type') (\s@Device' {} a -> s {type' = a} :: Device)++instance Data.FromJSON Device where+ parseJSON =+ Data.withObject+ "Device"+ ( \x ->+ Device'+ Prelude.<$> (x Data..:? "attributes")+ Prelude.<*> (x Data..:? "deviceId")+ Prelude.<*> (x Data..:? "type")+ )++instance Prelude.Hashable Device where+ hashWithSalt _salt Device' {..} =+ _salt+ `Prelude.hashWithSalt` attributes+ `Prelude.hashWithSalt` deviceId+ `Prelude.hashWithSalt` type'++instance Prelude.NFData Device where+ rnf Device' {..} =+ Prelude.rnf attributes+ `Prelude.seq` Prelude.rnf deviceId+ `Prelude.seq` Prelude.rnf type'
+ gen/Amazonka/IoT1ClickDevices/Types/DeviceDescription.hs view
@@ -0,0 +1,148 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.Types.DeviceDescription+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.IoT1ClickDevices.Types.DeviceDescription where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | /See:/ 'newDeviceDescription' smart constructor.+data DeviceDescription = DeviceDescription'+ { -- | The ARN of the device.+ arn :: Prelude.Maybe Prelude.Text,+ -- | An array of zero or more elements of DeviceAttribute objects providing+ -- user specified device attributes.+ attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The unique identifier of the device.+ deviceId :: Prelude.Maybe Prelude.Text,+ -- | A Boolean value indicating whether or not the device is enabled.+ enabled :: Prelude.Maybe Prelude.Bool,+ -- | A value between 0 and 1 inclusive, representing the fraction of life+ -- remaining for the device.+ remainingLife :: Prelude.Maybe Prelude.Double,+ -- | The tags currently associated with the AWS IoT 1-Click device.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The type of the device, such as \"button\".+ type' :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeviceDescription' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'deviceDescription_arn' - The ARN of the device.+--+-- 'attributes', 'deviceDescription_attributes' - An array of zero or more elements of DeviceAttribute objects providing+-- user specified device attributes.+--+-- 'deviceId', 'deviceDescription_deviceId' - The unique identifier of the device.+--+-- 'enabled', 'deviceDescription_enabled' - A Boolean value indicating whether or not the device is enabled.+--+-- 'remainingLife', 'deviceDescription_remainingLife' - A value between 0 and 1 inclusive, representing the fraction of life+-- remaining for the device.+--+-- 'tags', 'deviceDescription_tags' - The tags currently associated with the AWS IoT 1-Click device.+--+-- 'type'', 'deviceDescription_type' - The type of the device, such as \"button\".+newDeviceDescription ::+ DeviceDescription+newDeviceDescription =+ DeviceDescription'+ { arn = Prelude.Nothing,+ attributes = Prelude.Nothing,+ deviceId = Prelude.Nothing,+ enabled = Prelude.Nothing,+ remainingLife = Prelude.Nothing,+ tags = Prelude.Nothing,+ type' = Prelude.Nothing+ }++-- | The ARN of the device.+deviceDescription_arn :: Lens.Lens' DeviceDescription (Prelude.Maybe Prelude.Text)+deviceDescription_arn = Lens.lens (\DeviceDescription' {arn} -> arn) (\s@DeviceDescription' {} a -> s {arn = a} :: DeviceDescription)++-- | An array of zero or more elements of DeviceAttribute objects providing+-- user specified device attributes.+deviceDescription_attributes :: Lens.Lens' DeviceDescription (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+deviceDescription_attributes = Lens.lens (\DeviceDescription' {attributes} -> attributes) (\s@DeviceDescription' {} a -> s {attributes = a} :: DeviceDescription) Prelude.. Lens.mapping Lens.coerced++-- | The unique identifier of the device.+deviceDescription_deviceId :: Lens.Lens' DeviceDescription (Prelude.Maybe Prelude.Text)+deviceDescription_deviceId = Lens.lens (\DeviceDescription' {deviceId} -> deviceId) (\s@DeviceDescription' {} a -> s {deviceId = a} :: DeviceDescription)++-- | A Boolean value indicating whether or not the device is enabled.+deviceDescription_enabled :: Lens.Lens' DeviceDescription (Prelude.Maybe Prelude.Bool)+deviceDescription_enabled = Lens.lens (\DeviceDescription' {enabled} -> enabled) (\s@DeviceDescription' {} a -> s {enabled = a} :: DeviceDescription)++-- | A value between 0 and 1 inclusive, representing the fraction of life+-- remaining for the device.+deviceDescription_remainingLife :: Lens.Lens' DeviceDescription (Prelude.Maybe Prelude.Double)+deviceDescription_remainingLife = Lens.lens (\DeviceDescription' {remainingLife} -> remainingLife) (\s@DeviceDescription' {} a -> s {remainingLife = a} :: DeviceDescription)++-- | The tags currently associated with the AWS IoT 1-Click device.+deviceDescription_tags :: Lens.Lens' DeviceDescription (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+deviceDescription_tags = Lens.lens (\DeviceDescription' {tags} -> tags) (\s@DeviceDescription' {} a -> s {tags = a} :: DeviceDescription) Prelude.. Lens.mapping Lens.coerced++-- | The type of the device, such as \"button\".+deviceDescription_type :: Lens.Lens' DeviceDescription (Prelude.Maybe Prelude.Text)+deviceDescription_type = Lens.lens (\DeviceDescription' {type'} -> type') (\s@DeviceDescription' {} a -> s {type' = a} :: DeviceDescription)++instance Data.FromJSON DeviceDescription where+ parseJSON =+ Data.withObject+ "DeviceDescription"+ ( \x ->+ DeviceDescription'+ Prelude.<$> (x Data..:? "arn")+ Prelude.<*> (x Data..:? "attributes" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "deviceId")+ Prelude.<*> (x Data..:? "enabled")+ Prelude.<*> (x Data..:? "remainingLife")+ Prelude.<*> (x Data..:? "tags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "type")+ )++instance Prelude.Hashable DeviceDescription where+ hashWithSalt _salt DeviceDescription' {..} =+ _salt+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` attributes+ `Prelude.hashWithSalt` deviceId+ `Prelude.hashWithSalt` enabled+ `Prelude.hashWithSalt` remainingLife+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` type'++instance Prelude.NFData DeviceDescription where+ rnf DeviceDescription' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf attributes+ `Prelude.seq` Prelude.rnf deviceId+ `Prelude.seq` Prelude.rnf enabled+ `Prelude.seq` Prelude.rnf remainingLife+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf type'
+ gen/Amazonka/IoT1ClickDevices/Types/DeviceEvent.hs view
@@ -0,0 +1,83 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.Types.DeviceEvent+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.IoT1ClickDevices.Types.DeviceEvent where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types.Device+import qualified Amazonka.Prelude as Prelude++-- | /See:/ 'newDeviceEvent' smart constructor.+data DeviceEvent = DeviceEvent'+ { -- | An object representing the device associated with the event.+ device :: Prelude.Maybe Device,+ -- | A serialized JSON object representing the device-type specific event.+ stdEvent :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeviceEvent' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'device', 'deviceEvent_device' - An object representing the device associated with the event.+--+-- 'stdEvent', 'deviceEvent_stdEvent' - A serialized JSON object representing the device-type specific event.+newDeviceEvent ::+ DeviceEvent+newDeviceEvent =+ DeviceEvent'+ { device = Prelude.Nothing,+ stdEvent = Prelude.Nothing+ }++-- | An object representing the device associated with the event.+deviceEvent_device :: Lens.Lens' DeviceEvent (Prelude.Maybe Device)+deviceEvent_device = Lens.lens (\DeviceEvent' {device} -> device) (\s@DeviceEvent' {} a -> s {device = a} :: DeviceEvent)++-- | A serialized JSON object representing the device-type specific event.+deviceEvent_stdEvent :: Lens.Lens' DeviceEvent (Prelude.Maybe Prelude.Text)+deviceEvent_stdEvent = Lens.lens (\DeviceEvent' {stdEvent} -> stdEvent) (\s@DeviceEvent' {} a -> s {stdEvent = a} :: DeviceEvent)++instance Data.FromJSON DeviceEvent where+ parseJSON =+ Data.withObject+ "DeviceEvent"+ ( \x ->+ DeviceEvent'+ Prelude.<$> (x Data..:? "device")+ Prelude.<*> (x Data..:? "stdEvent")+ )++instance Prelude.Hashable DeviceEvent where+ hashWithSalt _salt DeviceEvent' {..} =+ _salt+ `Prelude.hashWithSalt` device+ `Prelude.hashWithSalt` stdEvent++instance Prelude.NFData DeviceEvent where+ rnf DeviceEvent' {..} =+ Prelude.rnf device+ `Prelude.seq` Prelude.rnf stdEvent
+ gen/Amazonka/IoT1ClickDevices/Types/DeviceMethod.hs view
@@ -0,0 +1,91 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.Types.DeviceMethod+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.IoT1ClickDevices.Types.DeviceMethod where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | /See:/ 'newDeviceMethod' smart constructor.+data DeviceMethod = DeviceMethod'+ { -- | The type of the device, such as \"button\".+ deviceType :: Prelude.Maybe Prelude.Text,+ -- | The name of the method applicable to the deviceType.+ methodName :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeviceMethod' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'deviceType', 'deviceMethod_deviceType' - The type of the device, such as \"button\".+--+-- 'methodName', 'deviceMethod_methodName' - The name of the method applicable to the deviceType.+newDeviceMethod ::+ DeviceMethod+newDeviceMethod =+ DeviceMethod'+ { deviceType = Prelude.Nothing,+ methodName = Prelude.Nothing+ }++-- | The type of the device, such as \"button\".+deviceMethod_deviceType :: Lens.Lens' DeviceMethod (Prelude.Maybe Prelude.Text)+deviceMethod_deviceType = Lens.lens (\DeviceMethod' {deviceType} -> deviceType) (\s@DeviceMethod' {} a -> s {deviceType = a} :: DeviceMethod)++-- | The name of the method applicable to the deviceType.+deviceMethod_methodName :: Lens.Lens' DeviceMethod (Prelude.Maybe Prelude.Text)+deviceMethod_methodName = Lens.lens (\DeviceMethod' {methodName} -> methodName) (\s@DeviceMethod' {} a -> s {methodName = a} :: DeviceMethod)++instance Data.FromJSON DeviceMethod where+ parseJSON =+ Data.withObject+ "DeviceMethod"+ ( \x ->+ DeviceMethod'+ Prelude.<$> (x Data..:? "deviceType")+ Prelude.<*> (x Data..:? "methodName")+ )++instance Prelude.Hashable DeviceMethod where+ hashWithSalt _salt DeviceMethod' {..} =+ _salt+ `Prelude.hashWithSalt` deviceType+ `Prelude.hashWithSalt` methodName++instance Prelude.NFData DeviceMethod where+ rnf DeviceMethod' {..} =+ Prelude.rnf deviceType+ `Prelude.seq` Prelude.rnf methodName++instance Data.ToJSON DeviceMethod where+ toJSON DeviceMethod' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("deviceType" Data..=) Prelude.<$> deviceType,+ ("methodName" Data..=) Prelude.<$> methodName+ ]+ )
+ gen/Amazonka/IoT1ClickDevices/UnclaimDevice.hs view
@@ -0,0 +1,161 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.UnclaimDevice+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Disassociates a device from your AWS account using its device ID.+module Amazonka.IoT1ClickDevices.UnclaimDevice+ ( -- * Creating a Request+ UnclaimDevice (..),+ newUnclaimDevice,++ -- * Request Lenses+ unclaimDevice_deviceId,++ -- * Destructuring the Response+ UnclaimDeviceResponse (..),+ newUnclaimDeviceResponse,++ -- * Response Lenses+ unclaimDeviceResponse_state,+ unclaimDeviceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUnclaimDevice' smart constructor.+data UnclaimDevice = UnclaimDevice'+ { -- | The unique identifier of the device.+ deviceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UnclaimDevice' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'deviceId', 'unclaimDevice_deviceId' - The unique identifier of the device.+newUnclaimDevice ::+ -- | 'deviceId'+ Prelude.Text ->+ UnclaimDevice+newUnclaimDevice pDeviceId_ =+ UnclaimDevice' {deviceId = pDeviceId_}++-- | The unique identifier of the device.+unclaimDevice_deviceId :: Lens.Lens' UnclaimDevice Prelude.Text+unclaimDevice_deviceId = Lens.lens (\UnclaimDevice' {deviceId} -> deviceId) (\s@UnclaimDevice' {} a -> s {deviceId = a} :: UnclaimDevice)++instance Core.AWSRequest UnclaimDevice where+ type+ AWSResponse UnclaimDevice =+ UnclaimDeviceResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UnclaimDeviceResponse'+ Prelude.<$> (x Data..?> "state")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UnclaimDevice where+ hashWithSalt _salt UnclaimDevice' {..} =+ _salt `Prelude.hashWithSalt` deviceId++instance Prelude.NFData UnclaimDevice where+ rnf UnclaimDevice' {..} = Prelude.rnf deviceId++instance Data.ToHeaders UnclaimDevice where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UnclaimDevice where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath UnclaimDevice where+ toPath UnclaimDevice' {..} =+ Prelude.mconcat+ ["/devices/", Data.toBS deviceId, "/unclaim"]++instance Data.ToQuery UnclaimDevice where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUnclaimDeviceResponse' smart constructor.+data UnclaimDeviceResponse = UnclaimDeviceResponse'+ { -- | The device\'s final claim state.+ state :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UnclaimDeviceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'state', 'unclaimDeviceResponse_state' - The device\'s final claim state.+--+-- 'httpStatus', 'unclaimDeviceResponse_httpStatus' - The response's http status code.+newUnclaimDeviceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UnclaimDeviceResponse+newUnclaimDeviceResponse pHttpStatus_ =+ UnclaimDeviceResponse'+ { state = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The device\'s final claim state.+unclaimDeviceResponse_state :: Lens.Lens' UnclaimDeviceResponse (Prelude.Maybe Prelude.Text)+unclaimDeviceResponse_state = Lens.lens (\UnclaimDeviceResponse' {state} -> state) (\s@UnclaimDeviceResponse' {} a -> s {state = a} :: UnclaimDeviceResponse)++-- | The response's http status code.+unclaimDeviceResponse_httpStatus :: Lens.Lens' UnclaimDeviceResponse Prelude.Int+unclaimDeviceResponse_httpStatus = Lens.lens (\UnclaimDeviceResponse' {httpStatus} -> httpStatus) (\s@UnclaimDeviceResponse' {} a -> s {httpStatus = a} :: UnclaimDeviceResponse)++instance Prelude.NFData UnclaimDeviceResponse where+ rnf UnclaimDeviceResponse' {..} =+ Prelude.rnf state+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickDevices/UntagResource.hs view
@@ -0,0 +1,141 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.UntagResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Using tag keys, deletes the tags (key\/value pairs) associated with the+-- specified resource ARN.+module Amazonka.IoT1ClickDevices.UntagResource+ ( -- * Creating a Request+ UntagResource (..),+ newUntagResource,++ -- * Request Lenses+ untagResource_tagKeys,+ untagResource_resourceArn,++ -- * Destructuring the Response+ UntagResourceResponse (..),+ newUntagResourceResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+ { -- | A collections of tag keys. For example, {\"key1\",\"key2\"}+ tagKeys :: [Prelude.Text],+ -- | The ARN of the resource.+ resourceArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tagKeys', 'untagResource_tagKeys' - A collections of tag keys. For example, {\"key1\",\"key2\"}+--+-- 'resourceArn', 'untagResource_resourceArn' - The ARN of the resource.+newUntagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ UntagResource+newUntagResource pResourceArn_ =+ UntagResource'+ { tagKeys = Prelude.mempty,+ resourceArn = pResourceArn_+ }++-- | A collections of tag keys. For example, {\"key1\",\"key2\"}+untagResource_tagKeys :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++-- | The ARN of the resource.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++instance Core.AWSRequest UntagResource where+ type+ AWSResponse UntagResource =+ UntagResourceResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveNull UntagResourceResponse'++instance Prelude.Hashable UntagResource where+ hashWithSalt _salt UntagResource' {..} =+ _salt+ `Prelude.hashWithSalt` tagKeys+ `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData UntagResource where+ rnf UntagResource' {..} =+ Prelude.rnf tagKeys+ `Prelude.seq` Prelude.rnf resourceArn++instance Data.ToHeaders UntagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath UntagResource where+ toPath UntagResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery UntagResource where+ toQuery UntagResource' {..} =+ Prelude.mconcat+ ["tagKeys" Data.=: Data.toQueryList "member" tagKeys]++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newUntagResourceResponse ::+ UntagResourceResponse+newUntagResourceResponse = UntagResourceResponse'++instance Prelude.NFData UntagResourceResponse where+ rnf _ = ()
+ gen/Amazonka/IoT1ClickDevices/UpdateDeviceState.hs view
@@ -0,0 +1,171 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.UpdateDeviceState+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Using a Boolean value (true or false), this operation enables or+-- disables the device given a device ID.+module Amazonka.IoT1ClickDevices.UpdateDeviceState+ ( -- * Creating a Request+ UpdateDeviceState (..),+ newUpdateDeviceState,++ -- * Request Lenses+ updateDeviceState_enabled,+ updateDeviceState_deviceId,++ -- * Destructuring the Response+ UpdateDeviceStateResponse (..),+ newUpdateDeviceStateResponse,++ -- * Response Lenses+ updateDeviceStateResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateDeviceState' smart constructor.+data UpdateDeviceState = UpdateDeviceState'+ { -- | If true, the device is enabled. If false, the device is disabled.+ enabled :: Prelude.Maybe Prelude.Bool,+ -- | The unique identifier of the device.+ deviceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateDeviceState' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'enabled', 'updateDeviceState_enabled' - If true, the device is enabled. If false, the device is disabled.+--+-- 'deviceId', 'updateDeviceState_deviceId' - The unique identifier of the device.+newUpdateDeviceState ::+ -- | 'deviceId'+ Prelude.Text ->+ UpdateDeviceState+newUpdateDeviceState pDeviceId_ =+ UpdateDeviceState'+ { enabled = Prelude.Nothing,+ deviceId = pDeviceId_+ }++-- | If true, the device is enabled. If false, the device is disabled.+updateDeviceState_enabled :: Lens.Lens' UpdateDeviceState (Prelude.Maybe Prelude.Bool)+updateDeviceState_enabled = Lens.lens (\UpdateDeviceState' {enabled} -> enabled) (\s@UpdateDeviceState' {} a -> s {enabled = a} :: UpdateDeviceState)++-- | The unique identifier of the device.+updateDeviceState_deviceId :: Lens.Lens' UpdateDeviceState Prelude.Text+updateDeviceState_deviceId = Lens.lens (\UpdateDeviceState' {deviceId} -> deviceId) (\s@UpdateDeviceState' {} a -> s {deviceId = a} :: UpdateDeviceState)++instance Core.AWSRequest UpdateDeviceState where+ type+ AWSResponse UpdateDeviceState =+ UpdateDeviceStateResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ UpdateDeviceStateResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateDeviceState where+ hashWithSalt _salt UpdateDeviceState' {..} =+ _salt+ `Prelude.hashWithSalt` enabled+ `Prelude.hashWithSalt` deviceId++instance Prelude.NFData UpdateDeviceState where+ rnf UpdateDeviceState' {..} =+ Prelude.rnf enabled+ `Prelude.seq` Prelude.rnf deviceId++instance Data.ToHeaders UpdateDeviceState where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateDeviceState where+ toJSON UpdateDeviceState' {..} =+ Data.object+ ( Prelude.catMaybes+ [("enabled" Data..=) Prelude.<$> enabled]+ )++instance Data.ToPath UpdateDeviceState where+ toPath UpdateDeviceState' {..} =+ Prelude.mconcat+ ["/devices/", Data.toBS deviceId, "/state"]++instance Data.ToQuery UpdateDeviceState where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateDeviceStateResponse' smart constructor.+data UpdateDeviceStateResponse = UpdateDeviceStateResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateDeviceStateResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'updateDeviceStateResponse_httpStatus' - The response's http status code.+newUpdateDeviceStateResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateDeviceStateResponse+newUpdateDeviceStateResponse pHttpStatus_ =+ UpdateDeviceStateResponse'+ { httpStatus =+ pHttpStatus_+ }++-- | The response's http status code.+updateDeviceStateResponse_httpStatus :: Lens.Lens' UpdateDeviceStateResponse Prelude.Int+updateDeviceStateResponse_httpStatus = Lens.lens (\UpdateDeviceStateResponse' {httpStatus} -> httpStatus) (\s@UpdateDeviceStateResponse' {} a -> s {httpStatus = a} :: UpdateDeviceStateResponse)++instance Prelude.NFData UpdateDeviceStateResponse where+ rnf UpdateDeviceStateResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickDevices/Waiters.hs view
@@ -0,0 +1,24 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IoT1ClickDevices.Waiters+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.IoT1ClickDevices.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickDevices.Lens+import Amazonka.IoT1ClickDevices.Types+import qualified Amazonka.Prelude as Prelude
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,23 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Main (main) where++import Test.Amazonka.IoT1ClickDevices+import Test.Amazonka.IoT1ClickDevices.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "IoT1ClickDevices"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/Gen/IoT1ClickDevices.hs view
@@ -0,0 +1,298 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.Amazonka.Gen.IoT1ClickDevices+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.Gen.IoT1ClickDevices where++import Amazonka.IoT1ClickDevices+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.IoT1ClickDevices.Internal+import Test.Amazonka.Prelude+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ requestClaimDevicesByClaimCode $+-- newClaimDevicesByClaimCode+--+-- , requestDescribeDevice $+-- newDescribeDevice+--+-- , requestFinalizeDeviceClaim $+-- newFinalizeDeviceClaim+--+-- , requestGetDeviceMethods $+-- newGetDeviceMethods+--+-- , requestInitiateDeviceClaim $+-- newInitiateDeviceClaim+--+-- , requestInvokeDeviceMethod $+-- newInvokeDeviceMethod+--+-- , requestListDeviceEvents $+-- newListDeviceEvents+--+-- , requestListDevices $+-- newListDevices+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUnclaimDevice $+-- newUnclaimDevice+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateDeviceState $+-- newUpdateDeviceState+--+-- ]++-- , testGroup "response"+-- [ responseClaimDevicesByClaimCode $+-- newClaimDevicesByClaimCodeResponse+--+-- , responseDescribeDevice $+-- newDescribeDeviceResponse+--+-- , responseFinalizeDeviceClaim $+-- newFinalizeDeviceClaimResponse+--+-- , responseGetDeviceMethods $+-- newGetDeviceMethodsResponse+--+-- , responseInitiateDeviceClaim $+-- newInitiateDeviceClaimResponse+--+-- , responseInvokeDeviceMethod $+-- newInvokeDeviceMethodResponse+--+-- , responseListDeviceEvents $+-- newListDeviceEventsResponse+--+-- , responseListDevices $+-- newListDevicesResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUnclaimDevice $+-- newUnclaimDeviceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateDeviceState $+-- newUpdateDeviceStateResponse+--+-- ]+-- ]++-- Requests++requestClaimDevicesByClaimCode :: ClaimDevicesByClaimCode -> TestTree+requestClaimDevicesByClaimCode =+ req+ "ClaimDevicesByClaimCode"+ "fixture/ClaimDevicesByClaimCode.yaml"++requestDescribeDevice :: DescribeDevice -> TestTree+requestDescribeDevice =+ req+ "DescribeDevice"+ "fixture/DescribeDevice.yaml"++requestFinalizeDeviceClaim :: FinalizeDeviceClaim -> TestTree+requestFinalizeDeviceClaim =+ req+ "FinalizeDeviceClaim"+ "fixture/FinalizeDeviceClaim.yaml"++requestGetDeviceMethods :: GetDeviceMethods -> TestTree+requestGetDeviceMethods =+ req+ "GetDeviceMethods"+ "fixture/GetDeviceMethods.yaml"++requestInitiateDeviceClaim :: InitiateDeviceClaim -> TestTree+requestInitiateDeviceClaim =+ req+ "InitiateDeviceClaim"+ "fixture/InitiateDeviceClaim.yaml"++requestInvokeDeviceMethod :: InvokeDeviceMethod -> TestTree+requestInvokeDeviceMethod =+ req+ "InvokeDeviceMethod"+ "fixture/InvokeDeviceMethod.yaml"++requestListDeviceEvents :: ListDeviceEvents -> TestTree+requestListDeviceEvents =+ req+ "ListDeviceEvents"+ "fixture/ListDeviceEvents.yaml"++requestListDevices :: ListDevices -> TestTree+requestListDevices =+ req+ "ListDevices"+ "fixture/ListDevices.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUnclaimDevice :: UnclaimDevice -> TestTree+requestUnclaimDevice =+ req+ "UnclaimDevice"+ "fixture/UnclaimDevice.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateDeviceState :: UpdateDeviceState -> TestTree+requestUpdateDeviceState =+ req+ "UpdateDeviceState"+ "fixture/UpdateDeviceState.yaml"++-- Responses++responseClaimDevicesByClaimCode :: ClaimDevicesByClaimCodeResponse -> TestTree+responseClaimDevicesByClaimCode =+ res+ "ClaimDevicesByClaimCodeResponse"+ "fixture/ClaimDevicesByClaimCodeResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ClaimDevicesByClaimCode)++responseDescribeDevice :: DescribeDeviceResponse -> TestTree+responseDescribeDevice =+ res+ "DescribeDeviceResponse"+ "fixture/DescribeDeviceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeDevice)++responseFinalizeDeviceClaim :: FinalizeDeviceClaimResponse -> TestTree+responseFinalizeDeviceClaim =+ res+ "FinalizeDeviceClaimResponse"+ "fixture/FinalizeDeviceClaimResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy FinalizeDeviceClaim)++responseGetDeviceMethods :: GetDeviceMethodsResponse -> TestTree+responseGetDeviceMethods =+ res+ "GetDeviceMethodsResponse"+ "fixture/GetDeviceMethodsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetDeviceMethods)++responseInitiateDeviceClaim :: InitiateDeviceClaimResponse -> TestTree+responseInitiateDeviceClaim =+ res+ "InitiateDeviceClaimResponse"+ "fixture/InitiateDeviceClaimResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy InitiateDeviceClaim)++responseInvokeDeviceMethod :: InvokeDeviceMethodResponse -> TestTree+responseInvokeDeviceMethod =+ res+ "InvokeDeviceMethodResponse"+ "fixture/InvokeDeviceMethodResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy InvokeDeviceMethod)++responseListDeviceEvents :: ListDeviceEventsResponse -> TestTree+responseListDeviceEvents =+ res+ "ListDeviceEventsResponse"+ "fixture/ListDeviceEventsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListDeviceEvents)++responseListDevices :: ListDevicesResponse -> TestTree+responseListDevices =+ res+ "ListDevicesResponse"+ "fixture/ListDevicesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListDevices)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+ res+ "ListTagsForResourceResponse"+ "fixture/ListTagsForResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responseTagResource :: TagResourceResponse -> TestTree+responseTagResource =+ res+ "TagResourceResponse"+ "fixture/TagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy TagResource)++responseUnclaimDevice :: UnclaimDeviceResponse -> TestTree+responseUnclaimDevice =+ res+ "UnclaimDeviceResponse"+ "fixture/UnclaimDeviceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UnclaimDevice)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource =+ res+ "UntagResourceResponse"+ "fixture/UntagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UntagResource)++responseUpdateDeviceState :: UpdateDeviceStateResponse -> TestTree+responseUpdateDeviceState =+ res+ "UpdateDeviceStateResponse"+ "fixture/UpdateDeviceStateResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateDeviceState)
+ test/Test/Amazonka/IoT1ClickDevices.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.IoT1ClickDevices+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.IoT1ClickDevices+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/IoT1ClickDevices/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.IoT1ClickDevices.Internal+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.IoT1ClickDevices.Internal where