amazonka-pinpoint-sms-voice-v2 (empty) → 2.0
raw patch · 186 files changed
+20726/−0 lines, 186 filesdep +amazonka-coredep +amazonka-pinpoint-sms-voice-v2dep +amazonka-test
Dependencies added: amazonka-core, amazonka-pinpoint-sms-voice-v2, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-pinpoint-sms-voice-v2.cabal +171/−0
- fixture/AssociateOriginationIdentity.yaml +10/−0
- fixture/AssociateOriginationIdentityResponse.proto +0/−0
- fixture/CreateConfigurationSet.yaml +10/−0
- fixture/CreateConfigurationSetResponse.proto +0/−0
- fixture/CreateEventDestination.yaml +10/−0
- fixture/CreateEventDestinationResponse.proto +0/−0
- fixture/CreateOptOutList.yaml +10/−0
- fixture/CreateOptOutListResponse.proto +0/−0
- fixture/CreatePool.yaml +10/−0
- fixture/CreatePoolResponse.proto +0/−0
- fixture/DeleteConfigurationSet.yaml +10/−0
- fixture/DeleteConfigurationSetResponse.proto +0/−0
- fixture/DeleteDefaultMessageType.yaml +10/−0
- fixture/DeleteDefaultMessageTypeResponse.proto +0/−0
- fixture/DeleteDefaultSenderId.yaml +10/−0
- fixture/DeleteDefaultSenderIdResponse.proto +0/−0
- fixture/DeleteEventDestination.yaml +10/−0
- fixture/DeleteEventDestinationResponse.proto +0/−0
- fixture/DeleteKeyword.yaml +10/−0
- fixture/DeleteKeywordResponse.proto +0/−0
- fixture/DeleteOptOutList.yaml +10/−0
- fixture/DeleteOptOutListResponse.proto +0/−0
- fixture/DeleteOptedOutNumber.yaml +10/−0
- fixture/DeleteOptedOutNumberResponse.proto +0/−0
- fixture/DeletePool.yaml +10/−0
- fixture/DeletePoolResponse.proto +0/−0
- fixture/DeleteTextMessageSpendLimitOverride.yaml +10/−0
- fixture/DeleteTextMessageSpendLimitOverrideResponse.proto +0/−0
- fixture/DeleteVoiceMessageSpendLimitOverride.yaml +10/−0
- fixture/DeleteVoiceMessageSpendLimitOverrideResponse.proto +0/−0
- fixture/DescribeAccountAttributes.yaml +10/−0
- fixture/DescribeAccountAttributesResponse.proto +0/−0
- fixture/DescribeAccountLimits.yaml +10/−0
- fixture/DescribeAccountLimitsResponse.proto +0/−0
- fixture/DescribeConfigurationSets.yaml +10/−0
- fixture/DescribeConfigurationSetsResponse.proto +0/−0
- fixture/DescribeKeywords.yaml +10/−0
- fixture/DescribeKeywordsResponse.proto +0/−0
- fixture/DescribeOptOutLists.yaml +10/−0
- fixture/DescribeOptOutListsResponse.proto +0/−0
- fixture/DescribeOptedOutNumbers.yaml +10/−0
- fixture/DescribeOptedOutNumbersResponse.proto +0/−0
- fixture/DescribePhoneNumbers.yaml +10/−0
- fixture/DescribePhoneNumbersResponse.proto +0/−0
- fixture/DescribePools.yaml +10/−0
- fixture/DescribePoolsResponse.proto +0/−0
- fixture/DescribeSenderIds.yaml +10/−0
- fixture/DescribeSenderIdsResponse.proto +0/−0
- fixture/DescribeSpendLimits.yaml +10/−0
- fixture/DescribeSpendLimitsResponse.proto +0/−0
- fixture/DisassociateOriginationIdentity.yaml +10/−0
- fixture/DisassociateOriginationIdentityResponse.proto +0/−0
- fixture/ListPoolOriginationIdentities.yaml +10/−0
- fixture/ListPoolOriginationIdentitiesResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/PutKeyword.yaml +10/−0
- fixture/PutKeywordResponse.proto +0/−0
- fixture/PutOptedOutNumber.yaml +10/−0
- fixture/PutOptedOutNumberResponse.proto +0/−0
- fixture/ReleasePhoneNumber.yaml +10/−0
- fixture/ReleasePhoneNumberResponse.proto +0/−0
- fixture/RequestPhoneNumber.yaml +10/−0
- fixture/RequestPhoneNumberResponse.proto +0/−0
- fixture/SendTextMessage.yaml +10/−0
- fixture/SendTextMessageResponse.proto +0/−0
- fixture/SendVoiceMessage.yaml +10/−0
- fixture/SendVoiceMessageResponse.proto +0/−0
- fixture/SetDefaultMessageType.yaml +10/−0
- fixture/SetDefaultMessageTypeResponse.proto +0/−0
- fixture/SetDefaultSenderId.yaml +10/−0
- fixture/SetDefaultSenderIdResponse.proto +0/−0
- fixture/SetTextMessageSpendLimitOverride.yaml +10/−0
- fixture/SetTextMessageSpendLimitOverrideResponse.proto +0/−0
- fixture/SetVoiceMessageSpendLimitOverride.yaml +10/−0
- fixture/SetVoiceMessageSpendLimitOverrideResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateEventDestination.yaml +10/−0
- fixture/UpdateEventDestinationResponse.proto +0/−0
- fixture/UpdatePhoneNumber.yaml +10/−0
- fixture/UpdatePhoneNumberResponse.proto +0/−0
- fixture/UpdatePool.yaml +10/−0
- fixture/UpdatePoolResponse.proto +0/−0
- gen/Amazonka/PinpointSmsVoiceV2.hs +560/−0
- gen/Amazonka/PinpointSmsVoiceV2/AssociateOriginationIdentity.hs +314/−0
- gen/Amazonka/PinpointSmsVoiceV2/CreateConfigurationSet.hs +264/−0
- gen/Amazonka/PinpointSmsVoiceV2/CreateEventDestination.hs +331/−0
- gen/Amazonka/PinpointSmsVoiceV2/CreateOptOutList.hs +262/−0
- gen/Amazonka/PinpointSmsVoiceV2/CreatePool.hs +462/−0
- gen/Amazonka/PinpointSmsVoiceV2/DeleteConfigurationSet.hs +259/−0
- gen/Amazonka/PinpointSmsVoiceV2/DeleteDefaultMessageType.hs +219/−0
- gen/Amazonka/PinpointSmsVoiceV2/DeleteDefaultSenderId.hs +213/−0
- gen/Amazonka/PinpointSmsVoiceV2/DeleteEventDestination.hs +242/−0
- gen/Amazonka/PinpointSmsVoiceV2/DeleteKeyword.hs +254/−0
- gen/Amazonka/PinpointSmsVoiceV2/DeleteOptOutList.hs +211/−0
- gen/Amazonka/PinpointSmsVoiceV2/DeleteOptedOutNumber.hs +253/−0
- gen/Amazonka/PinpointSmsVoiceV2/DeletePool.hs +327/−0
- gen/Amazonka/PinpointSmsVoiceV2/DeleteTextMessageSpendLimitOverride.hs +179/−0
- gen/Amazonka/PinpointSmsVoiceV2/DeleteVoiceMessageSpendLimitOverride.hs +179/−0
- gen/Amazonka/PinpointSmsVoiceV2/DescribeAccountAttributes.hs +241/−0
- gen/Amazonka/PinpointSmsVoiceV2/DescribeAccountLimits.hs +236/−0
- gen/Amazonka/PinpointSmsVoiceV2/DescribeConfigurationSets.hs +272/−0
- gen/Amazonka/PinpointSmsVoiceV2/DescribeKeywords.hs +316/−0
- gen/Amazonka/PinpointSmsVoiceV2/DescribeOptOutLists.hs +255/−0
- gen/Amazonka/PinpointSmsVoiceV2/DescribeOptedOutNumbers.hs +319/−0
- gen/Amazonka/PinpointSmsVoiceV2/DescribePhoneNumbers.hs +272/−0
- gen/Amazonka/PinpointSmsVoiceV2/DescribePools.hs +270/−0
- gen/Amazonka/PinpointSmsVoiceV2/DescribeSenderIds.hs +264/−0
- gen/Amazonka/PinpointSmsVoiceV2/DescribeSpendLimits.hs +236/−0
- gen/Amazonka/PinpointSmsVoiceV2/DisassociateOriginationIdentity.hs +321/−0
- gen/Amazonka/PinpointSmsVoiceV2/Lens.hs +682/−0
- gen/Amazonka/PinpointSmsVoiceV2/ListPoolOriginationIdentities.hs +301/−0
- gen/Amazonka/PinpointSmsVoiceV2/ListTagsForResource.hs +184/−0
- gen/Amazonka/PinpointSmsVoiceV2/PutKeyword.hs +302/−0
- gen/Amazonka/PinpointSmsVoiceV2/PutOptedOutNumber.hs +250/−0
- gen/Amazonka/PinpointSmsVoiceV2/ReleasePhoneNumber.hs +364/−0
- gen/Amazonka/PinpointSmsVoiceV2/RequestPhoneNumber.hs +576/−0
- gen/Amazonka/PinpointSmsVoiceV2/SendTextMessage.hs +353/−0
- gen/Amazonka/PinpointSmsVoiceV2/SendVoiceMessage.hs +344/−0
- gen/Amazonka/PinpointSmsVoiceV2/SetDefaultMessageType.hs +234/−0
- gen/Amazonka/PinpointSmsVoiceV2/SetDefaultSenderId.hs +241/−0
- gen/Amazonka/PinpointSmsVoiceV2/SetTextMessageSpendLimitOverride.hs +195/−0
- gen/Amazonka/PinpointSmsVoiceV2/SetVoiceMessageSpendLimitOverride.hs +201/−0
- gen/Amazonka/PinpointSmsVoiceV2/TagResource.hs +180/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types.hs +454/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/AccountAttribute.hs +86/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/AccountAttributeName.hs +66/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/AccountLimit.hs +104/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/AccountLimitName.hs +81/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/CloudWatchLogsDestination.hs +110/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/ConfigurationSetFilter.hs +87/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/ConfigurationSetFilterName.hs +81/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/ConfigurationSetInformation.hs +161/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/DestinationCountryParameterKey.hs +71/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/EventDestination.hs +160/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/EventType.hs +186/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/KeywordAction.hs +76/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/KeywordFilter.hs +87/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/KeywordFilterName.hs +66/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/KeywordInformation.hs +106/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/KinesisFirehoseDestination.hs +109/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/MessageType.hs +71/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/NumberCapability.hs +71/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/NumberStatus.hs +86/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/NumberType.hs +81/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/OptOutListInformation.hs +110/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/OptedOutFilter.hs +87/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/OptedOutFilterName.hs +66/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/OptedOutNumberInformation.hs +111/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/OriginationIdentityMetadata.hs +129/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/PhoneNumberFilter.hs +87/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/PhoneNumberFilterName.hs +106/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/PhoneNumberInformation.hs +339/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/PoolFilter.hs +87/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/PoolFilterName.hs +96/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/PoolInformation.hs +276/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/PoolOriginationIdentitiesFilter.hs +96/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/PoolOriginationIdentitiesFilterName.hs +71/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/PoolStatus.hs +76/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/RequestableNumberType.hs +76/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/SenderIdAndCountry.hs +94/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/SenderIdFilter.hs +87/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/SenderIdFilterName.hs +76/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/SenderIdInformation.hs +145/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/SnsDestination.hs +80/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/SpendLimit.hs +143/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/SpendLimitName.hs +71/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/Tag.hs +93/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/VoiceId.hs +353/−0
- gen/Amazonka/PinpointSmsVoiceV2/Types/VoiceMessageBodyTextType.hs +71/−0
- gen/Amazonka/PinpointSmsVoiceV2/UntagResource.hs +176/−0
- gen/Amazonka/PinpointSmsVoiceV2/UpdateEventDestination.hs +318/−0
- gen/Amazonka/PinpointSmsVoiceV2/UpdatePhoneNumber.hs +460/−0
- gen/Amazonka/PinpointSmsVoiceV2/UpdatePool.hs +423/−0
- gen/Amazonka/PinpointSmsVoiceV2/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/Gen/PinpointSmsVoiceV2.hs +898/−0
- test/Test/Amazonka/PinpointSmsVoiceV2.hs +20/−0
- test/Test/Amazonka/PinpointSmsVoiceV2/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 Pinpoint SMS Voice V2 SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2022-03-31@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-pinpoint-sms-voice-v2)+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.PinpointSmsVoiceV2](http://hackage.haskell.org/package/amazonka-pinpoint-sms-voice-v2/docs/Amazonka-PinpointSmsVoiceV2.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-pinpoint-sms-voice-v2` 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-pinpoint-sms-voice-v2.cabal view
@@ -0,0 +1,171 @@+cabal-version: 2.2+name: amazonka-pinpoint-sms-voice-v2+version: 2.0+synopsis: Amazon Pinpoint SMS Voice V2 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 @2022-03-31@ 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.PinpointSmsVoiceV2.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.PinpointSmsVoiceV2" 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-pinpoint-sms-voice-v2++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.PinpointSmsVoiceV2+ Amazonka.PinpointSmsVoiceV2.AssociateOriginationIdentity+ Amazonka.PinpointSmsVoiceV2.CreateConfigurationSet+ Amazonka.PinpointSmsVoiceV2.CreateEventDestination+ Amazonka.PinpointSmsVoiceV2.CreateOptOutList+ Amazonka.PinpointSmsVoiceV2.CreatePool+ Amazonka.PinpointSmsVoiceV2.DeleteConfigurationSet+ Amazonka.PinpointSmsVoiceV2.DeleteDefaultMessageType+ Amazonka.PinpointSmsVoiceV2.DeleteDefaultSenderId+ Amazonka.PinpointSmsVoiceV2.DeleteEventDestination+ Amazonka.PinpointSmsVoiceV2.DeleteKeyword+ Amazonka.PinpointSmsVoiceV2.DeleteOptedOutNumber+ Amazonka.PinpointSmsVoiceV2.DeleteOptOutList+ Amazonka.PinpointSmsVoiceV2.DeletePool+ Amazonka.PinpointSmsVoiceV2.DeleteTextMessageSpendLimitOverride+ Amazonka.PinpointSmsVoiceV2.DeleteVoiceMessageSpendLimitOverride+ Amazonka.PinpointSmsVoiceV2.DescribeAccountAttributes+ Amazonka.PinpointSmsVoiceV2.DescribeAccountLimits+ Amazonka.PinpointSmsVoiceV2.DescribeConfigurationSets+ Amazonka.PinpointSmsVoiceV2.DescribeKeywords+ Amazonka.PinpointSmsVoiceV2.DescribeOptedOutNumbers+ Amazonka.PinpointSmsVoiceV2.DescribeOptOutLists+ Amazonka.PinpointSmsVoiceV2.DescribePhoneNumbers+ Amazonka.PinpointSmsVoiceV2.DescribePools+ Amazonka.PinpointSmsVoiceV2.DescribeSenderIds+ Amazonka.PinpointSmsVoiceV2.DescribeSpendLimits+ Amazonka.PinpointSmsVoiceV2.DisassociateOriginationIdentity+ Amazonka.PinpointSmsVoiceV2.Lens+ Amazonka.PinpointSmsVoiceV2.ListPoolOriginationIdentities+ Amazonka.PinpointSmsVoiceV2.ListTagsForResource+ Amazonka.PinpointSmsVoiceV2.PutKeyword+ Amazonka.PinpointSmsVoiceV2.PutOptedOutNumber+ Amazonka.PinpointSmsVoiceV2.ReleasePhoneNumber+ Amazonka.PinpointSmsVoiceV2.RequestPhoneNumber+ Amazonka.PinpointSmsVoiceV2.SendTextMessage+ Amazonka.PinpointSmsVoiceV2.SendVoiceMessage+ Amazonka.PinpointSmsVoiceV2.SetDefaultMessageType+ Amazonka.PinpointSmsVoiceV2.SetDefaultSenderId+ Amazonka.PinpointSmsVoiceV2.SetTextMessageSpendLimitOverride+ Amazonka.PinpointSmsVoiceV2.SetVoiceMessageSpendLimitOverride+ Amazonka.PinpointSmsVoiceV2.TagResource+ Amazonka.PinpointSmsVoiceV2.Types+ Amazonka.PinpointSmsVoiceV2.Types.AccountAttribute+ Amazonka.PinpointSmsVoiceV2.Types.AccountAttributeName+ Amazonka.PinpointSmsVoiceV2.Types.AccountLimit+ Amazonka.PinpointSmsVoiceV2.Types.AccountLimitName+ Amazonka.PinpointSmsVoiceV2.Types.CloudWatchLogsDestination+ Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetFilter+ Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetFilterName+ Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetInformation+ Amazonka.PinpointSmsVoiceV2.Types.DestinationCountryParameterKey+ Amazonka.PinpointSmsVoiceV2.Types.EventDestination+ Amazonka.PinpointSmsVoiceV2.Types.EventType+ Amazonka.PinpointSmsVoiceV2.Types.KeywordAction+ Amazonka.PinpointSmsVoiceV2.Types.KeywordFilter+ Amazonka.PinpointSmsVoiceV2.Types.KeywordFilterName+ Amazonka.PinpointSmsVoiceV2.Types.KeywordInformation+ Amazonka.PinpointSmsVoiceV2.Types.KinesisFirehoseDestination+ Amazonka.PinpointSmsVoiceV2.Types.MessageType+ Amazonka.PinpointSmsVoiceV2.Types.NumberCapability+ Amazonka.PinpointSmsVoiceV2.Types.NumberStatus+ Amazonka.PinpointSmsVoiceV2.Types.NumberType+ Amazonka.PinpointSmsVoiceV2.Types.OptedOutFilter+ Amazonka.PinpointSmsVoiceV2.Types.OptedOutFilterName+ Amazonka.PinpointSmsVoiceV2.Types.OptedOutNumberInformation+ Amazonka.PinpointSmsVoiceV2.Types.OptOutListInformation+ Amazonka.PinpointSmsVoiceV2.Types.OriginationIdentityMetadata+ Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberFilter+ Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberFilterName+ Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberInformation+ Amazonka.PinpointSmsVoiceV2.Types.PoolFilter+ Amazonka.PinpointSmsVoiceV2.Types.PoolFilterName+ Amazonka.PinpointSmsVoiceV2.Types.PoolInformation+ Amazonka.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilter+ Amazonka.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilterName+ Amazonka.PinpointSmsVoiceV2.Types.PoolStatus+ Amazonka.PinpointSmsVoiceV2.Types.RequestableNumberType+ Amazonka.PinpointSmsVoiceV2.Types.SenderIdAndCountry+ Amazonka.PinpointSmsVoiceV2.Types.SenderIdFilter+ Amazonka.PinpointSmsVoiceV2.Types.SenderIdFilterName+ Amazonka.PinpointSmsVoiceV2.Types.SenderIdInformation+ Amazonka.PinpointSmsVoiceV2.Types.SnsDestination+ Amazonka.PinpointSmsVoiceV2.Types.SpendLimit+ Amazonka.PinpointSmsVoiceV2.Types.SpendLimitName+ Amazonka.PinpointSmsVoiceV2.Types.Tag+ Amazonka.PinpointSmsVoiceV2.Types.VoiceId+ Amazonka.PinpointSmsVoiceV2.Types.VoiceMessageBodyTextType+ Amazonka.PinpointSmsVoiceV2.UntagResource+ Amazonka.PinpointSmsVoiceV2.UpdateEventDestination+ Amazonka.PinpointSmsVoiceV2.UpdatePhoneNumber+ Amazonka.PinpointSmsVoiceV2.UpdatePool+ Amazonka.PinpointSmsVoiceV2.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-pinpoint-sms-voice-v2-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.PinpointSmsVoiceV2+ Test.Amazonka.PinpointSmsVoiceV2+ Test.Amazonka.PinpointSmsVoiceV2.Internal++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , amazonka-pinpoint-sms-voice-v2+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/AssociateOriginationIdentity.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/AssociateOriginationIdentityResponse.proto view
+ fixture/CreateConfigurationSet.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/CreateConfigurationSetResponse.proto view
+ fixture/CreateEventDestination.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/CreateEventDestinationResponse.proto view
+ fixture/CreateOptOutList.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/CreateOptOutListResponse.proto view
+ fixture/CreatePool.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/CreatePoolResponse.proto view
+ fixture/DeleteConfigurationSet.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DeleteConfigurationSetResponse.proto view
+ fixture/DeleteDefaultMessageType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DeleteDefaultMessageTypeResponse.proto view
+ fixture/DeleteDefaultSenderId.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DeleteDefaultSenderIdResponse.proto view
+ fixture/DeleteEventDestination.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DeleteEventDestinationResponse.proto view
+ fixture/DeleteKeyword.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DeleteKeywordResponse.proto view
+ fixture/DeleteOptOutList.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DeleteOptOutListResponse.proto view
+ fixture/DeleteOptedOutNumber.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DeleteOptedOutNumberResponse.proto view
+ fixture/DeletePool.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DeletePoolResponse.proto view
+ fixture/DeleteTextMessageSpendLimitOverride.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DeleteTextMessageSpendLimitOverrideResponse.proto view
+ fixture/DeleteVoiceMessageSpendLimitOverride.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DeleteVoiceMessageSpendLimitOverrideResponse.proto view
+ fixture/DescribeAccountAttributes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DescribeAccountAttributesResponse.proto view
+ fixture/DescribeAccountLimits.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DescribeAccountLimitsResponse.proto view
+ fixture/DescribeConfigurationSets.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DescribeConfigurationSetsResponse.proto view
+ fixture/DescribeKeywords.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DescribeKeywordsResponse.proto view
+ fixture/DescribeOptOutLists.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DescribeOptOutListsResponse.proto view
+ fixture/DescribeOptedOutNumbers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DescribeOptedOutNumbersResponse.proto view
+ fixture/DescribePhoneNumbers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DescribePhoneNumbersResponse.proto view
+ fixture/DescribePools.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DescribePoolsResponse.proto view
+ fixture/DescribeSenderIds.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DescribeSenderIdsResponse.proto view
+ fixture/DescribeSpendLimits.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DescribeSpendLimitsResponse.proto view
+ fixture/DisassociateOriginationIdentity.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/DisassociateOriginationIdentityResponse.proto view
+ fixture/ListPoolOriginationIdentities.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/ListPoolOriginationIdentitiesResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/PutKeyword.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/PutKeywordResponse.proto view
+ fixture/PutOptedOutNumber.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/PutOptedOutNumberResponse.proto view
+ fixture/ReleasePhoneNumber.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/ReleasePhoneNumberResponse.proto view
+ fixture/RequestPhoneNumber.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/RequestPhoneNumberResponse.proto view
+ fixture/SendTextMessage.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/SendTextMessageResponse.proto view
+ fixture/SendVoiceMessage.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/SendVoiceMessageResponse.proto view
+ fixture/SetDefaultMessageType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/SetDefaultMessageTypeResponse.proto view
+ fixture/SetDefaultSenderId.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/SetDefaultSenderIdResponse.proto view
+ fixture/SetTextMessageSpendLimitOverride.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/SetTextMessageSpendLimitOverrideResponse.proto view
+ fixture/SetVoiceMessageSpendLimitOverride.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/SetVoiceMessageSpendLimitOverrideResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/UpdateEventDestination.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/UpdateEventDestinationResponse.proto view
+ fixture/UpdatePhoneNumber.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/UpdatePhoneNumberResponse.proto view
+ fixture/UpdatePool.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms-voice/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms-voice.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/UpdatePoolResponse.proto view
+ gen/Amazonka/PinpointSmsVoiceV2.hs view
@@ -0,0 +1,560 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.PinpointSmsVoiceV2+-- 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 @2022-03-31@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Welcome to the /Amazon Pinpoint SMS and Voice, version 2 API Reference/.+-- This guide provides information about Amazon Pinpoint SMS and Voice,+-- version 2 API resources, including supported HTTP methods, parameters,+-- and schemas.+--+-- Amazon Pinpoint is an Amazon Web Services service that you can use to+-- engage with your recipients across multiple messaging channels. The+-- Amazon Pinpoint SMS and Voice, version 2 API provides programmatic+-- access to options that are unique to the SMS and voice channels and+-- supplements the resources provided by the Amazon Pinpoint API.+--+-- If you\'re new to Amazon Pinpoint, it\'s also helpful to review the+-- <https://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html Amazon Pinpoint Developer Guide>.+-- The /Amazon Pinpoint Developer Guide/ provides tutorials, code samples,+-- and procedures that demonstrate how to use Amazon Pinpoint features+-- programmatically and how to integrate Amazon Pinpoint functionality into+-- mobile apps and other types of applications. The guide also provides key+-- information, such as Amazon Pinpoint integration with other Amazon Web+-- Services services, and the quotas that apply to use of the service.+module Amazonka.PinpointSmsVoiceV2+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** AccessDeniedException+ _AccessDeniedException,++ -- ** ConflictException+ _ConflictException,++ -- ** InternalServerException+ _InternalServerException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** ServiceQuotaExceededException+ _ServiceQuotaExceededException,++ -- ** ThrottlingException+ _ThrottlingException,++ -- ** ValidationException+ _ValidationException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** AssociateOriginationIdentity+ AssociateOriginationIdentity (AssociateOriginationIdentity'),+ newAssociateOriginationIdentity,+ AssociateOriginationIdentityResponse (AssociateOriginationIdentityResponse'),+ newAssociateOriginationIdentityResponse,++ -- ** CreateConfigurationSet+ CreateConfigurationSet (CreateConfigurationSet'),+ newCreateConfigurationSet,+ CreateConfigurationSetResponse (CreateConfigurationSetResponse'),+ newCreateConfigurationSetResponse,++ -- ** CreateEventDestination+ CreateEventDestination (CreateEventDestination'),+ newCreateEventDestination,+ CreateEventDestinationResponse (CreateEventDestinationResponse'),+ newCreateEventDestinationResponse,++ -- ** CreateOptOutList+ CreateOptOutList (CreateOptOutList'),+ newCreateOptOutList,+ CreateOptOutListResponse (CreateOptOutListResponse'),+ newCreateOptOutListResponse,++ -- ** CreatePool+ CreatePool (CreatePool'),+ newCreatePool,+ CreatePoolResponse (CreatePoolResponse'),+ newCreatePoolResponse,++ -- ** DeleteConfigurationSet+ DeleteConfigurationSet (DeleteConfigurationSet'),+ newDeleteConfigurationSet,+ DeleteConfigurationSetResponse (DeleteConfigurationSetResponse'),+ newDeleteConfigurationSetResponse,++ -- ** DeleteDefaultMessageType+ DeleteDefaultMessageType (DeleteDefaultMessageType'),+ newDeleteDefaultMessageType,+ DeleteDefaultMessageTypeResponse (DeleteDefaultMessageTypeResponse'),+ newDeleteDefaultMessageTypeResponse,++ -- ** DeleteDefaultSenderId+ DeleteDefaultSenderId (DeleteDefaultSenderId'),+ newDeleteDefaultSenderId,+ DeleteDefaultSenderIdResponse (DeleteDefaultSenderIdResponse'),+ newDeleteDefaultSenderIdResponse,++ -- ** DeleteEventDestination+ DeleteEventDestination (DeleteEventDestination'),+ newDeleteEventDestination,+ DeleteEventDestinationResponse (DeleteEventDestinationResponse'),+ newDeleteEventDestinationResponse,++ -- ** DeleteKeyword+ DeleteKeyword (DeleteKeyword'),+ newDeleteKeyword,+ DeleteKeywordResponse (DeleteKeywordResponse'),+ newDeleteKeywordResponse,++ -- ** DeleteOptOutList+ DeleteOptOutList (DeleteOptOutList'),+ newDeleteOptOutList,+ DeleteOptOutListResponse (DeleteOptOutListResponse'),+ newDeleteOptOutListResponse,++ -- ** DeleteOptedOutNumber+ DeleteOptedOutNumber (DeleteOptedOutNumber'),+ newDeleteOptedOutNumber,+ DeleteOptedOutNumberResponse (DeleteOptedOutNumberResponse'),+ newDeleteOptedOutNumberResponse,++ -- ** DeletePool+ DeletePool (DeletePool'),+ newDeletePool,+ DeletePoolResponse (DeletePoolResponse'),+ newDeletePoolResponse,++ -- ** DeleteTextMessageSpendLimitOverride+ DeleteTextMessageSpendLimitOverride (DeleteTextMessageSpendLimitOverride'),+ newDeleteTextMessageSpendLimitOverride,+ DeleteTextMessageSpendLimitOverrideResponse (DeleteTextMessageSpendLimitOverrideResponse'),+ newDeleteTextMessageSpendLimitOverrideResponse,++ -- ** DeleteVoiceMessageSpendLimitOverride+ DeleteVoiceMessageSpendLimitOverride (DeleteVoiceMessageSpendLimitOverride'),+ newDeleteVoiceMessageSpendLimitOverride,+ DeleteVoiceMessageSpendLimitOverrideResponse (DeleteVoiceMessageSpendLimitOverrideResponse'),+ newDeleteVoiceMessageSpendLimitOverrideResponse,++ -- ** DescribeAccountAttributes (Paginated)+ DescribeAccountAttributes (DescribeAccountAttributes'),+ newDescribeAccountAttributes,+ DescribeAccountAttributesResponse (DescribeAccountAttributesResponse'),+ newDescribeAccountAttributesResponse,++ -- ** DescribeAccountLimits (Paginated)+ DescribeAccountLimits (DescribeAccountLimits'),+ newDescribeAccountLimits,+ DescribeAccountLimitsResponse (DescribeAccountLimitsResponse'),+ newDescribeAccountLimitsResponse,++ -- ** DescribeConfigurationSets (Paginated)+ DescribeConfigurationSets (DescribeConfigurationSets'),+ newDescribeConfigurationSets,+ DescribeConfigurationSetsResponse (DescribeConfigurationSetsResponse'),+ newDescribeConfigurationSetsResponse,++ -- ** DescribeKeywords (Paginated)+ DescribeKeywords (DescribeKeywords'),+ newDescribeKeywords,+ DescribeKeywordsResponse (DescribeKeywordsResponse'),+ newDescribeKeywordsResponse,++ -- ** DescribeOptOutLists (Paginated)+ DescribeOptOutLists (DescribeOptOutLists'),+ newDescribeOptOutLists,+ DescribeOptOutListsResponse (DescribeOptOutListsResponse'),+ newDescribeOptOutListsResponse,++ -- ** DescribeOptedOutNumbers (Paginated)+ DescribeOptedOutNumbers (DescribeOptedOutNumbers'),+ newDescribeOptedOutNumbers,+ DescribeOptedOutNumbersResponse (DescribeOptedOutNumbersResponse'),+ newDescribeOptedOutNumbersResponse,++ -- ** DescribePhoneNumbers (Paginated)+ DescribePhoneNumbers (DescribePhoneNumbers'),+ newDescribePhoneNumbers,+ DescribePhoneNumbersResponse (DescribePhoneNumbersResponse'),+ newDescribePhoneNumbersResponse,++ -- ** DescribePools (Paginated)+ DescribePools (DescribePools'),+ newDescribePools,+ DescribePoolsResponse (DescribePoolsResponse'),+ newDescribePoolsResponse,++ -- ** DescribeSenderIds (Paginated)+ DescribeSenderIds (DescribeSenderIds'),+ newDescribeSenderIds,+ DescribeSenderIdsResponse (DescribeSenderIdsResponse'),+ newDescribeSenderIdsResponse,++ -- ** DescribeSpendLimits (Paginated)+ DescribeSpendLimits (DescribeSpendLimits'),+ newDescribeSpendLimits,+ DescribeSpendLimitsResponse (DescribeSpendLimitsResponse'),+ newDescribeSpendLimitsResponse,++ -- ** DisassociateOriginationIdentity+ DisassociateOriginationIdentity (DisassociateOriginationIdentity'),+ newDisassociateOriginationIdentity,+ DisassociateOriginationIdentityResponse (DisassociateOriginationIdentityResponse'),+ newDisassociateOriginationIdentityResponse,++ -- ** ListPoolOriginationIdentities (Paginated)+ ListPoolOriginationIdentities (ListPoolOriginationIdentities'),+ newListPoolOriginationIdentities,+ ListPoolOriginationIdentitiesResponse (ListPoolOriginationIdentitiesResponse'),+ newListPoolOriginationIdentitiesResponse,++ -- ** ListTagsForResource+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** PutKeyword+ PutKeyword (PutKeyword'),+ newPutKeyword,+ PutKeywordResponse (PutKeywordResponse'),+ newPutKeywordResponse,++ -- ** PutOptedOutNumber+ PutOptedOutNumber (PutOptedOutNumber'),+ newPutOptedOutNumber,+ PutOptedOutNumberResponse (PutOptedOutNumberResponse'),+ newPutOptedOutNumberResponse,++ -- ** ReleasePhoneNumber+ ReleasePhoneNumber (ReleasePhoneNumber'),+ newReleasePhoneNumber,+ ReleasePhoneNumberResponse (ReleasePhoneNumberResponse'),+ newReleasePhoneNumberResponse,++ -- ** RequestPhoneNumber+ RequestPhoneNumber (RequestPhoneNumber'),+ newRequestPhoneNumber,+ RequestPhoneNumberResponse (RequestPhoneNumberResponse'),+ newRequestPhoneNumberResponse,++ -- ** SendTextMessage+ SendTextMessage (SendTextMessage'),+ newSendTextMessage,+ SendTextMessageResponse (SendTextMessageResponse'),+ newSendTextMessageResponse,++ -- ** SendVoiceMessage+ SendVoiceMessage (SendVoiceMessage'),+ newSendVoiceMessage,+ SendVoiceMessageResponse (SendVoiceMessageResponse'),+ newSendVoiceMessageResponse,++ -- ** SetDefaultMessageType+ SetDefaultMessageType (SetDefaultMessageType'),+ newSetDefaultMessageType,+ SetDefaultMessageTypeResponse (SetDefaultMessageTypeResponse'),+ newSetDefaultMessageTypeResponse,++ -- ** SetDefaultSenderId+ SetDefaultSenderId (SetDefaultSenderId'),+ newSetDefaultSenderId,+ SetDefaultSenderIdResponse (SetDefaultSenderIdResponse'),+ newSetDefaultSenderIdResponse,++ -- ** SetTextMessageSpendLimitOverride+ SetTextMessageSpendLimitOverride (SetTextMessageSpendLimitOverride'),+ newSetTextMessageSpendLimitOverride,+ SetTextMessageSpendLimitOverrideResponse (SetTextMessageSpendLimitOverrideResponse'),+ newSetTextMessageSpendLimitOverrideResponse,++ -- ** SetVoiceMessageSpendLimitOverride+ SetVoiceMessageSpendLimitOverride (SetVoiceMessageSpendLimitOverride'),+ newSetVoiceMessageSpendLimitOverride,+ SetVoiceMessageSpendLimitOverrideResponse (SetVoiceMessageSpendLimitOverrideResponse'),+ newSetVoiceMessageSpendLimitOverrideResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateEventDestination+ UpdateEventDestination (UpdateEventDestination'),+ newUpdateEventDestination,+ UpdateEventDestinationResponse (UpdateEventDestinationResponse'),+ newUpdateEventDestinationResponse,++ -- ** UpdatePhoneNumber+ UpdatePhoneNumber (UpdatePhoneNumber'),+ newUpdatePhoneNumber,+ UpdatePhoneNumberResponse (UpdatePhoneNumberResponse'),+ newUpdatePhoneNumberResponse,++ -- ** UpdatePool+ UpdatePool (UpdatePool'),+ newUpdatePool,+ UpdatePoolResponse (UpdatePoolResponse'),+ newUpdatePoolResponse,++ -- * Types++ -- ** AccountAttributeName+ AccountAttributeName (..),++ -- ** AccountLimitName+ AccountLimitName (..),++ -- ** ConfigurationSetFilterName+ ConfigurationSetFilterName (..),++ -- ** DestinationCountryParameterKey+ DestinationCountryParameterKey (..),++ -- ** EventType+ EventType (..),++ -- ** KeywordAction+ KeywordAction (..),++ -- ** KeywordFilterName+ KeywordFilterName (..),++ -- ** MessageType+ MessageType (..),++ -- ** NumberCapability+ NumberCapability (..),++ -- ** NumberStatus+ NumberStatus (..),++ -- ** NumberType+ NumberType (..),++ -- ** OptedOutFilterName+ OptedOutFilterName (..),++ -- ** PhoneNumberFilterName+ PhoneNumberFilterName (..),++ -- ** PoolFilterName+ PoolFilterName (..),++ -- ** PoolOriginationIdentitiesFilterName+ PoolOriginationIdentitiesFilterName (..),++ -- ** PoolStatus+ PoolStatus (..),++ -- ** RequestableNumberType+ RequestableNumberType (..),++ -- ** SenderIdFilterName+ SenderIdFilterName (..),++ -- ** SpendLimitName+ SpendLimitName (..),++ -- ** VoiceId+ VoiceId (..),++ -- ** VoiceMessageBodyTextType+ VoiceMessageBodyTextType (..),++ -- ** AccountAttribute+ AccountAttribute (AccountAttribute'),+ newAccountAttribute,++ -- ** AccountLimit+ AccountLimit (AccountLimit'),+ newAccountLimit,++ -- ** CloudWatchLogsDestination+ CloudWatchLogsDestination (CloudWatchLogsDestination'),+ newCloudWatchLogsDestination,++ -- ** ConfigurationSetFilter+ ConfigurationSetFilter (ConfigurationSetFilter'),+ newConfigurationSetFilter,++ -- ** ConfigurationSetInformation+ ConfigurationSetInformation (ConfigurationSetInformation'),+ newConfigurationSetInformation,++ -- ** EventDestination+ EventDestination (EventDestination'),+ newEventDestination,++ -- ** KeywordFilter+ KeywordFilter (KeywordFilter'),+ newKeywordFilter,++ -- ** KeywordInformation+ KeywordInformation (KeywordInformation'),+ newKeywordInformation,++ -- ** KinesisFirehoseDestination+ KinesisFirehoseDestination (KinesisFirehoseDestination'),+ newKinesisFirehoseDestination,++ -- ** OptOutListInformation+ OptOutListInformation (OptOutListInformation'),+ newOptOutListInformation,++ -- ** OptedOutFilter+ OptedOutFilter (OptedOutFilter'),+ newOptedOutFilter,++ -- ** OptedOutNumberInformation+ OptedOutNumberInformation (OptedOutNumberInformation'),+ newOptedOutNumberInformation,++ -- ** OriginationIdentityMetadata+ OriginationIdentityMetadata (OriginationIdentityMetadata'),+ newOriginationIdentityMetadata,++ -- ** PhoneNumberFilter+ PhoneNumberFilter (PhoneNumberFilter'),+ newPhoneNumberFilter,++ -- ** PhoneNumberInformation+ PhoneNumberInformation (PhoneNumberInformation'),+ newPhoneNumberInformation,++ -- ** PoolFilter+ PoolFilter (PoolFilter'),+ newPoolFilter,++ -- ** PoolInformation+ PoolInformation (PoolInformation'),+ newPoolInformation,++ -- ** PoolOriginationIdentitiesFilter+ PoolOriginationIdentitiesFilter (PoolOriginationIdentitiesFilter'),+ newPoolOriginationIdentitiesFilter,++ -- ** SenderIdAndCountry+ SenderIdAndCountry (SenderIdAndCountry'),+ newSenderIdAndCountry,++ -- ** SenderIdFilter+ SenderIdFilter (SenderIdFilter'),+ newSenderIdFilter,++ -- ** SenderIdInformation+ SenderIdInformation (SenderIdInformation'),+ newSenderIdInformation,++ -- ** SnsDestination+ SnsDestination (SnsDestination'),+ newSnsDestination,++ -- ** SpendLimit+ SpendLimit (SpendLimit'),+ newSpendLimit,++ -- ** Tag+ Tag (Tag'),+ newTag,+ )+where++import Amazonka.PinpointSmsVoiceV2.AssociateOriginationIdentity+import Amazonka.PinpointSmsVoiceV2.CreateConfigurationSet+import Amazonka.PinpointSmsVoiceV2.CreateEventDestination+import Amazonka.PinpointSmsVoiceV2.CreateOptOutList+import Amazonka.PinpointSmsVoiceV2.CreatePool+import Amazonka.PinpointSmsVoiceV2.DeleteConfigurationSet+import Amazonka.PinpointSmsVoiceV2.DeleteDefaultMessageType+import Amazonka.PinpointSmsVoiceV2.DeleteDefaultSenderId+import Amazonka.PinpointSmsVoiceV2.DeleteEventDestination+import Amazonka.PinpointSmsVoiceV2.DeleteKeyword+import Amazonka.PinpointSmsVoiceV2.DeleteOptOutList+import Amazonka.PinpointSmsVoiceV2.DeleteOptedOutNumber+import Amazonka.PinpointSmsVoiceV2.DeletePool+import Amazonka.PinpointSmsVoiceV2.DeleteTextMessageSpendLimitOverride+import Amazonka.PinpointSmsVoiceV2.DeleteVoiceMessageSpendLimitOverride+import Amazonka.PinpointSmsVoiceV2.DescribeAccountAttributes+import Amazonka.PinpointSmsVoiceV2.DescribeAccountLimits+import Amazonka.PinpointSmsVoiceV2.DescribeConfigurationSets+import Amazonka.PinpointSmsVoiceV2.DescribeKeywords+import Amazonka.PinpointSmsVoiceV2.DescribeOptOutLists+import Amazonka.PinpointSmsVoiceV2.DescribeOptedOutNumbers+import Amazonka.PinpointSmsVoiceV2.DescribePhoneNumbers+import Amazonka.PinpointSmsVoiceV2.DescribePools+import Amazonka.PinpointSmsVoiceV2.DescribeSenderIds+import Amazonka.PinpointSmsVoiceV2.DescribeSpendLimits+import Amazonka.PinpointSmsVoiceV2.DisassociateOriginationIdentity+import Amazonka.PinpointSmsVoiceV2.Lens+import Amazonka.PinpointSmsVoiceV2.ListPoolOriginationIdentities+import Amazonka.PinpointSmsVoiceV2.ListTagsForResource+import Amazonka.PinpointSmsVoiceV2.PutKeyword+import Amazonka.PinpointSmsVoiceV2.PutOptedOutNumber+import Amazonka.PinpointSmsVoiceV2.ReleasePhoneNumber+import Amazonka.PinpointSmsVoiceV2.RequestPhoneNumber+import Amazonka.PinpointSmsVoiceV2.SendTextMessage+import Amazonka.PinpointSmsVoiceV2.SendVoiceMessage+import Amazonka.PinpointSmsVoiceV2.SetDefaultMessageType+import Amazonka.PinpointSmsVoiceV2.SetDefaultSenderId+import Amazonka.PinpointSmsVoiceV2.SetTextMessageSpendLimitOverride+import Amazonka.PinpointSmsVoiceV2.SetVoiceMessageSpendLimitOverride+import Amazonka.PinpointSmsVoiceV2.TagResource+import Amazonka.PinpointSmsVoiceV2.Types+import Amazonka.PinpointSmsVoiceV2.UntagResource+import Amazonka.PinpointSmsVoiceV2.UpdateEventDestination+import Amazonka.PinpointSmsVoiceV2.UpdatePhoneNumber+import Amazonka.PinpointSmsVoiceV2.UpdatePool+import Amazonka.PinpointSmsVoiceV2.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 'PinpointSmsVoiceV2'.++-- $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/PinpointSmsVoiceV2/AssociateOriginationIdentity.hs view
@@ -0,0 +1,314 @@+{-# 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.PinpointSmsVoiceV2.AssociateOriginationIdentity+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Associates the specified origination identity with a pool.+--+-- If the origination identity is a phone number and is already associated+-- with another pool, an Error is returned. A sender ID can be associated+-- with multiple pools.+--+-- If the origination identity configuration doesn\'t match the pool\'s+-- configuration, an Error is returned.+module Amazonka.PinpointSmsVoiceV2.AssociateOriginationIdentity+ ( -- * Creating a Request+ AssociateOriginationIdentity (..),+ newAssociateOriginationIdentity,++ -- * Request Lenses+ associateOriginationIdentity_clientToken,+ associateOriginationIdentity_poolId,+ associateOriginationIdentity_originationIdentity,+ associateOriginationIdentity_isoCountryCode,++ -- * Destructuring the Response+ AssociateOriginationIdentityResponse (..),+ newAssociateOriginationIdentityResponse,++ -- * Response Lenses+ associateOriginationIdentityResponse_isoCountryCode,+ associateOriginationIdentityResponse_originationIdentity,+ associateOriginationIdentityResponse_originationIdentityArn,+ associateOriginationIdentityResponse_poolArn,+ associateOriginationIdentityResponse_poolId,+ associateOriginationIdentityResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newAssociateOriginationIdentity' smart constructor.+data AssociateOriginationIdentity = AssociateOriginationIdentity'+ { -- | Unique, case-sensitive identifier that you provide to ensure the+ -- idempotency of the request. If you don\'t specify a client token, a+ -- randomly generated token is used for the request to ensure idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | The pool to update with the new Identity. This value can be either the+ -- PoolId or PoolArn, and you can find these values using DescribePools.+ poolId :: Prelude.Text,+ -- | The origination identity to use, such as PhoneNumberId, PhoneNumberArn,+ -- SenderId, or SenderIdArn. You can use DescribePhoneNumbers to find the+ -- values for PhoneNumberId and PhoneNumberArn, while DescribeSenderIds can+ -- be used to get the values for SenderId and SenderIdArn.+ originationIdentity :: Prelude.Text,+ -- | The new two-character code, in ISO 3166-1 alpha-2 format, for the+ -- country or region of the origination identity.+ isoCountryCode :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AssociateOriginationIdentity' 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:+--+-- 'clientToken', 'associateOriginationIdentity_clientToken' - Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+--+-- 'poolId', 'associateOriginationIdentity_poolId' - The pool to update with the new Identity. This value can be either the+-- PoolId or PoolArn, and you can find these values using DescribePools.+--+-- 'originationIdentity', 'associateOriginationIdentity_originationIdentity' - The origination identity to use, such as PhoneNumberId, PhoneNumberArn,+-- SenderId, or SenderIdArn. You can use DescribePhoneNumbers to find the+-- values for PhoneNumberId and PhoneNumberArn, while DescribeSenderIds can+-- be used to get the values for SenderId and SenderIdArn.+--+-- 'isoCountryCode', 'associateOriginationIdentity_isoCountryCode' - The new two-character code, in ISO 3166-1 alpha-2 format, for the+-- country or region of the origination identity.+newAssociateOriginationIdentity ::+ -- | 'poolId'+ Prelude.Text ->+ -- | 'originationIdentity'+ Prelude.Text ->+ -- | 'isoCountryCode'+ Prelude.Text ->+ AssociateOriginationIdentity+newAssociateOriginationIdentity+ pPoolId_+ pOriginationIdentity_+ pIsoCountryCode_ =+ AssociateOriginationIdentity'+ { clientToken =+ Prelude.Nothing,+ poolId = pPoolId_,+ originationIdentity = pOriginationIdentity_,+ isoCountryCode = pIsoCountryCode_+ }++-- | Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+associateOriginationIdentity_clientToken :: Lens.Lens' AssociateOriginationIdentity (Prelude.Maybe Prelude.Text)+associateOriginationIdentity_clientToken = Lens.lens (\AssociateOriginationIdentity' {clientToken} -> clientToken) (\s@AssociateOriginationIdentity' {} a -> s {clientToken = a} :: AssociateOriginationIdentity)++-- | The pool to update with the new Identity. This value can be either the+-- PoolId or PoolArn, and you can find these values using DescribePools.+associateOriginationIdentity_poolId :: Lens.Lens' AssociateOriginationIdentity Prelude.Text+associateOriginationIdentity_poolId = Lens.lens (\AssociateOriginationIdentity' {poolId} -> poolId) (\s@AssociateOriginationIdentity' {} a -> s {poolId = a} :: AssociateOriginationIdentity)++-- | The origination identity to use, such as PhoneNumberId, PhoneNumberArn,+-- SenderId, or SenderIdArn. You can use DescribePhoneNumbers to find the+-- values for PhoneNumberId and PhoneNumberArn, while DescribeSenderIds can+-- be used to get the values for SenderId and SenderIdArn.+associateOriginationIdentity_originationIdentity :: Lens.Lens' AssociateOriginationIdentity Prelude.Text+associateOriginationIdentity_originationIdentity = Lens.lens (\AssociateOriginationIdentity' {originationIdentity} -> originationIdentity) (\s@AssociateOriginationIdentity' {} a -> s {originationIdentity = a} :: AssociateOriginationIdentity)++-- | The new two-character code, in ISO 3166-1 alpha-2 format, for the+-- country or region of the origination identity.+associateOriginationIdentity_isoCountryCode :: Lens.Lens' AssociateOriginationIdentity Prelude.Text+associateOriginationIdentity_isoCountryCode = Lens.lens (\AssociateOriginationIdentity' {isoCountryCode} -> isoCountryCode) (\s@AssociateOriginationIdentity' {} a -> s {isoCountryCode = a} :: AssociateOriginationIdentity)++instance Core.AWSRequest AssociateOriginationIdentity where+ type+ AWSResponse AssociateOriginationIdentity =+ AssociateOriginationIdentityResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ AssociateOriginationIdentityResponse'+ Prelude.<$> (x Data..?> "IsoCountryCode")+ Prelude.<*> (x Data..?> "OriginationIdentity")+ Prelude.<*> (x Data..?> "OriginationIdentityArn")+ Prelude.<*> (x Data..?> "PoolArn")+ Prelude.<*> (x Data..?> "PoolId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ AssociateOriginationIdentity+ where+ hashWithSalt _salt AssociateOriginationIdentity' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` poolId+ `Prelude.hashWithSalt` originationIdentity+ `Prelude.hashWithSalt` isoCountryCode++instance Prelude.NFData AssociateOriginationIdentity where+ rnf AssociateOriginationIdentity' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf isoCountryCode++instance Data.ToHeaders AssociateOriginationIdentity where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.AssociateOriginationIdentity" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON AssociateOriginationIdentity where+ toJSON AssociateOriginationIdentity' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ Prelude.Just ("PoolId" Data..= poolId),+ Prelude.Just+ ("OriginationIdentity" Data..= originationIdentity),+ Prelude.Just+ ("IsoCountryCode" Data..= isoCountryCode)+ ]+ )++instance Data.ToPath AssociateOriginationIdentity where+ toPath = Prelude.const "/"++instance Data.ToQuery AssociateOriginationIdentity where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newAssociateOriginationIdentityResponse' smart constructor.+data AssociateOriginationIdentityResponse = AssociateOriginationIdentityResponse'+ { -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+ -- region.+ isoCountryCode :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberId or SenderId of the origination identity.+ originationIdentity :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberArn or SenderIdArn of the origination identity.+ originationIdentityArn :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the pool that is now associated with+ -- the origination identity.+ poolArn :: Prelude.Maybe Prelude.Text,+ -- | The PoolId of the pool that is now associated with the origination+ -- identity.+ poolId :: 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 'AssociateOriginationIdentityResponse' 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:+--+-- 'isoCountryCode', 'associateOriginationIdentityResponse_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+--+-- 'originationIdentity', 'associateOriginationIdentityResponse_originationIdentity' - The PhoneNumberId or SenderId of the origination identity.+--+-- 'originationIdentityArn', 'associateOriginationIdentityResponse_originationIdentityArn' - The PhoneNumberArn or SenderIdArn of the origination identity.+--+-- 'poolArn', 'associateOriginationIdentityResponse_poolArn' - The Amazon Resource Name (ARN) of the pool that is now associated with+-- the origination identity.+--+-- 'poolId', 'associateOriginationIdentityResponse_poolId' - The PoolId of the pool that is now associated with the origination+-- identity.+--+-- 'httpStatus', 'associateOriginationIdentityResponse_httpStatus' - The response's http status code.+newAssociateOriginationIdentityResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ AssociateOriginationIdentityResponse+newAssociateOriginationIdentityResponse pHttpStatus_ =+ AssociateOriginationIdentityResponse'+ { isoCountryCode =+ Prelude.Nothing,+ originationIdentity = Prelude.Nothing,+ originationIdentityArn =+ Prelude.Nothing,+ poolArn = Prelude.Nothing,+ poolId = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+associateOriginationIdentityResponse_isoCountryCode :: Lens.Lens' AssociateOriginationIdentityResponse (Prelude.Maybe Prelude.Text)+associateOriginationIdentityResponse_isoCountryCode = Lens.lens (\AssociateOriginationIdentityResponse' {isoCountryCode} -> isoCountryCode) (\s@AssociateOriginationIdentityResponse' {} a -> s {isoCountryCode = a} :: AssociateOriginationIdentityResponse)++-- | The PhoneNumberId or SenderId of the origination identity.+associateOriginationIdentityResponse_originationIdentity :: Lens.Lens' AssociateOriginationIdentityResponse (Prelude.Maybe Prelude.Text)+associateOriginationIdentityResponse_originationIdentity = Lens.lens (\AssociateOriginationIdentityResponse' {originationIdentity} -> originationIdentity) (\s@AssociateOriginationIdentityResponse' {} a -> s {originationIdentity = a} :: AssociateOriginationIdentityResponse)++-- | The PhoneNumberArn or SenderIdArn of the origination identity.+associateOriginationIdentityResponse_originationIdentityArn :: Lens.Lens' AssociateOriginationIdentityResponse (Prelude.Maybe Prelude.Text)+associateOriginationIdentityResponse_originationIdentityArn = Lens.lens (\AssociateOriginationIdentityResponse' {originationIdentityArn} -> originationIdentityArn) (\s@AssociateOriginationIdentityResponse' {} a -> s {originationIdentityArn = a} :: AssociateOriginationIdentityResponse)++-- | The Amazon Resource Name (ARN) of the pool that is now associated with+-- the origination identity.+associateOriginationIdentityResponse_poolArn :: Lens.Lens' AssociateOriginationIdentityResponse (Prelude.Maybe Prelude.Text)+associateOriginationIdentityResponse_poolArn = Lens.lens (\AssociateOriginationIdentityResponse' {poolArn} -> poolArn) (\s@AssociateOriginationIdentityResponse' {} a -> s {poolArn = a} :: AssociateOriginationIdentityResponse)++-- | The PoolId of the pool that is now associated with the origination+-- identity.+associateOriginationIdentityResponse_poolId :: Lens.Lens' AssociateOriginationIdentityResponse (Prelude.Maybe Prelude.Text)+associateOriginationIdentityResponse_poolId = Lens.lens (\AssociateOriginationIdentityResponse' {poolId} -> poolId) (\s@AssociateOriginationIdentityResponse' {} a -> s {poolId = a} :: AssociateOriginationIdentityResponse)++-- | The response's http status code.+associateOriginationIdentityResponse_httpStatus :: Lens.Lens' AssociateOriginationIdentityResponse Prelude.Int+associateOriginationIdentityResponse_httpStatus = Lens.lens (\AssociateOriginationIdentityResponse' {httpStatus} -> httpStatus) (\s@AssociateOriginationIdentityResponse' {} a -> s {httpStatus = a} :: AssociateOriginationIdentityResponse)++instance+ Prelude.NFData+ AssociateOriginationIdentityResponse+ where+ rnf AssociateOriginationIdentityResponse' {..} =+ Prelude.rnf isoCountryCode+ `Prelude.seq` Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf originationIdentityArn+ `Prelude.seq` Prelude.rnf poolArn+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/CreateConfigurationSet.hs view
@@ -0,0 +1,264 @@+{-# 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.PinpointSmsVoiceV2.CreateConfigurationSet+-- 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 new configuration set. After you create the configuration set,+-- you can add one or more event destinations to it.+--+-- A configuration set is a set of rules that you apply to the SMS and+-- voice messages that you send.+--+-- When you send a message, you can optionally specify a single+-- configuration set.+module Amazonka.PinpointSmsVoiceV2.CreateConfigurationSet+ ( -- * Creating a Request+ CreateConfigurationSet (..),+ newCreateConfigurationSet,++ -- * Request Lenses+ createConfigurationSet_clientToken,+ createConfigurationSet_tags,+ createConfigurationSet_configurationSetName,++ -- * Destructuring the Response+ CreateConfigurationSetResponse (..),+ newCreateConfigurationSetResponse,++ -- * Response Lenses+ createConfigurationSetResponse_configurationSetArn,+ createConfigurationSetResponse_configurationSetName,+ createConfigurationSetResponse_createdTimestamp,+ createConfigurationSetResponse_tags,+ createConfigurationSetResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateConfigurationSet' smart constructor.+data CreateConfigurationSet = CreateConfigurationSet'+ { -- | Unique, case-sensitive identifier that you provide to ensure the+ -- idempotency of the request. If you don\'t specify a client token, a+ -- randomly generated token is used for the request to ensure idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | An array of key and value pair tags that\'s associated with the new+ -- configuration set.+ tags :: Prelude.Maybe [Tag],+ -- | The name to use for the new configuration set.+ configurationSetName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateConfigurationSet' 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:+--+-- 'clientToken', 'createConfigurationSet_clientToken' - Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+--+-- 'tags', 'createConfigurationSet_tags' - An array of key and value pair tags that\'s associated with the new+-- configuration set.+--+-- 'configurationSetName', 'createConfigurationSet_configurationSetName' - The name to use for the new configuration set.+newCreateConfigurationSet ::+ -- | 'configurationSetName'+ Prelude.Text ->+ CreateConfigurationSet+newCreateConfigurationSet pConfigurationSetName_ =+ CreateConfigurationSet'+ { clientToken =+ Prelude.Nothing,+ tags = Prelude.Nothing,+ configurationSetName = pConfigurationSetName_+ }++-- | Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+createConfigurationSet_clientToken :: Lens.Lens' CreateConfigurationSet (Prelude.Maybe Prelude.Text)+createConfigurationSet_clientToken = Lens.lens (\CreateConfigurationSet' {clientToken} -> clientToken) (\s@CreateConfigurationSet' {} a -> s {clientToken = a} :: CreateConfigurationSet)++-- | An array of key and value pair tags that\'s associated with the new+-- configuration set.+createConfigurationSet_tags :: Lens.Lens' CreateConfigurationSet (Prelude.Maybe [Tag])+createConfigurationSet_tags = Lens.lens (\CreateConfigurationSet' {tags} -> tags) (\s@CreateConfigurationSet' {} a -> s {tags = a} :: CreateConfigurationSet) Prelude.. Lens.mapping Lens.coerced++-- | The name to use for the new configuration set.+createConfigurationSet_configurationSetName :: Lens.Lens' CreateConfigurationSet Prelude.Text+createConfigurationSet_configurationSetName = Lens.lens (\CreateConfigurationSet' {configurationSetName} -> configurationSetName) (\s@CreateConfigurationSet' {} a -> s {configurationSetName = a} :: CreateConfigurationSet)++instance Core.AWSRequest CreateConfigurationSet where+ type+ AWSResponse CreateConfigurationSet =+ CreateConfigurationSetResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateConfigurationSetResponse'+ Prelude.<$> (x Data..?> "ConfigurationSetArn")+ Prelude.<*> (x Data..?> "ConfigurationSetName")+ Prelude.<*> (x Data..?> "CreatedTimestamp")+ Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateConfigurationSet where+ hashWithSalt _salt CreateConfigurationSet' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` configurationSetName++instance Prelude.NFData CreateConfigurationSet where+ rnf CreateConfigurationSet' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf configurationSetName++instance Data.ToHeaders CreateConfigurationSet where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.CreateConfigurationSet" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateConfigurationSet where+ toJSON CreateConfigurationSet' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ ("Tags" Data..=) Prelude.<$> tags,+ Prelude.Just+ ( "ConfigurationSetName"+ Data..= configurationSetName+ )+ ]+ )++instance Data.ToPath CreateConfigurationSet where+ toPath = Prelude.const "/"++instance Data.ToQuery CreateConfigurationSet where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateConfigurationSetResponse' smart constructor.+data CreateConfigurationSetResponse = CreateConfigurationSetResponse'+ { -- | The Amazon Resource Name (ARN) of the newly created configuration set.+ configurationSetArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the new configuration set.+ configurationSetName :: Prelude.Maybe Prelude.Text,+ -- | The time when the configuration set was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Prelude.Maybe Data.POSIX,+ -- | An array of key and value pair tags that\'s associated with the+ -- configuration set.+ tags :: Prelude.Maybe [Tag],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateConfigurationSetResponse' 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:+--+-- 'configurationSetArn', 'createConfigurationSetResponse_configurationSetArn' - The Amazon Resource Name (ARN) of the newly created configuration set.+--+-- 'configurationSetName', 'createConfigurationSetResponse_configurationSetName' - The name of the new configuration set.+--+-- 'createdTimestamp', 'createConfigurationSetResponse_createdTimestamp' - The time when the configuration set was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'tags', 'createConfigurationSetResponse_tags' - An array of key and value pair tags that\'s associated with the+-- configuration set.+--+-- 'httpStatus', 'createConfigurationSetResponse_httpStatus' - The response's http status code.+newCreateConfigurationSetResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateConfigurationSetResponse+newCreateConfigurationSetResponse pHttpStatus_ =+ CreateConfigurationSetResponse'+ { configurationSetArn =+ Prelude.Nothing,+ configurationSetName = Prelude.Nothing,+ createdTimestamp = Prelude.Nothing,+ tags = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the newly created configuration set.+createConfigurationSetResponse_configurationSetArn :: Lens.Lens' CreateConfigurationSetResponse (Prelude.Maybe Prelude.Text)+createConfigurationSetResponse_configurationSetArn = Lens.lens (\CreateConfigurationSetResponse' {configurationSetArn} -> configurationSetArn) (\s@CreateConfigurationSetResponse' {} a -> s {configurationSetArn = a} :: CreateConfigurationSetResponse)++-- | The name of the new configuration set.+createConfigurationSetResponse_configurationSetName :: Lens.Lens' CreateConfigurationSetResponse (Prelude.Maybe Prelude.Text)+createConfigurationSetResponse_configurationSetName = Lens.lens (\CreateConfigurationSetResponse' {configurationSetName} -> configurationSetName) (\s@CreateConfigurationSetResponse' {} a -> s {configurationSetName = a} :: CreateConfigurationSetResponse)++-- | The time when the configuration set was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+createConfigurationSetResponse_createdTimestamp :: Lens.Lens' CreateConfigurationSetResponse (Prelude.Maybe Prelude.UTCTime)+createConfigurationSetResponse_createdTimestamp = Lens.lens (\CreateConfigurationSetResponse' {createdTimestamp} -> createdTimestamp) (\s@CreateConfigurationSetResponse' {} a -> s {createdTimestamp = a} :: CreateConfigurationSetResponse) Prelude.. Lens.mapping Data._Time++-- | An array of key and value pair tags that\'s associated with the+-- configuration set.+createConfigurationSetResponse_tags :: Lens.Lens' CreateConfigurationSetResponse (Prelude.Maybe [Tag])+createConfigurationSetResponse_tags = Lens.lens (\CreateConfigurationSetResponse' {tags} -> tags) (\s@CreateConfigurationSetResponse' {} a -> s {tags = a} :: CreateConfigurationSetResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+createConfigurationSetResponse_httpStatus :: Lens.Lens' CreateConfigurationSetResponse Prelude.Int+createConfigurationSetResponse_httpStatus = Lens.lens (\CreateConfigurationSetResponse' {httpStatus} -> httpStatus) (\s@CreateConfigurationSetResponse' {} a -> s {httpStatus = a} :: CreateConfigurationSetResponse)++instance+ Prelude.NFData+ CreateConfigurationSetResponse+ where+ rnf CreateConfigurationSetResponse' {..} =+ Prelude.rnf configurationSetArn+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf createdTimestamp+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/CreateEventDestination.hs view
@@ -0,0 +1,331 @@+{-# 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.PinpointSmsVoiceV2.CreateEventDestination+-- 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 new event destination in a configuration set.+--+-- An event destination is a location where you send message events. The+-- event options are Amazon CloudWatch, Amazon Kinesis Data Firehose, or+-- Amazon SNS. For example, when a message is delivered successfully, you+-- can send information about that event to an event destination, or send+-- notifications to endpoints that are subscribed to an Amazon SNS topic.+--+-- Each configuration set can contain between 0 and 5 event destinations.+-- Each event destination can contain a reference to a single destination,+-- such as a CloudWatch or Kinesis Data Firehose destination.+module Amazonka.PinpointSmsVoiceV2.CreateEventDestination+ ( -- * Creating a Request+ CreateEventDestination (..),+ newCreateEventDestination,++ -- * Request Lenses+ createEventDestination_clientToken,+ createEventDestination_cloudWatchLogsDestination,+ createEventDestination_kinesisFirehoseDestination,+ createEventDestination_snsDestination,+ createEventDestination_configurationSetName,+ createEventDestination_eventDestinationName,+ createEventDestination_matchingEventTypes,++ -- * Destructuring the Response+ CreateEventDestinationResponse (..),+ newCreateEventDestinationResponse,++ -- * Response Lenses+ createEventDestinationResponse_configurationSetArn,+ createEventDestinationResponse_configurationSetName,+ createEventDestinationResponse_eventDestination,+ createEventDestinationResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateEventDestination' smart constructor.+data CreateEventDestination = CreateEventDestination'+ { -- | Unique, case-sensitive identifier that you provide to ensure the+ -- idempotency of the request. If you don\'t specify a client token, a+ -- randomly generated token is used for the request to ensure idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | An object that contains information about an event destination for+ -- logging to Amazon CloudWatch logs.+ cloudWatchLogsDestination :: Prelude.Maybe CloudWatchLogsDestination,+ -- | An object that contains information about an event destination for+ -- logging to Amazon Kinesis Data Firehose.+ kinesisFirehoseDestination :: Prelude.Maybe KinesisFirehoseDestination,+ -- | An object that contains information about an event destination for+ -- logging to Amazon SNS.+ snsDestination :: Prelude.Maybe SnsDestination,+ -- | Either the name of the configuration set or the configuration set ARN to+ -- apply event logging to. The ConfigurateSetName and ConfigurationSetArn+ -- can be found using the DescribeConfigurationSets action.+ configurationSetName :: Prelude.Text,+ -- | The name that identifies the event destination.+ eventDestinationName :: Prelude.Text,+ -- | An array of event types that determine which events to log. If \"ALL\"+ -- is used, then Amazon Pinpoint logs every event type.+ matchingEventTypes :: Prelude.NonEmpty EventType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateEventDestination' 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:+--+-- 'clientToken', 'createEventDestination_clientToken' - Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+--+-- 'cloudWatchLogsDestination', 'createEventDestination_cloudWatchLogsDestination' - An object that contains information about an event destination for+-- logging to Amazon CloudWatch logs.+--+-- 'kinesisFirehoseDestination', 'createEventDestination_kinesisFirehoseDestination' - An object that contains information about an event destination for+-- logging to Amazon Kinesis Data Firehose.+--+-- 'snsDestination', 'createEventDestination_snsDestination' - An object that contains information about an event destination for+-- logging to Amazon SNS.+--+-- 'configurationSetName', 'createEventDestination_configurationSetName' - Either the name of the configuration set or the configuration set ARN to+-- apply event logging to. The ConfigurateSetName and ConfigurationSetArn+-- can be found using the DescribeConfigurationSets action.+--+-- 'eventDestinationName', 'createEventDestination_eventDestinationName' - The name that identifies the event destination.+--+-- 'matchingEventTypes', 'createEventDestination_matchingEventTypes' - An array of event types that determine which events to log. If \"ALL\"+-- is used, then Amazon Pinpoint logs every event type.+newCreateEventDestination ::+ -- | 'configurationSetName'+ Prelude.Text ->+ -- | 'eventDestinationName'+ Prelude.Text ->+ -- | 'matchingEventTypes'+ Prelude.NonEmpty EventType ->+ CreateEventDestination+newCreateEventDestination+ pConfigurationSetName_+ pEventDestinationName_+ pMatchingEventTypes_ =+ CreateEventDestination'+ { clientToken =+ Prelude.Nothing,+ cloudWatchLogsDestination = Prelude.Nothing,+ kinesisFirehoseDestination = Prelude.Nothing,+ snsDestination = Prelude.Nothing,+ configurationSetName = pConfigurationSetName_,+ eventDestinationName = pEventDestinationName_,+ matchingEventTypes =+ Lens.coerced Lens.# pMatchingEventTypes_+ }++-- | Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+createEventDestination_clientToken :: Lens.Lens' CreateEventDestination (Prelude.Maybe Prelude.Text)+createEventDestination_clientToken = Lens.lens (\CreateEventDestination' {clientToken} -> clientToken) (\s@CreateEventDestination' {} a -> s {clientToken = a} :: CreateEventDestination)++-- | An object that contains information about an event destination for+-- logging to Amazon CloudWatch logs.+createEventDestination_cloudWatchLogsDestination :: Lens.Lens' CreateEventDestination (Prelude.Maybe CloudWatchLogsDestination)+createEventDestination_cloudWatchLogsDestination = Lens.lens (\CreateEventDestination' {cloudWatchLogsDestination} -> cloudWatchLogsDestination) (\s@CreateEventDestination' {} a -> s {cloudWatchLogsDestination = a} :: CreateEventDestination)++-- | An object that contains information about an event destination for+-- logging to Amazon Kinesis Data Firehose.+createEventDestination_kinesisFirehoseDestination :: Lens.Lens' CreateEventDestination (Prelude.Maybe KinesisFirehoseDestination)+createEventDestination_kinesisFirehoseDestination = Lens.lens (\CreateEventDestination' {kinesisFirehoseDestination} -> kinesisFirehoseDestination) (\s@CreateEventDestination' {} a -> s {kinesisFirehoseDestination = a} :: CreateEventDestination)++-- | An object that contains information about an event destination for+-- logging to Amazon SNS.+createEventDestination_snsDestination :: Lens.Lens' CreateEventDestination (Prelude.Maybe SnsDestination)+createEventDestination_snsDestination = Lens.lens (\CreateEventDestination' {snsDestination} -> snsDestination) (\s@CreateEventDestination' {} a -> s {snsDestination = a} :: CreateEventDestination)++-- | Either the name of the configuration set or the configuration set ARN to+-- apply event logging to. The ConfigurateSetName and ConfigurationSetArn+-- can be found using the DescribeConfigurationSets action.+createEventDestination_configurationSetName :: Lens.Lens' CreateEventDestination Prelude.Text+createEventDestination_configurationSetName = Lens.lens (\CreateEventDestination' {configurationSetName} -> configurationSetName) (\s@CreateEventDestination' {} a -> s {configurationSetName = a} :: CreateEventDestination)++-- | The name that identifies the event destination.+createEventDestination_eventDestinationName :: Lens.Lens' CreateEventDestination Prelude.Text+createEventDestination_eventDestinationName = Lens.lens (\CreateEventDestination' {eventDestinationName} -> eventDestinationName) (\s@CreateEventDestination' {} a -> s {eventDestinationName = a} :: CreateEventDestination)++-- | An array of event types that determine which events to log. If \"ALL\"+-- is used, then Amazon Pinpoint logs every event type.+createEventDestination_matchingEventTypes :: Lens.Lens' CreateEventDestination (Prelude.NonEmpty EventType)+createEventDestination_matchingEventTypes = Lens.lens (\CreateEventDestination' {matchingEventTypes} -> matchingEventTypes) (\s@CreateEventDestination' {} a -> s {matchingEventTypes = a} :: CreateEventDestination) Prelude.. Lens.coerced++instance Core.AWSRequest CreateEventDestination where+ type+ AWSResponse CreateEventDestination =+ CreateEventDestinationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateEventDestinationResponse'+ Prelude.<$> (x Data..?> "ConfigurationSetArn")+ Prelude.<*> (x Data..?> "ConfigurationSetName")+ Prelude.<*> (x Data..?> "EventDestination")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateEventDestination where+ hashWithSalt _salt CreateEventDestination' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` cloudWatchLogsDestination+ `Prelude.hashWithSalt` kinesisFirehoseDestination+ `Prelude.hashWithSalt` snsDestination+ `Prelude.hashWithSalt` configurationSetName+ `Prelude.hashWithSalt` eventDestinationName+ `Prelude.hashWithSalt` matchingEventTypes++instance Prelude.NFData CreateEventDestination where+ rnf CreateEventDestination' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf cloudWatchLogsDestination+ `Prelude.seq` Prelude.rnf kinesisFirehoseDestination+ `Prelude.seq` Prelude.rnf snsDestination+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf eventDestinationName+ `Prelude.seq` Prelude.rnf matchingEventTypes++instance Data.ToHeaders CreateEventDestination where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.CreateEventDestination" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateEventDestination where+ toJSON CreateEventDestination' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ ("CloudWatchLogsDestination" Data..=)+ Prelude.<$> cloudWatchLogsDestination,+ ("KinesisFirehoseDestination" Data..=)+ Prelude.<$> kinesisFirehoseDestination,+ ("SnsDestination" Data..=)+ Prelude.<$> snsDestination,+ Prelude.Just+ ( "ConfigurationSetName"+ Data..= configurationSetName+ ),+ Prelude.Just+ ( "EventDestinationName"+ Data..= eventDestinationName+ ),+ Prelude.Just+ ("MatchingEventTypes" Data..= matchingEventTypes)+ ]+ )++instance Data.ToPath CreateEventDestination where+ toPath = Prelude.const "/"++instance Data.ToQuery CreateEventDestination where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateEventDestinationResponse' smart constructor.+data CreateEventDestinationResponse = CreateEventDestinationResponse'+ { -- | The ARN of the configuration set.+ configurationSetArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the configuration set.+ configurationSetName :: Prelude.Maybe Prelude.Text,+ -- | The details of the destination where events are logged.+ eventDestination :: Prelude.Maybe EventDestination,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateEventDestinationResponse' 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:+--+-- 'configurationSetArn', 'createEventDestinationResponse_configurationSetArn' - The ARN of the configuration set.+--+-- 'configurationSetName', 'createEventDestinationResponse_configurationSetName' - The name of the configuration set.+--+-- 'eventDestination', 'createEventDestinationResponse_eventDestination' - The details of the destination where events are logged.+--+-- 'httpStatus', 'createEventDestinationResponse_httpStatus' - The response's http status code.+newCreateEventDestinationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateEventDestinationResponse+newCreateEventDestinationResponse pHttpStatus_ =+ CreateEventDestinationResponse'+ { configurationSetArn =+ Prelude.Nothing,+ configurationSetName = Prelude.Nothing,+ eventDestination = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The ARN of the configuration set.+createEventDestinationResponse_configurationSetArn :: Lens.Lens' CreateEventDestinationResponse (Prelude.Maybe Prelude.Text)+createEventDestinationResponse_configurationSetArn = Lens.lens (\CreateEventDestinationResponse' {configurationSetArn} -> configurationSetArn) (\s@CreateEventDestinationResponse' {} a -> s {configurationSetArn = a} :: CreateEventDestinationResponse)++-- | The name of the configuration set.+createEventDestinationResponse_configurationSetName :: Lens.Lens' CreateEventDestinationResponse (Prelude.Maybe Prelude.Text)+createEventDestinationResponse_configurationSetName = Lens.lens (\CreateEventDestinationResponse' {configurationSetName} -> configurationSetName) (\s@CreateEventDestinationResponse' {} a -> s {configurationSetName = a} :: CreateEventDestinationResponse)++-- | The details of the destination where events are logged.+createEventDestinationResponse_eventDestination :: Lens.Lens' CreateEventDestinationResponse (Prelude.Maybe EventDestination)+createEventDestinationResponse_eventDestination = Lens.lens (\CreateEventDestinationResponse' {eventDestination} -> eventDestination) (\s@CreateEventDestinationResponse' {} a -> s {eventDestination = a} :: CreateEventDestinationResponse)++-- | The response's http status code.+createEventDestinationResponse_httpStatus :: Lens.Lens' CreateEventDestinationResponse Prelude.Int+createEventDestinationResponse_httpStatus = Lens.lens (\CreateEventDestinationResponse' {httpStatus} -> httpStatus) (\s@CreateEventDestinationResponse' {} a -> s {httpStatus = a} :: CreateEventDestinationResponse)++instance+ Prelude.NFData+ CreateEventDestinationResponse+ where+ rnf CreateEventDestinationResponse' {..} =+ Prelude.rnf configurationSetArn+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf eventDestination+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/CreateOptOutList.hs view
@@ -0,0 +1,262 @@+{-# 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.PinpointSmsVoiceV2.CreateOptOutList+-- 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 new opt-out list.+--+-- If the opt-out list name already exists, an Error is returned.+--+-- An opt-out list is a list of phone numbers that are opted out, meaning+-- you can\'t send SMS or voice messages to them. If end user replies with+-- the keyword \"STOP,\" an entry for the phone number is added to the+-- opt-out list. In addition to STOP, your recipients can use any supported+-- opt-out keyword, such as CANCEL or OPTOUT. For a list of supported+-- opt-out keywords, see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-manage.html#channels-sms-manage-optout SMS opt out>+-- in the /Amazon Pinpoint User Guide/.+module Amazonka.PinpointSmsVoiceV2.CreateOptOutList+ ( -- * Creating a Request+ CreateOptOutList (..),+ newCreateOptOutList,++ -- * Request Lenses+ createOptOutList_clientToken,+ createOptOutList_tags,+ createOptOutList_optOutListName,++ -- * Destructuring the Response+ CreateOptOutListResponse (..),+ newCreateOptOutListResponse,++ -- * Response Lenses+ createOptOutListResponse_createdTimestamp,+ createOptOutListResponse_optOutListArn,+ createOptOutListResponse_optOutListName,+ createOptOutListResponse_tags,+ createOptOutListResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateOptOutList' smart constructor.+data CreateOptOutList = CreateOptOutList'+ { -- | Unique, case-sensitive identifier that you provide to ensure the+ -- idempotency of the request. If you don\'t specify a client token, a+ -- randomly generated token is used for the request to ensure idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | An array of tags (key and value pairs) to associate with the new+ -- OptOutList.+ tags :: Prelude.Maybe [Tag],+ -- | The name of the new OptOutList.+ optOutListName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateOptOutList' 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:+--+-- 'clientToken', 'createOptOutList_clientToken' - Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+--+-- 'tags', 'createOptOutList_tags' - An array of tags (key and value pairs) to associate with the new+-- OptOutList.+--+-- 'optOutListName', 'createOptOutList_optOutListName' - The name of the new OptOutList.+newCreateOptOutList ::+ -- | 'optOutListName'+ Prelude.Text ->+ CreateOptOutList+newCreateOptOutList pOptOutListName_ =+ CreateOptOutList'+ { clientToken = Prelude.Nothing,+ tags = Prelude.Nothing,+ optOutListName = pOptOutListName_+ }++-- | Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+createOptOutList_clientToken :: Lens.Lens' CreateOptOutList (Prelude.Maybe Prelude.Text)+createOptOutList_clientToken = Lens.lens (\CreateOptOutList' {clientToken} -> clientToken) (\s@CreateOptOutList' {} a -> s {clientToken = a} :: CreateOptOutList)++-- | An array of tags (key and value pairs) to associate with the new+-- OptOutList.+createOptOutList_tags :: Lens.Lens' CreateOptOutList (Prelude.Maybe [Tag])+createOptOutList_tags = Lens.lens (\CreateOptOutList' {tags} -> tags) (\s@CreateOptOutList' {} a -> s {tags = a} :: CreateOptOutList) Prelude.. Lens.mapping Lens.coerced++-- | The name of the new OptOutList.+createOptOutList_optOutListName :: Lens.Lens' CreateOptOutList Prelude.Text+createOptOutList_optOutListName = Lens.lens (\CreateOptOutList' {optOutListName} -> optOutListName) (\s@CreateOptOutList' {} a -> s {optOutListName = a} :: CreateOptOutList)++instance Core.AWSRequest CreateOptOutList where+ type+ AWSResponse CreateOptOutList =+ CreateOptOutListResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateOptOutListResponse'+ Prelude.<$> (x Data..?> "CreatedTimestamp")+ Prelude.<*> (x Data..?> "OptOutListArn")+ Prelude.<*> (x Data..?> "OptOutListName")+ Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateOptOutList where+ hashWithSalt _salt CreateOptOutList' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` optOutListName++instance Prelude.NFData CreateOptOutList where+ rnf CreateOptOutList' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf optOutListName++instance Data.ToHeaders CreateOptOutList where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.CreateOptOutList" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateOptOutList where+ toJSON CreateOptOutList' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ ("Tags" Data..=) Prelude.<$> tags,+ Prelude.Just+ ("OptOutListName" Data..= optOutListName)+ ]+ )++instance Data.ToPath CreateOptOutList where+ toPath = Prelude.const "/"++instance Data.ToQuery CreateOptOutList where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateOptOutListResponse' smart constructor.+data CreateOptOutListResponse = CreateOptOutListResponse'+ { -- | The time when the pool was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Prelude.Maybe Data.POSIX,+ -- | The Amazon Resource Name (ARN) for the OptOutList.+ optOutListArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the new OptOutList.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | An array of tags (key and value pairs) associated with the new+ -- OptOutList.+ tags :: Prelude.Maybe [Tag],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateOptOutListResponse' 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:+--+-- 'createdTimestamp', 'createOptOutListResponse_createdTimestamp' - The time when the pool was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'optOutListArn', 'createOptOutListResponse_optOutListArn' - The Amazon Resource Name (ARN) for the OptOutList.+--+-- 'optOutListName', 'createOptOutListResponse_optOutListName' - The name of the new OptOutList.+--+-- 'tags', 'createOptOutListResponse_tags' - An array of tags (key and value pairs) associated with the new+-- OptOutList.+--+-- 'httpStatus', 'createOptOutListResponse_httpStatus' - The response's http status code.+newCreateOptOutListResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateOptOutListResponse+newCreateOptOutListResponse pHttpStatus_ =+ CreateOptOutListResponse'+ { createdTimestamp =+ Prelude.Nothing,+ optOutListArn = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ tags = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The time when the pool was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+createOptOutListResponse_createdTimestamp :: Lens.Lens' CreateOptOutListResponse (Prelude.Maybe Prelude.UTCTime)+createOptOutListResponse_createdTimestamp = Lens.lens (\CreateOptOutListResponse' {createdTimestamp} -> createdTimestamp) (\s@CreateOptOutListResponse' {} a -> s {createdTimestamp = a} :: CreateOptOutListResponse) Prelude.. Lens.mapping Data._Time++-- | The Amazon Resource Name (ARN) for the OptOutList.+createOptOutListResponse_optOutListArn :: Lens.Lens' CreateOptOutListResponse (Prelude.Maybe Prelude.Text)+createOptOutListResponse_optOutListArn = Lens.lens (\CreateOptOutListResponse' {optOutListArn} -> optOutListArn) (\s@CreateOptOutListResponse' {} a -> s {optOutListArn = a} :: CreateOptOutListResponse)++-- | The name of the new OptOutList.+createOptOutListResponse_optOutListName :: Lens.Lens' CreateOptOutListResponse (Prelude.Maybe Prelude.Text)+createOptOutListResponse_optOutListName = Lens.lens (\CreateOptOutListResponse' {optOutListName} -> optOutListName) (\s@CreateOptOutListResponse' {} a -> s {optOutListName = a} :: CreateOptOutListResponse)++-- | An array of tags (key and value pairs) associated with the new+-- OptOutList.+createOptOutListResponse_tags :: Lens.Lens' CreateOptOutListResponse (Prelude.Maybe [Tag])+createOptOutListResponse_tags = Lens.lens (\CreateOptOutListResponse' {tags} -> tags) (\s@CreateOptOutListResponse' {} a -> s {tags = a} :: CreateOptOutListResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+createOptOutListResponse_httpStatus :: Lens.Lens' CreateOptOutListResponse Prelude.Int+createOptOutListResponse_httpStatus = Lens.lens (\CreateOptOutListResponse' {httpStatus} -> httpStatus) (\s@CreateOptOutListResponse' {} a -> s {httpStatus = a} :: CreateOptOutListResponse)++instance Prelude.NFData CreateOptOutListResponse where+ rnf CreateOptOutListResponse' {..} =+ Prelude.rnf createdTimestamp+ `Prelude.seq` Prelude.rnf optOutListArn+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/CreatePool.hs view
@@ -0,0 +1,462 @@+{-# 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.PinpointSmsVoiceV2.CreatePool+-- 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 new pool and associates the specified origination identity to+-- the pool. A pool can include one or more phone numbers and SenderIds+-- that are associated with your Amazon Web Services account.+--+-- The new pool inherits its configuration from the specified origination+-- identity. This includes keywords, message type, opt-out list, two-way+-- configuration, and self-managed opt-out configuration. Deletion+-- protection isn\'t inherited from the origination identity and defaults+-- to false.+--+-- If the origination identity is a phone number and is already associated+-- with another pool, an Error is returned. A sender ID can be associated+-- with multiple pools.+module Amazonka.PinpointSmsVoiceV2.CreatePool+ ( -- * Creating a Request+ CreatePool (..),+ newCreatePool,++ -- * Request Lenses+ createPool_clientToken,+ createPool_deletionProtectionEnabled,+ createPool_tags,+ createPool_originationIdentity,+ createPool_isoCountryCode,+ createPool_messageType,++ -- * Destructuring the Response+ CreatePoolResponse (..),+ newCreatePoolResponse,++ -- * Response Lenses+ createPoolResponse_createdTimestamp,+ createPoolResponse_deletionProtectionEnabled,+ createPoolResponse_messageType,+ createPoolResponse_optOutListName,+ createPoolResponse_poolArn,+ createPoolResponse_poolId,+ createPoolResponse_selfManagedOptOutsEnabled,+ createPoolResponse_sharedRoutesEnabled,+ createPoolResponse_status,+ createPoolResponse_tags,+ createPoolResponse_twoWayChannelArn,+ createPoolResponse_twoWayEnabled,+ createPoolResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreatePool' smart constructor.+data CreatePool = CreatePool'+ { -- | Unique, case-sensitive identifier that you provide to ensure the+ -- idempotency of the request. If you don\'t specify a client token, a+ -- randomly generated token is used for the request to ensure idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When set to true the pool can\'t be+ -- deleted. You can change this value using the UpdatePool action.+ deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,+ -- | An array of tags (key and value pairs) associated with the pool.+ tags :: Prelude.Maybe [Tag],+ -- | The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+ -- SenderId or SenderIdArn. You can use DescribePhoneNumbers to find the+ -- values for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can+ -- be used to get the values for SenderId and SenderIdArn.+ originationIdentity :: Prelude.Text,+ -- | The new two-character code, in ISO 3166-1 alpha-2 format, for the+ -- country or region of the new pool.+ isoCountryCode :: Prelude.Text,+ -- | The type of message. Valid values are TRANSACTIONAL for messages that+ -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+ -- critical or time-sensitive.+ messageType :: MessageType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreatePool' 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:+--+-- 'clientToken', 'createPool_clientToken' - Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+--+-- 'deletionProtectionEnabled', 'createPool_deletionProtectionEnabled' - By default this is set to false. When set to true the pool can\'t be+-- deleted. You can change this value using the UpdatePool action.+--+-- 'tags', 'createPool_tags' - An array of tags (key and value pairs) associated with the pool.+--+-- 'originationIdentity', 'createPool_originationIdentity' - The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+-- SenderId or SenderIdArn. You can use DescribePhoneNumbers to find the+-- values for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can+-- be used to get the values for SenderId and SenderIdArn.+--+-- 'isoCountryCode', 'createPool_isoCountryCode' - The new two-character code, in ISO 3166-1 alpha-2 format, for the+-- country or region of the new pool.+--+-- 'messageType', 'createPool_messageType' - The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+newCreatePool ::+ -- | 'originationIdentity'+ Prelude.Text ->+ -- | 'isoCountryCode'+ Prelude.Text ->+ -- | 'messageType'+ MessageType ->+ CreatePool+newCreatePool+ pOriginationIdentity_+ pIsoCountryCode_+ pMessageType_ =+ CreatePool'+ { clientToken = Prelude.Nothing,+ deletionProtectionEnabled = Prelude.Nothing,+ tags = Prelude.Nothing,+ originationIdentity = pOriginationIdentity_,+ isoCountryCode = pIsoCountryCode_,+ messageType = pMessageType_+ }++-- | Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+createPool_clientToken :: Lens.Lens' CreatePool (Prelude.Maybe Prelude.Text)+createPool_clientToken = Lens.lens (\CreatePool' {clientToken} -> clientToken) (\s@CreatePool' {} a -> s {clientToken = a} :: CreatePool)++-- | By default this is set to false. When set to true the pool can\'t be+-- deleted. You can change this value using the UpdatePool action.+createPool_deletionProtectionEnabled :: Lens.Lens' CreatePool (Prelude.Maybe Prelude.Bool)+createPool_deletionProtectionEnabled = Lens.lens (\CreatePool' {deletionProtectionEnabled} -> deletionProtectionEnabled) (\s@CreatePool' {} a -> s {deletionProtectionEnabled = a} :: CreatePool)++-- | An array of tags (key and value pairs) associated with the pool.+createPool_tags :: Lens.Lens' CreatePool (Prelude.Maybe [Tag])+createPool_tags = Lens.lens (\CreatePool' {tags} -> tags) (\s@CreatePool' {} a -> s {tags = a} :: CreatePool) Prelude.. Lens.mapping Lens.coerced++-- | The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+-- SenderId or SenderIdArn. You can use DescribePhoneNumbers to find the+-- values for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can+-- be used to get the values for SenderId and SenderIdArn.+createPool_originationIdentity :: Lens.Lens' CreatePool Prelude.Text+createPool_originationIdentity = Lens.lens (\CreatePool' {originationIdentity} -> originationIdentity) (\s@CreatePool' {} a -> s {originationIdentity = a} :: CreatePool)++-- | The new two-character code, in ISO 3166-1 alpha-2 format, for the+-- country or region of the new pool.+createPool_isoCountryCode :: Lens.Lens' CreatePool Prelude.Text+createPool_isoCountryCode = Lens.lens (\CreatePool' {isoCountryCode} -> isoCountryCode) (\s@CreatePool' {} a -> s {isoCountryCode = a} :: CreatePool)++-- | The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+createPool_messageType :: Lens.Lens' CreatePool MessageType+createPool_messageType = Lens.lens (\CreatePool' {messageType} -> messageType) (\s@CreatePool' {} a -> s {messageType = a} :: CreatePool)++instance Core.AWSRequest CreatePool where+ type AWSResponse CreatePool = CreatePoolResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreatePoolResponse'+ Prelude.<$> (x Data..?> "CreatedTimestamp")+ Prelude.<*> (x Data..?> "DeletionProtectionEnabled")+ Prelude.<*> (x Data..?> "MessageType")+ Prelude.<*> (x Data..?> "OptOutListName")+ Prelude.<*> (x Data..?> "PoolArn")+ Prelude.<*> (x Data..?> "PoolId")+ Prelude.<*> (x Data..?> "SelfManagedOptOutsEnabled")+ Prelude.<*> (x Data..?> "SharedRoutesEnabled")+ Prelude.<*> (x Data..?> "Status")+ Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "TwoWayChannelArn")+ Prelude.<*> (x Data..?> "TwoWayEnabled")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreatePool where+ hashWithSalt _salt CreatePool' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` deletionProtectionEnabled+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` originationIdentity+ `Prelude.hashWithSalt` isoCountryCode+ `Prelude.hashWithSalt` messageType++instance Prelude.NFData CreatePool where+ rnf CreatePool' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf deletionProtectionEnabled+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf isoCountryCode+ `Prelude.seq` Prelude.rnf messageType++instance Data.ToHeaders CreatePool where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.CreatePool" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreatePool where+ toJSON CreatePool' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ ("DeletionProtectionEnabled" Data..=)+ Prelude.<$> deletionProtectionEnabled,+ ("Tags" Data..=) Prelude.<$> tags,+ Prelude.Just+ ("OriginationIdentity" Data..= originationIdentity),+ Prelude.Just+ ("IsoCountryCode" Data..= isoCountryCode),+ Prelude.Just ("MessageType" Data..= messageType)+ ]+ )++instance Data.ToPath CreatePool where+ toPath = Prelude.const "/"++instance Data.ToQuery CreatePool where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreatePoolResponse' smart constructor.+data CreatePoolResponse = CreatePoolResponse'+ { -- | The time when the pool was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Prelude.Maybe Data.POSIX,+ -- | When set to true deletion protection is enabled. By default this is set+ -- to false.+ deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The type of message for the pool to use.+ messageType :: Prelude.Maybe MessageType,+ -- | The name of the OptOutList associated with the pool.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) for the pool.+ poolArn :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier for the pool.+ poolId :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When an end recipient sends a message+ -- that begins with HELP or STOP to one of your dedicated numbers, Amazon+ -- Pinpoint automatically replies with a customizable message and adds the+ -- end recipient to the OptOutList. When set to true you\'re responsible+ -- for responding to HELP and STOP requests. You\'re also responsible for+ -- tracking and honoring opt-out requests.+ selfManagedOptOutsEnabled :: Prelude.Maybe Prelude.Bool,+ -- | Indicates whether shared routes are enabled for the pool.+ sharedRoutesEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The current status of the pool.+ --+ -- - CREATING: The pool is currently being created and isn\'t yet+ -- available for use.+ --+ -- - ACTIVE: The pool is active and available for use.+ --+ -- - DELETING: The pool is being deleted.+ status :: Prelude.Maybe PoolStatus,+ -- | An array of tags (key and value pairs) associated with the pool.+ tags :: Prelude.Maybe [Tag],+ -- | The Amazon Resource Name (ARN) of the two way channel.+ twoWayChannelArn :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When set to true you can receive+ -- incoming text messages from your end recipients.+ twoWayEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreatePoolResponse' 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:+--+-- 'createdTimestamp', 'createPoolResponse_createdTimestamp' - The time when the pool was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'deletionProtectionEnabled', 'createPoolResponse_deletionProtectionEnabled' - When set to true deletion protection is enabled. By default this is set+-- to false.+--+-- 'messageType', 'createPoolResponse_messageType' - The type of message for the pool to use.+--+-- 'optOutListName', 'createPoolResponse_optOutListName' - The name of the OptOutList associated with the pool.+--+-- 'poolArn', 'createPoolResponse_poolArn' - The Amazon Resource Name (ARN) for the pool.+--+-- 'poolId', 'createPoolResponse_poolId' - The unique identifier for the pool.+--+-- 'selfManagedOptOutsEnabled', 'createPoolResponse_selfManagedOptOutsEnabled' - By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+--+-- 'sharedRoutesEnabled', 'createPoolResponse_sharedRoutesEnabled' - Indicates whether shared routes are enabled for the pool.+--+-- 'status', 'createPoolResponse_status' - The current status of the pool.+--+-- - CREATING: The pool is currently being created and isn\'t yet+-- available for use.+--+-- - ACTIVE: The pool is active and available for use.+--+-- - DELETING: The pool is being deleted.+--+-- 'tags', 'createPoolResponse_tags' - An array of tags (key and value pairs) associated with the pool.+--+-- 'twoWayChannelArn', 'createPoolResponse_twoWayChannelArn' - The Amazon Resource Name (ARN) of the two way channel.+--+-- 'twoWayEnabled', 'createPoolResponse_twoWayEnabled' - By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+--+-- 'httpStatus', 'createPoolResponse_httpStatus' - The response's http status code.+newCreatePoolResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreatePoolResponse+newCreatePoolResponse pHttpStatus_ =+ CreatePoolResponse'+ { createdTimestamp =+ Prelude.Nothing,+ deletionProtectionEnabled = Prelude.Nothing,+ messageType = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ poolArn = Prelude.Nothing,+ poolId = Prelude.Nothing,+ selfManagedOptOutsEnabled = Prelude.Nothing,+ sharedRoutesEnabled = Prelude.Nothing,+ status = Prelude.Nothing,+ tags = Prelude.Nothing,+ twoWayChannelArn = Prelude.Nothing,+ twoWayEnabled = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The time when the pool was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+createPoolResponse_createdTimestamp :: Lens.Lens' CreatePoolResponse (Prelude.Maybe Prelude.UTCTime)+createPoolResponse_createdTimestamp = Lens.lens (\CreatePoolResponse' {createdTimestamp} -> createdTimestamp) (\s@CreatePoolResponse' {} a -> s {createdTimestamp = a} :: CreatePoolResponse) Prelude.. Lens.mapping Data._Time++-- | When set to true deletion protection is enabled. By default this is set+-- to false.+createPoolResponse_deletionProtectionEnabled :: Lens.Lens' CreatePoolResponse (Prelude.Maybe Prelude.Bool)+createPoolResponse_deletionProtectionEnabled = Lens.lens (\CreatePoolResponse' {deletionProtectionEnabled} -> deletionProtectionEnabled) (\s@CreatePoolResponse' {} a -> s {deletionProtectionEnabled = a} :: CreatePoolResponse)++-- | The type of message for the pool to use.+createPoolResponse_messageType :: Lens.Lens' CreatePoolResponse (Prelude.Maybe MessageType)+createPoolResponse_messageType = Lens.lens (\CreatePoolResponse' {messageType} -> messageType) (\s@CreatePoolResponse' {} a -> s {messageType = a} :: CreatePoolResponse)++-- | The name of the OptOutList associated with the pool.+createPoolResponse_optOutListName :: Lens.Lens' CreatePoolResponse (Prelude.Maybe Prelude.Text)+createPoolResponse_optOutListName = Lens.lens (\CreatePoolResponse' {optOutListName} -> optOutListName) (\s@CreatePoolResponse' {} a -> s {optOutListName = a} :: CreatePoolResponse)++-- | The Amazon Resource Name (ARN) for the pool.+createPoolResponse_poolArn :: Lens.Lens' CreatePoolResponse (Prelude.Maybe Prelude.Text)+createPoolResponse_poolArn = Lens.lens (\CreatePoolResponse' {poolArn} -> poolArn) (\s@CreatePoolResponse' {} a -> s {poolArn = a} :: CreatePoolResponse)++-- | The unique identifier for the pool.+createPoolResponse_poolId :: Lens.Lens' CreatePoolResponse (Prelude.Maybe Prelude.Text)+createPoolResponse_poolId = Lens.lens (\CreatePoolResponse' {poolId} -> poolId) (\s@CreatePoolResponse' {} a -> s {poolId = a} :: CreatePoolResponse)++-- | By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+createPoolResponse_selfManagedOptOutsEnabled :: Lens.Lens' CreatePoolResponse (Prelude.Maybe Prelude.Bool)+createPoolResponse_selfManagedOptOutsEnabled = Lens.lens (\CreatePoolResponse' {selfManagedOptOutsEnabled} -> selfManagedOptOutsEnabled) (\s@CreatePoolResponse' {} a -> s {selfManagedOptOutsEnabled = a} :: CreatePoolResponse)++-- | Indicates whether shared routes are enabled for the pool.+createPoolResponse_sharedRoutesEnabled :: Lens.Lens' CreatePoolResponse (Prelude.Maybe Prelude.Bool)+createPoolResponse_sharedRoutesEnabled = Lens.lens (\CreatePoolResponse' {sharedRoutesEnabled} -> sharedRoutesEnabled) (\s@CreatePoolResponse' {} a -> s {sharedRoutesEnabled = a} :: CreatePoolResponse)++-- | The current status of the pool.+--+-- - CREATING: The pool is currently being created and isn\'t yet+-- available for use.+--+-- - ACTIVE: The pool is active and available for use.+--+-- - DELETING: The pool is being deleted.+createPoolResponse_status :: Lens.Lens' CreatePoolResponse (Prelude.Maybe PoolStatus)+createPoolResponse_status = Lens.lens (\CreatePoolResponse' {status} -> status) (\s@CreatePoolResponse' {} a -> s {status = a} :: CreatePoolResponse)++-- | An array of tags (key and value pairs) associated with the pool.+createPoolResponse_tags :: Lens.Lens' CreatePoolResponse (Prelude.Maybe [Tag])+createPoolResponse_tags = Lens.lens (\CreatePoolResponse' {tags} -> tags) (\s@CreatePoolResponse' {} a -> s {tags = a} :: CreatePoolResponse) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) of the two way channel.+createPoolResponse_twoWayChannelArn :: Lens.Lens' CreatePoolResponse (Prelude.Maybe Prelude.Text)+createPoolResponse_twoWayChannelArn = Lens.lens (\CreatePoolResponse' {twoWayChannelArn} -> twoWayChannelArn) (\s@CreatePoolResponse' {} a -> s {twoWayChannelArn = a} :: CreatePoolResponse)++-- | By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+createPoolResponse_twoWayEnabled :: Lens.Lens' CreatePoolResponse (Prelude.Maybe Prelude.Bool)+createPoolResponse_twoWayEnabled = Lens.lens (\CreatePoolResponse' {twoWayEnabled} -> twoWayEnabled) (\s@CreatePoolResponse' {} a -> s {twoWayEnabled = a} :: CreatePoolResponse)++-- | The response's http status code.+createPoolResponse_httpStatus :: Lens.Lens' CreatePoolResponse Prelude.Int+createPoolResponse_httpStatus = Lens.lens (\CreatePoolResponse' {httpStatus} -> httpStatus) (\s@CreatePoolResponse' {} a -> s {httpStatus = a} :: CreatePoolResponse)++instance Prelude.NFData CreatePoolResponse where+ rnf CreatePoolResponse' {..} =+ Prelude.rnf createdTimestamp+ `Prelude.seq` Prelude.rnf deletionProtectionEnabled+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf poolArn+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf selfManagedOptOutsEnabled+ `Prelude.seq` Prelude.rnf sharedRoutesEnabled+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf twoWayChannelArn+ `Prelude.seq` Prelude.rnf twoWayEnabled+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DeleteConfigurationSet.hs view
@@ -0,0 +1,259 @@+{-# 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.PinpointSmsVoiceV2.DeleteConfigurationSet+-- 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 an existing configuration set.+--+-- A configuration set is a set of rules that you apply to voice and SMS+-- messages that you send. In a configuration set, you can specify a+-- destination for specific types of events related to voice and SMS+-- messages.+module Amazonka.PinpointSmsVoiceV2.DeleteConfigurationSet+ ( -- * Creating a Request+ DeleteConfigurationSet (..),+ newDeleteConfigurationSet,++ -- * Request Lenses+ deleteConfigurationSet_configurationSetName,++ -- * Destructuring the Response+ DeleteConfigurationSetResponse (..),+ newDeleteConfigurationSetResponse,++ -- * Response Lenses+ deleteConfigurationSetResponse_configurationSetArn,+ deleteConfigurationSetResponse_configurationSetName,+ deleteConfigurationSetResponse_createdTimestamp,+ deleteConfigurationSetResponse_defaultMessageType,+ deleteConfigurationSetResponse_defaultSenderId,+ deleteConfigurationSetResponse_eventDestinations,+ deleteConfigurationSetResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteConfigurationSet' smart constructor.+data DeleteConfigurationSet = DeleteConfigurationSet'+ { -- | The name of the configuration set or the configuration set ARN that you+ -- want to delete. The ConfigurationSetName and ConfigurationSetArn can be+ -- found using the DescribeConfigurationSets action.+ configurationSetName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteConfigurationSet' 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:+--+-- 'configurationSetName', 'deleteConfigurationSet_configurationSetName' - The name of the configuration set or the configuration set ARN that you+-- want to delete. The ConfigurationSetName and ConfigurationSetArn can be+-- found using the DescribeConfigurationSets action.+newDeleteConfigurationSet ::+ -- | 'configurationSetName'+ Prelude.Text ->+ DeleteConfigurationSet+newDeleteConfigurationSet pConfigurationSetName_ =+ DeleteConfigurationSet'+ { configurationSetName =+ pConfigurationSetName_+ }++-- | The name of the configuration set or the configuration set ARN that you+-- want to delete. The ConfigurationSetName and ConfigurationSetArn can be+-- found using the DescribeConfigurationSets action.+deleteConfigurationSet_configurationSetName :: Lens.Lens' DeleteConfigurationSet Prelude.Text+deleteConfigurationSet_configurationSetName = Lens.lens (\DeleteConfigurationSet' {configurationSetName} -> configurationSetName) (\s@DeleteConfigurationSet' {} a -> s {configurationSetName = a} :: DeleteConfigurationSet)++instance Core.AWSRequest DeleteConfigurationSet where+ type+ AWSResponse DeleteConfigurationSet =+ DeleteConfigurationSetResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteConfigurationSetResponse'+ Prelude.<$> (x Data..?> "ConfigurationSetArn")+ Prelude.<*> (x Data..?> "ConfigurationSetName")+ Prelude.<*> (x Data..?> "CreatedTimestamp")+ Prelude.<*> (x Data..?> "DefaultMessageType")+ Prelude.<*> (x Data..?> "DefaultSenderId")+ Prelude.<*> ( x+ Data..?> "EventDestinations"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteConfigurationSet where+ hashWithSalt _salt DeleteConfigurationSet' {..} =+ _salt `Prelude.hashWithSalt` configurationSetName++instance Prelude.NFData DeleteConfigurationSet where+ rnf DeleteConfigurationSet' {..} =+ Prelude.rnf configurationSetName++instance Data.ToHeaders DeleteConfigurationSet where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DeleteConfigurationSet" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteConfigurationSet where+ toJSON DeleteConfigurationSet' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ( "ConfigurationSetName"+ Data..= configurationSetName+ )+ ]+ )++instance Data.ToPath DeleteConfigurationSet where+ toPath = Prelude.const "/"++instance Data.ToQuery DeleteConfigurationSet where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteConfigurationSetResponse' smart constructor.+data DeleteConfigurationSetResponse = DeleteConfigurationSetResponse'+ { -- | The Amazon Resource Name (ARN) of the deleted configuration set.+ configurationSetArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the deleted configuration set.+ configurationSetName :: Prelude.Maybe Prelude.Text,+ -- | The time that the deleted configuration set was created in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Prelude.Maybe Data.POSIX,+ -- | The default message type of the configuration set that was deleted.+ defaultMessageType :: Prelude.Maybe MessageType,+ -- | The default Sender ID of the configuration set that was deleted.+ defaultSenderId :: Prelude.Maybe Prelude.Text,+ -- | An array of any EventDestination objects that were associated with the+ -- deleted configuration set.+ eventDestinations :: Prelude.Maybe [EventDestination],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteConfigurationSetResponse' 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:+--+-- 'configurationSetArn', 'deleteConfigurationSetResponse_configurationSetArn' - The Amazon Resource Name (ARN) of the deleted configuration set.+--+-- 'configurationSetName', 'deleteConfigurationSetResponse_configurationSetName' - The name of the deleted configuration set.+--+-- 'createdTimestamp', 'deleteConfigurationSetResponse_createdTimestamp' - The time that the deleted configuration set was created in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'defaultMessageType', 'deleteConfigurationSetResponse_defaultMessageType' - The default message type of the configuration set that was deleted.+--+-- 'defaultSenderId', 'deleteConfigurationSetResponse_defaultSenderId' - The default Sender ID of the configuration set that was deleted.+--+-- 'eventDestinations', 'deleteConfigurationSetResponse_eventDestinations' - An array of any EventDestination objects that were associated with the+-- deleted configuration set.+--+-- 'httpStatus', 'deleteConfigurationSetResponse_httpStatus' - The response's http status code.+newDeleteConfigurationSetResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteConfigurationSetResponse+newDeleteConfigurationSetResponse pHttpStatus_ =+ DeleteConfigurationSetResponse'+ { configurationSetArn =+ Prelude.Nothing,+ configurationSetName = Prelude.Nothing,+ createdTimestamp = Prelude.Nothing,+ defaultMessageType = Prelude.Nothing,+ defaultSenderId = Prelude.Nothing,+ eventDestinations = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the deleted configuration set.+deleteConfigurationSetResponse_configurationSetArn :: Lens.Lens' DeleteConfigurationSetResponse (Prelude.Maybe Prelude.Text)+deleteConfigurationSetResponse_configurationSetArn = Lens.lens (\DeleteConfigurationSetResponse' {configurationSetArn} -> configurationSetArn) (\s@DeleteConfigurationSetResponse' {} a -> s {configurationSetArn = a} :: DeleteConfigurationSetResponse)++-- | The name of the deleted configuration set.+deleteConfigurationSetResponse_configurationSetName :: Lens.Lens' DeleteConfigurationSetResponse (Prelude.Maybe Prelude.Text)+deleteConfigurationSetResponse_configurationSetName = Lens.lens (\DeleteConfigurationSetResponse' {configurationSetName} -> configurationSetName) (\s@DeleteConfigurationSetResponse' {} a -> s {configurationSetName = a} :: DeleteConfigurationSetResponse)++-- | The time that the deleted configuration set was created in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+deleteConfigurationSetResponse_createdTimestamp :: Lens.Lens' DeleteConfigurationSetResponse (Prelude.Maybe Prelude.UTCTime)+deleteConfigurationSetResponse_createdTimestamp = Lens.lens (\DeleteConfigurationSetResponse' {createdTimestamp} -> createdTimestamp) (\s@DeleteConfigurationSetResponse' {} a -> s {createdTimestamp = a} :: DeleteConfigurationSetResponse) Prelude.. Lens.mapping Data._Time++-- | The default message type of the configuration set that was deleted.+deleteConfigurationSetResponse_defaultMessageType :: Lens.Lens' DeleteConfigurationSetResponse (Prelude.Maybe MessageType)+deleteConfigurationSetResponse_defaultMessageType = Lens.lens (\DeleteConfigurationSetResponse' {defaultMessageType} -> defaultMessageType) (\s@DeleteConfigurationSetResponse' {} a -> s {defaultMessageType = a} :: DeleteConfigurationSetResponse)++-- | The default Sender ID of the configuration set that was deleted.+deleteConfigurationSetResponse_defaultSenderId :: Lens.Lens' DeleteConfigurationSetResponse (Prelude.Maybe Prelude.Text)+deleteConfigurationSetResponse_defaultSenderId = Lens.lens (\DeleteConfigurationSetResponse' {defaultSenderId} -> defaultSenderId) (\s@DeleteConfigurationSetResponse' {} a -> s {defaultSenderId = a} :: DeleteConfigurationSetResponse)++-- | An array of any EventDestination objects that were associated with the+-- deleted configuration set.+deleteConfigurationSetResponse_eventDestinations :: Lens.Lens' DeleteConfigurationSetResponse (Prelude.Maybe [EventDestination])+deleteConfigurationSetResponse_eventDestinations = Lens.lens (\DeleteConfigurationSetResponse' {eventDestinations} -> eventDestinations) (\s@DeleteConfigurationSetResponse' {} a -> s {eventDestinations = a} :: DeleteConfigurationSetResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+deleteConfigurationSetResponse_httpStatus :: Lens.Lens' DeleteConfigurationSetResponse Prelude.Int+deleteConfigurationSetResponse_httpStatus = Lens.lens (\DeleteConfigurationSetResponse' {httpStatus} -> httpStatus) (\s@DeleteConfigurationSetResponse' {} a -> s {httpStatus = a} :: DeleteConfigurationSetResponse)++instance+ Prelude.NFData+ DeleteConfigurationSetResponse+ where+ rnf DeleteConfigurationSetResponse' {..} =+ Prelude.rnf configurationSetArn+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf createdTimestamp+ `Prelude.seq` Prelude.rnf defaultMessageType+ `Prelude.seq` Prelude.rnf defaultSenderId+ `Prelude.seq` Prelude.rnf eventDestinations+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DeleteDefaultMessageType.hs view
@@ -0,0 +1,219 @@+{-# 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.PinpointSmsVoiceV2.DeleteDefaultMessageType+-- 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 an existing default message type on a configuration set.+--+-- A message type is a type of messages that you plan to send. If you send+-- account-related messages or time-sensitive messages such as one-time+-- passcodes, choose __Transactional__. If you plan to send messages that+-- contain marketing material or other promotional content, choose+-- __Promotional__. This setting applies to your entire Amazon Web Services+-- account.+module Amazonka.PinpointSmsVoiceV2.DeleteDefaultMessageType+ ( -- * Creating a Request+ DeleteDefaultMessageType (..),+ newDeleteDefaultMessageType,++ -- * Request Lenses+ deleteDefaultMessageType_configurationSetName,++ -- * Destructuring the Response+ DeleteDefaultMessageTypeResponse (..),+ newDeleteDefaultMessageTypeResponse,++ -- * Response Lenses+ deleteDefaultMessageTypeResponse_configurationSetArn,+ deleteDefaultMessageTypeResponse_configurationSetName,+ deleteDefaultMessageTypeResponse_messageType,+ deleteDefaultMessageTypeResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteDefaultMessageType' smart constructor.+data DeleteDefaultMessageType = DeleteDefaultMessageType'+ { -- | The name of the configuration set or the configuration set Amazon+ -- Resource Name (ARN) to delete the default message type from. The+ -- ConfigurationSetName and ConfigurationSetArn can be found using the+ -- DescribeConfigurationSets action.+ configurationSetName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteDefaultMessageType' 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:+--+-- 'configurationSetName', 'deleteDefaultMessageType_configurationSetName' - The name of the configuration set or the configuration set Amazon+-- Resource Name (ARN) to delete the default message type from. The+-- ConfigurationSetName and ConfigurationSetArn can be found using the+-- DescribeConfigurationSets action.+newDeleteDefaultMessageType ::+ -- | 'configurationSetName'+ Prelude.Text ->+ DeleteDefaultMessageType+newDeleteDefaultMessageType pConfigurationSetName_ =+ DeleteDefaultMessageType'+ { configurationSetName =+ pConfigurationSetName_+ }++-- | The name of the configuration set or the configuration set Amazon+-- Resource Name (ARN) to delete the default message type from. The+-- ConfigurationSetName and ConfigurationSetArn can be found using the+-- DescribeConfigurationSets action.+deleteDefaultMessageType_configurationSetName :: Lens.Lens' DeleteDefaultMessageType Prelude.Text+deleteDefaultMessageType_configurationSetName = Lens.lens (\DeleteDefaultMessageType' {configurationSetName} -> configurationSetName) (\s@DeleteDefaultMessageType' {} a -> s {configurationSetName = a} :: DeleteDefaultMessageType)++instance Core.AWSRequest DeleteDefaultMessageType where+ type+ AWSResponse DeleteDefaultMessageType =+ DeleteDefaultMessageTypeResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteDefaultMessageTypeResponse'+ Prelude.<$> (x Data..?> "ConfigurationSetArn")+ Prelude.<*> (x Data..?> "ConfigurationSetName")+ Prelude.<*> (x Data..?> "MessageType")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteDefaultMessageType where+ hashWithSalt _salt DeleteDefaultMessageType' {..} =+ _salt `Prelude.hashWithSalt` configurationSetName++instance Prelude.NFData DeleteDefaultMessageType where+ rnf DeleteDefaultMessageType' {..} =+ Prelude.rnf configurationSetName++instance Data.ToHeaders DeleteDefaultMessageType where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DeleteDefaultMessageType" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteDefaultMessageType where+ toJSON DeleteDefaultMessageType' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ( "ConfigurationSetName"+ Data..= configurationSetName+ )+ ]+ )++instance Data.ToPath DeleteDefaultMessageType where+ toPath = Prelude.const "/"++instance Data.ToQuery DeleteDefaultMessageType where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteDefaultMessageTypeResponse' smart constructor.+data DeleteDefaultMessageTypeResponse = DeleteDefaultMessageTypeResponse'+ { -- | The Amazon Resource Name (ARN) of the configuration set.+ configurationSetArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the configuration set.+ configurationSetName :: Prelude.Maybe Prelude.Text,+ -- | The current message type for the configuration set.+ messageType :: Prelude.Maybe MessageType,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteDefaultMessageTypeResponse' 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:+--+-- 'configurationSetArn', 'deleteDefaultMessageTypeResponse_configurationSetArn' - The Amazon Resource Name (ARN) of the configuration set.+--+-- 'configurationSetName', 'deleteDefaultMessageTypeResponse_configurationSetName' - The name of the configuration set.+--+-- 'messageType', 'deleteDefaultMessageTypeResponse_messageType' - The current message type for the configuration set.+--+-- 'httpStatus', 'deleteDefaultMessageTypeResponse_httpStatus' - The response's http status code.+newDeleteDefaultMessageTypeResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteDefaultMessageTypeResponse+newDeleteDefaultMessageTypeResponse pHttpStatus_ =+ DeleteDefaultMessageTypeResponse'+ { configurationSetArn =+ Prelude.Nothing,+ configurationSetName = Prelude.Nothing,+ messageType = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the configuration set.+deleteDefaultMessageTypeResponse_configurationSetArn :: Lens.Lens' DeleteDefaultMessageTypeResponse (Prelude.Maybe Prelude.Text)+deleteDefaultMessageTypeResponse_configurationSetArn = Lens.lens (\DeleteDefaultMessageTypeResponse' {configurationSetArn} -> configurationSetArn) (\s@DeleteDefaultMessageTypeResponse' {} a -> s {configurationSetArn = a} :: DeleteDefaultMessageTypeResponse)++-- | The name of the configuration set.+deleteDefaultMessageTypeResponse_configurationSetName :: Lens.Lens' DeleteDefaultMessageTypeResponse (Prelude.Maybe Prelude.Text)+deleteDefaultMessageTypeResponse_configurationSetName = Lens.lens (\DeleteDefaultMessageTypeResponse' {configurationSetName} -> configurationSetName) (\s@DeleteDefaultMessageTypeResponse' {} a -> s {configurationSetName = a} :: DeleteDefaultMessageTypeResponse)++-- | The current message type for the configuration set.+deleteDefaultMessageTypeResponse_messageType :: Lens.Lens' DeleteDefaultMessageTypeResponse (Prelude.Maybe MessageType)+deleteDefaultMessageTypeResponse_messageType = Lens.lens (\DeleteDefaultMessageTypeResponse' {messageType} -> messageType) (\s@DeleteDefaultMessageTypeResponse' {} a -> s {messageType = a} :: DeleteDefaultMessageTypeResponse)++-- | The response's http status code.+deleteDefaultMessageTypeResponse_httpStatus :: Lens.Lens' DeleteDefaultMessageTypeResponse Prelude.Int+deleteDefaultMessageTypeResponse_httpStatus = Lens.lens (\DeleteDefaultMessageTypeResponse' {httpStatus} -> httpStatus) (\s@DeleteDefaultMessageTypeResponse' {} a -> s {httpStatus = a} :: DeleteDefaultMessageTypeResponse)++instance+ Prelude.NFData+ DeleteDefaultMessageTypeResponse+ where+ rnf DeleteDefaultMessageTypeResponse' {..} =+ Prelude.rnf configurationSetArn+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DeleteDefaultSenderId.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.PinpointSmsVoiceV2.DeleteDefaultSenderId+-- 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 an existing default sender ID on a configuration set.+--+-- A default sender ID is the identity that appears on recipients\' devices+-- when they receive SMS messages. Support for sender ID capabilities+-- varies by country or region.+module Amazonka.PinpointSmsVoiceV2.DeleteDefaultSenderId+ ( -- * Creating a Request+ DeleteDefaultSenderId (..),+ newDeleteDefaultSenderId,++ -- * Request Lenses+ deleteDefaultSenderId_configurationSetName,++ -- * Destructuring the Response+ DeleteDefaultSenderIdResponse (..),+ newDeleteDefaultSenderIdResponse,++ -- * Response Lenses+ deleteDefaultSenderIdResponse_configurationSetArn,+ deleteDefaultSenderIdResponse_configurationSetName,+ deleteDefaultSenderIdResponse_senderId,+ deleteDefaultSenderIdResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteDefaultSenderId' smart constructor.+data DeleteDefaultSenderId = DeleteDefaultSenderId'+ { -- | The name of the configuration set or the configuration set Amazon+ -- Resource Name (ARN) to delete the default sender ID from. The+ -- ConfigurationSetName and ConfigurationSetArn can be found using the+ -- DescribeConfigurationSets action.+ configurationSetName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteDefaultSenderId' 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:+--+-- 'configurationSetName', 'deleteDefaultSenderId_configurationSetName' - The name of the configuration set or the configuration set Amazon+-- Resource Name (ARN) to delete the default sender ID from. The+-- ConfigurationSetName and ConfigurationSetArn can be found using the+-- DescribeConfigurationSets action.+newDeleteDefaultSenderId ::+ -- | 'configurationSetName'+ Prelude.Text ->+ DeleteDefaultSenderId+newDeleteDefaultSenderId pConfigurationSetName_ =+ DeleteDefaultSenderId'+ { configurationSetName =+ pConfigurationSetName_+ }++-- | The name of the configuration set or the configuration set Amazon+-- Resource Name (ARN) to delete the default sender ID from. The+-- ConfigurationSetName and ConfigurationSetArn can be found using the+-- DescribeConfigurationSets action.+deleteDefaultSenderId_configurationSetName :: Lens.Lens' DeleteDefaultSenderId Prelude.Text+deleteDefaultSenderId_configurationSetName = Lens.lens (\DeleteDefaultSenderId' {configurationSetName} -> configurationSetName) (\s@DeleteDefaultSenderId' {} a -> s {configurationSetName = a} :: DeleteDefaultSenderId)++instance Core.AWSRequest DeleteDefaultSenderId where+ type+ AWSResponse DeleteDefaultSenderId =+ DeleteDefaultSenderIdResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteDefaultSenderIdResponse'+ Prelude.<$> (x Data..?> "ConfigurationSetArn")+ Prelude.<*> (x Data..?> "ConfigurationSetName")+ Prelude.<*> (x Data..?> "SenderId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteDefaultSenderId where+ hashWithSalt _salt DeleteDefaultSenderId' {..} =+ _salt `Prelude.hashWithSalt` configurationSetName++instance Prelude.NFData DeleteDefaultSenderId where+ rnf DeleteDefaultSenderId' {..} =+ Prelude.rnf configurationSetName++instance Data.ToHeaders DeleteDefaultSenderId where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DeleteDefaultSenderId" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteDefaultSenderId where+ toJSON DeleteDefaultSenderId' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ( "ConfigurationSetName"+ Data..= configurationSetName+ )+ ]+ )++instance Data.ToPath DeleteDefaultSenderId where+ toPath = Prelude.const "/"++instance Data.ToQuery DeleteDefaultSenderId where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteDefaultSenderIdResponse' smart constructor.+data DeleteDefaultSenderIdResponse = DeleteDefaultSenderIdResponse'+ { -- | The Amazon Resource Name (ARN) of the configuration set.+ configurationSetArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the configuration set.+ configurationSetName :: Prelude.Maybe Prelude.Text,+ -- | The current sender ID for the configuration set.+ senderId :: 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 'DeleteDefaultSenderIdResponse' 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:+--+-- 'configurationSetArn', 'deleteDefaultSenderIdResponse_configurationSetArn' - The Amazon Resource Name (ARN) of the configuration set.+--+-- 'configurationSetName', 'deleteDefaultSenderIdResponse_configurationSetName' - The name of the configuration set.+--+-- 'senderId', 'deleteDefaultSenderIdResponse_senderId' - The current sender ID for the configuration set.+--+-- 'httpStatus', 'deleteDefaultSenderIdResponse_httpStatus' - The response's http status code.+newDeleteDefaultSenderIdResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteDefaultSenderIdResponse+newDeleteDefaultSenderIdResponse pHttpStatus_ =+ DeleteDefaultSenderIdResponse'+ { configurationSetArn =+ Prelude.Nothing,+ configurationSetName = Prelude.Nothing,+ senderId = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the configuration set.+deleteDefaultSenderIdResponse_configurationSetArn :: Lens.Lens' DeleteDefaultSenderIdResponse (Prelude.Maybe Prelude.Text)+deleteDefaultSenderIdResponse_configurationSetArn = Lens.lens (\DeleteDefaultSenderIdResponse' {configurationSetArn} -> configurationSetArn) (\s@DeleteDefaultSenderIdResponse' {} a -> s {configurationSetArn = a} :: DeleteDefaultSenderIdResponse)++-- | The name of the configuration set.+deleteDefaultSenderIdResponse_configurationSetName :: Lens.Lens' DeleteDefaultSenderIdResponse (Prelude.Maybe Prelude.Text)+deleteDefaultSenderIdResponse_configurationSetName = Lens.lens (\DeleteDefaultSenderIdResponse' {configurationSetName} -> configurationSetName) (\s@DeleteDefaultSenderIdResponse' {} a -> s {configurationSetName = a} :: DeleteDefaultSenderIdResponse)++-- | The current sender ID for the configuration set.+deleteDefaultSenderIdResponse_senderId :: Lens.Lens' DeleteDefaultSenderIdResponse (Prelude.Maybe Prelude.Text)+deleteDefaultSenderIdResponse_senderId = Lens.lens (\DeleteDefaultSenderIdResponse' {senderId} -> senderId) (\s@DeleteDefaultSenderIdResponse' {} a -> s {senderId = a} :: DeleteDefaultSenderIdResponse)++-- | The response's http status code.+deleteDefaultSenderIdResponse_httpStatus :: Lens.Lens' DeleteDefaultSenderIdResponse Prelude.Int+deleteDefaultSenderIdResponse_httpStatus = Lens.lens (\DeleteDefaultSenderIdResponse' {httpStatus} -> httpStatus) (\s@DeleteDefaultSenderIdResponse' {} a -> s {httpStatus = a} :: DeleteDefaultSenderIdResponse)++instance Prelude.NFData DeleteDefaultSenderIdResponse where+ rnf DeleteDefaultSenderIdResponse' {..} =+ Prelude.rnf configurationSetArn+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf senderId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DeleteEventDestination.hs view
@@ -0,0 +1,242 @@+{-# 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.PinpointSmsVoiceV2.DeleteEventDestination+-- 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 an existing event destination.+--+-- An event destination is a location where you send response information+-- about the messages that you send. For example, when a message is+-- delivered successfully, you can send information about that event to an+-- Amazon CloudWatch destination, or send notifications to endpoints that+-- are subscribed to an Amazon SNS topic.+module Amazonka.PinpointSmsVoiceV2.DeleteEventDestination+ ( -- * Creating a Request+ DeleteEventDestination (..),+ newDeleteEventDestination,++ -- * Request Lenses+ deleteEventDestination_configurationSetName,+ deleteEventDestination_eventDestinationName,++ -- * Destructuring the Response+ DeleteEventDestinationResponse (..),+ newDeleteEventDestinationResponse,++ -- * Response Lenses+ deleteEventDestinationResponse_configurationSetArn,+ deleteEventDestinationResponse_configurationSetName,+ deleteEventDestinationResponse_eventDestination,+ deleteEventDestinationResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteEventDestination' smart constructor.+data DeleteEventDestination = DeleteEventDestination'+ { -- | The name of the configuration set or the configuration set\'s Amazon+ -- Resource Name (ARN) to remove the event destination from. The+ -- ConfigurateSetName and ConfigurationSetArn can be found using the+ -- DescribeConfigurationSets action.+ configurationSetName :: Prelude.Text,+ -- | The name of the event destination to delete.+ eventDestinationName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteEventDestination' 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:+--+-- 'configurationSetName', 'deleteEventDestination_configurationSetName' - The name of the configuration set or the configuration set\'s Amazon+-- Resource Name (ARN) to remove the event destination from. The+-- ConfigurateSetName and ConfigurationSetArn can be found using the+-- DescribeConfigurationSets action.+--+-- 'eventDestinationName', 'deleteEventDestination_eventDestinationName' - The name of the event destination to delete.+newDeleteEventDestination ::+ -- | 'configurationSetName'+ Prelude.Text ->+ -- | 'eventDestinationName'+ Prelude.Text ->+ DeleteEventDestination+newDeleteEventDestination+ pConfigurationSetName_+ pEventDestinationName_ =+ DeleteEventDestination'+ { configurationSetName =+ pConfigurationSetName_,+ eventDestinationName = pEventDestinationName_+ }++-- | The name of the configuration set or the configuration set\'s Amazon+-- Resource Name (ARN) to remove the event destination from. The+-- ConfigurateSetName and ConfigurationSetArn can be found using the+-- DescribeConfigurationSets action.+deleteEventDestination_configurationSetName :: Lens.Lens' DeleteEventDestination Prelude.Text+deleteEventDestination_configurationSetName = Lens.lens (\DeleteEventDestination' {configurationSetName} -> configurationSetName) (\s@DeleteEventDestination' {} a -> s {configurationSetName = a} :: DeleteEventDestination)++-- | The name of the event destination to delete.+deleteEventDestination_eventDestinationName :: Lens.Lens' DeleteEventDestination Prelude.Text+deleteEventDestination_eventDestinationName = Lens.lens (\DeleteEventDestination' {eventDestinationName} -> eventDestinationName) (\s@DeleteEventDestination' {} a -> s {eventDestinationName = a} :: DeleteEventDestination)++instance Core.AWSRequest DeleteEventDestination where+ type+ AWSResponse DeleteEventDestination =+ DeleteEventDestinationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteEventDestinationResponse'+ Prelude.<$> (x Data..?> "ConfigurationSetArn")+ Prelude.<*> (x Data..?> "ConfigurationSetName")+ Prelude.<*> (x Data..?> "EventDestination")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteEventDestination where+ hashWithSalt _salt DeleteEventDestination' {..} =+ _salt+ `Prelude.hashWithSalt` configurationSetName+ `Prelude.hashWithSalt` eventDestinationName++instance Prelude.NFData DeleteEventDestination where+ rnf DeleteEventDestination' {..} =+ Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf eventDestinationName++instance Data.ToHeaders DeleteEventDestination where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DeleteEventDestination" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteEventDestination where+ toJSON DeleteEventDestination' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ( "ConfigurationSetName"+ Data..= configurationSetName+ ),+ Prelude.Just+ ( "EventDestinationName"+ Data..= eventDestinationName+ )+ ]+ )++instance Data.ToPath DeleteEventDestination where+ toPath = Prelude.const "/"++instance Data.ToQuery DeleteEventDestination where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteEventDestinationResponse' smart constructor.+data DeleteEventDestinationResponse = DeleteEventDestinationResponse'+ { -- | The Amazon Resource Name (ARN) of the configuration set.+ configurationSetArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the configuration set the event destination was deleted+ -- from.+ configurationSetName :: Prelude.Maybe Prelude.Text,+ -- | The event destination object that was deleted.+ eventDestination :: Prelude.Maybe EventDestination,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteEventDestinationResponse' 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:+--+-- 'configurationSetArn', 'deleteEventDestinationResponse_configurationSetArn' - The Amazon Resource Name (ARN) of the configuration set.+--+-- 'configurationSetName', 'deleteEventDestinationResponse_configurationSetName' - The name of the configuration set the event destination was deleted+-- from.+--+-- 'eventDestination', 'deleteEventDestinationResponse_eventDestination' - The event destination object that was deleted.+--+-- 'httpStatus', 'deleteEventDestinationResponse_httpStatus' - The response's http status code.+newDeleteEventDestinationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteEventDestinationResponse+newDeleteEventDestinationResponse pHttpStatus_ =+ DeleteEventDestinationResponse'+ { configurationSetArn =+ Prelude.Nothing,+ configurationSetName = Prelude.Nothing,+ eventDestination = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the configuration set.+deleteEventDestinationResponse_configurationSetArn :: Lens.Lens' DeleteEventDestinationResponse (Prelude.Maybe Prelude.Text)+deleteEventDestinationResponse_configurationSetArn = Lens.lens (\DeleteEventDestinationResponse' {configurationSetArn} -> configurationSetArn) (\s@DeleteEventDestinationResponse' {} a -> s {configurationSetArn = a} :: DeleteEventDestinationResponse)++-- | The name of the configuration set the event destination was deleted+-- from.+deleteEventDestinationResponse_configurationSetName :: Lens.Lens' DeleteEventDestinationResponse (Prelude.Maybe Prelude.Text)+deleteEventDestinationResponse_configurationSetName = Lens.lens (\DeleteEventDestinationResponse' {configurationSetName} -> configurationSetName) (\s@DeleteEventDestinationResponse' {} a -> s {configurationSetName = a} :: DeleteEventDestinationResponse)++-- | The event destination object that was deleted.+deleteEventDestinationResponse_eventDestination :: Lens.Lens' DeleteEventDestinationResponse (Prelude.Maybe EventDestination)+deleteEventDestinationResponse_eventDestination = Lens.lens (\DeleteEventDestinationResponse' {eventDestination} -> eventDestination) (\s@DeleteEventDestinationResponse' {} a -> s {eventDestination = a} :: DeleteEventDestinationResponse)++-- | The response's http status code.+deleteEventDestinationResponse_httpStatus :: Lens.Lens' DeleteEventDestinationResponse Prelude.Int+deleteEventDestinationResponse_httpStatus = Lens.lens (\DeleteEventDestinationResponse' {httpStatus} -> httpStatus) (\s@DeleteEventDestinationResponse' {} a -> s {httpStatus = a} :: DeleteEventDestinationResponse)++instance+ Prelude.NFData+ DeleteEventDestinationResponse+ where+ rnf DeleteEventDestinationResponse' {..} =+ Prelude.rnf configurationSetArn+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf eventDestination+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DeleteKeyword.hs view
@@ -0,0 +1,254 @@+{-# 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.PinpointSmsVoiceV2.DeleteKeyword+-- 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 an existing keyword from an origination phone number or pool.+--+-- A keyword is a word that you can search for on a particular phone number+-- or pool. It is also a specific word or phrase that an end user can send+-- to your number to elicit a response, such as an informational message or+-- a special offer. When your number receives a message that begins with a+-- keyword, Amazon Pinpoint responds with a customizable message.+--+-- Keywords \"HELP\" and \"STOP\" can\'t be deleted or modified.+module Amazonka.PinpointSmsVoiceV2.DeleteKeyword+ ( -- * Creating a Request+ DeleteKeyword (..),+ newDeleteKeyword,++ -- * Request Lenses+ deleteKeyword_originationIdentity,+ deleteKeyword_keyword,++ -- * Destructuring the Response+ DeleteKeywordResponse (..),+ newDeleteKeywordResponse,++ -- * Response Lenses+ deleteKeywordResponse_keyword,+ deleteKeywordResponse_keywordAction,+ deleteKeywordResponse_keywordMessage,+ deleteKeywordResponse_originationIdentity,+ deleteKeywordResponse_originationIdentityArn,+ deleteKeywordResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteKeyword' smart constructor.+data DeleteKeyword = DeleteKeyword'+ { -- | The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+ -- PoolId or PoolArn. You can use DescribePhoneNumbers to find the values+ -- for PhoneNumberId and PhoneNumberArn and DescribePools to find the+ -- values of PoolId and PoolArn.+ originationIdentity :: Prelude.Text,+ -- | The keyword to delete.+ keyword :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteKeyword' 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:+--+-- 'originationIdentity', 'deleteKeyword_originationIdentity' - The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+-- PoolId or PoolArn. You can use DescribePhoneNumbers to find the values+-- for PhoneNumberId and PhoneNumberArn and DescribePools to find the+-- values of PoolId and PoolArn.+--+-- 'keyword', 'deleteKeyword_keyword' - The keyword to delete.+newDeleteKeyword ::+ -- | 'originationIdentity'+ Prelude.Text ->+ -- | 'keyword'+ Prelude.Text ->+ DeleteKeyword+newDeleteKeyword pOriginationIdentity_ pKeyword_ =+ DeleteKeyword'+ { originationIdentity =+ pOriginationIdentity_,+ keyword = pKeyword_+ }++-- | The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+-- PoolId or PoolArn. You can use DescribePhoneNumbers to find the values+-- for PhoneNumberId and PhoneNumberArn and DescribePools to find the+-- values of PoolId and PoolArn.+deleteKeyword_originationIdentity :: Lens.Lens' DeleteKeyword Prelude.Text+deleteKeyword_originationIdentity = Lens.lens (\DeleteKeyword' {originationIdentity} -> originationIdentity) (\s@DeleteKeyword' {} a -> s {originationIdentity = a} :: DeleteKeyword)++-- | The keyword to delete.+deleteKeyword_keyword :: Lens.Lens' DeleteKeyword Prelude.Text+deleteKeyword_keyword = Lens.lens (\DeleteKeyword' {keyword} -> keyword) (\s@DeleteKeyword' {} a -> s {keyword = a} :: DeleteKeyword)++instance Core.AWSRequest DeleteKeyword where+ type+ AWSResponse DeleteKeyword =+ DeleteKeywordResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteKeywordResponse'+ Prelude.<$> (x Data..?> "Keyword")+ Prelude.<*> (x Data..?> "KeywordAction")+ Prelude.<*> (x Data..?> "KeywordMessage")+ Prelude.<*> (x Data..?> "OriginationIdentity")+ Prelude.<*> (x Data..?> "OriginationIdentityArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteKeyword where+ hashWithSalt _salt DeleteKeyword' {..} =+ _salt+ `Prelude.hashWithSalt` originationIdentity+ `Prelude.hashWithSalt` keyword++instance Prelude.NFData DeleteKeyword where+ rnf DeleteKeyword' {..} =+ Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf keyword++instance Data.ToHeaders DeleteKeyword where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DeleteKeyword" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteKeyword where+ toJSON DeleteKeyword' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("OriginationIdentity" Data..= originationIdentity),+ Prelude.Just ("Keyword" Data..= keyword)+ ]+ )++instance Data.ToPath DeleteKeyword where+ toPath = Prelude.const "/"++instance Data.ToQuery DeleteKeyword where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteKeywordResponse' smart constructor.+data DeleteKeywordResponse = DeleteKeywordResponse'+ { -- | The keyword that was deleted.+ keyword :: Prelude.Maybe Prelude.Text,+ -- | The action that was associated with the deleted keyword.+ keywordAction :: Prelude.Maybe KeywordAction,+ -- | The message that was associated with the deleted keyword.+ keywordMessage :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberId or PoolId that the keyword was associated with.+ originationIdentity :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberArn or PoolArn that the keyword was associated with.+ originationIdentityArn :: 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 'DeleteKeywordResponse' 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:+--+-- 'keyword', 'deleteKeywordResponse_keyword' - The keyword that was deleted.+--+-- 'keywordAction', 'deleteKeywordResponse_keywordAction' - The action that was associated with the deleted keyword.+--+-- 'keywordMessage', 'deleteKeywordResponse_keywordMessage' - The message that was associated with the deleted keyword.+--+-- 'originationIdentity', 'deleteKeywordResponse_originationIdentity' - The PhoneNumberId or PoolId that the keyword was associated with.+--+-- 'originationIdentityArn', 'deleteKeywordResponse_originationIdentityArn' - The PhoneNumberArn or PoolArn that the keyword was associated with.+--+-- 'httpStatus', 'deleteKeywordResponse_httpStatus' - The response's http status code.+newDeleteKeywordResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteKeywordResponse+newDeleteKeywordResponse pHttpStatus_ =+ DeleteKeywordResponse'+ { keyword = Prelude.Nothing,+ keywordAction = Prelude.Nothing,+ keywordMessage = Prelude.Nothing,+ originationIdentity = Prelude.Nothing,+ originationIdentityArn = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The keyword that was deleted.+deleteKeywordResponse_keyword :: Lens.Lens' DeleteKeywordResponse (Prelude.Maybe Prelude.Text)+deleteKeywordResponse_keyword = Lens.lens (\DeleteKeywordResponse' {keyword} -> keyword) (\s@DeleteKeywordResponse' {} a -> s {keyword = a} :: DeleteKeywordResponse)++-- | The action that was associated with the deleted keyword.+deleteKeywordResponse_keywordAction :: Lens.Lens' DeleteKeywordResponse (Prelude.Maybe KeywordAction)+deleteKeywordResponse_keywordAction = Lens.lens (\DeleteKeywordResponse' {keywordAction} -> keywordAction) (\s@DeleteKeywordResponse' {} a -> s {keywordAction = a} :: DeleteKeywordResponse)++-- | The message that was associated with the deleted keyword.+deleteKeywordResponse_keywordMessage :: Lens.Lens' DeleteKeywordResponse (Prelude.Maybe Prelude.Text)+deleteKeywordResponse_keywordMessage = Lens.lens (\DeleteKeywordResponse' {keywordMessage} -> keywordMessage) (\s@DeleteKeywordResponse' {} a -> s {keywordMessage = a} :: DeleteKeywordResponse)++-- | The PhoneNumberId or PoolId that the keyword was associated with.+deleteKeywordResponse_originationIdentity :: Lens.Lens' DeleteKeywordResponse (Prelude.Maybe Prelude.Text)+deleteKeywordResponse_originationIdentity = Lens.lens (\DeleteKeywordResponse' {originationIdentity} -> originationIdentity) (\s@DeleteKeywordResponse' {} a -> s {originationIdentity = a} :: DeleteKeywordResponse)++-- | The PhoneNumberArn or PoolArn that the keyword was associated with.+deleteKeywordResponse_originationIdentityArn :: Lens.Lens' DeleteKeywordResponse (Prelude.Maybe Prelude.Text)+deleteKeywordResponse_originationIdentityArn = Lens.lens (\DeleteKeywordResponse' {originationIdentityArn} -> originationIdentityArn) (\s@DeleteKeywordResponse' {} a -> s {originationIdentityArn = a} :: DeleteKeywordResponse)++-- | The response's http status code.+deleteKeywordResponse_httpStatus :: Lens.Lens' DeleteKeywordResponse Prelude.Int+deleteKeywordResponse_httpStatus = Lens.lens (\DeleteKeywordResponse' {httpStatus} -> httpStatus) (\s@DeleteKeywordResponse' {} a -> s {httpStatus = a} :: DeleteKeywordResponse)++instance Prelude.NFData DeleteKeywordResponse where+ rnf DeleteKeywordResponse' {..} =+ Prelude.rnf keyword+ `Prelude.seq` Prelude.rnf keywordAction+ `Prelude.seq` Prelude.rnf keywordMessage+ `Prelude.seq` Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf originationIdentityArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DeleteOptOutList.hs view
@@ -0,0 +1,211 @@+{-# 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.PinpointSmsVoiceV2.DeleteOptOutList+-- 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 an existing opt-out list. All opted out phone numbers in the+-- opt-out list are deleted.+--+-- If the specified opt-out list name doesn\'t exist or is in-use by an+-- origination phone number or pool, an Error is returned.+module Amazonka.PinpointSmsVoiceV2.DeleteOptOutList+ ( -- * Creating a Request+ DeleteOptOutList (..),+ newDeleteOptOutList,++ -- * Request Lenses+ deleteOptOutList_optOutListName,++ -- * Destructuring the Response+ DeleteOptOutListResponse (..),+ newDeleteOptOutListResponse,++ -- * Response Lenses+ deleteOptOutListResponse_createdTimestamp,+ deleteOptOutListResponse_optOutListArn,+ deleteOptOutListResponse_optOutListName,+ deleteOptOutListResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteOptOutList' smart constructor.+data DeleteOptOutList = DeleteOptOutList'+ { -- | The OptOutListName or OptOutListArn of the OptOutList to delete. You can+ -- use DescribeOptOutLists to find the values for OptOutListName and+ -- OptOutListArn.+ optOutListName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteOptOutList' 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:+--+-- 'optOutListName', 'deleteOptOutList_optOutListName' - The OptOutListName or OptOutListArn of the OptOutList to delete. You can+-- use DescribeOptOutLists to find the values for OptOutListName and+-- OptOutListArn.+newDeleteOptOutList ::+ -- | 'optOutListName'+ Prelude.Text ->+ DeleteOptOutList+newDeleteOptOutList pOptOutListName_ =+ DeleteOptOutList'+ { optOutListName =+ pOptOutListName_+ }++-- | The OptOutListName or OptOutListArn of the OptOutList to delete. You can+-- use DescribeOptOutLists to find the values for OptOutListName and+-- OptOutListArn.+deleteOptOutList_optOutListName :: Lens.Lens' DeleteOptOutList Prelude.Text+deleteOptOutList_optOutListName = Lens.lens (\DeleteOptOutList' {optOutListName} -> optOutListName) (\s@DeleteOptOutList' {} a -> s {optOutListName = a} :: DeleteOptOutList)++instance Core.AWSRequest DeleteOptOutList where+ type+ AWSResponse DeleteOptOutList =+ DeleteOptOutListResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteOptOutListResponse'+ Prelude.<$> (x Data..?> "CreatedTimestamp")+ Prelude.<*> (x Data..?> "OptOutListArn")+ Prelude.<*> (x Data..?> "OptOutListName")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteOptOutList where+ hashWithSalt _salt DeleteOptOutList' {..} =+ _salt `Prelude.hashWithSalt` optOutListName++instance Prelude.NFData DeleteOptOutList where+ rnf DeleteOptOutList' {..} =+ Prelude.rnf optOutListName++instance Data.ToHeaders DeleteOptOutList where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DeleteOptOutList" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteOptOutList where+ toJSON DeleteOptOutList' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("OptOutListName" Data..= optOutListName)+ ]+ )++instance Data.ToPath DeleteOptOutList where+ toPath = Prelude.const "/"++instance Data.ToQuery DeleteOptOutList where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteOptOutListResponse' smart constructor.+data DeleteOptOutListResponse = DeleteOptOutListResponse'+ { -- | The time when the OptOutList was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Prelude.Maybe Data.POSIX,+ -- | The Amazon Resource Name (ARN) of the OptOutList that was removed.+ optOutListArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the OptOutList that was removed.+ optOutListName :: 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 'DeleteOptOutListResponse' 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:+--+-- 'createdTimestamp', 'deleteOptOutListResponse_createdTimestamp' - The time when the OptOutList was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'optOutListArn', 'deleteOptOutListResponse_optOutListArn' - The Amazon Resource Name (ARN) of the OptOutList that was removed.+--+-- 'optOutListName', 'deleteOptOutListResponse_optOutListName' - The name of the OptOutList that was removed.+--+-- 'httpStatus', 'deleteOptOutListResponse_httpStatus' - The response's http status code.+newDeleteOptOutListResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteOptOutListResponse+newDeleteOptOutListResponse pHttpStatus_ =+ DeleteOptOutListResponse'+ { createdTimestamp =+ Prelude.Nothing,+ optOutListArn = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The time when the OptOutList was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+deleteOptOutListResponse_createdTimestamp :: Lens.Lens' DeleteOptOutListResponse (Prelude.Maybe Prelude.UTCTime)+deleteOptOutListResponse_createdTimestamp = Lens.lens (\DeleteOptOutListResponse' {createdTimestamp} -> createdTimestamp) (\s@DeleteOptOutListResponse' {} a -> s {createdTimestamp = a} :: DeleteOptOutListResponse) Prelude.. Lens.mapping Data._Time++-- | The Amazon Resource Name (ARN) of the OptOutList that was removed.+deleteOptOutListResponse_optOutListArn :: Lens.Lens' DeleteOptOutListResponse (Prelude.Maybe Prelude.Text)+deleteOptOutListResponse_optOutListArn = Lens.lens (\DeleteOptOutListResponse' {optOutListArn} -> optOutListArn) (\s@DeleteOptOutListResponse' {} a -> s {optOutListArn = a} :: DeleteOptOutListResponse)++-- | The name of the OptOutList that was removed.+deleteOptOutListResponse_optOutListName :: Lens.Lens' DeleteOptOutListResponse (Prelude.Maybe Prelude.Text)+deleteOptOutListResponse_optOutListName = Lens.lens (\DeleteOptOutListResponse' {optOutListName} -> optOutListName) (\s@DeleteOptOutListResponse' {} a -> s {optOutListName = a} :: DeleteOptOutListResponse)++-- | The response's http status code.+deleteOptOutListResponse_httpStatus :: Lens.Lens' DeleteOptOutListResponse Prelude.Int+deleteOptOutListResponse_httpStatus = Lens.lens (\DeleteOptOutListResponse' {httpStatus} -> httpStatus) (\s@DeleteOptOutListResponse' {} a -> s {httpStatus = a} :: DeleteOptOutListResponse)++instance Prelude.NFData DeleteOptOutListResponse where+ rnf DeleteOptOutListResponse' {..} =+ Prelude.rnf createdTimestamp+ `Prelude.seq` Prelude.rnf optOutListArn+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DeleteOptedOutNumber.hs view
@@ -0,0 +1,253 @@+{-# 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.PinpointSmsVoiceV2.DeleteOptedOutNumber+-- 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 an existing opted out destination phone number from the+-- specified opt-out list.+--+-- Each destination phone number can only be deleted once every 30 days.+--+-- If the specified destination phone number doesn\'t exist or if the+-- opt-out list doesn\'t exist, an Error is returned.+module Amazonka.PinpointSmsVoiceV2.DeleteOptedOutNumber+ ( -- * Creating a Request+ DeleteOptedOutNumber (..),+ newDeleteOptedOutNumber,++ -- * Request Lenses+ deleteOptedOutNumber_optOutListName,+ deleteOptedOutNumber_optedOutNumber,++ -- * Destructuring the Response+ DeleteOptedOutNumberResponse (..),+ newDeleteOptedOutNumberResponse,++ -- * Response Lenses+ deleteOptedOutNumberResponse_endUserOptedOut,+ deleteOptedOutNumberResponse_optOutListArn,+ deleteOptedOutNumberResponse_optOutListName,+ deleteOptedOutNumberResponse_optedOutNumber,+ deleteOptedOutNumberResponse_optedOutTimestamp,+ deleteOptedOutNumberResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteOptedOutNumber' smart constructor.+data DeleteOptedOutNumber = DeleteOptedOutNumber'+ { -- | The OptOutListName or OptOutListArn to remove the phone number from.+ optOutListName :: Prelude.Text,+ -- | The phone number, in E.164 format, to remove from the OptOutList.+ optedOutNumber :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteOptedOutNumber' 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:+--+-- 'optOutListName', 'deleteOptedOutNumber_optOutListName' - The OptOutListName or OptOutListArn to remove the phone number from.+--+-- 'optedOutNumber', 'deleteOptedOutNumber_optedOutNumber' - The phone number, in E.164 format, to remove from the OptOutList.+newDeleteOptedOutNumber ::+ -- | 'optOutListName'+ Prelude.Text ->+ -- | 'optedOutNumber'+ Prelude.Text ->+ DeleteOptedOutNumber+newDeleteOptedOutNumber+ pOptOutListName_+ pOptedOutNumber_ =+ DeleteOptedOutNumber'+ { optOutListName =+ pOptOutListName_,+ optedOutNumber = pOptedOutNumber_+ }++-- | The OptOutListName or OptOutListArn to remove the phone number from.+deleteOptedOutNumber_optOutListName :: Lens.Lens' DeleteOptedOutNumber Prelude.Text+deleteOptedOutNumber_optOutListName = Lens.lens (\DeleteOptedOutNumber' {optOutListName} -> optOutListName) (\s@DeleteOptedOutNumber' {} a -> s {optOutListName = a} :: DeleteOptedOutNumber)++-- | The phone number, in E.164 format, to remove from the OptOutList.+deleteOptedOutNumber_optedOutNumber :: Lens.Lens' DeleteOptedOutNumber Prelude.Text+deleteOptedOutNumber_optedOutNumber = Lens.lens (\DeleteOptedOutNumber' {optedOutNumber} -> optedOutNumber) (\s@DeleteOptedOutNumber' {} a -> s {optedOutNumber = a} :: DeleteOptedOutNumber)++instance Core.AWSRequest DeleteOptedOutNumber where+ type+ AWSResponse DeleteOptedOutNumber =+ DeleteOptedOutNumberResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteOptedOutNumberResponse'+ Prelude.<$> (x Data..?> "EndUserOptedOut")+ Prelude.<*> (x Data..?> "OptOutListArn")+ Prelude.<*> (x Data..?> "OptOutListName")+ Prelude.<*> (x Data..?> "OptedOutNumber")+ Prelude.<*> (x Data..?> "OptedOutTimestamp")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteOptedOutNumber where+ hashWithSalt _salt DeleteOptedOutNumber' {..} =+ _salt+ `Prelude.hashWithSalt` optOutListName+ `Prelude.hashWithSalt` optedOutNumber++instance Prelude.NFData DeleteOptedOutNumber where+ rnf DeleteOptedOutNumber' {..} =+ Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf optedOutNumber++instance Data.ToHeaders DeleteOptedOutNumber where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DeleteOptedOutNumber" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteOptedOutNumber where+ toJSON DeleteOptedOutNumber' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("OptOutListName" Data..= optOutListName),+ Prelude.Just+ ("OptedOutNumber" Data..= optedOutNumber)+ ]+ )++instance Data.ToPath DeleteOptedOutNumber where+ toPath = Prelude.const "/"++instance Data.ToQuery DeleteOptedOutNumber where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteOptedOutNumberResponse' smart constructor.+data DeleteOptedOutNumberResponse = DeleteOptedOutNumberResponse'+ { -- | This is true if it was the end user who requested their phone number be+ -- removed.+ endUserOptedOut :: Prelude.Maybe Prelude.Bool,+ -- | The OptOutListArn that the phone number was removed from.+ optOutListArn :: Prelude.Maybe Prelude.Text,+ -- | The OptOutListName that the phone number was removed from.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | The phone number that was removed from the OptOutList.+ optedOutNumber :: Prelude.Maybe Prelude.Text,+ -- | The time that the number was removed at, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ optedOutTimestamp :: Prelude.Maybe Data.POSIX,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteOptedOutNumberResponse' 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:+--+-- 'endUserOptedOut', 'deleteOptedOutNumberResponse_endUserOptedOut' - This is true if it was the end user who requested their phone number be+-- removed.+--+-- 'optOutListArn', 'deleteOptedOutNumberResponse_optOutListArn' - The OptOutListArn that the phone number was removed from.+--+-- 'optOutListName', 'deleteOptedOutNumberResponse_optOutListName' - The OptOutListName that the phone number was removed from.+--+-- 'optedOutNumber', 'deleteOptedOutNumberResponse_optedOutNumber' - The phone number that was removed from the OptOutList.+--+-- 'optedOutTimestamp', 'deleteOptedOutNumberResponse_optedOutTimestamp' - The time that the number was removed at, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'httpStatus', 'deleteOptedOutNumberResponse_httpStatus' - The response's http status code.+newDeleteOptedOutNumberResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteOptedOutNumberResponse+newDeleteOptedOutNumberResponse pHttpStatus_ =+ DeleteOptedOutNumberResponse'+ { endUserOptedOut =+ Prelude.Nothing,+ optOutListArn = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ optedOutNumber = Prelude.Nothing,+ optedOutTimestamp = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | This is true if it was the end user who requested their phone number be+-- removed.+deleteOptedOutNumberResponse_endUserOptedOut :: Lens.Lens' DeleteOptedOutNumberResponse (Prelude.Maybe Prelude.Bool)+deleteOptedOutNumberResponse_endUserOptedOut = Lens.lens (\DeleteOptedOutNumberResponse' {endUserOptedOut} -> endUserOptedOut) (\s@DeleteOptedOutNumberResponse' {} a -> s {endUserOptedOut = a} :: DeleteOptedOutNumberResponse)++-- | The OptOutListArn that the phone number was removed from.+deleteOptedOutNumberResponse_optOutListArn :: Lens.Lens' DeleteOptedOutNumberResponse (Prelude.Maybe Prelude.Text)+deleteOptedOutNumberResponse_optOutListArn = Lens.lens (\DeleteOptedOutNumberResponse' {optOutListArn} -> optOutListArn) (\s@DeleteOptedOutNumberResponse' {} a -> s {optOutListArn = a} :: DeleteOptedOutNumberResponse)++-- | The OptOutListName that the phone number was removed from.+deleteOptedOutNumberResponse_optOutListName :: Lens.Lens' DeleteOptedOutNumberResponse (Prelude.Maybe Prelude.Text)+deleteOptedOutNumberResponse_optOutListName = Lens.lens (\DeleteOptedOutNumberResponse' {optOutListName} -> optOutListName) (\s@DeleteOptedOutNumberResponse' {} a -> s {optOutListName = a} :: DeleteOptedOutNumberResponse)++-- | The phone number that was removed from the OptOutList.+deleteOptedOutNumberResponse_optedOutNumber :: Lens.Lens' DeleteOptedOutNumberResponse (Prelude.Maybe Prelude.Text)+deleteOptedOutNumberResponse_optedOutNumber = Lens.lens (\DeleteOptedOutNumberResponse' {optedOutNumber} -> optedOutNumber) (\s@DeleteOptedOutNumberResponse' {} a -> s {optedOutNumber = a} :: DeleteOptedOutNumberResponse)++-- | The time that the number was removed at, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+deleteOptedOutNumberResponse_optedOutTimestamp :: Lens.Lens' DeleteOptedOutNumberResponse (Prelude.Maybe Prelude.UTCTime)+deleteOptedOutNumberResponse_optedOutTimestamp = Lens.lens (\DeleteOptedOutNumberResponse' {optedOutTimestamp} -> optedOutTimestamp) (\s@DeleteOptedOutNumberResponse' {} a -> s {optedOutTimestamp = a} :: DeleteOptedOutNumberResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+deleteOptedOutNumberResponse_httpStatus :: Lens.Lens' DeleteOptedOutNumberResponse Prelude.Int+deleteOptedOutNumberResponse_httpStatus = Lens.lens (\DeleteOptedOutNumberResponse' {httpStatus} -> httpStatus) (\s@DeleteOptedOutNumberResponse' {} a -> s {httpStatus = a} :: DeleteOptedOutNumberResponse)++instance Prelude.NFData DeleteOptedOutNumberResponse where+ rnf DeleteOptedOutNumberResponse' {..} =+ Prelude.rnf endUserOptedOut+ `Prelude.seq` Prelude.rnf optOutListArn+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf optedOutNumber+ `Prelude.seq` Prelude.rnf optedOutTimestamp+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DeletePool.hs view
@@ -0,0 +1,327 @@+{-# 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.PinpointSmsVoiceV2.DeletePool+-- 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 an existing pool. Deleting a pool disassociates all origination+-- identities from that pool.+--+-- If the pool status isn\'t active or if deletion protection is enabled,+-- an Error is returned.+--+-- A pool is a collection of phone numbers and SenderIds. A pool can+-- include one or more phone numbers and SenderIds that are associated with+-- your Amazon Web Services account.+module Amazonka.PinpointSmsVoiceV2.DeletePool+ ( -- * Creating a Request+ DeletePool (..),+ newDeletePool,++ -- * Request Lenses+ deletePool_poolId,++ -- * Destructuring the Response+ DeletePoolResponse (..),+ newDeletePoolResponse,++ -- * Response Lenses+ deletePoolResponse_createdTimestamp,+ deletePoolResponse_messageType,+ deletePoolResponse_optOutListName,+ deletePoolResponse_poolArn,+ deletePoolResponse_poolId,+ deletePoolResponse_selfManagedOptOutsEnabled,+ deletePoolResponse_sharedRoutesEnabled,+ deletePoolResponse_status,+ deletePoolResponse_twoWayChannelArn,+ deletePoolResponse_twoWayEnabled,+ deletePoolResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeletePool' smart constructor.+data DeletePool = DeletePool'+ { -- | The PoolId or PoolArn of the pool to delete. You can use DescribePools+ -- to find the values for PoolId and PoolArn .+ poolId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeletePool' 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:+--+-- 'poolId', 'deletePool_poolId' - The PoolId or PoolArn of the pool to delete. You can use DescribePools+-- to find the values for PoolId and PoolArn .+newDeletePool ::+ -- | 'poolId'+ Prelude.Text ->+ DeletePool+newDeletePool pPoolId_ =+ DeletePool' {poolId = pPoolId_}++-- | The PoolId or PoolArn of the pool to delete. You can use DescribePools+-- to find the values for PoolId and PoolArn .+deletePool_poolId :: Lens.Lens' DeletePool Prelude.Text+deletePool_poolId = Lens.lens (\DeletePool' {poolId} -> poolId) (\s@DeletePool' {} a -> s {poolId = a} :: DeletePool)++instance Core.AWSRequest DeletePool where+ type AWSResponse DeletePool = DeletePoolResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeletePoolResponse'+ Prelude.<$> (x Data..?> "CreatedTimestamp")+ Prelude.<*> (x Data..?> "MessageType")+ Prelude.<*> (x Data..?> "OptOutListName")+ Prelude.<*> (x Data..?> "PoolArn")+ Prelude.<*> (x Data..?> "PoolId")+ Prelude.<*> (x Data..?> "SelfManagedOptOutsEnabled")+ Prelude.<*> (x Data..?> "SharedRoutesEnabled")+ Prelude.<*> (x Data..?> "Status")+ Prelude.<*> (x Data..?> "TwoWayChannelArn")+ Prelude.<*> (x Data..?> "TwoWayEnabled")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeletePool where+ hashWithSalt _salt DeletePool' {..} =+ _salt `Prelude.hashWithSalt` poolId++instance Prelude.NFData DeletePool where+ rnf DeletePool' {..} = Prelude.rnf poolId++instance Data.ToHeaders DeletePool where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DeletePool" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeletePool where+ toJSON DeletePool' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("PoolId" Data..= poolId)]+ )++instance Data.ToPath DeletePool where+ toPath = Prelude.const "/"++instance Data.ToQuery DeletePool where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeletePoolResponse' smart constructor.+data DeletePoolResponse = DeletePoolResponse'+ { -- | The time when the pool was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Prelude.Maybe Data.POSIX,+ -- | The message type that was associated with the deleted pool.+ messageType :: Prelude.Maybe MessageType,+ -- | The name of the OptOutList that was associated with the deleted pool.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the pool that was deleted.+ poolArn :: Prelude.Maybe Prelude.Text,+ -- | The PoolId of the pool that was deleted.+ poolId :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When an end recipient sends a message+ -- that begins with HELP or STOP to one of your dedicated numbers, Amazon+ -- Pinpoint automatically replies with a customizable message and adds the+ -- end recipient to the OptOutList. When set to true you\'re responsible+ -- for responding to HELP and STOP requests. You\'re also responsible for+ -- tracking and honoring opt-out requests.+ selfManagedOptOutsEnabled :: Prelude.Maybe Prelude.Bool,+ -- | Indicates whether shared routes are enabled for the pool.+ sharedRoutesEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The current status of the pool.+ --+ -- - CREATING: The pool is currently being created and isn\'t yet+ -- available for use.+ --+ -- - ACTIVE: The pool is active and available for use.+ --+ -- - DELETING: The pool is being deleted.+ status :: Prelude.Maybe PoolStatus,+ -- | The Amazon Resource Name (ARN) of the TwoWayChannel.+ twoWayChannelArn :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When set to true you can receive+ -- incoming text messages from your end recipients.+ twoWayEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeletePoolResponse' 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:+--+-- 'createdTimestamp', 'deletePoolResponse_createdTimestamp' - The time when the pool was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'messageType', 'deletePoolResponse_messageType' - The message type that was associated with the deleted pool.+--+-- 'optOutListName', 'deletePoolResponse_optOutListName' - The name of the OptOutList that was associated with the deleted pool.+--+-- 'poolArn', 'deletePoolResponse_poolArn' - The Amazon Resource Name (ARN) of the pool that was deleted.+--+-- 'poolId', 'deletePoolResponse_poolId' - The PoolId of the pool that was deleted.+--+-- 'selfManagedOptOutsEnabled', 'deletePoolResponse_selfManagedOptOutsEnabled' - By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+--+-- 'sharedRoutesEnabled', 'deletePoolResponse_sharedRoutesEnabled' - Indicates whether shared routes are enabled for the pool.+--+-- 'status', 'deletePoolResponse_status' - The current status of the pool.+--+-- - CREATING: The pool is currently being created and isn\'t yet+-- available for use.+--+-- - ACTIVE: The pool is active and available for use.+--+-- - DELETING: The pool is being deleted.+--+-- 'twoWayChannelArn', 'deletePoolResponse_twoWayChannelArn' - The Amazon Resource Name (ARN) of the TwoWayChannel.+--+-- 'twoWayEnabled', 'deletePoolResponse_twoWayEnabled' - By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+--+-- 'httpStatus', 'deletePoolResponse_httpStatus' - The response's http status code.+newDeletePoolResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeletePoolResponse+newDeletePoolResponse pHttpStatus_ =+ DeletePoolResponse'+ { createdTimestamp =+ Prelude.Nothing,+ messageType = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ poolArn = Prelude.Nothing,+ poolId = Prelude.Nothing,+ selfManagedOptOutsEnabled = Prelude.Nothing,+ sharedRoutesEnabled = Prelude.Nothing,+ status = Prelude.Nothing,+ twoWayChannelArn = Prelude.Nothing,+ twoWayEnabled = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The time when the pool was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+deletePoolResponse_createdTimestamp :: Lens.Lens' DeletePoolResponse (Prelude.Maybe Prelude.UTCTime)+deletePoolResponse_createdTimestamp = Lens.lens (\DeletePoolResponse' {createdTimestamp} -> createdTimestamp) (\s@DeletePoolResponse' {} a -> s {createdTimestamp = a} :: DeletePoolResponse) Prelude.. Lens.mapping Data._Time++-- | The message type that was associated with the deleted pool.+deletePoolResponse_messageType :: Lens.Lens' DeletePoolResponse (Prelude.Maybe MessageType)+deletePoolResponse_messageType = Lens.lens (\DeletePoolResponse' {messageType} -> messageType) (\s@DeletePoolResponse' {} a -> s {messageType = a} :: DeletePoolResponse)++-- | The name of the OptOutList that was associated with the deleted pool.+deletePoolResponse_optOutListName :: Lens.Lens' DeletePoolResponse (Prelude.Maybe Prelude.Text)+deletePoolResponse_optOutListName = Lens.lens (\DeletePoolResponse' {optOutListName} -> optOutListName) (\s@DeletePoolResponse' {} a -> s {optOutListName = a} :: DeletePoolResponse)++-- | The Amazon Resource Name (ARN) of the pool that was deleted.+deletePoolResponse_poolArn :: Lens.Lens' DeletePoolResponse (Prelude.Maybe Prelude.Text)+deletePoolResponse_poolArn = Lens.lens (\DeletePoolResponse' {poolArn} -> poolArn) (\s@DeletePoolResponse' {} a -> s {poolArn = a} :: DeletePoolResponse)++-- | The PoolId of the pool that was deleted.+deletePoolResponse_poolId :: Lens.Lens' DeletePoolResponse (Prelude.Maybe Prelude.Text)+deletePoolResponse_poolId = Lens.lens (\DeletePoolResponse' {poolId} -> poolId) (\s@DeletePoolResponse' {} a -> s {poolId = a} :: DeletePoolResponse)++-- | By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+deletePoolResponse_selfManagedOptOutsEnabled :: Lens.Lens' DeletePoolResponse (Prelude.Maybe Prelude.Bool)+deletePoolResponse_selfManagedOptOutsEnabled = Lens.lens (\DeletePoolResponse' {selfManagedOptOutsEnabled} -> selfManagedOptOutsEnabled) (\s@DeletePoolResponse' {} a -> s {selfManagedOptOutsEnabled = a} :: DeletePoolResponse)++-- | Indicates whether shared routes are enabled for the pool.+deletePoolResponse_sharedRoutesEnabled :: Lens.Lens' DeletePoolResponse (Prelude.Maybe Prelude.Bool)+deletePoolResponse_sharedRoutesEnabled = Lens.lens (\DeletePoolResponse' {sharedRoutesEnabled} -> sharedRoutesEnabled) (\s@DeletePoolResponse' {} a -> s {sharedRoutesEnabled = a} :: DeletePoolResponse)++-- | The current status of the pool.+--+-- - CREATING: The pool is currently being created and isn\'t yet+-- available for use.+--+-- - ACTIVE: The pool is active and available for use.+--+-- - DELETING: The pool is being deleted.+deletePoolResponse_status :: Lens.Lens' DeletePoolResponse (Prelude.Maybe PoolStatus)+deletePoolResponse_status = Lens.lens (\DeletePoolResponse' {status} -> status) (\s@DeletePoolResponse' {} a -> s {status = a} :: DeletePoolResponse)++-- | The Amazon Resource Name (ARN) of the TwoWayChannel.+deletePoolResponse_twoWayChannelArn :: Lens.Lens' DeletePoolResponse (Prelude.Maybe Prelude.Text)+deletePoolResponse_twoWayChannelArn = Lens.lens (\DeletePoolResponse' {twoWayChannelArn} -> twoWayChannelArn) (\s@DeletePoolResponse' {} a -> s {twoWayChannelArn = a} :: DeletePoolResponse)++-- | By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+deletePoolResponse_twoWayEnabled :: Lens.Lens' DeletePoolResponse (Prelude.Maybe Prelude.Bool)+deletePoolResponse_twoWayEnabled = Lens.lens (\DeletePoolResponse' {twoWayEnabled} -> twoWayEnabled) (\s@DeletePoolResponse' {} a -> s {twoWayEnabled = a} :: DeletePoolResponse)++-- | The response's http status code.+deletePoolResponse_httpStatus :: Lens.Lens' DeletePoolResponse Prelude.Int+deletePoolResponse_httpStatus = Lens.lens (\DeletePoolResponse' {httpStatus} -> httpStatus) (\s@DeletePoolResponse' {} a -> s {httpStatus = a} :: DeletePoolResponse)++instance Prelude.NFData DeletePoolResponse where+ rnf DeletePoolResponse' {..} =+ Prelude.rnf createdTimestamp+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf poolArn+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf selfManagedOptOutsEnabled+ `Prelude.seq` Prelude.rnf sharedRoutesEnabled+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf twoWayChannelArn+ `Prelude.seq` Prelude.rnf twoWayEnabled+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DeleteTextMessageSpendLimitOverride.hs view
@@ -0,0 +1,179 @@+{-# 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.PinpointSmsVoiceV2.DeleteTextMessageSpendLimitOverride+-- 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 an account-level monthly spending limit override for sending+-- text messages. Deleting a spend limit override will set the+-- @EnforcedLimit@ to equal the @MaxLimit@, which is controlled by Amazon+-- Web Services. For more information on spend limits (quotas) see+-- <https://docs.aws.amazon.com/pinpoint/latest/developerguide/quotas.html Amazon Pinpoint quotas>+-- in the /Amazon Pinpoint Developer Guide/.+module Amazonka.PinpointSmsVoiceV2.DeleteTextMessageSpendLimitOverride+ ( -- * Creating a Request+ DeleteTextMessageSpendLimitOverride (..),+ newDeleteTextMessageSpendLimitOverride,++ -- * Destructuring the Response+ DeleteTextMessageSpendLimitOverrideResponse (..),+ newDeleteTextMessageSpendLimitOverrideResponse,++ -- * Response Lenses+ deleteTextMessageSpendLimitOverrideResponse_monthlyLimit,+ deleteTextMessageSpendLimitOverrideResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteTextMessageSpendLimitOverride' smart constructor.+data DeleteTextMessageSpendLimitOverride = DeleteTextMessageSpendLimitOverride'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteTextMessageSpendLimitOverride' 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.+newDeleteTextMessageSpendLimitOverride ::+ DeleteTextMessageSpendLimitOverride+newDeleteTextMessageSpendLimitOverride =+ DeleteTextMessageSpendLimitOverride'++instance+ Core.AWSRequest+ DeleteTextMessageSpendLimitOverride+ where+ type+ AWSResponse DeleteTextMessageSpendLimitOverride =+ DeleteTextMessageSpendLimitOverrideResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteTextMessageSpendLimitOverrideResponse'+ Prelude.<$> (x Data..?> "MonthlyLimit")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ DeleteTextMessageSpendLimitOverride+ where+ hashWithSalt _salt _ =+ _salt `Prelude.hashWithSalt` ()++instance+ Prelude.NFData+ DeleteTextMessageSpendLimitOverride+ where+ rnf _ = ()++instance+ Data.ToHeaders+ DeleteTextMessageSpendLimitOverride+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DeleteTextMessageSpendLimitOverride" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance+ Data.ToJSON+ DeleteTextMessageSpendLimitOverride+ where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance+ Data.ToPath+ DeleteTextMessageSpendLimitOverride+ where+ toPath = Prelude.const "/"++instance+ Data.ToQuery+ DeleteTextMessageSpendLimitOverride+ where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteTextMessageSpendLimitOverrideResponse' smart constructor.+data DeleteTextMessageSpendLimitOverrideResponse = DeleteTextMessageSpendLimitOverrideResponse'+ { -- | The current monthly limit, in US dollars.+ monthlyLimit :: Prelude.Maybe Prelude.Natural,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteTextMessageSpendLimitOverrideResponse' 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:+--+-- 'monthlyLimit', 'deleteTextMessageSpendLimitOverrideResponse_monthlyLimit' - The current monthly limit, in US dollars.+--+-- 'httpStatus', 'deleteTextMessageSpendLimitOverrideResponse_httpStatus' - The response's http status code.+newDeleteTextMessageSpendLimitOverrideResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteTextMessageSpendLimitOverrideResponse+newDeleteTextMessageSpendLimitOverrideResponse+ pHttpStatus_ =+ DeleteTextMessageSpendLimitOverrideResponse'+ { monthlyLimit =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The current monthly limit, in US dollars.+deleteTextMessageSpendLimitOverrideResponse_monthlyLimit :: Lens.Lens' DeleteTextMessageSpendLimitOverrideResponse (Prelude.Maybe Prelude.Natural)+deleteTextMessageSpendLimitOverrideResponse_monthlyLimit = Lens.lens (\DeleteTextMessageSpendLimitOverrideResponse' {monthlyLimit} -> monthlyLimit) (\s@DeleteTextMessageSpendLimitOverrideResponse' {} a -> s {monthlyLimit = a} :: DeleteTextMessageSpendLimitOverrideResponse)++-- | The response's http status code.+deleteTextMessageSpendLimitOverrideResponse_httpStatus :: Lens.Lens' DeleteTextMessageSpendLimitOverrideResponse Prelude.Int+deleteTextMessageSpendLimitOverrideResponse_httpStatus = Lens.lens (\DeleteTextMessageSpendLimitOverrideResponse' {httpStatus} -> httpStatus) (\s@DeleteTextMessageSpendLimitOverrideResponse' {} a -> s {httpStatus = a} :: DeleteTextMessageSpendLimitOverrideResponse)++instance+ Prelude.NFData+ DeleteTextMessageSpendLimitOverrideResponse+ where+ rnf DeleteTextMessageSpendLimitOverrideResponse' {..} =+ Prelude.rnf monthlyLimit+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DeleteVoiceMessageSpendLimitOverride.hs view
@@ -0,0 +1,179 @@+{-# 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.PinpointSmsVoiceV2.DeleteVoiceMessageSpendLimitOverride+-- 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 an account level monthly spend limit override for sending voice+-- messages. Deleting a spend limit override sets the @EnforcedLimit@ equal+-- to the @MaxLimit@, which is controlled by Amazon Web Services. For more+-- information on spending limits (quotas) see+-- <https://docs.aws.amazon.com/pinpoint/latest/developerguide/quotas.html Amazon Pinpoint quotas>+-- in the /Amazon Pinpoint Developer Guide/.+module Amazonka.PinpointSmsVoiceV2.DeleteVoiceMessageSpendLimitOverride+ ( -- * Creating a Request+ DeleteVoiceMessageSpendLimitOverride (..),+ newDeleteVoiceMessageSpendLimitOverride,++ -- * Destructuring the Response+ DeleteVoiceMessageSpendLimitOverrideResponse (..),+ newDeleteVoiceMessageSpendLimitOverrideResponse,++ -- * Response Lenses+ deleteVoiceMessageSpendLimitOverrideResponse_monthlyLimit,+ deleteVoiceMessageSpendLimitOverrideResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteVoiceMessageSpendLimitOverride' smart constructor.+data DeleteVoiceMessageSpendLimitOverride = DeleteVoiceMessageSpendLimitOverride'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteVoiceMessageSpendLimitOverride' 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.+newDeleteVoiceMessageSpendLimitOverride ::+ DeleteVoiceMessageSpendLimitOverride+newDeleteVoiceMessageSpendLimitOverride =+ DeleteVoiceMessageSpendLimitOverride'++instance+ Core.AWSRequest+ DeleteVoiceMessageSpendLimitOverride+ where+ type+ AWSResponse DeleteVoiceMessageSpendLimitOverride =+ DeleteVoiceMessageSpendLimitOverrideResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteVoiceMessageSpendLimitOverrideResponse'+ Prelude.<$> (x Data..?> "MonthlyLimit")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ DeleteVoiceMessageSpendLimitOverride+ where+ hashWithSalt _salt _ =+ _salt `Prelude.hashWithSalt` ()++instance+ Prelude.NFData+ DeleteVoiceMessageSpendLimitOverride+ where+ rnf _ = ()++instance+ Data.ToHeaders+ DeleteVoiceMessageSpendLimitOverride+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DeleteVoiceMessageSpendLimitOverride" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance+ Data.ToJSON+ DeleteVoiceMessageSpendLimitOverride+ where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance+ Data.ToPath+ DeleteVoiceMessageSpendLimitOverride+ where+ toPath = Prelude.const "/"++instance+ Data.ToQuery+ DeleteVoiceMessageSpendLimitOverride+ where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteVoiceMessageSpendLimitOverrideResponse' smart constructor.+data DeleteVoiceMessageSpendLimitOverrideResponse = DeleteVoiceMessageSpendLimitOverrideResponse'+ { -- | The current monthly limit, in US dollars.+ monthlyLimit :: Prelude.Maybe Prelude.Natural,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteVoiceMessageSpendLimitOverrideResponse' 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:+--+-- 'monthlyLimit', 'deleteVoiceMessageSpendLimitOverrideResponse_monthlyLimit' - The current monthly limit, in US dollars.+--+-- 'httpStatus', 'deleteVoiceMessageSpendLimitOverrideResponse_httpStatus' - The response's http status code.+newDeleteVoiceMessageSpendLimitOverrideResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteVoiceMessageSpendLimitOverrideResponse+newDeleteVoiceMessageSpendLimitOverrideResponse+ pHttpStatus_ =+ DeleteVoiceMessageSpendLimitOverrideResponse'+ { monthlyLimit =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The current monthly limit, in US dollars.+deleteVoiceMessageSpendLimitOverrideResponse_monthlyLimit :: Lens.Lens' DeleteVoiceMessageSpendLimitOverrideResponse (Prelude.Maybe Prelude.Natural)+deleteVoiceMessageSpendLimitOverrideResponse_monthlyLimit = Lens.lens (\DeleteVoiceMessageSpendLimitOverrideResponse' {monthlyLimit} -> monthlyLimit) (\s@DeleteVoiceMessageSpendLimitOverrideResponse' {} a -> s {monthlyLimit = a} :: DeleteVoiceMessageSpendLimitOverrideResponse)++-- | The response's http status code.+deleteVoiceMessageSpendLimitOverrideResponse_httpStatus :: Lens.Lens' DeleteVoiceMessageSpendLimitOverrideResponse Prelude.Int+deleteVoiceMessageSpendLimitOverrideResponse_httpStatus = Lens.lens (\DeleteVoiceMessageSpendLimitOverrideResponse' {httpStatus} -> httpStatus) (\s@DeleteVoiceMessageSpendLimitOverrideResponse' {} a -> s {httpStatus = a} :: DeleteVoiceMessageSpendLimitOverrideResponse)++instance+ Prelude.NFData+ DeleteVoiceMessageSpendLimitOverrideResponse+ where+ rnf DeleteVoiceMessageSpendLimitOverrideResponse' {..} =+ Prelude.rnf monthlyLimit+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DescribeAccountAttributes.hs view
@@ -0,0 +1,241 @@+{-# 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.PinpointSmsVoiceV2.DescribeAccountAttributes+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes attributes of your Amazon Web Services account. The supported+-- account attributes include account tier, which indicates whether your+-- account is in the sandbox or production environment. When you\'re ready+-- to move your account out of the sandbox, create an Amazon Web Services+-- Support case for a service limit increase request.+--+-- New Amazon Pinpoint accounts are placed into an SMS or voice sandbox.+-- The sandbox protects both Amazon Web Services end recipients and SMS or+-- voice recipients from fraud and abuse.+--+-- This operation returns paginated results.+module Amazonka.PinpointSmsVoiceV2.DescribeAccountAttributes+ ( -- * Creating a Request+ DescribeAccountAttributes (..),+ newDescribeAccountAttributes,++ -- * Request Lenses+ describeAccountAttributes_maxResults,+ describeAccountAttributes_nextToken,++ -- * Destructuring the Response+ DescribeAccountAttributesResponse (..),+ newDescribeAccountAttributesResponse,++ -- * Response Lenses+ describeAccountAttributesResponse_accountAttributes,+ describeAccountAttributesResponse_nextToken,+ describeAccountAttributesResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeAccountAttributes' smart constructor.+data DescribeAccountAttributes = DescribeAccountAttributes'+ { -- | The maximum number of results to return per each request.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to be used for the next set of paginated results. You don\'t+ -- need to supply a value for this field in the initial request.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeAccountAttributes' 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', 'describeAccountAttributes_maxResults' - The maximum number of results to return per each request.+--+-- 'nextToken', 'describeAccountAttributes_nextToken' - The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+newDescribeAccountAttributes ::+ DescribeAccountAttributes+newDescribeAccountAttributes =+ DescribeAccountAttributes'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of results to return per each request.+describeAccountAttributes_maxResults :: Lens.Lens' DescribeAccountAttributes (Prelude.Maybe Prelude.Natural)+describeAccountAttributes_maxResults = Lens.lens (\DescribeAccountAttributes' {maxResults} -> maxResults) (\s@DescribeAccountAttributes' {} a -> s {maxResults = a} :: DescribeAccountAttributes)++-- | The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+describeAccountAttributes_nextToken :: Lens.Lens' DescribeAccountAttributes (Prelude.Maybe Prelude.Text)+describeAccountAttributes_nextToken = Lens.lens (\DescribeAccountAttributes' {nextToken} -> nextToken) (\s@DescribeAccountAttributes' {} a -> s {nextToken = a} :: DescribeAccountAttributes)++instance Core.AWSPager DescribeAccountAttributes where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? describeAccountAttributesResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? describeAccountAttributesResponse_accountAttributes+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& describeAccountAttributes_nextToken+ Lens..~ rs+ Lens.^? describeAccountAttributesResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest DescribeAccountAttributes where+ type+ AWSResponse DescribeAccountAttributes =+ DescribeAccountAttributesResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeAccountAttributesResponse'+ Prelude.<$> ( x+ Data..?> "AccountAttributes"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeAccountAttributes where+ hashWithSalt _salt DescribeAccountAttributes' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData DescribeAccountAttributes where+ rnf DescribeAccountAttributes' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders DescribeAccountAttributes where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DescribeAccountAttributes" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribeAccountAttributes where+ toJSON DescribeAccountAttributes' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath DescribeAccountAttributes where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribeAccountAttributes where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeAccountAttributesResponse' smart constructor.+data DescribeAccountAttributesResponse = DescribeAccountAttributesResponse'+ { -- | An array of AccountAttributes objects.+ accountAttributes :: Prelude.Maybe [AccountAttribute],+ -- | The token to be used for the next set of paginated results. If this+ -- field is empty then there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeAccountAttributesResponse' 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:+--+-- 'accountAttributes', 'describeAccountAttributesResponse_accountAttributes' - An array of AccountAttributes objects.+--+-- 'nextToken', 'describeAccountAttributesResponse_nextToken' - The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+--+-- 'httpStatus', 'describeAccountAttributesResponse_httpStatus' - The response's http status code.+newDescribeAccountAttributesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeAccountAttributesResponse+newDescribeAccountAttributesResponse pHttpStatus_ =+ DescribeAccountAttributesResponse'+ { accountAttributes =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of AccountAttributes objects.+describeAccountAttributesResponse_accountAttributes :: Lens.Lens' DescribeAccountAttributesResponse (Prelude.Maybe [AccountAttribute])+describeAccountAttributesResponse_accountAttributes = Lens.lens (\DescribeAccountAttributesResponse' {accountAttributes} -> accountAttributes) (\s@DescribeAccountAttributesResponse' {} a -> s {accountAttributes = a} :: DescribeAccountAttributesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+describeAccountAttributesResponse_nextToken :: Lens.Lens' DescribeAccountAttributesResponse (Prelude.Maybe Prelude.Text)+describeAccountAttributesResponse_nextToken = Lens.lens (\DescribeAccountAttributesResponse' {nextToken} -> nextToken) (\s@DescribeAccountAttributesResponse' {} a -> s {nextToken = a} :: DescribeAccountAttributesResponse)++-- | The response's http status code.+describeAccountAttributesResponse_httpStatus :: Lens.Lens' DescribeAccountAttributesResponse Prelude.Int+describeAccountAttributesResponse_httpStatus = Lens.lens (\DescribeAccountAttributesResponse' {httpStatus} -> httpStatus) (\s@DescribeAccountAttributesResponse' {} a -> s {httpStatus = a} :: DescribeAccountAttributesResponse)++instance+ Prelude.NFData+ DescribeAccountAttributesResponse+ where+ rnf DescribeAccountAttributesResponse' {..} =+ Prelude.rnf accountAttributes+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DescribeAccountLimits.hs view
@@ -0,0 +1,236 @@+{-# 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.PinpointSmsVoiceV2.DescribeAccountLimits+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes the current Amazon Pinpoint SMS Voice V2 resource quotas for+-- your account. The description for a quota includes the quota name,+-- current usage toward that quota, and the quota\'s maximum value.+--+-- When you establish an Amazon Web Services account, the account has+-- initial quotas on the maximum number of configuration sets, opt-out+-- lists, phone numbers, and pools that you can create in a given Region.+-- For more information see+-- <https://docs.aws.amazon.com/pinpoint/latest/developerguide/quotas.html Amazon Pinpoint quotas>+-- in the /Amazon Pinpoint Developer Guide/.+--+-- This operation returns paginated results.+module Amazonka.PinpointSmsVoiceV2.DescribeAccountLimits+ ( -- * Creating a Request+ DescribeAccountLimits (..),+ newDescribeAccountLimits,++ -- * Request Lenses+ describeAccountLimits_maxResults,+ describeAccountLimits_nextToken,++ -- * Destructuring the Response+ DescribeAccountLimitsResponse (..),+ newDescribeAccountLimitsResponse,++ -- * Response Lenses+ describeAccountLimitsResponse_accountLimits,+ describeAccountLimitsResponse_nextToken,+ describeAccountLimitsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeAccountLimits' smart constructor.+data DescribeAccountLimits = DescribeAccountLimits'+ { -- | The maximum number of results to return per each request.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to be used for the next set of paginated results. You don\'t+ -- need to supply a value for this field in the initial request.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeAccountLimits' 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', 'describeAccountLimits_maxResults' - The maximum number of results to return per each request.+--+-- 'nextToken', 'describeAccountLimits_nextToken' - The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+newDescribeAccountLimits ::+ DescribeAccountLimits+newDescribeAccountLimits =+ DescribeAccountLimits'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of results to return per each request.+describeAccountLimits_maxResults :: Lens.Lens' DescribeAccountLimits (Prelude.Maybe Prelude.Natural)+describeAccountLimits_maxResults = Lens.lens (\DescribeAccountLimits' {maxResults} -> maxResults) (\s@DescribeAccountLimits' {} a -> s {maxResults = a} :: DescribeAccountLimits)++-- | The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+describeAccountLimits_nextToken :: Lens.Lens' DescribeAccountLimits (Prelude.Maybe Prelude.Text)+describeAccountLimits_nextToken = Lens.lens (\DescribeAccountLimits' {nextToken} -> nextToken) (\s@DescribeAccountLimits' {} a -> s {nextToken = a} :: DescribeAccountLimits)++instance Core.AWSPager DescribeAccountLimits where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? describeAccountLimitsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? describeAccountLimitsResponse_accountLimits+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& describeAccountLimits_nextToken+ Lens..~ rs+ Lens.^? describeAccountLimitsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest DescribeAccountLimits where+ type+ AWSResponse DescribeAccountLimits =+ DescribeAccountLimitsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeAccountLimitsResponse'+ Prelude.<$> (x Data..?> "AccountLimits" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeAccountLimits where+ hashWithSalt _salt DescribeAccountLimits' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData DescribeAccountLimits where+ rnf DescribeAccountLimits' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders DescribeAccountLimits where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DescribeAccountLimits" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribeAccountLimits where+ toJSON DescribeAccountLimits' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath DescribeAccountLimits where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribeAccountLimits where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeAccountLimitsResponse' smart constructor.+data DescribeAccountLimitsResponse = DescribeAccountLimitsResponse'+ { -- | An array of AccountLimit objects that show the current spend limits.+ accountLimits :: Prelude.Maybe [AccountLimit],+ -- | The token to be used for the next set of paginated results. If this+ -- field is empty then there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeAccountLimitsResponse' 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:+--+-- 'accountLimits', 'describeAccountLimitsResponse_accountLimits' - An array of AccountLimit objects that show the current spend limits.+--+-- 'nextToken', 'describeAccountLimitsResponse_nextToken' - The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+--+-- 'httpStatus', 'describeAccountLimitsResponse_httpStatus' - The response's http status code.+newDescribeAccountLimitsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeAccountLimitsResponse+newDescribeAccountLimitsResponse pHttpStatus_ =+ DescribeAccountLimitsResponse'+ { accountLimits =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of AccountLimit objects that show the current spend limits.+describeAccountLimitsResponse_accountLimits :: Lens.Lens' DescribeAccountLimitsResponse (Prelude.Maybe [AccountLimit])+describeAccountLimitsResponse_accountLimits = Lens.lens (\DescribeAccountLimitsResponse' {accountLimits} -> accountLimits) (\s@DescribeAccountLimitsResponse' {} a -> s {accountLimits = a} :: DescribeAccountLimitsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+describeAccountLimitsResponse_nextToken :: Lens.Lens' DescribeAccountLimitsResponse (Prelude.Maybe Prelude.Text)+describeAccountLimitsResponse_nextToken = Lens.lens (\DescribeAccountLimitsResponse' {nextToken} -> nextToken) (\s@DescribeAccountLimitsResponse' {} a -> s {nextToken = a} :: DescribeAccountLimitsResponse)++-- | The response's http status code.+describeAccountLimitsResponse_httpStatus :: Lens.Lens' DescribeAccountLimitsResponse Prelude.Int+describeAccountLimitsResponse_httpStatus = Lens.lens (\DescribeAccountLimitsResponse' {httpStatus} -> httpStatus) (\s@DescribeAccountLimitsResponse' {} a -> s {httpStatus = a} :: DescribeAccountLimitsResponse)++instance Prelude.NFData DescribeAccountLimitsResponse where+ rnf DescribeAccountLimitsResponse' {..} =+ Prelude.rnf accountLimits+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DescribeConfigurationSets.hs view
@@ -0,0 +1,272 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.DescribeConfigurationSets+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes the specified configuration sets or all in your account.+--+-- If you specify configuration set names, the output includes information+-- for only the specified configuration sets. If you specify filters, the+-- output includes information for only those configuration sets that meet+-- the filter criteria. If you don\'t specify configuration set names or+-- filters, the output includes information for all configuration sets.+--+-- If you specify a configuration set name that isn\'t valid, an error is+-- returned.+--+-- This operation returns paginated results.+module Amazonka.PinpointSmsVoiceV2.DescribeConfigurationSets+ ( -- * Creating a Request+ DescribeConfigurationSets (..),+ newDescribeConfigurationSets,++ -- * Request Lenses+ describeConfigurationSets_configurationSetNames,+ describeConfigurationSets_filters,+ describeConfigurationSets_maxResults,+ describeConfigurationSets_nextToken,++ -- * Destructuring the Response+ DescribeConfigurationSetsResponse (..),+ newDescribeConfigurationSetsResponse,++ -- * Response Lenses+ describeConfigurationSetsResponse_configurationSets,+ describeConfigurationSetsResponse_nextToken,+ describeConfigurationSetsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeConfigurationSets' smart constructor.+data DescribeConfigurationSets = DescribeConfigurationSets'+ { -- | An array of strings. Each element can be either a ConfigurationSetName+ -- or ConfigurationSetArn.+ configurationSetNames :: Prelude.Maybe [Prelude.Text],+ -- | An array of filters to apply to the results that are returned.+ filters :: Prelude.Maybe [ConfigurationSetFilter],+ -- | The maximum number of results to return per each request.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to be used for the next set of paginated results. You don\'t+ -- need to supply a value for this field in the initial request.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeConfigurationSets' 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:+--+-- 'configurationSetNames', 'describeConfigurationSets_configurationSetNames' - An array of strings. Each element can be either a ConfigurationSetName+-- or ConfigurationSetArn.+--+-- 'filters', 'describeConfigurationSets_filters' - An array of filters to apply to the results that are returned.+--+-- 'maxResults', 'describeConfigurationSets_maxResults' - The maximum number of results to return per each request.+--+-- 'nextToken', 'describeConfigurationSets_nextToken' - The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+newDescribeConfigurationSets ::+ DescribeConfigurationSets+newDescribeConfigurationSets =+ DescribeConfigurationSets'+ { configurationSetNames =+ Prelude.Nothing,+ filters = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | An array of strings. Each element can be either a ConfigurationSetName+-- or ConfigurationSetArn.+describeConfigurationSets_configurationSetNames :: Lens.Lens' DescribeConfigurationSets (Prelude.Maybe [Prelude.Text])+describeConfigurationSets_configurationSetNames = Lens.lens (\DescribeConfigurationSets' {configurationSetNames} -> configurationSetNames) (\s@DescribeConfigurationSets' {} a -> s {configurationSetNames = a} :: DescribeConfigurationSets) Prelude.. Lens.mapping Lens.coerced++-- | An array of filters to apply to the results that are returned.+describeConfigurationSets_filters :: Lens.Lens' DescribeConfigurationSets (Prelude.Maybe [ConfigurationSetFilter])+describeConfigurationSets_filters = Lens.lens (\DescribeConfigurationSets' {filters} -> filters) (\s@DescribeConfigurationSets' {} a -> s {filters = a} :: DescribeConfigurationSets) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of results to return per each request.+describeConfigurationSets_maxResults :: Lens.Lens' DescribeConfigurationSets (Prelude.Maybe Prelude.Natural)+describeConfigurationSets_maxResults = Lens.lens (\DescribeConfigurationSets' {maxResults} -> maxResults) (\s@DescribeConfigurationSets' {} a -> s {maxResults = a} :: DescribeConfigurationSets)++-- | The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+describeConfigurationSets_nextToken :: Lens.Lens' DescribeConfigurationSets (Prelude.Maybe Prelude.Text)+describeConfigurationSets_nextToken = Lens.lens (\DescribeConfigurationSets' {nextToken} -> nextToken) (\s@DescribeConfigurationSets' {} a -> s {nextToken = a} :: DescribeConfigurationSets)++instance Core.AWSPager DescribeConfigurationSets where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? describeConfigurationSetsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? describeConfigurationSetsResponse_configurationSets+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& describeConfigurationSets_nextToken+ Lens..~ rs+ Lens.^? describeConfigurationSetsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest DescribeConfigurationSets where+ type+ AWSResponse DescribeConfigurationSets =+ DescribeConfigurationSetsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeConfigurationSetsResponse'+ Prelude.<$> ( x+ Data..?> "ConfigurationSets"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeConfigurationSets where+ hashWithSalt _salt DescribeConfigurationSets' {..} =+ _salt+ `Prelude.hashWithSalt` configurationSetNames+ `Prelude.hashWithSalt` filters+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData DescribeConfigurationSets where+ rnf DescribeConfigurationSets' {..} =+ Prelude.rnf configurationSetNames+ `Prelude.seq` Prelude.rnf filters+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders DescribeConfigurationSets where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DescribeConfigurationSets" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribeConfigurationSets where+ toJSON DescribeConfigurationSets' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ConfigurationSetNames" Data..=)+ Prelude.<$> configurationSetNames,+ ("Filters" Data..=) Prelude.<$> filters,+ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath DescribeConfigurationSets where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribeConfigurationSets where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeConfigurationSetsResponse' smart constructor.+data DescribeConfigurationSetsResponse = DescribeConfigurationSetsResponse'+ { -- | An array of ConfigurationSets objects.+ configurationSets :: Prelude.Maybe [ConfigurationSetInformation],+ -- | The token to be used for the next set of paginated results. If this+ -- field is empty then there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeConfigurationSetsResponse' 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:+--+-- 'configurationSets', 'describeConfigurationSetsResponse_configurationSets' - An array of ConfigurationSets objects.+--+-- 'nextToken', 'describeConfigurationSetsResponse_nextToken' - The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+--+-- 'httpStatus', 'describeConfigurationSetsResponse_httpStatus' - The response's http status code.+newDescribeConfigurationSetsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeConfigurationSetsResponse+newDescribeConfigurationSetsResponse pHttpStatus_ =+ DescribeConfigurationSetsResponse'+ { configurationSets =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of ConfigurationSets objects.+describeConfigurationSetsResponse_configurationSets :: Lens.Lens' DescribeConfigurationSetsResponse (Prelude.Maybe [ConfigurationSetInformation])+describeConfigurationSetsResponse_configurationSets = Lens.lens (\DescribeConfigurationSetsResponse' {configurationSets} -> configurationSets) (\s@DescribeConfigurationSetsResponse' {} a -> s {configurationSets = a} :: DescribeConfigurationSetsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+describeConfigurationSetsResponse_nextToken :: Lens.Lens' DescribeConfigurationSetsResponse (Prelude.Maybe Prelude.Text)+describeConfigurationSetsResponse_nextToken = Lens.lens (\DescribeConfigurationSetsResponse' {nextToken} -> nextToken) (\s@DescribeConfigurationSetsResponse' {} a -> s {nextToken = a} :: DescribeConfigurationSetsResponse)++-- | The response's http status code.+describeConfigurationSetsResponse_httpStatus :: Lens.Lens' DescribeConfigurationSetsResponse Prelude.Int+describeConfigurationSetsResponse_httpStatus = Lens.lens (\DescribeConfigurationSetsResponse' {httpStatus} -> httpStatus) (\s@DescribeConfigurationSetsResponse' {} a -> s {httpStatus = a} :: DescribeConfigurationSetsResponse)++instance+ Prelude.NFData+ DescribeConfigurationSetsResponse+ where+ rnf DescribeConfigurationSetsResponse' {..} =+ Prelude.rnf configurationSets+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DescribeKeywords.hs view
@@ -0,0 +1,316 @@+{-# 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.PinpointSmsVoiceV2.DescribeKeywords+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes the specified keywords or all keywords on your origination+-- phone number or pool.+--+-- A keyword is a word that you can search for on a particular phone number+-- or pool. It is also a specific word or phrase that an end user can send+-- to your number to elicit a response, such as an informational message or+-- a special offer. When your number receives a message that begins with a+-- keyword, Amazon Pinpoint responds with a customizable message.+--+-- If you specify a keyword that isn\'t valid, an Error is returned.+--+-- This operation returns paginated results.+module Amazonka.PinpointSmsVoiceV2.DescribeKeywords+ ( -- * Creating a Request+ DescribeKeywords (..),+ newDescribeKeywords,++ -- * Request Lenses+ describeKeywords_filters,+ describeKeywords_keywords,+ describeKeywords_maxResults,+ describeKeywords_nextToken,+ describeKeywords_originationIdentity,++ -- * Destructuring the Response+ DescribeKeywordsResponse (..),+ newDescribeKeywordsResponse,++ -- * Response Lenses+ describeKeywordsResponse_keywords,+ describeKeywordsResponse_nextToken,+ describeKeywordsResponse_originationIdentity,+ describeKeywordsResponse_originationIdentityArn,+ describeKeywordsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeKeywords' smart constructor.+data DescribeKeywords = DescribeKeywords'+ { -- | An array of keyword filters to filter the results.+ filters :: Prelude.Maybe [KeywordFilter],+ -- | An array of keywords to search for.+ keywords :: Prelude.Maybe [Prelude.Text],+ -- | The maximum number of results to return per each request.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to be used for the next set of paginated results. You don\'t+ -- need to supply a value for this field in the initial request.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+ -- SenderId or SenderIdArn. You can use DescribePhoneNumbers to find the+ -- values for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can+ -- be used to get the values for SenderId and SenderIdArn.+ originationIdentity :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeKeywords' 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:+--+-- 'filters', 'describeKeywords_filters' - An array of keyword filters to filter the results.+--+-- 'keywords', 'describeKeywords_keywords' - An array of keywords to search for.+--+-- 'maxResults', 'describeKeywords_maxResults' - The maximum number of results to return per each request.+--+-- 'nextToken', 'describeKeywords_nextToken' - The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+--+-- 'originationIdentity', 'describeKeywords_originationIdentity' - The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+-- SenderId or SenderIdArn. You can use DescribePhoneNumbers to find the+-- values for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can+-- be used to get the values for SenderId and SenderIdArn.+newDescribeKeywords ::+ -- | 'originationIdentity'+ Prelude.Text ->+ DescribeKeywords+newDescribeKeywords pOriginationIdentity_ =+ DescribeKeywords'+ { filters = Prelude.Nothing,+ keywords = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ originationIdentity = pOriginationIdentity_+ }++-- | An array of keyword filters to filter the results.+describeKeywords_filters :: Lens.Lens' DescribeKeywords (Prelude.Maybe [KeywordFilter])+describeKeywords_filters = Lens.lens (\DescribeKeywords' {filters} -> filters) (\s@DescribeKeywords' {} a -> s {filters = a} :: DescribeKeywords) Prelude.. Lens.mapping Lens.coerced++-- | An array of keywords to search for.+describeKeywords_keywords :: Lens.Lens' DescribeKeywords (Prelude.Maybe [Prelude.Text])+describeKeywords_keywords = Lens.lens (\DescribeKeywords' {keywords} -> keywords) (\s@DescribeKeywords' {} a -> s {keywords = a} :: DescribeKeywords) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of results to return per each request.+describeKeywords_maxResults :: Lens.Lens' DescribeKeywords (Prelude.Maybe Prelude.Natural)+describeKeywords_maxResults = Lens.lens (\DescribeKeywords' {maxResults} -> maxResults) (\s@DescribeKeywords' {} a -> s {maxResults = a} :: DescribeKeywords)++-- | The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+describeKeywords_nextToken :: Lens.Lens' DescribeKeywords (Prelude.Maybe Prelude.Text)+describeKeywords_nextToken = Lens.lens (\DescribeKeywords' {nextToken} -> nextToken) (\s@DescribeKeywords' {} a -> s {nextToken = a} :: DescribeKeywords)++-- | The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+-- SenderId or SenderIdArn. You can use DescribePhoneNumbers to find the+-- values for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can+-- be used to get the values for SenderId and SenderIdArn.+describeKeywords_originationIdentity :: Lens.Lens' DescribeKeywords Prelude.Text+describeKeywords_originationIdentity = Lens.lens (\DescribeKeywords' {originationIdentity} -> originationIdentity) (\s@DescribeKeywords' {} a -> s {originationIdentity = a} :: DescribeKeywords)++instance Core.AWSPager DescribeKeywords where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? describeKeywordsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? describeKeywordsResponse_keywords+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& describeKeywords_nextToken+ Lens..~ rs+ Lens.^? describeKeywordsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest DescribeKeywords where+ type+ AWSResponse DescribeKeywords =+ DescribeKeywordsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeKeywordsResponse'+ Prelude.<$> (x Data..?> "Keywords" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "OriginationIdentity")+ Prelude.<*> (x Data..?> "OriginationIdentityArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeKeywords where+ hashWithSalt _salt DescribeKeywords' {..} =+ _salt+ `Prelude.hashWithSalt` filters+ `Prelude.hashWithSalt` keywords+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` originationIdentity++instance Prelude.NFData DescribeKeywords where+ rnf DescribeKeywords' {..} =+ Prelude.rnf filters+ `Prelude.seq` Prelude.rnf keywords+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf originationIdentity++instance Data.ToHeaders DescribeKeywords where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DescribeKeywords" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribeKeywords where+ toJSON DescribeKeywords' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Filters" Data..=) Prelude.<$> filters,+ ("Keywords" Data..=) Prelude.<$> keywords,+ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ Prelude.Just+ ("OriginationIdentity" Data..= originationIdentity)+ ]+ )++instance Data.ToPath DescribeKeywords where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribeKeywords where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeKeywordsResponse' smart constructor.+data DescribeKeywordsResponse = DescribeKeywordsResponse'+ { -- | An array of KeywordInformation objects that contain the results.+ keywords :: Prelude.Maybe [KeywordInformation],+ -- | The token to be used for the next set of paginated results. If this+ -- field is empty then there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberId or PoolId that is associated with the+ -- OriginationIdentity.+ originationIdentity :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberArn or PoolArn that is associated with the+ -- OriginationIdentity.+ originationIdentityArn :: 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 'DescribeKeywordsResponse' 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:+--+-- 'keywords', 'describeKeywordsResponse_keywords' - An array of KeywordInformation objects that contain the results.+--+-- 'nextToken', 'describeKeywordsResponse_nextToken' - The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+--+-- 'originationIdentity', 'describeKeywordsResponse_originationIdentity' - The PhoneNumberId or PoolId that is associated with the+-- OriginationIdentity.+--+-- 'originationIdentityArn', 'describeKeywordsResponse_originationIdentityArn' - The PhoneNumberArn or PoolArn that is associated with the+-- OriginationIdentity.+--+-- 'httpStatus', 'describeKeywordsResponse_httpStatus' - The response's http status code.+newDescribeKeywordsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeKeywordsResponse+newDescribeKeywordsResponse pHttpStatus_ =+ DescribeKeywordsResponse'+ { keywords =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ originationIdentity = Prelude.Nothing,+ originationIdentityArn = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of KeywordInformation objects that contain the results.+describeKeywordsResponse_keywords :: Lens.Lens' DescribeKeywordsResponse (Prelude.Maybe [KeywordInformation])+describeKeywordsResponse_keywords = Lens.lens (\DescribeKeywordsResponse' {keywords} -> keywords) (\s@DescribeKeywordsResponse' {} a -> s {keywords = a} :: DescribeKeywordsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+describeKeywordsResponse_nextToken :: Lens.Lens' DescribeKeywordsResponse (Prelude.Maybe Prelude.Text)+describeKeywordsResponse_nextToken = Lens.lens (\DescribeKeywordsResponse' {nextToken} -> nextToken) (\s@DescribeKeywordsResponse' {} a -> s {nextToken = a} :: DescribeKeywordsResponse)++-- | The PhoneNumberId or PoolId that is associated with the+-- OriginationIdentity.+describeKeywordsResponse_originationIdentity :: Lens.Lens' DescribeKeywordsResponse (Prelude.Maybe Prelude.Text)+describeKeywordsResponse_originationIdentity = Lens.lens (\DescribeKeywordsResponse' {originationIdentity} -> originationIdentity) (\s@DescribeKeywordsResponse' {} a -> s {originationIdentity = a} :: DescribeKeywordsResponse)++-- | The PhoneNumberArn or PoolArn that is associated with the+-- OriginationIdentity.+describeKeywordsResponse_originationIdentityArn :: Lens.Lens' DescribeKeywordsResponse (Prelude.Maybe Prelude.Text)+describeKeywordsResponse_originationIdentityArn = Lens.lens (\DescribeKeywordsResponse' {originationIdentityArn} -> originationIdentityArn) (\s@DescribeKeywordsResponse' {} a -> s {originationIdentityArn = a} :: DescribeKeywordsResponse)++-- | The response's http status code.+describeKeywordsResponse_httpStatus :: Lens.Lens' DescribeKeywordsResponse Prelude.Int+describeKeywordsResponse_httpStatus = Lens.lens (\DescribeKeywordsResponse' {httpStatus} -> httpStatus) (\s@DescribeKeywordsResponse' {} a -> s {httpStatus = a} :: DescribeKeywordsResponse)++instance Prelude.NFData DescribeKeywordsResponse where+ rnf DescribeKeywordsResponse' {..} =+ Prelude.rnf keywords+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf originationIdentityArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DescribeOptOutLists.hs view
@@ -0,0 +1,255 @@+{-# 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.PinpointSmsVoiceV2.DescribeOptOutLists+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes the specified opt-out list or all opt-out lists in your+-- account.+--+-- If you specify opt-out list names, the output includes information for+-- only the specified opt-out lists. Opt-out lists include only those that+-- meet the filter criteria. If you don\'t specify opt-out list names or+-- filters, the output includes information for all opt-out lists.+--+-- If you specify an opt-out list name that isn\'t valid, an Error is+-- returned.+--+-- This operation returns paginated results.+module Amazonka.PinpointSmsVoiceV2.DescribeOptOutLists+ ( -- * Creating a Request+ DescribeOptOutLists (..),+ newDescribeOptOutLists,++ -- * Request Lenses+ describeOptOutLists_maxResults,+ describeOptOutLists_nextToken,+ describeOptOutLists_optOutListNames,++ -- * Destructuring the Response+ DescribeOptOutListsResponse (..),+ newDescribeOptOutListsResponse,++ -- * Response Lenses+ describeOptOutListsResponse_nextToken,+ describeOptOutListsResponse_optOutLists,+ describeOptOutListsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeOptOutLists' smart constructor.+data DescribeOptOutLists = DescribeOptOutLists'+ { -- | The maximum number of results to return per each request.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to be used for the next set of paginated results. You don\'t+ -- need to supply a value for this field in the initial request.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The OptOutLists to show the details of. This is an array of strings that+ -- can be either the OptOutListName or OptOutListArn.+ optOutListNames :: Prelude.Maybe [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeOptOutLists' 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', 'describeOptOutLists_maxResults' - The maximum number of results to return per each request.+--+-- 'nextToken', 'describeOptOutLists_nextToken' - The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+--+-- 'optOutListNames', 'describeOptOutLists_optOutListNames' - The OptOutLists to show the details of. This is an array of strings that+-- can be either the OptOutListName or OptOutListArn.+newDescribeOptOutLists ::+ DescribeOptOutLists+newDescribeOptOutLists =+ DescribeOptOutLists'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ optOutListNames = Prelude.Nothing+ }++-- | The maximum number of results to return per each request.+describeOptOutLists_maxResults :: Lens.Lens' DescribeOptOutLists (Prelude.Maybe Prelude.Natural)+describeOptOutLists_maxResults = Lens.lens (\DescribeOptOutLists' {maxResults} -> maxResults) (\s@DescribeOptOutLists' {} a -> s {maxResults = a} :: DescribeOptOutLists)++-- | The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+describeOptOutLists_nextToken :: Lens.Lens' DescribeOptOutLists (Prelude.Maybe Prelude.Text)+describeOptOutLists_nextToken = Lens.lens (\DescribeOptOutLists' {nextToken} -> nextToken) (\s@DescribeOptOutLists' {} a -> s {nextToken = a} :: DescribeOptOutLists)++-- | The OptOutLists to show the details of. This is an array of strings that+-- can be either the OptOutListName or OptOutListArn.+describeOptOutLists_optOutListNames :: Lens.Lens' DescribeOptOutLists (Prelude.Maybe [Prelude.Text])+describeOptOutLists_optOutListNames = Lens.lens (\DescribeOptOutLists' {optOutListNames} -> optOutListNames) (\s@DescribeOptOutLists' {} a -> s {optOutListNames = a} :: DescribeOptOutLists) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSPager DescribeOptOutLists where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? describeOptOutListsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? describeOptOutListsResponse_optOutLists+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& describeOptOutLists_nextToken+ Lens..~ rs+ Lens.^? describeOptOutListsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest DescribeOptOutLists where+ type+ AWSResponse DescribeOptOutLists =+ DescribeOptOutListsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeOptOutListsResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "OptOutLists" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeOptOutLists where+ hashWithSalt _salt DescribeOptOutLists' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` optOutListNames++instance Prelude.NFData DescribeOptOutLists where+ rnf DescribeOptOutLists' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf optOutListNames++instance Data.ToHeaders DescribeOptOutLists where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DescribeOptOutLists" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribeOptOutLists where+ toJSON DescribeOptOutLists' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ ("OptOutListNames" Data..=)+ Prelude.<$> optOutListNames+ ]+ )++instance Data.ToPath DescribeOptOutLists where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribeOptOutLists where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeOptOutListsResponse' smart constructor.+data DescribeOptOutListsResponse = DescribeOptOutListsResponse'+ { -- | The token to be used for the next set of paginated results. If this+ -- field is empty then there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | An array of OptOutListInformation objects that contain the details for+ -- the requested OptOutLists.+ optOutLists :: Prelude.Maybe [OptOutListInformation],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeOptOutListsResponse' 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', 'describeOptOutListsResponse_nextToken' - The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+--+-- 'optOutLists', 'describeOptOutListsResponse_optOutLists' - An array of OptOutListInformation objects that contain the details for+-- the requested OptOutLists.+--+-- 'httpStatus', 'describeOptOutListsResponse_httpStatus' - The response's http status code.+newDescribeOptOutListsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeOptOutListsResponse+newDescribeOptOutListsResponse pHttpStatus_ =+ DescribeOptOutListsResponse'+ { nextToken =+ Prelude.Nothing,+ optOutLists = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+describeOptOutListsResponse_nextToken :: Lens.Lens' DescribeOptOutListsResponse (Prelude.Maybe Prelude.Text)+describeOptOutListsResponse_nextToken = Lens.lens (\DescribeOptOutListsResponse' {nextToken} -> nextToken) (\s@DescribeOptOutListsResponse' {} a -> s {nextToken = a} :: DescribeOptOutListsResponse)++-- | An array of OptOutListInformation objects that contain the details for+-- the requested OptOutLists.+describeOptOutListsResponse_optOutLists :: Lens.Lens' DescribeOptOutListsResponse (Prelude.Maybe [OptOutListInformation])+describeOptOutListsResponse_optOutLists = Lens.lens (\DescribeOptOutListsResponse' {optOutLists} -> optOutLists) (\s@DescribeOptOutListsResponse' {} a -> s {optOutLists = a} :: DescribeOptOutListsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+describeOptOutListsResponse_httpStatus :: Lens.Lens' DescribeOptOutListsResponse Prelude.Int+describeOptOutListsResponse_httpStatus = Lens.lens (\DescribeOptOutListsResponse' {httpStatus} -> httpStatus) (\s@DescribeOptOutListsResponse' {} a -> s {httpStatus = a} :: DescribeOptOutListsResponse)++instance Prelude.NFData DescribeOptOutListsResponse where+ rnf DescribeOptOutListsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf optOutLists+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DescribeOptedOutNumbers.hs view
@@ -0,0 +1,319 @@+{-# 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.PinpointSmsVoiceV2.DescribeOptedOutNumbers+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes the specified opted out destination numbers or all opted out+-- destination numbers in an opt-out list.+--+-- If you specify opted out numbers, the output includes information for+-- only the specified opted out numbers. If you specify filters, the output+-- includes information for only those opted out numbers that meet the+-- filter criteria. If you don\'t specify opted out numbers or filters, the+-- output includes information for all opted out destination numbers in+-- your opt-out list.+--+-- If you specify an opted out number that isn\'t valid, an Error is+-- returned.+--+-- This operation returns paginated results.+module Amazonka.PinpointSmsVoiceV2.DescribeOptedOutNumbers+ ( -- * Creating a Request+ DescribeOptedOutNumbers (..),+ newDescribeOptedOutNumbers,++ -- * Request Lenses+ describeOptedOutNumbers_filters,+ describeOptedOutNumbers_maxResults,+ describeOptedOutNumbers_nextToken,+ describeOptedOutNumbers_optedOutNumbers,+ describeOptedOutNumbers_optOutListName,++ -- * Destructuring the Response+ DescribeOptedOutNumbersResponse (..),+ newDescribeOptedOutNumbersResponse,++ -- * Response Lenses+ describeOptedOutNumbersResponse_nextToken,+ describeOptedOutNumbersResponse_optOutListArn,+ describeOptedOutNumbersResponse_optOutListName,+ describeOptedOutNumbersResponse_optedOutNumbers,+ describeOptedOutNumbersResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeOptedOutNumbers' smart constructor.+data DescribeOptedOutNumbers = DescribeOptedOutNumbers'+ { -- | An array of OptedOutFilter objects to filter the results on.+ filters :: Prelude.Maybe [OptedOutFilter],+ -- | The maximum number of results to return per each request.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to be used for the next set of paginated results. You don\'t+ -- need to supply a value for this field in the initial request.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | An array of phone numbers to search for in the OptOutList.+ optedOutNumbers :: Prelude.Maybe [Prelude.Text],+ -- | The OptOutListName or OptOutListArn of the OptOutList. You can use+ -- DescribeOptOutLists to find the values for OptOutListName and+ -- OptOutListArn.+ optOutListName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeOptedOutNumbers' 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:+--+-- 'filters', 'describeOptedOutNumbers_filters' - An array of OptedOutFilter objects to filter the results on.+--+-- 'maxResults', 'describeOptedOutNumbers_maxResults' - The maximum number of results to return per each request.+--+-- 'nextToken', 'describeOptedOutNumbers_nextToken' - The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+--+-- 'optedOutNumbers', 'describeOptedOutNumbers_optedOutNumbers' - An array of phone numbers to search for in the OptOutList.+--+-- 'optOutListName', 'describeOptedOutNumbers_optOutListName' - The OptOutListName or OptOutListArn of the OptOutList. You can use+-- DescribeOptOutLists to find the values for OptOutListName and+-- OptOutListArn.+newDescribeOptedOutNumbers ::+ -- | 'optOutListName'+ Prelude.Text ->+ DescribeOptedOutNumbers+newDescribeOptedOutNumbers pOptOutListName_ =+ DescribeOptedOutNumbers'+ { filters = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ optedOutNumbers = Prelude.Nothing,+ optOutListName = pOptOutListName_+ }++-- | An array of OptedOutFilter objects to filter the results on.+describeOptedOutNumbers_filters :: Lens.Lens' DescribeOptedOutNumbers (Prelude.Maybe [OptedOutFilter])+describeOptedOutNumbers_filters = Lens.lens (\DescribeOptedOutNumbers' {filters} -> filters) (\s@DescribeOptedOutNumbers' {} a -> s {filters = a} :: DescribeOptedOutNumbers) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of results to return per each request.+describeOptedOutNumbers_maxResults :: Lens.Lens' DescribeOptedOutNumbers (Prelude.Maybe Prelude.Natural)+describeOptedOutNumbers_maxResults = Lens.lens (\DescribeOptedOutNumbers' {maxResults} -> maxResults) (\s@DescribeOptedOutNumbers' {} a -> s {maxResults = a} :: DescribeOptedOutNumbers)++-- | The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+describeOptedOutNumbers_nextToken :: Lens.Lens' DescribeOptedOutNumbers (Prelude.Maybe Prelude.Text)+describeOptedOutNumbers_nextToken = Lens.lens (\DescribeOptedOutNumbers' {nextToken} -> nextToken) (\s@DescribeOptedOutNumbers' {} a -> s {nextToken = a} :: DescribeOptedOutNumbers)++-- | An array of phone numbers to search for in the OptOutList.+describeOptedOutNumbers_optedOutNumbers :: Lens.Lens' DescribeOptedOutNumbers (Prelude.Maybe [Prelude.Text])+describeOptedOutNumbers_optedOutNumbers = Lens.lens (\DescribeOptedOutNumbers' {optedOutNumbers} -> optedOutNumbers) (\s@DescribeOptedOutNumbers' {} a -> s {optedOutNumbers = a} :: DescribeOptedOutNumbers) Prelude.. Lens.mapping Lens.coerced++-- | The OptOutListName or OptOutListArn of the OptOutList. You can use+-- DescribeOptOutLists to find the values for OptOutListName and+-- OptOutListArn.+describeOptedOutNumbers_optOutListName :: Lens.Lens' DescribeOptedOutNumbers Prelude.Text+describeOptedOutNumbers_optOutListName = Lens.lens (\DescribeOptedOutNumbers' {optOutListName} -> optOutListName) (\s@DescribeOptedOutNumbers' {} a -> s {optOutListName = a} :: DescribeOptedOutNumbers)++instance Core.AWSPager DescribeOptedOutNumbers where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? describeOptedOutNumbersResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? describeOptedOutNumbersResponse_optedOutNumbers+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& describeOptedOutNumbers_nextToken+ Lens..~ rs+ Lens.^? describeOptedOutNumbersResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest DescribeOptedOutNumbers where+ type+ AWSResponse DescribeOptedOutNumbers =+ DescribeOptedOutNumbersResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeOptedOutNumbersResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "OptOutListArn")+ Prelude.<*> (x Data..?> "OptOutListName")+ Prelude.<*> ( x+ Data..?> "OptedOutNumbers"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeOptedOutNumbers where+ hashWithSalt _salt DescribeOptedOutNumbers' {..} =+ _salt+ `Prelude.hashWithSalt` filters+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` optedOutNumbers+ `Prelude.hashWithSalt` optOutListName++instance Prelude.NFData DescribeOptedOutNumbers where+ rnf DescribeOptedOutNumbers' {..} =+ Prelude.rnf filters+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf optedOutNumbers+ `Prelude.seq` Prelude.rnf optOutListName++instance Data.ToHeaders DescribeOptedOutNumbers where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DescribeOptedOutNumbers" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribeOptedOutNumbers where+ toJSON DescribeOptedOutNumbers' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Filters" Data..=) Prelude.<$> filters,+ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ ("OptedOutNumbers" Data..=)+ Prelude.<$> optedOutNumbers,+ Prelude.Just+ ("OptOutListName" Data..= optOutListName)+ ]+ )++instance Data.ToPath DescribeOptedOutNumbers where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribeOptedOutNumbers where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeOptedOutNumbersResponse' smart constructor.+data DescribeOptedOutNumbersResponse = DescribeOptedOutNumbersResponse'+ { -- | The token to be used for the next set of paginated results. If this+ -- field is empty then there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the OptOutList.+ optOutListArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the OptOutList.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | An array of OptedOutNumbersInformation objects that provide information+ -- about the requested OptedOutNumbers.+ optedOutNumbers :: Prelude.Maybe [OptedOutNumberInformation],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeOptedOutNumbersResponse' 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', 'describeOptedOutNumbersResponse_nextToken' - The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+--+-- 'optOutListArn', 'describeOptedOutNumbersResponse_optOutListArn' - The Amazon Resource Name (ARN) of the OptOutList.+--+-- 'optOutListName', 'describeOptedOutNumbersResponse_optOutListName' - The name of the OptOutList.+--+-- 'optedOutNumbers', 'describeOptedOutNumbersResponse_optedOutNumbers' - An array of OptedOutNumbersInformation objects that provide information+-- about the requested OptedOutNumbers.+--+-- 'httpStatus', 'describeOptedOutNumbersResponse_httpStatus' - The response's http status code.+newDescribeOptedOutNumbersResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeOptedOutNumbersResponse+newDescribeOptedOutNumbersResponse pHttpStatus_ =+ DescribeOptedOutNumbersResponse'+ { nextToken =+ Prelude.Nothing,+ optOutListArn = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ optedOutNumbers = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+describeOptedOutNumbersResponse_nextToken :: Lens.Lens' DescribeOptedOutNumbersResponse (Prelude.Maybe Prelude.Text)+describeOptedOutNumbersResponse_nextToken = Lens.lens (\DescribeOptedOutNumbersResponse' {nextToken} -> nextToken) (\s@DescribeOptedOutNumbersResponse' {} a -> s {nextToken = a} :: DescribeOptedOutNumbersResponse)++-- | The Amazon Resource Name (ARN) of the OptOutList.+describeOptedOutNumbersResponse_optOutListArn :: Lens.Lens' DescribeOptedOutNumbersResponse (Prelude.Maybe Prelude.Text)+describeOptedOutNumbersResponse_optOutListArn = Lens.lens (\DescribeOptedOutNumbersResponse' {optOutListArn} -> optOutListArn) (\s@DescribeOptedOutNumbersResponse' {} a -> s {optOutListArn = a} :: DescribeOptedOutNumbersResponse)++-- | The name of the OptOutList.+describeOptedOutNumbersResponse_optOutListName :: Lens.Lens' DescribeOptedOutNumbersResponse (Prelude.Maybe Prelude.Text)+describeOptedOutNumbersResponse_optOutListName = Lens.lens (\DescribeOptedOutNumbersResponse' {optOutListName} -> optOutListName) (\s@DescribeOptedOutNumbersResponse' {} a -> s {optOutListName = a} :: DescribeOptedOutNumbersResponse)++-- | An array of OptedOutNumbersInformation objects that provide information+-- about the requested OptedOutNumbers.+describeOptedOutNumbersResponse_optedOutNumbers :: Lens.Lens' DescribeOptedOutNumbersResponse (Prelude.Maybe [OptedOutNumberInformation])+describeOptedOutNumbersResponse_optedOutNumbers = Lens.lens (\DescribeOptedOutNumbersResponse' {optedOutNumbers} -> optedOutNumbers) (\s@DescribeOptedOutNumbersResponse' {} a -> s {optedOutNumbers = a} :: DescribeOptedOutNumbersResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+describeOptedOutNumbersResponse_httpStatus :: Lens.Lens' DescribeOptedOutNumbersResponse Prelude.Int+describeOptedOutNumbersResponse_httpStatus = Lens.lens (\DescribeOptedOutNumbersResponse' {httpStatus} -> httpStatus) (\s@DescribeOptedOutNumbersResponse' {} a -> s {httpStatus = a} :: DescribeOptedOutNumbersResponse)++instance+ Prelude.NFData+ DescribeOptedOutNumbersResponse+ where+ rnf DescribeOptedOutNumbersResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf optOutListArn+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf optedOutNumbers+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DescribePhoneNumbers.hs view
@@ -0,0 +1,272 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.DescribePhoneNumbers+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes the specified origination phone number, or all the phone+-- numbers in your account.+--+-- If you specify phone number IDs, the output includes information for+-- only the specified phone numbers. If you specify filters, the output+-- includes information for only those phone numbers that meet the filter+-- criteria. If you don\'t specify phone number IDs or filters, the output+-- includes information for all phone numbers.+--+-- If you specify a phone number ID that isn\'t valid, an Error is+-- returned.+--+-- This operation returns paginated results.+module Amazonka.PinpointSmsVoiceV2.DescribePhoneNumbers+ ( -- * Creating a Request+ DescribePhoneNumbers (..),+ newDescribePhoneNumbers,++ -- * Request Lenses+ describePhoneNumbers_filters,+ describePhoneNumbers_maxResults,+ describePhoneNumbers_nextToken,+ describePhoneNumbers_phoneNumberIds,++ -- * Destructuring the Response+ DescribePhoneNumbersResponse (..),+ newDescribePhoneNumbersResponse,++ -- * Response Lenses+ describePhoneNumbersResponse_nextToken,+ describePhoneNumbersResponse_phoneNumbers,+ describePhoneNumbersResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribePhoneNumbers' smart constructor.+data DescribePhoneNumbers = DescribePhoneNumbers'+ { -- | An array of PhoneNumberFilter objects to filter the results.+ filters :: Prelude.Maybe [PhoneNumberFilter],+ -- | The maximum number of results to return per each request.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to be used for the next set of paginated results. You don\'t+ -- need to supply a value for this field in the initial request.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier of phone numbers to find information about. This+ -- is an array of strings that can be either the PhoneNumberId or+ -- PhoneNumberArn.+ phoneNumberIds :: Prelude.Maybe [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribePhoneNumbers' 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:+--+-- 'filters', 'describePhoneNumbers_filters' - An array of PhoneNumberFilter objects to filter the results.+--+-- 'maxResults', 'describePhoneNumbers_maxResults' - The maximum number of results to return per each request.+--+-- 'nextToken', 'describePhoneNumbers_nextToken' - The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+--+-- 'phoneNumberIds', 'describePhoneNumbers_phoneNumberIds' - The unique identifier of phone numbers to find information about. This+-- is an array of strings that can be either the PhoneNumberId or+-- PhoneNumberArn.+newDescribePhoneNumbers ::+ DescribePhoneNumbers+newDescribePhoneNumbers =+ DescribePhoneNumbers'+ { filters = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ phoneNumberIds = Prelude.Nothing+ }++-- | An array of PhoneNumberFilter objects to filter the results.+describePhoneNumbers_filters :: Lens.Lens' DescribePhoneNumbers (Prelude.Maybe [PhoneNumberFilter])+describePhoneNumbers_filters = Lens.lens (\DescribePhoneNumbers' {filters} -> filters) (\s@DescribePhoneNumbers' {} a -> s {filters = a} :: DescribePhoneNumbers) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of results to return per each request.+describePhoneNumbers_maxResults :: Lens.Lens' DescribePhoneNumbers (Prelude.Maybe Prelude.Natural)+describePhoneNumbers_maxResults = Lens.lens (\DescribePhoneNumbers' {maxResults} -> maxResults) (\s@DescribePhoneNumbers' {} a -> s {maxResults = a} :: DescribePhoneNumbers)++-- | The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+describePhoneNumbers_nextToken :: Lens.Lens' DescribePhoneNumbers (Prelude.Maybe Prelude.Text)+describePhoneNumbers_nextToken = Lens.lens (\DescribePhoneNumbers' {nextToken} -> nextToken) (\s@DescribePhoneNumbers' {} a -> s {nextToken = a} :: DescribePhoneNumbers)++-- | The unique identifier of phone numbers to find information about. This+-- is an array of strings that can be either the PhoneNumberId or+-- PhoneNumberArn.+describePhoneNumbers_phoneNumberIds :: Lens.Lens' DescribePhoneNumbers (Prelude.Maybe [Prelude.Text])+describePhoneNumbers_phoneNumberIds = Lens.lens (\DescribePhoneNumbers' {phoneNumberIds} -> phoneNumberIds) (\s@DescribePhoneNumbers' {} a -> s {phoneNumberIds = a} :: DescribePhoneNumbers) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSPager DescribePhoneNumbers where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? describePhoneNumbersResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? describePhoneNumbersResponse_phoneNumbers+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& describePhoneNumbers_nextToken+ Lens..~ rs+ Lens.^? describePhoneNumbersResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest DescribePhoneNumbers where+ type+ AWSResponse DescribePhoneNumbers =+ DescribePhoneNumbersResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribePhoneNumbersResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "PhoneNumbers" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribePhoneNumbers where+ hashWithSalt _salt DescribePhoneNumbers' {..} =+ _salt+ `Prelude.hashWithSalt` filters+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` phoneNumberIds++instance Prelude.NFData DescribePhoneNumbers where+ rnf DescribePhoneNumbers' {..} =+ Prelude.rnf filters+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf phoneNumberIds++instance Data.ToHeaders DescribePhoneNumbers where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DescribePhoneNumbers" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribePhoneNumbers where+ toJSON DescribePhoneNumbers' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Filters" Data..=) Prelude.<$> filters,+ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ ("PhoneNumberIds" Data..=)+ Prelude.<$> phoneNumberIds+ ]+ )++instance Data.ToPath DescribePhoneNumbers where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribePhoneNumbers where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribePhoneNumbersResponse' smart constructor.+data DescribePhoneNumbersResponse = DescribePhoneNumbersResponse'+ { -- | The token to be used for the next set of paginated results. If this+ -- field is empty then there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | An array of PhoneNumberInformation objects that contain the details for+ -- the requested phone numbers.+ phoneNumbers :: Prelude.Maybe [PhoneNumberInformation],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribePhoneNumbersResponse' 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', 'describePhoneNumbersResponse_nextToken' - The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+--+-- 'phoneNumbers', 'describePhoneNumbersResponse_phoneNumbers' - An array of PhoneNumberInformation objects that contain the details for+-- the requested phone numbers.+--+-- 'httpStatus', 'describePhoneNumbersResponse_httpStatus' - The response's http status code.+newDescribePhoneNumbersResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribePhoneNumbersResponse+newDescribePhoneNumbersResponse pHttpStatus_ =+ DescribePhoneNumbersResponse'+ { nextToken =+ Prelude.Nothing,+ phoneNumbers = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+describePhoneNumbersResponse_nextToken :: Lens.Lens' DescribePhoneNumbersResponse (Prelude.Maybe Prelude.Text)+describePhoneNumbersResponse_nextToken = Lens.lens (\DescribePhoneNumbersResponse' {nextToken} -> nextToken) (\s@DescribePhoneNumbersResponse' {} a -> s {nextToken = a} :: DescribePhoneNumbersResponse)++-- | An array of PhoneNumberInformation objects that contain the details for+-- the requested phone numbers.+describePhoneNumbersResponse_phoneNumbers :: Lens.Lens' DescribePhoneNumbersResponse (Prelude.Maybe [PhoneNumberInformation])+describePhoneNumbersResponse_phoneNumbers = Lens.lens (\DescribePhoneNumbersResponse' {phoneNumbers} -> phoneNumbers) (\s@DescribePhoneNumbersResponse' {} a -> s {phoneNumbers = a} :: DescribePhoneNumbersResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+describePhoneNumbersResponse_httpStatus :: Lens.Lens' DescribePhoneNumbersResponse Prelude.Int+describePhoneNumbersResponse_httpStatus = Lens.lens (\DescribePhoneNumbersResponse' {httpStatus} -> httpStatus) (\s@DescribePhoneNumbersResponse' {} a -> s {httpStatus = a} :: DescribePhoneNumbersResponse)++instance Prelude.NFData DescribePhoneNumbersResponse where+ rnf DescribePhoneNumbersResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf phoneNumbers+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DescribePools.hs view
@@ -0,0 +1,270 @@+{-# 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.PinpointSmsVoiceV2.DescribePools+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the specified pools or all pools associated with your Amazon+-- Web Services account.+--+-- If you specify pool IDs, the output includes information for only the+-- specified pools. If you specify filters, the output includes information+-- for only those pools that meet the filter criteria. If you don\'t+-- specify pool IDs or filters, the output includes information for all+-- pools.+--+-- If you specify a pool ID that isn\'t valid, an Error is returned.+--+-- A pool is a collection of phone numbers and SenderIds. A pool can+-- include one or more phone numbers and SenderIds that are associated with+-- your Amazon Web Services account.+--+-- This operation returns paginated results.+module Amazonka.PinpointSmsVoiceV2.DescribePools+ ( -- * Creating a Request+ DescribePools (..),+ newDescribePools,++ -- * Request Lenses+ describePools_filters,+ describePools_maxResults,+ describePools_nextToken,+ describePools_poolIds,++ -- * Destructuring the Response+ DescribePoolsResponse (..),+ newDescribePoolsResponse,++ -- * Response Lenses+ describePoolsResponse_nextToken,+ describePoolsResponse_pools,+ describePoolsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribePools' smart constructor.+data DescribePools = DescribePools'+ { -- | An array of PoolFilter objects to filter the results.+ filters :: Prelude.Maybe [PoolFilter],+ -- | The maximum number of results to return per each request.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to be used for the next set of paginated results. You don\'t+ -- need to supply a value for this field in the initial request.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier of pools to find. This is an array of strings that+ -- can be either the PoolId or PoolArn.+ poolIds :: Prelude.Maybe [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribePools' 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:+--+-- 'filters', 'describePools_filters' - An array of PoolFilter objects to filter the results.+--+-- 'maxResults', 'describePools_maxResults' - The maximum number of results to return per each request.+--+-- 'nextToken', 'describePools_nextToken' - The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+--+-- 'poolIds', 'describePools_poolIds' - The unique identifier of pools to find. This is an array of strings that+-- can be either the PoolId or PoolArn.+newDescribePools ::+ DescribePools+newDescribePools =+ DescribePools'+ { filters = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ poolIds = Prelude.Nothing+ }++-- | An array of PoolFilter objects to filter the results.+describePools_filters :: Lens.Lens' DescribePools (Prelude.Maybe [PoolFilter])+describePools_filters = Lens.lens (\DescribePools' {filters} -> filters) (\s@DescribePools' {} a -> s {filters = a} :: DescribePools) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of results to return per each request.+describePools_maxResults :: Lens.Lens' DescribePools (Prelude.Maybe Prelude.Natural)+describePools_maxResults = Lens.lens (\DescribePools' {maxResults} -> maxResults) (\s@DescribePools' {} a -> s {maxResults = a} :: DescribePools)++-- | The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+describePools_nextToken :: Lens.Lens' DescribePools (Prelude.Maybe Prelude.Text)+describePools_nextToken = Lens.lens (\DescribePools' {nextToken} -> nextToken) (\s@DescribePools' {} a -> s {nextToken = a} :: DescribePools)++-- | The unique identifier of pools to find. This is an array of strings that+-- can be either the PoolId or PoolArn.+describePools_poolIds :: Lens.Lens' DescribePools (Prelude.Maybe [Prelude.Text])+describePools_poolIds = Lens.lens (\DescribePools' {poolIds} -> poolIds) (\s@DescribePools' {} a -> s {poolIds = a} :: DescribePools) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSPager DescribePools where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? describePoolsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? describePoolsResponse_pools+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& describePools_nextToken+ Lens..~ rs+ Lens.^? describePoolsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest DescribePools where+ type+ AWSResponse DescribePools =+ DescribePoolsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribePoolsResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "Pools" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribePools where+ hashWithSalt _salt DescribePools' {..} =+ _salt+ `Prelude.hashWithSalt` filters+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` poolIds++instance Prelude.NFData DescribePools where+ rnf DescribePools' {..} =+ Prelude.rnf filters+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf poolIds++instance Data.ToHeaders DescribePools where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DescribePools" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribePools where+ toJSON DescribePools' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Filters" Data..=) Prelude.<$> filters,+ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ ("PoolIds" Data..=) Prelude.<$> poolIds+ ]+ )++instance Data.ToPath DescribePools where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribePools where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribePoolsResponse' smart constructor.+data DescribePoolsResponse = DescribePoolsResponse'+ { -- | The token to be used for the next set of paginated results. If this+ -- field is empty then there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | An array of PoolInformation objects that contain the details for the+ -- requested pools.+ pools :: Prelude.Maybe [PoolInformation],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribePoolsResponse' 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', 'describePoolsResponse_nextToken' - The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+--+-- 'pools', 'describePoolsResponse_pools' - An array of PoolInformation objects that contain the details for the+-- requested pools.+--+-- 'httpStatus', 'describePoolsResponse_httpStatus' - The response's http status code.+newDescribePoolsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribePoolsResponse+newDescribePoolsResponse pHttpStatus_ =+ DescribePoolsResponse'+ { nextToken = Prelude.Nothing,+ pools = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+describePoolsResponse_nextToken :: Lens.Lens' DescribePoolsResponse (Prelude.Maybe Prelude.Text)+describePoolsResponse_nextToken = Lens.lens (\DescribePoolsResponse' {nextToken} -> nextToken) (\s@DescribePoolsResponse' {} a -> s {nextToken = a} :: DescribePoolsResponse)++-- | An array of PoolInformation objects that contain the details for the+-- requested pools.+describePoolsResponse_pools :: Lens.Lens' DescribePoolsResponse (Prelude.Maybe [PoolInformation])+describePoolsResponse_pools = Lens.lens (\DescribePoolsResponse' {pools} -> pools) (\s@DescribePoolsResponse' {} a -> s {pools = a} :: DescribePoolsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+describePoolsResponse_httpStatus :: Lens.Lens' DescribePoolsResponse Prelude.Int+describePoolsResponse_httpStatus = Lens.lens (\DescribePoolsResponse' {httpStatus} -> httpStatus) (\s@DescribePoolsResponse' {} a -> s {httpStatus = a} :: DescribePoolsResponse)++instance Prelude.NFData DescribePoolsResponse where+ rnf DescribePoolsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf pools+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DescribeSenderIds.hs view
@@ -0,0 +1,264 @@+{-# 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.PinpointSmsVoiceV2.DescribeSenderIds+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes the specified SenderIds or all SenderIds associated with your+-- Amazon Web Services account.+--+-- If you specify SenderIds, the output includes information for only the+-- specified SenderIds. If you specify filters, the output includes+-- information for only those SenderIds that meet the filter criteria. If+-- you don\'t specify SenderIds or filters, the output includes information+-- for all SenderIds.+--+-- f you specify a sender ID that isn\'t valid, an Error is returned.+--+-- This operation returns paginated results.+module Amazonka.PinpointSmsVoiceV2.DescribeSenderIds+ ( -- * Creating a Request+ DescribeSenderIds (..),+ newDescribeSenderIds,++ -- * Request Lenses+ describeSenderIds_filters,+ describeSenderIds_maxResults,+ describeSenderIds_nextToken,+ describeSenderIds_senderIds,++ -- * Destructuring the Response+ DescribeSenderIdsResponse (..),+ newDescribeSenderIdsResponse,++ -- * Response Lenses+ describeSenderIdsResponse_nextToken,+ describeSenderIdsResponse_senderIds,+ describeSenderIdsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeSenderIds' smart constructor.+data DescribeSenderIds = DescribeSenderIds'+ { -- | An array of SenderIdFilter objects to filter the results.+ filters :: Prelude.Maybe [SenderIdFilter],+ -- | The maximum number of results to return per each request.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to be used for the next set of paginated results. You don\'t+ -- need to supply a value for this field in the initial request.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | An array of SenderIdAndCountry objects to search for.+ senderIds :: Prelude.Maybe [SenderIdAndCountry]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeSenderIds' 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:+--+-- 'filters', 'describeSenderIds_filters' - An array of SenderIdFilter objects to filter the results.+--+-- 'maxResults', 'describeSenderIds_maxResults' - The maximum number of results to return per each request.+--+-- 'nextToken', 'describeSenderIds_nextToken' - The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+--+-- 'senderIds', 'describeSenderIds_senderIds' - An array of SenderIdAndCountry objects to search for.+newDescribeSenderIds ::+ DescribeSenderIds+newDescribeSenderIds =+ DescribeSenderIds'+ { filters = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ senderIds = Prelude.Nothing+ }++-- | An array of SenderIdFilter objects to filter the results.+describeSenderIds_filters :: Lens.Lens' DescribeSenderIds (Prelude.Maybe [SenderIdFilter])+describeSenderIds_filters = Lens.lens (\DescribeSenderIds' {filters} -> filters) (\s@DescribeSenderIds' {} a -> s {filters = a} :: DescribeSenderIds) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of results to return per each request.+describeSenderIds_maxResults :: Lens.Lens' DescribeSenderIds (Prelude.Maybe Prelude.Natural)+describeSenderIds_maxResults = Lens.lens (\DescribeSenderIds' {maxResults} -> maxResults) (\s@DescribeSenderIds' {} a -> s {maxResults = a} :: DescribeSenderIds)++-- | The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+describeSenderIds_nextToken :: Lens.Lens' DescribeSenderIds (Prelude.Maybe Prelude.Text)+describeSenderIds_nextToken = Lens.lens (\DescribeSenderIds' {nextToken} -> nextToken) (\s@DescribeSenderIds' {} a -> s {nextToken = a} :: DescribeSenderIds)++-- | An array of SenderIdAndCountry objects to search for.+describeSenderIds_senderIds :: Lens.Lens' DescribeSenderIds (Prelude.Maybe [SenderIdAndCountry])+describeSenderIds_senderIds = Lens.lens (\DescribeSenderIds' {senderIds} -> senderIds) (\s@DescribeSenderIds' {} a -> s {senderIds = a} :: DescribeSenderIds) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSPager DescribeSenderIds where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? describeSenderIdsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? describeSenderIdsResponse_senderIds+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& describeSenderIds_nextToken+ Lens..~ rs+ Lens.^? describeSenderIdsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest DescribeSenderIds where+ type+ AWSResponse DescribeSenderIds =+ DescribeSenderIdsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeSenderIdsResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "SenderIds" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeSenderIds where+ hashWithSalt _salt DescribeSenderIds' {..} =+ _salt+ `Prelude.hashWithSalt` filters+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` senderIds++instance Prelude.NFData DescribeSenderIds where+ rnf DescribeSenderIds' {..} =+ Prelude.rnf filters+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf senderIds++instance Data.ToHeaders DescribeSenderIds where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DescribeSenderIds" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribeSenderIds where+ toJSON DescribeSenderIds' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Filters" Data..=) Prelude.<$> filters,+ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ ("SenderIds" Data..=) Prelude.<$> senderIds+ ]+ )++instance Data.ToPath DescribeSenderIds where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribeSenderIds where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeSenderIdsResponse' smart constructor.+data DescribeSenderIdsResponse = DescribeSenderIdsResponse'+ { -- | The token to be used for the next set of paginated results. If this+ -- field is empty then there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | An array of SernderIdInformation objects that contain the details for+ -- the requested SenderIds.+ senderIds :: Prelude.Maybe [SenderIdInformation],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeSenderIdsResponse' 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', 'describeSenderIdsResponse_nextToken' - The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+--+-- 'senderIds', 'describeSenderIdsResponse_senderIds' - An array of SernderIdInformation objects that contain the details for+-- the requested SenderIds.+--+-- 'httpStatus', 'describeSenderIdsResponse_httpStatus' - The response's http status code.+newDescribeSenderIdsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeSenderIdsResponse+newDescribeSenderIdsResponse pHttpStatus_ =+ DescribeSenderIdsResponse'+ { nextToken =+ Prelude.Nothing,+ senderIds = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+describeSenderIdsResponse_nextToken :: Lens.Lens' DescribeSenderIdsResponse (Prelude.Maybe Prelude.Text)+describeSenderIdsResponse_nextToken = Lens.lens (\DescribeSenderIdsResponse' {nextToken} -> nextToken) (\s@DescribeSenderIdsResponse' {} a -> s {nextToken = a} :: DescribeSenderIdsResponse)++-- | An array of SernderIdInformation objects that contain the details for+-- the requested SenderIds.+describeSenderIdsResponse_senderIds :: Lens.Lens' DescribeSenderIdsResponse (Prelude.Maybe [SenderIdInformation])+describeSenderIdsResponse_senderIds = Lens.lens (\DescribeSenderIdsResponse' {senderIds} -> senderIds) (\s@DescribeSenderIdsResponse' {} a -> s {senderIds = a} :: DescribeSenderIdsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+describeSenderIdsResponse_httpStatus :: Lens.Lens' DescribeSenderIdsResponse Prelude.Int+describeSenderIdsResponse_httpStatus = Lens.lens (\DescribeSenderIdsResponse' {httpStatus} -> httpStatus) (\s@DescribeSenderIdsResponse' {} a -> s {httpStatus = a} :: DescribeSenderIdsResponse)++instance Prelude.NFData DescribeSenderIdsResponse where+ rnf DescribeSenderIdsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf senderIds+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DescribeSpendLimits.hs view
@@ -0,0 +1,236 @@+{-# 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.PinpointSmsVoiceV2.DescribeSpendLimits+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes the current Amazon Pinpoint monthly spend limits for sending+-- voice and text messages.+--+-- When you establish an Amazon Web Services account, the account has+-- initial monthly spend limit in a given Region. For more information on+-- increasing your monthly spend limit, see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-awssupport-spend-threshold.html Requesting increases to your monthly SMS spending quota for Amazon Pinpoint>+-- in the /Amazon Pinpoint User Guide/.+--+-- This operation returns paginated results.+module Amazonka.PinpointSmsVoiceV2.DescribeSpendLimits+ ( -- * Creating a Request+ DescribeSpendLimits (..),+ newDescribeSpendLimits,++ -- * Request Lenses+ describeSpendLimits_maxResults,+ describeSpendLimits_nextToken,++ -- * Destructuring the Response+ DescribeSpendLimitsResponse (..),+ newDescribeSpendLimitsResponse,++ -- * Response Lenses+ describeSpendLimitsResponse_nextToken,+ describeSpendLimitsResponse_spendLimits,+ describeSpendLimitsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeSpendLimits' smart constructor.+data DescribeSpendLimits = DescribeSpendLimits'+ { -- | The maximum number of results to return per each request.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to be used for the next set of paginated results. You don\'t+ -- need to supply a value for this field in the initial request.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeSpendLimits' 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', 'describeSpendLimits_maxResults' - The maximum number of results to return per each request.+--+-- 'nextToken', 'describeSpendLimits_nextToken' - The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+newDescribeSpendLimits ::+ DescribeSpendLimits+newDescribeSpendLimits =+ DescribeSpendLimits'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of results to return per each request.+describeSpendLimits_maxResults :: Lens.Lens' DescribeSpendLimits (Prelude.Maybe Prelude.Natural)+describeSpendLimits_maxResults = Lens.lens (\DescribeSpendLimits' {maxResults} -> maxResults) (\s@DescribeSpendLimits' {} a -> s {maxResults = a} :: DescribeSpendLimits)++-- | The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+describeSpendLimits_nextToken :: Lens.Lens' DescribeSpendLimits (Prelude.Maybe Prelude.Text)+describeSpendLimits_nextToken = Lens.lens (\DescribeSpendLimits' {nextToken} -> nextToken) (\s@DescribeSpendLimits' {} a -> s {nextToken = a} :: DescribeSpendLimits)++instance Core.AWSPager DescribeSpendLimits where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? describeSpendLimitsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? describeSpendLimitsResponse_spendLimits+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& describeSpendLimits_nextToken+ Lens..~ rs+ Lens.^? describeSpendLimitsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest DescribeSpendLimits where+ type+ AWSResponse DescribeSpendLimits =+ DescribeSpendLimitsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeSpendLimitsResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "SpendLimits" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeSpendLimits where+ hashWithSalt _salt DescribeSpendLimits' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData DescribeSpendLimits where+ rnf DescribeSpendLimits' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders DescribeSpendLimits where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DescribeSpendLimits" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribeSpendLimits where+ toJSON DescribeSpendLimits' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath DescribeSpendLimits where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribeSpendLimits where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeSpendLimitsResponse' smart constructor.+data DescribeSpendLimitsResponse = DescribeSpendLimitsResponse'+ { -- | The token to be used for the next set of paginated results. If this+ -- field is empty then there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | An array of SpendLimit objects that contain the details for the+ -- requested spend limits.+ spendLimits :: Prelude.Maybe [SpendLimit],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeSpendLimitsResponse' 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', 'describeSpendLimitsResponse_nextToken' - The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+--+-- 'spendLimits', 'describeSpendLimitsResponse_spendLimits' - An array of SpendLimit objects that contain the details for the+-- requested spend limits.+--+-- 'httpStatus', 'describeSpendLimitsResponse_httpStatus' - The response's http status code.+newDescribeSpendLimitsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeSpendLimitsResponse+newDescribeSpendLimitsResponse pHttpStatus_ =+ DescribeSpendLimitsResponse'+ { nextToken =+ Prelude.Nothing,+ spendLimits = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+describeSpendLimitsResponse_nextToken :: Lens.Lens' DescribeSpendLimitsResponse (Prelude.Maybe Prelude.Text)+describeSpendLimitsResponse_nextToken = Lens.lens (\DescribeSpendLimitsResponse' {nextToken} -> nextToken) (\s@DescribeSpendLimitsResponse' {} a -> s {nextToken = a} :: DescribeSpendLimitsResponse)++-- | An array of SpendLimit objects that contain the details for the+-- requested spend limits.+describeSpendLimitsResponse_spendLimits :: Lens.Lens' DescribeSpendLimitsResponse (Prelude.Maybe [SpendLimit])+describeSpendLimitsResponse_spendLimits = Lens.lens (\DescribeSpendLimitsResponse' {spendLimits} -> spendLimits) (\s@DescribeSpendLimitsResponse' {} a -> s {spendLimits = a} :: DescribeSpendLimitsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+describeSpendLimitsResponse_httpStatus :: Lens.Lens' DescribeSpendLimitsResponse Prelude.Int+describeSpendLimitsResponse_httpStatus = Lens.lens (\DescribeSpendLimitsResponse' {httpStatus} -> httpStatus) (\s@DescribeSpendLimitsResponse' {} a -> s {httpStatus = a} :: DescribeSpendLimitsResponse)++instance Prelude.NFData DescribeSpendLimitsResponse where+ rnf DescribeSpendLimitsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf spendLimits+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/DisassociateOriginationIdentity.hs view
@@ -0,0 +1,321 @@+{-# 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.PinpointSmsVoiceV2.DisassociateOriginationIdentity+-- 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 the specified origination identity from an existing pool.+--+-- If the origination identity isn\'t associated with the specified pool,+-- an Error is returned.+module Amazonka.PinpointSmsVoiceV2.DisassociateOriginationIdentity+ ( -- * Creating a Request+ DisassociateOriginationIdentity (..),+ newDisassociateOriginationIdentity,++ -- * Request Lenses+ disassociateOriginationIdentity_clientToken,+ disassociateOriginationIdentity_poolId,+ disassociateOriginationIdentity_originationIdentity,+ disassociateOriginationIdentity_isoCountryCode,++ -- * Destructuring the Response+ DisassociateOriginationIdentityResponse (..),+ newDisassociateOriginationIdentityResponse,++ -- * Response Lenses+ disassociateOriginationIdentityResponse_isoCountryCode,+ disassociateOriginationIdentityResponse_originationIdentity,+ disassociateOriginationIdentityResponse_originationIdentityArn,+ disassociateOriginationIdentityResponse_poolArn,+ disassociateOriginationIdentityResponse_poolId,+ disassociateOriginationIdentityResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDisassociateOriginationIdentity' smart constructor.+data DisassociateOriginationIdentity = DisassociateOriginationIdentity'+ { -- | Unique, case-sensitive identifier you provide to ensure the idempotency+ -- of the request. If you don\'t specify a client token, a randomly+ -- generated token is used for the request to ensure idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier for the pool to disassociate with the origination+ -- identity. This value can be either the PoolId or PoolArn.+ poolId :: Prelude.Text,+ -- | The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+ -- SenderId or SenderIdArn. You can use DescribePhoneNumbers find the+ -- values for PhoneNumberId and PhoneNumberArn, or use DescribeSenderIds to+ -- get the values for SenderId and SenderIdArn.+ originationIdentity :: Prelude.Text,+ -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+ -- region.+ isoCountryCode :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateOriginationIdentity' 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:+--+-- 'clientToken', 'disassociateOriginationIdentity_clientToken' - Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you don\'t specify a client token, a randomly+-- generated token is used for the request to ensure idempotency.+--+-- 'poolId', 'disassociateOriginationIdentity_poolId' - The unique identifier for the pool to disassociate with the origination+-- identity. This value can be either the PoolId or PoolArn.+--+-- 'originationIdentity', 'disassociateOriginationIdentity_originationIdentity' - The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+-- SenderId or SenderIdArn. You can use DescribePhoneNumbers find the+-- values for PhoneNumberId and PhoneNumberArn, or use DescribeSenderIds to+-- get the values for SenderId and SenderIdArn.+--+-- 'isoCountryCode', 'disassociateOriginationIdentity_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+newDisassociateOriginationIdentity ::+ -- | 'poolId'+ Prelude.Text ->+ -- | 'originationIdentity'+ Prelude.Text ->+ -- | 'isoCountryCode'+ Prelude.Text ->+ DisassociateOriginationIdentity+newDisassociateOriginationIdentity+ pPoolId_+ pOriginationIdentity_+ pIsoCountryCode_ =+ DisassociateOriginationIdentity'+ { clientToken =+ Prelude.Nothing,+ poolId = pPoolId_,+ originationIdentity =+ pOriginationIdentity_,+ isoCountryCode = pIsoCountryCode_+ }++-- | Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you don\'t specify a client token, a randomly+-- generated token is used for the request to ensure idempotency.+disassociateOriginationIdentity_clientToken :: Lens.Lens' DisassociateOriginationIdentity (Prelude.Maybe Prelude.Text)+disassociateOriginationIdentity_clientToken = Lens.lens (\DisassociateOriginationIdentity' {clientToken} -> clientToken) (\s@DisassociateOriginationIdentity' {} a -> s {clientToken = a} :: DisassociateOriginationIdentity)++-- | The unique identifier for the pool to disassociate with the origination+-- identity. This value can be either the PoolId or PoolArn.+disassociateOriginationIdentity_poolId :: Lens.Lens' DisassociateOriginationIdentity Prelude.Text+disassociateOriginationIdentity_poolId = Lens.lens (\DisassociateOriginationIdentity' {poolId} -> poolId) (\s@DisassociateOriginationIdentity' {} a -> s {poolId = a} :: DisassociateOriginationIdentity)++-- | The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+-- SenderId or SenderIdArn. You can use DescribePhoneNumbers find the+-- values for PhoneNumberId and PhoneNumberArn, or use DescribeSenderIds to+-- get the values for SenderId and SenderIdArn.+disassociateOriginationIdentity_originationIdentity :: Lens.Lens' DisassociateOriginationIdentity Prelude.Text+disassociateOriginationIdentity_originationIdentity = Lens.lens (\DisassociateOriginationIdentity' {originationIdentity} -> originationIdentity) (\s@DisassociateOriginationIdentity' {} a -> s {originationIdentity = a} :: DisassociateOriginationIdentity)++-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+disassociateOriginationIdentity_isoCountryCode :: Lens.Lens' DisassociateOriginationIdentity Prelude.Text+disassociateOriginationIdentity_isoCountryCode = Lens.lens (\DisassociateOriginationIdentity' {isoCountryCode} -> isoCountryCode) (\s@DisassociateOriginationIdentity' {} a -> s {isoCountryCode = a} :: DisassociateOriginationIdentity)++instance+ Core.AWSRequest+ DisassociateOriginationIdentity+ where+ type+ AWSResponse DisassociateOriginationIdentity =+ DisassociateOriginationIdentityResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DisassociateOriginationIdentityResponse'+ Prelude.<$> (x Data..?> "IsoCountryCode")+ Prelude.<*> (x Data..?> "OriginationIdentity")+ Prelude.<*> (x Data..?> "OriginationIdentityArn")+ Prelude.<*> (x Data..?> "PoolArn")+ Prelude.<*> (x Data..?> "PoolId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ DisassociateOriginationIdentity+ where+ hashWithSalt+ _salt+ DisassociateOriginationIdentity' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` poolId+ `Prelude.hashWithSalt` originationIdentity+ `Prelude.hashWithSalt` isoCountryCode++instance+ Prelude.NFData+ DisassociateOriginationIdentity+ where+ rnf DisassociateOriginationIdentity' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf isoCountryCode++instance+ Data.ToHeaders+ DisassociateOriginationIdentity+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.DisassociateOriginationIdentity" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DisassociateOriginationIdentity where+ toJSON DisassociateOriginationIdentity' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ Prelude.Just ("PoolId" Data..= poolId),+ Prelude.Just+ ("OriginationIdentity" Data..= originationIdentity),+ Prelude.Just+ ("IsoCountryCode" Data..= isoCountryCode)+ ]+ )++instance Data.ToPath DisassociateOriginationIdentity where+ toPath = Prelude.const "/"++instance Data.ToQuery DisassociateOriginationIdentity where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisassociateOriginationIdentityResponse' smart constructor.+data DisassociateOriginationIdentityResponse = DisassociateOriginationIdentityResponse'+ { -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+ -- region.+ isoCountryCode :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberId or SenderId of the origination identity.+ originationIdentity :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberArn or SenderIdArn of the origination identity.+ originationIdentityArn :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the pool.+ poolArn :: Prelude.Maybe Prelude.Text,+ -- | The PoolId of the pool no longer associated with the origination+ -- identity.+ poolId :: 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 'DisassociateOriginationIdentityResponse' 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:+--+-- 'isoCountryCode', 'disassociateOriginationIdentityResponse_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+--+-- 'originationIdentity', 'disassociateOriginationIdentityResponse_originationIdentity' - The PhoneNumberId or SenderId of the origination identity.+--+-- 'originationIdentityArn', 'disassociateOriginationIdentityResponse_originationIdentityArn' - The PhoneNumberArn or SenderIdArn of the origination identity.+--+-- 'poolArn', 'disassociateOriginationIdentityResponse_poolArn' - The Amazon Resource Name (ARN) of the pool.+--+-- 'poolId', 'disassociateOriginationIdentityResponse_poolId' - The PoolId of the pool no longer associated with the origination+-- identity.+--+-- 'httpStatus', 'disassociateOriginationIdentityResponse_httpStatus' - The response's http status code.+newDisassociateOriginationIdentityResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DisassociateOriginationIdentityResponse+newDisassociateOriginationIdentityResponse+ pHttpStatus_ =+ DisassociateOriginationIdentityResponse'+ { isoCountryCode =+ Prelude.Nothing,+ originationIdentity =+ Prelude.Nothing,+ originationIdentityArn =+ Prelude.Nothing,+ poolArn = Prelude.Nothing,+ poolId = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+disassociateOriginationIdentityResponse_isoCountryCode :: Lens.Lens' DisassociateOriginationIdentityResponse (Prelude.Maybe Prelude.Text)+disassociateOriginationIdentityResponse_isoCountryCode = Lens.lens (\DisassociateOriginationIdentityResponse' {isoCountryCode} -> isoCountryCode) (\s@DisassociateOriginationIdentityResponse' {} a -> s {isoCountryCode = a} :: DisassociateOriginationIdentityResponse)++-- | The PhoneNumberId or SenderId of the origination identity.+disassociateOriginationIdentityResponse_originationIdentity :: Lens.Lens' DisassociateOriginationIdentityResponse (Prelude.Maybe Prelude.Text)+disassociateOriginationIdentityResponse_originationIdentity = Lens.lens (\DisassociateOriginationIdentityResponse' {originationIdentity} -> originationIdentity) (\s@DisassociateOriginationIdentityResponse' {} a -> s {originationIdentity = a} :: DisassociateOriginationIdentityResponse)++-- | The PhoneNumberArn or SenderIdArn of the origination identity.+disassociateOriginationIdentityResponse_originationIdentityArn :: Lens.Lens' DisassociateOriginationIdentityResponse (Prelude.Maybe Prelude.Text)+disassociateOriginationIdentityResponse_originationIdentityArn = Lens.lens (\DisassociateOriginationIdentityResponse' {originationIdentityArn} -> originationIdentityArn) (\s@DisassociateOriginationIdentityResponse' {} a -> s {originationIdentityArn = a} :: DisassociateOriginationIdentityResponse)++-- | The Amazon Resource Name (ARN) of the pool.+disassociateOriginationIdentityResponse_poolArn :: Lens.Lens' DisassociateOriginationIdentityResponse (Prelude.Maybe Prelude.Text)+disassociateOriginationIdentityResponse_poolArn = Lens.lens (\DisassociateOriginationIdentityResponse' {poolArn} -> poolArn) (\s@DisassociateOriginationIdentityResponse' {} a -> s {poolArn = a} :: DisassociateOriginationIdentityResponse)++-- | The PoolId of the pool no longer associated with the origination+-- identity.+disassociateOriginationIdentityResponse_poolId :: Lens.Lens' DisassociateOriginationIdentityResponse (Prelude.Maybe Prelude.Text)+disassociateOriginationIdentityResponse_poolId = Lens.lens (\DisassociateOriginationIdentityResponse' {poolId} -> poolId) (\s@DisassociateOriginationIdentityResponse' {} a -> s {poolId = a} :: DisassociateOriginationIdentityResponse)++-- | The response's http status code.+disassociateOriginationIdentityResponse_httpStatus :: Lens.Lens' DisassociateOriginationIdentityResponse Prelude.Int+disassociateOriginationIdentityResponse_httpStatus = Lens.lens (\DisassociateOriginationIdentityResponse' {httpStatus} -> httpStatus) (\s@DisassociateOriginationIdentityResponse' {} a -> s {httpStatus = a} :: DisassociateOriginationIdentityResponse)++instance+ Prelude.NFData+ DisassociateOriginationIdentityResponse+ where+ rnf DisassociateOriginationIdentityResponse' {..} =+ Prelude.rnf isoCountryCode+ `Prelude.seq` Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf originationIdentityArn+ `Prelude.seq` Prelude.rnf poolArn+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/Lens.hs view
@@ -0,0 +1,682 @@+{-# 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.PinpointSmsVoiceV2.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.PinpointSmsVoiceV2.Lens+ ( -- * Operations++ -- ** AssociateOriginationIdentity+ associateOriginationIdentity_clientToken,+ associateOriginationIdentity_poolId,+ associateOriginationIdentity_originationIdentity,+ associateOriginationIdentity_isoCountryCode,+ associateOriginationIdentityResponse_isoCountryCode,+ associateOriginationIdentityResponse_originationIdentity,+ associateOriginationIdentityResponse_originationIdentityArn,+ associateOriginationIdentityResponse_poolArn,+ associateOriginationIdentityResponse_poolId,+ associateOriginationIdentityResponse_httpStatus,++ -- ** CreateConfigurationSet+ createConfigurationSet_clientToken,+ createConfigurationSet_tags,+ createConfigurationSet_configurationSetName,+ createConfigurationSetResponse_configurationSetArn,+ createConfigurationSetResponse_configurationSetName,+ createConfigurationSetResponse_createdTimestamp,+ createConfigurationSetResponse_tags,+ createConfigurationSetResponse_httpStatus,++ -- ** CreateEventDestination+ createEventDestination_clientToken,+ createEventDestination_cloudWatchLogsDestination,+ createEventDestination_kinesisFirehoseDestination,+ createEventDestination_snsDestination,+ createEventDestination_configurationSetName,+ createEventDestination_eventDestinationName,+ createEventDestination_matchingEventTypes,+ createEventDestinationResponse_configurationSetArn,+ createEventDestinationResponse_configurationSetName,+ createEventDestinationResponse_eventDestination,+ createEventDestinationResponse_httpStatus,++ -- ** CreateOptOutList+ createOptOutList_clientToken,+ createOptOutList_tags,+ createOptOutList_optOutListName,+ createOptOutListResponse_createdTimestamp,+ createOptOutListResponse_optOutListArn,+ createOptOutListResponse_optOutListName,+ createOptOutListResponse_tags,+ createOptOutListResponse_httpStatus,++ -- ** CreatePool+ createPool_clientToken,+ createPool_deletionProtectionEnabled,+ createPool_tags,+ createPool_originationIdentity,+ createPool_isoCountryCode,+ createPool_messageType,+ createPoolResponse_createdTimestamp,+ createPoolResponse_deletionProtectionEnabled,+ createPoolResponse_messageType,+ createPoolResponse_optOutListName,+ createPoolResponse_poolArn,+ createPoolResponse_poolId,+ createPoolResponse_selfManagedOptOutsEnabled,+ createPoolResponse_sharedRoutesEnabled,+ createPoolResponse_status,+ createPoolResponse_tags,+ createPoolResponse_twoWayChannelArn,+ createPoolResponse_twoWayEnabled,+ createPoolResponse_httpStatus,++ -- ** DeleteConfigurationSet+ deleteConfigurationSet_configurationSetName,+ deleteConfigurationSetResponse_configurationSetArn,+ deleteConfigurationSetResponse_configurationSetName,+ deleteConfigurationSetResponse_createdTimestamp,+ deleteConfigurationSetResponse_defaultMessageType,+ deleteConfigurationSetResponse_defaultSenderId,+ deleteConfigurationSetResponse_eventDestinations,+ deleteConfigurationSetResponse_httpStatus,++ -- ** DeleteDefaultMessageType+ deleteDefaultMessageType_configurationSetName,+ deleteDefaultMessageTypeResponse_configurationSetArn,+ deleteDefaultMessageTypeResponse_configurationSetName,+ deleteDefaultMessageTypeResponse_messageType,+ deleteDefaultMessageTypeResponse_httpStatus,++ -- ** DeleteDefaultSenderId+ deleteDefaultSenderId_configurationSetName,+ deleteDefaultSenderIdResponse_configurationSetArn,+ deleteDefaultSenderIdResponse_configurationSetName,+ deleteDefaultSenderIdResponse_senderId,+ deleteDefaultSenderIdResponse_httpStatus,++ -- ** DeleteEventDestination+ deleteEventDestination_configurationSetName,+ deleteEventDestination_eventDestinationName,+ deleteEventDestinationResponse_configurationSetArn,+ deleteEventDestinationResponse_configurationSetName,+ deleteEventDestinationResponse_eventDestination,+ deleteEventDestinationResponse_httpStatus,++ -- ** DeleteKeyword+ deleteKeyword_originationIdentity,+ deleteKeyword_keyword,+ deleteKeywordResponse_keyword,+ deleteKeywordResponse_keywordAction,+ deleteKeywordResponse_keywordMessage,+ deleteKeywordResponse_originationIdentity,+ deleteKeywordResponse_originationIdentityArn,+ deleteKeywordResponse_httpStatus,++ -- ** DeleteOptOutList+ deleteOptOutList_optOutListName,+ deleteOptOutListResponse_createdTimestamp,+ deleteOptOutListResponse_optOutListArn,+ deleteOptOutListResponse_optOutListName,+ deleteOptOutListResponse_httpStatus,++ -- ** DeleteOptedOutNumber+ deleteOptedOutNumber_optOutListName,+ deleteOptedOutNumber_optedOutNumber,+ deleteOptedOutNumberResponse_endUserOptedOut,+ deleteOptedOutNumberResponse_optOutListArn,+ deleteOptedOutNumberResponse_optOutListName,+ deleteOptedOutNumberResponse_optedOutNumber,+ deleteOptedOutNumberResponse_optedOutTimestamp,+ deleteOptedOutNumberResponse_httpStatus,++ -- ** DeletePool+ deletePool_poolId,+ deletePoolResponse_createdTimestamp,+ deletePoolResponse_messageType,+ deletePoolResponse_optOutListName,+ deletePoolResponse_poolArn,+ deletePoolResponse_poolId,+ deletePoolResponse_selfManagedOptOutsEnabled,+ deletePoolResponse_sharedRoutesEnabled,+ deletePoolResponse_status,+ deletePoolResponse_twoWayChannelArn,+ deletePoolResponse_twoWayEnabled,+ deletePoolResponse_httpStatus,++ -- ** DeleteTextMessageSpendLimitOverride+ deleteTextMessageSpendLimitOverrideResponse_monthlyLimit,+ deleteTextMessageSpendLimitOverrideResponse_httpStatus,++ -- ** DeleteVoiceMessageSpendLimitOverride+ deleteVoiceMessageSpendLimitOverrideResponse_monthlyLimit,+ deleteVoiceMessageSpendLimitOverrideResponse_httpStatus,++ -- ** DescribeAccountAttributes+ describeAccountAttributes_maxResults,+ describeAccountAttributes_nextToken,+ describeAccountAttributesResponse_accountAttributes,+ describeAccountAttributesResponse_nextToken,+ describeAccountAttributesResponse_httpStatus,++ -- ** DescribeAccountLimits+ describeAccountLimits_maxResults,+ describeAccountLimits_nextToken,+ describeAccountLimitsResponse_accountLimits,+ describeAccountLimitsResponse_nextToken,+ describeAccountLimitsResponse_httpStatus,++ -- ** DescribeConfigurationSets+ describeConfigurationSets_configurationSetNames,+ describeConfigurationSets_filters,+ describeConfigurationSets_maxResults,+ describeConfigurationSets_nextToken,+ describeConfigurationSetsResponse_configurationSets,+ describeConfigurationSetsResponse_nextToken,+ describeConfigurationSetsResponse_httpStatus,++ -- ** DescribeKeywords+ describeKeywords_filters,+ describeKeywords_keywords,+ describeKeywords_maxResults,+ describeKeywords_nextToken,+ describeKeywords_originationIdentity,+ describeKeywordsResponse_keywords,+ describeKeywordsResponse_nextToken,+ describeKeywordsResponse_originationIdentity,+ describeKeywordsResponse_originationIdentityArn,+ describeKeywordsResponse_httpStatus,++ -- ** DescribeOptOutLists+ describeOptOutLists_maxResults,+ describeOptOutLists_nextToken,+ describeOptOutLists_optOutListNames,+ describeOptOutListsResponse_nextToken,+ describeOptOutListsResponse_optOutLists,+ describeOptOutListsResponse_httpStatus,++ -- ** DescribeOptedOutNumbers+ describeOptedOutNumbers_filters,+ describeOptedOutNumbers_maxResults,+ describeOptedOutNumbers_nextToken,+ describeOptedOutNumbers_optedOutNumbers,+ describeOptedOutNumbers_optOutListName,+ describeOptedOutNumbersResponse_nextToken,+ describeOptedOutNumbersResponse_optOutListArn,+ describeOptedOutNumbersResponse_optOutListName,+ describeOptedOutNumbersResponse_optedOutNumbers,+ describeOptedOutNumbersResponse_httpStatus,++ -- ** DescribePhoneNumbers+ describePhoneNumbers_filters,+ describePhoneNumbers_maxResults,+ describePhoneNumbers_nextToken,+ describePhoneNumbers_phoneNumberIds,+ describePhoneNumbersResponse_nextToken,+ describePhoneNumbersResponse_phoneNumbers,+ describePhoneNumbersResponse_httpStatus,++ -- ** DescribePools+ describePools_filters,+ describePools_maxResults,+ describePools_nextToken,+ describePools_poolIds,+ describePoolsResponse_nextToken,+ describePoolsResponse_pools,+ describePoolsResponse_httpStatus,++ -- ** DescribeSenderIds+ describeSenderIds_filters,+ describeSenderIds_maxResults,+ describeSenderIds_nextToken,+ describeSenderIds_senderIds,+ describeSenderIdsResponse_nextToken,+ describeSenderIdsResponse_senderIds,+ describeSenderIdsResponse_httpStatus,++ -- ** DescribeSpendLimits+ describeSpendLimits_maxResults,+ describeSpendLimits_nextToken,+ describeSpendLimitsResponse_nextToken,+ describeSpendLimitsResponse_spendLimits,+ describeSpendLimitsResponse_httpStatus,++ -- ** DisassociateOriginationIdentity+ disassociateOriginationIdentity_clientToken,+ disassociateOriginationIdentity_poolId,+ disassociateOriginationIdentity_originationIdentity,+ disassociateOriginationIdentity_isoCountryCode,+ disassociateOriginationIdentityResponse_isoCountryCode,+ disassociateOriginationIdentityResponse_originationIdentity,+ disassociateOriginationIdentityResponse_originationIdentityArn,+ disassociateOriginationIdentityResponse_poolArn,+ disassociateOriginationIdentityResponse_poolId,+ disassociateOriginationIdentityResponse_httpStatus,++ -- ** ListPoolOriginationIdentities+ listPoolOriginationIdentities_filters,+ listPoolOriginationIdentities_maxResults,+ listPoolOriginationIdentities_nextToken,+ listPoolOriginationIdentities_poolId,+ listPoolOriginationIdentitiesResponse_nextToken,+ listPoolOriginationIdentitiesResponse_originationIdentities,+ listPoolOriginationIdentitiesResponse_poolArn,+ listPoolOriginationIdentitiesResponse_poolId,+ listPoolOriginationIdentitiesResponse_httpStatus,++ -- ** ListTagsForResource+ listTagsForResource_resourceArn,+ listTagsForResourceResponse_resourceArn,+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,++ -- ** PutKeyword+ putKeyword_keywordAction,+ putKeyword_originationIdentity,+ putKeyword_keyword,+ putKeyword_keywordMessage,+ putKeywordResponse_keyword,+ putKeywordResponse_keywordAction,+ putKeywordResponse_keywordMessage,+ putKeywordResponse_originationIdentity,+ putKeywordResponse_originationIdentityArn,+ putKeywordResponse_httpStatus,++ -- ** PutOptedOutNumber+ putOptedOutNumber_optOutListName,+ putOptedOutNumber_optedOutNumber,+ putOptedOutNumberResponse_endUserOptedOut,+ putOptedOutNumberResponse_optOutListArn,+ putOptedOutNumberResponse_optOutListName,+ putOptedOutNumberResponse_optedOutNumber,+ putOptedOutNumberResponse_optedOutTimestamp,+ putOptedOutNumberResponse_httpStatus,++ -- ** ReleasePhoneNumber+ releasePhoneNumber_phoneNumberId,+ releasePhoneNumberResponse_createdTimestamp,+ releasePhoneNumberResponse_isoCountryCode,+ releasePhoneNumberResponse_messageType,+ releasePhoneNumberResponse_monthlyLeasingPrice,+ releasePhoneNumberResponse_numberCapabilities,+ releasePhoneNumberResponse_numberType,+ releasePhoneNumberResponse_optOutListName,+ releasePhoneNumberResponse_phoneNumber,+ releasePhoneNumberResponse_phoneNumberArn,+ releasePhoneNumberResponse_phoneNumberId,+ releasePhoneNumberResponse_selfManagedOptOutsEnabled,+ releasePhoneNumberResponse_status,+ releasePhoneNumberResponse_twoWayChannelArn,+ releasePhoneNumberResponse_twoWayEnabled,+ releasePhoneNumberResponse_httpStatus,++ -- ** RequestPhoneNumber+ requestPhoneNumber_clientToken,+ requestPhoneNumber_deletionProtectionEnabled,+ requestPhoneNumber_optOutListName,+ requestPhoneNumber_poolId,+ requestPhoneNumber_registrationId,+ requestPhoneNumber_tags,+ requestPhoneNumber_isoCountryCode,+ requestPhoneNumber_messageType,+ requestPhoneNumber_numberCapabilities,+ requestPhoneNumber_numberType,+ requestPhoneNumberResponse_createdTimestamp,+ requestPhoneNumberResponse_deletionProtectionEnabled,+ requestPhoneNumberResponse_isoCountryCode,+ requestPhoneNumberResponse_messageType,+ requestPhoneNumberResponse_monthlyLeasingPrice,+ requestPhoneNumberResponse_numberCapabilities,+ requestPhoneNumberResponse_numberType,+ requestPhoneNumberResponse_optOutListName,+ requestPhoneNumberResponse_phoneNumber,+ requestPhoneNumberResponse_phoneNumberArn,+ requestPhoneNumberResponse_phoneNumberId,+ requestPhoneNumberResponse_poolId,+ requestPhoneNumberResponse_selfManagedOptOutsEnabled,+ requestPhoneNumberResponse_status,+ requestPhoneNumberResponse_tags,+ requestPhoneNumberResponse_twoWayChannelArn,+ requestPhoneNumberResponse_twoWayEnabled,+ requestPhoneNumberResponse_httpStatus,++ -- ** SendTextMessage+ sendTextMessage_configurationSetName,+ sendTextMessage_context,+ sendTextMessage_destinationCountryParameters,+ sendTextMessage_dryRun,+ sendTextMessage_keyword,+ sendTextMessage_maxPrice,+ sendTextMessage_messageBody,+ sendTextMessage_messageType,+ sendTextMessage_originationIdentity,+ sendTextMessage_timeToLive,+ sendTextMessage_destinationPhoneNumber,+ sendTextMessageResponse_messageId,+ sendTextMessageResponse_httpStatus,++ -- ** SendVoiceMessage+ sendVoiceMessage_configurationSetName,+ sendVoiceMessage_context,+ sendVoiceMessage_dryRun,+ sendVoiceMessage_maxPricePerMinute,+ sendVoiceMessage_messageBody,+ sendVoiceMessage_messageBodyTextType,+ sendVoiceMessage_timeToLive,+ sendVoiceMessage_voiceId,+ sendVoiceMessage_destinationPhoneNumber,+ sendVoiceMessage_originationIdentity,+ sendVoiceMessageResponse_messageId,+ sendVoiceMessageResponse_httpStatus,++ -- ** SetDefaultMessageType+ setDefaultMessageType_configurationSetName,+ setDefaultMessageType_messageType,+ setDefaultMessageTypeResponse_configurationSetArn,+ setDefaultMessageTypeResponse_configurationSetName,+ setDefaultMessageTypeResponse_messageType,+ setDefaultMessageTypeResponse_httpStatus,++ -- ** SetDefaultSenderId+ setDefaultSenderId_configurationSetName,+ setDefaultSenderId_senderId,+ setDefaultSenderIdResponse_configurationSetArn,+ setDefaultSenderIdResponse_configurationSetName,+ setDefaultSenderIdResponse_senderId,+ setDefaultSenderIdResponse_httpStatus,++ -- ** SetTextMessageSpendLimitOverride+ setTextMessageSpendLimitOverride_monthlyLimit,+ setTextMessageSpendLimitOverrideResponse_monthlyLimit,+ setTextMessageSpendLimitOverrideResponse_httpStatus,++ -- ** SetVoiceMessageSpendLimitOverride+ setVoiceMessageSpendLimitOverride_monthlyLimit,+ setVoiceMessageSpendLimitOverrideResponse_monthlyLimit,+ setVoiceMessageSpendLimitOverrideResponse_httpStatus,++ -- ** TagResource+ tagResource_resourceArn,+ tagResource_tags,+ tagResourceResponse_httpStatus,++ -- ** UntagResource+ untagResource_resourceArn,+ untagResource_tagKeys,+ untagResourceResponse_httpStatus,++ -- ** UpdateEventDestination+ updateEventDestination_cloudWatchLogsDestination,+ updateEventDestination_enabled,+ updateEventDestination_kinesisFirehoseDestination,+ updateEventDestination_matchingEventTypes,+ updateEventDestination_snsDestination,+ updateEventDestination_configurationSetName,+ updateEventDestination_eventDestinationName,+ updateEventDestinationResponse_configurationSetArn,+ updateEventDestinationResponse_configurationSetName,+ updateEventDestinationResponse_eventDestination,+ updateEventDestinationResponse_httpStatus,++ -- ** UpdatePhoneNumber+ updatePhoneNumber_deletionProtectionEnabled,+ updatePhoneNumber_optOutListName,+ updatePhoneNumber_selfManagedOptOutsEnabled,+ updatePhoneNumber_twoWayChannelArn,+ updatePhoneNumber_twoWayEnabled,+ updatePhoneNumber_phoneNumberId,+ updatePhoneNumberResponse_createdTimestamp,+ updatePhoneNumberResponse_deletionProtectionEnabled,+ updatePhoneNumberResponse_isoCountryCode,+ updatePhoneNumberResponse_messageType,+ updatePhoneNumberResponse_monthlyLeasingPrice,+ updatePhoneNumberResponse_numberCapabilities,+ updatePhoneNumberResponse_numberType,+ updatePhoneNumberResponse_optOutListName,+ updatePhoneNumberResponse_phoneNumber,+ updatePhoneNumberResponse_phoneNumberArn,+ updatePhoneNumberResponse_phoneNumberId,+ updatePhoneNumberResponse_selfManagedOptOutsEnabled,+ updatePhoneNumberResponse_status,+ updatePhoneNumberResponse_twoWayChannelArn,+ updatePhoneNumberResponse_twoWayEnabled,+ updatePhoneNumberResponse_httpStatus,++ -- ** UpdatePool+ updatePool_deletionProtectionEnabled,+ updatePool_optOutListName,+ updatePool_selfManagedOptOutsEnabled,+ updatePool_sharedRoutesEnabled,+ updatePool_twoWayChannelArn,+ updatePool_twoWayEnabled,+ updatePool_poolId,+ updatePoolResponse_createdTimestamp,+ updatePoolResponse_deletionProtectionEnabled,+ updatePoolResponse_messageType,+ updatePoolResponse_optOutListName,+ updatePoolResponse_poolArn,+ updatePoolResponse_poolId,+ updatePoolResponse_selfManagedOptOutsEnabled,+ updatePoolResponse_sharedRoutesEnabled,+ updatePoolResponse_status,+ updatePoolResponse_twoWayChannelArn,+ updatePoolResponse_twoWayEnabled,+ updatePoolResponse_httpStatus,++ -- * Types++ -- ** AccountAttribute+ accountAttribute_name,+ accountAttribute_value,++ -- ** AccountLimit+ accountLimit_name,+ accountLimit_used,+ accountLimit_max,++ -- ** CloudWatchLogsDestination+ cloudWatchLogsDestination_iamRoleArn,+ cloudWatchLogsDestination_logGroupArn,++ -- ** ConfigurationSetFilter+ configurationSetFilter_name,+ configurationSetFilter_values,++ -- ** ConfigurationSetInformation+ configurationSetInformation_defaultMessageType,+ configurationSetInformation_defaultSenderId,+ configurationSetInformation_configurationSetArn,+ configurationSetInformation_configurationSetName,+ configurationSetInformation_eventDestinations,+ configurationSetInformation_createdTimestamp,++ -- ** EventDestination+ eventDestination_cloudWatchLogsDestination,+ eventDestination_kinesisFirehoseDestination,+ eventDestination_snsDestination,+ eventDestination_eventDestinationName,+ eventDestination_enabled,+ eventDestination_matchingEventTypes,++ -- ** KeywordFilter+ keywordFilter_name,+ keywordFilter_values,++ -- ** KeywordInformation+ keywordInformation_keyword,+ keywordInformation_keywordMessage,+ keywordInformation_keywordAction,++ -- ** KinesisFirehoseDestination+ kinesisFirehoseDestination_iamRoleArn,+ kinesisFirehoseDestination_deliveryStreamArn,++ -- ** OptOutListInformation+ optOutListInformation_optOutListArn,+ optOutListInformation_optOutListName,+ optOutListInformation_createdTimestamp,++ -- ** OptedOutFilter+ optedOutFilter_name,+ optedOutFilter_values,++ -- ** OptedOutNumberInformation+ optedOutNumberInformation_optedOutNumber,+ optedOutNumberInformation_optedOutTimestamp,+ optedOutNumberInformation_endUserOptedOut,++ -- ** OriginationIdentityMetadata+ originationIdentityMetadata_originationIdentityArn,+ originationIdentityMetadata_originationIdentity,+ originationIdentityMetadata_isoCountryCode,+ originationIdentityMetadata_numberCapabilities,++ -- ** PhoneNumberFilter+ phoneNumberFilter_name,+ phoneNumberFilter_values,++ -- ** PhoneNumberInformation+ phoneNumberInformation_phoneNumberId,+ phoneNumberInformation_poolId,+ phoneNumberInformation_twoWayChannelArn,+ phoneNumberInformation_phoneNumberArn,+ phoneNumberInformation_phoneNumber,+ phoneNumberInformation_status,+ phoneNumberInformation_isoCountryCode,+ phoneNumberInformation_messageType,+ phoneNumberInformation_numberCapabilities,+ phoneNumberInformation_numberType,+ phoneNumberInformation_monthlyLeasingPrice,+ phoneNumberInformation_twoWayEnabled,+ phoneNumberInformation_selfManagedOptOutsEnabled,+ phoneNumberInformation_optOutListName,+ phoneNumberInformation_deletionProtectionEnabled,+ phoneNumberInformation_createdTimestamp,++ -- ** PoolFilter+ poolFilter_name,+ poolFilter_values,++ -- ** PoolInformation+ poolInformation_twoWayChannelArn,+ poolInformation_poolArn,+ poolInformation_poolId,+ poolInformation_status,+ poolInformation_messageType,+ poolInformation_twoWayEnabled,+ poolInformation_selfManagedOptOutsEnabled,+ poolInformation_optOutListName,+ poolInformation_sharedRoutesEnabled,+ poolInformation_deletionProtectionEnabled,+ poolInformation_createdTimestamp,++ -- ** PoolOriginationIdentitiesFilter+ poolOriginationIdentitiesFilter_name,+ poolOriginationIdentitiesFilter_values,++ -- ** SenderIdAndCountry+ senderIdAndCountry_senderId,+ senderIdAndCountry_isoCountryCode,++ -- ** SenderIdFilter+ senderIdFilter_name,+ senderIdFilter_values,++ -- ** SenderIdInformation+ senderIdInformation_senderIdArn,+ senderIdInformation_senderId,+ senderIdInformation_isoCountryCode,+ senderIdInformation_messageTypes,+ senderIdInformation_monthlyLeasingPrice,++ -- ** SnsDestination+ snsDestination_topicArn,++ -- ** SpendLimit+ spendLimit_name,+ spendLimit_enforcedLimit,+ spendLimit_maxLimit,+ spendLimit_overridden,++ -- ** Tag+ tag_key,+ tag_value,+ )+where++import Amazonka.PinpointSmsVoiceV2.AssociateOriginationIdentity+import Amazonka.PinpointSmsVoiceV2.CreateConfigurationSet+import Amazonka.PinpointSmsVoiceV2.CreateEventDestination+import Amazonka.PinpointSmsVoiceV2.CreateOptOutList+import Amazonka.PinpointSmsVoiceV2.CreatePool+import Amazonka.PinpointSmsVoiceV2.DeleteConfigurationSet+import Amazonka.PinpointSmsVoiceV2.DeleteDefaultMessageType+import Amazonka.PinpointSmsVoiceV2.DeleteDefaultSenderId+import Amazonka.PinpointSmsVoiceV2.DeleteEventDestination+import Amazonka.PinpointSmsVoiceV2.DeleteKeyword+import Amazonka.PinpointSmsVoiceV2.DeleteOptOutList+import Amazonka.PinpointSmsVoiceV2.DeleteOptedOutNumber+import Amazonka.PinpointSmsVoiceV2.DeletePool+import Amazonka.PinpointSmsVoiceV2.DeleteTextMessageSpendLimitOverride+import Amazonka.PinpointSmsVoiceV2.DeleteVoiceMessageSpendLimitOverride+import Amazonka.PinpointSmsVoiceV2.DescribeAccountAttributes+import Amazonka.PinpointSmsVoiceV2.DescribeAccountLimits+import Amazonka.PinpointSmsVoiceV2.DescribeConfigurationSets+import Amazonka.PinpointSmsVoiceV2.DescribeKeywords+import Amazonka.PinpointSmsVoiceV2.DescribeOptOutLists+import Amazonka.PinpointSmsVoiceV2.DescribeOptedOutNumbers+import Amazonka.PinpointSmsVoiceV2.DescribePhoneNumbers+import Amazonka.PinpointSmsVoiceV2.DescribePools+import Amazonka.PinpointSmsVoiceV2.DescribeSenderIds+import Amazonka.PinpointSmsVoiceV2.DescribeSpendLimits+import Amazonka.PinpointSmsVoiceV2.DisassociateOriginationIdentity+import Amazonka.PinpointSmsVoiceV2.ListPoolOriginationIdentities+import Amazonka.PinpointSmsVoiceV2.ListTagsForResource+import Amazonka.PinpointSmsVoiceV2.PutKeyword+import Amazonka.PinpointSmsVoiceV2.PutOptedOutNumber+import Amazonka.PinpointSmsVoiceV2.ReleasePhoneNumber+import Amazonka.PinpointSmsVoiceV2.RequestPhoneNumber+import Amazonka.PinpointSmsVoiceV2.SendTextMessage+import Amazonka.PinpointSmsVoiceV2.SendVoiceMessage+import Amazonka.PinpointSmsVoiceV2.SetDefaultMessageType+import Amazonka.PinpointSmsVoiceV2.SetDefaultSenderId+import Amazonka.PinpointSmsVoiceV2.SetTextMessageSpendLimitOverride+import Amazonka.PinpointSmsVoiceV2.SetVoiceMessageSpendLimitOverride+import Amazonka.PinpointSmsVoiceV2.TagResource+import Amazonka.PinpointSmsVoiceV2.Types.AccountAttribute+import Amazonka.PinpointSmsVoiceV2.Types.AccountLimit+import Amazonka.PinpointSmsVoiceV2.Types.CloudWatchLogsDestination+import Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetFilter+import Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetInformation+import Amazonka.PinpointSmsVoiceV2.Types.EventDestination+import Amazonka.PinpointSmsVoiceV2.Types.KeywordFilter+import Amazonka.PinpointSmsVoiceV2.Types.KeywordInformation+import Amazonka.PinpointSmsVoiceV2.Types.KinesisFirehoseDestination+import Amazonka.PinpointSmsVoiceV2.Types.OptOutListInformation+import Amazonka.PinpointSmsVoiceV2.Types.OptedOutFilter+import Amazonka.PinpointSmsVoiceV2.Types.OptedOutNumberInformation+import Amazonka.PinpointSmsVoiceV2.Types.OriginationIdentityMetadata+import Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberFilter+import Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberInformation+import Amazonka.PinpointSmsVoiceV2.Types.PoolFilter+import Amazonka.PinpointSmsVoiceV2.Types.PoolInformation+import Amazonka.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilter+import Amazonka.PinpointSmsVoiceV2.Types.SenderIdAndCountry+import Amazonka.PinpointSmsVoiceV2.Types.SenderIdFilter+import Amazonka.PinpointSmsVoiceV2.Types.SenderIdInformation+import Amazonka.PinpointSmsVoiceV2.Types.SnsDestination+import Amazonka.PinpointSmsVoiceV2.Types.SpendLimit+import Amazonka.PinpointSmsVoiceV2.Types.Tag+import Amazonka.PinpointSmsVoiceV2.UntagResource+import Amazonka.PinpointSmsVoiceV2.UpdateEventDestination+import Amazonka.PinpointSmsVoiceV2.UpdatePhoneNumber+import Amazonka.PinpointSmsVoiceV2.UpdatePool
+ gen/Amazonka/PinpointSmsVoiceV2/ListPoolOriginationIdentities.hs view
@@ -0,0 +1,301 @@+{-# 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.PinpointSmsVoiceV2.ListPoolOriginationIdentities+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists all associated origination identities in your pool.+--+-- If you specify filters, the output includes information for only those+-- origination identities that meet the filter criteria.+--+-- This operation returns paginated results.+module Amazonka.PinpointSmsVoiceV2.ListPoolOriginationIdentities+ ( -- * Creating a Request+ ListPoolOriginationIdentities (..),+ newListPoolOriginationIdentities,++ -- * Request Lenses+ listPoolOriginationIdentities_filters,+ listPoolOriginationIdentities_maxResults,+ listPoolOriginationIdentities_nextToken,+ listPoolOriginationIdentities_poolId,++ -- * Destructuring the Response+ ListPoolOriginationIdentitiesResponse (..),+ newListPoolOriginationIdentitiesResponse,++ -- * Response Lenses+ listPoolOriginationIdentitiesResponse_nextToken,+ listPoolOriginationIdentitiesResponse_originationIdentities,+ listPoolOriginationIdentitiesResponse_poolArn,+ listPoolOriginationIdentitiesResponse_poolId,+ listPoolOriginationIdentitiesResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListPoolOriginationIdentities' smart constructor.+data ListPoolOriginationIdentities = ListPoolOriginationIdentities'+ { -- | An array of PoolOriginationIdentitiesFilter objects to filter the+ -- results..+ filters :: Prelude.Maybe [PoolOriginationIdentitiesFilter],+ -- | The maximum number of results to return per each request.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The token to be used for the next set of paginated results. You don\'t+ -- need to supply a value for this field in the initial request.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier for the pool. This value can be either the PoolId+ -- or PoolArn.+ poolId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPoolOriginationIdentities' 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:+--+-- 'filters', 'listPoolOriginationIdentities_filters' - An array of PoolOriginationIdentitiesFilter objects to filter the+-- results..+--+-- 'maxResults', 'listPoolOriginationIdentities_maxResults' - The maximum number of results to return per each request.+--+-- 'nextToken', 'listPoolOriginationIdentities_nextToken' - The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+--+-- 'poolId', 'listPoolOriginationIdentities_poolId' - The unique identifier for the pool. This value can be either the PoolId+-- or PoolArn.+newListPoolOriginationIdentities ::+ -- | 'poolId'+ Prelude.Text ->+ ListPoolOriginationIdentities+newListPoolOriginationIdentities pPoolId_ =+ ListPoolOriginationIdentities'+ { filters =+ Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ poolId = pPoolId_+ }++-- | An array of PoolOriginationIdentitiesFilter objects to filter the+-- results..+listPoolOriginationIdentities_filters :: Lens.Lens' ListPoolOriginationIdentities (Prelude.Maybe [PoolOriginationIdentitiesFilter])+listPoolOriginationIdentities_filters = Lens.lens (\ListPoolOriginationIdentities' {filters} -> filters) (\s@ListPoolOriginationIdentities' {} a -> s {filters = a} :: ListPoolOriginationIdentities) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of results to return per each request.+listPoolOriginationIdentities_maxResults :: Lens.Lens' ListPoolOriginationIdentities (Prelude.Maybe Prelude.Natural)+listPoolOriginationIdentities_maxResults = Lens.lens (\ListPoolOriginationIdentities' {maxResults} -> maxResults) (\s@ListPoolOriginationIdentities' {} a -> s {maxResults = a} :: ListPoolOriginationIdentities)++-- | The token to be used for the next set of paginated results. You don\'t+-- need to supply a value for this field in the initial request.+listPoolOriginationIdentities_nextToken :: Lens.Lens' ListPoolOriginationIdentities (Prelude.Maybe Prelude.Text)+listPoolOriginationIdentities_nextToken = Lens.lens (\ListPoolOriginationIdentities' {nextToken} -> nextToken) (\s@ListPoolOriginationIdentities' {} a -> s {nextToken = a} :: ListPoolOriginationIdentities)++-- | The unique identifier for the pool. This value can be either the PoolId+-- or PoolArn.+listPoolOriginationIdentities_poolId :: Lens.Lens' ListPoolOriginationIdentities Prelude.Text+listPoolOriginationIdentities_poolId = Lens.lens (\ListPoolOriginationIdentities' {poolId} -> poolId) (\s@ListPoolOriginationIdentities' {} a -> s {poolId = a} :: ListPoolOriginationIdentities)++instance Core.AWSPager ListPoolOriginationIdentities where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listPoolOriginationIdentitiesResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listPoolOriginationIdentitiesResponse_originationIdentities+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listPoolOriginationIdentities_nextToken+ Lens..~ rs+ Lens.^? listPoolOriginationIdentitiesResponse_nextToken+ Prelude.. Lens._Just++instance+ Core.AWSRequest+ ListPoolOriginationIdentities+ where+ type+ AWSResponse ListPoolOriginationIdentities =+ ListPoolOriginationIdentitiesResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListPoolOriginationIdentitiesResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> ( x+ Data..?> "OriginationIdentities"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "PoolArn")+ Prelude.<*> (x Data..?> "PoolId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ ListPoolOriginationIdentities+ where+ hashWithSalt _salt ListPoolOriginationIdentities' {..} =+ _salt+ `Prelude.hashWithSalt` filters+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` poolId++instance Prelude.NFData ListPoolOriginationIdentities where+ rnf ListPoolOriginationIdentities' {..} =+ Prelude.rnf filters+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf poolId++instance Data.ToHeaders ListPoolOriginationIdentities where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.ListPoolOriginationIdentities" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListPoolOriginationIdentities where+ toJSON ListPoolOriginationIdentities' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Filters" Data..=) Prelude.<$> filters,+ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ Prelude.Just ("PoolId" Data..= poolId)+ ]+ )++instance Data.ToPath ListPoolOriginationIdentities where+ toPath = Prelude.const "/"++instance Data.ToQuery ListPoolOriginationIdentities where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListPoolOriginationIdentitiesResponse' smart constructor.+data ListPoolOriginationIdentitiesResponse = ListPoolOriginationIdentitiesResponse'+ { -- | The token to be used for the next set of paginated results. If this+ -- field is empty then there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | An array of any OriginationIdentityMetadata objects.+ originationIdentities :: Prelude.Maybe [OriginationIdentityMetadata],+ -- | The Amazon Resource Name (ARN) for the pool.+ poolArn :: Prelude.Maybe Prelude.Text,+ -- | The unique PoolId of the pool.+ poolId :: 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 'ListPoolOriginationIdentitiesResponse' 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', 'listPoolOriginationIdentitiesResponse_nextToken' - The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+--+-- 'originationIdentities', 'listPoolOriginationIdentitiesResponse_originationIdentities' - An array of any OriginationIdentityMetadata objects.+--+-- 'poolArn', 'listPoolOriginationIdentitiesResponse_poolArn' - The Amazon Resource Name (ARN) for the pool.+--+-- 'poolId', 'listPoolOriginationIdentitiesResponse_poolId' - The unique PoolId of the pool.+--+-- 'httpStatus', 'listPoolOriginationIdentitiesResponse_httpStatus' - The response's http status code.+newListPoolOriginationIdentitiesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListPoolOriginationIdentitiesResponse+newListPoolOriginationIdentitiesResponse pHttpStatus_ =+ ListPoolOriginationIdentitiesResponse'+ { nextToken =+ Prelude.Nothing,+ originationIdentities =+ Prelude.Nothing,+ poolArn = Prelude.Nothing,+ poolId = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The token to be used for the next set of paginated results. If this+-- field is empty then there are no more results.+listPoolOriginationIdentitiesResponse_nextToken :: Lens.Lens' ListPoolOriginationIdentitiesResponse (Prelude.Maybe Prelude.Text)+listPoolOriginationIdentitiesResponse_nextToken = Lens.lens (\ListPoolOriginationIdentitiesResponse' {nextToken} -> nextToken) (\s@ListPoolOriginationIdentitiesResponse' {} a -> s {nextToken = a} :: ListPoolOriginationIdentitiesResponse)++-- | An array of any OriginationIdentityMetadata objects.+listPoolOriginationIdentitiesResponse_originationIdentities :: Lens.Lens' ListPoolOriginationIdentitiesResponse (Prelude.Maybe [OriginationIdentityMetadata])+listPoolOriginationIdentitiesResponse_originationIdentities = Lens.lens (\ListPoolOriginationIdentitiesResponse' {originationIdentities} -> originationIdentities) (\s@ListPoolOriginationIdentitiesResponse' {} a -> s {originationIdentities = a} :: ListPoolOriginationIdentitiesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) for the pool.+listPoolOriginationIdentitiesResponse_poolArn :: Lens.Lens' ListPoolOriginationIdentitiesResponse (Prelude.Maybe Prelude.Text)+listPoolOriginationIdentitiesResponse_poolArn = Lens.lens (\ListPoolOriginationIdentitiesResponse' {poolArn} -> poolArn) (\s@ListPoolOriginationIdentitiesResponse' {} a -> s {poolArn = a} :: ListPoolOriginationIdentitiesResponse)++-- | The unique PoolId of the pool.+listPoolOriginationIdentitiesResponse_poolId :: Lens.Lens' ListPoolOriginationIdentitiesResponse (Prelude.Maybe Prelude.Text)+listPoolOriginationIdentitiesResponse_poolId = Lens.lens (\ListPoolOriginationIdentitiesResponse' {poolId} -> poolId) (\s@ListPoolOriginationIdentitiesResponse' {} a -> s {poolId = a} :: ListPoolOriginationIdentitiesResponse)++-- | The response's http status code.+listPoolOriginationIdentitiesResponse_httpStatus :: Lens.Lens' ListPoolOriginationIdentitiesResponse Prelude.Int+listPoolOriginationIdentitiesResponse_httpStatus = Lens.lens (\ListPoolOriginationIdentitiesResponse' {httpStatus} -> httpStatus) (\s@ListPoolOriginationIdentitiesResponse' {} a -> s {httpStatus = a} :: ListPoolOriginationIdentitiesResponse)++instance+ Prelude.NFData+ ListPoolOriginationIdentitiesResponse+ where+ rnf ListPoolOriginationIdentitiesResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf originationIdentities+ `Prelude.seq` Prelude.rnf poolArn+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/ListTagsForResource.hs view
@@ -0,0 +1,184 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.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)+--+-- List all tags associated with a resource.+module Amazonka.PinpointSmsVoiceV2.ListTagsForResource+ ( -- * Creating a Request+ ListTagsForResource (..),+ newListTagsForResource,++ -- * Request Lenses+ listTagsForResource_resourceArn,++ -- * Destructuring the Response+ ListTagsForResourceResponse (..),+ newListTagsForResourceResponse,++ -- * Response Lenses+ listTagsForResourceResponse_resourceArn,+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.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 Amazon Resource Name (ARN) of the resource to query for.+ 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 Amazon Resource Name (ARN) of the resource to query for.+newListTagsForResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceArn_ =+ ListTagsForResource' {resourceArn = pResourceArn_}++-- | The Amazon Resource Name (ARN) of the resource to query for.+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.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListTagsForResourceResponse'+ Prelude.<$> (x Data..?> "ResourceArn")+ Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListTagsForResource where+ hashWithSalt _salt ListTagsForResource' {..} =+ _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ListTagsForResource where+ rnf ListTagsForResource' {..} =+ Prelude.rnf resourceArn++instance Data.ToHeaders ListTagsForResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.ListTagsForResource" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListTagsForResource where+ toJSON ListTagsForResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("ResourceArn" Data..= resourceArn)]+ )++instance Data.ToPath ListTagsForResource where+ toPath = Prelude.const "/"++instance Data.ToQuery ListTagsForResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+ { -- | The ARN of the resource.+ resourceArn :: Prelude.Maybe Prelude.Text,+ -- | An array of key and value pair tags that are associated with the+ -- resource.+ tags :: Prelude.Maybe [Tag],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'listTagsForResourceResponse_resourceArn' - The ARN of the resource.+--+-- 'tags', 'listTagsForResourceResponse_tags' - An array of key and value pair tags that are associated with the+-- resource.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+ ListTagsForResourceResponse'+ { resourceArn =+ Prelude.Nothing,+ tags = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The ARN of the resource.+listTagsForResourceResponse_resourceArn :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe Prelude.Text)+listTagsForResourceResponse_resourceArn = Lens.lens (\ListTagsForResourceResponse' {resourceArn} -> resourceArn) (\s@ListTagsForResourceResponse' {} a -> s {resourceArn = a} :: ListTagsForResourceResponse)++-- | An array of key and value pair tags that are associated with the+-- resource.+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe [Tag])+listTagsForResourceResponse_tags = Lens.lens (\ListTagsForResourceResponse' {tags} -> tags) (\s@ListTagsForResourceResponse' {} a -> s {tags = a} :: ListTagsForResourceResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listTagsForResourceResponse_httpStatus :: Lens.Lens' ListTagsForResourceResponse Prelude.Int+listTagsForResourceResponse_httpStatus = Lens.lens (\ListTagsForResourceResponse' {httpStatus} -> httpStatus) (\s@ListTagsForResourceResponse' {} a -> s {httpStatus = a} :: ListTagsForResourceResponse)++instance Prelude.NFData ListTagsForResourceResponse where+ rnf ListTagsForResourceResponse' {..} =+ Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/PutKeyword.hs view
@@ -0,0 +1,302 @@+{-# 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.PinpointSmsVoiceV2.PutKeyword+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates or updates a keyword configuration on an origination phone+-- number or pool.+--+-- A keyword is a word that you can search for on a particular phone number+-- or pool. It is also a specific word or phrase that an end user can send+-- to your number to elicit a response, such as an informational message or+-- a special offer. When your number receives a message that begins with a+-- keyword, Amazon Pinpoint responds with a customizable message.+--+-- If you specify a keyword that isn\'t valid, an Error is returned.+module Amazonka.PinpointSmsVoiceV2.PutKeyword+ ( -- * Creating a Request+ PutKeyword (..),+ newPutKeyword,++ -- * Request Lenses+ putKeyword_keywordAction,+ putKeyword_originationIdentity,+ putKeyword_keyword,+ putKeyword_keywordMessage,++ -- * Destructuring the Response+ PutKeywordResponse (..),+ newPutKeywordResponse,++ -- * Response Lenses+ putKeywordResponse_keyword,+ putKeywordResponse_keywordAction,+ putKeywordResponse_keywordMessage,+ putKeywordResponse_originationIdentity,+ putKeywordResponse_originationIdentityArn,+ putKeywordResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newPutKeyword' smart constructor.+data PutKeyword = PutKeyword'+ { -- | The action to perform for the new keyword when it is received.+ keywordAction :: Prelude.Maybe KeywordAction,+ -- | The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+ -- SenderId or SenderIdArn. You can use DescribePhoneNumbers get the values+ -- for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used+ -- to get the values for SenderId and SenderIdArn.+ originationIdentity :: Prelude.Text,+ -- | The new keyword to add.+ keyword :: Prelude.Text,+ -- | The message associated with the keyword.+ --+ -- - AUTOMATIC_RESPONSE: A message is sent to the recipient.+ --+ -- - OPT_OUT: Keeps the recipient from receiving future messages.+ --+ -- - OPT_IN: The recipient wants to receive future messages.+ keywordMessage :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutKeyword' 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:+--+-- 'keywordAction', 'putKeyword_keywordAction' - The action to perform for the new keyword when it is received.+--+-- 'originationIdentity', 'putKeyword_originationIdentity' - The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+-- SenderId or SenderIdArn. You can use DescribePhoneNumbers get the values+-- for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used+-- to get the values for SenderId and SenderIdArn.+--+-- 'keyword', 'putKeyword_keyword' - The new keyword to add.+--+-- 'keywordMessage', 'putKeyword_keywordMessage' - The message associated with the keyword.+--+-- - AUTOMATIC_RESPONSE: A message is sent to the recipient.+--+-- - OPT_OUT: Keeps the recipient from receiving future messages.+--+-- - OPT_IN: The recipient wants to receive future messages.+newPutKeyword ::+ -- | 'originationIdentity'+ Prelude.Text ->+ -- | 'keyword'+ Prelude.Text ->+ -- | 'keywordMessage'+ Prelude.Text ->+ PutKeyword+newPutKeyword+ pOriginationIdentity_+ pKeyword_+ pKeywordMessage_ =+ PutKeyword'+ { keywordAction = Prelude.Nothing,+ originationIdentity = pOriginationIdentity_,+ keyword = pKeyword_,+ keywordMessage = pKeywordMessage_+ }++-- | The action to perform for the new keyword when it is received.+putKeyword_keywordAction :: Lens.Lens' PutKeyword (Prelude.Maybe KeywordAction)+putKeyword_keywordAction = Lens.lens (\PutKeyword' {keywordAction} -> keywordAction) (\s@PutKeyword' {} a -> s {keywordAction = a} :: PutKeyword)++-- | The origination identity to use such as a PhoneNumberId, PhoneNumberArn,+-- SenderId or SenderIdArn. You can use DescribePhoneNumbers get the values+-- for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used+-- to get the values for SenderId and SenderIdArn.+putKeyword_originationIdentity :: Lens.Lens' PutKeyword Prelude.Text+putKeyword_originationIdentity = Lens.lens (\PutKeyword' {originationIdentity} -> originationIdentity) (\s@PutKeyword' {} a -> s {originationIdentity = a} :: PutKeyword)++-- | The new keyword to add.+putKeyword_keyword :: Lens.Lens' PutKeyword Prelude.Text+putKeyword_keyword = Lens.lens (\PutKeyword' {keyword} -> keyword) (\s@PutKeyword' {} a -> s {keyword = a} :: PutKeyword)++-- | The message associated with the keyword.+--+-- - AUTOMATIC_RESPONSE: A message is sent to the recipient.+--+-- - OPT_OUT: Keeps the recipient from receiving future messages.+--+-- - OPT_IN: The recipient wants to receive future messages.+putKeyword_keywordMessage :: Lens.Lens' PutKeyword Prelude.Text+putKeyword_keywordMessage = Lens.lens (\PutKeyword' {keywordMessage} -> keywordMessage) (\s@PutKeyword' {} a -> s {keywordMessage = a} :: PutKeyword)++instance Core.AWSRequest PutKeyword where+ type AWSResponse PutKeyword = PutKeywordResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ PutKeywordResponse'+ Prelude.<$> (x Data..?> "Keyword")+ Prelude.<*> (x Data..?> "KeywordAction")+ Prelude.<*> (x Data..?> "KeywordMessage")+ Prelude.<*> (x Data..?> "OriginationIdentity")+ Prelude.<*> (x Data..?> "OriginationIdentityArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable PutKeyword where+ hashWithSalt _salt PutKeyword' {..} =+ _salt+ `Prelude.hashWithSalt` keywordAction+ `Prelude.hashWithSalt` originationIdentity+ `Prelude.hashWithSalt` keyword+ `Prelude.hashWithSalt` keywordMessage++instance Prelude.NFData PutKeyword where+ rnf PutKeyword' {..} =+ Prelude.rnf keywordAction+ `Prelude.seq` Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf keyword+ `Prelude.seq` Prelude.rnf keywordMessage++instance Data.ToHeaders PutKeyword where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.PutKeyword" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON PutKeyword where+ toJSON PutKeyword' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("KeywordAction" Data..=) Prelude.<$> keywordAction,+ Prelude.Just+ ("OriginationIdentity" Data..= originationIdentity),+ Prelude.Just ("Keyword" Data..= keyword),+ Prelude.Just+ ("KeywordMessage" Data..= keywordMessage)+ ]+ )++instance Data.ToPath PutKeyword where+ toPath = Prelude.const "/"++instance Data.ToQuery PutKeyword where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutKeywordResponse' smart constructor.+data PutKeywordResponse = PutKeywordResponse'+ { -- | The keyword that was added.+ keyword :: Prelude.Maybe Prelude.Text,+ -- | The action to perform when the keyword is used.+ keywordAction :: Prelude.Maybe KeywordAction,+ -- | The message associated with the keyword.+ keywordMessage :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberId or PoolId that the keyword was associated with.+ originationIdentity :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberArn or PoolArn that the keyword was associated with.+ originationIdentityArn :: 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 'PutKeywordResponse' 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:+--+-- 'keyword', 'putKeywordResponse_keyword' - The keyword that was added.+--+-- 'keywordAction', 'putKeywordResponse_keywordAction' - The action to perform when the keyword is used.+--+-- 'keywordMessage', 'putKeywordResponse_keywordMessage' - The message associated with the keyword.+--+-- 'originationIdentity', 'putKeywordResponse_originationIdentity' - The PhoneNumberId or PoolId that the keyword was associated with.+--+-- 'originationIdentityArn', 'putKeywordResponse_originationIdentityArn' - The PhoneNumberArn or PoolArn that the keyword was associated with.+--+-- 'httpStatus', 'putKeywordResponse_httpStatus' - The response's http status code.+newPutKeywordResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ PutKeywordResponse+newPutKeywordResponse pHttpStatus_ =+ PutKeywordResponse'+ { keyword = Prelude.Nothing,+ keywordAction = Prelude.Nothing,+ keywordMessage = Prelude.Nothing,+ originationIdentity = Prelude.Nothing,+ originationIdentityArn = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The keyword that was added.+putKeywordResponse_keyword :: Lens.Lens' PutKeywordResponse (Prelude.Maybe Prelude.Text)+putKeywordResponse_keyword = Lens.lens (\PutKeywordResponse' {keyword} -> keyword) (\s@PutKeywordResponse' {} a -> s {keyword = a} :: PutKeywordResponse)++-- | The action to perform when the keyword is used.+putKeywordResponse_keywordAction :: Lens.Lens' PutKeywordResponse (Prelude.Maybe KeywordAction)+putKeywordResponse_keywordAction = Lens.lens (\PutKeywordResponse' {keywordAction} -> keywordAction) (\s@PutKeywordResponse' {} a -> s {keywordAction = a} :: PutKeywordResponse)++-- | The message associated with the keyword.+putKeywordResponse_keywordMessage :: Lens.Lens' PutKeywordResponse (Prelude.Maybe Prelude.Text)+putKeywordResponse_keywordMessage = Lens.lens (\PutKeywordResponse' {keywordMessage} -> keywordMessage) (\s@PutKeywordResponse' {} a -> s {keywordMessage = a} :: PutKeywordResponse)++-- | The PhoneNumberId or PoolId that the keyword was associated with.+putKeywordResponse_originationIdentity :: Lens.Lens' PutKeywordResponse (Prelude.Maybe Prelude.Text)+putKeywordResponse_originationIdentity = Lens.lens (\PutKeywordResponse' {originationIdentity} -> originationIdentity) (\s@PutKeywordResponse' {} a -> s {originationIdentity = a} :: PutKeywordResponse)++-- | The PhoneNumberArn or PoolArn that the keyword was associated with.+putKeywordResponse_originationIdentityArn :: Lens.Lens' PutKeywordResponse (Prelude.Maybe Prelude.Text)+putKeywordResponse_originationIdentityArn = Lens.lens (\PutKeywordResponse' {originationIdentityArn} -> originationIdentityArn) (\s@PutKeywordResponse' {} a -> s {originationIdentityArn = a} :: PutKeywordResponse)++-- | The response's http status code.+putKeywordResponse_httpStatus :: Lens.Lens' PutKeywordResponse Prelude.Int+putKeywordResponse_httpStatus = Lens.lens (\PutKeywordResponse' {httpStatus} -> httpStatus) (\s@PutKeywordResponse' {} a -> s {httpStatus = a} :: PutKeywordResponse)++instance Prelude.NFData PutKeywordResponse where+ rnf PutKeywordResponse' {..} =+ Prelude.rnf keyword+ `Prelude.seq` Prelude.rnf keywordAction+ `Prelude.seq` Prelude.rnf keywordMessage+ `Prelude.seq` Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf originationIdentityArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/PutOptedOutNumber.hs view
@@ -0,0 +1,250 @@+{-# 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.PinpointSmsVoiceV2.PutOptedOutNumber+-- 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 opted out destination phone number in the opt-out list.+--+-- If the destination phone number isn\'t valid or if the specified opt-out+-- list doesn\'t exist, an Error is returned.+module Amazonka.PinpointSmsVoiceV2.PutOptedOutNumber+ ( -- * Creating a Request+ PutOptedOutNumber (..),+ newPutOptedOutNumber,++ -- * Request Lenses+ putOptedOutNumber_optOutListName,+ putOptedOutNumber_optedOutNumber,++ -- * Destructuring the Response+ PutOptedOutNumberResponse (..),+ newPutOptedOutNumberResponse,++ -- * Response Lenses+ putOptedOutNumberResponse_endUserOptedOut,+ putOptedOutNumberResponse_optOutListArn,+ putOptedOutNumberResponse_optOutListName,+ putOptedOutNumberResponse_optedOutNumber,+ putOptedOutNumberResponse_optedOutTimestamp,+ putOptedOutNumberResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newPutOptedOutNumber' smart constructor.+data PutOptedOutNumber = PutOptedOutNumber'+ { -- | The OptOutListName or OptOutListArn to add the phone number to.+ optOutListName :: Prelude.Text,+ -- | The phone number to add to the OptOutList in E.164 format.+ optedOutNumber :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutOptedOutNumber' 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:+--+-- 'optOutListName', 'putOptedOutNumber_optOutListName' - The OptOutListName or OptOutListArn to add the phone number to.+--+-- 'optedOutNumber', 'putOptedOutNumber_optedOutNumber' - The phone number to add to the OptOutList in E.164 format.+newPutOptedOutNumber ::+ -- | 'optOutListName'+ Prelude.Text ->+ -- | 'optedOutNumber'+ Prelude.Text ->+ PutOptedOutNumber+newPutOptedOutNumber+ pOptOutListName_+ pOptedOutNumber_ =+ PutOptedOutNumber'+ { optOutListName =+ pOptOutListName_,+ optedOutNumber = pOptedOutNumber_+ }++-- | The OptOutListName or OptOutListArn to add the phone number to.+putOptedOutNumber_optOutListName :: Lens.Lens' PutOptedOutNumber Prelude.Text+putOptedOutNumber_optOutListName = Lens.lens (\PutOptedOutNumber' {optOutListName} -> optOutListName) (\s@PutOptedOutNumber' {} a -> s {optOutListName = a} :: PutOptedOutNumber)++-- | The phone number to add to the OptOutList in E.164 format.+putOptedOutNumber_optedOutNumber :: Lens.Lens' PutOptedOutNumber Prelude.Text+putOptedOutNumber_optedOutNumber = Lens.lens (\PutOptedOutNumber' {optedOutNumber} -> optedOutNumber) (\s@PutOptedOutNumber' {} a -> s {optedOutNumber = a} :: PutOptedOutNumber)++instance Core.AWSRequest PutOptedOutNumber where+ type+ AWSResponse PutOptedOutNumber =+ PutOptedOutNumberResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ PutOptedOutNumberResponse'+ Prelude.<$> (x Data..?> "EndUserOptedOut")+ Prelude.<*> (x Data..?> "OptOutListArn")+ Prelude.<*> (x Data..?> "OptOutListName")+ Prelude.<*> (x Data..?> "OptedOutNumber")+ Prelude.<*> (x Data..?> "OptedOutTimestamp")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable PutOptedOutNumber where+ hashWithSalt _salt PutOptedOutNumber' {..} =+ _salt+ `Prelude.hashWithSalt` optOutListName+ `Prelude.hashWithSalt` optedOutNumber++instance Prelude.NFData PutOptedOutNumber where+ rnf PutOptedOutNumber' {..} =+ Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf optedOutNumber++instance Data.ToHeaders PutOptedOutNumber where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.PutOptedOutNumber" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON PutOptedOutNumber where+ toJSON PutOptedOutNumber' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("OptOutListName" Data..= optOutListName),+ Prelude.Just+ ("OptedOutNumber" Data..= optedOutNumber)+ ]+ )++instance Data.ToPath PutOptedOutNumber where+ toPath = Prelude.const "/"++instance Data.ToQuery PutOptedOutNumber where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutOptedOutNumberResponse' smart constructor.+data PutOptedOutNumberResponse = PutOptedOutNumberResponse'+ { -- | This is true if it was the end user who requested their phone number be+ -- removed.+ endUserOptedOut :: Prelude.Maybe Prelude.Bool,+ -- | The OptOutListArn that the phone number was removed from.+ optOutListArn :: Prelude.Maybe Prelude.Text,+ -- | The OptOutListName that the phone number was removed from.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | The phone number that was added to the OptOutList.+ optedOutNumber :: Prelude.Maybe Prelude.Text,+ -- | The time that the phone number was added to the OptOutList, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ optedOutTimestamp :: Prelude.Maybe Data.POSIX,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutOptedOutNumberResponse' 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:+--+-- 'endUserOptedOut', 'putOptedOutNumberResponse_endUserOptedOut' - This is true if it was the end user who requested their phone number be+-- removed.+--+-- 'optOutListArn', 'putOptedOutNumberResponse_optOutListArn' - The OptOutListArn that the phone number was removed from.+--+-- 'optOutListName', 'putOptedOutNumberResponse_optOutListName' - The OptOutListName that the phone number was removed from.+--+-- 'optedOutNumber', 'putOptedOutNumberResponse_optedOutNumber' - The phone number that was added to the OptOutList.+--+-- 'optedOutTimestamp', 'putOptedOutNumberResponse_optedOutTimestamp' - The time that the phone number was added to the OptOutList, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'httpStatus', 'putOptedOutNumberResponse_httpStatus' - The response's http status code.+newPutOptedOutNumberResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ PutOptedOutNumberResponse+newPutOptedOutNumberResponse pHttpStatus_ =+ PutOptedOutNumberResponse'+ { endUserOptedOut =+ Prelude.Nothing,+ optOutListArn = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ optedOutNumber = Prelude.Nothing,+ optedOutTimestamp = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | This is true if it was the end user who requested their phone number be+-- removed.+putOptedOutNumberResponse_endUserOptedOut :: Lens.Lens' PutOptedOutNumberResponse (Prelude.Maybe Prelude.Bool)+putOptedOutNumberResponse_endUserOptedOut = Lens.lens (\PutOptedOutNumberResponse' {endUserOptedOut} -> endUserOptedOut) (\s@PutOptedOutNumberResponse' {} a -> s {endUserOptedOut = a} :: PutOptedOutNumberResponse)++-- | The OptOutListArn that the phone number was removed from.+putOptedOutNumberResponse_optOutListArn :: Lens.Lens' PutOptedOutNumberResponse (Prelude.Maybe Prelude.Text)+putOptedOutNumberResponse_optOutListArn = Lens.lens (\PutOptedOutNumberResponse' {optOutListArn} -> optOutListArn) (\s@PutOptedOutNumberResponse' {} a -> s {optOutListArn = a} :: PutOptedOutNumberResponse)++-- | The OptOutListName that the phone number was removed from.+putOptedOutNumberResponse_optOutListName :: Lens.Lens' PutOptedOutNumberResponse (Prelude.Maybe Prelude.Text)+putOptedOutNumberResponse_optOutListName = Lens.lens (\PutOptedOutNumberResponse' {optOutListName} -> optOutListName) (\s@PutOptedOutNumberResponse' {} a -> s {optOutListName = a} :: PutOptedOutNumberResponse)++-- | The phone number that was added to the OptOutList.+putOptedOutNumberResponse_optedOutNumber :: Lens.Lens' PutOptedOutNumberResponse (Prelude.Maybe Prelude.Text)+putOptedOutNumberResponse_optedOutNumber = Lens.lens (\PutOptedOutNumberResponse' {optedOutNumber} -> optedOutNumber) (\s@PutOptedOutNumberResponse' {} a -> s {optedOutNumber = a} :: PutOptedOutNumberResponse)++-- | The time that the phone number was added to the OptOutList, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+putOptedOutNumberResponse_optedOutTimestamp :: Lens.Lens' PutOptedOutNumberResponse (Prelude.Maybe Prelude.UTCTime)+putOptedOutNumberResponse_optedOutTimestamp = Lens.lens (\PutOptedOutNumberResponse' {optedOutTimestamp} -> optedOutTimestamp) (\s@PutOptedOutNumberResponse' {} a -> s {optedOutTimestamp = a} :: PutOptedOutNumberResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+putOptedOutNumberResponse_httpStatus :: Lens.Lens' PutOptedOutNumberResponse Prelude.Int+putOptedOutNumberResponse_httpStatus = Lens.lens (\PutOptedOutNumberResponse' {httpStatus} -> httpStatus) (\s@PutOptedOutNumberResponse' {} a -> s {httpStatus = a} :: PutOptedOutNumberResponse)++instance Prelude.NFData PutOptedOutNumberResponse where+ rnf PutOptedOutNumberResponse' {..} =+ Prelude.rnf endUserOptedOut+ `Prelude.seq` Prelude.rnf optOutListArn+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf optedOutNumber+ `Prelude.seq` Prelude.rnf optedOutTimestamp+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/ReleasePhoneNumber.hs view
@@ -0,0 +1,364 @@+{-# 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.PinpointSmsVoiceV2.ReleasePhoneNumber+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Releases an existing origination phone number in your account. Once+-- released, a phone number is no longer available for sending messages.+--+-- If the origination phone number has deletion protection enabled or is+-- associated with a pool, an Error is returned.+module Amazonka.PinpointSmsVoiceV2.ReleasePhoneNumber+ ( -- * Creating a Request+ ReleasePhoneNumber (..),+ newReleasePhoneNumber,++ -- * Request Lenses+ releasePhoneNumber_phoneNumberId,++ -- * Destructuring the Response+ ReleasePhoneNumberResponse (..),+ newReleasePhoneNumberResponse,++ -- * Response Lenses+ releasePhoneNumberResponse_createdTimestamp,+ releasePhoneNumberResponse_isoCountryCode,+ releasePhoneNumberResponse_messageType,+ releasePhoneNumberResponse_monthlyLeasingPrice,+ releasePhoneNumberResponse_numberCapabilities,+ releasePhoneNumberResponse_numberType,+ releasePhoneNumberResponse_optOutListName,+ releasePhoneNumberResponse_phoneNumber,+ releasePhoneNumberResponse_phoneNumberArn,+ releasePhoneNumberResponse_phoneNumberId,+ releasePhoneNumberResponse_selfManagedOptOutsEnabled,+ releasePhoneNumberResponse_status,+ releasePhoneNumberResponse_twoWayChannelArn,+ releasePhoneNumberResponse_twoWayEnabled,+ releasePhoneNumberResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newReleasePhoneNumber' smart constructor.+data ReleasePhoneNumber = ReleasePhoneNumber'+ { -- | The PhoneNumberId or PhoneNumberArn of the phone number to release. You+ -- can use DescribePhoneNumbers to get the values for PhoneNumberId and+ -- PhoneNumberArn.+ phoneNumberId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ReleasePhoneNumber' 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:+--+-- 'phoneNumberId', 'releasePhoneNumber_phoneNumberId' - The PhoneNumberId or PhoneNumberArn of the phone number to release. You+-- can use DescribePhoneNumbers to get the values for PhoneNumberId and+-- PhoneNumberArn.+newReleasePhoneNumber ::+ -- | 'phoneNumberId'+ Prelude.Text ->+ ReleasePhoneNumber+newReleasePhoneNumber pPhoneNumberId_ =+ ReleasePhoneNumber'+ { phoneNumberId =+ pPhoneNumberId_+ }++-- | The PhoneNumberId or PhoneNumberArn of the phone number to release. You+-- can use DescribePhoneNumbers to get the values for PhoneNumberId and+-- PhoneNumberArn.+releasePhoneNumber_phoneNumberId :: Lens.Lens' ReleasePhoneNumber Prelude.Text+releasePhoneNumber_phoneNumberId = Lens.lens (\ReleasePhoneNumber' {phoneNumberId} -> phoneNumberId) (\s@ReleasePhoneNumber' {} a -> s {phoneNumberId = a} :: ReleasePhoneNumber)++instance Core.AWSRequest ReleasePhoneNumber where+ type+ AWSResponse ReleasePhoneNumber =+ ReleasePhoneNumberResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ReleasePhoneNumberResponse'+ Prelude.<$> (x Data..?> "CreatedTimestamp")+ Prelude.<*> (x Data..?> "IsoCountryCode")+ Prelude.<*> (x Data..?> "MessageType")+ Prelude.<*> (x Data..?> "MonthlyLeasingPrice")+ Prelude.<*> (x Data..?> "NumberCapabilities")+ Prelude.<*> (x Data..?> "NumberType")+ Prelude.<*> (x Data..?> "OptOutListName")+ Prelude.<*> (x Data..?> "PhoneNumber")+ Prelude.<*> (x Data..?> "PhoneNumberArn")+ Prelude.<*> (x Data..?> "PhoneNumberId")+ Prelude.<*> (x Data..?> "SelfManagedOptOutsEnabled")+ Prelude.<*> (x Data..?> "Status")+ Prelude.<*> (x Data..?> "TwoWayChannelArn")+ Prelude.<*> (x Data..?> "TwoWayEnabled")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ReleasePhoneNumber where+ hashWithSalt _salt ReleasePhoneNumber' {..} =+ _salt `Prelude.hashWithSalt` phoneNumberId++instance Prelude.NFData ReleasePhoneNumber where+ rnf ReleasePhoneNumber' {..} =+ Prelude.rnf phoneNumberId++instance Data.ToHeaders ReleasePhoneNumber where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.ReleasePhoneNumber" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ReleasePhoneNumber where+ toJSON ReleasePhoneNumber' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("PhoneNumberId" Data..= phoneNumberId)+ ]+ )++instance Data.ToPath ReleasePhoneNumber where+ toPath = Prelude.const "/"++instance Data.ToQuery ReleasePhoneNumber where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newReleasePhoneNumberResponse' smart constructor.+data ReleasePhoneNumberResponse = ReleasePhoneNumberResponse'+ { -- | The time when the phone number was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Prelude.Maybe Data.POSIX,+ -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+ -- region.+ isoCountryCode :: Prelude.Maybe Prelude.Text,+ -- | The message type that was associated with the phone number.+ messageType :: Prelude.Maybe MessageType,+ -- | The monthly price of the phone number, in US dollars.+ monthlyLeasingPrice :: Prelude.Maybe Prelude.Text,+ -- | Specifies if the number could be used for text messages, voice, or both.+ numberCapabilities :: Prelude.Maybe (Prelude.NonEmpty NumberCapability),+ -- | The type of number that was released.+ numberType :: Prelude.Maybe NumberType,+ -- | The name of the OptOutList that was associated with the phone number.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | The phone number that was released.+ phoneNumber :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberArn of the phone number that was released.+ phoneNumberArn :: Prelude.Maybe Prelude.Text,+ -- | The PhoneNumberId of the phone number that was released.+ phoneNumberId :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When an end recipient sends a message+ -- that begins with HELP or STOP to one of your dedicated numbers, Amazon+ -- Pinpoint automatically replies with a customizable message and adds the+ -- end recipient to the OptOutList. When set to true you\'re responsible+ -- for responding to HELP and STOP requests. You\'re also responsible for+ -- tracking and honoring opt-out requests.+ selfManagedOptOutsEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The current status of the request.+ status :: Prelude.Maybe NumberStatus,+ -- | The Amazon Resource Name (ARN) of the TwoWayChannel.+ twoWayChannelArn :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When set to true you can receive+ -- incoming text messages from your end recipients.+ twoWayEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ReleasePhoneNumberResponse' 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:+--+-- 'createdTimestamp', 'releasePhoneNumberResponse_createdTimestamp' - The time when the phone number was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'isoCountryCode', 'releasePhoneNumberResponse_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+--+-- 'messageType', 'releasePhoneNumberResponse_messageType' - The message type that was associated with the phone number.+--+-- 'monthlyLeasingPrice', 'releasePhoneNumberResponse_monthlyLeasingPrice' - The monthly price of the phone number, in US dollars.+--+-- 'numberCapabilities', 'releasePhoneNumberResponse_numberCapabilities' - Specifies if the number could be used for text messages, voice, or both.+--+-- 'numberType', 'releasePhoneNumberResponse_numberType' - The type of number that was released.+--+-- 'optOutListName', 'releasePhoneNumberResponse_optOutListName' - The name of the OptOutList that was associated with the phone number.+--+-- 'phoneNumber', 'releasePhoneNumberResponse_phoneNumber' - The phone number that was released.+--+-- 'phoneNumberArn', 'releasePhoneNumberResponse_phoneNumberArn' - The PhoneNumberArn of the phone number that was released.+--+-- 'phoneNumberId', 'releasePhoneNumberResponse_phoneNumberId' - The PhoneNumberId of the phone number that was released.+--+-- 'selfManagedOptOutsEnabled', 'releasePhoneNumberResponse_selfManagedOptOutsEnabled' - By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+--+-- 'status', 'releasePhoneNumberResponse_status' - The current status of the request.+--+-- 'twoWayChannelArn', 'releasePhoneNumberResponse_twoWayChannelArn' - The Amazon Resource Name (ARN) of the TwoWayChannel.+--+-- 'twoWayEnabled', 'releasePhoneNumberResponse_twoWayEnabled' - By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+--+-- 'httpStatus', 'releasePhoneNumberResponse_httpStatus' - The response's http status code.+newReleasePhoneNumberResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ReleasePhoneNumberResponse+newReleasePhoneNumberResponse pHttpStatus_ =+ ReleasePhoneNumberResponse'+ { createdTimestamp =+ Prelude.Nothing,+ isoCountryCode = Prelude.Nothing,+ messageType = Prelude.Nothing,+ monthlyLeasingPrice = Prelude.Nothing,+ numberCapabilities = Prelude.Nothing,+ numberType = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ phoneNumber = Prelude.Nothing,+ phoneNumberArn = Prelude.Nothing,+ phoneNumberId = Prelude.Nothing,+ selfManagedOptOutsEnabled = Prelude.Nothing,+ status = Prelude.Nothing,+ twoWayChannelArn = Prelude.Nothing,+ twoWayEnabled = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The time when the phone number was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+releasePhoneNumberResponse_createdTimestamp :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe Prelude.UTCTime)+releasePhoneNumberResponse_createdTimestamp = Lens.lens (\ReleasePhoneNumberResponse' {createdTimestamp} -> createdTimestamp) (\s@ReleasePhoneNumberResponse' {} a -> s {createdTimestamp = a} :: ReleasePhoneNumberResponse) Prelude.. Lens.mapping Data._Time++-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+releasePhoneNumberResponse_isoCountryCode :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe Prelude.Text)+releasePhoneNumberResponse_isoCountryCode = Lens.lens (\ReleasePhoneNumberResponse' {isoCountryCode} -> isoCountryCode) (\s@ReleasePhoneNumberResponse' {} a -> s {isoCountryCode = a} :: ReleasePhoneNumberResponse)++-- | The message type that was associated with the phone number.+releasePhoneNumberResponse_messageType :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe MessageType)+releasePhoneNumberResponse_messageType = Lens.lens (\ReleasePhoneNumberResponse' {messageType} -> messageType) (\s@ReleasePhoneNumberResponse' {} a -> s {messageType = a} :: ReleasePhoneNumberResponse)++-- | The monthly price of the phone number, in US dollars.+releasePhoneNumberResponse_monthlyLeasingPrice :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe Prelude.Text)+releasePhoneNumberResponse_monthlyLeasingPrice = Lens.lens (\ReleasePhoneNumberResponse' {monthlyLeasingPrice} -> monthlyLeasingPrice) (\s@ReleasePhoneNumberResponse' {} a -> s {monthlyLeasingPrice = a} :: ReleasePhoneNumberResponse)++-- | Specifies if the number could be used for text messages, voice, or both.+releasePhoneNumberResponse_numberCapabilities :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe (Prelude.NonEmpty NumberCapability))+releasePhoneNumberResponse_numberCapabilities = Lens.lens (\ReleasePhoneNumberResponse' {numberCapabilities} -> numberCapabilities) (\s@ReleasePhoneNumberResponse' {} a -> s {numberCapabilities = a} :: ReleasePhoneNumberResponse) Prelude.. Lens.mapping Lens.coerced++-- | The type of number that was released.+releasePhoneNumberResponse_numberType :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe NumberType)+releasePhoneNumberResponse_numberType = Lens.lens (\ReleasePhoneNumberResponse' {numberType} -> numberType) (\s@ReleasePhoneNumberResponse' {} a -> s {numberType = a} :: ReleasePhoneNumberResponse)++-- | The name of the OptOutList that was associated with the phone number.+releasePhoneNumberResponse_optOutListName :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe Prelude.Text)+releasePhoneNumberResponse_optOutListName = Lens.lens (\ReleasePhoneNumberResponse' {optOutListName} -> optOutListName) (\s@ReleasePhoneNumberResponse' {} a -> s {optOutListName = a} :: ReleasePhoneNumberResponse)++-- | The phone number that was released.+releasePhoneNumberResponse_phoneNumber :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe Prelude.Text)+releasePhoneNumberResponse_phoneNumber = Lens.lens (\ReleasePhoneNumberResponse' {phoneNumber} -> phoneNumber) (\s@ReleasePhoneNumberResponse' {} a -> s {phoneNumber = a} :: ReleasePhoneNumberResponse)++-- | The PhoneNumberArn of the phone number that was released.+releasePhoneNumberResponse_phoneNumberArn :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe Prelude.Text)+releasePhoneNumberResponse_phoneNumberArn = Lens.lens (\ReleasePhoneNumberResponse' {phoneNumberArn} -> phoneNumberArn) (\s@ReleasePhoneNumberResponse' {} a -> s {phoneNumberArn = a} :: ReleasePhoneNumberResponse)++-- | The PhoneNumberId of the phone number that was released.+releasePhoneNumberResponse_phoneNumberId :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe Prelude.Text)+releasePhoneNumberResponse_phoneNumberId = Lens.lens (\ReleasePhoneNumberResponse' {phoneNumberId} -> phoneNumberId) (\s@ReleasePhoneNumberResponse' {} a -> s {phoneNumberId = a} :: ReleasePhoneNumberResponse)++-- | By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+releasePhoneNumberResponse_selfManagedOptOutsEnabled :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe Prelude.Bool)+releasePhoneNumberResponse_selfManagedOptOutsEnabled = Lens.lens (\ReleasePhoneNumberResponse' {selfManagedOptOutsEnabled} -> selfManagedOptOutsEnabled) (\s@ReleasePhoneNumberResponse' {} a -> s {selfManagedOptOutsEnabled = a} :: ReleasePhoneNumberResponse)++-- | The current status of the request.+releasePhoneNumberResponse_status :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe NumberStatus)+releasePhoneNumberResponse_status = Lens.lens (\ReleasePhoneNumberResponse' {status} -> status) (\s@ReleasePhoneNumberResponse' {} a -> s {status = a} :: ReleasePhoneNumberResponse)++-- | The Amazon Resource Name (ARN) of the TwoWayChannel.+releasePhoneNumberResponse_twoWayChannelArn :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe Prelude.Text)+releasePhoneNumberResponse_twoWayChannelArn = Lens.lens (\ReleasePhoneNumberResponse' {twoWayChannelArn} -> twoWayChannelArn) (\s@ReleasePhoneNumberResponse' {} a -> s {twoWayChannelArn = a} :: ReleasePhoneNumberResponse)++-- | By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+releasePhoneNumberResponse_twoWayEnabled :: Lens.Lens' ReleasePhoneNumberResponse (Prelude.Maybe Prelude.Bool)+releasePhoneNumberResponse_twoWayEnabled = Lens.lens (\ReleasePhoneNumberResponse' {twoWayEnabled} -> twoWayEnabled) (\s@ReleasePhoneNumberResponse' {} a -> s {twoWayEnabled = a} :: ReleasePhoneNumberResponse)++-- | The response's http status code.+releasePhoneNumberResponse_httpStatus :: Lens.Lens' ReleasePhoneNumberResponse Prelude.Int+releasePhoneNumberResponse_httpStatus = Lens.lens (\ReleasePhoneNumberResponse' {httpStatus} -> httpStatus) (\s@ReleasePhoneNumberResponse' {} a -> s {httpStatus = a} :: ReleasePhoneNumberResponse)++instance Prelude.NFData ReleasePhoneNumberResponse where+ rnf ReleasePhoneNumberResponse' {..} =+ Prelude.rnf createdTimestamp+ `Prelude.seq` Prelude.rnf isoCountryCode+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf monthlyLeasingPrice+ `Prelude.seq` Prelude.rnf numberCapabilities+ `Prelude.seq` Prelude.rnf numberType+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf phoneNumber+ `Prelude.seq` Prelude.rnf phoneNumberArn+ `Prelude.seq` Prelude.rnf phoneNumberId+ `Prelude.seq` Prelude.rnf selfManagedOptOutsEnabled+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf twoWayChannelArn+ `Prelude.seq` Prelude.rnf twoWayEnabled+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/RequestPhoneNumber.hs view
@@ -0,0 +1,576 @@+{-# 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.PinpointSmsVoiceV2.RequestPhoneNumber+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Request an origination phone number for use in your account. For more+-- information on phone number request see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-request-number.html Requesting a number>+-- in the /Amazon Pinpoint User Guide/.+module Amazonka.PinpointSmsVoiceV2.RequestPhoneNumber+ ( -- * Creating a Request+ RequestPhoneNumber (..),+ newRequestPhoneNumber,++ -- * Request Lenses+ requestPhoneNumber_clientToken,+ requestPhoneNumber_deletionProtectionEnabled,+ requestPhoneNumber_optOutListName,+ requestPhoneNumber_poolId,+ requestPhoneNumber_registrationId,+ requestPhoneNumber_tags,+ requestPhoneNumber_isoCountryCode,+ requestPhoneNumber_messageType,+ requestPhoneNumber_numberCapabilities,+ requestPhoneNumber_numberType,++ -- * Destructuring the Response+ RequestPhoneNumberResponse (..),+ newRequestPhoneNumberResponse,++ -- * Response Lenses+ requestPhoneNumberResponse_createdTimestamp,+ requestPhoneNumberResponse_deletionProtectionEnabled,+ requestPhoneNumberResponse_isoCountryCode,+ requestPhoneNumberResponse_messageType,+ requestPhoneNumberResponse_monthlyLeasingPrice,+ requestPhoneNumberResponse_numberCapabilities,+ requestPhoneNumberResponse_numberType,+ requestPhoneNumberResponse_optOutListName,+ requestPhoneNumberResponse_phoneNumber,+ requestPhoneNumberResponse_phoneNumberArn,+ requestPhoneNumberResponse_phoneNumberId,+ requestPhoneNumberResponse_poolId,+ requestPhoneNumberResponse_selfManagedOptOutsEnabled,+ requestPhoneNumberResponse_status,+ requestPhoneNumberResponse_tags,+ requestPhoneNumberResponse_twoWayChannelArn,+ requestPhoneNumberResponse_twoWayEnabled,+ requestPhoneNumberResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newRequestPhoneNumber' smart constructor.+data RequestPhoneNumber = RequestPhoneNumber'+ { -- | Unique, case-sensitive identifier that you provide to ensure the+ -- idempotency of the request. If you don\'t specify a client token, a+ -- randomly generated token is used for the request to ensure idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When set to true the phone number+ -- can\'t be deleted.+ deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The name of the OptOutList to associate with the phone number. You can+ -- use the OutOutListName or OptPutListArn.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | The pool to associated with the phone number. You can use the PoolId or+ -- PoolArn.+ poolId :: Prelude.Maybe Prelude.Text,+ -- | Use this field to attach your phone number for an external registration+ -- process.+ registrationId :: Prelude.Maybe Prelude.Text,+ -- | An array of tags (key and value pairs) associate with the requested+ -- phone number.+ tags :: Prelude.Maybe [Tag],+ -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+ -- region.+ isoCountryCode :: Prelude.Text,+ -- | The type of message. Valid values are TRANSACTIONAL for messages that+ -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+ -- critical or time-sensitive.+ messageType :: MessageType,+ -- | Indicates if the phone number will be used for text messages, voice+ -- messages, or both.+ numberCapabilities :: Prelude.NonEmpty NumberCapability,+ -- | The type of phone number to request.+ numberType :: RequestableNumberType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RequestPhoneNumber' 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:+--+-- 'clientToken', 'requestPhoneNumber_clientToken' - Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+--+-- 'deletionProtectionEnabled', 'requestPhoneNumber_deletionProtectionEnabled' - By default this is set to false. When set to true the phone number+-- can\'t be deleted.+--+-- 'optOutListName', 'requestPhoneNumber_optOutListName' - The name of the OptOutList to associate with the phone number. You can+-- use the OutOutListName or OptPutListArn.+--+-- 'poolId', 'requestPhoneNumber_poolId' - The pool to associated with the phone number. You can use the PoolId or+-- PoolArn.+--+-- 'registrationId', 'requestPhoneNumber_registrationId' - Use this field to attach your phone number for an external registration+-- process.+--+-- 'tags', 'requestPhoneNumber_tags' - An array of tags (key and value pairs) associate with the requested+-- phone number.+--+-- 'isoCountryCode', 'requestPhoneNumber_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+--+-- 'messageType', 'requestPhoneNumber_messageType' - The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+--+-- 'numberCapabilities', 'requestPhoneNumber_numberCapabilities' - Indicates if the phone number will be used for text messages, voice+-- messages, or both.+--+-- 'numberType', 'requestPhoneNumber_numberType' - The type of phone number to request.+newRequestPhoneNumber ::+ -- | 'isoCountryCode'+ Prelude.Text ->+ -- | 'messageType'+ MessageType ->+ -- | 'numberCapabilities'+ Prelude.NonEmpty NumberCapability ->+ -- | 'numberType'+ RequestableNumberType ->+ RequestPhoneNumber+newRequestPhoneNumber+ pIsoCountryCode_+ pMessageType_+ pNumberCapabilities_+ pNumberType_ =+ RequestPhoneNumber'+ { clientToken = Prelude.Nothing,+ deletionProtectionEnabled = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ poolId = Prelude.Nothing,+ registrationId = Prelude.Nothing,+ tags = Prelude.Nothing,+ isoCountryCode = pIsoCountryCode_,+ messageType = pMessageType_,+ numberCapabilities =+ Lens.coerced Lens.# pNumberCapabilities_,+ numberType = pNumberType_+ }++-- | Unique, case-sensitive identifier that you provide to ensure the+-- idempotency of the request. If you don\'t specify a client token, a+-- randomly generated token is used for the request to ensure idempotency.+requestPhoneNumber_clientToken :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe Prelude.Text)+requestPhoneNumber_clientToken = Lens.lens (\RequestPhoneNumber' {clientToken} -> clientToken) (\s@RequestPhoneNumber' {} a -> s {clientToken = a} :: RequestPhoneNumber)++-- | By default this is set to false. When set to true the phone number+-- can\'t be deleted.+requestPhoneNumber_deletionProtectionEnabled :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe Prelude.Bool)+requestPhoneNumber_deletionProtectionEnabled = Lens.lens (\RequestPhoneNumber' {deletionProtectionEnabled} -> deletionProtectionEnabled) (\s@RequestPhoneNumber' {} a -> s {deletionProtectionEnabled = a} :: RequestPhoneNumber)++-- | The name of the OptOutList to associate with the phone number. You can+-- use the OutOutListName or OptPutListArn.+requestPhoneNumber_optOutListName :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe Prelude.Text)+requestPhoneNumber_optOutListName = Lens.lens (\RequestPhoneNumber' {optOutListName} -> optOutListName) (\s@RequestPhoneNumber' {} a -> s {optOutListName = a} :: RequestPhoneNumber)++-- | The pool to associated with the phone number. You can use the PoolId or+-- PoolArn.+requestPhoneNumber_poolId :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe Prelude.Text)+requestPhoneNumber_poolId = Lens.lens (\RequestPhoneNumber' {poolId} -> poolId) (\s@RequestPhoneNumber' {} a -> s {poolId = a} :: RequestPhoneNumber)++-- | Use this field to attach your phone number for an external registration+-- process.+requestPhoneNumber_registrationId :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe Prelude.Text)+requestPhoneNumber_registrationId = Lens.lens (\RequestPhoneNumber' {registrationId} -> registrationId) (\s@RequestPhoneNumber' {} a -> s {registrationId = a} :: RequestPhoneNumber)++-- | An array of tags (key and value pairs) associate with the requested+-- phone number.+requestPhoneNumber_tags :: Lens.Lens' RequestPhoneNumber (Prelude.Maybe [Tag])+requestPhoneNumber_tags = Lens.lens (\RequestPhoneNumber' {tags} -> tags) (\s@RequestPhoneNumber' {} a -> s {tags = a} :: RequestPhoneNumber) Prelude.. Lens.mapping Lens.coerced++-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+requestPhoneNumber_isoCountryCode :: Lens.Lens' RequestPhoneNumber Prelude.Text+requestPhoneNumber_isoCountryCode = Lens.lens (\RequestPhoneNumber' {isoCountryCode} -> isoCountryCode) (\s@RequestPhoneNumber' {} a -> s {isoCountryCode = a} :: RequestPhoneNumber)++-- | The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+requestPhoneNumber_messageType :: Lens.Lens' RequestPhoneNumber MessageType+requestPhoneNumber_messageType = Lens.lens (\RequestPhoneNumber' {messageType} -> messageType) (\s@RequestPhoneNumber' {} a -> s {messageType = a} :: RequestPhoneNumber)++-- | Indicates if the phone number will be used for text messages, voice+-- messages, or both.+requestPhoneNumber_numberCapabilities :: Lens.Lens' RequestPhoneNumber (Prelude.NonEmpty NumberCapability)+requestPhoneNumber_numberCapabilities = Lens.lens (\RequestPhoneNumber' {numberCapabilities} -> numberCapabilities) (\s@RequestPhoneNumber' {} a -> s {numberCapabilities = a} :: RequestPhoneNumber) Prelude.. Lens.coerced++-- | The type of phone number to request.+requestPhoneNumber_numberType :: Lens.Lens' RequestPhoneNumber RequestableNumberType+requestPhoneNumber_numberType = Lens.lens (\RequestPhoneNumber' {numberType} -> numberType) (\s@RequestPhoneNumber' {} a -> s {numberType = a} :: RequestPhoneNumber)++instance Core.AWSRequest RequestPhoneNumber where+ type+ AWSResponse RequestPhoneNumber =+ RequestPhoneNumberResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ RequestPhoneNumberResponse'+ Prelude.<$> (x Data..?> "CreatedTimestamp")+ Prelude.<*> (x Data..?> "DeletionProtectionEnabled")+ Prelude.<*> (x Data..?> "IsoCountryCode")+ Prelude.<*> (x Data..?> "MessageType")+ Prelude.<*> (x Data..?> "MonthlyLeasingPrice")+ Prelude.<*> (x Data..?> "NumberCapabilities")+ Prelude.<*> (x Data..?> "NumberType")+ Prelude.<*> (x Data..?> "OptOutListName")+ Prelude.<*> (x Data..?> "PhoneNumber")+ Prelude.<*> (x Data..?> "PhoneNumberArn")+ Prelude.<*> (x Data..?> "PhoneNumberId")+ Prelude.<*> (x Data..?> "PoolId")+ Prelude.<*> (x Data..?> "SelfManagedOptOutsEnabled")+ Prelude.<*> (x Data..?> "Status")+ Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "TwoWayChannelArn")+ Prelude.<*> (x Data..?> "TwoWayEnabled")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable RequestPhoneNumber where+ hashWithSalt _salt RequestPhoneNumber' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` deletionProtectionEnabled+ `Prelude.hashWithSalt` optOutListName+ `Prelude.hashWithSalt` poolId+ `Prelude.hashWithSalt` registrationId+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` isoCountryCode+ `Prelude.hashWithSalt` messageType+ `Prelude.hashWithSalt` numberCapabilities+ `Prelude.hashWithSalt` numberType++instance Prelude.NFData RequestPhoneNumber where+ rnf RequestPhoneNumber' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf deletionProtectionEnabled+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf registrationId+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf isoCountryCode+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf numberCapabilities+ `Prelude.seq` Prelude.rnf numberType++instance Data.ToHeaders RequestPhoneNumber where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.RequestPhoneNumber" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON RequestPhoneNumber where+ toJSON RequestPhoneNumber' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ ("DeletionProtectionEnabled" Data..=)+ Prelude.<$> deletionProtectionEnabled,+ ("OptOutListName" Data..=)+ Prelude.<$> optOutListName,+ ("PoolId" Data..=) Prelude.<$> poolId,+ ("RegistrationId" Data..=)+ Prelude.<$> registrationId,+ ("Tags" Data..=) Prelude.<$> tags,+ Prelude.Just+ ("IsoCountryCode" Data..= isoCountryCode),+ Prelude.Just ("MessageType" Data..= messageType),+ Prelude.Just+ ("NumberCapabilities" Data..= numberCapabilities),+ Prelude.Just ("NumberType" Data..= numberType)+ ]+ )++instance Data.ToPath RequestPhoneNumber where+ toPath = Prelude.const "/"++instance Data.ToQuery RequestPhoneNumber where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newRequestPhoneNumberResponse' smart constructor.+data RequestPhoneNumberResponse = RequestPhoneNumberResponse'+ { -- | The time when the phone number was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Prelude.Maybe Data.POSIX,+ -- | By default this is set to false. When set to true the phone number+ -- can\'t be deleted.+ deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+ -- region.+ isoCountryCode :: Prelude.Maybe Prelude.Text,+ -- | The type of message. Valid values are TRANSACTIONAL for messages that+ -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+ -- critical or time-sensitive.+ messageType :: Prelude.Maybe MessageType,+ -- | The monthly price, in US dollars, to lease the phone number.+ monthlyLeasingPrice :: Prelude.Maybe Prelude.Text,+ -- | Indicates if the phone number will be used for text messages, voice+ -- messages or both.+ numberCapabilities :: Prelude.Maybe (Prelude.NonEmpty NumberCapability),+ -- | The type of number that was released.+ numberType :: Prelude.Maybe RequestableNumberType,+ -- | The name of the OptOutList that is associated with the requested phone+ -- number.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | The new phone number that was requested.+ phoneNumber :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the requested phone number.+ phoneNumberArn :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier of the new phone number.+ phoneNumberId :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier of the pool associated with the phone number+ poolId :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When an end recipient sends a message+ -- that begins with HELP or STOP to one of your dedicated numbers, Amazon+ -- Pinpoint automatically replies with a customizable message and adds the+ -- end recipient to the OptOutList. When set to true you\'re responsible+ -- for responding to HELP and STOP requests. You\'re also responsible for+ -- tracking and honoring opt-out requests.+ selfManagedOptOutsEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The current status of the request.+ status :: Prelude.Maybe NumberStatus,+ -- | An array of key and value pair tags that are associated with the phone+ -- number.+ tags :: Prelude.Maybe [Tag],+ -- | The ARN used to identify the two way channel.+ twoWayChannelArn :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When set to true you can receive+ -- incoming text messages from your end recipients.+ twoWayEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RequestPhoneNumberResponse' 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:+--+-- 'createdTimestamp', 'requestPhoneNumberResponse_createdTimestamp' - The time when the phone number was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'deletionProtectionEnabled', 'requestPhoneNumberResponse_deletionProtectionEnabled' - By default this is set to false. When set to true the phone number+-- can\'t be deleted.+--+-- 'isoCountryCode', 'requestPhoneNumberResponse_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+--+-- 'messageType', 'requestPhoneNumberResponse_messageType' - The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+--+-- 'monthlyLeasingPrice', 'requestPhoneNumberResponse_monthlyLeasingPrice' - The monthly price, in US dollars, to lease the phone number.+--+-- 'numberCapabilities', 'requestPhoneNumberResponse_numberCapabilities' - Indicates if the phone number will be used for text messages, voice+-- messages or both.+--+-- 'numberType', 'requestPhoneNumberResponse_numberType' - The type of number that was released.+--+-- 'optOutListName', 'requestPhoneNumberResponse_optOutListName' - The name of the OptOutList that is associated with the requested phone+-- number.+--+-- 'phoneNumber', 'requestPhoneNumberResponse_phoneNumber' - The new phone number that was requested.+--+-- 'phoneNumberArn', 'requestPhoneNumberResponse_phoneNumberArn' - The Amazon Resource Name (ARN) of the requested phone number.+--+-- 'phoneNumberId', 'requestPhoneNumberResponse_phoneNumberId' - The unique identifier of the new phone number.+--+-- 'poolId', 'requestPhoneNumberResponse_poolId' - The unique identifier of the pool associated with the phone number+--+-- 'selfManagedOptOutsEnabled', 'requestPhoneNumberResponse_selfManagedOptOutsEnabled' - By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+--+-- 'status', 'requestPhoneNumberResponse_status' - The current status of the request.+--+-- 'tags', 'requestPhoneNumberResponse_tags' - An array of key and value pair tags that are associated with the phone+-- number.+--+-- 'twoWayChannelArn', 'requestPhoneNumberResponse_twoWayChannelArn' - The ARN used to identify the two way channel.+--+-- 'twoWayEnabled', 'requestPhoneNumberResponse_twoWayEnabled' - By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+--+-- 'httpStatus', 'requestPhoneNumberResponse_httpStatus' - The response's http status code.+newRequestPhoneNumberResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ RequestPhoneNumberResponse+newRequestPhoneNumberResponse pHttpStatus_ =+ RequestPhoneNumberResponse'+ { createdTimestamp =+ Prelude.Nothing,+ deletionProtectionEnabled = Prelude.Nothing,+ isoCountryCode = Prelude.Nothing,+ messageType = Prelude.Nothing,+ monthlyLeasingPrice = Prelude.Nothing,+ numberCapabilities = Prelude.Nothing,+ numberType = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ phoneNumber = Prelude.Nothing,+ phoneNumberArn = Prelude.Nothing,+ phoneNumberId = Prelude.Nothing,+ poolId = Prelude.Nothing,+ selfManagedOptOutsEnabled = Prelude.Nothing,+ status = Prelude.Nothing,+ tags = Prelude.Nothing,+ twoWayChannelArn = Prelude.Nothing,+ twoWayEnabled = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The time when the phone number was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+requestPhoneNumberResponse_createdTimestamp :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.UTCTime)+requestPhoneNumberResponse_createdTimestamp = Lens.lens (\RequestPhoneNumberResponse' {createdTimestamp} -> createdTimestamp) (\s@RequestPhoneNumberResponse' {} a -> s {createdTimestamp = a} :: RequestPhoneNumberResponse) Prelude.. Lens.mapping Data._Time++-- | By default this is set to false. When set to true the phone number+-- can\'t be deleted.+requestPhoneNumberResponse_deletionProtectionEnabled :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Bool)+requestPhoneNumberResponse_deletionProtectionEnabled = Lens.lens (\RequestPhoneNumberResponse' {deletionProtectionEnabled} -> deletionProtectionEnabled) (\s@RequestPhoneNumberResponse' {} a -> s {deletionProtectionEnabled = a} :: RequestPhoneNumberResponse)++-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+requestPhoneNumberResponse_isoCountryCode :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)+requestPhoneNumberResponse_isoCountryCode = Lens.lens (\RequestPhoneNumberResponse' {isoCountryCode} -> isoCountryCode) (\s@RequestPhoneNumberResponse' {} a -> s {isoCountryCode = a} :: RequestPhoneNumberResponse)++-- | The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+requestPhoneNumberResponse_messageType :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe MessageType)+requestPhoneNumberResponse_messageType = Lens.lens (\RequestPhoneNumberResponse' {messageType} -> messageType) (\s@RequestPhoneNumberResponse' {} a -> s {messageType = a} :: RequestPhoneNumberResponse)++-- | The monthly price, in US dollars, to lease the phone number.+requestPhoneNumberResponse_monthlyLeasingPrice :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)+requestPhoneNumberResponse_monthlyLeasingPrice = Lens.lens (\RequestPhoneNumberResponse' {monthlyLeasingPrice} -> monthlyLeasingPrice) (\s@RequestPhoneNumberResponse' {} a -> s {monthlyLeasingPrice = a} :: RequestPhoneNumberResponse)++-- | Indicates if the phone number will be used for text messages, voice+-- messages or both.+requestPhoneNumberResponse_numberCapabilities :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe (Prelude.NonEmpty NumberCapability))+requestPhoneNumberResponse_numberCapabilities = Lens.lens (\RequestPhoneNumberResponse' {numberCapabilities} -> numberCapabilities) (\s@RequestPhoneNumberResponse' {} a -> s {numberCapabilities = a} :: RequestPhoneNumberResponse) Prelude.. Lens.mapping Lens.coerced++-- | The type of number that was released.+requestPhoneNumberResponse_numberType :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe RequestableNumberType)+requestPhoneNumberResponse_numberType = Lens.lens (\RequestPhoneNumberResponse' {numberType} -> numberType) (\s@RequestPhoneNumberResponse' {} a -> s {numberType = a} :: RequestPhoneNumberResponse)++-- | The name of the OptOutList that is associated with the requested phone+-- number.+requestPhoneNumberResponse_optOutListName :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)+requestPhoneNumberResponse_optOutListName = Lens.lens (\RequestPhoneNumberResponse' {optOutListName} -> optOutListName) (\s@RequestPhoneNumberResponse' {} a -> s {optOutListName = a} :: RequestPhoneNumberResponse)++-- | The new phone number that was requested.+requestPhoneNumberResponse_phoneNumber :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)+requestPhoneNumberResponse_phoneNumber = Lens.lens (\RequestPhoneNumberResponse' {phoneNumber} -> phoneNumber) (\s@RequestPhoneNumberResponse' {} a -> s {phoneNumber = a} :: RequestPhoneNumberResponse)++-- | The Amazon Resource Name (ARN) of the requested phone number.+requestPhoneNumberResponse_phoneNumberArn :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)+requestPhoneNumberResponse_phoneNumberArn = Lens.lens (\RequestPhoneNumberResponse' {phoneNumberArn} -> phoneNumberArn) (\s@RequestPhoneNumberResponse' {} a -> s {phoneNumberArn = a} :: RequestPhoneNumberResponse)++-- | The unique identifier of the new phone number.+requestPhoneNumberResponse_phoneNumberId :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)+requestPhoneNumberResponse_phoneNumberId = Lens.lens (\RequestPhoneNumberResponse' {phoneNumberId} -> phoneNumberId) (\s@RequestPhoneNumberResponse' {} a -> s {phoneNumberId = a} :: RequestPhoneNumberResponse)++-- | The unique identifier of the pool associated with the phone number+requestPhoneNumberResponse_poolId :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)+requestPhoneNumberResponse_poolId = Lens.lens (\RequestPhoneNumberResponse' {poolId} -> poolId) (\s@RequestPhoneNumberResponse' {} a -> s {poolId = a} :: RequestPhoneNumberResponse)++-- | By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+requestPhoneNumberResponse_selfManagedOptOutsEnabled :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Bool)+requestPhoneNumberResponse_selfManagedOptOutsEnabled = Lens.lens (\RequestPhoneNumberResponse' {selfManagedOptOutsEnabled} -> selfManagedOptOutsEnabled) (\s@RequestPhoneNumberResponse' {} a -> s {selfManagedOptOutsEnabled = a} :: RequestPhoneNumberResponse)++-- | The current status of the request.+requestPhoneNumberResponse_status :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe NumberStatus)+requestPhoneNumberResponse_status = Lens.lens (\RequestPhoneNumberResponse' {status} -> status) (\s@RequestPhoneNumberResponse' {} a -> s {status = a} :: RequestPhoneNumberResponse)++-- | An array of key and value pair tags that are associated with the phone+-- number.+requestPhoneNumberResponse_tags :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe [Tag])+requestPhoneNumberResponse_tags = Lens.lens (\RequestPhoneNumberResponse' {tags} -> tags) (\s@RequestPhoneNumberResponse' {} a -> s {tags = a} :: RequestPhoneNumberResponse) Prelude.. Lens.mapping Lens.coerced++-- | The ARN used to identify the two way channel.+requestPhoneNumberResponse_twoWayChannelArn :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Text)+requestPhoneNumberResponse_twoWayChannelArn = Lens.lens (\RequestPhoneNumberResponse' {twoWayChannelArn} -> twoWayChannelArn) (\s@RequestPhoneNumberResponse' {} a -> s {twoWayChannelArn = a} :: RequestPhoneNumberResponse)++-- | By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+requestPhoneNumberResponse_twoWayEnabled :: Lens.Lens' RequestPhoneNumberResponse (Prelude.Maybe Prelude.Bool)+requestPhoneNumberResponse_twoWayEnabled = Lens.lens (\RequestPhoneNumberResponse' {twoWayEnabled} -> twoWayEnabled) (\s@RequestPhoneNumberResponse' {} a -> s {twoWayEnabled = a} :: RequestPhoneNumberResponse)++-- | The response's http status code.+requestPhoneNumberResponse_httpStatus :: Lens.Lens' RequestPhoneNumberResponse Prelude.Int+requestPhoneNumberResponse_httpStatus = Lens.lens (\RequestPhoneNumberResponse' {httpStatus} -> httpStatus) (\s@RequestPhoneNumberResponse' {} a -> s {httpStatus = a} :: RequestPhoneNumberResponse)++instance Prelude.NFData RequestPhoneNumberResponse where+ rnf RequestPhoneNumberResponse' {..} =+ Prelude.rnf createdTimestamp+ `Prelude.seq` Prelude.rnf deletionProtectionEnabled+ `Prelude.seq` Prelude.rnf isoCountryCode+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf monthlyLeasingPrice+ `Prelude.seq` Prelude.rnf numberCapabilities+ `Prelude.seq` Prelude.rnf numberType+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf phoneNumber+ `Prelude.seq` Prelude.rnf phoneNumberArn+ `Prelude.seq` Prelude.rnf phoneNumberId+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf selfManagedOptOutsEnabled+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf twoWayChannelArn+ `Prelude.seq` Prelude.rnf twoWayEnabled+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/SendTextMessage.hs view
@@ -0,0 +1,353 @@+{-# 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.PinpointSmsVoiceV2.SendTextMessage+-- 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 new text message and sends it to a recipient\'s phone number.+--+-- SMS throughput limits are measured in Message Parts per Second (MPS).+-- Your MPS limit depends on the destination country of your messages, as+-- well as the type of phone number (origination number) that you use to+-- send the message. For more information, see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-limitations-mps.html Message Parts per Second (MPS) limits>+-- in the /Amazon Pinpoint User Guide/.+module Amazonka.PinpointSmsVoiceV2.SendTextMessage+ ( -- * Creating a Request+ SendTextMessage (..),+ newSendTextMessage,++ -- * Request Lenses+ sendTextMessage_configurationSetName,+ sendTextMessage_context,+ sendTextMessage_destinationCountryParameters,+ sendTextMessage_dryRun,+ sendTextMessage_keyword,+ sendTextMessage_maxPrice,+ sendTextMessage_messageBody,+ sendTextMessage_messageType,+ sendTextMessage_originationIdentity,+ sendTextMessage_timeToLive,+ sendTextMessage_destinationPhoneNumber,++ -- * Destructuring the Response+ SendTextMessageResponse (..),+ newSendTextMessageResponse,++ -- * Response Lenses+ sendTextMessageResponse_messageId,+ sendTextMessageResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newSendTextMessage' smart constructor.+data SendTextMessage = SendTextMessage'+ { -- | The name of the configuration set to use. This can be either the+ -- ConfigurationSetName or ConfigurationSetArn.+ configurationSetName :: Prelude.Maybe Prelude.Text,+ -- | You can specify custom data in this field. If you do, that data is+ -- logged to the event destination.+ context :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | This field is used for any country-specific registration requirements.+ -- Currently, this setting is only used when you send messages to+ -- recipients in India using a sender ID. For more information see+ -- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-senderid-india.html Special requirements for sending SMS messages to recipients in India>.+ destinationCountryParameters :: Prelude.Maybe (Prelude.HashMap DestinationCountryParameterKey Prelude.Text),+ -- | When set to true, the message is checked and validated, but isn\'t sent+ -- to the end recipient.+ dryRun :: Prelude.Maybe Prelude.Bool,+ -- | When you register a short code in the US, you must specify a program+ -- name. If you don’t have a US short code, omit this attribute.+ keyword :: Prelude.Maybe Prelude.Text,+ -- | The maximum amount that you want to spend, in US dollars, per each text+ -- message part. A text message can contain multiple parts.+ maxPrice :: Prelude.Maybe Prelude.Text,+ -- | The body of the text message.+ messageBody :: Prelude.Maybe Prelude.Text,+ -- | The type of message. Valid values are TRANSACTIONAL for messages that+ -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+ -- critical or time-sensitive.+ messageType :: Prelude.Maybe MessageType,+ -- | The origination identity of the message. This can be either the+ -- PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn,+ -- PoolId, or PoolArn.+ originationIdentity :: Prelude.Maybe Prelude.Text,+ -- | How long the text message is valid for. By default this is 72 hours.+ timeToLive :: Prelude.Maybe Prelude.Natural,+ -- | The destination phone number in E.164 format.+ destinationPhoneNumber :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SendTextMessage' 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:+--+-- 'configurationSetName', 'sendTextMessage_configurationSetName' - The name of the configuration set to use. This can be either the+-- ConfigurationSetName or ConfigurationSetArn.+--+-- 'context', 'sendTextMessage_context' - You can specify custom data in this field. If you do, that data is+-- logged to the event destination.+--+-- 'destinationCountryParameters', 'sendTextMessage_destinationCountryParameters' - This field is used for any country-specific registration requirements.+-- Currently, this setting is only used when you send messages to+-- recipients in India using a sender ID. For more information see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-senderid-india.html Special requirements for sending SMS messages to recipients in India>.+--+-- 'dryRun', 'sendTextMessage_dryRun' - When set to true, the message is checked and validated, but isn\'t sent+-- to the end recipient.+--+-- 'keyword', 'sendTextMessage_keyword' - When you register a short code in the US, you must specify a program+-- name. If you don’t have a US short code, omit this attribute.+--+-- 'maxPrice', 'sendTextMessage_maxPrice' - The maximum amount that you want to spend, in US dollars, per each text+-- message part. A text message can contain multiple parts.+--+-- 'messageBody', 'sendTextMessage_messageBody' - The body of the text message.+--+-- 'messageType', 'sendTextMessage_messageType' - The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+--+-- 'originationIdentity', 'sendTextMessage_originationIdentity' - The origination identity of the message. This can be either the+-- PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn,+-- PoolId, or PoolArn.+--+-- 'timeToLive', 'sendTextMessage_timeToLive' - How long the text message is valid for. By default this is 72 hours.+--+-- 'destinationPhoneNumber', 'sendTextMessage_destinationPhoneNumber' - The destination phone number in E.164 format.+newSendTextMessage ::+ -- | 'destinationPhoneNumber'+ Prelude.Text ->+ SendTextMessage+newSendTextMessage pDestinationPhoneNumber_ =+ SendTextMessage'+ { configurationSetName =+ Prelude.Nothing,+ context = Prelude.Nothing,+ destinationCountryParameters = Prelude.Nothing,+ dryRun = Prelude.Nothing,+ keyword = Prelude.Nothing,+ maxPrice = Prelude.Nothing,+ messageBody = Prelude.Nothing,+ messageType = Prelude.Nothing,+ originationIdentity = Prelude.Nothing,+ timeToLive = Prelude.Nothing,+ destinationPhoneNumber = pDestinationPhoneNumber_+ }++-- | The name of the configuration set to use. This can be either the+-- ConfigurationSetName or ConfigurationSetArn.+sendTextMessage_configurationSetName :: Lens.Lens' SendTextMessage (Prelude.Maybe Prelude.Text)+sendTextMessage_configurationSetName = Lens.lens (\SendTextMessage' {configurationSetName} -> configurationSetName) (\s@SendTextMessage' {} a -> s {configurationSetName = a} :: SendTextMessage)++-- | You can specify custom data in this field. If you do, that data is+-- logged to the event destination.+sendTextMessage_context :: Lens.Lens' SendTextMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+sendTextMessage_context = Lens.lens (\SendTextMessage' {context} -> context) (\s@SendTextMessage' {} a -> s {context = a} :: SendTextMessage) Prelude.. Lens.mapping Lens.coerced++-- | This field is used for any country-specific registration requirements.+-- Currently, this setting is only used when you send messages to+-- recipients in India using a sender ID. For more information see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-senderid-india.html Special requirements for sending SMS messages to recipients in India>.+sendTextMessage_destinationCountryParameters :: Lens.Lens' SendTextMessage (Prelude.Maybe (Prelude.HashMap DestinationCountryParameterKey Prelude.Text))+sendTextMessage_destinationCountryParameters = Lens.lens (\SendTextMessage' {destinationCountryParameters} -> destinationCountryParameters) (\s@SendTextMessage' {} a -> s {destinationCountryParameters = a} :: SendTextMessage) Prelude.. Lens.mapping Lens.coerced++-- | When set to true, the message is checked and validated, but isn\'t sent+-- to the end recipient.+sendTextMessage_dryRun :: Lens.Lens' SendTextMessage (Prelude.Maybe Prelude.Bool)+sendTextMessage_dryRun = Lens.lens (\SendTextMessage' {dryRun} -> dryRun) (\s@SendTextMessage' {} a -> s {dryRun = a} :: SendTextMessage)++-- | When you register a short code in the US, you must specify a program+-- name. If you don’t have a US short code, omit this attribute.+sendTextMessage_keyword :: Lens.Lens' SendTextMessage (Prelude.Maybe Prelude.Text)+sendTextMessage_keyword = Lens.lens (\SendTextMessage' {keyword} -> keyword) (\s@SendTextMessage' {} a -> s {keyword = a} :: SendTextMessage)++-- | The maximum amount that you want to spend, in US dollars, per each text+-- message part. A text message can contain multiple parts.+sendTextMessage_maxPrice :: Lens.Lens' SendTextMessage (Prelude.Maybe Prelude.Text)+sendTextMessage_maxPrice = Lens.lens (\SendTextMessage' {maxPrice} -> maxPrice) (\s@SendTextMessage' {} a -> s {maxPrice = a} :: SendTextMessage)++-- | The body of the text message.+sendTextMessage_messageBody :: Lens.Lens' SendTextMessage (Prelude.Maybe Prelude.Text)+sendTextMessage_messageBody = Lens.lens (\SendTextMessage' {messageBody} -> messageBody) (\s@SendTextMessage' {} a -> s {messageBody = a} :: SendTextMessage)++-- | The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+sendTextMessage_messageType :: Lens.Lens' SendTextMessage (Prelude.Maybe MessageType)+sendTextMessage_messageType = Lens.lens (\SendTextMessage' {messageType} -> messageType) (\s@SendTextMessage' {} a -> s {messageType = a} :: SendTextMessage)++-- | The origination identity of the message. This can be either the+-- PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn,+-- PoolId, or PoolArn.+sendTextMessage_originationIdentity :: Lens.Lens' SendTextMessage (Prelude.Maybe Prelude.Text)+sendTextMessage_originationIdentity = Lens.lens (\SendTextMessage' {originationIdentity} -> originationIdentity) (\s@SendTextMessage' {} a -> s {originationIdentity = a} :: SendTextMessage)++-- | How long the text message is valid for. By default this is 72 hours.+sendTextMessage_timeToLive :: Lens.Lens' SendTextMessage (Prelude.Maybe Prelude.Natural)+sendTextMessage_timeToLive = Lens.lens (\SendTextMessage' {timeToLive} -> timeToLive) (\s@SendTextMessage' {} a -> s {timeToLive = a} :: SendTextMessage)++-- | The destination phone number in E.164 format.+sendTextMessage_destinationPhoneNumber :: Lens.Lens' SendTextMessage Prelude.Text+sendTextMessage_destinationPhoneNumber = Lens.lens (\SendTextMessage' {destinationPhoneNumber} -> destinationPhoneNumber) (\s@SendTextMessage' {} a -> s {destinationPhoneNumber = a} :: SendTextMessage)++instance Core.AWSRequest SendTextMessage where+ type+ AWSResponse SendTextMessage =+ SendTextMessageResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ SendTextMessageResponse'+ Prelude.<$> (x Data..?> "MessageId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable SendTextMessage where+ hashWithSalt _salt SendTextMessage' {..} =+ _salt+ `Prelude.hashWithSalt` configurationSetName+ `Prelude.hashWithSalt` context+ `Prelude.hashWithSalt` destinationCountryParameters+ `Prelude.hashWithSalt` dryRun+ `Prelude.hashWithSalt` keyword+ `Prelude.hashWithSalt` maxPrice+ `Prelude.hashWithSalt` messageBody+ `Prelude.hashWithSalt` messageType+ `Prelude.hashWithSalt` originationIdentity+ `Prelude.hashWithSalt` timeToLive+ `Prelude.hashWithSalt` destinationPhoneNumber++instance Prelude.NFData SendTextMessage where+ rnf SendTextMessage' {..} =+ Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf context+ `Prelude.seq` Prelude.rnf destinationCountryParameters+ `Prelude.seq` Prelude.rnf dryRun+ `Prelude.seq` Prelude.rnf keyword+ `Prelude.seq` Prelude.rnf maxPrice+ `Prelude.seq` Prelude.rnf messageBody+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf timeToLive+ `Prelude.seq` Prelude.rnf destinationPhoneNumber++instance Data.ToHeaders SendTextMessage where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.SendTextMessage" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON SendTextMessage where+ toJSON SendTextMessage' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ConfigurationSetName" Data..=)+ Prelude.<$> configurationSetName,+ ("Context" Data..=) Prelude.<$> context,+ ("DestinationCountryParameters" Data..=)+ Prelude.<$> destinationCountryParameters,+ ("DryRun" Data..=) Prelude.<$> dryRun,+ ("Keyword" Data..=) Prelude.<$> keyword,+ ("MaxPrice" Data..=) Prelude.<$> maxPrice,+ ("MessageBody" Data..=) Prelude.<$> messageBody,+ ("MessageType" Data..=) Prelude.<$> messageType,+ ("OriginationIdentity" Data..=)+ Prelude.<$> originationIdentity,+ ("TimeToLive" Data..=) Prelude.<$> timeToLive,+ Prelude.Just+ ( "DestinationPhoneNumber"+ Data..= destinationPhoneNumber+ )+ ]+ )++instance Data.ToPath SendTextMessage where+ toPath = Prelude.const "/"++instance Data.ToQuery SendTextMessage where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newSendTextMessageResponse' smart constructor.+data SendTextMessageResponse = SendTextMessageResponse'+ { -- | The unique identifier for the message.+ messageId :: 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 'SendTextMessageResponse' 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:+--+-- 'messageId', 'sendTextMessageResponse_messageId' - The unique identifier for the message.+--+-- 'httpStatus', 'sendTextMessageResponse_httpStatus' - The response's http status code.+newSendTextMessageResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ SendTextMessageResponse+newSendTextMessageResponse pHttpStatus_ =+ SendTextMessageResponse'+ { messageId =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The unique identifier for the message.+sendTextMessageResponse_messageId :: Lens.Lens' SendTextMessageResponse (Prelude.Maybe Prelude.Text)+sendTextMessageResponse_messageId = Lens.lens (\SendTextMessageResponse' {messageId} -> messageId) (\s@SendTextMessageResponse' {} a -> s {messageId = a} :: SendTextMessageResponse)++-- | The response's http status code.+sendTextMessageResponse_httpStatus :: Lens.Lens' SendTextMessageResponse Prelude.Int+sendTextMessageResponse_httpStatus = Lens.lens (\SendTextMessageResponse' {httpStatus} -> httpStatus) (\s@SendTextMessageResponse' {} a -> s {httpStatus = a} :: SendTextMessageResponse)++instance Prelude.NFData SendTextMessageResponse where+ rnf SendTextMessageResponse' {..} =+ Prelude.rnf messageId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/SendVoiceMessage.hs view
@@ -0,0 +1,344 @@+{-# 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.PinpointSmsVoiceV2.SendVoiceMessage+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Allows you to send a request that sends a text message through Amazon+-- Pinpoint. This operation uses+-- <http://aws.amazon.com/polly/ Amazon Polly> to convert a text script+-- into a voice message.+module Amazonka.PinpointSmsVoiceV2.SendVoiceMessage+ ( -- * Creating a Request+ SendVoiceMessage (..),+ newSendVoiceMessage,++ -- * Request Lenses+ sendVoiceMessage_configurationSetName,+ sendVoiceMessage_context,+ sendVoiceMessage_dryRun,+ sendVoiceMessage_maxPricePerMinute,+ sendVoiceMessage_messageBody,+ sendVoiceMessage_messageBodyTextType,+ sendVoiceMessage_timeToLive,+ sendVoiceMessage_voiceId,+ sendVoiceMessage_destinationPhoneNumber,+ sendVoiceMessage_originationIdentity,++ -- * Destructuring the Response+ SendVoiceMessageResponse (..),+ newSendVoiceMessageResponse,++ -- * Response Lenses+ sendVoiceMessageResponse_messageId,+ sendVoiceMessageResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newSendVoiceMessage' smart constructor.+data SendVoiceMessage = SendVoiceMessage'+ { -- | The name of the configuration set to use. This can be either the+ -- ConfigurationSetName or ConfigurationSetArn.+ configurationSetName :: Prelude.Maybe Prelude.Text,+ -- | You can specify custom data in this field. If you do, that data is+ -- logged to the event destination.+ context :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | When set to true, the message is checked and validated, but isn\'t sent+ -- to the end recipient.+ dryRun :: Prelude.Maybe Prelude.Bool,+ -- | The maximum amount to spend per voice message, in US dollars.+ maxPricePerMinute :: Prelude.Maybe Prelude.Text,+ -- | The text to convert to a voice message.+ messageBody :: Prelude.Maybe Prelude.Text,+ -- | Specifies if the MessageBody field contains text or+ -- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html speech synthesis markup language (SSML)>.+ --+ -- - TEXT: This is the default value. When used the maximum character+ -- limit is 3000.+ --+ -- - SSML: When used the maximum character limit is 6000 including SSML+ -- tagging.+ messageBodyTextType :: Prelude.Maybe VoiceMessageBodyTextType,+ -- | How long the voice message is valid for. By default this is 72 hours.+ timeToLive :: Prelude.Maybe Prelude.Natural,+ -- | The voice for the+ -- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html Amazon Polly>+ -- service to use. By default this is set to \"MATTHEW\".+ voiceId :: Prelude.Maybe VoiceId,+ -- | The destination phone number in E.164 format.+ destinationPhoneNumber :: Prelude.Text,+ -- | The origination identity to use for the voice call. This can be the+ -- PhoneNumber, PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.+ originationIdentity :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SendVoiceMessage' 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:+--+-- 'configurationSetName', 'sendVoiceMessage_configurationSetName' - The name of the configuration set to use. This can be either the+-- ConfigurationSetName or ConfigurationSetArn.+--+-- 'context', 'sendVoiceMessage_context' - You can specify custom data in this field. If you do, that data is+-- logged to the event destination.+--+-- 'dryRun', 'sendVoiceMessage_dryRun' - When set to true, the message is checked and validated, but isn\'t sent+-- to the end recipient.+--+-- 'maxPricePerMinute', 'sendVoiceMessage_maxPricePerMinute' - The maximum amount to spend per voice message, in US dollars.+--+-- 'messageBody', 'sendVoiceMessage_messageBody' - The text to convert to a voice message.+--+-- 'messageBodyTextType', 'sendVoiceMessage_messageBodyTextType' - Specifies if the MessageBody field contains text or+-- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html speech synthesis markup language (SSML)>.+--+-- - TEXT: This is the default value. When used the maximum character+-- limit is 3000.+--+-- - SSML: When used the maximum character limit is 6000 including SSML+-- tagging.+--+-- 'timeToLive', 'sendVoiceMessage_timeToLive' - How long the voice message is valid for. By default this is 72 hours.+--+-- 'voiceId', 'sendVoiceMessage_voiceId' - The voice for the+-- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html Amazon Polly>+-- service to use. By default this is set to \"MATTHEW\".+--+-- 'destinationPhoneNumber', 'sendVoiceMessage_destinationPhoneNumber' - The destination phone number in E.164 format.+--+-- 'originationIdentity', 'sendVoiceMessage_originationIdentity' - The origination identity to use for the voice call. This can be the+-- PhoneNumber, PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.+newSendVoiceMessage ::+ -- | 'destinationPhoneNumber'+ Prelude.Text ->+ -- | 'originationIdentity'+ Prelude.Text ->+ SendVoiceMessage+newSendVoiceMessage+ pDestinationPhoneNumber_+ pOriginationIdentity_ =+ SendVoiceMessage'+ { configurationSetName =+ Prelude.Nothing,+ context = Prelude.Nothing,+ dryRun = Prelude.Nothing,+ maxPricePerMinute = Prelude.Nothing,+ messageBody = Prelude.Nothing,+ messageBodyTextType = Prelude.Nothing,+ timeToLive = Prelude.Nothing,+ voiceId = Prelude.Nothing,+ destinationPhoneNumber = pDestinationPhoneNumber_,+ originationIdentity = pOriginationIdentity_+ }++-- | The name of the configuration set to use. This can be either the+-- ConfigurationSetName or ConfigurationSetArn.+sendVoiceMessage_configurationSetName :: Lens.Lens' SendVoiceMessage (Prelude.Maybe Prelude.Text)+sendVoiceMessage_configurationSetName = Lens.lens (\SendVoiceMessage' {configurationSetName} -> configurationSetName) (\s@SendVoiceMessage' {} a -> s {configurationSetName = a} :: SendVoiceMessage)++-- | You can specify custom data in this field. If you do, that data is+-- logged to the event destination.+sendVoiceMessage_context :: Lens.Lens' SendVoiceMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+sendVoiceMessage_context = Lens.lens (\SendVoiceMessage' {context} -> context) (\s@SendVoiceMessage' {} a -> s {context = a} :: SendVoiceMessage) Prelude.. Lens.mapping Lens.coerced++-- | When set to true, the message is checked and validated, but isn\'t sent+-- to the end recipient.+sendVoiceMessage_dryRun :: Lens.Lens' SendVoiceMessage (Prelude.Maybe Prelude.Bool)+sendVoiceMessage_dryRun = Lens.lens (\SendVoiceMessage' {dryRun} -> dryRun) (\s@SendVoiceMessage' {} a -> s {dryRun = a} :: SendVoiceMessage)++-- | The maximum amount to spend per voice message, in US dollars.+sendVoiceMessage_maxPricePerMinute :: Lens.Lens' SendVoiceMessage (Prelude.Maybe Prelude.Text)+sendVoiceMessage_maxPricePerMinute = Lens.lens (\SendVoiceMessage' {maxPricePerMinute} -> maxPricePerMinute) (\s@SendVoiceMessage' {} a -> s {maxPricePerMinute = a} :: SendVoiceMessage)++-- | The text to convert to a voice message.+sendVoiceMessage_messageBody :: Lens.Lens' SendVoiceMessage (Prelude.Maybe Prelude.Text)+sendVoiceMessage_messageBody = Lens.lens (\SendVoiceMessage' {messageBody} -> messageBody) (\s@SendVoiceMessage' {} a -> s {messageBody = a} :: SendVoiceMessage)++-- | Specifies if the MessageBody field contains text or+-- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html speech synthesis markup language (SSML)>.+--+-- - TEXT: This is the default value. When used the maximum character+-- limit is 3000.+--+-- - SSML: When used the maximum character limit is 6000 including SSML+-- tagging.+sendVoiceMessage_messageBodyTextType :: Lens.Lens' SendVoiceMessage (Prelude.Maybe VoiceMessageBodyTextType)+sendVoiceMessage_messageBodyTextType = Lens.lens (\SendVoiceMessage' {messageBodyTextType} -> messageBodyTextType) (\s@SendVoiceMessage' {} a -> s {messageBodyTextType = a} :: SendVoiceMessage)++-- | How long the voice message is valid for. By default this is 72 hours.+sendVoiceMessage_timeToLive :: Lens.Lens' SendVoiceMessage (Prelude.Maybe Prelude.Natural)+sendVoiceMessage_timeToLive = Lens.lens (\SendVoiceMessage' {timeToLive} -> timeToLive) (\s@SendVoiceMessage' {} a -> s {timeToLive = a} :: SendVoiceMessage)++-- | The voice for the+-- <https://docs.aws.amazon.com/polly/latest/dg/what-is.html Amazon Polly>+-- service to use. By default this is set to \"MATTHEW\".+sendVoiceMessage_voiceId :: Lens.Lens' SendVoiceMessage (Prelude.Maybe VoiceId)+sendVoiceMessage_voiceId = Lens.lens (\SendVoiceMessage' {voiceId} -> voiceId) (\s@SendVoiceMessage' {} a -> s {voiceId = a} :: SendVoiceMessage)++-- | The destination phone number in E.164 format.+sendVoiceMessage_destinationPhoneNumber :: Lens.Lens' SendVoiceMessage Prelude.Text+sendVoiceMessage_destinationPhoneNumber = Lens.lens (\SendVoiceMessage' {destinationPhoneNumber} -> destinationPhoneNumber) (\s@SendVoiceMessage' {} a -> s {destinationPhoneNumber = a} :: SendVoiceMessage)++-- | The origination identity to use for the voice call. This can be the+-- PhoneNumber, PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.+sendVoiceMessage_originationIdentity :: Lens.Lens' SendVoiceMessage Prelude.Text+sendVoiceMessage_originationIdentity = Lens.lens (\SendVoiceMessage' {originationIdentity} -> originationIdentity) (\s@SendVoiceMessage' {} a -> s {originationIdentity = a} :: SendVoiceMessage)++instance Core.AWSRequest SendVoiceMessage where+ type+ AWSResponse SendVoiceMessage =+ SendVoiceMessageResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ SendVoiceMessageResponse'+ Prelude.<$> (x Data..?> "MessageId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable SendVoiceMessage where+ hashWithSalt _salt SendVoiceMessage' {..} =+ _salt+ `Prelude.hashWithSalt` configurationSetName+ `Prelude.hashWithSalt` context+ `Prelude.hashWithSalt` dryRun+ `Prelude.hashWithSalt` maxPricePerMinute+ `Prelude.hashWithSalt` messageBody+ `Prelude.hashWithSalt` messageBodyTextType+ `Prelude.hashWithSalt` timeToLive+ `Prelude.hashWithSalt` voiceId+ `Prelude.hashWithSalt` destinationPhoneNumber+ `Prelude.hashWithSalt` originationIdentity++instance Prelude.NFData SendVoiceMessage where+ rnf SendVoiceMessage' {..} =+ Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf context+ `Prelude.seq` Prelude.rnf dryRun+ `Prelude.seq` Prelude.rnf maxPricePerMinute+ `Prelude.seq` Prelude.rnf messageBody+ `Prelude.seq` Prelude.rnf messageBodyTextType+ `Prelude.seq` Prelude.rnf timeToLive+ `Prelude.seq` Prelude.rnf voiceId+ `Prelude.seq` Prelude.rnf destinationPhoneNumber+ `Prelude.seq` Prelude.rnf originationIdentity++instance Data.ToHeaders SendVoiceMessage where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.SendVoiceMessage" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON SendVoiceMessage where+ toJSON SendVoiceMessage' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ConfigurationSetName" Data..=)+ Prelude.<$> configurationSetName,+ ("Context" Data..=) Prelude.<$> context,+ ("DryRun" Data..=) Prelude.<$> dryRun,+ ("MaxPricePerMinute" Data..=)+ Prelude.<$> maxPricePerMinute,+ ("MessageBody" Data..=) Prelude.<$> messageBody,+ ("MessageBodyTextType" Data..=)+ Prelude.<$> messageBodyTextType,+ ("TimeToLive" Data..=) Prelude.<$> timeToLive,+ ("VoiceId" Data..=) Prelude.<$> voiceId,+ Prelude.Just+ ( "DestinationPhoneNumber"+ Data..= destinationPhoneNumber+ ),+ Prelude.Just+ ("OriginationIdentity" Data..= originationIdentity)+ ]+ )++instance Data.ToPath SendVoiceMessage where+ toPath = Prelude.const "/"++instance Data.ToQuery SendVoiceMessage where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newSendVoiceMessageResponse' smart constructor.+data SendVoiceMessageResponse = SendVoiceMessageResponse'+ { -- | The unique identifier for the message.+ messageId :: 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 'SendVoiceMessageResponse' 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:+--+-- 'messageId', 'sendVoiceMessageResponse_messageId' - The unique identifier for the message.+--+-- 'httpStatus', 'sendVoiceMessageResponse_httpStatus' - The response's http status code.+newSendVoiceMessageResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ SendVoiceMessageResponse+newSendVoiceMessageResponse pHttpStatus_ =+ SendVoiceMessageResponse'+ { messageId =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The unique identifier for the message.+sendVoiceMessageResponse_messageId :: Lens.Lens' SendVoiceMessageResponse (Prelude.Maybe Prelude.Text)+sendVoiceMessageResponse_messageId = Lens.lens (\SendVoiceMessageResponse' {messageId} -> messageId) (\s@SendVoiceMessageResponse' {} a -> s {messageId = a} :: SendVoiceMessageResponse)++-- | The response's http status code.+sendVoiceMessageResponse_httpStatus :: Lens.Lens' SendVoiceMessageResponse Prelude.Int+sendVoiceMessageResponse_httpStatus = Lens.lens (\SendVoiceMessageResponse' {httpStatus} -> httpStatus) (\s@SendVoiceMessageResponse' {} a -> s {httpStatus = a} :: SendVoiceMessageResponse)++instance Prelude.NFData SendVoiceMessageResponse where+ rnf SendVoiceMessageResponse' {..} =+ Prelude.rnf messageId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/SetDefaultMessageType.hs view
@@ -0,0 +1,234 @@+{-# 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.PinpointSmsVoiceV2.SetDefaultMessageType+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sets the default message type on a configuration set.+--+-- Choose the category of SMS messages that you plan to send from this+-- account. If you send account-related messages or time-sensitive messages+-- such as one-time passcodes, choose __Transactional__. If you plan to+-- send messages that contain marketing material or other promotional+-- content, choose __Promotional__. This setting applies to your entire+-- Amazon Web Services account.+module Amazonka.PinpointSmsVoiceV2.SetDefaultMessageType+ ( -- * Creating a Request+ SetDefaultMessageType (..),+ newSetDefaultMessageType,++ -- * Request Lenses+ setDefaultMessageType_configurationSetName,+ setDefaultMessageType_messageType,++ -- * Destructuring the Response+ SetDefaultMessageTypeResponse (..),+ newSetDefaultMessageTypeResponse,++ -- * Response Lenses+ setDefaultMessageTypeResponse_configurationSetArn,+ setDefaultMessageTypeResponse_configurationSetName,+ setDefaultMessageTypeResponse_messageType,+ setDefaultMessageTypeResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newSetDefaultMessageType' smart constructor.+data SetDefaultMessageType = SetDefaultMessageType'+ { -- | The configuration set to update with a new default message type. This+ -- field can be the ConsigurationSetName or ConfigurationSetArn.+ configurationSetName :: Prelude.Text,+ -- | The type of message. Valid values are TRANSACTIONAL for messages that+ -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+ -- critical or time-sensitive.+ messageType :: MessageType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetDefaultMessageType' 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:+--+-- 'configurationSetName', 'setDefaultMessageType_configurationSetName' - The configuration set to update with a new default message type. This+-- field can be the ConsigurationSetName or ConfigurationSetArn.+--+-- 'messageType', 'setDefaultMessageType_messageType' - The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+newSetDefaultMessageType ::+ -- | 'configurationSetName'+ Prelude.Text ->+ -- | 'messageType'+ MessageType ->+ SetDefaultMessageType+newSetDefaultMessageType+ pConfigurationSetName_+ pMessageType_ =+ SetDefaultMessageType'+ { configurationSetName =+ pConfigurationSetName_,+ messageType = pMessageType_+ }++-- | The configuration set to update with a new default message type. This+-- field can be the ConsigurationSetName or ConfigurationSetArn.+setDefaultMessageType_configurationSetName :: Lens.Lens' SetDefaultMessageType Prelude.Text+setDefaultMessageType_configurationSetName = Lens.lens (\SetDefaultMessageType' {configurationSetName} -> configurationSetName) (\s@SetDefaultMessageType' {} a -> s {configurationSetName = a} :: SetDefaultMessageType)++-- | The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+setDefaultMessageType_messageType :: Lens.Lens' SetDefaultMessageType MessageType+setDefaultMessageType_messageType = Lens.lens (\SetDefaultMessageType' {messageType} -> messageType) (\s@SetDefaultMessageType' {} a -> s {messageType = a} :: SetDefaultMessageType)++instance Core.AWSRequest SetDefaultMessageType where+ type+ AWSResponse SetDefaultMessageType =+ SetDefaultMessageTypeResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ SetDefaultMessageTypeResponse'+ Prelude.<$> (x Data..?> "ConfigurationSetArn")+ Prelude.<*> (x Data..?> "ConfigurationSetName")+ Prelude.<*> (x Data..?> "MessageType")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable SetDefaultMessageType where+ hashWithSalt _salt SetDefaultMessageType' {..} =+ _salt+ `Prelude.hashWithSalt` configurationSetName+ `Prelude.hashWithSalt` messageType++instance Prelude.NFData SetDefaultMessageType where+ rnf SetDefaultMessageType' {..} =+ Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf messageType++instance Data.ToHeaders SetDefaultMessageType where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.SetDefaultMessageType" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON SetDefaultMessageType where+ toJSON SetDefaultMessageType' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ( "ConfigurationSetName"+ Data..= configurationSetName+ ),+ Prelude.Just ("MessageType" Data..= messageType)+ ]+ )++instance Data.ToPath SetDefaultMessageType where+ toPath = Prelude.const "/"++instance Data.ToQuery SetDefaultMessageType where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newSetDefaultMessageTypeResponse' smart constructor.+data SetDefaultMessageTypeResponse = SetDefaultMessageTypeResponse'+ { -- | The Amazon Resource Name (ARN) of the updated configuration set.+ configurationSetArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the configuration set that was updated.+ configurationSetName :: Prelude.Maybe Prelude.Text,+ -- | The new default message type of the configuration set.+ messageType :: Prelude.Maybe MessageType,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetDefaultMessageTypeResponse' 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:+--+-- 'configurationSetArn', 'setDefaultMessageTypeResponse_configurationSetArn' - The Amazon Resource Name (ARN) of the updated configuration set.+--+-- 'configurationSetName', 'setDefaultMessageTypeResponse_configurationSetName' - The name of the configuration set that was updated.+--+-- 'messageType', 'setDefaultMessageTypeResponse_messageType' - The new default message type of the configuration set.+--+-- 'httpStatus', 'setDefaultMessageTypeResponse_httpStatus' - The response's http status code.+newSetDefaultMessageTypeResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ SetDefaultMessageTypeResponse+newSetDefaultMessageTypeResponse pHttpStatus_ =+ SetDefaultMessageTypeResponse'+ { configurationSetArn =+ Prelude.Nothing,+ configurationSetName = Prelude.Nothing,+ messageType = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the updated configuration set.+setDefaultMessageTypeResponse_configurationSetArn :: Lens.Lens' SetDefaultMessageTypeResponse (Prelude.Maybe Prelude.Text)+setDefaultMessageTypeResponse_configurationSetArn = Lens.lens (\SetDefaultMessageTypeResponse' {configurationSetArn} -> configurationSetArn) (\s@SetDefaultMessageTypeResponse' {} a -> s {configurationSetArn = a} :: SetDefaultMessageTypeResponse)++-- | The name of the configuration set that was updated.+setDefaultMessageTypeResponse_configurationSetName :: Lens.Lens' SetDefaultMessageTypeResponse (Prelude.Maybe Prelude.Text)+setDefaultMessageTypeResponse_configurationSetName = Lens.lens (\SetDefaultMessageTypeResponse' {configurationSetName} -> configurationSetName) (\s@SetDefaultMessageTypeResponse' {} a -> s {configurationSetName = a} :: SetDefaultMessageTypeResponse)++-- | The new default message type of the configuration set.+setDefaultMessageTypeResponse_messageType :: Lens.Lens' SetDefaultMessageTypeResponse (Prelude.Maybe MessageType)+setDefaultMessageTypeResponse_messageType = Lens.lens (\SetDefaultMessageTypeResponse' {messageType} -> messageType) (\s@SetDefaultMessageTypeResponse' {} a -> s {messageType = a} :: SetDefaultMessageTypeResponse)++-- | The response's http status code.+setDefaultMessageTypeResponse_httpStatus :: Lens.Lens' SetDefaultMessageTypeResponse Prelude.Int+setDefaultMessageTypeResponse_httpStatus = Lens.lens (\SetDefaultMessageTypeResponse' {httpStatus} -> httpStatus) (\s@SetDefaultMessageTypeResponse' {} a -> s {httpStatus = a} :: SetDefaultMessageTypeResponse)++instance Prelude.NFData SetDefaultMessageTypeResponse where+ rnf SetDefaultMessageTypeResponse' {..} =+ Prelude.rnf configurationSetArn+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/SetDefaultSenderId.hs view
@@ -0,0 +1,241 @@+{-# 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.PinpointSmsVoiceV2.SetDefaultSenderId+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sets default sender ID on a configuration set.+--+-- When sending a text message to a destination country that supports+-- sender IDs, the default sender ID on the configuration set specified+-- will be used if no dedicated origination phone numbers or registered+-- sender IDs are available in your account.+module Amazonka.PinpointSmsVoiceV2.SetDefaultSenderId+ ( -- * Creating a Request+ SetDefaultSenderId (..),+ newSetDefaultSenderId,++ -- * Request Lenses+ setDefaultSenderId_configurationSetName,+ setDefaultSenderId_senderId,++ -- * Destructuring the Response+ SetDefaultSenderIdResponse (..),+ newSetDefaultSenderIdResponse,++ -- * Response Lenses+ setDefaultSenderIdResponse_configurationSetArn,+ setDefaultSenderIdResponse_configurationSetName,+ setDefaultSenderIdResponse_senderId,+ setDefaultSenderIdResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newSetDefaultSenderId' smart constructor.+data SetDefaultSenderId = SetDefaultSenderId'+ { -- | The configuration set to updated with a new default SenderId. This field+ -- can be the ConsigurationSetName or ConfigurationSetArn.+ configurationSetName :: Prelude.Text,+ -- | The current sender ID for the configuration set. When sending a text+ -- message to a destination country which supports SenderIds, the default+ -- sender ID on the configuration set specified on SendTextMessage will be+ -- used if no dedicated origination phone numbers or registered SenderIds+ -- are available in your account, instead of a generic sender ID, such as+ -- \'NOTICE\'.+ senderId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetDefaultSenderId' 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:+--+-- 'configurationSetName', 'setDefaultSenderId_configurationSetName' - The configuration set to updated with a new default SenderId. This field+-- can be the ConsigurationSetName or ConfigurationSetArn.+--+-- 'senderId', 'setDefaultSenderId_senderId' - The current sender ID for the configuration set. When sending a text+-- message to a destination country which supports SenderIds, the default+-- sender ID on the configuration set specified on SendTextMessage will be+-- used if no dedicated origination phone numbers or registered SenderIds+-- are available in your account, instead of a generic sender ID, such as+-- \'NOTICE\'.+newSetDefaultSenderId ::+ -- | 'configurationSetName'+ Prelude.Text ->+ -- | 'senderId'+ Prelude.Text ->+ SetDefaultSenderId+newSetDefaultSenderId+ pConfigurationSetName_+ pSenderId_ =+ SetDefaultSenderId'+ { configurationSetName =+ pConfigurationSetName_,+ senderId = pSenderId_+ }++-- | The configuration set to updated with a new default SenderId. This field+-- can be the ConsigurationSetName or ConfigurationSetArn.+setDefaultSenderId_configurationSetName :: Lens.Lens' SetDefaultSenderId Prelude.Text+setDefaultSenderId_configurationSetName = Lens.lens (\SetDefaultSenderId' {configurationSetName} -> configurationSetName) (\s@SetDefaultSenderId' {} a -> s {configurationSetName = a} :: SetDefaultSenderId)++-- | The current sender ID for the configuration set. When sending a text+-- message to a destination country which supports SenderIds, the default+-- sender ID on the configuration set specified on SendTextMessage will be+-- used if no dedicated origination phone numbers or registered SenderIds+-- are available in your account, instead of a generic sender ID, such as+-- \'NOTICE\'.+setDefaultSenderId_senderId :: Lens.Lens' SetDefaultSenderId Prelude.Text+setDefaultSenderId_senderId = Lens.lens (\SetDefaultSenderId' {senderId} -> senderId) (\s@SetDefaultSenderId' {} a -> s {senderId = a} :: SetDefaultSenderId)++instance Core.AWSRequest SetDefaultSenderId where+ type+ AWSResponse SetDefaultSenderId =+ SetDefaultSenderIdResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ SetDefaultSenderIdResponse'+ Prelude.<$> (x Data..?> "ConfigurationSetArn")+ Prelude.<*> (x Data..?> "ConfigurationSetName")+ Prelude.<*> (x Data..?> "SenderId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable SetDefaultSenderId where+ hashWithSalt _salt SetDefaultSenderId' {..} =+ _salt+ `Prelude.hashWithSalt` configurationSetName+ `Prelude.hashWithSalt` senderId++instance Prelude.NFData SetDefaultSenderId where+ rnf SetDefaultSenderId' {..} =+ Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf senderId++instance Data.ToHeaders SetDefaultSenderId where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.SetDefaultSenderId" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON SetDefaultSenderId where+ toJSON SetDefaultSenderId' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ( "ConfigurationSetName"+ Data..= configurationSetName+ ),+ Prelude.Just ("SenderId" Data..= senderId)+ ]+ )++instance Data.ToPath SetDefaultSenderId where+ toPath = Prelude.const "/"++instance Data.ToQuery SetDefaultSenderId where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newSetDefaultSenderIdResponse' smart constructor.+data SetDefaultSenderIdResponse = SetDefaultSenderIdResponse'+ { -- | The Amazon Resource Name (ARN) of the updated configuration set.+ configurationSetArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the configuration set that was updated.+ configurationSetName :: Prelude.Maybe Prelude.Text,+ -- | The default sender ID to set for the ConfigurationSet.+ senderId :: 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 'SetDefaultSenderIdResponse' 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:+--+-- 'configurationSetArn', 'setDefaultSenderIdResponse_configurationSetArn' - The Amazon Resource Name (ARN) of the updated configuration set.+--+-- 'configurationSetName', 'setDefaultSenderIdResponse_configurationSetName' - The name of the configuration set that was updated.+--+-- 'senderId', 'setDefaultSenderIdResponse_senderId' - The default sender ID to set for the ConfigurationSet.+--+-- 'httpStatus', 'setDefaultSenderIdResponse_httpStatus' - The response's http status code.+newSetDefaultSenderIdResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ SetDefaultSenderIdResponse+newSetDefaultSenderIdResponse pHttpStatus_ =+ SetDefaultSenderIdResponse'+ { configurationSetArn =+ Prelude.Nothing,+ configurationSetName = Prelude.Nothing,+ senderId = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the updated configuration set.+setDefaultSenderIdResponse_configurationSetArn :: Lens.Lens' SetDefaultSenderIdResponse (Prelude.Maybe Prelude.Text)+setDefaultSenderIdResponse_configurationSetArn = Lens.lens (\SetDefaultSenderIdResponse' {configurationSetArn} -> configurationSetArn) (\s@SetDefaultSenderIdResponse' {} a -> s {configurationSetArn = a} :: SetDefaultSenderIdResponse)++-- | The name of the configuration set that was updated.+setDefaultSenderIdResponse_configurationSetName :: Lens.Lens' SetDefaultSenderIdResponse (Prelude.Maybe Prelude.Text)+setDefaultSenderIdResponse_configurationSetName = Lens.lens (\SetDefaultSenderIdResponse' {configurationSetName} -> configurationSetName) (\s@SetDefaultSenderIdResponse' {} a -> s {configurationSetName = a} :: SetDefaultSenderIdResponse)++-- | The default sender ID to set for the ConfigurationSet.+setDefaultSenderIdResponse_senderId :: Lens.Lens' SetDefaultSenderIdResponse (Prelude.Maybe Prelude.Text)+setDefaultSenderIdResponse_senderId = Lens.lens (\SetDefaultSenderIdResponse' {senderId} -> senderId) (\s@SetDefaultSenderIdResponse' {} a -> s {senderId = a} :: SetDefaultSenderIdResponse)++-- | The response's http status code.+setDefaultSenderIdResponse_httpStatus :: Lens.Lens' SetDefaultSenderIdResponse Prelude.Int+setDefaultSenderIdResponse_httpStatus = Lens.lens (\SetDefaultSenderIdResponse' {httpStatus} -> httpStatus) (\s@SetDefaultSenderIdResponse' {} a -> s {httpStatus = a} :: SetDefaultSenderIdResponse)++instance Prelude.NFData SetDefaultSenderIdResponse where+ rnf SetDefaultSenderIdResponse' {..} =+ Prelude.rnf configurationSetArn+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf senderId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/SetTextMessageSpendLimitOverride.hs view
@@ -0,0 +1,195 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.SetTextMessageSpendLimitOverride+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sets an account level monthly spend limit override for sending text+-- messages. The requested spend limit must be less than or equal to the+-- @MaxLimit@, which is set by Amazon Web Services.+module Amazonka.PinpointSmsVoiceV2.SetTextMessageSpendLimitOverride+ ( -- * Creating a Request+ SetTextMessageSpendLimitOverride (..),+ newSetTextMessageSpendLimitOverride,++ -- * Request Lenses+ setTextMessageSpendLimitOverride_monthlyLimit,++ -- * Destructuring the Response+ SetTextMessageSpendLimitOverrideResponse (..),+ newSetTextMessageSpendLimitOverrideResponse,++ -- * Response Lenses+ setTextMessageSpendLimitOverrideResponse_monthlyLimit,+ setTextMessageSpendLimitOverrideResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newSetTextMessageSpendLimitOverride' smart constructor.+data SetTextMessageSpendLimitOverride = SetTextMessageSpendLimitOverride'+ { -- | The new monthly limit to enforce on text messages.+ monthlyLimit :: Prelude.Natural+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetTextMessageSpendLimitOverride' 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:+--+-- 'monthlyLimit', 'setTextMessageSpendLimitOverride_monthlyLimit' - The new monthly limit to enforce on text messages.+newSetTextMessageSpendLimitOverride ::+ -- | 'monthlyLimit'+ Prelude.Natural ->+ SetTextMessageSpendLimitOverride+newSetTextMessageSpendLimitOverride pMonthlyLimit_ =+ SetTextMessageSpendLimitOverride'+ { monthlyLimit =+ pMonthlyLimit_+ }++-- | The new monthly limit to enforce on text messages.+setTextMessageSpendLimitOverride_monthlyLimit :: Lens.Lens' SetTextMessageSpendLimitOverride Prelude.Natural+setTextMessageSpendLimitOverride_monthlyLimit = Lens.lens (\SetTextMessageSpendLimitOverride' {monthlyLimit} -> monthlyLimit) (\s@SetTextMessageSpendLimitOverride' {} a -> s {monthlyLimit = a} :: SetTextMessageSpendLimitOverride)++instance+ Core.AWSRequest+ SetTextMessageSpendLimitOverride+ where+ type+ AWSResponse SetTextMessageSpendLimitOverride =+ SetTextMessageSpendLimitOverrideResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ SetTextMessageSpendLimitOverrideResponse'+ Prelude.<$> (x Data..?> "MonthlyLimit")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ SetTextMessageSpendLimitOverride+ where+ hashWithSalt+ _salt+ SetTextMessageSpendLimitOverride' {..} =+ _salt `Prelude.hashWithSalt` monthlyLimit++instance+ Prelude.NFData+ SetTextMessageSpendLimitOverride+ where+ rnf SetTextMessageSpendLimitOverride' {..} =+ Prelude.rnf monthlyLimit++instance+ Data.ToHeaders+ SetTextMessageSpendLimitOverride+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.SetTextMessageSpendLimitOverride" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON SetTextMessageSpendLimitOverride where+ toJSON SetTextMessageSpendLimitOverride' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("MonthlyLimit" Data..= monthlyLimit)]+ )++instance Data.ToPath SetTextMessageSpendLimitOverride where+ toPath = Prelude.const "/"++instance+ Data.ToQuery+ SetTextMessageSpendLimitOverride+ where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newSetTextMessageSpendLimitOverrideResponse' smart constructor.+data SetTextMessageSpendLimitOverrideResponse = SetTextMessageSpendLimitOverrideResponse'+ { -- | The current monthly limit to enforce on sending text messages.+ monthlyLimit :: Prelude.Maybe Prelude.Natural,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetTextMessageSpendLimitOverrideResponse' 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:+--+-- 'monthlyLimit', 'setTextMessageSpendLimitOverrideResponse_monthlyLimit' - The current monthly limit to enforce on sending text messages.+--+-- 'httpStatus', 'setTextMessageSpendLimitOverrideResponse_httpStatus' - The response's http status code.+newSetTextMessageSpendLimitOverrideResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ SetTextMessageSpendLimitOverrideResponse+newSetTextMessageSpendLimitOverrideResponse+ pHttpStatus_ =+ SetTextMessageSpendLimitOverrideResponse'+ { monthlyLimit =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The current monthly limit to enforce on sending text messages.+setTextMessageSpendLimitOverrideResponse_monthlyLimit :: Lens.Lens' SetTextMessageSpendLimitOverrideResponse (Prelude.Maybe Prelude.Natural)+setTextMessageSpendLimitOverrideResponse_monthlyLimit = Lens.lens (\SetTextMessageSpendLimitOverrideResponse' {monthlyLimit} -> monthlyLimit) (\s@SetTextMessageSpendLimitOverrideResponse' {} a -> s {monthlyLimit = a} :: SetTextMessageSpendLimitOverrideResponse)++-- | The response's http status code.+setTextMessageSpendLimitOverrideResponse_httpStatus :: Lens.Lens' SetTextMessageSpendLimitOverrideResponse Prelude.Int+setTextMessageSpendLimitOverrideResponse_httpStatus = Lens.lens (\SetTextMessageSpendLimitOverrideResponse' {httpStatus} -> httpStatus) (\s@SetTextMessageSpendLimitOverrideResponse' {} a -> s {httpStatus = a} :: SetTextMessageSpendLimitOverrideResponse)++instance+ Prelude.NFData+ SetTextMessageSpendLimitOverrideResponse+ where+ rnf SetTextMessageSpendLimitOverrideResponse' {..} =+ Prelude.rnf monthlyLimit+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/SetVoiceMessageSpendLimitOverride.hs view
@@ -0,0 +1,201 @@+{-# 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.PinpointSmsVoiceV2.SetVoiceMessageSpendLimitOverride+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sets an account level monthly spend limit override for sending voice+-- messages. The requested spend limit must be less than or equal to the+-- @MaxLimit@, which is set by Amazon Web Services.+module Amazonka.PinpointSmsVoiceV2.SetVoiceMessageSpendLimitOverride+ ( -- * Creating a Request+ SetVoiceMessageSpendLimitOverride (..),+ newSetVoiceMessageSpendLimitOverride,++ -- * Request Lenses+ setVoiceMessageSpendLimitOverride_monthlyLimit,++ -- * Destructuring the Response+ SetVoiceMessageSpendLimitOverrideResponse (..),+ newSetVoiceMessageSpendLimitOverrideResponse,++ -- * Response Lenses+ setVoiceMessageSpendLimitOverrideResponse_monthlyLimit,+ setVoiceMessageSpendLimitOverrideResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newSetVoiceMessageSpendLimitOverride' smart constructor.+data SetVoiceMessageSpendLimitOverride = SetVoiceMessageSpendLimitOverride'+ { -- | The new monthly limit to enforce on voice messages.+ monthlyLimit :: Prelude.Natural+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetVoiceMessageSpendLimitOverride' 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:+--+-- 'monthlyLimit', 'setVoiceMessageSpendLimitOverride_monthlyLimit' - The new monthly limit to enforce on voice messages.+newSetVoiceMessageSpendLimitOverride ::+ -- | 'monthlyLimit'+ Prelude.Natural ->+ SetVoiceMessageSpendLimitOverride+newSetVoiceMessageSpendLimitOverride pMonthlyLimit_ =+ SetVoiceMessageSpendLimitOverride'+ { monthlyLimit =+ pMonthlyLimit_+ }++-- | The new monthly limit to enforce on voice messages.+setVoiceMessageSpendLimitOverride_monthlyLimit :: Lens.Lens' SetVoiceMessageSpendLimitOverride Prelude.Natural+setVoiceMessageSpendLimitOverride_monthlyLimit = Lens.lens (\SetVoiceMessageSpendLimitOverride' {monthlyLimit} -> monthlyLimit) (\s@SetVoiceMessageSpendLimitOverride' {} a -> s {monthlyLimit = a} :: SetVoiceMessageSpendLimitOverride)++instance+ Core.AWSRequest+ SetVoiceMessageSpendLimitOverride+ where+ type+ AWSResponse SetVoiceMessageSpendLimitOverride =+ SetVoiceMessageSpendLimitOverrideResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ SetVoiceMessageSpendLimitOverrideResponse'+ Prelude.<$> (x Data..?> "MonthlyLimit")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ SetVoiceMessageSpendLimitOverride+ where+ hashWithSalt+ _salt+ SetVoiceMessageSpendLimitOverride' {..} =+ _salt `Prelude.hashWithSalt` monthlyLimit++instance+ Prelude.NFData+ SetVoiceMessageSpendLimitOverride+ where+ rnf SetVoiceMessageSpendLimitOverride' {..} =+ Prelude.rnf monthlyLimit++instance+ Data.ToHeaders+ SetVoiceMessageSpendLimitOverride+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.SetVoiceMessageSpendLimitOverride" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance+ Data.ToJSON+ SetVoiceMessageSpendLimitOverride+ where+ toJSON SetVoiceMessageSpendLimitOverride' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("MonthlyLimit" Data..= monthlyLimit)]+ )++instance+ Data.ToPath+ SetVoiceMessageSpendLimitOverride+ where+ toPath = Prelude.const "/"++instance+ Data.ToQuery+ SetVoiceMessageSpendLimitOverride+ where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newSetVoiceMessageSpendLimitOverrideResponse' smart constructor.+data SetVoiceMessageSpendLimitOverrideResponse = SetVoiceMessageSpendLimitOverrideResponse'+ { -- | The current monthly limit to enforce on sending voice messages.+ monthlyLimit :: Prelude.Maybe Prelude.Natural,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetVoiceMessageSpendLimitOverrideResponse' 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:+--+-- 'monthlyLimit', 'setVoiceMessageSpendLimitOverrideResponse_monthlyLimit' - The current monthly limit to enforce on sending voice messages.+--+-- 'httpStatus', 'setVoiceMessageSpendLimitOverrideResponse_httpStatus' - The response's http status code.+newSetVoiceMessageSpendLimitOverrideResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ SetVoiceMessageSpendLimitOverrideResponse+newSetVoiceMessageSpendLimitOverrideResponse+ pHttpStatus_ =+ SetVoiceMessageSpendLimitOverrideResponse'+ { monthlyLimit =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The current monthly limit to enforce on sending voice messages.+setVoiceMessageSpendLimitOverrideResponse_monthlyLimit :: Lens.Lens' SetVoiceMessageSpendLimitOverrideResponse (Prelude.Maybe Prelude.Natural)+setVoiceMessageSpendLimitOverrideResponse_monthlyLimit = Lens.lens (\SetVoiceMessageSpendLimitOverrideResponse' {monthlyLimit} -> monthlyLimit) (\s@SetVoiceMessageSpendLimitOverrideResponse' {} a -> s {monthlyLimit = a} :: SetVoiceMessageSpendLimitOverrideResponse)++-- | The response's http status code.+setVoiceMessageSpendLimitOverrideResponse_httpStatus :: Lens.Lens' SetVoiceMessageSpendLimitOverrideResponse Prelude.Int+setVoiceMessageSpendLimitOverrideResponse_httpStatus = Lens.lens (\SetVoiceMessageSpendLimitOverrideResponse' {httpStatus} -> httpStatus) (\s@SetVoiceMessageSpendLimitOverrideResponse' {} a -> s {httpStatus = a} :: SetVoiceMessageSpendLimitOverrideResponse)++instance+ Prelude.NFData+ SetVoiceMessageSpendLimitOverrideResponse+ where+ rnf SetVoiceMessageSpendLimitOverrideResponse' {..} =+ Prelude.rnf monthlyLimit+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/TagResource.hs view
@@ -0,0 +1,180 @@+{-# 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.PinpointSmsVoiceV2.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 overwrites only the specified tags for the specified Amazon+-- Pinpoint SMS Voice, version 2 resource. When you specify an existing tag+-- key, the value is overwritten with the new value. Each resource can have+-- a maximum of 50 tags. Each tag consists of a key and an optional value.+-- Tag keys must be unique per resource. For more information about tags,+-- see+-- <https://docs.aws.amazon.com/pinpoint/latest/developerguide/tagging-resources.html Tagging Amazon Pinpoint resources>+-- in the /Amazon Pinpoint Developer Guide/.+module Amazonka.PinpointSmsVoiceV2.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.PinpointSmsVoiceV2.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 Amazon Resource Name (ARN) of the resource.+ resourceArn :: Prelude.Text,+ -- | An array of key and value pair tags that are associated with the+ -- resource.+ tags :: Prelude.NonEmpty Tag+ }+ 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 Amazon Resource Name (ARN) of the resource.+--+-- 'tags', 'tagResource_tags' - An array of key and value pair tags that are associated with the+-- resource.+newTagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ -- | 'tags'+ Prelude.NonEmpty Tag ->+ TagResource+newTagResource pResourceArn_ pTags_ =+ TagResource'+ { resourceArn = pResourceArn_,+ tags = Lens.coerced Lens.# pTags_+ }++-- | The Amazon Resource Name (ARN) of the resource.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | An array of key and value pair tags that are associated with the+-- resource.+tagResource_tags :: Lens.Lens' TagResource (Prelude.NonEmpty Tag)+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+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.TagResource" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON TagResource where+ toJSON TagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("ResourceArn" Data..= resourceArn),+ Prelude.Just ("Tags" Data..= tags)+ ]+ )++instance Data.ToPath TagResource where+ toPath = Prelude.const "/"++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/PinpointSmsVoiceV2/Types.hs view
@@ -0,0 +1,454 @@+{-# 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.PinpointSmsVoiceV2.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.PinpointSmsVoiceV2.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _AccessDeniedException,+ _ConflictException,+ _InternalServerException,+ _ResourceNotFoundException,+ _ServiceQuotaExceededException,+ _ThrottlingException,+ _ValidationException,++ -- * AccountAttributeName+ AccountAttributeName (..),++ -- * AccountLimitName+ AccountLimitName (..),++ -- * ConfigurationSetFilterName+ ConfigurationSetFilterName (..),++ -- * DestinationCountryParameterKey+ DestinationCountryParameterKey (..),++ -- * EventType+ EventType (..),++ -- * KeywordAction+ KeywordAction (..),++ -- * KeywordFilterName+ KeywordFilterName (..),++ -- * MessageType+ MessageType (..),++ -- * NumberCapability+ NumberCapability (..),++ -- * NumberStatus+ NumberStatus (..),++ -- * NumberType+ NumberType (..),++ -- * OptedOutFilterName+ OptedOutFilterName (..),++ -- * PhoneNumberFilterName+ PhoneNumberFilterName (..),++ -- * PoolFilterName+ PoolFilterName (..),++ -- * PoolOriginationIdentitiesFilterName+ PoolOriginationIdentitiesFilterName (..),++ -- * PoolStatus+ PoolStatus (..),++ -- * RequestableNumberType+ RequestableNumberType (..),++ -- * SenderIdFilterName+ SenderIdFilterName (..),++ -- * SpendLimitName+ SpendLimitName (..),++ -- * VoiceId+ VoiceId (..),++ -- * VoiceMessageBodyTextType+ VoiceMessageBodyTextType (..),++ -- * AccountAttribute+ AccountAttribute (..),+ newAccountAttribute,+ accountAttribute_name,+ accountAttribute_value,++ -- * AccountLimit+ AccountLimit (..),+ newAccountLimit,+ accountLimit_name,+ accountLimit_used,+ accountLimit_max,++ -- * CloudWatchLogsDestination+ CloudWatchLogsDestination (..),+ newCloudWatchLogsDestination,+ cloudWatchLogsDestination_iamRoleArn,+ cloudWatchLogsDestination_logGroupArn,++ -- * ConfigurationSetFilter+ ConfigurationSetFilter (..),+ newConfigurationSetFilter,+ configurationSetFilter_name,+ configurationSetFilter_values,++ -- * ConfigurationSetInformation+ ConfigurationSetInformation (..),+ newConfigurationSetInformation,+ configurationSetInformation_defaultMessageType,+ configurationSetInformation_defaultSenderId,+ configurationSetInformation_configurationSetArn,+ configurationSetInformation_configurationSetName,+ configurationSetInformation_eventDestinations,+ configurationSetInformation_createdTimestamp,++ -- * EventDestination+ EventDestination (..),+ newEventDestination,+ eventDestination_cloudWatchLogsDestination,+ eventDestination_kinesisFirehoseDestination,+ eventDestination_snsDestination,+ eventDestination_eventDestinationName,+ eventDestination_enabled,+ eventDestination_matchingEventTypes,++ -- * KeywordFilter+ KeywordFilter (..),+ newKeywordFilter,+ keywordFilter_name,+ keywordFilter_values,++ -- * KeywordInformation+ KeywordInformation (..),+ newKeywordInformation,+ keywordInformation_keyword,+ keywordInformation_keywordMessage,+ keywordInformation_keywordAction,++ -- * KinesisFirehoseDestination+ KinesisFirehoseDestination (..),+ newKinesisFirehoseDestination,+ kinesisFirehoseDestination_iamRoleArn,+ kinesisFirehoseDestination_deliveryStreamArn,++ -- * OptOutListInformation+ OptOutListInformation (..),+ newOptOutListInformation,+ optOutListInformation_optOutListArn,+ optOutListInformation_optOutListName,+ optOutListInformation_createdTimestamp,++ -- * OptedOutFilter+ OptedOutFilter (..),+ newOptedOutFilter,+ optedOutFilter_name,+ optedOutFilter_values,++ -- * OptedOutNumberInformation+ OptedOutNumberInformation (..),+ newOptedOutNumberInformation,+ optedOutNumberInformation_optedOutNumber,+ optedOutNumberInformation_optedOutTimestamp,+ optedOutNumberInformation_endUserOptedOut,++ -- * OriginationIdentityMetadata+ OriginationIdentityMetadata (..),+ newOriginationIdentityMetadata,+ originationIdentityMetadata_originationIdentityArn,+ originationIdentityMetadata_originationIdentity,+ originationIdentityMetadata_isoCountryCode,+ originationIdentityMetadata_numberCapabilities,++ -- * PhoneNumberFilter+ PhoneNumberFilter (..),+ newPhoneNumberFilter,+ phoneNumberFilter_name,+ phoneNumberFilter_values,++ -- * PhoneNumberInformation+ PhoneNumberInformation (..),+ newPhoneNumberInformation,+ phoneNumberInformation_phoneNumberId,+ phoneNumberInformation_poolId,+ phoneNumberInformation_twoWayChannelArn,+ phoneNumberInformation_phoneNumberArn,+ phoneNumberInformation_phoneNumber,+ phoneNumberInformation_status,+ phoneNumberInformation_isoCountryCode,+ phoneNumberInformation_messageType,+ phoneNumberInformation_numberCapabilities,+ phoneNumberInformation_numberType,+ phoneNumberInformation_monthlyLeasingPrice,+ phoneNumberInformation_twoWayEnabled,+ phoneNumberInformation_selfManagedOptOutsEnabled,+ phoneNumberInformation_optOutListName,+ phoneNumberInformation_deletionProtectionEnabled,+ phoneNumberInformation_createdTimestamp,++ -- * PoolFilter+ PoolFilter (..),+ newPoolFilter,+ poolFilter_name,+ poolFilter_values,++ -- * PoolInformation+ PoolInformation (..),+ newPoolInformation,+ poolInformation_twoWayChannelArn,+ poolInformation_poolArn,+ poolInformation_poolId,+ poolInformation_status,+ poolInformation_messageType,+ poolInformation_twoWayEnabled,+ poolInformation_selfManagedOptOutsEnabled,+ poolInformation_optOutListName,+ poolInformation_sharedRoutesEnabled,+ poolInformation_deletionProtectionEnabled,+ poolInformation_createdTimestamp,++ -- * PoolOriginationIdentitiesFilter+ PoolOriginationIdentitiesFilter (..),+ newPoolOriginationIdentitiesFilter,+ poolOriginationIdentitiesFilter_name,+ poolOriginationIdentitiesFilter_values,++ -- * SenderIdAndCountry+ SenderIdAndCountry (..),+ newSenderIdAndCountry,+ senderIdAndCountry_senderId,+ senderIdAndCountry_isoCountryCode,++ -- * SenderIdFilter+ SenderIdFilter (..),+ newSenderIdFilter,+ senderIdFilter_name,+ senderIdFilter_values,++ -- * SenderIdInformation+ SenderIdInformation (..),+ newSenderIdInformation,+ senderIdInformation_senderIdArn,+ senderIdInformation_senderId,+ senderIdInformation_isoCountryCode,+ senderIdInformation_messageTypes,+ senderIdInformation_monthlyLeasingPrice,++ -- * SnsDestination+ SnsDestination (..),+ newSnsDestination,+ snsDestination_topicArn,++ -- * SpendLimit+ SpendLimit (..),+ newSpendLimit,+ spendLimit_name,+ spendLimit_enforcedLimit,+ spendLimit_maxLimit,+ spendLimit_overridden,++ -- * Tag+ Tag (..),+ newTag,+ tag_key,+ tag_value,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import Amazonka.PinpointSmsVoiceV2.Types.AccountAttribute+import Amazonka.PinpointSmsVoiceV2.Types.AccountAttributeName+import Amazonka.PinpointSmsVoiceV2.Types.AccountLimit+import Amazonka.PinpointSmsVoiceV2.Types.AccountLimitName+import Amazonka.PinpointSmsVoiceV2.Types.CloudWatchLogsDestination+import Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetFilter+import Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetFilterName+import Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetInformation+import Amazonka.PinpointSmsVoiceV2.Types.DestinationCountryParameterKey+import Amazonka.PinpointSmsVoiceV2.Types.EventDestination+import Amazonka.PinpointSmsVoiceV2.Types.EventType+import Amazonka.PinpointSmsVoiceV2.Types.KeywordAction+import Amazonka.PinpointSmsVoiceV2.Types.KeywordFilter+import Amazonka.PinpointSmsVoiceV2.Types.KeywordFilterName+import Amazonka.PinpointSmsVoiceV2.Types.KeywordInformation+import Amazonka.PinpointSmsVoiceV2.Types.KinesisFirehoseDestination+import Amazonka.PinpointSmsVoiceV2.Types.MessageType+import Amazonka.PinpointSmsVoiceV2.Types.NumberCapability+import Amazonka.PinpointSmsVoiceV2.Types.NumberStatus+import Amazonka.PinpointSmsVoiceV2.Types.NumberType+import Amazonka.PinpointSmsVoiceV2.Types.OptOutListInformation+import Amazonka.PinpointSmsVoiceV2.Types.OptedOutFilter+import Amazonka.PinpointSmsVoiceV2.Types.OptedOutFilterName+import Amazonka.PinpointSmsVoiceV2.Types.OptedOutNumberInformation+import Amazonka.PinpointSmsVoiceV2.Types.OriginationIdentityMetadata+import Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberFilter+import Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberFilterName+import Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberInformation+import Amazonka.PinpointSmsVoiceV2.Types.PoolFilter+import Amazonka.PinpointSmsVoiceV2.Types.PoolFilterName+import Amazonka.PinpointSmsVoiceV2.Types.PoolInformation+import Amazonka.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilter+import Amazonka.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilterName+import Amazonka.PinpointSmsVoiceV2.Types.PoolStatus+import Amazonka.PinpointSmsVoiceV2.Types.RequestableNumberType+import Amazonka.PinpointSmsVoiceV2.Types.SenderIdAndCountry+import Amazonka.PinpointSmsVoiceV2.Types.SenderIdFilter+import Amazonka.PinpointSmsVoiceV2.Types.SenderIdFilterName+import Amazonka.PinpointSmsVoiceV2.Types.SenderIdInformation+import Amazonka.PinpointSmsVoiceV2.Types.SnsDestination+import Amazonka.PinpointSmsVoiceV2.Types.SpendLimit+import Amazonka.PinpointSmsVoiceV2.Types.SpendLimitName+import Amazonka.PinpointSmsVoiceV2.Types.Tag+import Amazonka.PinpointSmsVoiceV2.Types.VoiceId+import Amazonka.PinpointSmsVoiceV2.Types.VoiceMessageBodyTextType+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2022-03-31@ of the Amazon Pinpoint SMS Voice V2 SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "PinpointSmsVoiceV2",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "sms-voice",+ Core.signingName = "sms-voice",+ Core.version = "2022-03-31",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error =+ Core.parseJSONError "PinpointSmsVoiceV2",+ 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++-- | The request was denied because you don\'t have sufficient permissions to+-- access the resource.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+ Core._MatchServiceError+ defaultService+ "AccessDeniedException"++-- | Your request has conflicting operations. This can occur if you\'re+-- trying to perform more than one operation on the same resource at the+-- same time or it could be that the requested action isn\'t valid for the+-- current state or configuration of the resource.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+ Core._MatchServiceError+ defaultService+ "ConflictException"++-- | The API encountered an unexpected error and couldn\'t complete the+-- request. You might be able to successfully issue the request again in+-- the future.+_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+ Core._MatchServiceError+ defaultService+ "InternalServerException"++-- | A requested resource couldn\'t be found.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"++-- | The request would cause a service quota to be exceeded.+_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceQuotaExceededException =+ Core._MatchServiceError+ defaultService+ "ServiceQuotaExceededException"++-- | An error that occurred because too many requests were sent during a+-- certain amount of time.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+ Core._MatchServiceError+ defaultService+ "ThrottlingException"++-- | A validation exception for a field.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+ Core._MatchServiceError+ defaultService+ "ValidationException"
+ gen/Amazonka/PinpointSmsVoiceV2/Types/AccountAttribute.hs view
@@ -0,0 +1,86 @@+{-# 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.PinpointSmsVoiceV2.Types.AccountAttribute+-- 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.PinpointSmsVoiceV2.Types.AccountAttribute where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.AccountAttributeName+import qualified Amazonka.Prelude as Prelude++-- | Displays the attributes associated with a single Amazon Web Services+-- account.+--+-- /See:/ 'newAccountAttribute' smart constructor.+data AccountAttribute = AccountAttribute'+ { -- | The name of the account attribute.+ name :: AccountAttributeName,+ -- | The value associated with the account attribute name.+ value :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AccountAttribute' 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', 'accountAttribute_name' - The name of the account attribute.+--+-- 'value', 'accountAttribute_value' - The value associated with the account attribute name.+newAccountAttribute ::+ -- | 'name'+ AccountAttributeName ->+ -- | 'value'+ Prelude.Text ->+ AccountAttribute+newAccountAttribute pName_ pValue_ =+ AccountAttribute' {name = pName_, value = pValue_}++-- | The name of the account attribute.+accountAttribute_name :: Lens.Lens' AccountAttribute AccountAttributeName+accountAttribute_name = Lens.lens (\AccountAttribute' {name} -> name) (\s@AccountAttribute' {} a -> s {name = a} :: AccountAttribute)++-- | The value associated with the account attribute name.+accountAttribute_value :: Lens.Lens' AccountAttribute Prelude.Text+accountAttribute_value = Lens.lens (\AccountAttribute' {value} -> value) (\s@AccountAttribute' {} a -> s {value = a} :: AccountAttribute)++instance Data.FromJSON AccountAttribute where+ parseJSON =+ Data.withObject+ "AccountAttribute"+ ( \x ->+ AccountAttribute'+ Prelude.<$> (x Data..: "Name")+ Prelude.<*> (x Data..: "Value")+ )++instance Prelude.Hashable AccountAttribute where+ hashWithSalt _salt AccountAttribute' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` value++instance Prelude.NFData AccountAttribute where+ rnf AccountAttribute' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf value
+ gen/Amazonka/PinpointSmsVoiceV2/Types/AccountAttributeName.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.PinpointSmsVoiceV2.Types.AccountAttributeName+-- 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.PinpointSmsVoiceV2.Types.AccountAttributeName+ ( AccountAttributeName+ ( ..,+ AccountAttributeName_ACCOUNT_TIER+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype AccountAttributeName = AccountAttributeName'+ { fromAccountAttributeName ::+ 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 AccountAttributeName_ACCOUNT_TIER :: AccountAttributeName+pattern AccountAttributeName_ACCOUNT_TIER = AccountAttributeName' "ACCOUNT_TIER"++{-# COMPLETE+ AccountAttributeName_ACCOUNT_TIER,+ AccountAttributeName'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/AccountLimit.hs view
@@ -0,0 +1,104 @@+{-# 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.PinpointSmsVoiceV2.Types.AccountLimit+-- 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.PinpointSmsVoiceV2.Types.AccountLimit where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.AccountLimitName+import qualified Amazonka.Prelude as Prelude++-- | The current resource quotas associated with an Amazon Web Services+-- account.+--+-- /See:/ 'newAccountLimit' smart constructor.+data AccountLimit = AccountLimit'+ { -- | The name of the attribute to apply the account limit to.+ name :: AccountLimitName,+ -- | The current amount that has been spent, in US dollars.+ used :: Prelude.Integer,+ -- | The Amazon Web Services set limit for that resource type, in US dollars.+ max :: Prelude.Integer+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AccountLimit' 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', 'accountLimit_name' - The name of the attribute to apply the account limit to.+--+-- 'used', 'accountLimit_used' - The current amount that has been spent, in US dollars.+--+-- 'max', 'accountLimit_max' - The Amazon Web Services set limit for that resource type, in US dollars.+newAccountLimit ::+ -- | 'name'+ AccountLimitName ->+ -- | 'used'+ Prelude.Integer ->+ -- | 'max'+ Prelude.Integer ->+ AccountLimit+newAccountLimit pName_ pUsed_ pMax_ =+ AccountLimit'+ { name = pName_,+ used = pUsed_,+ max = pMax_+ }++-- | The name of the attribute to apply the account limit to.+accountLimit_name :: Lens.Lens' AccountLimit AccountLimitName+accountLimit_name = Lens.lens (\AccountLimit' {name} -> name) (\s@AccountLimit' {} a -> s {name = a} :: AccountLimit)++-- | The current amount that has been spent, in US dollars.+accountLimit_used :: Lens.Lens' AccountLimit Prelude.Integer+accountLimit_used = Lens.lens (\AccountLimit' {used} -> used) (\s@AccountLimit' {} a -> s {used = a} :: AccountLimit)++-- | The Amazon Web Services set limit for that resource type, in US dollars.+accountLimit_max :: Lens.Lens' AccountLimit Prelude.Integer+accountLimit_max = Lens.lens (\AccountLimit' {max} -> max) (\s@AccountLimit' {} a -> s {max = a} :: AccountLimit)++instance Data.FromJSON AccountLimit where+ parseJSON =+ Data.withObject+ "AccountLimit"+ ( \x ->+ AccountLimit'+ Prelude.<$> (x Data..: "Name")+ Prelude.<*> (x Data..: "Used")+ Prelude.<*> (x Data..: "Max")+ )++instance Prelude.Hashable AccountLimit where+ hashWithSalt _salt AccountLimit' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` used+ `Prelude.hashWithSalt` max++instance Prelude.NFData AccountLimit where+ rnf AccountLimit' {..} =+ Prelude.rnf name+ `Prelude.seq` Prelude.rnf used+ `Prelude.seq` Prelude.rnf max
+ gen/Amazonka/PinpointSmsVoiceV2/Types/AccountLimitName.hs view
@@ -0,0 +1,81 @@+{-# 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.PinpointSmsVoiceV2.Types.AccountLimitName+-- 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.PinpointSmsVoiceV2.Types.AccountLimitName+ ( AccountLimitName+ ( ..,+ AccountLimitName_CONFIGURATION_SETS,+ AccountLimitName_OPT_OUT_LISTS,+ AccountLimitName_PHONE_NUMBERS,+ AccountLimitName_POOLS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype AccountLimitName = AccountLimitName'+ { fromAccountLimitName ::+ 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 AccountLimitName_CONFIGURATION_SETS :: AccountLimitName+pattern AccountLimitName_CONFIGURATION_SETS = AccountLimitName' "CONFIGURATION_SETS"++pattern AccountLimitName_OPT_OUT_LISTS :: AccountLimitName+pattern AccountLimitName_OPT_OUT_LISTS = AccountLimitName' "OPT_OUT_LISTS"++pattern AccountLimitName_PHONE_NUMBERS :: AccountLimitName+pattern AccountLimitName_PHONE_NUMBERS = AccountLimitName' "PHONE_NUMBERS"++pattern AccountLimitName_POOLS :: AccountLimitName+pattern AccountLimitName_POOLS = AccountLimitName' "POOLS"++{-# COMPLETE+ AccountLimitName_CONFIGURATION_SETS,+ AccountLimitName_OPT_OUT_LISTS,+ AccountLimitName_PHONE_NUMBERS,+ AccountLimitName_POOLS,+ AccountLimitName'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/CloudWatchLogsDestination.hs view
@@ -0,0 +1,110 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.CloudWatchLogsDestination+-- 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.PinpointSmsVoiceV2.Types.CloudWatchLogsDestination where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Contains the destination configuration to use when publishing message+-- sending events.+--+-- /See:/ 'newCloudWatchLogsDestination' smart constructor.+data CloudWatchLogsDestination = CloudWatchLogsDestination'+ { -- | The Amazon Resource Name (ARN) of an Amazon Identity and Access+ -- Management (IAM) role that is able to write event data to an Amazon+ -- CloudWatch destination.+ iamRoleArn :: Prelude.Text,+ -- | The name of the Amazon CloudWatch log group that you want to record+ -- events in.+ logGroupArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CloudWatchLogsDestination' 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:+--+-- 'iamRoleArn', 'cloudWatchLogsDestination_iamRoleArn' - The Amazon Resource Name (ARN) of an Amazon Identity and Access+-- Management (IAM) role that is able to write event data to an Amazon+-- CloudWatch destination.+--+-- 'logGroupArn', 'cloudWatchLogsDestination_logGroupArn' - The name of the Amazon CloudWatch log group that you want to record+-- events in.+newCloudWatchLogsDestination ::+ -- | 'iamRoleArn'+ Prelude.Text ->+ -- | 'logGroupArn'+ Prelude.Text ->+ CloudWatchLogsDestination+newCloudWatchLogsDestination+ pIamRoleArn_+ pLogGroupArn_ =+ CloudWatchLogsDestination'+ { iamRoleArn =+ pIamRoleArn_,+ logGroupArn = pLogGroupArn_+ }++-- | The Amazon Resource Name (ARN) of an Amazon Identity and Access+-- Management (IAM) role that is able to write event data to an Amazon+-- CloudWatch destination.+cloudWatchLogsDestination_iamRoleArn :: Lens.Lens' CloudWatchLogsDestination Prelude.Text+cloudWatchLogsDestination_iamRoleArn = Lens.lens (\CloudWatchLogsDestination' {iamRoleArn} -> iamRoleArn) (\s@CloudWatchLogsDestination' {} a -> s {iamRoleArn = a} :: CloudWatchLogsDestination)++-- | The name of the Amazon CloudWatch log group that you want to record+-- events in.+cloudWatchLogsDestination_logGroupArn :: Lens.Lens' CloudWatchLogsDestination Prelude.Text+cloudWatchLogsDestination_logGroupArn = Lens.lens (\CloudWatchLogsDestination' {logGroupArn} -> logGroupArn) (\s@CloudWatchLogsDestination' {} a -> s {logGroupArn = a} :: CloudWatchLogsDestination)++instance Data.FromJSON CloudWatchLogsDestination where+ parseJSON =+ Data.withObject+ "CloudWatchLogsDestination"+ ( \x ->+ CloudWatchLogsDestination'+ Prelude.<$> (x Data..: "IamRoleArn")+ Prelude.<*> (x Data..: "LogGroupArn")+ )++instance Prelude.Hashable CloudWatchLogsDestination where+ hashWithSalt _salt CloudWatchLogsDestination' {..} =+ _salt+ `Prelude.hashWithSalt` iamRoleArn+ `Prelude.hashWithSalt` logGroupArn++instance Prelude.NFData CloudWatchLogsDestination where+ rnf CloudWatchLogsDestination' {..} =+ Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf logGroupArn++instance Data.ToJSON CloudWatchLogsDestination where+ toJSON CloudWatchLogsDestination' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("IamRoleArn" Data..= iamRoleArn),+ Prelude.Just ("LogGroupArn" Data..= logGroupArn)+ ]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/ConfigurationSetFilter.hs view
@@ -0,0 +1,87 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetFilter+-- 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.PinpointSmsVoiceV2.Types.ConfigurationSetFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.ConfigurationSetFilterName+import qualified Amazonka.Prelude as Prelude++-- | The information for configuration sets that meet a specified criteria.+--+-- /See:/ 'newConfigurationSetFilter' smart constructor.+data ConfigurationSetFilter = ConfigurationSetFilter'+ { -- | The name of the attribute to filter on.+ name :: ConfigurationSetFilterName,+ -- | An array values to filter for.+ values :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ConfigurationSetFilter' 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', 'configurationSetFilter_name' - The name of the attribute to filter on.+--+-- 'values', 'configurationSetFilter_values' - An array values to filter for.+newConfigurationSetFilter ::+ -- | 'name'+ ConfigurationSetFilterName ->+ -- | 'values'+ Prelude.NonEmpty Prelude.Text ->+ ConfigurationSetFilter+newConfigurationSetFilter pName_ pValues_ =+ ConfigurationSetFilter'+ { name = pName_,+ values = Lens.coerced Lens.# pValues_+ }++-- | The name of the attribute to filter on.+configurationSetFilter_name :: Lens.Lens' ConfigurationSetFilter ConfigurationSetFilterName+configurationSetFilter_name = Lens.lens (\ConfigurationSetFilter' {name} -> name) (\s@ConfigurationSetFilter' {} a -> s {name = a} :: ConfigurationSetFilter)++-- | An array values to filter for.+configurationSetFilter_values :: Lens.Lens' ConfigurationSetFilter (Prelude.NonEmpty Prelude.Text)+configurationSetFilter_values = Lens.lens (\ConfigurationSetFilter' {values} -> values) (\s@ConfigurationSetFilter' {} a -> s {values = a} :: ConfigurationSetFilter) Prelude.. Lens.coerced++instance Prelude.Hashable ConfigurationSetFilter where+ hashWithSalt _salt ConfigurationSetFilter' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` values++instance Prelude.NFData ConfigurationSetFilter where+ rnf ConfigurationSetFilter' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON ConfigurationSetFilter where+ toJSON ConfigurationSetFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Name" Data..= name),+ Prelude.Just ("Values" Data..= values)+ ]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/ConfigurationSetFilterName.hs view
@@ -0,0 +1,81 @@+{-# 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.PinpointSmsVoiceV2.Types.ConfigurationSetFilterName+-- 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.PinpointSmsVoiceV2.Types.ConfigurationSetFilterName+ ( ConfigurationSetFilterName+ ( ..,+ ConfigurationSetFilterName_Default_message_type,+ ConfigurationSetFilterName_Default_sender_id,+ ConfigurationSetFilterName_Event_destination_name,+ ConfigurationSetFilterName_Matching_event_types+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ConfigurationSetFilterName = ConfigurationSetFilterName'+ { fromConfigurationSetFilterName ::+ 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 ConfigurationSetFilterName_Default_message_type :: ConfigurationSetFilterName+pattern ConfigurationSetFilterName_Default_message_type = ConfigurationSetFilterName' "default-message-type"++pattern ConfigurationSetFilterName_Default_sender_id :: ConfigurationSetFilterName+pattern ConfigurationSetFilterName_Default_sender_id = ConfigurationSetFilterName' "default-sender-id"++pattern ConfigurationSetFilterName_Event_destination_name :: ConfigurationSetFilterName+pattern ConfigurationSetFilterName_Event_destination_name = ConfigurationSetFilterName' "event-destination-name"++pattern ConfigurationSetFilterName_Matching_event_types :: ConfigurationSetFilterName+pattern ConfigurationSetFilterName_Matching_event_types = ConfigurationSetFilterName' "matching-event-types"++{-# COMPLETE+ ConfigurationSetFilterName_Default_message_type,+ ConfigurationSetFilterName_Default_sender_id,+ ConfigurationSetFilterName_Event_destination_name,+ ConfigurationSetFilterName_Matching_event_types,+ ConfigurationSetFilterName'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/ConfigurationSetInformation.hs view
@@ -0,0 +1,161 @@+{-# 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.PinpointSmsVoiceV2.Types.ConfigurationSetInformation+-- 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.PinpointSmsVoiceV2.Types.ConfigurationSetInformation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.EventDestination+import Amazonka.PinpointSmsVoiceV2.Types.MessageType+import qualified Amazonka.Prelude as Prelude++-- | Information related to a given configuration set in your Amazon Web+-- Services account.+--+-- /See:/ 'newConfigurationSetInformation' smart constructor.+data ConfigurationSetInformation = ConfigurationSetInformation'+ { -- | The type of message. Valid values are TRANSACTIONAL for messages that+ -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+ -- critical or time-sensitive.+ defaultMessageType :: Prelude.Maybe MessageType,+ -- | The default sender ID used by the ConfigurationSet.+ defaultSenderId :: Prelude.Maybe Prelude.Text,+ -- | The Resource Name (ARN) of the ConfigurationSet.+ configurationSetArn :: Prelude.Text,+ -- | The name of the ConfigurationSet.+ configurationSetName :: Prelude.Text,+ -- | An array of EventDestination objects that describe any events to log and+ -- where to log them.+ eventDestinations :: [EventDestination],+ -- | The time when the ConfigurationSet was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ConfigurationSetInformation' 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:+--+-- 'defaultMessageType', 'configurationSetInformation_defaultMessageType' - The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+--+-- 'defaultSenderId', 'configurationSetInformation_defaultSenderId' - The default sender ID used by the ConfigurationSet.+--+-- 'configurationSetArn', 'configurationSetInformation_configurationSetArn' - The Resource Name (ARN) of the ConfigurationSet.+--+-- 'configurationSetName', 'configurationSetInformation_configurationSetName' - The name of the ConfigurationSet.+--+-- 'eventDestinations', 'configurationSetInformation_eventDestinations' - An array of EventDestination objects that describe any events to log and+-- where to log them.+--+-- 'createdTimestamp', 'configurationSetInformation_createdTimestamp' - The time when the ConfigurationSet was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+newConfigurationSetInformation ::+ -- | 'configurationSetArn'+ Prelude.Text ->+ -- | 'configurationSetName'+ Prelude.Text ->+ -- | 'createdTimestamp'+ Prelude.UTCTime ->+ ConfigurationSetInformation+newConfigurationSetInformation+ pConfigurationSetArn_+ pConfigurationSetName_+ pCreatedTimestamp_ =+ ConfigurationSetInformation'+ { defaultMessageType =+ Prelude.Nothing,+ defaultSenderId = Prelude.Nothing,+ configurationSetArn = pConfigurationSetArn_,+ configurationSetName = pConfigurationSetName_,+ eventDestinations = Prelude.mempty,+ createdTimestamp =+ Data._Time Lens.# pCreatedTimestamp_+ }++-- | The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+configurationSetInformation_defaultMessageType :: Lens.Lens' ConfigurationSetInformation (Prelude.Maybe MessageType)+configurationSetInformation_defaultMessageType = Lens.lens (\ConfigurationSetInformation' {defaultMessageType} -> defaultMessageType) (\s@ConfigurationSetInformation' {} a -> s {defaultMessageType = a} :: ConfigurationSetInformation)++-- | The default sender ID used by the ConfigurationSet.+configurationSetInformation_defaultSenderId :: Lens.Lens' ConfigurationSetInformation (Prelude.Maybe Prelude.Text)+configurationSetInformation_defaultSenderId = Lens.lens (\ConfigurationSetInformation' {defaultSenderId} -> defaultSenderId) (\s@ConfigurationSetInformation' {} a -> s {defaultSenderId = a} :: ConfigurationSetInformation)++-- | The Resource Name (ARN) of the ConfigurationSet.+configurationSetInformation_configurationSetArn :: Lens.Lens' ConfigurationSetInformation Prelude.Text+configurationSetInformation_configurationSetArn = Lens.lens (\ConfigurationSetInformation' {configurationSetArn} -> configurationSetArn) (\s@ConfigurationSetInformation' {} a -> s {configurationSetArn = a} :: ConfigurationSetInformation)++-- | The name of the ConfigurationSet.+configurationSetInformation_configurationSetName :: Lens.Lens' ConfigurationSetInformation Prelude.Text+configurationSetInformation_configurationSetName = Lens.lens (\ConfigurationSetInformation' {configurationSetName} -> configurationSetName) (\s@ConfigurationSetInformation' {} a -> s {configurationSetName = a} :: ConfigurationSetInformation)++-- | An array of EventDestination objects that describe any events to log and+-- where to log them.+configurationSetInformation_eventDestinations :: Lens.Lens' ConfigurationSetInformation [EventDestination]+configurationSetInformation_eventDestinations = Lens.lens (\ConfigurationSetInformation' {eventDestinations} -> eventDestinations) (\s@ConfigurationSetInformation' {} a -> s {eventDestinations = a} :: ConfigurationSetInformation) Prelude.. Lens.coerced++-- | The time when the ConfigurationSet was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+configurationSetInformation_createdTimestamp :: Lens.Lens' ConfigurationSetInformation Prelude.UTCTime+configurationSetInformation_createdTimestamp = Lens.lens (\ConfigurationSetInformation' {createdTimestamp} -> createdTimestamp) (\s@ConfigurationSetInformation' {} a -> s {createdTimestamp = a} :: ConfigurationSetInformation) Prelude.. Data._Time++instance Data.FromJSON ConfigurationSetInformation where+ parseJSON =+ Data.withObject+ "ConfigurationSetInformation"+ ( \x ->+ ConfigurationSetInformation'+ Prelude.<$> (x Data..:? "DefaultMessageType")+ Prelude.<*> (x Data..:? "DefaultSenderId")+ Prelude.<*> (x Data..: "ConfigurationSetArn")+ Prelude.<*> (x Data..: "ConfigurationSetName")+ Prelude.<*> ( x+ Data..:? "EventDestinations"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..: "CreatedTimestamp")+ )++instance Prelude.Hashable ConfigurationSetInformation where+ hashWithSalt _salt ConfigurationSetInformation' {..} =+ _salt+ `Prelude.hashWithSalt` defaultMessageType+ `Prelude.hashWithSalt` defaultSenderId+ `Prelude.hashWithSalt` configurationSetArn+ `Prelude.hashWithSalt` configurationSetName+ `Prelude.hashWithSalt` eventDestinations+ `Prelude.hashWithSalt` createdTimestamp++instance Prelude.NFData ConfigurationSetInformation where+ rnf ConfigurationSetInformation' {..} =+ Prelude.rnf defaultMessageType+ `Prelude.seq` Prelude.rnf defaultSenderId+ `Prelude.seq` Prelude.rnf configurationSetArn+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf eventDestinations+ `Prelude.seq` Prelude.rnf createdTimestamp
+ gen/Amazonka/PinpointSmsVoiceV2/Types/DestinationCountryParameterKey.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.PinpointSmsVoiceV2.Types.DestinationCountryParameterKey+-- 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.PinpointSmsVoiceV2.Types.DestinationCountryParameterKey+ ( DestinationCountryParameterKey+ ( ..,+ DestinationCountryParameterKey_IN_ENTITY_ID,+ DestinationCountryParameterKey_IN_TEMPLATE_ID+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype DestinationCountryParameterKey = DestinationCountryParameterKey'+ { fromDestinationCountryParameterKey ::+ 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 DestinationCountryParameterKey_IN_ENTITY_ID :: DestinationCountryParameterKey+pattern DestinationCountryParameterKey_IN_ENTITY_ID = DestinationCountryParameterKey' "IN_ENTITY_ID"++pattern DestinationCountryParameterKey_IN_TEMPLATE_ID :: DestinationCountryParameterKey+pattern DestinationCountryParameterKey_IN_TEMPLATE_ID = DestinationCountryParameterKey' "IN_TEMPLATE_ID"++{-# COMPLETE+ DestinationCountryParameterKey_IN_ENTITY_ID,+ DestinationCountryParameterKey_IN_TEMPLATE_ID,+ DestinationCountryParameterKey'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/EventDestination.hs view
@@ -0,0 +1,160 @@+{-# 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.PinpointSmsVoiceV2.Types.EventDestination+-- 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.PinpointSmsVoiceV2.Types.EventDestination where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.CloudWatchLogsDestination+import Amazonka.PinpointSmsVoiceV2.Types.EventType+import Amazonka.PinpointSmsVoiceV2.Types.KinesisFirehoseDestination+import Amazonka.PinpointSmsVoiceV2.Types.SnsDestination+import qualified Amazonka.Prelude as Prelude++-- | Contains information about an event destination.+--+-- Event destinations are associated with configuration sets, which enable+-- you to publish message sending events to Amazon CloudWatch, Amazon+-- Kinesis Data Firehose, or Amazon SNS.+--+-- /See:/ 'newEventDestination' smart constructor.+data EventDestination = EventDestination'+ { -- | An object that contains information about an event destination that+ -- sends logging events to Amazon CloudWatch logs.+ cloudWatchLogsDestination :: Prelude.Maybe CloudWatchLogsDestination,+ -- | An object that contains information about an event destination for+ -- logging to Amazon Kinesis Data Firehose.+ kinesisFirehoseDestination :: Prelude.Maybe KinesisFirehoseDestination,+ -- | An object that contains information about an event destination that+ -- sends logging events to Amazon SNS.+ snsDestination :: Prelude.Maybe SnsDestination,+ -- | The name of the EventDestination.+ eventDestinationName :: Prelude.Text,+ -- | When set to true events will be logged.+ enabled :: Prelude.Bool,+ -- | An array of event types that determine which events to log.+ matchingEventTypes :: Prelude.NonEmpty EventType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EventDestination' 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:+--+-- 'cloudWatchLogsDestination', 'eventDestination_cloudWatchLogsDestination' - An object that contains information about an event destination that+-- sends logging events to Amazon CloudWatch logs.+--+-- 'kinesisFirehoseDestination', 'eventDestination_kinesisFirehoseDestination' - An object that contains information about an event destination for+-- logging to Amazon Kinesis Data Firehose.+--+-- 'snsDestination', 'eventDestination_snsDestination' - An object that contains information about an event destination that+-- sends logging events to Amazon SNS.+--+-- 'eventDestinationName', 'eventDestination_eventDestinationName' - The name of the EventDestination.+--+-- 'enabled', 'eventDestination_enabled' - When set to true events will be logged.+--+-- 'matchingEventTypes', 'eventDestination_matchingEventTypes' - An array of event types that determine which events to log.+newEventDestination ::+ -- | 'eventDestinationName'+ Prelude.Text ->+ -- | 'enabled'+ Prelude.Bool ->+ -- | 'matchingEventTypes'+ Prelude.NonEmpty EventType ->+ EventDestination+newEventDestination+ pEventDestinationName_+ pEnabled_+ pMatchingEventTypes_ =+ EventDestination'+ { cloudWatchLogsDestination =+ Prelude.Nothing,+ kinesisFirehoseDestination = Prelude.Nothing,+ snsDestination = Prelude.Nothing,+ eventDestinationName = pEventDestinationName_,+ enabled = pEnabled_,+ matchingEventTypes =+ Lens.coerced Lens.# pMatchingEventTypes_+ }++-- | An object that contains information about an event destination that+-- sends logging events to Amazon CloudWatch logs.+eventDestination_cloudWatchLogsDestination :: Lens.Lens' EventDestination (Prelude.Maybe CloudWatchLogsDestination)+eventDestination_cloudWatchLogsDestination = Lens.lens (\EventDestination' {cloudWatchLogsDestination} -> cloudWatchLogsDestination) (\s@EventDestination' {} a -> s {cloudWatchLogsDestination = a} :: EventDestination)++-- | An object that contains information about an event destination for+-- logging to Amazon Kinesis Data Firehose.+eventDestination_kinesisFirehoseDestination :: Lens.Lens' EventDestination (Prelude.Maybe KinesisFirehoseDestination)+eventDestination_kinesisFirehoseDestination = Lens.lens (\EventDestination' {kinesisFirehoseDestination} -> kinesisFirehoseDestination) (\s@EventDestination' {} a -> s {kinesisFirehoseDestination = a} :: EventDestination)++-- | An object that contains information about an event destination that+-- sends logging events to Amazon SNS.+eventDestination_snsDestination :: Lens.Lens' EventDestination (Prelude.Maybe SnsDestination)+eventDestination_snsDestination = Lens.lens (\EventDestination' {snsDestination} -> snsDestination) (\s@EventDestination' {} a -> s {snsDestination = a} :: EventDestination)++-- | The name of the EventDestination.+eventDestination_eventDestinationName :: Lens.Lens' EventDestination Prelude.Text+eventDestination_eventDestinationName = Lens.lens (\EventDestination' {eventDestinationName} -> eventDestinationName) (\s@EventDestination' {} a -> s {eventDestinationName = a} :: EventDestination)++-- | When set to true events will be logged.+eventDestination_enabled :: Lens.Lens' EventDestination Prelude.Bool+eventDestination_enabled = Lens.lens (\EventDestination' {enabled} -> enabled) (\s@EventDestination' {} a -> s {enabled = a} :: EventDestination)++-- | An array of event types that determine which events to log.+eventDestination_matchingEventTypes :: Lens.Lens' EventDestination (Prelude.NonEmpty EventType)+eventDestination_matchingEventTypes = Lens.lens (\EventDestination' {matchingEventTypes} -> matchingEventTypes) (\s@EventDestination' {} a -> s {matchingEventTypes = a} :: EventDestination) Prelude.. Lens.coerced++instance Data.FromJSON EventDestination where+ parseJSON =+ Data.withObject+ "EventDestination"+ ( \x ->+ EventDestination'+ Prelude.<$> (x Data..:? "CloudWatchLogsDestination")+ Prelude.<*> (x Data..:? "KinesisFirehoseDestination")+ Prelude.<*> (x Data..:? "SnsDestination")+ Prelude.<*> (x Data..: "EventDestinationName")+ Prelude.<*> (x Data..: "Enabled")+ Prelude.<*> (x Data..: "MatchingEventTypes")+ )++instance Prelude.Hashable EventDestination where+ hashWithSalt _salt EventDestination' {..} =+ _salt+ `Prelude.hashWithSalt` cloudWatchLogsDestination+ `Prelude.hashWithSalt` kinesisFirehoseDestination+ `Prelude.hashWithSalt` snsDestination+ `Prelude.hashWithSalt` eventDestinationName+ `Prelude.hashWithSalt` enabled+ `Prelude.hashWithSalt` matchingEventTypes++instance Prelude.NFData EventDestination where+ rnf EventDestination' {..} =+ Prelude.rnf cloudWatchLogsDestination+ `Prelude.seq` Prelude.rnf kinesisFirehoseDestination+ `Prelude.seq` Prelude.rnf snsDestination+ `Prelude.seq` Prelude.rnf eventDestinationName+ `Prelude.seq` Prelude.rnf enabled+ `Prelude.seq` Prelude.rnf matchingEventTypes
+ gen/Amazonka/PinpointSmsVoiceV2/Types/EventType.hs view
@@ -0,0 +1,186 @@+{-# 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.PinpointSmsVoiceV2.Types.EventType+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.PinpointSmsVoiceV2.Types.EventType+ ( EventType+ ( ..,+ EventType_ALL,+ EventType_TEXT_ALL,+ EventType_TEXT_BLOCKED,+ EventType_TEXT_CARRIER_BLOCKED,+ EventType_TEXT_CARRIER_UNREACHABLE,+ EventType_TEXT_DELIVERED,+ EventType_TEXT_INVALID,+ EventType_TEXT_INVALID_MESSAGE,+ EventType_TEXT_PENDING,+ EventType_TEXT_QUEUED,+ EventType_TEXT_SENT,+ EventType_TEXT_SPAM,+ EventType_TEXT_SUCCESSFUL,+ EventType_TEXT_TTL_EXPIRED,+ EventType_TEXT_UNKNOWN,+ EventType_TEXT_UNREACHABLE,+ EventType_VOICE_ALL,+ EventType_VOICE_ANSWERED,+ EventType_VOICE_BUSY,+ EventType_VOICE_COMPLETED,+ EventType_VOICE_FAILED,+ EventType_VOICE_INITIATED,+ EventType_VOICE_NO_ANSWER,+ EventType_VOICE_RINGING,+ EventType_VOICE_TTL_EXPIRED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype EventType = EventType'+ { fromEventType ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern EventType_ALL :: EventType+pattern EventType_ALL = EventType' "ALL"++pattern EventType_TEXT_ALL :: EventType+pattern EventType_TEXT_ALL = EventType' "TEXT_ALL"++pattern EventType_TEXT_BLOCKED :: EventType+pattern EventType_TEXT_BLOCKED = EventType' "TEXT_BLOCKED"++pattern EventType_TEXT_CARRIER_BLOCKED :: EventType+pattern EventType_TEXT_CARRIER_BLOCKED = EventType' "TEXT_CARRIER_BLOCKED"++pattern EventType_TEXT_CARRIER_UNREACHABLE :: EventType+pattern EventType_TEXT_CARRIER_UNREACHABLE = EventType' "TEXT_CARRIER_UNREACHABLE"++pattern EventType_TEXT_DELIVERED :: EventType+pattern EventType_TEXT_DELIVERED = EventType' "TEXT_DELIVERED"++pattern EventType_TEXT_INVALID :: EventType+pattern EventType_TEXT_INVALID = EventType' "TEXT_INVALID"++pattern EventType_TEXT_INVALID_MESSAGE :: EventType+pattern EventType_TEXT_INVALID_MESSAGE = EventType' "TEXT_INVALID_MESSAGE"++pattern EventType_TEXT_PENDING :: EventType+pattern EventType_TEXT_PENDING = EventType' "TEXT_PENDING"++pattern EventType_TEXT_QUEUED :: EventType+pattern EventType_TEXT_QUEUED = EventType' "TEXT_QUEUED"++pattern EventType_TEXT_SENT :: EventType+pattern EventType_TEXT_SENT = EventType' "TEXT_SENT"++pattern EventType_TEXT_SPAM :: EventType+pattern EventType_TEXT_SPAM = EventType' "TEXT_SPAM"++pattern EventType_TEXT_SUCCESSFUL :: EventType+pattern EventType_TEXT_SUCCESSFUL = EventType' "TEXT_SUCCESSFUL"++pattern EventType_TEXT_TTL_EXPIRED :: EventType+pattern EventType_TEXT_TTL_EXPIRED = EventType' "TEXT_TTL_EXPIRED"++pattern EventType_TEXT_UNKNOWN :: EventType+pattern EventType_TEXT_UNKNOWN = EventType' "TEXT_UNKNOWN"++pattern EventType_TEXT_UNREACHABLE :: EventType+pattern EventType_TEXT_UNREACHABLE = EventType' "TEXT_UNREACHABLE"++pattern EventType_VOICE_ALL :: EventType+pattern EventType_VOICE_ALL = EventType' "VOICE_ALL"++pattern EventType_VOICE_ANSWERED :: EventType+pattern EventType_VOICE_ANSWERED = EventType' "VOICE_ANSWERED"++pattern EventType_VOICE_BUSY :: EventType+pattern EventType_VOICE_BUSY = EventType' "VOICE_BUSY"++pattern EventType_VOICE_COMPLETED :: EventType+pattern EventType_VOICE_COMPLETED = EventType' "VOICE_COMPLETED"++pattern EventType_VOICE_FAILED :: EventType+pattern EventType_VOICE_FAILED = EventType' "VOICE_FAILED"++pattern EventType_VOICE_INITIATED :: EventType+pattern EventType_VOICE_INITIATED = EventType' "VOICE_INITIATED"++pattern EventType_VOICE_NO_ANSWER :: EventType+pattern EventType_VOICE_NO_ANSWER = EventType' "VOICE_NO_ANSWER"++pattern EventType_VOICE_RINGING :: EventType+pattern EventType_VOICE_RINGING = EventType' "VOICE_RINGING"++pattern EventType_VOICE_TTL_EXPIRED :: EventType+pattern EventType_VOICE_TTL_EXPIRED = EventType' "VOICE_TTL_EXPIRED"++{-# COMPLETE+ EventType_ALL,+ EventType_TEXT_ALL,+ EventType_TEXT_BLOCKED,+ EventType_TEXT_CARRIER_BLOCKED,+ EventType_TEXT_CARRIER_UNREACHABLE,+ EventType_TEXT_DELIVERED,+ EventType_TEXT_INVALID,+ EventType_TEXT_INVALID_MESSAGE,+ EventType_TEXT_PENDING,+ EventType_TEXT_QUEUED,+ EventType_TEXT_SENT,+ EventType_TEXT_SPAM,+ EventType_TEXT_SUCCESSFUL,+ EventType_TEXT_TTL_EXPIRED,+ EventType_TEXT_UNKNOWN,+ EventType_TEXT_UNREACHABLE,+ EventType_VOICE_ALL,+ EventType_VOICE_ANSWERED,+ EventType_VOICE_BUSY,+ EventType_VOICE_COMPLETED,+ EventType_VOICE_FAILED,+ EventType_VOICE_INITIATED,+ EventType_VOICE_NO_ANSWER,+ EventType_VOICE_RINGING,+ EventType_VOICE_TTL_EXPIRED,+ EventType'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/KeywordAction.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.PinpointSmsVoiceV2.Types.KeywordAction+-- 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.PinpointSmsVoiceV2.Types.KeywordAction+ ( KeywordAction+ ( ..,+ KeywordAction_AUTOMATIC_RESPONSE,+ KeywordAction_OPT_IN,+ KeywordAction_OPT_OUT+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype KeywordAction = KeywordAction'+ { fromKeywordAction ::+ 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 KeywordAction_AUTOMATIC_RESPONSE :: KeywordAction+pattern KeywordAction_AUTOMATIC_RESPONSE = KeywordAction' "AUTOMATIC_RESPONSE"++pattern KeywordAction_OPT_IN :: KeywordAction+pattern KeywordAction_OPT_IN = KeywordAction' "OPT_IN"++pattern KeywordAction_OPT_OUT :: KeywordAction+pattern KeywordAction_OPT_OUT = KeywordAction' "OPT_OUT"++{-# COMPLETE+ KeywordAction_AUTOMATIC_RESPONSE,+ KeywordAction_OPT_IN,+ KeywordAction_OPT_OUT,+ KeywordAction'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/KeywordFilter.hs view
@@ -0,0 +1,87 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.KeywordFilter+-- 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.PinpointSmsVoiceV2.Types.KeywordFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.KeywordFilterName+import qualified Amazonka.Prelude as Prelude++-- | The information for keywords that meet a specified criteria.+--+-- /See:/ 'newKeywordFilter' smart constructor.+data KeywordFilter = KeywordFilter'+ { -- | The name of the attribute to filter on.+ name :: KeywordFilterName,+ -- | An array values to filter for.+ values :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'KeywordFilter' 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', 'keywordFilter_name' - The name of the attribute to filter on.+--+-- 'values', 'keywordFilter_values' - An array values to filter for.+newKeywordFilter ::+ -- | 'name'+ KeywordFilterName ->+ -- | 'values'+ Prelude.NonEmpty Prelude.Text ->+ KeywordFilter+newKeywordFilter pName_ pValues_ =+ KeywordFilter'+ { name = pName_,+ values = Lens.coerced Lens.# pValues_+ }++-- | The name of the attribute to filter on.+keywordFilter_name :: Lens.Lens' KeywordFilter KeywordFilterName+keywordFilter_name = Lens.lens (\KeywordFilter' {name} -> name) (\s@KeywordFilter' {} a -> s {name = a} :: KeywordFilter)++-- | An array values to filter for.+keywordFilter_values :: Lens.Lens' KeywordFilter (Prelude.NonEmpty Prelude.Text)+keywordFilter_values = Lens.lens (\KeywordFilter' {values} -> values) (\s@KeywordFilter' {} a -> s {values = a} :: KeywordFilter) Prelude.. Lens.coerced++instance Prelude.Hashable KeywordFilter where+ hashWithSalt _salt KeywordFilter' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` values++instance Prelude.NFData KeywordFilter where+ rnf KeywordFilter' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON KeywordFilter where+ toJSON KeywordFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Name" Data..= name),+ Prelude.Just ("Values" Data..= values)+ ]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/KeywordFilterName.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.PinpointSmsVoiceV2.Types.KeywordFilterName+-- 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.PinpointSmsVoiceV2.Types.KeywordFilterName+ ( KeywordFilterName+ ( ..,+ KeywordFilterName_Keyword_action+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype KeywordFilterName = KeywordFilterName'+ { fromKeywordFilterName ::+ 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 KeywordFilterName_Keyword_action :: KeywordFilterName+pattern KeywordFilterName_Keyword_action = KeywordFilterName' "keyword-action"++{-# COMPLETE+ KeywordFilterName_Keyword_action,+ KeywordFilterName'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/KeywordInformation.hs view
@@ -0,0 +1,106 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.KeywordInformation+-- 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.PinpointSmsVoiceV2.Types.KeywordInformation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.KeywordAction+import qualified Amazonka.Prelude as Prelude++-- | The information for all keywords in a pool.+--+-- /See:/ 'newKeywordInformation' smart constructor.+data KeywordInformation = KeywordInformation'+ { -- | The keyword as a string.+ keyword :: Prelude.Text,+ -- | A custom message that can be used with the keyword.+ keywordMessage :: Prelude.Text,+ -- | The action to perform for the keyword.+ keywordAction :: KeywordAction+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'KeywordInformation' 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:+--+-- 'keyword', 'keywordInformation_keyword' - The keyword as a string.+--+-- 'keywordMessage', 'keywordInformation_keywordMessage' - A custom message that can be used with the keyword.+--+-- 'keywordAction', 'keywordInformation_keywordAction' - The action to perform for the keyword.+newKeywordInformation ::+ -- | 'keyword'+ Prelude.Text ->+ -- | 'keywordMessage'+ Prelude.Text ->+ -- | 'keywordAction'+ KeywordAction ->+ KeywordInformation+newKeywordInformation+ pKeyword_+ pKeywordMessage_+ pKeywordAction_ =+ KeywordInformation'+ { keyword = pKeyword_,+ keywordMessage = pKeywordMessage_,+ keywordAction = pKeywordAction_+ }++-- | The keyword as a string.+keywordInformation_keyword :: Lens.Lens' KeywordInformation Prelude.Text+keywordInformation_keyword = Lens.lens (\KeywordInformation' {keyword} -> keyword) (\s@KeywordInformation' {} a -> s {keyword = a} :: KeywordInformation)++-- | A custom message that can be used with the keyword.+keywordInformation_keywordMessage :: Lens.Lens' KeywordInformation Prelude.Text+keywordInformation_keywordMessage = Lens.lens (\KeywordInformation' {keywordMessage} -> keywordMessage) (\s@KeywordInformation' {} a -> s {keywordMessage = a} :: KeywordInformation)++-- | The action to perform for the keyword.+keywordInformation_keywordAction :: Lens.Lens' KeywordInformation KeywordAction+keywordInformation_keywordAction = Lens.lens (\KeywordInformation' {keywordAction} -> keywordAction) (\s@KeywordInformation' {} a -> s {keywordAction = a} :: KeywordInformation)++instance Data.FromJSON KeywordInformation where+ parseJSON =+ Data.withObject+ "KeywordInformation"+ ( \x ->+ KeywordInformation'+ Prelude.<$> (x Data..: "Keyword")+ Prelude.<*> (x Data..: "KeywordMessage")+ Prelude.<*> (x Data..: "KeywordAction")+ )++instance Prelude.Hashable KeywordInformation where+ hashWithSalt _salt KeywordInformation' {..} =+ _salt+ `Prelude.hashWithSalt` keyword+ `Prelude.hashWithSalt` keywordMessage+ `Prelude.hashWithSalt` keywordAction++instance Prelude.NFData KeywordInformation where+ rnf KeywordInformation' {..} =+ Prelude.rnf keyword+ `Prelude.seq` Prelude.rnf keywordMessage+ `Prelude.seq` Prelude.rnf keywordAction
+ gen/Amazonka/PinpointSmsVoiceV2/Types/KinesisFirehoseDestination.hs view
@@ -0,0 +1,109 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.KinesisFirehoseDestination+-- 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.PinpointSmsVoiceV2.Types.KinesisFirehoseDestination where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Contains the delivery stream Amazon Resource Name (ARN), and the ARN of+-- the Identity and Access Management (IAM) role associated with an Kinesis+-- Data Firehose event destination.+--+-- Event destinations, such as Kinesis Data Firehose, are associated with+-- configuration sets, which enable you to publish message sending events.+--+-- /See:/ 'newKinesisFirehoseDestination' smart constructor.+data KinesisFirehoseDestination = KinesisFirehoseDestination'+ { -- | The ARN of an Amazon Identity and Access Management (IAM) role that is+ -- able to write event data to an Amazon Firehose destination.+ iamRoleArn :: Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the delivery stream.+ deliveryStreamArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'KinesisFirehoseDestination' 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:+--+-- 'iamRoleArn', 'kinesisFirehoseDestination_iamRoleArn' - The ARN of an Amazon Identity and Access Management (IAM) role that is+-- able to write event data to an Amazon Firehose destination.+--+-- 'deliveryStreamArn', 'kinesisFirehoseDestination_deliveryStreamArn' - The Amazon Resource Name (ARN) of the delivery stream.+newKinesisFirehoseDestination ::+ -- | 'iamRoleArn'+ Prelude.Text ->+ -- | 'deliveryStreamArn'+ Prelude.Text ->+ KinesisFirehoseDestination+newKinesisFirehoseDestination+ pIamRoleArn_+ pDeliveryStreamArn_ =+ KinesisFirehoseDestination'+ { iamRoleArn =+ pIamRoleArn_,+ deliveryStreamArn = pDeliveryStreamArn_+ }++-- | The ARN of an Amazon Identity and Access Management (IAM) role that is+-- able to write event data to an Amazon Firehose destination.+kinesisFirehoseDestination_iamRoleArn :: Lens.Lens' KinesisFirehoseDestination Prelude.Text+kinesisFirehoseDestination_iamRoleArn = Lens.lens (\KinesisFirehoseDestination' {iamRoleArn} -> iamRoleArn) (\s@KinesisFirehoseDestination' {} a -> s {iamRoleArn = a} :: KinesisFirehoseDestination)++-- | The Amazon Resource Name (ARN) of the delivery stream.+kinesisFirehoseDestination_deliveryStreamArn :: Lens.Lens' KinesisFirehoseDestination Prelude.Text+kinesisFirehoseDestination_deliveryStreamArn = Lens.lens (\KinesisFirehoseDestination' {deliveryStreamArn} -> deliveryStreamArn) (\s@KinesisFirehoseDestination' {} a -> s {deliveryStreamArn = a} :: KinesisFirehoseDestination)++instance Data.FromJSON KinesisFirehoseDestination where+ parseJSON =+ Data.withObject+ "KinesisFirehoseDestination"+ ( \x ->+ KinesisFirehoseDestination'+ Prelude.<$> (x Data..: "IamRoleArn")+ Prelude.<*> (x Data..: "DeliveryStreamArn")+ )++instance Prelude.Hashable KinesisFirehoseDestination where+ hashWithSalt _salt KinesisFirehoseDestination' {..} =+ _salt+ `Prelude.hashWithSalt` iamRoleArn+ `Prelude.hashWithSalt` deliveryStreamArn++instance Prelude.NFData KinesisFirehoseDestination where+ rnf KinesisFirehoseDestination' {..} =+ Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf deliveryStreamArn++instance Data.ToJSON KinesisFirehoseDestination where+ toJSON KinesisFirehoseDestination' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("IamRoleArn" Data..= iamRoleArn),+ Prelude.Just+ ("DeliveryStreamArn" Data..= deliveryStreamArn)+ ]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/MessageType.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.PinpointSmsVoiceV2.Types.MessageType+-- 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.PinpointSmsVoiceV2.Types.MessageType+ ( MessageType+ ( ..,+ MessageType_PROMOTIONAL,+ MessageType_TRANSACTIONAL+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype MessageType = MessageType'+ { fromMessageType ::+ 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 MessageType_PROMOTIONAL :: MessageType+pattern MessageType_PROMOTIONAL = MessageType' "PROMOTIONAL"++pattern MessageType_TRANSACTIONAL :: MessageType+pattern MessageType_TRANSACTIONAL = MessageType' "TRANSACTIONAL"++{-# COMPLETE+ MessageType_PROMOTIONAL,+ MessageType_TRANSACTIONAL,+ MessageType'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/NumberCapability.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.PinpointSmsVoiceV2.Types.NumberCapability+-- 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.PinpointSmsVoiceV2.Types.NumberCapability+ ( NumberCapability+ ( ..,+ NumberCapability_SMS,+ NumberCapability_VOICE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype NumberCapability = NumberCapability'+ { fromNumberCapability ::+ 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 NumberCapability_SMS :: NumberCapability+pattern NumberCapability_SMS = NumberCapability' "SMS"++pattern NumberCapability_VOICE :: NumberCapability+pattern NumberCapability_VOICE = NumberCapability' "VOICE"++{-# COMPLETE+ NumberCapability_SMS,+ NumberCapability_VOICE,+ NumberCapability'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/NumberStatus.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.NumberStatus+-- 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.PinpointSmsVoiceV2.Types.NumberStatus+ ( NumberStatus+ ( ..,+ NumberStatus_ACTIVE,+ NumberStatus_ASSOCIATING,+ NumberStatus_DELETED,+ NumberStatus_DISASSOCIATING,+ NumberStatus_PENDING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype NumberStatus = NumberStatus'+ { fromNumberStatus ::+ 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 NumberStatus_ACTIVE :: NumberStatus+pattern NumberStatus_ACTIVE = NumberStatus' "ACTIVE"++pattern NumberStatus_ASSOCIATING :: NumberStatus+pattern NumberStatus_ASSOCIATING = NumberStatus' "ASSOCIATING"++pattern NumberStatus_DELETED :: NumberStatus+pattern NumberStatus_DELETED = NumberStatus' "DELETED"++pattern NumberStatus_DISASSOCIATING :: NumberStatus+pattern NumberStatus_DISASSOCIATING = NumberStatus' "DISASSOCIATING"++pattern NumberStatus_PENDING :: NumberStatus+pattern NumberStatus_PENDING = NumberStatus' "PENDING"++{-# COMPLETE+ NumberStatus_ACTIVE,+ NumberStatus_ASSOCIATING,+ NumberStatus_DELETED,+ NumberStatus_DISASSOCIATING,+ NumberStatus_PENDING,+ NumberStatus'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/NumberType.hs view
@@ -0,0 +1,81 @@+{-# 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.PinpointSmsVoiceV2.Types.NumberType+-- 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.PinpointSmsVoiceV2.Types.NumberType+ ( NumberType+ ( ..,+ NumberType_LONG_CODE,+ NumberType_SHORT_CODE,+ NumberType_TEN_DLC,+ NumberType_TOLL_FREE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype NumberType = NumberType'+ { fromNumberType ::+ 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 NumberType_LONG_CODE :: NumberType+pattern NumberType_LONG_CODE = NumberType' "LONG_CODE"++pattern NumberType_SHORT_CODE :: NumberType+pattern NumberType_SHORT_CODE = NumberType' "SHORT_CODE"++pattern NumberType_TEN_DLC :: NumberType+pattern NumberType_TEN_DLC = NumberType' "TEN_DLC"++pattern NumberType_TOLL_FREE :: NumberType+pattern NumberType_TOLL_FREE = NumberType' "TOLL_FREE"++{-# COMPLETE+ NumberType_LONG_CODE,+ NumberType_SHORT_CODE,+ NumberType_TEN_DLC,+ NumberType_TOLL_FREE,+ NumberType'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/OptOutListInformation.hs view
@@ -0,0 +1,110 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.OptOutListInformation+-- 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.PinpointSmsVoiceV2.Types.OptOutListInformation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The information for all OptOutList in an Amazon Web Services account.+--+-- /See:/ 'newOptOutListInformation' smart constructor.+data OptOutListInformation = OptOutListInformation'+ { -- | The Amazon Resource Name (ARN) of the OptOutList.+ optOutListArn :: Prelude.Text,+ -- | The name of the OptOutList.+ optOutListName :: Prelude.Text,+ -- | The time when the OutOutList was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'OptOutListInformation' 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:+--+-- 'optOutListArn', 'optOutListInformation_optOutListArn' - The Amazon Resource Name (ARN) of the OptOutList.+--+-- 'optOutListName', 'optOutListInformation_optOutListName' - The name of the OptOutList.+--+-- 'createdTimestamp', 'optOutListInformation_createdTimestamp' - The time when the OutOutList was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+newOptOutListInformation ::+ -- | 'optOutListArn'+ Prelude.Text ->+ -- | 'optOutListName'+ Prelude.Text ->+ -- | 'createdTimestamp'+ Prelude.UTCTime ->+ OptOutListInformation+newOptOutListInformation+ pOptOutListArn_+ pOptOutListName_+ pCreatedTimestamp_ =+ OptOutListInformation'+ { optOutListArn =+ pOptOutListArn_,+ optOutListName = pOptOutListName_,+ createdTimestamp =+ Data._Time Lens.# pCreatedTimestamp_+ }++-- | The Amazon Resource Name (ARN) of the OptOutList.+optOutListInformation_optOutListArn :: Lens.Lens' OptOutListInformation Prelude.Text+optOutListInformation_optOutListArn = Lens.lens (\OptOutListInformation' {optOutListArn} -> optOutListArn) (\s@OptOutListInformation' {} a -> s {optOutListArn = a} :: OptOutListInformation)++-- | The name of the OptOutList.+optOutListInformation_optOutListName :: Lens.Lens' OptOutListInformation Prelude.Text+optOutListInformation_optOutListName = Lens.lens (\OptOutListInformation' {optOutListName} -> optOutListName) (\s@OptOutListInformation' {} a -> s {optOutListName = a} :: OptOutListInformation)++-- | The time when the OutOutList was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+optOutListInformation_createdTimestamp :: Lens.Lens' OptOutListInformation Prelude.UTCTime+optOutListInformation_createdTimestamp = Lens.lens (\OptOutListInformation' {createdTimestamp} -> createdTimestamp) (\s@OptOutListInformation' {} a -> s {createdTimestamp = a} :: OptOutListInformation) Prelude.. Data._Time++instance Data.FromJSON OptOutListInformation where+ parseJSON =+ Data.withObject+ "OptOutListInformation"+ ( \x ->+ OptOutListInformation'+ Prelude.<$> (x Data..: "OptOutListArn")+ Prelude.<*> (x Data..: "OptOutListName")+ Prelude.<*> (x Data..: "CreatedTimestamp")+ )++instance Prelude.Hashable OptOutListInformation where+ hashWithSalt _salt OptOutListInformation' {..} =+ _salt+ `Prelude.hashWithSalt` optOutListArn+ `Prelude.hashWithSalt` optOutListName+ `Prelude.hashWithSalt` createdTimestamp++instance Prelude.NFData OptOutListInformation where+ rnf OptOutListInformation' {..} =+ Prelude.rnf optOutListArn+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf createdTimestamp
+ gen/Amazonka/PinpointSmsVoiceV2/Types/OptedOutFilter.hs view
@@ -0,0 +1,87 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.OptedOutFilter+-- 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.PinpointSmsVoiceV2.Types.OptedOutFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.OptedOutFilterName+import qualified Amazonka.Prelude as Prelude++-- | The information for opted out numbers that meet a specified criteria.+--+-- /See:/ 'newOptedOutFilter' smart constructor.+data OptedOutFilter = OptedOutFilter'+ { -- | The name of the attribute to filter on.+ name :: OptedOutFilterName,+ -- | An array of values to filter for.+ values :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'OptedOutFilter' 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', 'optedOutFilter_name' - The name of the attribute to filter on.+--+-- 'values', 'optedOutFilter_values' - An array of values to filter for.+newOptedOutFilter ::+ -- | 'name'+ OptedOutFilterName ->+ -- | 'values'+ Prelude.NonEmpty Prelude.Text ->+ OptedOutFilter+newOptedOutFilter pName_ pValues_ =+ OptedOutFilter'+ { name = pName_,+ values = Lens.coerced Lens.# pValues_+ }++-- | The name of the attribute to filter on.+optedOutFilter_name :: Lens.Lens' OptedOutFilter OptedOutFilterName+optedOutFilter_name = Lens.lens (\OptedOutFilter' {name} -> name) (\s@OptedOutFilter' {} a -> s {name = a} :: OptedOutFilter)++-- | An array of values to filter for.+optedOutFilter_values :: Lens.Lens' OptedOutFilter (Prelude.NonEmpty Prelude.Text)+optedOutFilter_values = Lens.lens (\OptedOutFilter' {values} -> values) (\s@OptedOutFilter' {} a -> s {values = a} :: OptedOutFilter) Prelude.. Lens.coerced++instance Prelude.Hashable OptedOutFilter where+ hashWithSalt _salt OptedOutFilter' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` values++instance Prelude.NFData OptedOutFilter where+ rnf OptedOutFilter' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON OptedOutFilter where+ toJSON OptedOutFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Name" Data..= name),+ Prelude.Just ("Values" Data..= values)+ ]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/OptedOutFilterName.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.PinpointSmsVoiceV2.Types.OptedOutFilterName+-- 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.PinpointSmsVoiceV2.Types.OptedOutFilterName+ ( OptedOutFilterName+ ( ..,+ OptedOutFilterName_End_user_opted_out+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype OptedOutFilterName = OptedOutFilterName'+ { fromOptedOutFilterName ::+ 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 OptedOutFilterName_End_user_opted_out :: OptedOutFilterName+pattern OptedOutFilterName_End_user_opted_out = OptedOutFilterName' "end-user-opted-out"++{-# COMPLETE+ OptedOutFilterName_End_user_opted_out,+ OptedOutFilterName'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/OptedOutNumberInformation.hs view
@@ -0,0 +1,111 @@+{-# 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.PinpointSmsVoiceV2.Types.OptedOutNumberInformation+-- 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.PinpointSmsVoiceV2.Types.OptedOutNumberInformation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The information for an opted out number in an Amazon Web Services+-- account.+--+-- /See:/ 'newOptedOutNumberInformation' smart constructor.+data OptedOutNumberInformation = OptedOutNumberInformation'+ { -- | The phone number that is opted out.+ optedOutNumber :: Prelude.Text,+ -- | The time that the op tout occurred, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ optedOutTimestamp :: Data.POSIX,+ -- | This is set to true if it was the end recipient that opted out.+ endUserOptedOut :: Prelude.Bool+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'OptedOutNumberInformation' 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:+--+-- 'optedOutNumber', 'optedOutNumberInformation_optedOutNumber' - The phone number that is opted out.+--+-- 'optedOutTimestamp', 'optedOutNumberInformation_optedOutTimestamp' - The time that the op tout occurred, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'endUserOptedOut', 'optedOutNumberInformation_endUserOptedOut' - This is set to true if it was the end recipient that opted out.+newOptedOutNumberInformation ::+ -- | 'optedOutNumber'+ Prelude.Text ->+ -- | 'optedOutTimestamp'+ Prelude.UTCTime ->+ -- | 'endUserOptedOut'+ Prelude.Bool ->+ OptedOutNumberInformation+newOptedOutNumberInformation+ pOptedOutNumber_+ pOptedOutTimestamp_+ pEndUserOptedOut_ =+ OptedOutNumberInformation'+ { optedOutNumber =+ pOptedOutNumber_,+ optedOutTimestamp =+ Data._Time Lens.# pOptedOutTimestamp_,+ endUserOptedOut = pEndUserOptedOut_+ }++-- | The phone number that is opted out.+optedOutNumberInformation_optedOutNumber :: Lens.Lens' OptedOutNumberInformation Prelude.Text+optedOutNumberInformation_optedOutNumber = Lens.lens (\OptedOutNumberInformation' {optedOutNumber} -> optedOutNumber) (\s@OptedOutNumberInformation' {} a -> s {optedOutNumber = a} :: OptedOutNumberInformation)++-- | The time that the op tout occurred, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+optedOutNumberInformation_optedOutTimestamp :: Lens.Lens' OptedOutNumberInformation Prelude.UTCTime+optedOutNumberInformation_optedOutTimestamp = Lens.lens (\OptedOutNumberInformation' {optedOutTimestamp} -> optedOutTimestamp) (\s@OptedOutNumberInformation' {} a -> s {optedOutTimestamp = a} :: OptedOutNumberInformation) Prelude.. Data._Time++-- | This is set to true if it was the end recipient that opted out.+optedOutNumberInformation_endUserOptedOut :: Lens.Lens' OptedOutNumberInformation Prelude.Bool+optedOutNumberInformation_endUserOptedOut = Lens.lens (\OptedOutNumberInformation' {endUserOptedOut} -> endUserOptedOut) (\s@OptedOutNumberInformation' {} a -> s {endUserOptedOut = a} :: OptedOutNumberInformation)++instance Data.FromJSON OptedOutNumberInformation where+ parseJSON =+ Data.withObject+ "OptedOutNumberInformation"+ ( \x ->+ OptedOutNumberInformation'+ Prelude.<$> (x Data..: "OptedOutNumber")+ Prelude.<*> (x Data..: "OptedOutTimestamp")+ Prelude.<*> (x Data..: "EndUserOptedOut")+ )++instance Prelude.Hashable OptedOutNumberInformation where+ hashWithSalt _salt OptedOutNumberInformation' {..} =+ _salt+ `Prelude.hashWithSalt` optedOutNumber+ `Prelude.hashWithSalt` optedOutTimestamp+ `Prelude.hashWithSalt` endUserOptedOut++instance Prelude.NFData OptedOutNumberInformation where+ rnf OptedOutNumberInformation' {..} =+ Prelude.rnf optedOutNumber+ `Prelude.seq` Prelude.rnf optedOutTimestamp+ `Prelude.seq` Prelude.rnf endUserOptedOut
+ gen/Amazonka/PinpointSmsVoiceV2/Types/OriginationIdentityMetadata.hs view
@@ -0,0 +1,129 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.OriginationIdentityMetadata+-- 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.PinpointSmsVoiceV2.Types.OriginationIdentityMetadata where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.NumberCapability+import qualified Amazonka.Prelude as Prelude++-- | The metadata for an origination identity associated with a pool.+--+-- /See:/ 'newOriginationIdentityMetadata' smart constructor.+data OriginationIdentityMetadata = OriginationIdentityMetadata'+ { -- | The Amazon Resource Name (ARN) associated with the origination identity.+ originationIdentityArn :: Prelude.Text,+ -- | The unique identifier of the origination identity.+ originationIdentity :: Prelude.Text,+ -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+ -- region.+ isoCountryCode :: Prelude.Text,+ -- | Describes if the origination identity can be used for text messages,+ -- voice calls or both.+ numberCapabilities :: Prelude.NonEmpty NumberCapability+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'OriginationIdentityMetadata' 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:+--+-- 'originationIdentityArn', 'originationIdentityMetadata_originationIdentityArn' - The Amazon Resource Name (ARN) associated with the origination identity.+--+-- 'originationIdentity', 'originationIdentityMetadata_originationIdentity' - The unique identifier of the origination identity.+--+-- 'isoCountryCode', 'originationIdentityMetadata_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+--+-- 'numberCapabilities', 'originationIdentityMetadata_numberCapabilities' - Describes if the origination identity can be used for text messages,+-- voice calls or both.+newOriginationIdentityMetadata ::+ -- | 'originationIdentityArn'+ Prelude.Text ->+ -- | 'originationIdentity'+ Prelude.Text ->+ -- | 'isoCountryCode'+ Prelude.Text ->+ -- | 'numberCapabilities'+ Prelude.NonEmpty NumberCapability ->+ OriginationIdentityMetadata+newOriginationIdentityMetadata+ pOriginationIdentityArn_+ pOriginationIdentity_+ pIsoCountryCode_+ pNumberCapabilities_ =+ OriginationIdentityMetadata'+ { originationIdentityArn =+ pOriginationIdentityArn_,+ originationIdentity = pOriginationIdentity_,+ isoCountryCode = pIsoCountryCode_,+ numberCapabilities =+ Lens.coerced Lens.# pNumberCapabilities_+ }++-- | The Amazon Resource Name (ARN) associated with the origination identity.+originationIdentityMetadata_originationIdentityArn :: Lens.Lens' OriginationIdentityMetadata Prelude.Text+originationIdentityMetadata_originationIdentityArn = Lens.lens (\OriginationIdentityMetadata' {originationIdentityArn} -> originationIdentityArn) (\s@OriginationIdentityMetadata' {} a -> s {originationIdentityArn = a} :: OriginationIdentityMetadata)++-- | The unique identifier of the origination identity.+originationIdentityMetadata_originationIdentity :: Lens.Lens' OriginationIdentityMetadata Prelude.Text+originationIdentityMetadata_originationIdentity = Lens.lens (\OriginationIdentityMetadata' {originationIdentity} -> originationIdentity) (\s@OriginationIdentityMetadata' {} a -> s {originationIdentity = a} :: OriginationIdentityMetadata)++-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+originationIdentityMetadata_isoCountryCode :: Lens.Lens' OriginationIdentityMetadata Prelude.Text+originationIdentityMetadata_isoCountryCode = Lens.lens (\OriginationIdentityMetadata' {isoCountryCode} -> isoCountryCode) (\s@OriginationIdentityMetadata' {} a -> s {isoCountryCode = a} :: OriginationIdentityMetadata)++-- | Describes if the origination identity can be used for text messages,+-- voice calls or both.+originationIdentityMetadata_numberCapabilities :: Lens.Lens' OriginationIdentityMetadata (Prelude.NonEmpty NumberCapability)+originationIdentityMetadata_numberCapabilities = Lens.lens (\OriginationIdentityMetadata' {numberCapabilities} -> numberCapabilities) (\s@OriginationIdentityMetadata' {} a -> s {numberCapabilities = a} :: OriginationIdentityMetadata) Prelude.. Lens.coerced++instance Data.FromJSON OriginationIdentityMetadata where+ parseJSON =+ Data.withObject+ "OriginationIdentityMetadata"+ ( \x ->+ OriginationIdentityMetadata'+ Prelude.<$> (x Data..: "OriginationIdentityArn")+ Prelude.<*> (x Data..: "OriginationIdentity")+ Prelude.<*> (x Data..: "IsoCountryCode")+ Prelude.<*> (x Data..: "NumberCapabilities")+ )++instance Prelude.Hashable OriginationIdentityMetadata where+ hashWithSalt _salt OriginationIdentityMetadata' {..} =+ _salt+ `Prelude.hashWithSalt` originationIdentityArn+ `Prelude.hashWithSalt` originationIdentity+ `Prelude.hashWithSalt` isoCountryCode+ `Prelude.hashWithSalt` numberCapabilities++instance Prelude.NFData OriginationIdentityMetadata where+ rnf OriginationIdentityMetadata' {..} =+ Prelude.rnf originationIdentityArn+ `Prelude.seq` Prelude.rnf originationIdentity+ `Prelude.seq` Prelude.rnf isoCountryCode+ `Prelude.seq` Prelude.rnf numberCapabilities
+ gen/Amazonka/PinpointSmsVoiceV2/Types/PhoneNumberFilter.hs view
@@ -0,0 +1,87 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberFilter+-- 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.PinpointSmsVoiceV2.Types.PhoneNumberFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.PhoneNumberFilterName+import qualified Amazonka.Prelude as Prelude++-- | The information for a phone number that meets a specified criteria.+--+-- /See:/ 'newPhoneNumberFilter' smart constructor.+data PhoneNumberFilter = PhoneNumberFilter'+ { -- | The name of the attribute to filter on.+ name :: PhoneNumberFilterName,+ -- | An array values to filter for.+ values :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PhoneNumberFilter' 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', 'phoneNumberFilter_name' - The name of the attribute to filter on.+--+-- 'values', 'phoneNumberFilter_values' - An array values to filter for.+newPhoneNumberFilter ::+ -- | 'name'+ PhoneNumberFilterName ->+ -- | 'values'+ Prelude.NonEmpty Prelude.Text ->+ PhoneNumberFilter+newPhoneNumberFilter pName_ pValues_ =+ PhoneNumberFilter'+ { name = pName_,+ values = Lens.coerced Lens.# pValues_+ }++-- | The name of the attribute to filter on.+phoneNumberFilter_name :: Lens.Lens' PhoneNumberFilter PhoneNumberFilterName+phoneNumberFilter_name = Lens.lens (\PhoneNumberFilter' {name} -> name) (\s@PhoneNumberFilter' {} a -> s {name = a} :: PhoneNumberFilter)++-- | An array values to filter for.+phoneNumberFilter_values :: Lens.Lens' PhoneNumberFilter (Prelude.NonEmpty Prelude.Text)+phoneNumberFilter_values = Lens.lens (\PhoneNumberFilter' {values} -> values) (\s@PhoneNumberFilter' {} a -> s {values = a} :: PhoneNumberFilter) Prelude.. Lens.coerced++instance Prelude.Hashable PhoneNumberFilter where+ hashWithSalt _salt PhoneNumberFilter' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` values++instance Prelude.NFData PhoneNumberFilter where+ rnf PhoneNumberFilter' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON PhoneNumberFilter where+ toJSON PhoneNumberFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Name" Data..= name),+ Prelude.Just ("Values" Data..= values)+ ]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/PhoneNumberFilterName.hs view
@@ -0,0 +1,106 @@+{-# 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.PinpointSmsVoiceV2.Types.PhoneNumberFilterName+-- 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.PinpointSmsVoiceV2.Types.PhoneNumberFilterName+ ( PhoneNumberFilterName+ ( ..,+ PhoneNumberFilterName_Deletion_protection_enabled,+ PhoneNumberFilterName_Iso_country_code,+ PhoneNumberFilterName_Message_type,+ PhoneNumberFilterName_Number_capability,+ PhoneNumberFilterName_Number_type,+ PhoneNumberFilterName_Opt_out_list_name,+ PhoneNumberFilterName_Self_managed_opt_outs_enabled,+ PhoneNumberFilterName_Status,+ PhoneNumberFilterName_Two_way_enabled+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PhoneNumberFilterName = PhoneNumberFilterName'+ { fromPhoneNumberFilterName ::+ 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 PhoneNumberFilterName_Deletion_protection_enabled :: PhoneNumberFilterName+pattern PhoneNumberFilterName_Deletion_protection_enabled = PhoneNumberFilterName' "deletion-protection-enabled"++pattern PhoneNumberFilterName_Iso_country_code :: PhoneNumberFilterName+pattern PhoneNumberFilterName_Iso_country_code = PhoneNumberFilterName' "iso-country-code"++pattern PhoneNumberFilterName_Message_type :: PhoneNumberFilterName+pattern PhoneNumberFilterName_Message_type = PhoneNumberFilterName' "message-type"++pattern PhoneNumberFilterName_Number_capability :: PhoneNumberFilterName+pattern PhoneNumberFilterName_Number_capability = PhoneNumberFilterName' "number-capability"++pattern PhoneNumberFilterName_Number_type :: PhoneNumberFilterName+pattern PhoneNumberFilterName_Number_type = PhoneNumberFilterName' "number-type"++pattern PhoneNumberFilterName_Opt_out_list_name :: PhoneNumberFilterName+pattern PhoneNumberFilterName_Opt_out_list_name = PhoneNumberFilterName' "opt-out-list-name"++pattern PhoneNumberFilterName_Self_managed_opt_outs_enabled :: PhoneNumberFilterName+pattern PhoneNumberFilterName_Self_managed_opt_outs_enabled = PhoneNumberFilterName' "self-managed-opt-outs-enabled"++pattern PhoneNumberFilterName_Status :: PhoneNumberFilterName+pattern PhoneNumberFilterName_Status = PhoneNumberFilterName' "status"++pattern PhoneNumberFilterName_Two_way_enabled :: PhoneNumberFilterName+pattern PhoneNumberFilterName_Two_way_enabled = PhoneNumberFilterName' "two-way-enabled"++{-# COMPLETE+ PhoneNumberFilterName_Deletion_protection_enabled,+ PhoneNumberFilterName_Iso_country_code,+ PhoneNumberFilterName_Message_type,+ PhoneNumberFilterName_Number_capability,+ PhoneNumberFilterName_Number_type,+ PhoneNumberFilterName_Opt_out_list_name,+ PhoneNumberFilterName_Self_managed_opt_outs_enabled,+ PhoneNumberFilterName_Status,+ PhoneNumberFilterName_Two_way_enabled,+ PhoneNumberFilterName'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/PhoneNumberInformation.hs view
@@ -0,0 +1,339 @@+{-# 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.PinpointSmsVoiceV2.Types.PhoneNumberInformation+-- 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.PinpointSmsVoiceV2.Types.PhoneNumberInformation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.MessageType+import Amazonka.PinpointSmsVoiceV2.Types.NumberCapability+import Amazonka.PinpointSmsVoiceV2.Types.NumberStatus+import Amazonka.PinpointSmsVoiceV2.Types.NumberType+import qualified Amazonka.Prelude as Prelude++-- | The information for a phone number in an Amazon Web Services account.+--+-- /See:/ 'newPhoneNumberInformation' smart constructor.+data PhoneNumberInformation = PhoneNumberInformation'+ { -- | The unique identifier for the phone number.+ phoneNumberId :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier of the pool associated with the phone number.+ poolId :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the two way channel.+ twoWayChannelArn :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) associated with the phone number.+ phoneNumberArn :: Prelude.Text,+ -- | The phone number in E.164 format.+ phoneNumber :: Prelude.Text,+ -- | The current status of the phone number.+ status :: NumberStatus,+ -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+ -- region.+ isoCountryCode :: Prelude.Text,+ -- | The type of message. Valid values are TRANSACTIONAL for messages that+ -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+ -- critical or time-sensitive.+ messageType :: MessageType,+ -- | Describes if the origination identity can be used for text messages,+ -- voice calls or both.+ numberCapabilities :: Prelude.NonEmpty NumberCapability,+ -- | The type of phone number.+ numberType :: NumberType,+ -- | The price, in US dollars, to lease the phone number.+ monthlyLeasingPrice :: Prelude.Text,+ -- | By default this is set to false. When set to true you can receive+ -- incoming text messages from your end recipients using the+ -- TwoWayChannelArn.+ twoWayEnabled :: Prelude.Bool,+ -- | When set to false an end recipient sends a message that begins with HELP+ -- or STOP to one of your dedicated numbers, Amazon Pinpoint automatically+ -- replies with a customizable message and adds the end recipient to the+ -- OptOutList. When set to true you\'re responsible for responding to HELP+ -- and STOP requests. You\'re also responsible for tracking and honoring+ -- opt-out request. For more information see+ -- <https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-managing.html#settings-account-sms-self-managed-opt-out Self-managed opt-outs>+ selfManagedOptOutsEnabled :: Prelude.Bool,+ -- | The name of the OptOutList associated with the phone number.+ optOutListName :: Prelude.Text,+ -- | When set to true the phone number can\'t be deleted.+ deletionProtectionEnabled :: Prelude.Bool,+ -- | The time when the phone number was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PhoneNumberInformation' 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:+--+-- 'phoneNumberId', 'phoneNumberInformation_phoneNumberId' - The unique identifier for the phone number.+--+-- 'poolId', 'phoneNumberInformation_poolId' - The unique identifier of the pool associated with the phone number.+--+-- 'twoWayChannelArn', 'phoneNumberInformation_twoWayChannelArn' - The Amazon Resource Name (ARN) of the two way channel.+--+-- 'phoneNumberArn', 'phoneNumberInformation_phoneNumberArn' - The Amazon Resource Name (ARN) associated with the phone number.+--+-- 'phoneNumber', 'phoneNumberInformation_phoneNumber' - The phone number in E.164 format.+--+-- 'status', 'phoneNumberInformation_status' - The current status of the phone number.+--+-- 'isoCountryCode', 'phoneNumberInformation_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+--+-- 'messageType', 'phoneNumberInformation_messageType' - The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+--+-- 'numberCapabilities', 'phoneNumberInformation_numberCapabilities' - Describes if the origination identity can be used for text messages,+-- voice calls or both.+--+-- 'numberType', 'phoneNumberInformation_numberType' - The type of phone number.+--+-- 'monthlyLeasingPrice', 'phoneNumberInformation_monthlyLeasingPrice' - The price, in US dollars, to lease the phone number.+--+-- 'twoWayEnabled', 'phoneNumberInformation_twoWayEnabled' - By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients using the+-- TwoWayChannelArn.+--+-- 'selfManagedOptOutsEnabled', 'phoneNumberInformation_selfManagedOptOutsEnabled' - When set to false an end recipient sends a message that begins with HELP+-- or STOP to one of your dedicated numbers, Amazon Pinpoint automatically+-- replies with a customizable message and adds the end recipient to the+-- OptOutList. When set to true you\'re responsible for responding to HELP+-- and STOP requests. You\'re also responsible for tracking and honoring+-- opt-out request. For more information see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-managing.html#settings-account-sms-self-managed-opt-out Self-managed opt-outs>+--+-- 'optOutListName', 'phoneNumberInformation_optOutListName' - The name of the OptOutList associated with the phone number.+--+-- 'deletionProtectionEnabled', 'phoneNumberInformation_deletionProtectionEnabled' - When set to true the phone number can\'t be deleted.+--+-- 'createdTimestamp', 'phoneNumberInformation_createdTimestamp' - The time when the phone number was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+newPhoneNumberInformation ::+ -- | 'phoneNumberArn'+ Prelude.Text ->+ -- | 'phoneNumber'+ Prelude.Text ->+ -- | 'status'+ NumberStatus ->+ -- | 'isoCountryCode'+ Prelude.Text ->+ -- | 'messageType'+ MessageType ->+ -- | 'numberCapabilities'+ Prelude.NonEmpty NumberCapability ->+ -- | 'numberType'+ NumberType ->+ -- | 'monthlyLeasingPrice'+ Prelude.Text ->+ -- | 'twoWayEnabled'+ Prelude.Bool ->+ -- | 'selfManagedOptOutsEnabled'+ Prelude.Bool ->+ -- | 'optOutListName'+ Prelude.Text ->+ -- | 'deletionProtectionEnabled'+ Prelude.Bool ->+ -- | 'createdTimestamp'+ Prelude.UTCTime ->+ PhoneNumberInformation+newPhoneNumberInformation+ pPhoneNumberArn_+ pPhoneNumber_+ pStatus_+ pIsoCountryCode_+ pMessageType_+ pNumberCapabilities_+ pNumberType_+ pMonthlyLeasingPrice_+ pTwoWayEnabled_+ pSelfManagedOptOutsEnabled_+ pOptOutListName_+ pDeletionProtectionEnabled_+ pCreatedTimestamp_ =+ PhoneNumberInformation'+ { phoneNumberId =+ Prelude.Nothing,+ poolId = Prelude.Nothing,+ twoWayChannelArn = Prelude.Nothing,+ phoneNumberArn = pPhoneNumberArn_,+ phoneNumber = pPhoneNumber_,+ status = pStatus_,+ isoCountryCode = pIsoCountryCode_,+ messageType = pMessageType_,+ numberCapabilities =+ Lens.coerced Lens.# pNumberCapabilities_,+ numberType = pNumberType_,+ monthlyLeasingPrice = pMonthlyLeasingPrice_,+ twoWayEnabled = pTwoWayEnabled_,+ selfManagedOptOutsEnabled =+ pSelfManagedOptOutsEnabled_,+ optOutListName = pOptOutListName_,+ deletionProtectionEnabled =+ pDeletionProtectionEnabled_,+ createdTimestamp =+ Data._Time Lens.# pCreatedTimestamp_+ }++-- | The unique identifier for the phone number.+phoneNumberInformation_phoneNumberId :: Lens.Lens' PhoneNumberInformation (Prelude.Maybe Prelude.Text)+phoneNumberInformation_phoneNumberId = Lens.lens (\PhoneNumberInformation' {phoneNumberId} -> phoneNumberId) (\s@PhoneNumberInformation' {} a -> s {phoneNumberId = a} :: PhoneNumberInformation)++-- | The unique identifier of the pool associated with the phone number.+phoneNumberInformation_poolId :: Lens.Lens' PhoneNumberInformation (Prelude.Maybe Prelude.Text)+phoneNumberInformation_poolId = Lens.lens (\PhoneNumberInformation' {poolId} -> poolId) (\s@PhoneNumberInformation' {} a -> s {poolId = a} :: PhoneNumberInformation)++-- | The Amazon Resource Name (ARN) of the two way channel.+phoneNumberInformation_twoWayChannelArn :: Lens.Lens' PhoneNumberInformation (Prelude.Maybe Prelude.Text)+phoneNumberInformation_twoWayChannelArn = Lens.lens (\PhoneNumberInformation' {twoWayChannelArn} -> twoWayChannelArn) (\s@PhoneNumberInformation' {} a -> s {twoWayChannelArn = a} :: PhoneNumberInformation)++-- | The Amazon Resource Name (ARN) associated with the phone number.+phoneNumberInformation_phoneNumberArn :: Lens.Lens' PhoneNumberInformation Prelude.Text+phoneNumberInformation_phoneNumberArn = Lens.lens (\PhoneNumberInformation' {phoneNumberArn} -> phoneNumberArn) (\s@PhoneNumberInformation' {} a -> s {phoneNumberArn = a} :: PhoneNumberInformation)++-- | The phone number in E.164 format.+phoneNumberInformation_phoneNumber :: Lens.Lens' PhoneNumberInformation Prelude.Text+phoneNumberInformation_phoneNumber = Lens.lens (\PhoneNumberInformation' {phoneNumber} -> phoneNumber) (\s@PhoneNumberInformation' {} a -> s {phoneNumber = a} :: PhoneNumberInformation)++-- | The current status of the phone number.+phoneNumberInformation_status :: Lens.Lens' PhoneNumberInformation NumberStatus+phoneNumberInformation_status = Lens.lens (\PhoneNumberInformation' {status} -> status) (\s@PhoneNumberInformation' {} a -> s {status = a} :: PhoneNumberInformation)++-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+phoneNumberInformation_isoCountryCode :: Lens.Lens' PhoneNumberInformation Prelude.Text+phoneNumberInformation_isoCountryCode = Lens.lens (\PhoneNumberInformation' {isoCountryCode} -> isoCountryCode) (\s@PhoneNumberInformation' {} a -> s {isoCountryCode = a} :: PhoneNumberInformation)++-- | The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+phoneNumberInformation_messageType :: Lens.Lens' PhoneNumberInformation MessageType+phoneNumberInformation_messageType = Lens.lens (\PhoneNumberInformation' {messageType} -> messageType) (\s@PhoneNumberInformation' {} a -> s {messageType = a} :: PhoneNumberInformation)++-- | Describes if the origination identity can be used for text messages,+-- voice calls or both.+phoneNumberInformation_numberCapabilities :: Lens.Lens' PhoneNumberInformation (Prelude.NonEmpty NumberCapability)+phoneNumberInformation_numberCapabilities = Lens.lens (\PhoneNumberInformation' {numberCapabilities} -> numberCapabilities) (\s@PhoneNumberInformation' {} a -> s {numberCapabilities = a} :: PhoneNumberInformation) Prelude.. Lens.coerced++-- | The type of phone number.+phoneNumberInformation_numberType :: Lens.Lens' PhoneNumberInformation NumberType+phoneNumberInformation_numberType = Lens.lens (\PhoneNumberInformation' {numberType} -> numberType) (\s@PhoneNumberInformation' {} a -> s {numberType = a} :: PhoneNumberInformation)++-- | The price, in US dollars, to lease the phone number.+phoneNumberInformation_monthlyLeasingPrice :: Lens.Lens' PhoneNumberInformation Prelude.Text+phoneNumberInformation_monthlyLeasingPrice = Lens.lens (\PhoneNumberInformation' {monthlyLeasingPrice} -> monthlyLeasingPrice) (\s@PhoneNumberInformation' {} a -> s {monthlyLeasingPrice = a} :: PhoneNumberInformation)++-- | By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients using the+-- TwoWayChannelArn.+phoneNumberInformation_twoWayEnabled :: Lens.Lens' PhoneNumberInformation Prelude.Bool+phoneNumberInformation_twoWayEnabled = Lens.lens (\PhoneNumberInformation' {twoWayEnabled} -> twoWayEnabled) (\s@PhoneNumberInformation' {} a -> s {twoWayEnabled = a} :: PhoneNumberInformation)++-- | When set to false an end recipient sends a message that begins with HELP+-- or STOP to one of your dedicated numbers, Amazon Pinpoint automatically+-- replies with a customizable message and adds the end recipient to the+-- OptOutList. When set to true you\'re responsible for responding to HELP+-- and STOP requests. You\'re also responsible for tracking and honoring+-- opt-out request. For more information see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-managing.html#settings-account-sms-self-managed-opt-out Self-managed opt-outs>+phoneNumberInformation_selfManagedOptOutsEnabled :: Lens.Lens' PhoneNumberInformation Prelude.Bool+phoneNumberInformation_selfManagedOptOutsEnabled = Lens.lens (\PhoneNumberInformation' {selfManagedOptOutsEnabled} -> selfManagedOptOutsEnabled) (\s@PhoneNumberInformation' {} a -> s {selfManagedOptOutsEnabled = a} :: PhoneNumberInformation)++-- | The name of the OptOutList associated with the phone number.+phoneNumberInformation_optOutListName :: Lens.Lens' PhoneNumberInformation Prelude.Text+phoneNumberInformation_optOutListName = Lens.lens (\PhoneNumberInformation' {optOutListName} -> optOutListName) (\s@PhoneNumberInformation' {} a -> s {optOutListName = a} :: PhoneNumberInformation)++-- | When set to true the phone number can\'t be deleted.+phoneNumberInformation_deletionProtectionEnabled :: Lens.Lens' PhoneNumberInformation Prelude.Bool+phoneNumberInformation_deletionProtectionEnabled = Lens.lens (\PhoneNumberInformation' {deletionProtectionEnabled} -> deletionProtectionEnabled) (\s@PhoneNumberInformation' {} a -> s {deletionProtectionEnabled = a} :: PhoneNumberInformation)++-- | The time when the phone number was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+phoneNumberInformation_createdTimestamp :: Lens.Lens' PhoneNumberInformation Prelude.UTCTime+phoneNumberInformation_createdTimestamp = Lens.lens (\PhoneNumberInformation' {createdTimestamp} -> createdTimestamp) (\s@PhoneNumberInformation' {} a -> s {createdTimestamp = a} :: PhoneNumberInformation) Prelude.. Data._Time++instance Data.FromJSON PhoneNumberInformation where+ parseJSON =+ Data.withObject+ "PhoneNumberInformation"+ ( \x ->+ PhoneNumberInformation'+ Prelude.<$> (x Data..:? "PhoneNumberId")+ Prelude.<*> (x Data..:? "PoolId")+ Prelude.<*> (x Data..:? "TwoWayChannelArn")+ Prelude.<*> (x Data..: "PhoneNumberArn")+ Prelude.<*> (x Data..: "PhoneNumber")+ Prelude.<*> (x Data..: "Status")+ Prelude.<*> (x Data..: "IsoCountryCode")+ Prelude.<*> (x Data..: "MessageType")+ Prelude.<*> (x Data..: "NumberCapabilities")+ Prelude.<*> (x Data..: "NumberType")+ Prelude.<*> (x Data..: "MonthlyLeasingPrice")+ Prelude.<*> (x Data..: "TwoWayEnabled")+ Prelude.<*> (x Data..: "SelfManagedOptOutsEnabled")+ Prelude.<*> (x Data..: "OptOutListName")+ Prelude.<*> (x Data..: "DeletionProtectionEnabled")+ Prelude.<*> (x Data..: "CreatedTimestamp")+ )++instance Prelude.Hashable PhoneNumberInformation where+ hashWithSalt _salt PhoneNumberInformation' {..} =+ _salt+ `Prelude.hashWithSalt` phoneNumberId+ `Prelude.hashWithSalt` poolId+ `Prelude.hashWithSalt` twoWayChannelArn+ `Prelude.hashWithSalt` phoneNumberArn+ `Prelude.hashWithSalt` phoneNumber+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` isoCountryCode+ `Prelude.hashWithSalt` messageType+ `Prelude.hashWithSalt` numberCapabilities+ `Prelude.hashWithSalt` numberType+ `Prelude.hashWithSalt` monthlyLeasingPrice+ `Prelude.hashWithSalt` twoWayEnabled+ `Prelude.hashWithSalt` selfManagedOptOutsEnabled+ `Prelude.hashWithSalt` optOutListName+ `Prelude.hashWithSalt` deletionProtectionEnabled+ `Prelude.hashWithSalt` createdTimestamp++instance Prelude.NFData PhoneNumberInformation where+ rnf PhoneNumberInformation' {..} =+ Prelude.rnf phoneNumberId+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf twoWayChannelArn+ `Prelude.seq` Prelude.rnf phoneNumberArn+ `Prelude.seq` Prelude.rnf phoneNumber+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf isoCountryCode+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf numberCapabilities+ `Prelude.seq` Prelude.rnf numberType+ `Prelude.seq` Prelude.rnf monthlyLeasingPrice+ `Prelude.seq` Prelude.rnf twoWayEnabled+ `Prelude.seq` Prelude.rnf selfManagedOptOutsEnabled+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf deletionProtectionEnabled+ `Prelude.seq` Prelude.rnf createdTimestamp
+ gen/Amazonka/PinpointSmsVoiceV2/Types/PoolFilter.hs view
@@ -0,0 +1,87 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.PoolFilter+-- 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.PinpointSmsVoiceV2.Types.PoolFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.PoolFilterName+import qualified Amazonka.Prelude as Prelude++-- | The information for a pool that meets a specified criteria.+--+-- /See:/ 'newPoolFilter' smart constructor.+data PoolFilter = PoolFilter'+ { -- | The name of the attribute to filter on.+ name :: PoolFilterName,+ -- | An array values to filter for.+ values :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PoolFilter' 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', 'poolFilter_name' - The name of the attribute to filter on.+--+-- 'values', 'poolFilter_values' - An array values to filter for.+newPoolFilter ::+ -- | 'name'+ PoolFilterName ->+ -- | 'values'+ Prelude.NonEmpty Prelude.Text ->+ PoolFilter+newPoolFilter pName_ pValues_ =+ PoolFilter'+ { name = pName_,+ values = Lens.coerced Lens.# pValues_+ }++-- | The name of the attribute to filter on.+poolFilter_name :: Lens.Lens' PoolFilter PoolFilterName+poolFilter_name = Lens.lens (\PoolFilter' {name} -> name) (\s@PoolFilter' {} a -> s {name = a} :: PoolFilter)++-- | An array values to filter for.+poolFilter_values :: Lens.Lens' PoolFilter (Prelude.NonEmpty Prelude.Text)+poolFilter_values = Lens.lens (\PoolFilter' {values} -> values) (\s@PoolFilter' {} a -> s {values = a} :: PoolFilter) Prelude.. Lens.coerced++instance Prelude.Hashable PoolFilter where+ hashWithSalt _salt PoolFilter' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` values++instance Prelude.NFData PoolFilter where+ rnf PoolFilter' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON PoolFilter where+ toJSON PoolFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Name" Data..= name),+ Prelude.Just ("Values" Data..= values)+ ]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/PoolFilterName.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.PinpointSmsVoiceV2.Types.PoolFilterName+-- 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.PinpointSmsVoiceV2.Types.PoolFilterName+ ( PoolFilterName+ ( ..,+ PoolFilterName_Deletion_protection_enabled,+ PoolFilterName_Message_type,+ PoolFilterName_Opt_out_list_name,+ PoolFilterName_Self_managed_opt_outs_enabled,+ PoolFilterName_Shared_routes_enabled,+ PoolFilterName_Status,+ PoolFilterName_Two_way_enabled+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PoolFilterName = PoolFilterName'+ { fromPoolFilterName ::+ 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 PoolFilterName_Deletion_protection_enabled :: PoolFilterName+pattern PoolFilterName_Deletion_protection_enabled = PoolFilterName' "deletion-protection-enabled"++pattern PoolFilterName_Message_type :: PoolFilterName+pattern PoolFilterName_Message_type = PoolFilterName' "message-type"++pattern PoolFilterName_Opt_out_list_name :: PoolFilterName+pattern PoolFilterName_Opt_out_list_name = PoolFilterName' "opt-out-list-name"++pattern PoolFilterName_Self_managed_opt_outs_enabled :: PoolFilterName+pattern PoolFilterName_Self_managed_opt_outs_enabled = PoolFilterName' "self-managed-opt-outs-enabled"++pattern PoolFilterName_Shared_routes_enabled :: PoolFilterName+pattern PoolFilterName_Shared_routes_enabled = PoolFilterName' "shared-routes-enabled"++pattern PoolFilterName_Status :: PoolFilterName+pattern PoolFilterName_Status = PoolFilterName' "status"++pattern PoolFilterName_Two_way_enabled :: PoolFilterName+pattern PoolFilterName_Two_way_enabled = PoolFilterName' "two-way-enabled"++{-# COMPLETE+ PoolFilterName_Deletion_protection_enabled,+ PoolFilterName_Message_type,+ PoolFilterName_Opt_out_list_name,+ PoolFilterName_Self_managed_opt_outs_enabled,+ PoolFilterName_Shared_routes_enabled,+ PoolFilterName_Status,+ PoolFilterName_Two_way_enabled,+ PoolFilterName'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/PoolInformation.hs view
@@ -0,0 +1,276 @@+{-# 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.PinpointSmsVoiceV2.Types.PoolInformation+-- 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.PinpointSmsVoiceV2.Types.PoolInformation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.MessageType+import Amazonka.PinpointSmsVoiceV2.Types.PoolStatus+import qualified Amazonka.Prelude as Prelude++-- | The information for a pool in an Amazon Web Services account.+--+-- /See:/ 'newPoolInformation' smart constructor.+data PoolInformation = PoolInformation'+ { -- | The Amazon Resource Name (ARN) of the two way channel.+ twoWayChannelArn :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) for the pool.+ poolArn :: Prelude.Text,+ -- | The unique identifier for the pool.+ poolId :: Prelude.Text,+ -- | The current status of the pool.+ status :: PoolStatus,+ -- | The type of message. Valid values are TRANSACTIONAL for messages that+ -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+ -- critical or time-sensitive.+ messageType :: MessageType,+ -- | When set to true you can receive incoming text messages from your end+ -- recipients using the TwoWayChannelArn.+ twoWayEnabled :: Prelude.Bool,+ -- | When set to false, an end recipient sends a message that begins with+ -- HELP or STOP to one of your dedicated numbers, Amazon Pinpoint+ -- automatically replies with a customizable message and adds the end+ -- recipient to the OptOutList. When set to true you\'re responsible for+ -- responding to HELP and STOP requests. You\'re also responsible for+ -- tracking and honoring opt-out requests. For more information see+ -- <https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-managing.html#settings-account-sms-self-managed-opt-out Self-managed opt-outs>+ selfManagedOptOutsEnabled :: Prelude.Bool,+ -- | The name of the OptOutList associated with the pool.+ optOutListName :: Prelude.Text,+ -- | Allows you to enable shared routes on your pool.+ --+ -- By default, this is set to @False@. If you set this value to @True@,+ -- your messages are sent using phone numbers or sender IDs (depending on+ -- the country) that are shared with other Amazon Pinpoint users. In some+ -- countries, such as the United States, senders aren\'t allowed to use+ -- shared routes and must use a dedicated phone number or short code.+ sharedRoutesEnabled :: Prelude.Bool,+ -- | When set to true the pool can\'t be deleted.+ deletionProtectionEnabled :: Prelude.Bool,+ -- | The time when the pool was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PoolInformation' 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:+--+-- 'twoWayChannelArn', 'poolInformation_twoWayChannelArn' - The Amazon Resource Name (ARN) of the two way channel.+--+-- 'poolArn', 'poolInformation_poolArn' - The Amazon Resource Name (ARN) for the pool.+--+-- 'poolId', 'poolInformation_poolId' - The unique identifier for the pool.+--+-- 'status', 'poolInformation_status' - The current status of the pool.+--+-- 'messageType', 'poolInformation_messageType' - The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+--+-- 'twoWayEnabled', 'poolInformation_twoWayEnabled' - When set to true you can receive incoming text messages from your end+-- recipients using the TwoWayChannelArn.+--+-- 'selfManagedOptOutsEnabled', 'poolInformation_selfManagedOptOutsEnabled' - When set to false, an end recipient sends a message that begins with+-- HELP or STOP to one of your dedicated numbers, Amazon Pinpoint+-- automatically replies with a customizable message and adds the end+-- recipient to the OptOutList. When set to true you\'re responsible for+-- responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests. For more information see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-managing.html#settings-account-sms-self-managed-opt-out Self-managed opt-outs>+--+-- 'optOutListName', 'poolInformation_optOutListName' - The name of the OptOutList associated with the pool.+--+-- 'sharedRoutesEnabled', 'poolInformation_sharedRoutesEnabled' - Allows you to enable shared routes on your pool.+--+-- By default, this is set to @False@. If you set this value to @True@,+-- your messages are sent using phone numbers or sender IDs (depending on+-- the country) that are shared with other Amazon Pinpoint users. In some+-- countries, such as the United States, senders aren\'t allowed to use+-- shared routes and must use a dedicated phone number or short code.+--+-- 'deletionProtectionEnabled', 'poolInformation_deletionProtectionEnabled' - When set to true the pool can\'t be deleted.+--+-- 'createdTimestamp', 'poolInformation_createdTimestamp' - The time when the pool was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+newPoolInformation ::+ -- | 'poolArn'+ Prelude.Text ->+ -- | 'poolId'+ Prelude.Text ->+ -- | 'status'+ PoolStatus ->+ -- | 'messageType'+ MessageType ->+ -- | 'twoWayEnabled'+ Prelude.Bool ->+ -- | 'selfManagedOptOutsEnabled'+ Prelude.Bool ->+ -- | 'optOutListName'+ Prelude.Text ->+ -- | 'sharedRoutesEnabled'+ Prelude.Bool ->+ -- | 'deletionProtectionEnabled'+ Prelude.Bool ->+ -- | 'createdTimestamp'+ Prelude.UTCTime ->+ PoolInformation+newPoolInformation+ pPoolArn_+ pPoolId_+ pStatus_+ pMessageType_+ pTwoWayEnabled_+ pSelfManagedOptOutsEnabled_+ pOptOutListName_+ pSharedRoutesEnabled_+ pDeletionProtectionEnabled_+ pCreatedTimestamp_ =+ PoolInformation'+ { twoWayChannelArn =+ Prelude.Nothing,+ poolArn = pPoolArn_,+ poolId = pPoolId_,+ status = pStatus_,+ messageType = pMessageType_,+ twoWayEnabled = pTwoWayEnabled_,+ selfManagedOptOutsEnabled =+ pSelfManagedOptOutsEnabled_,+ optOutListName = pOptOutListName_,+ sharedRoutesEnabled = pSharedRoutesEnabled_,+ deletionProtectionEnabled =+ pDeletionProtectionEnabled_,+ createdTimestamp =+ Data._Time Lens.# pCreatedTimestamp_+ }++-- | The Amazon Resource Name (ARN) of the two way channel.+poolInformation_twoWayChannelArn :: Lens.Lens' PoolInformation (Prelude.Maybe Prelude.Text)+poolInformation_twoWayChannelArn = Lens.lens (\PoolInformation' {twoWayChannelArn} -> twoWayChannelArn) (\s@PoolInformation' {} a -> s {twoWayChannelArn = a} :: PoolInformation)++-- | The Amazon Resource Name (ARN) for the pool.+poolInformation_poolArn :: Lens.Lens' PoolInformation Prelude.Text+poolInformation_poolArn = Lens.lens (\PoolInformation' {poolArn} -> poolArn) (\s@PoolInformation' {} a -> s {poolArn = a} :: PoolInformation)++-- | The unique identifier for the pool.+poolInformation_poolId :: Lens.Lens' PoolInformation Prelude.Text+poolInformation_poolId = Lens.lens (\PoolInformation' {poolId} -> poolId) (\s@PoolInformation' {} a -> s {poolId = a} :: PoolInformation)++-- | The current status of the pool.+poolInformation_status :: Lens.Lens' PoolInformation PoolStatus+poolInformation_status = Lens.lens (\PoolInformation' {status} -> status) (\s@PoolInformation' {} a -> s {status = a} :: PoolInformation)++-- | The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+poolInformation_messageType :: Lens.Lens' PoolInformation MessageType+poolInformation_messageType = Lens.lens (\PoolInformation' {messageType} -> messageType) (\s@PoolInformation' {} a -> s {messageType = a} :: PoolInformation)++-- | When set to true you can receive incoming text messages from your end+-- recipients using the TwoWayChannelArn.+poolInformation_twoWayEnabled :: Lens.Lens' PoolInformation Prelude.Bool+poolInformation_twoWayEnabled = Lens.lens (\PoolInformation' {twoWayEnabled} -> twoWayEnabled) (\s@PoolInformation' {} a -> s {twoWayEnabled = a} :: PoolInformation)++-- | When set to false, an end recipient sends a message that begins with+-- HELP or STOP to one of your dedicated numbers, Amazon Pinpoint+-- automatically replies with a customizable message and adds the end+-- recipient to the OptOutList. When set to true you\'re responsible for+-- responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests. For more information see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-managing.html#settings-account-sms-self-managed-opt-out Self-managed opt-outs>+poolInformation_selfManagedOptOutsEnabled :: Lens.Lens' PoolInformation Prelude.Bool+poolInformation_selfManagedOptOutsEnabled = Lens.lens (\PoolInformation' {selfManagedOptOutsEnabled} -> selfManagedOptOutsEnabled) (\s@PoolInformation' {} a -> s {selfManagedOptOutsEnabled = a} :: PoolInformation)++-- | The name of the OptOutList associated with the pool.+poolInformation_optOutListName :: Lens.Lens' PoolInformation Prelude.Text+poolInformation_optOutListName = Lens.lens (\PoolInformation' {optOutListName} -> optOutListName) (\s@PoolInformation' {} a -> s {optOutListName = a} :: PoolInformation)++-- | Allows you to enable shared routes on your pool.+--+-- By default, this is set to @False@. If you set this value to @True@,+-- your messages are sent using phone numbers or sender IDs (depending on+-- the country) that are shared with other Amazon Pinpoint users. In some+-- countries, such as the United States, senders aren\'t allowed to use+-- shared routes and must use a dedicated phone number or short code.+poolInformation_sharedRoutesEnabled :: Lens.Lens' PoolInformation Prelude.Bool+poolInformation_sharedRoutesEnabled = Lens.lens (\PoolInformation' {sharedRoutesEnabled} -> sharedRoutesEnabled) (\s@PoolInformation' {} a -> s {sharedRoutesEnabled = a} :: PoolInformation)++-- | When set to true the pool can\'t be deleted.+poolInformation_deletionProtectionEnabled :: Lens.Lens' PoolInformation Prelude.Bool+poolInformation_deletionProtectionEnabled = Lens.lens (\PoolInformation' {deletionProtectionEnabled} -> deletionProtectionEnabled) (\s@PoolInformation' {} a -> s {deletionProtectionEnabled = a} :: PoolInformation)++-- | The time when the pool was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+poolInformation_createdTimestamp :: Lens.Lens' PoolInformation Prelude.UTCTime+poolInformation_createdTimestamp = Lens.lens (\PoolInformation' {createdTimestamp} -> createdTimestamp) (\s@PoolInformation' {} a -> s {createdTimestamp = a} :: PoolInformation) Prelude.. Data._Time++instance Data.FromJSON PoolInformation where+ parseJSON =+ Data.withObject+ "PoolInformation"+ ( \x ->+ PoolInformation'+ Prelude.<$> (x Data..:? "TwoWayChannelArn")+ Prelude.<*> (x Data..: "PoolArn")+ Prelude.<*> (x Data..: "PoolId")+ Prelude.<*> (x Data..: "Status")+ Prelude.<*> (x Data..: "MessageType")+ Prelude.<*> (x Data..: "TwoWayEnabled")+ Prelude.<*> (x Data..: "SelfManagedOptOutsEnabled")+ Prelude.<*> (x Data..: "OptOutListName")+ Prelude.<*> (x Data..: "SharedRoutesEnabled")+ Prelude.<*> (x Data..: "DeletionProtectionEnabled")+ Prelude.<*> (x Data..: "CreatedTimestamp")+ )++instance Prelude.Hashable PoolInformation where+ hashWithSalt _salt PoolInformation' {..} =+ _salt+ `Prelude.hashWithSalt` twoWayChannelArn+ `Prelude.hashWithSalt` poolArn+ `Prelude.hashWithSalt` poolId+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` messageType+ `Prelude.hashWithSalt` twoWayEnabled+ `Prelude.hashWithSalt` selfManagedOptOutsEnabled+ `Prelude.hashWithSalt` optOutListName+ `Prelude.hashWithSalt` sharedRoutesEnabled+ `Prelude.hashWithSalt` deletionProtectionEnabled+ `Prelude.hashWithSalt` createdTimestamp++instance Prelude.NFData PoolInformation where+ rnf PoolInformation' {..} =+ Prelude.rnf twoWayChannelArn+ `Prelude.seq` Prelude.rnf poolArn+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf twoWayEnabled+ `Prelude.seq` Prelude.rnf selfManagedOptOutsEnabled+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf sharedRoutesEnabled+ `Prelude.seq` Prelude.rnf deletionProtectionEnabled+ `Prelude.seq` Prelude.rnf createdTimestamp
+ gen/Amazonka/PinpointSmsVoiceV2/Types/PoolOriginationIdentitiesFilter.hs view
@@ -0,0 +1,96 @@+{-# 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.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilter+-- 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.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilterName+import qualified Amazonka.Prelude as Prelude++-- | Information about origination identities associated with a pool that+-- meets a specified criteria.+--+-- /See:/ 'newPoolOriginationIdentitiesFilter' smart constructor.+data PoolOriginationIdentitiesFilter = PoolOriginationIdentitiesFilter'+ { -- | The name of the attribute to filter on.+ name :: PoolOriginationIdentitiesFilterName,+ -- | An array values to filter for.+ values :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PoolOriginationIdentitiesFilter' 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', 'poolOriginationIdentitiesFilter_name' - The name of the attribute to filter on.+--+-- 'values', 'poolOriginationIdentitiesFilter_values' - An array values to filter for.+newPoolOriginationIdentitiesFilter ::+ -- | 'name'+ PoolOriginationIdentitiesFilterName ->+ -- | 'values'+ Prelude.NonEmpty Prelude.Text ->+ PoolOriginationIdentitiesFilter+newPoolOriginationIdentitiesFilter pName_ pValues_ =+ PoolOriginationIdentitiesFilter'+ { name = pName_,+ values = Lens.coerced Lens.# pValues_+ }++-- | The name of the attribute to filter on.+poolOriginationIdentitiesFilter_name :: Lens.Lens' PoolOriginationIdentitiesFilter PoolOriginationIdentitiesFilterName+poolOriginationIdentitiesFilter_name = Lens.lens (\PoolOriginationIdentitiesFilter' {name} -> name) (\s@PoolOriginationIdentitiesFilter' {} a -> s {name = a} :: PoolOriginationIdentitiesFilter)++-- | An array values to filter for.+poolOriginationIdentitiesFilter_values :: Lens.Lens' PoolOriginationIdentitiesFilter (Prelude.NonEmpty Prelude.Text)+poolOriginationIdentitiesFilter_values = Lens.lens (\PoolOriginationIdentitiesFilter' {values} -> values) (\s@PoolOriginationIdentitiesFilter' {} a -> s {values = a} :: PoolOriginationIdentitiesFilter) Prelude.. Lens.coerced++instance+ Prelude.Hashable+ PoolOriginationIdentitiesFilter+ where+ hashWithSalt+ _salt+ PoolOriginationIdentitiesFilter' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` values++instance+ Prelude.NFData+ PoolOriginationIdentitiesFilter+ where+ rnf PoolOriginationIdentitiesFilter' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON PoolOriginationIdentitiesFilter where+ toJSON PoolOriginationIdentitiesFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Name" Data..= name),+ Prelude.Just ("Values" Data..= values)+ ]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/PoolOriginationIdentitiesFilterName.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.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilterName+-- 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.PinpointSmsVoiceV2.Types.PoolOriginationIdentitiesFilterName+ ( PoolOriginationIdentitiesFilterName+ ( ..,+ PoolOriginationIdentitiesFilterName_Iso_country_code,+ PoolOriginationIdentitiesFilterName_Number_capability+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PoolOriginationIdentitiesFilterName = PoolOriginationIdentitiesFilterName'+ { fromPoolOriginationIdentitiesFilterName ::+ 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 PoolOriginationIdentitiesFilterName_Iso_country_code :: PoolOriginationIdentitiesFilterName+pattern PoolOriginationIdentitiesFilterName_Iso_country_code = PoolOriginationIdentitiesFilterName' "iso-country-code"++pattern PoolOriginationIdentitiesFilterName_Number_capability :: PoolOriginationIdentitiesFilterName+pattern PoolOriginationIdentitiesFilterName_Number_capability = PoolOriginationIdentitiesFilterName' "number-capability"++{-# COMPLETE+ PoolOriginationIdentitiesFilterName_Iso_country_code,+ PoolOriginationIdentitiesFilterName_Number_capability,+ PoolOriginationIdentitiesFilterName'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/PoolStatus.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.PinpointSmsVoiceV2.Types.PoolStatus+-- 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.PinpointSmsVoiceV2.Types.PoolStatus+ ( PoolStatus+ ( ..,+ PoolStatus_ACTIVE,+ PoolStatus_CREATING,+ PoolStatus_DELETING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PoolStatus = PoolStatus'+ { fromPoolStatus ::+ 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 PoolStatus_ACTIVE :: PoolStatus+pattern PoolStatus_ACTIVE = PoolStatus' "ACTIVE"++pattern PoolStatus_CREATING :: PoolStatus+pattern PoolStatus_CREATING = PoolStatus' "CREATING"++pattern PoolStatus_DELETING :: PoolStatus+pattern PoolStatus_DELETING = PoolStatus' "DELETING"++{-# COMPLETE+ PoolStatus_ACTIVE,+ PoolStatus_CREATING,+ PoolStatus_DELETING,+ PoolStatus'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/RequestableNumberType.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.PinpointSmsVoiceV2.Types.RequestableNumberType+-- 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.PinpointSmsVoiceV2.Types.RequestableNumberType+ ( RequestableNumberType+ ( ..,+ RequestableNumberType_LONG_CODE,+ RequestableNumberType_TEN_DLC,+ RequestableNumberType_TOLL_FREE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype RequestableNumberType = RequestableNumberType'+ { fromRequestableNumberType ::+ 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 RequestableNumberType_LONG_CODE :: RequestableNumberType+pattern RequestableNumberType_LONG_CODE = RequestableNumberType' "LONG_CODE"++pattern RequestableNumberType_TEN_DLC :: RequestableNumberType+pattern RequestableNumberType_TEN_DLC = RequestableNumberType' "TEN_DLC"++pattern RequestableNumberType_TOLL_FREE :: RequestableNumberType+pattern RequestableNumberType_TOLL_FREE = RequestableNumberType' "TOLL_FREE"++{-# COMPLETE+ RequestableNumberType_LONG_CODE,+ RequestableNumberType_TEN_DLC,+ RequestableNumberType_TOLL_FREE,+ RequestableNumberType'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/SenderIdAndCountry.hs view
@@ -0,0 +1,94 @@+{-# 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.PinpointSmsVoiceV2.Types.SenderIdAndCountry+-- 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.PinpointSmsVoiceV2.Types.SenderIdAndCountry where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The alphanumeric sender ID in a specific country that you want to+-- describe. For more information on sender IDs see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-awssupport-sender-id.html Requesting sender IDs for SMS messaging with Amazon Pinpoint>+-- in the /Amazon Pinpoint User Guide/.+--+-- /See:/ 'newSenderIdAndCountry' smart constructor.+data SenderIdAndCountry = SenderIdAndCountry'+ { -- | The unique identifier of the sender.+ senderId :: Prelude.Text,+ -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+ -- region.+ isoCountryCode :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SenderIdAndCountry' 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:+--+-- 'senderId', 'senderIdAndCountry_senderId' - The unique identifier of the sender.+--+-- 'isoCountryCode', 'senderIdAndCountry_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+newSenderIdAndCountry ::+ -- | 'senderId'+ Prelude.Text ->+ -- | 'isoCountryCode'+ Prelude.Text ->+ SenderIdAndCountry+newSenderIdAndCountry pSenderId_ pIsoCountryCode_ =+ SenderIdAndCountry'+ { senderId = pSenderId_,+ isoCountryCode = pIsoCountryCode_+ }++-- | The unique identifier of the sender.+senderIdAndCountry_senderId :: Lens.Lens' SenderIdAndCountry Prelude.Text+senderIdAndCountry_senderId = Lens.lens (\SenderIdAndCountry' {senderId} -> senderId) (\s@SenderIdAndCountry' {} a -> s {senderId = a} :: SenderIdAndCountry)++-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+senderIdAndCountry_isoCountryCode :: Lens.Lens' SenderIdAndCountry Prelude.Text+senderIdAndCountry_isoCountryCode = Lens.lens (\SenderIdAndCountry' {isoCountryCode} -> isoCountryCode) (\s@SenderIdAndCountry' {} a -> s {isoCountryCode = a} :: SenderIdAndCountry)++instance Prelude.Hashable SenderIdAndCountry where+ hashWithSalt _salt SenderIdAndCountry' {..} =+ _salt+ `Prelude.hashWithSalt` senderId+ `Prelude.hashWithSalt` isoCountryCode++instance Prelude.NFData SenderIdAndCountry where+ rnf SenderIdAndCountry' {..} =+ Prelude.rnf senderId+ `Prelude.seq` Prelude.rnf isoCountryCode++instance Data.ToJSON SenderIdAndCountry where+ toJSON SenderIdAndCountry' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("SenderId" Data..= senderId),+ Prelude.Just+ ("IsoCountryCode" Data..= isoCountryCode)+ ]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/SenderIdFilter.hs view
@@ -0,0 +1,87 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.SenderIdFilter+-- 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.PinpointSmsVoiceV2.Types.SenderIdFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.SenderIdFilterName+import qualified Amazonka.Prelude as Prelude++-- | The information for a sender ID that meets a specified criteria.+--+-- /See:/ 'newSenderIdFilter' smart constructor.+data SenderIdFilter = SenderIdFilter'+ { -- | The name of the attribute to filter on.+ name :: SenderIdFilterName,+ -- | An array of values to filter for.+ values :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SenderIdFilter' 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', 'senderIdFilter_name' - The name of the attribute to filter on.+--+-- 'values', 'senderIdFilter_values' - An array of values to filter for.+newSenderIdFilter ::+ -- | 'name'+ SenderIdFilterName ->+ -- | 'values'+ Prelude.NonEmpty Prelude.Text ->+ SenderIdFilter+newSenderIdFilter pName_ pValues_ =+ SenderIdFilter'+ { name = pName_,+ values = Lens.coerced Lens.# pValues_+ }++-- | The name of the attribute to filter on.+senderIdFilter_name :: Lens.Lens' SenderIdFilter SenderIdFilterName+senderIdFilter_name = Lens.lens (\SenderIdFilter' {name} -> name) (\s@SenderIdFilter' {} a -> s {name = a} :: SenderIdFilter)++-- | An array of values to filter for.+senderIdFilter_values :: Lens.Lens' SenderIdFilter (Prelude.NonEmpty Prelude.Text)+senderIdFilter_values = Lens.lens (\SenderIdFilter' {values} -> values) (\s@SenderIdFilter' {} a -> s {values = a} :: SenderIdFilter) Prelude.. Lens.coerced++instance Prelude.Hashable SenderIdFilter where+ hashWithSalt _salt SenderIdFilter' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` values++instance Prelude.NFData SenderIdFilter where+ rnf SenderIdFilter' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON SenderIdFilter where+ toJSON SenderIdFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Name" Data..= name),+ Prelude.Just ("Values" Data..= values)+ ]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/SenderIdFilterName.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.PinpointSmsVoiceV2.Types.SenderIdFilterName+-- 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.PinpointSmsVoiceV2.Types.SenderIdFilterName+ ( SenderIdFilterName+ ( ..,+ SenderIdFilterName_Iso_country_code,+ SenderIdFilterName_Message_type,+ SenderIdFilterName_Sender_id+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype SenderIdFilterName = SenderIdFilterName'+ { fromSenderIdFilterName ::+ 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 SenderIdFilterName_Iso_country_code :: SenderIdFilterName+pattern SenderIdFilterName_Iso_country_code = SenderIdFilterName' "iso-country-code"++pattern SenderIdFilterName_Message_type :: SenderIdFilterName+pattern SenderIdFilterName_Message_type = SenderIdFilterName' "message-type"++pattern SenderIdFilterName_Sender_id :: SenderIdFilterName+pattern SenderIdFilterName_Sender_id = SenderIdFilterName' "sender-id"++{-# COMPLETE+ SenderIdFilterName_Iso_country_code,+ SenderIdFilterName_Message_type,+ SenderIdFilterName_Sender_id,+ SenderIdFilterName'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/SenderIdInformation.hs view
@@ -0,0 +1,145 @@+{-# 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.PinpointSmsVoiceV2.Types.SenderIdInformation+-- 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.PinpointSmsVoiceV2.Types.SenderIdInformation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.MessageType+import qualified Amazonka.Prelude as Prelude++-- | The information for all SenderIds in an Amazon Web Services account.+--+-- /See:/ 'newSenderIdInformation' smart constructor.+data SenderIdInformation = SenderIdInformation'+ { -- | The Amazon Resource Name (ARN) associated with the SenderId.+ senderIdArn :: Prelude.Text,+ -- | The alphanumeric sender ID in a specific country that you\'d like to+ -- describe.+ senderId :: Prelude.Text,+ -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+ -- region.+ isoCountryCode :: Prelude.Text,+ -- | The type of message. Valid values are TRANSACTIONAL for messages that+ -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+ -- critical or time-sensitive.+ messageTypes :: [MessageType],+ -- | The monthly leasing price, in US dollars.+ monthlyLeasingPrice :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SenderIdInformation' 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:+--+-- 'senderIdArn', 'senderIdInformation_senderIdArn' - The Amazon Resource Name (ARN) associated with the SenderId.+--+-- 'senderId', 'senderIdInformation_senderId' - The alphanumeric sender ID in a specific country that you\'d like to+-- describe.+--+-- 'isoCountryCode', 'senderIdInformation_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+--+-- 'messageTypes', 'senderIdInformation_messageTypes' - The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+--+-- 'monthlyLeasingPrice', 'senderIdInformation_monthlyLeasingPrice' - The monthly leasing price, in US dollars.+newSenderIdInformation ::+ -- | 'senderIdArn'+ Prelude.Text ->+ -- | 'senderId'+ Prelude.Text ->+ -- | 'isoCountryCode'+ Prelude.Text ->+ -- | 'monthlyLeasingPrice'+ Prelude.Text ->+ SenderIdInformation+newSenderIdInformation+ pSenderIdArn_+ pSenderId_+ pIsoCountryCode_+ pMonthlyLeasingPrice_ =+ SenderIdInformation'+ { senderIdArn = pSenderIdArn_,+ senderId = pSenderId_,+ isoCountryCode = pIsoCountryCode_,+ messageTypes = Prelude.mempty,+ monthlyLeasingPrice = pMonthlyLeasingPrice_+ }++-- | The Amazon Resource Name (ARN) associated with the SenderId.+senderIdInformation_senderIdArn :: Lens.Lens' SenderIdInformation Prelude.Text+senderIdInformation_senderIdArn = Lens.lens (\SenderIdInformation' {senderIdArn} -> senderIdArn) (\s@SenderIdInformation' {} a -> s {senderIdArn = a} :: SenderIdInformation)++-- | The alphanumeric sender ID in a specific country that you\'d like to+-- describe.+senderIdInformation_senderId :: Lens.Lens' SenderIdInformation Prelude.Text+senderIdInformation_senderId = Lens.lens (\SenderIdInformation' {senderId} -> senderId) (\s@SenderIdInformation' {} a -> s {senderId = a} :: SenderIdInformation)++-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+senderIdInformation_isoCountryCode :: Lens.Lens' SenderIdInformation Prelude.Text+senderIdInformation_isoCountryCode = Lens.lens (\SenderIdInformation' {isoCountryCode} -> isoCountryCode) (\s@SenderIdInformation' {} a -> s {isoCountryCode = a} :: SenderIdInformation)++-- | The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+senderIdInformation_messageTypes :: Lens.Lens' SenderIdInformation [MessageType]+senderIdInformation_messageTypes = Lens.lens (\SenderIdInformation' {messageTypes} -> messageTypes) (\s@SenderIdInformation' {} a -> s {messageTypes = a} :: SenderIdInformation) Prelude.. Lens.coerced++-- | The monthly leasing price, in US dollars.+senderIdInformation_monthlyLeasingPrice :: Lens.Lens' SenderIdInformation Prelude.Text+senderIdInformation_monthlyLeasingPrice = Lens.lens (\SenderIdInformation' {monthlyLeasingPrice} -> monthlyLeasingPrice) (\s@SenderIdInformation' {} a -> s {monthlyLeasingPrice = a} :: SenderIdInformation)++instance Data.FromJSON SenderIdInformation where+ parseJSON =+ Data.withObject+ "SenderIdInformation"+ ( \x ->+ SenderIdInformation'+ Prelude.<$> (x Data..: "SenderIdArn")+ Prelude.<*> (x Data..: "SenderId")+ Prelude.<*> (x Data..: "IsoCountryCode")+ Prelude.<*> (x Data..:? "MessageTypes" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..: "MonthlyLeasingPrice")+ )++instance Prelude.Hashable SenderIdInformation where+ hashWithSalt _salt SenderIdInformation' {..} =+ _salt+ `Prelude.hashWithSalt` senderIdArn+ `Prelude.hashWithSalt` senderId+ `Prelude.hashWithSalt` isoCountryCode+ `Prelude.hashWithSalt` messageTypes+ `Prelude.hashWithSalt` monthlyLeasingPrice++instance Prelude.NFData SenderIdInformation where+ rnf SenderIdInformation' {..} =+ Prelude.rnf senderIdArn+ `Prelude.seq` Prelude.rnf senderId+ `Prelude.seq` Prelude.rnf isoCountryCode+ `Prelude.seq` Prelude.rnf messageTypes+ `Prelude.seq` Prelude.rnf monthlyLeasingPrice
+ gen/Amazonka/PinpointSmsVoiceV2/Types/SnsDestination.hs view
@@ -0,0 +1,80 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.PinpointSmsVoiceV2.Types.SnsDestination+-- 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.PinpointSmsVoiceV2.Types.SnsDestination where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | An object that defines an Amazon SNS destination for events. You can use+-- Amazon SNS to send notification when certain events occur.+--+-- /See:/ 'newSnsDestination' smart constructor.+data SnsDestination = SnsDestination'+ { -- | The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to+ -- publish events to.+ topicArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SnsDestination' 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:+--+-- 'topicArn', 'snsDestination_topicArn' - The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to+-- publish events to.+newSnsDestination ::+ -- | 'topicArn'+ Prelude.Text ->+ SnsDestination+newSnsDestination pTopicArn_ =+ SnsDestination' {topicArn = pTopicArn_}++-- | The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to+-- publish events to.+snsDestination_topicArn :: Lens.Lens' SnsDestination Prelude.Text+snsDestination_topicArn = Lens.lens (\SnsDestination' {topicArn} -> topicArn) (\s@SnsDestination' {} a -> s {topicArn = a} :: SnsDestination)++instance Data.FromJSON SnsDestination where+ parseJSON =+ Data.withObject+ "SnsDestination"+ ( \x ->+ SnsDestination' Prelude.<$> (x Data..: "TopicArn")+ )++instance Prelude.Hashable SnsDestination where+ hashWithSalt _salt SnsDestination' {..} =+ _salt `Prelude.hashWithSalt` topicArn++instance Prelude.NFData SnsDestination where+ rnf SnsDestination' {..} = Prelude.rnf topicArn++instance Data.ToJSON SnsDestination where+ toJSON SnsDestination' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("TopicArn" Data..= topicArn)]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/SpendLimit.hs view
@@ -0,0 +1,143 @@+{-# 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.PinpointSmsVoiceV2.Types.SpendLimit+-- 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.PinpointSmsVoiceV2.Types.SpendLimit where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types.SpendLimitName+import qualified Amazonka.Prelude as Prelude++-- | Describes the current Amazon Pinpoint monthly spend limits for sending+-- voice and text messages. For more information on increasing your monthly+-- spend limit, see+-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-awssupport-spend-threshold.html Requesting increases to your monthly SMS spending quota for Amazon Pinpoint>+-- in the /Amazon Pinpoint User Guide/.+--+-- /See:/ 'newSpendLimit' smart constructor.+data SpendLimit = SpendLimit'+ { -- | The name for the SpendLimit.+ name :: SpendLimitName,+ -- | The maximum amount of money, in US dollars, that you want to be able to+ -- spend sending messages each month. This value has to be less than or+ -- equal to the amount in @MaxLimit@. To use this custom limit,+ -- @Overridden@ must be set to true.+ enforcedLimit :: Prelude.Integer,+ -- | The maximum amount of money that you are able to spend to send messages+ -- each month, in US dollars.+ maxLimit :: Prelude.Integer,+ -- | When set to @True@, the value that has been specified in the+ -- @EnforcedLimit@ is used to determine the maximum amount in US dollars+ -- that can be spent to send messages each month, in US dollars.+ overridden :: Prelude.Bool+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SpendLimit' 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', 'spendLimit_name' - The name for the SpendLimit.+--+-- 'enforcedLimit', 'spendLimit_enforcedLimit' - The maximum amount of money, in US dollars, that you want to be able to+-- spend sending messages each month. This value has to be less than or+-- equal to the amount in @MaxLimit@. To use this custom limit,+-- @Overridden@ must be set to true.+--+-- 'maxLimit', 'spendLimit_maxLimit' - The maximum amount of money that you are able to spend to send messages+-- each month, in US dollars.+--+-- 'overridden', 'spendLimit_overridden' - When set to @True@, the value that has been specified in the+-- @EnforcedLimit@ is used to determine the maximum amount in US dollars+-- that can be spent to send messages each month, in US dollars.+newSpendLimit ::+ -- | 'name'+ SpendLimitName ->+ -- | 'enforcedLimit'+ Prelude.Integer ->+ -- | 'maxLimit'+ Prelude.Integer ->+ -- | 'overridden'+ Prelude.Bool ->+ SpendLimit+newSpendLimit+ pName_+ pEnforcedLimit_+ pMaxLimit_+ pOverridden_ =+ SpendLimit'+ { name = pName_,+ enforcedLimit = pEnforcedLimit_,+ maxLimit = pMaxLimit_,+ overridden = pOverridden_+ }++-- | The name for the SpendLimit.+spendLimit_name :: Lens.Lens' SpendLimit SpendLimitName+spendLimit_name = Lens.lens (\SpendLimit' {name} -> name) (\s@SpendLimit' {} a -> s {name = a} :: SpendLimit)++-- | The maximum amount of money, in US dollars, that you want to be able to+-- spend sending messages each month. This value has to be less than or+-- equal to the amount in @MaxLimit@. To use this custom limit,+-- @Overridden@ must be set to true.+spendLimit_enforcedLimit :: Lens.Lens' SpendLimit Prelude.Integer+spendLimit_enforcedLimit = Lens.lens (\SpendLimit' {enforcedLimit} -> enforcedLimit) (\s@SpendLimit' {} a -> s {enforcedLimit = a} :: SpendLimit)++-- | The maximum amount of money that you are able to spend to send messages+-- each month, in US dollars.+spendLimit_maxLimit :: Lens.Lens' SpendLimit Prelude.Integer+spendLimit_maxLimit = Lens.lens (\SpendLimit' {maxLimit} -> maxLimit) (\s@SpendLimit' {} a -> s {maxLimit = a} :: SpendLimit)++-- | When set to @True@, the value that has been specified in the+-- @EnforcedLimit@ is used to determine the maximum amount in US dollars+-- that can be spent to send messages each month, in US dollars.+spendLimit_overridden :: Lens.Lens' SpendLimit Prelude.Bool+spendLimit_overridden = Lens.lens (\SpendLimit' {overridden} -> overridden) (\s@SpendLimit' {} a -> s {overridden = a} :: SpendLimit)++instance Data.FromJSON SpendLimit where+ parseJSON =+ Data.withObject+ "SpendLimit"+ ( \x ->+ SpendLimit'+ Prelude.<$> (x Data..: "Name")+ Prelude.<*> (x Data..: "EnforcedLimit")+ Prelude.<*> (x Data..: "MaxLimit")+ Prelude.<*> (x Data..: "Overridden")+ )++instance Prelude.Hashable SpendLimit where+ hashWithSalt _salt SpendLimit' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` enforcedLimit+ `Prelude.hashWithSalt` maxLimit+ `Prelude.hashWithSalt` overridden++instance Prelude.NFData SpendLimit where+ rnf SpendLimit' {..} =+ Prelude.rnf name+ `Prelude.seq` Prelude.rnf enforcedLimit+ `Prelude.seq` Prelude.rnf maxLimit+ `Prelude.seq` Prelude.rnf overridden
+ gen/Amazonka/PinpointSmsVoiceV2/Types/SpendLimitName.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.PinpointSmsVoiceV2.Types.SpendLimitName+-- 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.PinpointSmsVoiceV2.Types.SpendLimitName+ ( SpendLimitName+ ( ..,+ SpendLimitName_TEXT_MESSAGE_MONTHLY_SPEND_LIMIT,+ SpendLimitName_VOICE_MESSAGE_MONTHLY_SPEND_LIMIT+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype SpendLimitName = SpendLimitName'+ { fromSpendLimitName ::+ 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 SpendLimitName_TEXT_MESSAGE_MONTHLY_SPEND_LIMIT :: SpendLimitName+pattern SpendLimitName_TEXT_MESSAGE_MONTHLY_SPEND_LIMIT = SpendLimitName' "TEXT_MESSAGE_MONTHLY_SPEND_LIMIT"++pattern SpendLimitName_VOICE_MESSAGE_MONTHLY_SPEND_LIMIT :: SpendLimitName+pattern SpendLimitName_VOICE_MESSAGE_MONTHLY_SPEND_LIMIT = SpendLimitName' "VOICE_MESSAGE_MONTHLY_SPEND_LIMIT"++{-# COMPLETE+ SpendLimitName_TEXT_MESSAGE_MONTHLY_SPEND_LIMIT,+ SpendLimitName_VOICE_MESSAGE_MONTHLY_SPEND_LIMIT,+ SpendLimitName'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/Tag.hs view
@@ -0,0 +1,93 @@+{-# 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.PinpointSmsVoiceV2.Types.Tag+-- 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.PinpointSmsVoiceV2.Types.Tag where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The list of tags to be added to the specified topic.+--+-- /See:/ 'newTag' smart constructor.+data Tag = Tag'+ { -- | The key identifier, or name, of the tag.+ key :: Prelude.Text,+ -- | The string value associated with the key of the tag.+ value :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Tag' 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:+--+-- 'key', 'tag_key' - The key identifier, or name, of the tag.+--+-- 'value', 'tag_value' - The string value associated with the key of the tag.+newTag ::+ -- | 'key'+ Prelude.Text ->+ -- | 'value'+ Prelude.Text ->+ Tag+newTag pKey_ pValue_ =+ Tag' {key = pKey_, value = pValue_}++-- | The key identifier, or name, of the tag.+tag_key :: Lens.Lens' Tag Prelude.Text+tag_key = Lens.lens (\Tag' {key} -> key) (\s@Tag' {} a -> s {key = a} :: Tag)++-- | The string value associated with the key of the tag.+tag_value :: Lens.Lens' Tag Prelude.Text+tag_value = Lens.lens (\Tag' {value} -> value) (\s@Tag' {} a -> s {value = a} :: Tag)++instance Data.FromJSON Tag where+ parseJSON =+ Data.withObject+ "Tag"+ ( \x ->+ Tag'+ Prelude.<$> (x Data..: "Key")+ Prelude.<*> (x Data..: "Value")+ )++instance Prelude.Hashable Tag where+ hashWithSalt _salt Tag' {..} =+ _salt+ `Prelude.hashWithSalt` key+ `Prelude.hashWithSalt` value++instance Prelude.NFData Tag where+ rnf Tag' {..} =+ Prelude.rnf key `Prelude.seq` Prelude.rnf value++instance Data.ToJSON Tag where+ toJSON Tag' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Key" Data..= key),+ Prelude.Just ("Value" Data..= value)+ ]+ )
+ gen/Amazonka/PinpointSmsVoiceV2/Types/VoiceId.hs view
@@ -0,0 +1,353 @@+{-# 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.PinpointSmsVoiceV2.Types.VoiceId+-- 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.PinpointSmsVoiceV2.Types.VoiceId+ ( VoiceId+ ( ..,+ VoiceId_AMY,+ VoiceId_ASTRID,+ VoiceId_BIANCA,+ VoiceId_BRIAN,+ VoiceId_CAMILA,+ VoiceId_CARLA,+ VoiceId_CARMEN,+ VoiceId_CELINE,+ VoiceId_CHANTAL,+ VoiceId_CONCHITA,+ VoiceId_CRISTIANO,+ VoiceId_DORA,+ VoiceId_EMMA,+ VoiceId_ENRIQUE,+ VoiceId_EWA,+ VoiceId_FILIZ,+ VoiceId_GERAINT,+ VoiceId_GIORGIO,+ VoiceId_GWYNETH,+ VoiceId_HANS,+ VoiceId_INES,+ VoiceId_IVY,+ VoiceId_JACEK,+ VoiceId_JAN,+ VoiceId_JOANNA,+ VoiceId_JOEY,+ VoiceId_JUSTIN,+ VoiceId_KARL,+ VoiceId_KENDRA,+ VoiceId_KIMBERLY,+ VoiceId_LEA,+ VoiceId_LIV,+ VoiceId_LOTTE,+ VoiceId_LUCIA,+ VoiceId_LUPE,+ VoiceId_MADS,+ VoiceId_MAJA,+ VoiceId_MARLENE,+ VoiceId_MATHIEU,+ VoiceId_MATTHEW,+ VoiceId_MAXIM,+ VoiceId_MIA,+ VoiceId_MIGUEL,+ VoiceId_MIZUKI,+ VoiceId_NAJA,+ VoiceId_NICOLE,+ VoiceId_PENELOPE,+ VoiceId_RAVEENA,+ VoiceId_RICARDO,+ VoiceId_RUBEN,+ VoiceId_RUSSELL,+ VoiceId_SALLI,+ VoiceId_SEOYEON,+ VoiceId_TAKUMI,+ VoiceId_TATYANA,+ VoiceId_VICKI,+ VoiceId_VITORIA,+ VoiceId_ZEINA,+ VoiceId_ZHIYU+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype VoiceId = VoiceId' {fromVoiceId :: 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 VoiceId_AMY :: VoiceId+pattern VoiceId_AMY = VoiceId' "AMY"++pattern VoiceId_ASTRID :: VoiceId+pattern VoiceId_ASTRID = VoiceId' "ASTRID"++pattern VoiceId_BIANCA :: VoiceId+pattern VoiceId_BIANCA = VoiceId' "BIANCA"++pattern VoiceId_BRIAN :: VoiceId+pattern VoiceId_BRIAN = VoiceId' "BRIAN"++pattern VoiceId_CAMILA :: VoiceId+pattern VoiceId_CAMILA = VoiceId' "CAMILA"++pattern VoiceId_CARLA :: VoiceId+pattern VoiceId_CARLA = VoiceId' "CARLA"++pattern VoiceId_CARMEN :: VoiceId+pattern VoiceId_CARMEN = VoiceId' "CARMEN"++pattern VoiceId_CELINE :: VoiceId+pattern VoiceId_CELINE = VoiceId' "CELINE"++pattern VoiceId_CHANTAL :: VoiceId+pattern VoiceId_CHANTAL = VoiceId' "CHANTAL"++pattern VoiceId_CONCHITA :: VoiceId+pattern VoiceId_CONCHITA = VoiceId' "CONCHITA"++pattern VoiceId_CRISTIANO :: VoiceId+pattern VoiceId_CRISTIANO = VoiceId' "CRISTIANO"++pattern VoiceId_DORA :: VoiceId+pattern VoiceId_DORA = VoiceId' "DORA"++pattern VoiceId_EMMA :: VoiceId+pattern VoiceId_EMMA = VoiceId' "EMMA"++pattern VoiceId_ENRIQUE :: VoiceId+pattern VoiceId_ENRIQUE = VoiceId' "ENRIQUE"++pattern VoiceId_EWA :: VoiceId+pattern VoiceId_EWA = VoiceId' "EWA"++pattern VoiceId_FILIZ :: VoiceId+pattern VoiceId_FILIZ = VoiceId' "FILIZ"++pattern VoiceId_GERAINT :: VoiceId+pattern VoiceId_GERAINT = VoiceId' "GERAINT"++pattern VoiceId_GIORGIO :: VoiceId+pattern VoiceId_GIORGIO = VoiceId' "GIORGIO"++pattern VoiceId_GWYNETH :: VoiceId+pattern VoiceId_GWYNETH = VoiceId' "GWYNETH"++pattern VoiceId_HANS :: VoiceId+pattern VoiceId_HANS = VoiceId' "HANS"++pattern VoiceId_INES :: VoiceId+pattern VoiceId_INES = VoiceId' "INES"++pattern VoiceId_IVY :: VoiceId+pattern VoiceId_IVY = VoiceId' "IVY"++pattern VoiceId_JACEK :: VoiceId+pattern VoiceId_JACEK = VoiceId' "JACEK"++pattern VoiceId_JAN :: VoiceId+pattern VoiceId_JAN = VoiceId' "JAN"++pattern VoiceId_JOANNA :: VoiceId+pattern VoiceId_JOANNA = VoiceId' "JOANNA"++pattern VoiceId_JOEY :: VoiceId+pattern VoiceId_JOEY = VoiceId' "JOEY"++pattern VoiceId_JUSTIN :: VoiceId+pattern VoiceId_JUSTIN = VoiceId' "JUSTIN"++pattern VoiceId_KARL :: VoiceId+pattern VoiceId_KARL = VoiceId' "KARL"++pattern VoiceId_KENDRA :: VoiceId+pattern VoiceId_KENDRA = VoiceId' "KENDRA"++pattern VoiceId_KIMBERLY :: VoiceId+pattern VoiceId_KIMBERLY = VoiceId' "KIMBERLY"++pattern VoiceId_LEA :: VoiceId+pattern VoiceId_LEA = VoiceId' "LEA"++pattern VoiceId_LIV :: VoiceId+pattern VoiceId_LIV = VoiceId' "LIV"++pattern VoiceId_LOTTE :: VoiceId+pattern VoiceId_LOTTE = VoiceId' "LOTTE"++pattern VoiceId_LUCIA :: VoiceId+pattern VoiceId_LUCIA = VoiceId' "LUCIA"++pattern VoiceId_LUPE :: VoiceId+pattern VoiceId_LUPE = VoiceId' "LUPE"++pattern VoiceId_MADS :: VoiceId+pattern VoiceId_MADS = VoiceId' "MADS"++pattern VoiceId_MAJA :: VoiceId+pattern VoiceId_MAJA = VoiceId' "MAJA"++pattern VoiceId_MARLENE :: VoiceId+pattern VoiceId_MARLENE = VoiceId' "MARLENE"++pattern VoiceId_MATHIEU :: VoiceId+pattern VoiceId_MATHIEU = VoiceId' "MATHIEU"++pattern VoiceId_MATTHEW :: VoiceId+pattern VoiceId_MATTHEW = VoiceId' "MATTHEW"++pattern VoiceId_MAXIM :: VoiceId+pattern VoiceId_MAXIM = VoiceId' "MAXIM"++pattern VoiceId_MIA :: VoiceId+pattern VoiceId_MIA = VoiceId' "MIA"++pattern VoiceId_MIGUEL :: VoiceId+pattern VoiceId_MIGUEL = VoiceId' "MIGUEL"++pattern VoiceId_MIZUKI :: VoiceId+pattern VoiceId_MIZUKI = VoiceId' "MIZUKI"++pattern VoiceId_NAJA :: VoiceId+pattern VoiceId_NAJA = VoiceId' "NAJA"++pattern VoiceId_NICOLE :: VoiceId+pattern VoiceId_NICOLE = VoiceId' "NICOLE"++pattern VoiceId_PENELOPE :: VoiceId+pattern VoiceId_PENELOPE = VoiceId' "PENELOPE"++pattern VoiceId_RAVEENA :: VoiceId+pattern VoiceId_RAVEENA = VoiceId' "RAVEENA"++pattern VoiceId_RICARDO :: VoiceId+pattern VoiceId_RICARDO = VoiceId' "RICARDO"++pattern VoiceId_RUBEN :: VoiceId+pattern VoiceId_RUBEN = VoiceId' "RUBEN"++pattern VoiceId_RUSSELL :: VoiceId+pattern VoiceId_RUSSELL = VoiceId' "RUSSELL"++pattern VoiceId_SALLI :: VoiceId+pattern VoiceId_SALLI = VoiceId' "SALLI"++pattern VoiceId_SEOYEON :: VoiceId+pattern VoiceId_SEOYEON = VoiceId' "SEOYEON"++pattern VoiceId_TAKUMI :: VoiceId+pattern VoiceId_TAKUMI = VoiceId' "TAKUMI"++pattern VoiceId_TATYANA :: VoiceId+pattern VoiceId_TATYANA = VoiceId' "TATYANA"++pattern VoiceId_VICKI :: VoiceId+pattern VoiceId_VICKI = VoiceId' "VICKI"++pattern VoiceId_VITORIA :: VoiceId+pattern VoiceId_VITORIA = VoiceId' "VITORIA"++pattern VoiceId_ZEINA :: VoiceId+pattern VoiceId_ZEINA = VoiceId' "ZEINA"++pattern VoiceId_ZHIYU :: VoiceId+pattern VoiceId_ZHIYU = VoiceId' "ZHIYU"++{-# COMPLETE+ VoiceId_AMY,+ VoiceId_ASTRID,+ VoiceId_BIANCA,+ VoiceId_BRIAN,+ VoiceId_CAMILA,+ VoiceId_CARLA,+ VoiceId_CARMEN,+ VoiceId_CELINE,+ VoiceId_CHANTAL,+ VoiceId_CONCHITA,+ VoiceId_CRISTIANO,+ VoiceId_DORA,+ VoiceId_EMMA,+ VoiceId_ENRIQUE,+ VoiceId_EWA,+ VoiceId_FILIZ,+ VoiceId_GERAINT,+ VoiceId_GIORGIO,+ VoiceId_GWYNETH,+ VoiceId_HANS,+ VoiceId_INES,+ VoiceId_IVY,+ VoiceId_JACEK,+ VoiceId_JAN,+ VoiceId_JOANNA,+ VoiceId_JOEY,+ VoiceId_JUSTIN,+ VoiceId_KARL,+ VoiceId_KENDRA,+ VoiceId_KIMBERLY,+ VoiceId_LEA,+ VoiceId_LIV,+ VoiceId_LOTTE,+ VoiceId_LUCIA,+ VoiceId_LUPE,+ VoiceId_MADS,+ VoiceId_MAJA,+ VoiceId_MARLENE,+ VoiceId_MATHIEU,+ VoiceId_MATTHEW,+ VoiceId_MAXIM,+ VoiceId_MIA,+ VoiceId_MIGUEL,+ VoiceId_MIZUKI,+ VoiceId_NAJA,+ VoiceId_NICOLE,+ VoiceId_PENELOPE,+ VoiceId_RAVEENA,+ VoiceId_RICARDO,+ VoiceId_RUBEN,+ VoiceId_RUSSELL,+ VoiceId_SALLI,+ VoiceId_SEOYEON,+ VoiceId_TAKUMI,+ VoiceId_TATYANA,+ VoiceId_VICKI,+ VoiceId_VITORIA,+ VoiceId_ZEINA,+ VoiceId_ZHIYU,+ VoiceId'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/Types/VoiceMessageBodyTextType.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.PinpointSmsVoiceV2.Types.VoiceMessageBodyTextType+-- 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.PinpointSmsVoiceV2.Types.VoiceMessageBodyTextType+ ( VoiceMessageBodyTextType+ ( ..,+ VoiceMessageBodyTextType_SSML,+ VoiceMessageBodyTextType_TEXT+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype VoiceMessageBodyTextType = VoiceMessageBodyTextType'+ { fromVoiceMessageBodyTextType ::+ 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 VoiceMessageBodyTextType_SSML :: VoiceMessageBodyTextType+pattern VoiceMessageBodyTextType_SSML = VoiceMessageBodyTextType' "SSML"++pattern VoiceMessageBodyTextType_TEXT :: VoiceMessageBodyTextType+pattern VoiceMessageBodyTextType_TEXT = VoiceMessageBodyTextType' "TEXT"++{-# COMPLETE+ VoiceMessageBodyTextType_SSML,+ VoiceMessageBodyTextType_TEXT,+ VoiceMessageBodyTextType'+ #-}
+ gen/Amazonka/PinpointSmsVoiceV2/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.PinpointSmsVoiceV2.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 the association of the specified tags from an Amazon Pinpoint+-- SMS Voice V2 resource. For more information on tags see+-- <https://docs.aws.amazon.com/pinpoint/latest/developerguide/tagging-resources.html Tagging Amazon Pinpoint resources>+-- in the /Amazon Pinpoint Developer Guide/.+module Amazonka.PinpointSmsVoiceV2.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.PinpointSmsVoiceV2.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 Amazon Resource Name (ARN) of the resource.+ resourceArn :: Prelude.Text,+ -- | An array of tag key values to unassociate with the resource.+ tagKeys :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'untagResource_resourceArn' - The Amazon Resource Name (ARN) of the resource.+--+-- 'tagKeys', 'untagResource_tagKeys' - An array of tag key values to unassociate with the resource.+newUntagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ -- | 'tagKeys'+ Prelude.NonEmpty Prelude.Text ->+ UntagResource+newUntagResource pResourceArn_ pTagKeys_ =+ UntagResource'+ { resourceArn = pResourceArn_,+ tagKeys = Lens.coerced Lens.# pTagKeys_+ }++-- | The Amazon Resource Name (ARN) of the resource.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | An array of tag key values to unassociate with the resource.+untagResource_tagKeys :: Lens.Lens' UntagResource (Prelude.NonEmpty Prelude.Text)+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+ type+ AWSResponse UntagResource =+ UntagResourceResponse+ request overrides =+ Request.postJSON (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+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.UntagResource" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UntagResource where+ toJSON UntagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("ResourceArn" Data..= resourceArn),+ Prelude.Just ("TagKeys" Data..= tagKeys)+ ]+ )++instance Data.ToPath UntagResource where+ toPath = Prelude.const "/"++instance Data.ToQuery UntagResource where+ toQuery = Prelude.const Prelude.mempty++-- | /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/PinpointSmsVoiceV2/UpdateEventDestination.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.PinpointSmsVoiceV2.UpdateEventDestination+-- 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 an existing event destination in a configuration set. You can+-- update the IAM role ARN for CloudWatch Logs and Kinesis Data Firehose.+-- You can also enable or disable the event destination.+--+-- You may want to update an event destination to change its matching event+-- types or updating the destination resource ARN. You can\'t change an+-- event destination\'s type between CloudWatch Logs, Kinesis Data+-- Firehose, and Amazon SNS.+module Amazonka.PinpointSmsVoiceV2.UpdateEventDestination+ ( -- * Creating a Request+ UpdateEventDestination (..),+ newUpdateEventDestination,++ -- * Request Lenses+ updateEventDestination_cloudWatchLogsDestination,+ updateEventDestination_enabled,+ updateEventDestination_kinesisFirehoseDestination,+ updateEventDestination_matchingEventTypes,+ updateEventDestination_snsDestination,+ updateEventDestination_configurationSetName,+ updateEventDestination_eventDestinationName,++ -- * Destructuring the Response+ UpdateEventDestinationResponse (..),+ newUpdateEventDestinationResponse,++ -- * Response Lenses+ updateEventDestinationResponse_configurationSetArn,+ updateEventDestinationResponse_configurationSetName,+ updateEventDestinationResponse_eventDestination,+ updateEventDestinationResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateEventDestination' smart constructor.+data UpdateEventDestination = UpdateEventDestination'+ { -- | An object that contains information about an event destination that+ -- sends data to CloudWatch Logs.+ cloudWatchLogsDestination :: Prelude.Maybe CloudWatchLogsDestination,+ -- | When set to true logging is enabled.+ enabled :: Prelude.Maybe Prelude.Bool,+ -- | An object that contains information about an event destination for+ -- logging to Kinesis Data Firehose.+ kinesisFirehoseDestination :: Prelude.Maybe KinesisFirehoseDestination,+ -- | An array of event types that determine which events to log.+ matchingEventTypes :: Prelude.Maybe (Prelude.NonEmpty EventType),+ -- | An object that contains information about an event destination that+ -- sends data to Amazon SNS.+ snsDestination :: Prelude.Maybe SnsDestination,+ -- | The configuration set to update with the new event destination. Valid+ -- values for this can be the ConfigurationSetName or ConfigurationSetArn.+ configurationSetName :: Prelude.Text,+ -- | The name to use for the event destination.+ eventDestinationName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateEventDestination' 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:+--+-- 'cloudWatchLogsDestination', 'updateEventDestination_cloudWatchLogsDestination' - An object that contains information about an event destination that+-- sends data to CloudWatch Logs.+--+-- 'enabled', 'updateEventDestination_enabled' - When set to true logging is enabled.+--+-- 'kinesisFirehoseDestination', 'updateEventDestination_kinesisFirehoseDestination' - An object that contains information about an event destination for+-- logging to Kinesis Data Firehose.+--+-- 'matchingEventTypes', 'updateEventDestination_matchingEventTypes' - An array of event types that determine which events to log.+--+-- 'snsDestination', 'updateEventDestination_snsDestination' - An object that contains information about an event destination that+-- sends data to Amazon SNS.+--+-- 'configurationSetName', 'updateEventDestination_configurationSetName' - The configuration set to update with the new event destination. Valid+-- values for this can be the ConfigurationSetName or ConfigurationSetArn.+--+-- 'eventDestinationName', 'updateEventDestination_eventDestinationName' - The name to use for the event destination.+newUpdateEventDestination ::+ -- | 'configurationSetName'+ Prelude.Text ->+ -- | 'eventDestinationName'+ Prelude.Text ->+ UpdateEventDestination+newUpdateEventDestination+ pConfigurationSetName_+ pEventDestinationName_ =+ UpdateEventDestination'+ { cloudWatchLogsDestination =+ Prelude.Nothing,+ enabled = Prelude.Nothing,+ kinesisFirehoseDestination = Prelude.Nothing,+ matchingEventTypes = Prelude.Nothing,+ snsDestination = Prelude.Nothing,+ configurationSetName = pConfigurationSetName_,+ eventDestinationName = pEventDestinationName_+ }++-- | An object that contains information about an event destination that+-- sends data to CloudWatch Logs.+updateEventDestination_cloudWatchLogsDestination :: Lens.Lens' UpdateEventDestination (Prelude.Maybe CloudWatchLogsDestination)+updateEventDestination_cloudWatchLogsDestination = Lens.lens (\UpdateEventDestination' {cloudWatchLogsDestination} -> cloudWatchLogsDestination) (\s@UpdateEventDestination' {} a -> s {cloudWatchLogsDestination = a} :: UpdateEventDestination)++-- | When set to true logging is enabled.+updateEventDestination_enabled :: Lens.Lens' UpdateEventDestination (Prelude.Maybe Prelude.Bool)+updateEventDestination_enabled = Lens.lens (\UpdateEventDestination' {enabled} -> enabled) (\s@UpdateEventDestination' {} a -> s {enabled = a} :: UpdateEventDestination)++-- | An object that contains information about an event destination for+-- logging to Kinesis Data Firehose.+updateEventDestination_kinesisFirehoseDestination :: Lens.Lens' UpdateEventDestination (Prelude.Maybe KinesisFirehoseDestination)+updateEventDestination_kinesisFirehoseDestination = Lens.lens (\UpdateEventDestination' {kinesisFirehoseDestination} -> kinesisFirehoseDestination) (\s@UpdateEventDestination' {} a -> s {kinesisFirehoseDestination = a} :: UpdateEventDestination)++-- | An array of event types that determine which events to log.+updateEventDestination_matchingEventTypes :: Lens.Lens' UpdateEventDestination (Prelude.Maybe (Prelude.NonEmpty EventType))+updateEventDestination_matchingEventTypes = Lens.lens (\UpdateEventDestination' {matchingEventTypes} -> matchingEventTypes) (\s@UpdateEventDestination' {} a -> s {matchingEventTypes = a} :: UpdateEventDestination) Prelude.. Lens.mapping Lens.coerced++-- | An object that contains information about an event destination that+-- sends data to Amazon SNS.+updateEventDestination_snsDestination :: Lens.Lens' UpdateEventDestination (Prelude.Maybe SnsDestination)+updateEventDestination_snsDestination = Lens.lens (\UpdateEventDestination' {snsDestination} -> snsDestination) (\s@UpdateEventDestination' {} a -> s {snsDestination = a} :: UpdateEventDestination)++-- | The configuration set to update with the new event destination. Valid+-- values for this can be the ConfigurationSetName or ConfigurationSetArn.+updateEventDestination_configurationSetName :: Lens.Lens' UpdateEventDestination Prelude.Text+updateEventDestination_configurationSetName = Lens.lens (\UpdateEventDestination' {configurationSetName} -> configurationSetName) (\s@UpdateEventDestination' {} a -> s {configurationSetName = a} :: UpdateEventDestination)++-- | The name to use for the event destination.+updateEventDestination_eventDestinationName :: Lens.Lens' UpdateEventDestination Prelude.Text+updateEventDestination_eventDestinationName = Lens.lens (\UpdateEventDestination' {eventDestinationName} -> eventDestinationName) (\s@UpdateEventDestination' {} a -> s {eventDestinationName = a} :: UpdateEventDestination)++instance Core.AWSRequest UpdateEventDestination where+ type+ AWSResponse UpdateEventDestination =+ UpdateEventDestinationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateEventDestinationResponse'+ Prelude.<$> (x Data..?> "ConfigurationSetArn")+ Prelude.<*> (x Data..?> "ConfigurationSetName")+ Prelude.<*> (x Data..?> "EventDestination")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateEventDestination where+ hashWithSalt _salt UpdateEventDestination' {..} =+ _salt+ `Prelude.hashWithSalt` cloudWatchLogsDestination+ `Prelude.hashWithSalt` enabled+ `Prelude.hashWithSalt` kinesisFirehoseDestination+ `Prelude.hashWithSalt` matchingEventTypes+ `Prelude.hashWithSalt` snsDestination+ `Prelude.hashWithSalt` configurationSetName+ `Prelude.hashWithSalt` eventDestinationName++instance Prelude.NFData UpdateEventDestination where+ rnf UpdateEventDestination' {..} =+ Prelude.rnf cloudWatchLogsDestination+ `Prelude.seq` Prelude.rnf enabled+ `Prelude.seq` Prelude.rnf kinesisFirehoseDestination+ `Prelude.seq` Prelude.rnf matchingEventTypes+ `Prelude.seq` Prelude.rnf snsDestination+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf eventDestinationName++instance Data.ToHeaders UpdateEventDestination where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.UpdateEventDestination" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateEventDestination where+ toJSON UpdateEventDestination' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("CloudWatchLogsDestination" Data..=)+ Prelude.<$> cloudWatchLogsDestination,+ ("Enabled" Data..=) Prelude.<$> enabled,+ ("KinesisFirehoseDestination" Data..=)+ Prelude.<$> kinesisFirehoseDestination,+ ("MatchingEventTypes" Data..=)+ Prelude.<$> matchingEventTypes,+ ("SnsDestination" Data..=)+ Prelude.<$> snsDestination,+ Prelude.Just+ ( "ConfigurationSetName"+ Data..= configurationSetName+ ),+ Prelude.Just+ ( "EventDestinationName"+ Data..= eventDestinationName+ )+ ]+ )++instance Data.ToPath UpdateEventDestination where+ toPath = Prelude.const "/"++instance Data.ToQuery UpdateEventDestination where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateEventDestinationResponse' smart constructor.+data UpdateEventDestinationResponse = UpdateEventDestinationResponse'+ { -- | The Amazon Resource Name (ARN) for the ConfigurationSet that was+ -- updated.+ configurationSetArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the configuration set.+ configurationSetName :: Prelude.Maybe Prelude.Text,+ -- | An EventDestination object containing the details of where events will+ -- be logged.+ eventDestination :: Prelude.Maybe EventDestination,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateEventDestinationResponse' 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:+--+-- 'configurationSetArn', 'updateEventDestinationResponse_configurationSetArn' - The Amazon Resource Name (ARN) for the ConfigurationSet that was+-- updated.+--+-- 'configurationSetName', 'updateEventDestinationResponse_configurationSetName' - The name of the configuration set.+--+-- 'eventDestination', 'updateEventDestinationResponse_eventDestination' - An EventDestination object containing the details of where events will+-- be logged.+--+-- 'httpStatus', 'updateEventDestinationResponse_httpStatus' - The response's http status code.+newUpdateEventDestinationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateEventDestinationResponse+newUpdateEventDestinationResponse pHttpStatus_ =+ UpdateEventDestinationResponse'+ { configurationSetArn =+ Prelude.Nothing,+ configurationSetName = Prelude.Nothing,+ eventDestination = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) for the ConfigurationSet that was+-- updated.+updateEventDestinationResponse_configurationSetArn :: Lens.Lens' UpdateEventDestinationResponse (Prelude.Maybe Prelude.Text)+updateEventDestinationResponse_configurationSetArn = Lens.lens (\UpdateEventDestinationResponse' {configurationSetArn} -> configurationSetArn) (\s@UpdateEventDestinationResponse' {} a -> s {configurationSetArn = a} :: UpdateEventDestinationResponse)++-- | The name of the configuration set.+updateEventDestinationResponse_configurationSetName :: Lens.Lens' UpdateEventDestinationResponse (Prelude.Maybe Prelude.Text)+updateEventDestinationResponse_configurationSetName = Lens.lens (\UpdateEventDestinationResponse' {configurationSetName} -> configurationSetName) (\s@UpdateEventDestinationResponse' {} a -> s {configurationSetName = a} :: UpdateEventDestinationResponse)++-- | An EventDestination object containing the details of where events will+-- be logged.+updateEventDestinationResponse_eventDestination :: Lens.Lens' UpdateEventDestinationResponse (Prelude.Maybe EventDestination)+updateEventDestinationResponse_eventDestination = Lens.lens (\UpdateEventDestinationResponse' {eventDestination} -> eventDestination) (\s@UpdateEventDestinationResponse' {} a -> s {eventDestination = a} :: UpdateEventDestinationResponse)++-- | The response's http status code.+updateEventDestinationResponse_httpStatus :: Lens.Lens' UpdateEventDestinationResponse Prelude.Int+updateEventDestinationResponse_httpStatus = Lens.lens (\UpdateEventDestinationResponse' {httpStatus} -> httpStatus) (\s@UpdateEventDestinationResponse' {} a -> s {httpStatus = a} :: UpdateEventDestinationResponse)++instance+ Prelude.NFData+ UpdateEventDestinationResponse+ where+ rnf UpdateEventDestinationResponse' {..} =+ Prelude.rnf configurationSetArn+ `Prelude.seq` Prelude.rnf configurationSetName+ `Prelude.seq` Prelude.rnf eventDestination+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/UpdatePhoneNumber.hs view
@@ -0,0 +1,460 @@+{-# 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.PinpointSmsVoiceV2.UpdatePhoneNumber+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates the configuration of an existing origination phone number. You+-- can update the opt-out list, enable or disable two-way messaging, change+-- the TwoWayChannelArn, enable or disable self-managed opt-outs, and+-- enable or disable deletion protection.+--+-- If the origination phone number is associated with a pool, an Error is+-- returned.+module Amazonka.PinpointSmsVoiceV2.UpdatePhoneNumber+ ( -- * Creating a Request+ UpdatePhoneNumber (..),+ newUpdatePhoneNumber,++ -- * Request Lenses+ updatePhoneNumber_deletionProtectionEnabled,+ updatePhoneNumber_optOutListName,+ updatePhoneNumber_selfManagedOptOutsEnabled,+ updatePhoneNumber_twoWayChannelArn,+ updatePhoneNumber_twoWayEnabled,+ updatePhoneNumber_phoneNumberId,++ -- * Destructuring the Response+ UpdatePhoneNumberResponse (..),+ newUpdatePhoneNumberResponse,++ -- * Response Lenses+ updatePhoneNumberResponse_createdTimestamp,+ updatePhoneNumberResponse_deletionProtectionEnabled,+ updatePhoneNumberResponse_isoCountryCode,+ updatePhoneNumberResponse_messageType,+ updatePhoneNumberResponse_monthlyLeasingPrice,+ updatePhoneNumberResponse_numberCapabilities,+ updatePhoneNumberResponse_numberType,+ updatePhoneNumberResponse_optOutListName,+ updatePhoneNumberResponse_phoneNumber,+ updatePhoneNumberResponse_phoneNumberArn,+ updatePhoneNumberResponse_phoneNumberId,+ updatePhoneNumberResponse_selfManagedOptOutsEnabled,+ updatePhoneNumberResponse_status,+ updatePhoneNumberResponse_twoWayChannelArn,+ updatePhoneNumberResponse_twoWayEnabled,+ updatePhoneNumberResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdatePhoneNumber' smart constructor.+data UpdatePhoneNumber = UpdatePhoneNumber'+ { -- | By default this is set to false. When set to true the phone number+ -- can\'t be deleted.+ deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The OptOutList to add the phone number to. Valid values for this field+ -- can be either the OutOutListName or OutOutListArn.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When an end recipient sends a message+ -- that begins with HELP or STOP to one of your dedicated numbers, Amazon+ -- Pinpoint automatically replies with a customizable message and adds the+ -- end recipient to the OptOutList. When set to true you\'re responsible+ -- for responding to HELP and STOP requests. You\'re also responsible for+ -- tracking and honoring opt-out requests.+ selfManagedOptOutsEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The Amazon Resource Name (ARN) of the two way channel.+ twoWayChannelArn :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When set to true you can receive+ -- incoming text messages from your end recipients.+ twoWayEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The unique identifier of the phone number. Valid values for this field+ -- can be either the PhoneNumberId or PhoneNumberArn.+ phoneNumberId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdatePhoneNumber' 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:+--+-- 'deletionProtectionEnabled', 'updatePhoneNumber_deletionProtectionEnabled' - By default this is set to false. When set to true the phone number+-- can\'t be deleted.+--+-- 'optOutListName', 'updatePhoneNumber_optOutListName' - The OptOutList to add the phone number to. Valid values for this field+-- can be either the OutOutListName or OutOutListArn.+--+-- 'selfManagedOptOutsEnabled', 'updatePhoneNumber_selfManagedOptOutsEnabled' - By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+--+-- 'twoWayChannelArn', 'updatePhoneNumber_twoWayChannelArn' - The Amazon Resource Name (ARN) of the two way channel.+--+-- 'twoWayEnabled', 'updatePhoneNumber_twoWayEnabled' - By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+--+-- 'phoneNumberId', 'updatePhoneNumber_phoneNumberId' - The unique identifier of the phone number. Valid values for this field+-- can be either the PhoneNumberId or PhoneNumberArn.+newUpdatePhoneNumber ::+ -- | 'phoneNumberId'+ Prelude.Text ->+ UpdatePhoneNumber+newUpdatePhoneNumber pPhoneNumberId_ =+ UpdatePhoneNumber'+ { deletionProtectionEnabled =+ Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ selfManagedOptOutsEnabled = Prelude.Nothing,+ twoWayChannelArn = Prelude.Nothing,+ twoWayEnabled = Prelude.Nothing,+ phoneNumberId = pPhoneNumberId_+ }++-- | By default this is set to false. When set to true the phone number+-- can\'t be deleted.+updatePhoneNumber_deletionProtectionEnabled :: Lens.Lens' UpdatePhoneNumber (Prelude.Maybe Prelude.Bool)+updatePhoneNumber_deletionProtectionEnabled = Lens.lens (\UpdatePhoneNumber' {deletionProtectionEnabled} -> deletionProtectionEnabled) (\s@UpdatePhoneNumber' {} a -> s {deletionProtectionEnabled = a} :: UpdatePhoneNumber)++-- | The OptOutList to add the phone number to. Valid values for this field+-- can be either the OutOutListName or OutOutListArn.+updatePhoneNumber_optOutListName :: Lens.Lens' UpdatePhoneNumber (Prelude.Maybe Prelude.Text)+updatePhoneNumber_optOutListName = Lens.lens (\UpdatePhoneNumber' {optOutListName} -> optOutListName) (\s@UpdatePhoneNumber' {} a -> s {optOutListName = a} :: UpdatePhoneNumber)++-- | By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+updatePhoneNumber_selfManagedOptOutsEnabled :: Lens.Lens' UpdatePhoneNumber (Prelude.Maybe Prelude.Bool)+updatePhoneNumber_selfManagedOptOutsEnabled = Lens.lens (\UpdatePhoneNumber' {selfManagedOptOutsEnabled} -> selfManagedOptOutsEnabled) (\s@UpdatePhoneNumber' {} a -> s {selfManagedOptOutsEnabled = a} :: UpdatePhoneNumber)++-- | The Amazon Resource Name (ARN) of the two way channel.+updatePhoneNumber_twoWayChannelArn :: Lens.Lens' UpdatePhoneNumber (Prelude.Maybe Prelude.Text)+updatePhoneNumber_twoWayChannelArn = Lens.lens (\UpdatePhoneNumber' {twoWayChannelArn} -> twoWayChannelArn) (\s@UpdatePhoneNumber' {} a -> s {twoWayChannelArn = a} :: UpdatePhoneNumber)++-- | By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+updatePhoneNumber_twoWayEnabled :: Lens.Lens' UpdatePhoneNumber (Prelude.Maybe Prelude.Bool)+updatePhoneNumber_twoWayEnabled = Lens.lens (\UpdatePhoneNumber' {twoWayEnabled} -> twoWayEnabled) (\s@UpdatePhoneNumber' {} a -> s {twoWayEnabled = a} :: UpdatePhoneNumber)++-- | The unique identifier of the phone number. Valid values for this field+-- can be either the PhoneNumberId or PhoneNumberArn.+updatePhoneNumber_phoneNumberId :: Lens.Lens' UpdatePhoneNumber Prelude.Text+updatePhoneNumber_phoneNumberId = Lens.lens (\UpdatePhoneNumber' {phoneNumberId} -> phoneNumberId) (\s@UpdatePhoneNumber' {} a -> s {phoneNumberId = a} :: UpdatePhoneNumber)++instance Core.AWSRequest UpdatePhoneNumber where+ type+ AWSResponse UpdatePhoneNumber =+ UpdatePhoneNumberResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdatePhoneNumberResponse'+ Prelude.<$> (x Data..?> "CreatedTimestamp")+ Prelude.<*> (x Data..?> "DeletionProtectionEnabled")+ Prelude.<*> (x Data..?> "IsoCountryCode")+ Prelude.<*> (x Data..?> "MessageType")+ Prelude.<*> (x Data..?> "MonthlyLeasingPrice")+ Prelude.<*> (x Data..?> "NumberCapabilities")+ Prelude.<*> (x Data..?> "NumberType")+ Prelude.<*> (x Data..?> "OptOutListName")+ Prelude.<*> (x Data..?> "PhoneNumber")+ Prelude.<*> (x Data..?> "PhoneNumberArn")+ Prelude.<*> (x Data..?> "PhoneNumberId")+ Prelude.<*> (x Data..?> "SelfManagedOptOutsEnabled")+ Prelude.<*> (x Data..?> "Status")+ Prelude.<*> (x Data..?> "TwoWayChannelArn")+ Prelude.<*> (x Data..?> "TwoWayEnabled")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdatePhoneNumber where+ hashWithSalt _salt UpdatePhoneNumber' {..} =+ _salt+ `Prelude.hashWithSalt` deletionProtectionEnabled+ `Prelude.hashWithSalt` optOutListName+ `Prelude.hashWithSalt` selfManagedOptOutsEnabled+ `Prelude.hashWithSalt` twoWayChannelArn+ `Prelude.hashWithSalt` twoWayEnabled+ `Prelude.hashWithSalt` phoneNumberId++instance Prelude.NFData UpdatePhoneNumber where+ rnf UpdatePhoneNumber' {..} =+ Prelude.rnf deletionProtectionEnabled+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf selfManagedOptOutsEnabled+ `Prelude.seq` Prelude.rnf twoWayChannelArn+ `Prelude.seq` Prelude.rnf twoWayEnabled+ `Prelude.seq` Prelude.rnf phoneNumberId++instance Data.ToHeaders UpdatePhoneNumber where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.UpdatePhoneNumber" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdatePhoneNumber where+ toJSON UpdatePhoneNumber' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DeletionProtectionEnabled" Data..=)+ Prelude.<$> deletionProtectionEnabled,+ ("OptOutListName" Data..=)+ Prelude.<$> optOutListName,+ ("SelfManagedOptOutsEnabled" Data..=)+ Prelude.<$> selfManagedOptOutsEnabled,+ ("TwoWayChannelArn" Data..=)+ Prelude.<$> twoWayChannelArn,+ ("TwoWayEnabled" Data..=) Prelude.<$> twoWayEnabled,+ Prelude.Just+ ("PhoneNumberId" Data..= phoneNumberId)+ ]+ )++instance Data.ToPath UpdatePhoneNumber where+ toPath = Prelude.const "/"++instance Data.ToQuery UpdatePhoneNumber where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdatePhoneNumberResponse' smart constructor.+data UpdatePhoneNumberResponse = UpdatePhoneNumberResponse'+ { -- | The time when the phone number was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Prelude.Maybe Data.POSIX,+ -- | When set to true the phone number can\'t be deleted.+ deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+ -- region.+ isoCountryCode :: Prelude.Maybe Prelude.Text,+ -- | The type of message. Valid values are TRANSACTIONAL for messages that+ -- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+ -- critical or time-sensitive.+ messageType :: Prelude.Maybe MessageType,+ -- | The monthly leasing price of the phone number, in US dollars.+ monthlyLeasingPrice :: Prelude.Maybe Prelude.Text,+ -- | Specifies if the number could be used for text messages, voice or both.+ numberCapabilities :: Prelude.Maybe (Prelude.NonEmpty NumberCapability),+ -- | The type of number that was requested.+ numberType :: Prelude.Maybe NumberType,+ -- | The name of the OptOutList associated with the phone number.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | The phone number that was updated.+ phoneNumber :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the updated phone number.+ phoneNumberArn :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier of the phone number.+ phoneNumberId :: Prelude.Maybe Prelude.Text,+ -- | This is true if self managed opt-out are enabled.+ selfManagedOptOutsEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The current status of the request.+ status :: Prelude.Maybe NumberStatus,+ -- | The Amazon Resource Name (ARN) of the two way channel.+ twoWayChannelArn :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When set to true you can receive+ -- incoming text messages from your end recipients.+ twoWayEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdatePhoneNumberResponse' 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:+--+-- 'createdTimestamp', 'updatePhoneNumberResponse_createdTimestamp' - The time when the phone number was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'deletionProtectionEnabled', 'updatePhoneNumberResponse_deletionProtectionEnabled' - When set to true the phone number can\'t be deleted.+--+-- 'isoCountryCode', 'updatePhoneNumberResponse_isoCountryCode' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+--+-- 'messageType', 'updatePhoneNumberResponse_messageType' - The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+--+-- 'monthlyLeasingPrice', 'updatePhoneNumberResponse_monthlyLeasingPrice' - The monthly leasing price of the phone number, in US dollars.+--+-- 'numberCapabilities', 'updatePhoneNumberResponse_numberCapabilities' - Specifies if the number could be used for text messages, voice or both.+--+-- 'numberType', 'updatePhoneNumberResponse_numberType' - The type of number that was requested.+--+-- 'optOutListName', 'updatePhoneNumberResponse_optOutListName' - The name of the OptOutList associated with the phone number.+--+-- 'phoneNumber', 'updatePhoneNumberResponse_phoneNumber' - The phone number that was updated.+--+-- 'phoneNumberArn', 'updatePhoneNumberResponse_phoneNumberArn' - The Amazon Resource Name (ARN) of the updated phone number.+--+-- 'phoneNumberId', 'updatePhoneNumberResponse_phoneNumberId' - The unique identifier of the phone number.+--+-- 'selfManagedOptOutsEnabled', 'updatePhoneNumberResponse_selfManagedOptOutsEnabled' - This is true if self managed opt-out are enabled.+--+-- 'status', 'updatePhoneNumberResponse_status' - The current status of the request.+--+-- 'twoWayChannelArn', 'updatePhoneNumberResponse_twoWayChannelArn' - The Amazon Resource Name (ARN) of the two way channel.+--+-- 'twoWayEnabled', 'updatePhoneNumberResponse_twoWayEnabled' - By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+--+-- 'httpStatus', 'updatePhoneNumberResponse_httpStatus' - The response's http status code.+newUpdatePhoneNumberResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdatePhoneNumberResponse+newUpdatePhoneNumberResponse pHttpStatus_ =+ UpdatePhoneNumberResponse'+ { createdTimestamp =+ Prelude.Nothing,+ deletionProtectionEnabled = Prelude.Nothing,+ isoCountryCode = Prelude.Nothing,+ messageType = Prelude.Nothing,+ monthlyLeasingPrice = Prelude.Nothing,+ numberCapabilities = Prelude.Nothing,+ numberType = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ phoneNumber = Prelude.Nothing,+ phoneNumberArn = Prelude.Nothing,+ phoneNumberId = Prelude.Nothing,+ selfManagedOptOutsEnabled = Prelude.Nothing,+ status = Prelude.Nothing,+ twoWayChannelArn = Prelude.Nothing,+ twoWayEnabled = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The time when the phone number was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+updatePhoneNumberResponse_createdTimestamp :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe Prelude.UTCTime)+updatePhoneNumberResponse_createdTimestamp = Lens.lens (\UpdatePhoneNumberResponse' {createdTimestamp} -> createdTimestamp) (\s@UpdatePhoneNumberResponse' {} a -> s {createdTimestamp = a} :: UpdatePhoneNumberResponse) Prelude.. Lens.mapping Data._Time++-- | When set to true the phone number can\'t be deleted.+updatePhoneNumberResponse_deletionProtectionEnabled :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe Prelude.Bool)+updatePhoneNumberResponse_deletionProtectionEnabled = Lens.lens (\UpdatePhoneNumberResponse' {deletionProtectionEnabled} -> deletionProtectionEnabled) (\s@UpdatePhoneNumberResponse' {} a -> s {deletionProtectionEnabled = a} :: UpdatePhoneNumberResponse)++-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or+-- region.+updatePhoneNumberResponse_isoCountryCode :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe Prelude.Text)+updatePhoneNumberResponse_isoCountryCode = Lens.lens (\UpdatePhoneNumberResponse' {isoCountryCode} -> isoCountryCode) (\s@UpdatePhoneNumberResponse' {} a -> s {isoCountryCode = a} :: UpdatePhoneNumberResponse)++-- | The type of message. Valid values are TRANSACTIONAL for messages that+-- are critical or time-sensitive and PROMOTIONAL for messages that aren\'t+-- critical or time-sensitive.+updatePhoneNumberResponse_messageType :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe MessageType)+updatePhoneNumberResponse_messageType = Lens.lens (\UpdatePhoneNumberResponse' {messageType} -> messageType) (\s@UpdatePhoneNumberResponse' {} a -> s {messageType = a} :: UpdatePhoneNumberResponse)++-- | The monthly leasing price of the phone number, in US dollars.+updatePhoneNumberResponse_monthlyLeasingPrice :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe Prelude.Text)+updatePhoneNumberResponse_monthlyLeasingPrice = Lens.lens (\UpdatePhoneNumberResponse' {monthlyLeasingPrice} -> monthlyLeasingPrice) (\s@UpdatePhoneNumberResponse' {} a -> s {monthlyLeasingPrice = a} :: UpdatePhoneNumberResponse)++-- | Specifies if the number could be used for text messages, voice or both.+updatePhoneNumberResponse_numberCapabilities :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe (Prelude.NonEmpty NumberCapability))+updatePhoneNumberResponse_numberCapabilities = Lens.lens (\UpdatePhoneNumberResponse' {numberCapabilities} -> numberCapabilities) (\s@UpdatePhoneNumberResponse' {} a -> s {numberCapabilities = a} :: UpdatePhoneNumberResponse) Prelude.. Lens.mapping Lens.coerced++-- | The type of number that was requested.+updatePhoneNumberResponse_numberType :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe NumberType)+updatePhoneNumberResponse_numberType = Lens.lens (\UpdatePhoneNumberResponse' {numberType} -> numberType) (\s@UpdatePhoneNumberResponse' {} a -> s {numberType = a} :: UpdatePhoneNumberResponse)++-- | The name of the OptOutList associated with the phone number.+updatePhoneNumberResponse_optOutListName :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe Prelude.Text)+updatePhoneNumberResponse_optOutListName = Lens.lens (\UpdatePhoneNumberResponse' {optOutListName} -> optOutListName) (\s@UpdatePhoneNumberResponse' {} a -> s {optOutListName = a} :: UpdatePhoneNumberResponse)++-- | The phone number that was updated.+updatePhoneNumberResponse_phoneNumber :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe Prelude.Text)+updatePhoneNumberResponse_phoneNumber = Lens.lens (\UpdatePhoneNumberResponse' {phoneNumber} -> phoneNumber) (\s@UpdatePhoneNumberResponse' {} a -> s {phoneNumber = a} :: UpdatePhoneNumberResponse)++-- | The Amazon Resource Name (ARN) of the updated phone number.+updatePhoneNumberResponse_phoneNumberArn :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe Prelude.Text)+updatePhoneNumberResponse_phoneNumberArn = Lens.lens (\UpdatePhoneNumberResponse' {phoneNumberArn} -> phoneNumberArn) (\s@UpdatePhoneNumberResponse' {} a -> s {phoneNumberArn = a} :: UpdatePhoneNumberResponse)++-- | The unique identifier of the phone number.+updatePhoneNumberResponse_phoneNumberId :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe Prelude.Text)+updatePhoneNumberResponse_phoneNumberId = Lens.lens (\UpdatePhoneNumberResponse' {phoneNumberId} -> phoneNumberId) (\s@UpdatePhoneNumberResponse' {} a -> s {phoneNumberId = a} :: UpdatePhoneNumberResponse)++-- | This is true if self managed opt-out are enabled.+updatePhoneNumberResponse_selfManagedOptOutsEnabled :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe Prelude.Bool)+updatePhoneNumberResponse_selfManagedOptOutsEnabled = Lens.lens (\UpdatePhoneNumberResponse' {selfManagedOptOutsEnabled} -> selfManagedOptOutsEnabled) (\s@UpdatePhoneNumberResponse' {} a -> s {selfManagedOptOutsEnabled = a} :: UpdatePhoneNumberResponse)++-- | The current status of the request.+updatePhoneNumberResponse_status :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe NumberStatus)+updatePhoneNumberResponse_status = Lens.lens (\UpdatePhoneNumberResponse' {status} -> status) (\s@UpdatePhoneNumberResponse' {} a -> s {status = a} :: UpdatePhoneNumberResponse)++-- | The Amazon Resource Name (ARN) of the two way channel.+updatePhoneNumberResponse_twoWayChannelArn :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe Prelude.Text)+updatePhoneNumberResponse_twoWayChannelArn = Lens.lens (\UpdatePhoneNumberResponse' {twoWayChannelArn} -> twoWayChannelArn) (\s@UpdatePhoneNumberResponse' {} a -> s {twoWayChannelArn = a} :: UpdatePhoneNumberResponse)++-- | By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+updatePhoneNumberResponse_twoWayEnabled :: Lens.Lens' UpdatePhoneNumberResponse (Prelude.Maybe Prelude.Bool)+updatePhoneNumberResponse_twoWayEnabled = Lens.lens (\UpdatePhoneNumberResponse' {twoWayEnabled} -> twoWayEnabled) (\s@UpdatePhoneNumberResponse' {} a -> s {twoWayEnabled = a} :: UpdatePhoneNumberResponse)++-- | The response's http status code.+updatePhoneNumberResponse_httpStatus :: Lens.Lens' UpdatePhoneNumberResponse Prelude.Int+updatePhoneNumberResponse_httpStatus = Lens.lens (\UpdatePhoneNumberResponse' {httpStatus} -> httpStatus) (\s@UpdatePhoneNumberResponse' {} a -> s {httpStatus = a} :: UpdatePhoneNumberResponse)++instance Prelude.NFData UpdatePhoneNumberResponse where+ rnf UpdatePhoneNumberResponse' {..} =+ Prelude.rnf createdTimestamp+ `Prelude.seq` Prelude.rnf deletionProtectionEnabled+ `Prelude.seq` Prelude.rnf isoCountryCode+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf monthlyLeasingPrice+ `Prelude.seq` Prelude.rnf numberCapabilities+ `Prelude.seq` Prelude.rnf numberType+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf phoneNumber+ `Prelude.seq` Prelude.rnf phoneNumberArn+ `Prelude.seq` Prelude.rnf phoneNumberId+ `Prelude.seq` Prelude.rnf selfManagedOptOutsEnabled+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf twoWayChannelArn+ `Prelude.seq` Prelude.rnf twoWayEnabled+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/UpdatePool.hs view
@@ -0,0 +1,423 @@+{-# 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.PinpointSmsVoiceV2.UpdatePool+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates the configuration of an existing pool. You can update the+-- opt-out list, enable or disable two-way messaging, change the+-- @TwoWayChannelArn@, enable or disable self-managed opt-outs, enable or+-- disable deletion protection, and enable or disable shared routes.+module Amazonka.PinpointSmsVoiceV2.UpdatePool+ ( -- * Creating a Request+ UpdatePool (..),+ newUpdatePool,++ -- * Request Lenses+ updatePool_deletionProtectionEnabled,+ updatePool_optOutListName,+ updatePool_selfManagedOptOutsEnabled,+ updatePool_sharedRoutesEnabled,+ updatePool_twoWayChannelArn,+ updatePool_twoWayEnabled,+ updatePool_poolId,++ -- * Destructuring the Response+ UpdatePoolResponse (..),+ newUpdatePoolResponse,++ -- * Response Lenses+ updatePoolResponse_createdTimestamp,+ updatePoolResponse_deletionProtectionEnabled,+ updatePoolResponse_messageType,+ updatePoolResponse_optOutListName,+ updatePoolResponse_poolArn,+ updatePoolResponse_poolId,+ updatePoolResponse_selfManagedOptOutsEnabled,+ updatePoolResponse_sharedRoutesEnabled,+ updatePoolResponse_status,+ updatePoolResponse_twoWayChannelArn,+ updatePoolResponse_twoWayEnabled,+ updatePoolResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdatePool' smart constructor.+data UpdatePool = UpdatePool'+ { -- | When set to true the pool can\'t be deleted.+ deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The OptOutList to associate with the pool. Valid values are either+ -- OptOutListName or OptOutListArn.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When an end recipient sends a message+ -- that begins with HELP or STOP to one of your dedicated numbers, Amazon+ -- Pinpoint automatically replies with a customizable message and adds the+ -- end recipient to the OptOutList. When set to true you\'re responsible+ -- for responding to HELP and STOP requests. You\'re also responsible for+ -- tracking and honoring opt-out requests.+ selfManagedOptOutsEnabled :: Prelude.Maybe Prelude.Bool,+ -- | Indicates whether shared routes are enabled for the pool.+ sharedRoutesEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The Amazon Resource Name (ARN) of the two way channel.+ twoWayChannelArn :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When set to true you can receive+ -- incoming text messages from your end recipients.+ twoWayEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The unique identifier of the pool to update. Valid values are either the+ -- PoolId or PoolArn.+ poolId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdatePool' 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:+--+-- 'deletionProtectionEnabled', 'updatePool_deletionProtectionEnabled' - When set to true the pool can\'t be deleted.+--+-- 'optOutListName', 'updatePool_optOutListName' - The OptOutList to associate with the pool. Valid values are either+-- OptOutListName or OptOutListArn.+--+-- 'selfManagedOptOutsEnabled', 'updatePool_selfManagedOptOutsEnabled' - By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+--+-- 'sharedRoutesEnabled', 'updatePool_sharedRoutesEnabled' - Indicates whether shared routes are enabled for the pool.+--+-- 'twoWayChannelArn', 'updatePool_twoWayChannelArn' - The Amazon Resource Name (ARN) of the two way channel.+--+-- 'twoWayEnabled', 'updatePool_twoWayEnabled' - By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+--+-- 'poolId', 'updatePool_poolId' - The unique identifier of the pool to update. Valid values are either the+-- PoolId or PoolArn.+newUpdatePool ::+ -- | 'poolId'+ Prelude.Text ->+ UpdatePool+newUpdatePool pPoolId_ =+ UpdatePool'+ { deletionProtectionEnabled =+ Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ selfManagedOptOutsEnabled = Prelude.Nothing,+ sharedRoutesEnabled = Prelude.Nothing,+ twoWayChannelArn = Prelude.Nothing,+ twoWayEnabled = Prelude.Nothing,+ poolId = pPoolId_+ }++-- | When set to true the pool can\'t be deleted.+updatePool_deletionProtectionEnabled :: Lens.Lens' UpdatePool (Prelude.Maybe Prelude.Bool)+updatePool_deletionProtectionEnabled = Lens.lens (\UpdatePool' {deletionProtectionEnabled} -> deletionProtectionEnabled) (\s@UpdatePool' {} a -> s {deletionProtectionEnabled = a} :: UpdatePool)++-- | The OptOutList to associate with the pool. Valid values are either+-- OptOutListName or OptOutListArn.+updatePool_optOutListName :: Lens.Lens' UpdatePool (Prelude.Maybe Prelude.Text)+updatePool_optOutListName = Lens.lens (\UpdatePool' {optOutListName} -> optOutListName) (\s@UpdatePool' {} a -> s {optOutListName = a} :: UpdatePool)++-- | By default this is set to false. When an end recipient sends a message+-- that begins with HELP or STOP to one of your dedicated numbers, Amazon+-- Pinpoint automatically replies with a customizable message and adds the+-- end recipient to the OptOutList. When set to true you\'re responsible+-- for responding to HELP and STOP requests. You\'re also responsible for+-- tracking and honoring opt-out requests.+updatePool_selfManagedOptOutsEnabled :: Lens.Lens' UpdatePool (Prelude.Maybe Prelude.Bool)+updatePool_selfManagedOptOutsEnabled = Lens.lens (\UpdatePool' {selfManagedOptOutsEnabled} -> selfManagedOptOutsEnabled) (\s@UpdatePool' {} a -> s {selfManagedOptOutsEnabled = a} :: UpdatePool)++-- | Indicates whether shared routes are enabled for the pool.+updatePool_sharedRoutesEnabled :: Lens.Lens' UpdatePool (Prelude.Maybe Prelude.Bool)+updatePool_sharedRoutesEnabled = Lens.lens (\UpdatePool' {sharedRoutesEnabled} -> sharedRoutesEnabled) (\s@UpdatePool' {} a -> s {sharedRoutesEnabled = a} :: UpdatePool)++-- | The Amazon Resource Name (ARN) of the two way channel.+updatePool_twoWayChannelArn :: Lens.Lens' UpdatePool (Prelude.Maybe Prelude.Text)+updatePool_twoWayChannelArn = Lens.lens (\UpdatePool' {twoWayChannelArn} -> twoWayChannelArn) (\s@UpdatePool' {} a -> s {twoWayChannelArn = a} :: UpdatePool)++-- | By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+updatePool_twoWayEnabled :: Lens.Lens' UpdatePool (Prelude.Maybe Prelude.Bool)+updatePool_twoWayEnabled = Lens.lens (\UpdatePool' {twoWayEnabled} -> twoWayEnabled) (\s@UpdatePool' {} a -> s {twoWayEnabled = a} :: UpdatePool)++-- | The unique identifier of the pool to update. Valid values are either the+-- PoolId or PoolArn.+updatePool_poolId :: Lens.Lens' UpdatePool Prelude.Text+updatePool_poolId = Lens.lens (\UpdatePool' {poolId} -> poolId) (\s@UpdatePool' {} a -> s {poolId = a} :: UpdatePool)++instance Core.AWSRequest UpdatePool where+ type AWSResponse UpdatePool = UpdatePoolResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdatePoolResponse'+ Prelude.<$> (x Data..?> "CreatedTimestamp")+ Prelude.<*> (x Data..?> "DeletionProtectionEnabled")+ Prelude.<*> (x Data..?> "MessageType")+ Prelude.<*> (x Data..?> "OptOutListName")+ Prelude.<*> (x Data..?> "PoolArn")+ Prelude.<*> (x Data..?> "PoolId")+ Prelude.<*> (x Data..?> "SelfManagedOptOutsEnabled")+ Prelude.<*> (x Data..?> "SharedRoutesEnabled")+ Prelude.<*> (x Data..?> "Status")+ Prelude.<*> (x Data..?> "TwoWayChannelArn")+ Prelude.<*> (x Data..?> "TwoWayEnabled")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdatePool where+ hashWithSalt _salt UpdatePool' {..} =+ _salt+ `Prelude.hashWithSalt` deletionProtectionEnabled+ `Prelude.hashWithSalt` optOutListName+ `Prelude.hashWithSalt` selfManagedOptOutsEnabled+ `Prelude.hashWithSalt` sharedRoutesEnabled+ `Prelude.hashWithSalt` twoWayChannelArn+ `Prelude.hashWithSalt` twoWayEnabled+ `Prelude.hashWithSalt` poolId++instance Prelude.NFData UpdatePool where+ rnf UpdatePool' {..} =+ Prelude.rnf deletionProtectionEnabled+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf selfManagedOptOutsEnabled+ `Prelude.seq` Prelude.rnf sharedRoutesEnabled+ `Prelude.seq` Prelude.rnf twoWayChannelArn+ `Prelude.seq` Prelude.rnf twoWayEnabled+ `Prelude.seq` Prelude.rnf poolId++instance Data.ToHeaders UpdatePool where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "PinpointSMSVoiceV2.UpdatePool" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdatePool where+ toJSON UpdatePool' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DeletionProtectionEnabled" Data..=)+ Prelude.<$> deletionProtectionEnabled,+ ("OptOutListName" Data..=)+ Prelude.<$> optOutListName,+ ("SelfManagedOptOutsEnabled" Data..=)+ Prelude.<$> selfManagedOptOutsEnabled,+ ("SharedRoutesEnabled" Data..=)+ Prelude.<$> sharedRoutesEnabled,+ ("TwoWayChannelArn" Data..=)+ Prelude.<$> twoWayChannelArn,+ ("TwoWayEnabled" Data..=) Prelude.<$> twoWayEnabled,+ Prelude.Just ("PoolId" Data..= poolId)+ ]+ )++instance Data.ToPath UpdatePool where+ toPath = Prelude.const "/"++instance Data.ToQuery UpdatePool where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdatePoolResponse' smart constructor.+data UpdatePoolResponse = UpdatePoolResponse'+ { -- | The time when the pool was created, in+ -- <https://www.epochconverter.com/ UNIX epoch time> format.+ createdTimestamp :: Prelude.Maybe Data.POSIX,+ -- | When set to true the pool can\'t be deleted.+ deletionProtectionEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The type of message for the pool to use.+ messageType :: Prelude.Maybe MessageType,+ -- | The name of the OptOutList associated with the pool.+ optOutListName :: Prelude.Maybe Prelude.Text,+ -- | The ARN of the pool.+ poolArn :: Prelude.Maybe Prelude.Text,+ -- | The unique identifier of the pool.+ poolId :: Prelude.Maybe Prelude.Text,+ -- | When an end recipient sends a message that begins with HELP or STOP to+ -- one of your dedicated numbers, Amazon Pinpoint automatically replies+ -- with a customizable message and adds the end recipient to the+ -- OptOutList. When set to true you\'re responsible for responding to HELP+ -- and STOP requests. You\'re also responsible for tracking and honoring+ -- opt-out requests.+ selfManagedOptOutsEnabled :: Prelude.Maybe Prelude.Bool,+ -- | Indicates whether shared routes are enabled for the pool.+ sharedRoutesEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The current status of the pool update request.+ status :: Prelude.Maybe PoolStatus,+ -- | The Amazon Resource Name (ARN) of the two way channel.+ twoWayChannelArn :: Prelude.Maybe Prelude.Text,+ -- | By default this is set to false. When set to true you can receive+ -- incoming text messages from your end recipients.+ twoWayEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdatePoolResponse' 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:+--+-- 'createdTimestamp', 'updatePoolResponse_createdTimestamp' - The time when the pool was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+--+-- 'deletionProtectionEnabled', 'updatePoolResponse_deletionProtectionEnabled' - When set to true the pool can\'t be deleted.+--+-- 'messageType', 'updatePoolResponse_messageType' - The type of message for the pool to use.+--+-- 'optOutListName', 'updatePoolResponse_optOutListName' - The name of the OptOutList associated with the pool.+--+-- 'poolArn', 'updatePoolResponse_poolArn' - The ARN of the pool.+--+-- 'poolId', 'updatePoolResponse_poolId' - The unique identifier of the pool.+--+-- 'selfManagedOptOutsEnabled', 'updatePoolResponse_selfManagedOptOutsEnabled' - When an end recipient sends a message that begins with HELP or STOP to+-- one of your dedicated numbers, Amazon Pinpoint automatically replies+-- with a customizable message and adds the end recipient to the+-- OptOutList. When set to true you\'re responsible for responding to HELP+-- and STOP requests. You\'re also responsible for tracking and honoring+-- opt-out requests.+--+-- 'sharedRoutesEnabled', 'updatePoolResponse_sharedRoutesEnabled' - Indicates whether shared routes are enabled for the pool.+--+-- 'status', 'updatePoolResponse_status' - The current status of the pool update request.+--+-- 'twoWayChannelArn', 'updatePoolResponse_twoWayChannelArn' - The Amazon Resource Name (ARN) of the two way channel.+--+-- 'twoWayEnabled', 'updatePoolResponse_twoWayEnabled' - By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+--+-- 'httpStatus', 'updatePoolResponse_httpStatus' - The response's http status code.+newUpdatePoolResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdatePoolResponse+newUpdatePoolResponse pHttpStatus_ =+ UpdatePoolResponse'+ { createdTimestamp =+ Prelude.Nothing,+ deletionProtectionEnabled = Prelude.Nothing,+ messageType = Prelude.Nothing,+ optOutListName = Prelude.Nothing,+ poolArn = Prelude.Nothing,+ poolId = Prelude.Nothing,+ selfManagedOptOutsEnabled = Prelude.Nothing,+ sharedRoutesEnabled = Prelude.Nothing,+ status = Prelude.Nothing,+ twoWayChannelArn = Prelude.Nothing,+ twoWayEnabled = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The time when the pool was created, in+-- <https://www.epochconverter.com/ UNIX epoch time> format.+updatePoolResponse_createdTimestamp :: Lens.Lens' UpdatePoolResponse (Prelude.Maybe Prelude.UTCTime)+updatePoolResponse_createdTimestamp = Lens.lens (\UpdatePoolResponse' {createdTimestamp} -> createdTimestamp) (\s@UpdatePoolResponse' {} a -> s {createdTimestamp = a} :: UpdatePoolResponse) Prelude.. Lens.mapping Data._Time++-- | When set to true the pool can\'t be deleted.+updatePoolResponse_deletionProtectionEnabled :: Lens.Lens' UpdatePoolResponse (Prelude.Maybe Prelude.Bool)+updatePoolResponse_deletionProtectionEnabled = Lens.lens (\UpdatePoolResponse' {deletionProtectionEnabled} -> deletionProtectionEnabled) (\s@UpdatePoolResponse' {} a -> s {deletionProtectionEnabled = a} :: UpdatePoolResponse)++-- | The type of message for the pool to use.+updatePoolResponse_messageType :: Lens.Lens' UpdatePoolResponse (Prelude.Maybe MessageType)+updatePoolResponse_messageType = Lens.lens (\UpdatePoolResponse' {messageType} -> messageType) (\s@UpdatePoolResponse' {} a -> s {messageType = a} :: UpdatePoolResponse)++-- | The name of the OptOutList associated with the pool.+updatePoolResponse_optOutListName :: Lens.Lens' UpdatePoolResponse (Prelude.Maybe Prelude.Text)+updatePoolResponse_optOutListName = Lens.lens (\UpdatePoolResponse' {optOutListName} -> optOutListName) (\s@UpdatePoolResponse' {} a -> s {optOutListName = a} :: UpdatePoolResponse)++-- | The ARN of the pool.+updatePoolResponse_poolArn :: Lens.Lens' UpdatePoolResponse (Prelude.Maybe Prelude.Text)+updatePoolResponse_poolArn = Lens.lens (\UpdatePoolResponse' {poolArn} -> poolArn) (\s@UpdatePoolResponse' {} a -> s {poolArn = a} :: UpdatePoolResponse)++-- | The unique identifier of the pool.+updatePoolResponse_poolId :: Lens.Lens' UpdatePoolResponse (Prelude.Maybe Prelude.Text)+updatePoolResponse_poolId = Lens.lens (\UpdatePoolResponse' {poolId} -> poolId) (\s@UpdatePoolResponse' {} a -> s {poolId = a} :: UpdatePoolResponse)++-- | When an end recipient sends a message that begins with HELP or STOP to+-- one of your dedicated numbers, Amazon Pinpoint automatically replies+-- with a customizable message and adds the end recipient to the+-- OptOutList. When set to true you\'re responsible for responding to HELP+-- and STOP requests. You\'re also responsible for tracking and honoring+-- opt-out requests.+updatePoolResponse_selfManagedOptOutsEnabled :: Lens.Lens' UpdatePoolResponse (Prelude.Maybe Prelude.Bool)+updatePoolResponse_selfManagedOptOutsEnabled = Lens.lens (\UpdatePoolResponse' {selfManagedOptOutsEnabled} -> selfManagedOptOutsEnabled) (\s@UpdatePoolResponse' {} a -> s {selfManagedOptOutsEnabled = a} :: UpdatePoolResponse)++-- | Indicates whether shared routes are enabled for the pool.+updatePoolResponse_sharedRoutesEnabled :: Lens.Lens' UpdatePoolResponse (Prelude.Maybe Prelude.Bool)+updatePoolResponse_sharedRoutesEnabled = Lens.lens (\UpdatePoolResponse' {sharedRoutesEnabled} -> sharedRoutesEnabled) (\s@UpdatePoolResponse' {} a -> s {sharedRoutesEnabled = a} :: UpdatePoolResponse)++-- | The current status of the pool update request.+updatePoolResponse_status :: Lens.Lens' UpdatePoolResponse (Prelude.Maybe PoolStatus)+updatePoolResponse_status = Lens.lens (\UpdatePoolResponse' {status} -> status) (\s@UpdatePoolResponse' {} a -> s {status = a} :: UpdatePoolResponse)++-- | The Amazon Resource Name (ARN) of the two way channel.+updatePoolResponse_twoWayChannelArn :: Lens.Lens' UpdatePoolResponse (Prelude.Maybe Prelude.Text)+updatePoolResponse_twoWayChannelArn = Lens.lens (\UpdatePoolResponse' {twoWayChannelArn} -> twoWayChannelArn) (\s@UpdatePoolResponse' {} a -> s {twoWayChannelArn = a} :: UpdatePoolResponse)++-- | By default this is set to false. When set to true you can receive+-- incoming text messages from your end recipients.+updatePoolResponse_twoWayEnabled :: Lens.Lens' UpdatePoolResponse (Prelude.Maybe Prelude.Bool)+updatePoolResponse_twoWayEnabled = Lens.lens (\UpdatePoolResponse' {twoWayEnabled} -> twoWayEnabled) (\s@UpdatePoolResponse' {} a -> s {twoWayEnabled = a} :: UpdatePoolResponse)++-- | The response's http status code.+updatePoolResponse_httpStatus :: Lens.Lens' UpdatePoolResponse Prelude.Int+updatePoolResponse_httpStatus = Lens.lens (\UpdatePoolResponse' {httpStatus} -> httpStatus) (\s@UpdatePoolResponse' {} a -> s {httpStatus = a} :: UpdatePoolResponse)++instance Prelude.NFData UpdatePoolResponse where+ rnf UpdatePoolResponse' {..} =+ Prelude.rnf createdTimestamp+ `Prelude.seq` Prelude.rnf deletionProtectionEnabled+ `Prelude.seq` Prelude.rnf messageType+ `Prelude.seq` Prelude.rnf optOutListName+ `Prelude.seq` Prelude.rnf poolArn+ `Prelude.seq` Prelude.rnf poolId+ `Prelude.seq` Prelude.rnf selfManagedOptOutsEnabled+ `Prelude.seq` Prelude.rnf sharedRoutesEnabled+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf twoWayChannelArn+ `Prelude.seq` Prelude.rnf twoWayEnabled+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/PinpointSmsVoiceV2/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.PinpointSmsVoiceV2.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.PinpointSmsVoiceV2.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.PinpointSmsVoiceV2.Lens+import Amazonka.PinpointSmsVoiceV2.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.PinpointSmsVoiceV2+import Test.Amazonka.PinpointSmsVoiceV2.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "PinpointSmsVoiceV2"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/Gen/PinpointSmsVoiceV2.hs view
@@ -0,0 +1,898 @@+{-# 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.PinpointSmsVoiceV2+-- 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.PinpointSmsVoiceV2 where++import Amazonka.PinpointSmsVoiceV2+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.PinpointSmsVoiceV2.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"+-- [ requestAssociateOriginationIdentity $+-- newAssociateOriginationIdentity+--+-- , requestCreateConfigurationSet $+-- newCreateConfigurationSet+--+-- , requestCreateEventDestination $+-- newCreateEventDestination+--+-- , requestCreateOptOutList $+-- newCreateOptOutList+--+-- , requestCreatePool $+-- newCreatePool+--+-- , requestDeleteConfigurationSet $+-- newDeleteConfigurationSet+--+-- , requestDeleteDefaultMessageType $+-- newDeleteDefaultMessageType+--+-- , requestDeleteDefaultSenderId $+-- newDeleteDefaultSenderId+--+-- , requestDeleteEventDestination $+-- newDeleteEventDestination+--+-- , requestDeleteKeyword $+-- newDeleteKeyword+--+-- , requestDeleteOptOutList $+-- newDeleteOptOutList+--+-- , requestDeleteOptedOutNumber $+-- newDeleteOptedOutNumber+--+-- , requestDeletePool $+-- newDeletePool+--+-- , requestDeleteTextMessageSpendLimitOverride $+-- newDeleteTextMessageSpendLimitOverride+--+-- , requestDeleteVoiceMessageSpendLimitOverride $+-- newDeleteVoiceMessageSpendLimitOverride+--+-- , requestDescribeAccountAttributes $+-- newDescribeAccountAttributes+--+-- , requestDescribeAccountLimits $+-- newDescribeAccountLimits+--+-- , requestDescribeConfigurationSets $+-- newDescribeConfigurationSets+--+-- , requestDescribeKeywords $+-- newDescribeKeywords+--+-- , requestDescribeOptOutLists $+-- newDescribeOptOutLists+--+-- , requestDescribeOptedOutNumbers $+-- newDescribeOptedOutNumbers+--+-- , requestDescribePhoneNumbers $+-- newDescribePhoneNumbers+--+-- , requestDescribePools $+-- newDescribePools+--+-- , requestDescribeSenderIds $+-- newDescribeSenderIds+--+-- , requestDescribeSpendLimits $+-- newDescribeSpendLimits+--+-- , requestDisassociateOriginationIdentity $+-- newDisassociateOriginationIdentity+--+-- , requestListPoolOriginationIdentities $+-- newListPoolOriginationIdentities+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestPutKeyword $+-- newPutKeyword+--+-- , requestPutOptedOutNumber $+-- newPutOptedOutNumber+--+-- , requestReleasePhoneNumber $+-- newReleasePhoneNumber+--+-- , requestRequestPhoneNumber $+-- newRequestPhoneNumber+--+-- , requestSendTextMessage $+-- newSendTextMessage+--+-- , requestSendVoiceMessage $+-- newSendVoiceMessage+--+-- , requestSetDefaultMessageType $+-- newSetDefaultMessageType+--+-- , requestSetDefaultSenderId $+-- newSetDefaultSenderId+--+-- , requestSetTextMessageSpendLimitOverride $+-- newSetTextMessageSpendLimitOverride+--+-- , requestSetVoiceMessageSpendLimitOverride $+-- newSetVoiceMessageSpendLimitOverride+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateEventDestination $+-- newUpdateEventDestination+--+-- , requestUpdatePhoneNumber $+-- newUpdatePhoneNumber+--+-- , requestUpdatePool $+-- newUpdatePool+--+-- ]++-- , testGroup "response"+-- [ responseAssociateOriginationIdentity $+-- newAssociateOriginationIdentityResponse+--+-- , responseCreateConfigurationSet $+-- newCreateConfigurationSetResponse+--+-- , responseCreateEventDestination $+-- newCreateEventDestinationResponse+--+-- , responseCreateOptOutList $+-- newCreateOptOutListResponse+--+-- , responseCreatePool $+-- newCreatePoolResponse+--+-- , responseDeleteConfigurationSet $+-- newDeleteConfigurationSetResponse+--+-- , responseDeleteDefaultMessageType $+-- newDeleteDefaultMessageTypeResponse+--+-- , responseDeleteDefaultSenderId $+-- newDeleteDefaultSenderIdResponse+--+-- , responseDeleteEventDestination $+-- newDeleteEventDestinationResponse+--+-- , responseDeleteKeyword $+-- newDeleteKeywordResponse+--+-- , responseDeleteOptOutList $+-- newDeleteOptOutListResponse+--+-- , responseDeleteOptedOutNumber $+-- newDeleteOptedOutNumberResponse+--+-- , responseDeletePool $+-- newDeletePoolResponse+--+-- , responseDeleteTextMessageSpendLimitOverride $+-- newDeleteTextMessageSpendLimitOverrideResponse+--+-- , responseDeleteVoiceMessageSpendLimitOverride $+-- newDeleteVoiceMessageSpendLimitOverrideResponse+--+-- , responseDescribeAccountAttributes $+-- newDescribeAccountAttributesResponse+--+-- , responseDescribeAccountLimits $+-- newDescribeAccountLimitsResponse+--+-- , responseDescribeConfigurationSets $+-- newDescribeConfigurationSetsResponse+--+-- , responseDescribeKeywords $+-- newDescribeKeywordsResponse+--+-- , responseDescribeOptOutLists $+-- newDescribeOptOutListsResponse+--+-- , responseDescribeOptedOutNumbers $+-- newDescribeOptedOutNumbersResponse+--+-- , responseDescribePhoneNumbers $+-- newDescribePhoneNumbersResponse+--+-- , responseDescribePools $+-- newDescribePoolsResponse+--+-- , responseDescribeSenderIds $+-- newDescribeSenderIdsResponse+--+-- , responseDescribeSpendLimits $+-- newDescribeSpendLimitsResponse+--+-- , responseDisassociateOriginationIdentity $+-- newDisassociateOriginationIdentityResponse+--+-- , responseListPoolOriginationIdentities $+-- newListPoolOriginationIdentitiesResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responsePutKeyword $+-- newPutKeywordResponse+--+-- , responsePutOptedOutNumber $+-- newPutOptedOutNumberResponse+--+-- , responseReleasePhoneNumber $+-- newReleasePhoneNumberResponse+--+-- , responseRequestPhoneNumber $+-- newRequestPhoneNumberResponse+--+-- , responseSendTextMessage $+-- newSendTextMessageResponse+--+-- , responseSendVoiceMessage $+-- newSendVoiceMessageResponse+--+-- , responseSetDefaultMessageType $+-- newSetDefaultMessageTypeResponse+--+-- , responseSetDefaultSenderId $+-- newSetDefaultSenderIdResponse+--+-- , responseSetTextMessageSpendLimitOverride $+-- newSetTextMessageSpendLimitOverrideResponse+--+-- , responseSetVoiceMessageSpendLimitOverride $+-- newSetVoiceMessageSpendLimitOverrideResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateEventDestination $+-- newUpdateEventDestinationResponse+--+-- , responseUpdatePhoneNumber $+-- newUpdatePhoneNumberResponse+--+-- , responseUpdatePool $+-- newUpdatePoolResponse+--+-- ]+-- ]++-- Requests++requestAssociateOriginationIdentity :: AssociateOriginationIdentity -> TestTree+requestAssociateOriginationIdentity =+ req+ "AssociateOriginationIdentity"+ "fixture/AssociateOriginationIdentity.yaml"++requestCreateConfigurationSet :: CreateConfigurationSet -> TestTree+requestCreateConfigurationSet =+ req+ "CreateConfigurationSet"+ "fixture/CreateConfigurationSet.yaml"++requestCreateEventDestination :: CreateEventDestination -> TestTree+requestCreateEventDestination =+ req+ "CreateEventDestination"+ "fixture/CreateEventDestination.yaml"++requestCreateOptOutList :: CreateOptOutList -> TestTree+requestCreateOptOutList =+ req+ "CreateOptOutList"+ "fixture/CreateOptOutList.yaml"++requestCreatePool :: CreatePool -> TestTree+requestCreatePool =+ req+ "CreatePool"+ "fixture/CreatePool.yaml"++requestDeleteConfigurationSet :: DeleteConfigurationSet -> TestTree+requestDeleteConfigurationSet =+ req+ "DeleteConfigurationSet"+ "fixture/DeleteConfigurationSet.yaml"++requestDeleteDefaultMessageType :: DeleteDefaultMessageType -> TestTree+requestDeleteDefaultMessageType =+ req+ "DeleteDefaultMessageType"+ "fixture/DeleteDefaultMessageType.yaml"++requestDeleteDefaultSenderId :: DeleteDefaultSenderId -> TestTree+requestDeleteDefaultSenderId =+ req+ "DeleteDefaultSenderId"+ "fixture/DeleteDefaultSenderId.yaml"++requestDeleteEventDestination :: DeleteEventDestination -> TestTree+requestDeleteEventDestination =+ req+ "DeleteEventDestination"+ "fixture/DeleteEventDestination.yaml"++requestDeleteKeyword :: DeleteKeyword -> TestTree+requestDeleteKeyword =+ req+ "DeleteKeyword"+ "fixture/DeleteKeyword.yaml"++requestDeleteOptOutList :: DeleteOptOutList -> TestTree+requestDeleteOptOutList =+ req+ "DeleteOptOutList"+ "fixture/DeleteOptOutList.yaml"++requestDeleteOptedOutNumber :: DeleteOptedOutNumber -> TestTree+requestDeleteOptedOutNumber =+ req+ "DeleteOptedOutNumber"+ "fixture/DeleteOptedOutNumber.yaml"++requestDeletePool :: DeletePool -> TestTree+requestDeletePool =+ req+ "DeletePool"+ "fixture/DeletePool.yaml"++requestDeleteTextMessageSpendLimitOverride :: DeleteTextMessageSpendLimitOverride -> TestTree+requestDeleteTextMessageSpendLimitOverride =+ req+ "DeleteTextMessageSpendLimitOverride"+ "fixture/DeleteTextMessageSpendLimitOverride.yaml"++requestDeleteVoiceMessageSpendLimitOverride :: DeleteVoiceMessageSpendLimitOverride -> TestTree+requestDeleteVoiceMessageSpendLimitOverride =+ req+ "DeleteVoiceMessageSpendLimitOverride"+ "fixture/DeleteVoiceMessageSpendLimitOverride.yaml"++requestDescribeAccountAttributes :: DescribeAccountAttributes -> TestTree+requestDescribeAccountAttributes =+ req+ "DescribeAccountAttributes"+ "fixture/DescribeAccountAttributes.yaml"++requestDescribeAccountLimits :: DescribeAccountLimits -> TestTree+requestDescribeAccountLimits =+ req+ "DescribeAccountLimits"+ "fixture/DescribeAccountLimits.yaml"++requestDescribeConfigurationSets :: DescribeConfigurationSets -> TestTree+requestDescribeConfigurationSets =+ req+ "DescribeConfigurationSets"+ "fixture/DescribeConfigurationSets.yaml"++requestDescribeKeywords :: DescribeKeywords -> TestTree+requestDescribeKeywords =+ req+ "DescribeKeywords"+ "fixture/DescribeKeywords.yaml"++requestDescribeOptOutLists :: DescribeOptOutLists -> TestTree+requestDescribeOptOutLists =+ req+ "DescribeOptOutLists"+ "fixture/DescribeOptOutLists.yaml"++requestDescribeOptedOutNumbers :: DescribeOptedOutNumbers -> TestTree+requestDescribeOptedOutNumbers =+ req+ "DescribeOptedOutNumbers"+ "fixture/DescribeOptedOutNumbers.yaml"++requestDescribePhoneNumbers :: DescribePhoneNumbers -> TestTree+requestDescribePhoneNumbers =+ req+ "DescribePhoneNumbers"+ "fixture/DescribePhoneNumbers.yaml"++requestDescribePools :: DescribePools -> TestTree+requestDescribePools =+ req+ "DescribePools"+ "fixture/DescribePools.yaml"++requestDescribeSenderIds :: DescribeSenderIds -> TestTree+requestDescribeSenderIds =+ req+ "DescribeSenderIds"+ "fixture/DescribeSenderIds.yaml"++requestDescribeSpendLimits :: DescribeSpendLimits -> TestTree+requestDescribeSpendLimits =+ req+ "DescribeSpendLimits"+ "fixture/DescribeSpendLimits.yaml"++requestDisassociateOriginationIdentity :: DisassociateOriginationIdentity -> TestTree+requestDisassociateOriginationIdentity =+ req+ "DisassociateOriginationIdentity"+ "fixture/DisassociateOriginationIdentity.yaml"++requestListPoolOriginationIdentities :: ListPoolOriginationIdentities -> TestTree+requestListPoolOriginationIdentities =+ req+ "ListPoolOriginationIdentities"+ "fixture/ListPoolOriginationIdentities.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestPutKeyword :: PutKeyword -> TestTree+requestPutKeyword =+ req+ "PutKeyword"+ "fixture/PutKeyword.yaml"++requestPutOptedOutNumber :: PutOptedOutNumber -> TestTree+requestPutOptedOutNumber =+ req+ "PutOptedOutNumber"+ "fixture/PutOptedOutNumber.yaml"++requestReleasePhoneNumber :: ReleasePhoneNumber -> TestTree+requestReleasePhoneNumber =+ req+ "ReleasePhoneNumber"+ "fixture/ReleasePhoneNumber.yaml"++requestRequestPhoneNumber :: RequestPhoneNumber -> TestTree+requestRequestPhoneNumber =+ req+ "RequestPhoneNumber"+ "fixture/RequestPhoneNumber.yaml"++requestSendTextMessage :: SendTextMessage -> TestTree+requestSendTextMessage =+ req+ "SendTextMessage"+ "fixture/SendTextMessage.yaml"++requestSendVoiceMessage :: SendVoiceMessage -> TestTree+requestSendVoiceMessage =+ req+ "SendVoiceMessage"+ "fixture/SendVoiceMessage.yaml"++requestSetDefaultMessageType :: SetDefaultMessageType -> TestTree+requestSetDefaultMessageType =+ req+ "SetDefaultMessageType"+ "fixture/SetDefaultMessageType.yaml"++requestSetDefaultSenderId :: SetDefaultSenderId -> TestTree+requestSetDefaultSenderId =+ req+ "SetDefaultSenderId"+ "fixture/SetDefaultSenderId.yaml"++requestSetTextMessageSpendLimitOverride :: SetTextMessageSpendLimitOverride -> TestTree+requestSetTextMessageSpendLimitOverride =+ req+ "SetTextMessageSpendLimitOverride"+ "fixture/SetTextMessageSpendLimitOverride.yaml"++requestSetVoiceMessageSpendLimitOverride :: SetVoiceMessageSpendLimitOverride -> TestTree+requestSetVoiceMessageSpendLimitOverride =+ req+ "SetVoiceMessageSpendLimitOverride"+ "fixture/SetVoiceMessageSpendLimitOverride.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateEventDestination :: UpdateEventDestination -> TestTree+requestUpdateEventDestination =+ req+ "UpdateEventDestination"+ "fixture/UpdateEventDestination.yaml"++requestUpdatePhoneNumber :: UpdatePhoneNumber -> TestTree+requestUpdatePhoneNumber =+ req+ "UpdatePhoneNumber"+ "fixture/UpdatePhoneNumber.yaml"++requestUpdatePool :: UpdatePool -> TestTree+requestUpdatePool =+ req+ "UpdatePool"+ "fixture/UpdatePool.yaml"++-- Responses++responseAssociateOriginationIdentity :: AssociateOriginationIdentityResponse -> TestTree+responseAssociateOriginationIdentity =+ res+ "AssociateOriginationIdentityResponse"+ "fixture/AssociateOriginationIdentityResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy AssociateOriginationIdentity)++responseCreateConfigurationSet :: CreateConfigurationSetResponse -> TestTree+responseCreateConfigurationSet =+ res+ "CreateConfigurationSetResponse"+ "fixture/CreateConfigurationSetResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateConfigurationSet)++responseCreateEventDestination :: CreateEventDestinationResponse -> TestTree+responseCreateEventDestination =+ res+ "CreateEventDestinationResponse"+ "fixture/CreateEventDestinationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateEventDestination)++responseCreateOptOutList :: CreateOptOutListResponse -> TestTree+responseCreateOptOutList =+ res+ "CreateOptOutListResponse"+ "fixture/CreateOptOutListResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateOptOutList)++responseCreatePool :: CreatePoolResponse -> TestTree+responseCreatePool =+ res+ "CreatePoolResponse"+ "fixture/CreatePoolResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreatePool)++responseDeleteConfigurationSet :: DeleteConfigurationSetResponse -> TestTree+responseDeleteConfigurationSet =+ res+ "DeleteConfigurationSetResponse"+ "fixture/DeleteConfigurationSetResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteConfigurationSet)++responseDeleteDefaultMessageType :: DeleteDefaultMessageTypeResponse -> TestTree+responseDeleteDefaultMessageType =+ res+ "DeleteDefaultMessageTypeResponse"+ "fixture/DeleteDefaultMessageTypeResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteDefaultMessageType)++responseDeleteDefaultSenderId :: DeleteDefaultSenderIdResponse -> TestTree+responseDeleteDefaultSenderId =+ res+ "DeleteDefaultSenderIdResponse"+ "fixture/DeleteDefaultSenderIdResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteDefaultSenderId)++responseDeleteEventDestination :: DeleteEventDestinationResponse -> TestTree+responseDeleteEventDestination =+ res+ "DeleteEventDestinationResponse"+ "fixture/DeleteEventDestinationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteEventDestination)++responseDeleteKeyword :: DeleteKeywordResponse -> TestTree+responseDeleteKeyword =+ res+ "DeleteKeywordResponse"+ "fixture/DeleteKeywordResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteKeyword)++responseDeleteOptOutList :: DeleteOptOutListResponse -> TestTree+responseDeleteOptOutList =+ res+ "DeleteOptOutListResponse"+ "fixture/DeleteOptOutListResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteOptOutList)++responseDeleteOptedOutNumber :: DeleteOptedOutNumberResponse -> TestTree+responseDeleteOptedOutNumber =+ res+ "DeleteOptedOutNumberResponse"+ "fixture/DeleteOptedOutNumberResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteOptedOutNumber)++responseDeletePool :: DeletePoolResponse -> TestTree+responseDeletePool =+ res+ "DeletePoolResponse"+ "fixture/DeletePoolResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeletePool)++responseDeleteTextMessageSpendLimitOverride :: DeleteTextMessageSpendLimitOverrideResponse -> TestTree+responseDeleteTextMessageSpendLimitOverride =+ res+ "DeleteTextMessageSpendLimitOverrideResponse"+ "fixture/DeleteTextMessageSpendLimitOverrideResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteTextMessageSpendLimitOverride)++responseDeleteVoiceMessageSpendLimitOverride :: DeleteVoiceMessageSpendLimitOverrideResponse -> TestTree+responseDeleteVoiceMessageSpendLimitOverride =+ res+ "DeleteVoiceMessageSpendLimitOverrideResponse"+ "fixture/DeleteVoiceMessageSpendLimitOverrideResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteVoiceMessageSpendLimitOverride)++responseDescribeAccountAttributes :: DescribeAccountAttributesResponse -> TestTree+responseDescribeAccountAttributes =+ res+ "DescribeAccountAttributesResponse"+ "fixture/DescribeAccountAttributesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeAccountAttributes)++responseDescribeAccountLimits :: DescribeAccountLimitsResponse -> TestTree+responseDescribeAccountLimits =+ res+ "DescribeAccountLimitsResponse"+ "fixture/DescribeAccountLimitsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeAccountLimits)++responseDescribeConfigurationSets :: DescribeConfigurationSetsResponse -> TestTree+responseDescribeConfigurationSets =+ res+ "DescribeConfigurationSetsResponse"+ "fixture/DescribeConfigurationSetsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeConfigurationSets)++responseDescribeKeywords :: DescribeKeywordsResponse -> TestTree+responseDescribeKeywords =+ res+ "DescribeKeywordsResponse"+ "fixture/DescribeKeywordsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeKeywords)++responseDescribeOptOutLists :: DescribeOptOutListsResponse -> TestTree+responseDescribeOptOutLists =+ res+ "DescribeOptOutListsResponse"+ "fixture/DescribeOptOutListsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeOptOutLists)++responseDescribeOptedOutNumbers :: DescribeOptedOutNumbersResponse -> TestTree+responseDescribeOptedOutNumbers =+ res+ "DescribeOptedOutNumbersResponse"+ "fixture/DescribeOptedOutNumbersResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeOptedOutNumbers)++responseDescribePhoneNumbers :: DescribePhoneNumbersResponse -> TestTree+responseDescribePhoneNumbers =+ res+ "DescribePhoneNumbersResponse"+ "fixture/DescribePhoneNumbersResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribePhoneNumbers)++responseDescribePools :: DescribePoolsResponse -> TestTree+responseDescribePools =+ res+ "DescribePoolsResponse"+ "fixture/DescribePoolsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribePools)++responseDescribeSenderIds :: DescribeSenderIdsResponse -> TestTree+responseDescribeSenderIds =+ res+ "DescribeSenderIdsResponse"+ "fixture/DescribeSenderIdsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeSenderIds)++responseDescribeSpendLimits :: DescribeSpendLimitsResponse -> TestTree+responseDescribeSpendLimits =+ res+ "DescribeSpendLimitsResponse"+ "fixture/DescribeSpendLimitsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeSpendLimits)++responseDisassociateOriginationIdentity :: DisassociateOriginationIdentityResponse -> TestTree+responseDisassociateOriginationIdentity =+ res+ "DisassociateOriginationIdentityResponse"+ "fixture/DisassociateOriginationIdentityResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DisassociateOriginationIdentity)++responseListPoolOriginationIdentities :: ListPoolOriginationIdentitiesResponse -> TestTree+responseListPoolOriginationIdentities =+ res+ "ListPoolOriginationIdentitiesResponse"+ "fixture/ListPoolOriginationIdentitiesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListPoolOriginationIdentities)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+ res+ "ListTagsForResourceResponse"+ "fixture/ListTagsForResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responsePutKeyword :: PutKeywordResponse -> TestTree+responsePutKeyword =+ res+ "PutKeywordResponse"+ "fixture/PutKeywordResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy PutKeyword)++responsePutOptedOutNumber :: PutOptedOutNumberResponse -> TestTree+responsePutOptedOutNumber =+ res+ "PutOptedOutNumberResponse"+ "fixture/PutOptedOutNumberResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy PutOptedOutNumber)++responseReleasePhoneNumber :: ReleasePhoneNumberResponse -> TestTree+responseReleasePhoneNumber =+ res+ "ReleasePhoneNumberResponse"+ "fixture/ReleasePhoneNumberResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ReleasePhoneNumber)++responseRequestPhoneNumber :: RequestPhoneNumberResponse -> TestTree+responseRequestPhoneNumber =+ res+ "RequestPhoneNumberResponse"+ "fixture/RequestPhoneNumberResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy RequestPhoneNumber)++responseSendTextMessage :: SendTextMessageResponse -> TestTree+responseSendTextMessage =+ res+ "SendTextMessageResponse"+ "fixture/SendTextMessageResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy SendTextMessage)++responseSendVoiceMessage :: SendVoiceMessageResponse -> TestTree+responseSendVoiceMessage =+ res+ "SendVoiceMessageResponse"+ "fixture/SendVoiceMessageResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy SendVoiceMessage)++responseSetDefaultMessageType :: SetDefaultMessageTypeResponse -> TestTree+responseSetDefaultMessageType =+ res+ "SetDefaultMessageTypeResponse"+ "fixture/SetDefaultMessageTypeResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy SetDefaultMessageType)++responseSetDefaultSenderId :: SetDefaultSenderIdResponse -> TestTree+responseSetDefaultSenderId =+ res+ "SetDefaultSenderIdResponse"+ "fixture/SetDefaultSenderIdResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy SetDefaultSenderId)++responseSetTextMessageSpendLimitOverride :: SetTextMessageSpendLimitOverrideResponse -> TestTree+responseSetTextMessageSpendLimitOverride =+ res+ "SetTextMessageSpendLimitOverrideResponse"+ "fixture/SetTextMessageSpendLimitOverrideResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy SetTextMessageSpendLimitOverride)++responseSetVoiceMessageSpendLimitOverride :: SetVoiceMessageSpendLimitOverrideResponse -> TestTree+responseSetVoiceMessageSpendLimitOverride =+ res+ "SetVoiceMessageSpendLimitOverrideResponse"+ "fixture/SetVoiceMessageSpendLimitOverrideResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy SetVoiceMessageSpendLimitOverride)++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)++responseUpdateEventDestination :: UpdateEventDestinationResponse -> TestTree+responseUpdateEventDestination =+ res+ "UpdateEventDestinationResponse"+ "fixture/UpdateEventDestinationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateEventDestination)++responseUpdatePhoneNumber :: UpdatePhoneNumberResponse -> TestTree+responseUpdatePhoneNumber =+ res+ "UpdatePhoneNumberResponse"+ "fixture/UpdatePhoneNumberResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdatePhoneNumber)++responseUpdatePool :: UpdatePoolResponse -> TestTree+responseUpdatePool =+ res+ "UpdatePoolResponse"+ "fixture/UpdatePoolResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdatePool)
+ test/Test/Amazonka/PinpointSmsVoiceV2.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.PinpointSmsVoiceV2+-- 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.PinpointSmsVoiceV2+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/PinpointSmsVoiceV2/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.PinpointSmsVoiceV2.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.PinpointSmsVoiceV2.Internal where