amazonka-ivschat (empty) → 2.0
raw patch · 75 files changed
+7446/−0 lines, 75 filesdep +amazonka-coredep +amazonka-ivschatdep +amazonka-test
Dependencies added: amazonka-core, amazonka-ivschat, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-ivschat.cabal +112/−0
- fixture/CreateChatToken.yaml +10/−0
- fixture/CreateChatTokenResponse.proto +0/−0
- fixture/CreateLoggingConfiguration.yaml +10/−0
- fixture/CreateLoggingConfigurationResponse.proto +0/−0
- fixture/CreateRoom.yaml +10/−0
- fixture/CreateRoomResponse.proto +0/−0
- fixture/DeleteLoggingConfiguration.yaml +10/−0
- fixture/DeleteLoggingConfigurationResponse.proto +0/−0
- fixture/DeleteMessage.yaml +10/−0
- fixture/DeleteMessageResponse.proto +0/−0
- fixture/DeleteRoom.yaml +10/−0
- fixture/DeleteRoomResponse.proto +0/−0
- fixture/DisconnectUser.yaml +10/−0
- fixture/DisconnectUserResponse.proto +0/−0
- fixture/GetLoggingConfiguration.yaml +10/−0
- fixture/GetLoggingConfigurationResponse.proto +0/−0
- fixture/GetRoom.yaml +10/−0
- fixture/GetRoomResponse.proto +0/−0
- fixture/ListLoggingConfigurations.yaml +10/−0
- fixture/ListLoggingConfigurationsResponse.proto +0/−0
- fixture/ListRooms.yaml +10/−0
- fixture/ListRoomsResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/SendEvent.yaml +10/−0
- fixture/SendEventResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateLoggingConfiguration.yaml +10/−0
- fixture/UpdateLoggingConfigurationResponse.proto +0/−0
- fixture/UpdateRoom.yaml +10/−0
- fixture/UpdateRoomResponse.proto +0/−0
- gen/Amazonka/IVSChat.hs +421/−0
- gen/Amazonka/IVSChat/CreateChatToken.hs +295/−0
- gen/Amazonka/IVSChat/CreateLoggingConfiguration.hs +337/−0
- gen/Amazonka/IVSChat/CreateRoom.hs +387/−0
- gen/Amazonka/IVSChat/DeleteLoggingConfiguration.hs +137/−0
- gen/Amazonka/IVSChat/DeleteMessage.hs +213/−0
- gen/Amazonka/IVSChat/DeleteRoom.hs +125/−0
- gen/Amazonka/IVSChat/DisconnectUser.hs +189/−0
- gen/Amazonka/IVSChat/GetLoggingConfiguration.hs +279/−0
- gen/Amazonka/IVSChat/GetRoom.hs +296/−0
- gen/Amazonka/IVSChat/Lens.hs +243/−0
- gen/Amazonka/IVSChat/ListLoggingConfigurations.hs +212/−0
- gen/Amazonka/IVSChat/ListRooms.hs +239/−0
- gen/Amazonka/IVSChat/ListTagsForResource.hs +162/−0
- gen/Amazonka/IVSChat/SendEvent.hs +205/−0
- gen/Amazonka/IVSChat/TagResource.hs +178/−0
- gen/Amazonka/IVSChat/Types.hs +240/−0
- gen/Amazonka/IVSChat/Types/ChatTokenCapability.hs +76/−0
- gen/Amazonka/IVSChat/Types/CloudWatchLogsDestinationConfiguration.hs +99/−0
- gen/Amazonka/IVSChat/Types/CreateLoggingConfigurationState.hs +66/−0
- gen/Amazonka/IVSChat/Types/DestinationConfiguration.hs +123/−0
- gen/Amazonka/IVSChat/Types/FallbackResult.hs +71/−0
- gen/Amazonka/IVSChat/Types/FirehoseDestinationConfiguration.hs +98/−0
- gen/Amazonka/IVSChat/Types/LoggingConfigurationState.hs +96/−0
- gen/Amazonka/IVSChat/Types/LoggingConfigurationSummary.hs +188/−0
- gen/Amazonka/IVSChat/Types/MessageReviewHandler.hs +117/−0
- gen/Amazonka/IVSChat/Types/RoomSummary.hs +184/−0
- gen/Amazonka/IVSChat/Types/S3DestinationConfiguration.hs +81/−0
- gen/Amazonka/IVSChat/Types/UpdateLoggingConfigurationState.hs +66/−0
- gen/Amazonka/IVSChat/UntagResource.hs +176/−0
- gen/Amazonka/IVSChat/UpdateLoggingConfiguration.hs +318/−0
- gen/Amazonka/IVSChat/UpdateRoom.hs +383/−0
- gen/Amazonka/IVSChat/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/Gen/IVSChat.hs +378/−0
- test/Test/Amazonka/IVSChat.hs +20/−0
- test/Test/Amazonka/IVSChat/Internal.hs +8/−0
+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,44 @@+# Amazon Interactive Video Service Chat SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2020-07-14@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-ivschat)+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.IVSChat](http://hackage.haskell.org/package/amazonka-ivschat/docs/Amazonka-IVSChat.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-ivschat` 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-ivschat.cabal view
@@ -0,0 +1,112 @@+cabal-version: 2.2+name: amazonka-ivschat+version: 2.0+synopsis: Amazon Interactive Video Service Chat 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 @2020-07-14@ of the AWS service descriptions, licensed under Apache 2.0.+ .+ The types from this library are intended to be used with <http://hackage.haskell.org/package/amazonka amazonka>,+ which provides mechanisms for specifying AuthN/AuthZ information, sending requests, and receiving responses.+ .+ It is recommended to use generic lenses or optics from packages such as <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify optional fields and deconstruct responses.+ .+ Generated lenses can be found in "Amazonka.IVSChat.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.IVSChat" 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-ivschat++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.IVSChat+ Amazonka.IVSChat.CreateChatToken+ Amazonka.IVSChat.CreateLoggingConfiguration+ Amazonka.IVSChat.CreateRoom+ Amazonka.IVSChat.DeleteLoggingConfiguration+ Amazonka.IVSChat.DeleteMessage+ Amazonka.IVSChat.DeleteRoom+ Amazonka.IVSChat.DisconnectUser+ Amazonka.IVSChat.GetLoggingConfiguration+ Amazonka.IVSChat.GetRoom+ Amazonka.IVSChat.Lens+ Amazonka.IVSChat.ListLoggingConfigurations+ Amazonka.IVSChat.ListRooms+ Amazonka.IVSChat.ListTagsForResource+ Amazonka.IVSChat.SendEvent+ Amazonka.IVSChat.TagResource+ Amazonka.IVSChat.Types+ Amazonka.IVSChat.Types.ChatTokenCapability+ Amazonka.IVSChat.Types.CloudWatchLogsDestinationConfiguration+ Amazonka.IVSChat.Types.CreateLoggingConfigurationState+ Amazonka.IVSChat.Types.DestinationConfiguration+ Amazonka.IVSChat.Types.FallbackResult+ Amazonka.IVSChat.Types.FirehoseDestinationConfiguration+ Amazonka.IVSChat.Types.LoggingConfigurationState+ Amazonka.IVSChat.Types.LoggingConfigurationSummary+ Amazonka.IVSChat.Types.MessageReviewHandler+ Amazonka.IVSChat.Types.RoomSummary+ Amazonka.IVSChat.Types.S3DestinationConfiguration+ Amazonka.IVSChat.Types.UpdateLoggingConfigurationState+ Amazonka.IVSChat.UntagResource+ Amazonka.IVSChat.UpdateLoggingConfiguration+ Amazonka.IVSChat.UpdateRoom+ Amazonka.IVSChat.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-ivschat-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.IVSChat+ Test.Amazonka.IVSChat+ Test.Amazonka.IVSChat.Internal++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , amazonka-ivschat+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/CreateChatToken.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/CreateChatTokenResponse.proto view
+ fixture/CreateLoggingConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/CreateLoggingConfigurationResponse.proto view
+ fixture/CreateRoom.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/CreateRoomResponse.proto view
+ fixture/DeleteLoggingConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/DeleteLoggingConfigurationResponse.proto view
+ fixture/DeleteMessage.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/DeleteMessageResponse.proto view
+ fixture/DeleteRoom.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/DeleteRoomResponse.proto view
+ fixture/DisconnectUser.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/DisconnectUserResponse.proto view
+ fixture/GetLoggingConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/GetLoggingConfigurationResponse.proto view
+ fixture/GetRoom.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/GetRoomResponse.proto view
+ fixture/ListLoggingConfigurations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/ListLoggingConfigurationsResponse.proto view
+ fixture/ListRooms.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/ListRoomsResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListTagsForResourceResponse.proto view
+ fixture/SendEvent.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/SendEventResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/TagResourceResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UntagResourceResponse.proto view
+ fixture/UpdateLoggingConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/UpdateLoggingConfigurationResponse.proto view
+ fixture/UpdateRoom.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ivschat/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: ivschat.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/UpdateRoomResponse.proto view
+ gen/Amazonka/IVSChat.hs view
@@ -0,0 +1,421 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.IVSChat+-- 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 @2020-07-14@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- __Introduction__+--+-- The Amazon IVS Chat control-plane API enables you to create and manage+-- Amazon IVS Chat resources. You also need to integrate with the+-- <https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/chat-messaging-api.html Amazon IVS Chat Messaging API>,+-- to enable users to interact with chat rooms in real time.+--+-- The API is an AWS regional service. For a list of supported regions and+-- Amazon IVS Chat HTTPS service endpoints, see the Amazon IVS Chat+-- information on the+-- <https://docs.aws.amazon.com/general/latest/gr/ivs.html Amazon IVS page>+-- in the /AWS General Reference/.+--+-- __Notes on terminology:__+--+-- - You create service applications using the Amazon IVS Chat API. We+-- refer to these as /applications/.+--+-- - You create front-end client applications (browser and Android\/iOS+-- apps) using the Amazon IVS Chat Messaging API. We refer to these as+-- /clients/.+--+-- __Resources__+--+-- The following resources are part of Amazon IVS Chat:+--+-- - __LoggingConfiguration__ — A configuration that allows customers to+-- store and record sent messages in a chat room. See the Logging+-- Configuration endpoints for more information.+--+-- - __Room__ — The central Amazon IVS Chat resource through which+-- clients connect to and exchange chat messages. See the Room+-- endpoints for more information.+--+-- __Tagging__+--+-- A /tag/ is a metadata label that you assign to an AWS resource. A tag+-- comprises a /key/ and a /value/, both set by you. For example, you might+-- set a tag as @topic:nature@ to label a particular video category. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for more information, including restrictions that apply to tags and+-- \"Tag naming limits and requirements\"; Amazon IVS Chat has no+-- service-specific constraints beyond what is documented there.+--+-- Tags can help you identify and organize your AWS resources. For example,+-- you can use the same tag for different resources to indicate that they+-- are related. You can also use tags to manage access (see+-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html Access Tags>).+--+-- The Amazon IVS Chat API has these tag-related endpoints: TagResource,+-- UntagResource, and ListTagsForResource. The following resource supports+-- tagging: Room.+--+-- At most 50 tags can be applied to a resource.+--+-- __API Access Security__+--+-- Your Amazon IVS Chat applications (service applications and clients)+-- must be authenticated and authorized to access Amazon IVS Chat+-- resources. Note the differences between these concepts:+--+-- - /Authentication/ is about verifying identity. Requests to the Amazon+-- IVS Chat API must be signed to verify your identity.+--+-- - /Authorization/ is about granting permissions. Your IAM roles need+-- to have permissions for Amazon IVS Chat API requests.+--+-- Users (viewers) connect to a room using secure access tokens that you+-- create using the CreateChatToken endpoint through the AWS SDK. You call+-- CreateChatToken for every user’s chat session, passing identity and+-- authorization information about the user.+--+-- __Signing API Requests__+--+-- HTTP API requests must be signed with an AWS SigV4 signature using your+-- AWS security credentials. The AWS Command Line Interface (CLI) and the+-- AWS SDKs take care of signing the underlying API calls for you. However,+-- if your application calls the Amazon IVS Chat HTTP API directly, it’s+-- your responsibility to sign the requests.+--+-- You generate a signature using valid AWS credentials for an IAM role+-- that has permission to perform the requested action. For example,+-- DeleteMessage requests must be made using an IAM role that has the+-- @ivschat:DeleteMessage@ permission.+--+-- For more information:+--+-- - Authentication and generating signatures — See+-- <https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html Authenticating Requests (Amazon Web Services Signature Version 4)>+-- in the /Amazon Web Services General Reference/.+--+-- - Managing Amazon IVS permissions — See+-- <https://docs.aws.amazon.com/ivs/latest/userguide/security-iam.html Identity and Access Management>+-- on the Security page of the /Amazon IVS User Guide/.+--+-- __Amazon Resource Names (ARNs)__+--+-- ARNs uniquely identify AWS resources. An ARN is required when you need+-- to specify a resource unambiguously across all of AWS, such as in IAM+-- policies and API calls. For more information, see+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names>+-- in the /AWS General Reference/.+--+-- __Messaging Endpoints__+--+-- - DeleteMessage — Sends an event to a specific room which directs+-- clients to delete a specific message; that is, unrender it from view+-- and delete it from the client’s chat history. This event’s+-- @EventName@ is @aws:DELETE_MESSAGE@. This replicates the+-- <https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-deletemessage-publish.html DeleteMessage>+-- WebSocket operation in the Amazon IVS Chat Messaging API.+--+-- - DisconnectUser — Disconnects all connections using a specified user+-- ID from a room. This replicates the+-- <https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-disconnectuser-publish.html DisconnectUser>+-- WebSocket operation in the Amazon IVS Chat Messaging API.+--+-- - SendEvent — Sends an event to a room. Use this within your+-- application’s business logic to send events to clients of a room;+-- e.g., to notify clients to change the way the chat UI is rendered.+--+-- __Chat Token Endpoint__+--+-- - CreateChatToken — Creates an encrypted token that is used by a chat+-- participant to establish an individual WebSocket chat connection to+-- a room. When the token is used to connect to chat, the connection is+-- valid for the session duration specified in the request. The token+-- becomes invalid at the token-expiration timestamp included in the+-- response.+--+-- __Room Endpoints__+--+-- - CreateRoom — Creates a room that allows clients to connect and pass+-- messages.+--+-- - DeleteRoom — Deletes the specified room.+--+-- - GetRoom — Gets the specified room.+--+-- - ListRooms — Gets summary information about all your rooms in the AWS+-- region where the API request is processed.+--+-- - UpdateRoom — Updates a room’s configuration.+--+-- __Logging Configuration Endpoints__+--+-- - CreateLoggingConfiguration — Creates a logging configuration that+-- allows clients to store and record sent messages.+--+-- - DeleteLoggingConfiguration — Deletes the specified logging+-- configuration.+--+-- - GetLoggingConfiguration — Gets the specified logging configuration.+--+-- - ListLoggingConfigurations — Gets summary information about all your+-- logging configurations in the AWS region where the API request is+-- processed.+--+-- - UpdateLoggingConfiguration — Updates a specified logging+-- configuration.+--+-- __Tags Endpoints__+--+-- - ListTagsForResource — Gets information about AWS tags for the+-- specified ARN.+--+-- - TagResource — Adds or updates tags for the AWS resource with the+-- specified ARN.+--+-- - UntagResource — Removes tags from the resource with the specified+-- ARN.+--+-- All the above are HTTP operations. There is a separate /messaging/ API+-- for managing Chat resources; see the+-- <https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/chat-messaging-api.html Amazon IVS Chat Messaging API Reference>.+module Amazonka.IVSChat+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** AccessDeniedException+ _AccessDeniedException,++ -- ** ConflictException+ _ConflictException,++ -- ** InternalServerException+ _InternalServerException,++ -- ** PendingVerification+ _PendingVerification,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** ServiceQuotaExceededException+ _ServiceQuotaExceededException,++ -- ** ThrottlingException+ _ThrottlingException,++ -- ** ValidationException+ _ValidationException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** CreateChatToken+ CreateChatToken (CreateChatToken'),+ newCreateChatToken,+ CreateChatTokenResponse (CreateChatTokenResponse'),+ newCreateChatTokenResponse,++ -- ** CreateLoggingConfiguration+ CreateLoggingConfiguration (CreateLoggingConfiguration'),+ newCreateLoggingConfiguration,+ CreateLoggingConfigurationResponse (CreateLoggingConfigurationResponse'),+ newCreateLoggingConfigurationResponse,++ -- ** CreateRoom+ CreateRoom (CreateRoom'),+ newCreateRoom,+ CreateRoomResponse (CreateRoomResponse'),+ newCreateRoomResponse,++ -- ** DeleteLoggingConfiguration+ DeleteLoggingConfiguration (DeleteLoggingConfiguration'),+ newDeleteLoggingConfiguration,+ DeleteLoggingConfigurationResponse (DeleteLoggingConfigurationResponse'),+ newDeleteLoggingConfigurationResponse,++ -- ** DeleteMessage+ DeleteMessage (DeleteMessage'),+ newDeleteMessage,+ DeleteMessageResponse (DeleteMessageResponse'),+ newDeleteMessageResponse,++ -- ** DeleteRoom+ DeleteRoom (DeleteRoom'),+ newDeleteRoom,+ DeleteRoomResponse (DeleteRoomResponse'),+ newDeleteRoomResponse,++ -- ** DisconnectUser+ DisconnectUser (DisconnectUser'),+ newDisconnectUser,+ DisconnectUserResponse (DisconnectUserResponse'),+ newDisconnectUserResponse,++ -- ** GetLoggingConfiguration+ GetLoggingConfiguration (GetLoggingConfiguration'),+ newGetLoggingConfiguration,+ GetLoggingConfigurationResponse (GetLoggingConfigurationResponse'),+ newGetLoggingConfigurationResponse,++ -- ** GetRoom+ GetRoom (GetRoom'),+ newGetRoom,+ GetRoomResponse (GetRoomResponse'),+ newGetRoomResponse,++ -- ** ListLoggingConfigurations+ ListLoggingConfigurations (ListLoggingConfigurations'),+ newListLoggingConfigurations,+ ListLoggingConfigurationsResponse (ListLoggingConfigurationsResponse'),+ newListLoggingConfigurationsResponse,++ -- ** ListRooms+ ListRooms (ListRooms'),+ newListRooms,+ ListRoomsResponse (ListRoomsResponse'),+ newListRoomsResponse,++ -- ** ListTagsForResource+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** SendEvent+ SendEvent (SendEvent'),+ newSendEvent,+ SendEventResponse (SendEventResponse'),+ newSendEventResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateLoggingConfiguration+ UpdateLoggingConfiguration (UpdateLoggingConfiguration'),+ newUpdateLoggingConfiguration,+ UpdateLoggingConfigurationResponse (UpdateLoggingConfigurationResponse'),+ newUpdateLoggingConfigurationResponse,++ -- ** UpdateRoom+ UpdateRoom (UpdateRoom'),+ newUpdateRoom,+ UpdateRoomResponse (UpdateRoomResponse'),+ newUpdateRoomResponse,++ -- * Types++ -- ** ChatTokenCapability+ ChatTokenCapability (..),++ -- ** CreateLoggingConfigurationState+ CreateLoggingConfigurationState (..),++ -- ** FallbackResult+ FallbackResult (..),++ -- ** LoggingConfigurationState+ LoggingConfigurationState (..),++ -- ** UpdateLoggingConfigurationState+ UpdateLoggingConfigurationState (..),++ -- ** CloudWatchLogsDestinationConfiguration+ CloudWatchLogsDestinationConfiguration (CloudWatchLogsDestinationConfiguration'),+ newCloudWatchLogsDestinationConfiguration,++ -- ** DestinationConfiguration+ DestinationConfiguration (DestinationConfiguration'),+ newDestinationConfiguration,++ -- ** FirehoseDestinationConfiguration+ FirehoseDestinationConfiguration (FirehoseDestinationConfiguration'),+ newFirehoseDestinationConfiguration,++ -- ** LoggingConfigurationSummary+ LoggingConfigurationSummary (LoggingConfigurationSummary'),+ newLoggingConfigurationSummary,++ -- ** MessageReviewHandler+ MessageReviewHandler (MessageReviewHandler'),+ newMessageReviewHandler,++ -- ** RoomSummary+ RoomSummary (RoomSummary'),+ newRoomSummary,++ -- ** S3DestinationConfiguration+ S3DestinationConfiguration (S3DestinationConfiguration'),+ newS3DestinationConfiguration,+ )+where++import Amazonka.IVSChat.CreateChatToken+import Amazonka.IVSChat.CreateLoggingConfiguration+import Amazonka.IVSChat.CreateRoom+import Amazonka.IVSChat.DeleteLoggingConfiguration+import Amazonka.IVSChat.DeleteMessage+import Amazonka.IVSChat.DeleteRoom+import Amazonka.IVSChat.DisconnectUser+import Amazonka.IVSChat.GetLoggingConfiguration+import Amazonka.IVSChat.GetRoom+import Amazonka.IVSChat.Lens+import Amazonka.IVSChat.ListLoggingConfigurations+import Amazonka.IVSChat.ListRooms+import Amazonka.IVSChat.ListTagsForResource+import Amazonka.IVSChat.SendEvent+import Amazonka.IVSChat.TagResource+import Amazonka.IVSChat.Types+import Amazonka.IVSChat.UntagResource+import Amazonka.IVSChat.UpdateLoggingConfiguration+import Amazonka.IVSChat.UpdateRoom+import Amazonka.IVSChat.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 'IVSChat'.++-- $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/IVSChat/CreateChatToken.hs view
@@ -0,0 +1,295 @@+{-# 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.IVSChat.CreateChatToken+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an encrypted token that is used by a chat participant to+-- establish an individual WebSocket chat connection to a room. When the+-- token is used to connect to chat, the connection is valid for the+-- session duration specified in the request. The token becomes invalid at+-- the token-expiration timestamp included in the response.+--+-- Use the @capabilities@ field to permit an end user to send messages or+-- moderate a room.+--+-- The @attributes@ field securely attaches structured data to the chat+-- session; the data is included within each message sent by the end user+-- and received by other participants in the room. Common use cases for+-- attributes include passing end-user profile data like an icon, display+-- name, colors, badges, and other display features.+--+-- Encryption keys are owned by Amazon IVS Chat and never used directly by+-- your application.+module Amazonka.IVSChat.CreateChatToken+ ( -- * Creating a Request+ CreateChatToken (..),+ newCreateChatToken,++ -- * Request Lenses+ createChatToken_attributes,+ createChatToken_capabilities,+ createChatToken_sessionDurationInMinutes,+ createChatToken_roomIdentifier,+ createChatToken_userId,++ -- * Destructuring the Response+ CreateChatTokenResponse (..),+ newCreateChatTokenResponse,++ -- * Response Lenses+ createChatTokenResponse_sessionExpirationTime,+ createChatTokenResponse_token,+ createChatTokenResponse_tokenExpirationTime,+ createChatTokenResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateChatToken' smart constructor.+data CreateChatToken = CreateChatToken'+ { -- | Application-provided attributes to encode into the token and attach to a+ -- chat session. Map keys and values can contain UTF-8 encoded text. The+ -- maximum length of this field is 1 KB total.+ attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Set of capabilities that the user is allowed to perform in the room.+ -- Default: None (the capability to view messages is implicitly included in+ -- all requests).+ capabilities :: Prelude.Maybe [ChatTokenCapability],+ -- | Session duration (in minutes), after which the session expires. Default:+ -- 60 (1 hour).+ sessionDurationInMinutes :: Prelude.Maybe Prelude.Natural,+ -- | Identifier of the room that the client is trying to access. Currently+ -- this must be an ARN.+ roomIdentifier :: Prelude.Text,+ -- | Application-provided ID that uniquely identifies the user associated+ -- with this token. This can be any UTF-8 encoded text.+ userId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateChatToken' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'createChatToken_attributes' - Application-provided attributes to encode into the token and attach to a+-- chat session. Map keys and values can contain UTF-8 encoded text. The+-- maximum length of this field is 1 KB total.+--+-- 'capabilities', 'createChatToken_capabilities' - Set of capabilities that the user is allowed to perform in the room.+-- Default: None (the capability to view messages is implicitly included in+-- all requests).+--+-- 'sessionDurationInMinutes', 'createChatToken_sessionDurationInMinutes' - Session duration (in minutes), after which the session expires. Default:+-- 60 (1 hour).+--+-- 'roomIdentifier', 'createChatToken_roomIdentifier' - Identifier of the room that the client is trying to access. Currently+-- this must be an ARN.+--+-- 'userId', 'createChatToken_userId' - Application-provided ID that uniquely identifies the user associated+-- with this token. This can be any UTF-8 encoded text.+newCreateChatToken ::+ -- | 'roomIdentifier'+ Prelude.Text ->+ -- | 'userId'+ Prelude.Text ->+ CreateChatToken+newCreateChatToken pRoomIdentifier_ pUserId_ =+ CreateChatToken'+ { attributes = Prelude.Nothing,+ capabilities = Prelude.Nothing,+ sessionDurationInMinutes = Prelude.Nothing,+ roomIdentifier = pRoomIdentifier_,+ userId = pUserId_+ }++-- | Application-provided attributes to encode into the token and attach to a+-- chat session. Map keys and values can contain UTF-8 encoded text. The+-- maximum length of this field is 1 KB total.+createChatToken_attributes :: Lens.Lens' CreateChatToken (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createChatToken_attributes = Lens.lens (\CreateChatToken' {attributes} -> attributes) (\s@CreateChatToken' {} a -> s {attributes = a} :: CreateChatToken) Prelude.. Lens.mapping Lens.coerced++-- | Set of capabilities that the user is allowed to perform in the room.+-- Default: None (the capability to view messages is implicitly included in+-- all requests).+createChatToken_capabilities :: Lens.Lens' CreateChatToken (Prelude.Maybe [ChatTokenCapability])+createChatToken_capabilities = Lens.lens (\CreateChatToken' {capabilities} -> capabilities) (\s@CreateChatToken' {} a -> s {capabilities = a} :: CreateChatToken) Prelude.. Lens.mapping Lens.coerced++-- | Session duration (in minutes), after which the session expires. Default:+-- 60 (1 hour).+createChatToken_sessionDurationInMinutes :: Lens.Lens' CreateChatToken (Prelude.Maybe Prelude.Natural)+createChatToken_sessionDurationInMinutes = Lens.lens (\CreateChatToken' {sessionDurationInMinutes} -> sessionDurationInMinutes) (\s@CreateChatToken' {} a -> s {sessionDurationInMinutes = a} :: CreateChatToken)++-- | Identifier of the room that the client is trying to access. Currently+-- this must be an ARN.+createChatToken_roomIdentifier :: Lens.Lens' CreateChatToken Prelude.Text+createChatToken_roomIdentifier = Lens.lens (\CreateChatToken' {roomIdentifier} -> roomIdentifier) (\s@CreateChatToken' {} a -> s {roomIdentifier = a} :: CreateChatToken)++-- | Application-provided ID that uniquely identifies the user associated+-- with this token. This can be any UTF-8 encoded text.+createChatToken_userId :: Lens.Lens' CreateChatToken Prelude.Text+createChatToken_userId = Lens.lens (\CreateChatToken' {userId} -> userId) (\s@CreateChatToken' {} a -> s {userId = a} :: CreateChatToken)++instance Core.AWSRequest CreateChatToken where+ type+ AWSResponse CreateChatToken =+ CreateChatTokenResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateChatTokenResponse'+ Prelude.<$> (x Data..?> "sessionExpirationTime")+ Prelude.<*> (x Data..?> "token")+ Prelude.<*> (x Data..?> "tokenExpirationTime")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateChatToken where+ hashWithSalt _salt CreateChatToken' {..} =+ _salt+ `Prelude.hashWithSalt` attributes+ `Prelude.hashWithSalt` capabilities+ `Prelude.hashWithSalt` sessionDurationInMinutes+ `Prelude.hashWithSalt` roomIdentifier+ `Prelude.hashWithSalt` userId++instance Prelude.NFData CreateChatToken where+ rnf CreateChatToken' {..} =+ Prelude.rnf attributes+ `Prelude.seq` Prelude.rnf capabilities+ `Prelude.seq` Prelude.rnf sessionDurationInMinutes+ `Prelude.seq` Prelude.rnf roomIdentifier+ `Prelude.seq` Prelude.rnf userId++instance Data.ToHeaders CreateChatToken where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateChatToken where+ toJSON CreateChatToken' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("attributes" Data..=) Prelude.<$> attributes,+ ("capabilities" Data..=) Prelude.<$> capabilities,+ ("sessionDurationInMinutes" Data..=)+ Prelude.<$> sessionDurationInMinutes,+ Prelude.Just+ ("roomIdentifier" Data..= roomIdentifier),+ Prelude.Just ("userId" Data..= userId)+ ]+ )++instance Data.ToPath CreateChatToken where+ toPath = Prelude.const "/CreateChatToken"++instance Data.ToQuery CreateChatToken where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateChatTokenResponse' smart constructor.+data CreateChatTokenResponse = CreateChatTokenResponse'+ { -- | Time after which an end user\'s session is no longer valid. This is an+ -- ISO 8601 timestamp; /note that this is returned as a string/.+ sessionExpirationTime :: Prelude.Maybe Data.ISO8601,+ -- | The issued client token, encrypted.+ token :: Prelude.Maybe Prelude.Text,+ -- | Time after which the token is no longer valid and cannot be used to+ -- connect to a room. This is an ISO 8601 timestamp; /note that this is+ -- returned as a string/.+ tokenExpirationTime :: Prelude.Maybe Data.ISO8601,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateChatTokenResponse' 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:+--+-- 'sessionExpirationTime', 'createChatTokenResponse_sessionExpirationTime' - Time after which an end user\'s session is no longer valid. This is an+-- ISO 8601 timestamp; /note that this is returned as a string/.+--+-- 'token', 'createChatTokenResponse_token' - The issued client token, encrypted.+--+-- 'tokenExpirationTime', 'createChatTokenResponse_tokenExpirationTime' - Time after which the token is no longer valid and cannot be used to+-- connect to a room. This is an ISO 8601 timestamp; /note that this is+-- returned as a string/.+--+-- 'httpStatus', 'createChatTokenResponse_httpStatus' - The response's http status code.+newCreateChatTokenResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateChatTokenResponse+newCreateChatTokenResponse pHttpStatus_ =+ CreateChatTokenResponse'+ { sessionExpirationTime =+ Prelude.Nothing,+ token = Prelude.Nothing,+ tokenExpirationTime = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Time after which an end user\'s session is no longer valid. This is an+-- ISO 8601 timestamp; /note that this is returned as a string/.+createChatTokenResponse_sessionExpirationTime :: Lens.Lens' CreateChatTokenResponse (Prelude.Maybe Prelude.UTCTime)+createChatTokenResponse_sessionExpirationTime = Lens.lens (\CreateChatTokenResponse' {sessionExpirationTime} -> sessionExpirationTime) (\s@CreateChatTokenResponse' {} a -> s {sessionExpirationTime = a} :: CreateChatTokenResponse) Prelude.. Lens.mapping Data._Time++-- | The issued client token, encrypted.+createChatTokenResponse_token :: Lens.Lens' CreateChatTokenResponse (Prelude.Maybe Prelude.Text)+createChatTokenResponse_token = Lens.lens (\CreateChatTokenResponse' {token} -> token) (\s@CreateChatTokenResponse' {} a -> s {token = a} :: CreateChatTokenResponse)++-- | Time after which the token is no longer valid and cannot be used to+-- connect to a room. This is an ISO 8601 timestamp; /note that this is+-- returned as a string/.+createChatTokenResponse_tokenExpirationTime :: Lens.Lens' CreateChatTokenResponse (Prelude.Maybe Prelude.UTCTime)+createChatTokenResponse_tokenExpirationTime = Lens.lens (\CreateChatTokenResponse' {tokenExpirationTime} -> tokenExpirationTime) (\s@CreateChatTokenResponse' {} a -> s {tokenExpirationTime = a} :: CreateChatTokenResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+createChatTokenResponse_httpStatus :: Lens.Lens' CreateChatTokenResponse Prelude.Int+createChatTokenResponse_httpStatus = Lens.lens (\CreateChatTokenResponse' {httpStatus} -> httpStatus) (\s@CreateChatTokenResponse' {} a -> s {httpStatus = a} :: CreateChatTokenResponse)++instance Prelude.NFData CreateChatTokenResponse where+ rnf CreateChatTokenResponse' {..} =+ Prelude.rnf sessionExpirationTime+ `Prelude.seq` Prelude.rnf token+ `Prelude.seq` Prelude.rnf tokenExpirationTime+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/CreateLoggingConfiguration.hs view
@@ -0,0 +1,337 @@+{-# 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.IVSChat.CreateLoggingConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a logging configuration that allows clients to store and record+-- sent messages.+module Amazonka.IVSChat.CreateLoggingConfiguration+ ( -- * Creating a Request+ CreateLoggingConfiguration (..),+ newCreateLoggingConfiguration,++ -- * Request Lenses+ createLoggingConfiguration_name,+ createLoggingConfiguration_tags,+ createLoggingConfiguration_destinationConfiguration,++ -- * Destructuring the Response+ CreateLoggingConfigurationResponse (..),+ newCreateLoggingConfigurationResponse,++ -- * Response Lenses+ createLoggingConfigurationResponse_arn,+ createLoggingConfigurationResponse_createTime,+ createLoggingConfigurationResponse_destinationConfiguration,+ createLoggingConfigurationResponse_id,+ createLoggingConfigurationResponse_name,+ createLoggingConfigurationResponse_state,+ createLoggingConfigurationResponse_tags,+ createLoggingConfigurationResponse_updateTime,+ createLoggingConfigurationResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateLoggingConfiguration' smart constructor.+data CreateLoggingConfiguration = CreateLoggingConfiguration'+ { -- | Logging-configuration name. The value does not need to be unique.+ name :: Prelude.Maybe Prelude.Text,+ -- | Tags to attach to the resource. Array of maps, each of the form+ -- @string:string (key:value)@. See+ -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+ -- for details, including restrictions that apply to tags and \"Tag naming+ -- limits and requirements\"; Amazon IVS Chat has no constraints on tags+ -- beyond what is documented there.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | A complex type that contains a destination configuration for where chat+ -- content will be logged. There can be only one type of destination+ -- (@cloudWatchLogs@, @firehose@, or @s3@) in a @destinationConfiguration@.+ destinationConfiguration :: DestinationConfiguration+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateLoggingConfiguration' 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', 'createLoggingConfiguration_name' - Logging-configuration name. The value does not need to be unique.+--+-- 'tags', 'createLoggingConfiguration_tags' - Tags to attach to the resource. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints on tags+-- beyond what is documented there.+--+-- 'destinationConfiguration', 'createLoggingConfiguration_destinationConfiguration' - A complex type that contains a destination configuration for where chat+-- content will be logged. There can be only one type of destination+-- (@cloudWatchLogs@, @firehose@, or @s3@) in a @destinationConfiguration@.+newCreateLoggingConfiguration ::+ -- | 'destinationConfiguration'+ DestinationConfiguration ->+ CreateLoggingConfiguration+newCreateLoggingConfiguration+ pDestinationConfiguration_ =+ CreateLoggingConfiguration'+ { name = Prelude.Nothing,+ tags = Prelude.Nothing,+ destinationConfiguration =+ pDestinationConfiguration_+ }++-- | Logging-configuration name. The value does not need to be unique.+createLoggingConfiguration_name :: Lens.Lens' CreateLoggingConfiguration (Prelude.Maybe Prelude.Text)+createLoggingConfiguration_name = Lens.lens (\CreateLoggingConfiguration' {name} -> name) (\s@CreateLoggingConfiguration' {} a -> s {name = a} :: CreateLoggingConfiguration)++-- | Tags to attach to the resource. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints on tags+-- beyond what is documented there.+createLoggingConfiguration_tags :: Lens.Lens' CreateLoggingConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createLoggingConfiguration_tags = Lens.lens (\CreateLoggingConfiguration' {tags} -> tags) (\s@CreateLoggingConfiguration' {} a -> s {tags = a} :: CreateLoggingConfiguration) Prelude.. Lens.mapping Lens.coerced++-- | A complex type that contains a destination configuration for where chat+-- content will be logged. There can be only one type of destination+-- (@cloudWatchLogs@, @firehose@, or @s3@) in a @destinationConfiguration@.+createLoggingConfiguration_destinationConfiguration :: Lens.Lens' CreateLoggingConfiguration DestinationConfiguration+createLoggingConfiguration_destinationConfiguration = Lens.lens (\CreateLoggingConfiguration' {destinationConfiguration} -> destinationConfiguration) (\s@CreateLoggingConfiguration' {} a -> s {destinationConfiguration = a} :: CreateLoggingConfiguration)++instance Core.AWSRequest CreateLoggingConfiguration where+ type+ AWSResponse CreateLoggingConfiguration =+ CreateLoggingConfigurationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateLoggingConfigurationResponse'+ Prelude.<$> (x Data..?> "arn")+ Prelude.<*> (x Data..?> "createTime")+ Prelude.<*> (x Data..?> "destinationConfiguration")+ Prelude.<*> (x Data..?> "id")+ Prelude.<*> (x Data..?> "name")+ Prelude.<*> (x Data..?> "state")+ Prelude.<*> (x Data..?> "tags" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "updateTime")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateLoggingConfiguration where+ hashWithSalt _salt CreateLoggingConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` destinationConfiguration++instance Prelude.NFData CreateLoggingConfiguration where+ rnf CreateLoggingConfiguration' {..} =+ Prelude.rnf name+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf destinationConfiguration++instance Data.ToHeaders CreateLoggingConfiguration where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateLoggingConfiguration where+ toJSON CreateLoggingConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("name" Data..=) Prelude.<$> name,+ ("tags" Data..=) Prelude.<$> tags,+ Prelude.Just+ ( "destinationConfiguration"+ Data..= destinationConfiguration+ )+ ]+ )++instance Data.ToPath CreateLoggingConfiguration where+ toPath = Prelude.const "/CreateLoggingConfiguration"++instance Data.ToQuery CreateLoggingConfiguration where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateLoggingConfigurationResponse' smart constructor.+data CreateLoggingConfigurationResponse = CreateLoggingConfigurationResponse'+ { -- | Logging-configuration ARN, assigned by the system.+ arn :: Prelude.Maybe Prelude.Text,+ -- | Time when the logging configuration was created. This is an ISO 8601+ -- timestamp; /note that this is returned as a string/.+ createTime :: Prelude.Maybe Data.ISO8601,+ -- | A complex type that contains a destination configuration for where chat+ -- content will be logged, from the request. There is only one type of+ -- destination (@cloudWatchLogs@, @firehose@, or @s3@) in a+ -- @destinationConfiguration@.+ destinationConfiguration :: Prelude.Maybe DestinationConfiguration,+ -- | Logging-configuration ID, generated by the system. This is a relative+ -- identifier, the part of the ARN that uniquely identifies the logging+ -- configuration.+ id :: Prelude.Maybe Prelude.Text,+ -- | Logging-configuration name, from the request (if specified).+ name :: Prelude.Maybe Prelude.Text,+ -- | The state of the logging configuration. When the state is @ACTIVE@, the+ -- configuration is ready to log chat content.+ state :: Prelude.Maybe CreateLoggingConfigurationState,+ -- | Tags attached to the resource, from the request (if specified). Array of+ -- maps, each of the form @string:string (key:value)@.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Time of the logging configuration’s last update. This is an ISO 8601+ -- timestamp; /note that this is returned as a string/.+ updateTime :: Prelude.Maybe Data.ISO8601,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateLoggingConfigurationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'createLoggingConfigurationResponse_arn' - Logging-configuration ARN, assigned by the system.+--+-- 'createTime', 'createLoggingConfigurationResponse_createTime' - Time when the logging configuration was created. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+--+-- 'destinationConfiguration', 'createLoggingConfigurationResponse_destinationConfiguration' - A complex type that contains a destination configuration for where chat+-- content will be logged, from the request. There is only one type of+-- destination (@cloudWatchLogs@, @firehose@, or @s3@) in a+-- @destinationConfiguration@.+--+-- 'id', 'createLoggingConfigurationResponse_id' - Logging-configuration ID, generated by the system. This is a relative+-- identifier, the part of the ARN that uniquely identifies the logging+-- configuration.+--+-- 'name', 'createLoggingConfigurationResponse_name' - Logging-configuration name, from the request (if specified).+--+-- 'state', 'createLoggingConfigurationResponse_state' - The state of the logging configuration. When the state is @ACTIVE@, the+-- configuration is ready to log chat content.+--+-- 'tags', 'createLoggingConfigurationResponse_tags' - Tags attached to the resource, from the request (if specified). Array of+-- maps, each of the form @string:string (key:value)@.+--+-- 'updateTime', 'createLoggingConfigurationResponse_updateTime' - Time of the logging configuration’s last update. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+--+-- 'httpStatus', 'createLoggingConfigurationResponse_httpStatus' - The response's http status code.+newCreateLoggingConfigurationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateLoggingConfigurationResponse+newCreateLoggingConfigurationResponse pHttpStatus_ =+ CreateLoggingConfigurationResponse'+ { arn =+ Prelude.Nothing,+ createTime = Prelude.Nothing,+ destinationConfiguration =+ Prelude.Nothing,+ id = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing,+ tags = Prelude.Nothing,+ updateTime = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Logging-configuration ARN, assigned by the system.+createLoggingConfigurationResponse_arn :: Lens.Lens' CreateLoggingConfigurationResponse (Prelude.Maybe Prelude.Text)+createLoggingConfigurationResponse_arn = Lens.lens (\CreateLoggingConfigurationResponse' {arn} -> arn) (\s@CreateLoggingConfigurationResponse' {} a -> s {arn = a} :: CreateLoggingConfigurationResponse)++-- | Time when the logging configuration was created. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+createLoggingConfigurationResponse_createTime :: Lens.Lens' CreateLoggingConfigurationResponse (Prelude.Maybe Prelude.UTCTime)+createLoggingConfigurationResponse_createTime = Lens.lens (\CreateLoggingConfigurationResponse' {createTime} -> createTime) (\s@CreateLoggingConfigurationResponse' {} a -> s {createTime = a} :: CreateLoggingConfigurationResponse) Prelude.. Lens.mapping Data._Time++-- | A complex type that contains a destination configuration for where chat+-- content will be logged, from the request. There is only one type of+-- destination (@cloudWatchLogs@, @firehose@, or @s3@) in a+-- @destinationConfiguration@.+createLoggingConfigurationResponse_destinationConfiguration :: Lens.Lens' CreateLoggingConfigurationResponse (Prelude.Maybe DestinationConfiguration)+createLoggingConfigurationResponse_destinationConfiguration = Lens.lens (\CreateLoggingConfigurationResponse' {destinationConfiguration} -> destinationConfiguration) (\s@CreateLoggingConfigurationResponse' {} a -> s {destinationConfiguration = a} :: CreateLoggingConfigurationResponse)++-- | Logging-configuration ID, generated by the system. This is a relative+-- identifier, the part of the ARN that uniquely identifies the logging+-- configuration.+createLoggingConfigurationResponse_id :: Lens.Lens' CreateLoggingConfigurationResponse (Prelude.Maybe Prelude.Text)+createLoggingConfigurationResponse_id = Lens.lens (\CreateLoggingConfigurationResponse' {id} -> id) (\s@CreateLoggingConfigurationResponse' {} a -> s {id = a} :: CreateLoggingConfigurationResponse)++-- | Logging-configuration name, from the request (if specified).+createLoggingConfigurationResponse_name :: Lens.Lens' CreateLoggingConfigurationResponse (Prelude.Maybe Prelude.Text)+createLoggingConfigurationResponse_name = Lens.lens (\CreateLoggingConfigurationResponse' {name} -> name) (\s@CreateLoggingConfigurationResponse' {} a -> s {name = a} :: CreateLoggingConfigurationResponse)++-- | The state of the logging configuration. When the state is @ACTIVE@, the+-- configuration is ready to log chat content.+createLoggingConfigurationResponse_state :: Lens.Lens' CreateLoggingConfigurationResponse (Prelude.Maybe CreateLoggingConfigurationState)+createLoggingConfigurationResponse_state = Lens.lens (\CreateLoggingConfigurationResponse' {state} -> state) (\s@CreateLoggingConfigurationResponse' {} a -> s {state = a} :: CreateLoggingConfigurationResponse)++-- | Tags attached to the resource, from the request (if specified). Array of+-- maps, each of the form @string:string (key:value)@.+createLoggingConfigurationResponse_tags :: Lens.Lens' CreateLoggingConfigurationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createLoggingConfigurationResponse_tags = Lens.lens (\CreateLoggingConfigurationResponse' {tags} -> tags) (\s@CreateLoggingConfigurationResponse' {} a -> s {tags = a} :: CreateLoggingConfigurationResponse) Prelude.. Lens.mapping Lens.coerced++-- | Time of the logging configuration’s last update. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+createLoggingConfigurationResponse_updateTime :: Lens.Lens' CreateLoggingConfigurationResponse (Prelude.Maybe Prelude.UTCTime)+createLoggingConfigurationResponse_updateTime = Lens.lens (\CreateLoggingConfigurationResponse' {updateTime} -> updateTime) (\s@CreateLoggingConfigurationResponse' {} a -> s {updateTime = a} :: CreateLoggingConfigurationResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+createLoggingConfigurationResponse_httpStatus :: Lens.Lens' CreateLoggingConfigurationResponse Prelude.Int+createLoggingConfigurationResponse_httpStatus = Lens.lens (\CreateLoggingConfigurationResponse' {httpStatus} -> httpStatus) (\s@CreateLoggingConfigurationResponse' {} a -> s {httpStatus = a} :: CreateLoggingConfigurationResponse)++instance+ Prelude.NFData+ CreateLoggingConfigurationResponse+ where+ rnf CreateLoggingConfigurationResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf createTime+ `Prelude.seq` Prelude.rnf destinationConfiguration+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf updateTime+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/CreateRoom.hs view
@@ -0,0 +1,387 @@+{-# 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.IVSChat.CreateRoom+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a room that allows clients to connect and pass messages.+module Amazonka.IVSChat.CreateRoom+ ( -- * Creating a Request+ CreateRoom (..),+ newCreateRoom,++ -- * Request Lenses+ createRoom_loggingConfigurationIdentifiers,+ createRoom_maximumMessageLength,+ createRoom_maximumMessageRatePerSecond,+ createRoom_messageReviewHandler,+ createRoom_name,+ createRoom_tags,++ -- * Destructuring the Response+ CreateRoomResponse (..),+ newCreateRoomResponse,++ -- * Response Lenses+ createRoomResponse_arn,+ createRoomResponse_createTime,+ createRoomResponse_id,+ createRoomResponse_loggingConfigurationIdentifiers,+ createRoomResponse_maximumMessageLength,+ createRoomResponse_maximumMessageRatePerSecond,+ createRoomResponse_messageReviewHandler,+ createRoomResponse_name,+ createRoomResponse_tags,+ createRoomResponse_updateTime,+ createRoomResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateRoom' smart constructor.+data CreateRoom = CreateRoom'+ { -- | Array of logging-configuration identifiers attached to the room.+ loggingConfigurationIdentifiers :: Prelude.Maybe [Prelude.Text],+ -- | Maximum number of characters in a single message. Messages are expected+ -- to be UTF-8 encoded and this limit applies specifically to+ -- rune\/code-point count, not number of bytes. Default: 500.+ maximumMessageLength :: Prelude.Maybe Prelude.Natural,+ -- | Maximum number of messages per second that can be sent to the room (by+ -- all clients). Default: 10.+ maximumMessageRatePerSecond :: Prelude.Maybe Prelude.Natural,+ -- | Configuration information for optional review of messages.+ messageReviewHandler :: Prelude.Maybe MessageReviewHandler,+ -- | Room name. The value does not need to be unique.+ name :: Prelude.Maybe Prelude.Text,+ -- | Tags to attach to the resource. Array of maps, each of the form+ -- @string:string (key:value)@. See+ -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+ -- for details, including restrictions that apply to tags and \"Tag naming+ -- limits and requirements\"; Amazon IVS Chat has no constraints beyond+ -- what is documented there.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateRoom' 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:+--+-- 'loggingConfigurationIdentifiers', 'createRoom_loggingConfigurationIdentifiers' - Array of logging-configuration identifiers attached to the room.+--+-- 'maximumMessageLength', 'createRoom_maximumMessageLength' - Maximum number of characters in a single message. Messages are expected+-- to be UTF-8 encoded and this limit applies specifically to+-- rune\/code-point count, not number of bytes. Default: 500.+--+-- 'maximumMessageRatePerSecond', 'createRoom_maximumMessageRatePerSecond' - Maximum number of messages per second that can be sent to the room (by+-- all clients). Default: 10.+--+-- 'messageReviewHandler', 'createRoom_messageReviewHandler' - Configuration information for optional review of messages.+--+-- 'name', 'createRoom_name' - Room name. The value does not need to be unique.+--+-- 'tags', 'createRoom_tags' - Tags to attach to the resource. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints beyond+-- what is documented there.+newCreateRoom ::+ CreateRoom+newCreateRoom =+ CreateRoom'+ { loggingConfigurationIdentifiers =+ Prelude.Nothing,+ maximumMessageLength = Prelude.Nothing,+ maximumMessageRatePerSecond = Prelude.Nothing,+ messageReviewHandler = Prelude.Nothing,+ name = Prelude.Nothing,+ tags = Prelude.Nothing+ }++-- | Array of logging-configuration identifiers attached to the room.+createRoom_loggingConfigurationIdentifiers :: Lens.Lens' CreateRoom (Prelude.Maybe [Prelude.Text])+createRoom_loggingConfigurationIdentifiers = Lens.lens (\CreateRoom' {loggingConfigurationIdentifiers} -> loggingConfigurationIdentifiers) (\s@CreateRoom' {} a -> s {loggingConfigurationIdentifiers = a} :: CreateRoom) Prelude.. Lens.mapping Lens.coerced++-- | Maximum number of characters in a single message. Messages are expected+-- to be UTF-8 encoded and this limit applies specifically to+-- rune\/code-point count, not number of bytes. Default: 500.+createRoom_maximumMessageLength :: Lens.Lens' CreateRoom (Prelude.Maybe Prelude.Natural)+createRoom_maximumMessageLength = Lens.lens (\CreateRoom' {maximumMessageLength} -> maximumMessageLength) (\s@CreateRoom' {} a -> s {maximumMessageLength = a} :: CreateRoom)++-- | Maximum number of messages per second that can be sent to the room (by+-- all clients). Default: 10.+createRoom_maximumMessageRatePerSecond :: Lens.Lens' CreateRoom (Prelude.Maybe Prelude.Natural)+createRoom_maximumMessageRatePerSecond = Lens.lens (\CreateRoom' {maximumMessageRatePerSecond} -> maximumMessageRatePerSecond) (\s@CreateRoom' {} a -> s {maximumMessageRatePerSecond = a} :: CreateRoom)++-- | Configuration information for optional review of messages.+createRoom_messageReviewHandler :: Lens.Lens' CreateRoom (Prelude.Maybe MessageReviewHandler)+createRoom_messageReviewHandler = Lens.lens (\CreateRoom' {messageReviewHandler} -> messageReviewHandler) (\s@CreateRoom' {} a -> s {messageReviewHandler = a} :: CreateRoom)++-- | Room name. The value does not need to be unique.+createRoom_name :: Lens.Lens' CreateRoom (Prelude.Maybe Prelude.Text)+createRoom_name = Lens.lens (\CreateRoom' {name} -> name) (\s@CreateRoom' {} a -> s {name = a} :: CreateRoom)++-- | Tags to attach to the resource. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints beyond+-- what is documented there.+createRoom_tags :: Lens.Lens' CreateRoom (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createRoom_tags = Lens.lens (\CreateRoom' {tags} -> tags) (\s@CreateRoom' {} a -> s {tags = a} :: CreateRoom) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSRequest CreateRoom where+ type AWSResponse CreateRoom = CreateRoomResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateRoomResponse'+ Prelude.<$> (x Data..?> "arn")+ Prelude.<*> (x Data..?> "createTime")+ Prelude.<*> (x Data..?> "id")+ Prelude.<*> ( x+ Data..?> "loggingConfigurationIdentifiers"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "maximumMessageLength")+ Prelude.<*> (x Data..?> "maximumMessageRatePerSecond")+ Prelude.<*> (x Data..?> "messageReviewHandler")+ Prelude.<*> (x Data..?> "name")+ Prelude.<*> (x Data..?> "tags" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "updateTime")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateRoom where+ hashWithSalt _salt CreateRoom' {..} =+ _salt+ `Prelude.hashWithSalt` loggingConfigurationIdentifiers+ `Prelude.hashWithSalt` maximumMessageLength+ `Prelude.hashWithSalt` maximumMessageRatePerSecond+ `Prelude.hashWithSalt` messageReviewHandler+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` tags++instance Prelude.NFData CreateRoom where+ rnf CreateRoom' {..} =+ Prelude.rnf loggingConfigurationIdentifiers+ `Prelude.seq` Prelude.rnf maximumMessageLength+ `Prelude.seq` Prelude.rnf maximumMessageRatePerSecond+ `Prelude.seq` Prelude.rnf messageReviewHandler+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf tags++instance Data.ToHeaders CreateRoom where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateRoom where+ toJSON CreateRoom' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("loggingConfigurationIdentifiers" Data..=)+ Prelude.<$> loggingConfigurationIdentifiers,+ ("maximumMessageLength" Data..=)+ Prelude.<$> maximumMessageLength,+ ("maximumMessageRatePerSecond" Data..=)+ Prelude.<$> maximumMessageRatePerSecond,+ ("messageReviewHandler" Data..=)+ Prelude.<$> messageReviewHandler,+ ("name" Data..=) Prelude.<$> name,+ ("tags" Data..=) Prelude.<$> tags+ ]+ )++instance Data.ToPath CreateRoom where+ toPath = Prelude.const "/CreateRoom"++instance Data.ToQuery CreateRoom where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateRoomResponse' smart constructor.+data CreateRoomResponse = CreateRoomResponse'+ { -- | Room ARN, assigned by the system.+ arn :: Prelude.Maybe Prelude.Text,+ -- | Time when the room was created. This is an ISO 8601 timestamp; /note+ -- that this is returned as a string/.+ createTime :: Prelude.Maybe Data.ISO8601,+ -- | Room ID, generated by the system. This is a relative identifier, the+ -- part of the ARN that uniquely identifies the room.+ id :: Prelude.Maybe Prelude.Text,+ -- | Array of logging configurations attached to the room, from the request+ -- (if specified).+ loggingConfigurationIdentifiers :: Prelude.Maybe [Prelude.Text],+ -- | Maximum number of characters in a single message, from the request (if+ -- specified).+ maximumMessageLength :: Prelude.Maybe Prelude.Natural,+ -- | Maximum number of messages per second that can be sent to the room (by+ -- all clients), from the request (if specified).+ maximumMessageRatePerSecond :: Prelude.Maybe Prelude.Natural,+ -- | Configuration information for optional review of messages.+ messageReviewHandler :: Prelude.Maybe MessageReviewHandler,+ -- | Room name, from the request (if specified).+ name :: Prelude.Maybe Prelude.Text,+ -- | Tags attached to the resource, from the request (if specified).+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Time of the room’s last update. This is an ISO 8601 timestamp; /note+ -- that this is returned as a string/.+ updateTime :: Prelude.Maybe Data.ISO8601,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateRoomResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'createRoomResponse_arn' - Room ARN, assigned by the system.+--+-- 'createTime', 'createRoomResponse_createTime' - Time when the room was created. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+--+-- 'id', 'createRoomResponse_id' - Room ID, generated by the system. This is a relative identifier, the+-- part of the ARN that uniquely identifies the room.+--+-- 'loggingConfigurationIdentifiers', 'createRoomResponse_loggingConfigurationIdentifiers' - Array of logging configurations attached to the room, from the request+-- (if specified).+--+-- 'maximumMessageLength', 'createRoomResponse_maximumMessageLength' - Maximum number of characters in a single message, from the request (if+-- specified).+--+-- 'maximumMessageRatePerSecond', 'createRoomResponse_maximumMessageRatePerSecond' - Maximum number of messages per second that can be sent to the room (by+-- all clients), from the request (if specified).+--+-- 'messageReviewHandler', 'createRoomResponse_messageReviewHandler' - Configuration information for optional review of messages.+--+-- 'name', 'createRoomResponse_name' - Room name, from the request (if specified).+--+-- 'tags', 'createRoomResponse_tags' - Tags attached to the resource, from the request (if specified).+--+-- 'updateTime', 'createRoomResponse_updateTime' - Time of the room’s last update. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+--+-- 'httpStatus', 'createRoomResponse_httpStatus' - The response's http status code.+newCreateRoomResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateRoomResponse+newCreateRoomResponse pHttpStatus_ =+ CreateRoomResponse'+ { arn = Prelude.Nothing,+ createTime = Prelude.Nothing,+ id = Prelude.Nothing,+ loggingConfigurationIdentifiers = Prelude.Nothing,+ maximumMessageLength = Prelude.Nothing,+ maximumMessageRatePerSecond = Prelude.Nothing,+ messageReviewHandler = Prelude.Nothing,+ name = Prelude.Nothing,+ tags = Prelude.Nothing,+ updateTime = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Room ARN, assigned by the system.+createRoomResponse_arn :: Lens.Lens' CreateRoomResponse (Prelude.Maybe Prelude.Text)+createRoomResponse_arn = Lens.lens (\CreateRoomResponse' {arn} -> arn) (\s@CreateRoomResponse' {} a -> s {arn = a} :: CreateRoomResponse)++-- | Time when the room was created. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+createRoomResponse_createTime :: Lens.Lens' CreateRoomResponse (Prelude.Maybe Prelude.UTCTime)+createRoomResponse_createTime = Lens.lens (\CreateRoomResponse' {createTime} -> createTime) (\s@CreateRoomResponse' {} a -> s {createTime = a} :: CreateRoomResponse) Prelude.. Lens.mapping Data._Time++-- | Room ID, generated by the system. This is a relative identifier, the+-- part of the ARN that uniquely identifies the room.+createRoomResponse_id :: Lens.Lens' CreateRoomResponse (Prelude.Maybe Prelude.Text)+createRoomResponse_id = Lens.lens (\CreateRoomResponse' {id} -> id) (\s@CreateRoomResponse' {} a -> s {id = a} :: CreateRoomResponse)++-- | Array of logging configurations attached to the room, from the request+-- (if specified).+createRoomResponse_loggingConfigurationIdentifiers :: Lens.Lens' CreateRoomResponse (Prelude.Maybe [Prelude.Text])+createRoomResponse_loggingConfigurationIdentifiers = Lens.lens (\CreateRoomResponse' {loggingConfigurationIdentifiers} -> loggingConfigurationIdentifiers) (\s@CreateRoomResponse' {} a -> s {loggingConfigurationIdentifiers = a} :: CreateRoomResponse) Prelude.. Lens.mapping Lens.coerced++-- | Maximum number of characters in a single message, from the request (if+-- specified).+createRoomResponse_maximumMessageLength :: Lens.Lens' CreateRoomResponse (Prelude.Maybe Prelude.Natural)+createRoomResponse_maximumMessageLength = Lens.lens (\CreateRoomResponse' {maximumMessageLength} -> maximumMessageLength) (\s@CreateRoomResponse' {} a -> s {maximumMessageLength = a} :: CreateRoomResponse)++-- | Maximum number of messages per second that can be sent to the room (by+-- all clients), from the request (if specified).+createRoomResponse_maximumMessageRatePerSecond :: Lens.Lens' CreateRoomResponse (Prelude.Maybe Prelude.Natural)+createRoomResponse_maximumMessageRatePerSecond = Lens.lens (\CreateRoomResponse' {maximumMessageRatePerSecond} -> maximumMessageRatePerSecond) (\s@CreateRoomResponse' {} a -> s {maximumMessageRatePerSecond = a} :: CreateRoomResponse)++-- | Configuration information for optional review of messages.+createRoomResponse_messageReviewHandler :: Lens.Lens' CreateRoomResponse (Prelude.Maybe MessageReviewHandler)+createRoomResponse_messageReviewHandler = Lens.lens (\CreateRoomResponse' {messageReviewHandler} -> messageReviewHandler) (\s@CreateRoomResponse' {} a -> s {messageReviewHandler = a} :: CreateRoomResponse)++-- | Room name, from the request (if specified).+createRoomResponse_name :: Lens.Lens' CreateRoomResponse (Prelude.Maybe Prelude.Text)+createRoomResponse_name = Lens.lens (\CreateRoomResponse' {name} -> name) (\s@CreateRoomResponse' {} a -> s {name = a} :: CreateRoomResponse)++-- | Tags attached to the resource, from the request (if specified).+createRoomResponse_tags :: Lens.Lens' CreateRoomResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createRoomResponse_tags = Lens.lens (\CreateRoomResponse' {tags} -> tags) (\s@CreateRoomResponse' {} a -> s {tags = a} :: CreateRoomResponse) Prelude.. Lens.mapping Lens.coerced++-- | Time of the room’s last update. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+createRoomResponse_updateTime :: Lens.Lens' CreateRoomResponse (Prelude.Maybe Prelude.UTCTime)+createRoomResponse_updateTime = Lens.lens (\CreateRoomResponse' {updateTime} -> updateTime) (\s@CreateRoomResponse' {} a -> s {updateTime = a} :: CreateRoomResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+createRoomResponse_httpStatus :: Lens.Lens' CreateRoomResponse Prelude.Int+createRoomResponse_httpStatus = Lens.lens (\CreateRoomResponse' {httpStatus} -> httpStatus) (\s@CreateRoomResponse' {} a -> s {httpStatus = a} :: CreateRoomResponse)++instance Prelude.NFData CreateRoomResponse where+ rnf CreateRoomResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf createTime+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf loggingConfigurationIdentifiers+ `Prelude.seq` Prelude.rnf maximumMessageLength+ `Prelude.seq` Prelude.rnf maximumMessageRatePerSecond+ `Prelude.seq` Prelude.rnf messageReviewHandler+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf updateTime+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/DeleteLoggingConfiguration.hs view
@@ -0,0 +1,137 @@+{-# 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.IVSChat.DeleteLoggingConfiguration+-- 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 the specified logging configuration.+module Amazonka.IVSChat.DeleteLoggingConfiguration+ ( -- * Creating a Request+ DeleteLoggingConfiguration (..),+ newDeleteLoggingConfiguration,++ -- * Request Lenses+ deleteLoggingConfiguration_identifier,++ -- * Destructuring the Response+ DeleteLoggingConfigurationResponse (..),+ newDeleteLoggingConfigurationResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteLoggingConfiguration' smart constructor.+data DeleteLoggingConfiguration = DeleteLoggingConfiguration'+ { -- | Identifier of the logging configuration to be deleted.+ identifier :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteLoggingConfiguration' 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:+--+-- 'identifier', 'deleteLoggingConfiguration_identifier' - Identifier of the logging configuration to be deleted.+newDeleteLoggingConfiguration ::+ -- | 'identifier'+ Prelude.Text ->+ DeleteLoggingConfiguration+newDeleteLoggingConfiguration pIdentifier_ =+ DeleteLoggingConfiguration'+ { identifier =+ pIdentifier_+ }++-- | Identifier of the logging configuration to be deleted.+deleteLoggingConfiguration_identifier :: Lens.Lens' DeleteLoggingConfiguration Prelude.Text+deleteLoggingConfiguration_identifier = Lens.lens (\DeleteLoggingConfiguration' {identifier} -> identifier) (\s@DeleteLoggingConfiguration' {} a -> s {identifier = a} :: DeleteLoggingConfiguration)++instance Core.AWSRequest DeleteLoggingConfiguration where+ type+ AWSResponse DeleteLoggingConfiguration =+ DeleteLoggingConfigurationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull+ DeleteLoggingConfigurationResponse'++instance Prelude.Hashable DeleteLoggingConfiguration where+ hashWithSalt _salt DeleteLoggingConfiguration' {..} =+ _salt `Prelude.hashWithSalt` identifier++instance Prelude.NFData DeleteLoggingConfiguration where+ rnf DeleteLoggingConfiguration' {..} =+ Prelude.rnf identifier++instance Data.ToHeaders DeleteLoggingConfiguration where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteLoggingConfiguration where+ toJSON DeleteLoggingConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("identifier" Data..= identifier)]+ )++instance Data.ToPath DeleteLoggingConfiguration where+ toPath = Prelude.const "/DeleteLoggingConfiguration"++instance Data.ToQuery DeleteLoggingConfiguration where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteLoggingConfigurationResponse' smart constructor.+data DeleteLoggingConfigurationResponse = DeleteLoggingConfigurationResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteLoggingConfigurationResponse' 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.+newDeleteLoggingConfigurationResponse ::+ DeleteLoggingConfigurationResponse+newDeleteLoggingConfigurationResponse =+ DeleteLoggingConfigurationResponse'++instance+ Prelude.NFData+ DeleteLoggingConfigurationResponse+ where+ rnf _ = ()
+ gen/Amazonka/IVSChat/DeleteMessage.hs view
@@ -0,0 +1,213 @@+{-# 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.IVSChat.DeleteMessage+-- 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 an event to a specific room which directs clients to delete a+-- specific message; that is, unrender it from view and delete it from the+-- client’s chat history. This event’s @EventName@ is @aws:DELETE_MESSAGE@.+-- This replicates the+-- <https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-deletemessage-publish.html DeleteMessage>+-- WebSocket operation in the Amazon IVS Chat Messaging API.+module Amazonka.IVSChat.DeleteMessage+ ( -- * Creating a Request+ DeleteMessage (..),+ newDeleteMessage,++ -- * Request Lenses+ deleteMessage_reason,+ deleteMessage_id,+ deleteMessage_roomIdentifier,++ -- * Destructuring the Response+ DeleteMessageResponse (..),+ newDeleteMessageResponse,++ -- * Response Lenses+ deleteMessageResponse_id,+ deleteMessageResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteMessage' smart constructor.+data DeleteMessage = DeleteMessage'+ { -- | Reason for deleting the message.+ reason :: Prelude.Maybe Prelude.Text,+ -- | ID of the message to be deleted. This is the @Id@ field in the received+ -- message (see+ -- <https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-message-subscribe.html Message (Subscribe)>+ -- in the Chat Messaging API).+ id :: Prelude.Text,+ -- | Identifier of the room where the message should be deleted. Currently+ -- this must be an ARN.+ roomIdentifier :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteMessage' 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:+--+-- 'reason', 'deleteMessage_reason' - Reason for deleting the message.+--+-- 'id', 'deleteMessage_id' - ID of the message to be deleted. This is the @Id@ field in the received+-- message (see+-- <https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-message-subscribe.html Message (Subscribe)>+-- in the Chat Messaging API).+--+-- 'roomIdentifier', 'deleteMessage_roomIdentifier' - Identifier of the room where the message should be deleted. Currently+-- this must be an ARN.+newDeleteMessage ::+ -- | 'id'+ Prelude.Text ->+ -- | 'roomIdentifier'+ Prelude.Text ->+ DeleteMessage+newDeleteMessage pId_ pRoomIdentifier_ =+ DeleteMessage'+ { reason = Prelude.Nothing,+ id = pId_,+ roomIdentifier = pRoomIdentifier_+ }++-- | Reason for deleting the message.+deleteMessage_reason :: Lens.Lens' DeleteMessage (Prelude.Maybe Prelude.Text)+deleteMessage_reason = Lens.lens (\DeleteMessage' {reason} -> reason) (\s@DeleteMessage' {} a -> s {reason = a} :: DeleteMessage)++-- | ID of the message to be deleted. This is the @Id@ field in the received+-- message (see+-- <https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-message-subscribe.html Message (Subscribe)>+-- in the Chat Messaging API).+deleteMessage_id :: Lens.Lens' DeleteMessage Prelude.Text+deleteMessage_id = Lens.lens (\DeleteMessage' {id} -> id) (\s@DeleteMessage' {} a -> s {id = a} :: DeleteMessage)++-- | Identifier of the room where the message should be deleted. Currently+-- this must be an ARN.+deleteMessage_roomIdentifier :: Lens.Lens' DeleteMessage Prelude.Text+deleteMessage_roomIdentifier = Lens.lens (\DeleteMessage' {roomIdentifier} -> roomIdentifier) (\s@DeleteMessage' {} a -> s {roomIdentifier = a} :: DeleteMessage)++instance Core.AWSRequest DeleteMessage where+ type+ AWSResponse DeleteMessage =+ DeleteMessageResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteMessageResponse'+ Prelude.<$> (x Data..?> "id")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteMessage where+ hashWithSalt _salt DeleteMessage' {..} =+ _salt+ `Prelude.hashWithSalt` reason+ `Prelude.hashWithSalt` id+ `Prelude.hashWithSalt` roomIdentifier++instance Prelude.NFData DeleteMessage where+ rnf DeleteMessage' {..} =+ Prelude.rnf reason+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf roomIdentifier++instance Data.ToHeaders DeleteMessage where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteMessage where+ toJSON DeleteMessage' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("reason" Data..=) Prelude.<$> reason,+ Prelude.Just ("id" Data..= id),+ Prelude.Just+ ("roomIdentifier" Data..= roomIdentifier)+ ]+ )++instance Data.ToPath DeleteMessage where+ toPath = Prelude.const "/DeleteMessage"++instance Data.ToQuery DeleteMessage where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteMessageResponse' smart constructor.+data DeleteMessageResponse = DeleteMessageResponse'+ { -- | Operation identifier, generated by Amazon IVS Chat.+ id :: 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 'DeleteMessageResponse' 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:+--+-- 'id', 'deleteMessageResponse_id' - Operation identifier, generated by Amazon IVS Chat.+--+-- 'httpStatus', 'deleteMessageResponse_httpStatus' - The response's http status code.+newDeleteMessageResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteMessageResponse+newDeleteMessageResponse pHttpStatus_ =+ DeleteMessageResponse'+ { id = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Operation identifier, generated by Amazon IVS Chat.+deleteMessageResponse_id :: Lens.Lens' DeleteMessageResponse (Prelude.Maybe Prelude.Text)+deleteMessageResponse_id = Lens.lens (\DeleteMessageResponse' {id} -> id) (\s@DeleteMessageResponse' {} a -> s {id = a} :: DeleteMessageResponse)++-- | The response's http status code.+deleteMessageResponse_httpStatus :: Lens.Lens' DeleteMessageResponse Prelude.Int+deleteMessageResponse_httpStatus = Lens.lens (\DeleteMessageResponse' {httpStatus} -> httpStatus) (\s@DeleteMessageResponse' {} a -> s {httpStatus = a} :: DeleteMessageResponse)++instance Prelude.NFData DeleteMessageResponse where+ rnf DeleteMessageResponse' {..} =+ Prelude.rnf id `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/DeleteRoom.hs view
@@ -0,0 +1,125 @@+{-# 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.IVSChat.DeleteRoom+-- 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 the specified room.+module Amazonka.IVSChat.DeleteRoom+ ( -- * Creating a Request+ DeleteRoom (..),+ newDeleteRoom,++ -- * Request Lenses+ deleteRoom_identifier,++ -- * Destructuring the Response+ DeleteRoomResponse (..),+ newDeleteRoomResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteRoom' smart constructor.+data DeleteRoom = DeleteRoom'+ { -- | Identifier of the room to be deleted. Currently this must be an ARN.+ identifier :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteRoom' 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:+--+-- 'identifier', 'deleteRoom_identifier' - Identifier of the room to be deleted. Currently this must be an ARN.+newDeleteRoom ::+ -- | 'identifier'+ Prelude.Text ->+ DeleteRoom+newDeleteRoom pIdentifier_ =+ DeleteRoom' {identifier = pIdentifier_}++-- | Identifier of the room to be deleted. Currently this must be an ARN.+deleteRoom_identifier :: Lens.Lens' DeleteRoom Prelude.Text+deleteRoom_identifier = Lens.lens (\DeleteRoom' {identifier} -> identifier) (\s@DeleteRoom' {} a -> s {identifier = a} :: DeleteRoom)++instance Core.AWSRequest DeleteRoom where+ type AWSResponse DeleteRoom = DeleteRoomResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response = Response.receiveNull DeleteRoomResponse'++instance Prelude.Hashable DeleteRoom where+ hashWithSalt _salt DeleteRoom' {..} =+ _salt `Prelude.hashWithSalt` identifier++instance Prelude.NFData DeleteRoom where+ rnf DeleteRoom' {..} = Prelude.rnf identifier++instance Data.ToHeaders DeleteRoom where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteRoom where+ toJSON DeleteRoom' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("identifier" Data..= identifier)]+ )++instance Data.ToPath DeleteRoom where+ toPath = Prelude.const "/DeleteRoom"++instance Data.ToQuery DeleteRoom where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteRoomResponse' smart constructor.+data DeleteRoomResponse = DeleteRoomResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteRoomResponse' 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.+newDeleteRoomResponse ::+ DeleteRoomResponse+newDeleteRoomResponse = DeleteRoomResponse'++instance Prelude.NFData DeleteRoomResponse where+ rnf _ = ()
+ gen/Amazonka/IVSChat/DisconnectUser.hs view
@@ -0,0 +1,189 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IVSChat.DisconnectUser+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Disconnects all connections using a specified user ID from a room. This+-- replicates the+-- <https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-disconnectuser-publish.html DisconnectUser>+-- WebSocket operation in the Amazon IVS Chat Messaging API.+module Amazonka.IVSChat.DisconnectUser+ ( -- * Creating a Request+ DisconnectUser (..),+ newDisconnectUser,++ -- * Request Lenses+ disconnectUser_reason,+ disconnectUser_roomIdentifier,+ disconnectUser_userId,++ -- * Destructuring the Response+ DisconnectUserResponse (..),+ newDisconnectUserResponse,++ -- * Response Lenses+ disconnectUserResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDisconnectUser' smart constructor.+data DisconnectUser = DisconnectUser'+ { -- | Reason for disconnecting the user.+ reason :: Prelude.Maybe Prelude.Text,+ -- | Identifier of the room from which the user\'s clients should be+ -- disconnected. Currently this must be an ARN.+ roomIdentifier :: Prelude.Text,+ -- | ID of the user (connection) to disconnect from the room.+ userId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisconnectUser' 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:+--+-- 'reason', 'disconnectUser_reason' - Reason for disconnecting the user.+--+-- 'roomIdentifier', 'disconnectUser_roomIdentifier' - Identifier of the room from which the user\'s clients should be+-- disconnected. Currently this must be an ARN.+--+-- 'userId', 'disconnectUser_userId' - ID of the user (connection) to disconnect from the room.+newDisconnectUser ::+ -- | 'roomIdentifier'+ Prelude.Text ->+ -- | 'userId'+ Prelude.Text ->+ DisconnectUser+newDisconnectUser pRoomIdentifier_ pUserId_ =+ DisconnectUser'+ { reason = Prelude.Nothing,+ roomIdentifier = pRoomIdentifier_,+ userId = pUserId_+ }++-- | Reason for disconnecting the user.+disconnectUser_reason :: Lens.Lens' DisconnectUser (Prelude.Maybe Prelude.Text)+disconnectUser_reason = Lens.lens (\DisconnectUser' {reason} -> reason) (\s@DisconnectUser' {} a -> s {reason = a} :: DisconnectUser)++-- | Identifier of the room from which the user\'s clients should be+-- disconnected. Currently this must be an ARN.+disconnectUser_roomIdentifier :: Lens.Lens' DisconnectUser Prelude.Text+disconnectUser_roomIdentifier = Lens.lens (\DisconnectUser' {roomIdentifier} -> roomIdentifier) (\s@DisconnectUser' {} a -> s {roomIdentifier = a} :: DisconnectUser)++-- | ID of the user (connection) to disconnect from the room.+disconnectUser_userId :: Lens.Lens' DisconnectUser Prelude.Text+disconnectUser_userId = Lens.lens (\DisconnectUser' {userId} -> userId) (\s@DisconnectUser' {} a -> s {userId = a} :: DisconnectUser)++instance Core.AWSRequest DisconnectUser where+ type+ AWSResponse DisconnectUser =+ DisconnectUserResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ DisconnectUserResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DisconnectUser where+ hashWithSalt _salt DisconnectUser' {..} =+ _salt+ `Prelude.hashWithSalt` reason+ `Prelude.hashWithSalt` roomIdentifier+ `Prelude.hashWithSalt` userId++instance Prelude.NFData DisconnectUser where+ rnf DisconnectUser' {..} =+ Prelude.rnf reason+ `Prelude.seq` Prelude.rnf roomIdentifier+ `Prelude.seq` Prelude.rnf userId++instance Data.ToHeaders DisconnectUser where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DisconnectUser where+ toJSON DisconnectUser' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("reason" Data..=) Prelude.<$> reason,+ Prelude.Just+ ("roomIdentifier" Data..= roomIdentifier),+ Prelude.Just ("userId" Data..= userId)+ ]+ )++instance Data.ToPath DisconnectUser where+ toPath = Prelude.const "/DisconnectUser"++instance Data.ToQuery DisconnectUser where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisconnectUserResponse' smart constructor.+data DisconnectUserResponse = DisconnectUserResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisconnectUserResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'disconnectUserResponse_httpStatus' - The response's http status code.+newDisconnectUserResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DisconnectUserResponse+newDisconnectUserResponse pHttpStatus_ =+ DisconnectUserResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+disconnectUserResponse_httpStatus :: Lens.Lens' DisconnectUserResponse Prelude.Int+disconnectUserResponse_httpStatus = Lens.lens (\DisconnectUserResponse' {httpStatus} -> httpStatus) (\s@DisconnectUserResponse' {} a -> s {httpStatus = a} :: DisconnectUserResponse)++instance Prelude.NFData DisconnectUserResponse where+ rnf DisconnectUserResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/GetLoggingConfiguration.hs view
@@ -0,0 +1,279 @@+{-# 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.IVSChat.GetLoggingConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets the specified logging configuration.+module Amazonka.IVSChat.GetLoggingConfiguration+ ( -- * Creating a Request+ GetLoggingConfiguration (..),+ newGetLoggingConfiguration,++ -- * Request Lenses+ getLoggingConfiguration_identifier,++ -- * Destructuring the Response+ GetLoggingConfigurationResponse (..),+ newGetLoggingConfigurationResponse,++ -- * Response Lenses+ getLoggingConfigurationResponse_arn,+ getLoggingConfigurationResponse_createTime,+ getLoggingConfigurationResponse_destinationConfiguration,+ getLoggingConfigurationResponse_id,+ getLoggingConfigurationResponse_name,+ getLoggingConfigurationResponse_state,+ getLoggingConfigurationResponse_tags,+ getLoggingConfigurationResponse_updateTime,+ getLoggingConfigurationResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetLoggingConfiguration' smart constructor.+data GetLoggingConfiguration = GetLoggingConfiguration'+ { -- | Identifier of the logging configuration to be retrieved.+ identifier :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetLoggingConfiguration' 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:+--+-- 'identifier', 'getLoggingConfiguration_identifier' - Identifier of the logging configuration to be retrieved.+newGetLoggingConfiguration ::+ -- | 'identifier'+ Prelude.Text ->+ GetLoggingConfiguration+newGetLoggingConfiguration pIdentifier_ =+ GetLoggingConfiguration' {identifier = pIdentifier_}++-- | Identifier of the logging configuration to be retrieved.+getLoggingConfiguration_identifier :: Lens.Lens' GetLoggingConfiguration Prelude.Text+getLoggingConfiguration_identifier = Lens.lens (\GetLoggingConfiguration' {identifier} -> identifier) (\s@GetLoggingConfiguration' {} a -> s {identifier = a} :: GetLoggingConfiguration)++instance Core.AWSRequest GetLoggingConfiguration where+ type+ AWSResponse GetLoggingConfiguration =+ GetLoggingConfigurationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetLoggingConfigurationResponse'+ Prelude.<$> (x Data..?> "arn")+ Prelude.<*> (x Data..?> "createTime")+ Prelude.<*> (x Data..?> "destinationConfiguration")+ Prelude.<*> (x Data..?> "id")+ Prelude.<*> (x Data..?> "name")+ Prelude.<*> (x Data..?> "state")+ Prelude.<*> (x Data..?> "tags" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "updateTime")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetLoggingConfiguration where+ hashWithSalt _salt GetLoggingConfiguration' {..} =+ _salt `Prelude.hashWithSalt` identifier++instance Prelude.NFData GetLoggingConfiguration where+ rnf GetLoggingConfiguration' {..} =+ Prelude.rnf identifier++instance Data.ToHeaders GetLoggingConfiguration where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetLoggingConfiguration where+ toJSON GetLoggingConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("identifier" Data..= identifier)]+ )++instance Data.ToPath GetLoggingConfiguration where+ toPath = Prelude.const "/GetLoggingConfiguration"++instance Data.ToQuery GetLoggingConfiguration where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetLoggingConfigurationResponse' smart constructor.+data GetLoggingConfigurationResponse = GetLoggingConfigurationResponse'+ { -- | Logging-configuration ARN, from the request (if @identifier@ was an+ -- ARN).+ arn :: Prelude.Maybe Prelude.Text,+ -- | Time when the logging configuration was created. This is an ISO 8601+ -- timestamp; /note that this is returned as a string/.+ createTime :: Prelude.Maybe Data.ISO8601,+ -- | A complex type that contains a destination configuration for where chat+ -- content will be logged. There is only one type of destination+ -- (@cloudWatchLogs@, @firehose@, or @s3@) in a @destinationConfiguration@.+ destinationConfiguration :: Prelude.Maybe DestinationConfiguration,+ -- | Logging-configuration ID, generated by the system. This is a relative+ -- identifier, the part of the ARN that uniquely identifies the logging+ -- configuration.+ id :: Prelude.Maybe Prelude.Text,+ -- | Logging-configuration name. This value does not need to be unique.+ name :: Prelude.Maybe Prelude.Text,+ -- | The state of the logging configuration. When the state is @ACTIVE@, the+ -- configuration is ready to log chat content.+ state :: Prelude.Maybe LoggingConfigurationState,+ -- | Tags attached to the resource. Array of maps, each of the form+ -- @string:string (key:value)@.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Time of the logging configuration’s last update. This is an ISO 8601+ -- timestamp; /note that this is returned as a string/.+ updateTime :: Prelude.Maybe Data.ISO8601,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetLoggingConfigurationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'getLoggingConfigurationResponse_arn' - Logging-configuration ARN, from the request (if @identifier@ was an+-- ARN).+--+-- 'createTime', 'getLoggingConfigurationResponse_createTime' - Time when the logging configuration was created. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+--+-- 'destinationConfiguration', 'getLoggingConfigurationResponse_destinationConfiguration' - A complex type that contains a destination configuration for where chat+-- content will be logged. There is only one type of destination+-- (@cloudWatchLogs@, @firehose@, or @s3@) in a @destinationConfiguration@.+--+-- 'id', 'getLoggingConfigurationResponse_id' - Logging-configuration ID, generated by the system. This is a relative+-- identifier, the part of the ARN that uniquely identifies the logging+-- configuration.+--+-- 'name', 'getLoggingConfigurationResponse_name' - Logging-configuration name. This value does not need to be unique.+--+-- 'state', 'getLoggingConfigurationResponse_state' - The state of the logging configuration. When the state is @ACTIVE@, the+-- configuration is ready to log chat content.+--+-- 'tags', 'getLoggingConfigurationResponse_tags' - Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@.+--+-- 'updateTime', 'getLoggingConfigurationResponse_updateTime' - Time of the logging configuration’s last update. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+--+-- 'httpStatus', 'getLoggingConfigurationResponse_httpStatus' - The response's http status code.+newGetLoggingConfigurationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetLoggingConfigurationResponse+newGetLoggingConfigurationResponse pHttpStatus_ =+ GetLoggingConfigurationResponse'+ { arn =+ Prelude.Nothing,+ createTime = Prelude.Nothing,+ destinationConfiguration = Prelude.Nothing,+ id = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing,+ tags = Prelude.Nothing,+ updateTime = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Logging-configuration ARN, from the request (if @identifier@ was an+-- ARN).+getLoggingConfigurationResponse_arn :: Lens.Lens' GetLoggingConfigurationResponse (Prelude.Maybe Prelude.Text)+getLoggingConfigurationResponse_arn = Lens.lens (\GetLoggingConfigurationResponse' {arn} -> arn) (\s@GetLoggingConfigurationResponse' {} a -> s {arn = a} :: GetLoggingConfigurationResponse)++-- | Time when the logging configuration was created. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+getLoggingConfigurationResponse_createTime :: Lens.Lens' GetLoggingConfigurationResponse (Prelude.Maybe Prelude.UTCTime)+getLoggingConfigurationResponse_createTime = Lens.lens (\GetLoggingConfigurationResponse' {createTime} -> createTime) (\s@GetLoggingConfigurationResponse' {} a -> s {createTime = a} :: GetLoggingConfigurationResponse) Prelude.. Lens.mapping Data._Time++-- | A complex type that contains a destination configuration for where chat+-- content will be logged. There is only one type of destination+-- (@cloudWatchLogs@, @firehose@, or @s3@) in a @destinationConfiguration@.+getLoggingConfigurationResponse_destinationConfiguration :: Lens.Lens' GetLoggingConfigurationResponse (Prelude.Maybe DestinationConfiguration)+getLoggingConfigurationResponse_destinationConfiguration = Lens.lens (\GetLoggingConfigurationResponse' {destinationConfiguration} -> destinationConfiguration) (\s@GetLoggingConfigurationResponse' {} a -> s {destinationConfiguration = a} :: GetLoggingConfigurationResponse)++-- | Logging-configuration ID, generated by the system. This is a relative+-- identifier, the part of the ARN that uniquely identifies the logging+-- configuration.+getLoggingConfigurationResponse_id :: Lens.Lens' GetLoggingConfigurationResponse (Prelude.Maybe Prelude.Text)+getLoggingConfigurationResponse_id = Lens.lens (\GetLoggingConfigurationResponse' {id} -> id) (\s@GetLoggingConfigurationResponse' {} a -> s {id = a} :: GetLoggingConfigurationResponse)++-- | Logging-configuration name. This value does not need to be unique.+getLoggingConfigurationResponse_name :: Lens.Lens' GetLoggingConfigurationResponse (Prelude.Maybe Prelude.Text)+getLoggingConfigurationResponse_name = Lens.lens (\GetLoggingConfigurationResponse' {name} -> name) (\s@GetLoggingConfigurationResponse' {} a -> s {name = a} :: GetLoggingConfigurationResponse)++-- | The state of the logging configuration. When the state is @ACTIVE@, the+-- configuration is ready to log chat content.+getLoggingConfigurationResponse_state :: Lens.Lens' GetLoggingConfigurationResponse (Prelude.Maybe LoggingConfigurationState)+getLoggingConfigurationResponse_state = Lens.lens (\GetLoggingConfigurationResponse' {state} -> state) (\s@GetLoggingConfigurationResponse' {} a -> s {state = a} :: GetLoggingConfigurationResponse)++-- | Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@.+getLoggingConfigurationResponse_tags :: Lens.Lens' GetLoggingConfigurationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+getLoggingConfigurationResponse_tags = Lens.lens (\GetLoggingConfigurationResponse' {tags} -> tags) (\s@GetLoggingConfigurationResponse' {} a -> s {tags = a} :: GetLoggingConfigurationResponse) Prelude.. Lens.mapping Lens.coerced++-- | Time of the logging configuration’s last update. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+getLoggingConfigurationResponse_updateTime :: Lens.Lens' GetLoggingConfigurationResponse (Prelude.Maybe Prelude.UTCTime)+getLoggingConfigurationResponse_updateTime = Lens.lens (\GetLoggingConfigurationResponse' {updateTime} -> updateTime) (\s@GetLoggingConfigurationResponse' {} a -> s {updateTime = a} :: GetLoggingConfigurationResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+getLoggingConfigurationResponse_httpStatus :: Lens.Lens' GetLoggingConfigurationResponse Prelude.Int+getLoggingConfigurationResponse_httpStatus = Lens.lens (\GetLoggingConfigurationResponse' {httpStatus} -> httpStatus) (\s@GetLoggingConfigurationResponse' {} a -> s {httpStatus = a} :: GetLoggingConfigurationResponse)++instance+ Prelude.NFData+ GetLoggingConfigurationResponse+ where+ rnf GetLoggingConfigurationResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf createTime+ `Prelude.seq` Prelude.rnf destinationConfiguration+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf updateTime+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/GetRoom.hs view
@@ -0,0 +1,296 @@+{-# 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.IVSChat.GetRoom+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets the specified room.+module Amazonka.IVSChat.GetRoom+ ( -- * Creating a Request+ GetRoom (..),+ newGetRoom,++ -- * Request Lenses+ getRoom_identifier,++ -- * Destructuring the Response+ GetRoomResponse (..),+ newGetRoomResponse,++ -- * Response Lenses+ getRoomResponse_arn,+ getRoomResponse_createTime,+ getRoomResponse_id,+ getRoomResponse_loggingConfigurationIdentifiers,+ getRoomResponse_maximumMessageLength,+ getRoomResponse_maximumMessageRatePerSecond,+ getRoomResponse_messageReviewHandler,+ getRoomResponse_name,+ getRoomResponse_tags,+ getRoomResponse_updateTime,+ getRoomResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetRoom' smart constructor.+data GetRoom = GetRoom'+ { -- | Identifier of the room for which the configuration is to be retrieved.+ -- Currently this must be an ARN.+ identifier :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRoom' 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:+--+-- 'identifier', 'getRoom_identifier' - Identifier of the room for which the configuration is to be retrieved.+-- Currently this must be an ARN.+newGetRoom ::+ -- | 'identifier'+ Prelude.Text ->+ GetRoom+newGetRoom pIdentifier_ =+ GetRoom' {identifier = pIdentifier_}++-- | Identifier of the room for which the configuration is to be retrieved.+-- Currently this must be an ARN.+getRoom_identifier :: Lens.Lens' GetRoom Prelude.Text+getRoom_identifier = Lens.lens (\GetRoom' {identifier} -> identifier) (\s@GetRoom' {} a -> s {identifier = a} :: GetRoom)++instance Core.AWSRequest GetRoom where+ type AWSResponse GetRoom = GetRoomResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetRoomResponse'+ Prelude.<$> (x Data..?> "arn")+ Prelude.<*> (x Data..?> "createTime")+ Prelude.<*> (x Data..?> "id")+ Prelude.<*> ( x+ Data..?> "loggingConfigurationIdentifiers"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "maximumMessageLength")+ Prelude.<*> (x Data..?> "maximumMessageRatePerSecond")+ Prelude.<*> (x Data..?> "messageReviewHandler")+ Prelude.<*> (x Data..?> "name")+ Prelude.<*> (x Data..?> "tags" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "updateTime")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetRoom where+ hashWithSalt _salt GetRoom' {..} =+ _salt `Prelude.hashWithSalt` identifier++instance Prelude.NFData GetRoom where+ rnf GetRoom' {..} = Prelude.rnf identifier++instance Data.ToHeaders GetRoom where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetRoom where+ toJSON GetRoom' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("identifier" Data..= identifier)]+ )++instance Data.ToPath GetRoom where+ toPath = Prelude.const "/GetRoom"++instance Data.ToQuery GetRoom where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetRoomResponse' smart constructor.+data GetRoomResponse = GetRoomResponse'+ { -- | Room ARN, from the request (if @identifier@ was an ARN).+ arn :: Prelude.Maybe Prelude.Text,+ -- | Time when the room was created. This is an ISO 8601 timestamp; /note+ -- that this is returned as a string/.+ createTime :: Prelude.Maybe Data.ISO8601,+ -- | Room ID, generated by the system. This is a relative identifier, the+ -- part of the ARN that uniquely identifies the room.+ id :: Prelude.Maybe Prelude.Text,+ -- | Array of logging configurations attached to the room.+ loggingConfigurationIdentifiers :: Prelude.Maybe [Prelude.Text],+ -- | Maximum number of characters in a single message. Messages are expected+ -- to be UTF-8 encoded and this limit applies specifically to+ -- rune\/code-point count, not number of bytes. Default: 500.+ maximumMessageLength :: Prelude.Maybe Prelude.Natural,+ -- | Maximum number of messages per second that can be sent to the room (by+ -- all clients). Default: 10.+ maximumMessageRatePerSecond :: Prelude.Maybe Prelude.Natural,+ -- | Configuration information for optional review of messages.+ messageReviewHandler :: Prelude.Maybe MessageReviewHandler,+ -- | Room name. The value does not need to be unique.+ name :: Prelude.Maybe Prelude.Text,+ -- | Tags attached to the resource. Array of maps, each of the form+ -- @string:string (key:value)@.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Time of the room’s last update. This is an ISO 8601 timestamp; /note+ -- that this is returned as a string/.+ updateTime :: Prelude.Maybe Data.ISO8601,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRoomResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'getRoomResponse_arn' - Room ARN, from the request (if @identifier@ was an ARN).+--+-- 'createTime', 'getRoomResponse_createTime' - Time when the room was created. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+--+-- 'id', 'getRoomResponse_id' - Room ID, generated by the system. This is a relative identifier, the+-- part of the ARN that uniquely identifies the room.+--+-- 'loggingConfigurationIdentifiers', 'getRoomResponse_loggingConfigurationIdentifiers' - Array of logging configurations attached to the room.+--+-- 'maximumMessageLength', 'getRoomResponse_maximumMessageLength' - Maximum number of characters in a single message. Messages are expected+-- to be UTF-8 encoded and this limit applies specifically to+-- rune\/code-point count, not number of bytes. Default: 500.+--+-- 'maximumMessageRatePerSecond', 'getRoomResponse_maximumMessageRatePerSecond' - Maximum number of messages per second that can be sent to the room (by+-- all clients). Default: 10.+--+-- 'messageReviewHandler', 'getRoomResponse_messageReviewHandler' - Configuration information for optional review of messages.+--+-- 'name', 'getRoomResponse_name' - Room name. The value does not need to be unique.+--+-- 'tags', 'getRoomResponse_tags' - Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@.+--+-- 'updateTime', 'getRoomResponse_updateTime' - Time of the room’s last update. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+--+-- 'httpStatus', 'getRoomResponse_httpStatus' - The response's http status code.+newGetRoomResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetRoomResponse+newGetRoomResponse pHttpStatus_ =+ GetRoomResponse'+ { arn = Prelude.Nothing,+ createTime = Prelude.Nothing,+ id = Prelude.Nothing,+ loggingConfigurationIdentifiers = Prelude.Nothing,+ maximumMessageLength = Prelude.Nothing,+ maximumMessageRatePerSecond = Prelude.Nothing,+ messageReviewHandler = Prelude.Nothing,+ name = Prelude.Nothing,+ tags = Prelude.Nothing,+ updateTime = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Room ARN, from the request (if @identifier@ was an ARN).+getRoomResponse_arn :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.Text)+getRoomResponse_arn = Lens.lens (\GetRoomResponse' {arn} -> arn) (\s@GetRoomResponse' {} a -> s {arn = a} :: GetRoomResponse)++-- | Time when the room was created. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+getRoomResponse_createTime :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.UTCTime)+getRoomResponse_createTime = Lens.lens (\GetRoomResponse' {createTime} -> createTime) (\s@GetRoomResponse' {} a -> s {createTime = a} :: GetRoomResponse) Prelude.. Lens.mapping Data._Time++-- | Room ID, generated by the system. This is a relative identifier, the+-- part of the ARN that uniquely identifies the room.+getRoomResponse_id :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.Text)+getRoomResponse_id = Lens.lens (\GetRoomResponse' {id} -> id) (\s@GetRoomResponse' {} a -> s {id = a} :: GetRoomResponse)++-- | Array of logging configurations attached to the room.+getRoomResponse_loggingConfigurationIdentifiers :: Lens.Lens' GetRoomResponse (Prelude.Maybe [Prelude.Text])+getRoomResponse_loggingConfigurationIdentifiers = Lens.lens (\GetRoomResponse' {loggingConfigurationIdentifiers} -> loggingConfigurationIdentifiers) (\s@GetRoomResponse' {} a -> s {loggingConfigurationIdentifiers = a} :: GetRoomResponse) Prelude.. Lens.mapping Lens.coerced++-- | Maximum number of characters in a single message. Messages are expected+-- to be UTF-8 encoded and this limit applies specifically to+-- rune\/code-point count, not number of bytes. Default: 500.+getRoomResponse_maximumMessageLength :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.Natural)+getRoomResponse_maximumMessageLength = Lens.lens (\GetRoomResponse' {maximumMessageLength} -> maximumMessageLength) (\s@GetRoomResponse' {} a -> s {maximumMessageLength = a} :: GetRoomResponse)++-- | Maximum number of messages per second that can be sent to the room (by+-- all clients). Default: 10.+getRoomResponse_maximumMessageRatePerSecond :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.Natural)+getRoomResponse_maximumMessageRatePerSecond = Lens.lens (\GetRoomResponse' {maximumMessageRatePerSecond} -> maximumMessageRatePerSecond) (\s@GetRoomResponse' {} a -> s {maximumMessageRatePerSecond = a} :: GetRoomResponse)++-- | Configuration information for optional review of messages.+getRoomResponse_messageReviewHandler :: Lens.Lens' GetRoomResponse (Prelude.Maybe MessageReviewHandler)+getRoomResponse_messageReviewHandler = Lens.lens (\GetRoomResponse' {messageReviewHandler} -> messageReviewHandler) (\s@GetRoomResponse' {} a -> s {messageReviewHandler = a} :: GetRoomResponse)++-- | Room name. The value does not need to be unique.+getRoomResponse_name :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.Text)+getRoomResponse_name = Lens.lens (\GetRoomResponse' {name} -> name) (\s@GetRoomResponse' {} a -> s {name = a} :: GetRoomResponse)++-- | Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@.+getRoomResponse_tags :: Lens.Lens' GetRoomResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+getRoomResponse_tags = Lens.lens (\GetRoomResponse' {tags} -> tags) (\s@GetRoomResponse' {} a -> s {tags = a} :: GetRoomResponse) Prelude.. Lens.mapping Lens.coerced++-- | Time of the room’s last update. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+getRoomResponse_updateTime :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.UTCTime)+getRoomResponse_updateTime = Lens.lens (\GetRoomResponse' {updateTime} -> updateTime) (\s@GetRoomResponse' {} a -> s {updateTime = a} :: GetRoomResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+getRoomResponse_httpStatus :: Lens.Lens' GetRoomResponse Prelude.Int+getRoomResponse_httpStatus = Lens.lens (\GetRoomResponse' {httpStatus} -> httpStatus) (\s@GetRoomResponse' {} a -> s {httpStatus = a} :: GetRoomResponse)++instance Prelude.NFData GetRoomResponse where+ rnf GetRoomResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf createTime+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf loggingConfigurationIdentifiers+ `Prelude.seq` Prelude.rnf maximumMessageLength+ `Prelude.seq` Prelude.rnf maximumMessageRatePerSecond+ `Prelude.seq` Prelude.rnf messageReviewHandler+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf updateTime+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/Lens.hs view
@@ -0,0 +1,243 @@+{-# 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.IVSChat.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.IVSChat.Lens+ ( -- * Operations++ -- ** CreateChatToken+ createChatToken_attributes,+ createChatToken_capabilities,+ createChatToken_sessionDurationInMinutes,+ createChatToken_roomIdentifier,+ createChatToken_userId,+ createChatTokenResponse_sessionExpirationTime,+ createChatTokenResponse_token,+ createChatTokenResponse_tokenExpirationTime,+ createChatTokenResponse_httpStatus,++ -- ** CreateLoggingConfiguration+ createLoggingConfiguration_name,+ createLoggingConfiguration_tags,+ createLoggingConfiguration_destinationConfiguration,+ createLoggingConfigurationResponse_arn,+ createLoggingConfigurationResponse_createTime,+ createLoggingConfigurationResponse_destinationConfiguration,+ createLoggingConfigurationResponse_id,+ createLoggingConfigurationResponse_name,+ createLoggingConfigurationResponse_state,+ createLoggingConfigurationResponse_tags,+ createLoggingConfigurationResponse_updateTime,+ createLoggingConfigurationResponse_httpStatus,++ -- ** CreateRoom+ createRoom_loggingConfigurationIdentifiers,+ createRoom_maximumMessageLength,+ createRoom_maximumMessageRatePerSecond,+ createRoom_messageReviewHandler,+ createRoom_name,+ createRoom_tags,+ createRoomResponse_arn,+ createRoomResponse_createTime,+ createRoomResponse_id,+ createRoomResponse_loggingConfigurationIdentifiers,+ createRoomResponse_maximumMessageLength,+ createRoomResponse_maximumMessageRatePerSecond,+ createRoomResponse_messageReviewHandler,+ createRoomResponse_name,+ createRoomResponse_tags,+ createRoomResponse_updateTime,+ createRoomResponse_httpStatus,++ -- ** DeleteLoggingConfiguration+ deleteLoggingConfiguration_identifier,++ -- ** DeleteMessage+ deleteMessage_reason,+ deleteMessage_id,+ deleteMessage_roomIdentifier,+ deleteMessageResponse_id,+ deleteMessageResponse_httpStatus,++ -- ** DeleteRoom+ deleteRoom_identifier,++ -- ** DisconnectUser+ disconnectUser_reason,+ disconnectUser_roomIdentifier,+ disconnectUser_userId,+ disconnectUserResponse_httpStatus,++ -- ** GetLoggingConfiguration+ getLoggingConfiguration_identifier,+ getLoggingConfigurationResponse_arn,+ getLoggingConfigurationResponse_createTime,+ getLoggingConfigurationResponse_destinationConfiguration,+ getLoggingConfigurationResponse_id,+ getLoggingConfigurationResponse_name,+ getLoggingConfigurationResponse_state,+ getLoggingConfigurationResponse_tags,+ getLoggingConfigurationResponse_updateTime,+ getLoggingConfigurationResponse_httpStatus,++ -- ** GetRoom+ getRoom_identifier,+ getRoomResponse_arn,+ getRoomResponse_createTime,+ getRoomResponse_id,+ getRoomResponse_loggingConfigurationIdentifiers,+ getRoomResponse_maximumMessageLength,+ getRoomResponse_maximumMessageRatePerSecond,+ getRoomResponse_messageReviewHandler,+ getRoomResponse_name,+ getRoomResponse_tags,+ getRoomResponse_updateTime,+ getRoomResponse_httpStatus,++ -- ** ListLoggingConfigurations+ listLoggingConfigurations_maxResults,+ listLoggingConfigurations_nextToken,+ listLoggingConfigurationsResponse_nextToken,+ listLoggingConfigurationsResponse_httpStatus,+ listLoggingConfigurationsResponse_loggingConfigurations,++ -- ** ListRooms+ listRooms_loggingConfigurationIdentifier,+ listRooms_maxResults,+ listRooms_messageReviewHandlerUri,+ listRooms_name,+ listRooms_nextToken,+ listRoomsResponse_nextToken,+ listRoomsResponse_httpStatus,+ listRoomsResponse_rooms,++ -- ** ListTagsForResource+ listTagsForResource_resourceArn,+ listTagsForResourceResponse_httpStatus,+ listTagsForResourceResponse_tags,++ -- ** SendEvent+ sendEvent_attributes,+ sendEvent_eventName,+ sendEvent_roomIdentifier,+ sendEventResponse_id,+ sendEventResponse_httpStatus,++ -- ** TagResource+ tagResource_resourceArn,+ tagResource_tags,+ tagResourceResponse_httpStatus,++ -- ** UntagResource+ untagResource_resourceArn,+ untagResource_tagKeys,+ untagResourceResponse_httpStatus,++ -- ** UpdateLoggingConfiguration+ updateLoggingConfiguration_destinationConfiguration,+ updateLoggingConfiguration_name,+ updateLoggingConfiguration_identifier,+ updateLoggingConfigurationResponse_arn,+ updateLoggingConfigurationResponse_createTime,+ updateLoggingConfigurationResponse_destinationConfiguration,+ updateLoggingConfigurationResponse_id,+ updateLoggingConfigurationResponse_name,+ updateLoggingConfigurationResponse_state,+ updateLoggingConfigurationResponse_tags,+ updateLoggingConfigurationResponse_updateTime,+ updateLoggingConfigurationResponse_httpStatus,++ -- ** UpdateRoom+ updateRoom_loggingConfigurationIdentifiers,+ updateRoom_maximumMessageLength,+ updateRoom_maximumMessageRatePerSecond,+ updateRoom_messageReviewHandler,+ updateRoom_name,+ updateRoom_identifier,+ updateRoomResponse_arn,+ updateRoomResponse_createTime,+ updateRoomResponse_id,+ updateRoomResponse_loggingConfigurationIdentifiers,+ updateRoomResponse_maximumMessageLength,+ updateRoomResponse_maximumMessageRatePerSecond,+ updateRoomResponse_messageReviewHandler,+ updateRoomResponse_name,+ updateRoomResponse_tags,+ updateRoomResponse_updateTime,+ updateRoomResponse_httpStatus,++ -- * Types++ -- ** CloudWatchLogsDestinationConfiguration+ cloudWatchLogsDestinationConfiguration_logGroupName,++ -- ** DestinationConfiguration+ destinationConfiguration_cloudWatchLogs,+ destinationConfiguration_firehose,+ destinationConfiguration_s3,++ -- ** FirehoseDestinationConfiguration+ firehoseDestinationConfiguration_deliveryStreamName,++ -- ** LoggingConfigurationSummary+ loggingConfigurationSummary_arn,+ loggingConfigurationSummary_createTime,+ loggingConfigurationSummary_destinationConfiguration,+ loggingConfigurationSummary_id,+ loggingConfigurationSummary_name,+ loggingConfigurationSummary_state,+ loggingConfigurationSummary_tags,+ loggingConfigurationSummary_updateTime,++ -- ** MessageReviewHandler+ messageReviewHandler_fallbackResult,+ messageReviewHandler_uri,++ -- ** RoomSummary+ roomSummary_arn,+ roomSummary_createTime,+ roomSummary_id,+ roomSummary_loggingConfigurationIdentifiers,+ roomSummary_messageReviewHandler,+ roomSummary_name,+ roomSummary_tags,+ roomSummary_updateTime,++ -- ** S3DestinationConfiguration+ s3DestinationConfiguration_bucketName,+ )+where++import Amazonka.IVSChat.CreateChatToken+import Amazonka.IVSChat.CreateLoggingConfiguration+import Amazonka.IVSChat.CreateRoom+import Amazonka.IVSChat.DeleteLoggingConfiguration+import Amazonka.IVSChat.DeleteMessage+import Amazonka.IVSChat.DeleteRoom+import Amazonka.IVSChat.DisconnectUser+import Amazonka.IVSChat.GetLoggingConfiguration+import Amazonka.IVSChat.GetRoom+import Amazonka.IVSChat.ListLoggingConfigurations+import Amazonka.IVSChat.ListRooms+import Amazonka.IVSChat.ListTagsForResource+import Amazonka.IVSChat.SendEvent+import Amazonka.IVSChat.TagResource+import Amazonka.IVSChat.Types.CloudWatchLogsDestinationConfiguration+import Amazonka.IVSChat.Types.DestinationConfiguration+import Amazonka.IVSChat.Types.FirehoseDestinationConfiguration+import Amazonka.IVSChat.Types.LoggingConfigurationSummary+import Amazonka.IVSChat.Types.MessageReviewHandler+import Amazonka.IVSChat.Types.RoomSummary+import Amazonka.IVSChat.Types.S3DestinationConfiguration+import Amazonka.IVSChat.UntagResource+import Amazonka.IVSChat.UpdateLoggingConfiguration+import Amazonka.IVSChat.UpdateRoom
+ gen/Amazonka/IVSChat/ListLoggingConfigurations.hs view
@@ -0,0 +1,212 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.IVSChat.ListLoggingConfigurations+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets summary information about all your logging configurations in the+-- AWS region where the API request is processed.+module Amazonka.IVSChat.ListLoggingConfigurations+ ( -- * Creating a Request+ ListLoggingConfigurations (..),+ newListLoggingConfigurations,++ -- * Request Lenses+ listLoggingConfigurations_maxResults,+ listLoggingConfigurations_nextToken,++ -- * Destructuring the Response+ ListLoggingConfigurationsResponse (..),+ newListLoggingConfigurationsResponse,++ -- * Response Lenses+ listLoggingConfigurationsResponse_nextToken,+ listLoggingConfigurationsResponse_httpStatus,+ listLoggingConfigurationsResponse_loggingConfigurations,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListLoggingConfigurations' smart constructor.+data ListLoggingConfigurations = ListLoggingConfigurations'+ { -- | Maximum number of logging configurations to return. Default: 50.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The first logging configurations to retrieve. This is used for+ -- pagination; see the @nextToken@ response field.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListLoggingConfigurations' 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', 'listLoggingConfigurations_maxResults' - Maximum number of logging configurations to return. Default: 50.+--+-- 'nextToken', 'listLoggingConfigurations_nextToken' - The first logging configurations to retrieve. This is used for+-- pagination; see the @nextToken@ response field.+newListLoggingConfigurations ::+ ListLoggingConfigurations+newListLoggingConfigurations =+ ListLoggingConfigurations'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | Maximum number of logging configurations to return. Default: 50.+listLoggingConfigurations_maxResults :: Lens.Lens' ListLoggingConfigurations (Prelude.Maybe Prelude.Natural)+listLoggingConfigurations_maxResults = Lens.lens (\ListLoggingConfigurations' {maxResults} -> maxResults) (\s@ListLoggingConfigurations' {} a -> s {maxResults = a} :: ListLoggingConfigurations)++-- | The first logging configurations to retrieve. This is used for+-- pagination; see the @nextToken@ response field.+listLoggingConfigurations_nextToken :: Lens.Lens' ListLoggingConfigurations (Prelude.Maybe Prelude.Text)+listLoggingConfigurations_nextToken = Lens.lens (\ListLoggingConfigurations' {nextToken} -> nextToken) (\s@ListLoggingConfigurations' {} a -> s {nextToken = a} :: ListLoggingConfigurations)++instance Core.AWSRequest ListLoggingConfigurations where+ type+ AWSResponse ListLoggingConfigurations =+ ListLoggingConfigurationsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListLoggingConfigurationsResponse'+ Prelude.<$> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> ( x+ Data..?> "loggingConfigurations"+ Core..!@ Prelude.mempty+ )+ )++instance Prelude.Hashable ListLoggingConfigurations where+ hashWithSalt _salt ListLoggingConfigurations' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListLoggingConfigurations where+ rnf ListLoggingConfigurations' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListLoggingConfigurations where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListLoggingConfigurations where+ toJSON ListLoggingConfigurations' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("maxResults" Data..=) Prelude.<$> maxResults,+ ("nextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListLoggingConfigurations where+ toPath = Prelude.const "/ListLoggingConfigurations"++instance Data.ToQuery ListLoggingConfigurations where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListLoggingConfigurationsResponse' smart constructor.+data ListLoggingConfigurationsResponse = ListLoggingConfigurationsResponse'+ { -- | If there are more logging configurations than @maxResults@, use+ -- @nextToken@ in the request to get the next set.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | List of the matching logging configurations (summary information only).+ -- There is only one type of destination (@cloudWatchLogs@, @firehose@, or+ -- @s3@) in a @destinationConfiguration@.+ loggingConfigurations :: [LoggingConfigurationSummary]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListLoggingConfigurationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'listLoggingConfigurationsResponse_nextToken' - If there are more logging configurations than @maxResults@, use+-- @nextToken@ in the request to get the next set.+--+-- 'httpStatus', 'listLoggingConfigurationsResponse_httpStatus' - The response's http status code.+--+-- 'loggingConfigurations', 'listLoggingConfigurationsResponse_loggingConfigurations' - List of the matching logging configurations (summary information only).+-- There is only one type of destination (@cloudWatchLogs@, @firehose@, or+-- @s3@) in a @destinationConfiguration@.+newListLoggingConfigurationsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListLoggingConfigurationsResponse+newListLoggingConfigurationsResponse pHttpStatus_ =+ ListLoggingConfigurationsResponse'+ { nextToken =+ Prelude.Nothing,+ httpStatus = pHttpStatus_,+ loggingConfigurations = Prelude.mempty+ }++-- | If there are more logging configurations than @maxResults@, use+-- @nextToken@ in the request to get the next set.+listLoggingConfigurationsResponse_nextToken :: Lens.Lens' ListLoggingConfigurationsResponse (Prelude.Maybe Prelude.Text)+listLoggingConfigurationsResponse_nextToken = Lens.lens (\ListLoggingConfigurationsResponse' {nextToken} -> nextToken) (\s@ListLoggingConfigurationsResponse' {} a -> s {nextToken = a} :: ListLoggingConfigurationsResponse)++-- | The response's http status code.+listLoggingConfigurationsResponse_httpStatus :: Lens.Lens' ListLoggingConfigurationsResponse Prelude.Int+listLoggingConfigurationsResponse_httpStatus = Lens.lens (\ListLoggingConfigurationsResponse' {httpStatus} -> httpStatus) (\s@ListLoggingConfigurationsResponse' {} a -> s {httpStatus = a} :: ListLoggingConfigurationsResponse)++-- | List of the matching logging configurations (summary information only).+-- There is only one type of destination (@cloudWatchLogs@, @firehose@, or+-- @s3@) in a @destinationConfiguration@.+listLoggingConfigurationsResponse_loggingConfigurations :: Lens.Lens' ListLoggingConfigurationsResponse [LoggingConfigurationSummary]+listLoggingConfigurationsResponse_loggingConfigurations = Lens.lens (\ListLoggingConfigurationsResponse' {loggingConfigurations} -> loggingConfigurations) (\s@ListLoggingConfigurationsResponse' {} a -> s {loggingConfigurations = a} :: ListLoggingConfigurationsResponse) Prelude.. Lens.coerced++instance+ Prelude.NFData+ ListLoggingConfigurationsResponse+ where+ rnf ListLoggingConfigurationsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf loggingConfigurations
+ gen/Amazonka/IVSChat/ListRooms.hs view
@@ -0,0 +1,239 @@+{-# 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.IVSChat.ListRooms+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets summary information about all your rooms in the AWS region where+-- the API request is processed. Results are sorted in descending order of+-- @updateTime@.+module Amazonka.IVSChat.ListRooms+ ( -- * Creating a Request+ ListRooms (..),+ newListRooms,++ -- * Request Lenses+ listRooms_loggingConfigurationIdentifier,+ listRooms_maxResults,+ listRooms_messageReviewHandlerUri,+ listRooms_name,+ listRooms_nextToken,++ -- * Destructuring the Response+ ListRoomsResponse (..),+ newListRoomsResponse,++ -- * Response Lenses+ listRoomsResponse_nextToken,+ listRoomsResponse_httpStatus,+ listRoomsResponse_rooms,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListRooms' smart constructor.+data ListRooms = ListRooms'+ { -- | Logging-configuration identifier.+ loggingConfigurationIdentifier :: Prelude.Maybe Prelude.Text,+ -- | Maximum number of rooms to return. Default: 50.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | Filters the list to match the specified message review handler URI.+ messageReviewHandlerUri :: Prelude.Maybe Prelude.Text,+ -- | Filters the list to match the specified room name.+ name :: Prelude.Maybe Prelude.Text,+ -- | The first room to retrieve. This is used for pagination; see the+ -- @nextToken@ response field.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRooms' 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:+--+-- 'loggingConfigurationIdentifier', 'listRooms_loggingConfigurationIdentifier' - Logging-configuration identifier.+--+-- 'maxResults', 'listRooms_maxResults' - Maximum number of rooms to return. Default: 50.+--+-- 'messageReviewHandlerUri', 'listRooms_messageReviewHandlerUri' - Filters the list to match the specified message review handler URI.+--+-- 'name', 'listRooms_name' - Filters the list to match the specified room name.+--+-- 'nextToken', 'listRooms_nextToken' - The first room to retrieve. This is used for pagination; see the+-- @nextToken@ response field.+newListRooms ::+ ListRooms+newListRooms =+ ListRooms'+ { loggingConfigurationIdentifier =+ Prelude.Nothing,+ maxResults = Prelude.Nothing,+ messageReviewHandlerUri = Prelude.Nothing,+ name = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | Logging-configuration identifier.+listRooms_loggingConfigurationIdentifier :: Lens.Lens' ListRooms (Prelude.Maybe Prelude.Text)+listRooms_loggingConfigurationIdentifier = Lens.lens (\ListRooms' {loggingConfigurationIdentifier} -> loggingConfigurationIdentifier) (\s@ListRooms' {} a -> s {loggingConfigurationIdentifier = a} :: ListRooms)++-- | Maximum number of rooms to return. Default: 50.+listRooms_maxResults :: Lens.Lens' ListRooms (Prelude.Maybe Prelude.Natural)+listRooms_maxResults = Lens.lens (\ListRooms' {maxResults} -> maxResults) (\s@ListRooms' {} a -> s {maxResults = a} :: ListRooms)++-- | Filters the list to match the specified message review handler URI.+listRooms_messageReviewHandlerUri :: Lens.Lens' ListRooms (Prelude.Maybe Prelude.Text)+listRooms_messageReviewHandlerUri = Lens.lens (\ListRooms' {messageReviewHandlerUri} -> messageReviewHandlerUri) (\s@ListRooms' {} a -> s {messageReviewHandlerUri = a} :: ListRooms)++-- | Filters the list to match the specified room name.+listRooms_name :: Lens.Lens' ListRooms (Prelude.Maybe Prelude.Text)+listRooms_name = Lens.lens (\ListRooms' {name} -> name) (\s@ListRooms' {} a -> s {name = a} :: ListRooms)++-- | The first room to retrieve. This is used for pagination; see the+-- @nextToken@ response field.+listRooms_nextToken :: Lens.Lens' ListRooms (Prelude.Maybe Prelude.Text)+listRooms_nextToken = Lens.lens (\ListRooms' {nextToken} -> nextToken) (\s@ListRooms' {} a -> s {nextToken = a} :: ListRooms)++instance Core.AWSRequest ListRooms where+ type AWSResponse ListRooms = ListRoomsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListRoomsResponse'+ Prelude.<$> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "rooms" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable ListRooms where+ hashWithSalt _salt ListRooms' {..} =+ _salt+ `Prelude.hashWithSalt` loggingConfigurationIdentifier+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` messageReviewHandlerUri+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListRooms where+ rnf ListRooms' {..} =+ Prelude.rnf loggingConfigurationIdentifier+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf messageReviewHandlerUri+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListRooms where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListRooms where+ toJSON ListRooms' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("loggingConfigurationIdentifier" Data..=)+ Prelude.<$> loggingConfigurationIdentifier,+ ("maxResults" Data..=) Prelude.<$> maxResults,+ ("messageReviewHandlerUri" Data..=)+ Prelude.<$> messageReviewHandlerUri,+ ("name" Data..=) Prelude.<$> name,+ ("nextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListRooms where+ toPath = Prelude.const "/ListRooms"++instance Data.ToQuery ListRooms where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListRoomsResponse' smart constructor.+data ListRoomsResponse = ListRoomsResponse'+ { -- | If there are more rooms than @maxResults@, use @nextToken@ in the+ -- request to get the next set.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | List of the matching rooms (summary information only).+ rooms :: [RoomSummary]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRoomsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'listRoomsResponse_nextToken' - If there are more rooms than @maxResults@, use @nextToken@ in the+-- request to get the next set.+--+-- 'httpStatus', 'listRoomsResponse_httpStatus' - The response's http status code.+--+-- 'rooms', 'listRoomsResponse_rooms' - List of the matching rooms (summary information only).+newListRoomsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListRoomsResponse+newListRoomsResponse pHttpStatus_ =+ ListRoomsResponse'+ { nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_,+ rooms = Prelude.mempty+ }++-- | If there are more rooms than @maxResults@, use @nextToken@ in the+-- request to get the next set.+listRoomsResponse_nextToken :: Lens.Lens' ListRoomsResponse (Prelude.Maybe Prelude.Text)+listRoomsResponse_nextToken = Lens.lens (\ListRoomsResponse' {nextToken} -> nextToken) (\s@ListRoomsResponse' {} a -> s {nextToken = a} :: ListRoomsResponse)++-- | The response's http status code.+listRoomsResponse_httpStatus :: Lens.Lens' ListRoomsResponse Prelude.Int+listRoomsResponse_httpStatus = Lens.lens (\ListRoomsResponse' {httpStatus} -> httpStatus) (\s@ListRoomsResponse' {} a -> s {httpStatus = a} :: ListRoomsResponse)++-- | List of the matching rooms (summary information only).+listRoomsResponse_rooms :: Lens.Lens' ListRoomsResponse [RoomSummary]+listRoomsResponse_rooms = Lens.lens (\ListRoomsResponse' {rooms} -> rooms) (\s@ListRoomsResponse' {} a -> s {rooms = a} :: ListRoomsResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListRoomsResponse where+ rnf ListRoomsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf rooms
+ gen/Amazonka/IVSChat/ListTagsForResource.hs view
@@ -0,0 +1,162 @@+{-# 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.IVSChat.ListTagsForResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets information about AWS tags for the specified ARN.+module Amazonka.IVSChat.ListTagsForResource+ ( -- * Creating a Request+ ListTagsForResource (..),+ newListTagsForResource,++ -- * Request Lenses+ listTagsForResource_resourceArn,++ -- * Destructuring the Response+ ListTagsForResourceResponse (..),+ newListTagsForResourceResponse,++ -- * Response Lenses+ listTagsForResourceResponse_httpStatus,+ listTagsForResourceResponse_tags,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+ { -- | The ARN of the resource to be retrieved. The ARN must be URL-encoded.+ resourceArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'listTagsForResource_resourceArn' - The ARN of the resource to be retrieved. The ARN must be URL-encoded.+newListTagsForResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceArn_ =+ ListTagsForResource' {resourceArn = pResourceArn_}++-- | The ARN of the resource to be retrieved. The ARN must be URL-encoded.+listTagsForResource_resourceArn :: Lens.Lens' ListTagsForResource Prelude.Text+listTagsForResource_resourceArn = Lens.lens (\ListTagsForResource' {resourceArn} -> resourceArn) (\s@ListTagsForResource' {} a -> s {resourceArn = a} :: ListTagsForResource)++instance Core.AWSRequest ListTagsForResource where+ type+ AWSResponse ListTagsForResource =+ ListTagsForResourceResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListTagsForResourceResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "tags" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable ListTagsForResource where+ hashWithSalt _salt ListTagsForResource' {..} =+ _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ListTagsForResource where+ rnf ListTagsForResource' {..} =+ Prelude.rnf resourceArn++instance Data.ToHeaders ListTagsForResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListTagsForResource where+ toPath ListTagsForResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery ListTagsForResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Tags attached to the resource. Array of maps, each of the form+ -- @string:string (key:value)@.+ tags :: Prelude.HashMap Prelude.Text Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+--+-- 'tags', 'listTagsForResourceResponse_tags' - Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+ ListTagsForResourceResponse'+ { httpStatus =+ pHttpStatus_,+ tags = Prelude.mempty+ }++-- | The response's http status code.+listTagsForResourceResponse_httpStatus :: Lens.Lens' ListTagsForResourceResponse Prelude.Int+listTagsForResourceResponse_httpStatus = Lens.lens (\ListTagsForResourceResponse' {httpStatus} -> httpStatus) (\s@ListTagsForResourceResponse' {} a -> s {httpStatus = a} :: ListTagsForResourceResponse)++-- | Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@.+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.HashMap Prelude.Text Prelude.Text)+listTagsForResourceResponse_tags = Lens.lens (\ListTagsForResourceResponse' {tags} -> tags) (\s@ListTagsForResourceResponse' {} a -> s {tags = a} :: ListTagsForResourceResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListTagsForResourceResponse where+ rnf ListTagsForResourceResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf tags
+ gen/Amazonka/IVSChat/SendEvent.hs view
@@ -0,0 +1,205 @@+{-# 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.IVSChat.SendEvent+-- 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 an event to a room. Use this within your application’s business+-- logic to send events to clients of a room; e.g., to notify clients to+-- change the way the chat UI is rendered.+module Amazonka.IVSChat.SendEvent+ ( -- * Creating a Request+ SendEvent (..),+ newSendEvent,++ -- * Request Lenses+ sendEvent_attributes,+ sendEvent_eventName,+ sendEvent_roomIdentifier,++ -- * Destructuring the Response+ SendEventResponse (..),+ newSendEventResponse,++ -- * Response Lenses+ sendEventResponse_id,+ sendEventResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newSendEvent' smart constructor.+data SendEvent = SendEvent'+ { -- | Application-defined metadata to attach to the event sent to clients. The+ -- maximum length of the metadata is 1 KB total.+ attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Application-defined name of the event to send to clients.+ eventName :: Prelude.Text,+ -- | Identifier of the room to which the event will be sent. Currently this+ -- must be an ARN.+ roomIdentifier :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SendEvent' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'sendEvent_attributes' - Application-defined metadata to attach to the event sent to clients. The+-- maximum length of the metadata is 1 KB total.+--+-- 'eventName', 'sendEvent_eventName' - Application-defined name of the event to send to clients.+--+-- 'roomIdentifier', 'sendEvent_roomIdentifier' - Identifier of the room to which the event will be sent. Currently this+-- must be an ARN.+newSendEvent ::+ -- | 'eventName'+ Prelude.Text ->+ -- | 'roomIdentifier'+ Prelude.Text ->+ SendEvent+newSendEvent pEventName_ pRoomIdentifier_ =+ SendEvent'+ { attributes = Prelude.Nothing,+ eventName = pEventName_,+ roomIdentifier = pRoomIdentifier_+ }++-- | Application-defined metadata to attach to the event sent to clients. The+-- maximum length of the metadata is 1 KB total.+sendEvent_attributes :: Lens.Lens' SendEvent (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+sendEvent_attributes = Lens.lens (\SendEvent' {attributes} -> attributes) (\s@SendEvent' {} a -> s {attributes = a} :: SendEvent) Prelude.. Lens.mapping Lens.coerced++-- | Application-defined name of the event to send to clients.+sendEvent_eventName :: Lens.Lens' SendEvent Prelude.Text+sendEvent_eventName = Lens.lens (\SendEvent' {eventName} -> eventName) (\s@SendEvent' {} a -> s {eventName = a} :: SendEvent)++-- | Identifier of the room to which the event will be sent. Currently this+-- must be an ARN.+sendEvent_roomIdentifier :: Lens.Lens' SendEvent Prelude.Text+sendEvent_roomIdentifier = Lens.lens (\SendEvent' {roomIdentifier} -> roomIdentifier) (\s@SendEvent' {} a -> s {roomIdentifier = a} :: SendEvent)++instance Core.AWSRequest SendEvent where+ type AWSResponse SendEvent = SendEventResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ SendEventResponse'+ Prelude.<$> (x Data..?> "id")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable SendEvent where+ hashWithSalt _salt SendEvent' {..} =+ _salt+ `Prelude.hashWithSalt` attributes+ `Prelude.hashWithSalt` eventName+ `Prelude.hashWithSalt` roomIdentifier++instance Prelude.NFData SendEvent where+ rnf SendEvent' {..} =+ Prelude.rnf attributes+ `Prelude.seq` Prelude.rnf eventName+ `Prelude.seq` Prelude.rnf roomIdentifier++instance Data.ToHeaders SendEvent where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON SendEvent where+ toJSON SendEvent' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("attributes" Data..=) Prelude.<$> attributes,+ Prelude.Just ("eventName" Data..= eventName),+ Prelude.Just+ ("roomIdentifier" Data..= roomIdentifier)+ ]+ )++instance Data.ToPath SendEvent where+ toPath = Prelude.const "/SendEvent"++instance Data.ToQuery SendEvent where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newSendEventResponse' smart constructor.+data SendEventResponse = SendEventResponse'+ { -- | An identifier generated by Amazon IVS Chat. This identifier must be used+ -- in subsequent operations for this message, such as DeleteMessage.+ id :: 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 'SendEventResponse' 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:+--+-- 'id', 'sendEventResponse_id' - An identifier generated by Amazon IVS Chat. This identifier must be used+-- in subsequent operations for this message, such as DeleteMessage.+--+-- 'httpStatus', 'sendEventResponse_httpStatus' - The response's http status code.+newSendEventResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ SendEventResponse+newSendEventResponse pHttpStatus_ =+ SendEventResponse'+ { id = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An identifier generated by Amazon IVS Chat. This identifier must be used+-- in subsequent operations for this message, such as DeleteMessage.+sendEventResponse_id :: Lens.Lens' SendEventResponse (Prelude.Maybe Prelude.Text)+sendEventResponse_id = Lens.lens (\SendEventResponse' {id} -> id) (\s@SendEventResponse' {} a -> s {id = a} :: SendEventResponse)++-- | The response's http status code.+sendEventResponse_httpStatus :: Lens.Lens' SendEventResponse Prelude.Int+sendEventResponse_httpStatus = Lens.lens (\SendEventResponse' {httpStatus} -> httpStatus) (\s@SendEventResponse' {} a -> s {httpStatus = a} :: SendEventResponse)++instance Prelude.NFData SendEventResponse where+ rnf SendEventResponse' {..} =+ Prelude.rnf id `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/TagResource.hs view
@@ -0,0 +1,178 @@+{-# 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.IVSChat.TagResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Adds or updates tags for the AWS resource with the specified ARN.+module Amazonka.IVSChat.TagResource+ ( -- * Creating a Request+ TagResource (..),+ newTagResource,++ -- * Request Lenses+ tagResource_resourceArn,+ tagResource_tags,++ -- * Destructuring the Response+ TagResourceResponse (..),+ newTagResourceResponse,++ -- * Response Lenses+ tagResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+ { -- | The ARN of the resource to be tagged. The ARN must be URL-encoded.+ resourceArn :: Prelude.Text,+ -- | Array of tags to be added or updated. Array of maps, each of the form+ -- @string:string (key:value)@. See+ -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+ -- for details, including restrictions that apply to tags and \"Tag naming+ -- limits and requirements\"; Amazon IVS Chat has no constraints beyond+ -- what is documented there.+ tags :: Prelude.HashMap Prelude.Text Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'tagResource_resourceArn' - The ARN of the resource to be tagged. The ARN must be URL-encoded.+--+-- 'tags', 'tagResource_tags' - Array of tags to be added or updated. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints beyond+-- what is documented there.+newTagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ TagResource+newTagResource pResourceArn_ =+ TagResource'+ { resourceArn = pResourceArn_,+ tags = Prelude.mempty+ }++-- | The ARN of the resource to be tagged. The ARN must be URL-encoded.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | Array of tags to be added or updated. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints beyond+-- what is documented there.+tagResource_tags :: Lens.Lens' TagResource (Prelude.HashMap Prelude.Text Prelude.Text)+tagResource_tags = Lens.lens (\TagResource' {tags} -> tags) (\s@TagResource' {} a -> s {tags = a} :: TagResource) Prelude.. Lens.coerced++instance Core.AWSRequest TagResource where+ type AWSResponse TagResource = TagResourceResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ TagResourceResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable TagResource where+ hashWithSalt _salt TagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` tags++instance Prelude.NFData TagResource where+ rnf TagResource' {..} =+ Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf tags++instance Data.ToHeaders TagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON TagResource where+ toJSON TagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("tags" Data..= tags)]+ )++instance Data.ToPath TagResource where+ toPath TagResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery TagResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newTagResourceResponse' smart constructor.+data TagResourceResponse = TagResourceResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'tagResourceResponse_httpStatus' - The response's http status code.+newTagResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ TagResourceResponse+newTagResourceResponse pHttpStatus_ =+ TagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+tagResourceResponse_httpStatus :: Lens.Lens' TagResourceResponse Prelude.Int+tagResourceResponse_httpStatus = Lens.lens (\TagResourceResponse' {httpStatus} -> httpStatus) (\s@TagResourceResponse' {} a -> s {httpStatus = a} :: TagResourceResponse)++instance Prelude.NFData TagResourceResponse where+ rnf TagResourceResponse' {..} = Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/Types.hs view
@@ -0,0 +1,240 @@+{-# 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.IVSChat.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.IVSChat.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _AccessDeniedException,+ _ConflictException,+ _InternalServerException,+ _PendingVerification,+ _ResourceNotFoundException,+ _ServiceQuotaExceededException,+ _ThrottlingException,+ _ValidationException,++ -- * ChatTokenCapability+ ChatTokenCapability (..),++ -- * CreateLoggingConfigurationState+ CreateLoggingConfigurationState (..),++ -- * FallbackResult+ FallbackResult (..),++ -- * LoggingConfigurationState+ LoggingConfigurationState (..),++ -- * UpdateLoggingConfigurationState+ UpdateLoggingConfigurationState (..),++ -- * CloudWatchLogsDestinationConfiguration+ CloudWatchLogsDestinationConfiguration (..),+ newCloudWatchLogsDestinationConfiguration,+ cloudWatchLogsDestinationConfiguration_logGroupName,++ -- * DestinationConfiguration+ DestinationConfiguration (..),+ newDestinationConfiguration,+ destinationConfiguration_cloudWatchLogs,+ destinationConfiguration_firehose,+ destinationConfiguration_s3,++ -- * FirehoseDestinationConfiguration+ FirehoseDestinationConfiguration (..),+ newFirehoseDestinationConfiguration,+ firehoseDestinationConfiguration_deliveryStreamName,++ -- * LoggingConfigurationSummary+ LoggingConfigurationSummary (..),+ newLoggingConfigurationSummary,+ loggingConfigurationSummary_arn,+ loggingConfigurationSummary_createTime,+ loggingConfigurationSummary_destinationConfiguration,+ loggingConfigurationSummary_id,+ loggingConfigurationSummary_name,+ loggingConfigurationSummary_state,+ loggingConfigurationSummary_tags,+ loggingConfigurationSummary_updateTime,++ -- * MessageReviewHandler+ MessageReviewHandler (..),+ newMessageReviewHandler,+ messageReviewHandler_fallbackResult,+ messageReviewHandler_uri,++ -- * RoomSummary+ RoomSummary (..),+ newRoomSummary,+ roomSummary_arn,+ roomSummary_createTime,+ roomSummary_id,+ roomSummary_loggingConfigurationIdentifiers,+ roomSummary_messageReviewHandler,+ roomSummary_name,+ roomSummary_tags,+ roomSummary_updateTime,++ -- * S3DestinationConfiguration+ S3DestinationConfiguration (..),+ newS3DestinationConfiguration,+ s3DestinationConfiguration_bucketName,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import Amazonka.IVSChat.Types.ChatTokenCapability+import Amazonka.IVSChat.Types.CloudWatchLogsDestinationConfiguration+import Amazonka.IVSChat.Types.CreateLoggingConfigurationState+import Amazonka.IVSChat.Types.DestinationConfiguration+import Amazonka.IVSChat.Types.FallbackResult+import Amazonka.IVSChat.Types.FirehoseDestinationConfiguration+import Amazonka.IVSChat.Types.LoggingConfigurationState+import Amazonka.IVSChat.Types.LoggingConfigurationSummary+import Amazonka.IVSChat.Types.MessageReviewHandler+import Amazonka.IVSChat.Types.RoomSummary+import Amazonka.IVSChat.Types.S3DestinationConfiguration+import Amazonka.IVSChat.Types.UpdateLoggingConfigurationState+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2020-07-14@ of the Amazon Interactive Video Service Chat SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "IVSChat",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "ivschat",+ Core.signingName = "ivschat",+ Core.version = "2020-07-14",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error = Core.parseJSONError "IVSChat",+ 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++_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+ Core._MatchServiceError+ defaultService+ "AccessDeniedException"+ Prelude.. Core.hasStatus 403++_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+ Core._MatchServiceError+ defaultService+ "ConflictException"+ Prelude.. Core.hasStatus 409++_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+ Core._MatchServiceError+ defaultService+ "InternalServerException"+ Prelude.. Core.hasStatus 500++_PendingVerification :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_PendingVerification =+ Core._MatchServiceError+ defaultService+ "PendingVerification"+ Prelude.. Core.hasStatus 403++_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"+ Prelude.. Core.hasStatus 404++_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceQuotaExceededException =+ Core._MatchServiceError+ defaultService+ "ServiceQuotaExceededException"+ Prelude.. Core.hasStatus 402++_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+ Core._MatchServiceError+ defaultService+ "ThrottlingException"+ Prelude.. Core.hasStatus 429++_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+ Core._MatchServiceError+ defaultService+ "ValidationException"+ Prelude.. Core.hasStatus 400
+ gen/Amazonka/IVSChat/Types/ChatTokenCapability.hs view
@@ -0,0 +1,76 @@+{-# 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.IVSChat.Types.ChatTokenCapability+-- 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.IVSChat.Types.ChatTokenCapability+ ( ChatTokenCapability+ ( ..,+ ChatTokenCapability_DELETE_MESSAGE,+ ChatTokenCapability_DISCONNECT_USER,+ ChatTokenCapability_SEND_MESSAGE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ChatTokenCapability = ChatTokenCapability'+ { fromChatTokenCapability ::+ 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 ChatTokenCapability_DELETE_MESSAGE :: ChatTokenCapability+pattern ChatTokenCapability_DELETE_MESSAGE = ChatTokenCapability' "DELETE_MESSAGE"++pattern ChatTokenCapability_DISCONNECT_USER :: ChatTokenCapability+pattern ChatTokenCapability_DISCONNECT_USER = ChatTokenCapability' "DISCONNECT_USER"++pattern ChatTokenCapability_SEND_MESSAGE :: ChatTokenCapability+pattern ChatTokenCapability_SEND_MESSAGE = ChatTokenCapability' "SEND_MESSAGE"++{-# COMPLETE+ ChatTokenCapability_DELETE_MESSAGE,+ ChatTokenCapability_DISCONNECT_USER,+ ChatTokenCapability_SEND_MESSAGE,+ ChatTokenCapability'+ #-}
+ gen/Amazonka/IVSChat/Types/CloudWatchLogsDestinationConfiguration.hs view
@@ -0,0 +1,99 @@+{-# 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.IVSChat.Types.CloudWatchLogsDestinationConfiguration+-- 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.IVSChat.Types.CloudWatchLogsDestinationConfiguration 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++-- | Specifies a CloudWatch Logs location where chat logs will be stored.+--+-- /See:/ 'newCloudWatchLogsDestinationConfiguration' smart constructor.+data CloudWatchLogsDestinationConfiguration = CloudWatchLogsDestinationConfiguration'+ { -- | Name of the Amazon Cloudwatch Logs destination where chat activity will+ -- be logged.+ logGroupName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CloudWatchLogsDestinationConfiguration' 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:+--+-- 'logGroupName', 'cloudWatchLogsDestinationConfiguration_logGroupName' - Name of the Amazon Cloudwatch Logs destination where chat activity will+-- be logged.+newCloudWatchLogsDestinationConfiguration ::+ -- | 'logGroupName'+ Prelude.Text ->+ CloudWatchLogsDestinationConfiguration+newCloudWatchLogsDestinationConfiguration+ pLogGroupName_ =+ CloudWatchLogsDestinationConfiguration'+ { logGroupName =+ pLogGroupName_+ }++-- | Name of the Amazon Cloudwatch Logs destination where chat activity will+-- be logged.+cloudWatchLogsDestinationConfiguration_logGroupName :: Lens.Lens' CloudWatchLogsDestinationConfiguration Prelude.Text+cloudWatchLogsDestinationConfiguration_logGroupName = Lens.lens (\CloudWatchLogsDestinationConfiguration' {logGroupName} -> logGroupName) (\s@CloudWatchLogsDestinationConfiguration' {} a -> s {logGroupName = a} :: CloudWatchLogsDestinationConfiguration)++instance+ Data.FromJSON+ CloudWatchLogsDestinationConfiguration+ where+ parseJSON =+ Data.withObject+ "CloudWatchLogsDestinationConfiguration"+ ( \x ->+ CloudWatchLogsDestinationConfiguration'+ Prelude.<$> (x Data..: "logGroupName")+ )++instance+ Prelude.Hashable+ CloudWatchLogsDestinationConfiguration+ where+ hashWithSalt+ _salt+ CloudWatchLogsDestinationConfiguration' {..} =+ _salt `Prelude.hashWithSalt` logGroupName++instance+ Prelude.NFData+ CloudWatchLogsDestinationConfiguration+ where+ rnf CloudWatchLogsDestinationConfiguration' {..} =+ Prelude.rnf logGroupName++instance+ Data.ToJSON+ CloudWatchLogsDestinationConfiguration+ where+ toJSON CloudWatchLogsDestinationConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("logGroupName" Data..= logGroupName)]+ )
+ gen/Amazonka/IVSChat/Types/CreateLoggingConfigurationState.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.IVSChat.Types.CreateLoggingConfigurationState+-- 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.IVSChat.Types.CreateLoggingConfigurationState+ ( CreateLoggingConfigurationState+ ( ..,+ CreateLoggingConfigurationState_ACTIVE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype CreateLoggingConfigurationState = CreateLoggingConfigurationState'+ { fromCreateLoggingConfigurationState ::+ 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 CreateLoggingConfigurationState_ACTIVE :: CreateLoggingConfigurationState+pattern CreateLoggingConfigurationState_ACTIVE = CreateLoggingConfigurationState' "ACTIVE"++{-# COMPLETE+ CreateLoggingConfigurationState_ACTIVE,+ CreateLoggingConfigurationState'+ #-}
+ gen/Amazonka/IVSChat/Types/DestinationConfiguration.hs view
@@ -0,0 +1,123 @@+{-# 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.IVSChat.Types.DestinationConfiguration+-- 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.IVSChat.Types.DestinationConfiguration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types.CloudWatchLogsDestinationConfiguration+import Amazonka.IVSChat.Types.FirehoseDestinationConfiguration+import Amazonka.IVSChat.Types.S3DestinationConfiguration+import qualified Amazonka.Prelude as Prelude++-- | A complex type that describes a location where chat logs will be stored.+-- Each member represents the configuration of one log destination. For+-- logging, you define only one type of destination (for CloudWatch Logs,+-- Kinesis Firehose, or S3).+--+-- /See:/ 'newDestinationConfiguration' smart constructor.+data DestinationConfiguration = DestinationConfiguration'+ { -- | An Amazon CloudWatch Logs destination configuration where chat activity+ -- will be logged.+ cloudWatchLogs :: Prelude.Maybe CloudWatchLogsDestinationConfiguration,+ -- | An Amazon Kinesis Data Firehose destination configuration where chat+ -- activity will be logged.+ firehose :: Prelude.Maybe FirehoseDestinationConfiguration,+ -- | An Amazon S3 destination configuration where chat activity will be+ -- logged.+ s3 :: Prelude.Maybe S3DestinationConfiguration+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DestinationConfiguration' 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:+--+-- 'cloudWatchLogs', 'destinationConfiguration_cloudWatchLogs' - An Amazon CloudWatch Logs destination configuration where chat activity+-- will be logged.+--+-- 'firehose', 'destinationConfiguration_firehose' - An Amazon Kinesis Data Firehose destination configuration where chat+-- activity will be logged.+--+-- 's3', 'destinationConfiguration_s3' - An Amazon S3 destination configuration where chat activity will be+-- logged.+newDestinationConfiguration ::+ DestinationConfiguration+newDestinationConfiguration =+ DestinationConfiguration'+ { cloudWatchLogs =+ Prelude.Nothing,+ firehose = Prelude.Nothing,+ s3 = Prelude.Nothing+ }++-- | An Amazon CloudWatch Logs destination configuration where chat activity+-- will be logged.+destinationConfiguration_cloudWatchLogs :: Lens.Lens' DestinationConfiguration (Prelude.Maybe CloudWatchLogsDestinationConfiguration)+destinationConfiguration_cloudWatchLogs = Lens.lens (\DestinationConfiguration' {cloudWatchLogs} -> cloudWatchLogs) (\s@DestinationConfiguration' {} a -> s {cloudWatchLogs = a} :: DestinationConfiguration)++-- | An Amazon Kinesis Data Firehose destination configuration where chat+-- activity will be logged.+destinationConfiguration_firehose :: Lens.Lens' DestinationConfiguration (Prelude.Maybe FirehoseDestinationConfiguration)+destinationConfiguration_firehose = Lens.lens (\DestinationConfiguration' {firehose} -> firehose) (\s@DestinationConfiguration' {} a -> s {firehose = a} :: DestinationConfiguration)++-- | An Amazon S3 destination configuration where chat activity will be+-- logged.+destinationConfiguration_s3 :: Lens.Lens' DestinationConfiguration (Prelude.Maybe S3DestinationConfiguration)+destinationConfiguration_s3 = Lens.lens (\DestinationConfiguration' {s3} -> s3) (\s@DestinationConfiguration' {} a -> s {s3 = a} :: DestinationConfiguration)++instance Data.FromJSON DestinationConfiguration where+ parseJSON =+ Data.withObject+ "DestinationConfiguration"+ ( \x ->+ DestinationConfiguration'+ Prelude.<$> (x Data..:? "cloudWatchLogs")+ Prelude.<*> (x Data..:? "firehose")+ Prelude.<*> (x Data..:? "s3")+ )++instance Prelude.Hashable DestinationConfiguration where+ hashWithSalt _salt DestinationConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` cloudWatchLogs+ `Prelude.hashWithSalt` firehose+ `Prelude.hashWithSalt` s3++instance Prelude.NFData DestinationConfiguration where+ rnf DestinationConfiguration' {..} =+ Prelude.rnf cloudWatchLogs+ `Prelude.seq` Prelude.rnf firehose+ `Prelude.seq` Prelude.rnf s3++instance Data.ToJSON DestinationConfiguration where+ toJSON DestinationConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("cloudWatchLogs" Data..=)+ Prelude.<$> cloudWatchLogs,+ ("firehose" Data..=) Prelude.<$> firehose,+ ("s3" Data..=) Prelude.<$> s3+ ]+ )
+ gen/Amazonka/IVSChat/Types/FallbackResult.hs view
@@ -0,0 +1,71 @@+{-# 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.IVSChat.Types.FallbackResult+-- 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.IVSChat.Types.FallbackResult+ ( FallbackResult+ ( ..,+ FallbackResult_ALLOW,+ FallbackResult_DENY+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FallbackResult = FallbackResult'+ { fromFallbackResult ::+ 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 FallbackResult_ALLOW :: FallbackResult+pattern FallbackResult_ALLOW = FallbackResult' "ALLOW"++pattern FallbackResult_DENY :: FallbackResult+pattern FallbackResult_DENY = FallbackResult' "DENY"++{-# COMPLETE+ FallbackResult_ALLOW,+ FallbackResult_DENY,+ FallbackResult'+ #-}
+ gen/Amazonka/IVSChat/Types/FirehoseDestinationConfiguration.hs view
@@ -0,0 +1,98 @@+{-# 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.IVSChat.Types.FirehoseDestinationConfiguration+-- 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.IVSChat.Types.FirehoseDestinationConfiguration 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++-- | Specifies a Kinesis Firehose location where chat logs will be stored.+--+-- /See:/ 'newFirehoseDestinationConfiguration' smart constructor.+data FirehoseDestinationConfiguration = FirehoseDestinationConfiguration'+ { -- | Name of the Amazon Kinesis Firehose delivery stream where chat activity+ -- will be logged.+ deliveryStreamName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FirehoseDestinationConfiguration' 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:+--+-- 'deliveryStreamName', 'firehoseDestinationConfiguration_deliveryStreamName' - Name of the Amazon Kinesis Firehose delivery stream where chat activity+-- will be logged.+newFirehoseDestinationConfiguration ::+ -- | 'deliveryStreamName'+ Prelude.Text ->+ FirehoseDestinationConfiguration+newFirehoseDestinationConfiguration+ pDeliveryStreamName_ =+ FirehoseDestinationConfiguration'+ { deliveryStreamName =+ pDeliveryStreamName_+ }++-- | Name of the Amazon Kinesis Firehose delivery stream where chat activity+-- will be logged.+firehoseDestinationConfiguration_deliveryStreamName :: Lens.Lens' FirehoseDestinationConfiguration Prelude.Text+firehoseDestinationConfiguration_deliveryStreamName = Lens.lens (\FirehoseDestinationConfiguration' {deliveryStreamName} -> deliveryStreamName) (\s@FirehoseDestinationConfiguration' {} a -> s {deliveryStreamName = a} :: FirehoseDestinationConfiguration)++instance+ Data.FromJSON+ FirehoseDestinationConfiguration+ where+ parseJSON =+ Data.withObject+ "FirehoseDestinationConfiguration"+ ( \x ->+ FirehoseDestinationConfiguration'+ Prelude.<$> (x Data..: "deliveryStreamName")+ )++instance+ Prelude.Hashable+ FirehoseDestinationConfiguration+ where+ hashWithSalt+ _salt+ FirehoseDestinationConfiguration' {..} =+ _salt `Prelude.hashWithSalt` deliveryStreamName++instance+ Prelude.NFData+ FirehoseDestinationConfiguration+ where+ rnf FirehoseDestinationConfiguration' {..} =+ Prelude.rnf deliveryStreamName++instance Data.ToJSON FirehoseDestinationConfiguration where+ toJSON FirehoseDestinationConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("deliveryStreamName" Data..= deliveryStreamName)+ ]+ )
+ gen/Amazonka/IVSChat/Types/LoggingConfigurationState.hs view
@@ -0,0 +1,96 @@+{-# 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.IVSChat.Types.LoggingConfigurationState+-- 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.IVSChat.Types.LoggingConfigurationState+ ( LoggingConfigurationState+ ( ..,+ LoggingConfigurationState_ACTIVE,+ LoggingConfigurationState_CREATE_FAILED,+ LoggingConfigurationState_CREATING,+ LoggingConfigurationState_DELETE_FAILED,+ LoggingConfigurationState_DELETING,+ LoggingConfigurationState_UPDATE_FAILED,+ LoggingConfigurationState_UPDATING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LoggingConfigurationState = LoggingConfigurationState'+ { fromLoggingConfigurationState ::+ 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 LoggingConfigurationState_ACTIVE :: LoggingConfigurationState+pattern LoggingConfigurationState_ACTIVE = LoggingConfigurationState' "ACTIVE"++pattern LoggingConfigurationState_CREATE_FAILED :: LoggingConfigurationState+pattern LoggingConfigurationState_CREATE_FAILED = LoggingConfigurationState' "CREATE_FAILED"++pattern LoggingConfigurationState_CREATING :: LoggingConfigurationState+pattern LoggingConfigurationState_CREATING = LoggingConfigurationState' "CREATING"++pattern LoggingConfigurationState_DELETE_FAILED :: LoggingConfigurationState+pattern LoggingConfigurationState_DELETE_FAILED = LoggingConfigurationState' "DELETE_FAILED"++pattern LoggingConfigurationState_DELETING :: LoggingConfigurationState+pattern LoggingConfigurationState_DELETING = LoggingConfigurationState' "DELETING"++pattern LoggingConfigurationState_UPDATE_FAILED :: LoggingConfigurationState+pattern LoggingConfigurationState_UPDATE_FAILED = LoggingConfigurationState' "UPDATE_FAILED"++pattern LoggingConfigurationState_UPDATING :: LoggingConfigurationState+pattern LoggingConfigurationState_UPDATING = LoggingConfigurationState' "UPDATING"++{-# COMPLETE+ LoggingConfigurationState_ACTIVE,+ LoggingConfigurationState_CREATE_FAILED,+ LoggingConfigurationState_CREATING,+ LoggingConfigurationState_DELETE_FAILED,+ LoggingConfigurationState_DELETING,+ LoggingConfigurationState_UPDATE_FAILED,+ LoggingConfigurationState_UPDATING,+ LoggingConfigurationState'+ #-}
+ gen/Amazonka/IVSChat/Types/LoggingConfigurationSummary.hs view
@@ -0,0 +1,188 @@+{-# 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.IVSChat.Types.LoggingConfigurationSummary+-- 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.IVSChat.Types.LoggingConfigurationSummary where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types.DestinationConfiguration+import Amazonka.IVSChat.Types.LoggingConfigurationState+import qualified Amazonka.Prelude as Prelude++-- | Summary information about a logging configuration.+--+-- /See:/ 'newLoggingConfigurationSummary' smart constructor.+data LoggingConfigurationSummary = LoggingConfigurationSummary'+ { -- | Logging-configuration ARN.+ arn :: Prelude.Maybe Prelude.Text,+ -- | Time when the logging configuration was created. This is an ISO 8601+ -- timestamp; /note that this is returned as a string/.+ createTime :: Prelude.Maybe Data.ISO8601,+ -- | A complex type that contains a destination configuration for where chat+ -- content will be logged.+ destinationConfiguration :: Prelude.Maybe DestinationConfiguration,+ -- | Logging-configuration ID, generated by the system. This is a relative+ -- identifier, the part of the ARN that uniquely identifies the room.+ id :: Prelude.Maybe Prelude.Text,+ -- | Logging-configuration name. The value does not need to be unique.+ name :: Prelude.Maybe Prelude.Text,+ -- | The state of the logging configuration. When this is @ACTIVE@, the+ -- configuration is ready for logging chat content.+ state :: Prelude.Maybe LoggingConfigurationState,+ -- | Tags to attach to the resource. Array of maps, each of the form+ -- @string:string (key:value)@. See+ -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+ -- for details, including restrictions that apply to tags and \"Tag naming+ -- limits and requirements\"; Amazon IVS Chat has no constraints on tags+ -- beyond what is documented there.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Time of the logging configuration’s last update. This is an ISO 8601+ -- timestamp; /note that this is returned as a string/.+ updateTime :: Prelude.Maybe Data.ISO8601+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LoggingConfigurationSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'loggingConfigurationSummary_arn' - Logging-configuration ARN.+--+-- 'createTime', 'loggingConfigurationSummary_createTime' - Time when the logging configuration was created. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+--+-- 'destinationConfiguration', 'loggingConfigurationSummary_destinationConfiguration' - A complex type that contains a destination configuration for where chat+-- content will be logged.+--+-- 'id', 'loggingConfigurationSummary_id' - Logging-configuration ID, generated by the system. This is a relative+-- identifier, the part of the ARN that uniquely identifies the room.+--+-- 'name', 'loggingConfigurationSummary_name' - Logging-configuration name. The value does not need to be unique.+--+-- 'state', 'loggingConfigurationSummary_state' - The state of the logging configuration. When this is @ACTIVE@, the+-- configuration is ready for logging chat content.+--+-- 'tags', 'loggingConfigurationSummary_tags' - Tags to attach to the resource. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints on tags+-- beyond what is documented there.+--+-- 'updateTime', 'loggingConfigurationSummary_updateTime' - Time of the logging configuration’s last update. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+newLoggingConfigurationSummary ::+ LoggingConfigurationSummary+newLoggingConfigurationSummary =+ LoggingConfigurationSummary'+ { arn = Prelude.Nothing,+ createTime = Prelude.Nothing,+ destinationConfiguration = Prelude.Nothing,+ id = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing,+ tags = Prelude.Nothing,+ updateTime = Prelude.Nothing+ }++-- | Logging-configuration ARN.+loggingConfigurationSummary_arn :: Lens.Lens' LoggingConfigurationSummary (Prelude.Maybe Prelude.Text)+loggingConfigurationSummary_arn = Lens.lens (\LoggingConfigurationSummary' {arn} -> arn) (\s@LoggingConfigurationSummary' {} a -> s {arn = a} :: LoggingConfigurationSummary)++-- | Time when the logging configuration was created. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+loggingConfigurationSummary_createTime :: Lens.Lens' LoggingConfigurationSummary (Prelude.Maybe Prelude.UTCTime)+loggingConfigurationSummary_createTime = Lens.lens (\LoggingConfigurationSummary' {createTime} -> createTime) (\s@LoggingConfigurationSummary' {} a -> s {createTime = a} :: LoggingConfigurationSummary) Prelude.. Lens.mapping Data._Time++-- | A complex type that contains a destination configuration for where chat+-- content will be logged.+loggingConfigurationSummary_destinationConfiguration :: Lens.Lens' LoggingConfigurationSummary (Prelude.Maybe DestinationConfiguration)+loggingConfigurationSummary_destinationConfiguration = Lens.lens (\LoggingConfigurationSummary' {destinationConfiguration} -> destinationConfiguration) (\s@LoggingConfigurationSummary' {} a -> s {destinationConfiguration = a} :: LoggingConfigurationSummary)++-- | Logging-configuration ID, generated by the system. This is a relative+-- identifier, the part of the ARN that uniquely identifies the room.+loggingConfigurationSummary_id :: Lens.Lens' LoggingConfigurationSummary (Prelude.Maybe Prelude.Text)+loggingConfigurationSummary_id = Lens.lens (\LoggingConfigurationSummary' {id} -> id) (\s@LoggingConfigurationSummary' {} a -> s {id = a} :: LoggingConfigurationSummary)++-- | Logging-configuration name. The value does not need to be unique.+loggingConfigurationSummary_name :: Lens.Lens' LoggingConfigurationSummary (Prelude.Maybe Prelude.Text)+loggingConfigurationSummary_name = Lens.lens (\LoggingConfigurationSummary' {name} -> name) (\s@LoggingConfigurationSummary' {} a -> s {name = a} :: LoggingConfigurationSummary)++-- | The state of the logging configuration. When this is @ACTIVE@, the+-- configuration is ready for logging chat content.+loggingConfigurationSummary_state :: Lens.Lens' LoggingConfigurationSummary (Prelude.Maybe LoggingConfigurationState)+loggingConfigurationSummary_state = Lens.lens (\LoggingConfigurationSummary' {state} -> state) (\s@LoggingConfigurationSummary' {} a -> s {state = a} :: LoggingConfigurationSummary)++-- | Tags to attach to the resource. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints on tags+-- beyond what is documented there.+loggingConfigurationSummary_tags :: Lens.Lens' LoggingConfigurationSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+loggingConfigurationSummary_tags = Lens.lens (\LoggingConfigurationSummary' {tags} -> tags) (\s@LoggingConfigurationSummary' {} a -> s {tags = a} :: LoggingConfigurationSummary) Prelude.. Lens.mapping Lens.coerced++-- | Time of the logging configuration’s last update. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+loggingConfigurationSummary_updateTime :: Lens.Lens' LoggingConfigurationSummary (Prelude.Maybe Prelude.UTCTime)+loggingConfigurationSummary_updateTime = Lens.lens (\LoggingConfigurationSummary' {updateTime} -> updateTime) (\s@LoggingConfigurationSummary' {} a -> s {updateTime = a} :: LoggingConfigurationSummary) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON LoggingConfigurationSummary where+ parseJSON =+ Data.withObject+ "LoggingConfigurationSummary"+ ( \x ->+ LoggingConfigurationSummary'+ Prelude.<$> (x Data..:? "arn")+ Prelude.<*> (x Data..:? "createTime")+ Prelude.<*> (x Data..:? "destinationConfiguration")+ Prelude.<*> (x Data..:? "id")+ Prelude.<*> (x Data..:? "name")+ Prelude.<*> (x Data..:? "state")+ Prelude.<*> (x Data..:? "tags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "updateTime")+ )++instance Prelude.Hashable LoggingConfigurationSummary where+ hashWithSalt _salt LoggingConfigurationSummary' {..} =+ _salt+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` createTime+ `Prelude.hashWithSalt` destinationConfiguration+ `Prelude.hashWithSalt` id+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` state+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` updateTime++instance Prelude.NFData LoggingConfigurationSummary where+ rnf LoggingConfigurationSummary' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf createTime+ `Prelude.seq` Prelude.rnf destinationConfiguration+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf updateTime
+ gen/Amazonka/IVSChat/Types/MessageReviewHandler.hs view
@@ -0,0 +1,117 @@+{-# 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.IVSChat.Types.MessageReviewHandler+-- 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.IVSChat.Types.MessageReviewHandler where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types.FallbackResult+import qualified Amazonka.Prelude as Prelude++-- | Configuration information for optional message review.+--+-- /See:/ 'newMessageReviewHandler' smart constructor.+data MessageReviewHandler = MessageReviewHandler'+ { -- | Specifies the fallback behavior (whether the message is allowed or+ -- denied) if the handler does not return a valid response, encounters an+ -- error, or times out. (For the timeout period, see+ -- <https://docs.aws.amazon.com/ivs/latest/userguide/service-quotas.html Service Quotas>.)+ -- If allowed, the message is delivered with returned content to all users+ -- connected to the room. If denied, the message is not delivered to any+ -- user. Default: @ALLOW@.+ fallbackResult :: Prelude.Maybe FallbackResult,+ -- | Identifier of the message review handler. Currently this must be an ARN+ -- of a lambda function.+ uri :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MessageReviewHandler' 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:+--+-- 'fallbackResult', 'messageReviewHandler_fallbackResult' - Specifies the fallback behavior (whether the message is allowed or+-- denied) if the handler does not return a valid response, encounters an+-- error, or times out. (For the timeout period, see+-- <https://docs.aws.amazon.com/ivs/latest/userguide/service-quotas.html Service Quotas>.)+-- If allowed, the message is delivered with returned content to all users+-- connected to the room. If denied, the message is not delivered to any+-- user. Default: @ALLOW@.+--+-- 'uri', 'messageReviewHandler_uri' - Identifier of the message review handler. Currently this must be an ARN+-- of a lambda function.+newMessageReviewHandler ::+ MessageReviewHandler+newMessageReviewHandler =+ MessageReviewHandler'+ { fallbackResult =+ Prelude.Nothing,+ uri = Prelude.Nothing+ }++-- | Specifies the fallback behavior (whether the message is allowed or+-- denied) if the handler does not return a valid response, encounters an+-- error, or times out. (For the timeout period, see+-- <https://docs.aws.amazon.com/ivs/latest/userguide/service-quotas.html Service Quotas>.)+-- If allowed, the message is delivered with returned content to all users+-- connected to the room. If denied, the message is not delivered to any+-- user. Default: @ALLOW@.+messageReviewHandler_fallbackResult :: Lens.Lens' MessageReviewHandler (Prelude.Maybe FallbackResult)+messageReviewHandler_fallbackResult = Lens.lens (\MessageReviewHandler' {fallbackResult} -> fallbackResult) (\s@MessageReviewHandler' {} a -> s {fallbackResult = a} :: MessageReviewHandler)++-- | Identifier of the message review handler. Currently this must be an ARN+-- of a lambda function.+messageReviewHandler_uri :: Lens.Lens' MessageReviewHandler (Prelude.Maybe Prelude.Text)+messageReviewHandler_uri = Lens.lens (\MessageReviewHandler' {uri} -> uri) (\s@MessageReviewHandler' {} a -> s {uri = a} :: MessageReviewHandler)++instance Data.FromJSON MessageReviewHandler where+ parseJSON =+ Data.withObject+ "MessageReviewHandler"+ ( \x ->+ MessageReviewHandler'+ Prelude.<$> (x Data..:? "fallbackResult")+ Prelude.<*> (x Data..:? "uri")+ )++instance Prelude.Hashable MessageReviewHandler where+ hashWithSalt _salt MessageReviewHandler' {..} =+ _salt+ `Prelude.hashWithSalt` fallbackResult+ `Prelude.hashWithSalt` uri++instance Prelude.NFData MessageReviewHandler where+ rnf MessageReviewHandler' {..} =+ Prelude.rnf fallbackResult+ `Prelude.seq` Prelude.rnf uri++instance Data.ToJSON MessageReviewHandler where+ toJSON MessageReviewHandler' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("fallbackResult" Data..=)+ Prelude.<$> fallbackResult,+ ("uri" Data..=) Prelude.<$> uri+ ]+ )
+ gen/Amazonka/IVSChat/Types/RoomSummary.hs view
@@ -0,0 +1,184 @@+{-# 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.IVSChat.Types.RoomSummary+-- 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.IVSChat.Types.RoomSummary where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types.MessageReviewHandler+import qualified Amazonka.Prelude as Prelude++-- | Summary information about a room.+--+-- /See:/ 'newRoomSummary' smart constructor.+data RoomSummary = RoomSummary'+ { -- | Room ARN.+ arn :: Prelude.Maybe Prelude.Text,+ -- | Time when the room was created. This is an ISO 8601 timestamp; /note+ -- that this is returned as a string/.+ createTime :: Prelude.Maybe Data.ISO8601,+ -- | Room ID, generated by the system. This is a relative identifier, the+ -- part of the ARN that uniquely identifies the room.+ id :: Prelude.Maybe Prelude.Text,+ -- | List of logging-configuration identifiers attached to the room.+ loggingConfigurationIdentifiers :: Prelude.Maybe [Prelude.Text],+ -- | Configuration information for optional review of messages.+ messageReviewHandler :: Prelude.Maybe MessageReviewHandler,+ -- | Room name. The value does not need to be unique.+ name :: Prelude.Maybe Prelude.Text,+ -- | Tags attached to the resource. Array of maps, each of the form+ -- @string:string (key:value)@. See+ -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+ -- for details, including restrictions that apply to tags and \"Tag naming+ -- limits and requirements\"; Amazon IVS Chat has no constraints beyond+ -- what is documented there.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Time of the room’s last update. This is an ISO 8601 timestamp; /note+ -- that this is returned as a string/.+ updateTime :: Prelude.Maybe Data.ISO8601+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RoomSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'roomSummary_arn' - Room ARN.+--+-- 'createTime', 'roomSummary_createTime' - Time when the room was created. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+--+-- 'id', 'roomSummary_id' - Room ID, generated by the system. This is a relative identifier, the+-- part of the ARN that uniquely identifies the room.+--+-- 'loggingConfigurationIdentifiers', 'roomSummary_loggingConfigurationIdentifiers' - List of logging-configuration identifiers attached to the room.+--+-- 'messageReviewHandler', 'roomSummary_messageReviewHandler' - Configuration information for optional review of messages.+--+-- 'name', 'roomSummary_name' - Room name. The value does not need to be unique.+--+-- 'tags', 'roomSummary_tags' - Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints beyond+-- what is documented there.+--+-- 'updateTime', 'roomSummary_updateTime' - Time of the room’s last update. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+newRoomSummary ::+ RoomSummary+newRoomSummary =+ RoomSummary'+ { arn = Prelude.Nothing,+ createTime = Prelude.Nothing,+ id = Prelude.Nothing,+ loggingConfigurationIdentifiers = Prelude.Nothing,+ messageReviewHandler = Prelude.Nothing,+ name = Prelude.Nothing,+ tags = Prelude.Nothing,+ updateTime = Prelude.Nothing+ }++-- | Room ARN.+roomSummary_arn :: Lens.Lens' RoomSummary (Prelude.Maybe Prelude.Text)+roomSummary_arn = Lens.lens (\RoomSummary' {arn} -> arn) (\s@RoomSummary' {} a -> s {arn = a} :: RoomSummary)++-- | Time when the room was created. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+roomSummary_createTime :: Lens.Lens' RoomSummary (Prelude.Maybe Prelude.UTCTime)+roomSummary_createTime = Lens.lens (\RoomSummary' {createTime} -> createTime) (\s@RoomSummary' {} a -> s {createTime = a} :: RoomSummary) Prelude.. Lens.mapping Data._Time++-- | Room ID, generated by the system. This is a relative identifier, the+-- part of the ARN that uniquely identifies the room.+roomSummary_id :: Lens.Lens' RoomSummary (Prelude.Maybe Prelude.Text)+roomSummary_id = Lens.lens (\RoomSummary' {id} -> id) (\s@RoomSummary' {} a -> s {id = a} :: RoomSummary)++-- | List of logging-configuration identifiers attached to the room.+roomSummary_loggingConfigurationIdentifiers :: Lens.Lens' RoomSummary (Prelude.Maybe [Prelude.Text])+roomSummary_loggingConfigurationIdentifiers = Lens.lens (\RoomSummary' {loggingConfigurationIdentifiers} -> loggingConfigurationIdentifiers) (\s@RoomSummary' {} a -> s {loggingConfigurationIdentifiers = a} :: RoomSummary) Prelude.. Lens.mapping Lens.coerced++-- | Configuration information for optional review of messages.+roomSummary_messageReviewHandler :: Lens.Lens' RoomSummary (Prelude.Maybe MessageReviewHandler)+roomSummary_messageReviewHandler = Lens.lens (\RoomSummary' {messageReviewHandler} -> messageReviewHandler) (\s@RoomSummary' {} a -> s {messageReviewHandler = a} :: RoomSummary)++-- | Room name. The value does not need to be unique.+roomSummary_name :: Lens.Lens' RoomSummary (Prelude.Maybe Prelude.Text)+roomSummary_name = Lens.lens (\RoomSummary' {name} -> name) (\s@RoomSummary' {} a -> s {name = a} :: RoomSummary)++-- | Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints beyond+-- what is documented there.+roomSummary_tags :: Lens.Lens' RoomSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+roomSummary_tags = Lens.lens (\RoomSummary' {tags} -> tags) (\s@RoomSummary' {} a -> s {tags = a} :: RoomSummary) Prelude.. Lens.mapping Lens.coerced++-- | Time of the room’s last update. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+roomSummary_updateTime :: Lens.Lens' RoomSummary (Prelude.Maybe Prelude.UTCTime)+roomSummary_updateTime = Lens.lens (\RoomSummary' {updateTime} -> updateTime) (\s@RoomSummary' {} a -> s {updateTime = a} :: RoomSummary) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON RoomSummary where+ parseJSON =+ Data.withObject+ "RoomSummary"+ ( \x ->+ RoomSummary'+ Prelude.<$> (x Data..:? "arn")+ Prelude.<*> (x Data..:? "createTime")+ Prelude.<*> (x Data..:? "id")+ Prelude.<*> ( x+ Data..:? "loggingConfigurationIdentifiers"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "messageReviewHandler")+ Prelude.<*> (x Data..:? "name")+ Prelude.<*> (x Data..:? "tags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "updateTime")+ )++instance Prelude.Hashable RoomSummary where+ hashWithSalt _salt RoomSummary' {..} =+ _salt+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` createTime+ `Prelude.hashWithSalt` id+ `Prelude.hashWithSalt` loggingConfigurationIdentifiers+ `Prelude.hashWithSalt` messageReviewHandler+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` updateTime++instance Prelude.NFData RoomSummary where+ rnf RoomSummary' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf createTime+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf loggingConfigurationIdentifiers+ `Prelude.seq` Prelude.rnf messageReviewHandler+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf updateTime
+ gen/Amazonka/IVSChat/Types/S3DestinationConfiguration.hs view
@@ -0,0 +1,81 @@+{-# 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.IVSChat.Types.S3DestinationConfiguration+-- 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.IVSChat.Types.S3DestinationConfiguration 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++-- | Specifies an S3 location where chat logs will be stored.+--+-- /See:/ 'newS3DestinationConfiguration' smart constructor.+data S3DestinationConfiguration = S3DestinationConfiguration'+ { -- | Name of the Amazon S3 bucket where chat activity will be logged.+ bucketName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'S3DestinationConfiguration' 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:+--+-- 'bucketName', 's3DestinationConfiguration_bucketName' - Name of the Amazon S3 bucket where chat activity will be logged.+newS3DestinationConfiguration ::+ -- | 'bucketName'+ Prelude.Text ->+ S3DestinationConfiguration+newS3DestinationConfiguration pBucketName_ =+ S3DestinationConfiguration'+ { bucketName =+ pBucketName_+ }++-- | Name of the Amazon S3 bucket where chat activity will be logged.+s3DestinationConfiguration_bucketName :: Lens.Lens' S3DestinationConfiguration Prelude.Text+s3DestinationConfiguration_bucketName = Lens.lens (\S3DestinationConfiguration' {bucketName} -> bucketName) (\s@S3DestinationConfiguration' {} a -> s {bucketName = a} :: S3DestinationConfiguration)++instance Data.FromJSON S3DestinationConfiguration where+ parseJSON =+ Data.withObject+ "S3DestinationConfiguration"+ ( \x ->+ S3DestinationConfiguration'+ Prelude.<$> (x Data..: "bucketName")+ )++instance Prelude.Hashable S3DestinationConfiguration where+ hashWithSalt _salt S3DestinationConfiguration' {..} =+ _salt `Prelude.hashWithSalt` bucketName++instance Prelude.NFData S3DestinationConfiguration where+ rnf S3DestinationConfiguration' {..} =+ Prelude.rnf bucketName++instance Data.ToJSON S3DestinationConfiguration where+ toJSON S3DestinationConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("bucketName" Data..= bucketName)]+ )
+ gen/Amazonka/IVSChat/Types/UpdateLoggingConfigurationState.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.IVSChat.Types.UpdateLoggingConfigurationState+-- 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.IVSChat.Types.UpdateLoggingConfigurationState+ ( UpdateLoggingConfigurationState+ ( ..,+ UpdateLoggingConfigurationState_ACTIVE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype UpdateLoggingConfigurationState = UpdateLoggingConfigurationState'+ { fromUpdateLoggingConfigurationState ::+ 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 UpdateLoggingConfigurationState_ACTIVE :: UpdateLoggingConfigurationState+pattern UpdateLoggingConfigurationState_ACTIVE = UpdateLoggingConfigurationState' "ACTIVE"++{-# COMPLETE+ UpdateLoggingConfigurationState_ACTIVE,+ UpdateLoggingConfigurationState'+ #-}
+ gen/Amazonka/IVSChat/UntagResource.hs view
@@ -0,0 +1,176 @@+{-# 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.IVSChat.UntagResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes tags from the resource with the specified ARN.+module Amazonka.IVSChat.UntagResource+ ( -- * Creating a Request+ UntagResource (..),+ newUntagResource,++ -- * Request Lenses+ untagResource_resourceArn,+ untagResource_tagKeys,++ -- * Destructuring the Response+ UntagResourceResponse (..),+ newUntagResourceResponse,++ -- * Response Lenses+ untagResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+ { -- | The ARN of the resource to be untagged. The ARN must be URL-encoded.+ resourceArn :: Prelude.Text,+ -- | Array of tags to be removed. Array of maps, each of the form+ -- @string:string (key:value)@. See+ -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+ -- for details, including restrictions that apply to tags and \"Tag naming+ -- limits and requirements\"; Amazon IVS Chat has no constraints beyond+ -- what is documented there.+ tagKeys :: [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'untagResource_resourceArn' - The ARN of the resource to be untagged. The ARN must be URL-encoded.+--+-- 'tagKeys', 'untagResource_tagKeys' - Array of tags to be removed. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints beyond+-- what is documented there.+newUntagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ UntagResource+newUntagResource pResourceArn_ =+ UntagResource'+ { resourceArn = pResourceArn_,+ tagKeys = Prelude.mempty+ }++-- | The ARN of the resource to be untagged. The ARN must be URL-encoded.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | Array of tags to be removed. Array of maps, each of the form+-- @string:string (key:value)@. See+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging AWS Resources>+-- for details, including restrictions that apply to tags and \"Tag naming+-- limits and requirements\"; Amazon IVS Chat has no constraints beyond+-- what is documented there.+untagResource_tagKeys :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+ type+ AWSResponse UntagResource =+ UntagResourceResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ UntagResourceResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UntagResource where+ hashWithSalt _salt UntagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` tagKeys++instance Prelude.NFData UntagResource where+ rnf UntagResource' {..} =+ Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf tagKeys++instance Data.ToHeaders UntagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath UntagResource where+ toPath UntagResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery UntagResource where+ toQuery UntagResource' {..} =+ Prelude.mconcat+ ["tagKeys" Data.=: Data.toQueryList "member" tagKeys]++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code.+newUntagResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UntagResourceResponse+newUntagResourceResponse pHttpStatus_ =+ UntagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int+untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse)++instance Prelude.NFData UntagResourceResponse where+ rnf UntagResourceResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/UpdateLoggingConfiguration.hs view
@@ -0,0 +1,318 @@+{-# 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.IVSChat.UpdateLoggingConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a specified logging configuration.+module Amazonka.IVSChat.UpdateLoggingConfiguration+ ( -- * Creating a Request+ UpdateLoggingConfiguration (..),+ newUpdateLoggingConfiguration,++ -- * Request Lenses+ updateLoggingConfiguration_destinationConfiguration,+ updateLoggingConfiguration_name,+ updateLoggingConfiguration_identifier,++ -- * Destructuring the Response+ UpdateLoggingConfigurationResponse (..),+ newUpdateLoggingConfigurationResponse,++ -- * Response Lenses+ updateLoggingConfigurationResponse_arn,+ updateLoggingConfigurationResponse_createTime,+ updateLoggingConfigurationResponse_destinationConfiguration,+ updateLoggingConfigurationResponse_id,+ updateLoggingConfigurationResponse_name,+ updateLoggingConfigurationResponse_state,+ updateLoggingConfigurationResponse_tags,+ updateLoggingConfigurationResponse_updateTime,+ updateLoggingConfigurationResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateLoggingConfiguration' smart constructor.+data UpdateLoggingConfiguration = UpdateLoggingConfiguration'+ { -- | A complex type that contains a destination configuration for where chat+ -- content will be logged. There can be only one type of destination+ -- (@cloudWatchLogs@, @firehose@, or @s3@) in a @destinationConfiguration@.+ destinationConfiguration :: Prelude.Maybe DestinationConfiguration,+ -- | Logging-configuration name. The value does not need to be unique.+ name :: Prelude.Maybe Prelude.Text,+ -- | Identifier of the logging configuration to be updated.+ identifier :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateLoggingConfiguration' 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:+--+-- 'destinationConfiguration', 'updateLoggingConfiguration_destinationConfiguration' - A complex type that contains a destination configuration for where chat+-- content will be logged. There can be only one type of destination+-- (@cloudWatchLogs@, @firehose@, or @s3@) in a @destinationConfiguration@.+--+-- 'name', 'updateLoggingConfiguration_name' - Logging-configuration name. The value does not need to be unique.+--+-- 'identifier', 'updateLoggingConfiguration_identifier' - Identifier of the logging configuration to be updated.+newUpdateLoggingConfiguration ::+ -- | 'identifier'+ Prelude.Text ->+ UpdateLoggingConfiguration+newUpdateLoggingConfiguration pIdentifier_ =+ UpdateLoggingConfiguration'+ { destinationConfiguration =+ Prelude.Nothing,+ name = Prelude.Nothing,+ identifier = pIdentifier_+ }++-- | A complex type that contains a destination configuration for where chat+-- content will be logged. There can be only one type of destination+-- (@cloudWatchLogs@, @firehose@, or @s3@) in a @destinationConfiguration@.+updateLoggingConfiguration_destinationConfiguration :: Lens.Lens' UpdateLoggingConfiguration (Prelude.Maybe DestinationConfiguration)+updateLoggingConfiguration_destinationConfiguration = Lens.lens (\UpdateLoggingConfiguration' {destinationConfiguration} -> destinationConfiguration) (\s@UpdateLoggingConfiguration' {} a -> s {destinationConfiguration = a} :: UpdateLoggingConfiguration)++-- | Logging-configuration name. The value does not need to be unique.+updateLoggingConfiguration_name :: Lens.Lens' UpdateLoggingConfiguration (Prelude.Maybe Prelude.Text)+updateLoggingConfiguration_name = Lens.lens (\UpdateLoggingConfiguration' {name} -> name) (\s@UpdateLoggingConfiguration' {} a -> s {name = a} :: UpdateLoggingConfiguration)++-- | Identifier of the logging configuration to be updated.+updateLoggingConfiguration_identifier :: Lens.Lens' UpdateLoggingConfiguration Prelude.Text+updateLoggingConfiguration_identifier = Lens.lens (\UpdateLoggingConfiguration' {identifier} -> identifier) (\s@UpdateLoggingConfiguration' {} a -> s {identifier = a} :: UpdateLoggingConfiguration)++instance Core.AWSRequest UpdateLoggingConfiguration where+ type+ AWSResponse UpdateLoggingConfiguration =+ UpdateLoggingConfigurationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateLoggingConfigurationResponse'+ Prelude.<$> (x Data..?> "arn")+ Prelude.<*> (x Data..?> "createTime")+ Prelude.<*> (x Data..?> "destinationConfiguration")+ Prelude.<*> (x Data..?> "id")+ Prelude.<*> (x Data..?> "name")+ Prelude.<*> (x Data..?> "state")+ Prelude.<*> (x Data..?> "tags" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "updateTime")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateLoggingConfiguration where+ hashWithSalt _salt UpdateLoggingConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` destinationConfiguration+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` identifier++instance Prelude.NFData UpdateLoggingConfiguration where+ rnf UpdateLoggingConfiguration' {..} =+ Prelude.rnf destinationConfiguration+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf identifier++instance Data.ToHeaders UpdateLoggingConfiguration where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateLoggingConfiguration where+ toJSON UpdateLoggingConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("destinationConfiguration" Data..=)+ Prelude.<$> destinationConfiguration,+ ("name" Data..=) Prelude.<$> name,+ Prelude.Just ("identifier" Data..= identifier)+ ]+ )++instance Data.ToPath UpdateLoggingConfiguration where+ toPath = Prelude.const "/UpdateLoggingConfiguration"++instance Data.ToQuery UpdateLoggingConfiguration where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateLoggingConfigurationResponse' smart constructor.+data UpdateLoggingConfigurationResponse = UpdateLoggingConfigurationResponse'+ { -- | Logging-configuration ARN, from the request (if @identifier@ was an+ -- ARN).+ arn :: Prelude.Maybe Prelude.Text,+ -- | Time when the logging configuration was created. This is an ISO 8601+ -- timestamp; /note that this is returned as a string/.+ createTime :: Prelude.Maybe Data.ISO8601,+ -- | A complex type that contains a destination configuration for where chat+ -- content will be logged, from the request. There is only one type of+ -- destination (@cloudWatchLogs@, @firehose@, or @s3@) in a+ -- @destinationConfiguration@.+ destinationConfiguration :: Prelude.Maybe DestinationConfiguration,+ -- | Logging-configuration ID, generated by the system. This is a relative+ -- identifier, the part of the ARN that uniquely identifies the room.+ id :: Prelude.Maybe Prelude.Text,+ -- | Logging-configuration name, from the request (if specified).+ name :: Prelude.Maybe Prelude.Text,+ -- | The state of the logging configuration. When the state is @ACTIVE@, the+ -- configuration is ready to log chat content.+ state :: Prelude.Maybe UpdateLoggingConfigurationState,+ -- | Tags attached to the resource. Array of maps, each of the form+ -- @string:string (key:value)@.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Time of the logging configuration’s last update. This is an ISO 8601+ -- timestamp; /note that this is returned as a string/.+ updateTime :: Prelude.Maybe Data.ISO8601,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateLoggingConfigurationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'updateLoggingConfigurationResponse_arn' - Logging-configuration ARN, from the request (if @identifier@ was an+-- ARN).+--+-- 'createTime', 'updateLoggingConfigurationResponse_createTime' - Time when the logging configuration was created. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+--+-- 'destinationConfiguration', 'updateLoggingConfigurationResponse_destinationConfiguration' - A complex type that contains a destination configuration for where chat+-- content will be logged, from the request. There is only one type of+-- destination (@cloudWatchLogs@, @firehose@, or @s3@) in a+-- @destinationConfiguration@.+--+-- 'id', 'updateLoggingConfigurationResponse_id' - Logging-configuration ID, generated by the system. This is a relative+-- identifier, the part of the ARN that uniquely identifies the room.+--+-- 'name', 'updateLoggingConfigurationResponse_name' - Logging-configuration name, from the request (if specified).+--+-- 'state', 'updateLoggingConfigurationResponse_state' - The state of the logging configuration. When the state is @ACTIVE@, the+-- configuration is ready to log chat content.+--+-- 'tags', 'updateLoggingConfigurationResponse_tags' - Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@.+--+-- 'updateTime', 'updateLoggingConfigurationResponse_updateTime' - Time of the logging configuration’s last update. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+--+-- 'httpStatus', 'updateLoggingConfigurationResponse_httpStatus' - The response's http status code.+newUpdateLoggingConfigurationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateLoggingConfigurationResponse+newUpdateLoggingConfigurationResponse pHttpStatus_ =+ UpdateLoggingConfigurationResponse'+ { arn =+ Prelude.Nothing,+ createTime = Prelude.Nothing,+ destinationConfiguration =+ Prelude.Nothing,+ id = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing,+ tags = Prelude.Nothing,+ updateTime = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Logging-configuration ARN, from the request (if @identifier@ was an+-- ARN).+updateLoggingConfigurationResponse_arn :: Lens.Lens' UpdateLoggingConfigurationResponse (Prelude.Maybe Prelude.Text)+updateLoggingConfigurationResponse_arn = Lens.lens (\UpdateLoggingConfigurationResponse' {arn} -> arn) (\s@UpdateLoggingConfigurationResponse' {} a -> s {arn = a} :: UpdateLoggingConfigurationResponse)++-- | Time when the logging configuration was created. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+updateLoggingConfigurationResponse_createTime :: Lens.Lens' UpdateLoggingConfigurationResponse (Prelude.Maybe Prelude.UTCTime)+updateLoggingConfigurationResponse_createTime = Lens.lens (\UpdateLoggingConfigurationResponse' {createTime} -> createTime) (\s@UpdateLoggingConfigurationResponse' {} a -> s {createTime = a} :: UpdateLoggingConfigurationResponse) Prelude.. Lens.mapping Data._Time++-- | A complex type that contains a destination configuration for where chat+-- content will be logged, from the request. There is only one type of+-- destination (@cloudWatchLogs@, @firehose@, or @s3@) in a+-- @destinationConfiguration@.+updateLoggingConfigurationResponse_destinationConfiguration :: Lens.Lens' UpdateLoggingConfigurationResponse (Prelude.Maybe DestinationConfiguration)+updateLoggingConfigurationResponse_destinationConfiguration = Lens.lens (\UpdateLoggingConfigurationResponse' {destinationConfiguration} -> destinationConfiguration) (\s@UpdateLoggingConfigurationResponse' {} a -> s {destinationConfiguration = a} :: UpdateLoggingConfigurationResponse)++-- | Logging-configuration ID, generated by the system. This is a relative+-- identifier, the part of the ARN that uniquely identifies the room.+updateLoggingConfigurationResponse_id :: Lens.Lens' UpdateLoggingConfigurationResponse (Prelude.Maybe Prelude.Text)+updateLoggingConfigurationResponse_id = Lens.lens (\UpdateLoggingConfigurationResponse' {id} -> id) (\s@UpdateLoggingConfigurationResponse' {} a -> s {id = a} :: UpdateLoggingConfigurationResponse)++-- | Logging-configuration name, from the request (if specified).+updateLoggingConfigurationResponse_name :: Lens.Lens' UpdateLoggingConfigurationResponse (Prelude.Maybe Prelude.Text)+updateLoggingConfigurationResponse_name = Lens.lens (\UpdateLoggingConfigurationResponse' {name} -> name) (\s@UpdateLoggingConfigurationResponse' {} a -> s {name = a} :: UpdateLoggingConfigurationResponse)++-- | The state of the logging configuration. When the state is @ACTIVE@, the+-- configuration is ready to log chat content.+updateLoggingConfigurationResponse_state :: Lens.Lens' UpdateLoggingConfigurationResponse (Prelude.Maybe UpdateLoggingConfigurationState)+updateLoggingConfigurationResponse_state = Lens.lens (\UpdateLoggingConfigurationResponse' {state} -> state) (\s@UpdateLoggingConfigurationResponse' {} a -> s {state = a} :: UpdateLoggingConfigurationResponse)++-- | Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@.+updateLoggingConfigurationResponse_tags :: Lens.Lens' UpdateLoggingConfigurationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+updateLoggingConfigurationResponse_tags = Lens.lens (\UpdateLoggingConfigurationResponse' {tags} -> tags) (\s@UpdateLoggingConfigurationResponse' {} a -> s {tags = a} :: UpdateLoggingConfigurationResponse) Prelude.. Lens.mapping Lens.coerced++-- | Time of the logging configuration’s last update. This is an ISO 8601+-- timestamp; /note that this is returned as a string/.+updateLoggingConfigurationResponse_updateTime :: Lens.Lens' UpdateLoggingConfigurationResponse (Prelude.Maybe Prelude.UTCTime)+updateLoggingConfigurationResponse_updateTime = Lens.lens (\UpdateLoggingConfigurationResponse' {updateTime} -> updateTime) (\s@UpdateLoggingConfigurationResponse' {} a -> s {updateTime = a} :: UpdateLoggingConfigurationResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+updateLoggingConfigurationResponse_httpStatus :: Lens.Lens' UpdateLoggingConfigurationResponse Prelude.Int+updateLoggingConfigurationResponse_httpStatus = Lens.lens (\UpdateLoggingConfigurationResponse' {httpStatus} -> httpStatus) (\s@UpdateLoggingConfigurationResponse' {} a -> s {httpStatus = a} :: UpdateLoggingConfigurationResponse)++instance+ Prelude.NFData+ UpdateLoggingConfigurationResponse+ where+ rnf UpdateLoggingConfigurationResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf createTime+ `Prelude.seq` Prelude.rnf destinationConfiguration+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf updateTime+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/UpdateRoom.hs view
@@ -0,0 +1,383 @@+{-# 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.IVSChat.UpdateRoom+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a room’s configuration.+module Amazonka.IVSChat.UpdateRoom+ ( -- * Creating a Request+ UpdateRoom (..),+ newUpdateRoom,++ -- * Request Lenses+ updateRoom_loggingConfigurationIdentifiers,+ updateRoom_maximumMessageLength,+ updateRoom_maximumMessageRatePerSecond,+ updateRoom_messageReviewHandler,+ updateRoom_name,+ updateRoom_identifier,++ -- * Destructuring the Response+ UpdateRoomResponse (..),+ newUpdateRoomResponse,++ -- * Response Lenses+ updateRoomResponse_arn,+ updateRoomResponse_createTime,+ updateRoomResponse_id,+ updateRoomResponse_loggingConfigurationIdentifiers,+ updateRoomResponse_maximumMessageLength,+ updateRoomResponse_maximumMessageRatePerSecond,+ updateRoomResponse_messageReviewHandler,+ updateRoomResponse_name,+ updateRoomResponse_tags,+ updateRoomResponse_updateTime,+ updateRoomResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateRoom' smart constructor.+data UpdateRoom = UpdateRoom'+ { -- | Array of logging-configuration identifiers attached to the room.+ loggingConfigurationIdentifiers :: Prelude.Maybe [Prelude.Text],+ -- | The maximum number of characters in a single message. Messages are+ -- expected to be UTF-8 encoded and this limit applies specifically to+ -- rune\/code-point count, not number of bytes. Default: 500.+ maximumMessageLength :: Prelude.Maybe Prelude.Natural,+ -- | Maximum number of messages per second that can be sent to the room (by+ -- all clients). Default: 10.+ maximumMessageRatePerSecond :: Prelude.Maybe Prelude.Natural,+ -- | Configuration information for optional review of messages. Specify an+ -- empty @uri@ string to disassociate a message review handler from the+ -- specified room.+ messageReviewHandler :: Prelude.Maybe MessageReviewHandler,+ -- | Room name. The value does not need to be unique.+ name :: Prelude.Maybe Prelude.Text,+ -- | Identifier of the room to be updated. Currently this must be an ARN.+ identifier :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateRoom' 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:+--+-- 'loggingConfigurationIdentifiers', 'updateRoom_loggingConfigurationIdentifiers' - Array of logging-configuration identifiers attached to the room.+--+-- 'maximumMessageLength', 'updateRoom_maximumMessageLength' - The maximum number of characters in a single message. Messages are+-- expected to be UTF-8 encoded and this limit applies specifically to+-- rune\/code-point count, not number of bytes. Default: 500.+--+-- 'maximumMessageRatePerSecond', 'updateRoom_maximumMessageRatePerSecond' - Maximum number of messages per second that can be sent to the room (by+-- all clients). Default: 10.+--+-- 'messageReviewHandler', 'updateRoom_messageReviewHandler' - Configuration information for optional review of messages. Specify an+-- empty @uri@ string to disassociate a message review handler from the+-- specified room.+--+-- 'name', 'updateRoom_name' - Room name. The value does not need to be unique.+--+-- 'identifier', 'updateRoom_identifier' - Identifier of the room to be updated. Currently this must be an ARN.+newUpdateRoom ::+ -- | 'identifier'+ Prelude.Text ->+ UpdateRoom+newUpdateRoom pIdentifier_ =+ UpdateRoom'+ { loggingConfigurationIdentifiers =+ Prelude.Nothing,+ maximumMessageLength = Prelude.Nothing,+ maximumMessageRatePerSecond = Prelude.Nothing,+ messageReviewHandler = Prelude.Nothing,+ name = Prelude.Nothing,+ identifier = pIdentifier_+ }++-- | Array of logging-configuration identifiers attached to the room.+updateRoom_loggingConfigurationIdentifiers :: Lens.Lens' UpdateRoom (Prelude.Maybe [Prelude.Text])+updateRoom_loggingConfigurationIdentifiers = Lens.lens (\UpdateRoom' {loggingConfigurationIdentifiers} -> loggingConfigurationIdentifiers) (\s@UpdateRoom' {} a -> s {loggingConfigurationIdentifiers = a} :: UpdateRoom) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of characters in a single message. Messages are+-- expected to be UTF-8 encoded and this limit applies specifically to+-- rune\/code-point count, not number of bytes. Default: 500.+updateRoom_maximumMessageLength :: Lens.Lens' UpdateRoom (Prelude.Maybe Prelude.Natural)+updateRoom_maximumMessageLength = Lens.lens (\UpdateRoom' {maximumMessageLength} -> maximumMessageLength) (\s@UpdateRoom' {} a -> s {maximumMessageLength = a} :: UpdateRoom)++-- | Maximum number of messages per second that can be sent to the room (by+-- all clients). Default: 10.+updateRoom_maximumMessageRatePerSecond :: Lens.Lens' UpdateRoom (Prelude.Maybe Prelude.Natural)+updateRoom_maximumMessageRatePerSecond = Lens.lens (\UpdateRoom' {maximumMessageRatePerSecond} -> maximumMessageRatePerSecond) (\s@UpdateRoom' {} a -> s {maximumMessageRatePerSecond = a} :: UpdateRoom)++-- | Configuration information for optional review of messages. Specify an+-- empty @uri@ string to disassociate a message review handler from the+-- specified room.+updateRoom_messageReviewHandler :: Lens.Lens' UpdateRoom (Prelude.Maybe MessageReviewHandler)+updateRoom_messageReviewHandler = Lens.lens (\UpdateRoom' {messageReviewHandler} -> messageReviewHandler) (\s@UpdateRoom' {} a -> s {messageReviewHandler = a} :: UpdateRoom)++-- | Room name. The value does not need to be unique.+updateRoom_name :: Lens.Lens' UpdateRoom (Prelude.Maybe Prelude.Text)+updateRoom_name = Lens.lens (\UpdateRoom' {name} -> name) (\s@UpdateRoom' {} a -> s {name = a} :: UpdateRoom)++-- | Identifier of the room to be updated. Currently this must be an ARN.+updateRoom_identifier :: Lens.Lens' UpdateRoom Prelude.Text+updateRoom_identifier = Lens.lens (\UpdateRoom' {identifier} -> identifier) (\s@UpdateRoom' {} a -> s {identifier = a} :: UpdateRoom)++instance Core.AWSRequest UpdateRoom where+ type AWSResponse UpdateRoom = UpdateRoomResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateRoomResponse'+ Prelude.<$> (x Data..?> "arn")+ Prelude.<*> (x Data..?> "createTime")+ Prelude.<*> (x Data..?> "id")+ Prelude.<*> ( x+ Data..?> "loggingConfigurationIdentifiers"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "maximumMessageLength")+ Prelude.<*> (x Data..?> "maximumMessageRatePerSecond")+ Prelude.<*> (x Data..?> "messageReviewHandler")+ Prelude.<*> (x Data..?> "name")+ Prelude.<*> (x Data..?> "tags" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "updateTime")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateRoom where+ hashWithSalt _salt UpdateRoom' {..} =+ _salt+ `Prelude.hashWithSalt` loggingConfigurationIdentifiers+ `Prelude.hashWithSalt` maximumMessageLength+ `Prelude.hashWithSalt` maximumMessageRatePerSecond+ `Prelude.hashWithSalt` messageReviewHandler+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` identifier++instance Prelude.NFData UpdateRoom where+ rnf UpdateRoom' {..} =+ Prelude.rnf loggingConfigurationIdentifiers+ `Prelude.seq` Prelude.rnf maximumMessageLength+ `Prelude.seq` Prelude.rnf maximumMessageRatePerSecond+ `Prelude.seq` Prelude.rnf messageReviewHandler+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf identifier++instance Data.ToHeaders UpdateRoom where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateRoom where+ toJSON UpdateRoom' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("loggingConfigurationIdentifiers" Data..=)+ Prelude.<$> loggingConfigurationIdentifiers,+ ("maximumMessageLength" Data..=)+ Prelude.<$> maximumMessageLength,+ ("maximumMessageRatePerSecond" Data..=)+ Prelude.<$> maximumMessageRatePerSecond,+ ("messageReviewHandler" Data..=)+ Prelude.<$> messageReviewHandler,+ ("name" Data..=) Prelude.<$> name,+ Prelude.Just ("identifier" Data..= identifier)+ ]+ )++instance Data.ToPath UpdateRoom where+ toPath = Prelude.const "/UpdateRoom"++instance Data.ToQuery UpdateRoom where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateRoomResponse' smart constructor.+data UpdateRoomResponse = UpdateRoomResponse'+ { -- | Room ARN, from the request (if @identifier@ was an ARN).+ arn :: Prelude.Maybe Prelude.Text,+ -- | Time when the room was created. This is an ISO 8601 timestamp; /note+ -- that this is returned as a string/.+ createTime :: Prelude.Maybe Data.ISO8601,+ -- | Room ID, generated by the system. This is a relative identifier, the+ -- part of the ARN that uniquely identifies the room.+ id :: Prelude.Maybe Prelude.Text,+ -- | Array of logging configurations attached to the room, from the request+ -- (if specified).+ loggingConfigurationIdentifiers :: Prelude.Maybe [Prelude.Text],+ -- | Maximum number of characters in a single message, from the request (if+ -- specified).+ maximumMessageLength :: Prelude.Maybe Prelude.Natural,+ -- | Maximum number of messages per second that can be sent to the room (by+ -- all clients), from the request (if specified).+ maximumMessageRatePerSecond :: Prelude.Maybe Prelude.Natural,+ -- | Configuration information for optional review of messages.+ messageReviewHandler :: Prelude.Maybe MessageReviewHandler,+ -- | Room name, from the request (if specified).+ name :: Prelude.Maybe Prelude.Text,+ -- | Tags attached to the resource. Array of maps, each of the form+ -- @string:string (key:value)@.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Time of the room’s last update. This is an ISO 8601 timestamp; /note+ -- that this is returned as a string/.+ updateTime :: Prelude.Maybe Data.ISO8601,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateRoomResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'updateRoomResponse_arn' - Room ARN, from the request (if @identifier@ was an ARN).+--+-- 'createTime', 'updateRoomResponse_createTime' - Time when the room was created. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+--+-- 'id', 'updateRoomResponse_id' - Room ID, generated by the system. This is a relative identifier, the+-- part of the ARN that uniquely identifies the room.+--+-- 'loggingConfigurationIdentifiers', 'updateRoomResponse_loggingConfigurationIdentifiers' - Array of logging configurations attached to the room, from the request+-- (if specified).+--+-- 'maximumMessageLength', 'updateRoomResponse_maximumMessageLength' - Maximum number of characters in a single message, from the request (if+-- specified).+--+-- 'maximumMessageRatePerSecond', 'updateRoomResponse_maximumMessageRatePerSecond' - Maximum number of messages per second that can be sent to the room (by+-- all clients), from the request (if specified).+--+-- 'messageReviewHandler', 'updateRoomResponse_messageReviewHandler' - Configuration information for optional review of messages.+--+-- 'name', 'updateRoomResponse_name' - Room name, from the request (if specified).+--+-- 'tags', 'updateRoomResponse_tags' - Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@.+--+-- 'updateTime', 'updateRoomResponse_updateTime' - Time of the room’s last update. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+--+-- 'httpStatus', 'updateRoomResponse_httpStatus' - The response's http status code.+newUpdateRoomResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateRoomResponse+newUpdateRoomResponse pHttpStatus_ =+ UpdateRoomResponse'+ { arn = Prelude.Nothing,+ createTime = Prelude.Nothing,+ id = Prelude.Nothing,+ loggingConfigurationIdentifiers = Prelude.Nothing,+ maximumMessageLength = Prelude.Nothing,+ maximumMessageRatePerSecond = Prelude.Nothing,+ messageReviewHandler = Prelude.Nothing,+ name = Prelude.Nothing,+ tags = Prelude.Nothing,+ updateTime = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Room ARN, from the request (if @identifier@ was an ARN).+updateRoomResponse_arn :: Lens.Lens' UpdateRoomResponse (Prelude.Maybe Prelude.Text)+updateRoomResponse_arn = Lens.lens (\UpdateRoomResponse' {arn} -> arn) (\s@UpdateRoomResponse' {} a -> s {arn = a} :: UpdateRoomResponse)++-- | Time when the room was created. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+updateRoomResponse_createTime :: Lens.Lens' UpdateRoomResponse (Prelude.Maybe Prelude.UTCTime)+updateRoomResponse_createTime = Lens.lens (\UpdateRoomResponse' {createTime} -> createTime) (\s@UpdateRoomResponse' {} a -> s {createTime = a} :: UpdateRoomResponse) Prelude.. Lens.mapping Data._Time++-- | Room ID, generated by the system. This is a relative identifier, the+-- part of the ARN that uniquely identifies the room.+updateRoomResponse_id :: Lens.Lens' UpdateRoomResponse (Prelude.Maybe Prelude.Text)+updateRoomResponse_id = Lens.lens (\UpdateRoomResponse' {id} -> id) (\s@UpdateRoomResponse' {} a -> s {id = a} :: UpdateRoomResponse)++-- | Array of logging configurations attached to the room, from the request+-- (if specified).+updateRoomResponse_loggingConfigurationIdentifiers :: Lens.Lens' UpdateRoomResponse (Prelude.Maybe [Prelude.Text])+updateRoomResponse_loggingConfigurationIdentifiers = Lens.lens (\UpdateRoomResponse' {loggingConfigurationIdentifiers} -> loggingConfigurationIdentifiers) (\s@UpdateRoomResponse' {} a -> s {loggingConfigurationIdentifiers = a} :: UpdateRoomResponse) Prelude.. Lens.mapping Lens.coerced++-- | Maximum number of characters in a single message, from the request (if+-- specified).+updateRoomResponse_maximumMessageLength :: Lens.Lens' UpdateRoomResponse (Prelude.Maybe Prelude.Natural)+updateRoomResponse_maximumMessageLength = Lens.lens (\UpdateRoomResponse' {maximumMessageLength} -> maximumMessageLength) (\s@UpdateRoomResponse' {} a -> s {maximumMessageLength = a} :: UpdateRoomResponse)++-- | Maximum number of messages per second that can be sent to the room (by+-- all clients), from the request (if specified).+updateRoomResponse_maximumMessageRatePerSecond :: Lens.Lens' UpdateRoomResponse (Prelude.Maybe Prelude.Natural)+updateRoomResponse_maximumMessageRatePerSecond = Lens.lens (\UpdateRoomResponse' {maximumMessageRatePerSecond} -> maximumMessageRatePerSecond) (\s@UpdateRoomResponse' {} a -> s {maximumMessageRatePerSecond = a} :: UpdateRoomResponse)++-- | Configuration information for optional review of messages.+updateRoomResponse_messageReviewHandler :: Lens.Lens' UpdateRoomResponse (Prelude.Maybe MessageReviewHandler)+updateRoomResponse_messageReviewHandler = Lens.lens (\UpdateRoomResponse' {messageReviewHandler} -> messageReviewHandler) (\s@UpdateRoomResponse' {} a -> s {messageReviewHandler = a} :: UpdateRoomResponse)++-- | Room name, from the request (if specified).+updateRoomResponse_name :: Lens.Lens' UpdateRoomResponse (Prelude.Maybe Prelude.Text)+updateRoomResponse_name = Lens.lens (\UpdateRoomResponse' {name} -> name) (\s@UpdateRoomResponse' {} a -> s {name = a} :: UpdateRoomResponse)++-- | Tags attached to the resource. Array of maps, each of the form+-- @string:string (key:value)@.+updateRoomResponse_tags :: Lens.Lens' UpdateRoomResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+updateRoomResponse_tags = Lens.lens (\UpdateRoomResponse' {tags} -> tags) (\s@UpdateRoomResponse' {} a -> s {tags = a} :: UpdateRoomResponse) Prelude.. Lens.mapping Lens.coerced++-- | Time of the room’s last update. This is an ISO 8601 timestamp; /note+-- that this is returned as a string/.+updateRoomResponse_updateTime :: Lens.Lens' UpdateRoomResponse (Prelude.Maybe Prelude.UTCTime)+updateRoomResponse_updateTime = Lens.lens (\UpdateRoomResponse' {updateTime} -> updateTime) (\s@UpdateRoomResponse' {} a -> s {updateTime = a} :: UpdateRoomResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+updateRoomResponse_httpStatus :: Lens.Lens' UpdateRoomResponse Prelude.Int+updateRoomResponse_httpStatus = Lens.lens (\UpdateRoomResponse' {httpStatus} -> httpStatus) (\s@UpdateRoomResponse' {} a -> s {httpStatus = a} :: UpdateRoomResponse)++instance Prelude.NFData UpdateRoomResponse where+ rnf UpdateRoomResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf createTime+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf loggingConfigurationIdentifiers+ `Prelude.seq` Prelude.rnf maximumMessageLength+ `Prelude.seq` Prelude.rnf maximumMessageRatePerSecond+ `Prelude.seq` Prelude.rnf messageReviewHandler+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf updateTime+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/IVSChat/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.IVSChat.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.IVSChat.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.IVSChat.Lens+import Amazonka.IVSChat.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.IVSChat+import Test.Amazonka.IVSChat.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "IVSChat"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/Gen/IVSChat.hs view
@@ -0,0 +1,378 @@+{-# 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.IVSChat+-- 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.IVSChat where++import Amazonka.IVSChat+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.IVSChat.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"+-- [ requestCreateChatToken $+-- newCreateChatToken+--+-- , requestCreateLoggingConfiguration $+-- newCreateLoggingConfiguration+--+-- , requestCreateRoom $+-- newCreateRoom+--+-- , requestDeleteLoggingConfiguration $+-- newDeleteLoggingConfiguration+--+-- , requestDeleteMessage $+-- newDeleteMessage+--+-- , requestDeleteRoom $+-- newDeleteRoom+--+-- , requestDisconnectUser $+-- newDisconnectUser+--+-- , requestGetLoggingConfiguration $+-- newGetLoggingConfiguration+--+-- , requestGetRoom $+-- newGetRoom+--+-- , requestListLoggingConfigurations $+-- newListLoggingConfigurations+--+-- , requestListRooms $+-- newListRooms+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestSendEvent $+-- newSendEvent+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateLoggingConfiguration $+-- newUpdateLoggingConfiguration+--+-- , requestUpdateRoom $+-- newUpdateRoom+--+-- ]++-- , testGroup "response"+-- [ responseCreateChatToken $+-- newCreateChatTokenResponse+--+-- , responseCreateLoggingConfiguration $+-- newCreateLoggingConfigurationResponse+--+-- , responseCreateRoom $+-- newCreateRoomResponse+--+-- , responseDeleteLoggingConfiguration $+-- newDeleteLoggingConfigurationResponse+--+-- , responseDeleteMessage $+-- newDeleteMessageResponse+--+-- , responseDeleteRoom $+-- newDeleteRoomResponse+--+-- , responseDisconnectUser $+-- newDisconnectUserResponse+--+-- , responseGetLoggingConfiguration $+-- newGetLoggingConfigurationResponse+--+-- , responseGetRoom $+-- newGetRoomResponse+--+-- , responseListLoggingConfigurations $+-- newListLoggingConfigurationsResponse+--+-- , responseListRooms $+-- newListRoomsResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responseSendEvent $+-- newSendEventResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateLoggingConfiguration $+-- newUpdateLoggingConfigurationResponse+--+-- , responseUpdateRoom $+-- newUpdateRoomResponse+--+-- ]+-- ]++-- Requests++requestCreateChatToken :: CreateChatToken -> TestTree+requestCreateChatToken =+ req+ "CreateChatToken"+ "fixture/CreateChatToken.yaml"++requestCreateLoggingConfiguration :: CreateLoggingConfiguration -> TestTree+requestCreateLoggingConfiguration =+ req+ "CreateLoggingConfiguration"+ "fixture/CreateLoggingConfiguration.yaml"++requestCreateRoom :: CreateRoom -> TestTree+requestCreateRoom =+ req+ "CreateRoom"+ "fixture/CreateRoom.yaml"++requestDeleteLoggingConfiguration :: DeleteLoggingConfiguration -> TestTree+requestDeleteLoggingConfiguration =+ req+ "DeleteLoggingConfiguration"+ "fixture/DeleteLoggingConfiguration.yaml"++requestDeleteMessage :: DeleteMessage -> TestTree+requestDeleteMessage =+ req+ "DeleteMessage"+ "fixture/DeleteMessage.yaml"++requestDeleteRoom :: DeleteRoom -> TestTree+requestDeleteRoom =+ req+ "DeleteRoom"+ "fixture/DeleteRoom.yaml"++requestDisconnectUser :: DisconnectUser -> TestTree+requestDisconnectUser =+ req+ "DisconnectUser"+ "fixture/DisconnectUser.yaml"++requestGetLoggingConfiguration :: GetLoggingConfiguration -> TestTree+requestGetLoggingConfiguration =+ req+ "GetLoggingConfiguration"+ "fixture/GetLoggingConfiguration.yaml"++requestGetRoom :: GetRoom -> TestTree+requestGetRoom =+ req+ "GetRoom"+ "fixture/GetRoom.yaml"++requestListLoggingConfigurations :: ListLoggingConfigurations -> TestTree+requestListLoggingConfigurations =+ req+ "ListLoggingConfigurations"+ "fixture/ListLoggingConfigurations.yaml"++requestListRooms :: ListRooms -> TestTree+requestListRooms =+ req+ "ListRooms"+ "fixture/ListRooms.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestSendEvent :: SendEvent -> TestTree+requestSendEvent =+ req+ "SendEvent"+ "fixture/SendEvent.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateLoggingConfiguration :: UpdateLoggingConfiguration -> TestTree+requestUpdateLoggingConfiguration =+ req+ "UpdateLoggingConfiguration"+ "fixture/UpdateLoggingConfiguration.yaml"++requestUpdateRoom :: UpdateRoom -> TestTree+requestUpdateRoom =+ req+ "UpdateRoom"+ "fixture/UpdateRoom.yaml"++-- Responses++responseCreateChatToken :: CreateChatTokenResponse -> TestTree+responseCreateChatToken =+ res+ "CreateChatTokenResponse"+ "fixture/CreateChatTokenResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateChatToken)++responseCreateLoggingConfiguration :: CreateLoggingConfigurationResponse -> TestTree+responseCreateLoggingConfiguration =+ res+ "CreateLoggingConfigurationResponse"+ "fixture/CreateLoggingConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateLoggingConfiguration)++responseCreateRoom :: CreateRoomResponse -> TestTree+responseCreateRoom =+ res+ "CreateRoomResponse"+ "fixture/CreateRoomResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateRoom)++responseDeleteLoggingConfiguration :: DeleteLoggingConfigurationResponse -> TestTree+responseDeleteLoggingConfiguration =+ res+ "DeleteLoggingConfigurationResponse"+ "fixture/DeleteLoggingConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteLoggingConfiguration)++responseDeleteMessage :: DeleteMessageResponse -> TestTree+responseDeleteMessage =+ res+ "DeleteMessageResponse"+ "fixture/DeleteMessageResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteMessage)++responseDeleteRoom :: DeleteRoomResponse -> TestTree+responseDeleteRoom =+ res+ "DeleteRoomResponse"+ "fixture/DeleteRoomResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteRoom)++responseDisconnectUser :: DisconnectUserResponse -> TestTree+responseDisconnectUser =+ res+ "DisconnectUserResponse"+ "fixture/DisconnectUserResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DisconnectUser)++responseGetLoggingConfiguration :: GetLoggingConfigurationResponse -> TestTree+responseGetLoggingConfiguration =+ res+ "GetLoggingConfigurationResponse"+ "fixture/GetLoggingConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetLoggingConfiguration)++responseGetRoom :: GetRoomResponse -> TestTree+responseGetRoom =+ res+ "GetRoomResponse"+ "fixture/GetRoomResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetRoom)++responseListLoggingConfigurations :: ListLoggingConfigurationsResponse -> TestTree+responseListLoggingConfigurations =+ res+ "ListLoggingConfigurationsResponse"+ "fixture/ListLoggingConfigurationsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListLoggingConfigurations)++responseListRooms :: ListRoomsResponse -> TestTree+responseListRooms =+ res+ "ListRoomsResponse"+ "fixture/ListRoomsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListRooms)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+ res+ "ListTagsForResourceResponse"+ "fixture/ListTagsForResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responseSendEvent :: SendEventResponse -> TestTree+responseSendEvent =+ res+ "SendEventResponse"+ "fixture/SendEventResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy SendEvent)++responseTagResource :: TagResourceResponse -> TestTree+responseTagResource =+ res+ "TagResourceResponse"+ "fixture/TagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy TagResource)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource =+ res+ "UntagResourceResponse"+ "fixture/UntagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UntagResource)++responseUpdateLoggingConfiguration :: UpdateLoggingConfigurationResponse -> TestTree+responseUpdateLoggingConfiguration =+ res+ "UpdateLoggingConfigurationResponse"+ "fixture/UpdateLoggingConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateLoggingConfiguration)++responseUpdateRoom :: UpdateRoomResponse -> TestTree+responseUpdateRoom =+ res+ "UpdateRoomResponse"+ "fixture/UpdateRoomResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateRoom)
+ test/Test/Amazonka/IVSChat.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.IVSChat+-- 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.IVSChat+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/IVSChat/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.IVSChat.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.IVSChat.Internal where