packages feed

amazonka-iotevents-data (empty) → 2.0

raw patch · 89 files changed

+8581/−0 lines, 89 filesdep +amazonka-coredep +amazonka-iotevents-datadep +amazonka-test

Dependencies added: amazonka-core, amazonka-iotevents-data, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers

Files

+ 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 Events Data SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2018-10-23@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-iotevents-data)+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.IoTEventsData](http://hackage.haskell.org/package/amazonka-iotevents-data/docs/Amazonka-IoTEventsData.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-iotevents-data` 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-iotevents-data.cabal view
@@ -0,0 +1,136 @@+cabal-version:      2.2+name:               amazonka-iotevents-data+version:            2.0+synopsis:           Amazon IoT Events Data 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-10-23@ 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.IoTEventsData.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.IoTEventsData" 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-iotevents-data++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.IoTEventsData+    Amazonka.IoTEventsData.BatchAcknowledgeAlarm+    Amazonka.IoTEventsData.BatchDeleteDetector+    Amazonka.IoTEventsData.BatchDisableAlarm+    Amazonka.IoTEventsData.BatchEnableAlarm+    Amazonka.IoTEventsData.BatchPutMessage+    Amazonka.IoTEventsData.BatchResetAlarm+    Amazonka.IoTEventsData.BatchSnoozeAlarm+    Amazonka.IoTEventsData.BatchUpdateDetector+    Amazonka.IoTEventsData.DescribeAlarm+    Amazonka.IoTEventsData.DescribeDetector+    Amazonka.IoTEventsData.Lens+    Amazonka.IoTEventsData.ListAlarms+    Amazonka.IoTEventsData.ListDetectors+    Amazonka.IoTEventsData.Types+    Amazonka.IoTEventsData.Types.AcknowledgeActionConfiguration+    Amazonka.IoTEventsData.Types.AcknowledgeAlarmActionRequest+    Amazonka.IoTEventsData.Types.Alarm+    Amazonka.IoTEventsData.Types.AlarmState+    Amazonka.IoTEventsData.Types.AlarmStateName+    Amazonka.IoTEventsData.Types.AlarmSummary+    Amazonka.IoTEventsData.Types.BatchAlarmActionErrorEntry+    Amazonka.IoTEventsData.Types.BatchDeleteDetectorErrorEntry+    Amazonka.IoTEventsData.Types.BatchPutMessageErrorEntry+    Amazonka.IoTEventsData.Types.BatchUpdateDetectorErrorEntry+    Amazonka.IoTEventsData.Types.ComparisonOperator+    Amazonka.IoTEventsData.Types.CustomerAction+    Amazonka.IoTEventsData.Types.CustomerActionName+    Amazonka.IoTEventsData.Types.DeleteDetectorRequest+    Amazonka.IoTEventsData.Types.Detector+    Amazonka.IoTEventsData.Types.DetectorState+    Amazonka.IoTEventsData.Types.DetectorStateDefinition+    Amazonka.IoTEventsData.Types.DetectorStateSummary+    Amazonka.IoTEventsData.Types.DetectorSummary+    Amazonka.IoTEventsData.Types.DisableActionConfiguration+    Amazonka.IoTEventsData.Types.DisableAlarmActionRequest+    Amazonka.IoTEventsData.Types.EnableActionConfiguration+    Amazonka.IoTEventsData.Types.EnableAlarmActionRequest+    Amazonka.IoTEventsData.Types.ErrorCode+    Amazonka.IoTEventsData.Types.EventType+    Amazonka.IoTEventsData.Types.Message+    Amazonka.IoTEventsData.Types.ResetActionConfiguration+    Amazonka.IoTEventsData.Types.ResetAlarmActionRequest+    Amazonka.IoTEventsData.Types.RuleEvaluation+    Amazonka.IoTEventsData.Types.SimpleRuleEvaluation+    Amazonka.IoTEventsData.Types.SnoozeActionConfiguration+    Amazonka.IoTEventsData.Types.SnoozeAlarmActionRequest+    Amazonka.IoTEventsData.Types.StateChangeConfiguration+    Amazonka.IoTEventsData.Types.SystemEvent+    Amazonka.IoTEventsData.Types.Timer+    Amazonka.IoTEventsData.Types.TimerDefinition+    Amazonka.IoTEventsData.Types.TimestampValue+    Amazonka.IoTEventsData.Types.TriggerType+    Amazonka.IoTEventsData.Types.UpdateDetectorRequest+    Amazonka.IoTEventsData.Types.Variable+    Amazonka.IoTEventsData.Types.VariableDefinition+    Amazonka.IoTEventsData.Waiters++  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5++test-suite amazonka-iotevents-data-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.IoTEventsData+    Test.Amazonka.IoTEventsData+    Test.Amazonka.IoTEventsData.Internal++  build-depends:+    , amazonka-core            >=2.0 && <2.1+    , amazonka-iotevents-data+    , amazonka-test            >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
+ fixture/BatchAcknowledgeAlarm.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/BatchAcknowledgeAlarmResponse.proto view
+ fixture/BatchDeleteDetector.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/BatchDeleteDetectorResponse.proto view
+ fixture/BatchDisableAlarm.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/BatchDisableAlarmResponse.proto view
+ fixture/BatchEnableAlarm.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/BatchEnableAlarmResponse.proto view
+ fixture/BatchPutMessage.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/BatchPutMessageResponse.proto view
+ fixture/BatchResetAlarm.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/BatchResetAlarmResponse.proto view
+ fixture/BatchSnoozeAlarm.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/BatchSnoozeAlarmResponse.proto view
+ fixture/BatchUpdateDetector.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/BatchUpdateDetectorResponse.proto view
+ fixture/DescribeAlarm.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/DescribeAlarmResponse.proto view
+ fixture/DescribeDetector.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/DescribeDetectorResponse.proto view
+ fixture/ListAlarms.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/ListAlarmsResponse.proto view
+ fixture/ListDetectors.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/data.iotevents/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  data.iotevents.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/ListDetectorsResponse.proto view
+ gen/Amazonka/IoTEventsData.hs view
@@ -0,0 +1,325 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.IoTEventsData+-- 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-10-23@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- IoT Events monitors your equipment or device fleets for failures or+-- changes in operation, and triggers actions when such events occur. You+-- can use IoT Events Data API commands to send inputs to detectors, list+-- detectors, and view or update a detector\'s status.+--+-- For more information, see+-- <https://docs.aws.amazon.com/iotevents/latest/developerguide/what-is-iotevents.html What is IoT Events?>+-- in the /IoT Events Developer Guide/.+module Amazonka.IoTEventsData+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** InternalFailureException+    _InternalFailureException,++    -- ** InvalidRequestException+    _InvalidRequestException,++    -- ** ResourceNotFoundException+    _ResourceNotFoundException,++    -- ** ServiceUnavailableException+    _ServiceUnavailableException,++    -- ** ThrottlingException+    _ThrottlingException,++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** BatchAcknowledgeAlarm+    BatchAcknowledgeAlarm (BatchAcknowledgeAlarm'),+    newBatchAcknowledgeAlarm,+    BatchAcknowledgeAlarmResponse (BatchAcknowledgeAlarmResponse'),+    newBatchAcknowledgeAlarmResponse,++    -- ** BatchDeleteDetector+    BatchDeleteDetector (BatchDeleteDetector'),+    newBatchDeleteDetector,+    BatchDeleteDetectorResponse (BatchDeleteDetectorResponse'),+    newBatchDeleteDetectorResponse,++    -- ** BatchDisableAlarm+    BatchDisableAlarm (BatchDisableAlarm'),+    newBatchDisableAlarm,+    BatchDisableAlarmResponse (BatchDisableAlarmResponse'),+    newBatchDisableAlarmResponse,++    -- ** BatchEnableAlarm+    BatchEnableAlarm (BatchEnableAlarm'),+    newBatchEnableAlarm,+    BatchEnableAlarmResponse (BatchEnableAlarmResponse'),+    newBatchEnableAlarmResponse,++    -- ** BatchPutMessage+    BatchPutMessage (BatchPutMessage'),+    newBatchPutMessage,+    BatchPutMessageResponse (BatchPutMessageResponse'),+    newBatchPutMessageResponse,++    -- ** BatchResetAlarm+    BatchResetAlarm (BatchResetAlarm'),+    newBatchResetAlarm,+    BatchResetAlarmResponse (BatchResetAlarmResponse'),+    newBatchResetAlarmResponse,++    -- ** BatchSnoozeAlarm+    BatchSnoozeAlarm (BatchSnoozeAlarm'),+    newBatchSnoozeAlarm,+    BatchSnoozeAlarmResponse (BatchSnoozeAlarmResponse'),+    newBatchSnoozeAlarmResponse,++    -- ** BatchUpdateDetector+    BatchUpdateDetector (BatchUpdateDetector'),+    newBatchUpdateDetector,+    BatchUpdateDetectorResponse (BatchUpdateDetectorResponse'),+    newBatchUpdateDetectorResponse,++    -- ** DescribeAlarm+    DescribeAlarm (DescribeAlarm'),+    newDescribeAlarm,+    DescribeAlarmResponse (DescribeAlarmResponse'),+    newDescribeAlarmResponse,++    -- ** DescribeDetector+    DescribeDetector (DescribeDetector'),+    newDescribeDetector,+    DescribeDetectorResponse (DescribeDetectorResponse'),+    newDescribeDetectorResponse,++    -- ** ListAlarms+    ListAlarms (ListAlarms'),+    newListAlarms,+    ListAlarmsResponse (ListAlarmsResponse'),+    newListAlarmsResponse,++    -- ** ListDetectors+    ListDetectors (ListDetectors'),+    newListDetectors,+    ListDetectorsResponse (ListDetectorsResponse'),+    newListDetectorsResponse,++    -- * Types++    -- ** AlarmStateName+    AlarmStateName (..),++    -- ** ComparisonOperator+    ComparisonOperator (..),++    -- ** CustomerActionName+    CustomerActionName (..),++    -- ** ErrorCode+    ErrorCode (..),++    -- ** EventType+    EventType (..),++    -- ** TriggerType+    TriggerType (..),++    -- ** AcknowledgeActionConfiguration+    AcknowledgeActionConfiguration (AcknowledgeActionConfiguration'),+    newAcknowledgeActionConfiguration,++    -- ** AcknowledgeAlarmActionRequest+    AcknowledgeAlarmActionRequest (AcknowledgeAlarmActionRequest'),+    newAcknowledgeAlarmActionRequest,++    -- ** Alarm+    Alarm (Alarm'),+    newAlarm,++    -- ** AlarmState+    AlarmState (AlarmState'),+    newAlarmState,++    -- ** AlarmSummary+    AlarmSummary (AlarmSummary'),+    newAlarmSummary,++    -- ** BatchAlarmActionErrorEntry+    BatchAlarmActionErrorEntry (BatchAlarmActionErrorEntry'),+    newBatchAlarmActionErrorEntry,++    -- ** BatchDeleteDetectorErrorEntry+    BatchDeleteDetectorErrorEntry (BatchDeleteDetectorErrorEntry'),+    newBatchDeleteDetectorErrorEntry,++    -- ** BatchPutMessageErrorEntry+    BatchPutMessageErrorEntry (BatchPutMessageErrorEntry'),+    newBatchPutMessageErrorEntry,++    -- ** BatchUpdateDetectorErrorEntry+    BatchUpdateDetectorErrorEntry (BatchUpdateDetectorErrorEntry'),+    newBatchUpdateDetectorErrorEntry,++    -- ** CustomerAction+    CustomerAction (CustomerAction'),+    newCustomerAction,++    -- ** DeleteDetectorRequest+    DeleteDetectorRequest (DeleteDetectorRequest'),+    newDeleteDetectorRequest,++    -- ** Detector+    Detector (Detector'),+    newDetector,++    -- ** DetectorState+    DetectorState (DetectorState'),+    newDetectorState,++    -- ** DetectorStateDefinition+    DetectorStateDefinition (DetectorStateDefinition'),+    newDetectorStateDefinition,++    -- ** DetectorStateSummary+    DetectorStateSummary (DetectorStateSummary'),+    newDetectorStateSummary,++    -- ** DetectorSummary+    DetectorSummary (DetectorSummary'),+    newDetectorSummary,++    -- ** DisableActionConfiguration+    DisableActionConfiguration (DisableActionConfiguration'),+    newDisableActionConfiguration,++    -- ** DisableAlarmActionRequest+    DisableAlarmActionRequest (DisableAlarmActionRequest'),+    newDisableAlarmActionRequest,++    -- ** EnableActionConfiguration+    EnableActionConfiguration (EnableActionConfiguration'),+    newEnableActionConfiguration,++    -- ** EnableAlarmActionRequest+    EnableAlarmActionRequest (EnableAlarmActionRequest'),+    newEnableAlarmActionRequest,++    -- ** Message+    Message (Message'),+    newMessage,++    -- ** ResetActionConfiguration+    ResetActionConfiguration (ResetActionConfiguration'),+    newResetActionConfiguration,++    -- ** ResetAlarmActionRequest+    ResetAlarmActionRequest (ResetAlarmActionRequest'),+    newResetAlarmActionRequest,++    -- ** RuleEvaluation+    RuleEvaluation (RuleEvaluation'),+    newRuleEvaluation,++    -- ** SimpleRuleEvaluation+    SimpleRuleEvaluation (SimpleRuleEvaluation'),+    newSimpleRuleEvaluation,++    -- ** SnoozeActionConfiguration+    SnoozeActionConfiguration (SnoozeActionConfiguration'),+    newSnoozeActionConfiguration,++    -- ** SnoozeAlarmActionRequest+    SnoozeAlarmActionRequest (SnoozeAlarmActionRequest'),+    newSnoozeAlarmActionRequest,++    -- ** StateChangeConfiguration+    StateChangeConfiguration (StateChangeConfiguration'),+    newStateChangeConfiguration,++    -- ** SystemEvent+    SystemEvent (SystemEvent'),+    newSystemEvent,++    -- ** Timer+    Timer (Timer'),+    newTimer,++    -- ** TimerDefinition+    TimerDefinition (TimerDefinition'),+    newTimerDefinition,++    -- ** TimestampValue+    TimestampValue (TimestampValue'),+    newTimestampValue,++    -- ** UpdateDetectorRequest+    UpdateDetectorRequest (UpdateDetectorRequest'),+    newUpdateDetectorRequest,++    -- ** Variable+    Variable (Variable'),+    newVariable,++    -- ** VariableDefinition+    VariableDefinition (VariableDefinition'),+    newVariableDefinition,+  )+where++import Amazonka.IoTEventsData.BatchAcknowledgeAlarm+import Amazonka.IoTEventsData.BatchDeleteDetector+import Amazonka.IoTEventsData.BatchDisableAlarm+import Amazonka.IoTEventsData.BatchEnableAlarm+import Amazonka.IoTEventsData.BatchPutMessage+import Amazonka.IoTEventsData.BatchResetAlarm+import Amazonka.IoTEventsData.BatchSnoozeAlarm+import Amazonka.IoTEventsData.BatchUpdateDetector+import Amazonka.IoTEventsData.DescribeAlarm+import Amazonka.IoTEventsData.DescribeDetector+import Amazonka.IoTEventsData.Lens+import Amazonka.IoTEventsData.ListAlarms+import Amazonka.IoTEventsData.ListDetectors+import Amazonka.IoTEventsData.Types+import Amazonka.IoTEventsData.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 'IoTEventsData'.++-- $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/IoTEventsData/BatchAcknowledgeAlarm.hs view
@@ -0,0 +1,175 @@+{-# 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.IoTEventsData.BatchAcknowledgeAlarm+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Acknowledges one or more alarms. The alarms change to the @ACKNOWLEDGED@+-- state after you acknowledge them.+module Amazonka.IoTEventsData.BatchAcknowledgeAlarm+  ( -- * Creating a Request+    BatchAcknowledgeAlarm (..),+    newBatchAcknowledgeAlarm,++    -- * Request Lenses+    batchAcknowledgeAlarm_acknowledgeActionRequests,++    -- * Destructuring the Response+    BatchAcknowledgeAlarmResponse (..),+    newBatchAcknowledgeAlarmResponse,++    -- * Response Lenses+    batchAcknowledgeAlarmResponse_errorEntries,+    batchAcknowledgeAlarmResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchAcknowledgeAlarm' smart constructor.+data BatchAcknowledgeAlarm = BatchAcknowledgeAlarm'+  { -- | The list of acknowledge action requests. You can specify up to 10+    -- requests per operation.+    acknowledgeActionRequests :: Prelude.NonEmpty AcknowledgeAlarmActionRequest+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchAcknowledgeAlarm' 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:+--+-- 'acknowledgeActionRequests', 'batchAcknowledgeAlarm_acknowledgeActionRequests' - The list of acknowledge action requests. You can specify up to 10+-- requests per operation.+newBatchAcknowledgeAlarm ::+  -- | 'acknowledgeActionRequests'+  Prelude.NonEmpty AcknowledgeAlarmActionRequest ->+  BatchAcknowledgeAlarm+newBatchAcknowledgeAlarm pAcknowledgeActionRequests_ =+  BatchAcknowledgeAlarm'+    { acknowledgeActionRequests =+        Lens.coerced Lens.# pAcknowledgeActionRequests_+    }++-- | The list of acknowledge action requests. You can specify up to 10+-- requests per operation.+batchAcknowledgeAlarm_acknowledgeActionRequests :: Lens.Lens' BatchAcknowledgeAlarm (Prelude.NonEmpty AcknowledgeAlarmActionRequest)+batchAcknowledgeAlarm_acknowledgeActionRequests = Lens.lens (\BatchAcknowledgeAlarm' {acknowledgeActionRequests} -> acknowledgeActionRequests) (\s@BatchAcknowledgeAlarm' {} a -> s {acknowledgeActionRequests = a} :: BatchAcknowledgeAlarm) Prelude.. Lens.coerced++instance Core.AWSRequest BatchAcknowledgeAlarm where+  type+    AWSResponse BatchAcknowledgeAlarm =+      BatchAcknowledgeAlarmResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          BatchAcknowledgeAlarmResponse'+            Prelude.<$> (x Data..?> "errorEntries" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable BatchAcknowledgeAlarm where+  hashWithSalt _salt BatchAcknowledgeAlarm' {..} =+    _salt+      `Prelude.hashWithSalt` acknowledgeActionRequests++instance Prelude.NFData BatchAcknowledgeAlarm where+  rnf BatchAcknowledgeAlarm' {..} =+    Prelude.rnf acknowledgeActionRequests++instance Data.ToHeaders BatchAcknowledgeAlarm where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToJSON BatchAcknowledgeAlarm where+  toJSON BatchAcknowledgeAlarm' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ( "acknowledgeActionRequests"+                  Data..= acknowledgeActionRequests+              )+          ]+      )++instance Data.ToPath BatchAcknowledgeAlarm where+  toPath = Prelude.const "/alarms/acknowledge"++instance Data.ToQuery BatchAcknowledgeAlarm where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchAcknowledgeAlarmResponse' smart constructor.+data BatchAcknowledgeAlarmResponse = BatchAcknowledgeAlarmResponse'+  { -- | A list of errors associated with the request, or @null@ if there are no+    -- errors. Each error entry contains an entry ID that helps you identify+    -- the entry that failed.+    errorEntries :: Prelude.Maybe [BatchAlarmActionErrorEntry],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchAcknowledgeAlarmResponse' 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:+--+-- 'errorEntries', 'batchAcknowledgeAlarmResponse_errorEntries' - A list of errors associated with the request, or @null@ if there are no+-- errors. Each error entry contains an entry ID that helps you identify+-- the entry that failed.+--+-- 'httpStatus', 'batchAcknowledgeAlarmResponse_httpStatus' - The response's http status code.+newBatchAcknowledgeAlarmResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  BatchAcknowledgeAlarmResponse+newBatchAcknowledgeAlarmResponse pHttpStatus_ =+  BatchAcknowledgeAlarmResponse'+    { errorEntries =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A list of errors associated with the request, or @null@ if there are no+-- errors. Each error entry contains an entry ID that helps you identify+-- the entry that failed.+batchAcknowledgeAlarmResponse_errorEntries :: Lens.Lens' BatchAcknowledgeAlarmResponse (Prelude.Maybe [BatchAlarmActionErrorEntry])+batchAcknowledgeAlarmResponse_errorEntries = Lens.lens (\BatchAcknowledgeAlarmResponse' {errorEntries} -> errorEntries) (\s@BatchAcknowledgeAlarmResponse' {} a -> s {errorEntries = a} :: BatchAcknowledgeAlarmResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchAcknowledgeAlarmResponse_httpStatus :: Lens.Lens' BatchAcknowledgeAlarmResponse Prelude.Int+batchAcknowledgeAlarmResponse_httpStatus = Lens.lens (\BatchAcknowledgeAlarmResponse' {httpStatus} -> httpStatus) (\s@BatchAcknowledgeAlarmResponse' {} a -> s {httpStatus = a} :: BatchAcknowledgeAlarmResponse)++instance Prelude.NFData BatchAcknowledgeAlarmResponse where+  rnf BatchAcknowledgeAlarmResponse' {..} =+    Prelude.rnf errorEntries+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/BatchDeleteDetector.hs view
@@ -0,0 +1,173 @@+{-# 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.IoTEventsData.BatchDeleteDetector+-- 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 one or more detectors that were created. When a detector is+-- deleted, its state will be cleared and the detector will be removed from+-- the list of detectors. The deleted detector will no longer appear if+-- referenced in the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_ListDetectors.html ListDetectors>+-- API call.+module Amazonka.IoTEventsData.BatchDeleteDetector+  ( -- * Creating a Request+    BatchDeleteDetector (..),+    newBatchDeleteDetector,++    -- * Request Lenses+    batchDeleteDetector_detectors,++    -- * Destructuring the Response+    BatchDeleteDetectorResponse (..),+    newBatchDeleteDetectorResponse,++    -- * Response Lenses+    batchDeleteDetectorResponse_batchDeleteDetectorErrorEntries,+    batchDeleteDetectorResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchDeleteDetector' smart constructor.+data BatchDeleteDetector = BatchDeleteDetector'+  { -- | The list of one or more detectors to be deleted.+    detectors :: Prelude.NonEmpty DeleteDetectorRequest+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchDeleteDetector' 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:+--+-- 'detectors', 'batchDeleteDetector_detectors' - The list of one or more detectors to be deleted.+newBatchDeleteDetector ::+  -- | 'detectors'+  Prelude.NonEmpty DeleteDetectorRequest ->+  BatchDeleteDetector+newBatchDeleteDetector pDetectors_ =+  BatchDeleteDetector'+    { detectors =+        Lens.coerced Lens.# pDetectors_+    }++-- | The list of one or more detectors to be deleted.+batchDeleteDetector_detectors :: Lens.Lens' BatchDeleteDetector (Prelude.NonEmpty DeleteDetectorRequest)+batchDeleteDetector_detectors = Lens.lens (\BatchDeleteDetector' {detectors} -> detectors) (\s@BatchDeleteDetector' {} a -> s {detectors = a} :: BatchDeleteDetector) Prelude.. Lens.coerced++instance Core.AWSRequest BatchDeleteDetector where+  type+    AWSResponse BatchDeleteDetector =+      BatchDeleteDetectorResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          BatchDeleteDetectorResponse'+            Prelude.<$> ( x+                            Data..?> "batchDeleteDetectorErrorEntries"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable BatchDeleteDetector where+  hashWithSalt _salt BatchDeleteDetector' {..} =+    _salt `Prelude.hashWithSalt` detectors++instance Prelude.NFData BatchDeleteDetector where+  rnf BatchDeleteDetector' {..} = Prelude.rnf detectors++instance Data.ToHeaders BatchDeleteDetector where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToJSON BatchDeleteDetector where+  toJSON BatchDeleteDetector' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("detectors" Data..= detectors)]+      )++instance Data.ToPath BatchDeleteDetector where+  toPath = Prelude.const "/detectors/delete"++instance Data.ToQuery BatchDeleteDetector where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchDeleteDetectorResponse' smart constructor.+data BatchDeleteDetectorResponse = BatchDeleteDetectorResponse'+  { -- | A list of errors associated with the request, or an empty array (@[]@)+    -- if there are no errors. Each error entry contains a @messageId@ that+    -- helps you identify the entry that failed.+    batchDeleteDetectorErrorEntries :: Prelude.Maybe [BatchDeleteDetectorErrorEntry],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchDeleteDetectorResponse' 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:+--+-- 'batchDeleteDetectorErrorEntries', 'batchDeleteDetectorResponse_batchDeleteDetectorErrorEntries' - A list of errors associated with the request, or an empty array (@[]@)+-- if there are no errors. Each error entry contains a @messageId@ that+-- helps you identify the entry that failed.+--+-- 'httpStatus', 'batchDeleteDetectorResponse_httpStatus' - The response's http status code.+newBatchDeleteDetectorResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  BatchDeleteDetectorResponse+newBatchDeleteDetectorResponse pHttpStatus_ =+  BatchDeleteDetectorResponse'+    { batchDeleteDetectorErrorEntries =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A list of errors associated with the request, or an empty array (@[]@)+-- if there are no errors. Each error entry contains a @messageId@ that+-- helps you identify the entry that failed.+batchDeleteDetectorResponse_batchDeleteDetectorErrorEntries :: Lens.Lens' BatchDeleteDetectorResponse (Prelude.Maybe [BatchDeleteDetectorErrorEntry])+batchDeleteDetectorResponse_batchDeleteDetectorErrorEntries = Lens.lens (\BatchDeleteDetectorResponse' {batchDeleteDetectorErrorEntries} -> batchDeleteDetectorErrorEntries) (\s@BatchDeleteDetectorResponse' {} a -> s {batchDeleteDetectorErrorEntries = a} :: BatchDeleteDetectorResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchDeleteDetectorResponse_httpStatus :: Lens.Lens' BatchDeleteDetectorResponse Prelude.Int+batchDeleteDetectorResponse_httpStatus = Lens.lens (\BatchDeleteDetectorResponse' {httpStatus} -> httpStatus) (\s@BatchDeleteDetectorResponse' {} a -> s {httpStatus = a} :: BatchDeleteDetectorResponse)++instance Prelude.NFData BatchDeleteDetectorResponse where+  rnf BatchDeleteDetectorResponse' {..} =+    Prelude.rnf batchDeleteDetectorErrorEntries+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/BatchDisableAlarm.hs view
@@ -0,0 +1,174 @@+{-# 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.IoTEventsData.BatchDisableAlarm+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Disables one or more alarms. The alarms change to the @DISABLED@ state+-- after you disable them.+module Amazonka.IoTEventsData.BatchDisableAlarm+  ( -- * Creating a Request+    BatchDisableAlarm (..),+    newBatchDisableAlarm,++    -- * Request Lenses+    batchDisableAlarm_disableActionRequests,++    -- * Destructuring the Response+    BatchDisableAlarmResponse (..),+    newBatchDisableAlarmResponse,++    -- * Response Lenses+    batchDisableAlarmResponse_errorEntries,+    batchDisableAlarmResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchDisableAlarm' smart constructor.+data BatchDisableAlarm = BatchDisableAlarm'+  { -- | The list of disable action requests. You can specify up to 10 requests+    -- per operation.+    disableActionRequests :: Prelude.NonEmpty DisableAlarmActionRequest+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchDisableAlarm' 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:+--+-- 'disableActionRequests', 'batchDisableAlarm_disableActionRequests' - The list of disable action requests. You can specify up to 10 requests+-- per operation.+newBatchDisableAlarm ::+  -- | 'disableActionRequests'+  Prelude.NonEmpty DisableAlarmActionRequest ->+  BatchDisableAlarm+newBatchDisableAlarm pDisableActionRequests_ =+  BatchDisableAlarm'+    { disableActionRequests =+        Lens.coerced Lens.# pDisableActionRequests_+    }++-- | The list of disable action requests. You can specify up to 10 requests+-- per operation.+batchDisableAlarm_disableActionRequests :: Lens.Lens' BatchDisableAlarm (Prelude.NonEmpty DisableAlarmActionRequest)+batchDisableAlarm_disableActionRequests = Lens.lens (\BatchDisableAlarm' {disableActionRequests} -> disableActionRequests) (\s@BatchDisableAlarm' {} a -> s {disableActionRequests = a} :: BatchDisableAlarm) Prelude.. Lens.coerced++instance Core.AWSRequest BatchDisableAlarm where+  type+    AWSResponse BatchDisableAlarm =+      BatchDisableAlarmResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          BatchDisableAlarmResponse'+            Prelude.<$> (x Data..?> "errorEntries" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable BatchDisableAlarm where+  hashWithSalt _salt BatchDisableAlarm' {..} =+    _salt `Prelude.hashWithSalt` disableActionRequests++instance Prelude.NFData BatchDisableAlarm where+  rnf BatchDisableAlarm' {..} =+    Prelude.rnf disableActionRequests++instance Data.ToHeaders BatchDisableAlarm where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToJSON BatchDisableAlarm where+  toJSON BatchDisableAlarm' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ( "disableActionRequests"+                  Data..= disableActionRequests+              )+          ]+      )++instance Data.ToPath BatchDisableAlarm where+  toPath = Prelude.const "/alarms/disable"++instance Data.ToQuery BatchDisableAlarm where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchDisableAlarmResponse' smart constructor.+data BatchDisableAlarmResponse = BatchDisableAlarmResponse'+  { -- | A list of errors associated with the request, or @null@ if there are no+    -- errors. Each error entry contains an entry ID that helps you identify+    -- the entry that failed.+    errorEntries :: Prelude.Maybe [BatchAlarmActionErrorEntry],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchDisableAlarmResponse' 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:+--+-- 'errorEntries', 'batchDisableAlarmResponse_errorEntries' - A list of errors associated with the request, or @null@ if there are no+-- errors. Each error entry contains an entry ID that helps you identify+-- the entry that failed.+--+-- 'httpStatus', 'batchDisableAlarmResponse_httpStatus' - The response's http status code.+newBatchDisableAlarmResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  BatchDisableAlarmResponse+newBatchDisableAlarmResponse pHttpStatus_ =+  BatchDisableAlarmResponse'+    { errorEntries =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A list of errors associated with the request, or @null@ if there are no+-- errors. Each error entry contains an entry ID that helps you identify+-- the entry that failed.+batchDisableAlarmResponse_errorEntries :: Lens.Lens' BatchDisableAlarmResponse (Prelude.Maybe [BatchAlarmActionErrorEntry])+batchDisableAlarmResponse_errorEntries = Lens.lens (\BatchDisableAlarmResponse' {errorEntries} -> errorEntries) (\s@BatchDisableAlarmResponse' {} a -> s {errorEntries = a} :: BatchDisableAlarmResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchDisableAlarmResponse_httpStatus :: Lens.Lens' BatchDisableAlarmResponse Prelude.Int+batchDisableAlarmResponse_httpStatus = Lens.lens (\BatchDisableAlarmResponse' {httpStatus} -> httpStatus) (\s@BatchDisableAlarmResponse' {} a -> s {httpStatus = a} :: BatchDisableAlarmResponse)++instance Prelude.NFData BatchDisableAlarmResponse where+  rnf BatchDisableAlarmResponse' {..} =+    Prelude.rnf errorEntries+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/BatchEnableAlarm.hs view
@@ -0,0 +1,174 @@+{-# 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.IoTEventsData.BatchEnableAlarm+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Enables one or more alarms. The alarms change to the @NORMAL@ state+-- after you enable them.+module Amazonka.IoTEventsData.BatchEnableAlarm+  ( -- * Creating a Request+    BatchEnableAlarm (..),+    newBatchEnableAlarm,++    -- * Request Lenses+    batchEnableAlarm_enableActionRequests,++    -- * Destructuring the Response+    BatchEnableAlarmResponse (..),+    newBatchEnableAlarmResponse,++    -- * Response Lenses+    batchEnableAlarmResponse_errorEntries,+    batchEnableAlarmResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchEnableAlarm' smart constructor.+data BatchEnableAlarm = BatchEnableAlarm'+  { -- | The list of enable action requests. You can specify up to 10 requests+    -- per operation.+    enableActionRequests :: Prelude.NonEmpty EnableAlarmActionRequest+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchEnableAlarm' 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:+--+-- 'enableActionRequests', 'batchEnableAlarm_enableActionRequests' - The list of enable action requests. You can specify up to 10 requests+-- per operation.+newBatchEnableAlarm ::+  -- | 'enableActionRequests'+  Prelude.NonEmpty EnableAlarmActionRequest ->+  BatchEnableAlarm+newBatchEnableAlarm pEnableActionRequests_ =+  BatchEnableAlarm'+    { enableActionRequests =+        Lens.coerced Lens.# pEnableActionRequests_+    }++-- | The list of enable action requests. You can specify up to 10 requests+-- per operation.+batchEnableAlarm_enableActionRequests :: Lens.Lens' BatchEnableAlarm (Prelude.NonEmpty EnableAlarmActionRequest)+batchEnableAlarm_enableActionRequests = Lens.lens (\BatchEnableAlarm' {enableActionRequests} -> enableActionRequests) (\s@BatchEnableAlarm' {} a -> s {enableActionRequests = a} :: BatchEnableAlarm) Prelude.. Lens.coerced++instance Core.AWSRequest BatchEnableAlarm where+  type+    AWSResponse BatchEnableAlarm =+      BatchEnableAlarmResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          BatchEnableAlarmResponse'+            Prelude.<$> (x Data..?> "errorEntries" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable BatchEnableAlarm where+  hashWithSalt _salt BatchEnableAlarm' {..} =+    _salt `Prelude.hashWithSalt` enableActionRequests++instance Prelude.NFData BatchEnableAlarm where+  rnf BatchEnableAlarm' {..} =+    Prelude.rnf enableActionRequests++instance Data.ToHeaders BatchEnableAlarm where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToJSON BatchEnableAlarm where+  toJSON BatchEnableAlarm' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ( "enableActionRequests"+                  Data..= enableActionRequests+              )+          ]+      )++instance Data.ToPath BatchEnableAlarm where+  toPath = Prelude.const "/alarms/enable"++instance Data.ToQuery BatchEnableAlarm where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchEnableAlarmResponse' smart constructor.+data BatchEnableAlarmResponse = BatchEnableAlarmResponse'+  { -- | A list of errors associated with the request, or @null@ if there are no+    -- errors. Each error entry contains an entry ID that helps you identify+    -- the entry that failed.+    errorEntries :: Prelude.Maybe [BatchAlarmActionErrorEntry],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchEnableAlarmResponse' 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:+--+-- 'errorEntries', 'batchEnableAlarmResponse_errorEntries' - A list of errors associated with the request, or @null@ if there are no+-- errors. Each error entry contains an entry ID that helps you identify+-- the entry that failed.+--+-- 'httpStatus', 'batchEnableAlarmResponse_httpStatus' - The response's http status code.+newBatchEnableAlarmResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  BatchEnableAlarmResponse+newBatchEnableAlarmResponse pHttpStatus_ =+  BatchEnableAlarmResponse'+    { errorEntries =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A list of errors associated with the request, or @null@ if there are no+-- errors. Each error entry contains an entry ID that helps you identify+-- the entry that failed.+batchEnableAlarmResponse_errorEntries :: Lens.Lens' BatchEnableAlarmResponse (Prelude.Maybe [BatchAlarmActionErrorEntry])+batchEnableAlarmResponse_errorEntries = Lens.lens (\BatchEnableAlarmResponse' {errorEntries} -> errorEntries) (\s@BatchEnableAlarmResponse' {} a -> s {errorEntries = a} :: BatchEnableAlarmResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchEnableAlarmResponse_httpStatus :: Lens.Lens' BatchEnableAlarmResponse Prelude.Int+batchEnableAlarmResponse_httpStatus = Lens.lens (\BatchEnableAlarmResponse' {httpStatus} -> httpStatus) (\s@BatchEnableAlarmResponse' {} a -> s {httpStatus = a} :: BatchEnableAlarmResponse)++instance Prelude.NFData BatchEnableAlarmResponse where+  rnf BatchEnableAlarmResponse' {..} =+    Prelude.rnf errorEntries+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/BatchPutMessage.hs view
@@ -0,0 +1,170 @@+{-# 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.IoTEventsData.BatchPutMessage+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sends a set of messages to the IoT Events system. Each message payload+-- is transformed into the input you specify (@\"inputName\"@) and ingested+-- into any detectors that monitor that input. If multiple messages are+-- sent, the order in which the messages are processed isn\'t guaranteed.+-- To guarantee ordering, you must send messages one at a time and wait for+-- a successful response.+module Amazonka.IoTEventsData.BatchPutMessage+  ( -- * Creating a Request+    BatchPutMessage (..),+    newBatchPutMessage,++    -- * Request Lenses+    batchPutMessage_messages,++    -- * Destructuring the Response+    BatchPutMessageResponse (..),+    newBatchPutMessageResponse,++    -- * Response Lenses+    batchPutMessageResponse_batchPutMessageErrorEntries,+    batchPutMessageResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchPutMessage' smart constructor.+data BatchPutMessage = BatchPutMessage'+  { -- | The list of messages to send. Each message has the following format:+    -- @\'{ \"messageId\": \"string\", \"inputName\": \"string\", \"payload\": \"string\"}\'@+    messages :: Prelude.NonEmpty Message+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchPutMessage' 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:+--+-- 'messages', 'batchPutMessage_messages' - The list of messages to send. Each message has the following format:+-- @\'{ \"messageId\": \"string\", \"inputName\": \"string\", \"payload\": \"string\"}\'@+newBatchPutMessage ::+  -- | 'messages'+  Prelude.NonEmpty Message ->+  BatchPutMessage+newBatchPutMessage pMessages_ =+  BatchPutMessage'+    { messages =+        Lens.coerced Lens.# pMessages_+    }++-- | The list of messages to send. Each message has the following format:+-- @\'{ \"messageId\": \"string\", \"inputName\": \"string\", \"payload\": \"string\"}\'@+batchPutMessage_messages :: Lens.Lens' BatchPutMessage (Prelude.NonEmpty Message)+batchPutMessage_messages = Lens.lens (\BatchPutMessage' {messages} -> messages) (\s@BatchPutMessage' {} a -> s {messages = a} :: BatchPutMessage) Prelude.. Lens.coerced++instance Core.AWSRequest BatchPutMessage where+  type+    AWSResponse BatchPutMessage =+      BatchPutMessageResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          BatchPutMessageResponse'+            Prelude.<$> ( x+                            Data..?> "BatchPutMessageErrorEntries"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable BatchPutMessage where+  hashWithSalt _salt BatchPutMessage' {..} =+    _salt `Prelude.hashWithSalt` messages++instance Prelude.NFData BatchPutMessage where+  rnf BatchPutMessage' {..} = Prelude.rnf messages++instance Data.ToHeaders BatchPutMessage where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToJSON BatchPutMessage where+  toJSON BatchPutMessage' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("messages" Data..= messages)]+      )++instance Data.ToPath BatchPutMessage where+  toPath = Prelude.const "/inputs/messages"++instance Data.ToQuery BatchPutMessage where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchPutMessageResponse' smart constructor.+data BatchPutMessageResponse = BatchPutMessageResponse'+  { -- | A list of any errors encountered when sending the messages.+    batchPutMessageErrorEntries :: Prelude.Maybe [BatchPutMessageErrorEntry],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchPutMessageResponse' 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:+--+-- 'batchPutMessageErrorEntries', 'batchPutMessageResponse_batchPutMessageErrorEntries' - A list of any errors encountered when sending the messages.+--+-- 'httpStatus', 'batchPutMessageResponse_httpStatus' - The response's http status code.+newBatchPutMessageResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  BatchPutMessageResponse+newBatchPutMessageResponse pHttpStatus_ =+  BatchPutMessageResponse'+    { batchPutMessageErrorEntries =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A list of any errors encountered when sending the messages.+batchPutMessageResponse_batchPutMessageErrorEntries :: Lens.Lens' BatchPutMessageResponse (Prelude.Maybe [BatchPutMessageErrorEntry])+batchPutMessageResponse_batchPutMessageErrorEntries = Lens.lens (\BatchPutMessageResponse' {batchPutMessageErrorEntries} -> batchPutMessageErrorEntries) (\s@BatchPutMessageResponse' {} a -> s {batchPutMessageErrorEntries = a} :: BatchPutMessageResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchPutMessageResponse_httpStatus :: Lens.Lens' BatchPutMessageResponse Prelude.Int+batchPutMessageResponse_httpStatus = Lens.lens (\BatchPutMessageResponse' {httpStatus} -> httpStatus) (\s@BatchPutMessageResponse' {} a -> s {httpStatus = a} :: BatchPutMessageResponse)++instance Prelude.NFData BatchPutMessageResponse where+  rnf BatchPutMessageResponse' {..} =+    Prelude.rnf batchPutMessageErrorEntries+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/BatchResetAlarm.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.IoTEventsData.BatchResetAlarm+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Resets one or more alarms. The alarms return to the @NORMAL@ state after+-- you reset them.+module Amazonka.IoTEventsData.BatchResetAlarm+  ( -- * Creating a Request+    BatchResetAlarm (..),+    newBatchResetAlarm,++    -- * Request Lenses+    batchResetAlarm_resetActionRequests,++    -- * Destructuring the Response+    BatchResetAlarmResponse (..),+    newBatchResetAlarmResponse,++    -- * Response Lenses+    batchResetAlarmResponse_errorEntries,+    batchResetAlarmResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchResetAlarm' smart constructor.+data BatchResetAlarm = BatchResetAlarm'+  { -- | The list of reset action requests. You can specify up to 10 requests per+    -- operation.+    resetActionRequests :: Prelude.NonEmpty ResetAlarmActionRequest+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchResetAlarm' 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:+--+-- 'resetActionRequests', 'batchResetAlarm_resetActionRequests' - The list of reset action requests. You can specify up to 10 requests per+-- operation.+newBatchResetAlarm ::+  -- | 'resetActionRequests'+  Prelude.NonEmpty ResetAlarmActionRequest ->+  BatchResetAlarm+newBatchResetAlarm pResetActionRequests_ =+  BatchResetAlarm'+    { resetActionRequests =+        Lens.coerced Lens.# pResetActionRequests_+    }++-- | The list of reset action requests. You can specify up to 10 requests per+-- operation.+batchResetAlarm_resetActionRequests :: Lens.Lens' BatchResetAlarm (Prelude.NonEmpty ResetAlarmActionRequest)+batchResetAlarm_resetActionRequests = Lens.lens (\BatchResetAlarm' {resetActionRequests} -> resetActionRequests) (\s@BatchResetAlarm' {} a -> s {resetActionRequests = a} :: BatchResetAlarm) Prelude.. Lens.coerced++instance Core.AWSRequest BatchResetAlarm where+  type+    AWSResponse BatchResetAlarm =+      BatchResetAlarmResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          BatchResetAlarmResponse'+            Prelude.<$> (x Data..?> "errorEntries" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable BatchResetAlarm where+  hashWithSalt _salt BatchResetAlarm' {..} =+    _salt `Prelude.hashWithSalt` resetActionRequests++instance Prelude.NFData BatchResetAlarm where+  rnf BatchResetAlarm' {..} =+    Prelude.rnf resetActionRequests++instance Data.ToHeaders BatchResetAlarm where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToJSON BatchResetAlarm where+  toJSON BatchResetAlarm' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ("resetActionRequests" Data..= resetActionRequests)+          ]+      )++instance Data.ToPath BatchResetAlarm where+  toPath = Prelude.const "/alarms/reset"++instance Data.ToQuery BatchResetAlarm where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchResetAlarmResponse' smart constructor.+data BatchResetAlarmResponse = BatchResetAlarmResponse'+  { -- | A list of errors associated with the request, or @null@ if there are no+    -- errors. Each error entry contains an entry ID that helps you identify+    -- the entry that failed.+    errorEntries :: Prelude.Maybe [BatchAlarmActionErrorEntry],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchResetAlarmResponse' 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:+--+-- 'errorEntries', 'batchResetAlarmResponse_errorEntries' - A list of errors associated with the request, or @null@ if there are no+-- errors. Each error entry contains an entry ID that helps you identify+-- the entry that failed.+--+-- 'httpStatus', 'batchResetAlarmResponse_httpStatus' - The response's http status code.+newBatchResetAlarmResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  BatchResetAlarmResponse+newBatchResetAlarmResponse pHttpStatus_ =+  BatchResetAlarmResponse'+    { errorEntries =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A list of errors associated with the request, or @null@ if there are no+-- errors. Each error entry contains an entry ID that helps you identify+-- the entry that failed.+batchResetAlarmResponse_errorEntries :: Lens.Lens' BatchResetAlarmResponse (Prelude.Maybe [BatchAlarmActionErrorEntry])+batchResetAlarmResponse_errorEntries = Lens.lens (\BatchResetAlarmResponse' {errorEntries} -> errorEntries) (\s@BatchResetAlarmResponse' {} a -> s {errorEntries = a} :: BatchResetAlarmResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchResetAlarmResponse_httpStatus :: Lens.Lens' BatchResetAlarmResponse Prelude.Int+batchResetAlarmResponse_httpStatus = Lens.lens (\BatchResetAlarmResponse' {httpStatus} -> httpStatus) (\s@BatchResetAlarmResponse' {} a -> s {httpStatus = a} :: BatchResetAlarmResponse)++instance Prelude.NFData BatchResetAlarmResponse where+  rnf BatchResetAlarmResponse' {..} =+    Prelude.rnf errorEntries+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/BatchSnoozeAlarm.hs view
@@ -0,0 +1,174 @@+{-# 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.IoTEventsData.BatchSnoozeAlarm+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Changes one or more alarms to the snooze mode. The alarms change to the+-- @SNOOZE_DISABLED@ state after you set them to the snooze mode.+module Amazonka.IoTEventsData.BatchSnoozeAlarm+  ( -- * Creating a Request+    BatchSnoozeAlarm (..),+    newBatchSnoozeAlarm,++    -- * Request Lenses+    batchSnoozeAlarm_snoozeActionRequests,++    -- * Destructuring the Response+    BatchSnoozeAlarmResponse (..),+    newBatchSnoozeAlarmResponse,++    -- * Response Lenses+    batchSnoozeAlarmResponse_errorEntries,+    batchSnoozeAlarmResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchSnoozeAlarm' smart constructor.+data BatchSnoozeAlarm = BatchSnoozeAlarm'+  { -- | The list of snooze action requests. You can specify up to 10 requests+    -- per operation.+    snoozeActionRequests :: Prelude.NonEmpty SnoozeAlarmActionRequest+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchSnoozeAlarm' 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:+--+-- 'snoozeActionRequests', 'batchSnoozeAlarm_snoozeActionRequests' - The list of snooze action requests. You can specify up to 10 requests+-- per operation.+newBatchSnoozeAlarm ::+  -- | 'snoozeActionRequests'+  Prelude.NonEmpty SnoozeAlarmActionRequest ->+  BatchSnoozeAlarm+newBatchSnoozeAlarm pSnoozeActionRequests_ =+  BatchSnoozeAlarm'+    { snoozeActionRequests =+        Lens.coerced Lens.# pSnoozeActionRequests_+    }++-- | The list of snooze action requests. You can specify up to 10 requests+-- per operation.+batchSnoozeAlarm_snoozeActionRequests :: Lens.Lens' BatchSnoozeAlarm (Prelude.NonEmpty SnoozeAlarmActionRequest)+batchSnoozeAlarm_snoozeActionRequests = Lens.lens (\BatchSnoozeAlarm' {snoozeActionRequests} -> snoozeActionRequests) (\s@BatchSnoozeAlarm' {} a -> s {snoozeActionRequests = a} :: BatchSnoozeAlarm) Prelude.. Lens.coerced++instance Core.AWSRequest BatchSnoozeAlarm where+  type+    AWSResponse BatchSnoozeAlarm =+      BatchSnoozeAlarmResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          BatchSnoozeAlarmResponse'+            Prelude.<$> (x Data..?> "errorEntries" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable BatchSnoozeAlarm where+  hashWithSalt _salt BatchSnoozeAlarm' {..} =+    _salt `Prelude.hashWithSalt` snoozeActionRequests++instance Prelude.NFData BatchSnoozeAlarm where+  rnf BatchSnoozeAlarm' {..} =+    Prelude.rnf snoozeActionRequests++instance Data.ToHeaders BatchSnoozeAlarm where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToJSON BatchSnoozeAlarm where+  toJSON BatchSnoozeAlarm' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ( "snoozeActionRequests"+                  Data..= snoozeActionRequests+              )+          ]+      )++instance Data.ToPath BatchSnoozeAlarm where+  toPath = Prelude.const "/alarms/snooze"++instance Data.ToQuery BatchSnoozeAlarm where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchSnoozeAlarmResponse' smart constructor.+data BatchSnoozeAlarmResponse = BatchSnoozeAlarmResponse'+  { -- | A list of errors associated with the request, or @null@ if there are no+    -- errors. Each error entry contains an entry ID that helps you identify+    -- the entry that failed.+    errorEntries :: Prelude.Maybe [BatchAlarmActionErrorEntry],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchSnoozeAlarmResponse' 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:+--+-- 'errorEntries', 'batchSnoozeAlarmResponse_errorEntries' - A list of errors associated with the request, or @null@ if there are no+-- errors. Each error entry contains an entry ID that helps you identify+-- the entry that failed.+--+-- 'httpStatus', 'batchSnoozeAlarmResponse_httpStatus' - The response's http status code.+newBatchSnoozeAlarmResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  BatchSnoozeAlarmResponse+newBatchSnoozeAlarmResponse pHttpStatus_ =+  BatchSnoozeAlarmResponse'+    { errorEntries =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A list of errors associated with the request, or @null@ if there are no+-- errors. Each error entry contains an entry ID that helps you identify+-- the entry that failed.+batchSnoozeAlarmResponse_errorEntries :: Lens.Lens' BatchSnoozeAlarmResponse (Prelude.Maybe [BatchAlarmActionErrorEntry])+batchSnoozeAlarmResponse_errorEntries = Lens.lens (\BatchSnoozeAlarmResponse' {errorEntries} -> errorEntries) (\s@BatchSnoozeAlarmResponse' {} a -> s {errorEntries = a} :: BatchSnoozeAlarmResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchSnoozeAlarmResponse_httpStatus :: Lens.Lens' BatchSnoozeAlarmResponse Prelude.Int+batchSnoozeAlarmResponse_httpStatus = Lens.lens (\BatchSnoozeAlarmResponse' {httpStatus} -> httpStatus) (\s@BatchSnoozeAlarmResponse' {} a -> s {httpStatus = a} :: BatchSnoozeAlarmResponse)++instance Prelude.NFData BatchSnoozeAlarmResponse where+  rnf BatchSnoozeAlarmResponse' {..} =+    Prelude.rnf errorEntries+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/BatchUpdateDetector.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.IoTEventsData.BatchUpdateDetector+-- 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 the state, variable values, and timer settings of one or more+-- detectors (instances) of a specified detector model.+module Amazonka.IoTEventsData.BatchUpdateDetector+  ( -- * Creating a Request+    BatchUpdateDetector (..),+    newBatchUpdateDetector,++    -- * Request Lenses+    batchUpdateDetector_detectors,++    -- * Destructuring the Response+    BatchUpdateDetectorResponse (..),+    newBatchUpdateDetectorResponse,++    -- * Response Lenses+    batchUpdateDetectorResponse_batchUpdateDetectorErrorEntries,+    batchUpdateDetectorResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchUpdateDetector' smart constructor.+data BatchUpdateDetector = BatchUpdateDetector'+  { -- | The list of detectors (instances) to update, along with the values to+    -- update.+    detectors :: Prelude.NonEmpty UpdateDetectorRequest+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchUpdateDetector' 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:+--+-- 'detectors', 'batchUpdateDetector_detectors' - The list of detectors (instances) to update, along with the values to+-- update.+newBatchUpdateDetector ::+  -- | 'detectors'+  Prelude.NonEmpty UpdateDetectorRequest ->+  BatchUpdateDetector+newBatchUpdateDetector pDetectors_ =+  BatchUpdateDetector'+    { detectors =+        Lens.coerced Lens.# pDetectors_+    }++-- | The list of detectors (instances) to update, along with the values to+-- update.+batchUpdateDetector_detectors :: Lens.Lens' BatchUpdateDetector (Prelude.NonEmpty UpdateDetectorRequest)+batchUpdateDetector_detectors = Lens.lens (\BatchUpdateDetector' {detectors} -> detectors) (\s@BatchUpdateDetector' {} a -> s {detectors = a} :: BatchUpdateDetector) Prelude.. Lens.coerced++instance Core.AWSRequest BatchUpdateDetector where+  type+    AWSResponse BatchUpdateDetector =+      BatchUpdateDetectorResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          BatchUpdateDetectorResponse'+            Prelude.<$> ( x+                            Data..?> "batchUpdateDetectorErrorEntries"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable BatchUpdateDetector where+  hashWithSalt _salt BatchUpdateDetector' {..} =+    _salt `Prelude.hashWithSalt` detectors++instance Prelude.NFData BatchUpdateDetector where+  rnf BatchUpdateDetector' {..} = Prelude.rnf detectors++instance Data.ToHeaders BatchUpdateDetector where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToJSON BatchUpdateDetector where+  toJSON BatchUpdateDetector' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("detectors" Data..= detectors)]+      )++instance Data.ToPath BatchUpdateDetector where+  toPath = Prelude.const "/detectors"++instance Data.ToQuery BatchUpdateDetector where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchUpdateDetectorResponse' smart constructor.+data BatchUpdateDetectorResponse = BatchUpdateDetectorResponse'+  { -- | A list of those detector updates that resulted in errors. (If an error+    -- is listed here, the specific update did not occur.)+    batchUpdateDetectorErrorEntries :: Prelude.Maybe [BatchUpdateDetectorErrorEntry],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchUpdateDetectorResponse' 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:+--+-- 'batchUpdateDetectorErrorEntries', 'batchUpdateDetectorResponse_batchUpdateDetectorErrorEntries' - A list of those detector updates that resulted in errors. (If an error+-- is listed here, the specific update did not occur.)+--+-- 'httpStatus', 'batchUpdateDetectorResponse_httpStatus' - The response's http status code.+newBatchUpdateDetectorResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  BatchUpdateDetectorResponse+newBatchUpdateDetectorResponse pHttpStatus_ =+  BatchUpdateDetectorResponse'+    { batchUpdateDetectorErrorEntries =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A list of those detector updates that resulted in errors. (If an error+-- is listed here, the specific update did not occur.)+batchUpdateDetectorResponse_batchUpdateDetectorErrorEntries :: Lens.Lens' BatchUpdateDetectorResponse (Prelude.Maybe [BatchUpdateDetectorErrorEntry])+batchUpdateDetectorResponse_batchUpdateDetectorErrorEntries = Lens.lens (\BatchUpdateDetectorResponse' {batchUpdateDetectorErrorEntries} -> batchUpdateDetectorErrorEntries) (\s@BatchUpdateDetectorResponse' {} a -> s {batchUpdateDetectorErrorEntries = a} :: BatchUpdateDetectorResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchUpdateDetectorResponse_httpStatus :: Lens.Lens' BatchUpdateDetectorResponse Prelude.Int+batchUpdateDetectorResponse_httpStatus = Lens.lens (\BatchUpdateDetectorResponse' {httpStatus} -> httpStatus) (\s@BatchUpdateDetectorResponse' {} a -> s {httpStatus = a} :: BatchUpdateDetectorResponse)++instance Prelude.NFData BatchUpdateDetectorResponse where+  rnf BatchUpdateDetectorResponse' {..} =+    Prelude.rnf batchUpdateDetectorErrorEntries+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/DescribeAlarm.hs view
@@ -0,0 +1,173 @@+{-# 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.IoTEventsData.DescribeAlarm+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves information about an alarm.+module Amazonka.IoTEventsData.DescribeAlarm+  ( -- * Creating a Request+    DescribeAlarm (..),+    newDescribeAlarm,++    -- * Request Lenses+    describeAlarm_keyValue,+    describeAlarm_alarmModelName,++    -- * Destructuring the Response+    DescribeAlarmResponse (..),+    newDescribeAlarmResponse,++    -- * Response Lenses+    describeAlarmResponse_alarm,+    describeAlarmResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeAlarm' smart constructor.+data DescribeAlarm = DescribeAlarm'+  { -- | The value of the key used as a filter to select only the alarms+    -- associated with the+    -- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The name of the alarm model.+    alarmModelName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeAlarm' 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:+--+-- 'keyValue', 'describeAlarm_keyValue' - The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+--+-- 'alarmModelName', 'describeAlarm_alarmModelName' - The name of the alarm model.+newDescribeAlarm ::+  -- | 'alarmModelName'+  Prelude.Text ->+  DescribeAlarm+newDescribeAlarm pAlarmModelName_ =+  DescribeAlarm'+    { keyValue = Prelude.Nothing,+      alarmModelName = pAlarmModelName_+    }++-- | The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+describeAlarm_keyValue :: Lens.Lens' DescribeAlarm (Prelude.Maybe Prelude.Text)+describeAlarm_keyValue = Lens.lens (\DescribeAlarm' {keyValue} -> keyValue) (\s@DescribeAlarm' {} a -> s {keyValue = a} :: DescribeAlarm)++-- | The name of the alarm model.+describeAlarm_alarmModelName :: Lens.Lens' DescribeAlarm Prelude.Text+describeAlarm_alarmModelName = Lens.lens (\DescribeAlarm' {alarmModelName} -> alarmModelName) (\s@DescribeAlarm' {} a -> s {alarmModelName = a} :: DescribeAlarm)++instance Core.AWSRequest DescribeAlarm where+  type+    AWSResponse DescribeAlarm =+      DescribeAlarmResponse+  request overrides =+    Request.get (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DescribeAlarmResponse'+            Prelude.<$> (x Data..?> "alarm")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DescribeAlarm where+  hashWithSalt _salt DescribeAlarm' {..} =+    _salt+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` alarmModelName++instance Prelude.NFData DescribeAlarm where+  rnf DescribeAlarm' {..} =+    Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf alarmModelName++instance Data.ToHeaders DescribeAlarm where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath DescribeAlarm where+  toPath DescribeAlarm' {..} =+    Prelude.mconcat+      ["/alarms/", Data.toBS alarmModelName, "/keyValues/"]++instance Data.ToQuery DescribeAlarm where+  toQuery DescribeAlarm' {..} =+    Prelude.mconcat ["keyValue" Data.=: keyValue]++-- | /See:/ 'newDescribeAlarmResponse' smart constructor.+data DescribeAlarmResponse = DescribeAlarmResponse'+  { -- | Contains information about an alarm.+    alarm :: Prelude.Maybe Alarm,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeAlarmResponse' 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:+--+-- 'alarm', 'describeAlarmResponse_alarm' - Contains information about an alarm.+--+-- 'httpStatus', 'describeAlarmResponse_httpStatus' - The response's http status code.+newDescribeAlarmResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DescribeAlarmResponse+newDescribeAlarmResponse pHttpStatus_ =+  DescribeAlarmResponse'+    { alarm = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Contains information about an alarm.+describeAlarmResponse_alarm :: Lens.Lens' DescribeAlarmResponse (Prelude.Maybe Alarm)+describeAlarmResponse_alarm = Lens.lens (\DescribeAlarmResponse' {alarm} -> alarm) (\s@DescribeAlarmResponse' {} a -> s {alarm = a} :: DescribeAlarmResponse)++-- | The response's http status code.+describeAlarmResponse_httpStatus :: Lens.Lens' DescribeAlarmResponse Prelude.Int+describeAlarmResponse_httpStatus = Lens.lens (\DescribeAlarmResponse' {httpStatus} -> httpStatus) (\s@DescribeAlarmResponse' {} a -> s {httpStatus = a} :: DescribeAlarmResponse)++instance Prelude.NFData DescribeAlarmResponse where+  rnf DescribeAlarmResponse' {..} =+    Prelude.rnf alarm+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/DescribeDetector.hs view
@@ -0,0 +1,177 @@+{-# 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.IoTEventsData.DescribeDetector+-- 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 information about the specified detector (instance).+module Amazonka.IoTEventsData.DescribeDetector+  ( -- * Creating a Request+    DescribeDetector (..),+    newDescribeDetector,++    -- * Request Lenses+    describeDetector_keyValue,+    describeDetector_detectorModelName,++    -- * Destructuring the Response+    DescribeDetectorResponse (..),+    newDescribeDetectorResponse,++    -- * Response Lenses+    describeDetectorResponse_detector,+    describeDetectorResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeDetector' smart constructor.+data DescribeDetector = DescribeDetector'+  { -- | A filter used to limit results to detectors (instances) created because+    -- of the given key ID.+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The name of the detector model whose detectors (instances) you want+    -- information about.+    detectorModelName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeDetector' 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:+--+-- 'keyValue', 'describeDetector_keyValue' - A filter used to limit results to detectors (instances) created because+-- of the given key ID.+--+-- 'detectorModelName', 'describeDetector_detectorModelName' - The name of the detector model whose detectors (instances) you want+-- information about.+newDescribeDetector ::+  -- | 'detectorModelName'+  Prelude.Text ->+  DescribeDetector+newDescribeDetector pDetectorModelName_ =+  DescribeDetector'+    { keyValue = Prelude.Nothing,+      detectorModelName = pDetectorModelName_+    }++-- | A filter used to limit results to detectors (instances) created because+-- of the given key ID.+describeDetector_keyValue :: Lens.Lens' DescribeDetector (Prelude.Maybe Prelude.Text)+describeDetector_keyValue = Lens.lens (\DescribeDetector' {keyValue} -> keyValue) (\s@DescribeDetector' {} a -> s {keyValue = a} :: DescribeDetector)++-- | The name of the detector model whose detectors (instances) you want+-- information about.+describeDetector_detectorModelName :: Lens.Lens' DescribeDetector Prelude.Text+describeDetector_detectorModelName = Lens.lens (\DescribeDetector' {detectorModelName} -> detectorModelName) (\s@DescribeDetector' {} a -> s {detectorModelName = a} :: DescribeDetector)++instance Core.AWSRequest DescribeDetector where+  type+    AWSResponse DescribeDetector =+      DescribeDetectorResponse+  request overrides =+    Request.get (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DescribeDetectorResponse'+            Prelude.<$> (x Data..?> "detector")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DescribeDetector where+  hashWithSalt _salt DescribeDetector' {..} =+    _salt+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` detectorModelName++instance Prelude.NFData DescribeDetector where+  rnf DescribeDetector' {..} =+    Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf detectorModelName++instance Data.ToHeaders DescribeDetector where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath DescribeDetector where+  toPath DescribeDetector' {..} =+    Prelude.mconcat+      [ "/detectors/",+        Data.toBS detectorModelName,+        "/keyValues/"+      ]++instance Data.ToQuery DescribeDetector where+  toQuery DescribeDetector' {..} =+    Prelude.mconcat ["keyValue" Data.=: keyValue]++-- | /See:/ 'newDescribeDetectorResponse' smart constructor.+data DescribeDetectorResponse = DescribeDetectorResponse'+  { -- | Information about the detector (instance).+    detector :: Prelude.Maybe Detector,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeDetectorResponse' 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:+--+-- 'detector', 'describeDetectorResponse_detector' - Information about the detector (instance).+--+-- 'httpStatus', 'describeDetectorResponse_httpStatus' - The response's http status code.+newDescribeDetectorResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DescribeDetectorResponse+newDescribeDetectorResponse pHttpStatus_ =+  DescribeDetectorResponse'+    { detector =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Information about the detector (instance).+describeDetectorResponse_detector :: Lens.Lens' DescribeDetectorResponse (Prelude.Maybe Detector)+describeDetectorResponse_detector = Lens.lens (\DescribeDetectorResponse' {detector} -> detector) (\s@DescribeDetectorResponse' {} a -> s {detector = a} :: DescribeDetectorResponse)++-- | The response's http status code.+describeDetectorResponse_httpStatus :: Lens.Lens' DescribeDetectorResponse Prelude.Int+describeDetectorResponse_httpStatus = Lens.lens (\DescribeDetectorResponse' {httpStatus} -> httpStatus) (\s@DescribeDetectorResponse' {} a -> s {httpStatus = a} :: DescribeDetectorResponse)++instance Prelude.NFData DescribeDetectorResponse where+  rnf DescribeDetectorResponse' {..} =+    Prelude.rnf detector+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/Lens.hs view
@@ -0,0 +1,314 @@+{-# 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.IoTEventsData.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.IoTEventsData.Lens+  ( -- * Operations++    -- ** BatchAcknowledgeAlarm+    batchAcknowledgeAlarm_acknowledgeActionRequests,+    batchAcknowledgeAlarmResponse_errorEntries,+    batchAcknowledgeAlarmResponse_httpStatus,++    -- ** BatchDeleteDetector+    batchDeleteDetector_detectors,+    batchDeleteDetectorResponse_batchDeleteDetectorErrorEntries,+    batchDeleteDetectorResponse_httpStatus,++    -- ** BatchDisableAlarm+    batchDisableAlarm_disableActionRequests,+    batchDisableAlarmResponse_errorEntries,+    batchDisableAlarmResponse_httpStatus,++    -- ** BatchEnableAlarm+    batchEnableAlarm_enableActionRequests,+    batchEnableAlarmResponse_errorEntries,+    batchEnableAlarmResponse_httpStatus,++    -- ** BatchPutMessage+    batchPutMessage_messages,+    batchPutMessageResponse_batchPutMessageErrorEntries,+    batchPutMessageResponse_httpStatus,++    -- ** BatchResetAlarm+    batchResetAlarm_resetActionRequests,+    batchResetAlarmResponse_errorEntries,+    batchResetAlarmResponse_httpStatus,++    -- ** BatchSnoozeAlarm+    batchSnoozeAlarm_snoozeActionRequests,+    batchSnoozeAlarmResponse_errorEntries,+    batchSnoozeAlarmResponse_httpStatus,++    -- ** BatchUpdateDetector+    batchUpdateDetector_detectors,+    batchUpdateDetectorResponse_batchUpdateDetectorErrorEntries,+    batchUpdateDetectorResponse_httpStatus,++    -- ** DescribeAlarm+    describeAlarm_keyValue,+    describeAlarm_alarmModelName,+    describeAlarmResponse_alarm,+    describeAlarmResponse_httpStatus,++    -- ** DescribeDetector+    describeDetector_keyValue,+    describeDetector_detectorModelName,+    describeDetectorResponse_detector,+    describeDetectorResponse_httpStatus,++    -- ** ListAlarms+    listAlarms_maxResults,+    listAlarms_nextToken,+    listAlarms_alarmModelName,+    listAlarmsResponse_alarmSummaries,+    listAlarmsResponse_nextToken,+    listAlarmsResponse_httpStatus,++    -- ** ListDetectors+    listDetectors_maxResults,+    listDetectors_nextToken,+    listDetectors_stateName,+    listDetectors_detectorModelName,+    listDetectorsResponse_detectorSummaries,+    listDetectorsResponse_nextToken,+    listDetectorsResponse_httpStatus,++    -- * Types++    -- ** AcknowledgeActionConfiguration+    acknowledgeActionConfiguration_note,++    -- ** AcknowledgeAlarmActionRequest+    acknowledgeAlarmActionRequest_keyValue,+    acknowledgeAlarmActionRequest_note,+    acknowledgeAlarmActionRequest_requestId,+    acknowledgeAlarmActionRequest_alarmModelName,++    -- ** Alarm+    alarm_alarmModelName,+    alarm_alarmModelVersion,+    alarm_alarmState,+    alarm_creationTime,+    alarm_keyValue,+    alarm_lastUpdateTime,+    alarm_severity,++    -- ** AlarmState+    alarmState_customerAction,+    alarmState_ruleEvaluation,+    alarmState_stateName,+    alarmState_systemEvent,++    -- ** AlarmSummary+    alarmSummary_alarmModelName,+    alarmSummary_alarmModelVersion,+    alarmSummary_creationTime,+    alarmSummary_keyValue,+    alarmSummary_lastUpdateTime,+    alarmSummary_stateName,++    -- ** BatchAlarmActionErrorEntry+    batchAlarmActionErrorEntry_errorCode,+    batchAlarmActionErrorEntry_errorMessage,+    batchAlarmActionErrorEntry_requestId,++    -- ** BatchDeleteDetectorErrorEntry+    batchDeleteDetectorErrorEntry_errorCode,+    batchDeleteDetectorErrorEntry_errorMessage,+    batchDeleteDetectorErrorEntry_messageId,++    -- ** BatchPutMessageErrorEntry+    batchPutMessageErrorEntry_errorCode,+    batchPutMessageErrorEntry_errorMessage,+    batchPutMessageErrorEntry_messageId,++    -- ** BatchUpdateDetectorErrorEntry+    batchUpdateDetectorErrorEntry_errorCode,+    batchUpdateDetectorErrorEntry_errorMessage,+    batchUpdateDetectorErrorEntry_messageId,++    -- ** CustomerAction+    customerAction_acknowledgeActionConfiguration,+    customerAction_actionName,+    customerAction_disableActionConfiguration,+    customerAction_enableActionConfiguration,+    customerAction_resetActionConfiguration,+    customerAction_snoozeActionConfiguration,++    -- ** DeleteDetectorRequest+    deleteDetectorRequest_keyValue,+    deleteDetectorRequest_messageId,+    deleteDetectorRequest_detectorModelName,++    -- ** Detector+    detector_creationTime,+    detector_detectorModelName,+    detector_detectorModelVersion,+    detector_keyValue,+    detector_lastUpdateTime,+    detector_state,++    -- ** DetectorState+    detectorState_stateName,+    detectorState_variables,+    detectorState_timers,++    -- ** DetectorStateDefinition+    detectorStateDefinition_stateName,+    detectorStateDefinition_variables,+    detectorStateDefinition_timers,++    -- ** DetectorStateSummary+    detectorStateSummary_stateName,++    -- ** DetectorSummary+    detectorSummary_creationTime,+    detectorSummary_detectorModelName,+    detectorSummary_detectorModelVersion,+    detectorSummary_keyValue,+    detectorSummary_lastUpdateTime,+    detectorSummary_state,++    -- ** DisableActionConfiguration+    disableActionConfiguration_note,++    -- ** DisableAlarmActionRequest+    disableAlarmActionRequest_keyValue,+    disableAlarmActionRequest_note,+    disableAlarmActionRequest_requestId,+    disableAlarmActionRequest_alarmModelName,++    -- ** EnableActionConfiguration+    enableActionConfiguration_note,++    -- ** EnableAlarmActionRequest+    enableAlarmActionRequest_keyValue,+    enableAlarmActionRequest_note,+    enableAlarmActionRequest_requestId,+    enableAlarmActionRequest_alarmModelName,++    -- ** Message+    message_timestamp,+    message_messageId,+    message_inputName,+    message_payload,++    -- ** ResetActionConfiguration+    resetActionConfiguration_note,++    -- ** ResetAlarmActionRequest+    resetAlarmActionRequest_keyValue,+    resetAlarmActionRequest_note,+    resetAlarmActionRequest_requestId,+    resetAlarmActionRequest_alarmModelName,++    -- ** RuleEvaluation+    ruleEvaluation_simpleRuleEvaluation,++    -- ** SimpleRuleEvaluation+    simpleRuleEvaluation_inputPropertyValue,+    simpleRuleEvaluation_operator,+    simpleRuleEvaluation_thresholdValue,++    -- ** SnoozeActionConfiguration+    snoozeActionConfiguration_note,+    snoozeActionConfiguration_snoozeDuration,++    -- ** SnoozeAlarmActionRequest+    snoozeAlarmActionRequest_keyValue,+    snoozeAlarmActionRequest_note,+    snoozeAlarmActionRequest_requestId,+    snoozeAlarmActionRequest_alarmModelName,+    snoozeAlarmActionRequest_snoozeDuration,++    -- ** StateChangeConfiguration+    stateChangeConfiguration_triggerType,++    -- ** SystemEvent+    systemEvent_eventType,+    systemEvent_stateChangeConfiguration,++    -- ** Timer+    timer_name,+    timer_timestamp,++    -- ** TimerDefinition+    timerDefinition_name,+    timerDefinition_seconds,++    -- ** TimestampValue+    timestampValue_timeInMillis,++    -- ** UpdateDetectorRequest+    updateDetectorRequest_keyValue,+    updateDetectorRequest_messageId,+    updateDetectorRequest_detectorModelName,+    updateDetectorRequest_state,++    -- ** Variable+    variable_name,+    variable_value,++    -- ** VariableDefinition+    variableDefinition_name,+    variableDefinition_value,+  )+where++import Amazonka.IoTEventsData.BatchAcknowledgeAlarm+import Amazonka.IoTEventsData.BatchDeleteDetector+import Amazonka.IoTEventsData.BatchDisableAlarm+import Amazonka.IoTEventsData.BatchEnableAlarm+import Amazonka.IoTEventsData.BatchPutMessage+import Amazonka.IoTEventsData.BatchResetAlarm+import Amazonka.IoTEventsData.BatchSnoozeAlarm+import Amazonka.IoTEventsData.BatchUpdateDetector+import Amazonka.IoTEventsData.DescribeAlarm+import Amazonka.IoTEventsData.DescribeDetector+import Amazonka.IoTEventsData.ListAlarms+import Amazonka.IoTEventsData.ListDetectors+import Amazonka.IoTEventsData.Types.AcknowledgeActionConfiguration+import Amazonka.IoTEventsData.Types.AcknowledgeAlarmActionRequest+import Amazonka.IoTEventsData.Types.Alarm+import Amazonka.IoTEventsData.Types.AlarmState+import Amazonka.IoTEventsData.Types.AlarmSummary+import Amazonka.IoTEventsData.Types.BatchAlarmActionErrorEntry+import Amazonka.IoTEventsData.Types.BatchDeleteDetectorErrorEntry+import Amazonka.IoTEventsData.Types.BatchPutMessageErrorEntry+import Amazonka.IoTEventsData.Types.BatchUpdateDetectorErrorEntry+import Amazonka.IoTEventsData.Types.CustomerAction+import Amazonka.IoTEventsData.Types.DeleteDetectorRequest+import Amazonka.IoTEventsData.Types.Detector+import Amazonka.IoTEventsData.Types.DetectorState+import Amazonka.IoTEventsData.Types.DetectorStateDefinition+import Amazonka.IoTEventsData.Types.DetectorStateSummary+import Amazonka.IoTEventsData.Types.DetectorSummary+import Amazonka.IoTEventsData.Types.DisableActionConfiguration+import Amazonka.IoTEventsData.Types.DisableAlarmActionRequest+import Amazonka.IoTEventsData.Types.EnableActionConfiguration+import Amazonka.IoTEventsData.Types.EnableAlarmActionRequest+import Amazonka.IoTEventsData.Types.Message+import Amazonka.IoTEventsData.Types.ResetActionConfiguration+import Amazonka.IoTEventsData.Types.ResetAlarmActionRequest+import Amazonka.IoTEventsData.Types.RuleEvaluation+import Amazonka.IoTEventsData.Types.SimpleRuleEvaluation+import Amazonka.IoTEventsData.Types.SnoozeActionConfiguration+import Amazonka.IoTEventsData.Types.SnoozeAlarmActionRequest+import Amazonka.IoTEventsData.Types.StateChangeConfiguration+import Amazonka.IoTEventsData.Types.SystemEvent+import Amazonka.IoTEventsData.Types.Timer+import Amazonka.IoTEventsData.Types.TimerDefinition+import Amazonka.IoTEventsData.Types.TimestampValue+import Amazonka.IoTEventsData.Types.UpdateDetectorRequest+import Amazonka.IoTEventsData.Types.Variable+import Amazonka.IoTEventsData.Types.VariableDefinition
+ gen/Amazonka/IoTEventsData/ListAlarms.hs view
@@ -0,0 +1,197 @@+{-# 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.IoTEventsData.ListAlarms+-- 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 one or more alarms. The operation returns only the metadata+-- associated with each alarm.+module Amazonka.IoTEventsData.ListAlarms+  ( -- * Creating a Request+    ListAlarms (..),+    newListAlarms,++    -- * Request Lenses+    listAlarms_maxResults,+    listAlarms_nextToken,+    listAlarms_alarmModelName,++    -- * Destructuring the Response+    ListAlarmsResponse (..),+    newListAlarmsResponse,++    -- * Response Lenses+    listAlarmsResponse_alarmSummaries,+    listAlarmsResponse_nextToken,+    listAlarmsResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListAlarms' smart constructor.+data ListAlarms = ListAlarms'+  { -- | The maximum number of results to be returned per request.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token that you can use to return the next set of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The name of the alarm model.+    alarmModelName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListAlarms' 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', 'listAlarms_maxResults' - The maximum number of results to be returned per request.+--+-- 'nextToken', 'listAlarms_nextToken' - The token that you can use to return the next set of results.+--+-- 'alarmModelName', 'listAlarms_alarmModelName' - The name of the alarm model.+newListAlarms ::+  -- | 'alarmModelName'+  Prelude.Text ->+  ListAlarms+newListAlarms pAlarmModelName_ =+  ListAlarms'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      alarmModelName = pAlarmModelName_+    }++-- | The maximum number of results to be returned per request.+listAlarms_maxResults :: Lens.Lens' ListAlarms (Prelude.Maybe Prelude.Natural)+listAlarms_maxResults = Lens.lens (\ListAlarms' {maxResults} -> maxResults) (\s@ListAlarms' {} a -> s {maxResults = a} :: ListAlarms)++-- | The token that you can use to return the next set of results.+listAlarms_nextToken :: Lens.Lens' ListAlarms (Prelude.Maybe Prelude.Text)+listAlarms_nextToken = Lens.lens (\ListAlarms' {nextToken} -> nextToken) (\s@ListAlarms' {} a -> s {nextToken = a} :: ListAlarms)++-- | The name of the alarm model.+listAlarms_alarmModelName :: Lens.Lens' ListAlarms Prelude.Text+listAlarms_alarmModelName = Lens.lens (\ListAlarms' {alarmModelName} -> alarmModelName) (\s@ListAlarms' {} a -> s {alarmModelName = a} :: ListAlarms)++instance Core.AWSRequest ListAlarms where+  type AWSResponse ListAlarms = ListAlarmsResponse+  request overrides =+    Request.get (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListAlarmsResponse'+            Prelude.<$> (x Data..?> "alarmSummaries" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "nextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListAlarms where+  hashWithSalt _salt ListAlarms' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` alarmModelName++instance Prelude.NFData ListAlarms where+  rnf ListAlarms' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf alarmModelName++instance Data.ToHeaders ListAlarms where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath ListAlarms where+  toPath ListAlarms' {..} =+    Prelude.mconcat+      ["/alarms/", Data.toBS alarmModelName]++instance Data.ToQuery ListAlarms where+  toQuery ListAlarms' {..} =+    Prelude.mconcat+      [ "maxResults" Data.=: maxResults,+        "nextToken" Data.=: nextToken+      ]++-- | /See:/ 'newListAlarmsResponse' smart constructor.+data ListAlarmsResponse = ListAlarmsResponse'+  { -- | A list that summarizes each alarm.+    alarmSummaries :: Prelude.Maybe [AlarmSummary],+    -- | The token that you can use to return the next set of results, or @null@+    -- if there are no more results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListAlarmsResponse' 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:+--+-- 'alarmSummaries', 'listAlarmsResponse_alarmSummaries' - A list that summarizes each alarm.+--+-- 'nextToken', 'listAlarmsResponse_nextToken' - The token that you can use to return the next set of results, or @null@+-- if there are no more results.+--+-- 'httpStatus', 'listAlarmsResponse_httpStatus' - The response's http status code.+newListAlarmsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListAlarmsResponse+newListAlarmsResponse pHttpStatus_ =+  ListAlarmsResponse'+    { alarmSummaries =+        Prelude.Nothing,+      nextToken = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A list that summarizes each alarm.+listAlarmsResponse_alarmSummaries :: Lens.Lens' ListAlarmsResponse (Prelude.Maybe [AlarmSummary])+listAlarmsResponse_alarmSummaries = Lens.lens (\ListAlarmsResponse' {alarmSummaries} -> alarmSummaries) (\s@ListAlarmsResponse' {} a -> s {alarmSummaries = a} :: ListAlarmsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token that you can use to return the next set of results, or @null@+-- if there are no more results.+listAlarmsResponse_nextToken :: Lens.Lens' ListAlarmsResponse (Prelude.Maybe Prelude.Text)+listAlarmsResponse_nextToken = Lens.lens (\ListAlarmsResponse' {nextToken} -> nextToken) (\s@ListAlarmsResponse' {} a -> s {nextToken = a} :: ListAlarmsResponse)++-- | The response's http status code.+listAlarmsResponse_httpStatus :: Lens.Lens' ListAlarmsResponse Prelude.Int+listAlarmsResponse_httpStatus = Lens.lens (\ListAlarmsResponse' {httpStatus} -> httpStatus) (\s@ListAlarmsResponse' {} a -> s {httpStatus = a} :: ListAlarmsResponse)++instance Prelude.NFData ListAlarmsResponse where+  rnf ListAlarmsResponse' {..} =+    Prelude.rnf alarmSummaries+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/ListDetectors.hs view
@@ -0,0 +1,217 @@+{-# 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.IoTEventsData.ListDetectors+-- 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 detectors (the instances of a detector model).+module Amazonka.IoTEventsData.ListDetectors+  ( -- * Creating a Request+    ListDetectors (..),+    newListDetectors,++    -- * Request Lenses+    listDetectors_maxResults,+    listDetectors_nextToken,+    listDetectors_stateName,+    listDetectors_detectorModelName,++    -- * Destructuring the Response+    ListDetectorsResponse (..),+    newListDetectorsResponse,++    -- * Response Lenses+    listDetectorsResponse_detectorSummaries,+    listDetectorsResponse_nextToken,+    listDetectorsResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListDetectors' smart constructor.+data ListDetectors = ListDetectors'+  { -- | The maximum number of results to be returned per request.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token that you can use to return the next set of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | A filter that limits results to those detectors (instances) in the given+    -- state.+    stateName :: Prelude.Maybe Prelude.Text,+    -- | The name of the detector model whose detectors (instances) are listed.+    detectorModelName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListDetectors' 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', 'listDetectors_maxResults' - The maximum number of results to be returned per request.+--+-- 'nextToken', 'listDetectors_nextToken' - The token that you can use to return the next set of results.+--+-- 'stateName', 'listDetectors_stateName' - A filter that limits results to those detectors (instances) in the given+-- state.+--+-- 'detectorModelName', 'listDetectors_detectorModelName' - The name of the detector model whose detectors (instances) are listed.+newListDetectors ::+  -- | 'detectorModelName'+  Prelude.Text ->+  ListDetectors+newListDetectors pDetectorModelName_ =+  ListDetectors'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      stateName = Prelude.Nothing,+      detectorModelName = pDetectorModelName_+    }++-- | The maximum number of results to be returned per request.+listDetectors_maxResults :: Lens.Lens' ListDetectors (Prelude.Maybe Prelude.Natural)+listDetectors_maxResults = Lens.lens (\ListDetectors' {maxResults} -> maxResults) (\s@ListDetectors' {} a -> s {maxResults = a} :: ListDetectors)++-- | The token that you can use to return the next set of results.+listDetectors_nextToken :: Lens.Lens' ListDetectors (Prelude.Maybe Prelude.Text)+listDetectors_nextToken = Lens.lens (\ListDetectors' {nextToken} -> nextToken) (\s@ListDetectors' {} a -> s {nextToken = a} :: ListDetectors)++-- | A filter that limits results to those detectors (instances) in the given+-- state.+listDetectors_stateName :: Lens.Lens' ListDetectors (Prelude.Maybe Prelude.Text)+listDetectors_stateName = Lens.lens (\ListDetectors' {stateName} -> stateName) (\s@ListDetectors' {} a -> s {stateName = a} :: ListDetectors)++-- | The name of the detector model whose detectors (instances) are listed.+listDetectors_detectorModelName :: Lens.Lens' ListDetectors Prelude.Text+listDetectors_detectorModelName = Lens.lens (\ListDetectors' {detectorModelName} -> detectorModelName) (\s@ListDetectors' {} a -> s {detectorModelName = a} :: ListDetectors)++instance Core.AWSRequest ListDetectors where+  type+    AWSResponse ListDetectors =+      ListDetectorsResponse+  request overrides =+    Request.get (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListDetectorsResponse'+            Prelude.<$> ( x+                            Data..?> "detectorSummaries"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (x Data..?> "nextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListDetectors where+  hashWithSalt _salt ListDetectors' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` stateName+      `Prelude.hashWithSalt` detectorModelName++instance Prelude.NFData ListDetectors where+  rnf ListDetectors' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf stateName+      `Prelude.seq` Prelude.rnf detectorModelName++instance Data.ToHeaders ListDetectors where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath ListDetectors where+  toPath ListDetectors' {..} =+    Prelude.mconcat+      ["/detectors/", Data.toBS detectorModelName]++instance Data.ToQuery ListDetectors where+  toQuery ListDetectors' {..} =+    Prelude.mconcat+      [ "maxResults" Data.=: maxResults,+        "nextToken" Data.=: nextToken,+        "stateName" Data.=: stateName+      ]++-- | /See:/ 'newListDetectorsResponse' smart constructor.+data ListDetectorsResponse = ListDetectorsResponse'+  { -- | A list of summary information about the detectors (instances).+    detectorSummaries :: Prelude.Maybe [DetectorSummary],+    -- | The token that you can use to return the next set of results, or @null@+    -- if there are no more results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListDetectorsResponse' 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:+--+-- 'detectorSummaries', 'listDetectorsResponse_detectorSummaries' - A list of summary information about the detectors (instances).+--+-- 'nextToken', 'listDetectorsResponse_nextToken' - The token that you can use to return the next set of results, or @null@+-- if there are no more results.+--+-- 'httpStatus', 'listDetectorsResponse_httpStatus' - The response's http status code.+newListDetectorsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListDetectorsResponse+newListDetectorsResponse pHttpStatus_ =+  ListDetectorsResponse'+    { detectorSummaries =+        Prelude.Nothing,+      nextToken = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A list of summary information about the detectors (instances).+listDetectorsResponse_detectorSummaries :: Lens.Lens' ListDetectorsResponse (Prelude.Maybe [DetectorSummary])+listDetectorsResponse_detectorSummaries = Lens.lens (\ListDetectorsResponse' {detectorSummaries} -> detectorSummaries) (\s@ListDetectorsResponse' {} a -> s {detectorSummaries = a} :: ListDetectorsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token that you can use to return the next set of results, or @null@+-- if there are no more results.+listDetectorsResponse_nextToken :: Lens.Lens' ListDetectorsResponse (Prelude.Maybe Prelude.Text)+listDetectorsResponse_nextToken = Lens.lens (\ListDetectorsResponse' {nextToken} -> nextToken) (\s@ListDetectorsResponse' {} a -> s {nextToken = a} :: ListDetectorsResponse)++-- | The response's http status code.+listDetectorsResponse_httpStatus :: Lens.Lens' ListDetectorsResponse Prelude.Int+listDetectorsResponse_httpStatus = Lens.lens (\ListDetectorsResponse' {httpStatus} -> httpStatus) (\s@ListDetectorsResponse' {} a -> s {httpStatus = a} :: ListDetectorsResponse)++instance Prelude.NFData ListDetectorsResponse where+  rnf ListDetectorsResponse' {..} =+    Prelude.rnf detectorSummaries+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IoTEventsData/Types.hs view
@@ -0,0 +1,449 @@+{-# 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.IoTEventsData.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.IoTEventsData.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _InternalFailureException,+    _InvalidRequestException,+    _ResourceNotFoundException,+    _ServiceUnavailableException,+    _ThrottlingException,++    -- * AlarmStateName+    AlarmStateName (..),++    -- * ComparisonOperator+    ComparisonOperator (..),++    -- * CustomerActionName+    CustomerActionName (..),++    -- * ErrorCode+    ErrorCode (..),++    -- * EventType+    EventType (..),++    -- * TriggerType+    TriggerType (..),++    -- * AcknowledgeActionConfiguration+    AcknowledgeActionConfiguration (..),+    newAcknowledgeActionConfiguration,+    acknowledgeActionConfiguration_note,++    -- * AcknowledgeAlarmActionRequest+    AcknowledgeAlarmActionRequest (..),+    newAcknowledgeAlarmActionRequest,+    acknowledgeAlarmActionRequest_keyValue,+    acknowledgeAlarmActionRequest_note,+    acknowledgeAlarmActionRequest_requestId,+    acknowledgeAlarmActionRequest_alarmModelName,++    -- * Alarm+    Alarm (..),+    newAlarm,+    alarm_alarmModelName,+    alarm_alarmModelVersion,+    alarm_alarmState,+    alarm_creationTime,+    alarm_keyValue,+    alarm_lastUpdateTime,+    alarm_severity,++    -- * AlarmState+    AlarmState (..),+    newAlarmState,+    alarmState_customerAction,+    alarmState_ruleEvaluation,+    alarmState_stateName,+    alarmState_systemEvent,++    -- * AlarmSummary+    AlarmSummary (..),+    newAlarmSummary,+    alarmSummary_alarmModelName,+    alarmSummary_alarmModelVersion,+    alarmSummary_creationTime,+    alarmSummary_keyValue,+    alarmSummary_lastUpdateTime,+    alarmSummary_stateName,++    -- * BatchAlarmActionErrorEntry+    BatchAlarmActionErrorEntry (..),+    newBatchAlarmActionErrorEntry,+    batchAlarmActionErrorEntry_errorCode,+    batchAlarmActionErrorEntry_errorMessage,+    batchAlarmActionErrorEntry_requestId,++    -- * BatchDeleteDetectorErrorEntry+    BatchDeleteDetectorErrorEntry (..),+    newBatchDeleteDetectorErrorEntry,+    batchDeleteDetectorErrorEntry_errorCode,+    batchDeleteDetectorErrorEntry_errorMessage,+    batchDeleteDetectorErrorEntry_messageId,++    -- * BatchPutMessageErrorEntry+    BatchPutMessageErrorEntry (..),+    newBatchPutMessageErrorEntry,+    batchPutMessageErrorEntry_errorCode,+    batchPutMessageErrorEntry_errorMessage,+    batchPutMessageErrorEntry_messageId,++    -- * BatchUpdateDetectorErrorEntry+    BatchUpdateDetectorErrorEntry (..),+    newBatchUpdateDetectorErrorEntry,+    batchUpdateDetectorErrorEntry_errorCode,+    batchUpdateDetectorErrorEntry_errorMessage,+    batchUpdateDetectorErrorEntry_messageId,++    -- * CustomerAction+    CustomerAction (..),+    newCustomerAction,+    customerAction_acknowledgeActionConfiguration,+    customerAction_actionName,+    customerAction_disableActionConfiguration,+    customerAction_enableActionConfiguration,+    customerAction_resetActionConfiguration,+    customerAction_snoozeActionConfiguration,++    -- * DeleteDetectorRequest+    DeleteDetectorRequest (..),+    newDeleteDetectorRequest,+    deleteDetectorRequest_keyValue,+    deleteDetectorRequest_messageId,+    deleteDetectorRequest_detectorModelName,++    -- * Detector+    Detector (..),+    newDetector,+    detector_creationTime,+    detector_detectorModelName,+    detector_detectorModelVersion,+    detector_keyValue,+    detector_lastUpdateTime,+    detector_state,++    -- * DetectorState+    DetectorState (..),+    newDetectorState,+    detectorState_stateName,+    detectorState_variables,+    detectorState_timers,++    -- * DetectorStateDefinition+    DetectorStateDefinition (..),+    newDetectorStateDefinition,+    detectorStateDefinition_stateName,+    detectorStateDefinition_variables,+    detectorStateDefinition_timers,++    -- * DetectorStateSummary+    DetectorStateSummary (..),+    newDetectorStateSummary,+    detectorStateSummary_stateName,++    -- * DetectorSummary+    DetectorSummary (..),+    newDetectorSummary,+    detectorSummary_creationTime,+    detectorSummary_detectorModelName,+    detectorSummary_detectorModelVersion,+    detectorSummary_keyValue,+    detectorSummary_lastUpdateTime,+    detectorSummary_state,++    -- * DisableActionConfiguration+    DisableActionConfiguration (..),+    newDisableActionConfiguration,+    disableActionConfiguration_note,++    -- * DisableAlarmActionRequest+    DisableAlarmActionRequest (..),+    newDisableAlarmActionRequest,+    disableAlarmActionRequest_keyValue,+    disableAlarmActionRequest_note,+    disableAlarmActionRequest_requestId,+    disableAlarmActionRequest_alarmModelName,++    -- * EnableActionConfiguration+    EnableActionConfiguration (..),+    newEnableActionConfiguration,+    enableActionConfiguration_note,++    -- * EnableAlarmActionRequest+    EnableAlarmActionRequest (..),+    newEnableAlarmActionRequest,+    enableAlarmActionRequest_keyValue,+    enableAlarmActionRequest_note,+    enableAlarmActionRequest_requestId,+    enableAlarmActionRequest_alarmModelName,++    -- * Message+    Message (..),+    newMessage,+    message_timestamp,+    message_messageId,+    message_inputName,+    message_payload,++    -- * ResetActionConfiguration+    ResetActionConfiguration (..),+    newResetActionConfiguration,+    resetActionConfiguration_note,++    -- * ResetAlarmActionRequest+    ResetAlarmActionRequest (..),+    newResetAlarmActionRequest,+    resetAlarmActionRequest_keyValue,+    resetAlarmActionRequest_note,+    resetAlarmActionRequest_requestId,+    resetAlarmActionRequest_alarmModelName,++    -- * RuleEvaluation+    RuleEvaluation (..),+    newRuleEvaluation,+    ruleEvaluation_simpleRuleEvaluation,++    -- * SimpleRuleEvaluation+    SimpleRuleEvaluation (..),+    newSimpleRuleEvaluation,+    simpleRuleEvaluation_inputPropertyValue,+    simpleRuleEvaluation_operator,+    simpleRuleEvaluation_thresholdValue,++    -- * SnoozeActionConfiguration+    SnoozeActionConfiguration (..),+    newSnoozeActionConfiguration,+    snoozeActionConfiguration_note,+    snoozeActionConfiguration_snoozeDuration,++    -- * SnoozeAlarmActionRequest+    SnoozeAlarmActionRequest (..),+    newSnoozeAlarmActionRequest,+    snoozeAlarmActionRequest_keyValue,+    snoozeAlarmActionRequest_note,+    snoozeAlarmActionRequest_requestId,+    snoozeAlarmActionRequest_alarmModelName,+    snoozeAlarmActionRequest_snoozeDuration,++    -- * StateChangeConfiguration+    StateChangeConfiguration (..),+    newStateChangeConfiguration,+    stateChangeConfiguration_triggerType,++    -- * SystemEvent+    SystemEvent (..),+    newSystemEvent,+    systemEvent_eventType,+    systemEvent_stateChangeConfiguration,++    -- * Timer+    Timer (..),+    newTimer,+    timer_name,+    timer_timestamp,++    -- * TimerDefinition+    TimerDefinition (..),+    newTimerDefinition,+    timerDefinition_name,+    timerDefinition_seconds,++    -- * TimestampValue+    TimestampValue (..),+    newTimestampValue,+    timestampValue_timeInMillis,++    -- * UpdateDetectorRequest+    UpdateDetectorRequest (..),+    newUpdateDetectorRequest,+    updateDetectorRequest_keyValue,+    updateDetectorRequest_messageId,+    updateDetectorRequest_detectorModelName,+    updateDetectorRequest_state,++    -- * Variable+    Variable (..),+    newVariable,+    variable_name,+    variable_value,++    -- * VariableDefinition+    VariableDefinition (..),+    newVariableDefinition,+    variableDefinition_name,+    variableDefinition_value,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import Amazonka.IoTEventsData.Types.AcknowledgeActionConfiguration+import Amazonka.IoTEventsData.Types.AcknowledgeAlarmActionRequest+import Amazonka.IoTEventsData.Types.Alarm+import Amazonka.IoTEventsData.Types.AlarmState+import Amazonka.IoTEventsData.Types.AlarmStateName+import Amazonka.IoTEventsData.Types.AlarmSummary+import Amazonka.IoTEventsData.Types.BatchAlarmActionErrorEntry+import Amazonka.IoTEventsData.Types.BatchDeleteDetectorErrorEntry+import Amazonka.IoTEventsData.Types.BatchPutMessageErrorEntry+import Amazonka.IoTEventsData.Types.BatchUpdateDetectorErrorEntry+import Amazonka.IoTEventsData.Types.ComparisonOperator+import Amazonka.IoTEventsData.Types.CustomerAction+import Amazonka.IoTEventsData.Types.CustomerActionName+import Amazonka.IoTEventsData.Types.DeleteDetectorRequest+import Amazonka.IoTEventsData.Types.Detector+import Amazonka.IoTEventsData.Types.DetectorState+import Amazonka.IoTEventsData.Types.DetectorStateDefinition+import Amazonka.IoTEventsData.Types.DetectorStateSummary+import Amazonka.IoTEventsData.Types.DetectorSummary+import Amazonka.IoTEventsData.Types.DisableActionConfiguration+import Amazonka.IoTEventsData.Types.DisableAlarmActionRequest+import Amazonka.IoTEventsData.Types.EnableActionConfiguration+import Amazonka.IoTEventsData.Types.EnableAlarmActionRequest+import Amazonka.IoTEventsData.Types.ErrorCode+import Amazonka.IoTEventsData.Types.EventType+import Amazonka.IoTEventsData.Types.Message+import Amazonka.IoTEventsData.Types.ResetActionConfiguration+import Amazonka.IoTEventsData.Types.ResetAlarmActionRequest+import Amazonka.IoTEventsData.Types.RuleEvaluation+import Amazonka.IoTEventsData.Types.SimpleRuleEvaluation+import Amazonka.IoTEventsData.Types.SnoozeActionConfiguration+import Amazonka.IoTEventsData.Types.SnoozeAlarmActionRequest+import Amazonka.IoTEventsData.Types.StateChangeConfiguration+import Amazonka.IoTEventsData.Types.SystemEvent+import Amazonka.IoTEventsData.Types.Timer+import Amazonka.IoTEventsData.Types.TimerDefinition+import Amazonka.IoTEventsData.Types.TimestampValue+import Amazonka.IoTEventsData.Types.TriggerType+import Amazonka.IoTEventsData.Types.UpdateDetectorRequest+import Amazonka.IoTEventsData.Types.Variable+import Amazonka.IoTEventsData.Types.VariableDefinition+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2018-10-23@ of the Amazon IoT Events Data SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "IoTEventsData",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "data.iotevents",+      Core.signingName = "ioteventsdata",+      Core.version = "2018-10-23",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error = Core.parseJSONError "IoTEventsData",+      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++-- | An internal failure occurred.+_InternalFailureException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalFailureException =+  Core._MatchServiceError+    defaultService+    "InternalFailureException"+    Prelude.. Core.hasStatus 500++-- | The request was invalid.+_InvalidRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidRequestException =+  Core._MatchServiceError+    defaultService+    "InvalidRequestException"+    Prelude.. Core.hasStatus 400++-- | The resource was not found.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+  Core._MatchServiceError+    defaultService+    "ResourceNotFoundException"+    Prelude.. Core.hasStatus 404++-- | The service is currently unavailable.+_ServiceUnavailableException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceUnavailableException =+  Core._MatchServiceError+    defaultService+    "ServiceUnavailableException"+    Prelude.. Core.hasStatus 503++-- | The request could not be completed due to throttling.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+  Core._MatchServiceError+    defaultService+    "ThrottlingException"+    Prelude.. Core.hasStatus 429
+ gen/Amazonka/IoTEventsData/Types/AcknowledgeActionConfiguration.hs view
@@ -0,0 +1,80 @@+{-# 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.IoTEventsData.Types.AcknowledgeActionConfiguration+-- 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.IoTEventsData.Types.AcknowledgeActionConfiguration 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++-- | Contains the configuration information of an acknowledge action.+--+-- /See:/ 'newAcknowledgeActionConfiguration' smart constructor.+data AcknowledgeActionConfiguration = AcknowledgeActionConfiguration'+  { -- | The note that you can leave when you acknowledge the alarm.+    note :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AcknowledgeActionConfiguration' 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:+--+-- 'note', 'acknowledgeActionConfiguration_note' - The note that you can leave when you acknowledge the alarm.+newAcknowledgeActionConfiguration ::+  AcknowledgeActionConfiguration+newAcknowledgeActionConfiguration =+  AcknowledgeActionConfiguration'+    { note =+        Prelude.Nothing+    }++-- | The note that you can leave when you acknowledge the alarm.+acknowledgeActionConfiguration_note :: Lens.Lens' AcknowledgeActionConfiguration (Prelude.Maybe Prelude.Text)+acknowledgeActionConfiguration_note = Lens.lens (\AcknowledgeActionConfiguration' {note} -> note) (\s@AcknowledgeActionConfiguration' {} a -> s {note = a} :: AcknowledgeActionConfiguration)++instance Data.FromJSON AcknowledgeActionConfiguration where+  parseJSON =+    Data.withObject+      "AcknowledgeActionConfiguration"+      ( \x ->+          AcknowledgeActionConfiguration'+            Prelude.<$> (x Data..:? "note")+      )++instance+  Prelude.Hashable+    AcknowledgeActionConfiguration+  where+  hashWithSalt+    _salt+    AcknowledgeActionConfiguration' {..} =+      _salt `Prelude.hashWithSalt` note++instance+  Prelude.NFData+    AcknowledgeActionConfiguration+  where+  rnf AcknowledgeActionConfiguration' {..} =+    Prelude.rnf note
+ gen/Amazonka/IoTEventsData/Types/AcknowledgeAlarmActionRequest.hs view
@@ -0,0 +1,124 @@+{-# 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.IoTEventsData.Types.AcknowledgeAlarmActionRequest+-- 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.IoTEventsData.Types.AcknowledgeAlarmActionRequest 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++-- | Information needed to acknowledge the alarm.+--+-- /See:/ 'newAcknowledgeAlarmActionRequest' smart constructor.+data AcknowledgeAlarmActionRequest = AcknowledgeAlarmActionRequest'+  { -- | The value of the key used as a filter to select only the alarms+    -- associated with the+    -- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The note that you can leave when you acknowledge the alarm.+    note :: Prelude.Maybe Prelude.Text,+    -- | The request ID. Each ID must be unique within each batch.+    requestId :: Prelude.Text,+    -- | The name of the alarm model.+    alarmModelName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AcknowledgeAlarmActionRequest' 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:+--+-- 'keyValue', 'acknowledgeAlarmActionRequest_keyValue' - The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+--+-- 'note', 'acknowledgeAlarmActionRequest_note' - The note that you can leave when you acknowledge the alarm.+--+-- 'requestId', 'acknowledgeAlarmActionRequest_requestId' - The request ID. Each ID must be unique within each batch.+--+-- 'alarmModelName', 'acknowledgeAlarmActionRequest_alarmModelName' - The name of the alarm model.+newAcknowledgeAlarmActionRequest ::+  -- | 'requestId'+  Prelude.Text ->+  -- | 'alarmModelName'+  Prelude.Text ->+  AcknowledgeAlarmActionRequest+newAcknowledgeAlarmActionRequest+  pRequestId_+  pAlarmModelName_ =+    AcknowledgeAlarmActionRequest'+      { keyValue =+          Prelude.Nothing,+        note = Prelude.Nothing,+        requestId = pRequestId_,+        alarmModelName = pAlarmModelName_+      }++-- | The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+acknowledgeAlarmActionRequest_keyValue :: Lens.Lens' AcknowledgeAlarmActionRequest (Prelude.Maybe Prelude.Text)+acknowledgeAlarmActionRequest_keyValue = Lens.lens (\AcknowledgeAlarmActionRequest' {keyValue} -> keyValue) (\s@AcknowledgeAlarmActionRequest' {} a -> s {keyValue = a} :: AcknowledgeAlarmActionRequest)++-- | The note that you can leave when you acknowledge the alarm.+acknowledgeAlarmActionRequest_note :: Lens.Lens' AcknowledgeAlarmActionRequest (Prelude.Maybe Prelude.Text)+acknowledgeAlarmActionRequest_note = Lens.lens (\AcknowledgeAlarmActionRequest' {note} -> note) (\s@AcknowledgeAlarmActionRequest' {} a -> s {note = a} :: AcknowledgeAlarmActionRequest)++-- | The request ID. Each ID must be unique within each batch.+acknowledgeAlarmActionRequest_requestId :: Lens.Lens' AcknowledgeAlarmActionRequest Prelude.Text+acknowledgeAlarmActionRequest_requestId = Lens.lens (\AcknowledgeAlarmActionRequest' {requestId} -> requestId) (\s@AcknowledgeAlarmActionRequest' {} a -> s {requestId = a} :: AcknowledgeAlarmActionRequest)++-- | The name of the alarm model.+acknowledgeAlarmActionRequest_alarmModelName :: Lens.Lens' AcknowledgeAlarmActionRequest Prelude.Text+acknowledgeAlarmActionRequest_alarmModelName = Lens.lens (\AcknowledgeAlarmActionRequest' {alarmModelName} -> alarmModelName) (\s@AcknowledgeAlarmActionRequest' {} a -> s {alarmModelName = a} :: AcknowledgeAlarmActionRequest)++instance+  Prelude.Hashable+    AcknowledgeAlarmActionRequest+  where+  hashWithSalt _salt AcknowledgeAlarmActionRequest' {..} =+    _salt+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` note+      `Prelude.hashWithSalt` requestId+      `Prelude.hashWithSalt` alarmModelName++instance Prelude.NFData AcknowledgeAlarmActionRequest where+  rnf AcknowledgeAlarmActionRequest' {..} =+    Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf note+      `Prelude.seq` Prelude.rnf requestId+      `Prelude.seq` Prelude.rnf alarmModelName++instance Data.ToJSON AcknowledgeAlarmActionRequest where+  toJSON AcknowledgeAlarmActionRequest' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("keyValue" Data..=) Prelude.<$> keyValue,+            ("note" Data..=) Prelude.<$> note,+            Prelude.Just ("requestId" Data..= requestId),+            Prelude.Just+              ("alarmModelName" Data..= alarmModelName)+          ]+      )
+ gen/Amazonka/IoTEventsData/Types/Alarm.hs view
@@ -0,0 +1,151 @@+{-# 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.IoTEventsData.Types.Alarm+-- 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.IoTEventsData.Types.Alarm where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.AlarmState+import qualified Amazonka.Prelude as Prelude++-- | Contains information about an alarm.+--+-- /See:/ 'newAlarm' smart constructor.+data Alarm = Alarm'+  { -- | The name of the alarm model.+    alarmModelName :: Prelude.Maybe Prelude.Text,+    -- | The version of the alarm model.+    alarmModelVersion :: Prelude.Maybe Prelude.Text,+    -- | Contains information about the current state of the alarm.+    alarmState :: Prelude.Maybe AlarmState,+    -- | The time the alarm was created, in the Unix epoch format.+    creationTime :: Prelude.Maybe Data.POSIX,+    -- | The value of the key used as a filter to select only the alarms+    -- associated with the+    -- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The time the alarm was last updated, in the Unix epoch format.+    lastUpdateTime :: Prelude.Maybe Data.POSIX,+    -- | A non-negative integer that reflects the severity level of the alarm.+    severity :: Prelude.Maybe Prelude.Natural+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Alarm' 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:+--+-- 'alarmModelName', 'alarm_alarmModelName' - The name of the alarm model.+--+-- 'alarmModelVersion', 'alarm_alarmModelVersion' - The version of the alarm model.+--+-- 'alarmState', 'alarm_alarmState' - Contains information about the current state of the alarm.+--+-- 'creationTime', 'alarm_creationTime' - The time the alarm was created, in the Unix epoch format.+--+-- 'keyValue', 'alarm_keyValue' - The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+--+-- 'lastUpdateTime', 'alarm_lastUpdateTime' - The time the alarm was last updated, in the Unix epoch format.+--+-- 'severity', 'alarm_severity' - A non-negative integer that reflects the severity level of the alarm.+newAlarm ::+  Alarm+newAlarm =+  Alarm'+    { alarmModelName = Prelude.Nothing,+      alarmModelVersion = Prelude.Nothing,+      alarmState = Prelude.Nothing,+      creationTime = Prelude.Nothing,+      keyValue = Prelude.Nothing,+      lastUpdateTime = Prelude.Nothing,+      severity = Prelude.Nothing+    }++-- | The name of the alarm model.+alarm_alarmModelName :: Lens.Lens' Alarm (Prelude.Maybe Prelude.Text)+alarm_alarmModelName = Lens.lens (\Alarm' {alarmModelName} -> alarmModelName) (\s@Alarm' {} a -> s {alarmModelName = a} :: Alarm)++-- | The version of the alarm model.+alarm_alarmModelVersion :: Lens.Lens' Alarm (Prelude.Maybe Prelude.Text)+alarm_alarmModelVersion = Lens.lens (\Alarm' {alarmModelVersion} -> alarmModelVersion) (\s@Alarm' {} a -> s {alarmModelVersion = a} :: Alarm)++-- | Contains information about the current state of the alarm.+alarm_alarmState :: Lens.Lens' Alarm (Prelude.Maybe AlarmState)+alarm_alarmState = Lens.lens (\Alarm' {alarmState} -> alarmState) (\s@Alarm' {} a -> s {alarmState = a} :: Alarm)++-- | The time the alarm was created, in the Unix epoch format.+alarm_creationTime :: Lens.Lens' Alarm (Prelude.Maybe Prelude.UTCTime)+alarm_creationTime = Lens.lens (\Alarm' {creationTime} -> creationTime) (\s@Alarm' {} a -> s {creationTime = a} :: Alarm) Prelude.. Lens.mapping Data._Time++-- | The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+alarm_keyValue :: Lens.Lens' Alarm (Prelude.Maybe Prelude.Text)+alarm_keyValue = Lens.lens (\Alarm' {keyValue} -> keyValue) (\s@Alarm' {} a -> s {keyValue = a} :: Alarm)++-- | The time the alarm was last updated, in the Unix epoch format.+alarm_lastUpdateTime :: Lens.Lens' Alarm (Prelude.Maybe Prelude.UTCTime)+alarm_lastUpdateTime = Lens.lens (\Alarm' {lastUpdateTime} -> lastUpdateTime) (\s@Alarm' {} a -> s {lastUpdateTime = a} :: Alarm) Prelude.. Lens.mapping Data._Time++-- | A non-negative integer that reflects the severity level of the alarm.+alarm_severity :: Lens.Lens' Alarm (Prelude.Maybe Prelude.Natural)+alarm_severity = Lens.lens (\Alarm' {severity} -> severity) (\s@Alarm' {} a -> s {severity = a} :: Alarm)++instance Data.FromJSON Alarm where+  parseJSON =+    Data.withObject+      "Alarm"+      ( \x ->+          Alarm'+            Prelude.<$> (x Data..:? "alarmModelName")+            Prelude.<*> (x Data..:? "alarmModelVersion")+            Prelude.<*> (x Data..:? "alarmState")+            Prelude.<*> (x Data..:? "creationTime")+            Prelude.<*> (x Data..:? "keyValue")+            Prelude.<*> (x Data..:? "lastUpdateTime")+            Prelude.<*> (x Data..:? "severity")+      )++instance Prelude.Hashable Alarm where+  hashWithSalt _salt Alarm' {..} =+    _salt+      `Prelude.hashWithSalt` alarmModelName+      `Prelude.hashWithSalt` alarmModelVersion+      `Prelude.hashWithSalt` alarmState+      `Prelude.hashWithSalt` creationTime+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` lastUpdateTime+      `Prelude.hashWithSalt` severity++instance Prelude.NFData Alarm where+  rnf Alarm' {..} =+    Prelude.rnf alarmModelName+      `Prelude.seq` Prelude.rnf alarmModelVersion+      `Prelude.seq` Prelude.rnf alarmState+      `Prelude.seq` Prelude.rnf creationTime+      `Prelude.seq` Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf lastUpdateTime+      `Prelude.seq` Prelude.rnf severity
+ gen/Amazonka/IoTEventsData/Types/AlarmState.hs view
@@ -0,0 +1,187 @@+{-# 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.IoTEventsData.Types.AlarmState+-- 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.IoTEventsData.Types.AlarmState where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.AlarmStateName+import Amazonka.IoTEventsData.Types.CustomerAction+import Amazonka.IoTEventsData.Types.RuleEvaluation+import Amazonka.IoTEventsData.Types.SystemEvent+import qualified Amazonka.Prelude as Prelude++-- | Contains information about the current state of the alarm.+--+-- /See:/ 'newAlarmState' smart constructor.+data AlarmState = AlarmState'+  { -- | Contains information about the action that you can take to respond to+    -- the alarm.+    customerAction :: Prelude.Maybe CustomerAction,+    -- | Information needed to evaluate data.+    ruleEvaluation :: Prelude.Maybe RuleEvaluation,+    -- | The name of the alarm state. The state name can be one of the following+    -- values:+    --+    -- -   @DISABLED@ - When the alarm is in the @DISABLED@ state, it isn\'t+    --     ready to evaluate data. To enable the alarm, you must change the+    --     alarm to the @NORMAL@ state.+    --+    -- -   @NORMAL@ - When the alarm is in the @NORMAL@ state, it\'s ready to+    --     evaluate data.+    --+    -- -   @ACTIVE@ - If the alarm is in the @ACTIVE@ state, the alarm is+    --     invoked.+    --+    -- -   @ACKNOWLEDGED@ - When the alarm is in the @ACKNOWLEDGED@ state, the+    --     alarm was invoked and you acknowledged the alarm.+    --+    -- -   @SNOOZE_DISABLED@ - When the alarm is in the @SNOOZE_DISABLED@+    --     state, the alarm is disabled for a specified period of time. After+    --     the snooze time, the alarm automatically changes to the @NORMAL@+    --     state.+    --+    -- -   @LATCHED@ - When the alarm is in the @LATCHED@ state, the alarm was+    --     invoked. However, the data that the alarm is currently evaluating is+    --     within the specified range. To change the alarm to the @NORMAL@+    --     state, you must acknowledge the alarm.+    stateName :: Prelude.Maybe AlarmStateName,+    -- | Contains information about alarm state changes.+    systemEvent :: Prelude.Maybe SystemEvent+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AlarmState' 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:+--+-- 'customerAction', 'alarmState_customerAction' - Contains information about the action that you can take to respond to+-- the alarm.+--+-- 'ruleEvaluation', 'alarmState_ruleEvaluation' - Information needed to evaluate data.+--+-- 'stateName', 'alarmState_stateName' - The name of the alarm state. The state name can be one of the following+-- values:+--+-- -   @DISABLED@ - When the alarm is in the @DISABLED@ state, it isn\'t+--     ready to evaluate data. To enable the alarm, you must change the+--     alarm to the @NORMAL@ state.+--+-- -   @NORMAL@ - When the alarm is in the @NORMAL@ state, it\'s ready to+--     evaluate data.+--+-- -   @ACTIVE@ - If the alarm is in the @ACTIVE@ state, the alarm is+--     invoked.+--+-- -   @ACKNOWLEDGED@ - When the alarm is in the @ACKNOWLEDGED@ state, the+--     alarm was invoked and you acknowledged the alarm.+--+-- -   @SNOOZE_DISABLED@ - When the alarm is in the @SNOOZE_DISABLED@+--     state, the alarm is disabled for a specified period of time. After+--     the snooze time, the alarm automatically changes to the @NORMAL@+--     state.+--+-- -   @LATCHED@ - When the alarm is in the @LATCHED@ state, the alarm was+--     invoked. However, the data that the alarm is currently evaluating is+--     within the specified range. To change the alarm to the @NORMAL@+--     state, you must acknowledge the alarm.+--+-- 'systemEvent', 'alarmState_systemEvent' - Contains information about alarm state changes.+newAlarmState ::+  AlarmState+newAlarmState =+  AlarmState'+    { customerAction = Prelude.Nothing,+      ruleEvaluation = Prelude.Nothing,+      stateName = Prelude.Nothing,+      systemEvent = Prelude.Nothing+    }++-- | Contains information about the action that you can take to respond to+-- the alarm.+alarmState_customerAction :: Lens.Lens' AlarmState (Prelude.Maybe CustomerAction)+alarmState_customerAction = Lens.lens (\AlarmState' {customerAction} -> customerAction) (\s@AlarmState' {} a -> s {customerAction = a} :: AlarmState)++-- | Information needed to evaluate data.+alarmState_ruleEvaluation :: Lens.Lens' AlarmState (Prelude.Maybe RuleEvaluation)+alarmState_ruleEvaluation = Lens.lens (\AlarmState' {ruleEvaluation} -> ruleEvaluation) (\s@AlarmState' {} a -> s {ruleEvaluation = a} :: AlarmState)++-- | The name of the alarm state. The state name can be one of the following+-- values:+--+-- -   @DISABLED@ - When the alarm is in the @DISABLED@ state, it isn\'t+--     ready to evaluate data. To enable the alarm, you must change the+--     alarm to the @NORMAL@ state.+--+-- -   @NORMAL@ - When the alarm is in the @NORMAL@ state, it\'s ready to+--     evaluate data.+--+-- -   @ACTIVE@ - If the alarm is in the @ACTIVE@ state, the alarm is+--     invoked.+--+-- -   @ACKNOWLEDGED@ - When the alarm is in the @ACKNOWLEDGED@ state, the+--     alarm was invoked and you acknowledged the alarm.+--+-- -   @SNOOZE_DISABLED@ - When the alarm is in the @SNOOZE_DISABLED@+--     state, the alarm is disabled for a specified period of time. After+--     the snooze time, the alarm automatically changes to the @NORMAL@+--     state.+--+-- -   @LATCHED@ - When the alarm is in the @LATCHED@ state, the alarm was+--     invoked. However, the data that the alarm is currently evaluating is+--     within the specified range. To change the alarm to the @NORMAL@+--     state, you must acknowledge the alarm.+alarmState_stateName :: Lens.Lens' AlarmState (Prelude.Maybe AlarmStateName)+alarmState_stateName = Lens.lens (\AlarmState' {stateName} -> stateName) (\s@AlarmState' {} a -> s {stateName = a} :: AlarmState)++-- | Contains information about alarm state changes.+alarmState_systemEvent :: Lens.Lens' AlarmState (Prelude.Maybe SystemEvent)+alarmState_systemEvent = Lens.lens (\AlarmState' {systemEvent} -> systemEvent) (\s@AlarmState' {} a -> s {systemEvent = a} :: AlarmState)++instance Data.FromJSON AlarmState where+  parseJSON =+    Data.withObject+      "AlarmState"+      ( \x ->+          AlarmState'+            Prelude.<$> (x Data..:? "customerAction")+            Prelude.<*> (x Data..:? "ruleEvaluation")+            Prelude.<*> (x Data..:? "stateName")+            Prelude.<*> (x Data..:? "systemEvent")+      )++instance Prelude.Hashable AlarmState where+  hashWithSalt _salt AlarmState' {..} =+    _salt+      `Prelude.hashWithSalt` customerAction+      `Prelude.hashWithSalt` ruleEvaluation+      `Prelude.hashWithSalt` stateName+      `Prelude.hashWithSalt` systemEvent++instance Prelude.NFData AlarmState where+  rnf AlarmState' {..} =+    Prelude.rnf customerAction+      `Prelude.seq` Prelude.rnf ruleEvaluation+      `Prelude.seq` Prelude.rnf stateName+      `Prelude.seq` Prelude.rnf systemEvent
+ gen/Amazonka/IoTEventsData/Types/AlarmStateName.hs view
@@ -0,0 +1,91 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.IoTEventsData.Types.AlarmStateName+-- 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.IoTEventsData.Types.AlarmStateName+  ( AlarmStateName+      ( ..,+        AlarmStateName_ACKNOWLEDGED,+        AlarmStateName_ACTIVE,+        AlarmStateName_DISABLED,+        AlarmStateName_LATCHED,+        AlarmStateName_NORMAL,+        AlarmStateName_SNOOZE_DISABLED+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype AlarmStateName = AlarmStateName'+  { fromAlarmStateName ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern AlarmStateName_ACKNOWLEDGED :: AlarmStateName+pattern AlarmStateName_ACKNOWLEDGED = AlarmStateName' "ACKNOWLEDGED"++pattern AlarmStateName_ACTIVE :: AlarmStateName+pattern AlarmStateName_ACTIVE = AlarmStateName' "ACTIVE"++pattern AlarmStateName_DISABLED :: AlarmStateName+pattern AlarmStateName_DISABLED = AlarmStateName' "DISABLED"++pattern AlarmStateName_LATCHED :: AlarmStateName+pattern AlarmStateName_LATCHED = AlarmStateName' "LATCHED"++pattern AlarmStateName_NORMAL :: AlarmStateName+pattern AlarmStateName_NORMAL = AlarmStateName' "NORMAL"++pattern AlarmStateName_SNOOZE_DISABLED :: AlarmStateName+pattern AlarmStateName_SNOOZE_DISABLED = AlarmStateName' "SNOOZE_DISABLED"++{-# COMPLETE+  AlarmStateName_ACKNOWLEDGED,+  AlarmStateName_ACTIVE,+  AlarmStateName_DISABLED,+  AlarmStateName_LATCHED,+  AlarmStateName_NORMAL,+  AlarmStateName_SNOOZE_DISABLED,+  AlarmStateName'+  #-}
+ gen/Amazonka/IoTEventsData/Types/AlarmSummary.hs view
@@ -0,0 +1,211 @@+{-# 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.IoTEventsData.Types.AlarmSummary+-- 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.IoTEventsData.Types.AlarmSummary where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.AlarmStateName+import qualified Amazonka.Prelude as Prelude++-- | Contains a summary of an alarm.+--+-- /See:/ 'newAlarmSummary' smart constructor.+data AlarmSummary = AlarmSummary'+  { -- | The name of the alarm model.+    alarmModelName :: Prelude.Maybe Prelude.Text,+    -- | The version of the alarm model.+    alarmModelVersion :: Prelude.Maybe Prelude.Text,+    -- | The time the alarm was created, in the Unix epoch format.+    creationTime :: Prelude.Maybe Data.POSIX,+    -- | The value of the key used as a filter to select only the alarms+    -- associated with the+    -- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The time the alarm was last updated, in the Unix epoch format.+    lastUpdateTime :: Prelude.Maybe Data.POSIX,+    -- | The name of the alarm state. The state name can be one of the following+    -- values:+    --+    -- -   @DISABLED@ - When the alarm is in the @DISABLED@ state, it isn\'t+    --     ready to evaluate data. To enable the alarm, you must change the+    --     alarm to the @NORMAL@ state.+    --+    -- -   @NORMAL@ - When the alarm is in the @NORMAL@ state, it\'s ready to+    --     evaluate data.+    --+    -- -   @ACTIVE@ - If the alarm is in the @ACTIVE@ state, the alarm is+    --     invoked.+    --+    -- -   @ACKNOWLEDGED@ - When the alarm is in the @ACKNOWLEDGED@ state, the+    --     alarm was invoked and you acknowledged the alarm.+    --+    -- -   @SNOOZE_DISABLED@ - When the alarm is in the @SNOOZE_DISABLED@+    --     state, the alarm is disabled for a specified period of time. After+    --     the snooze time, the alarm automatically changes to the @NORMAL@+    --     state.+    --+    -- -   @LATCHED@ - When the alarm is in the @LATCHED@ state, the alarm was+    --     invoked. However, the data that the alarm is currently evaluating is+    --     within the specified range. To change the alarm to the @NORMAL@+    --     state, you must acknowledge the alarm.+    stateName :: Prelude.Maybe AlarmStateName+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AlarmSummary' 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:+--+-- 'alarmModelName', 'alarmSummary_alarmModelName' - The name of the alarm model.+--+-- 'alarmModelVersion', 'alarmSummary_alarmModelVersion' - The version of the alarm model.+--+-- 'creationTime', 'alarmSummary_creationTime' - The time the alarm was created, in the Unix epoch format.+--+-- 'keyValue', 'alarmSummary_keyValue' - The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+--+-- 'lastUpdateTime', 'alarmSummary_lastUpdateTime' - The time the alarm was last updated, in the Unix epoch format.+--+-- 'stateName', 'alarmSummary_stateName' - The name of the alarm state. The state name can be one of the following+-- values:+--+-- -   @DISABLED@ - When the alarm is in the @DISABLED@ state, it isn\'t+--     ready to evaluate data. To enable the alarm, you must change the+--     alarm to the @NORMAL@ state.+--+-- -   @NORMAL@ - When the alarm is in the @NORMAL@ state, it\'s ready to+--     evaluate data.+--+-- -   @ACTIVE@ - If the alarm is in the @ACTIVE@ state, the alarm is+--     invoked.+--+-- -   @ACKNOWLEDGED@ - When the alarm is in the @ACKNOWLEDGED@ state, the+--     alarm was invoked and you acknowledged the alarm.+--+-- -   @SNOOZE_DISABLED@ - When the alarm is in the @SNOOZE_DISABLED@+--     state, the alarm is disabled for a specified period of time. After+--     the snooze time, the alarm automatically changes to the @NORMAL@+--     state.+--+-- -   @LATCHED@ - When the alarm is in the @LATCHED@ state, the alarm was+--     invoked. However, the data that the alarm is currently evaluating is+--     within the specified range. To change the alarm to the @NORMAL@+--     state, you must acknowledge the alarm.+newAlarmSummary ::+  AlarmSummary+newAlarmSummary =+  AlarmSummary'+    { alarmModelName = Prelude.Nothing,+      alarmModelVersion = Prelude.Nothing,+      creationTime = Prelude.Nothing,+      keyValue = Prelude.Nothing,+      lastUpdateTime = Prelude.Nothing,+      stateName = Prelude.Nothing+    }++-- | The name of the alarm model.+alarmSummary_alarmModelName :: Lens.Lens' AlarmSummary (Prelude.Maybe Prelude.Text)+alarmSummary_alarmModelName = Lens.lens (\AlarmSummary' {alarmModelName} -> alarmModelName) (\s@AlarmSummary' {} a -> s {alarmModelName = a} :: AlarmSummary)++-- | The version of the alarm model.+alarmSummary_alarmModelVersion :: Lens.Lens' AlarmSummary (Prelude.Maybe Prelude.Text)+alarmSummary_alarmModelVersion = Lens.lens (\AlarmSummary' {alarmModelVersion} -> alarmModelVersion) (\s@AlarmSummary' {} a -> s {alarmModelVersion = a} :: AlarmSummary)++-- | The time the alarm was created, in the Unix epoch format.+alarmSummary_creationTime :: Lens.Lens' AlarmSummary (Prelude.Maybe Prelude.UTCTime)+alarmSummary_creationTime = Lens.lens (\AlarmSummary' {creationTime} -> creationTime) (\s@AlarmSummary' {} a -> s {creationTime = a} :: AlarmSummary) Prelude.. Lens.mapping Data._Time++-- | The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+alarmSummary_keyValue :: Lens.Lens' AlarmSummary (Prelude.Maybe Prelude.Text)+alarmSummary_keyValue = Lens.lens (\AlarmSummary' {keyValue} -> keyValue) (\s@AlarmSummary' {} a -> s {keyValue = a} :: AlarmSummary)++-- | The time the alarm was last updated, in the Unix epoch format.+alarmSummary_lastUpdateTime :: Lens.Lens' AlarmSummary (Prelude.Maybe Prelude.UTCTime)+alarmSummary_lastUpdateTime = Lens.lens (\AlarmSummary' {lastUpdateTime} -> lastUpdateTime) (\s@AlarmSummary' {} a -> s {lastUpdateTime = a} :: AlarmSummary) Prelude.. Lens.mapping Data._Time++-- | The name of the alarm state. The state name can be one of the following+-- values:+--+-- -   @DISABLED@ - When the alarm is in the @DISABLED@ state, it isn\'t+--     ready to evaluate data. To enable the alarm, you must change the+--     alarm to the @NORMAL@ state.+--+-- -   @NORMAL@ - When the alarm is in the @NORMAL@ state, it\'s ready to+--     evaluate data.+--+-- -   @ACTIVE@ - If the alarm is in the @ACTIVE@ state, the alarm is+--     invoked.+--+-- -   @ACKNOWLEDGED@ - When the alarm is in the @ACKNOWLEDGED@ state, the+--     alarm was invoked and you acknowledged the alarm.+--+-- -   @SNOOZE_DISABLED@ - When the alarm is in the @SNOOZE_DISABLED@+--     state, the alarm is disabled for a specified period of time. After+--     the snooze time, the alarm automatically changes to the @NORMAL@+--     state.+--+-- -   @LATCHED@ - When the alarm is in the @LATCHED@ state, the alarm was+--     invoked. However, the data that the alarm is currently evaluating is+--     within the specified range. To change the alarm to the @NORMAL@+--     state, you must acknowledge the alarm.+alarmSummary_stateName :: Lens.Lens' AlarmSummary (Prelude.Maybe AlarmStateName)+alarmSummary_stateName = Lens.lens (\AlarmSummary' {stateName} -> stateName) (\s@AlarmSummary' {} a -> s {stateName = a} :: AlarmSummary)++instance Data.FromJSON AlarmSummary where+  parseJSON =+    Data.withObject+      "AlarmSummary"+      ( \x ->+          AlarmSummary'+            Prelude.<$> (x Data..:? "alarmModelName")+            Prelude.<*> (x Data..:? "alarmModelVersion")+            Prelude.<*> (x Data..:? "creationTime")+            Prelude.<*> (x Data..:? "keyValue")+            Prelude.<*> (x Data..:? "lastUpdateTime")+            Prelude.<*> (x Data..:? "stateName")+      )++instance Prelude.Hashable AlarmSummary where+  hashWithSalt _salt AlarmSummary' {..} =+    _salt+      `Prelude.hashWithSalt` alarmModelName+      `Prelude.hashWithSalt` alarmModelVersion+      `Prelude.hashWithSalt` creationTime+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` lastUpdateTime+      `Prelude.hashWithSalt` stateName++instance Prelude.NFData AlarmSummary where+  rnf AlarmSummary' {..} =+    Prelude.rnf alarmModelName+      `Prelude.seq` Prelude.rnf alarmModelVersion+      `Prelude.seq` Prelude.rnf creationTime+      `Prelude.seq` Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf lastUpdateTime+      `Prelude.seq` Prelude.rnf stateName
+ gen/Amazonka/IoTEventsData/Types/BatchAlarmActionErrorEntry.hs view
@@ -0,0 +1,108 @@+{-# 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.IoTEventsData.Types.BatchAlarmActionErrorEntry+-- 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.IoTEventsData.Types.BatchAlarmActionErrorEntry where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.ErrorCode+import qualified Amazonka.Prelude as Prelude++-- | Contains error messages associated with one of the following requests:+--+-- -   <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchAcknowledgeAlarm.html BatchAcknowledgeAlarm>+--+-- -   <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchDisableAlarm.html BatchDisableAlarm>+--+-- -   <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchEnableAlarm.html BatchEnableAlarm>+--+-- -   <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchResetAlarm.html BatchResetAlarm>+--+-- -   <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchSnoozeAlarm.html BatchSnoozeAlarm>+--+-- /See:/ 'newBatchAlarmActionErrorEntry' smart constructor.+data BatchAlarmActionErrorEntry = BatchAlarmActionErrorEntry'+  { -- | The error code.+    errorCode :: Prelude.Maybe ErrorCode,+    -- | A message that describes the error.+    errorMessage :: Prelude.Maybe Prelude.Text,+    -- | The request ID. Each ID must be unique within each batch.+    requestId :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchAlarmActionErrorEntry' 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:+--+-- 'errorCode', 'batchAlarmActionErrorEntry_errorCode' - The error code.+--+-- 'errorMessage', 'batchAlarmActionErrorEntry_errorMessage' - A message that describes the error.+--+-- 'requestId', 'batchAlarmActionErrorEntry_requestId' - The request ID. Each ID must be unique within each batch.+newBatchAlarmActionErrorEntry ::+  BatchAlarmActionErrorEntry+newBatchAlarmActionErrorEntry =+  BatchAlarmActionErrorEntry'+    { errorCode =+        Prelude.Nothing,+      errorMessage = Prelude.Nothing,+      requestId = Prelude.Nothing+    }++-- | The error code.+batchAlarmActionErrorEntry_errorCode :: Lens.Lens' BatchAlarmActionErrorEntry (Prelude.Maybe ErrorCode)+batchAlarmActionErrorEntry_errorCode = Lens.lens (\BatchAlarmActionErrorEntry' {errorCode} -> errorCode) (\s@BatchAlarmActionErrorEntry' {} a -> s {errorCode = a} :: BatchAlarmActionErrorEntry)++-- | A message that describes the error.+batchAlarmActionErrorEntry_errorMessage :: Lens.Lens' BatchAlarmActionErrorEntry (Prelude.Maybe Prelude.Text)+batchAlarmActionErrorEntry_errorMessage = Lens.lens (\BatchAlarmActionErrorEntry' {errorMessage} -> errorMessage) (\s@BatchAlarmActionErrorEntry' {} a -> s {errorMessage = a} :: BatchAlarmActionErrorEntry)++-- | The request ID. Each ID must be unique within each batch.+batchAlarmActionErrorEntry_requestId :: Lens.Lens' BatchAlarmActionErrorEntry (Prelude.Maybe Prelude.Text)+batchAlarmActionErrorEntry_requestId = Lens.lens (\BatchAlarmActionErrorEntry' {requestId} -> requestId) (\s@BatchAlarmActionErrorEntry' {} a -> s {requestId = a} :: BatchAlarmActionErrorEntry)++instance Data.FromJSON BatchAlarmActionErrorEntry where+  parseJSON =+    Data.withObject+      "BatchAlarmActionErrorEntry"+      ( \x ->+          BatchAlarmActionErrorEntry'+            Prelude.<$> (x Data..:? "errorCode")+            Prelude.<*> (x Data..:? "errorMessage")+            Prelude.<*> (x Data..:? "requestId")+      )++instance Prelude.Hashable BatchAlarmActionErrorEntry where+  hashWithSalt _salt BatchAlarmActionErrorEntry' {..} =+    _salt+      `Prelude.hashWithSalt` errorCode+      `Prelude.hashWithSalt` errorMessage+      `Prelude.hashWithSalt` requestId++instance Prelude.NFData BatchAlarmActionErrorEntry where+  rnf BatchAlarmActionErrorEntry' {..} =+    Prelude.rnf errorCode+      `Prelude.seq` Prelude.rnf errorMessage+      `Prelude.seq` Prelude.rnf requestId
+ gen/Amazonka/IoTEventsData/Types/BatchDeleteDetectorErrorEntry.hs view
@@ -0,0 +1,110 @@+{-# 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.IoTEventsData.Types.BatchDeleteDetectorErrorEntry+-- 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.IoTEventsData.Types.BatchDeleteDetectorErrorEntry where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.ErrorCode+import qualified Amazonka.Prelude as Prelude++-- | Contains error messages associated with the deletion request.+--+-- /See:/ 'newBatchDeleteDetectorErrorEntry' smart constructor.+data BatchDeleteDetectorErrorEntry = BatchDeleteDetectorErrorEntry'+  { -- | The error code.+    errorCode :: Prelude.Maybe ErrorCode,+    -- | A message that describes the error.+    errorMessage :: Prelude.Maybe Prelude.Text,+    -- | The ID of the message that caused the error. (See the value of the+    -- @\"messageId\"@ in the+    -- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchDeleteDetector.html#iotevents-iotevents-data_BatchDeleteDetector-request-detectors detectors>+    -- object of the @DeleteDetectorRequest@.)+    messageId :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchDeleteDetectorErrorEntry' 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:+--+-- 'errorCode', 'batchDeleteDetectorErrorEntry_errorCode' - The error code.+--+-- 'errorMessage', 'batchDeleteDetectorErrorEntry_errorMessage' - A message that describes the error.+--+-- 'messageId', 'batchDeleteDetectorErrorEntry_messageId' - The ID of the message that caused the error. (See the value of the+-- @\"messageId\"@ in the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchDeleteDetector.html#iotevents-iotevents-data_BatchDeleteDetector-request-detectors detectors>+-- object of the @DeleteDetectorRequest@.)+newBatchDeleteDetectorErrorEntry ::+  BatchDeleteDetectorErrorEntry+newBatchDeleteDetectorErrorEntry =+  BatchDeleteDetectorErrorEntry'+    { errorCode =+        Prelude.Nothing,+      errorMessage = Prelude.Nothing,+      messageId = Prelude.Nothing+    }++-- | The error code.+batchDeleteDetectorErrorEntry_errorCode :: Lens.Lens' BatchDeleteDetectorErrorEntry (Prelude.Maybe ErrorCode)+batchDeleteDetectorErrorEntry_errorCode = Lens.lens (\BatchDeleteDetectorErrorEntry' {errorCode} -> errorCode) (\s@BatchDeleteDetectorErrorEntry' {} a -> s {errorCode = a} :: BatchDeleteDetectorErrorEntry)++-- | A message that describes the error.+batchDeleteDetectorErrorEntry_errorMessage :: Lens.Lens' BatchDeleteDetectorErrorEntry (Prelude.Maybe Prelude.Text)+batchDeleteDetectorErrorEntry_errorMessage = Lens.lens (\BatchDeleteDetectorErrorEntry' {errorMessage} -> errorMessage) (\s@BatchDeleteDetectorErrorEntry' {} a -> s {errorMessage = a} :: BatchDeleteDetectorErrorEntry)++-- | The ID of the message that caused the error. (See the value of the+-- @\"messageId\"@ in the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchDeleteDetector.html#iotevents-iotevents-data_BatchDeleteDetector-request-detectors detectors>+-- object of the @DeleteDetectorRequest@.)+batchDeleteDetectorErrorEntry_messageId :: Lens.Lens' BatchDeleteDetectorErrorEntry (Prelude.Maybe Prelude.Text)+batchDeleteDetectorErrorEntry_messageId = Lens.lens (\BatchDeleteDetectorErrorEntry' {messageId} -> messageId) (\s@BatchDeleteDetectorErrorEntry' {} a -> s {messageId = a} :: BatchDeleteDetectorErrorEntry)++instance Data.FromJSON BatchDeleteDetectorErrorEntry where+  parseJSON =+    Data.withObject+      "BatchDeleteDetectorErrorEntry"+      ( \x ->+          BatchDeleteDetectorErrorEntry'+            Prelude.<$> (x Data..:? "errorCode")+            Prelude.<*> (x Data..:? "errorMessage")+            Prelude.<*> (x Data..:? "messageId")+      )++instance+  Prelude.Hashable+    BatchDeleteDetectorErrorEntry+  where+  hashWithSalt _salt BatchDeleteDetectorErrorEntry' {..} =+    _salt+      `Prelude.hashWithSalt` errorCode+      `Prelude.hashWithSalt` errorMessage+      `Prelude.hashWithSalt` messageId++instance Prelude.NFData BatchDeleteDetectorErrorEntry where+  rnf BatchDeleteDetectorErrorEntry' {..} =+    Prelude.rnf errorCode+      `Prelude.seq` Prelude.rnf errorMessage+      `Prelude.seq` Prelude.rnf messageId
+ gen/Amazonka/IoTEventsData/Types/BatchPutMessageErrorEntry.hs view
@@ -0,0 +1,101 @@+{-# 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.IoTEventsData.Types.BatchPutMessageErrorEntry+-- 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.IoTEventsData.Types.BatchPutMessageErrorEntry where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.ErrorCode+import qualified Amazonka.Prelude as Prelude++-- | Contains information about the errors encountered.+--+-- /See:/ 'newBatchPutMessageErrorEntry' smart constructor.+data BatchPutMessageErrorEntry = BatchPutMessageErrorEntry'+  { -- | The error code.+    errorCode :: Prelude.Maybe ErrorCode,+    -- | A message that describes the error.+    errorMessage :: Prelude.Maybe Prelude.Text,+    -- | The ID of the message that caused the error. (See the value+    -- corresponding to the @\"messageId\"@ key in the @\"message\"@ object.)+    messageId :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchPutMessageErrorEntry' 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:+--+-- 'errorCode', 'batchPutMessageErrorEntry_errorCode' - The error code.+--+-- 'errorMessage', 'batchPutMessageErrorEntry_errorMessage' - A message that describes the error.+--+-- 'messageId', 'batchPutMessageErrorEntry_messageId' - The ID of the message that caused the error. (See the value+-- corresponding to the @\"messageId\"@ key in the @\"message\"@ object.)+newBatchPutMessageErrorEntry ::+  BatchPutMessageErrorEntry+newBatchPutMessageErrorEntry =+  BatchPutMessageErrorEntry'+    { errorCode =+        Prelude.Nothing,+      errorMessage = Prelude.Nothing,+      messageId = Prelude.Nothing+    }++-- | The error code.+batchPutMessageErrorEntry_errorCode :: Lens.Lens' BatchPutMessageErrorEntry (Prelude.Maybe ErrorCode)+batchPutMessageErrorEntry_errorCode = Lens.lens (\BatchPutMessageErrorEntry' {errorCode} -> errorCode) (\s@BatchPutMessageErrorEntry' {} a -> s {errorCode = a} :: BatchPutMessageErrorEntry)++-- | A message that describes the error.+batchPutMessageErrorEntry_errorMessage :: Lens.Lens' BatchPutMessageErrorEntry (Prelude.Maybe Prelude.Text)+batchPutMessageErrorEntry_errorMessage = Lens.lens (\BatchPutMessageErrorEntry' {errorMessage} -> errorMessage) (\s@BatchPutMessageErrorEntry' {} a -> s {errorMessage = a} :: BatchPutMessageErrorEntry)++-- | The ID of the message that caused the error. (See the value+-- corresponding to the @\"messageId\"@ key in the @\"message\"@ object.)+batchPutMessageErrorEntry_messageId :: Lens.Lens' BatchPutMessageErrorEntry (Prelude.Maybe Prelude.Text)+batchPutMessageErrorEntry_messageId = Lens.lens (\BatchPutMessageErrorEntry' {messageId} -> messageId) (\s@BatchPutMessageErrorEntry' {} a -> s {messageId = a} :: BatchPutMessageErrorEntry)++instance Data.FromJSON BatchPutMessageErrorEntry where+  parseJSON =+    Data.withObject+      "BatchPutMessageErrorEntry"+      ( \x ->+          BatchPutMessageErrorEntry'+            Prelude.<$> (x Data..:? "errorCode")+            Prelude.<*> (x Data..:? "errorMessage")+            Prelude.<*> (x Data..:? "messageId")+      )++instance Prelude.Hashable BatchPutMessageErrorEntry where+  hashWithSalt _salt BatchPutMessageErrorEntry' {..} =+    _salt+      `Prelude.hashWithSalt` errorCode+      `Prelude.hashWithSalt` errorMessage+      `Prelude.hashWithSalt` messageId++instance Prelude.NFData BatchPutMessageErrorEntry where+  rnf BatchPutMessageErrorEntry' {..} =+    Prelude.rnf errorCode+      `Prelude.seq` Prelude.rnf errorMessage+      `Prelude.seq` Prelude.rnf messageId
+ gen/Amazonka/IoTEventsData/Types/BatchUpdateDetectorErrorEntry.hs view
@@ -0,0 +1,108 @@+{-# 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.IoTEventsData.Types.BatchUpdateDetectorErrorEntry+-- 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.IoTEventsData.Types.BatchUpdateDetectorErrorEntry where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.ErrorCode+import qualified Amazonka.Prelude as Prelude++-- | Information about the error that occurred when attempting to update a+-- detector.+--+-- /See:/ 'newBatchUpdateDetectorErrorEntry' smart constructor.+data BatchUpdateDetectorErrorEntry = BatchUpdateDetectorErrorEntry'+  { -- | The error code.+    errorCode :: Prelude.Maybe ErrorCode,+    -- | A message that describes the error.+    errorMessage :: Prelude.Maybe Prelude.Text,+    -- | The @\"messageId\"@ of the update request that caused the error. (The+    -- value of the @\"messageId\"@ in the update request @\"Detector\"@+    -- object.)+    messageId :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchUpdateDetectorErrorEntry' 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:+--+-- 'errorCode', 'batchUpdateDetectorErrorEntry_errorCode' - The error code.+--+-- 'errorMessage', 'batchUpdateDetectorErrorEntry_errorMessage' - A message that describes the error.+--+-- 'messageId', 'batchUpdateDetectorErrorEntry_messageId' - The @\"messageId\"@ of the update request that caused the error. (The+-- value of the @\"messageId\"@ in the update request @\"Detector\"@+-- object.)+newBatchUpdateDetectorErrorEntry ::+  BatchUpdateDetectorErrorEntry+newBatchUpdateDetectorErrorEntry =+  BatchUpdateDetectorErrorEntry'+    { errorCode =+        Prelude.Nothing,+      errorMessage = Prelude.Nothing,+      messageId = Prelude.Nothing+    }++-- | The error code.+batchUpdateDetectorErrorEntry_errorCode :: Lens.Lens' BatchUpdateDetectorErrorEntry (Prelude.Maybe ErrorCode)+batchUpdateDetectorErrorEntry_errorCode = Lens.lens (\BatchUpdateDetectorErrorEntry' {errorCode} -> errorCode) (\s@BatchUpdateDetectorErrorEntry' {} a -> s {errorCode = a} :: BatchUpdateDetectorErrorEntry)++-- | A message that describes the error.+batchUpdateDetectorErrorEntry_errorMessage :: Lens.Lens' BatchUpdateDetectorErrorEntry (Prelude.Maybe Prelude.Text)+batchUpdateDetectorErrorEntry_errorMessage = Lens.lens (\BatchUpdateDetectorErrorEntry' {errorMessage} -> errorMessage) (\s@BatchUpdateDetectorErrorEntry' {} a -> s {errorMessage = a} :: BatchUpdateDetectorErrorEntry)++-- | The @\"messageId\"@ of the update request that caused the error. (The+-- value of the @\"messageId\"@ in the update request @\"Detector\"@+-- object.)+batchUpdateDetectorErrorEntry_messageId :: Lens.Lens' BatchUpdateDetectorErrorEntry (Prelude.Maybe Prelude.Text)+batchUpdateDetectorErrorEntry_messageId = Lens.lens (\BatchUpdateDetectorErrorEntry' {messageId} -> messageId) (\s@BatchUpdateDetectorErrorEntry' {} a -> s {messageId = a} :: BatchUpdateDetectorErrorEntry)++instance Data.FromJSON BatchUpdateDetectorErrorEntry where+  parseJSON =+    Data.withObject+      "BatchUpdateDetectorErrorEntry"+      ( \x ->+          BatchUpdateDetectorErrorEntry'+            Prelude.<$> (x Data..:? "errorCode")+            Prelude.<*> (x Data..:? "errorMessage")+            Prelude.<*> (x Data..:? "messageId")+      )++instance+  Prelude.Hashable+    BatchUpdateDetectorErrorEntry+  where+  hashWithSalt _salt BatchUpdateDetectorErrorEntry' {..} =+    _salt+      `Prelude.hashWithSalt` errorCode+      `Prelude.hashWithSalt` errorMessage+      `Prelude.hashWithSalt` messageId++instance Prelude.NFData BatchUpdateDetectorErrorEntry where+  rnf BatchUpdateDetectorErrorEntry' {..} =+    Prelude.rnf errorCode+      `Prelude.seq` Prelude.rnf errorMessage+      `Prelude.seq` Prelude.rnf messageId
+ gen/Amazonka/IoTEventsData/Types/ComparisonOperator.hs view
@@ -0,0 +1,91 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.IoTEventsData.Types.ComparisonOperator+-- 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.IoTEventsData.Types.ComparisonOperator+  ( ComparisonOperator+      ( ..,+        ComparisonOperator_EQUAL,+        ComparisonOperator_GREATER,+        ComparisonOperator_GREATER_OR_EQUAL,+        ComparisonOperator_LESS,+        ComparisonOperator_LESS_OR_EQUAL,+        ComparisonOperator_NOT_EQUAL+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ComparisonOperator = ComparisonOperator'+  { fromComparisonOperator ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern ComparisonOperator_EQUAL :: ComparisonOperator+pattern ComparisonOperator_EQUAL = ComparisonOperator' "EQUAL"++pattern ComparisonOperator_GREATER :: ComparisonOperator+pattern ComparisonOperator_GREATER = ComparisonOperator' "GREATER"++pattern ComparisonOperator_GREATER_OR_EQUAL :: ComparisonOperator+pattern ComparisonOperator_GREATER_OR_EQUAL = ComparisonOperator' "GREATER_OR_EQUAL"++pattern ComparisonOperator_LESS :: ComparisonOperator+pattern ComparisonOperator_LESS = ComparisonOperator' "LESS"++pattern ComparisonOperator_LESS_OR_EQUAL :: ComparisonOperator+pattern ComparisonOperator_LESS_OR_EQUAL = ComparisonOperator' "LESS_OR_EQUAL"++pattern ComparisonOperator_NOT_EQUAL :: ComparisonOperator+pattern ComparisonOperator_NOT_EQUAL = ComparisonOperator' "NOT_EQUAL"++{-# COMPLETE+  ComparisonOperator_EQUAL,+  ComparisonOperator_GREATER,+  ComparisonOperator_GREATER_OR_EQUAL,+  ComparisonOperator_LESS,+  ComparisonOperator_LESS_OR_EQUAL,+  ComparisonOperator_NOT_EQUAL,+  ComparisonOperator'+  #-}
+ gen/Amazonka/IoTEventsData/Types/CustomerAction.hs view
@@ -0,0 +1,200 @@+{-# 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.IoTEventsData.Types.CustomerAction+-- 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.IoTEventsData.Types.CustomerAction where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.AcknowledgeActionConfiguration+import Amazonka.IoTEventsData.Types.CustomerActionName+import Amazonka.IoTEventsData.Types.DisableActionConfiguration+import Amazonka.IoTEventsData.Types.EnableActionConfiguration+import Amazonka.IoTEventsData.Types.ResetActionConfiguration+import Amazonka.IoTEventsData.Types.SnoozeActionConfiguration+import qualified Amazonka.Prelude as Prelude++-- | Contains information about the action that you can take to respond to+-- the alarm.+--+-- /See:/ 'newCustomerAction' smart constructor.+data CustomerAction = CustomerAction'+  { -- | Contains the configuration information of an acknowledge action.+    acknowledgeActionConfiguration :: Prelude.Maybe AcknowledgeActionConfiguration,+    -- | The name of the action. The action name can be one of the following+    -- values:+    --+    -- -   @SNOOZE@ - When you snooze the alarm, the alarm state changes to+    --     @SNOOZE_DISABLED@.+    --+    -- -   @ENABLE@ - When you enable the alarm, the alarm state changes to+    --     @NORMAL@.+    --+    -- -   @DISABLE@ - When you disable the alarm, the alarm state changes to+    --     @DISABLED@.+    --+    -- -   @ACKNOWLEDGE@ - When you acknowledge the alarm, the alarm state+    --     changes to @ACKNOWLEDGED@.+    --+    -- -   @RESET@ - When you reset the alarm, the alarm state changes to+    --     @NORMAL@.+    --+    -- For more information, see the+    -- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_AlarmState.html AlarmState>+    -- API.+    actionName :: Prelude.Maybe CustomerActionName,+    -- | Contains the configuration information of a disable action.+    disableActionConfiguration :: Prelude.Maybe DisableActionConfiguration,+    -- | Contains the configuration information of an enable action.+    enableActionConfiguration :: Prelude.Maybe EnableActionConfiguration,+    -- | Contains the configuration information of a reset action.+    resetActionConfiguration :: Prelude.Maybe ResetActionConfiguration,+    -- | Contains the configuration information of a snooze action.+    snoozeActionConfiguration :: Prelude.Maybe SnoozeActionConfiguration+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CustomerAction' 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:+--+-- 'acknowledgeActionConfiguration', 'customerAction_acknowledgeActionConfiguration' - Contains the configuration information of an acknowledge action.+--+-- 'actionName', 'customerAction_actionName' - The name of the action. The action name can be one of the following+-- values:+--+-- -   @SNOOZE@ - When you snooze the alarm, the alarm state changes to+--     @SNOOZE_DISABLED@.+--+-- -   @ENABLE@ - When you enable the alarm, the alarm state changes to+--     @NORMAL@.+--+-- -   @DISABLE@ - When you disable the alarm, the alarm state changes to+--     @DISABLED@.+--+-- -   @ACKNOWLEDGE@ - When you acknowledge the alarm, the alarm state+--     changes to @ACKNOWLEDGED@.+--+-- -   @RESET@ - When you reset the alarm, the alarm state changes to+--     @NORMAL@.+--+-- For more information, see the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_AlarmState.html AlarmState>+-- API.+--+-- 'disableActionConfiguration', 'customerAction_disableActionConfiguration' - Contains the configuration information of a disable action.+--+-- 'enableActionConfiguration', 'customerAction_enableActionConfiguration' - Contains the configuration information of an enable action.+--+-- 'resetActionConfiguration', 'customerAction_resetActionConfiguration' - Contains the configuration information of a reset action.+--+-- 'snoozeActionConfiguration', 'customerAction_snoozeActionConfiguration' - Contains the configuration information of a snooze action.+newCustomerAction ::+  CustomerAction+newCustomerAction =+  CustomerAction'+    { acknowledgeActionConfiguration =+        Prelude.Nothing,+      actionName = Prelude.Nothing,+      disableActionConfiguration = Prelude.Nothing,+      enableActionConfiguration = Prelude.Nothing,+      resetActionConfiguration = Prelude.Nothing,+      snoozeActionConfiguration = Prelude.Nothing+    }++-- | Contains the configuration information of an acknowledge action.+customerAction_acknowledgeActionConfiguration :: Lens.Lens' CustomerAction (Prelude.Maybe AcknowledgeActionConfiguration)+customerAction_acknowledgeActionConfiguration = Lens.lens (\CustomerAction' {acknowledgeActionConfiguration} -> acknowledgeActionConfiguration) (\s@CustomerAction' {} a -> s {acknowledgeActionConfiguration = a} :: CustomerAction)++-- | The name of the action. The action name can be one of the following+-- values:+--+-- -   @SNOOZE@ - When you snooze the alarm, the alarm state changes to+--     @SNOOZE_DISABLED@.+--+-- -   @ENABLE@ - When you enable the alarm, the alarm state changes to+--     @NORMAL@.+--+-- -   @DISABLE@ - When you disable the alarm, the alarm state changes to+--     @DISABLED@.+--+-- -   @ACKNOWLEDGE@ - When you acknowledge the alarm, the alarm state+--     changes to @ACKNOWLEDGED@.+--+-- -   @RESET@ - When you reset the alarm, the alarm state changes to+--     @NORMAL@.+--+-- For more information, see the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_AlarmState.html AlarmState>+-- API.+customerAction_actionName :: Lens.Lens' CustomerAction (Prelude.Maybe CustomerActionName)+customerAction_actionName = Lens.lens (\CustomerAction' {actionName} -> actionName) (\s@CustomerAction' {} a -> s {actionName = a} :: CustomerAction)++-- | Contains the configuration information of a disable action.+customerAction_disableActionConfiguration :: Lens.Lens' CustomerAction (Prelude.Maybe DisableActionConfiguration)+customerAction_disableActionConfiguration = Lens.lens (\CustomerAction' {disableActionConfiguration} -> disableActionConfiguration) (\s@CustomerAction' {} a -> s {disableActionConfiguration = a} :: CustomerAction)++-- | Contains the configuration information of an enable action.+customerAction_enableActionConfiguration :: Lens.Lens' CustomerAction (Prelude.Maybe EnableActionConfiguration)+customerAction_enableActionConfiguration = Lens.lens (\CustomerAction' {enableActionConfiguration} -> enableActionConfiguration) (\s@CustomerAction' {} a -> s {enableActionConfiguration = a} :: CustomerAction)++-- | Contains the configuration information of a reset action.+customerAction_resetActionConfiguration :: Lens.Lens' CustomerAction (Prelude.Maybe ResetActionConfiguration)+customerAction_resetActionConfiguration = Lens.lens (\CustomerAction' {resetActionConfiguration} -> resetActionConfiguration) (\s@CustomerAction' {} a -> s {resetActionConfiguration = a} :: CustomerAction)++-- | Contains the configuration information of a snooze action.+customerAction_snoozeActionConfiguration :: Lens.Lens' CustomerAction (Prelude.Maybe SnoozeActionConfiguration)+customerAction_snoozeActionConfiguration = Lens.lens (\CustomerAction' {snoozeActionConfiguration} -> snoozeActionConfiguration) (\s@CustomerAction' {} a -> s {snoozeActionConfiguration = a} :: CustomerAction)++instance Data.FromJSON CustomerAction where+  parseJSON =+    Data.withObject+      "CustomerAction"+      ( \x ->+          CustomerAction'+            Prelude.<$> (x Data..:? "acknowledgeActionConfiguration")+            Prelude.<*> (x Data..:? "actionName")+            Prelude.<*> (x Data..:? "disableActionConfiguration")+            Prelude.<*> (x Data..:? "enableActionConfiguration")+            Prelude.<*> (x Data..:? "resetActionConfiguration")+            Prelude.<*> (x Data..:? "snoozeActionConfiguration")+      )++instance Prelude.Hashable CustomerAction where+  hashWithSalt _salt CustomerAction' {..} =+    _salt+      `Prelude.hashWithSalt` acknowledgeActionConfiguration+      `Prelude.hashWithSalt` actionName+      `Prelude.hashWithSalt` disableActionConfiguration+      `Prelude.hashWithSalt` enableActionConfiguration+      `Prelude.hashWithSalt` resetActionConfiguration+      `Prelude.hashWithSalt` snoozeActionConfiguration++instance Prelude.NFData CustomerAction where+  rnf CustomerAction' {..} =+    Prelude.rnf acknowledgeActionConfiguration+      `Prelude.seq` Prelude.rnf actionName+      `Prelude.seq` Prelude.rnf disableActionConfiguration+      `Prelude.seq` Prelude.rnf enableActionConfiguration+      `Prelude.seq` Prelude.rnf resetActionConfiguration+      `Prelude.seq` Prelude.rnf snoozeActionConfiguration
+ gen/Amazonka/IoTEventsData/Types/CustomerActionName.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.IoTEventsData.Types.CustomerActionName+-- 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.IoTEventsData.Types.CustomerActionName+  ( CustomerActionName+      ( ..,+        CustomerActionName_ACKNOWLEDGE,+        CustomerActionName_DISABLE,+        CustomerActionName_ENABLE,+        CustomerActionName_RESET,+        CustomerActionName_SNOOZE+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype CustomerActionName = CustomerActionName'+  { fromCustomerActionName ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern CustomerActionName_ACKNOWLEDGE :: CustomerActionName+pattern CustomerActionName_ACKNOWLEDGE = CustomerActionName' "ACKNOWLEDGE"++pattern CustomerActionName_DISABLE :: CustomerActionName+pattern CustomerActionName_DISABLE = CustomerActionName' "DISABLE"++pattern CustomerActionName_ENABLE :: CustomerActionName+pattern CustomerActionName_ENABLE = CustomerActionName' "ENABLE"++pattern CustomerActionName_RESET :: CustomerActionName+pattern CustomerActionName_RESET = CustomerActionName' "RESET"++pattern CustomerActionName_SNOOZE :: CustomerActionName+pattern CustomerActionName_SNOOZE = CustomerActionName' "SNOOZE"++{-# COMPLETE+  CustomerActionName_ACKNOWLEDGE,+  CustomerActionName_DISABLE,+  CustomerActionName_ENABLE,+  CustomerActionName_RESET,+  CustomerActionName_SNOOZE,+  CustomerActionName'+  #-}
+ gen/Amazonka/IoTEventsData/Types/DeleteDetectorRequest.hs view
@@ -0,0 +1,114 @@+{-# 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.IoTEventsData.Types.DeleteDetectorRequest+-- 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.IoTEventsData.Types.DeleteDetectorRequest 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++-- | Information used to delete the detector model.+--+-- /See:/ 'newDeleteDetectorRequest' smart constructor.+data DeleteDetectorRequest = DeleteDetectorRequest'+  { -- | The value of the+    -- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateDetectorModel.html#iotevents-CreateDetectorModel-request-key key>+    -- used to identify the detector.+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The ID to assign to the @DeleteDetectorRequest@. Each @\"messageId\"@+    -- must be unique within each batch sent.+    messageId :: Prelude.Text,+    -- | The name of the detector model that was used to create the detector+    -- instance.+    detectorModelName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteDetectorRequest' 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:+--+-- 'keyValue', 'deleteDetectorRequest_keyValue' - The value of the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateDetectorModel.html#iotevents-CreateDetectorModel-request-key key>+-- used to identify the detector.+--+-- 'messageId', 'deleteDetectorRequest_messageId' - The ID to assign to the @DeleteDetectorRequest@. Each @\"messageId\"@+-- must be unique within each batch sent.+--+-- 'detectorModelName', 'deleteDetectorRequest_detectorModelName' - The name of the detector model that was used to create the detector+-- instance.+newDeleteDetectorRequest ::+  -- | 'messageId'+  Prelude.Text ->+  -- | 'detectorModelName'+  Prelude.Text ->+  DeleteDetectorRequest+newDeleteDetectorRequest+  pMessageId_+  pDetectorModelName_ =+    DeleteDetectorRequest'+      { keyValue = Prelude.Nothing,+        messageId = pMessageId_,+        detectorModelName = pDetectorModelName_+      }++-- | The value of the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateDetectorModel.html#iotevents-CreateDetectorModel-request-key key>+-- used to identify the detector.+deleteDetectorRequest_keyValue :: Lens.Lens' DeleteDetectorRequest (Prelude.Maybe Prelude.Text)+deleteDetectorRequest_keyValue = Lens.lens (\DeleteDetectorRequest' {keyValue} -> keyValue) (\s@DeleteDetectorRequest' {} a -> s {keyValue = a} :: DeleteDetectorRequest)++-- | The ID to assign to the @DeleteDetectorRequest@. Each @\"messageId\"@+-- must be unique within each batch sent.+deleteDetectorRequest_messageId :: Lens.Lens' DeleteDetectorRequest Prelude.Text+deleteDetectorRequest_messageId = Lens.lens (\DeleteDetectorRequest' {messageId} -> messageId) (\s@DeleteDetectorRequest' {} a -> s {messageId = a} :: DeleteDetectorRequest)++-- | The name of the detector model that was used to create the detector+-- instance.+deleteDetectorRequest_detectorModelName :: Lens.Lens' DeleteDetectorRequest Prelude.Text+deleteDetectorRequest_detectorModelName = Lens.lens (\DeleteDetectorRequest' {detectorModelName} -> detectorModelName) (\s@DeleteDetectorRequest' {} a -> s {detectorModelName = a} :: DeleteDetectorRequest)++instance Prelude.Hashable DeleteDetectorRequest where+  hashWithSalt _salt DeleteDetectorRequest' {..} =+    _salt+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` messageId+      `Prelude.hashWithSalt` detectorModelName++instance Prelude.NFData DeleteDetectorRequest where+  rnf DeleteDetectorRequest' {..} =+    Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf messageId+      `Prelude.seq` Prelude.rnf detectorModelName++instance Data.ToJSON DeleteDetectorRequest where+  toJSON DeleteDetectorRequest' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("keyValue" Data..=) Prelude.<$> keyValue,+            Prelude.Just ("messageId" Data..= messageId),+            Prelude.Just+              ("detectorModelName" Data..= detectorModelName)+          ]+      )
+ gen/Amazonka/IoTEventsData/Types/Detector.hs view
@@ -0,0 +1,136 @@+{-# 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.IoTEventsData.Types.Detector+-- 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.IoTEventsData.Types.Detector where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.DetectorState+import qualified Amazonka.Prelude as Prelude++-- | Information about the detector (instance).+--+-- /See:/ 'newDetector' smart constructor.+data Detector = Detector'+  { -- | The time the detector (instance) was created.+    creationTime :: Prelude.Maybe Data.POSIX,+    -- | The name of the detector model that created this detector (instance).+    detectorModelName :: Prelude.Maybe Prelude.Text,+    -- | The version of the detector model that created this detector (instance).+    detectorModelVersion :: Prelude.Maybe Prelude.Text,+    -- | The value of the key (identifying the device or system) that caused the+    -- creation of this detector (instance).+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The time the detector (instance) was last updated.+    lastUpdateTime :: Prelude.Maybe Data.POSIX,+    -- | The current state of the detector (instance).+    state :: Prelude.Maybe DetectorState+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Detector' 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:+--+-- 'creationTime', 'detector_creationTime' - The time the detector (instance) was created.+--+-- 'detectorModelName', 'detector_detectorModelName' - The name of the detector model that created this detector (instance).+--+-- 'detectorModelVersion', 'detector_detectorModelVersion' - The version of the detector model that created this detector (instance).+--+-- 'keyValue', 'detector_keyValue' - The value of the key (identifying the device or system) that caused the+-- creation of this detector (instance).+--+-- 'lastUpdateTime', 'detector_lastUpdateTime' - The time the detector (instance) was last updated.+--+-- 'state', 'detector_state' - The current state of the detector (instance).+newDetector ::+  Detector+newDetector =+  Detector'+    { creationTime = Prelude.Nothing,+      detectorModelName = Prelude.Nothing,+      detectorModelVersion = Prelude.Nothing,+      keyValue = Prelude.Nothing,+      lastUpdateTime = Prelude.Nothing,+      state = Prelude.Nothing+    }++-- | The time the detector (instance) was created.+detector_creationTime :: Lens.Lens' Detector (Prelude.Maybe Prelude.UTCTime)+detector_creationTime = Lens.lens (\Detector' {creationTime} -> creationTime) (\s@Detector' {} a -> s {creationTime = a} :: Detector) Prelude.. Lens.mapping Data._Time++-- | The name of the detector model that created this detector (instance).+detector_detectorModelName :: Lens.Lens' Detector (Prelude.Maybe Prelude.Text)+detector_detectorModelName = Lens.lens (\Detector' {detectorModelName} -> detectorModelName) (\s@Detector' {} a -> s {detectorModelName = a} :: Detector)++-- | The version of the detector model that created this detector (instance).+detector_detectorModelVersion :: Lens.Lens' Detector (Prelude.Maybe Prelude.Text)+detector_detectorModelVersion = Lens.lens (\Detector' {detectorModelVersion} -> detectorModelVersion) (\s@Detector' {} a -> s {detectorModelVersion = a} :: Detector)++-- | The value of the key (identifying the device or system) that caused the+-- creation of this detector (instance).+detector_keyValue :: Lens.Lens' Detector (Prelude.Maybe Prelude.Text)+detector_keyValue = Lens.lens (\Detector' {keyValue} -> keyValue) (\s@Detector' {} a -> s {keyValue = a} :: Detector)++-- | The time the detector (instance) was last updated.+detector_lastUpdateTime :: Lens.Lens' Detector (Prelude.Maybe Prelude.UTCTime)+detector_lastUpdateTime = Lens.lens (\Detector' {lastUpdateTime} -> lastUpdateTime) (\s@Detector' {} a -> s {lastUpdateTime = a} :: Detector) Prelude.. Lens.mapping Data._Time++-- | The current state of the detector (instance).+detector_state :: Lens.Lens' Detector (Prelude.Maybe DetectorState)+detector_state = Lens.lens (\Detector' {state} -> state) (\s@Detector' {} a -> s {state = a} :: Detector)++instance Data.FromJSON Detector where+  parseJSON =+    Data.withObject+      "Detector"+      ( \x ->+          Detector'+            Prelude.<$> (x Data..:? "creationTime")+            Prelude.<*> (x Data..:? "detectorModelName")+            Prelude.<*> (x Data..:? "detectorModelVersion")+            Prelude.<*> (x Data..:? "keyValue")+            Prelude.<*> (x Data..:? "lastUpdateTime")+            Prelude.<*> (x Data..:? "state")+      )++instance Prelude.Hashable Detector where+  hashWithSalt _salt Detector' {..} =+    _salt+      `Prelude.hashWithSalt` creationTime+      `Prelude.hashWithSalt` detectorModelName+      `Prelude.hashWithSalt` detectorModelVersion+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` lastUpdateTime+      `Prelude.hashWithSalt` state++instance Prelude.NFData Detector where+  rnf Detector' {..} =+    Prelude.rnf creationTime+      `Prelude.seq` Prelude.rnf detectorModelName+      `Prelude.seq` Prelude.rnf detectorModelVersion+      `Prelude.seq` Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf lastUpdateTime+      `Prelude.seq` Prelude.rnf state
+ gen/Amazonka/IoTEventsData/Types/DetectorState.hs view
@@ -0,0 +1,100 @@+{-# 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.IoTEventsData.Types.DetectorState+-- 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.IoTEventsData.Types.DetectorState where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.Timer+import Amazonka.IoTEventsData.Types.Variable+import qualified Amazonka.Prelude as Prelude++-- | Information about the current state of the detector instance.+--+-- /See:/ 'newDetectorState' smart constructor.+data DetectorState = DetectorState'+  { -- | The name of the state.+    stateName :: Prelude.Text,+    -- | The current values of the detector\'s variables.+    variables :: [Variable],+    -- | The current state of the detector\'s timers.+    timers :: [Timer]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DetectorState' 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:+--+-- 'stateName', 'detectorState_stateName' - The name of the state.+--+-- 'variables', 'detectorState_variables' - The current values of the detector\'s variables.+--+-- 'timers', 'detectorState_timers' - The current state of the detector\'s timers.+newDetectorState ::+  -- | 'stateName'+  Prelude.Text ->+  DetectorState+newDetectorState pStateName_ =+  DetectorState'+    { stateName = pStateName_,+      variables = Prelude.mempty,+      timers = Prelude.mempty+    }++-- | The name of the state.+detectorState_stateName :: Lens.Lens' DetectorState Prelude.Text+detectorState_stateName = Lens.lens (\DetectorState' {stateName} -> stateName) (\s@DetectorState' {} a -> s {stateName = a} :: DetectorState)++-- | The current values of the detector\'s variables.+detectorState_variables :: Lens.Lens' DetectorState [Variable]+detectorState_variables = Lens.lens (\DetectorState' {variables} -> variables) (\s@DetectorState' {} a -> s {variables = a} :: DetectorState) Prelude.. Lens.coerced++-- | The current state of the detector\'s timers.+detectorState_timers :: Lens.Lens' DetectorState [Timer]+detectorState_timers = Lens.lens (\DetectorState' {timers} -> timers) (\s@DetectorState' {} a -> s {timers = a} :: DetectorState) Prelude.. Lens.coerced++instance Data.FromJSON DetectorState where+  parseJSON =+    Data.withObject+      "DetectorState"+      ( \x ->+          DetectorState'+            Prelude.<$> (x Data..: "stateName")+            Prelude.<*> (x Data..:? "variables" Data..!= Prelude.mempty)+            Prelude.<*> (x Data..:? "timers" Data..!= Prelude.mempty)+      )++instance Prelude.Hashable DetectorState where+  hashWithSalt _salt DetectorState' {..} =+    _salt+      `Prelude.hashWithSalt` stateName+      `Prelude.hashWithSalt` variables+      `Prelude.hashWithSalt` timers++instance Prelude.NFData DetectorState where+  rnf DetectorState' {..} =+    Prelude.rnf stateName+      `Prelude.seq` Prelude.rnf variables+      `Prelude.seq` Prelude.rnf timers
+ gen/Amazonka/IoTEventsData/Types/DetectorStateDefinition.hs view
@@ -0,0 +1,106 @@+{-# 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.IoTEventsData.Types.DetectorStateDefinition+-- 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.IoTEventsData.Types.DetectorStateDefinition where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.TimerDefinition+import Amazonka.IoTEventsData.Types.VariableDefinition+import qualified Amazonka.Prelude as Prelude++-- | The new state, variable values, and timer settings of the detector+-- (instance).+--+-- /See:/ 'newDetectorStateDefinition' smart constructor.+data DetectorStateDefinition = DetectorStateDefinition'+  { -- | The name of the new state of the detector (instance).+    stateName :: Prelude.Text,+    -- | The new values of the detector\'s variables. Any variable whose value+    -- isn\'t specified is cleared.+    variables :: [VariableDefinition],+    -- | The new values of the detector\'s timers. Any timer whose value isn\'t+    -- specified is cleared, and its timeout event won\'t occur.+    timers :: [TimerDefinition]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DetectorStateDefinition' 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:+--+-- 'stateName', 'detectorStateDefinition_stateName' - The name of the new state of the detector (instance).+--+-- 'variables', 'detectorStateDefinition_variables' - The new values of the detector\'s variables. Any variable whose value+-- isn\'t specified is cleared.+--+-- 'timers', 'detectorStateDefinition_timers' - The new values of the detector\'s timers. Any timer whose value isn\'t+-- specified is cleared, and its timeout event won\'t occur.+newDetectorStateDefinition ::+  -- | 'stateName'+  Prelude.Text ->+  DetectorStateDefinition+newDetectorStateDefinition pStateName_ =+  DetectorStateDefinition'+    { stateName = pStateName_,+      variables = Prelude.mempty,+      timers = Prelude.mempty+    }++-- | The name of the new state of the detector (instance).+detectorStateDefinition_stateName :: Lens.Lens' DetectorStateDefinition Prelude.Text+detectorStateDefinition_stateName = Lens.lens (\DetectorStateDefinition' {stateName} -> stateName) (\s@DetectorStateDefinition' {} a -> s {stateName = a} :: DetectorStateDefinition)++-- | The new values of the detector\'s variables. Any variable whose value+-- isn\'t specified is cleared.+detectorStateDefinition_variables :: Lens.Lens' DetectorStateDefinition [VariableDefinition]+detectorStateDefinition_variables = Lens.lens (\DetectorStateDefinition' {variables} -> variables) (\s@DetectorStateDefinition' {} a -> s {variables = a} :: DetectorStateDefinition) Prelude.. Lens.coerced++-- | The new values of the detector\'s timers. Any timer whose value isn\'t+-- specified is cleared, and its timeout event won\'t occur.+detectorStateDefinition_timers :: Lens.Lens' DetectorStateDefinition [TimerDefinition]+detectorStateDefinition_timers = Lens.lens (\DetectorStateDefinition' {timers} -> timers) (\s@DetectorStateDefinition' {} a -> s {timers = a} :: DetectorStateDefinition) Prelude.. Lens.coerced++instance Prelude.Hashable DetectorStateDefinition where+  hashWithSalt _salt DetectorStateDefinition' {..} =+    _salt+      `Prelude.hashWithSalt` stateName+      `Prelude.hashWithSalt` variables+      `Prelude.hashWithSalt` timers++instance Prelude.NFData DetectorStateDefinition where+  rnf DetectorStateDefinition' {..} =+    Prelude.rnf stateName+      `Prelude.seq` Prelude.rnf variables+      `Prelude.seq` Prelude.rnf timers++instance Data.ToJSON DetectorStateDefinition where+  toJSON DetectorStateDefinition' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("stateName" Data..= stateName),+            Prelude.Just ("variables" Data..= variables),+            Prelude.Just ("timers" Data..= timers)+          ]+      )
+ gen/Amazonka/IoTEventsData/Types/DetectorStateSummary.hs view
@@ -0,0 +1,68 @@+{-# 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.IoTEventsData.Types.DetectorStateSummary+-- 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.IoTEventsData.Types.DetectorStateSummary 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++-- | Information about the detector state.+--+-- /See:/ 'newDetectorStateSummary' smart constructor.+data DetectorStateSummary = DetectorStateSummary'+  { -- | The name of the state.+    stateName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DetectorStateSummary' 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:+--+-- 'stateName', 'detectorStateSummary_stateName' - The name of the state.+newDetectorStateSummary ::+  DetectorStateSummary+newDetectorStateSummary =+  DetectorStateSummary' {stateName = Prelude.Nothing}++-- | The name of the state.+detectorStateSummary_stateName :: Lens.Lens' DetectorStateSummary (Prelude.Maybe Prelude.Text)+detectorStateSummary_stateName = Lens.lens (\DetectorStateSummary' {stateName} -> stateName) (\s@DetectorStateSummary' {} a -> s {stateName = a} :: DetectorStateSummary)++instance Data.FromJSON DetectorStateSummary where+  parseJSON =+    Data.withObject+      "DetectorStateSummary"+      ( \x ->+          DetectorStateSummary'+            Prelude.<$> (x Data..:? "stateName")+      )++instance Prelude.Hashable DetectorStateSummary where+  hashWithSalt _salt DetectorStateSummary' {..} =+    _salt `Prelude.hashWithSalt` stateName++instance Prelude.NFData DetectorStateSummary where+  rnf DetectorStateSummary' {..} = Prelude.rnf stateName
+ gen/Amazonka/IoTEventsData/Types/DetectorSummary.hs view
@@ -0,0 +1,136 @@+{-# 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.IoTEventsData.Types.DetectorSummary+-- 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.IoTEventsData.Types.DetectorSummary where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.DetectorStateSummary+import qualified Amazonka.Prelude as Prelude++-- | Information about the detector (instance).+--+-- /See:/ 'newDetectorSummary' smart constructor.+data DetectorSummary = DetectorSummary'+  { -- | The time the detector (instance) was created.+    creationTime :: Prelude.Maybe Data.POSIX,+    -- | The name of the detector model that created this detector (instance).+    detectorModelName :: Prelude.Maybe Prelude.Text,+    -- | The version of the detector model that created this detector (instance).+    detectorModelVersion :: Prelude.Maybe Prelude.Text,+    -- | The value of the key (identifying the device or system) that caused the+    -- creation of this detector (instance).+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The time the detector (instance) was last updated.+    lastUpdateTime :: Prelude.Maybe Data.POSIX,+    -- | The current state of the detector (instance).+    state :: Prelude.Maybe DetectorStateSummary+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DetectorSummary' 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:+--+-- 'creationTime', 'detectorSummary_creationTime' - The time the detector (instance) was created.+--+-- 'detectorModelName', 'detectorSummary_detectorModelName' - The name of the detector model that created this detector (instance).+--+-- 'detectorModelVersion', 'detectorSummary_detectorModelVersion' - The version of the detector model that created this detector (instance).+--+-- 'keyValue', 'detectorSummary_keyValue' - The value of the key (identifying the device or system) that caused the+-- creation of this detector (instance).+--+-- 'lastUpdateTime', 'detectorSummary_lastUpdateTime' - The time the detector (instance) was last updated.+--+-- 'state', 'detectorSummary_state' - The current state of the detector (instance).+newDetectorSummary ::+  DetectorSummary+newDetectorSummary =+  DetectorSummary'+    { creationTime = Prelude.Nothing,+      detectorModelName = Prelude.Nothing,+      detectorModelVersion = Prelude.Nothing,+      keyValue = Prelude.Nothing,+      lastUpdateTime = Prelude.Nothing,+      state = Prelude.Nothing+    }++-- | The time the detector (instance) was created.+detectorSummary_creationTime :: Lens.Lens' DetectorSummary (Prelude.Maybe Prelude.UTCTime)+detectorSummary_creationTime = Lens.lens (\DetectorSummary' {creationTime} -> creationTime) (\s@DetectorSummary' {} a -> s {creationTime = a} :: DetectorSummary) Prelude.. Lens.mapping Data._Time++-- | The name of the detector model that created this detector (instance).+detectorSummary_detectorModelName :: Lens.Lens' DetectorSummary (Prelude.Maybe Prelude.Text)+detectorSummary_detectorModelName = Lens.lens (\DetectorSummary' {detectorModelName} -> detectorModelName) (\s@DetectorSummary' {} a -> s {detectorModelName = a} :: DetectorSummary)++-- | The version of the detector model that created this detector (instance).+detectorSummary_detectorModelVersion :: Lens.Lens' DetectorSummary (Prelude.Maybe Prelude.Text)+detectorSummary_detectorModelVersion = Lens.lens (\DetectorSummary' {detectorModelVersion} -> detectorModelVersion) (\s@DetectorSummary' {} a -> s {detectorModelVersion = a} :: DetectorSummary)++-- | The value of the key (identifying the device or system) that caused the+-- creation of this detector (instance).+detectorSummary_keyValue :: Lens.Lens' DetectorSummary (Prelude.Maybe Prelude.Text)+detectorSummary_keyValue = Lens.lens (\DetectorSummary' {keyValue} -> keyValue) (\s@DetectorSummary' {} a -> s {keyValue = a} :: DetectorSummary)++-- | The time the detector (instance) was last updated.+detectorSummary_lastUpdateTime :: Lens.Lens' DetectorSummary (Prelude.Maybe Prelude.UTCTime)+detectorSummary_lastUpdateTime = Lens.lens (\DetectorSummary' {lastUpdateTime} -> lastUpdateTime) (\s@DetectorSummary' {} a -> s {lastUpdateTime = a} :: DetectorSummary) Prelude.. Lens.mapping Data._Time++-- | The current state of the detector (instance).+detectorSummary_state :: Lens.Lens' DetectorSummary (Prelude.Maybe DetectorStateSummary)+detectorSummary_state = Lens.lens (\DetectorSummary' {state} -> state) (\s@DetectorSummary' {} a -> s {state = a} :: DetectorSummary)++instance Data.FromJSON DetectorSummary where+  parseJSON =+    Data.withObject+      "DetectorSummary"+      ( \x ->+          DetectorSummary'+            Prelude.<$> (x Data..:? "creationTime")+            Prelude.<*> (x Data..:? "detectorModelName")+            Prelude.<*> (x Data..:? "detectorModelVersion")+            Prelude.<*> (x Data..:? "keyValue")+            Prelude.<*> (x Data..:? "lastUpdateTime")+            Prelude.<*> (x Data..:? "state")+      )++instance Prelude.Hashable DetectorSummary where+  hashWithSalt _salt DetectorSummary' {..} =+    _salt+      `Prelude.hashWithSalt` creationTime+      `Prelude.hashWithSalt` detectorModelName+      `Prelude.hashWithSalt` detectorModelVersion+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` lastUpdateTime+      `Prelude.hashWithSalt` state++instance Prelude.NFData DetectorSummary where+  rnf DetectorSummary' {..} =+    Prelude.rnf creationTime+      `Prelude.seq` Prelude.rnf detectorModelName+      `Prelude.seq` Prelude.rnf detectorModelVersion+      `Prelude.seq` Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf lastUpdateTime+      `Prelude.seq` Prelude.rnf state
+ gen/Amazonka/IoTEventsData/Types/DisableActionConfiguration.hs view
@@ -0,0 +1,69 @@+{-# 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.IoTEventsData.Types.DisableActionConfiguration+-- 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.IoTEventsData.Types.DisableActionConfiguration 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++-- | Contains the configuration information of a disable action.+--+-- /See:/ 'newDisableActionConfiguration' smart constructor.+data DisableActionConfiguration = DisableActionConfiguration'+  { -- | The note that you can leave when you disable the alarm.+    note :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisableActionConfiguration' 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:+--+-- 'note', 'disableActionConfiguration_note' - The note that you can leave when you disable the alarm.+newDisableActionConfiguration ::+  DisableActionConfiguration+newDisableActionConfiguration =+  DisableActionConfiguration' {note = Prelude.Nothing}++-- | The note that you can leave when you disable the alarm.+disableActionConfiguration_note :: Lens.Lens' DisableActionConfiguration (Prelude.Maybe Prelude.Text)+disableActionConfiguration_note = Lens.lens (\DisableActionConfiguration' {note} -> note) (\s@DisableActionConfiguration' {} a -> s {note = a} :: DisableActionConfiguration)++instance Data.FromJSON DisableActionConfiguration where+  parseJSON =+    Data.withObject+      "DisableActionConfiguration"+      ( \x ->+          DisableActionConfiguration'+            Prelude.<$> (x Data..:? "note")+      )++instance Prelude.Hashable DisableActionConfiguration where+  hashWithSalt _salt DisableActionConfiguration' {..} =+    _salt `Prelude.hashWithSalt` note++instance Prelude.NFData DisableActionConfiguration where+  rnf DisableActionConfiguration' {..} =+    Prelude.rnf note
+ gen/Amazonka/IoTEventsData/Types/DisableAlarmActionRequest.hs view
@@ -0,0 +1,121 @@+{-# 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.IoTEventsData.Types.DisableAlarmActionRequest+-- 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.IoTEventsData.Types.DisableAlarmActionRequest 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++-- | Information used to disable the alarm.+--+-- /See:/ 'newDisableAlarmActionRequest' smart constructor.+data DisableAlarmActionRequest = DisableAlarmActionRequest'+  { -- | The value of the key used as a filter to select only the alarms+    -- associated with the+    -- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The note that you can leave when you disable the alarm.+    note :: Prelude.Maybe Prelude.Text,+    -- | The request ID. Each ID must be unique within each batch.+    requestId :: Prelude.Text,+    -- | The name of the alarm model.+    alarmModelName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisableAlarmActionRequest' 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:+--+-- 'keyValue', 'disableAlarmActionRequest_keyValue' - The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+--+-- 'note', 'disableAlarmActionRequest_note' - The note that you can leave when you disable the alarm.+--+-- 'requestId', 'disableAlarmActionRequest_requestId' - The request ID. Each ID must be unique within each batch.+--+-- 'alarmModelName', 'disableAlarmActionRequest_alarmModelName' - The name of the alarm model.+newDisableAlarmActionRequest ::+  -- | 'requestId'+  Prelude.Text ->+  -- | 'alarmModelName'+  Prelude.Text ->+  DisableAlarmActionRequest+newDisableAlarmActionRequest+  pRequestId_+  pAlarmModelName_ =+    DisableAlarmActionRequest'+      { keyValue =+          Prelude.Nothing,+        note = Prelude.Nothing,+        requestId = pRequestId_,+        alarmModelName = pAlarmModelName_+      }++-- | The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+disableAlarmActionRequest_keyValue :: Lens.Lens' DisableAlarmActionRequest (Prelude.Maybe Prelude.Text)+disableAlarmActionRequest_keyValue = Lens.lens (\DisableAlarmActionRequest' {keyValue} -> keyValue) (\s@DisableAlarmActionRequest' {} a -> s {keyValue = a} :: DisableAlarmActionRequest)++-- | The note that you can leave when you disable the alarm.+disableAlarmActionRequest_note :: Lens.Lens' DisableAlarmActionRequest (Prelude.Maybe Prelude.Text)+disableAlarmActionRequest_note = Lens.lens (\DisableAlarmActionRequest' {note} -> note) (\s@DisableAlarmActionRequest' {} a -> s {note = a} :: DisableAlarmActionRequest)++-- | The request ID. Each ID must be unique within each batch.+disableAlarmActionRequest_requestId :: Lens.Lens' DisableAlarmActionRequest Prelude.Text+disableAlarmActionRequest_requestId = Lens.lens (\DisableAlarmActionRequest' {requestId} -> requestId) (\s@DisableAlarmActionRequest' {} a -> s {requestId = a} :: DisableAlarmActionRequest)++-- | The name of the alarm model.+disableAlarmActionRequest_alarmModelName :: Lens.Lens' DisableAlarmActionRequest Prelude.Text+disableAlarmActionRequest_alarmModelName = Lens.lens (\DisableAlarmActionRequest' {alarmModelName} -> alarmModelName) (\s@DisableAlarmActionRequest' {} a -> s {alarmModelName = a} :: DisableAlarmActionRequest)++instance Prelude.Hashable DisableAlarmActionRequest where+  hashWithSalt _salt DisableAlarmActionRequest' {..} =+    _salt+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` note+      `Prelude.hashWithSalt` requestId+      `Prelude.hashWithSalt` alarmModelName++instance Prelude.NFData DisableAlarmActionRequest where+  rnf DisableAlarmActionRequest' {..} =+    Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf note+      `Prelude.seq` Prelude.rnf requestId+      `Prelude.seq` Prelude.rnf alarmModelName++instance Data.ToJSON DisableAlarmActionRequest where+  toJSON DisableAlarmActionRequest' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("keyValue" Data..=) Prelude.<$> keyValue,+            ("note" Data..=) Prelude.<$> note,+            Prelude.Just ("requestId" Data..= requestId),+            Prelude.Just+              ("alarmModelName" Data..= alarmModelName)+          ]+      )
+ gen/Amazonka/IoTEventsData/Types/EnableActionConfiguration.hs view
@@ -0,0 +1,68 @@+{-# 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.IoTEventsData.Types.EnableActionConfiguration+-- 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.IoTEventsData.Types.EnableActionConfiguration 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++-- | Contains the configuration information of an enable action.+--+-- /See:/ 'newEnableActionConfiguration' smart constructor.+data EnableActionConfiguration = EnableActionConfiguration'+  { -- | The note that you can leave when you enable the alarm.+    note :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EnableActionConfiguration' 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:+--+-- 'note', 'enableActionConfiguration_note' - The note that you can leave when you enable the alarm.+newEnableActionConfiguration ::+  EnableActionConfiguration+newEnableActionConfiguration =+  EnableActionConfiguration' {note = Prelude.Nothing}++-- | The note that you can leave when you enable the alarm.+enableActionConfiguration_note :: Lens.Lens' EnableActionConfiguration (Prelude.Maybe Prelude.Text)+enableActionConfiguration_note = Lens.lens (\EnableActionConfiguration' {note} -> note) (\s@EnableActionConfiguration' {} a -> s {note = a} :: EnableActionConfiguration)++instance Data.FromJSON EnableActionConfiguration where+  parseJSON =+    Data.withObject+      "EnableActionConfiguration"+      ( \x ->+          EnableActionConfiguration'+            Prelude.<$> (x Data..:? "note")+      )++instance Prelude.Hashable EnableActionConfiguration where+  hashWithSalt _salt EnableActionConfiguration' {..} =+    _salt `Prelude.hashWithSalt` note++instance Prelude.NFData EnableActionConfiguration where+  rnf EnableActionConfiguration' {..} = Prelude.rnf note
+ gen/Amazonka/IoTEventsData/Types/EnableAlarmActionRequest.hs view
@@ -0,0 +1,121 @@+{-# 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.IoTEventsData.Types.EnableAlarmActionRequest+-- 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.IoTEventsData.Types.EnableAlarmActionRequest 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++-- | Information needed to enable the alarm.+--+-- /See:/ 'newEnableAlarmActionRequest' smart constructor.+data EnableAlarmActionRequest = EnableAlarmActionRequest'+  { -- | The value of the key used as a filter to select only the alarms+    -- associated with the+    -- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The note that you can leave when you enable the alarm.+    note :: Prelude.Maybe Prelude.Text,+    -- | The request ID. Each ID must be unique within each batch.+    requestId :: Prelude.Text,+    -- | The name of the alarm model.+    alarmModelName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EnableAlarmActionRequest' 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:+--+-- 'keyValue', 'enableAlarmActionRequest_keyValue' - The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+--+-- 'note', 'enableAlarmActionRequest_note' - The note that you can leave when you enable the alarm.+--+-- 'requestId', 'enableAlarmActionRequest_requestId' - The request ID. Each ID must be unique within each batch.+--+-- 'alarmModelName', 'enableAlarmActionRequest_alarmModelName' - The name of the alarm model.+newEnableAlarmActionRequest ::+  -- | 'requestId'+  Prelude.Text ->+  -- | 'alarmModelName'+  Prelude.Text ->+  EnableAlarmActionRequest+newEnableAlarmActionRequest+  pRequestId_+  pAlarmModelName_ =+    EnableAlarmActionRequest'+      { keyValue =+          Prelude.Nothing,+        note = Prelude.Nothing,+        requestId = pRequestId_,+        alarmModelName = pAlarmModelName_+      }++-- | The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+enableAlarmActionRequest_keyValue :: Lens.Lens' EnableAlarmActionRequest (Prelude.Maybe Prelude.Text)+enableAlarmActionRequest_keyValue = Lens.lens (\EnableAlarmActionRequest' {keyValue} -> keyValue) (\s@EnableAlarmActionRequest' {} a -> s {keyValue = a} :: EnableAlarmActionRequest)++-- | The note that you can leave when you enable the alarm.+enableAlarmActionRequest_note :: Lens.Lens' EnableAlarmActionRequest (Prelude.Maybe Prelude.Text)+enableAlarmActionRequest_note = Lens.lens (\EnableAlarmActionRequest' {note} -> note) (\s@EnableAlarmActionRequest' {} a -> s {note = a} :: EnableAlarmActionRequest)++-- | The request ID. Each ID must be unique within each batch.+enableAlarmActionRequest_requestId :: Lens.Lens' EnableAlarmActionRequest Prelude.Text+enableAlarmActionRequest_requestId = Lens.lens (\EnableAlarmActionRequest' {requestId} -> requestId) (\s@EnableAlarmActionRequest' {} a -> s {requestId = a} :: EnableAlarmActionRequest)++-- | The name of the alarm model.+enableAlarmActionRequest_alarmModelName :: Lens.Lens' EnableAlarmActionRequest Prelude.Text+enableAlarmActionRequest_alarmModelName = Lens.lens (\EnableAlarmActionRequest' {alarmModelName} -> alarmModelName) (\s@EnableAlarmActionRequest' {} a -> s {alarmModelName = a} :: EnableAlarmActionRequest)++instance Prelude.Hashable EnableAlarmActionRequest where+  hashWithSalt _salt EnableAlarmActionRequest' {..} =+    _salt+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` note+      `Prelude.hashWithSalt` requestId+      `Prelude.hashWithSalt` alarmModelName++instance Prelude.NFData EnableAlarmActionRequest where+  rnf EnableAlarmActionRequest' {..} =+    Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf note+      `Prelude.seq` Prelude.rnf requestId+      `Prelude.seq` Prelude.rnf alarmModelName++instance Data.ToJSON EnableAlarmActionRequest where+  toJSON EnableAlarmActionRequest' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("keyValue" Data..=) Prelude.<$> keyValue,+            ("note" Data..=) Prelude.<$> note,+            Prelude.Just ("requestId" Data..= requestId),+            Prelude.Just+              ("alarmModelName" Data..= alarmModelName)+          ]+      )
+ gen/Amazonka/IoTEventsData/Types/ErrorCode.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.IoTEventsData.Types.ErrorCode+-- 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.IoTEventsData.Types.ErrorCode+  ( ErrorCode+      ( ..,+        ErrorCode_InternalFailureException,+        ErrorCode_InvalidRequestException,+        ErrorCode_ResourceNotFoundException,+        ErrorCode_ServiceUnavailableException,+        ErrorCode_ThrottlingException+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ErrorCode = ErrorCode'+  { fromErrorCode ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern ErrorCode_InternalFailureException :: ErrorCode+pattern ErrorCode_InternalFailureException = ErrorCode' "InternalFailureException"++pattern ErrorCode_InvalidRequestException :: ErrorCode+pattern ErrorCode_InvalidRequestException = ErrorCode' "InvalidRequestException"++pattern ErrorCode_ResourceNotFoundException :: ErrorCode+pattern ErrorCode_ResourceNotFoundException = ErrorCode' "ResourceNotFoundException"++pattern ErrorCode_ServiceUnavailableException :: ErrorCode+pattern ErrorCode_ServiceUnavailableException = ErrorCode' "ServiceUnavailableException"++pattern ErrorCode_ThrottlingException :: ErrorCode+pattern ErrorCode_ThrottlingException = ErrorCode' "ThrottlingException"++{-# COMPLETE+  ErrorCode_InternalFailureException,+  ErrorCode_InvalidRequestException,+  ErrorCode_ResourceNotFoundException,+  ErrorCode_ServiceUnavailableException,+  ErrorCode_ThrottlingException,+  ErrorCode'+  #-}
+ gen/Amazonka/IoTEventsData/Types/EventType.hs view
@@ -0,0 +1,66 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.IoTEventsData.Types.EventType+-- 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.IoTEventsData.Types.EventType+  ( EventType+      ( ..,+        EventType_STATE_CHANGE+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype EventType = EventType'+  { fromEventType ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern EventType_STATE_CHANGE :: EventType+pattern EventType_STATE_CHANGE = EventType' "STATE_CHANGE"++{-# COMPLETE+  EventType_STATE_CHANGE,+  EventType'+  #-}
+ gen/Amazonka/IoTEventsData/Types/Message.hs view
@@ -0,0 +1,131 @@+{-# 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.IoTEventsData.Types.Message+-- 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.IoTEventsData.Types.Message where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.TimestampValue+import qualified Amazonka.Prelude as Prelude++-- | Information about a message.+--+-- /See:/ 'newMessage' smart constructor.+data Message = Message'+  { -- | The timestamp associated with the message.+    timestamp :: Prelude.Maybe TimestampValue,+    -- | The ID to assign to the message. Within each batch sent, each+    -- @\"messageId\"@ must be unique.+    messageId :: Prelude.Text,+    -- | The name of the input into which the message payload is transformed.+    inputName :: Prelude.Text,+    -- | The payload of the message. This can be a JSON string or a+    -- Base-64-encoded string representing binary data (in which case you must+    -- decode it).+    payload :: Data.Base64+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Message' 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:+--+-- 'timestamp', 'message_timestamp' - The timestamp associated with the message.+--+-- 'messageId', 'message_messageId' - The ID to assign to the message. Within each batch sent, each+-- @\"messageId\"@ must be unique.+--+-- 'inputName', 'message_inputName' - The name of the input into which the message payload is transformed.+--+-- 'payload', 'message_payload' - The payload of the message. This can be a JSON string or a+-- Base-64-encoded string representing binary data (in which case you must+-- decode it).--+-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.+-- -- The underlying isomorphism will encode to Base64 representation during+-- -- serialisation, and decode from Base64 representation during deserialisation.+-- -- This 'Lens' accepts and returns only raw unencoded data.+newMessage ::+  -- | 'messageId'+  Prelude.Text ->+  -- | 'inputName'+  Prelude.Text ->+  -- | 'payload'+  Prelude.ByteString ->+  Message+newMessage pMessageId_ pInputName_ pPayload_ =+  Message'+    { timestamp = Prelude.Nothing,+      messageId = pMessageId_,+      inputName = pInputName_,+      payload = Data._Base64 Lens.# pPayload_+    }++-- | The timestamp associated with the message.+message_timestamp :: Lens.Lens' Message (Prelude.Maybe TimestampValue)+message_timestamp = Lens.lens (\Message' {timestamp} -> timestamp) (\s@Message' {} a -> s {timestamp = a} :: Message)++-- | The ID to assign to the message. Within each batch sent, each+-- @\"messageId\"@ must be unique.+message_messageId :: Lens.Lens' Message Prelude.Text+message_messageId = Lens.lens (\Message' {messageId} -> messageId) (\s@Message' {} a -> s {messageId = a} :: Message)++-- | The name of the input into which the message payload is transformed.+message_inputName :: Lens.Lens' Message Prelude.Text+message_inputName = Lens.lens (\Message' {inputName} -> inputName) (\s@Message' {} a -> s {inputName = a} :: Message)++-- | The payload of the message. This can be a JSON string or a+-- Base-64-encoded string representing binary data (in which case you must+-- decode it).--+-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.+-- -- The underlying isomorphism will encode to Base64 representation during+-- -- serialisation, and decode from Base64 representation during deserialisation.+-- -- This 'Lens' accepts and returns only raw unencoded data.+message_payload :: Lens.Lens' Message Prelude.ByteString+message_payload = Lens.lens (\Message' {payload} -> payload) (\s@Message' {} a -> s {payload = a} :: Message) Prelude.. Data._Base64++instance Prelude.Hashable Message where+  hashWithSalt _salt Message' {..} =+    _salt+      `Prelude.hashWithSalt` timestamp+      `Prelude.hashWithSalt` messageId+      `Prelude.hashWithSalt` inputName+      `Prelude.hashWithSalt` payload++instance Prelude.NFData Message where+  rnf Message' {..} =+    Prelude.rnf timestamp+      `Prelude.seq` Prelude.rnf messageId+      `Prelude.seq` Prelude.rnf inputName+      `Prelude.seq` Prelude.rnf payload++instance Data.ToJSON Message where+  toJSON Message' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("timestamp" Data..=) Prelude.<$> timestamp,+            Prelude.Just ("messageId" Data..= messageId),+            Prelude.Just ("inputName" Data..= inputName),+            Prelude.Just ("payload" Data..= payload)+          ]+      )
+ gen/Amazonka/IoTEventsData/Types/ResetActionConfiguration.hs view
@@ -0,0 +1,68 @@+{-# 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.IoTEventsData.Types.ResetActionConfiguration+-- 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.IoTEventsData.Types.ResetActionConfiguration 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++-- | Contains the configuration information of a reset action.+--+-- /See:/ 'newResetActionConfiguration' smart constructor.+data ResetActionConfiguration = ResetActionConfiguration'+  { -- | The note that you can leave when you reset the alarm.+    note :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResetActionConfiguration' 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:+--+-- 'note', 'resetActionConfiguration_note' - The note that you can leave when you reset the alarm.+newResetActionConfiguration ::+  ResetActionConfiguration+newResetActionConfiguration =+  ResetActionConfiguration' {note = Prelude.Nothing}++-- | The note that you can leave when you reset the alarm.+resetActionConfiguration_note :: Lens.Lens' ResetActionConfiguration (Prelude.Maybe Prelude.Text)+resetActionConfiguration_note = Lens.lens (\ResetActionConfiguration' {note} -> note) (\s@ResetActionConfiguration' {} a -> s {note = a} :: ResetActionConfiguration)++instance Data.FromJSON ResetActionConfiguration where+  parseJSON =+    Data.withObject+      "ResetActionConfiguration"+      ( \x ->+          ResetActionConfiguration'+            Prelude.<$> (x Data..:? "note")+      )++instance Prelude.Hashable ResetActionConfiguration where+  hashWithSalt _salt ResetActionConfiguration' {..} =+    _salt `Prelude.hashWithSalt` note++instance Prelude.NFData ResetActionConfiguration where+  rnf ResetActionConfiguration' {..} = Prelude.rnf note
+ gen/Amazonka/IoTEventsData/Types/ResetAlarmActionRequest.hs view
@@ -0,0 +1,121 @@+{-# 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.IoTEventsData.Types.ResetAlarmActionRequest+-- 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.IoTEventsData.Types.ResetAlarmActionRequest 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++-- | Information needed to reset the alarm.+--+-- /See:/ 'newResetAlarmActionRequest' smart constructor.+data ResetAlarmActionRequest = ResetAlarmActionRequest'+  { -- | The value of the key used as a filter to select only the alarms+    -- associated with the+    -- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The note that you can leave when you reset the alarm.+    note :: Prelude.Maybe Prelude.Text,+    -- | The request ID. Each ID must be unique within each batch.+    requestId :: Prelude.Text,+    -- | The name of the alarm model.+    alarmModelName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResetAlarmActionRequest' 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:+--+-- 'keyValue', 'resetAlarmActionRequest_keyValue' - The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+--+-- 'note', 'resetAlarmActionRequest_note' - The note that you can leave when you reset the alarm.+--+-- 'requestId', 'resetAlarmActionRequest_requestId' - The request ID. Each ID must be unique within each batch.+--+-- 'alarmModelName', 'resetAlarmActionRequest_alarmModelName' - The name of the alarm model.+newResetAlarmActionRequest ::+  -- | 'requestId'+  Prelude.Text ->+  -- | 'alarmModelName'+  Prelude.Text ->+  ResetAlarmActionRequest+newResetAlarmActionRequest+  pRequestId_+  pAlarmModelName_ =+    ResetAlarmActionRequest'+      { keyValue =+          Prelude.Nothing,+        note = Prelude.Nothing,+        requestId = pRequestId_,+        alarmModelName = pAlarmModelName_+      }++-- | The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+resetAlarmActionRequest_keyValue :: Lens.Lens' ResetAlarmActionRequest (Prelude.Maybe Prelude.Text)+resetAlarmActionRequest_keyValue = Lens.lens (\ResetAlarmActionRequest' {keyValue} -> keyValue) (\s@ResetAlarmActionRequest' {} a -> s {keyValue = a} :: ResetAlarmActionRequest)++-- | The note that you can leave when you reset the alarm.+resetAlarmActionRequest_note :: Lens.Lens' ResetAlarmActionRequest (Prelude.Maybe Prelude.Text)+resetAlarmActionRequest_note = Lens.lens (\ResetAlarmActionRequest' {note} -> note) (\s@ResetAlarmActionRequest' {} a -> s {note = a} :: ResetAlarmActionRequest)++-- | The request ID. Each ID must be unique within each batch.+resetAlarmActionRequest_requestId :: Lens.Lens' ResetAlarmActionRequest Prelude.Text+resetAlarmActionRequest_requestId = Lens.lens (\ResetAlarmActionRequest' {requestId} -> requestId) (\s@ResetAlarmActionRequest' {} a -> s {requestId = a} :: ResetAlarmActionRequest)++-- | The name of the alarm model.+resetAlarmActionRequest_alarmModelName :: Lens.Lens' ResetAlarmActionRequest Prelude.Text+resetAlarmActionRequest_alarmModelName = Lens.lens (\ResetAlarmActionRequest' {alarmModelName} -> alarmModelName) (\s@ResetAlarmActionRequest' {} a -> s {alarmModelName = a} :: ResetAlarmActionRequest)++instance Prelude.Hashable ResetAlarmActionRequest where+  hashWithSalt _salt ResetAlarmActionRequest' {..} =+    _salt+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` note+      `Prelude.hashWithSalt` requestId+      `Prelude.hashWithSalt` alarmModelName++instance Prelude.NFData ResetAlarmActionRequest where+  rnf ResetAlarmActionRequest' {..} =+    Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf note+      `Prelude.seq` Prelude.rnf requestId+      `Prelude.seq` Prelude.rnf alarmModelName++instance Data.ToJSON ResetAlarmActionRequest where+  toJSON ResetAlarmActionRequest' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("keyValue" Data..=) Prelude.<$> keyValue,+            ("note" Data..=) Prelude.<$> note,+            Prelude.Just ("requestId" Data..= requestId),+            Prelude.Just+              ("alarmModelName" Data..= alarmModelName)+          ]+      )
+ gen/Amazonka/IoTEventsData/Types/RuleEvaluation.hs view
@@ -0,0 +1,73 @@+{-# 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.IoTEventsData.Types.RuleEvaluation+-- 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.IoTEventsData.Types.RuleEvaluation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.SimpleRuleEvaluation+import qualified Amazonka.Prelude as Prelude++-- | Information needed to evaluate data.+--+-- /See:/ 'newRuleEvaluation' smart constructor.+data RuleEvaluation = RuleEvaluation'+  { -- | Information needed to compare two values with a comparison operator.+    simpleRuleEvaluation :: Prelude.Maybe SimpleRuleEvaluation+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RuleEvaluation' 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:+--+-- 'simpleRuleEvaluation', 'ruleEvaluation_simpleRuleEvaluation' - Information needed to compare two values with a comparison operator.+newRuleEvaluation ::+  RuleEvaluation+newRuleEvaluation =+  RuleEvaluation'+    { simpleRuleEvaluation =+        Prelude.Nothing+    }++-- | Information needed to compare two values with a comparison operator.+ruleEvaluation_simpleRuleEvaluation :: Lens.Lens' RuleEvaluation (Prelude.Maybe SimpleRuleEvaluation)+ruleEvaluation_simpleRuleEvaluation = Lens.lens (\RuleEvaluation' {simpleRuleEvaluation} -> simpleRuleEvaluation) (\s@RuleEvaluation' {} a -> s {simpleRuleEvaluation = a} :: RuleEvaluation)++instance Data.FromJSON RuleEvaluation where+  parseJSON =+    Data.withObject+      "RuleEvaluation"+      ( \x ->+          RuleEvaluation'+            Prelude.<$> (x Data..:? "simpleRuleEvaluation")+      )++instance Prelude.Hashable RuleEvaluation where+  hashWithSalt _salt RuleEvaluation' {..} =+    _salt `Prelude.hashWithSalt` simpleRuleEvaluation++instance Prelude.NFData RuleEvaluation where+  rnf RuleEvaluation' {..} =+    Prelude.rnf simpleRuleEvaluation
+ gen/Amazonka/IoTEventsData/Types/SimpleRuleEvaluation.hs view
@@ -0,0 +1,101 @@+{-# 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.IoTEventsData.Types.SimpleRuleEvaluation+-- 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.IoTEventsData.Types.SimpleRuleEvaluation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.ComparisonOperator+import qualified Amazonka.Prelude as Prelude++-- | Information needed to compare two values with a comparison operator.+--+-- /See:/ 'newSimpleRuleEvaluation' smart constructor.+data SimpleRuleEvaluation = SimpleRuleEvaluation'+  { -- | The value of the input property, on the left side of the comparison+    -- operator.+    inputPropertyValue :: Prelude.Maybe Prelude.Text,+    -- | The comparison operator.+    operator :: Prelude.Maybe ComparisonOperator,+    -- | The threshold value, on the right side of the comparison operator.+    thresholdValue :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SimpleRuleEvaluation' 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:+--+-- 'inputPropertyValue', 'simpleRuleEvaluation_inputPropertyValue' - The value of the input property, on the left side of the comparison+-- operator.+--+-- 'operator', 'simpleRuleEvaluation_operator' - The comparison operator.+--+-- 'thresholdValue', 'simpleRuleEvaluation_thresholdValue' - The threshold value, on the right side of the comparison operator.+newSimpleRuleEvaluation ::+  SimpleRuleEvaluation+newSimpleRuleEvaluation =+  SimpleRuleEvaluation'+    { inputPropertyValue =+        Prelude.Nothing,+      operator = Prelude.Nothing,+      thresholdValue = Prelude.Nothing+    }++-- | The value of the input property, on the left side of the comparison+-- operator.+simpleRuleEvaluation_inputPropertyValue :: Lens.Lens' SimpleRuleEvaluation (Prelude.Maybe Prelude.Text)+simpleRuleEvaluation_inputPropertyValue = Lens.lens (\SimpleRuleEvaluation' {inputPropertyValue} -> inputPropertyValue) (\s@SimpleRuleEvaluation' {} a -> s {inputPropertyValue = a} :: SimpleRuleEvaluation)++-- | The comparison operator.+simpleRuleEvaluation_operator :: Lens.Lens' SimpleRuleEvaluation (Prelude.Maybe ComparisonOperator)+simpleRuleEvaluation_operator = Lens.lens (\SimpleRuleEvaluation' {operator} -> operator) (\s@SimpleRuleEvaluation' {} a -> s {operator = a} :: SimpleRuleEvaluation)++-- | The threshold value, on the right side of the comparison operator.+simpleRuleEvaluation_thresholdValue :: Lens.Lens' SimpleRuleEvaluation (Prelude.Maybe Prelude.Text)+simpleRuleEvaluation_thresholdValue = Lens.lens (\SimpleRuleEvaluation' {thresholdValue} -> thresholdValue) (\s@SimpleRuleEvaluation' {} a -> s {thresholdValue = a} :: SimpleRuleEvaluation)++instance Data.FromJSON SimpleRuleEvaluation where+  parseJSON =+    Data.withObject+      "SimpleRuleEvaluation"+      ( \x ->+          SimpleRuleEvaluation'+            Prelude.<$> (x Data..:? "inputPropertyValue")+            Prelude.<*> (x Data..:? "operator")+            Prelude.<*> (x Data..:? "thresholdValue")+      )++instance Prelude.Hashable SimpleRuleEvaluation where+  hashWithSalt _salt SimpleRuleEvaluation' {..} =+    _salt+      `Prelude.hashWithSalt` inputPropertyValue+      `Prelude.hashWithSalt` operator+      `Prelude.hashWithSalt` thresholdValue++instance Prelude.NFData SimpleRuleEvaluation where+  rnf SimpleRuleEvaluation' {..} =+    Prelude.rnf inputPropertyValue+      `Prelude.seq` Prelude.rnf operator+      `Prelude.seq` Prelude.rnf thresholdValue
+ gen/Amazonka/IoTEventsData/Types/SnoozeActionConfiguration.hs view
@@ -0,0 +1,87 @@+{-# 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.IoTEventsData.Types.SnoozeActionConfiguration+-- 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.IoTEventsData.Types.SnoozeActionConfiguration 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++-- | Contains the configuration information of a snooze action.+--+-- /See:/ 'newSnoozeActionConfiguration' smart constructor.+data SnoozeActionConfiguration = SnoozeActionConfiguration'+  { -- | The note that you can leave when you snooze the alarm.+    note :: Prelude.Maybe Prelude.Text,+    -- | The snooze time in seconds. The alarm automatically changes to the+    -- @NORMAL@ state after this duration.+    snoozeDuration :: Prelude.Maybe Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SnoozeActionConfiguration' 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:+--+-- 'note', 'snoozeActionConfiguration_note' - The note that you can leave when you snooze the alarm.+--+-- 'snoozeDuration', 'snoozeActionConfiguration_snoozeDuration' - The snooze time in seconds. The alarm automatically changes to the+-- @NORMAL@ state after this duration.+newSnoozeActionConfiguration ::+  SnoozeActionConfiguration+newSnoozeActionConfiguration =+  SnoozeActionConfiguration'+    { note = Prelude.Nothing,+      snoozeDuration = Prelude.Nothing+    }++-- | The note that you can leave when you snooze the alarm.+snoozeActionConfiguration_note :: Lens.Lens' SnoozeActionConfiguration (Prelude.Maybe Prelude.Text)+snoozeActionConfiguration_note = Lens.lens (\SnoozeActionConfiguration' {note} -> note) (\s@SnoozeActionConfiguration' {} a -> s {note = a} :: SnoozeActionConfiguration)++-- | The snooze time in seconds. The alarm automatically changes to the+-- @NORMAL@ state after this duration.+snoozeActionConfiguration_snoozeDuration :: Lens.Lens' SnoozeActionConfiguration (Prelude.Maybe Prelude.Int)+snoozeActionConfiguration_snoozeDuration = Lens.lens (\SnoozeActionConfiguration' {snoozeDuration} -> snoozeDuration) (\s@SnoozeActionConfiguration' {} a -> s {snoozeDuration = a} :: SnoozeActionConfiguration)++instance Data.FromJSON SnoozeActionConfiguration where+  parseJSON =+    Data.withObject+      "SnoozeActionConfiguration"+      ( \x ->+          SnoozeActionConfiguration'+            Prelude.<$> (x Data..:? "note")+            Prelude.<*> (x Data..:? "snoozeDuration")+      )++instance Prelude.Hashable SnoozeActionConfiguration where+  hashWithSalt _salt SnoozeActionConfiguration' {..} =+    _salt+      `Prelude.hashWithSalt` note+      `Prelude.hashWithSalt` snoozeDuration++instance Prelude.NFData SnoozeActionConfiguration where+  rnf SnoozeActionConfiguration' {..} =+    Prelude.rnf note+      `Prelude.seq` Prelude.rnf snoozeDuration
+ gen/Amazonka/IoTEventsData/Types/SnoozeAlarmActionRequest.hs view
@@ -0,0 +1,140 @@+{-# 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.IoTEventsData.Types.SnoozeAlarmActionRequest+-- 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.IoTEventsData.Types.SnoozeAlarmActionRequest 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++-- | Information needed to snooze the alarm.+--+-- /See:/ 'newSnoozeAlarmActionRequest' smart constructor.+data SnoozeAlarmActionRequest = SnoozeAlarmActionRequest'+  { -- | The value of the key used as a filter to select only the alarms+    -- associated with the+    -- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The note that you can leave when you snooze the alarm.+    note :: Prelude.Maybe Prelude.Text,+    -- | The request ID. Each ID must be unique within each batch.+    requestId :: Prelude.Text,+    -- | The name of the alarm model.+    alarmModelName :: Prelude.Text,+    -- | The snooze time in seconds. The alarm automatically changes to the+    -- @NORMAL@ state after this duration.+    snoozeDuration :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SnoozeAlarmActionRequest' 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:+--+-- 'keyValue', 'snoozeAlarmActionRequest_keyValue' - The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+--+-- 'note', 'snoozeAlarmActionRequest_note' - The note that you can leave when you snooze the alarm.+--+-- 'requestId', 'snoozeAlarmActionRequest_requestId' - The request ID. Each ID must be unique within each batch.+--+-- 'alarmModelName', 'snoozeAlarmActionRequest_alarmModelName' - The name of the alarm model.+--+-- 'snoozeDuration', 'snoozeAlarmActionRequest_snoozeDuration' - The snooze time in seconds. The alarm automatically changes to the+-- @NORMAL@ state after this duration.+newSnoozeAlarmActionRequest ::+  -- | 'requestId'+  Prelude.Text ->+  -- | 'alarmModelName'+  Prelude.Text ->+  -- | 'snoozeDuration'+  Prelude.Int ->+  SnoozeAlarmActionRequest+newSnoozeAlarmActionRequest+  pRequestId_+  pAlarmModelName_+  pSnoozeDuration_ =+    SnoozeAlarmActionRequest'+      { keyValue =+          Prelude.Nothing,+        note = Prelude.Nothing,+        requestId = pRequestId_,+        alarmModelName = pAlarmModelName_,+        snoozeDuration = pSnoozeDuration_+      }++-- | The value of the key used as a filter to select only the alarms+-- associated with the+-- <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key key>.+snoozeAlarmActionRequest_keyValue :: Lens.Lens' SnoozeAlarmActionRequest (Prelude.Maybe Prelude.Text)+snoozeAlarmActionRequest_keyValue = Lens.lens (\SnoozeAlarmActionRequest' {keyValue} -> keyValue) (\s@SnoozeAlarmActionRequest' {} a -> s {keyValue = a} :: SnoozeAlarmActionRequest)++-- | The note that you can leave when you snooze the alarm.+snoozeAlarmActionRequest_note :: Lens.Lens' SnoozeAlarmActionRequest (Prelude.Maybe Prelude.Text)+snoozeAlarmActionRequest_note = Lens.lens (\SnoozeAlarmActionRequest' {note} -> note) (\s@SnoozeAlarmActionRequest' {} a -> s {note = a} :: SnoozeAlarmActionRequest)++-- | The request ID. Each ID must be unique within each batch.+snoozeAlarmActionRequest_requestId :: Lens.Lens' SnoozeAlarmActionRequest Prelude.Text+snoozeAlarmActionRequest_requestId = Lens.lens (\SnoozeAlarmActionRequest' {requestId} -> requestId) (\s@SnoozeAlarmActionRequest' {} a -> s {requestId = a} :: SnoozeAlarmActionRequest)++-- | The name of the alarm model.+snoozeAlarmActionRequest_alarmModelName :: Lens.Lens' SnoozeAlarmActionRequest Prelude.Text+snoozeAlarmActionRequest_alarmModelName = Lens.lens (\SnoozeAlarmActionRequest' {alarmModelName} -> alarmModelName) (\s@SnoozeAlarmActionRequest' {} a -> s {alarmModelName = a} :: SnoozeAlarmActionRequest)++-- | The snooze time in seconds. The alarm automatically changes to the+-- @NORMAL@ state after this duration.+snoozeAlarmActionRequest_snoozeDuration :: Lens.Lens' SnoozeAlarmActionRequest Prelude.Int+snoozeAlarmActionRequest_snoozeDuration = Lens.lens (\SnoozeAlarmActionRequest' {snoozeDuration} -> snoozeDuration) (\s@SnoozeAlarmActionRequest' {} a -> s {snoozeDuration = a} :: SnoozeAlarmActionRequest)++instance Prelude.Hashable SnoozeAlarmActionRequest where+  hashWithSalt _salt SnoozeAlarmActionRequest' {..} =+    _salt+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` note+      `Prelude.hashWithSalt` requestId+      `Prelude.hashWithSalt` alarmModelName+      `Prelude.hashWithSalt` snoozeDuration++instance Prelude.NFData SnoozeAlarmActionRequest where+  rnf SnoozeAlarmActionRequest' {..} =+    Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf note+      `Prelude.seq` Prelude.rnf requestId+      `Prelude.seq` Prelude.rnf alarmModelName+      `Prelude.seq` Prelude.rnf snoozeDuration++instance Data.ToJSON SnoozeAlarmActionRequest where+  toJSON SnoozeAlarmActionRequest' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("keyValue" Data..=) Prelude.<$> keyValue,+            ("note" Data..=) Prelude.<$> note,+            Prelude.Just ("requestId" Data..= requestId),+            Prelude.Just+              ("alarmModelName" Data..= alarmModelName),+            Prelude.Just+              ("snoozeDuration" Data..= snoozeDuration)+          ]+      )
+ gen/Amazonka/IoTEventsData/Types/StateChangeConfiguration.hs view
@@ -0,0 +1,76 @@+{-# 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.IoTEventsData.Types.StateChangeConfiguration+-- 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.IoTEventsData.Types.StateChangeConfiguration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.TriggerType+import qualified Amazonka.Prelude as Prelude++-- | Contains the configuration information of alarm state changes.+--+-- /See:/ 'newStateChangeConfiguration' smart constructor.+data StateChangeConfiguration = StateChangeConfiguration'+  { -- | The trigger type. If the value is @SNOOZE_TIMEOUT@, the snooze duration+    -- ends and the alarm automatically changes to the @NORMAL@ state.+    triggerType :: Prelude.Maybe TriggerType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StateChangeConfiguration' 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:+--+-- 'triggerType', 'stateChangeConfiguration_triggerType' - The trigger type. If the value is @SNOOZE_TIMEOUT@, the snooze duration+-- ends and the alarm automatically changes to the @NORMAL@ state.+newStateChangeConfiguration ::+  StateChangeConfiguration+newStateChangeConfiguration =+  StateChangeConfiguration'+    { triggerType =+        Prelude.Nothing+    }++-- | The trigger type. If the value is @SNOOZE_TIMEOUT@, the snooze duration+-- ends and the alarm automatically changes to the @NORMAL@ state.+stateChangeConfiguration_triggerType :: Lens.Lens' StateChangeConfiguration (Prelude.Maybe TriggerType)+stateChangeConfiguration_triggerType = Lens.lens (\StateChangeConfiguration' {triggerType} -> triggerType) (\s@StateChangeConfiguration' {} a -> s {triggerType = a} :: StateChangeConfiguration)++instance Data.FromJSON StateChangeConfiguration where+  parseJSON =+    Data.withObject+      "StateChangeConfiguration"+      ( \x ->+          StateChangeConfiguration'+            Prelude.<$> (x Data..:? "triggerType")+      )++instance Prelude.Hashable StateChangeConfiguration where+  hashWithSalt _salt StateChangeConfiguration' {..} =+    _salt `Prelude.hashWithSalt` triggerType++instance Prelude.NFData StateChangeConfiguration where+  rnf StateChangeConfiguration' {..} =+    Prelude.rnf triggerType
+ gen/Amazonka/IoTEventsData/Types/SystemEvent.hs view
@@ -0,0 +1,89 @@+{-# 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.IoTEventsData.Types.SystemEvent+-- 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.IoTEventsData.Types.SystemEvent where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.EventType+import Amazonka.IoTEventsData.Types.StateChangeConfiguration+import qualified Amazonka.Prelude as Prelude++-- | Contains information about alarm state changes.+--+-- /See:/ 'newSystemEvent' smart constructor.+data SystemEvent = SystemEvent'+  { -- | The event type. If the value is @STATE_CHANGE@, the event contains+    -- information about alarm state changes.+    eventType :: Prelude.Maybe EventType,+    -- | Contains the configuration information of alarm state changes.+    stateChangeConfiguration :: Prelude.Maybe StateChangeConfiguration+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SystemEvent' 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:+--+-- 'eventType', 'systemEvent_eventType' - The event type. If the value is @STATE_CHANGE@, the event contains+-- information about alarm state changes.+--+-- 'stateChangeConfiguration', 'systemEvent_stateChangeConfiguration' - Contains the configuration information of alarm state changes.+newSystemEvent ::+  SystemEvent+newSystemEvent =+  SystemEvent'+    { eventType = Prelude.Nothing,+      stateChangeConfiguration = Prelude.Nothing+    }++-- | The event type. If the value is @STATE_CHANGE@, the event contains+-- information about alarm state changes.+systemEvent_eventType :: Lens.Lens' SystemEvent (Prelude.Maybe EventType)+systemEvent_eventType = Lens.lens (\SystemEvent' {eventType} -> eventType) (\s@SystemEvent' {} a -> s {eventType = a} :: SystemEvent)++-- | Contains the configuration information of alarm state changes.+systemEvent_stateChangeConfiguration :: Lens.Lens' SystemEvent (Prelude.Maybe StateChangeConfiguration)+systemEvent_stateChangeConfiguration = Lens.lens (\SystemEvent' {stateChangeConfiguration} -> stateChangeConfiguration) (\s@SystemEvent' {} a -> s {stateChangeConfiguration = a} :: SystemEvent)++instance Data.FromJSON SystemEvent where+  parseJSON =+    Data.withObject+      "SystemEvent"+      ( \x ->+          SystemEvent'+            Prelude.<$> (x Data..:? "eventType")+            Prelude.<*> (x Data..:? "stateChangeConfiguration")+      )++instance Prelude.Hashable SystemEvent where+  hashWithSalt _salt SystemEvent' {..} =+    _salt+      `Prelude.hashWithSalt` eventType+      `Prelude.hashWithSalt` stateChangeConfiguration++instance Prelude.NFData SystemEvent where+  rnf SystemEvent' {..} =+    Prelude.rnf eventType+      `Prelude.seq` Prelude.rnf stateChangeConfiguration
+ gen/Amazonka/IoTEventsData/Types/Timer.hs view
@@ -0,0 +1,88 @@+{-# 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.IoTEventsData.Types.Timer+-- 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.IoTEventsData.Types.Timer 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++-- | The current state of a timer.+--+-- /See:/ 'newTimer' smart constructor.+data Timer = Timer'+  { -- | The name of the timer.+    name :: Prelude.Text,+    -- | The expiration time for the timer.+    timestamp :: Data.POSIX+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Timer' 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:+--+-- 'name', 'timer_name' - The name of the timer.+--+-- 'timestamp', 'timer_timestamp' - The expiration time for the timer.+newTimer ::+  -- | 'name'+  Prelude.Text ->+  -- | 'timestamp'+  Prelude.UTCTime ->+  Timer+newTimer pName_ pTimestamp_ =+  Timer'+    { name = pName_,+      timestamp = Data._Time Lens.# pTimestamp_+    }++-- | The name of the timer.+timer_name :: Lens.Lens' Timer Prelude.Text+timer_name = Lens.lens (\Timer' {name} -> name) (\s@Timer' {} a -> s {name = a} :: Timer)++-- | The expiration time for the timer.+timer_timestamp :: Lens.Lens' Timer Prelude.UTCTime+timer_timestamp = Lens.lens (\Timer' {timestamp} -> timestamp) (\s@Timer' {} a -> s {timestamp = a} :: Timer) Prelude.. Data._Time++instance Data.FromJSON Timer where+  parseJSON =+    Data.withObject+      "Timer"+      ( \x ->+          Timer'+            Prelude.<$> (x Data..: "name")+            Prelude.<*> (x Data..: "timestamp")+      )++instance Prelude.Hashable Timer where+  hashWithSalt _salt Timer' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` timestamp++instance Prelude.NFData Timer where+  rnf Timer' {..} =+    Prelude.rnf name+      `Prelude.seq` Prelude.rnf timestamp
+ gen/Amazonka/IoTEventsData/Types/TimerDefinition.hs view
@@ -0,0 +1,89 @@+{-# 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.IoTEventsData.Types.TimerDefinition+-- 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.IoTEventsData.Types.TimerDefinition 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++-- | The new setting of a timer.+--+-- /See:/ 'newTimerDefinition' smart constructor.+data TimerDefinition = TimerDefinition'+  { -- | The name of the timer.+    name :: Prelude.Text,+    -- | The new setting of the timer (the number of seconds before the timer+    -- elapses).+    seconds :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TimerDefinition' 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:+--+-- 'name', 'timerDefinition_name' - The name of the timer.+--+-- 'seconds', 'timerDefinition_seconds' - The new setting of the timer (the number of seconds before the timer+-- elapses).+newTimerDefinition ::+  -- | 'name'+  Prelude.Text ->+  -- | 'seconds'+  Prelude.Int ->+  TimerDefinition+newTimerDefinition pName_ pSeconds_ =+  TimerDefinition'+    { name = pName_,+      seconds = pSeconds_+    }++-- | The name of the timer.+timerDefinition_name :: Lens.Lens' TimerDefinition Prelude.Text+timerDefinition_name = Lens.lens (\TimerDefinition' {name} -> name) (\s@TimerDefinition' {} a -> s {name = a} :: TimerDefinition)++-- | The new setting of the timer (the number of seconds before the timer+-- elapses).+timerDefinition_seconds :: Lens.Lens' TimerDefinition Prelude.Int+timerDefinition_seconds = Lens.lens (\TimerDefinition' {seconds} -> seconds) (\s@TimerDefinition' {} a -> s {seconds = a} :: TimerDefinition)++instance Prelude.Hashable TimerDefinition where+  hashWithSalt _salt TimerDefinition' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` seconds++instance Prelude.NFData TimerDefinition where+  rnf TimerDefinition' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf seconds++instance Data.ToJSON TimerDefinition where+  toJSON TimerDefinition' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("name" Data..= name),+            Prelude.Just ("seconds" Data..= seconds)+          ]+      )
+ gen/Amazonka/IoTEventsData/Types/TimestampValue.hs view
@@ -0,0 +1,66 @@+{-# 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.IoTEventsData.Types.TimestampValue+-- 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.IoTEventsData.Types.TimestampValue 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++-- | Contains information about a timestamp.+--+-- /See:/ 'newTimestampValue' smart constructor.+data TimestampValue = TimestampValue'+  { -- | The value of the timestamp, in the Unix epoch format.+    timeInMillis :: Prelude.Maybe Prelude.Natural+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TimestampValue' 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:+--+-- 'timeInMillis', 'timestampValue_timeInMillis' - The value of the timestamp, in the Unix epoch format.+newTimestampValue ::+  TimestampValue+newTimestampValue =+  TimestampValue' {timeInMillis = Prelude.Nothing}++-- | The value of the timestamp, in the Unix epoch format.+timestampValue_timeInMillis :: Lens.Lens' TimestampValue (Prelude.Maybe Prelude.Natural)+timestampValue_timeInMillis = Lens.lens (\TimestampValue' {timeInMillis} -> timeInMillis) (\s@TimestampValue' {} a -> s {timeInMillis = a} :: TimestampValue)++instance Prelude.Hashable TimestampValue where+  hashWithSalt _salt TimestampValue' {..} =+    _salt `Prelude.hashWithSalt` timeInMillis++instance Prelude.NFData TimestampValue where+  rnf TimestampValue' {..} = Prelude.rnf timeInMillis++instance Data.ToJSON TimestampValue where+  toJSON TimestampValue' {..} =+    Data.object+      ( Prelude.catMaybes+          [("timeInMillis" Data..=) Prelude.<$> timeInMillis]+      )
+ gen/Amazonka/IoTEventsData/Types/TriggerType.hs view
@@ -0,0 +1,66 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.IoTEventsData.Types.TriggerType+-- 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.IoTEventsData.Types.TriggerType+  ( TriggerType+      ( ..,+        TriggerType_SNOOZE_TIMEOUT+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype TriggerType = TriggerType'+  { fromTriggerType ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern TriggerType_SNOOZE_TIMEOUT :: TriggerType+pattern TriggerType_SNOOZE_TIMEOUT = TriggerType' "SNOOZE_TIMEOUT"++{-# COMPLETE+  TriggerType_SNOOZE_TIMEOUT,+  TriggerType'+  #-}
+ gen/Amazonka/IoTEventsData/Types/UpdateDetectorRequest.hs view
@@ -0,0 +1,127 @@+{-# 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.IoTEventsData.Types.UpdateDetectorRequest+-- 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.IoTEventsData.Types.UpdateDetectorRequest where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Types.DetectorStateDefinition+import qualified Amazonka.Prelude as Prelude++-- | Information used to update the detector (instance).+--+-- /See:/ 'newUpdateDetectorRequest' smart constructor.+data UpdateDetectorRequest = UpdateDetectorRequest'+  { -- | The value of the input key attribute (identifying the device or system)+    -- that caused the creation of this detector (instance).+    keyValue :: Prelude.Maybe Prelude.Text,+    -- | The ID to assign to the detector update @\"message\"@. Each+    -- @\"messageId\"@ must be unique within each batch sent.+    messageId :: Prelude.Text,+    -- | The name of the detector model that created the detectors (instances).+    detectorModelName :: Prelude.Text,+    -- | The new state, variable values, and timer settings of the detector+    -- (instance).+    state :: DetectorStateDefinition+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateDetectorRequest' 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:+--+-- 'keyValue', 'updateDetectorRequest_keyValue' - The value of the input key attribute (identifying the device or system)+-- that caused the creation of this detector (instance).+--+-- 'messageId', 'updateDetectorRequest_messageId' - The ID to assign to the detector update @\"message\"@. Each+-- @\"messageId\"@ must be unique within each batch sent.+--+-- 'detectorModelName', 'updateDetectorRequest_detectorModelName' - The name of the detector model that created the detectors (instances).+--+-- 'state', 'updateDetectorRequest_state' - The new state, variable values, and timer settings of the detector+-- (instance).+newUpdateDetectorRequest ::+  -- | 'messageId'+  Prelude.Text ->+  -- | 'detectorModelName'+  Prelude.Text ->+  -- | 'state'+  DetectorStateDefinition ->+  UpdateDetectorRequest+newUpdateDetectorRequest+  pMessageId_+  pDetectorModelName_+  pState_ =+    UpdateDetectorRequest'+      { keyValue = Prelude.Nothing,+        messageId = pMessageId_,+        detectorModelName = pDetectorModelName_,+        state = pState_+      }++-- | The value of the input key attribute (identifying the device or system)+-- that caused the creation of this detector (instance).+updateDetectorRequest_keyValue :: Lens.Lens' UpdateDetectorRequest (Prelude.Maybe Prelude.Text)+updateDetectorRequest_keyValue = Lens.lens (\UpdateDetectorRequest' {keyValue} -> keyValue) (\s@UpdateDetectorRequest' {} a -> s {keyValue = a} :: UpdateDetectorRequest)++-- | The ID to assign to the detector update @\"message\"@. Each+-- @\"messageId\"@ must be unique within each batch sent.+updateDetectorRequest_messageId :: Lens.Lens' UpdateDetectorRequest Prelude.Text+updateDetectorRequest_messageId = Lens.lens (\UpdateDetectorRequest' {messageId} -> messageId) (\s@UpdateDetectorRequest' {} a -> s {messageId = a} :: UpdateDetectorRequest)++-- | The name of the detector model that created the detectors (instances).+updateDetectorRequest_detectorModelName :: Lens.Lens' UpdateDetectorRequest Prelude.Text+updateDetectorRequest_detectorModelName = Lens.lens (\UpdateDetectorRequest' {detectorModelName} -> detectorModelName) (\s@UpdateDetectorRequest' {} a -> s {detectorModelName = a} :: UpdateDetectorRequest)++-- | The new state, variable values, and timer settings of the detector+-- (instance).+updateDetectorRequest_state :: Lens.Lens' UpdateDetectorRequest DetectorStateDefinition+updateDetectorRequest_state = Lens.lens (\UpdateDetectorRequest' {state} -> state) (\s@UpdateDetectorRequest' {} a -> s {state = a} :: UpdateDetectorRequest)++instance Prelude.Hashable UpdateDetectorRequest where+  hashWithSalt _salt UpdateDetectorRequest' {..} =+    _salt+      `Prelude.hashWithSalt` keyValue+      `Prelude.hashWithSalt` messageId+      `Prelude.hashWithSalt` detectorModelName+      `Prelude.hashWithSalt` state++instance Prelude.NFData UpdateDetectorRequest where+  rnf UpdateDetectorRequest' {..} =+    Prelude.rnf keyValue+      `Prelude.seq` Prelude.rnf messageId+      `Prelude.seq` Prelude.rnf detectorModelName+      `Prelude.seq` Prelude.rnf state++instance Data.ToJSON UpdateDetectorRequest where+  toJSON UpdateDetectorRequest' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("keyValue" Data..=) Prelude.<$> keyValue,+            Prelude.Just ("messageId" Data..= messageId),+            Prelude.Just+              ("detectorModelName" Data..= detectorModelName),+            Prelude.Just ("state" Data..= state)+          ]+      )
+ gen/Amazonka/IoTEventsData/Types/Variable.hs view
@@ -0,0 +1,84 @@+{-# 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.IoTEventsData.Types.Variable+-- 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.IoTEventsData.Types.Variable 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++-- | The current state of the variable.+--+-- /See:/ 'newVariable' smart constructor.+data Variable = Variable'+  { -- | The name of the variable.+    name :: Prelude.Text,+    -- | The current value of the variable.+    value :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Variable' 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:+--+-- 'name', 'variable_name' - The name of the variable.+--+-- 'value', 'variable_value' - The current value of the variable.+newVariable ::+  -- | 'name'+  Prelude.Text ->+  -- | 'value'+  Prelude.Text ->+  Variable+newVariable pName_ pValue_ =+  Variable' {name = pName_, value = pValue_}++-- | The name of the variable.+variable_name :: Lens.Lens' Variable Prelude.Text+variable_name = Lens.lens (\Variable' {name} -> name) (\s@Variable' {} a -> s {name = a} :: Variable)++-- | The current value of the variable.+variable_value :: Lens.Lens' Variable Prelude.Text+variable_value = Lens.lens (\Variable' {value} -> value) (\s@Variable' {} a -> s {value = a} :: Variable)++instance Data.FromJSON Variable where+  parseJSON =+    Data.withObject+      "Variable"+      ( \x ->+          Variable'+            Prelude.<$> (x Data..: "name")+            Prelude.<*> (x Data..: "value")+      )++instance Prelude.Hashable Variable where+  hashWithSalt _salt Variable' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` value++instance Prelude.NFData Variable where+  rnf Variable' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf value
+ gen/Amazonka/IoTEventsData/Types/VariableDefinition.hs view
@@ -0,0 +1,83 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.IoTEventsData.Types.VariableDefinition+-- 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.IoTEventsData.Types.VariableDefinition 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++-- | The new value of the variable.+--+-- /See:/ 'newVariableDefinition' smart constructor.+data VariableDefinition = VariableDefinition'+  { -- | The name of the variable.+    name :: Prelude.Text,+    -- | The new value of the variable.+    value :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VariableDefinition' 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:+--+-- 'name', 'variableDefinition_name' - The name of the variable.+--+-- 'value', 'variableDefinition_value' - The new value of the variable.+newVariableDefinition ::+  -- | 'name'+  Prelude.Text ->+  -- | 'value'+  Prelude.Text ->+  VariableDefinition+newVariableDefinition pName_ pValue_ =+  VariableDefinition' {name = pName_, value = pValue_}++-- | The name of the variable.+variableDefinition_name :: Lens.Lens' VariableDefinition Prelude.Text+variableDefinition_name = Lens.lens (\VariableDefinition' {name} -> name) (\s@VariableDefinition' {} a -> s {name = a} :: VariableDefinition)++-- | The new value of the variable.+variableDefinition_value :: Lens.Lens' VariableDefinition Prelude.Text+variableDefinition_value = Lens.lens (\VariableDefinition' {value} -> value) (\s@VariableDefinition' {} a -> s {value = a} :: VariableDefinition)++instance Prelude.Hashable VariableDefinition where+  hashWithSalt _salt VariableDefinition' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` value++instance Prelude.NFData VariableDefinition where+  rnf VariableDefinition' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf value++instance Data.ToJSON VariableDefinition where+  toJSON VariableDefinition' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("name" Data..= name),+            Prelude.Just ("value" Data..= value)+          ]+      )
+ gen/Amazonka/IoTEventsData/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.IoTEventsData.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.IoTEventsData.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IoTEventsData.Lens+import Amazonka.IoTEventsData.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.IoTEventsData+import Test.Amazonka.IoTEventsData.Internal+import Test.Tasty++main :: IO ()+main =+  defaultMain $+    testGroup+      "IoTEventsData"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
+ test/Test/Amazonka/Gen/IoTEventsData.hs view
@@ -0,0 +1,278 @@+{-# 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.IoTEventsData+-- 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.IoTEventsData where++import Amazonka.IoTEventsData+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.IoTEventsData.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"+--         [ requestBatchAcknowledgeAlarm $+--             newBatchAcknowledgeAlarm+--+--         , requestBatchDeleteDetector $+--             newBatchDeleteDetector+--+--         , requestBatchDisableAlarm $+--             newBatchDisableAlarm+--+--         , requestBatchEnableAlarm $+--             newBatchEnableAlarm+--+--         , requestBatchPutMessage $+--             newBatchPutMessage+--+--         , requestBatchResetAlarm $+--             newBatchResetAlarm+--+--         , requestBatchSnoozeAlarm $+--             newBatchSnoozeAlarm+--+--         , requestBatchUpdateDetector $+--             newBatchUpdateDetector+--+--         , requestDescribeAlarm $+--             newDescribeAlarm+--+--         , requestDescribeDetector $+--             newDescribeDetector+--+--         , requestListAlarms $+--             newListAlarms+--+--         , requestListDetectors $+--             newListDetectors+--+--           ]++--     , testGroup "response"+--         [ responseBatchAcknowledgeAlarm $+--             newBatchAcknowledgeAlarmResponse+--+--         , responseBatchDeleteDetector $+--             newBatchDeleteDetectorResponse+--+--         , responseBatchDisableAlarm $+--             newBatchDisableAlarmResponse+--+--         , responseBatchEnableAlarm $+--             newBatchEnableAlarmResponse+--+--         , responseBatchPutMessage $+--             newBatchPutMessageResponse+--+--         , responseBatchResetAlarm $+--             newBatchResetAlarmResponse+--+--         , responseBatchSnoozeAlarm $+--             newBatchSnoozeAlarmResponse+--+--         , responseBatchUpdateDetector $+--             newBatchUpdateDetectorResponse+--+--         , responseDescribeAlarm $+--             newDescribeAlarmResponse+--+--         , responseDescribeDetector $+--             newDescribeDetectorResponse+--+--         , responseListAlarms $+--             newListAlarmsResponse+--+--         , responseListDetectors $+--             newListDetectorsResponse+--+--           ]+--     ]++-- Requests++requestBatchAcknowledgeAlarm :: BatchAcknowledgeAlarm -> TestTree+requestBatchAcknowledgeAlarm =+  req+    "BatchAcknowledgeAlarm"+    "fixture/BatchAcknowledgeAlarm.yaml"++requestBatchDeleteDetector :: BatchDeleteDetector -> TestTree+requestBatchDeleteDetector =+  req+    "BatchDeleteDetector"+    "fixture/BatchDeleteDetector.yaml"++requestBatchDisableAlarm :: BatchDisableAlarm -> TestTree+requestBatchDisableAlarm =+  req+    "BatchDisableAlarm"+    "fixture/BatchDisableAlarm.yaml"++requestBatchEnableAlarm :: BatchEnableAlarm -> TestTree+requestBatchEnableAlarm =+  req+    "BatchEnableAlarm"+    "fixture/BatchEnableAlarm.yaml"++requestBatchPutMessage :: BatchPutMessage -> TestTree+requestBatchPutMessage =+  req+    "BatchPutMessage"+    "fixture/BatchPutMessage.yaml"++requestBatchResetAlarm :: BatchResetAlarm -> TestTree+requestBatchResetAlarm =+  req+    "BatchResetAlarm"+    "fixture/BatchResetAlarm.yaml"++requestBatchSnoozeAlarm :: BatchSnoozeAlarm -> TestTree+requestBatchSnoozeAlarm =+  req+    "BatchSnoozeAlarm"+    "fixture/BatchSnoozeAlarm.yaml"++requestBatchUpdateDetector :: BatchUpdateDetector -> TestTree+requestBatchUpdateDetector =+  req+    "BatchUpdateDetector"+    "fixture/BatchUpdateDetector.yaml"++requestDescribeAlarm :: DescribeAlarm -> TestTree+requestDescribeAlarm =+  req+    "DescribeAlarm"+    "fixture/DescribeAlarm.yaml"++requestDescribeDetector :: DescribeDetector -> TestTree+requestDescribeDetector =+  req+    "DescribeDetector"+    "fixture/DescribeDetector.yaml"++requestListAlarms :: ListAlarms -> TestTree+requestListAlarms =+  req+    "ListAlarms"+    "fixture/ListAlarms.yaml"++requestListDetectors :: ListDetectors -> TestTree+requestListDetectors =+  req+    "ListDetectors"+    "fixture/ListDetectors.yaml"++-- Responses++responseBatchAcknowledgeAlarm :: BatchAcknowledgeAlarmResponse -> TestTree+responseBatchAcknowledgeAlarm =+  res+    "BatchAcknowledgeAlarmResponse"+    "fixture/BatchAcknowledgeAlarmResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy BatchAcknowledgeAlarm)++responseBatchDeleteDetector :: BatchDeleteDetectorResponse -> TestTree+responseBatchDeleteDetector =+  res+    "BatchDeleteDetectorResponse"+    "fixture/BatchDeleteDetectorResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy BatchDeleteDetector)++responseBatchDisableAlarm :: BatchDisableAlarmResponse -> TestTree+responseBatchDisableAlarm =+  res+    "BatchDisableAlarmResponse"+    "fixture/BatchDisableAlarmResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy BatchDisableAlarm)++responseBatchEnableAlarm :: BatchEnableAlarmResponse -> TestTree+responseBatchEnableAlarm =+  res+    "BatchEnableAlarmResponse"+    "fixture/BatchEnableAlarmResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy BatchEnableAlarm)++responseBatchPutMessage :: BatchPutMessageResponse -> TestTree+responseBatchPutMessage =+  res+    "BatchPutMessageResponse"+    "fixture/BatchPutMessageResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy BatchPutMessage)++responseBatchResetAlarm :: BatchResetAlarmResponse -> TestTree+responseBatchResetAlarm =+  res+    "BatchResetAlarmResponse"+    "fixture/BatchResetAlarmResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy BatchResetAlarm)++responseBatchSnoozeAlarm :: BatchSnoozeAlarmResponse -> TestTree+responseBatchSnoozeAlarm =+  res+    "BatchSnoozeAlarmResponse"+    "fixture/BatchSnoozeAlarmResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy BatchSnoozeAlarm)++responseBatchUpdateDetector :: BatchUpdateDetectorResponse -> TestTree+responseBatchUpdateDetector =+  res+    "BatchUpdateDetectorResponse"+    "fixture/BatchUpdateDetectorResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy BatchUpdateDetector)++responseDescribeAlarm :: DescribeAlarmResponse -> TestTree+responseDescribeAlarm =+  res+    "DescribeAlarmResponse"+    "fixture/DescribeAlarmResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DescribeAlarm)++responseDescribeDetector :: DescribeDetectorResponse -> TestTree+responseDescribeDetector =+  res+    "DescribeDetectorResponse"+    "fixture/DescribeDetectorResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DescribeDetector)++responseListAlarms :: ListAlarmsResponse -> TestTree+responseListAlarms =+  res+    "ListAlarmsResponse"+    "fixture/ListAlarmsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListAlarms)++responseListDetectors :: ListDetectorsResponse -> TestTree+responseListDetectors =+  res+    "ListDetectorsResponse"+    "fixture/ListDetectorsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListDetectors)
+ test/Test/Amazonka/IoTEventsData.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.IoTEventsData+-- 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.IoTEventsData+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/IoTEventsData/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.IoTEventsData.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.IoTEventsData.Internal where