amazonka-iot1click-projects (empty) → 2.0
raw patch · 66 files changed
+5477/−0 lines, 66 filesdep +amazonka-coredep +amazonka-iot1click-projectsdep +amazonka-test
Dependencies added: amazonka-core, amazonka-iot1click-projects, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-iot1click-projects.cabal +105/−0
- fixture/AssociateDeviceWithPlacement.yaml +10/−0
- fixture/AssociateDeviceWithPlacementResponse.proto +0/−0
- fixture/CreatePlacement.yaml +10/−0
- fixture/CreatePlacementResponse.proto +0/−0
- fixture/CreateProject.yaml +10/−0
- fixture/CreateProjectResponse.proto +0/−0
- fixture/DeletePlacement.yaml +10/−0
- fixture/DeletePlacementResponse.proto +0/−0
- fixture/DeleteProject.yaml +10/−0
- fixture/DeleteProjectResponse.proto +0/−0
- fixture/DescribePlacement.yaml +10/−0
- fixture/DescribePlacementResponse.proto +0/−0
- fixture/DescribeProject.yaml +10/−0
- fixture/DescribeProjectResponse.proto +0/−0
- fixture/DisassociateDeviceFromPlacement.yaml +10/−0
- fixture/DisassociateDeviceFromPlacementResponse.proto +0/−0
- fixture/GetDevicesInPlacement.yaml +10/−0
- fixture/GetDevicesInPlacementResponse.proto +0/−0
- fixture/ListPlacements.yaml +10/−0
- fixture/ListPlacementsResponse.proto +0/−0
- fixture/ListProjects.yaml +10/−0
- fixture/ListProjectsResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdatePlacement.yaml +10/−0
- fixture/UpdatePlacementResponse.proto +0/−0
- fixture/UpdateProject.yaml +10/−0
- fixture/UpdateProjectResponse.proto +0/−0
- gen/Amazonka/IoT1ClickProjects.hs +212/−0
- gen/Amazonka/IoT1ClickProjects/AssociateDeviceWithPlacement.hs +226/−0
- gen/Amazonka/IoT1ClickProjects/CreatePlacement.hs +187/−0
- gen/Amazonka/IoT1ClickProjects/CreateProject.hs +220/−0
- gen/Amazonka/IoT1ClickProjects/DeletePlacement.hs +169/−0
- gen/Amazonka/IoT1ClickProjects/DeleteProject.hs +147/−0
- gen/Amazonka/IoT1ClickProjects/DescribePlacement.hs +183/−0
- gen/Amazonka/IoT1ClickProjects/DescribeProject.hs +160/−0
- gen/Amazonka/IoT1ClickProjects/DisassociateDeviceFromPlacement.hs +207/−0
- gen/Amazonka/IoT1ClickProjects/GetDevicesInPlacement.hs +184/−0
- gen/Amazonka/IoT1ClickProjects/Lens.hs +173/−0
- gen/Amazonka/IoT1ClickProjects/ListPlacements.hs +230/−0
- gen/Amazonka/IoT1ClickProjects/ListProjects.hs +212/−0
- gen/Amazonka/IoT1ClickProjects/ListTagsForResource.hs +163/−0
- gen/Amazonka/IoT1ClickProjects/TagResource.hs +172/−0
- gen/Amazonka/IoT1ClickProjects/Types.hs +192/−0
- gen/Amazonka/IoT1ClickProjects/Types/DeviceTemplate.hs +102/−0
- gen/Amazonka/IoT1ClickProjects/Types/PlacementDescription.hs +141/−0
- gen/Amazonka/IoT1ClickProjects/Types/PlacementSummary.hs +129/−0
- gen/Amazonka/IoT1ClickProjects/Types/PlacementTemplate.hs +109/−0
- gen/Amazonka/IoT1ClickProjects/Types/ProjectDescription.hs +164/−0
- gen/Amazonka/IoT1ClickProjects/Types/ProjectSummary.hs +139/−0
- gen/Amazonka/IoT1ClickProjects/UntagResource.hs +163/−0
- gen/Amazonka/IoT1ClickProjects/UpdatePlacement.hs +189/−0
- gen/Amazonka/IoT1ClickProjects/UpdateProject.hs +195/−0
- gen/Amazonka/IoT1ClickProjects/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/Gen/IoT1ClickProjects.hs +358/−0
- test/Test/Amazonka/IoT1ClickProjects.hs +20/−0
- test/Test/Amazonka/IoT1ClickProjects/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 Projects 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-projects)+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.IoT1ClickProjects](http://hackage.haskell.org/package/amazonka-iot1click-projects/docs/Amazonka-IoT1ClickProjects.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-projects` 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-projects.cabal view
@@ -0,0 +1,105 @@+cabal-version: 2.2+name: amazonka-iot1click-projects+version: 2.0+synopsis: Amazon IoT 1-Click Projects 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.IoT1ClickProjects.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.IoT1ClickProjects" 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-projects++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.IoT1ClickProjects+ Amazonka.IoT1ClickProjects.AssociateDeviceWithPlacement+ Amazonka.IoT1ClickProjects.CreatePlacement+ Amazonka.IoT1ClickProjects.CreateProject+ Amazonka.IoT1ClickProjects.DeletePlacement+ Amazonka.IoT1ClickProjects.DeleteProject+ Amazonka.IoT1ClickProjects.DescribePlacement+ Amazonka.IoT1ClickProjects.DescribeProject+ Amazonka.IoT1ClickProjects.DisassociateDeviceFromPlacement+ Amazonka.IoT1ClickProjects.GetDevicesInPlacement+ Amazonka.IoT1ClickProjects.Lens+ Amazonka.IoT1ClickProjects.ListPlacements+ Amazonka.IoT1ClickProjects.ListProjects+ Amazonka.IoT1ClickProjects.ListTagsForResource+ Amazonka.IoT1ClickProjects.TagResource+ Amazonka.IoT1ClickProjects.Types+ Amazonka.IoT1ClickProjects.Types.DeviceTemplate+ Amazonka.IoT1ClickProjects.Types.PlacementDescription+ Amazonka.IoT1ClickProjects.Types.PlacementSummary+ Amazonka.IoT1ClickProjects.Types.PlacementTemplate+ Amazonka.IoT1ClickProjects.Types.ProjectDescription+ Amazonka.IoT1ClickProjects.Types.ProjectSummary+ Amazonka.IoT1ClickProjects.UntagResource+ Amazonka.IoT1ClickProjects.UpdatePlacement+ Amazonka.IoT1ClickProjects.UpdateProject+ Amazonka.IoT1ClickProjects.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-iot1click-projects-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.IoT1ClickProjects+ Test.Amazonka.IoT1ClickProjects+ Test.Amazonka.IoT1ClickProjects.Internal++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , amazonka-iot1click-projects+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/AssociateDeviceWithPlacement.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/AssociateDeviceWithPlacementResponse.proto view
+ fixture/CreatePlacement.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/CreatePlacementResponse.proto view
+ fixture/CreateProject.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/CreateProjectResponse.proto view
+ fixture/DeletePlacement.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/DeletePlacementResponse.proto view
+ fixture/DeleteProject.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/DeleteProjectResponse.proto view
+ fixture/DescribePlacement.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/DescribePlacementResponse.proto view
+ fixture/DescribeProject.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/DescribeProjectResponse.proto view
+ fixture/DisassociateDeviceFromPlacement.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/DisassociateDeviceFromPlacementResponse.proto view
+ fixture/GetDevicesInPlacement.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/GetDevicesInPlacementResponse.proto view
+ fixture/ListPlacements.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/ListPlacementsResponse.proto view
+ fixture/ListProjects.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/ListProjectsResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/UpdatePlacement.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/UpdatePlacementResponse.proto view
+ fixture/UpdateProject.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/projects.iot1click/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: projects.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/UpdateProjectResponse.proto view
+ gen/Amazonka/IoT1ClickProjects.hs view
@@ -0,0 +1,212 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.IoT1ClickProjects+-- 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.+--+-- The AWS IoT 1-Click Projects API Reference+module Amazonka.IoT1ClickProjects+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** InternalFailureException+ _InternalFailureException,++ -- ** InvalidRequestException+ _InvalidRequestException,++ -- ** ResourceConflictException+ _ResourceConflictException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** TooManyRequestsException+ _TooManyRequestsException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** AssociateDeviceWithPlacement+ AssociateDeviceWithPlacement (AssociateDeviceWithPlacement'),+ newAssociateDeviceWithPlacement,+ AssociateDeviceWithPlacementResponse (AssociateDeviceWithPlacementResponse'),+ newAssociateDeviceWithPlacementResponse,++ -- ** CreatePlacement+ CreatePlacement (CreatePlacement'),+ newCreatePlacement,+ CreatePlacementResponse (CreatePlacementResponse'),+ newCreatePlacementResponse,++ -- ** CreateProject+ CreateProject (CreateProject'),+ newCreateProject,+ CreateProjectResponse (CreateProjectResponse'),+ newCreateProjectResponse,++ -- ** DeletePlacement+ DeletePlacement (DeletePlacement'),+ newDeletePlacement,+ DeletePlacementResponse (DeletePlacementResponse'),+ newDeletePlacementResponse,++ -- ** DeleteProject+ DeleteProject (DeleteProject'),+ newDeleteProject,+ DeleteProjectResponse (DeleteProjectResponse'),+ newDeleteProjectResponse,++ -- ** DescribePlacement+ DescribePlacement (DescribePlacement'),+ newDescribePlacement,+ DescribePlacementResponse (DescribePlacementResponse'),+ newDescribePlacementResponse,++ -- ** DescribeProject+ DescribeProject (DescribeProject'),+ newDescribeProject,+ DescribeProjectResponse (DescribeProjectResponse'),+ newDescribeProjectResponse,++ -- ** DisassociateDeviceFromPlacement+ DisassociateDeviceFromPlacement (DisassociateDeviceFromPlacement'),+ newDisassociateDeviceFromPlacement,+ DisassociateDeviceFromPlacementResponse (DisassociateDeviceFromPlacementResponse'),+ newDisassociateDeviceFromPlacementResponse,++ -- ** GetDevicesInPlacement+ GetDevicesInPlacement (GetDevicesInPlacement'),+ newGetDevicesInPlacement,+ GetDevicesInPlacementResponse (GetDevicesInPlacementResponse'),+ newGetDevicesInPlacementResponse,++ -- ** ListPlacements (Paginated)+ ListPlacements (ListPlacements'),+ newListPlacements,+ ListPlacementsResponse (ListPlacementsResponse'),+ newListPlacementsResponse,++ -- ** ListProjects (Paginated)+ ListProjects (ListProjects'),+ newListProjects,+ ListProjectsResponse (ListProjectsResponse'),+ newListProjectsResponse,++ -- ** ListTagsForResource+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdatePlacement+ UpdatePlacement (UpdatePlacement'),+ newUpdatePlacement,+ UpdatePlacementResponse (UpdatePlacementResponse'),+ newUpdatePlacementResponse,++ -- ** UpdateProject+ UpdateProject (UpdateProject'),+ newUpdateProject,+ UpdateProjectResponse (UpdateProjectResponse'),+ newUpdateProjectResponse,++ -- * Types++ -- ** DeviceTemplate+ DeviceTemplate (DeviceTemplate'),+ newDeviceTemplate,++ -- ** PlacementDescription+ PlacementDescription (PlacementDescription'),+ newPlacementDescription,++ -- ** PlacementSummary+ PlacementSummary (PlacementSummary'),+ newPlacementSummary,++ -- ** PlacementTemplate+ PlacementTemplate (PlacementTemplate'),+ newPlacementTemplate,++ -- ** ProjectDescription+ ProjectDescription (ProjectDescription'),+ newProjectDescription,++ -- ** ProjectSummary+ ProjectSummary (ProjectSummary'),+ newProjectSummary,+ )+where++import Amazonka.IoT1ClickProjects.AssociateDeviceWithPlacement+import Amazonka.IoT1ClickProjects.CreatePlacement+import Amazonka.IoT1ClickProjects.CreateProject+import Amazonka.IoT1ClickProjects.DeletePlacement+import Amazonka.IoT1ClickProjects.DeleteProject+import Amazonka.IoT1ClickProjects.DescribePlacement+import Amazonka.IoT1ClickProjects.DescribeProject+import Amazonka.IoT1ClickProjects.DisassociateDeviceFromPlacement+import Amazonka.IoT1ClickProjects.GetDevicesInPlacement+import Amazonka.IoT1ClickProjects.Lens+import Amazonka.IoT1ClickProjects.ListPlacements+import Amazonka.IoT1ClickProjects.ListProjects+import Amazonka.IoT1ClickProjects.ListTagsForResource+import Amazonka.IoT1ClickProjects.TagResource+import Amazonka.IoT1ClickProjects.Types+import Amazonka.IoT1ClickProjects.UntagResource+import Amazonka.IoT1ClickProjects.UpdatePlacement+import Amazonka.IoT1ClickProjects.UpdateProject+import Amazonka.IoT1ClickProjects.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 'IoT1ClickProjects'.++-- $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/IoT1ClickProjects/AssociateDeviceWithPlacement.hs view
@@ -0,0 +1,226 @@+{-# 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.IoT1ClickProjects.AssociateDeviceWithPlacement+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Associates a physical device with a placement.+module Amazonka.IoT1ClickProjects.AssociateDeviceWithPlacement+ ( -- * Creating a Request+ AssociateDeviceWithPlacement (..),+ newAssociateDeviceWithPlacement,++ -- * Request Lenses+ associateDeviceWithPlacement_projectName,+ associateDeviceWithPlacement_placementName,+ associateDeviceWithPlacement_deviceId,+ associateDeviceWithPlacement_deviceTemplateName,++ -- * Destructuring the Response+ AssociateDeviceWithPlacementResponse (..),+ newAssociateDeviceWithPlacementResponse,++ -- * Response Lenses+ associateDeviceWithPlacementResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newAssociateDeviceWithPlacement' smart constructor.+data AssociateDeviceWithPlacement = AssociateDeviceWithPlacement'+ { -- | The name of the project containing the placement in which to associate+ -- the device.+ projectName :: Prelude.Text,+ -- | The name of the placement in which to associate the device.+ placementName :: Prelude.Text,+ -- | The ID of the physical device to be associated with the given placement+ -- in the project. Note that a mandatory 4 character prefix is required for+ -- all @deviceId@ values.+ deviceId :: Prelude.Text,+ -- | The device template name to associate with the device ID.+ deviceTemplateName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AssociateDeviceWithPlacement' 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:+--+-- 'projectName', 'associateDeviceWithPlacement_projectName' - The name of the project containing the placement in which to associate+-- the device.+--+-- 'placementName', 'associateDeviceWithPlacement_placementName' - The name of the placement in which to associate the device.+--+-- 'deviceId', 'associateDeviceWithPlacement_deviceId' - The ID of the physical device to be associated with the given placement+-- in the project. Note that a mandatory 4 character prefix is required for+-- all @deviceId@ values.+--+-- 'deviceTemplateName', 'associateDeviceWithPlacement_deviceTemplateName' - The device template name to associate with the device ID.+newAssociateDeviceWithPlacement ::+ -- | 'projectName'+ Prelude.Text ->+ -- | 'placementName'+ Prelude.Text ->+ -- | 'deviceId'+ Prelude.Text ->+ -- | 'deviceTemplateName'+ Prelude.Text ->+ AssociateDeviceWithPlacement+newAssociateDeviceWithPlacement+ pProjectName_+ pPlacementName_+ pDeviceId_+ pDeviceTemplateName_ =+ AssociateDeviceWithPlacement'+ { projectName =+ pProjectName_,+ placementName = pPlacementName_,+ deviceId = pDeviceId_,+ deviceTemplateName = pDeviceTemplateName_+ }++-- | The name of the project containing the placement in which to associate+-- the device.+associateDeviceWithPlacement_projectName :: Lens.Lens' AssociateDeviceWithPlacement Prelude.Text+associateDeviceWithPlacement_projectName = Lens.lens (\AssociateDeviceWithPlacement' {projectName} -> projectName) (\s@AssociateDeviceWithPlacement' {} a -> s {projectName = a} :: AssociateDeviceWithPlacement)++-- | The name of the placement in which to associate the device.+associateDeviceWithPlacement_placementName :: Lens.Lens' AssociateDeviceWithPlacement Prelude.Text+associateDeviceWithPlacement_placementName = Lens.lens (\AssociateDeviceWithPlacement' {placementName} -> placementName) (\s@AssociateDeviceWithPlacement' {} a -> s {placementName = a} :: AssociateDeviceWithPlacement)++-- | The ID of the physical device to be associated with the given placement+-- in the project. Note that a mandatory 4 character prefix is required for+-- all @deviceId@ values.+associateDeviceWithPlacement_deviceId :: Lens.Lens' AssociateDeviceWithPlacement Prelude.Text+associateDeviceWithPlacement_deviceId = Lens.lens (\AssociateDeviceWithPlacement' {deviceId} -> deviceId) (\s@AssociateDeviceWithPlacement' {} a -> s {deviceId = a} :: AssociateDeviceWithPlacement)++-- | The device template name to associate with the device ID.+associateDeviceWithPlacement_deviceTemplateName :: Lens.Lens' AssociateDeviceWithPlacement Prelude.Text+associateDeviceWithPlacement_deviceTemplateName = Lens.lens (\AssociateDeviceWithPlacement' {deviceTemplateName} -> deviceTemplateName) (\s@AssociateDeviceWithPlacement' {} a -> s {deviceTemplateName = a} :: AssociateDeviceWithPlacement)++instance Core.AWSRequest AssociateDeviceWithPlacement where+ type+ AWSResponse AssociateDeviceWithPlacement =+ AssociateDeviceWithPlacementResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ AssociateDeviceWithPlacementResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ AssociateDeviceWithPlacement+ where+ hashWithSalt _salt AssociateDeviceWithPlacement' {..} =+ _salt+ `Prelude.hashWithSalt` projectName+ `Prelude.hashWithSalt` placementName+ `Prelude.hashWithSalt` deviceId+ `Prelude.hashWithSalt` deviceTemplateName++instance Prelude.NFData AssociateDeviceWithPlacement where+ rnf AssociateDeviceWithPlacement' {..} =+ Prelude.rnf projectName+ `Prelude.seq` Prelude.rnf placementName+ `Prelude.seq` Prelude.rnf deviceId+ `Prelude.seq` Prelude.rnf deviceTemplateName++instance Data.ToHeaders AssociateDeviceWithPlacement where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON AssociateDeviceWithPlacement where+ toJSON AssociateDeviceWithPlacement' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("deviceId" Data..= deviceId)]+ )++instance Data.ToPath AssociateDeviceWithPlacement where+ toPath AssociateDeviceWithPlacement' {..} =+ Prelude.mconcat+ [ "/projects/",+ Data.toBS projectName,+ "/placements/",+ Data.toBS placementName,+ "/devices/",+ Data.toBS deviceTemplateName+ ]++instance Data.ToQuery AssociateDeviceWithPlacement where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newAssociateDeviceWithPlacementResponse' smart constructor.+data AssociateDeviceWithPlacementResponse = AssociateDeviceWithPlacementResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AssociateDeviceWithPlacementResponse' 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', 'associateDeviceWithPlacementResponse_httpStatus' - The response's http status code.+newAssociateDeviceWithPlacementResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ AssociateDeviceWithPlacementResponse+newAssociateDeviceWithPlacementResponse pHttpStatus_ =+ AssociateDeviceWithPlacementResponse'+ { httpStatus =+ pHttpStatus_+ }++-- | The response's http status code.+associateDeviceWithPlacementResponse_httpStatus :: Lens.Lens' AssociateDeviceWithPlacementResponse Prelude.Int+associateDeviceWithPlacementResponse_httpStatus = Lens.lens (\AssociateDeviceWithPlacementResponse' {httpStatus} -> httpStatus) (\s@AssociateDeviceWithPlacementResponse' {} a -> s {httpStatus = a} :: AssociateDeviceWithPlacementResponse)++instance+ Prelude.NFData+ AssociateDeviceWithPlacementResponse+ where+ rnf AssociateDeviceWithPlacementResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickProjects/CreatePlacement.hs view
@@ -0,0 +1,187 @@+{-# 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.IoT1ClickProjects.CreatePlacement+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an empty placement.+module Amazonka.IoT1ClickProjects.CreatePlacement+ ( -- * Creating a Request+ CreatePlacement (..),+ newCreatePlacement,++ -- * Request Lenses+ createPlacement_attributes,+ createPlacement_placementName,+ createPlacement_projectName,++ -- * Destructuring the Response+ CreatePlacementResponse (..),+ newCreatePlacementResponse,++ -- * Response Lenses+ createPlacementResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreatePlacement' smart constructor.+data CreatePlacement = CreatePlacement'+ { -- | Optional user-defined key\/value pairs providing contextual data (such+ -- as location or function) for the placement.+ attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The name of the placement to be created.+ placementName :: Prelude.Text,+ -- | The name of the project in which to create the placement.+ projectName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreatePlacement' 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', 'createPlacement_attributes' - Optional user-defined key\/value pairs providing contextual data (such+-- as location or function) for the placement.+--+-- 'placementName', 'createPlacement_placementName' - The name of the placement to be created.+--+-- 'projectName', 'createPlacement_projectName' - The name of the project in which to create the placement.+newCreatePlacement ::+ -- | 'placementName'+ Prelude.Text ->+ -- | 'projectName'+ Prelude.Text ->+ CreatePlacement+newCreatePlacement pPlacementName_ pProjectName_ =+ CreatePlacement'+ { attributes = Prelude.Nothing,+ placementName = pPlacementName_,+ projectName = pProjectName_+ }++-- | Optional user-defined key\/value pairs providing contextual data (such+-- as location or function) for the placement.+createPlacement_attributes :: Lens.Lens' CreatePlacement (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createPlacement_attributes = Lens.lens (\CreatePlacement' {attributes} -> attributes) (\s@CreatePlacement' {} a -> s {attributes = a} :: CreatePlacement) Prelude.. Lens.mapping Lens.coerced++-- | The name of the placement to be created.+createPlacement_placementName :: Lens.Lens' CreatePlacement Prelude.Text+createPlacement_placementName = Lens.lens (\CreatePlacement' {placementName} -> placementName) (\s@CreatePlacement' {} a -> s {placementName = a} :: CreatePlacement)++-- | The name of the project in which to create the placement.+createPlacement_projectName :: Lens.Lens' CreatePlacement Prelude.Text+createPlacement_projectName = Lens.lens (\CreatePlacement' {projectName} -> projectName) (\s@CreatePlacement' {} a -> s {projectName = a} :: CreatePlacement)++instance Core.AWSRequest CreatePlacement where+ type+ AWSResponse CreatePlacement =+ CreatePlacementResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ CreatePlacementResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreatePlacement where+ hashWithSalt _salt CreatePlacement' {..} =+ _salt+ `Prelude.hashWithSalt` attributes+ `Prelude.hashWithSalt` placementName+ `Prelude.hashWithSalt` projectName++instance Prelude.NFData CreatePlacement where+ rnf CreatePlacement' {..} =+ Prelude.rnf attributes+ `Prelude.seq` Prelude.rnf placementName+ `Prelude.seq` Prelude.rnf projectName++instance Data.ToHeaders CreatePlacement where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreatePlacement where+ toJSON CreatePlacement' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("attributes" Data..=) Prelude.<$> attributes,+ Prelude.Just+ ("placementName" Data..= placementName)+ ]+ )++instance Data.ToPath CreatePlacement where+ toPath CreatePlacement' {..} =+ Prelude.mconcat+ ["/projects/", Data.toBS projectName, "/placements"]++instance Data.ToQuery CreatePlacement where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreatePlacementResponse' smart constructor.+data CreatePlacementResponse = CreatePlacementResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreatePlacementResponse' 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', 'createPlacementResponse_httpStatus' - The response's http status code.+newCreatePlacementResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreatePlacementResponse+newCreatePlacementResponse pHttpStatus_ =+ CreatePlacementResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+createPlacementResponse_httpStatus :: Lens.Lens' CreatePlacementResponse Prelude.Int+createPlacementResponse_httpStatus = Lens.lens (\CreatePlacementResponse' {httpStatus} -> httpStatus) (\s@CreatePlacementResponse' {} a -> s {httpStatus = a} :: CreatePlacementResponse)++instance Prelude.NFData CreatePlacementResponse where+ rnf CreatePlacementResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickProjects/CreateProject.hs view
@@ -0,0 +1,220 @@+{-# 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.IoT1ClickProjects.CreateProject+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an empty project with a placement template. A project contains+-- zero or more placements that adhere to the placement template defined in+-- the project.+module Amazonka.IoT1ClickProjects.CreateProject+ ( -- * Creating a Request+ CreateProject (..),+ newCreateProject,++ -- * Request Lenses+ createProject_description,+ createProject_placementTemplate,+ createProject_tags,+ createProject_projectName,++ -- * Destructuring the Response+ CreateProjectResponse (..),+ newCreateProjectResponse,++ -- * Response Lenses+ createProjectResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateProject' smart constructor.+data CreateProject = CreateProject'+ { -- | An optional description for the project.+ description :: Prelude.Maybe Prelude.Text,+ -- | The schema defining the placement to be created. A placement template+ -- defines placement default attributes and device templates. You cannot+ -- add or remove device templates after the project has been created.+ -- However, you can update @callbackOverrides@ for the device templates+ -- using the @UpdateProject@ API.+ placementTemplate :: Prelude.Maybe PlacementTemplate,+ -- | Optional tags (metadata key\/value pairs) to be associated with the+ -- project. For example,+ -- @{ {\"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 name of the project to create.+ projectName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateProject' 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:+--+-- 'description', 'createProject_description' - An optional description for the project.+--+-- 'placementTemplate', 'createProject_placementTemplate' - The schema defining the placement to be created. A placement template+-- defines placement default attributes and device templates. You cannot+-- add or remove device templates after the project has been created.+-- However, you can update @callbackOverrides@ for the device templates+-- using the @UpdateProject@ API.+--+-- 'tags', 'createProject_tags' - Optional tags (metadata key\/value pairs) to be associated with the+-- project. For example,+-- @{ {\"key1\": \"value1\", \"key2\": \"value2\"} }@. For more+-- information, see+-- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+--+-- 'projectName', 'createProject_projectName' - The name of the project to create.+newCreateProject ::+ -- | 'projectName'+ Prelude.Text ->+ CreateProject+newCreateProject pProjectName_ =+ CreateProject'+ { description = Prelude.Nothing,+ placementTemplate = Prelude.Nothing,+ tags = Prelude.Nothing,+ projectName = pProjectName_+ }++-- | An optional description for the project.+createProject_description :: Lens.Lens' CreateProject (Prelude.Maybe Prelude.Text)+createProject_description = Lens.lens (\CreateProject' {description} -> description) (\s@CreateProject' {} a -> s {description = a} :: CreateProject)++-- | The schema defining the placement to be created. A placement template+-- defines placement default attributes and device templates. You cannot+-- add or remove device templates after the project has been created.+-- However, you can update @callbackOverrides@ for the device templates+-- using the @UpdateProject@ API.+createProject_placementTemplate :: Lens.Lens' CreateProject (Prelude.Maybe PlacementTemplate)+createProject_placementTemplate = Lens.lens (\CreateProject' {placementTemplate} -> placementTemplate) (\s@CreateProject' {} a -> s {placementTemplate = a} :: CreateProject)++-- | Optional tags (metadata key\/value pairs) to be associated with the+-- project. For example,+-- @{ {\"key1\": \"value1\", \"key2\": \"value2\"} }@. For more+-- information, see+-- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+createProject_tags :: Lens.Lens' CreateProject (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createProject_tags = Lens.lens (\CreateProject' {tags} -> tags) (\s@CreateProject' {} a -> s {tags = a} :: CreateProject) Prelude.. Lens.mapping Lens.coerced++-- | The name of the project to create.+createProject_projectName :: Lens.Lens' CreateProject Prelude.Text+createProject_projectName = Lens.lens (\CreateProject' {projectName} -> projectName) (\s@CreateProject' {} a -> s {projectName = a} :: CreateProject)++instance Core.AWSRequest CreateProject where+ type+ AWSResponse CreateProject =+ CreateProjectResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ CreateProjectResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateProject where+ hashWithSalt _salt CreateProject' {..} =+ _salt+ `Prelude.hashWithSalt` description+ `Prelude.hashWithSalt` placementTemplate+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` projectName++instance Prelude.NFData CreateProject where+ rnf CreateProject' {..} =+ Prelude.rnf description+ `Prelude.seq` Prelude.rnf placementTemplate+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf projectName++instance Data.ToHeaders CreateProject where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateProject where+ toJSON CreateProject' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("description" Data..=) Prelude.<$> description,+ ("placementTemplate" Data..=)+ Prelude.<$> placementTemplate,+ ("tags" Data..=) Prelude.<$> tags,+ Prelude.Just ("projectName" Data..= projectName)+ ]+ )++instance Data.ToPath CreateProject where+ toPath = Prelude.const "/projects"++instance Data.ToQuery CreateProject where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateProjectResponse' smart constructor.+data CreateProjectResponse = CreateProjectResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateProjectResponse' 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', 'createProjectResponse_httpStatus' - The response's http status code.+newCreateProjectResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateProjectResponse+newCreateProjectResponse pHttpStatus_ =+ CreateProjectResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+createProjectResponse_httpStatus :: Lens.Lens' CreateProjectResponse Prelude.Int+createProjectResponse_httpStatus = Lens.lens (\CreateProjectResponse' {httpStatus} -> httpStatus) (\s@CreateProjectResponse' {} a -> s {httpStatus = a} :: CreateProjectResponse)++instance Prelude.NFData CreateProjectResponse where+ rnf CreateProjectResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickProjects/DeletePlacement.hs view
@@ -0,0 +1,169 @@+{-# 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.IoT1ClickProjects.DeletePlacement+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a placement. To delete a placement, it must not have any devices+-- associated with it.+--+-- When you delete a placement, all associated data becomes irretrievable.+module Amazonka.IoT1ClickProjects.DeletePlacement+ ( -- * Creating a Request+ DeletePlacement (..),+ newDeletePlacement,++ -- * Request Lenses+ deletePlacement_placementName,+ deletePlacement_projectName,++ -- * Destructuring the Response+ DeletePlacementResponse (..),+ newDeletePlacementResponse,++ -- * Response Lenses+ deletePlacementResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeletePlacement' smart constructor.+data DeletePlacement = DeletePlacement'+ { -- | The name of the empty placement to delete.+ placementName :: Prelude.Text,+ -- | The project containing the empty placement to delete.+ projectName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeletePlacement' 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:+--+-- 'placementName', 'deletePlacement_placementName' - The name of the empty placement to delete.+--+-- 'projectName', 'deletePlacement_projectName' - The project containing the empty placement to delete.+newDeletePlacement ::+ -- | 'placementName'+ Prelude.Text ->+ -- | 'projectName'+ Prelude.Text ->+ DeletePlacement+newDeletePlacement pPlacementName_ pProjectName_ =+ DeletePlacement'+ { placementName = pPlacementName_,+ projectName = pProjectName_+ }++-- | The name of the empty placement to delete.+deletePlacement_placementName :: Lens.Lens' DeletePlacement Prelude.Text+deletePlacement_placementName = Lens.lens (\DeletePlacement' {placementName} -> placementName) (\s@DeletePlacement' {} a -> s {placementName = a} :: DeletePlacement)++-- | The project containing the empty placement to delete.+deletePlacement_projectName :: Lens.Lens' DeletePlacement Prelude.Text+deletePlacement_projectName = Lens.lens (\DeletePlacement' {projectName} -> projectName) (\s@DeletePlacement' {} a -> s {projectName = a} :: DeletePlacement)++instance Core.AWSRequest DeletePlacement where+ type+ AWSResponse DeletePlacement =+ DeletePlacementResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ DeletePlacementResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeletePlacement where+ hashWithSalt _salt DeletePlacement' {..} =+ _salt+ `Prelude.hashWithSalt` placementName+ `Prelude.hashWithSalt` projectName++instance Prelude.NFData DeletePlacement where+ rnf DeletePlacement' {..} =+ Prelude.rnf placementName+ `Prelude.seq` Prelude.rnf projectName++instance Data.ToHeaders DeletePlacement where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeletePlacement where+ toPath DeletePlacement' {..} =+ Prelude.mconcat+ [ "/projects/",+ Data.toBS projectName,+ "/placements/",+ Data.toBS placementName+ ]++instance Data.ToQuery DeletePlacement where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeletePlacementResponse' smart constructor.+data DeletePlacementResponse = DeletePlacementResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeletePlacementResponse' 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', 'deletePlacementResponse_httpStatus' - The response's http status code.+newDeletePlacementResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeletePlacementResponse+newDeletePlacementResponse pHttpStatus_ =+ DeletePlacementResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+deletePlacementResponse_httpStatus :: Lens.Lens' DeletePlacementResponse Prelude.Int+deletePlacementResponse_httpStatus = Lens.lens (\DeletePlacementResponse' {httpStatus} -> httpStatus) (\s@DeletePlacementResponse' {} a -> s {httpStatus = a} :: DeletePlacementResponse)++instance Prelude.NFData DeletePlacementResponse where+ rnf DeletePlacementResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickProjects/DeleteProject.hs view
@@ -0,0 +1,147 @@+{-# 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.IoT1ClickProjects.DeleteProject+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a project. To delete a project, it must not have any placements+-- associated with it.+--+-- When you delete a project, all associated data becomes irretrievable.+module Amazonka.IoT1ClickProjects.DeleteProject+ ( -- * Creating a Request+ DeleteProject (..),+ newDeleteProject,++ -- * Request Lenses+ deleteProject_projectName,++ -- * Destructuring the Response+ DeleteProjectResponse (..),+ newDeleteProjectResponse,++ -- * Response Lenses+ deleteProjectResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteProject' smart constructor.+data DeleteProject = DeleteProject'+ { -- | The name of the empty project to delete.+ projectName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteProject' 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:+--+-- 'projectName', 'deleteProject_projectName' - The name of the empty project to delete.+newDeleteProject ::+ -- | 'projectName'+ Prelude.Text ->+ DeleteProject+newDeleteProject pProjectName_ =+ DeleteProject' {projectName = pProjectName_}++-- | The name of the empty project to delete.+deleteProject_projectName :: Lens.Lens' DeleteProject Prelude.Text+deleteProject_projectName = Lens.lens (\DeleteProject' {projectName} -> projectName) (\s@DeleteProject' {} a -> s {projectName = a} :: DeleteProject)++instance Core.AWSRequest DeleteProject where+ type+ AWSResponse DeleteProject =+ DeleteProjectResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ DeleteProjectResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteProject where+ hashWithSalt _salt DeleteProject' {..} =+ _salt `Prelude.hashWithSalt` projectName++instance Prelude.NFData DeleteProject where+ rnf DeleteProject' {..} = Prelude.rnf projectName++instance Data.ToHeaders DeleteProject where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteProject where+ toPath DeleteProject' {..} =+ Prelude.mconcat+ ["/projects/", Data.toBS projectName]++instance Data.ToQuery DeleteProject where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteProjectResponse' smart constructor.+data DeleteProjectResponse = DeleteProjectResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteProjectResponse' 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', 'deleteProjectResponse_httpStatus' - The response's http status code.+newDeleteProjectResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteProjectResponse+newDeleteProjectResponse pHttpStatus_ =+ DeleteProjectResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+deleteProjectResponse_httpStatus :: Lens.Lens' DeleteProjectResponse Prelude.Int+deleteProjectResponse_httpStatus = Lens.lens (\DeleteProjectResponse' {httpStatus} -> httpStatus) (\s@DeleteProjectResponse' {} a -> s {httpStatus = a} :: DeleteProjectResponse)++instance Prelude.NFData DeleteProjectResponse where+ rnf DeleteProjectResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickProjects/DescribePlacement.hs view
@@ -0,0 +1,183 @@+{-# 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.IoT1ClickProjects.DescribePlacement+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes a placement in a project.+module Amazonka.IoT1ClickProjects.DescribePlacement+ ( -- * Creating a Request+ DescribePlacement (..),+ newDescribePlacement,++ -- * Request Lenses+ describePlacement_placementName,+ describePlacement_projectName,++ -- * Destructuring the Response+ DescribePlacementResponse (..),+ newDescribePlacementResponse,++ -- * Response Lenses+ describePlacementResponse_httpStatus,+ describePlacementResponse_placement,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribePlacement' smart constructor.+data DescribePlacement = DescribePlacement'+ { -- | The name of the placement within a project.+ placementName :: Prelude.Text,+ -- | The project containing the placement to be described.+ projectName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribePlacement' 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:+--+-- 'placementName', 'describePlacement_placementName' - The name of the placement within a project.+--+-- 'projectName', 'describePlacement_projectName' - The project containing the placement to be described.+newDescribePlacement ::+ -- | 'placementName'+ Prelude.Text ->+ -- | 'projectName'+ Prelude.Text ->+ DescribePlacement+newDescribePlacement pPlacementName_ pProjectName_ =+ DescribePlacement'+ { placementName = pPlacementName_,+ projectName = pProjectName_+ }++-- | The name of the placement within a project.+describePlacement_placementName :: Lens.Lens' DescribePlacement Prelude.Text+describePlacement_placementName = Lens.lens (\DescribePlacement' {placementName} -> placementName) (\s@DescribePlacement' {} a -> s {placementName = a} :: DescribePlacement)++-- | The project containing the placement to be described.+describePlacement_projectName :: Lens.Lens' DescribePlacement Prelude.Text+describePlacement_projectName = Lens.lens (\DescribePlacement' {projectName} -> projectName) (\s@DescribePlacement' {} a -> s {projectName = a} :: DescribePlacement)++instance Core.AWSRequest DescribePlacement where+ type+ AWSResponse DescribePlacement =+ DescribePlacementResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribePlacementResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "placement")+ )++instance Prelude.Hashable DescribePlacement where+ hashWithSalt _salt DescribePlacement' {..} =+ _salt+ `Prelude.hashWithSalt` placementName+ `Prelude.hashWithSalt` projectName++instance Prelude.NFData DescribePlacement where+ rnf DescribePlacement' {..} =+ Prelude.rnf placementName+ `Prelude.seq` Prelude.rnf projectName++instance Data.ToHeaders DescribePlacement where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribePlacement where+ toPath DescribePlacement' {..} =+ Prelude.mconcat+ [ "/projects/",+ Data.toBS projectName,+ "/placements/",+ Data.toBS placementName+ ]++instance Data.ToQuery DescribePlacement where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribePlacementResponse' smart constructor.+data DescribePlacementResponse = DescribePlacementResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | An object describing the placement.+ placement :: PlacementDescription+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribePlacementResponse' 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', 'describePlacementResponse_httpStatus' - The response's http status code.+--+-- 'placement', 'describePlacementResponse_placement' - An object describing the placement.+newDescribePlacementResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'placement'+ PlacementDescription ->+ DescribePlacementResponse+newDescribePlacementResponse pHttpStatus_ pPlacement_ =+ DescribePlacementResponse'+ { httpStatus =+ pHttpStatus_,+ placement = pPlacement_+ }++-- | The response's http status code.+describePlacementResponse_httpStatus :: Lens.Lens' DescribePlacementResponse Prelude.Int+describePlacementResponse_httpStatus = Lens.lens (\DescribePlacementResponse' {httpStatus} -> httpStatus) (\s@DescribePlacementResponse' {} a -> s {httpStatus = a} :: DescribePlacementResponse)++-- | An object describing the placement.+describePlacementResponse_placement :: Lens.Lens' DescribePlacementResponse PlacementDescription+describePlacementResponse_placement = Lens.lens (\DescribePlacementResponse' {placement} -> placement) (\s@DescribePlacementResponse' {} a -> s {placement = a} :: DescribePlacementResponse)++instance Prelude.NFData DescribePlacementResponse where+ rnf DescribePlacementResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf placement
+ gen/Amazonka/IoT1ClickProjects/DescribeProject.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.IoT1ClickProjects.DescribeProject+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an object describing a project.+module Amazonka.IoT1ClickProjects.DescribeProject+ ( -- * Creating a Request+ DescribeProject (..),+ newDescribeProject,++ -- * Request Lenses+ describeProject_projectName,++ -- * Destructuring the Response+ DescribeProjectResponse (..),+ newDescribeProjectResponse,++ -- * Response Lenses+ describeProjectResponse_httpStatus,+ describeProjectResponse_project,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeProject' smart constructor.+data DescribeProject = DescribeProject'+ { -- | The name of the project to be described.+ projectName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeProject' 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:+--+-- 'projectName', 'describeProject_projectName' - The name of the project to be described.+newDescribeProject ::+ -- | 'projectName'+ Prelude.Text ->+ DescribeProject+newDescribeProject pProjectName_ =+ DescribeProject' {projectName = pProjectName_}++-- | The name of the project to be described.+describeProject_projectName :: Lens.Lens' DescribeProject Prelude.Text+describeProject_projectName = Lens.lens (\DescribeProject' {projectName} -> projectName) (\s@DescribeProject' {} a -> s {projectName = a} :: DescribeProject)++instance Core.AWSRequest DescribeProject where+ type+ AWSResponse DescribeProject =+ DescribeProjectResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeProjectResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "project")+ )++instance Prelude.Hashable DescribeProject where+ hashWithSalt _salt DescribeProject' {..} =+ _salt `Prelude.hashWithSalt` projectName++instance Prelude.NFData DescribeProject where+ rnf DescribeProject' {..} = Prelude.rnf projectName++instance Data.ToHeaders DescribeProject where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeProject where+ toPath DescribeProject' {..} =+ Prelude.mconcat+ ["/projects/", Data.toBS projectName]++instance Data.ToQuery DescribeProject where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeProjectResponse' smart constructor.+data DescribeProjectResponse = DescribeProjectResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | An object describing the project.+ project :: ProjectDescription+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeProjectResponse' 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', 'describeProjectResponse_httpStatus' - The response's http status code.+--+-- 'project', 'describeProjectResponse_project' - An object describing the project.+newDescribeProjectResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'project'+ ProjectDescription ->+ DescribeProjectResponse+newDescribeProjectResponse pHttpStatus_ pProject_ =+ DescribeProjectResponse'+ { httpStatus = pHttpStatus_,+ project = pProject_+ }++-- | The response's http status code.+describeProjectResponse_httpStatus :: Lens.Lens' DescribeProjectResponse Prelude.Int+describeProjectResponse_httpStatus = Lens.lens (\DescribeProjectResponse' {httpStatus} -> httpStatus) (\s@DescribeProjectResponse' {} a -> s {httpStatus = a} :: DescribeProjectResponse)++-- | An object describing the project.+describeProjectResponse_project :: Lens.Lens' DescribeProjectResponse ProjectDescription+describeProjectResponse_project = Lens.lens (\DescribeProjectResponse' {project} -> project) (\s@DescribeProjectResponse' {} a -> s {project = a} :: DescribeProjectResponse)++instance Prelude.NFData DescribeProjectResponse where+ rnf DescribeProjectResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf project
+ gen/Amazonka/IoT1ClickProjects/DisassociateDeviceFromPlacement.hs view
@@ -0,0 +1,207 @@+{-# 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.IoT1ClickProjects.DisassociateDeviceFromPlacement+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes a physical device from a placement.+module Amazonka.IoT1ClickProjects.DisassociateDeviceFromPlacement+ ( -- * Creating a Request+ DisassociateDeviceFromPlacement (..),+ newDisassociateDeviceFromPlacement,++ -- * Request Lenses+ disassociateDeviceFromPlacement_projectName,+ disassociateDeviceFromPlacement_placementName,+ disassociateDeviceFromPlacement_deviceTemplateName,++ -- * Destructuring the Response+ DisassociateDeviceFromPlacementResponse (..),+ newDisassociateDeviceFromPlacementResponse,++ -- * Response Lenses+ disassociateDeviceFromPlacementResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDisassociateDeviceFromPlacement' smart constructor.+data DisassociateDeviceFromPlacement = DisassociateDeviceFromPlacement'+ { -- | The name of the project that contains the placement.+ projectName :: Prelude.Text,+ -- | The name of the placement that the device should be removed from.+ placementName :: Prelude.Text,+ -- | The device ID that should be removed from the placement.+ deviceTemplateName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateDeviceFromPlacement' 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:+--+-- 'projectName', 'disassociateDeviceFromPlacement_projectName' - The name of the project that contains the placement.+--+-- 'placementName', 'disassociateDeviceFromPlacement_placementName' - The name of the placement that the device should be removed from.+--+-- 'deviceTemplateName', 'disassociateDeviceFromPlacement_deviceTemplateName' - The device ID that should be removed from the placement.+newDisassociateDeviceFromPlacement ::+ -- | 'projectName'+ Prelude.Text ->+ -- | 'placementName'+ Prelude.Text ->+ -- | 'deviceTemplateName'+ Prelude.Text ->+ DisassociateDeviceFromPlacement+newDisassociateDeviceFromPlacement+ pProjectName_+ pPlacementName_+ pDeviceTemplateName_ =+ DisassociateDeviceFromPlacement'+ { projectName =+ pProjectName_,+ placementName = pPlacementName_,+ deviceTemplateName = pDeviceTemplateName_+ }++-- | The name of the project that contains the placement.+disassociateDeviceFromPlacement_projectName :: Lens.Lens' DisassociateDeviceFromPlacement Prelude.Text+disassociateDeviceFromPlacement_projectName = Lens.lens (\DisassociateDeviceFromPlacement' {projectName} -> projectName) (\s@DisassociateDeviceFromPlacement' {} a -> s {projectName = a} :: DisassociateDeviceFromPlacement)++-- | The name of the placement that the device should be removed from.+disassociateDeviceFromPlacement_placementName :: Lens.Lens' DisassociateDeviceFromPlacement Prelude.Text+disassociateDeviceFromPlacement_placementName = Lens.lens (\DisassociateDeviceFromPlacement' {placementName} -> placementName) (\s@DisassociateDeviceFromPlacement' {} a -> s {placementName = a} :: DisassociateDeviceFromPlacement)++-- | The device ID that should be removed from the placement.+disassociateDeviceFromPlacement_deviceTemplateName :: Lens.Lens' DisassociateDeviceFromPlacement Prelude.Text+disassociateDeviceFromPlacement_deviceTemplateName = Lens.lens (\DisassociateDeviceFromPlacement' {deviceTemplateName} -> deviceTemplateName) (\s@DisassociateDeviceFromPlacement' {} a -> s {deviceTemplateName = a} :: DisassociateDeviceFromPlacement)++instance+ Core.AWSRequest+ DisassociateDeviceFromPlacement+ where+ type+ AWSResponse DisassociateDeviceFromPlacement =+ DisassociateDeviceFromPlacementResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ DisassociateDeviceFromPlacementResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ DisassociateDeviceFromPlacement+ where+ hashWithSalt+ _salt+ DisassociateDeviceFromPlacement' {..} =+ _salt+ `Prelude.hashWithSalt` projectName+ `Prelude.hashWithSalt` placementName+ `Prelude.hashWithSalt` deviceTemplateName++instance+ Prelude.NFData+ DisassociateDeviceFromPlacement+ where+ rnf DisassociateDeviceFromPlacement' {..} =+ Prelude.rnf projectName+ `Prelude.seq` Prelude.rnf placementName+ `Prelude.seq` Prelude.rnf deviceTemplateName++instance+ Data.ToHeaders+ DisassociateDeviceFromPlacement+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DisassociateDeviceFromPlacement where+ toPath DisassociateDeviceFromPlacement' {..} =+ Prelude.mconcat+ [ "/projects/",+ Data.toBS projectName,+ "/placements/",+ Data.toBS placementName,+ "/devices/",+ Data.toBS deviceTemplateName+ ]++instance Data.ToQuery DisassociateDeviceFromPlacement where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisassociateDeviceFromPlacementResponse' smart constructor.+data DisassociateDeviceFromPlacementResponse = DisassociateDeviceFromPlacementResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateDeviceFromPlacementResponse' 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', 'disassociateDeviceFromPlacementResponse_httpStatus' - The response's http status code.+newDisassociateDeviceFromPlacementResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DisassociateDeviceFromPlacementResponse+newDisassociateDeviceFromPlacementResponse+ pHttpStatus_ =+ DisassociateDeviceFromPlacementResponse'+ { httpStatus =+ pHttpStatus_+ }++-- | The response's http status code.+disassociateDeviceFromPlacementResponse_httpStatus :: Lens.Lens' DisassociateDeviceFromPlacementResponse Prelude.Int+disassociateDeviceFromPlacementResponse_httpStatus = Lens.lens (\DisassociateDeviceFromPlacementResponse' {httpStatus} -> httpStatus) (\s@DisassociateDeviceFromPlacementResponse' {} a -> s {httpStatus = a} :: DisassociateDeviceFromPlacementResponse)++instance+ Prelude.NFData+ DisassociateDeviceFromPlacementResponse+ where+ rnf DisassociateDeviceFromPlacementResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickProjects/GetDevicesInPlacement.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.IoT1ClickProjects.GetDevicesInPlacement+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an object enumerating the devices in a placement.+module Amazonka.IoT1ClickProjects.GetDevicesInPlacement+ ( -- * Creating a Request+ GetDevicesInPlacement (..),+ newGetDevicesInPlacement,++ -- * Request Lenses+ getDevicesInPlacement_projectName,+ getDevicesInPlacement_placementName,++ -- * Destructuring the Response+ GetDevicesInPlacementResponse (..),+ newGetDevicesInPlacementResponse,++ -- * Response Lenses+ getDevicesInPlacementResponse_httpStatus,+ getDevicesInPlacementResponse_devices,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetDevicesInPlacement' smart constructor.+data GetDevicesInPlacement = GetDevicesInPlacement'+ { -- | The name of the project containing the placement.+ projectName :: Prelude.Text,+ -- | The name of the placement to get the devices from.+ placementName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetDevicesInPlacement' 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:+--+-- 'projectName', 'getDevicesInPlacement_projectName' - The name of the project containing the placement.+--+-- 'placementName', 'getDevicesInPlacement_placementName' - The name of the placement to get the devices from.+newGetDevicesInPlacement ::+ -- | 'projectName'+ Prelude.Text ->+ -- | 'placementName'+ Prelude.Text ->+ GetDevicesInPlacement+newGetDevicesInPlacement+ pProjectName_+ pPlacementName_ =+ GetDevicesInPlacement'+ { projectName = pProjectName_,+ placementName = pPlacementName_+ }++-- | The name of the project containing the placement.+getDevicesInPlacement_projectName :: Lens.Lens' GetDevicesInPlacement Prelude.Text+getDevicesInPlacement_projectName = Lens.lens (\GetDevicesInPlacement' {projectName} -> projectName) (\s@GetDevicesInPlacement' {} a -> s {projectName = a} :: GetDevicesInPlacement)++-- | The name of the placement to get the devices from.+getDevicesInPlacement_placementName :: Lens.Lens' GetDevicesInPlacement Prelude.Text+getDevicesInPlacement_placementName = Lens.lens (\GetDevicesInPlacement' {placementName} -> placementName) (\s@GetDevicesInPlacement' {} a -> s {placementName = a} :: GetDevicesInPlacement)++instance Core.AWSRequest GetDevicesInPlacement where+ type+ AWSResponse GetDevicesInPlacement =+ GetDevicesInPlacementResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetDevicesInPlacementResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "devices" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable GetDevicesInPlacement where+ hashWithSalt _salt GetDevicesInPlacement' {..} =+ _salt+ `Prelude.hashWithSalt` projectName+ `Prelude.hashWithSalt` placementName++instance Prelude.NFData GetDevicesInPlacement where+ rnf GetDevicesInPlacement' {..} =+ Prelude.rnf projectName+ `Prelude.seq` Prelude.rnf placementName++instance Data.ToHeaders GetDevicesInPlacement where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetDevicesInPlacement where+ toPath GetDevicesInPlacement' {..} =+ Prelude.mconcat+ [ "/projects/",+ Data.toBS projectName,+ "/placements/",+ Data.toBS placementName,+ "/devices"+ ]++instance Data.ToQuery GetDevicesInPlacement where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetDevicesInPlacementResponse' smart constructor.+data GetDevicesInPlacementResponse = GetDevicesInPlacementResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | An object containing the devices (zero or more) within the placement.+ devices :: Prelude.HashMap Prelude.Text Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetDevicesInPlacementResponse' 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', 'getDevicesInPlacementResponse_httpStatus' - The response's http status code.+--+-- 'devices', 'getDevicesInPlacementResponse_devices' - An object containing the devices (zero or more) within the placement.+newGetDevicesInPlacementResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetDevicesInPlacementResponse+newGetDevicesInPlacementResponse pHttpStatus_ =+ GetDevicesInPlacementResponse'+ { httpStatus =+ pHttpStatus_,+ devices = Prelude.mempty+ }++-- | The response's http status code.+getDevicesInPlacementResponse_httpStatus :: Lens.Lens' GetDevicesInPlacementResponse Prelude.Int+getDevicesInPlacementResponse_httpStatus = Lens.lens (\GetDevicesInPlacementResponse' {httpStatus} -> httpStatus) (\s@GetDevicesInPlacementResponse' {} a -> s {httpStatus = a} :: GetDevicesInPlacementResponse)++-- | An object containing the devices (zero or more) within the placement.+getDevicesInPlacementResponse_devices :: Lens.Lens' GetDevicesInPlacementResponse (Prelude.HashMap Prelude.Text Prelude.Text)+getDevicesInPlacementResponse_devices = Lens.lens (\GetDevicesInPlacementResponse' {devices} -> devices) (\s@GetDevicesInPlacementResponse' {} a -> s {devices = a} :: GetDevicesInPlacementResponse) Prelude.. Lens.coerced++instance Prelude.NFData GetDevicesInPlacementResponse where+ rnf GetDevicesInPlacementResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf devices
+ gen/Amazonka/IoT1ClickProjects/Lens.hs view
@@ -0,0 +1,173 @@+{-# 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.IoT1ClickProjects.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.IoT1ClickProjects.Lens+ ( -- * Operations++ -- ** AssociateDeviceWithPlacement+ associateDeviceWithPlacement_projectName,+ associateDeviceWithPlacement_placementName,+ associateDeviceWithPlacement_deviceId,+ associateDeviceWithPlacement_deviceTemplateName,+ associateDeviceWithPlacementResponse_httpStatus,++ -- ** CreatePlacement+ createPlacement_attributes,+ createPlacement_placementName,+ createPlacement_projectName,+ createPlacementResponse_httpStatus,++ -- ** CreateProject+ createProject_description,+ createProject_placementTemplate,+ createProject_tags,+ createProject_projectName,+ createProjectResponse_httpStatus,++ -- ** DeletePlacement+ deletePlacement_placementName,+ deletePlacement_projectName,+ deletePlacementResponse_httpStatus,++ -- ** DeleteProject+ deleteProject_projectName,+ deleteProjectResponse_httpStatus,++ -- ** DescribePlacement+ describePlacement_placementName,+ describePlacement_projectName,+ describePlacementResponse_httpStatus,+ describePlacementResponse_placement,++ -- ** DescribeProject+ describeProject_projectName,+ describeProjectResponse_httpStatus,+ describeProjectResponse_project,++ -- ** DisassociateDeviceFromPlacement+ disassociateDeviceFromPlacement_projectName,+ disassociateDeviceFromPlacement_placementName,+ disassociateDeviceFromPlacement_deviceTemplateName,+ disassociateDeviceFromPlacementResponse_httpStatus,++ -- ** GetDevicesInPlacement+ getDevicesInPlacement_projectName,+ getDevicesInPlacement_placementName,+ getDevicesInPlacementResponse_httpStatus,+ getDevicesInPlacementResponse_devices,++ -- ** ListPlacements+ listPlacements_maxResults,+ listPlacements_nextToken,+ listPlacements_projectName,+ listPlacementsResponse_nextToken,+ listPlacementsResponse_httpStatus,+ listPlacementsResponse_placements,++ -- ** ListProjects+ listProjects_maxResults,+ listProjects_nextToken,+ listProjectsResponse_nextToken,+ listProjectsResponse_httpStatus,+ listProjectsResponse_projects,++ -- ** ListTagsForResource+ listTagsForResource_resourceArn,+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,++ -- ** TagResource+ tagResource_resourceArn,+ tagResource_tags,+ tagResourceResponse_httpStatus,++ -- ** UntagResource+ untagResource_resourceArn,+ untagResource_tagKeys,+ untagResourceResponse_httpStatus,++ -- ** UpdatePlacement+ updatePlacement_attributes,+ updatePlacement_placementName,+ updatePlacement_projectName,+ updatePlacementResponse_httpStatus,++ -- ** UpdateProject+ updateProject_description,+ updateProject_placementTemplate,+ updateProject_projectName,+ updateProjectResponse_httpStatus,++ -- * Types++ -- ** DeviceTemplate+ deviceTemplate_callbackOverrides,+ deviceTemplate_deviceType,++ -- ** PlacementDescription+ placementDescription_projectName,+ placementDescription_placementName,+ placementDescription_attributes,+ placementDescription_createdDate,+ placementDescription_updatedDate,++ -- ** PlacementSummary+ placementSummary_projectName,+ placementSummary_placementName,+ placementSummary_createdDate,+ placementSummary_updatedDate,++ -- ** PlacementTemplate+ placementTemplate_defaultAttributes,+ placementTemplate_deviceTemplates,++ -- ** ProjectDescription+ projectDescription_arn,+ projectDescription_description,+ projectDescription_placementTemplate,+ projectDescription_tags,+ projectDescription_projectName,+ projectDescription_createdDate,+ projectDescription_updatedDate,++ -- ** ProjectSummary+ projectSummary_arn,+ projectSummary_tags,+ projectSummary_projectName,+ projectSummary_createdDate,+ projectSummary_updatedDate,+ )+where++import Amazonka.IoT1ClickProjects.AssociateDeviceWithPlacement+import Amazonka.IoT1ClickProjects.CreatePlacement+import Amazonka.IoT1ClickProjects.CreateProject+import Amazonka.IoT1ClickProjects.DeletePlacement+import Amazonka.IoT1ClickProjects.DeleteProject+import Amazonka.IoT1ClickProjects.DescribePlacement+import Amazonka.IoT1ClickProjects.DescribeProject+import Amazonka.IoT1ClickProjects.DisassociateDeviceFromPlacement+import Amazonka.IoT1ClickProjects.GetDevicesInPlacement+import Amazonka.IoT1ClickProjects.ListPlacements+import Amazonka.IoT1ClickProjects.ListProjects+import Amazonka.IoT1ClickProjects.ListTagsForResource+import Amazonka.IoT1ClickProjects.TagResource+import Amazonka.IoT1ClickProjects.Types.DeviceTemplate+import Amazonka.IoT1ClickProjects.Types.PlacementDescription+import Amazonka.IoT1ClickProjects.Types.PlacementSummary+import Amazonka.IoT1ClickProjects.Types.PlacementTemplate+import Amazonka.IoT1ClickProjects.Types.ProjectDescription+import Amazonka.IoT1ClickProjects.Types.ProjectSummary+import Amazonka.IoT1ClickProjects.UntagResource+import Amazonka.IoT1ClickProjects.UpdatePlacement+import Amazonka.IoT1ClickProjects.UpdateProject
+ gen/Amazonka/IoT1ClickProjects/ListPlacements.hs view
@@ -0,0 +1,230 @@+{-# 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.IoT1ClickProjects.ListPlacements+-- 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 placement(s) of a project.+--+-- This operation returns paginated results.+module Amazonka.IoT1ClickProjects.ListPlacements+ ( -- * Creating a Request+ ListPlacements (..),+ newListPlacements,++ -- * Request Lenses+ listPlacements_maxResults,+ listPlacements_nextToken,+ listPlacements_projectName,++ -- * Destructuring the Response+ ListPlacementsResponse (..),+ newListPlacementsResponse,++ -- * Response Lenses+ listPlacementsResponse_nextToken,+ listPlacementsResponse_httpStatus,+ listPlacementsResponse_placements,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListPlacements' smart constructor.+data ListPlacements = ListPlacements'+ { -- | 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 project containing the placements to be listed.+ projectName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPlacements' 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', 'listPlacements_maxResults' - The maximum number of results to return per request. If not set, a+-- default value of 100 is used.+--+-- 'nextToken', 'listPlacements_nextToken' - The token to retrieve the next set of results.+--+-- 'projectName', 'listPlacements_projectName' - The project containing the placements to be listed.+newListPlacements ::+ -- | 'projectName'+ Prelude.Text ->+ ListPlacements+newListPlacements pProjectName_ =+ ListPlacements'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ projectName = pProjectName_+ }++-- | The maximum number of results to return per request. If not set, a+-- default value of 100 is used.+listPlacements_maxResults :: Lens.Lens' ListPlacements (Prelude.Maybe Prelude.Natural)+listPlacements_maxResults = Lens.lens (\ListPlacements' {maxResults} -> maxResults) (\s@ListPlacements' {} a -> s {maxResults = a} :: ListPlacements)++-- | The token to retrieve the next set of results.+listPlacements_nextToken :: Lens.Lens' ListPlacements (Prelude.Maybe Prelude.Text)+listPlacements_nextToken = Lens.lens (\ListPlacements' {nextToken} -> nextToken) (\s@ListPlacements' {} a -> s {nextToken = a} :: ListPlacements)++-- | The project containing the placements to be listed.+listPlacements_projectName :: Lens.Lens' ListPlacements Prelude.Text+listPlacements_projectName = Lens.lens (\ListPlacements' {projectName} -> projectName) (\s@ListPlacements' {} a -> s {projectName = a} :: ListPlacements)++instance Core.AWSPager ListPlacements where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listPlacementsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ (rs Lens.^. listPlacementsResponse_placements) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listPlacements_nextToken+ Lens..~ rs+ Lens.^? listPlacementsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListPlacements where+ type+ AWSResponse ListPlacements =+ ListPlacementsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListPlacementsResponse'+ Prelude.<$> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "placements" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable ListPlacements where+ hashWithSalt _salt ListPlacements' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` projectName++instance Prelude.NFData ListPlacements where+ rnf ListPlacements' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf projectName++instance Data.ToHeaders ListPlacements where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListPlacements where+ toPath ListPlacements' {..} =+ Prelude.mconcat+ ["/projects/", Data.toBS projectName, "/placements"]++instance Data.ToQuery ListPlacements where+ toQuery ListPlacements' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListPlacementsResponse' smart constructor.+data ListPlacementsResponse = ListPlacementsResponse'+ { -- | The token used to retrieve the next set of results - will be effectively+ -- empty if there are no further results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | An object listing the requested placements.+ placements :: [PlacementSummary]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPlacementsResponse' 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:+--+-- 'nextToken', 'listPlacementsResponse_nextToken' - The token used to retrieve the next set of results - will be effectively+-- empty if there are no further results.+--+-- 'httpStatus', 'listPlacementsResponse_httpStatus' - The response's http status code.+--+-- 'placements', 'listPlacementsResponse_placements' - An object listing the requested placements.+newListPlacementsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListPlacementsResponse+newListPlacementsResponse pHttpStatus_ =+ ListPlacementsResponse'+ { nextToken =+ Prelude.Nothing,+ httpStatus = pHttpStatus_,+ placements = Prelude.mempty+ }++-- | The token used to retrieve the next set of results - will be effectively+-- empty if there are no further results.+listPlacementsResponse_nextToken :: Lens.Lens' ListPlacementsResponse (Prelude.Maybe Prelude.Text)+listPlacementsResponse_nextToken = Lens.lens (\ListPlacementsResponse' {nextToken} -> nextToken) (\s@ListPlacementsResponse' {} a -> s {nextToken = a} :: ListPlacementsResponse)++-- | The response's http status code.+listPlacementsResponse_httpStatus :: Lens.Lens' ListPlacementsResponse Prelude.Int+listPlacementsResponse_httpStatus = Lens.lens (\ListPlacementsResponse' {httpStatus} -> httpStatus) (\s@ListPlacementsResponse' {} a -> s {httpStatus = a} :: ListPlacementsResponse)++-- | An object listing the requested placements.+listPlacementsResponse_placements :: Lens.Lens' ListPlacementsResponse [PlacementSummary]+listPlacementsResponse_placements = Lens.lens (\ListPlacementsResponse' {placements} -> placements) (\s@ListPlacementsResponse' {} a -> s {placements = a} :: ListPlacementsResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListPlacementsResponse where+ rnf ListPlacementsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf placements
+ gen/Amazonka/IoT1ClickProjects/ListProjects.hs view
@@ -0,0 +1,212 @@+{-# 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.IoT1ClickProjects.ListProjects+-- 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 AWS IoT 1-Click project(s) associated with your AWS account+-- and region.+--+-- This operation returns paginated results.+module Amazonka.IoT1ClickProjects.ListProjects+ ( -- * Creating a Request+ ListProjects (..),+ newListProjects,++ -- * Request Lenses+ listProjects_maxResults,+ listProjects_nextToken,++ -- * Destructuring the Response+ ListProjectsResponse (..),+ newListProjectsResponse,++ -- * Response Lenses+ listProjectsResponse_nextToken,+ listProjectsResponse_httpStatus,+ listProjectsResponse_projects,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListProjects' smart constructor.+data ListProjects = ListProjects'+ { -- | 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 'ListProjects' 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', 'listProjects_maxResults' - The maximum number of results to return per request. If not set, a+-- default value of 100 is used.+--+-- 'nextToken', 'listProjects_nextToken' - The token to retrieve the next set of results.+newListProjects ::+ ListProjects+newListProjects =+ ListProjects'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of results to return per request. If not set, a+-- default value of 100 is used.+listProjects_maxResults :: Lens.Lens' ListProjects (Prelude.Maybe Prelude.Natural)+listProjects_maxResults = Lens.lens (\ListProjects' {maxResults} -> maxResults) (\s@ListProjects' {} a -> s {maxResults = a} :: ListProjects)++-- | The token to retrieve the next set of results.+listProjects_nextToken :: Lens.Lens' ListProjects (Prelude.Maybe Prelude.Text)+listProjects_nextToken = Lens.lens (\ListProjects' {nextToken} -> nextToken) (\s@ListProjects' {} a -> s {nextToken = a} :: ListProjects)++instance Core.AWSPager ListProjects where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listProjectsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ (rs Lens.^. listProjectsResponse_projects) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listProjects_nextToken+ Lens..~ rs+ Lens.^? listProjectsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListProjects where+ type AWSResponse ListProjects = ListProjectsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListProjectsResponse'+ Prelude.<$> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "projects" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable ListProjects where+ hashWithSalt _salt ListProjects' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListProjects where+ rnf ListProjects' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListProjects where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListProjects where+ toPath = Prelude.const "/projects"++instance Data.ToQuery ListProjects where+ toQuery ListProjects' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListProjectsResponse' smart constructor.+data ListProjectsResponse = ListProjectsResponse'+ { -- | The token used to retrieve the next set of results - will be effectively+ -- empty if there are no further results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | An object containing the list of projects.+ projects :: [ProjectSummary]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListProjectsResponse' 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:+--+-- 'nextToken', 'listProjectsResponse_nextToken' - The token used to retrieve the next set of results - will be effectively+-- empty if there are no further results.+--+-- 'httpStatus', 'listProjectsResponse_httpStatus' - The response's http status code.+--+-- 'projects', 'listProjectsResponse_projects' - An object containing the list of projects.+newListProjectsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListProjectsResponse+newListProjectsResponse pHttpStatus_ =+ ListProjectsResponse'+ { nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_,+ projects = Prelude.mempty+ }++-- | The token used to retrieve the next set of results - will be effectively+-- empty if there are no further results.+listProjectsResponse_nextToken :: Lens.Lens' ListProjectsResponse (Prelude.Maybe Prelude.Text)+listProjectsResponse_nextToken = Lens.lens (\ListProjectsResponse' {nextToken} -> nextToken) (\s@ListProjectsResponse' {} a -> s {nextToken = a} :: ListProjectsResponse)++-- | The response's http status code.+listProjectsResponse_httpStatus :: Lens.Lens' ListProjectsResponse Prelude.Int+listProjectsResponse_httpStatus = Lens.lens (\ListProjectsResponse' {httpStatus} -> httpStatus) (\s@ListProjectsResponse' {} a -> s {httpStatus = a} :: ListProjectsResponse)++-- | An object containing the list of projects.+listProjectsResponse_projects :: Lens.Lens' ListProjectsResponse [ProjectSummary]+listProjectsResponse_projects = Lens.lens (\ListProjectsResponse' {projects} -> projects) (\s@ListProjectsResponse' {} a -> s {projects = a} :: ListProjectsResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListProjectsResponse where+ rnf ListProjectsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf projects
+ gen/Amazonka/IoT1ClickProjects/ListTagsForResource.hs view
@@ -0,0 +1,163 @@+{-# 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.IoT1ClickProjects.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 (metadata key\/value pairs) which you have assigned to+-- the resource.+module Amazonka.IoT1ClickProjects.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.IoT1ClickProjects.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 whose tags you want to list.+ 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 whose tags you want to list.+newListTagsForResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceArn_ =+ ListTagsForResource' {resourceArn = pResourceArn_}++-- | The ARN of the resource whose tags you want to list.+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'+ { -- | The tags (metadata key\/value pairs) which you have assigned to the+ -- resource.+ 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' - The tags (metadata key\/value pairs) which you have assigned to the+-- resource.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+ ListTagsForResourceResponse'+ { tags =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The tags (metadata key\/value pairs) which you have assigned to the+-- resource.+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/IoT1ClickProjects/TagResource.hs view
@@ -0,0 +1,172 @@+{-# 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.IoT1ClickProjects.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)+--+-- Creates or modifies tags for a resource. Tags are key\/value pairs+-- (metadata) that can be used to manage a resource. For more information,+-- see+-- <https://aws.amazon.com/answers/account-management/aws-tagging-strategies/ AWS Tagging Strategies>.+module Amazonka.IoT1ClickProjects.TagResource+ ( -- * Creating a Request+ TagResource (..),+ newTagResource,++ -- * Request Lenses+ tagResource_resourceArn,+ tagResource_tags,++ -- * Destructuring the Response+ TagResourceResponse (..),+ newTagResourceResponse,++ -- * Response Lenses+ tagResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.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 resouce for which tag(s) should be added or modified.+ resourceArn :: Prelude.Text,+ -- | The new or modifying tag(s) for the resource. 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.+ 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 resouce for which tag(s) should be added or modified.+--+-- 'tags', 'tagResource_tags' - The new or modifying tag(s) for the resource. 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.+newTagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ TagResource+newTagResource pResourceArn_ =+ TagResource'+ { resourceArn = pResourceArn_,+ tags = Prelude.mempty+ }++-- | The ARN of the resouce for which tag(s) should be added or modified.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | The new or modifying tag(s) for the resource. 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.+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.receiveEmpty+ ( \s h x ->+ TagResourceResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++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'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ 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.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'tagResourceResponse_httpStatus' - The response's http status code.+newTagResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ TagResourceResponse+newTagResourceResponse pHttpStatus_ =+ TagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+tagResourceResponse_httpStatus :: Lens.Lens' TagResourceResponse Prelude.Int+tagResourceResponse_httpStatus = Lens.lens (\TagResourceResponse' {httpStatus} -> httpStatus) (\s@TagResourceResponse' {} a -> s {httpStatus = a} :: TagResourceResponse)++instance Prelude.NFData TagResourceResponse where+ rnf TagResourceResponse' {..} = Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickProjects/Types.hs view
@@ -0,0 +1,192 @@+{-# 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.IoT1ClickProjects.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.IoT1ClickProjects.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _InternalFailureException,+ _InvalidRequestException,+ _ResourceConflictException,+ _ResourceNotFoundException,+ _TooManyRequestsException,++ -- * DeviceTemplate+ DeviceTemplate (..),+ newDeviceTemplate,+ deviceTemplate_callbackOverrides,+ deviceTemplate_deviceType,++ -- * PlacementDescription+ PlacementDescription (..),+ newPlacementDescription,+ placementDescription_projectName,+ placementDescription_placementName,+ placementDescription_attributes,+ placementDescription_createdDate,+ placementDescription_updatedDate,++ -- * PlacementSummary+ PlacementSummary (..),+ newPlacementSummary,+ placementSummary_projectName,+ placementSummary_placementName,+ placementSummary_createdDate,+ placementSummary_updatedDate,++ -- * PlacementTemplate+ PlacementTemplate (..),+ newPlacementTemplate,+ placementTemplate_defaultAttributes,+ placementTemplate_deviceTemplates,++ -- * ProjectDescription+ ProjectDescription (..),+ newProjectDescription,+ projectDescription_arn,+ projectDescription_description,+ projectDescription_placementTemplate,+ projectDescription_tags,+ projectDescription_projectName,+ projectDescription_createdDate,+ projectDescription_updatedDate,++ -- * ProjectSummary+ ProjectSummary (..),+ newProjectSummary,+ projectSummary_arn,+ projectSummary_tags,+ projectSummary_projectName,+ projectSummary_createdDate,+ projectSummary_updatedDate,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import Amazonka.IoT1ClickProjects.Types.DeviceTemplate+import Amazonka.IoT1ClickProjects.Types.PlacementDescription+import Amazonka.IoT1ClickProjects.Types.PlacementSummary+import Amazonka.IoT1ClickProjects.Types.PlacementTemplate+import Amazonka.IoT1ClickProjects.Types.ProjectDescription+import Amazonka.IoT1ClickProjects.Types.ProjectSummary+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2018-05-14@ of the Amazon IoT 1-Click Projects Service SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "IoT1ClickProjects",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "projects.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 "IoT1ClickProjects",+ 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++_InternalFailureException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalFailureException =+ Core._MatchServiceError+ defaultService+ "InternalFailureException"+ Prelude.. Core.hasStatus 500++_InvalidRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidRequestException =+ Core._MatchServiceError+ defaultService+ "InvalidRequestException"+ Prelude.. Core.hasStatus 400++_ResourceConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceConflictException =+ Core._MatchServiceError+ defaultService+ "ResourceConflictException"+ Prelude.. Core.hasStatus 409++_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"+ Prelude.. Core.hasStatus 404++_TooManyRequestsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_TooManyRequestsException =+ Core._MatchServiceError+ defaultService+ "TooManyRequestsException"+ Prelude.. Core.hasStatus 429
+ gen/Amazonka/IoT1ClickProjects/Types/DeviceTemplate.hs view
@@ -0,0 +1,102 @@+{-# 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.IoT1ClickProjects.Types.DeviceTemplate+-- 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.IoT1ClickProjects.Types.DeviceTemplate 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++-- | An object representing a device for a placement template (see+-- PlacementTemplate).+--+-- /See:/ 'newDeviceTemplate' smart constructor.+data DeviceTemplate = DeviceTemplate'+ { -- | An optional Lambda function to invoke instead of the default Lambda+ -- function provided by the placement template.+ callbackOverrides :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The device type, which currently must be @\"button\"@.+ deviceType :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeviceTemplate' 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:+--+-- 'callbackOverrides', 'deviceTemplate_callbackOverrides' - An optional Lambda function to invoke instead of the default Lambda+-- function provided by the placement template.+--+-- 'deviceType', 'deviceTemplate_deviceType' - The device type, which currently must be @\"button\"@.+newDeviceTemplate ::+ DeviceTemplate+newDeviceTemplate =+ DeviceTemplate'+ { callbackOverrides =+ Prelude.Nothing,+ deviceType = Prelude.Nothing+ }++-- | An optional Lambda function to invoke instead of the default Lambda+-- function provided by the placement template.+deviceTemplate_callbackOverrides :: Lens.Lens' DeviceTemplate (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+deviceTemplate_callbackOverrides = Lens.lens (\DeviceTemplate' {callbackOverrides} -> callbackOverrides) (\s@DeviceTemplate' {} a -> s {callbackOverrides = a} :: DeviceTemplate) Prelude.. Lens.mapping Lens.coerced++-- | The device type, which currently must be @\"button\"@.+deviceTemplate_deviceType :: Lens.Lens' DeviceTemplate (Prelude.Maybe Prelude.Text)+deviceTemplate_deviceType = Lens.lens (\DeviceTemplate' {deviceType} -> deviceType) (\s@DeviceTemplate' {} a -> s {deviceType = a} :: DeviceTemplate)++instance Data.FromJSON DeviceTemplate where+ parseJSON =+ Data.withObject+ "DeviceTemplate"+ ( \x ->+ DeviceTemplate'+ Prelude.<$> ( x+ Data..:? "callbackOverrides"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "deviceType")+ )++instance Prelude.Hashable DeviceTemplate where+ hashWithSalt _salt DeviceTemplate' {..} =+ _salt+ `Prelude.hashWithSalt` callbackOverrides+ `Prelude.hashWithSalt` deviceType++instance Prelude.NFData DeviceTemplate where+ rnf DeviceTemplate' {..} =+ Prelude.rnf callbackOverrides+ `Prelude.seq` Prelude.rnf deviceType++instance Data.ToJSON DeviceTemplate where+ toJSON DeviceTemplate' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("callbackOverrides" Data..=)+ Prelude.<$> callbackOverrides,+ ("deviceType" Data..=) Prelude.<$> deviceType+ ]+ )
+ gen/Amazonka/IoT1ClickProjects/Types/PlacementDescription.hs view
@@ -0,0 +1,141 @@+{-# 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.IoT1ClickProjects.Types.PlacementDescription+-- 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.IoT1ClickProjects.Types.PlacementDescription 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++-- | An object describing a project\'s placement.+--+-- /See:/ 'newPlacementDescription' smart constructor.+data PlacementDescription = PlacementDescription'+ { -- | The name of the project containing the placement.+ projectName :: Prelude.Text,+ -- | The name of the placement.+ placementName :: Prelude.Text,+ -- | The user-defined attributes associated with the placement.+ attributes :: Prelude.HashMap Prelude.Text Prelude.Text,+ -- | The date when the placement was initially created, in UNIX epoch time+ -- format.+ createdDate :: Data.POSIX,+ -- | The date when the placement was last updated, in UNIX epoch time format.+ -- If the placement was not updated, then @createdDate@ and @updatedDate@+ -- are the same.+ updatedDate :: Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PlacementDescription' 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:+--+-- 'projectName', 'placementDescription_projectName' - The name of the project containing the placement.+--+-- 'placementName', 'placementDescription_placementName' - The name of the placement.+--+-- 'attributes', 'placementDescription_attributes' - The user-defined attributes associated with the placement.+--+-- 'createdDate', 'placementDescription_createdDate' - The date when the placement was initially created, in UNIX epoch time+-- format.+--+-- 'updatedDate', 'placementDescription_updatedDate' - The date when the placement was last updated, in UNIX epoch time format.+-- If the placement was not updated, then @createdDate@ and @updatedDate@+-- are the same.+newPlacementDescription ::+ -- | 'projectName'+ Prelude.Text ->+ -- | 'placementName'+ Prelude.Text ->+ -- | 'createdDate'+ Prelude.UTCTime ->+ -- | 'updatedDate'+ Prelude.UTCTime ->+ PlacementDescription+newPlacementDescription+ pProjectName_+ pPlacementName_+ pCreatedDate_+ pUpdatedDate_ =+ PlacementDescription'+ { projectName = pProjectName_,+ placementName = pPlacementName_,+ attributes = Prelude.mempty,+ createdDate = Data._Time Lens.# pCreatedDate_,+ updatedDate = Data._Time Lens.# pUpdatedDate_+ }++-- | The name of the project containing the placement.+placementDescription_projectName :: Lens.Lens' PlacementDescription Prelude.Text+placementDescription_projectName = Lens.lens (\PlacementDescription' {projectName} -> projectName) (\s@PlacementDescription' {} a -> s {projectName = a} :: PlacementDescription)++-- | The name of the placement.+placementDescription_placementName :: Lens.Lens' PlacementDescription Prelude.Text+placementDescription_placementName = Lens.lens (\PlacementDescription' {placementName} -> placementName) (\s@PlacementDescription' {} a -> s {placementName = a} :: PlacementDescription)++-- | The user-defined attributes associated with the placement.+placementDescription_attributes :: Lens.Lens' PlacementDescription (Prelude.HashMap Prelude.Text Prelude.Text)+placementDescription_attributes = Lens.lens (\PlacementDescription' {attributes} -> attributes) (\s@PlacementDescription' {} a -> s {attributes = a} :: PlacementDescription) Prelude.. Lens.coerced++-- | The date when the placement was initially created, in UNIX epoch time+-- format.+placementDescription_createdDate :: Lens.Lens' PlacementDescription Prelude.UTCTime+placementDescription_createdDate = Lens.lens (\PlacementDescription' {createdDate} -> createdDate) (\s@PlacementDescription' {} a -> s {createdDate = a} :: PlacementDescription) Prelude.. Data._Time++-- | The date when the placement was last updated, in UNIX epoch time format.+-- If the placement was not updated, then @createdDate@ and @updatedDate@+-- are the same.+placementDescription_updatedDate :: Lens.Lens' PlacementDescription Prelude.UTCTime+placementDescription_updatedDate = Lens.lens (\PlacementDescription' {updatedDate} -> updatedDate) (\s@PlacementDescription' {} a -> s {updatedDate = a} :: PlacementDescription) Prelude.. Data._Time++instance Data.FromJSON PlacementDescription where+ parseJSON =+ Data.withObject+ "PlacementDescription"+ ( \x ->+ PlacementDescription'+ Prelude.<$> (x Data..: "projectName")+ Prelude.<*> (x Data..: "placementName")+ Prelude.<*> (x Data..:? "attributes" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..: "createdDate")+ Prelude.<*> (x Data..: "updatedDate")+ )++instance Prelude.Hashable PlacementDescription where+ hashWithSalt _salt PlacementDescription' {..} =+ _salt+ `Prelude.hashWithSalt` projectName+ `Prelude.hashWithSalt` placementName+ `Prelude.hashWithSalt` attributes+ `Prelude.hashWithSalt` createdDate+ `Prelude.hashWithSalt` updatedDate++instance Prelude.NFData PlacementDescription where+ rnf PlacementDescription' {..} =+ Prelude.rnf projectName+ `Prelude.seq` Prelude.rnf placementName+ `Prelude.seq` Prelude.rnf attributes+ `Prelude.seq` Prelude.rnf createdDate+ `Prelude.seq` Prelude.rnf updatedDate
+ gen/Amazonka/IoT1ClickProjects/Types/PlacementSummary.hs view
@@ -0,0 +1,129 @@+{-# 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.IoT1ClickProjects.Types.PlacementSummary+-- 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.IoT1ClickProjects.Types.PlacementSummary 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++-- | An object providing summary information for a particular placement.+--+-- /See:/ 'newPlacementSummary' smart constructor.+data PlacementSummary = PlacementSummary'+ { -- | The name of the project containing the placement.+ projectName :: Prelude.Text,+ -- | The name of the placement being summarized.+ placementName :: Prelude.Text,+ -- | The date when the placement was originally created, in UNIX epoch time+ -- format.+ createdDate :: Data.POSIX,+ -- | The date when the placement was last updated, in UNIX epoch time format.+ -- If the placement was not updated, then @createdDate@ and @updatedDate@+ -- are the same.+ updatedDate :: Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PlacementSummary' 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:+--+-- 'projectName', 'placementSummary_projectName' - The name of the project containing the placement.+--+-- 'placementName', 'placementSummary_placementName' - The name of the placement being summarized.+--+-- 'createdDate', 'placementSummary_createdDate' - The date when the placement was originally created, in UNIX epoch time+-- format.+--+-- 'updatedDate', 'placementSummary_updatedDate' - The date when the placement was last updated, in UNIX epoch time format.+-- If the placement was not updated, then @createdDate@ and @updatedDate@+-- are the same.+newPlacementSummary ::+ -- | 'projectName'+ Prelude.Text ->+ -- | 'placementName'+ Prelude.Text ->+ -- | 'createdDate'+ Prelude.UTCTime ->+ -- | 'updatedDate'+ Prelude.UTCTime ->+ PlacementSummary+newPlacementSummary+ pProjectName_+ pPlacementName_+ pCreatedDate_+ pUpdatedDate_ =+ PlacementSummary'+ { projectName = pProjectName_,+ placementName = pPlacementName_,+ createdDate = Data._Time Lens.# pCreatedDate_,+ updatedDate = Data._Time Lens.# pUpdatedDate_+ }++-- | The name of the project containing the placement.+placementSummary_projectName :: Lens.Lens' PlacementSummary Prelude.Text+placementSummary_projectName = Lens.lens (\PlacementSummary' {projectName} -> projectName) (\s@PlacementSummary' {} a -> s {projectName = a} :: PlacementSummary)++-- | The name of the placement being summarized.+placementSummary_placementName :: Lens.Lens' PlacementSummary Prelude.Text+placementSummary_placementName = Lens.lens (\PlacementSummary' {placementName} -> placementName) (\s@PlacementSummary' {} a -> s {placementName = a} :: PlacementSummary)++-- | The date when the placement was originally created, in UNIX epoch time+-- format.+placementSummary_createdDate :: Lens.Lens' PlacementSummary Prelude.UTCTime+placementSummary_createdDate = Lens.lens (\PlacementSummary' {createdDate} -> createdDate) (\s@PlacementSummary' {} a -> s {createdDate = a} :: PlacementSummary) Prelude.. Data._Time++-- | The date when the placement was last updated, in UNIX epoch time format.+-- If the placement was not updated, then @createdDate@ and @updatedDate@+-- are the same.+placementSummary_updatedDate :: Lens.Lens' PlacementSummary Prelude.UTCTime+placementSummary_updatedDate = Lens.lens (\PlacementSummary' {updatedDate} -> updatedDate) (\s@PlacementSummary' {} a -> s {updatedDate = a} :: PlacementSummary) Prelude.. Data._Time++instance Data.FromJSON PlacementSummary where+ parseJSON =+ Data.withObject+ "PlacementSummary"+ ( \x ->+ PlacementSummary'+ Prelude.<$> (x Data..: "projectName")+ Prelude.<*> (x Data..: "placementName")+ Prelude.<*> (x Data..: "createdDate")+ Prelude.<*> (x Data..: "updatedDate")+ )++instance Prelude.Hashable PlacementSummary where+ hashWithSalt _salt PlacementSummary' {..} =+ _salt+ `Prelude.hashWithSalt` projectName+ `Prelude.hashWithSalt` placementName+ `Prelude.hashWithSalt` createdDate+ `Prelude.hashWithSalt` updatedDate++instance Prelude.NFData PlacementSummary where+ rnf PlacementSummary' {..} =+ Prelude.rnf projectName+ `Prelude.seq` Prelude.rnf placementName+ `Prelude.seq` Prelude.rnf createdDate+ `Prelude.seq` Prelude.rnf updatedDate
+ gen/Amazonka/IoT1ClickProjects/Types/PlacementTemplate.hs view
@@ -0,0 +1,109 @@+{-# 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.IoT1ClickProjects.Types.PlacementTemplate+-- 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.IoT1ClickProjects.Types.PlacementTemplate where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types.DeviceTemplate+import qualified Amazonka.Prelude as Prelude++-- | An object defining the template for a placement.+--+-- /See:/ 'newPlacementTemplate' smart constructor.+data PlacementTemplate = PlacementTemplate'+ { -- | The default attributes (key\/value pairs) to be applied to all+ -- placements using this template.+ defaultAttributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | An object specifying the DeviceTemplate for all placements using this+ -- (PlacementTemplate) template.+ deviceTemplates :: Prelude.Maybe (Prelude.HashMap Prelude.Text DeviceTemplate)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PlacementTemplate' 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:+--+-- 'defaultAttributes', 'placementTemplate_defaultAttributes' - The default attributes (key\/value pairs) to be applied to all+-- placements using this template.+--+-- 'deviceTemplates', 'placementTemplate_deviceTemplates' - An object specifying the DeviceTemplate for all placements using this+-- (PlacementTemplate) template.+newPlacementTemplate ::+ PlacementTemplate+newPlacementTemplate =+ PlacementTemplate'+ { defaultAttributes =+ Prelude.Nothing,+ deviceTemplates = Prelude.Nothing+ }++-- | The default attributes (key\/value pairs) to be applied to all+-- placements using this template.+placementTemplate_defaultAttributes :: Lens.Lens' PlacementTemplate (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+placementTemplate_defaultAttributes = Lens.lens (\PlacementTemplate' {defaultAttributes} -> defaultAttributes) (\s@PlacementTemplate' {} a -> s {defaultAttributes = a} :: PlacementTemplate) Prelude.. Lens.mapping Lens.coerced++-- | An object specifying the DeviceTemplate for all placements using this+-- (PlacementTemplate) template.+placementTemplate_deviceTemplates :: Lens.Lens' PlacementTemplate (Prelude.Maybe (Prelude.HashMap Prelude.Text DeviceTemplate))+placementTemplate_deviceTemplates = Lens.lens (\PlacementTemplate' {deviceTemplates} -> deviceTemplates) (\s@PlacementTemplate' {} a -> s {deviceTemplates = a} :: PlacementTemplate) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON PlacementTemplate where+ parseJSON =+ Data.withObject+ "PlacementTemplate"+ ( \x ->+ PlacementTemplate'+ Prelude.<$> ( x+ Data..:? "defaultAttributes"+ Data..!= Prelude.mempty+ )+ Prelude.<*> ( x+ Data..:? "deviceTemplates"+ Data..!= Prelude.mempty+ )+ )++instance Prelude.Hashable PlacementTemplate where+ hashWithSalt _salt PlacementTemplate' {..} =+ _salt+ `Prelude.hashWithSalt` defaultAttributes+ `Prelude.hashWithSalt` deviceTemplates++instance Prelude.NFData PlacementTemplate where+ rnf PlacementTemplate' {..} =+ Prelude.rnf defaultAttributes+ `Prelude.seq` Prelude.rnf deviceTemplates++instance Data.ToJSON PlacementTemplate where+ toJSON PlacementTemplate' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("defaultAttributes" Data..=)+ Prelude.<$> defaultAttributes,+ ("deviceTemplates" Data..=)+ Prelude.<$> deviceTemplates+ ]+ )
+ gen/Amazonka/IoT1ClickProjects/Types/ProjectDescription.hs view
@@ -0,0 +1,164 @@+{-# 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.IoT1ClickProjects.Types.ProjectDescription+-- 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.IoT1ClickProjects.Types.ProjectDescription where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types.PlacementTemplate+import qualified Amazonka.Prelude as Prelude++-- | An object providing detailed information for a particular project+-- associated with an AWS account and region.+--+-- /See:/ 'newProjectDescription' smart constructor.+data ProjectDescription = ProjectDescription'+ { -- | The ARN of the project.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The description of the project.+ description :: Prelude.Maybe Prelude.Text,+ -- | An object describing the project\'s placement specifications.+ placementTemplate :: Prelude.Maybe PlacementTemplate,+ -- | The tags (metadata key\/value pairs) associated with the project.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The name of the project for which to obtain information from.+ projectName :: Prelude.Text,+ -- | The date when the project was originally created, in UNIX epoch time+ -- format.+ createdDate :: Data.POSIX,+ -- | The date when the project was last updated, in UNIX epoch time format.+ -- If the project was not updated, then @createdDate@ and @updatedDate@ are+ -- the same.+ updatedDate :: Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ProjectDescription' 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', 'projectDescription_arn' - The ARN of the project.+--+-- 'description', 'projectDescription_description' - The description of the project.+--+-- 'placementTemplate', 'projectDescription_placementTemplate' - An object describing the project\'s placement specifications.+--+-- 'tags', 'projectDescription_tags' - The tags (metadata key\/value pairs) associated with the project.+--+-- 'projectName', 'projectDescription_projectName' - The name of the project for which to obtain information from.+--+-- 'createdDate', 'projectDescription_createdDate' - The date when the project was originally created, in UNIX epoch time+-- format.+--+-- 'updatedDate', 'projectDescription_updatedDate' - The date when the project was last updated, in UNIX epoch time format.+-- If the project was not updated, then @createdDate@ and @updatedDate@ are+-- the same.+newProjectDescription ::+ -- | 'projectName'+ Prelude.Text ->+ -- | 'createdDate'+ Prelude.UTCTime ->+ -- | 'updatedDate'+ Prelude.UTCTime ->+ ProjectDescription+newProjectDescription+ pProjectName_+ pCreatedDate_+ pUpdatedDate_ =+ ProjectDescription'+ { arn = Prelude.Nothing,+ description = Prelude.Nothing,+ placementTemplate = Prelude.Nothing,+ tags = Prelude.Nothing,+ projectName = pProjectName_,+ createdDate = Data._Time Lens.# pCreatedDate_,+ updatedDate = Data._Time Lens.# pUpdatedDate_+ }++-- | The ARN of the project.+projectDescription_arn :: Lens.Lens' ProjectDescription (Prelude.Maybe Prelude.Text)+projectDescription_arn = Lens.lens (\ProjectDescription' {arn} -> arn) (\s@ProjectDescription' {} a -> s {arn = a} :: ProjectDescription)++-- | The description of the project.+projectDescription_description :: Lens.Lens' ProjectDescription (Prelude.Maybe Prelude.Text)+projectDescription_description = Lens.lens (\ProjectDescription' {description} -> description) (\s@ProjectDescription' {} a -> s {description = a} :: ProjectDescription)++-- | An object describing the project\'s placement specifications.+projectDescription_placementTemplate :: Lens.Lens' ProjectDescription (Prelude.Maybe PlacementTemplate)+projectDescription_placementTemplate = Lens.lens (\ProjectDescription' {placementTemplate} -> placementTemplate) (\s@ProjectDescription' {} a -> s {placementTemplate = a} :: ProjectDescription)++-- | The tags (metadata key\/value pairs) associated with the project.+projectDescription_tags :: Lens.Lens' ProjectDescription (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+projectDescription_tags = Lens.lens (\ProjectDescription' {tags} -> tags) (\s@ProjectDescription' {} a -> s {tags = a} :: ProjectDescription) Prelude.. Lens.mapping Lens.coerced++-- | The name of the project for which to obtain information from.+projectDescription_projectName :: Lens.Lens' ProjectDescription Prelude.Text+projectDescription_projectName = Lens.lens (\ProjectDescription' {projectName} -> projectName) (\s@ProjectDescription' {} a -> s {projectName = a} :: ProjectDescription)++-- | The date when the project was originally created, in UNIX epoch time+-- format.+projectDescription_createdDate :: Lens.Lens' ProjectDescription Prelude.UTCTime+projectDescription_createdDate = Lens.lens (\ProjectDescription' {createdDate} -> createdDate) (\s@ProjectDescription' {} a -> s {createdDate = a} :: ProjectDescription) Prelude.. Data._Time++-- | The date when the project was last updated, in UNIX epoch time format.+-- If the project was not updated, then @createdDate@ and @updatedDate@ are+-- the same.+projectDescription_updatedDate :: Lens.Lens' ProjectDescription Prelude.UTCTime+projectDescription_updatedDate = Lens.lens (\ProjectDescription' {updatedDate} -> updatedDate) (\s@ProjectDescription' {} a -> s {updatedDate = a} :: ProjectDescription) Prelude.. Data._Time++instance Data.FromJSON ProjectDescription where+ parseJSON =+ Data.withObject+ "ProjectDescription"+ ( \x ->+ ProjectDescription'+ Prelude.<$> (x Data..:? "arn")+ Prelude.<*> (x Data..:? "description")+ Prelude.<*> (x Data..:? "placementTemplate")+ Prelude.<*> (x Data..:? "tags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..: "projectName")+ Prelude.<*> (x Data..: "createdDate")+ Prelude.<*> (x Data..: "updatedDate")+ )++instance Prelude.Hashable ProjectDescription where+ hashWithSalt _salt ProjectDescription' {..} =+ _salt+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` description+ `Prelude.hashWithSalt` placementTemplate+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` projectName+ `Prelude.hashWithSalt` createdDate+ `Prelude.hashWithSalt` updatedDate++instance Prelude.NFData ProjectDescription where+ rnf ProjectDescription' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf description+ `Prelude.seq` Prelude.rnf placementTemplate+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf projectName+ `Prelude.seq` Prelude.rnf createdDate+ `Prelude.seq` Prelude.rnf updatedDate
+ gen/Amazonka/IoT1ClickProjects/Types/ProjectSummary.hs view
@@ -0,0 +1,139 @@+{-# 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.IoT1ClickProjects.Types.ProjectSummary+-- 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.IoT1ClickProjects.Types.ProjectSummary 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++-- | An object providing summary information for a particular project for an+-- associated AWS account and region.+--+-- /See:/ 'newProjectSummary' smart constructor.+data ProjectSummary = ProjectSummary'+ { -- | The ARN of the project.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The tags (metadata key\/value pairs) associated with the project.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The name of the project being summarized.+ projectName :: Prelude.Text,+ -- | The date when the project was originally created, in UNIX epoch time+ -- format.+ createdDate :: Data.POSIX,+ -- | The date when the project was last updated, in UNIX epoch time format.+ -- If the project was not updated, then @createdDate@ and @updatedDate@ are+ -- the same.+ updatedDate :: Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ProjectSummary' 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', 'projectSummary_arn' - The ARN of the project.+--+-- 'tags', 'projectSummary_tags' - The tags (metadata key\/value pairs) associated with the project.+--+-- 'projectName', 'projectSummary_projectName' - The name of the project being summarized.+--+-- 'createdDate', 'projectSummary_createdDate' - The date when the project was originally created, in UNIX epoch time+-- format.+--+-- 'updatedDate', 'projectSummary_updatedDate' - The date when the project was last updated, in UNIX epoch time format.+-- If the project was not updated, then @createdDate@ and @updatedDate@ are+-- the same.+newProjectSummary ::+ -- | 'projectName'+ Prelude.Text ->+ -- | 'createdDate'+ Prelude.UTCTime ->+ -- | 'updatedDate'+ Prelude.UTCTime ->+ ProjectSummary+newProjectSummary+ pProjectName_+ pCreatedDate_+ pUpdatedDate_ =+ ProjectSummary'+ { arn = Prelude.Nothing,+ tags = Prelude.Nothing,+ projectName = pProjectName_,+ createdDate = Data._Time Lens.# pCreatedDate_,+ updatedDate = Data._Time Lens.# pUpdatedDate_+ }++-- | The ARN of the project.+projectSummary_arn :: Lens.Lens' ProjectSummary (Prelude.Maybe Prelude.Text)+projectSummary_arn = Lens.lens (\ProjectSummary' {arn} -> arn) (\s@ProjectSummary' {} a -> s {arn = a} :: ProjectSummary)++-- | The tags (metadata key\/value pairs) associated with the project.+projectSummary_tags :: Lens.Lens' ProjectSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+projectSummary_tags = Lens.lens (\ProjectSummary' {tags} -> tags) (\s@ProjectSummary' {} a -> s {tags = a} :: ProjectSummary) Prelude.. Lens.mapping Lens.coerced++-- | The name of the project being summarized.+projectSummary_projectName :: Lens.Lens' ProjectSummary Prelude.Text+projectSummary_projectName = Lens.lens (\ProjectSummary' {projectName} -> projectName) (\s@ProjectSummary' {} a -> s {projectName = a} :: ProjectSummary)++-- | The date when the project was originally created, in UNIX epoch time+-- format.+projectSummary_createdDate :: Lens.Lens' ProjectSummary Prelude.UTCTime+projectSummary_createdDate = Lens.lens (\ProjectSummary' {createdDate} -> createdDate) (\s@ProjectSummary' {} a -> s {createdDate = a} :: ProjectSummary) Prelude.. Data._Time++-- | The date when the project was last updated, in UNIX epoch time format.+-- If the project was not updated, then @createdDate@ and @updatedDate@ are+-- the same.+projectSummary_updatedDate :: Lens.Lens' ProjectSummary Prelude.UTCTime+projectSummary_updatedDate = Lens.lens (\ProjectSummary' {updatedDate} -> updatedDate) (\s@ProjectSummary' {} a -> s {updatedDate = a} :: ProjectSummary) Prelude.. Data._Time++instance Data.FromJSON ProjectSummary where+ parseJSON =+ Data.withObject+ "ProjectSummary"+ ( \x ->+ ProjectSummary'+ Prelude.<$> (x Data..:? "arn")+ Prelude.<*> (x Data..:? "tags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..: "projectName")+ Prelude.<*> (x Data..: "createdDate")+ Prelude.<*> (x Data..: "updatedDate")+ )++instance Prelude.Hashable ProjectSummary where+ hashWithSalt _salt ProjectSummary' {..} =+ _salt+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` projectName+ `Prelude.hashWithSalt` createdDate+ `Prelude.hashWithSalt` updatedDate++instance Prelude.NFData ProjectSummary where+ rnf ProjectSummary' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf projectName+ `Prelude.seq` Prelude.rnf createdDate+ `Prelude.seq` Prelude.rnf updatedDate
+ gen/Amazonka/IoT1ClickProjects/UntagResource.hs view
@@ -0,0 +1,163 @@+{-# 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.IoT1ClickProjects.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)+--+-- Removes one or more tags (metadata key\/value pairs) from a resource.+module Amazonka.IoT1ClickProjects.UntagResource+ ( -- * Creating a Request+ UntagResource (..),+ newUntagResource,++ -- * Request Lenses+ untagResource_resourceArn,+ untagResource_tagKeys,++ -- * Destructuring the Response+ UntagResourceResponse (..),+ newUntagResourceResponse,++ -- * Response Lenses+ untagResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.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'+ { -- | The ARN of the resource whose tag you want to remove.+ resourceArn :: Prelude.Text,+ -- | The keys of those tags which you want to remove.+ tagKeys :: Prelude.NonEmpty 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:+--+-- 'resourceArn', 'untagResource_resourceArn' - The ARN of the resource whose tag you want to remove.+--+-- 'tagKeys', 'untagResource_tagKeys' - The keys of those tags which you want to remove.+newUntagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ -- | 'tagKeys'+ Prelude.NonEmpty Prelude.Text ->+ UntagResource+newUntagResource pResourceArn_ pTagKeys_ =+ UntagResource'+ { resourceArn = pResourceArn_,+ tagKeys = Lens.coerced Lens.# pTagKeys_+ }++-- | The ARN of the resource whose tag you want to remove.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | The keys of those tags which you want to remove.+untagResource_tagKeys :: Lens.Lens' UntagResource (Prelude.NonEmpty Prelude.Text)+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+ type+ AWSResponse UntagResource =+ UntagResourceResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ UntagResourceResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UntagResource where+ hashWithSalt _salt UntagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` tagKeys++instance Prelude.NFData UntagResource where+ rnf UntagResource' {..} =+ Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf tagKeys++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'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ 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.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code.+newUntagResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UntagResourceResponse+newUntagResourceResponse pHttpStatus_ =+ UntagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int+untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse)++instance Prelude.NFData UntagResourceResponse where+ rnf UntagResourceResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickProjects/UpdatePlacement.hs view
@@ -0,0 +1,189 @@+{-# 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.IoT1ClickProjects.UpdatePlacement+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a placement with the given attributes. To clear an attribute,+-- pass an empty value (i.e., \"\").+module Amazonka.IoT1ClickProjects.UpdatePlacement+ ( -- * Creating a Request+ UpdatePlacement (..),+ newUpdatePlacement,++ -- * Request Lenses+ updatePlacement_attributes,+ updatePlacement_placementName,+ updatePlacement_projectName,++ -- * Destructuring the Response+ UpdatePlacementResponse (..),+ newUpdatePlacementResponse,++ -- * Response Lenses+ updatePlacementResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdatePlacement' smart constructor.+data UpdatePlacement = UpdatePlacement'+ { -- | The user-defined object of attributes used to update the placement. The+ -- maximum number of key\/value pairs is 50.+ attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The name of the placement to update.+ placementName :: Prelude.Text,+ -- | The name of the project containing the placement to be updated.+ projectName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdatePlacement' 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', 'updatePlacement_attributes' - The user-defined object of attributes used to update the placement. The+-- maximum number of key\/value pairs is 50.+--+-- 'placementName', 'updatePlacement_placementName' - The name of the placement to update.+--+-- 'projectName', 'updatePlacement_projectName' - The name of the project containing the placement to be updated.+newUpdatePlacement ::+ -- | 'placementName'+ Prelude.Text ->+ -- | 'projectName'+ Prelude.Text ->+ UpdatePlacement+newUpdatePlacement pPlacementName_ pProjectName_ =+ UpdatePlacement'+ { attributes = Prelude.Nothing,+ placementName = pPlacementName_,+ projectName = pProjectName_+ }++-- | The user-defined object of attributes used to update the placement. The+-- maximum number of key\/value pairs is 50.+updatePlacement_attributes :: Lens.Lens' UpdatePlacement (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+updatePlacement_attributes = Lens.lens (\UpdatePlacement' {attributes} -> attributes) (\s@UpdatePlacement' {} a -> s {attributes = a} :: UpdatePlacement) Prelude.. Lens.mapping Lens.coerced++-- | The name of the placement to update.+updatePlacement_placementName :: Lens.Lens' UpdatePlacement Prelude.Text+updatePlacement_placementName = Lens.lens (\UpdatePlacement' {placementName} -> placementName) (\s@UpdatePlacement' {} a -> s {placementName = a} :: UpdatePlacement)++-- | The name of the project containing the placement to be updated.+updatePlacement_projectName :: Lens.Lens' UpdatePlacement Prelude.Text+updatePlacement_projectName = Lens.lens (\UpdatePlacement' {projectName} -> projectName) (\s@UpdatePlacement' {} a -> s {projectName = a} :: UpdatePlacement)++instance Core.AWSRequest UpdatePlacement where+ type+ AWSResponse UpdatePlacement =+ UpdatePlacementResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ UpdatePlacementResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdatePlacement where+ hashWithSalt _salt UpdatePlacement' {..} =+ _salt+ `Prelude.hashWithSalt` attributes+ `Prelude.hashWithSalt` placementName+ `Prelude.hashWithSalt` projectName++instance Prelude.NFData UpdatePlacement where+ rnf UpdatePlacement' {..} =+ Prelude.rnf attributes+ `Prelude.seq` Prelude.rnf placementName+ `Prelude.seq` Prelude.rnf projectName++instance Data.ToHeaders UpdatePlacement where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdatePlacement where+ toJSON UpdatePlacement' {..} =+ Data.object+ ( Prelude.catMaybes+ [("attributes" Data..=) Prelude.<$> attributes]+ )++instance Data.ToPath UpdatePlacement where+ toPath UpdatePlacement' {..} =+ Prelude.mconcat+ [ "/projects/",+ Data.toBS projectName,+ "/placements/",+ Data.toBS placementName+ ]++instance Data.ToQuery UpdatePlacement where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdatePlacementResponse' smart constructor.+data UpdatePlacementResponse = UpdatePlacementResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdatePlacementResponse' 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', 'updatePlacementResponse_httpStatus' - The response's http status code.+newUpdatePlacementResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdatePlacementResponse+newUpdatePlacementResponse pHttpStatus_ =+ UpdatePlacementResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+updatePlacementResponse_httpStatus :: Lens.Lens' UpdatePlacementResponse Prelude.Int+updatePlacementResponse_httpStatus = Lens.lens (\UpdatePlacementResponse' {httpStatus} -> httpStatus) (\s@UpdatePlacementResponse' {} a -> s {httpStatus = a} :: UpdatePlacementResponse)++instance Prelude.NFData UpdatePlacementResponse where+ rnf UpdatePlacementResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickProjects/UpdateProject.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.IoT1ClickProjects.UpdateProject+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a project associated with your AWS account and region. With the+-- exception of device template names, you can pass just the values that+-- need to be updated because the update request will change only the+-- values that are provided. To clear a value, pass the empty string (i.e.,+-- @\"\"@).+module Amazonka.IoT1ClickProjects.UpdateProject+ ( -- * Creating a Request+ UpdateProject (..),+ newUpdateProject,++ -- * Request Lenses+ updateProject_description,+ updateProject_placementTemplate,+ updateProject_projectName,++ -- * Destructuring the Response+ UpdateProjectResponse (..),+ newUpdateProjectResponse,++ -- * Response Lenses+ updateProjectResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateProject' smart constructor.+data UpdateProject = UpdateProject'+ { -- | An optional user-defined description for the project.+ description :: Prelude.Maybe Prelude.Text,+ -- | An object defining the project update. Once a project has been created,+ -- you cannot add device template names to the project. However, for a+ -- given @placementTemplate@, you can update the associated+ -- @callbackOverrides@ for the device definition using this API.+ placementTemplate :: Prelude.Maybe PlacementTemplate,+ -- | The name of the project to be updated.+ projectName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateProject' 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:+--+-- 'description', 'updateProject_description' - An optional user-defined description for the project.+--+-- 'placementTemplate', 'updateProject_placementTemplate' - An object defining the project update. Once a project has been created,+-- you cannot add device template names to the project. However, for a+-- given @placementTemplate@, you can update the associated+-- @callbackOverrides@ for the device definition using this API.+--+-- 'projectName', 'updateProject_projectName' - The name of the project to be updated.+newUpdateProject ::+ -- | 'projectName'+ Prelude.Text ->+ UpdateProject+newUpdateProject pProjectName_ =+ UpdateProject'+ { description = Prelude.Nothing,+ placementTemplate = Prelude.Nothing,+ projectName = pProjectName_+ }++-- | An optional user-defined description for the project.+updateProject_description :: Lens.Lens' UpdateProject (Prelude.Maybe Prelude.Text)+updateProject_description = Lens.lens (\UpdateProject' {description} -> description) (\s@UpdateProject' {} a -> s {description = a} :: UpdateProject)++-- | An object defining the project update. Once a project has been created,+-- you cannot add device template names to the project. However, for a+-- given @placementTemplate@, you can update the associated+-- @callbackOverrides@ for the device definition using this API.+updateProject_placementTemplate :: Lens.Lens' UpdateProject (Prelude.Maybe PlacementTemplate)+updateProject_placementTemplate = Lens.lens (\UpdateProject' {placementTemplate} -> placementTemplate) (\s@UpdateProject' {} a -> s {placementTemplate = a} :: UpdateProject)++-- | The name of the project to be updated.+updateProject_projectName :: Lens.Lens' UpdateProject Prelude.Text+updateProject_projectName = Lens.lens (\UpdateProject' {projectName} -> projectName) (\s@UpdateProject' {} a -> s {projectName = a} :: UpdateProject)++instance Core.AWSRequest UpdateProject where+ type+ AWSResponse UpdateProject =+ UpdateProjectResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ UpdateProjectResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateProject where+ hashWithSalt _salt UpdateProject' {..} =+ _salt+ `Prelude.hashWithSalt` description+ `Prelude.hashWithSalt` placementTemplate+ `Prelude.hashWithSalt` projectName++instance Prelude.NFData UpdateProject where+ rnf UpdateProject' {..} =+ Prelude.rnf description+ `Prelude.seq` Prelude.rnf placementTemplate+ `Prelude.seq` Prelude.rnf projectName++instance Data.ToHeaders UpdateProject where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateProject where+ toJSON UpdateProject' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("description" Data..=) Prelude.<$> description,+ ("placementTemplate" Data..=)+ Prelude.<$> placementTemplate+ ]+ )++instance Data.ToPath UpdateProject where+ toPath UpdateProject' {..} =+ Prelude.mconcat+ ["/projects/", Data.toBS projectName]++instance Data.ToQuery UpdateProject where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateProjectResponse' smart constructor.+data UpdateProjectResponse = UpdateProjectResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateProjectResponse' 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', 'updateProjectResponse_httpStatus' - The response's http status code.+newUpdateProjectResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateProjectResponse+newUpdateProjectResponse pHttpStatus_ =+ UpdateProjectResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+updateProjectResponse_httpStatus :: Lens.Lens' UpdateProjectResponse Prelude.Int+updateProjectResponse_httpStatus = Lens.lens (\UpdateProjectResponse' {httpStatus} -> httpStatus) (\s@UpdateProjectResponse' {} a -> s {httpStatus = a} :: UpdateProjectResponse)++instance Prelude.NFData UpdateProjectResponse where+ rnf UpdateProjectResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IoT1ClickProjects/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.IoT1ClickProjects.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.IoT1ClickProjects.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoT1ClickProjects.Lens+import Amazonka.IoT1ClickProjects.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.IoT1ClickProjects+import Test.Amazonka.IoT1ClickProjects.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "IoT1ClickProjects"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/Gen/IoT1ClickProjects.hs view
@@ -0,0 +1,358 @@+{-# 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.IoT1ClickProjects+-- 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.IoT1ClickProjects where++import Amazonka.IoT1ClickProjects+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.IoT1ClickProjects.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"+-- [ requestAssociateDeviceWithPlacement $+-- newAssociateDeviceWithPlacement+--+-- , requestCreatePlacement $+-- newCreatePlacement+--+-- , requestCreateProject $+-- newCreateProject+--+-- , requestDeletePlacement $+-- newDeletePlacement+--+-- , requestDeleteProject $+-- newDeleteProject+--+-- , requestDescribePlacement $+-- newDescribePlacement+--+-- , requestDescribeProject $+-- newDescribeProject+--+-- , requestDisassociateDeviceFromPlacement $+-- newDisassociateDeviceFromPlacement+--+-- , requestGetDevicesInPlacement $+-- newGetDevicesInPlacement+--+-- , requestListPlacements $+-- newListPlacements+--+-- , requestListProjects $+-- newListProjects+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdatePlacement $+-- newUpdatePlacement+--+-- , requestUpdateProject $+-- newUpdateProject+--+-- ]++-- , testGroup "response"+-- [ responseAssociateDeviceWithPlacement $+-- newAssociateDeviceWithPlacementResponse+--+-- , responseCreatePlacement $+-- newCreatePlacementResponse+--+-- , responseCreateProject $+-- newCreateProjectResponse+--+-- , responseDeletePlacement $+-- newDeletePlacementResponse+--+-- , responseDeleteProject $+-- newDeleteProjectResponse+--+-- , responseDescribePlacement $+-- newDescribePlacementResponse+--+-- , responseDescribeProject $+-- newDescribeProjectResponse+--+-- , responseDisassociateDeviceFromPlacement $+-- newDisassociateDeviceFromPlacementResponse+--+-- , responseGetDevicesInPlacement $+-- newGetDevicesInPlacementResponse+--+-- , responseListPlacements $+-- newListPlacementsResponse+--+-- , responseListProjects $+-- newListProjectsResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdatePlacement $+-- newUpdatePlacementResponse+--+-- , responseUpdateProject $+-- newUpdateProjectResponse+--+-- ]+-- ]++-- Requests++requestAssociateDeviceWithPlacement :: AssociateDeviceWithPlacement -> TestTree+requestAssociateDeviceWithPlacement =+ req+ "AssociateDeviceWithPlacement"+ "fixture/AssociateDeviceWithPlacement.yaml"++requestCreatePlacement :: CreatePlacement -> TestTree+requestCreatePlacement =+ req+ "CreatePlacement"+ "fixture/CreatePlacement.yaml"++requestCreateProject :: CreateProject -> TestTree+requestCreateProject =+ req+ "CreateProject"+ "fixture/CreateProject.yaml"++requestDeletePlacement :: DeletePlacement -> TestTree+requestDeletePlacement =+ req+ "DeletePlacement"+ "fixture/DeletePlacement.yaml"++requestDeleteProject :: DeleteProject -> TestTree+requestDeleteProject =+ req+ "DeleteProject"+ "fixture/DeleteProject.yaml"++requestDescribePlacement :: DescribePlacement -> TestTree+requestDescribePlacement =+ req+ "DescribePlacement"+ "fixture/DescribePlacement.yaml"++requestDescribeProject :: DescribeProject -> TestTree+requestDescribeProject =+ req+ "DescribeProject"+ "fixture/DescribeProject.yaml"++requestDisassociateDeviceFromPlacement :: DisassociateDeviceFromPlacement -> TestTree+requestDisassociateDeviceFromPlacement =+ req+ "DisassociateDeviceFromPlacement"+ "fixture/DisassociateDeviceFromPlacement.yaml"++requestGetDevicesInPlacement :: GetDevicesInPlacement -> TestTree+requestGetDevicesInPlacement =+ req+ "GetDevicesInPlacement"+ "fixture/GetDevicesInPlacement.yaml"++requestListPlacements :: ListPlacements -> TestTree+requestListPlacements =+ req+ "ListPlacements"+ "fixture/ListPlacements.yaml"++requestListProjects :: ListProjects -> TestTree+requestListProjects =+ req+ "ListProjects"+ "fixture/ListProjects.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdatePlacement :: UpdatePlacement -> TestTree+requestUpdatePlacement =+ req+ "UpdatePlacement"+ "fixture/UpdatePlacement.yaml"++requestUpdateProject :: UpdateProject -> TestTree+requestUpdateProject =+ req+ "UpdateProject"+ "fixture/UpdateProject.yaml"++-- Responses++responseAssociateDeviceWithPlacement :: AssociateDeviceWithPlacementResponse -> TestTree+responseAssociateDeviceWithPlacement =+ res+ "AssociateDeviceWithPlacementResponse"+ "fixture/AssociateDeviceWithPlacementResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy AssociateDeviceWithPlacement)++responseCreatePlacement :: CreatePlacementResponse -> TestTree+responseCreatePlacement =+ res+ "CreatePlacementResponse"+ "fixture/CreatePlacementResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreatePlacement)++responseCreateProject :: CreateProjectResponse -> TestTree+responseCreateProject =+ res+ "CreateProjectResponse"+ "fixture/CreateProjectResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateProject)++responseDeletePlacement :: DeletePlacementResponse -> TestTree+responseDeletePlacement =+ res+ "DeletePlacementResponse"+ "fixture/DeletePlacementResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeletePlacement)++responseDeleteProject :: DeleteProjectResponse -> TestTree+responseDeleteProject =+ res+ "DeleteProjectResponse"+ "fixture/DeleteProjectResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteProject)++responseDescribePlacement :: DescribePlacementResponse -> TestTree+responseDescribePlacement =+ res+ "DescribePlacementResponse"+ "fixture/DescribePlacementResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribePlacement)++responseDescribeProject :: DescribeProjectResponse -> TestTree+responseDescribeProject =+ res+ "DescribeProjectResponse"+ "fixture/DescribeProjectResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeProject)++responseDisassociateDeviceFromPlacement :: DisassociateDeviceFromPlacementResponse -> TestTree+responseDisassociateDeviceFromPlacement =+ res+ "DisassociateDeviceFromPlacementResponse"+ "fixture/DisassociateDeviceFromPlacementResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DisassociateDeviceFromPlacement)++responseGetDevicesInPlacement :: GetDevicesInPlacementResponse -> TestTree+responseGetDevicesInPlacement =+ res+ "GetDevicesInPlacementResponse"+ "fixture/GetDevicesInPlacementResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetDevicesInPlacement)++responseListPlacements :: ListPlacementsResponse -> TestTree+responseListPlacements =+ res+ "ListPlacementsResponse"+ "fixture/ListPlacementsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListPlacements)++responseListProjects :: ListProjectsResponse -> TestTree+responseListProjects =+ res+ "ListProjectsResponse"+ "fixture/ListProjectsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListProjects)++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)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource =+ res+ "UntagResourceResponse"+ "fixture/UntagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UntagResource)++responseUpdatePlacement :: UpdatePlacementResponse -> TestTree+responseUpdatePlacement =+ res+ "UpdatePlacementResponse"+ "fixture/UpdatePlacementResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdatePlacement)++responseUpdateProject :: UpdateProjectResponse -> TestTree+responseUpdateProject =+ res+ "UpdateProjectResponse"+ "fixture/UpdateProjectResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateProject)
+ test/Test/Amazonka/IoT1ClickProjects.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.IoT1ClickProjects+-- 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.IoT1ClickProjects+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/IoT1ClickProjects/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.IoT1ClickProjects.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.IoT1ClickProjects.Internal where