packages feed

amazonka-sns 1.5.0 → 2.0

raw patch · 160 files changed

Files

README.md view
@@ -7,9 +7,8 @@   ## Version--`1.5.0`-+ +`2.0` - Derived from API version @2010-03-31@ of the AWS service descriptions, licensed under Apache 2.0.  ## Description @@ -26,7 +25,7 @@ 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 [Network.AWS.SNS](http://hackage.haskell.org/package/amazonka-sns/docs/Network-AWS-SNS.html)+See [Amazonka.SNS](http://hackage.haskell.org/package/amazonka-sns/docs/Amazonka-SNS.html) or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.  
− Setup.hs
@@ -1,2 +0,0 @@-import           Distribution.Simple-main = defaultMain
amazonka-sns.cabal view
@@ -1,115 +1,140 @@-name:                  amazonka-sns-version:               1.5.0-synopsis:              Amazon Simple Notification Service SDK.-homepage:              https://github.com/brendanhay/amazonka-bug-reports:           https://github.com/brendanhay/amazonka/issues-license:               MPL-2.0-license-file:          LICENSE-author:                Brendan Hay-maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>-copyright:             Copyright (c) 2013-2017 Brendan Hay-category:              Network, AWS, Cloud, Distributed Computing-build-type:            Simple-cabal-version:         >= 1.10-extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep+cabal-version:      2.2+name:               amazonka-sns+version:            2.0+synopsis:           Amazon Simple Notification Service SDK.+homepage:           https://github.com/brendanhay/amazonka+bug-reports:        https://github.com/brendanhay/amazonka/issues+license:            MPL-2.0+license-file:       LICENSE+author:             Brendan Hay+maintainer:+  Brendan Hay <brendan.g.hay+amazonka@gmail.com>, Jack Kelly <jack@jackkelly.name>++copyright:          Copyright (c) 2013-2023 Brendan Hay+category:           AWS+build-type:         Simple+extra-source-files:+  fixture/*.proto+  fixture/*.yaml+  README.md+  src/.gitkeep+ description:-    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.-    .-    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-    such as <http://hackage.haskell.org/package/lens lens> or-    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.-    .-    See "Network.AWS.SNS" or <https://aws.amazon.com/documentation/ the AWS documentation>-    to get started.+  Derived from API version @2010-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.SNS.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.SNS" 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-sns+  type:     git+  location: git://github.com/brendanhay/amazonka.git+  subdir:   amazonka-sns  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:-          Network.AWS.SNS-        , Network.AWS.SNS.AddPermission-        , Network.AWS.SNS.CheckIfPhoneNumberIsOptedOut-        , Network.AWS.SNS.ConfirmSubscription-        , Network.AWS.SNS.CreatePlatformApplication-        , Network.AWS.SNS.CreatePlatformEndpoint-        , Network.AWS.SNS.CreateTopic-        , Network.AWS.SNS.DeleteEndpoint-        , Network.AWS.SNS.DeletePlatformApplication-        , Network.AWS.SNS.DeleteTopic-        , Network.AWS.SNS.GetEndpointAttributes-        , Network.AWS.SNS.GetPlatformApplicationAttributes-        , Network.AWS.SNS.GetSMSAttributes-        , Network.AWS.SNS.GetSubscriptionAttributes-        , Network.AWS.SNS.GetTopicAttributes-        , Network.AWS.SNS.ListEndpointsByPlatformApplication-        , Network.AWS.SNS.ListPhoneNumbersOptedOut-        , Network.AWS.SNS.ListPlatformApplications-        , Network.AWS.SNS.ListSubscriptions-        , Network.AWS.SNS.ListSubscriptionsByTopic-        , Network.AWS.SNS.ListTopics-        , Network.AWS.SNS.OptInPhoneNumber-        , Network.AWS.SNS.Publish-        , Network.AWS.SNS.RemovePermission-        , Network.AWS.SNS.SetEndpointAttributes-        , Network.AWS.SNS.SetPlatformApplicationAttributes-        , Network.AWS.SNS.SetSMSAttributes-        , Network.AWS.SNS.SetSubscriptionAttributes-        , Network.AWS.SNS.SetTopicAttributes-        , Network.AWS.SNS.Subscribe-        , Network.AWS.SNS.Types-        , Network.AWS.SNS.Unsubscribe-        , Network.AWS.SNS.Waiters+  default-language: Haskell2010+  hs-source-dirs:   src gen+  ghc-options:+    -Wall -fwarn-incomplete-uni-patterns+    -fwarn-incomplete-record-updates -funbox-strict-fields -    other-modules:-          Network.AWS.SNS.Types.Product-        , Network.AWS.SNS.Types.Sum+  exposed-modules:+    Amazonka.SNS+    Amazonka.SNS.AddPermission+    Amazonka.SNS.CheckIfPhoneNumberIsOptedOut+    Amazonka.SNS.ConfirmSubscription+    Amazonka.SNS.CreatePlatformApplication+    Amazonka.SNS.CreatePlatformEndpoint+    Amazonka.SNS.CreateSMSSandboxPhoneNumber+    Amazonka.SNS.CreateTopic+    Amazonka.SNS.DeleteEndpoint+    Amazonka.SNS.DeletePlatformApplication+    Amazonka.SNS.DeleteSMSSandboxPhoneNumber+    Amazonka.SNS.DeleteTopic+    Amazonka.SNS.GetDataProtectionPolicy+    Amazonka.SNS.GetEndpointAttributes+    Amazonka.SNS.GetPlatformApplicationAttributes+    Amazonka.SNS.GetSMSAttributes+    Amazonka.SNS.GetSMSSandboxAccountStatus+    Amazonka.SNS.GetSubscriptionAttributes+    Amazonka.SNS.GetTopicAttributes+    Amazonka.SNS.Lens+    Amazonka.SNS.ListEndpointsByPlatformApplication+    Amazonka.SNS.ListOriginationNumbers+    Amazonka.SNS.ListPhoneNumbersOptedOut+    Amazonka.SNS.ListPlatformApplications+    Amazonka.SNS.ListSMSSandboxPhoneNumbers+    Amazonka.SNS.ListSubscriptions+    Amazonka.SNS.ListSubscriptionsByTopic+    Amazonka.SNS.ListTagsForResource+    Amazonka.SNS.ListTopics+    Amazonka.SNS.OptInPhoneNumber+    Amazonka.SNS.Publish+    Amazonka.SNS.PublishBatch+    Amazonka.SNS.PutDataProtectionPolicy+    Amazonka.SNS.RemovePermission+    Amazonka.SNS.SetEndpointAttributes+    Amazonka.SNS.SetPlatformApplicationAttributes+    Amazonka.SNS.SetSMSAttributes+    Amazonka.SNS.SetSubscriptionAttributes+    Amazonka.SNS.SetTopicAttributes+    Amazonka.SNS.Subscribe+    Amazonka.SNS.TagResource+    Amazonka.SNS.Types+    Amazonka.SNS.Types.BatchResultErrorEntry+    Amazonka.SNS.Types.Endpoint+    Amazonka.SNS.Types.LanguageCodeString+    Amazonka.SNS.Types.MessageAttributeValue+    Amazonka.SNS.Types.NumberCapability+    Amazonka.SNS.Types.PhoneNumberInformation+    Amazonka.SNS.Types.PlatformApplication+    Amazonka.SNS.Types.PublishBatchRequestEntry+    Amazonka.SNS.Types.PublishBatchResultEntry+    Amazonka.SNS.Types.RouteType+    Amazonka.SNS.Types.SMSSandboxPhoneNumber+    Amazonka.SNS.Types.SMSSandboxPhoneNumberVerificationStatus+    Amazonka.SNS.Types.Subscription+    Amazonka.SNS.Types.Tag+    Amazonka.SNS.Types.Topic+    Amazonka.SNS.Unsubscribe+    Amazonka.SNS.UntagResource+    Amazonka.SNS.VerifySMSSandboxPhoneNumber+    Amazonka.SNS.Waiters -    build-depends:-          amazonka-core == 1.5.0.*-        , base          >= 4.7     && < 5+  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5  test-suite amazonka-sns-test-    type:              exitcode-stdio-1.0-    default-language:  Haskell2010-    hs-source-dirs:    test-    main-is:           Main.hs--    ghc-options:       -Wall -threaded+  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.AWS.SNS-        , Test.AWS.Gen.SNS-        , Test.AWS.SNS.Internal+  -- 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.SNS+    Test.Amazonka.SNS+    Test.Amazonka.SNS.Internal -    build-depends:-          amazonka-core == 1.5.0.*-        , amazonka-test == 1.5.0.*-        , amazonka-sns-        , base-        , bytestring-        , tasty-        , tasty-hunit-        , text-        , time-        , unordered-containers+  build-depends:+    , amazonka-core         >=2.0 && <2.1+    , amazonka-sns+    , amazonka-test         >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
fixture/AddPermission.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/CheckIfPhoneNumberIsOptedOut.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/ConfirmSubscription.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/CreatePlatformApplication.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/CreatePlatformEndpoint.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/CreateSMSSandboxPhoneNumber.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/CreateSMSSandboxPhoneNumberResponse.proto view
fixture/CreateTopic.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/DeleteEndpoint.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/DeletePlatformApplication.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/DeleteSMSSandboxPhoneNumber.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/DeleteSMSSandboxPhoneNumberResponse.proto view
fixture/DeleteTopic.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/GetDataProtectionPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/GetDataProtectionPolicyResponse.proto view
fixture/GetEndpointAttributes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/GetPlatformApplicationAttributes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/GetSMSAttributes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/GetSMSSandboxAccountStatus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/GetSMSSandboxAccountStatusResponse.proto view
fixture/GetSubscriptionAttributes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/GetTopicAttributes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/ListEndpointsByPlatformApplication.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/ListOriginationNumbers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/ListOriginationNumbersResponse.proto view
fixture/ListPhoneNumbersOptedOut.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/ListPlatformApplications.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/ListSMSSandboxPhoneNumbers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/ListSMSSandboxPhoneNumbersResponse.proto view
fixture/ListSubscriptions.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/ListSubscriptionsByTopic.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/ListTopics.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/OptInPhoneNumber.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/Publish.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/PublishBatch.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/PublishBatchResponse.proto view
+ fixture/PutDataProtectionPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/PutDataProtectionPolicyResponse.proto view
fixture/RemovePermission.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/SetEndpointAttributes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/SetPlatformApplicationAttributes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/SetSMSAttributes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/SetSubscriptionAttributes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/SetTopicAttributes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/Subscribe.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/Unsubscribe.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/VerifySMSSandboxPhoneNumber.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sns/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  sns.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/VerifySMSSandboxPhoneNumberResponse.proto view
+ gen/Amazonka/SNS.hs view
@@ -0,0 +1,528 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.SNS+-- 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 @2010-03-31@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Amazon Simple Notification Service+--+-- Amazon Simple Notification Service (Amazon SNS) is a web service that+-- enables you to build distributed web-enabled applications. Applications+-- can use Amazon SNS to easily push real-time notification messages to+-- interested subscribers over multiple delivery protocols. For more+-- information about this product see the+-- <http://aws.amazon.com/sns/ Amazon SNS product page>. For detailed+-- information about Amazon SNS features and their associated API calls,+-- see the+-- <https://docs.aws.amazon.com/sns/latest/dg/ Amazon SNS Developer Guide>.+--+-- For information on the permissions you need to use this API, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-authentication-and-access-control.html Identity and access management in Amazon SNS>+-- in the /Amazon SNS Developer Guide./+--+-- We also provide SDKs that enable you to access Amazon SNS from your+-- preferred programming language. The SDKs contain functionality that+-- automatically takes care of tasks such as: cryptographically signing+-- your service requests, retrying requests, and handling error responses.+-- For a list of available SDKs, go to+-- <http://aws.amazon.com/tools/ Tools for Amazon Web Services>.+module Amazonka.SNS+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** AuthorizationErrorException+    _AuthorizationErrorException,++    -- ** BatchEntryIdsNotDistinctException+    _BatchEntryIdsNotDistinctException,++    -- ** BatchRequestTooLongException+    _BatchRequestTooLongException,++    -- ** ConcurrentAccessException+    _ConcurrentAccessException,++    -- ** EmptyBatchRequestException+    _EmptyBatchRequestException,++    -- ** EndpointDisabledException+    _EndpointDisabledException,++    -- ** FilterPolicyLimitExceededException+    _FilterPolicyLimitExceededException,++    -- ** InternalErrorException+    _InternalErrorException,++    -- ** InvalidBatchEntryIdException+    _InvalidBatchEntryIdException,++    -- ** InvalidParameterException+    _InvalidParameterException,++    -- ** InvalidParameterValueException+    _InvalidParameterValueException,++    -- ** InvalidSecurityException+    _InvalidSecurityException,++    -- ** KMSAccessDeniedException+    _KMSAccessDeniedException,++    -- ** KMSDisabledException+    _KMSDisabledException,++    -- ** KMSInvalidStateException+    _KMSInvalidStateException,++    -- ** KMSNotFoundException+    _KMSNotFoundException,++    -- ** KMSOptInRequired+    _KMSOptInRequired,++    -- ** KMSThrottlingException+    _KMSThrottlingException,++    -- ** NotFoundException+    _NotFoundException,++    -- ** OptedOutException+    _OptedOutException,++    -- ** PlatformApplicationDisabledException+    _PlatformApplicationDisabledException,++    -- ** ResourceNotFoundException+    _ResourceNotFoundException,++    -- ** StaleTagException+    _StaleTagException,++    -- ** SubscriptionLimitExceededException+    _SubscriptionLimitExceededException,++    -- ** TagLimitExceededException+    _TagLimitExceededException,++    -- ** TagPolicyException+    _TagPolicyException,++    -- ** ThrottledException+    _ThrottledException,++    -- ** TooManyEntriesInBatchRequestException+    _TooManyEntriesInBatchRequestException,++    -- ** TopicLimitExceededException+    _TopicLimitExceededException,++    -- ** UserErrorException+    _UserErrorException,++    -- ** ValidationException+    _ValidationException,++    -- ** VerificationException+    _VerificationException,++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** AddPermission+    AddPermission (AddPermission'),+    newAddPermission,+    AddPermissionResponse (AddPermissionResponse'),+    newAddPermissionResponse,++    -- ** CheckIfPhoneNumberIsOptedOut+    CheckIfPhoneNumberIsOptedOut (CheckIfPhoneNumberIsOptedOut'),+    newCheckIfPhoneNumberIsOptedOut,+    CheckIfPhoneNumberIsOptedOutResponse (CheckIfPhoneNumberIsOptedOutResponse'),+    newCheckIfPhoneNumberIsOptedOutResponse,++    -- ** ConfirmSubscription+    ConfirmSubscription (ConfirmSubscription'),+    newConfirmSubscription,+    ConfirmSubscriptionResponse (ConfirmSubscriptionResponse'),+    newConfirmSubscriptionResponse,++    -- ** CreatePlatformApplication+    CreatePlatformApplication (CreatePlatformApplication'),+    newCreatePlatformApplication,+    CreatePlatformApplicationResponse (CreatePlatformApplicationResponse'),+    newCreatePlatformApplicationResponse,++    -- ** CreatePlatformEndpoint+    CreatePlatformEndpoint (CreatePlatformEndpoint'),+    newCreatePlatformEndpoint,+    CreatePlatformEndpointResponse (CreatePlatformEndpointResponse'),+    newCreatePlatformEndpointResponse,++    -- ** CreateSMSSandboxPhoneNumber+    CreateSMSSandboxPhoneNumber (CreateSMSSandboxPhoneNumber'),+    newCreateSMSSandboxPhoneNumber,+    CreateSMSSandboxPhoneNumberResponse (CreateSMSSandboxPhoneNumberResponse'),+    newCreateSMSSandboxPhoneNumberResponse,++    -- ** CreateTopic+    CreateTopic (CreateTopic'),+    newCreateTopic,+    CreateTopicResponse (CreateTopicResponse'),+    newCreateTopicResponse,++    -- ** DeleteEndpoint+    DeleteEndpoint (DeleteEndpoint'),+    newDeleteEndpoint,+    DeleteEndpointResponse (DeleteEndpointResponse'),+    newDeleteEndpointResponse,++    -- ** DeletePlatformApplication+    DeletePlatformApplication (DeletePlatformApplication'),+    newDeletePlatformApplication,+    DeletePlatformApplicationResponse (DeletePlatformApplicationResponse'),+    newDeletePlatformApplicationResponse,++    -- ** DeleteSMSSandboxPhoneNumber+    DeleteSMSSandboxPhoneNumber (DeleteSMSSandboxPhoneNumber'),+    newDeleteSMSSandboxPhoneNumber,+    DeleteSMSSandboxPhoneNumberResponse (DeleteSMSSandboxPhoneNumberResponse'),+    newDeleteSMSSandboxPhoneNumberResponse,++    -- ** DeleteTopic+    DeleteTopic (DeleteTopic'),+    newDeleteTopic,+    DeleteTopicResponse (DeleteTopicResponse'),+    newDeleteTopicResponse,++    -- ** GetDataProtectionPolicy+    GetDataProtectionPolicy (GetDataProtectionPolicy'),+    newGetDataProtectionPolicy,+    GetDataProtectionPolicyResponse (GetDataProtectionPolicyResponse'),+    newGetDataProtectionPolicyResponse,++    -- ** GetEndpointAttributes+    GetEndpointAttributes (GetEndpointAttributes'),+    newGetEndpointAttributes,+    GetEndpointAttributesResponse (GetEndpointAttributesResponse'),+    newGetEndpointAttributesResponse,++    -- ** GetPlatformApplicationAttributes+    GetPlatformApplicationAttributes (GetPlatformApplicationAttributes'),+    newGetPlatformApplicationAttributes,+    GetPlatformApplicationAttributesResponse (GetPlatformApplicationAttributesResponse'),+    newGetPlatformApplicationAttributesResponse,++    -- ** GetSMSAttributes+    GetSMSAttributes (GetSMSAttributes'),+    newGetSMSAttributes,+    GetSMSAttributesResponse (GetSMSAttributesResponse'),+    newGetSMSAttributesResponse,++    -- ** GetSMSSandboxAccountStatus+    GetSMSSandboxAccountStatus (GetSMSSandboxAccountStatus'),+    newGetSMSSandboxAccountStatus,+    GetSMSSandboxAccountStatusResponse (GetSMSSandboxAccountStatusResponse'),+    newGetSMSSandboxAccountStatusResponse,++    -- ** GetSubscriptionAttributes+    GetSubscriptionAttributes (GetSubscriptionAttributes'),+    newGetSubscriptionAttributes,+    GetSubscriptionAttributesResponse (GetSubscriptionAttributesResponse'),+    newGetSubscriptionAttributesResponse,++    -- ** GetTopicAttributes+    GetTopicAttributes (GetTopicAttributes'),+    newGetTopicAttributes,+    GetTopicAttributesResponse (GetTopicAttributesResponse'),+    newGetTopicAttributesResponse,++    -- ** ListEndpointsByPlatformApplication (Paginated)+    ListEndpointsByPlatformApplication (ListEndpointsByPlatformApplication'),+    newListEndpointsByPlatformApplication,+    ListEndpointsByPlatformApplicationResponse (ListEndpointsByPlatformApplicationResponse'),+    newListEndpointsByPlatformApplicationResponse,++    -- ** ListOriginationNumbers (Paginated)+    ListOriginationNumbers (ListOriginationNumbers'),+    newListOriginationNumbers,+    ListOriginationNumbersResponse (ListOriginationNumbersResponse'),+    newListOriginationNumbersResponse,++    -- ** ListPhoneNumbersOptedOut (Paginated)+    ListPhoneNumbersOptedOut (ListPhoneNumbersOptedOut'),+    newListPhoneNumbersOptedOut,+    ListPhoneNumbersOptedOutResponse (ListPhoneNumbersOptedOutResponse'),+    newListPhoneNumbersOptedOutResponse,++    -- ** ListPlatformApplications (Paginated)+    ListPlatformApplications (ListPlatformApplications'),+    newListPlatformApplications,+    ListPlatformApplicationsResponse (ListPlatformApplicationsResponse'),+    newListPlatformApplicationsResponse,++    -- ** ListSMSSandboxPhoneNumbers (Paginated)+    ListSMSSandboxPhoneNumbers (ListSMSSandboxPhoneNumbers'),+    newListSMSSandboxPhoneNumbers,+    ListSMSSandboxPhoneNumbersResponse (ListSMSSandboxPhoneNumbersResponse'),+    newListSMSSandboxPhoneNumbersResponse,++    -- ** ListSubscriptions (Paginated)+    ListSubscriptions (ListSubscriptions'),+    newListSubscriptions,+    ListSubscriptionsResponse (ListSubscriptionsResponse'),+    newListSubscriptionsResponse,++    -- ** ListSubscriptionsByTopic (Paginated)+    ListSubscriptionsByTopic (ListSubscriptionsByTopic'),+    newListSubscriptionsByTopic,+    ListSubscriptionsByTopicResponse (ListSubscriptionsByTopicResponse'),+    newListSubscriptionsByTopicResponse,++    -- ** ListTagsForResource+    ListTagsForResource (ListTagsForResource'),+    newListTagsForResource,+    ListTagsForResourceResponse (ListTagsForResourceResponse'),+    newListTagsForResourceResponse,++    -- ** ListTopics (Paginated)+    ListTopics (ListTopics'),+    newListTopics,+    ListTopicsResponse (ListTopicsResponse'),+    newListTopicsResponse,++    -- ** OptInPhoneNumber+    OptInPhoneNumber (OptInPhoneNumber'),+    newOptInPhoneNumber,+    OptInPhoneNumberResponse (OptInPhoneNumberResponse'),+    newOptInPhoneNumberResponse,++    -- ** Publish+    Publish (Publish'),+    newPublish,+    PublishResponse (PublishResponse'),+    newPublishResponse,++    -- ** PublishBatch+    PublishBatch (PublishBatch'),+    newPublishBatch,+    PublishBatchResponse (PublishBatchResponse'),+    newPublishBatchResponse,++    -- ** PutDataProtectionPolicy+    PutDataProtectionPolicy (PutDataProtectionPolicy'),+    newPutDataProtectionPolicy,+    PutDataProtectionPolicyResponse (PutDataProtectionPolicyResponse'),+    newPutDataProtectionPolicyResponse,++    -- ** RemovePermission+    RemovePermission (RemovePermission'),+    newRemovePermission,+    RemovePermissionResponse (RemovePermissionResponse'),+    newRemovePermissionResponse,++    -- ** SetEndpointAttributes+    SetEndpointAttributes (SetEndpointAttributes'),+    newSetEndpointAttributes,+    SetEndpointAttributesResponse (SetEndpointAttributesResponse'),+    newSetEndpointAttributesResponse,++    -- ** SetPlatformApplicationAttributes+    SetPlatformApplicationAttributes (SetPlatformApplicationAttributes'),+    newSetPlatformApplicationAttributes,+    SetPlatformApplicationAttributesResponse (SetPlatformApplicationAttributesResponse'),+    newSetPlatformApplicationAttributesResponse,++    -- ** SetSMSAttributes+    SetSMSAttributes (SetSMSAttributes'),+    newSetSMSAttributes,+    SetSMSAttributesResponse (SetSMSAttributesResponse'),+    newSetSMSAttributesResponse,++    -- ** SetSubscriptionAttributes+    SetSubscriptionAttributes (SetSubscriptionAttributes'),+    newSetSubscriptionAttributes,+    SetSubscriptionAttributesResponse (SetSubscriptionAttributesResponse'),+    newSetSubscriptionAttributesResponse,++    -- ** SetTopicAttributes+    SetTopicAttributes (SetTopicAttributes'),+    newSetTopicAttributes,+    SetTopicAttributesResponse (SetTopicAttributesResponse'),+    newSetTopicAttributesResponse,++    -- ** Subscribe+    Subscribe (Subscribe'),+    newSubscribe,+    SubscribeResponse (SubscribeResponse'),+    newSubscribeResponse,++    -- ** TagResource+    TagResource (TagResource'),+    newTagResource,+    TagResourceResponse (TagResourceResponse'),+    newTagResourceResponse,++    -- ** Unsubscribe+    Unsubscribe (Unsubscribe'),+    newUnsubscribe,+    UnsubscribeResponse (UnsubscribeResponse'),+    newUnsubscribeResponse,++    -- ** UntagResource+    UntagResource (UntagResource'),+    newUntagResource,+    UntagResourceResponse (UntagResourceResponse'),+    newUntagResourceResponse,++    -- ** VerifySMSSandboxPhoneNumber+    VerifySMSSandboxPhoneNumber (VerifySMSSandboxPhoneNumber'),+    newVerifySMSSandboxPhoneNumber,+    VerifySMSSandboxPhoneNumberResponse (VerifySMSSandboxPhoneNumberResponse'),+    newVerifySMSSandboxPhoneNumberResponse,++    -- * Types++    -- ** LanguageCodeString+    LanguageCodeString (..),++    -- ** NumberCapability+    NumberCapability (..),++    -- ** RouteType+    RouteType (..),++    -- ** SMSSandboxPhoneNumberVerificationStatus+    SMSSandboxPhoneNumberVerificationStatus (..),++    -- ** BatchResultErrorEntry+    BatchResultErrorEntry (BatchResultErrorEntry'),+    newBatchResultErrorEntry,++    -- ** Endpoint+    Endpoint (Endpoint'),+    newEndpoint,++    -- ** MessageAttributeValue+    MessageAttributeValue (MessageAttributeValue'),+    newMessageAttributeValue,++    -- ** PhoneNumberInformation+    PhoneNumberInformation (PhoneNumberInformation'),+    newPhoneNumberInformation,++    -- ** PlatformApplication+    PlatformApplication (PlatformApplication'),+    newPlatformApplication,++    -- ** PublishBatchRequestEntry+    PublishBatchRequestEntry (PublishBatchRequestEntry'),+    newPublishBatchRequestEntry,++    -- ** PublishBatchResultEntry+    PublishBatchResultEntry (PublishBatchResultEntry'),+    newPublishBatchResultEntry,++    -- ** SMSSandboxPhoneNumber+    SMSSandboxPhoneNumber (SMSSandboxPhoneNumber'),+    newSMSSandboxPhoneNumber,++    -- ** Subscription+    Subscription (Subscription'),+    newSubscription,++    -- ** Tag+    Tag (Tag'),+    newTag,++    -- ** Topic+    Topic (Topic'),+    newTopic,+  )+where++import Amazonka.SNS.AddPermission+import Amazonka.SNS.CheckIfPhoneNumberIsOptedOut+import Amazonka.SNS.ConfirmSubscription+import Amazonka.SNS.CreatePlatformApplication+import Amazonka.SNS.CreatePlatformEndpoint+import Amazonka.SNS.CreateSMSSandboxPhoneNumber+import Amazonka.SNS.CreateTopic+import Amazonka.SNS.DeleteEndpoint+import Amazonka.SNS.DeletePlatformApplication+import Amazonka.SNS.DeleteSMSSandboxPhoneNumber+import Amazonka.SNS.DeleteTopic+import Amazonka.SNS.GetDataProtectionPolicy+import Amazonka.SNS.GetEndpointAttributes+import Amazonka.SNS.GetPlatformApplicationAttributes+import Amazonka.SNS.GetSMSAttributes+import Amazonka.SNS.GetSMSSandboxAccountStatus+import Amazonka.SNS.GetSubscriptionAttributes+import Amazonka.SNS.GetTopicAttributes+import Amazonka.SNS.Lens+import Amazonka.SNS.ListEndpointsByPlatformApplication+import Amazonka.SNS.ListOriginationNumbers+import Amazonka.SNS.ListPhoneNumbersOptedOut+import Amazonka.SNS.ListPlatformApplications+import Amazonka.SNS.ListSMSSandboxPhoneNumbers+import Amazonka.SNS.ListSubscriptions+import Amazonka.SNS.ListSubscriptionsByTopic+import Amazonka.SNS.ListTagsForResource+import Amazonka.SNS.ListTopics+import Amazonka.SNS.OptInPhoneNumber+import Amazonka.SNS.Publish+import Amazonka.SNS.PublishBatch+import Amazonka.SNS.PutDataProtectionPolicy+import Amazonka.SNS.RemovePermission+import Amazonka.SNS.SetEndpointAttributes+import Amazonka.SNS.SetPlatformApplicationAttributes+import Amazonka.SNS.SetSMSAttributes+import Amazonka.SNS.SetSubscriptionAttributes+import Amazonka.SNS.SetTopicAttributes+import Amazonka.SNS.Subscribe+import Amazonka.SNS.TagResource+import Amazonka.SNS.Types+import Amazonka.SNS.Unsubscribe+import Amazonka.SNS.UntagResource+import Amazonka.SNS.VerifySMSSandboxPhoneNumber+import Amazonka.SNS.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 'SNS'.++-- $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/SNS/AddPermission.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.SNS.AddPermission+-- 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 a statement to a topic\'s access control policy, granting access+-- for the specified Amazon Web Services accounts to the specified actions.+--+-- To remove the ability to change topic permissions, you must deny+-- permissions to the @AddPermission@, @RemovePermission@, and+-- @SetTopicAttributes@ actions in your IAM policy.+module Amazonka.SNS.AddPermission+  ( -- * Creating a Request+    AddPermission (..),+    newAddPermission,++    -- * Request Lenses+    addPermission_topicArn,+    addPermission_label,+    addPermission_aWSAccountId,+    addPermission_actionName,++    -- * Destructuring the Response+    AddPermissionResponse (..),+    newAddPermissionResponse,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newAddPermission' smart constructor.+data AddPermission = AddPermission'+  { -- | The ARN of the topic whose access control policy you wish to modify.+    topicArn :: Prelude.Text,+    -- | A unique identifier for the new policy statement.+    label :: Prelude.Text,+    -- | The Amazon Web Services account IDs of the users (principals) who will+    -- be given access to the specified actions. The users must have Amazon Web+    -- Services account, but do not need to be signed up for this service.+    aWSAccountId :: [Prelude.Text],+    -- | The action you want to allow for the specified principal(s).+    --+    -- Valid values: Any Amazon SNS action name, for example @Publish@.+    actionName :: [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AddPermission' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'addPermission_topicArn' - The ARN of the topic whose access control policy you wish to modify.+--+-- 'label', 'addPermission_label' - A unique identifier for the new policy statement.+--+-- 'aWSAccountId', 'addPermission_aWSAccountId' - The Amazon Web Services account IDs of the users (principals) who will+-- be given access to the specified actions. The users must have Amazon Web+-- Services account, but do not need to be signed up for this service.+--+-- 'actionName', 'addPermission_actionName' - The action you want to allow for the specified principal(s).+--+-- Valid values: Any Amazon SNS action name, for example @Publish@.+newAddPermission ::+  -- | 'topicArn'+  Prelude.Text ->+  -- | 'label'+  Prelude.Text ->+  AddPermission+newAddPermission pTopicArn_ pLabel_ =+  AddPermission'+    { topicArn = pTopicArn_,+      label = pLabel_,+      aWSAccountId = Prelude.mempty,+      actionName = Prelude.mempty+    }++-- | The ARN of the topic whose access control policy you wish to modify.+addPermission_topicArn :: Lens.Lens' AddPermission Prelude.Text+addPermission_topicArn = Lens.lens (\AddPermission' {topicArn} -> topicArn) (\s@AddPermission' {} a -> s {topicArn = a} :: AddPermission)++-- | A unique identifier for the new policy statement.+addPermission_label :: Lens.Lens' AddPermission Prelude.Text+addPermission_label = Lens.lens (\AddPermission' {label} -> label) (\s@AddPermission' {} a -> s {label = a} :: AddPermission)++-- | The Amazon Web Services account IDs of the users (principals) who will+-- be given access to the specified actions. The users must have Amazon Web+-- Services account, but do not need to be signed up for this service.+addPermission_aWSAccountId :: Lens.Lens' AddPermission [Prelude.Text]+addPermission_aWSAccountId = Lens.lens (\AddPermission' {aWSAccountId} -> aWSAccountId) (\s@AddPermission' {} a -> s {aWSAccountId = a} :: AddPermission) Prelude.. Lens.coerced++-- | The action you want to allow for the specified principal(s).+--+-- Valid values: Any Amazon SNS action name, for example @Publish@.+addPermission_actionName :: Lens.Lens' AddPermission [Prelude.Text]+addPermission_actionName = Lens.lens (\AddPermission' {actionName} -> actionName) (\s@AddPermission' {} a -> s {actionName = a} :: AddPermission) Prelude.. Lens.coerced++instance Core.AWSRequest AddPermission where+  type+    AWSResponse AddPermission =+      AddPermissionResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveNull AddPermissionResponse'++instance Prelude.Hashable AddPermission where+  hashWithSalt _salt AddPermission' {..} =+    _salt+      `Prelude.hashWithSalt` topicArn+      `Prelude.hashWithSalt` label+      `Prelude.hashWithSalt` aWSAccountId+      `Prelude.hashWithSalt` actionName++instance Prelude.NFData AddPermission where+  rnf AddPermission' {..} =+    Prelude.rnf topicArn+      `Prelude.seq` Prelude.rnf label+      `Prelude.seq` Prelude.rnf aWSAccountId+      `Prelude.seq` Prelude.rnf actionName++instance Data.ToHeaders AddPermission where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath AddPermission where+  toPath = Prelude.const "/"++instance Data.ToQuery AddPermission where+  toQuery AddPermission' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("AddPermission" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "TopicArn" Data.=: topicArn,+        "Label" Data.=: label,+        "AWSAccountId"+          Data.=: Data.toQueryList "member" aWSAccountId,+        "ActionName"+          Data.=: Data.toQueryList "member" actionName+      ]++-- | /See:/ 'newAddPermissionResponse' smart constructor.+data AddPermissionResponse = AddPermissionResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AddPermissionResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newAddPermissionResponse ::+  AddPermissionResponse+newAddPermissionResponse = AddPermissionResponse'++instance Prelude.NFData AddPermissionResponse where+  rnf _ = ()
+ gen/Amazonka/SNS/CheckIfPhoneNumberIsOptedOut.hs view
@@ -0,0 +1,196 @@+{-# 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.SNS.CheckIfPhoneNumberIsOptedOut+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Accepts a phone number and indicates whether the phone holder has opted+-- out of receiving SMS messages from your Amazon Web Services account. You+-- cannot send SMS messages to a number that is opted out.+--+-- To resume sending messages, you can opt in the number by using the+-- @OptInPhoneNumber@ action.+module Amazonka.SNS.CheckIfPhoneNumberIsOptedOut+  ( -- * Creating a Request+    CheckIfPhoneNumberIsOptedOut (..),+    newCheckIfPhoneNumberIsOptedOut,++    -- * Request Lenses+    checkIfPhoneNumberIsOptedOut_phoneNumber,++    -- * Destructuring the Response+    CheckIfPhoneNumberIsOptedOutResponse (..),+    newCheckIfPhoneNumberIsOptedOutResponse,++    -- * Response Lenses+    checkIfPhoneNumberIsOptedOutResponse_isOptedOut,+    checkIfPhoneNumberIsOptedOutResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | The input for the @CheckIfPhoneNumberIsOptedOut@ action.+--+-- /See:/ 'newCheckIfPhoneNumberIsOptedOut' smart constructor.+data CheckIfPhoneNumberIsOptedOut = CheckIfPhoneNumberIsOptedOut'+  { -- | The phone number for which you want to check the opt out status.+    phoneNumber :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CheckIfPhoneNumberIsOptedOut' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'phoneNumber', 'checkIfPhoneNumberIsOptedOut_phoneNumber' - The phone number for which you want to check the opt out status.+newCheckIfPhoneNumberIsOptedOut ::+  -- | 'phoneNumber'+  Prelude.Text ->+  CheckIfPhoneNumberIsOptedOut+newCheckIfPhoneNumberIsOptedOut pPhoneNumber_ =+  CheckIfPhoneNumberIsOptedOut'+    { phoneNumber =+        pPhoneNumber_+    }++-- | The phone number for which you want to check the opt out status.+checkIfPhoneNumberIsOptedOut_phoneNumber :: Lens.Lens' CheckIfPhoneNumberIsOptedOut Prelude.Text+checkIfPhoneNumberIsOptedOut_phoneNumber = Lens.lens (\CheckIfPhoneNumberIsOptedOut' {phoneNumber} -> phoneNumber) (\s@CheckIfPhoneNumberIsOptedOut' {} a -> s {phoneNumber = a} :: CheckIfPhoneNumberIsOptedOut)++instance Core.AWSRequest CheckIfPhoneNumberIsOptedOut where+  type+    AWSResponse CheckIfPhoneNumberIsOptedOut =+      CheckIfPhoneNumberIsOptedOutResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "CheckIfPhoneNumberIsOptedOutResult"+      ( \s h x ->+          CheckIfPhoneNumberIsOptedOutResponse'+            Prelude.<$> (x Data..@? "isOptedOut")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    CheckIfPhoneNumberIsOptedOut+  where+  hashWithSalt _salt CheckIfPhoneNumberIsOptedOut' {..} =+    _salt `Prelude.hashWithSalt` phoneNumber++instance Prelude.NFData CheckIfPhoneNumberIsOptedOut where+  rnf CheckIfPhoneNumberIsOptedOut' {..} =+    Prelude.rnf phoneNumber++instance Data.ToHeaders CheckIfPhoneNumberIsOptedOut where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath CheckIfPhoneNumberIsOptedOut where+  toPath = Prelude.const "/"++instance Data.ToQuery CheckIfPhoneNumberIsOptedOut where+  toQuery CheckIfPhoneNumberIsOptedOut' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ( "CheckIfPhoneNumberIsOptedOut" ::+                      Prelude.ByteString+                  ),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "phoneNumber" Data.=: phoneNumber+      ]++-- | The response from the @CheckIfPhoneNumberIsOptedOut@ action.+--+-- /See:/ 'newCheckIfPhoneNumberIsOptedOutResponse' smart constructor.+data CheckIfPhoneNumberIsOptedOutResponse = CheckIfPhoneNumberIsOptedOutResponse'+  { -- | Indicates whether the phone number is opted out:+    --+    -- -   @true@ – The phone number is opted out, meaning you cannot publish+    --     SMS messages to it.+    --+    -- -   @false@ – The phone number is opted in, meaning you can publish SMS+    --     messages to it.+    isOptedOut :: 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 'CheckIfPhoneNumberIsOptedOutResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'isOptedOut', 'checkIfPhoneNumberIsOptedOutResponse_isOptedOut' - Indicates whether the phone number is opted out:+--+-- -   @true@ – The phone number is opted out, meaning you cannot publish+--     SMS messages to it.+--+-- -   @false@ – The phone number is opted in, meaning you can publish SMS+--     messages to it.+--+-- 'httpStatus', 'checkIfPhoneNumberIsOptedOutResponse_httpStatus' - The response's http status code.+newCheckIfPhoneNumberIsOptedOutResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CheckIfPhoneNumberIsOptedOutResponse+newCheckIfPhoneNumberIsOptedOutResponse pHttpStatus_ =+  CheckIfPhoneNumberIsOptedOutResponse'+    { isOptedOut =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Indicates whether the phone number is opted out:+--+-- -   @true@ – The phone number is opted out, meaning you cannot publish+--     SMS messages to it.+--+-- -   @false@ – The phone number is opted in, meaning you can publish SMS+--     messages to it.+checkIfPhoneNumberIsOptedOutResponse_isOptedOut :: Lens.Lens' CheckIfPhoneNumberIsOptedOutResponse (Prelude.Maybe Prelude.Bool)+checkIfPhoneNumberIsOptedOutResponse_isOptedOut = Lens.lens (\CheckIfPhoneNumberIsOptedOutResponse' {isOptedOut} -> isOptedOut) (\s@CheckIfPhoneNumberIsOptedOutResponse' {} a -> s {isOptedOut = a} :: CheckIfPhoneNumberIsOptedOutResponse)++-- | The response's http status code.+checkIfPhoneNumberIsOptedOutResponse_httpStatus :: Lens.Lens' CheckIfPhoneNumberIsOptedOutResponse Prelude.Int+checkIfPhoneNumberIsOptedOutResponse_httpStatus = Lens.lens (\CheckIfPhoneNumberIsOptedOutResponse' {httpStatus} -> httpStatus) (\s@CheckIfPhoneNumberIsOptedOutResponse' {} a -> s {httpStatus = a} :: CheckIfPhoneNumberIsOptedOutResponse)++instance+  Prelude.NFData+    CheckIfPhoneNumberIsOptedOutResponse+  where+  rnf CheckIfPhoneNumberIsOptedOutResponse' {..} =+    Prelude.rnf isOptedOut+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/ConfirmSubscription.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.SNS.ConfirmSubscription+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Verifies an endpoint owner\'s intent to receive messages by validating+-- the token sent to the endpoint by an earlier @Subscribe@ action. If the+-- token is valid, the action creates a new subscription and returns its+-- Amazon Resource Name (ARN). This call requires an AWS signature only+-- when the @AuthenticateOnUnsubscribe@ flag is set to \"true\".+module Amazonka.SNS.ConfirmSubscription+  ( -- * Creating a Request+    ConfirmSubscription (..),+    newConfirmSubscription,++    -- * Request Lenses+    confirmSubscription_authenticateOnUnsubscribe,+    confirmSubscription_topicArn,+    confirmSubscription_token,++    -- * Destructuring the Response+    ConfirmSubscriptionResponse (..),+    newConfirmSubscriptionResponse,++    -- * Response Lenses+    confirmSubscriptionResponse_subscriptionArn,+    confirmSubscriptionResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for ConfirmSubscription action.+--+-- /See:/ 'newConfirmSubscription' smart constructor.+data ConfirmSubscription = ConfirmSubscription'+  { -- | Disallows unauthenticated unsubscribes of the subscription. If the value+    -- of this parameter is @true@ and the request has an Amazon Web Services+    -- signature, then only the topic owner and the subscription owner can+    -- unsubscribe the endpoint. The unsubscribe action requires Amazon Web+    -- Services authentication.+    authenticateOnUnsubscribe :: Prelude.Maybe Prelude.Text,+    -- | The ARN of the topic for which you wish to confirm a subscription.+    topicArn :: Prelude.Text,+    -- | Short-lived token sent to an endpoint during the @Subscribe@ action.+    token :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ConfirmSubscription' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'authenticateOnUnsubscribe', 'confirmSubscription_authenticateOnUnsubscribe' - Disallows unauthenticated unsubscribes of the subscription. If the value+-- of this parameter is @true@ and the request has an Amazon Web Services+-- signature, then only the topic owner and the subscription owner can+-- unsubscribe the endpoint. The unsubscribe action requires Amazon Web+-- Services authentication.+--+-- 'topicArn', 'confirmSubscription_topicArn' - The ARN of the topic for which you wish to confirm a subscription.+--+-- 'token', 'confirmSubscription_token' - Short-lived token sent to an endpoint during the @Subscribe@ action.+newConfirmSubscription ::+  -- | 'topicArn'+  Prelude.Text ->+  -- | 'token'+  Prelude.Text ->+  ConfirmSubscription+newConfirmSubscription pTopicArn_ pToken_ =+  ConfirmSubscription'+    { authenticateOnUnsubscribe =+        Prelude.Nothing,+      topicArn = pTopicArn_,+      token = pToken_+    }++-- | Disallows unauthenticated unsubscribes of the subscription. If the value+-- of this parameter is @true@ and the request has an Amazon Web Services+-- signature, then only the topic owner and the subscription owner can+-- unsubscribe the endpoint. The unsubscribe action requires Amazon Web+-- Services authentication.+confirmSubscription_authenticateOnUnsubscribe :: Lens.Lens' ConfirmSubscription (Prelude.Maybe Prelude.Text)+confirmSubscription_authenticateOnUnsubscribe = Lens.lens (\ConfirmSubscription' {authenticateOnUnsubscribe} -> authenticateOnUnsubscribe) (\s@ConfirmSubscription' {} a -> s {authenticateOnUnsubscribe = a} :: ConfirmSubscription)++-- | The ARN of the topic for which you wish to confirm a subscription.+confirmSubscription_topicArn :: Lens.Lens' ConfirmSubscription Prelude.Text+confirmSubscription_topicArn = Lens.lens (\ConfirmSubscription' {topicArn} -> topicArn) (\s@ConfirmSubscription' {} a -> s {topicArn = a} :: ConfirmSubscription)++-- | Short-lived token sent to an endpoint during the @Subscribe@ action.+confirmSubscription_token :: Lens.Lens' ConfirmSubscription Prelude.Text+confirmSubscription_token = Lens.lens (\ConfirmSubscription' {token} -> token) (\s@ConfirmSubscription' {} a -> s {token = a} :: ConfirmSubscription)++instance Core.AWSRequest ConfirmSubscription where+  type+    AWSResponse ConfirmSubscription =+      ConfirmSubscriptionResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "ConfirmSubscriptionResult"+      ( \s h x ->+          ConfirmSubscriptionResponse'+            Prelude.<$> (x Data..@? "SubscriptionArn")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ConfirmSubscription where+  hashWithSalt _salt ConfirmSubscription' {..} =+    _salt+      `Prelude.hashWithSalt` authenticateOnUnsubscribe+      `Prelude.hashWithSalt` topicArn+      `Prelude.hashWithSalt` token++instance Prelude.NFData ConfirmSubscription where+  rnf ConfirmSubscription' {..} =+    Prelude.rnf authenticateOnUnsubscribe+      `Prelude.seq` Prelude.rnf topicArn+      `Prelude.seq` Prelude.rnf token++instance Data.ToHeaders ConfirmSubscription where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath ConfirmSubscription where+  toPath = Prelude.const "/"++instance Data.ToQuery ConfirmSubscription where+  toQuery ConfirmSubscription' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("ConfirmSubscription" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "AuthenticateOnUnsubscribe"+          Data.=: authenticateOnUnsubscribe,+        "TopicArn" Data.=: topicArn,+        "Token" Data.=: token+      ]++-- | Response for ConfirmSubscriptions action.+--+-- /See:/ 'newConfirmSubscriptionResponse' smart constructor.+data ConfirmSubscriptionResponse = ConfirmSubscriptionResponse'+  { -- | The ARN of the created subscription.+    subscriptionArn :: 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 'ConfirmSubscriptionResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'subscriptionArn', 'confirmSubscriptionResponse_subscriptionArn' - The ARN of the created subscription.+--+-- 'httpStatus', 'confirmSubscriptionResponse_httpStatus' - The response's http status code.+newConfirmSubscriptionResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ConfirmSubscriptionResponse+newConfirmSubscriptionResponse pHttpStatus_ =+  ConfirmSubscriptionResponse'+    { subscriptionArn =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The ARN of the created subscription.+confirmSubscriptionResponse_subscriptionArn :: Lens.Lens' ConfirmSubscriptionResponse (Prelude.Maybe Prelude.Text)+confirmSubscriptionResponse_subscriptionArn = Lens.lens (\ConfirmSubscriptionResponse' {subscriptionArn} -> subscriptionArn) (\s@ConfirmSubscriptionResponse' {} a -> s {subscriptionArn = a} :: ConfirmSubscriptionResponse)++-- | The response's http status code.+confirmSubscriptionResponse_httpStatus :: Lens.Lens' ConfirmSubscriptionResponse Prelude.Int+confirmSubscriptionResponse_httpStatus = Lens.lens (\ConfirmSubscriptionResponse' {httpStatus} -> httpStatus) (\s@ConfirmSubscriptionResponse' {} a -> s {httpStatus = a} :: ConfirmSubscriptionResponse)++instance Prelude.NFData ConfirmSubscriptionResponse where+  rnf ConfirmSubscriptionResponse' {..} =+    Prelude.rnf subscriptionArn+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/CreatePlatformApplication.hs view
@@ -0,0 +1,245 @@+{-# 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.SNS.CreatePlatformApplication+-- 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 platform application object for one of the supported push+-- notification services, such as APNS and GCM (Firebase Cloud Messaging),+-- to which devices and mobile apps may register. You must specify+-- @PlatformPrincipal@ and @PlatformCredential@ attributes when using the+-- @CreatePlatformApplication@ action.+--+-- @PlatformPrincipal@ and @PlatformCredential@ are received from the+-- notification service.+--+-- -   For @ADM@, @PlatformPrincipal@ is @client id@ and+--     @PlatformCredential@ is @client secret@.+--+-- -   For @Baidu@, @PlatformPrincipal@ is @API key@ and+--     @PlatformCredential@ is @secret key@.+--+-- -   For @APNS@ and @APNS_SANDBOX@ using certificate credentials,+--     @PlatformPrincipal@ is @SSL certificate@ and @PlatformCredential@ is+--     @private key@.+--+-- -   For @APNS@ and @APNS_SANDBOX@ using token credentials,+--     @PlatformPrincipal@ is @signing key ID@ and @PlatformCredential@ is+--     @signing key@.+--+-- -   For @GCM@ (Firebase Cloud Messaging), there is no+--     @PlatformPrincipal@ and the @PlatformCredential@ is @API key@.+--+-- -   For @MPNS@, @PlatformPrincipal@ is @TLS certificate@ and+--     @PlatformCredential@ is @private key@.+--+-- -   For @WNS@, @PlatformPrincipal@ is @Package Security Identifier@ and+--     @PlatformCredential@ is @secret key@.+--+-- You can use the returned @PlatformApplicationArn@ as an attribute for+-- the @CreatePlatformEndpoint@ action.+module Amazonka.SNS.CreatePlatformApplication+  ( -- * Creating a Request+    CreatePlatformApplication (..),+    newCreatePlatformApplication,++    -- * Request Lenses+    createPlatformApplication_name,+    createPlatformApplication_platform,+    createPlatformApplication_attributes,++    -- * Destructuring the Response+    CreatePlatformApplicationResponse (..),+    newCreatePlatformApplicationResponse,++    -- * Response Lenses+    createPlatformApplicationResponse_platformApplicationArn,+    createPlatformApplicationResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for CreatePlatformApplication action.+--+-- /See:/ 'newCreatePlatformApplication' smart constructor.+data CreatePlatformApplication = CreatePlatformApplication'+  { -- | Application names must be made up of only uppercase and lowercase ASCII+    -- letters, numbers, underscores, hyphens, and periods, and must be between+    -- 1 and 256 characters long.+    name :: Prelude.Text,+    -- | The following platforms are supported: ADM (Amazon Device Messaging),+    -- APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase+    -- Cloud Messaging).+    platform :: Prelude.Text,+    -- | For a list of attributes, see+    -- <https://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html SetPlatformApplicationAttributes>.+    attributes :: Prelude.HashMap Prelude.Text Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreatePlatformApplication' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'createPlatformApplication_name' - Application names must be made up of only uppercase and lowercase ASCII+-- letters, numbers, underscores, hyphens, and periods, and must be between+-- 1 and 256 characters long.+--+-- 'platform', 'createPlatformApplication_platform' - The following platforms are supported: ADM (Amazon Device Messaging),+-- APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase+-- Cloud Messaging).+--+-- 'attributes', 'createPlatformApplication_attributes' - For a list of attributes, see+-- <https://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html SetPlatformApplicationAttributes>.+newCreatePlatformApplication ::+  -- | 'name'+  Prelude.Text ->+  -- | 'platform'+  Prelude.Text ->+  CreatePlatformApplication+newCreatePlatformApplication pName_ pPlatform_ =+  CreatePlatformApplication'+    { name = pName_,+      platform = pPlatform_,+      attributes = Prelude.mempty+    }++-- | Application names must be made up of only uppercase and lowercase ASCII+-- letters, numbers, underscores, hyphens, and periods, and must be between+-- 1 and 256 characters long.+createPlatformApplication_name :: Lens.Lens' CreatePlatformApplication Prelude.Text+createPlatformApplication_name = Lens.lens (\CreatePlatformApplication' {name} -> name) (\s@CreatePlatformApplication' {} a -> s {name = a} :: CreatePlatformApplication)++-- | The following platforms are supported: ADM (Amazon Device Messaging),+-- APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase+-- Cloud Messaging).+createPlatformApplication_platform :: Lens.Lens' CreatePlatformApplication Prelude.Text+createPlatformApplication_platform = Lens.lens (\CreatePlatformApplication' {platform} -> platform) (\s@CreatePlatformApplication' {} a -> s {platform = a} :: CreatePlatformApplication)++-- | For a list of attributes, see+-- <https://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html SetPlatformApplicationAttributes>.+createPlatformApplication_attributes :: Lens.Lens' CreatePlatformApplication (Prelude.HashMap Prelude.Text Prelude.Text)+createPlatformApplication_attributes = Lens.lens (\CreatePlatformApplication' {attributes} -> attributes) (\s@CreatePlatformApplication' {} a -> s {attributes = a} :: CreatePlatformApplication) Prelude.. Lens.coerced++instance Core.AWSRequest CreatePlatformApplication where+  type+    AWSResponse CreatePlatformApplication =+      CreatePlatformApplicationResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "CreatePlatformApplicationResult"+      ( \s h x ->+          CreatePlatformApplicationResponse'+            Prelude.<$> (x Data..@? "PlatformApplicationArn")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreatePlatformApplication where+  hashWithSalt _salt CreatePlatformApplication' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` platform+      `Prelude.hashWithSalt` attributes++instance Prelude.NFData CreatePlatformApplication where+  rnf CreatePlatformApplication' {..} =+    Prelude.rnf name+      `Prelude.seq` Prelude.rnf platform+      `Prelude.seq` Prelude.rnf attributes++instance Data.ToHeaders CreatePlatformApplication where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath CreatePlatformApplication where+  toPath = Prelude.const "/"++instance Data.ToQuery CreatePlatformApplication where+  toQuery CreatePlatformApplication' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("CreatePlatformApplication" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "Name" Data.=: name,+        "Platform" Data.=: platform,+        "Attributes"+          Data.=: Data.toQueryMap "entry" "key" "value" attributes+      ]++-- | Response from CreatePlatformApplication action.+--+-- /See:/ 'newCreatePlatformApplicationResponse' smart constructor.+data CreatePlatformApplicationResponse = CreatePlatformApplicationResponse'+  { -- | PlatformApplicationArn is returned.+    platformApplicationArn :: 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 'CreatePlatformApplicationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'platformApplicationArn', 'createPlatformApplicationResponse_platformApplicationArn' - PlatformApplicationArn is returned.+--+-- 'httpStatus', 'createPlatformApplicationResponse_httpStatus' - The response's http status code.+newCreatePlatformApplicationResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreatePlatformApplicationResponse+newCreatePlatformApplicationResponse pHttpStatus_ =+  CreatePlatformApplicationResponse'+    { platformApplicationArn =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | PlatformApplicationArn is returned.+createPlatformApplicationResponse_platformApplicationArn :: Lens.Lens' CreatePlatformApplicationResponse (Prelude.Maybe Prelude.Text)+createPlatformApplicationResponse_platformApplicationArn = Lens.lens (\CreatePlatformApplicationResponse' {platformApplicationArn} -> platformApplicationArn) (\s@CreatePlatformApplicationResponse' {} a -> s {platformApplicationArn = a} :: CreatePlatformApplicationResponse)++-- | The response's http status code.+createPlatformApplicationResponse_httpStatus :: Lens.Lens' CreatePlatformApplicationResponse Prelude.Int+createPlatformApplicationResponse_httpStatus = Lens.lens (\CreatePlatformApplicationResponse' {httpStatus} -> httpStatus) (\s@CreatePlatformApplicationResponse' {} a -> s {httpStatus = a} :: CreatePlatformApplicationResponse)++instance+  Prelude.NFData+    CreatePlatformApplicationResponse+  where+  rnf CreatePlatformApplicationResponse' {..} =+    Prelude.rnf platformApplicationArn+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/CreatePlatformEndpoint.hs view
@@ -0,0 +1,256 @@+{-# 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.SNS.CreatePlatformEndpoint+-- 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 endpoint for a device and mobile app on one of the supported+-- push notification services, such as GCM (Firebase Cloud Messaging) and+-- APNS. @CreatePlatformEndpoint@ requires the @PlatformApplicationArn@+-- that is returned from @CreatePlatformApplication@. You can use the+-- returned @EndpointArn@ to send a message to a mobile app or by the+-- @Subscribe@ action for subscription to a topic. The+-- @CreatePlatformEndpoint@ action is idempotent, so if the requester+-- already owns an endpoint with the same device token and attributes, that+-- endpoint\'s ARN is returned without creating a new endpoint. For more+-- information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+--+-- When using @CreatePlatformEndpoint@ with Baidu, two attributes must be+-- provided: ChannelId and UserId. The token field must also contain the+-- ChannelId. For more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html Creating an Amazon SNS Endpoint for Baidu>.+module Amazonka.SNS.CreatePlatformEndpoint+  ( -- * Creating a Request+    CreatePlatformEndpoint (..),+    newCreatePlatformEndpoint,++    -- * Request Lenses+    createPlatformEndpoint_attributes,+    createPlatformEndpoint_customUserData,+    createPlatformEndpoint_platformApplicationArn,+    createPlatformEndpoint_token,++    -- * Destructuring the Response+    CreatePlatformEndpointResponse (..),+    newCreatePlatformEndpointResponse,++    -- * Response Lenses+    createPlatformEndpointResponse_endpointArn,+    createPlatformEndpointResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for CreatePlatformEndpoint action.+--+-- /See:/ 'newCreatePlatformEndpoint' smart constructor.+data CreatePlatformEndpoint = CreatePlatformEndpoint'+  { -- | For a list of attributes, see+    -- <https://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html SetEndpointAttributes>.+    attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | Arbitrary user data to associate with the endpoint. Amazon SNS does not+    -- use this data. The data must be in UTF-8 format and less than 2KB.+    customUserData :: Prelude.Maybe Prelude.Text,+    -- | PlatformApplicationArn returned from CreatePlatformApplication is used+    -- to create a an endpoint.+    platformApplicationArn :: Prelude.Text,+    -- | Unique identifier created by the notification service for an app on a+    -- device. The specific name for Token will vary, depending on which+    -- notification service is being used. For example, when using APNS as the+    -- notification service, you need the device token. Alternatively, when+    -- using GCM (Firebase Cloud Messaging) or ADM, the device token equivalent+    -- is called the registration ID.+    token :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreatePlatformEndpoint' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'createPlatformEndpoint_attributes' - For a list of attributes, see+-- <https://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html SetEndpointAttributes>.+--+-- 'customUserData', 'createPlatformEndpoint_customUserData' - Arbitrary user data to associate with the endpoint. Amazon SNS does not+-- use this data. The data must be in UTF-8 format and less than 2KB.+--+-- 'platformApplicationArn', 'createPlatformEndpoint_platformApplicationArn' - PlatformApplicationArn returned from CreatePlatformApplication is used+-- to create a an endpoint.+--+-- 'token', 'createPlatformEndpoint_token' - Unique identifier created by the notification service for an app on a+-- device. The specific name for Token will vary, depending on which+-- notification service is being used. For example, when using APNS as the+-- notification service, you need the device token. Alternatively, when+-- using GCM (Firebase Cloud Messaging) or ADM, the device token equivalent+-- is called the registration ID.+newCreatePlatformEndpoint ::+  -- | 'platformApplicationArn'+  Prelude.Text ->+  -- | 'token'+  Prelude.Text ->+  CreatePlatformEndpoint+newCreatePlatformEndpoint+  pPlatformApplicationArn_+  pToken_ =+    CreatePlatformEndpoint'+      { attributes =+          Prelude.Nothing,+        customUserData = Prelude.Nothing,+        platformApplicationArn = pPlatformApplicationArn_,+        token = pToken_+      }++-- | For a list of attributes, see+-- <https://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html SetEndpointAttributes>.+createPlatformEndpoint_attributes :: Lens.Lens' CreatePlatformEndpoint (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createPlatformEndpoint_attributes = Lens.lens (\CreatePlatformEndpoint' {attributes} -> attributes) (\s@CreatePlatformEndpoint' {} a -> s {attributes = a} :: CreatePlatformEndpoint) Prelude.. Lens.mapping Lens.coerced++-- | Arbitrary user data to associate with the endpoint. Amazon SNS does not+-- use this data. The data must be in UTF-8 format and less than 2KB.+createPlatformEndpoint_customUserData :: Lens.Lens' CreatePlatformEndpoint (Prelude.Maybe Prelude.Text)+createPlatformEndpoint_customUserData = Lens.lens (\CreatePlatformEndpoint' {customUserData} -> customUserData) (\s@CreatePlatformEndpoint' {} a -> s {customUserData = a} :: CreatePlatformEndpoint)++-- | PlatformApplicationArn returned from CreatePlatformApplication is used+-- to create a an endpoint.+createPlatformEndpoint_platformApplicationArn :: Lens.Lens' CreatePlatformEndpoint Prelude.Text+createPlatformEndpoint_platformApplicationArn = Lens.lens (\CreatePlatformEndpoint' {platformApplicationArn} -> platformApplicationArn) (\s@CreatePlatformEndpoint' {} a -> s {platformApplicationArn = a} :: CreatePlatformEndpoint)++-- | Unique identifier created by the notification service for an app on a+-- device. The specific name for Token will vary, depending on which+-- notification service is being used. For example, when using APNS as the+-- notification service, you need the device token. Alternatively, when+-- using GCM (Firebase Cloud Messaging) or ADM, the device token equivalent+-- is called the registration ID.+createPlatformEndpoint_token :: Lens.Lens' CreatePlatformEndpoint Prelude.Text+createPlatformEndpoint_token = Lens.lens (\CreatePlatformEndpoint' {token} -> token) (\s@CreatePlatformEndpoint' {} a -> s {token = a} :: CreatePlatformEndpoint)++instance Core.AWSRequest CreatePlatformEndpoint where+  type+    AWSResponse CreatePlatformEndpoint =+      CreatePlatformEndpointResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "CreatePlatformEndpointResult"+      ( \s h x ->+          CreatePlatformEndpointResponse'+            Prelude.<$> (x Data..@? "EndpointArn")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreatePlatformEndpoint where+  hashWithSalt _salt CreatePlatformEndpoint' {..} =+    _salt+      `Prelude.hashWithSalt` attributes+      `Prelude.hashWithSalt` customUserData+      `Prelude.hashWithSalt` platformApplicationArn+      `Prelude.hashWithSalt` token++instance Prelude.NFData CreatePlatformEndpoint where+  rnf CreatePlatformEndpoint' {..} =+    Prelude.rnf attributes+      `Prelude.seq` Prelude.rnf customUserData+      `Prelude.seq` Prelude.rnf platformApplicationArn+      `Prelude.seq` Prelude.rnf token++instance Data.ToHeaders CreatePlatformEndpoint where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath CreatePlatformEndpoint where+  toPath = Prelude.const "/"++instance Data.ToQuery CreatePlatformEndpoint where+  toQuery CreatePlatformEndpoint' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("CreatePlatformEndpoint" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "Attributes"+          Data.=: Data.toQuery+            ( Data.toQueryMap "entry" "key" "value"+                Prelude.<$> attributes+            ),+        "CustomUserData" Data.=: customUserData,+        "PlatformApplicationArn"+          Data.=: platformApplicationArn,+        "Token" Data.=: token+      ]++-- | Response from CreateEndpoint action.+--+-- /See:/ 'newCreatePlatformEndpointResponse' smart constructor.+data CreatePlatformEndpointResponse = CreatePlatformEndpointResponse'+  { -- | EndpointArn returned from CreateEndpoint action.+    endpointArn :: 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 'CreatePlatformEndpointResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'endpointArn', 'createPlatformEndpointResponse_endpointArn' - EndpointArn returned from CreateEndpoint action.+--+-- 'httpStatus', 'createPlatformEndpointResponse_httpStatus' - The response's http status code.+newCreatePlatformEndpointResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreatePlatformEndpointResponse+newCreatePlatformEndpointResponse pHttpStatus_ =+  CreatePlatformEndpointResponse'+    { endpointArn =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | EndpointArn returned from CreateEndpoint action.+createPlatformEndpointResponse_endpointArn :: Lens.Lens' CreatePlatformEndpointResponse (Prelude.Maybe Prelude.Text)+createPlatformEndpointResponse_endpointArn = Lens.lens (\CreatePlatformEndpointResponse' {endpointArn} -> endpointArn) (\s@CreatePlatformEndpointResponse' {} a -> s {endpointArn = a} :: CreatePlatformEndpointResponse)++-- | The response's http status code.+createPlatformEndpointResponse_httpStatus :: Lens.Lens' CreatePlatformEndpointResponse Prelude.Int+createPlatformEndpointResponse_httpStatus = Lens.lens (\CreatePlatformEndpointResponse' {httpStatus} -> httpStatus) (\s@CreatePlatformEndpointResponse' {} a -> s {httpStatus = a} :: CreatePlatformEndpointResponse)++instance+  Prelude.NFData+    CreatePlatformEndpointResponse+  where+  rnf CreatePlatformEndpointResponse' {..} =+    Prelude.rnf endpointArn+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/CreateSMSSandboxPhoneNumber.hs view
@@ -0,0 +1,186 @@+{-# 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.SNS.CreateSMSSandboxPhoneNumber+-- 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 a destination phone number to an Amazon Web Services account in the+-- SMS sandbox and sends a one-time password (OTP) to that phone number.+--+-- When you start using Amazon SNS to send SMS messages, your Amazon Web+-- Services account is in the /SMS sandbox/. The SMS sandbox provides a+-- safe environment for you to try Amazon SNS features without risking your+-- reputation as an SMS sender. While your Amazon Web Services account is+-- in the SMS sandbox, you can use all of the features of Amazon SNS.+-- However, you can send SMS messages only to verified destination phone+-- numbers. For more information, including how to move out of the sandbox+-- to send messages without restrictions, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html SMS sandbox>+-- in the /Amazon SNS Developer Guide/.+module Amazonka.SNS.CreateSMSSandboxPhoneNumber+  ( -- * Creating a Request+    CreateSMSSandboxPhoneNumber (..),+    newCreateSMSSandboxPhoneNumber,++    -- * Request Lenses+    createSMSSandboxPhoneNumber_languageCode,+    createSMSSandboxPhoneNumber_phoneNumber,++    -- * Destructuring the Response+    CreateSMSSandboxPhoneNumberResponse (..),+    newCreateSMSSandboxPhoneNumberResponse,++    -- * Response Lenses+    createSMSSandboxPhoneNumberResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newCreateSMSSandboxPhoneNumber' smart constructor.+data CreateSMSSandboxPhoneNumber = CreateSMSSandboxPhoneNumber'+  { -- | The language to use for sending the OTP. The default value is @en-US@.+    languageCode :: Prelude.Maybe LanguageCodeString,+    -- | The destination phone number to verify. On verification, Amazon SNS adds+    -- this phone number to the list of verified phone numbers that you can+    -- send SMS messages to.+    phoneNumber :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateSMSSandboxPhoneNumber' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'languageCode', 'createSMSSandboxPhoneNumber_languageCode' - The language to use for sending the OTP. The default value is @en-US@.+--+-- 'phoneNumber', 'createSMSSandboxPhoneNumber_phoneNumber' - The destination phone number to verify. On verification, Amazon SNS adds+-- this phone number to the list of verified phone numbers that you can+-- send SMS messages to.+newCreateSMSSandboxPhoneNumber ::+  -- | 'phoneNumber'+  Prelude.Text ->+  CreateSMSSandboxPhoneNumber+newCreateSMSSandboxPhoneNumber pPhoneNumber_ =+  CreateSMSSandboxPhoneNumber'+    { languageCode =+        Prelude.Nothing,+      phoneNumber = pPhoneNumber_+    }++-- | The language to use for sending the OTP. The default value is @en-US@.+createSMSSandboxPhoneNumber_languageCode :: Lens.Lens' CreateSMSSandboxPhoneNumber (Prelude.Maybe LanguageCodeString)+createSMSSandboxPhoneNumber_languageCode = Lens.lens (\CreateSMSSandboxPhoneNumber' {languageCode} -> languageCode) (\s@CreateSMSSandboxPhoneNumber' {} a -> s {languageCode = a} :: CreateSMSSandboxPhoneNumber)++-- | The destination phone number to verify. On verification, Amazon SNS adds+-- this phone number to the list of verified phone numbers that you can+-- send SMS messages to.+createSMSSandboxPhoneNumber_phoneNumber :: Lens.Lens' CreateSMSSandboxPhoneNumber Prelude.Text+createSMSSandboxPhoneNumber_phoneNumber = Lens.lens (\CreateSMSSandboxPhoneNumber' {phoneNumber} -> phoneNumber) (\s@CreateSMSSandboxPhoneNumber' {} a -> s {phoneNumber = a} :: CreateSMSSandboxPhoneNumber)++instance Core.AWSRequest CreateSMSSandboxPhoneNumber where+  type+    AWSResponse CreateSMSSandboxPhoneNumber =+      CreateSMSSandboxPhoneNumberResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "CreateSMSSandboxPhoneNumberResult"+      ( \s h x ->+          CreateSMSSandboxPhoneNumberResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateSMSSandboxPhoneNumber where+  hashWithSalt _salt CreateSMSSandboxPhoneNumber' {..} =+    _salt+      `Prelude.hashWithSalt` languageCode+      `Prelude.hashWithSalt` phoneNumber++instance Prelude.NFData CreateSMSSandboxPhoneNumber where+  rnf CreateSMSSandboxPhoneNumber' {..} =+    Prelude.rnf languageCode+      `Prelude.seq` Prelude.rnf phoneNumber++instance Data.ToHeaders CreateSMSSandboxPhoneNumber where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath CreateSMSSandboxPhoneNumber where+  toPath = Prelude.const "/"++instance Data.ToQuery CreateSMSSandboxPhoneNumber where+  toQuery CreateSMSSandboxPhoneNumber' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ( "CreateSMSSandboxPhoneNumber" ::+                      Prelude.ByteString+                  ),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "LanguageCode" Data.=: languageCode,+        "PhoneNumber" Data.=: phoneNumber+      ]++-- | /See:/ 'newCreateSMSSandboxPhoneNumberResponse' smart constructor.+data CreateSMSSandboxPhoneNumberResponse = CreateSMSSandboxPhoneNumberResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateSMSSandboxPhoneNumberResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'createSMSSandboxPhoneNumberResponse_httpStatus' - The response's http status code.+newCreateSMSSandboxPhoneNumberResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateSMSSandboxPhoneNumberResponse+newCreateSMSSandboxPhoneNumberResponse pHttpStatus_ =+  CreateSMSSandboxPhoneNumberResponse'+    { httpStatus =+        pHttpStatus_+    }++-- | The response's http status code.+createSMSSandboxPhoneNumberResponse_httpStatus :: Lens.Lens' CreateSMSSandboxPhoneNumberResponse Prelude.Int+createSMSSandboxPhoneNumberResponse_httpStatus = Lens.lens (\CreateSMSSandboxPhoneNumberResponse' {httpStatus} -> httpStatus) (\s@CreateSMSSandboxPhoneNumberResponse' {} a -> s {httpStatus = a} :: CreateSMSSandboxPhoneNumberResponse)++instance+  Prelude.NFData+    CreateSMSSandboxPhoneNumberResponse+  where+  rnf CreateSMSSandboxPhoneNumberResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/SNS/CreateTopic.hs view
@@ -0,0 +1,447 @@+{-# 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.SNS.CreateTopic+-- 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 topic to which notifications can be published. Users can+-- create at most 100,000 standard topics (at most 1,000 FIFO topics). For+-- more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html Creating an Amazon SNS topic>+-- in the /Amazon SNS Developer Guide/. This action is idempotent, so if+-- the requester already owns a topic with the specified name, that+-- topic\'s ARN is returned without creating a new topic.+module Amazonka.SNS.CreateTopic+  ( -- * Creating a Request+    CreateTopic (..),+    newCreateTopic,++    -- * Request Lenses+    createTopic_attributes,+    createTopic_dataProtectionPolicy,+    createTopic_tags,+    createTopic_name,++    -- * Destructuring the Response+    CreateTopicResponse (..),+    newCreateTopicResponse,++    -- * Response Lenses+    createTopicResponse_topicArn,+    createTopicResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for CreateTopic action.+--+-- /See:/ 'newCreateTopic' smart constructor.+data CreateTopic = CreateTopic'+  { -- | A map of attributes with their corresponding values.+    --+    -- The following lists the names, descriptions, and values of the special+    -- request parameters that the @CreateTopic@ action uses:+    --+    -- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+    --     failed deliveries to HTTP\/S endpoints.+    --+    -- -   @DisplayName@ – The display name to use for a topic with SMS+    --     subscriptions.+    --+    -- -   @FifoTopic@ – Set to true to create a FIFO topic.+    --+    -- -   @Policy@ – The policy that defines who can access your topic. By+    --     default, only the topic owner can publish or subscribe to the topic.+    --+    -- -   @SignatureVersion@ – The signature version corresponds to the+    --     hashing algorithm used while creating the signature of the+    --     notifications, subscription confirmations, or unsubscribe+    --     confirmation messages sent by Amazon SNS. By default,+    --     @SignatureVersion@ is set to 1.+    --+    -- -   @TracingConfig@ – Tracing mode of an Amazon SNS topic. By default+    --     @TracingConfig@ is set to @PassThrough@, and the topic passes+    --     through the tracing header it receives from an Amazon SNS publisher+    --     to its subscriptions. If set to Active, Amazon SNS will vend X-Ray+    --     segment data to topic owner account if the sampled flag in the+    --     tracing header is true. This is only supported on standard topics.+    --+    -- The following attribute applies only to+    -- <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html server-side encryption>:+    --+    -- -   @KmsMasterKeyId@ – The ID of an Amazon Web Services managed customer+    --     master key (CMK) for Amazon SNS or a custom CMK. For more+    --     information, see+    --     <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms Key Terms>.+    --     For more examples, see+    --     <https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters KeyId>+    --     in the /Key Management Service API Reference/.+    --+    -- The following attributes apply only to+    -- <https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html FIFO topics>:+    --+    -- -   @FifoTopic@ – When this is set to @true@, a FIFO topic is created.+    --+    -- -   @ContentBasedDeduplication@ – Enables content-based deduplication+    --     for FIFO topics.+    --+    --     -   By default, @ContentBasedDeduplication@ is set to @false@. If+    --         you create a FIFO topic and this attribute is @false@, you must+    --         specify a value for the @MessageDeduplicationId@ parameter for+    --         the+    --         <https://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish>+    --         action.+    --+    --     -   When you set @ContentBasedDeduplication@ to @true@, Amazon SNS+    --         uses a SHA-256 hash to generate the @MessageDeduplicationId@+    --         using the body of the message (but not the attributes of the+    --         message).+    --+    --         (Optional) To override the generated value, you can specify a+    --         value for the @MessageDeduplicationId@ parameter for the+    --         @Publish@ action.+    attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The body of the policy document you want to use for this topic.+    --+    -- You can only add one policy per topic.+    --+    -- The policy must be in JSON string format.+    --+    -- Length Constraints: Maximum length of 30,720.+    dataProtectionPolicy :: Prelude.Maybe Prelude.Text,+    -- | The list of tags to add to a new topic.+    --+    -- To be able to tag a topic on creation, you must have the+    -- @sns:CreateTopic@ and @sns:TagResource@ permissions.+    tags :: Prelude.Maybe [Tag],+    -- | The name of the topic you want to create.+    --+    -- Constraints: Topic names must be made up of only uppercase and lowercase+    -- ASCII letters, numbers, underscores, and hyphens, and must be between 1+    -- and 256 characters long.+    --+    -- For a FIFO (first-in-first-out) topic, the name must end with the+    -- @.fifo@ suffix.+    name :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateTopic' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'createTopic_attributes' - A map of attributes with their corresponding values.+--+-- The following lists the names, descriptions, and values of the special+-- request parameters that the @CreateTopic@ action uses:+--+-- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+--     failed deliveries to HTTP\/S endpoints.+--+-- -   @DisplayName@ – The display name to use for a topic with SMS+--     subscriptions.+--+-- -   @FifoTopic@ – Set to true to create a FIFO topic.+--+-- -   @Policy@ – The policy that defines who can access your topic. By+--     default, only the topic owner can publish or subscribe to the topic.+--+-- -   @SignatureVersion@ – The signature version corresponds to the+--     hashing algorithm used while creating the signature of the+--     notifications, subscription confirmations, or unsubscribe+--     confirmation messages sent by Amazon SNS. By default,+--     @SignatureVersion@ is set to 1.+--+-- -   @TracingConfig@ – Tracing mode of an Amazon SNS topic. By default+--     @TracingConfig@ is set to @PassThrough@, and the topic passes+--     through the tracing header it receives from an Amazon SNS publisher+--     to its subscriptions. If set to Active, Amazon SNS will vend X-Ray+--     segment data to topic owner account if the sampled flag in the+--     tracing header is true. This is only supported on standard topics.+--+-- The following attribute applies only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html server-side encryption>:+--+-- -   @KmsMasterKeyId@ – The ID of an Amazon Web Services managed customer+--     master key (CMK) for Amazon SNS or a custom CMK. For more+--     information, see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms Key Terms>.+--     For more examples, see+--     <https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters KeyId>+--     in the /Key Management Service API Reference/.+--+-- The following attributes apply only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html FIFO topics>:+--+-- -   @FifoTopic@ – When this is set to @true@, a FIFO topic is created.+--+-- -   @ContentBasedDeduplication@ – Enables content-based deduplication+--     for FIFO topics.+--+--     -   By default, @ContentBasedDeduplication@ is set to @false@. If+--         you create a FIFO topic and this attribute is @false@, you must+--         specify a value for the @MessageDeduplicationId@ parameter for+--         the+--         <https://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish>+--         action.+--+--     -   When you set @ContentBasedDeduplication@ to @true@, Amazon SNS+--         uses a SHA-256 hash to generate the @MessageDeduplicationId@+--         using the body of the message (but not the attributes of the+--         message).+--+--         (Optional) To override the generated value, you can specify a+--         value for the @MessageDeduplicationId@ parameter for the+--         @Publish@ action.+--+-- 'dataProtectionPolicy', 'createTopic_dataProtectionPolicy' - The body of the policy document you want to use for this topic.+--+-- You can only add one policy per topic.+--+-- The policy must be in JSON string format.+--+-- Length Constraints: Maximum length of 30,720.+--+-- 'tags', 'createTopic_tags' - The list of tags to add to a new topic.+--+-- To be able to tag a topic on creation, you must have the+-- @sns:CreateTopic@ and @sns:TagResource@ permissions.+--+-- 'name', 'createTopic_name' - The name of the topic you want to create.+--+-- Constraints: Topic names must be made up of only uppercase and lowercase+-- ASCII letters, numbers, underscores, and hyphens, and must be between 1+-- and 256 characters long.+--+-- For a FIFO (first-in-first-out) topic, the name must end with the+-- @.fifo@ suffix.+newCreateTopic ::+  -- | 'name'+  Prelude.Text ->+  CreateTopic+newCreateTopic pName_ =+  CreateTopic'+    { attributes = Prelude.Nothing,+      dataProtectionPolicy = Prelude.Nothing,+      tags = Prelude.Nothing,+      name = pName_+    }++-- | A map of attributes with their corresponding values.+--+-- The following lists the names, descriptions, and values of the special+-- request parameters that the @CreateTopic@ action uses:+--+-- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+--     failed deliveries to HTTP\/S endpoints.+--+-- -   @DisplayName@ – The display name to use for a topic with SMS+--     subscriptions.+--+-- -   @FifoTopic@ – Set to true to create a FIFO topic.+--+-- -   @Policy@ – The policy that defines who can access your topic. By+--     default, only the topic owner can publish or subscribe to the topic.+--+-- -   @SignatureVersion@ – The signature version corresponds to the+--     hashing algorithm used while creating the signature of the+--     notifications, subscription confirmations, or unsubscribe+--     confirmation messages sent by Amazon SNS. By default,+--     @SignatureVersion@ is set to 1.+--+-- -   @TracingConfig@ – Tracing mode of an Amazon SNS topic. By default+--     @TracingConfig@ is set to @PassThrough@, and the topic passes+--     through the tracing header it receives from an Amazon SNS publisher+--     to its subscriptions. If set to Active, Amazon SNS will vend X-Ray+--     segment data to topic owner account if the sampled flag in the+--     tracing header is true. This is only supported on standard topics.+--+-- The following attribute applies only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html server-side encryption>:+--+-- -   @KmsMasterKeyId@ – The ID of an Amazon Web Services managed customer+--     master key (CMK) for Amazon SNS or a custom CMK. For more+--     information, see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms Key Terms>.+--     For more examples, see+--     <https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters KeyId>+--     in the /Key Management Service API Reference/.+--+-- The following attributes apply only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html FIFO topics>:+--+-- -   @FifoTopic@ – When this is set to @true@, a FIFO topic is created.+--+-- -   @ContentBasedDeduplication@ – Enables content-based deduplication+--     for FIFO topics.+--+--     -   By default, @ContentBasedDeduplication@ is set to @false@. If+--         you create a FIFO topic and this attribute is @false@, you must+--         specify a value for the @MessageDeduplicationId@ parameter for+--         the+--         <https://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish>+--         action.+--+--     -   When you set @ContentBasedDeduplication@ to @true@, Amazon SNS+--         uses a SHA-256 hash to generate the @MessageDeduplicationId@+--         using the body of the message (but not the attributes of the+--         message).+--+--         (Optional) To override the generated value, you can specify a+--         value for the @MessageDeduplicationId@ parameter for the+--         @Publish@ action.+createTopic_attributes :: Lens.Lens' CreateTopic (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createTopic_attributes = Lens.lens (\CreateTopic' {attributes} -> attributes) (\s@CreateTopic' {} a -> s {attributes = a} :: CreateTopic) Prelude.. Lens.mapping Lens.coerced++-- | The body of the policy document you want to use for this topic.+--+-- You can only add one policy per topic.+--+-- The policy must be in JSON string format.+--+-- Length Constraints: Maximum length of 30,720.+createTopic_dataProtectionPolicy :: Lens.Lens' CreateTopic (Prelude.Maybe Prelude.Text)+createTopic_dataProtectionPolicy = Lens.lens (\CreateTopic' {dataProtectionPolicy} -> dataProtectionPolicy) (\s@CreateTopic' {} a -> s {dataProtectionPolicy = a} :: CreateTopic)++-- | The list of tags to add to a new topic.+--+-- To be able to tag a topic on creation, you must have the+-- @sns:CreateTopic@ and @sns:TagResource@ permissions.+createTopic_tags :: Lens.Lens' CreateTopic (Prelude.Maybe [Tag])+createTopic_tags = Lens.lens (\CreateTopic' {tags} -> tags) (\s@CreateTopic' {} a -> s {tags = a} :: CreateTopic) Prelude.. Lens.mapping Lens.coerced++-- | The name of the topic you want to create.+--+-- Constraints: Topic names must be made up of only uppercase and lowercase+-- ASCII letters, numbers, underscores, and hyphens, and must be between 1+-- and 256 characters long.+--+-- For a FIFO (first-in-first-out) topic, the name must end with the+-- @.fifo@ suffix.+createTopic_name :: Lens.Lens' CreateTopic Prelude.Text+createTopic_name = Lens.lens (\CreateTopic' {name} -> name) (\s@CreateTopic' {} a -> s {name = a} :: CreateTopic)++instance Core.AWSRequest CreateTopic where+  type AWSResponse CreateTopic = CreateTopicResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "CreateTopicResult"+      ( \s h x ->+          CreateTopicResponse'+            Prelude.<$> (x Data..@? "TopicArn")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateTopic where+  hashWithSalt _salt CreateTopic' {..} =+    _salt+      `Prelude.hashWithSalt` attributes+      `Prelude.hashWithSalt` dataProtectionPolicy+      `Prelude.hashWithSalt` tags+      `Prelude.hashWithSalt` name++instance Prelude.NFData CreateTopic where+  rnf CreateTopic' {..} =+    Prelude.rnf attributes+      `Prelude.seq` Prelude.rnf dataProtectionPolicy+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders CreateTopic where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath CreateTopic where+  toPath = Prelude.const "/"++instance Data.ToQuery CreateTopic where+  toQuery CreateTopic' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("CreateTopic" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "Attributes"+          Data.=: Data.toQuery+            ( Data.toQueryMap "entry" "key" "value"+                Prelude.<$> attributes+            ),+        "DataProtectionPolicy" Data.=: dataProtectionPolicy,+        "Tags"+          Data.=: Data.toQuery+            (Data.toQueryList "member" Prelude.<$> tags),+        "Name" Data.=: name+      ]++-- | Response from CreateTopic action.+--+-- /See:/ 'newCreateTopicResponse' smart constructor.+data CreateTopicResponse = CreateTopicResponse'+  { -- | The Amazon Resource Name (ARN) assigned to the created topic.+    topicArn :: 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 'CreateTopicResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'createTopicResponse_topicArn' - The Amazon Resource Name (ARN) assigned to the created topic.+--+-- 'httpStatus', 'createTopicResponse_httpStatus' - The response's http status code.+newCreateTopicResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateTopicResponse+newCreateTopicResponse pHttpStatus_ =+  CreateTopicResponse'+    { topicArn = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The Amazon Resource Name (ARN) assigned to the created topic.+createTopicResponse_topicArn :: Lens.Lens' CreateTopicResponse (Prelude.Maybe Prelude.Text)+createTopicResponse_topicArn = Lens.lens (\CreateTopicResponse' {topicArn} -> topicArn) (\s@CreateTopicResponse' {} a -> s {topicArn = a} :: CreateTopicResponse)++-- | The response's http status code.+createTopicResponse_httpStatus :: Lens.Lens' CreateTopicResponse Prelude.Int+createTopicResponse_httpStatus = Lens.lens (\CreateTopicResponse' {httpStatus} -> httpStatus) (\s@CreateTopicResponse' {} a -> s {httpStatus = a} :: CreateTopicResponse)++instance Prelude.NFData CreateTopicResponse where+  rnf CreateTopicResponse' {..} =+    Prelude.rnf topicArn+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/DeleteEndpoint.hs view
@@ -0,0 +1,127 @@+{-# 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.SNS.DeleteEndpoint+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the endpoint for a device and mobile app from Amazon SNS. This+-- action is idempotent. For more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+--+-- When you delete an endpoint that is also subscribed to a topic, then you+-- must also unsubscribe the endpoint from the topic.+module Amazonka.SNS.DeleteEndpoint+  ( -- * Creating a Request+    DeleteEndpoint (..),+    newDeleteEndpoint,++    -- * Request Lenses+    deleteEndpoint_endpointArn,++    -- * Destructuring the Response+    DeleteEndpointResponse (..),+    newDeleteEndpointResponse,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for DeleteEndpoint action.+--+-- /See:/ 'newDeleteEndpoint' smart constructor.+data DeleteEndpoint = DeleteEndpoint'+  { -- | EndpointArn of endpoint to delete.+    endpointArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteEndpoint' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'endpointArn', 'deleteEndpoint_endpointArn' - EndpointArn of endpoint to delete.+newDeleteEndpoint ::+  -- | 'endpointArn'+  Prelude.Text ->+  DeleteEndpoint+newDeleteEndpoint pEndpointArn_ =+  DeleteEndpoint' {endpointArn = pEndpointArn_}++-- | EndpointArn of endpoint to delete.+deleteEndpoint_endpointArn :: Lens.Lens' DeleteEndpoint Prelude.Text+deleteEndpoint_endpointArn = Lens.lens (\DeleteEndpoint' {endpointArn} -> endpointArn) (\s@DeleteEndpoint' {} a -> s {endpointArn = a} :: DeleteEndpoint)++instance Core.AWSRequest DeleteEndpoint where+  type+    AWSResponse DeleteEndpoint =+      DeleteEndpointResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveNull DeleteEndpointResponse'++instance Prelude.Hashable DeleteEndpoint where+  hashWithSalt _salt DeleteEndpoint' {..} =+    _salt `Prelude.hashWithSalt` endpointArn++instance Prelude.NFData DeleteEndpoint where+  rnf DeleteEndpoint' {..} = Prelude.rnf endpointArn++instance Data.ToHeaders DeleteEndpoint where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath DeleteEndpoint where+  toPath = Prelude.const "/"++instance Data.ToQuery DeleteEndpoint where+  toQuery DeleteEndpoint' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("DeleteEndpoint" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "EndpointArn" Data.=: endpointArn+      ]++-- | /See:/ 'newDeleteEndpointResponse' smart constructor.+data DeleteEndpointResponse = DeleteEndpointResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteEndpointResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newDeleteEndpointResponse ::+  DeleteEndpointResponse+newDeleteEndpointResponse = DeleteEndpointResponse'++instance Prelude.NFData DeleteEndpointResponse where+  rnf _ = ()
+ gen/Amazonka/SNS/DeletePlatformApplication.hs view
@@ -0,0 +1,135 @@+{-# 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.SNS.DeletePlatformApplication+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a platform application object for one of the supported push+-- notification services, such as APNS and GCM (Firebase Cloud Messaging).+-- For more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+module Amazonka.SNS.DeletePlatformApplication+  ( -- * Creating a Request+    DeletePlatformApplication (..),+    newDeletePlatformApplication,++    -- * Request Lenses+    deletePlatformApplication_platformApplicationArn,++    -- * Destructuring the Response+    DeletePlatformApplicationResponse (..),+    newDeletePlatformApplicationResponse,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for DeletePlatformApplication action.+--+-- /See:/ 'newDeletePlatformApplication' smart constructor.+data DeletePlatformApplication = DeletePlatformApplication'+  { -- | PlatformApplicationArn of platform application object to delete.+    platformApplicationArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeletePlatformApplication' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'platformApplicationArn', 'deletePlatformApplication_platformApplicationArn' - PlatformApplicationArn of platform application object to delete.+newDeletePlatformApplication ::+  -- | 'platformApplicationArn'+  Prelude.Text ->+  DeletePlatformApplication+newDeletePlatformApplication pPlatformApplicationArn_ =+  DeletePlatformApplication'+    { platformApplicationArn =+        pPlatformApplicationArn_+    }++-- | PlatformApplicationArn of platform application object to delete.+deletePlatformApplication_platformApplicationArn :: Lens.Lens' DeletePlatformApplication Prelude.Text+deletePlatformApplication_platformApplicationArn = Lens.lens (\DeletePlatformApplication' {platformApplicationArn} -> platformApplicationArn) (\s@DeletePlatformApplication' {} a -> s {platformApplicationArn = a} :: DeletePlatformApplication)++instance Core.AWSRequest DeletePlatformApplication where+  type+    AWSResponse DeletePlatformApplication =+      DeletePlatformApplicationResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveNull+      DeletePlatformApplicationResponse'++instance Prelude.Hashable DeletePlatformApplication where+  hashWithSalt _salt DeletePlatformApplication' {..} =+    _salt `Prelude.hashWithSalt` platformApplicationArn++instance Prelude.NFData DeletePlatformApplication where+  rnf DeletePlatformApplication' {..} =+    Prelude.rnf platformApplicationArn++instance Data.ToHeaders DeletePlatformApplication where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath DeletePlatformApplication where+  toPath = Prelude.const "/"++instance Data.ToQuery DeletePlatformApplication where+  toQuery DeletePlatformApplication' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("DeletePlatformApplication" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "PlatformApplicationArn"+          Data.=: platformApplicationArn+      ]++-- | /See:/ 'newDeletePlatformApplicationResponse' smart constructor.+data DeletePlatformApplicationResponse = DeletePlatformApplicationResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeletePlatformApplicationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newDeletePlatformApplicationResponse ::+  DeletePlatformApplicationResponse+newDeletePlatformApplicationResponse =+  DeletePlatformApplicationResponse'++instance+  Prelude.NFData+    DeletePlatformApplicationResponse+  where+  rnf _ = ()
+ gen/Amazonka/SNS/DeleteSMSSandboxPhoneNumber.hs view
@@ -0,0 +1,166 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SNS.DeleteSMSSandboxPhoneNumber+-- 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 Amazon Web Services account\'s verified or pending phone+-- number from the SMS sandbox.+--+-- When you start using Amazon SNS to send SMS messages, your Amazon Web+-- Services account is in the /SMS sandbox/. The SMS sandbox provides a+-- safe environment for you to try Amazon SNS features without risking your+-- reputation as an SMS sender. While your Amazon Web Services account is+-- in the SMS sandbox, you can use all of the features of Amazon SNS.+-- However, you can send SMS messages only to verified destination phone+-- numbers. For more information, including how to move out of the sandbox+-- to send messages without restrictions, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html SMS sandbox>+-- in the /Amazon SNS Developer Guide/.+module Amazonka.SNS.DeleteSMSSandboxPhoneNumber+  ( -- * Creating a Request+    DeleteSMSSandboxPhoneNumber (..),+    newDeleteSMSSandboxPhoneNumber,++    -- * Request Lenses+    deleteSMSSandboxPhoneNumber_phoneNumber,++    -- * Destructuring the Response+    DeleteSMSSandboxPhoneNumberResponse (..),+    newDeleteSMSSandboxPhoneNumberResponse,++    -- * Response Lenses+    deleteSMSSandboxPhoneNumberResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newDeleteSMSSandboxPhoneNumber' smart constructor.+data DeleteSMSSandboxPhoneNumber = DeleteSMSSandboxPhoneNumber'+  { -- | The destination phone number to delete.+    phoneNumber :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteSMSSandboxPhoneNumber' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'phoneNumber', 'deleteSMSSandboxPhoneNumber_phoneNumber' - The destination phone number to delete.+newDeleteSMSSandboxPhoneNumber ::+  -- | 'phoneNumber'+  Prelude.Text ->+  DeleteSMSSandboxPhoneNumber+newDeleteSMSSandboxPhoneNumber pPhoneNumber_ =+  DeleteSMSSandboxPhoneNumber'+    { phoneNumber =+        pPhoneNumber_+    }++-- | The destination phone number to delete.+deleteSMSSandboxPhoneNumber_phoneNumber :: Lens.Lens' DeleteSMSSandboxPhoneNumber Prelude.Text+deleteSMSSandboxPhoneNumber_phoneNumber = Lens.lens (\DeleteSMSSandboxPhoneNumber' {phoneNumber} -> phoneNumber) (\s@DeleteSMSSandboxPhoneNumber' {} a -> s {phoneNumber = a} :: DeleteSMSSandboxPhoneNumber)++instance Core.AWSRequest DeleteSMSSandboxPhoneNumber where+  type+    AWSResponse DeleteSMSSandboxPhoneNumber =+      DeleteSMSSandboxPhoneNumberResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "DeleteSMSSandboxPhoneNumberResult"+      ( \s h x ->+          DeleteSMSSandboxPhoneNumberResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteSMSSandboxPhoneNumber where+  hashWithSalt _salt DeleteSMSSandboxPhoneNumber' {..} =+    _salt `Prelude.hashWithSalt` phoneNumber++instance Prelude.NFData DeleteSMSSandboxPhoneNumber where+  rnf DeleteSMSSandboxPhoneNumber' {..} =+    Prelude.rnf phoneNumber++instance Data.ToHeaders DeleteSMSSandboxPhoneNumber where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath DeleteSMSSandboxPhoneNumber where+  toPath = Prelude.const "/"++instance Data.ToQuery DeleteSMSSandboxPhoneNumber where+  toQuery DeleteSMSSandboxPhoneNumber' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ( "DeleteSMSSandboxPhoneNumber" ::+                      Prelude.ByteString+                  ),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "PhoneNumber" Data.=: phoneNumber+      ]++-- | /See:/ 'newDeleteSMSSandboxPhoneNumberResponse' smart constructor.+data DeleteSMSSandboxPhoneNumberResponse = DeleteSMSSandboxPhoneNumberResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteSMSSandboxPhoneNumberResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'deleteSMSSandboxPhoneNumberResponse_httpStatus' - The response's http status code.+newDeleteSMSSandboxPhoneNumberResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteSMSSandboxPhoneNumberResponse+newDeleteSMSSandboxPhoneNumberResponse pHttpStatus_ =+  DeleteSMSSandboxPhoneNumberResponse'+    { httpStatus =+        pHttpStatus_+    }++-- | The response's http status code.+deleteSMSSandboxPhoneNumberResponse_httpStatus :: Lens.Lens' DeleteSMSSandboxPhoneNumberResponse Prelude.Int+deleteSMSSandboxPhoneNumberResponse_httpStatus = Lens.lens (\DeleteSMSSandboxPhoneNumberResponse' {httpStatus} -> httpStatus) (\s@DeleteSMSSandboxPhoneNumberResponse' {} a -> s {httpStatus = a} :: DeleteSMSSandboxPhoneNumberResponse)++instance+  Prelude.NFData+    DeleteSMSSandboxPhoneNumberResponse+  where+  rnf DeleteSMSSandboxPhoneNumberResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/SNS/DeleteTopic.hs view
@@ -0,0 +1,120 @@+{-# 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.SNS.DeleteTopic+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a topic and all its subscriptions. Deleting a topic might+-- prevent some messages previously sent to the topic from being delivered+-- to subscribers. This action is idempotent, so deleting a topic that does+-- not exist does not result in an error.+module Amazonka.SNS.DeleteTopic+  ( -- * Creating a Request+    DeleteTopic (..),+    newDeleteTopic,++    -- * Request Lenses+    deleteTopic_topicArn,++    -- * Destructuring the Response+    DeleteTopicResponse (..),+    newDeleteTopicResponse,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newDeleteTopic' smart constructor.+data DeleteTopic = DeleteTopic'+  { -- | The ARN of the topic you want to delete.+    topicArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteTopic' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'deleteTopic_topicArn' - The ARN of the topic you want to delete.+newDeleteTopic ::+  -- | 'topicArn'+  Prelude.Text ->+  DeleteTopic+newDeleteTopic pTopicArn_ =+  DeleteTopic' {topicArn = pTopicArn_}++-- | The ARN of the topic you want to delete.+deleteTopic_topicArn :: Lens.Lens' DeleteTopic Prelude.Text+deleteTopic_topicArn = Lens.lens (\DeleteTopic' {topicArn} -> topicArn) (\s@DeleteTopic' {} a -> s {topicArn = a} :: DeleteTopic)++instance Core.AWSRequest DeleteTopic where+  type AWSResponse DeleteTopic = DeleteTopicResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response = Response.receiveNull DeleteTopicResponse'++instance Prelude.Hashable DeleteTopic where+  hashWithSalt _salt DeleteTopic' {..} =+    _salt `Prelude.hashWithSalt` topicArn++instance Prelude.NFData DeleteTopic where+  rnf DeleteTopic' {..} = Prelude.rnf topicArn++instance Data.ToHeaders DeleteTopic where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath DeleteTopic where+  toPath = Prelude.const "/"++instance Data.ToQuery DeleteTopic where+  toQuery DeleteTopic' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("DeleteTopic" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "TopicArn" Data.=: topicArn+      ]++-- | /See:/ 'newDeleteTopicResponse' smart constructor.+data DeleteTopicResponse = DeleteTopicResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteTopicResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newDeleteTopicResponse ::+  DeleteTopicResponse+newDeleteTopicResponse = DeleteTopicResponse'++instance Prelude.NFData DeleteTopicResponse where+  rnf _ = ()
+ gen/Amazonka/SNS/GetDataProtectionPolicy.hs view
@@ -0,0 +1,177 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SNS.GetDataProtectionPolicy+-- 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 inline @DataProtectionPolicy@ document that is+-- stored in the specified Amazon SNS topic.+module Amazonka.SNS.GetDataProtectionPolicy+  ( -- * Creating a Request+    GetDataProtectionPolicy (..),+    newGetDataProtectionPolicy,++    -- * Request Lenses+    getDataProtectionPolicy_resourceArn,++    -- * Destructuring the Response+    GetDataProtectionPolicyResponse (..),+    newGetDataProtectionPolicyResponse,++    -- * Response Lenses+    getDataProtectionPolicyResponse_dataProtectionPolicy,+    getDataProtectionPolicyResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newGetDataProtectionPolicy' smart constructor.+data GetDataProtectionPolicy = GetDataProtectionPolicy'+  { -- | The ARN of the topic whose @DataProtectionPolicy@ you want to get.+    --+    -- For more information about ARNs, see+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+    -- in the Amazon Web Services General Reference.+    resourceArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetDataProtectionPolicy' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'getDataProtectionPolicy_resourceArn' - The ARN of the topic whose @DataProtectionPolicy@ you want to get.+--+-- For more information about ARNs, see+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- in the Amazon Web Services General Reference.+newGetDataProtectionPolicy ::+  -- | 'resourceArn'+  Prelude.Text ->+  GetDataProtectionPolicy+newGetDataProtectionPolicy pResourceArn_ =+  GetDataProtectionPolicy'+    { resourceArn =+        pResourceArn_+    }++-- | The ARN of the topic whose @DataProtectionPolicy@ you want to get.+--+-- For more information about ARNs, see+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- in the Amazon Web Services General Reference.+getDataProtectionPolicy_resourceArn :: Lens.Lens' GetDataProtectionPolicy Prelude.Text+getDataProtectionPolicy_resourceArn = Lens.lens (\GetDataProtectionPolicy' {resourceArn} -> resourceArn) (\s@GetDataProtectionPolicy' {} a -> s {resourceArn = a} :: GetDataProtectionPolicy)++instance Core.AWSRequest GetDataProtectionPolicy where+  type+    AWSResponse GetDataProtectionPolicy =+      GetDataProtectionPolicyResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "GetDataProtectionPolicyResult"+      ( \s h x ->+          GetDataProtectionPolicyResponse'+            Prelude.<$> (x Data..@? "DataProtectionPolicy")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetDataProtectionPolicy where+  hashWithSalt _salt GetDataProtectionPolicy' {..} =+    _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData GetDataProtectionPolicy where+  rnf GetDataProtectionPolicy' {..} =+    Prelude.rnf resourceArn++instance Data.ToHeaders GetDataProtectionPolicy where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath GetDataProtectionPolicy where+  toPath = Prelude.const "/"++instance Data.ToQuery GetDataProtectionPolicy where+  toQuery GetDataProtectionPolicy' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("GetDataProtectionPolicy" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "ResourceArn" Data.=: resourceArn+      ]++-- | /See:/ 'newGetDataProtectionPolicyResponse' smart constructor.+data GetDataProtectionPolicyResponse = GetDataProtectionPolicyResponse'+  { -- | Retrieves the @DataProtectionPolicy@ in JSON string format.+    dataProtectionPolicy :: 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 'GetDataProtectionPolicyResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'dataProtectionPolicy', 'getDataProtectionPolicyResponse_dataProtectionPolicy' - Retrieves the @DataProtectionPolicy@ in JSON string format.+--+-- 'httpStatus', 'getDataProtectionPolicyResponse_httpStatus' - The response's http status code.+newGetDataProtectionPolicyResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetDataProtectionPolicyResponse+newGetDataProtectionPolicyResponse pHttpStatus_ =+  GetDataProtectionPolicyResponse'+    { dataProtectionPolicy =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Retrieves the @DataProtectionPolicy@ in JSON string format.+getDataProtectionPolicyResponse_dataProtectionPolicy :: Lens.Lens' GetDataProtectionPolicyResponse (Prelude.Maybe Prelude.Text)+getDataProtectionPolicyResponse_dataProtectionPolicy = Lens.lens (\GetDataProtectionPolicyResponse' {dataProtectionPolicy} -> dataProtectionPolicy) (\s@GetDataProtectionPolicyResponse' {} a -> s {dataProtectionPolicy = a} :: GetDataProtectionPolicyResponse)++-- | The response's http status code.+getDataProtectionPolicyResponse_httpStatus :: Lens.Lens' GetDataProtectionPolicyResponse Prelude.Int+getDataProtectionPolicyResponse_httpStatus = Lens.lens (\GetDataProtectionPolicyResponse' {httpStatus} -> httpStatus) (\s@GetDataProtectionPolicyResponse' {} a -> s {httpStatus = a} :: GetDataProtectionPolicyResponse)++instance+  Prelude.NFData+    GetDataProtectionPolicyResponse+  where+  rnf GetDataProtectionPolicyResponse' {..} =+    Prelude.rnf dataProtectionPolicy+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/GetEndpointAttributes.hs view
@@ -0,0 +1,217 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SNS.GetEndpointAttributes+-- 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 endpoint attributes for a device on one of the supported+-- push notification services, such as GCM (Firebase Cloud Messaging) and+-- APNS. For more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+module Amazonka.SNS.GetEndpointAttributes+  ( -- * Creating a Request+    GetEndpointAttributes (..),+    newGetEndpointAttributes,++    -- * Request Lenses+    getEndpointAttributes_endpointArn,++    -- * Destructuring the Response+    GetEndpointAttributesResponse (..),+    newGetEndpointAttributesResponse,++    -- * Response Lenses+    getEndpointAttributesResponse_attributes,+    getEndpointAttributesResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for GetEndpointAttributes action.+--+-- /See:/ 'newGetEndpointAttributes' smart constructor.+data GetEndpointAttributes = GetEndpointAttributes'+  { -- | EndpointArn for GetEndpointAttributes input.+    endpointArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEndpointAttributes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'endpointArn', 'getEndpointAttributes_endpointArn' - EndpointArn for GetEndpointAttributes input.+newGetEndpointAttributes ::+  -- | 'endpointArn'+  Prelude.Text ->+  GetEndpointAttributes+newGetEndpointAttributes pEndpointArn_ =+  GetEndpointAttributes' {endpointArn = pEndpointArn_}++-- | EndpointArn for GetEndpointAttributes input.+getEndpointAttributes_endpointArn :: Lens.Lens' GetEndpointAttributes Prelude.Text+getEndpointAttributes_endpointArn = Lens.lens (\GetEndpointAttributes' {endpointArn} -> endpointArn) (\s@GetEndpointAttributes' {} a -> s {endpointArn = a} :: GetEndpointAttributes)++instance Core.AWSRequest GetEndpointAttributes where+  type+    AWSResponse GetEndpointAttributes =+      GetEndpointAttributesResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "GetEndpointAttributesResult"+      ( \s h x ->+          GetEndpointAttributesResponse'+            Prelude.<$> ( x+                            Data..@? "Attributes"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLMap "entry" "key" "value")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetEndpointAttributes where+  hashWithSalt _salt GetEndpointAttributes' {..} =+    _salt `Prelude.hashWithSalt` endpointArn++instance Prelude.NFData GetEndpointAttributes where+  rnf GetEndpointAttributes' {..} =+    Prelude.rnf endpointArn++instance Data.ToHeaders GetEndpointAttributes where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath GetEndpointAttributes where+  toPath = Prelude.const "/"++instance Data.ToQuery GetEndpointAttributes where+  toQuery GetEndpointAttributes' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("GetEndpointAttributes" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "EndpointArn" Data.=: endpointArn+      ]++-- | Response from GetEndpointAttributes of the EndpointArn.+--+-- /See:/ 'newGetEndpointAttributesResponse' smart constructor.+data GetEndpointAttributesResponse = GetEndpointAttributesResponse'+  { -- | Attributes include the following:+    --+    -- -   @CustomUserData@ – arbitrary user data to associate with the+    --     endpoint. Amazon SNS does not use this data. The data must be in+    --     UTF-8 format and less than 2KB.+    --+    -- -   @Enabled@ – flag that enables\/disables delivery to the endpoint.+    --     Amazon SNS will set this to false when a notification service+    --     indicates to Amazon SNS that the endpoint is invalid. Users can set+    --     it back to true, typically after updating Token.+    --+    -- -   @Token@ – device token, also referred to as a registration id, for+    --     an app and mobile device. This is returned from the notification+    --     service when an app and mobile device are registered with the+    --     notification service.+    --+    --     The device token for the iOS platform is returned in lowercase.+    attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEndpointAttributesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'getEndpointAttributesResponse_attributes' - Attributes include the following:+--+-- -   @CustomUserData@ – arbitrary user data to associate with the+--     endpoint. Amazon SNS does not use this data. The data must be in+--     UTF-8 format and less than 2KB.+--+-- -   @Enabled@ – flag that enables\/disables delivery to the endpoint.+--     Amazon SNS will set this to false when a notification service+--     indicates to Amazon SNS that the endpoint is invalid. Users can set+--     it back to true, typically after updating Token.+--+-- -   @Token@ – device token, also referred to as a registration id, for+--     an app and mobile device. This is returned from the notification+--     service when an app and mobile device are registered with the+--     notification service.+--+--     The device token for the iOS platform is returned in lowercase.+--+-- 'httpStatus', 'getEndpointAttributesResponse_httpStatus' - The response's http status code.+newGetEndpointAttributesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetEndpointAttributesResponse+newGetEndpointAttributesResponse pHttpStatus_ =+  GetEndpointAttributesResponse'+    { attributes =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Attributes include the following:+--+-- -   @CustomUserData@ – arbitrary user data to associate with the+--     endpoint. Amazon SNS does not use this data. The data must be in+--     UTF-8 format and less than 2KB.+--+-- -   @Enabled@ – flag that enables\/disables delivery to the endpoint.+--     Amazon SNS will set this to false when a notification service+--     indicates to Amazon SNS that the endpoint is invalid. Users can set+--     it back to true, typically after updating Token.+--+-- -   @Token@ – device token, also referred to as a registration id, for+--     an app and mobile device. This is returned from the notification+--     service when an app and mobile device are registered with the+--     notification service.+--+--     The device token for the iOS platform is returned in lowercase.+getEndpointAttributesResponse_attributes :: Lens.Lens' GetEndpointAttributesResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+getEndpointAttributesResponse_attributes = Lens.lens (\GetEndpointAttributesResponse' {attributes} -> attributes) (\s@GetEndpointAttributesResponse' {} a -> s {attributes = a} :: GetEndpointAttributesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getEndpointAttributesResponse_httpStatus :: Lens.Lens' GetEndpointAttributesResponse Prelude.Int+getEndpointAttributesResponse_httpStatus = Lens.lens (\GetEndpointAttributesResponse' {httpStatus} -> httpStatus) (\s@GetEndpointAttributesResponse' {} a -> s {httpStatus = a} :: GetEndpointAttributesResponse)++instance Prelude.NFData GetEndpointAttributesResponse where+  rnf GetEndpointAttributesResponse' {..} =+    Prelude.rnf attributes+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/GetPlatformApplicationAttributes.hs view
@@ -0,0 +1,263 @@+{-# 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.SNS.GetPlatformApplicationAttributes+-- 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 attributes of the platform application object for the+-- supported push notification services, such as APNS and GCM (Firebase+-- Cloud Messaging). For more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+module Amazonka.SNS.GetPlatformApplicationAttributes+  ( -- * Creating a Request+    GetPlatformApplicationAttributes (..),+    newGetPlatformApplicationAttributes,++    -- * Request Lenses+    getPlatformApplicationAttributes_platformApplicationArn,++    -- * Destructuring the Response+    GetPlatformApplicationAttributesResponse (..),+    newGetPlatformApplicationAttributesResponse,++    -- * Response Lenses+    getPlatformApplicationAttributesResponse_attributes,+    getPlatformApplicationAttributesResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for GetPlatformApplicationAttributes action.+--+-- /See:/ 'newGetPlatformApplicationAttributes' smart constructor.+data GetPlatformApplicationAttributes = GetPlatformApplicationAttributes'+  { -- | PlatformApplicationArn for GetPlatformApplicationAttributesInput.+    platformApplicationArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetPlatformApplicationAttributes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'platformApplicationArn', 'getPlatformApplicationAttributes_platformApplicationArn' - PlatformApplicationArn for GetPlatformApplicationAttributesInput.+newGetPlatformApplicationAttributes ::+  -- | 'platformApplicationArn'+  Prelude.Text ->+  GetPlatformApplicationAttributes+newGetPlatformApplicationAttributes+  pPlatformApplicationArn_ =+    GetPlatformApplicationAttributes'+      { platformApplicationArn =+          pPlatformApplicationArn_+      }++-- | PlatformApplicationArn for GetPlatformApplicationAttributesInput.+getPlatformApplicationAttributes_platformApplicationArn :: Lens.Lens' GetPlatformApplicationAttributes Prelude.Text+getPlatformApplicationAttributes_platformApplicationArn = Lens.lens (\GetPlatformApplicationAttributes' {platformApplicationArn} -> platformApplicationArn) (\s@GetPlatformApplicationAttributes' {} a -> s {platformApplicationArn = a} :: GetPlatformApplicationAttributes)++instance+  Core.AWSRequest+    GetPlatformApplicationAttributes+  where+  type+    AWSResponse GetPlatformApplicationAttributes =+      GetPlatformApplicationAttributesResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "GetPlatformApplicationAttributesResult"+      ( \s h x ->+          GetPlatformApplicationAttributesResponse'+            Prelude.<$> ( x+                            Data..@? "Attributes"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLMap "entry" "key" "value")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    GetPlatformApplicationAttributes+  where+  hashWithSalt+    _salt+    GetPlatformApplicationAttributes' {..} =+      _salt `Prelude.hashWithSalt` platformApplicationArn++instance+  Prelude.NFData+    GetPlatformApplicationAttributes+  where+  rnf GetPlatformApplicationAttributes' {..} =+    Prelude.rnf platformApplicationArn++instance+  Data.ToHeaders+    GetPlatformApplicationAttributes+  where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath GetPlatformApplicationAttributes where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    GetPlatformApplicationAttributes+  where+  toQuery GetPlatformApplicationAttributes' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ( "GetPlatformApplicationAttributes" ::+                      Prelude.ByteString+                  ),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "PlatformApplicationArn"+          Data.=: platformApplicationArn+      ]++-- | Response for GetPlatformApplicationAttributes action.+--+-- /See:/ 'newGetPlatformApplicationAttributesResponse' smart constructor.+data GetPlatformApplicationAttributesResponse = GetPlatformApplicationAttributesResponse'+  { -- | Attributes include the following:+    --+    -- -   @AppleCertificateExpiryDate@ – The expiry date of the SSL+    --     certificate used to configure certificate-based authentication.+    --+    -- -   @ApplePlatformTeamID@ – The Apple developer account ID used to+    --     configure token-based authentication.+    --+    -- -   @ApplePlatformBundleID@ – The app identifier used to configure+    --     token-based authentication.+    --+    -- -   @EventEndpointCreated@ – Topic ARN to which EndpointCreated event+    --     notifications should be sent.+    --+    -- -   @EventEndpointDeleted@ – Topic ARN to which EndpointDeleted event+    --     notifications should be sent.+    --+    -- -   @EventEndpointUpdated@ – Topic ARN to which EndpointUpdate event+    --     notifications should be sent.+    --+    -- -   @EventDeliveryFailure@ – Topic ARN to which DeliveryFailure event+    --     notifications should be sent upon Direct Publish delivery failure+    --     (permanent) to one of the application\'s endpoints.+    attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetPlatformApplicationAttributesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'getPlatformApplicationAttributesResponse_attributes' - Attributes include the following:+--+-- -   @AppleCertificateExpiryDate@ – The expiry date of the SSL+--     certificate used to configure certificate-based authentication.+--+-- -   @ApplePlatformTeamID@ – The Apple developer account ID used to+--     configure token-based authentication.+--+-- -   @ApplePlatformBundleID@ – The app identifier used to configure+--     token-based authentication.+--+-- -   @EventEndpointCreated@ – Topic ARN to which EndpointCreated event+--     notifications should be sent.+--+-- -   @EventEndpointDeleted@ – Topic ARN to which EndpointDeleted event+--     notifications should be sent.+--+-- -   @EventEndpointUpdated@ – Topic ARN to which EndpointUpdate event+--     notifications should be sent.+--+-- -   @EventDeliveryFailure@ – Topic ARN to which DeliveryFailure event+--     notifications should be sent upon Direct Publish delivery failure+--     (permanent) to one of the application\'s endpoints.+--+-- 'httpStatus', 'getPlatformApplicationAttributesResponse_httpStatus' - The response's http status code.+newGetPlatformApplicationAttributesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetPlatformApplicationAttributesResponse+newGetPlatformApplicationAttributesResponse+  pHttpStatus_ =+    GetPlatformApplicationAttributesResponse'+      { attributes =+          Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | Attributes include the following:+--+-- -   @AppleCertificateExpiryDate@ – The expiry date of the SSL+--     certificate used to configure certificate-based authentication.+--+-- -   @ApplePlatformTeamID@ – The Apple developer account ID used to+--     configure token-based authentication.+--+-- -   @ApplePlatformBundleID@ – The app identifier used to configure+--     token-based authentication.+--+-- -   @EventEndpointCreated@ – Topic ARN to which EndpointCreated event+--     notifications should be sent.+--+-- -   @EventEndpointDeleted@ – Topic ARN to which EndpointDeleted event+--     notifications should be sent.+--+-- -   @EventEndpointUpdated@ – Topic ARN to which EndpointUpdate event+--     notifications should be sent.+--+-- -   @EventDeliveryFailure@ – Topic ARN to which DeliveryFailure event+--     notifications should be sent upon Direct Publish delivery failure+--     (permanent) to one of the application\'s endpoints.+getPlatformApplicationAttributesResponse_attributes :: Lens.Lens' GetPlatformApplicationAttributesResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+getPlatformApplicationAttributesResponse_attributes = Lens.lens (\GetPlatformApplicationAttributesResponse' {attributes} -> attributes) (\s@GetPlatformApplicationAttributesResponse' {} a -> s {attributes = a} :: GetPlatformApplicationAttributesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getPlatformApplicationAttributesResponse_httpStatus :: Lens.Lens' GetPlatformApplicationAttributesResponse Prelude.Int+getPlatformApplicationAttributesResponse_httpStatus = Lens.lens (\GetPlatformApplicationAttributesResponse' {httpStatus} -> httpStatus) (\s@GetPlatformApplicationAttributesResponse' {} a -> s {httpStatus = a} :: GetPlatformApplicationAttributesResponse)++instance+  Prelude.NFData+    GetPlatformApplicationAttributesResponse+  where+  rnf GetPlatformApplicationAttributesResponse' {..} =+    Prelude.rnf attributes+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/GetSMSAttributes.hs view
@@ -0,0 +1,186 @@+{-# 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.SNS.GetSMSAttributes+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the settings for sending SMS messages from your Amazon Web+-- Services account.+--+-- These settings are set with the @SetSMSAttributes@ action.+module Amazonka.SNS.GetSMSAttributes+  ( -- * Creating a Request+    GetSMSAttributes (..),+    newGetSMSAttributes,++    -- * Request Lenses+    getSMSAttributes_attributes,++    -- * Destructuring the Response+    GetSMSAttributesResponse (..),+    newGetSMSAttributesResponse,++    -- * Response Lenses+    getSMSAttributesResponse_attributes,+    getSMSAttributesResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | The input for the @GetSMSAttributes@ request.+--+-- /See:/ 'newGetSMSAttributes' smart constructor.+data GetSMSAttributes = GetSMSAttributes'+  { -- | A list of the individual attribute names, such as @MonthlySpendLimit@,+    -- for which you want values.+    --+    -- For all attribute names, see+    -- <https://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html SetSMSAttributes>.+    --+    -- If you don\'t use this parameter, Amazon SNS returns all SMS attributes.+    attributes :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSMSAttributes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'getSMSAttributes_attributes' - A list of the individual attribute names, such as @MonthlySpendLimit@,+-- for which you want values.+--+-- For all attribute names, see+-- <https://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html SetSMSAttributes>.+--+-- If you don\'t use this parameter, Amazon SNS returns all SMS attributes.+newGetSMSAttributes ::+  GetSMSAttributes+newGetSMSAttributes =+  GetSMSAttributes' {attributes = Prelude.Nothing}++-- | A list of the individual attribute names, such as @MonthlySpendLimit@,+-- for which you want values.+--+-- For all attribute names, see+-- <https://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html SetSMSAttributes>.+--+-- If you don\'t use this parameter, Amazon SNS returns all SMS attributes.+getSMSAttributes_attributes :: Lens.Lens' GetSMSAttributes (Prelude.Maybe [Prelude.Text])+getSMSAttributes_attributes = Lens.lens (\GetSMSAttributes' {attributes} -> attributes) (\s@GetSMSAttributes' {} a -> s {attributes = a} :: GetSMSAttributes) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSRequest GetSMSAttributes where+  type+    AWSResponse GetSMSAttributes =+      GetSMSAttributesResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "GetSMSAttributesResult"+      ( \s h x ->+          GetSMSAttributesResponse'+            Prelude.<$> ( x+                            Data..@? "attributes"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLMap "entry" "key" "value")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetSMSAttributes where+  hashWithSalt _salt GetSMSAttributes' {..} =+    _salt `Prelude.hashWithSalt` attributes++instance Prelude.NFData GetSMSAttributes where+  rnf GetSMSAttributes' {..} = Prelude.rnf attributes++instance Data.ToHeaders GetSMSAttributes where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath GetSMSAttributes where+  toPath = Prelude.const "/"++instance Data.ToQuery GetSMSAttributes where+  toQuery GetSMSAttributes' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("GetSMSAttributes" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "attributes"+          Data.=: Data.toQuery+            (Data.toQueryList "member" Prelude.<$> attributes)+      ]++-- | The response from the @GetSMSAttributes@ request.+--+-- /See:/ 'newGetSMSAttributesResponse' smart constructor.+data GetSMSAttributesResponse = GetSMSAttributesResponse'+  { -- | The SMS attribute names and their values.+    attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSMSAttributesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'getSMSAttributesResponse_attributes' - The SMS attribute names and their values.+--+-- 'httpStatus', 'getSMSAttributesResponse_httpStatus' - The response's http status code.+newGetSMSAttributesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetSMSAttributesResponse+newGetSMSAttributesResponse pHttpStatus_ =+  GetSMSAttributesResponse'+    { attributes =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The SMS attribute names and their values.+getSMSAttributesResponse_attributes :: Lens.Lens' GetSMSAttributesResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+getSMSAttributesResponse_attributes = Lens.lens (\GetSMSAttributesResponse' {attributes} -> attributes) (\s@GetSMSAttributesResponse' {} a -> s {attributes = a} :: GetSMSAttributesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getSMSAttributesResponse_httpStatus :: Lens.Lens' GetSMSAttributesResponse Prelude.Int+getSMSAttributesResponse_httpStatus = Lens.lens (\GetSMSAttributesResponse' {httpStatus} -> httpStatus) (\s@GetSMSAttributesResponse' {} a -> s {httpStatus = a} :: GetSMSAttributesResponse)++instance Prelude.NFData GetSMSAttributesResponse where+  rnf GetSMSAttributesResponse' {..} =+    Prelude.rnf attributes+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/GetSMSSandboxAccountStatus.hs view
@@ -0,0 +1,165 @@+{-# 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.SNS.GetSMSSandboxAccountStatus+-- 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 SMS sandbox status for the calling Amazon Web Services+-- account in the target Amazon Web Services Region.+--+-- When you start using Amazon SNS to send SMS messages, your Amazon Web+-- Services account is in the /SMS sandbox/. The SMS sandbox provides a+-- safe environment for you to try Amazon SNS features without risking your+-- reputation as an SMS sender. While your Amazon Web Services account is+-- in the SMS sandbox, you can use all of the features of Amazon SNS.+-- However, you can send SMS messages only to verified destination phone+-- numbers. For more information, including how to move out of the sandbox+-- to send messages without restrictions, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html SMS sandbox>+-- in the /Amazon SNS Developer Guide/.+module Amazonka.SNS.GetSMSSandboxAccountStatus+  ( -- * Creating a Request+    GetSMSSandboxAccountStatus (..),+    newGetSMSSandboxAccountStatus,++    -- * Destructuring the Response+    GetSMSSandboxAccountStatusResponse (..),+    newGetSMSSandboxAccountStatusResponse,++    -- * Response Lenses+    getSMSSandboxAccountStatusResponse_httpStatus,+    getSMSSandboxAccountStatusResponse_isInSandbox,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newGetSMSSandboxAccountStatus' smart constructor.+data GetSMSSandboxAccountStatus = GetSMSSandboxAccountStatus'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSMSSandboxAccountStatus' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newGetSMSSandboxAccountStatus ::+  GetSMSSandboxAccountStatus+newGetSMSSandboxAccountStatus =+  GetSMSSandboxAccountStatus'++instance Core.AWSRequest GetSMSSandboxAccountStatus where+  type+    AWSResponse GetSMSSandboxAccountStatus =+      GetSMSSandboxAccountStatusResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "GetSMSSandboxAccountStatusResult"+      ( \s h x ->+          GetSMSSandboxAccountStatusResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..@ "IsInSandbox")+      )++instance Prelude.Hashable GetSMSSandboxAccountStatus where+  hashWithSalt _salt _ =+    _salt `Prelude.hashWithSalt` ()++instance Prelude.NFData GetSMSSandboxAccountStatus where+  rnf _ = ()++instance Data.ToHeaders GetSMSSandboxAccountStatus where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath GetSMSSandboxAccountStatus where+  toPath = Prelude.const "/"++instance Data.ToQuery GetSMSSandboxAccountStatus where+  toQuery =+    Prelude.const+      ( Prelude.mconcat+          [ "Action"+              Data.=: ("GetSMSSandboxAccountStatus" :: Prelude.ByteString),+            "Version"+              Data.=: ("2010-03-31" :: Prelude.ByteString)+          ]+      )++-- | /See:/ 'newGetSMSSandboxAccountStatusResponse' smart constructor.+data GetSMSSandboxAccountStatusResponse = GetSMSSandboxAccountStatusResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | Indicates whether the calling Amazon Web Services account is in the SMS+    -- sandbox.+    isInSandbox :: Prelude.Bool+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSMSSandboxAccountStatusResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'getSMSSandboxAccountStatusResponse_httpStatus' - The response's http status code.+--+-- 'isInSandbox', 'getSMSSandboxAccountStatusResponse_isInSandbox' - Indicates whether the calling Amazon Web Services account is in the SMS+-- sandbox.+newGetSMSSandboxAccountStatusResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'isInSandbox'+  Prelude.Bool ->+  GetSMSSandboxAccountStatusResponse+newGetSMSSandboxAccountStatusResponse+  pHttpStatus_+  pIsInSandbox_ =+    GetSMSSandboxAccountStatusResponse'+      { httpStatus =+          pHttpStatus_,+        isInSandbox = pIsInSandbox_+      }++-- | The response's http status code.+getSMSSandboxAccountStatusResponse_httpStatus :: Lens.Lens' GetSMSSandboxAccountStatusResponse Prelude.Int+getSMSSandboxAccountStatusResponse_httpStatus = Lens.lens (\GetSMSSandboxAccountStatusResponse' {httpStatus} -> httpStatus) (\s@GetSMSSandboxAccountStatusResponse' {} a -> s {httpStatus = a} :: GetSMSSandboxAccountStatusResponse)++-- | Indicates whether the calling Amazon Web Services account is in the SMS+-- sandbox.+getSMSSandboxAccountStatusResponse_isInSandbox :: Lens.Lens' GetSMSSandboxAccountStatusResponse Prelude.Bool+getSMSSandboxAccountStatusResponse_isInSandbox = Lens.lens (\GetSMSSandboxAccountStatusResponse' {isInSandbox} -> isInSandbox) (\s@GetSMSSandboxAccountStatusResponse' {} a -> s {isInSandbox = a} :: GetSMSSandboxAccountStatusResponse)++instance+  Prelude.NFData+    GetSMSSandboxAccountStatusResponse+  where+  rnf GetSMSSandboxAccountStatusResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf isInSandbox
+ gen/Amazonka/SNS/GetSubscriptionAttributes.hs view
@@ -0,0 +1,358 @@+{-# 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.SNS.GetSubscriptionAttributes+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns all of the properties of a subscription.+module Amazonka.SNS.GetSubscriptionAttributes+  ( -- * Creating a Request+    GetSubscriptionAttributes (..),+    newGetSubscriptionAttributes,++    -- * Request Lenses+    getSubscriptionAttributes_subscriptionArn,++    -- * Destructuring the Response+    GetSubscriptionAttributesResponse (..),+    newGetSubscriptionAttributesResponse,++    -- * Response Lenses+    getSubscriptionAttributesResponse_attributes,+    getSubscriptionAttributesResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for GetSubscriptionAttributes.+--+-- /See:/ 'newGetSubscriptionAttributes' smart constructor.+data GetSubscriptionAttributes = GetSubscriptionAttributes'+  { -- | The ARN of the subscription whose properties you want to get.+    subscriptionArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSubscriptionAttributes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'subscriptionArn', 'getSubscriptionAttributes_subscriptionArn' - The ARN of the subscription whose properties you want to get.+newGetSubscriptionAttributes ::+  -- | 'subscriptionArn'+  Prelude.Text ->+  GetSubscriptionAttributes+newGetSubscriptionAttributes pSubscriptionArn_ =+  GetSubscriptionAttributes'+    { subscriptionArn =+        pSubscriptionArn_+    }++-- | The ARN of the subscription whose properties you want to get.+getSubscriptionAttributes_subscriptionArn :: Lens.Lens' GetSubscriptionAttributes Prelude.Text+getSubscriptionAttributes_subscriptionArn = Lens.lens (\GetSubscriptionAttributes' {subscriptionArn} -> subscriptionArn) (\s@GetSubscriptionAttributes' {} a -> s {subscriptionArn = a} :: GetSubscriptionAttributes)++instance Core.AWSRequest GetSubscriptionAttributes where+  type+    AWSResponse GetSubscriptionAttributes =+      GetSubscriptionAttributesResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "GetSubscriptionAttributesResult"+      ( \s h x ->+          GetSubscriptionAttributesResponse'+            Prelude.<$> ( x+                            Data..@? "Attributes"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLMap "entry" "key" "value")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetSubscriptionAttributes where+  hashWithSalt _salt GetSubscriptionAttributes' {..} =+    _salt `Prelude.hashWithSalt` subscriptionArn++instance Prelude.NFData GetSubscriptionAttributes where+  rnf GetSubscriptionAttributes' {..} =+    Prelude.rnf subscriptionArn++instance Data.ToHeaders GetSubscriptionAttributes where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath GetSubscriptionAttributes where+  toPath = Prelude.const "/"++instance Data.ToQuery GetSubscriptionAttributes where+  toQuery GetSubscriptionAttributes' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("GetSubscriptionAttributes" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "SubscriptionArn" Data.=: subscriptionArn+      ]++-- | Response for GetSubscriptionAttributes action.+--+-- /See:/ 'newGetSubscriptionAttributesResponse' smart constructor.+data GetSubscriptionAttributesResponse = GetSubscriptionAttributesResponse'+  { -- | A map of the subscription\'s attributes. Attributes in this map include+    -- the following:+    --+    -- -   @ConfirmationWasAuthenticated@ – @true@ if the subscription+    --     confirmation request was authenticated.+    --+    -- -   @DeliveryPolicy@ – The JSON serialization of the subscription\'s+    --     delivery policy.+    --+    -- -   @EffectiveDeliveryPolicy@ – The JSON serialization of the effective+    --     delivery policy that takes into account the topic delivery policy+    --     and account system defaults.+    --+    -- -   @FilterPolicy@ – The filter policy JSON that is assigned to the+    --     subscription. For more information, see+    --     <https://docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html Amazon SNS Message Filtering>+    --     in the /Amazon SNS Developer Guide/.+    --+    -- -   @FilterPolicyScope@ – This attribute lets you choose the filtering+    --     scope by using one of the following string value types:+    --+    --     -   @MessageAttributes@ (default) – The filter is applied on the+    --         message attributes.+    --+    --     -   @MessageBody@ – The filter is applied on the message body.+    --+    -- -   @Owner@ – The Amazon Web Services account ID of the subscription\'s+    --     owner.+    --+    -- -   @PendingConfirmation@ – @true@ if the subscription hasn\'t been+    --     confirmed. To confirm a pending subscription, call the+    --     @ConfirmSubscription@ action with a confirmation token.+    --+    -- -   @RawMessageDelivery@ – @true@ if raw message delivery is enabled for+    --     the subscription. Raw messages are free of JSON formatting and can+    --     be sent to HTTP\/S and Amazon SQS endpoints.+    --+    -- -   @RedrivePolicy@ – When specified, sends undeliverable messages to+    --     the specified Amazon SQS dead-letter queue. Messages that can\'t be+    --     delivered due to client errors (for example, when the subscribed+    --     endpoint is unreachable) or server errors (for example, when the+    --     service that powers the subscribed endpoint becomes unavailable) are+    --     held in the dead-letter queue for further analysis or reprocessing.+    --+    -- -   @SubscriptionArn@ – The subscription\'s ARN.+    --+    -- -   @TopicArn@ – The topic ARN that the subscription is associated with.+    --+    -- The following attribute applies only to Amazon Kinesis Data Firehose+    -- delivery stream subscriptions:+    --+    -- -   @SubscriptionRoleArn@ – The ARN of the IAM role that has the+    --     following:+    --+    --     -   Permission to write to the Kinesis Data Firehose delivery stream+    --+    --     -   Amazon SNS listed as a trusted entity+    --+    --     Specifying a valid ARN for this attribute is required for Kinesis+    --     Data Firehose delivery stream subscriptions. For more information,+    --     see+    --     <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html Fanout to Kinesis Data Firehose delivery streams>+    --     in the /Amazon SNS Developer Guide/.+    attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSubscriptionAttributesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'getSubscriptionAttributesResponse_attributes' - A map of the subscription\'s attributes. Attributes in this map include+-- the following:+--+-- -   @ConfirmationWasAuthenticated@ – @true@ if the subscription+--     confirmation request was authenticated.+--+-- -   @DeliveryPolicy@ – The JSON serialization of the subscription\'s+--     delivery policy.+--+-- -   @EffectiveDeliveryPolicy@ – The JSON serialization of the effective+--     delivery policy that takes into account the topic delivery policy+--     and account system defaults.+--+-- -   @FilterPolicy@ – The filter policy JSON that is assigned to the+--     subscription. For more information, see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html Amazon SNS Message Filtering>+--     in the /Amazon SNS Developer Guide/.+--+-- -   @FilterPolicyScope@ – This attribute lets you choose the filtering+--     scope by using one of the following string value types:+--+--     -   @MessageAttributes@ (default) – The filter is applied on the+--         message attributes.+--+--     -   @MessageBody@ – The filter is applied on the message body.+--+-- -   @Owner@ – The Amazon Web Services account ID of the subscription\'s+--     owner.+--+-- -   @PendingConfirmation@ – @true@ if the subscription hasn\'t been+--     confirmed. To confirm a pending subscription, call the+--     @ConfirmSubscription@ action with a confirmation token.+--+-- -   @RawMessageDelivery@ – @true@ if raw message delivery is enabled for+--     the subscription. Raw messages are free of JSON formatting and can+--     be sent to HTTP\/S and Amazon SQS endpoints.+--+-- -   @RedrivePolicy@ – When specified, sends undeliverable messages to+--     the specified Amazon SQS dead-letter queue. Messages that can\'t be+--     delivered due to client errors (for example, when the subscribed+--     endpoint is unreachable) or server errors (for example, when the+--     service that powers the subscribed endpoint becomes unavailable) are+--     held in the dead-letter queue for further analysis or reprocessing.+--+-- -   @SubscriptionArn@ – The subscription\'s ARN.+--+-- -   @TopicArn@ – The topic ARN that the subscription is associated with.+--+-- The following attribute applies only to Amazon Kinesis Data Firehose+-- delivery stream subscriptions:+--+-- -   @SubscriptionRoleArn@ – The ARN of the IAM role that has the+--     following:+--+--     -   Permission to write to the Kinesis Data Firehose delivery stream+--+--     -   Amazon SNS listed as a trusted entity+--+--     Specifying a valid ARN for this attribute is required for Kinesis+--     Data Firehose delivery stream subscriptions. For more information,+--     see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html Fanout to Kinesis Data Firehose delivery streams>+--     in the /Amazon SNS Developer Guide/.+--+-- 'httpStatus', 'getSubscriptionAttributesResponse_httpStatus' - The response's http status code.+newGetSubscriptionAttributesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetSubscriptionAttributesResponse+newGetSubscriptionAttributesResponse pHttpStatus_ =+  GetSubscriptionAttributesResponse'+    { attributes =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A map of the subscription\'s attributes. Attributes in this map include+-- the following:+--+-- -   @ConfirmationWasAuthenticated@ – @true@ if the subscription+--     confirmation request was authenticated.+--+-- -   @DeliveryPolicy@ – The JSON serialization of the subscription\'s+--     delivery policy.+--+-- -   @EffectiveDeliveryPolicy@ – The JSON serialization of the effective+--     delivery policy that takes into account the topic delivery policy+--     and account system defaults.+--+-- -   @FilterPolicy@ – The filter policy JSON that is assigned to the+--     subscription. For more information, see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html Amazon SNS Message Filtering>+--     in the /Amazon SNS Developer Guide/.+--+-- -   @FilterPolicyScope@ – This attribute lets you choose the filtering+--     scope by using one of the following string value types:+--+--     -   @MessageAttributes@ (default) – The filter is applied on the+--         message attributes.+--+--     -   @MessageBody@ – The filter is applied on the message body.+--+-- -   @Owner@ – The Amazon Web Services account ID of the subscription\'s+--     owner.+--+-- -   @PendingConfirmation@ – @true@ if the subscription hasn\'t been+--     confirmed. To confirm a pending subscription, call the+--     @ConfirmSubscription@ action with a confirmation token.+--+-- -   @RawMessageDelivery@ – @true@ if raw message delivery is enabled for+--     the subscription. Raw messages are free of JSON formatting and can+--     be sent to HTTP\/S and Amazon SQS endpoints.+--+-- -   @RedrivePolicy@ – When specified, sends undeliverable messages to+--     the specified Amazon SQS dead-letter queue. Messages that can\'t be+--     delivered due to client errors (for example, when the subscribed+--     endpoint is unreachable) or server errors (for example, when the+--     service that powers the subscribed endpoint becomes unavailable) are+--     held in the dead-letter queue for further analysis or reprocessing.+--+-- -   @SubscriptionArn@ – The subscription\'s ARN.+--+-- -   @TopicArn@ – The topic ARN that the subscription is associated with.+--+-- The following attribute applies only to Amazon Kinesis Data Firehose+-- delivery stream subscriptions:+--+-- -   @SubscriptionRoleArn@ – The ARN of the IAM role that has the+--     following:+--+--     -   Permission to write to the Kinesis Data Firehose delivery stream+--+--     -   Amazon SNS listed as a trusted entity+--+--     Specifying a valid ARN for this attribute is required for Kinesis+--     Data Firehose delivery stream subscriptions. For more information,+--     see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html Fanout to Kinesis Data Firehose delivery streams>+--     in the /Amazon SNS Developer Guide/.+getSubscriptionAttributesResponse_attributes :: Lens.Lens' GetSubscriptionAttributesResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+getSubscriptionAttributesResponse_attributes = Lens.lens (\GetSubscriptionAttributesResponse' {attributes} -> attributes) (\s@GetSubscriptionAttributesResponse' {} a -> s {attributes = a} :: GetSubscriptionAttributesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getSubscriptionAttributesResponse_httpStatus :: Lens.Lens' GetSubscriptionAttributesResponse Prelude.Int+getSubscriptionAttributesResponse_httpStatus = Lens.lens (\GetSubscriptionAttributesResponse' {httpStatus} -> httpStatus) (\s@GetSubscriptionAttributesResponse' {} a -> s {httpStatus = a} :: GetSubscriptionAttributesResponse)++instance+  Prelude.NFData+    GetSubscriptionAttributesResponse+  where+  rnf GetSubscriptionAttributesResponse' {..} =+    Prelude.rnf attributes+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/GetTopicAttributes.hs view
@@ -0,0 +1,409 @@+{-# 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.SNS.GetTopicAttributes+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns all of the properties of a topic. Topic properties returned+-- might differ based on the authorization of the user.+module Amazonka.SNS.GetTopicAttributes+  ( -- * Creating a Request+    GetTopicAttributes (..),+    newGetTopicAttributes,++    -- * Request Lenses+    getTopicAttributes_topicArn,++    -- * Destructuring the Response+    GetTopicAttributesResponse (..),+    newGetTopicAttributesResponse,++    -- * Response Lenses+    getTopicAttributesResponse_attributes,+    getTopicAttributesResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for GetTopicAttributes action.+--+-- /See:/ 'newGetTopicAttributes' smart constructor.+data GetTopicAttributes = GetTopicAttributes'+  { -- | The ARN of the topic whose properties you want to get.+    topicArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetTopicAttributes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'getTopicAttributes_topicArn' - The ARN of the topic whose properties you want to get.+newGetTopicAttributes ::+  -- | 'topicArn'+  Prelude.Text ->+  GetTopicAttributes+newGetTopicAttributes pTopicArn_ =+  GetTopicAttributes' {topicArn = pTopicArn_}++-- | The ARN of the topic whose properties you want to get.+getTopicAttributes_topicArn :: Lens.Lens' GetTopicAttributes Prelude.Text+getTopicAttributes_topicArn = Lens.lens (\GetTopicAttributes' {topicArn} -> topicArn) (\s@GetTopicAttributes' {} a -> s {topicArn = a} :: GetTopicAttributes)++instance Core.AWSRequest GetTopicAttributes where+  type+    AWSResponse GetTopicAttributes =+      GetTopicAttributesResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "GetTopicAttributesResult"+      ( \s h x ->+          GetTopicAttributesResponse'+            Prelude.<$> ( x+                            Data..@? "Attributes"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLMap "entry" "key" "value")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetTopicAttributes where+  hashWithSalt _salt GetTopicAttributes' {..} =+    _salt `Prelude.hashWithSalt` topicArn++instance Prelude.NFData GetTopicAttributes where+  rnf GetTopicAttributes' {..} = Prelude.rnf topicArn++instance Data.ToHeaders GetTopicAttributes where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath GetTopicAttributes where+  toPath = Prelude.const "/"++instance Data.ToQuery GetTopicAttributes where+  toQuery GetTopicAttributes' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("GetTopicAttributes" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "TopicArn" Data.=: topicArn+      ]++-- | Response for GetTopicAttributes action.+--+-- /See:/ 'newGetTopicAttributesResponse' smart constructor.+data GetTopicAttributesResponse = GetTopicAttributesResponse'+  { -- | A map of the topic\'s attributes. Attributes in this map include the+    -- following:+    --+    -- -   @DeliveryPolicy@ – The JSON serialization of the topic\'s delivery+    --     policy.+    --+    -- -   @DisplayName@ – The human-readable name used in the @From@ field for+    --     notifications to @email@ and @email-json@ endpoints.+    --+    -- -   @EffectiveDeliveryPolicy@ – The JSON serialization of the effective+    --     delivery policy, taking system defaults into account.+    --+    -- -   @Owner@ – The Amazon Web Services account ID of the topic\'s owner.+    --+    -- -   @Policy@ – The JSON serialization of the topic\'s access control+    --     policy.+    --+    -- -   @SignatureVersion@ – The version of the Amazon SNS signature used+    --     for the topic.+    --+    --     -   By default, @SignatureVersion@ is set to __1__. The signature is+    --         a Base64-encoded __SHA1withRSA__ signature.+    --+    --     -   When you set @SignatureVersion@ to __2__. Amazon SNS uses a+    --         Base64-encoded __SHA256withRSA__ signature.+    --+    --         If the API response does not include the @SignatureVersion@+    --         attribute, it means that the @SignatureVersion@ for the topic+    --         has value __1__.+    --+    -- -   @SubscriptionsConfirmed@ – The number of confirmed subscriptions for+    --     the topic.+    --+    -- -   @SubscriptionsDeleted@ – The number of deleted subscriptions for the+    --     topic.+    --+    -- -   @SubscriptionsPending@ – The number of subscriptions pending+    --     confirmation for the topic.+    --+    -- -   @TopicArn@ – The topic\'s ARN.+    --+    -- -   @TracingConfig@ – Tracing mode of an Amazon SNS topic. By default+    --     @TracingConfig@ is set to @PassThrough@, and the topic passes+    --     through the tracing header it receives from an Amazon SNS publisher+    --     to its subscriptions. If set to Active, Amazon SNS will vend X-Ray+    --     segment data to topic owner account if the sampled flag in the+    --     tracing header is true. This is only supported on standard topics.+    --+    -- The following attribute applies only to+    -- <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html server-side-encryption>:+    --+    -- -   @KmsMasterKeyId@ - The ID of an Amazon Web Services managed customer+    --     master key (CMK) for Amazon SNS or a custom CMK. For more+    --     information, see+    --     <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms Key Terms>.+    --     For more examples, see+    --     <https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters KeyId>+    --     in the /Key Management Service API Reference/.+    --+    -- The following attributes apply only to+    -- <https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html FIFO topics>:+    --+    -- -   @FifoTopic@ – When this is set to @true@, a FIFO topic is created.+    --+    -- -   @ContentBasedDeduplication@ – Enables content-based deduplication+    --     for FIFO topics.+    --+    --     -   By default, @ContentBasedDeduplication@ is set to @false@. If+    --         you create a FIFO topic and this attribute is @false@, you must+    --         specify a value for the @MessageDeduplicationId@ parameter for+    --         the+    --         <https://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish>+    --         action.+    --+    --     -   When you set @ContentBasedDeduplication@ to @true@, Amazon SNS+    --         uses a SHA-256 hash to generate the @MessageDeduplicationId@+    --         using the body of the message (but not the attributes of the+    --         message).+    --+    --         (Optional) To override the generated value, you can specify a+    --         value for the @MessageDeduplicationId@ parameter for the+    --         @Publish@ action.+    attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetTopicAttributesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'getTopicAttributesResponse_attributes' - A map of the topic\'s attributes. Attributes in this map include the+-- following:+--+-- -   @DeliveryPolicy@ – The JSON serialization of the topic\'s delivery+--     policy.+--+-- -   @DisplayName@ – The human-readable name used in the @From@ field for+--     notifications to @email@ and @email-json@ endpoints.+--+-- -   @EffectiveDeliveryPolicy@ – The JSON serialization of the effective+--     delivery policy, taking system defaults into account.+--+-- -   @Owner@ – The Amazon Web Services account ID of the topic\'s owner.+--+-- -   @Policy@ – The JSON serialization of the topic\'s access control+--     policy.+--+-- -   @SignatureVersion@ – The version of the Amazon SNS signature used+--     for the topic.+--+--     -   By default, @SignatureVersion@ is set to __1__. The signature is+--         a Base64-encoded __SHA1withRSA__ signature.+--+--     -   When you set @SignatureVersion@ to __2__. Amazon SNS uses a+--         Base64-encoded __SHA256withRSA__ signature.+--+--         If the API response does not include the @SignatureVersion@+--         attribute, it means that the @SignatureVersion@ for the topic+--         has value __1__.+--+-- -   @SubscriptionsConfirmed@ – The number of confirmed subscriptions for+--     the topic.+--+-- -   @SubscriptionsDeleted@ – The number of deleted subscriptions for the+--     topic.+--+-- -   @SubscriptionsPending@ – The number of subscriptions pending+--     confirmation for the topic.+--+-- -   @TopicArn@ – The topic\'s ARN.+--+-- -   @TracingConfig@ – Tracing mode of an Amazon SNS topic. By default+--     @TracingConfig@ is set to @PassThrough@, and the topic passes+--     through the tracing header it receives from an Amazon SNS publisher+--     to its subscriptions. If set to Active, Amazon SNS will vend X-Ray+--     segment data to topic owner account if the sampled flag in the+--     tracing header is true. This is only supported on standard topics.+--+-- The following attribute applies only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html server-side-encryption>:+--+-- -   @KmsMasterKeyId@ - The ID of an Amazon Web Services managed customer+--     master key (CMK) for Amazon SNS or a custom CMK. For more+--     information, see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms Key Terms>.+--     For more examples, see+--     <https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters KeyId>+--     in the /Key Management Service API Reference/.+--+-- The following attributes apply only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html FIFO topics>:+--+-- -   @FifoTopic@ – When this is set to @true@, a FIFO topic is created.+--+-- -   @ContentBasedDeduplication@ – Enables content-based deduplication+--     for FIFO topics.+--+--     -   By default, @ContentBasedDeduplication@ is set to @false@. If+--         you create a FIFO topic and this attribute is @false@, you must+--         specify a value for the @MessageDeduplicationId@ parameter for+--         the+--         <https://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish>+--         action.+--+--     -   When you set @ContentBasedDeduplication@ to @true@, Amazon SNS+--         uses a SHA-256 hash to generate the @MessageDeduplicationId@+--         using the body of the message (but not the attributes of the+--         message).+--+--         (Optional) To override the generated value, you can specify a+--         value for the @MessageDeduplicationId@ parameter for the+--         @Publish@ action.+--+-- 'httpStatus', 'getTopicAttributesResponse_httpStatus' - The response's http status code.+newGetTopicAttributesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetTopicAttributesResponse+newGetTopicAttributesResponse pHttpStatus_ =+  GetTopicAttributesResponse'+    { attributes =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A map of the topic\'s attributes. Attributes in this map include the+-- following:+--+-- -   @DeliveryPolicy@ – The JSON serialization of the topic\'s delivery+--     policy.+--+-- -   @DisplayName@ – The human-readable name used in the @From@ field for+--     notifications to @email@ and @email-json@ endpoints.+--+-- -   @EffectiveDeliveryPolicy@ – The JSON serialization of the effective+--     delivery policy, taking system defaults into account.+--+-- -   @Owner@ – The Amazon Web Services account ID of the topic\'s owner.+--+-- -   @Policy@ – The JSON serialization of the topic\'s access control+--     policy.+--+-- -   @SignatureVersion@ – The version of the Amazon SNS signature used+--     for the topic.+--+--     -   By default, @SignatureVersion@ is set to __1__. The signature is+--         a Base64-encoded __SHA1withRSA__ signature.+--+--     -   When you set @SignatureVersion@ to __2__. Amazon SNS uses a+--         Base64-encoded __SHA256withRSA__ signature.+--+--         If the API response does not include the @SignatureVersion@+--         attribute, it means that the @SignatureVersion@ for the topic+--         has value __1__.+--+-- -   @SubscriptionsConfirmed@ – The number of confirmed subscriptions for+--     the topic.+--+-- -   @SubscriptionsDeleted@ – The number of deleted subscriptions for the+--     topic.+--+-- -   @SubscriptionsPending@ – The number of subscriptions pending+--     confirmation for the topic.+--+-- -   @TopicArn@ – The topic\'s ARN.+--+-- -   @TracingConfig@ – Tracing mode of an Amazon SNS topic. By default+--     @TracingConfig@ is set to @PassThrough@, and the topic passes+--     through the tracing header it receives from an Amazon SNS publisher+--     to its subscriptions. If set to Active, Amazon SNS will vend X-Ray+--     segment data to topic owner account if the sampled flag in the+--     tracing header is true. This is only supported on standard topics.+--+-- The following attribute applies only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html server-side-encryption>:+--+-- -   @KmsMasterKeyId@ - The ID of an Amazon Web Services managed customer+--     master key (CMK) for Amazon SNS or a custom CMK. For more+--     information, see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms Key Terms>.+--     For more examples, see+--     <https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters KeyId>+--     in the /Key Management Service API Reference/.+--+-- The following attributes apply only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html FIFO topics>:+--+-- -   @FifoTopic@ – When this is set to @true@, a FIFO topic is created.+--+-- -   @ContentBasedDeduplication@ – Enables content-based deduplication+--     for FIFO topics.+--+--     -   By default, @ContentBasedDeduplication@ is set to @false@. If+--         you create a FIFO topic and this attribute is @false@, you must+--         specify a value for the @MessageDeduplicationId@ parameter for+--         the+--         <https://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish>+--         action.+--+--     -   When you set @ContentBasedDeduplication@ to @true@, Amazon SNS+--         uses a SHA-256 hash to generate the @MessageDeduplicationId@+--         using the body of the message (but not the attributes of the+--         message).+--+--         (Optional) To override the generated value, you can specify a+--         value for the @MessageDeduplicationId@ parameter for the+--         @Publish@ action.+getTopicAttributesResponse_attributes :: Lens.Lens' GetTopicAttributesResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+getTopicAttributesResponse_attributes = Lens.lens (\GetTopicAttributesResponse' {attributes} -> attributes) (\s@GetTopicAttributesResponse' {} a -> s {attributes = a} :: GetTopicAttributesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getTopicAttributesResponse_httpStatus :: Lens.Lens' GetTopicAttributesResponse Prelude.Int+getTopicAttributesResponse_httpStatus = Lens.lens (\GetTopicAttributesResponse' {httpStatus} -> httpStatus) (\s@GetTopicAttributesResponse' {} a -> s {httpStatus = a} :: GetTopicAttributesResponse)++instance Prelude.NFData GetTopicAttributesResponse where+  rnf GetTopicAttributesResponse' {..} =+    Prelude.rnf attributes+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/Lens.hs view
@@ -0,0 +1,364 @@+{-# 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.SNS.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.SNS.Lens+  ( -- * Operations++    -- ** AddPermission+    addPermission_topicArn,+    addPermission_label,+    addPermission_aWSAccountId,+    addPermission_actionName,++    -- ** CheckIfPhoneNumberIsOptedOut+    checkIfPhoneNumberIsOptedOut_phoneNumber,+    checkIfPhoneNumberIsOptedOutResponse_isOptedOut,+    checkIfPhoneNumberIsOptedOutResponse_httpStatus,++    -- ** ConfirmSubscription+    confirmSubscription_authenticateOnUnsubscribe,+    confirmSubscription_topicArn,+    confirmSubscription_token,+    confirmSubscriptionResponse_subscriptionArn,+    confirmSubscriptionResponse_httpStatus,++    -- ** CreatePlatformApplication+    createPlatformApplication_name,+    createPlatformApplication_platform,+    createPlatformApplication_attributes,+    createPlatformApplicationResponse_platformApplicationArn,+    createPlatformApplicationResponse_httpStatus,++    -- ** CreatePlatformEndpoint+    createPlatformEndpoint_attributes,+    createPlatformEndpoint_customUserData,+    createPlatformEndpoint_platformApplicationArn,+    createPlatformEndpoint_token,+    createPlatformEndpointResponse_endpointArn,+    createPlatformEndpointResponse_httpStatus,++    -- ** CreateSMSSandboxPhoneNumber+    createSMSSandboxPhoneNumber_languageCode,+    createSMSSandboxPhoneNumber_phoneNumber,+    createSMSSandboxPhoneNumberResponse_httpStatus,++    -- ** CreateTopic+    createTopic_attributes,+    createTopic_dataProtectionPolicy,+    createTopic_tags,+    createTopic_name,+    createTopicResponse_topicArn,+    createTopicResponse_httpStatus,++    -- ** DeleteEndpoint+    deleteEndpoint_endpointArn,++    -- ** DeletePlatformApplication+    deletePlatformApplication_platformApplicationArn,++    -- ** DeleteSMSSandboxPhoneNumber+    deleteSMSSandboxPhoneNumber_phoneNumber,+    deleteSMSSandboxPhoneNumberResponse_httpStatus,++    -- ** DeleteTopic+    deleteTopic_topicArn,++    -- ** GetDataProtectionPolicy+    getDataProtectionPolicy_resourceArn,+    getDataProtectionPolicyResponse_dataProtectionPolicy,+    getDataProtectionPolicyResponse_httpStatus,++    -- ** GetEndpointAttributes+    getEndpointAttributes_endpointArn,+    getEndpointAttributesResponse_attributes,+    getEndpointAttributesResponse_httpStatus,++    -- ** GetPlatformApplicationAttributes+    getPlatformApplicationAttributes_platformApplicationArn,+    getPlatformApplicationAttributesResponse_attributes,+    getPlatformApplicationAttributesResponse_httpStatus,++    -- ** GetSMSAttributes+    getSMSAttributes_attributes,+    getSMSAttributesResponse_attributes,+    getSMSAttributesResponse_httpStatus,++    -- ** GetSMSSandboxAccountStatus+    getSMSSandboxAccountStatusResponse_httpStatus,+    getSMSSandboxAccountStatusResponse_isInSandbox,++    -- ** GetSubscriptionAttributes+    getSubscriptionAttributes_subscriptionArn,+    getSubscriptionAttributesResponse_attributes,+    getSubscriptionAttributesResponse_httpStatus,++    -- ** GetTopicAttributes+    getTopicAttributes_topicArn,+    getTopicAttributesResponse_attributes,+    getTopicAttributesResponse_httpStatus,++    -- ** ListEndpointsByPlatformApplication+    listEndpointsByPlatformApplication_nextToken,+    listEndpointsByPlatformApplication_platformApplicationArn,+    listEndpointsByPlatformApplicationResponse_endpoints,+    listEndpointsByPlatformApplicationResponse_nextToken,+    listEndpointsByPlatformApplicationResponse_httpStatus,++    -- ** ListOriginationNumbers+    listOriginationNumbers_maxResults,+    listOriginationNumbers_nextToken,+    listOriginationNumbersResponse_nextToken,+    listOriginationNumbersResponse_phoneNumbers,+    listOriginationNumbersResponse_httpStatus,++    -- ** ListPhoneNumbersOptedOut+    listPhoneNumbersOptedOut_nextToken,+    listPhoneNumbersOptedOutResponse_nextToken,+    listPhoneNumbersOptedOutResponse_phoneNumbers,+    listPhoneNumbersOptedOutResponse_httpStatus,++    -- ** ListPlatformApplications+    listPlatformApplications_nextToken,+    listPlatformApplicationsResponse_nextToken,+    listPlatformApplicationsResponse_platformApplications,+    listPlatformApplicationsResponse_httpStatus,++    -- ** ListSMSSandboxPhoneNumbers+    listSMSSandboxPhoneNumbers_maxResults,+    listSMSSandboxPhoneNumbers_nextToken,+    listSMSSandboxPhoneNumbersResponse_nextToken,+    listSMSSandboxPhoneNumbersResponse_httpStatus,+    listSMSSandboxPhoneNumbersResponse_phoneNumbers,++    -- ** ListSubscriptions+    listSubscriptions_nextToken,+    listSubscriptionsResponse_nextToken,+    listSubscriptionsResponse_subscriptions,+    listSubscriptionsResponse_httpStatus,++    -- ** ListSubscriptionsByTopic+    listSubscriptionsByTopic_nextToken,+    listSubscriptionsByTopic_topicArn,+    listSubscriptionsByTopicResponse_nextToken,+    listSubscriptionsByTopicResponse_subscriptions,+    listSubscriptionsByTopicResponse_httpStatus,++    -- ** ListTagsForResource+    listTagsForResource_resourceArn,+    listTagsForResourceResponse_tags,+    listTagsForResourceResponse_httpStatus,++    -- ** ListTopics+    listTopics_nextToken,+    listTopicsResponse_nextToken,+    listTopicsResponse_topics,+    listTopicsResponse_httpStatus,++    -- ** OptInPhoneNumber+    optInPhoneNumber_phoneNumber,+    optInPhoneNumberResponse_httpStatus,++    -- ** Publish+    publish_messageAttributes,+    publish_messageDeduplicationId,+    publish_messageGroupId,+    publish_messageStructure,+    publish_phoneNumber,+    publish_subject,+    publish_targetArn,+    publish_topicArn,+    publish_message,+    publishResponse_messageId,+    publishResponse_sequenceNumber,+    publishResponse_httpStatus,++    -- ** PublishBatch+    publishBatch_topicArn,+    publishBatch_publishBatchRequestEntries,+    publishBatchResponse_failed,+    publishBatchResponse_successful,+    publishBatchResponse_httpStatus,++    -- ** PutDataProtectionPolicy+    putDataProtectionPolicy_resourceArn,+    putDataProtectionPolicy_dataProtectionPolicy,++    -- ** RemovePermission+    removePermission_topicArn,+    removePermission_label,++    -- ** SetEndpointAttributes+    setEndpointAttributes_endpointArn,+    setEndpointAttributes_attributes,++    -- ** SetPlatformApplicationAttributes+    setPlatformApplicationAttributes_platformApplicationArn,+    setPlatformApplicationAttributes_attributes,++    -- ** SetSMSAttributes+    setSMSAttributes_attributes,+    setSMSAttributesResponse_httpStatus,++    -- ** SetSubscriptionAttributes+    setSubscriptionAttributes_attributeValue,+    setSubscriptionAttributes_subscriptionArn,+    setSubscriptionAttributes_attributeName,++    -- ** SetTopicAttributes+    setTopicAttributes_attributeValue,+    setTopicAttributes_topicArn,+    setTopicAttributes_attributeName,++    -- ** Subscribe+    subscribe_attributes,+    subscribe_endpoint,+    subscribe_returnSubscriptionArn,+    subscribe_topicArn,+    subscribe_protocol,+    subscribeResponse_subscriptionArn,+    subscribeResponse_httpStatus,++    -- ** TagResource+    tagResource_resourceArn,+    tagResource_tags,+    tagResourceResponse_httpStatus,++    -- ** Unsubscribe+    unsubscribe_subscriptionArn,++    -- ** UntagResource+    untagResource_resourceArn,+    untagResource_tagKeys,+    untagResourceResponse_httpStatus,++    -- ** VerifySMSSandboxPhoneNumber+    verifySMSSandboxPhoneNumber_phoneNumber,+    verifySMSSandboxPhoneNumber_oneTimePassword,+    verifySMSSandboxPhoneNumberResponse_httpStatus,++    -- * Types++    -- ** BatchResultErrorEntry+    batchResultErrorEntry_message,+    batchResultErrorEntry_id,+    batchResultErrorEntry_code,+    batchResultErrorEntry_senderFault,++    -- ** Endpoint+    endpoint_attributes,+    endpoint_endpointArn,++    -- ** MessageAttributeValue+    messageAttributeValue_binaryValue,+    messageAttributeValue_stringValue,+    messageAttributeValue_dataType,++    -- ** PhoneNumberInformation+    phoneNumberInformation_createdAt,+    phoneNumberInformation_iso2CountryCode,+    phoneNumberInformation_numberCapabilities,+    phoneNumberInformation_phoneNumber,+    phoneNumberInformation_routeType,+    phoneNumberInformation_status,++    -- ** PlatformApplication+    platformApplication_attributes,+    platformApplication_platformApplicationArn,++    -- ** PublishBatchRequestEntry+    publishBatchRequestEntry_messageAttributes,+    publishBatchRequestEntry_messageDeduplicationId,+    publishBatchRequestEntry_messageGroupId,+    publishBatchRequestEntry_messageStructure,+    publishBatchRequestEntry_subject,+    publishBatchRequestEntry_id,+    publishBatchRequestEntry_message,++    -- ** PublishBatchResultEntry+    publishBatchResultEntry_id,+    publishBatchResultEntry_messageId,+    publishBatchResultEntry_sequenceNumber,++    -- ** SMSSandboxPhoneNumber+    sMSSandboxPhoneNumber_phoneNumber,+    sMSSandboxPhoneNumber_status,++    -- ** Subscription+    subscription_endpoint,+    subscription_owner,+    subscription_protocol,+    subscription_subscriptionArn,+    subscription_topicArn,++    -- ** Tag+    tag_key,+    tag_value,++    -- ** Topic+    topic_topicArn,+  )+where++import Amazonka.SNS.AddPermission+import Amazonka.SNS.CheckIfPhoneNumberIsOptedOut+import Amazonka.SNS.ConfirmSubscription+import Amazonka.SNS.CreatePlatformApplication+import Amazonka.SNS.CreatePlatformEndpoint+import Amazonka.SNS.CreateSMSSandboxPhoneNumber+import Amazonka.SNS.CreateTopic+import Amazonka.SNS.DeleteEndpoint+import Amazonka.SNS.DeletePlatformApplication+import Amazonka.SNS.DeleteSMSSandboxPhoneNumber+import Amazonka.SNS.DeleteTopic+import Amazonka.SNS.GetDataProtectionPolicy+import Amazonka.SNS.GetEndpointAttributes+import Amazonka.SNS.GetPlatformApplicationAttributes+import Amazonka.SNS.GetSMSAttributes+import Amazonka.SNS.GetSMSSandboxAccountStatus+import Amazonka.SNS.GetSubscriptionAttributes+import Amazonka.SNS.GetTopicAttributes+import Amazonka.SNS.ListEndpointsByPlatformApplication+import Amazonka.SNS.ListOriginationNumbers+import Amazonka.SNS.ListPhoneNumbersOptedOut+import Amazonka.SNS.ListPlatformApplications+import Amazonka.SNS.ListSMSSandboxPhoneNumbers+import Amazonka.SNS.ListSubscriptions+import Amazonka.SNS.ListSubscriptionsByTopic+import Amazonka.SNS.ListTagsForResource+import Amazonka.SNS.ListTopics+import Amazonka.SNS.OptInPhoneNumber+import Amazonka.SNS.Publish+import Amazonka.SNS.PublishBatch+import Amazonka.SNS.PutDataProtectionPolicy+import Amazonka.SNS.RemovePermission+import Amazonka.SNS.SetEndpointAttributes+import Amazonka.SNS.SetPlatformApplicationAttributes+import Amazonka.SNS.SetSMSAttributes+import Amazonka.SNS.SetSubscriptionAttributes+import Amazonka.SNS.SetTopicAttributes+import Amazonka.SNS.Subscribe+import Amazonka.SNS.TagResource+import Amazonka.SNS.Types.BatchResultErrorEntry+import Amazonka.SNS.Types.Endpoint+import Amazonka.SNS.Types.MessageAttributeValue+import Amazonka.SNS.Types.PhoneNumberInformation+import Amazonka.SNS.Types.PlatformApplication+import Amazonka.SNS.Types.PublishBatchRequestEntry+import Amazonka.SNS.Types.PublishBatchResultEntry+import Amazonka.SNS.Types.SMSSandboxPhoneNumber+import Amazonka.SNS.Types.Subscription+import Amazonka.SNS.Types.Tag+import Amazonka.SNS.Types.Topic+import Amazonka.SNS.Unsubscribe+import Amazonka.SNS.UntagResource+import Amazonka.SNS.VerifySMSSandboxPhoneNumber
+ gen/Amazonka/SNS/ListEndpointsByPlatformApplication.hs view
@@ -0,0 +1,277 @@+{-# 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.SNS.ListEndpointsByPlatformApplication+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the endpoints and endpoint attributes for devices in a supported+-- push notification service, such as GCM (Firebase Cloud Messaging) and+-- APNS. The results for @ListEndpointsByPlatformApplication@ are paginated+-- and return a limited list of endpoints, up to 100. If additional records+-- are available after the first page results, then a NextToken string will+-- be returned. To receive the next page, you call+-- @ListEndpointsByPlatformApplication@ again using the NextToken string+-- received from the previous call. When there are no more records to+-- return, NextToken will be null. For more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+--+-- This action is throttled at 30 transactions per second (TPS).+--+-- This operation returns paginated results.+module Amazonka.SNS.ListEndpointsByPlatformApplication+  ( -- * Creating a Request+    ListEndpointsByPlatformApplication (..),+    newListEndpointsByPlatformApplication,++    -- * Request Lenses+    listEndpointsByPlatformApplication_nextToken,+    listEndpointsByPlatformApplication_platformApplicationArn,++    -- * Destructuring the Response+    ListEndpointsByPlatformApplicationResponse (..),+    newListEndpointsByPlatformApplicationResponse,++    -- * Response Lenses+    listEndpointsByPlatformApplicationResponse_endpoints,+    listEndpointsByPlatformApplicationResponse_nextToken,+    listEndpointsByPlatformApplicationResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for ListEndpointsByPlatformApplication action.+--+-- /See:/ 'newListEndpointsByPlatformApplication' smart constructor.+data ListEndpointsByPlatformApplication = ListEndpointsByPlatformApplication'+  { -- | NextToken string is used when calling ListEndpointsByPlatformApplication+    -- action to retrieve additional records that are available after the first+    -- page results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | PlatformApplicationArn for ListEndpointsByPlatformApplicationInput+    -- action.+    platformApplicationArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListEndpointsByPlatformApplication' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listEndpointsByPlatformApplication_nextToken' - NextToken string is used when calling ListEndpointsByPlatformApplication+-- action to retrieve additional records that are available after the first+-- page results.+--+-- 'platformApplicationArn', 'listEndpointsByPlatformApplication_platformApplicationArn' - PlatformApplicationArn for ListEndpointsByPlatformApplicationInput+-- action.+newListEndpointsByPlatformApplication ::+  -- | 'platformApplicationArn'+  Prelude.Text ->+  ListEndpointsByPlatformApplication+newListEndpointsByPlatformApplication+  pPlatformApplicationArn_ =+    ListEndpointsByPlatformApplication'+      { nextToken =+          Prelude.Nothing,+        platformApplicationArn =+          pPlatformApplicationArn_+      }++-- | NextToken string is used when calling ListEndpointsByPlatformApplication+-- action to retrieve additional records that are available after the first+-- page results.+listEndpointsByPlatformApplication_nextToken :: Lens.Lens' ListEndpointsByPlatformApplication (Prelude.Maybe Prelude.Text)+listEndpointsByPlatformApplication_nextToken = Lens.lens (\ListEndpointsByPlatformApplication' {nextToken} -> nextToken) (\s@ListEndpointsByPlatformApplication' {} a -> s {nextToken = a} :: ListEndpointsByPlatformApplication)++-- | PlatformApplicationArn for ListEndpointsByPlatformApplicationInput+-- action.+listEndpointsByPlatformApplication_platformApplicationArn :: Lens.Lens' ListEndpointsByPlatformApplication Prelude.Text+listEndpointsByPlatformApplication_platformApplicationArn = Lens.lens (\ListEndpointsByPlatformApplication' {platformApplicationArn} -> platformApplicationArn) (\s@ListEndpointsByPlatformApplication' {} a -> s {platformApplicationArn = a} :: ListEndpointsByPlatformApplication)++instance+  Core.AWSPager+    ListEndpointsByPlatformApplication+  where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listEndpointsByPlatformApplicationResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listEndpointsByPlatformApplicationResponse_endpoints+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listEndpointsByPlatformApplication_nextToken+          Lens..~ rs+          Lens.^? listEndpointsByPlatformApplicationResponse_nextToken+          Prelude.. Lens._Just++instance+  Core.AWSRequest+    ListEndpointsByPlatformApplication+  where+  type+    AWSResponse ListEndpointsByPlatformApplication =+      ListEndpointsByPlatformApplicationResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "ListEndpointsByPlatformApplicationResult"+      ( \s h x ->+          ListEndpointsByPlatformApplicationResponse'+            Prelude.<$> ( x+                            Data..@? "Endpoints"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLList "member")+                        )+            Prelude.<*> (x Data..@? "NextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    ListEndpointsByPlatformApplication+  where+  hashWithSalt+    _salt+    ListEndpointsByPlatformApplication' {..} =+      _salt+        `Prelude.hashWithSalt` nextToken+        `Prelude.hashWithSalt` platformApplicationArn++instance+  Prelude.NFData+    ListEndpointsByPlatformApplication+  where+  rnf ListEndpointsByPlatformApplication' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf platformApplicationArn++instance+  Data.ToHeaders+    ListEndpointsByPlatformApplication+  where+  toHeaders = Prelude.const Prelude.mempty++instance+  Data.ToPath+    ListEndpointsByPlatformApplication+  where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    ListEndpointsByPlatformApplication+  where+  toQuery ListEndpointsByPlatformApplication' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ( "ListEndpointsByPlatformApplication" ::+                      Prelude.ByteString+                  ),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "NextToken" Data.=: nextToken,+        "PlatformApplicationArn"+          Data.=: platformApplicationArn+      ]++-- | Response for ListEndpointsByPlatformApplication action.+--+-- /See:/ 'newListEndpointsByPlatformApplicationResponse' smart constructor.+data ListEndpointsByPlatformApplicationResponse = ListEndpointsByPlatformApplicationResponse'+  { -- | Endpoints returned for ListEndpointsByPlatformApplication action.+    endpoints :: Prelude.Maybe [Endpoint],+    -- | NextToken string is returned when calling+    -- ListEndpointsByPlatformApplication action if additional records are+    -- available after the first page 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 'ListEndpointsByPlatformApplicationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'endpoints', 'listEndpointsByPlatformApplicationResponse_endpoints' - Endpoints returned for ListEndpointsByPlatformApplication action.+--+-- 'nextToken', 'listEndpointsByPlatformApplicationResponse_nextToken' - NextToken string is returned when calling+-- ListEndpointsByPlatformApplication action if additional records are+-- available after the first page results.+--+-- 'httpStatus', 'listEndpointsByPlatformApplicationResponse_httpStatus' - The response's http status code.+newListEndpointsByPlatformApplicationResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListEndpointsByPlatformApplicationResponse+newListEndpointsByPlatformApplicationResponse+  pHttpStatus_ =+    ListEndpointsByPlatformApplicationResponse'+      { endpoints =+          Prelude.Nothing,+        nextToken = Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | Endpoints returned for ListEndpointsByPlatformApplication action.+listEndpointsByPlatformApplicationResponse_endpoints :: Lens.Lens' ListEndpointsByPlatformApplicationResponse (Prelude.Maybe [Endpoint])+listEndpointsByPlatformApplicationResponse_endpoints = Lens.lens (\ListEndpointsByPlatformApplicationResponse' {endpoints} -> endpoints) (\s@ListEndpointsByPlatformApplicationResponse' {} a -> s {endpoints = a} :: ListEndpointsByPlatformApplicationResponse) Prelude.. Lens.mapping Lens.coerced++-- | NextToken string is returned when calling+-- ListEndpointsByPlatformApplication action if additional records are+-- available after the first page results.+listEndpointsByPlatformApplicationResponse_nextToken :: Lens.Lens' ListEndpointsByPlatformApplicationResponse (Prelude.Maybe Prelude.Text)+listEndpointsByPlatformApplicationResponse_nextToken = Lens.lens (\ListEndpointsByPlatformApplicationResponse' {nextToken} -> nextToken) (\s@ListEndpointsByPlatformApplicationResponse' {} a -> s {nextToken = a} :: ListEndpointsByPlatformApplicationResponse)++-- | The response's http status code.+listEndpointsByPlatformApplicationResponse_httpStatus :: Lens.Lens' ListEndpointsByPlatformApplicationResponse Prelude.Int+listEndpointsByPlatformApplicationResponse_httpStatus = Lens.lens (\ListEndpointsByPlatformApplicationResponse' {httpStatus} -> httpStatus) (\s@ListEndpointsByPlatformApplicationResponse' {} a -> s {httpStatus = a} :: ListEndpointsByPlatformApplicationResponse)++instance+  Prelude.NFData+    ListEndpointsByPlatformApplicationResponse+  where+  rnf ListEndpointsByPlatformApplicationResponse' {..} =+    Prelude.rnf endpoints+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/ListOriginationNumbers.hs view
@@ -0,0 +1,229 @@+{-# 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.SNS.ListOriginationNumbers+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the calling Amazon Web Services account\'s dedicated origination+-- numbers and their metadata. For more information about origination+-- numbers, see+-- <https://docs.aws.amazon.com/sns/latest/dg/channels-sms-originating-identities-origination-numbers.html Origination numbers>+-- in the /Amazon SNS Developer Guide/.+--+-- This operation returns paginated results.+module Amazonka.SNS.ListOriginationNumbers+  ( -- * Creating a Request+    ListOriginationNumbers (..),+    newListOriginationNumbers,++    -- * Request Lenses+    listOriginationNumbers_maxResults,+    listOriginationNumbers_nextToken,++    -- * Destructuring the Response+    ListOriginationNumbersResponse (..),+    newListOriginationNumbersResponse,++    -- * Response Lenses+    listOriginationNumbersResponse_nextToken,+    listOriginationNumbersResponse_phoneNumbers,+    listOriginationNumbersResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newListOriginationNumbers' smart constructor.+data ListOriginationNumbers = ListOriginationNumbers'+  { -- | The maximum number of origination numbers to return.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Token that the previous @ListOriginationNumbers@ request returns.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListOriginationNumbers' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listOriginationNumbers_maxResults' - The maximum number of origination numbers to return.+--+-- 'nextToken', 'listOriginationNumbers_nextToken' - Token that the previous @ListOriginationNumbers@ request returns.+newListOriginationNumbers ::+  ListOriginationNumbers+newListOriginationNumbers =+  ListOriginationNumbers'+    { maxResults =+        Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | The maximum number of origination numbers to return.+listOriginationNumbers_maxResults :: Lens.Lens' ListOriginationNumbers (Prelude.Maybe Prelude.Natural)+listOriginationNumbers_maxResults = Lens.lens (\ListOriginationNumbers' {maxResults} -> maxResults) (\s@ListOriginationNumbers' {} a -> s {maxResults = a} :: ListOriginationNumbers)++-- | Token that the previous @ListOriginationNumbers@ request returns.+listOriginationNumbers_nextToken :: Lens.Lens' ListOriginationNumbers (Prelude.Maybe Prelude.Text)+listOriginationNumbers_nextToken = Lens.lens (\ListOriginationNumbers' {nextToken} -> nextToken) (\s@ListOriginationNumbers' {} a -> s {nextToken = a} :: ListOriginationNumbers)++instance Core.AWSPager ListOriginationNumbers where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listOriginationNumbersResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listOriginationNumbersResponse_phoneNumbers+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listOriginationNumbers_nextToken+          Lens..~ rs+          Lens.^? listOriginationNumbersResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListOriginationNumbers where+  type+    AWSResponse ListOriginationNumbers =+      ListOriginationNumbersResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "ListOriginationNumbersResult"+      ( \s h x ->+          ListOriginationNumbersResponse'+            Prelude.<$> (x Data..@? "NextToken")+            Prelude.<*> ( x+                            Data..@? "PhoneNumbers"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLList "member")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListOriginationNumbers where+  hashWithSalt _salt ListOriginationNumbers' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListOriginationNumbers where+  rnf ListOriginationNumbers' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListOriginationNumbers where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath ListOriginationNumbers where+  toPath = Prelude.const "/"++instance Data.ToQuery ListOriginationNumbers where+  toQuery ListOriginationNumbers' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("ListOriginationNumbers" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "MaxResults" Data.=: maxResults,+        "NextToken" Data.=: nextToken+      ]++-- | /See:/ 'newListOriginationNumbersResponse' smart constructor.+data ListOriginationNumbersResponse = ListOriginationNumbersResponse'+  { -- | A @NextToken@ string is returned when you call the+    -- @ListOriginationNumbers@ operation if additional pages of records are+    -- available.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | A list of the calling account\'s verified and pending origination+    -- 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 'ListOriginationNumbersResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listOriginationNumbersResponse_nextToken' - A @NextToken@ string is returned when you call the+-- @ListOriginationNumbers@ operation if additional pages of records are+-- available.+--+-- 'phoneNumbers', 'listOriginationNumbersResponse_phoneNumbers' - A list of the calling account\'s verified and pending origination+-- numbers.+--+-- 'httpStatus', 'listOriginationNumbersResponse_httpStatus' - The response's http status code.+newListOriginationNumbersResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListOriginationNumbersResponse+newListOriginationNumbersResponse pHttpStatus_ =+  ListOriginationNumbersResponse'+    { nextToken =+        Prelude.Nothing,+      phoneNumbers = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A @NextToken@ string is returned when you call the+-- @ListOriginationNumbers@ operation if additional pages of records are+-- available.+listOriginationNumbersResponse_nextToken :: Lens.Lens' ListOriginationNumbersResponse (Prelude.Maybe Prelude.Text)+listOriginationNumbersResponse_nextToken = Lens.lens (\ListOriginationNumbersResponse' {nextToken} -> nextToken) (\s@ListOriginationNumbersResponse' {} a -> s {nextToken = a} :: ListOriginationNumbersResponse)++-- | A list of the calling account\'s verified and pending origination+-- numbers.+listOriginationNumbersResponse_phoneNumbers :: Lens.Lens' ListOriginationNumbersResponse (Prelude.Maybe [PhoneNumberInformation])+listOriginationNumbersResponse_phoneNumbers = Lens.lens (\ListOriginationNumbersResponse' {phoneNumbers} -> phoneNumbers) (\s@ListOriginationNumbersResponse' {} a -> s {phoneNumbers = a} :: ListOriginationNumbersResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listOriginationNumbersResponse_httpStatus :: Lens.Lens' ListOriginationNumbersResponse Prelude.Int+listOriginationNumbersResponse_httpStatus = Lens.lens (\ListOriginationNumbersResponse' {httpStatus} -> httpStatus) (\s@ListOriginationNumbersResponse' {} a -> s {httpStatus = a} :: ListOriginationNumbersResponse)++instance+  Prelude.NFData+    ListOriginationNumbersResponse+  where+  rnf ListOriginationNumbersResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf phoneNumbers+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/ListPhoneNumbersOptedOut.hs view
@@ -0,0 +1,233 @@+{-# 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.SNS.ListPhoneNumbersOptedOut+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of phone numbers that are opted out, meaning you cannot+-- send SMS messages to them.+--+-- The results for @ListPhoneNumbersOptedOut@ are paginated, and each page+-- returns up to 100 phone numbers. If additional phone numbers are+-- available after the first page of results, then a @NextToken@ string+-- will be returned. To receive the next page, you call+-- @ListPhoneNumbersOptedOut@ again using the @NextToken@ string received+-- from the previous call. When there are no more records to return,+-- @NextToken@ will be null.+--+-- This operation returns paginated results.+module Amazonka.SNS.ListPhoneNumbersOptedOut+  ( -- * Creating a Request+    ListPhoneNumbersOptedOut (..),+    newListPhoneNumbersOptedOut,++    -- * Request Lenses+    listPhoneNumbersOptedOut_nextToken,++    -- * Destructuring the Response+    ListPhoneNumbersOptedOutResponse (..),+    newListPhoneNumbersOptedOutResponse,++    -- * Response Lenses+    listPhoneNumbersOptedOutResponse_nextToken,+    listPhoneNumbersOptedOutResponse_phoneNumbers,+    listPhoneNumbersOptedOutResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | The input for the @ListPhoneNumbersOptedOut@ action.+--+-- /See:/ 'newListPhoneNumbersOptedOut' smart constructor.+data ListPhoneNumbersOptedOut = ListPhoneNumbersOptedOut'+  { -- | A @NextToken@ string is used when you call the+    -- @ListPhoneNumbersOptedOut@ action to retrieve additional records that+    -- are available after the first page of results.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPhoneNumbersOptedOut' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listPhoneNumbersOptedOut_nextToken' - A @NextToken@ string is used when you call the+-- @ListPhoneNumbersOptedOut@ action to retrieve additional records that+-- are available after the first page of results.+newListPhoneNumbersOptedOut ::+  ListPhoneNumbersOptedOut+newListPhoneNumbersOptedOut =+  ListPhoneNumbersOptedOut'+    { nextToken =+        Prelude.Nothing+    }++-- | A @NextToken@ string is used when you call the+-- @ListPhoneNumbersOptedOut@ action to retrieve additional records that+-- are available after the first page of results.+listPhoneNumbersOptedOut_nextToken :: Lens.Lens' ListPhoneNumbersOptedOut (Prelude.Maybe Prelude.Text)+listPhoneNumbersOptedOut_nextToken = Lens.lens (\ListPhoneNumbersOptedOut' {nextToken} -> nextToken) (\s@ListPhoneNumbersOptedOut' {} a -> s {nextToken = a} :: ListPhoneNumbersOptedOut)++instance Core.AWSPager ListPhoneNumbersOptedOut where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listPhoneNumbersOptedOutResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listPhoneNumbersOptedOutResponse_phoneNumbers+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listPhoneNumbersOptedOut_nextToken+          Lens..~ rs+          Lens.^? listPhoneNumbersOptedOutResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListPhoneNumbersOptedOut where+  type+    AWSResponse ListPhoneNumbersOptedOut =+      ListPhoneNumbersOptedOutResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "ListPhoneNumbersOptedOutResult"+      ( \s h x ->+          ListPhoneNumbersOptedOutResponse'+            Prelude.<$> (x Data..@? "nextToken")+            Prelude.<*> ( x+                            Data..@? "phoneNumbers"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLList "member")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListPhoneNumbersOptedOut where+  hashWithSalt _salt ListPhoneNumbersOptedOut' {..} =+    _salt `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListPhoneNumbersOptedOut where+  rnf ListPhoneNumbersOptedOut' {..} =+    Prelude.rnf nextToken++instance Data.ToHeaders ListPhoneNumbersOptedOut where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath ListPhoneNumbersOptedOut where+  toPath = Prelude.const "/"++instance Data.ToQuery ListPhoneNumbersOptedOut where+  toQuery ListPhoneNumbersOptedOut' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("ListPhoneNumbersOptedOut" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "nextToken" Data.=: nextToken+      ]++-- | The response from the @ListPhoneNumbersOptedOut@ action.+--+-- /See:/ 'newListPhoneNumbersOptedOutResponse' smart constructor.+data ListPhoneNumbersOptedOutResponse = ListPhoneNumbersOptedOutResponse'+  { -- | A @NextToken@ string is returned when you call the+    -- @ListPhoneNumbersOptedOut@ action if additional records are available+    -- after the first page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | A list of phone numbers that are opted out of receiving SMS messages.+    -- The list is paginated, and each page can contain up to 100 phone+    -- numbers.+    phoneNumbers :: 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 'ListPhoneNumbersOptedOutResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listPhoneNumbersOptedOutResponse_nextToken' - A @NextToken@ string is returned when you call the+-- @ListPhoneNumbersOptedOut@ action if additional records are available+-- after the first page of results.+--+-- 'phoneNumbers', 'listPhoneNumbersOptedOutResponse_phoneNumbers' - A list of phone numbers that are opted out of receiving SMS messages.+-- The list is paginated, and each page can contain up to 100 phone+-- numbers.+--+-- 'httpStatus', 'listPhoneNumbersOptedOutResponse_httpStatus' - The response's http status code.+newListPhoneNumbersOptedOutResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListPhoneNumbersOptedOutResponse+newListPhoneNumbersOptedOutResponse pHttpStatus_ =+  ListPhoneNumbersOptedOutResponse'+    { nextToken =+        Prelude.Nothing,+      phoneNumbers = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A @NextToken@ string is returned when you call the+-- @ListPhoneNumbersOptedOut@ action if additional records are available+-- after the first page of results.+listPhoneNumbersOptedOutResponse_nextToken :: Lens.Lens' ListPhoneNumbersOptedOutResponse (Prelude.Maybe Prelude.Text)+listPhoneNumbersOptedOutResponse_nextToken = Lens.lens (\ListPhoneNumbersOptedOutResponse' {nextToken} -> nextToken) (\s@ListPhoneNumbersOptedOutResponse' {} a -> s {nextToken = a} :: ListPhoneNumbersOptedOutResponse)++-- | A list of phone numbers that are opted out of receiving SMS messages.+-- The list is paginated, and each page can contain up to 100 phone+-- numbers.+listPhoneNumbersOptedOutResponse_phoneNumbers :: Lens.Lens' ListPhoneNumbersOptedOutResponse (Prelude.Maybe [Prelude.Text])+listPhoneNumbersOptedOutResponse_phoneNumbers = Lens.lens (\ListPhoneNumbersOptedOutResponse' {phoneNumbers} -> phoneNumbers) (\s@ListPhoneNumbersOptedOutResponse' {} a -> s {phoneNumbers = a} :: ListPhoneNumbersOptedOutResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listPhoneNumbersOptedOutResponse_httpStatus :: Lens.Lens' ListPhoneNumbersOptedOutResponse Prelude.Int+listPhoneNumbersOptedOutResponse_httpStatus = Lens.lens (\ListPhoneNumbersOptedOutResponse' {httpStatus} -> httpStatus) (\s@ListPhoneNumbersOptedOutResponse' {} a -> s {httpStatus = a} :: ListPhoneNumbersOptedOutResponse)++instance+  Prelude.NFData+    ListPhoneNumbersOptedOutResponse+  where+  rnf ListPhoneNumbersOptedOutResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf phoneNumbers+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/ListPlatformApplications.hs view
@@ -0,0 +1,229 @@+{-# 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.SNS.ListPlatformApplications+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the platform application objects for the supported push+-- notification services, such as APNS and GCM (Firebase Cloud Messaging).+-- The results for @ListPlatformApplications@ are paginated and return a+-- limited list of applications, up to 100. If additional records are+-- available after the first page results, then a NextToken string will be+-- returned. To receive the next page, you call @ListPlatformApplications@+-- using the NextToken string received from the previous call. When there+-- are no more records to return, @NextToken@ will be null. For more+-- information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+--+-- This action is throttled at 15 transactions per second (TPS).+--+-- This operation returns paginated results.+module Amazonka.SNS.ListPlatformApplications+  ( -- * Creating a Request+    ListPlatformApplications (..),+    newListPlatformApplications,++    -- * Request Lenses+    listPlatformApplications_nextToken,++    -- * Destructuring the Response+    ListPlatformApplicationsResponse (..),+    newListPlatformApplicationsResponse,++    -- * Response Lenses+    listPlatformApplicationsResponse_nextToken,+    listPlatformApplicationsResponse_platformApplications,+    listPlatformApplicationsResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for ListPlatformApplications action.+--+-- /See:/ 'newListPlatformApplications' smart constructor.+data ListPlatformApplications = ListPlatformApplications'+  { -- | NextToken string is used when calling ListPlatformApplications action to+    -- retrieve additional records that are available after the first page+    -- results.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPlatformApplications' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listPlatformApplications_nextToken' - NextToken string is used when calling ListPlatformApplications action to+-- retrieve additional records that are available after the first page+-- results.+newListPlatformApplications ::+  ListPlatformApplications+newListPlatformApplications =+  ListPlatformApplications'+    { nextToken =+        Prelude.Nothing+    }++-- | NextToken string is used when calling ListPlatformApplications action to+-- retrieve additional records that are available after the first page+-- results.+listPlatformApplications_nextToken :: Lens.Lens' ListPlatformApplications (Prelude.Maybe Prelude.Text)+listPlatformApplications_nextToken = Lens.lens (\ListPlatformApplications' {nextToken} -> nextToken) (\s@ListPlatformApplications' {} a -> s {nextToken = a} :: ListPlatformApplications)++instance Core.AWSPager ListPlatformApplications where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listPlatformApplicationsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listPlatformApplicationsResponse_platformApplications+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listPlatformApplications_nextToken+          Lens..~ rs+          Lens.^? listPlatformApplicationsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListPlatformApplications where+  type+    AWSResponse ListPlatformApplications =+      ListPlatformApplicationsResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "ListPlatformApplicationsResult"+      ( \s h x ->+          ListPlatformApplicationsResponse'+            Prelude.<$> (x Data..@? "NextToken")+            Prelude.<*> ( x+                            Data..@? "PlatformApplications"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLList "member")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListPlatformApplications where+  hashWithSalt _salt ListPlatformApplications' {..} =+    _salt `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListPlatformApplications where+  rnf ListPlatformApplications' {..} =+    Prelude.rnf nextToken++instance Data.ToHeaders ListPlatformApplications where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath ListPlatformApplications where+  toPath = Prelude.const "/"++instance Data.ToQuery ListPlatformApplications where+  toQuery ListPlatformApplications' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("ListPlatformApplications" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "NextToken" Data.=: nextToken+      ]++-- | Response for ListPlatformApplications action.+--+-- /See:/ 'newListPlatformApplicationsResponse' smart constructor.+data ListPlatformApplicationsResponse = ListPlatformApplicationsResponse'+  { -- | NextToken string is returned when calling ListPlatformApplications+    -- action if additional records are available after the first page results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Platform applications returned when calling ListPlatformApplications+    -- action.+    platformApplications :: Prelude.Maybe [PlatformApplication],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPlatformApplicationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listPlatformApplicationsResponse_nextToken' - NextToken string is returned when calling ListPlatformApplications+-- action if additional records are available after the first page results.+--+-- 'platformApplications', 'listPlatformApplicationsResponse_platformApplications' - Platform applications returned when calling ListPlatformApplications+-- action.+--+-- 'httpStatus', 'listPlatformApplicationsResponse_httpStatus' - The response's http status code.+newListPlatformApplicationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListPlatformApplicationsResponse+newListPlatformApplicationsResponse pHttpStatus_ =+  ListPlatformApplicationsResponse'+    { nextToken =+        Prelude.Nothing,+      platformApplications = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | NextToken string is returned when calling ListPlatformApplications+-- action if additional records are available after the first page results.+listPlatformApplicationsResponse_nextToken :: Lens.Lens' ListPlatformApplicationsResponse (Prelude.Maybe Prelude.Text)+listPlatformApplicationsResponse_nextToken = Lens.lens (\ListPlatformApplicationsResponse' {nextToken} -> nextToken) (\s@ListPlatformApplicationsResponse' {} a -> s {nextToken = a} :: ListPlatformApplicationsResponse)++-- | Platform applications returned when calling ListPlatformApplications+-- action.+listPlatformApplicationsResponse_platformApplications :: Lens.Lens' ListPlatformApplicationsResponse (Prelude.Maybe [PlatformApplication])+listPlatformApplicationsResponse_platformApplications = Lens.lens (\ListPlatformApplicationsResponse' {platformApplications} -> platformApplications) (\s@ListPlatformApplicationsResponse' {} a -> s {platformApplications = a} :: ListPlatformApplicationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listPlatformApplicationsResponse_httpStatus :: Lens.Lens' ListPlatformApplicationsResponse Prelude.Int+listPlatformApplicationsResponse_httpStatus = Lens.lens (\ListPlatformApplicationsResponse' {httpStatus} -> httpStatus) (\s@ListPlatformApplicationsResponse' {} a -> s {httpStatus = a} :: ListPlatformApplicationsResponse)++instance+  Prelude.NFData+    ListPlatformApplicationsResponse+  where+  rnf ListPlatformApplicationsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf platformApplications+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/ListSMSSandboxPhoneNumbers.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.SNS.ListSMSSandboxPhoneNumbers+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the calling Amazon Web Services account\'s current verified and+-- pending destination phone numbers in the SMS sandbox.+--+-- When you start using Amazon SNS to send SMS messages, your Amazon Web+-- Services account is in the /SMS sandbox/. The SMS sandbox provides a+-- safe environment for you to try Amazon SNS features without risking your+-- reputation as an SMS sender. While your Amazon Web Services account is+-- in the SMS sandbox, you can use all of the features of Amazon SNS.+-- However, you can send SMS messages only to verified destination phone+-- numbers. For more information, including how to move out of the sandbox+-- to send messages without restrictions, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html SMS sandbox>+-- in the /Amazon SNS Developer Guide/.+--+-- This operation returns paginated results.+module Amazonka.SNS.ListSMSSandboxPhoneNumbers+  ( -- * Creating a Request+    ListSMSSandboxPhoneNumbers (..),+    newListSMSSandboxPhoneNumbers,++    -- * Request Lenses+    listSMSSandboxPhoneNumbers_maxResults,+    listSMSSandboxPhoneNumbers_nextToken,++    -- * Destructuring the Response+    ListSMSSandboxPhoneNumbersResponse (..),+    newListSMSSandboxPhoneNumbersResponse,++    -- * Response Lenses+    listSMSSandboxPhoneNumbersResponse_nextToken,+    listSMSSandboxPhoneNumbersResponse_httpStatus,+    listSMSSandboxPhoneNumbersResponse_phoneNumbers,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newListSMSSandboxPhoneNumbers' smart constructor.+data ListSMSSandboxPhoneNumbers = ListSMSSandboxPhoneNumbers'+  { -- | The maximum number of phone numbers to return.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Token that the previous @ListSMSSandboxPhoneNumbersInput@ request+    -- returns.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSMSSandboxPhoneNumbers' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listSMSSandboxPhoneNumbers_maxResults' - The maximum number of phone numbers to return.+--+-- 'nextToken', 'listSMSSandboxPhoneNumbers_nextToken' - Token that the previous @ListSMSSandboxPhoneNumbersInput@ request+-- returns.+newListSMSSandboxPhoneNumbers ::+  ListSMSSandboxPhoneNumbers+newListSMSSandboxPhoneNumbers =+  ListSMSSandboxPhoneNumbers'+    { maxResults =+        Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | The maximum number of phone numbers to return.+listSMSSandboxPhoneNumbers_maxResults :: Lens.Lens' ListSMSSandboxPhoneNumbers (Prelude.Maybe Prelude.Natural)+listSMSSandboxPhoneNumbers_maxResults = Lens.lens (\ListSMSSandboxPhoneNumbers' {maxResults} -> maxResults) (\s@ListSMSSandboxPhoneNumbers' {} a -> s {maxResults = a} :: ListSMSSandboxPhoneNumbers)++-- | Token that the previous @ListSMSSandboxPhoneNumbersInput@ request+-- returns.+listSMSSandboxPhoneNumbers_nextToken :: Lens.Lens' ListSMSSandboxPhoneNumbers (Prelude.Maybe Prelude.Text)+listSMSSandboxPhoneNumbers_nextToken = Lens.lens (\ListSMSSandboxPhoneNumbers' {nextToken} -> nextToken) (\s@ListSMSSandboxPhoneNumbers' {} a -> s {nextToken = a} :: ListSMSSandboxPhoneNumbers)++instance Core.AWSPager ListSMSSandboxPhoneNumbers where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listSMSSandboxPhoneNumbersResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^. listSMSSandboxPhoneNumbersResponse_phoneNumbers+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listSMSSandboxPhoneNumbers_nextToken+          Lens..~ rs+          Lens.^? listSMSSandboxPhoneNumbersResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListSMSSandboxPhoneNumbers where+  type+    AWSResponse ListSMSSandboxPhoneNumbers =+      ListSMSSandboxPhoneNumbersResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "ListSMSSandboxPhoneNumbersResult"+      ( \s h x ->+          ListSMSSandboxPhoneNumbersResponse'+            Prelude.<$> (x Data..@? "NextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> ( x+                            Data..@? "PhoneNumbers"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Data.parseXMLList "member"+                        )+      )++instance Prelude.Hashable ListSMSSandboxPhoneNumbers where+  hashWithSalt _salt ListSMSSandboxPhoneNumbers' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListSMSSandboxPhoneNumbers where+  rnf ListSMSSandboxPhoneNumbers' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListSMSSandboxPhoneNumbers where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath ListSMSSandboxPhoneNumbers where+  toPath = Prelude.const "/"++instance Data.ToQuery ListSMSSandboxPhoneNumbers where+  toQuery ListSMSSandboxPhoneNumbers' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("ListSMSSandboxPhoneNumbers" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "MaxResults" Data.=: maxResults,+        "NextToken" Data.=: nextToken+      ]++-- | /See:/ 'newListSMSSandboxPhoneNumbersResponse' smart constructor.+data ListSMSSandboxPhoneNumbersResponse = ListSMSSandboxPhoneNumbersResponse'+  { -- | A @NextToken@ string is returned when you call the+    -- @ListSMSSandboxPhoneNumbersInput@ operation if additional pages of+    -- records are available.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | A list of the calling account\'s pending and verified phone numbers.+    phoneNumbers :: [SMSSandboxPhoneNumber]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSMSSandboxPhoneNumbersResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listSMSSandboxPhoneNumbersResponse_nextToken' - A @NextToken@ string is returned when you call the+-- @ListSMSSandboxPhoneNumbersInput@ operation if additional pages of+-- records are available.+--+-- 'httpStatus', 'listSMSSandboxPhoneNumbersResponse_httpStatus' - The response's http status code.+--+-- 'phoneNumbers', 'listSMSSandboxPhoneNumbersResponse_phoneNumbers' - A list of the calling account\'s pending and verified phone numbers.+newListSMSSandboxPhoneNumbersResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListSMSSandboxPhoneNumbersResponse+newListSMSSandboxPhoneNumbersResponse pHttpStatus_ =+  ListSMSSandboxPhoneNumbersResponse'+    { nextToken =+        Prelude.Nothing,+      httpStatus = pHttpStatus_,+      phoneNumbers = Prelude.mempty+    }++-- | A @NextToken@ string is returned when you call the+-- @ListSMSSandboxPhoneNumbersInput@ operation if additional pages of+-- records are available.+listSMSSandboxPhoneNumbersResponse_nextToken :: Lens.Lens' ListSMSSandboxPhoneNumbersResponse (Prelude.Maybe Prelude.Text)+listSMSSandboxPhoneNumbersResponse_nextToken = Lens.lens (\ListSMSSandboxPhoneNumbersResponse' {nextToken} -> nextToken) (\s@ListSMSSandboxPhoneNumbersResponse' {} a -> s {nextToken = a} :: ListSMSSandboxPhoneNumbersResponse)++-- | The response's http status code.+listSMSSandboxPhoneNumbersResponse_httpStatus :: Lens.Lens' ListSMSSandboxPhoneNumbersResponse Prelude.Int+listSMSSandboxPhoneNumbersResponse_httpStatus = Lens.lens (\ListSMSSandboxPhoneNumbersResponse' {httpStatus} -> httpStatus) (\s@ListSMSSandboxPhoneNumbersResponse' {} a -> s {httpStatus = a} :: ListSMSSandboxPhoneNumbersResponse)++-- | A list of the calling account\'s pending and verified phone numbers.+listSMSSandboxPhoneNumbersResponse_phoneNumbers :: Lens.Lens' ListSMSSandboxPhoneNumbersResponse [SMSSandboxPhoneNumber]+listSMSSandboxPhoneNumbersResponse_phoneNumbers = Lens.lens (\ListSMSSandboxPhoneNumbersResponse' {phoneNumbers} -> phoneNumbers) (\s@ListSMSSandboxPhoneNumbersResponse' {} a -> s {phoneNumbers = a} :: ListSMSSandboxPhoneNumbersResponse) Prelude.. Lens.coerced++instance+  Prelude.NFData+    ListSMSSandboxPhoneNumbersResponse+  where+  rnf ListSMSSandboxPhoneNumbersResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf phoneNumbers
+ gen/Amazonka/SNS/ListSubscriptions.hs view
@@ -0,0 +1,207 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SNS.ListSubscriptions+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of the requester\'s subscriptions. Each call returns a+-- limited list of subscriptions, up to 100. If there are more+-- subscriptions, a @NextToken@ is also returned. Use the @NextToken@+-- parameter in a new @ListSubscriptions@ call to get further results.+--+-- This action is throttled at 30 transactions per second (TPS).+--+-- This operation returns paginated results.+module Amazonka.SNS.ListSubscriptions+  ( -- * Creating a Request+    ListSubscriptions (..),+    newListSubscriptions,++    -- * Request Lenses+    listSubscriptions_nextToken,++    -- * Destructuring the Response+    ListSubscriptionsResponse (..),+    newListSubscriptionsResponse,++    -- * Response Lenses+    listSubscriptionsResponse_nextToken,+    listSubscriptionsResponse_subscriptions,+    listSubscriptionsResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for ListSubscriptions action.+--+-- /See:/ 'newListSubscriptions' smart constructor.+data ListSubscriptions = ListSubscriptions'+  { -- | Token returned by the previous @ListSubscriptions@ request.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSubscriptions' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listSubscriptions_nextToken' - Token returned by the previous @ListSubscriptions@ request.+newListSubscriptions ::+  ListSubscriptions+newListSubscriptions =+  ListSubscriptions' {nextToken = Prelude.Nothing}++-- | Token returned by the previous @ListSubscriptions@ request.+listSubscriptions_nextToken :: Lens.Lens' ListSubscriptions (Prelude.Maybe Prelude.Text)+listSubscriptions_nextToken = Lens.lens (\ListSubscriptions' {nextToken} -> nextToken) (\s@ListSubscriptions' {} a -> s {nextToken = a} :: ListSubscriptions)++instance Core.AWSPager ListSubscriptions where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listSubscriptionsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listSubscriptionsResponse_subscriptions+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listSubscriptions_nextToken+          Lens..~ rs+          Lens.^? listSubscriptionsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListSubscriptions where+  type+    AWSResponse ListSubscriptions =+      ListSubscriptionsResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "ListSubscriptionsResult"+      ( \s h x ->+          ListSubscriptionsResponse'+            Prelude.<$> (x Data..@? "NextToken")+            Prelude.<*> ( x+                            Data..@? "Subscriptions"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLList "member")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListSubscriptions where+  hashWithSalt _salt ListSubscriptions' {..} =+    _salt `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListSubscriptions where+  rnf ListSubscriptions' {..} = Prelude.rnf nextToken++instance Data.ToHeaders ListSubscriptions where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath ListSubscriptions where+  toPath = Prelude.const "/"++instance Data.ToQuery ListSubscriptions where+  toQuery ListSubscriptions' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("ListSubscriptions" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "NextToken" Data.=: nextToken+      ]++-- | Response for ListSubscriptions action+--+-- /See:/ 'newListSubscriptionsResponse' smart constructor.+data ListSubscriptionsResponse = ListSubscriptionsResponse'+  { -- | Token to pass along to the next @ListSubscriptions@ request. This+    -- element is returned if there are more subscriptions to retrieve.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | A list of subscriptions.+    subscriptions :: Prelude.Maybe [Subscription],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSubscriptionsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listSubscriptionsResponse_nextToken' - Token to pass along to the next @ListSubscriptions@ request. This+-- element is returned if there are more subscriptions to retrieve.+--+-- 'subscriptions', 'listSubscriptionsResponse_subscriptions' - A list of subscriptions.+--+-- 'httpStatus', 'listSubscriptionsResponse_httpStatus' - The response's http status code.+newListSubscriptionsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListSubscriptionsResponse+newListSubscriptionsResponse pHttpStatus_ =+  ListSubscriptionsResponse'+    { nextToken =+        Prelude.Nothing,+      subscriptions = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Token to pass along to the next @ListSubscriptions@ request. This+-- element is returned if there are more subscriptions to retrieve.+listSubscriptionsResponse_nextToken :: Lens.Lens' ListSubscriptionsResponse (Prelude.Maybe Prelude.Text)+listSubscriptionsResponse_nextToken = Lens.lens (\ListSubscriptionsResponse' {nextToken} -> nextToken) (\s@ListSubscriptionsResponse' {} a -> s {nextToken = a} :: ListSubscriptionsResponse)++-- | A list of subscriptions.+listSubscriptionsResponse_subscriptions :: Lens.Lens' ListSubscriptionsResponse (Prelude.Maybe [Subscription])+listSubscriptionsResponse_subscriptions = Lens.lens (\ListSubscriptionsResponse' {subscriptions} -> subscriptions) (\s@ListSubscriptionsResponse' {} a -> s {subscriptions = a} :: ListSubscriptionsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listSubscriptionsResponse_httpStatus :: Lens.Lens' ListSubscriptionsResponse Prelude.Int+listSubscriptionsResponse_httpStatus = Lens.lens (\ListSubscriptionsResponse' {httpStatus} -> httpStatus) (\s@ListSubscriptionsResponse' {} a -> s {httpStatus = a} :: ListSubscriptionsResponse)++instance Prelude.NFData ListSubscriptionsResponse where+  rnf ListSubscriptionsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf subscriptions+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/ListSubscriptionsByTopic.hs view
@@ -0,0 +1,231 @@+{-# 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.SNS.ListSubscriptionsByTopic+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of the subscriptions to a specific topic. Each call+-- returns a limited list of subscriptions, up to 100. If there are more+-- subscriptions, a @NextToken@ is also returned. Use the @NextToken@+-- parameter in a new @ListSubscriptionsByTopic@ call to get further+-- results.+--+-- This action is throttled at 30 transactions per second (TPS).+--+-- This operation returns paginated results.+module Amazonka.SNS.ListSubscriptionsByTopic+  ( -- * Creating a Request+    ListSubscriptionsByTopic (..),+    newListSubscriptionsByTopic,++    -- * Request Lenses+    listSubscriptionsByTopic_nextToken,+    listSubscriptionsByTopic_topicArn,++    -- * Destructuring the Response+    ListSubscriptionsByTopicResponse (..),+    newListSubscriptionsByTopicResponse,++    -- * Response Lenses+    listSubscriptionsByTopicResponse_nextToken,+    listSubscriptionsByTopicResponse_subscriptions,+    listSubscriptionsByTopicResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for ListSubscriptionsByTopic action.+--+-- /See:/ 'newListSubscriptionsByTopic' smart constructor.+data ListSubscriptionsByTopic = ListSubscriptionsByTopic'+  { -- | Token returned by the previous @ListSubscriptionsByTopic@ request.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The ARN of the topic for which you wish to find subscriptions.+    topicArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSubscriptionsByTopic' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listSubscriptionsByTopic_nextToken' - Token returned by the previous @ListSubscriptionsByTopic@ request.+--+-- 'topicArn', 'listSubscriptionsByTopic_topicArn' - The ARN of the topic for which you wish to find subscriptions.+newListSubscriptionsByTopic ::+  -- | 'topicArn'+  Prelude.Text ->+  ListSubscriptionsByTopic+newListSubscriptionsByTopic pTopicArn_ =+  ListSubscriptionsByTopic'+    { nextToken =+        Prelude.Nothing,+      topicArn = pTopicArn_+    }++-- | Token returned by the previous @ListSubscriptionsByTopic@ request.+listSubscriptionsByTopic_nextToken :: Lens.Lens' ListSubscriptionsByTopic (Prelude.Maybe Prelude.Text)+listSubscriptionsByTopic_nextToken = Lens.lens (\ListSubscriptionsByTopic' {nextToken} -> nextToken) (\s@ListSubscriptionsByTopic' {} a -> s {nextToken = a} :: ListSubscriptionsByTopic)++-- | The ARN of the topic for which you wish to find subscriptions.+listSubscriptionsByTopic_topicArn :: Lens.Lens' ListSubscriptionsByTopic Prelude.Text+listSubscriptionsByTopic_topicArn = Lens.lens (\ListSubscriptionsByTopic' {topicArn} -> topicArn) (\s@ListSubscriptionsByTopic' {} a -> s {topicArn = a} :: ListSubscriptionsByTopic)++instance Core.AWSPager ListSubscriptionsByTopic where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listSubscriptionsByTopicResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listSubscriptionsByTopicResponse_subscriptions+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listSubscriptionsByTopic_nextToken+          Lens..~ rs+          Lens.^? listSubscriptionsByTopicResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListSubscriptionsByTopic where+  type+    AWSResponse ListSubscriptionsByTopic =+      ListSubscriptionsByTopicResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "ListSubscriptionsByTopicResult"+      ( \s h x ->+          ListSubscriptionsByTopicResponse'+            Prelude.<$> (x Data..@? "NextToken")+            Prelude.<*> ( x+                            Data..@? "Subscriptions"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLList "member")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListSubscriptionsByTopic where+  hashWithSalt _salt ListSubscriptionsByTopic' {..} =+    _salt+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` topicArn++instance Prelude.NFData ListSubscriptionsByTopic where+  rnf ListSubscriptionsByTopic' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf topicArn++instance Data.ToHeaders ListSubscriptionsByTopic where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath ListSubscriptionsByTopic where+  toPath = Prelude.const "/"++instance Data.ToQuery ListSubscriptionsByTopic where+  toQuery ListSubscriptionsByTopic' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("ListSubscriptionsByTopic" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "NextToken" Data.=: nextToken,+        "TopicArn" Data.=: topicArn+      ]++-- | Response for ListSubscriptionsByTopic action.+--+-- /See:/ 'newListSubscriptionsByTopicResponse' smart constructor.+data ListSubscriptionsByTopicResponse = ListSubscriptionsByTopicResponse'+  { -- | Token to pass along to the next @ListSubscriptionsByTopic@ request. This+    -- element is returned if there are more subscriptions to retrieve.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | A list of subscriptions.+    subscriptions :: Prelude.Maybe [Subscription],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSubscriptionsByTopicResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listSubscriptionsByTopicResponse_nextToken' - Token to pass along to the next @ListSubscriptionsByTopic@ request. This+-- element is returned if there are more subscriptions to retrieve.+--+-- 'subscriptions', 'listSubscriptionsByTopicResponse_subscriptions' - A list of subscriptions.+--+-- 'httpStatus', 'listSubscriptionsByTopicResponse_httpStatus' - The response's http status code.+newListSubscriptionsByTopicResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListSubscriptionsByTopicResponse+newListSubscriptionsByTopicResponse pHttpStatus_ =+  ListSubscriptionsByTopicResponse'+    { nextToken =+        Prelude.Nothing,+      subscriptions = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Token to pass along to the next @ListSubscriptionsByTopic@ request. This+-- element is returned if there are more subscriptions to retrieve.+listSubscriptionsByTopicResponse_nextToken :: Lens.Lens' ListSubscriptionsByTopicResponse (Prelude.Maybe Prelude.Text)+listSubscriptionsByTopicResponse_nextToken = Lens.lens (\ListSubscriptionsByTopicResponse' {nextToken} -> nextToken) (\s@ListSubscriptionsByTopicResponse' {} a -> s {nextToken = a} :: ListSubscriptionsByTopicResponse)++-- | A list of subscriptions.+listSubscriptionsByTopicResponse_subscriptions :: Lens.Lens' ListSubscriptionsByTopicResponse (Prelude.Maybe [Subscription])+listSubscriptionsByTopicResponse_subscriptions = Lens.lens (\ListSubscriptionsByTopicResponse' {subscriptions} -> subscriptions) (\s@ListSubscriptionsByTopicResponse' {} a -> s {subscriptions = a} :: ListSubscriptionsByTopicResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listSubscriptionsByTopicResponse_httpStatus :: Lens.Lens' ListSubscriptionsByTopicResponse Prelude.Int+listSubscriptionsByTopicResponse_httpStatus = Lens.lens (\ListSubscriptionsByTopicResponse' {httpStatus} -> httpStatus) (\s@ListSubscriptionsByTopicResponse' {} a -> s {httpStatus = a} :: ListSubscriptionsByTopicResponse)++instance+  Prelude.NFData+    ListSubscriptionsByTopicResponse+  where+  rnf ListSubscriptionsByTopicResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf subscriptions+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/ListTagsForResource.hs view
@@ -0,0 +1,165 @@+{-# 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.SNS.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 added to the specified Amazon SNS topic. For an overview,+-- see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-tags.html Amazon SNS Tags>+-- in the /Amazon Simple Notification Service Developer Guide/.+module Amazonka.SNS.ListTagsForResource+  ( -- * Creating a Request+    ListTagsForResource (..),+    newListTagsForResource,++    -- * Request Lenses+    listTagsForResource_resourceArn,++    -- * Destructuring the Response+    ListTagsForResourceResponse (..),+    newListTagsForResourceResponse,++    -- * Response Lenses+    listTagsForResourceResponse_tags,+    listTagsForResourceResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+  { -- | The ARN of the topic for which to list tags.+    resourceArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'listTagsForResource_resourceArn' - The ARN of the topic for which to list tags.+newListTagsForResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  ListTagsForResource+newListTagsForResource pResourceArn_ =+  ListTagsForResource' {resourceArn = pResourceArn_}++-- | The ARN of the topic for which to list tags.+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.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "ListTagsForResourceResult"+      ( \s h x ->+          ListTagsForResourceResponse'+            Prelude.<$> ( x+                            Data..@? "Tags"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLList "member")+                        )+            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.mempty++instance Data.ToPath ListTagsForResource where+  toPath = Prelude.const "/"++instance Data.ToQuery ListTagsForResource where+  toQuery ListTagsForResource' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("ListTagsForResource" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "ResourceArn" Data.=: resourceArn+      ]++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+  { -- | The tags associated with the specified topic.+    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:+--+-- 'tags', 'listTagsForResourceResponse_tags' - The tags associated with the specified topic.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+  ListTagsForResourceResponse'+    { tags =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The tags associated with the specified topic.+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 tags+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/ListTopics.hs view
@@ -0,0 +1,202 @@+{-# 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.SNS.ListTopics+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of the requester\'s topics. Each call returns a limited+-- list of topics, up to 100. If there are more topics, a @NextToken@ is+-- also returned. Use the @NextToken@ parameter in a new @ListTopics@ call+-- to get further results.+--+-- This action is throttled at 30 transactions per second (TPS).+--+-- This operation returns paginated results.+module Amazonka.SNS.ListTopics+  ( -- * Creating a Request+    ListTopics (..),+    newListTopics,++    -- * Request Lenses+    listTopics_nextToken,++    -- * Destructuring the Response+    ListTopicsResponse (..),+    newListTopicsResponse,++    -- * Response Lenses+    listTopicsResponse_nextToken,+    listTopicsResponse_topics,+    listTopicsResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newListTopics' smart constructor.+data ListTopics = ListTopics'+  { -- | Token returned by the previous @ListTopics@ request.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTopics' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listTopics_nextToken' - Token returned by the previous @ListTopics@ request.+newListTopics ::+  ListTopics+newListTopics =+  ListTopics' {nextToken = Prelude.Nothing}++-- | Token returned by the previous @ListTopics@ request.+listTopics_nextToken :: Lens.Lens' ListTopics (Prelude.Maybe Prelude.Text)+listTopics_nextToken = Lens.lens (\ListTopics' {nextToken} -> nextToken) (\s@ListTopics' {} a -> s {nextToken = a} :: ListTopics)++instance Core.AWSPager ListTopics where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listTopicsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listTopicsResponse_topics+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listTopics_nextToken+          Lens..~ rs+          Lens.^? listTopicsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListTopics where+  type AWSResponse ListTopics = ListTopicsResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "ListTopicsResult"+      ( \s h x ->+          ListTopicsResponse'+            Prelude.<$> (x Data..@? "NextToken")+            Prelude.<*> ( x+                            Data..@? "Topics"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLList "member")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListTopics where+  hashWithSalt _salt ListTopics' {..} =+    _salt `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListTopics where+  rnf ListTopics' {..} = Prelude.rnf nextToken++instance Data.ToHeaders ListTopics where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath ListTopics where+  toPath = Prelude.const "/"++instance Data.ToQuery ListTopics where+  toQuery ListTopics' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("ListTopics" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "NextToken" Data.=: nextToken+      ]++-- | Response for ListTopics action.+--+-- /See:/ 'newListTopicsResponse' smart constructor.+data ListTopicsResponse = ListTopicsResponse'+  { -- | Token to pass along to the next @ListTopics@ request. This element is+    -- returned if there are additional topics to retrieve.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | A list of topic ARNs.+    topics :: Prelude.Maybe [Topic],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTopicsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'listTopicsResponse_nextToken' - Token to pass along to the next @ListTopics@ request. This element is+-- returned if there are additional topics to retrieve.+--+-- 'topics', 'listTopicsResponse_topics' - A list of topic ARNs.+--+-- 'httpStatus', 'listTopicsResponse_httpStatus' - The response's http status code.+newListTopicsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListTopicsResponse+newListTopicsResponse pHttpStatus_ =+  ListTopicsResponse'+    { nextToken = Prelude.Nothing,+      topics = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Token to pass along to the next @ListTopics@ request. This element is+-- returned if there are additional topics to retrieve.+listTopicsResponse_nextToken :: Lens.Lens' ListTopicsResponse (Prelude.Maybe Prelude.Text)+listTopicsResponse_nextToken = Lens.lens (\ListTopicsResponse' {nextToken} -> nextToken) (\s@ListTopicsResponse' {} a -> s {nextToken = a} :: ListTopicsResponse)++-- | A list of topic ARNs.+listTopicsResponse_topics :: Lens.Lens' ListTopicsResponse (Prelude.Maybe [Topic])+listTopicsResponse_topics = Lens.lens (\ListTopicsResponse' {topics} -> topics) (\s@ListTopicsResponse' {} a -> s {topics = a} :: ListTopicsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listTopicsResponse_httpStatus :: Lens.Lens' ListTopicsResponse Prelude.Int+listTopicsResponse_httpStatus = Lens.lens (\ListTopicsResponse' {httpStatus} -> httpStatus) (\s@ListTopicsResponse' {} a -> s {httpStatus = a} :: ListTopicsResponse)++instance Prelude.NFData ListTopicsResponse where+  rnf ListTopicsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf topics+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/OptInPhoneNumber.hs view
@@ -0,0 +1,152 @@+{-# 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.SNS.OptInPhoneNumber+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Use this request to opt in a phone number that is opted out, which+-- enables you to resume sending SMS messages to the number.+--+-- You can opt in a phone number only once every 30 days.+module Amazonka.SNS.OptInPhoneNumber+  ( -- * Creating a Request+    OptInPhoneNumber (..),+    newOptInPhoneNumber,++    -- * Request Lenses+    optInPhoneNumber_phoneNumber,++    -- * Destructuring the Response+    OptInPhoneNumberResponse (..),+    newOptInPhoneNumberResponse,++    -- * Response Lenses+    optInPhoneNumberResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for the OptInPhoneNumber action.+--+-- /See:/ 'newOptInPhoneNumber' smart constructor.+data OptInPhoneNumber = OptInPhoneNumber'+  { -- | The phone number to opt in. Use E.164 format.+    phoneNumber :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'OptInPhoneNumber' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'phoneNumber', 'optInPhoneNumber_phoneNumber' - The phone number to opt in. Use E.164 format.+newOptInPhoneNumber ::+  -- | 'phoneNumber'+  Prelude.Text ->+  OptInPhoneNumber+newOptInPhoneNumber pPhoneNumber_ =+  OptInPhoneNumber' {phoneNumber = pPhoneNumber_}++-- | The phone number to opt in. Use E.164 format.+optInPhoneNumber_phoneNumber :: Lens.Lens' OptInPhoneNumber Prelude.Text+optInPhoneNumber_phoneNumber = Lens.lens (\OptInPhoneNumber' {phoneNumber} -> phoneNumber) (\s@OptInPhoneNumber' {} a -> s {phoneNumber = a} :: OptInPhoneNumber)++instance Core.AWSRequest OptInPhoneNumber where+  type+    AWSResponse OptInPhoneNumber =+      OptInPhoneNumberResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "OptInPhoneNumberResult"+      ( \s h x ->+          OptInPhoneNumberResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable OptInPhoneNumber where+  hashWithSalt _salt OptInPhoneNumber' {..} =+    _salt `Prelude.hashWithSalt` phoneNumber++instance Prelude.NFData OptInPhoneNumber where+  rnf OptInPhoneNumber' {..} = Prelude.rnf phoneNumber++instance Data.ToHeaders OptInPhoneNumber where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath OptInPhoneNumber where+  toPath = Prelude.const "/"++instance Data.ToQuery OptInPhoneNumber where+  toQuery OptInPhoneNumber' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("OptInPhoneNumber" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "phoneNumber" Data.=: phoneNumber+      ]++-- | The response for the OptInPhoneNumber action.+--+-- /See:/ 'newOptInPhoneNumberResponse' smart constructor.+data OptInPhoneNumberResponse = OptInPhoneNumberResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'OptInPhoneNumberResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'optInPhoneNumberResponse_httpStatus' - The response's http status code.+newOptInPhoneNumberResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  OptInPhoneNumberResponse+newOptInPhoneNumberResponse pHttpStatus_ =+  OptInPhoneNumberResponse'+    { httpStatus =+        pHttpStatus_+    }++-- | The response's http status code.+optInPhoneNumberResponse_httpStatus :: Lens.Lens' OptInPhoneNumberResponse Prelude.Int+optInPhoneNumberResponse_httpStatus = Lens.lens (\OptInPhoneNumberResponse' {httpStatus} -> httpStatus) (\s@OptInPhoneNumberResponse' {} a -> s {httpStatus = a} :: OptInPhoneNumberResponse)++instance Prelude.NFData OptInPhoneNumberResponse where+  rnf OptInPhoneNumberResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/SNS/Publish.hs view
@@ -0,0 +1,623 @@+{-# 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.SNS.Publish+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sends a message to an Amazon SNS topic, a text message (SMS message)+-- directly to a phone number, or a message to a mobile platform endpoint+-- (when you specify the @TargetArn@).+--+-- If you send a message to a topic, Amazon SNS delivers the message to+-- each endpoint that is subscribed to the topic. The format of the message+-- depends on the notification protocol for each subscribed endpoint.+--+-- When a @messageId@ is returned, the message is saved and Amazon SNS+-- immediately delivers it to subscribers.+--+-- To use the @Publish@ action for publishing a message to a mobile+-- endpoint, such as an app on a Kindle device or mobile phone, you must+-- specify the EndpointArn for the TargetArn parameter. The EndpointArn is+-- returned when making a call with the @CreatePlatformEndpoint@ action.+--+-- For more information about formatting messages, see+-- <https://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html Send Custom Platform-Specific Payloads in Messages to Mobile Devices>.+--+-- You can publish messages only to topics and endpoints in the same Amazon+-- Web Services Region.+module Amazonka.SNS.Publish+  ( -- * Creating a Request+    Publish (..),+    newPublish,++    -- * Request Lenses+    publish_messageAttributes,+    publish_messageDeduplicationId,+    publish_messageGroupId,+    publish_messageStructure,+    publish_phoneNumber,+    publish_subject,+    publish_targetArn,+    publish_topicArn,+    publish_message,++    -- * Destructuring the Response+    PublishResponse (..),+    newPublishResponse,++    -- * Response Lenses+    publishResponse_messageId,+    publishResponse_sequenceNumber,+    publishResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for Publish action.+--+-- /See:/ 'newPublish' smart constructor.+data Publish = Publish'+  { -- | Message attributes for Publish action.+    messageAttributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text MessageAttributeValue),+    -- | This parameter applies only to FIFO (first-in-first-out) topics. The+    -- @MessageDeduplicationId@ can contain up to 128 alphanumeric characters+    -- @(a-z, A-Z, 0-9)@ and punctuation+    -- @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+    --+    -- Every message must have a unique @MessageDeduplicationId@, which is a+    -- token used for deduplication of sent messages. If a message with a+    -- particular @MessageDeduplicationId@ is sent successfully, any message+    -- sent with the same @MessageDeduplicationId@ during the 5-minute+    -- deduplication interval is treated as a duplicate.+    --+    -- If the topic has @ContentBasedDeduplication@ set, the system generates a+    -- @MessageDeduplicationId@ based on the contents of the message. Your+    -- @MessageDeduplicationId@ overrides the generated one.+    messageDeduplicationId :: Prelude.Maybe Prelude.Text,+    -- | This parameter applies only to FIFO (first-in-first-out) topics. The+    -- @MessageGroupId@ can contain up to 128 alphanumeric characters+    -- @(a-z, A-Z, 0-9)@ and punctuation+    -- @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+    --+    -- The @MessageGroupId@ is a tag that specifies that a message belongs to a+    -- specific message group. Messages that belong to the same message group+    -- are processed in a FIFO manner (however, messages in different message+    -- groups might be processed out of order). Every message must include a+    -- @MessageGroupId@.+    messageGroupId :: Prelude.Maybe Prelude.Text,+    -- | Set @MessageStructure@ to @json@ if you want to send a different message+    -- for each protocol. For example, using one publish action, you can send a+    -- short message to your SMS subscribers and a longer message to your email+    -- subscribers. If you set @MessageStructure@ to @json@, the value of the+    -- @Message@ parameter must:+    --+    -- -   be a syntactically valid JSON object; and+    --+    -- -   contain at least a top-level JSON key of \"default\" with a value+    --     that is a string.+    --+    -- You can define other top-level keys that define the message you want to+    -- send to a specific transport protocol (e.g., \"http\").+    --+    -- Valid value: @json@+    messageStructure :: Prelude.Maybe Prelude.Text,+    -- | The phone number to which you want to deliver an SMS message. Use E.164+    -- format.+    --+    -- If you don\'t specify a value for the @PhoneNumber@ parameter, you must+    -- specify a value for the @TargetArn@ or @TopicArn@ parameters.+    phoneNumber :: Prelude.Maybe Prelude.Text,+    -- | Optional parameter to be used as the \"Subject\" line when the message+    -- is delivered to email endpoints. This field will also be included, if+    -- present, in the standard JSON messages delivered to other endpoints.+    --+    -- Constraints: Subjects must be ASCII text that begins with a letter,+    -- number, or punctuation mark; must not include line breaks or control+    -- characters; and must be less than 100 characters long.+    subject :: Prelude.Maybe Prelude.Text,+    -- | If you don\'t specify a value for the @TargetArn@ parameter, you must+    -- specify a value for the @PhoneNumber@ or @TopicArn@ parameters.+    targetArn :: Prelude.Maybe Prelude.Text,+    -- | The topic you want to publish to.+    --+    -- If you don\'t specify a value for the @TopicArn@ parameter, you must+    -- specify a value for the @PhoneNumber@ or @TargetArn@ parameters.+    topicArn :: Prelude.Maybe Prelude.Text,+    -- | The message you want to send.+    --+    -- If you are publishing to a topic and you want to send the same message+    -- to all transport protocols, include the text of the message as a String+    -- value. If you want to send different messages for each transport+    -- protocol, set the value of the @MessageStructure@ parameter to @json@+    -- and use a JSON object for the @Message@ parameter.+    --+    -- Constraints:+    --+    -- -   With the exception of SMS, messages must be UTF-8 encoded strings+    --     and at most 256 KB in size (262,144 bytes, not 262,144 characters).+    --+    -- -   For SMS, each message can contain up to 140 characters. This+    --     character limit depends on the encoding schema. For example, an SMS+    --     message can contain 160 GSM characters, 140 ASCII characters, or 70+    --     UCS-2 characters.+    --+    --     If you publish a message that exceeds this size limit, Amazon SNS+    --     sends the message as multiple messages, each fitting within the size+    --     limit. Messages aren\'t truncated mid-word but are cut off at+    --     whole-word boundaries.+    --+    --     The total size limit for a single SMS @Publish@ action is 1,600+    --     characters.+    --+    -- JSON-specific constraints:+    --+    -- -   Keys in the JSON object that correspond to supported transport+    --     protocols must have simple JSON string values.+    --+    -- -   The values will be parsed (unescaped) before they are used in+    --     outgoing messages.+    --+    -- -   Outbound notifications are JSON encoded (meaning that the characters+    --     will be reescaped for sending).+    --+    -- -   Values have a minimum length of 0 (the empty string, \"\", is+    --     allowed).+    --+    -- -   Values have a maximum length bounded by the overall message size+    --     (so, including multiple protocols may limit message sizes).+    --+    -- -   Non-string values will cause the key to be ignored.+    --+    -- -   Keys that do not correspond to supported transport protocols are+    --     ignored.+    --+    -- -   Duplicate keys are not allowed.+    --+    -- -   Failure to parse or validate any key or value in the message will+    --     cause the @Publish@ call to return an error (no partial delivery).+    message :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Publish' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'messageAttributes', 'publish_messageAttributes' - Message attributes for Publish action.+--+-- 'messageDeduplicationId', 'publish_messageDeduplicationId' - This parameter applies only to FIFO (first-in-first-out) topics. The+-- @MessageDeduplicationId@ can contain up to 128 alphanumeric characters+-- @(a-z, A-Z, 0-9)@ and punctuation+-- @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+--+-- Every message must have a unique @MessageDeduplicationId@, which is a+-- token used for deduplication of sent messages. If a message with a+-- particular @MessageDeduplicationId@ is sent successfully, any message+-- sent with the same @MessageDeduplicationId@ during the 5-minute+-- deduplication interval is treated as a duplicate.+--+-- If the topic has @ContentBasedDeduplication@ set, the system generates a+-- @MessageDeduplicationId@ based on the contents of the message. Your+-- @MessageDeduplicationId@ overrides the generated one.+--+-- 'messageGroupId', 'publish_messageGroupId' - This parameter applies only to FIFO (first-in-first-out) topics. The+-- @MessageGroupId@ can contain up to 128 alphanumeric characters+-- @(a-z, A-Z, 0-9)@ and punctuation+-- @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+--+-- The @MessageGroupId@ is a tag that specifies that a message belongs to a+-- specific message group. Messages that belong to the same message group+-- are processed in a FIFO manner (however, messages in different message+-- groups might be processed out of order). Every message must include a+-- @MessageGroupId@.+--+-- 'messageStructure', 'publish_messageStructure' - Set @MessageStructure@ to @json@ if you want to send a different message+-- for each protocol. For example, using one publish action, you can send a+-- short message to your SMS subscribers and a longer message to your email+-- subscribers. If you set @MessageStructure@ to @json@, the value of the+-- @Message@ parameter must:+--+-- -   be a syntactically valid JSON object; and+--+-- -   contain at least a top-level JSON key of \"default\" with a value+--     that is a string.+--+-- You can define other top-level keys that define the message you want to+-- send to a specific transport protocol (e.g., \"http\").+--+-- Valid value: @json@+--+-- 'phoneNumber', 'publish_phoneNumber' - The phone number to which you want to deliver an SMS message. Use E.164+-- format.+--+-- If you don\'t specify a value for the @PhoneNumber@ parameter, you must+-- specify a value for the @TargetArn@ or @TopicArn@ parameters.+--+-- 'subject', 'publish_subject' - Optional parameter to be used as the \"Subject\" line when the message+-- is delivered to email endpoints. This field will also be included, if+-- present, in the standard JSON messages delivered to other endpoints.+--+-- Constraints: Subjects must be ASCII text that begins with a letter,+-- number, or punctuation mark; must not include line breaks or control+-- characters; and must be less than 100 characters long.+--+-- 'targetArn', 'publish_targetArn' - If you don\'t specify a value for the @TargetArn@ parameter, you must+-- specify a value for the @PhoneNumber@ or @TopicArn@ parameters.+--+-- 'topicArn', 'publish_topicArn' - The topic you want to publish to.+--+-- If you don\'t specify a value for the @TopicArn@ parameter, you must+-- specify a value for the @PhoneNumber@ or @TargetArn@ parameters.+--+-- 'message', 'publish_message' - The message you want to send.+--+-- If you are publishing to a topic and you want to send the same message+-- to all transport protocols, include the text of the message as a String+-- value. If you want to send different messages for each transport+-- protocol, set the value of the @MessageStructure@ parameter to @json@+-- and use a JSON object for the @Message@ parameter.+--+-- Constraints:+--+-- -   With the exception of SMS, messages must be UTF-8 encoded strings+--     and at most 256 KB in size (262,144 bytes, not 262,144 characters).+--+-- -   For SMS, each message can contain up to 140 characters. This+--     character limit depends on the encoding schema. For example, an SMS+--     message can contain 160 GSM characters, 140 ASCII characters, or 70+--     UCS-2 characters.+--+--     If you publish a message that exceeds this size limit, Amazon SNS+--     sends the message as multiple messages, each fitting within the size+--     limit. Messages aren\'t truncated mid-word but are cut off at+--     whole-word boundaries.+--+--     The total size limit for a single SMS @Publish@ action is 1,600+--     characters.+--+-- JSON-specific constraints:+--+-- -   Keys in the JSON object that correspond to supported transport+--     protocols must have simple JSON string values.+--+-- -   The values will be parsed (unescaped) before they are used in+--     outgoing messages.+--+-- -   Outbound notifications are JSON encoded (meaning that the characters+--     will be reescaped for sending).+--+-- -   Values have a minimum length of 0 (the empty string, \"\", is+--     allowed).+--+-- -   Values have a maximum length bounded by the overall message size+--     (so, including multiple protocols may limit message sizes).+--+-- -   Non-string values will cause the key to be ignored.+--+-- -   Keys that do not correspond to supported transport protocols are+--     ignored.+--+-- -   Duplicate keys are not allowed.+--+-- -   Failure to parse or validate any key or value in the message will+--     cause the @Publish@ call to return an error (no partial delivery).+newPublish ::+  -- | 'message'+  Prelude.Text ->+  Publish+newPublish pMessage_ =+  Publish'+    { messageAttributes = Prelude.Nothing,+      messageDeduplicationId = Prelude.Nothing,+      messageGroupId = Prelude.Nothing,+      messageStructure = Prelude.Nothing,+      phoneNumber = Prelude.Nothing,+      subject = Prelude.Nothing,+      targetArn = Prelude.Nothing,+      topicArn = Prelude.Nothing,+      message = pMessage_+    }++-- | Message attributes for Publish action.+publish_messageAttributes :: Lens.Lens' Publish (Prelude.Maybe (Prelude.HashMap Prelude.Text MessageAttributeValue))+publish_messageAttributes = Lens.lens (\Publish' {messageAttributes} -> messageAttributes) (\s@Publish' {} a -> s {messageAttributes = a} :: Publish) Prelude.. Lens.mapping Lens.coerced++-- | This parameter applies only to FIFO (first-in-first-out) topics. The+-- @MessageDeduplicationId@ can contain up to 128 alphanumeric characters+-- @(a-z, A-Z, 0-9)@ and punctuation+-- @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+--+-- Every message must have a unique @MessageDeduplicationId@, which is a+-- token used for deduplication of sent messages. If a message with a+-- particular @MessageDeduplicationId@ is sent successfully, any message+-- sent with the same @MessageDeduplicationId@ during the 5-minute+-- deduplication interval is treated as a duplicate.+--+-- If the topic has @ContentBasedDeduplication@ set, the system generates a+-- @MessageDeduplicationId@ based on the contents of the message. Your+-- @MessageDeduplicationId@ overrides the generated one.+publish_messageDeduplicationId :: Lens.Lens' Publish (Prelude.Maybe Prelude.Text)+publish_messageDeduplicationId = Lens.lens (\Publish' {messageDeduplicationId} -> messageDeduplicationId) (\s@Publish' {} a -> s {messageDeduplicationId = a} :: Publish)++-- | This parameter applies only to FIFO (first-in-first-out) topics. The+-- @MessageGroupId@ can contain up to 128 alphanumeric characters+-- @(a-z, A-Z, 0-9)@ and punctuation+-- @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+--+-- The @MessageGroupId@ is a tag that specifies that a message belongs to a+-- specific message group. Messages that belong to the same message group+-- are processed in a FIFO manner (however, messages in different message+-- groups might be processed out of order). Every message must include a+-- @MessageGroupId@.+publish_messageGroupId :: Lens.Lens' Publish (Prelude.Maybe Prelude.Text)+publish_messageGroupId = Lens.lens (\Publish' {messageGroupId} -> messageGroupId) (\s@Publish' {} a -> s {messageGroupId = a} :: Publish)++-- | Set @MessageStructure@ to @json@ if you want to send a different message+-- for each protocol. For example, using one publish action, you can send a+-- short message to your SMS subscribers and a longer message to your email+-- subscribers. If you set @MessageStructure@ to @json@, the value of the+-- @Message@ parameter must:+--+-- -   be a syntactically valid JSON object; and+--+-- -   contain at least a top-level JSON key of \"default\" with a value+--     that is a string.+--+-- You can define other top-level keys that define the message you want to+-- send to a specific transport protocol (e.g., \"http\").+--+-- Valid value: @json@+publish_messageStructure :: Lens.Lens' Publish (Prelude.Maybe Prelude.Text)+publish_messageStructure = Lens.lens (\Publish' {messageStructure} -> messageStructure) (\s@Publish' {} a -> s {messageStructure = a} :: Publish)++-- | The phone number to which you want to deliver an SMS message. Use E.164+-- format.+--+-- If you don\'t specify a value for the @PhoneNumber@ parameter, you must+-- specify a value for the @TargetArn@ or @TopicArn@ parameters.+publish_phoneNumber :: Lens.Lens' Publish (Prelude.Maybe Prelude.Text)+publish_phoneNumber = Lens.lens (\Publish' {phoneNumber} -> phoneNumber) (\s@Publish' {} a -> s {phoneNumber = a} :: Publish)++-- | Optional parameter to be used as the \"Subject\" line when the message+-- is delivered to email endpoints. This field will also be included, if+-- present, in the standard JSON messages delivered to other endpoints.+--+-- Constraints: Subjects must be ASCII text that begins with a letter,+-- number, or punctuation mark; must not include line breaks or control+-- characters; and must be less than 100 characters long.+publish_subject :: Lens.Lens' Publish (Prelude.Maybe Prelude.Text)+publish_subject = Lens.lens (\Publish' {subject} -> subject) (\s@Publish' {} a -> s {subject = a} :: Publish)++-- | If you don\'t specify a value for the @TargetArn@ parameter, you must+-- specify a value for the @PhoneNumber@ or @TopicArn@ parameters.+publish_targetArn :: Lens.Lens' Publish (Prelude.Maybe Prelude.Text)+publish_targetArn = Lens.lens (\Publish' {targetArn} -> targetArn) (\s@Publish' {} a -> s {targetArn = a} :: Publish)++-- | The topic you want to publish to.+--+-- If you don\'t specify a value for the @TopicArn@ parameter, you must+-- specify a value for the @PhoneNumber@ or @TargetArn@ parameters.+publish_topicArn :: Lens.Lens' Publish (Prelude.Maybe Prelude.Text)+publish_topicArn = Lens.lens (\Publish' {topicArn} -> topicArn) (\s@Publish' {} a -> s {topicArn = a} :: Publish)++-- | The message you want to send.+--+-- If you are publishing to a topic and you want to send the same message+-- to all transport protocols, include the text of the message as a String+-- value. If you want to send different messages for each transport+-- protocol, set the value of the @MessageStructure@ parameter to @json@+-- and use a JSON object for the @Message@ parameter.+--+-- Constraints:+--+-- -   With the exception of SMS, messages must be UTF-8 encoded strings+--     and at most 256 KB in size (262,144 bytes, not 262,144 characters).+--+-- -   For SMS, each message can contain up to 140 characters. This+--     character limit depends on the encoding schema. For example, an SMS+--     message can contain 160 GSM characters, 140 ASCII characters, or 70+--     UCS-2 characters.+--+--     If you publish a message that exceeds this size limit, Amazon SNS+--     sends the message as multiple messages, each fitting within the size+--     limit. Messages aren\'t truncated mid-word but are cut off at+--     whole-word boundaries.+--+--     The total size limit for a single SMS @Publish@ action is 1,600+--     characters.+--+-- JSON-specific constraints:+--+-- -   Keys in the JSON object that correspond to supported transport+--     protocols must have simple JSON string values.+--+-- -   The values will be parsed (unescaped) before they are used in+--     outgoing messages.+--+-- -   Outbound notifications are JSON encoded (meaning that the characters+--     will be reescaped for sending).+--+-- -   Values have a minimum length of 0 (the empty string, \"\", is+--     allowed).+--+-- -   Values have a maximum length bounded by the overall message size+--     (so, including multiple protocols may limit message sizes).+--+-- -   Non-string values will cause the key to be ignored.+--+-- -   Keys that do not correspond to supported transport protocols are+--     ignored.+--+-- -   Duplicate keys are not allowed.+--+-- -   Failure to parse or validate any key or value in the message will+--     cause the @Publish@ call to return an error (no partial delivery).+publish_message :: Lens.Lens' Publish Prelude.Text+publish_message = Lens.lens (\Publish' {message} -> message) (\s@Publish' {} a -> s {message = a} :: Publish)++instance Core.AWSRequest Publish where+  type AWSResponse Publish = PublishResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "PublishResult"+      ( \s h x ->+          PublishResponse'+            Prelude.<$> (x Data..@? "MessageId")+            Prelude.<*> (x Data..@? "SequenceNumber")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable Publish where+  hashWithSalt _salt Publish' {..} =+    _salt+      `Prelude.hashWithSalt` messageAttributes+      `Prelude.hashWithSalt` messageDeduplicationId+      `Prelude.hashWithSalt` messageGroupId+      `Prelude.hashWithSalt` messageStructure+      `Prelude.hashWithSalt` phoneNumber+      `Prelude.hashWithSalt` subject+      `Prelude.hashWithSalt` targetArn+      `Prelude.hashWithSalt` topicArn+      `Prelude.hashWithSalt` message++instance Prelude.NFData Publish where+  rnf Publish' {..} =+    Prelude.rnf messageAttributes+      `Prelude.seq` Prelude.rnf messageDeduplicationId+      `Prelude.seq` Prelude.rnf messageGroupId+      `Prelude.seq` Prelude.rnf messageStructure+      `Prelude.seq` Prelude.rnf phoneNumber+      `Prelude.seq` Prelude.rnf subject+      `Prelude.seq` Prelude.rnf targetArn+      `Prelude.seq` Prelude.rnf topicArn+      `Prelude.seq` Prelude.rnf message++instance Data.ToHeaders Publish where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath Publish where+  toPath = Prelude.const "/"++instance Data.ToQuery Publish where+  toQuery Publish' {..} =+    Prelude.mconcat+      [ "Action" Data.=: ("Publish" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "MessageAttributes"+          Data.=: Data.toQuery+            ( Data.toQueryMap "entry" "Name" "Value"+                Prelude.<$> messageAttributes+            ),+        "MessageDeduplicationId"+          Data.=: messageDeduplicationId,+        "MessageGroupId" Data.=: messageGroupId,+        "MessageStructure" Data.=: messageStructure,+        "PhoneNumber" Data.=: phoneNumber,+        "Subject" Data.=: subject,+        "TargetArn" Data.=: targetArn,+        "TopicArn" Data.=: topicArn,+        "Message" Data.=: message+      ]++-- | Response for Publish action.+--+-- /See:/ 'newPublishResponse' smart constructor.+data PublishResponse = PublishResponse'+  { -- | Unique identifier assigned to the published message.+    --+    -- Length Constraint: Maximum 100 characters+    messageId :: Prelude.Maybe Prelude.Text,+    -- | This response element applies only to FIFO (first-in-first-out) topics.+    --+    -- The sequence number is a large, non-consecutive number that Amazon SNS+    -- assigns to each message. The length of @SequenceNumber@ is 128 bits.+    -- @SequenceNumber@ continues to increase for each @MessageGroupId@.+    sequenceNumber :: 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 'PublishResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'publishResponse_messageId' - Unique identifier assigned to the published message.+--+-- Length Constraint: Maximum 100 characters+--+-- 'sequenceNumber', 'publishResponse_sequenceNumber' - This response element applies only to FIFO (first-in-first-out) topics.+--+-- The sequence number is a large, non-consecutive number that Amazon SNS+-- assigns to each message. The length of @SequenceNumber@ is 128 bits.+-- @SequenceNumber@ continues to increase for each @MessageGroupId@.+--+-- 'httpStatus', 'publishResponse_httpStatus' - The response's http status code.+newPublishResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  PublishResponse+newPublishResponse pHttpStatus_ =+  PublishResponse'+    { messageId = Prelude.Nothing,+      sequenceNumber = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Unique identifier assigned to the published message.+--+-- Length Constraint: Maximum 100 characters+publishResponse_messageId :: Lens.Lens' PublishResponse (Prelude.Maybe Prelude.Text)+publishResponse_messageId = Lens.lens (\PublishResponse' {messageId} -> messageId) (\s@PublishResponse' {} a -> s {messageId = a} :: PublishResponse)++-- | This response element applies only to FIFO (first-in-first-out) topics.+--+-- The sequence number is a large, non-consecutive number that Amazon SNS+-- assigns to each message. The length of @SequenceNumber@ is 128 bits.+-- @SequenceNumber@ continues to increase for each @MessageGroupId@.+publishResponse_sequenceNumber :: Lens.Lens' PublishResponse (Prelude.Maybe Prelude.Text)+publishResponse_sequenceNumber = Lens.lens (\PublishResponse' {sequenceNumber} -> sequenceNumber) (\s@PublishResponse' {} a -> s {sequenceNumber = a} :: PublishResponse)++-- | The response's http status code.+publishResponse_httpStatus :: Lens.Lens' PublishResponse Prelude.Int+publishResponse_httpStatus = Lens.lens (\PublishResponse' {httpStatus} -> httpStatus) (\s@PublishResponse' {} a -> s {httpStatus = a} :: PublishResponse)++instance Prelude.NFData PublishResponse where+  rnf PublishResponse' {..} =+    Prelude.rnf messageId+      `Prelude.seq` Prelude.rnf sequenceNumber+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/PublishBatch.hs view
@@ -0,0 +1,223 @@+{-# 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.SNS.PublishBatch+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Publishes up to ten messages to the specified topic. This is a batch+-- version of @Publish@. For FIFO topics, multiple messages within a single+-- batch are published in the order they are sent, and messages are+-- deduplicated within the batch and across batches for 5 minutes.+--+-- The result of publishing each message is reported individually in the+-- response. Because the batch request can result in a combination of+-- successful and unsuccessful actions, you should check for batch errors+-- even when the call returns an HTTP status code of @200@.+--+-- The maximum allowed individual message size and the maximum total+-- payload size (the sum of the individual lengths of all of the batched+-- messages) are both 256 KB (262,144 bytes).+--+-- Some actions take lists of parameters. These lists are specified using+-- the @param.n@ notation. Values of @n@ are integers starting from 1. For+-- example, a parameter list with two elements looks like this:+--+-- &AttributeName.1=first+--+-- &AttributeName.2=second+--+-- If you send a batch message to a topic, Amazon SNS publishes the batch+-- message to each endpoint that is subscribed to the topic. The format of+-- the batch message depends on the notification protocol for each+-- subscribed endpoint.+--+-- When a @messageId@ is returned, the batch message is saved and Amazon+-- SNS immediately delivers the message to subscribers.+module Amazonka.SNS.PublishBatch+  ( -- * Creating a Request+    PublishBatch (..),+    newPublishBatch,++    -- * Request Lenses+    publishBatch_topicArn,+    publishBatch_publishBatchRequestEntries,++    -- * Destructuring the Response+    PublishBatchResponse (..),+    newPublishBatchResponse,++    -- * Response Lenses+    publishBatchResponse_failed,+    publishBatchResponse_successful,+    publishBatchResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newPublishBatch' smart constructor.+data PublishBatch = PublishBatch'+  { -- | The Amazon resource name (ARN) of the topic you want to batch publish+    -- to.+    topicArn :: Prelude.Text,+    -- | A list of @PublishBatch@ request entries to be sent to the SNS topic.+    publishBatchRequestEntries :: [PublishBatchRequestEntry]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PublishBatch' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'publishBatch_topicArn' - The Amazon resource name (ARN) of the topic you want to batch publish+-- to.+--+-- 'publishBatchRequestEntries', 'publishBatch_publishBatchRequestEntries' - A list of @PublishBatch@ request entries to be sent to the SNS topic.+newPublishBatch ::+  -- | 'topicArn'+  Prelude.Text ->+  PublishBatch+newPublishBatch pTopicArn_ =+  PublishBatch'+    { topicArn = pTopicArn_,+      publishBatchRequestEntries = Prelude.mempty+    }++-- | The Amazon resource name (ARN) of the topic you want to batch publish+-- to.+publishBatch_topicArn :: Lens.Lens' PublishBatch Prelude.Text+publishBatch_topicArn = Lens.lens (\PublishBatch' {topicArn} -> topicArn) (\s@PublishBatch' {} a -> s {topicArn = a} :: PublishBatch)++-- | A list of @PublishBatch@ request entries to be sent to the SNS topic.+publishBatch_publishBatchRequestEntries :: Lens.Lens' PublishBatch [PublishBatchRequestEntry]+publishBatch_publishBatchRequestEntries = Lens.lens (\PublishBatch' {publishBatchRequestEntries} -> publishBatchRequestEntries) (\s@PublishBatch' {} a -> s {publishBatchRequestEntries = a} :: PublishBatch) Prelude.. Lens.coerced++instance Core.AWSRequest PublishBatch where+  type AWSResponse PublishBatch = PublishBatchResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "PublishBatchResult"+      ( \s h x ->+          PublishBatchResponse'+            Prelude.<$> ( x+                            Data..@? "Failed"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLList "member")+                        )+            Prelude.<*> ( x+                            Data..@? "Successful"+                            Core..!@ Prelude.mempty+                            Prelude.>>= Core.may (Data.parseXMLList "member")+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable PublishBatch where+  hashWithSalt _salt PublishBatch' {..} =+    _salt+      `Prelude.hashWithSalt` topicArn+      `Prelude.hashWithSalt` publishBatchRequestEntries++instance Prelude.NFData PublishBatch where+  rnf PublishBatch' {..} =+    Prelude.rnf topicArn+      `Prelude.seq` Prelude.rnf publishBatchRequestEntries++instance Data.ToHeaders PublishBatch where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath PublishBatch where+  toPath = Prelude.const "/"++instance Data.ToQuery PublishBatch where+  toQuery PublishBatch' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("PublishBatch" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "TopicArn" Data.=: topicArn,+        "PublishBatchRequestEntries"+          Data.=: Data.toQueryList "member" publishBatchRequestEntries+      ]++-- | /See:/ 'newPublishBatchResponse' smart constructor.+data PublishBatchResponse = PublishBatchResponse'+  { -- | A list of failed @PublishBatch@ responses.+    failed :: Prelude.Maybe [BatchResultErrorEntry],+    -- | A list of successful @PublishBatch@ responses.+    successful :: Prelude.Maybe [PublishBatchResultEntry],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PublishBatchResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'failed', 'publishBatchResponse_failed' - A list of failed @PublishBatch@ responses.+--+-- 'successful', 'publishBatchResponse_successful' - A list of successful @PublishBatch@ responses.+--+-- 'httpStatus', 'publishBatchResponse_httpStatus' - The response's http status code.+newPublishBatchResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  PublishBatchResponse+newPublishBatchResponse pHttpStatus_ =+  PublishBatchResponse'+    { failed = Prelude.Nothing,+      successful = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A list of failed @PublishBatch@ responses.+publishBatchResponse_failed :: Lens.Lens' PublishBatchResponse (Prelude.Maybe [BatchResultErrorEntry])+publishBatchResponse_failed = Lens.lens (\PublishBatchResponse' {failed} -> failed) (\s@PublishBatchResponse' {} a -> s {failed = a} :: PublishBatchResponse) Prelude.. Lens.mapping Lens.coerced++-- | A list of successful @PublishBatch@ responses.+publishBatchResponse_successful :: Lens.Lens' PublishBatchResponse (Prelude.Maybe [PublishBatchResultEntry])+publishBatchResponse_successful = Lens.lens (\PublishBatchResponse' {successful} -> successful) (\s@PublishBatchResponse' {} a -> s {successful = a} :: PublishBatchResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+publishBatchResponse_httpStatus :: Lens.Lens' PublishBatchResponse Prelude.Int+publishBatchResponse_httpStatus = Lens.lens (\PublishBatchResponse' {httpStatus} -> httpStatus) (\s@PublishBatchResponse' {} a -> s {httpStatus = a} :: PublishBatchResponse)++instance Prelude.NFData PublishBatchResponse where+  rnf PublishBatchResponse' {..} =+    Prelude.rnf failed+      `Prelude.seq` Prelude.rnf successful+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/PutDataProtectionPolicy.hs view
@@ -0,0 +1,175 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SNS.PutDataProtectionPolicy+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Adds or updates an inline policy document that is stored in the+-- specified Amazon SNS topic.+module Amazonka.SNS.PutDataProtectionPolicy+  ( -- * Creating a Request+    PutDataProtectionPolicy (..),+    newPutDataProtectionPolicy,++    -- * Request Lenses+    putDataProtectionPolicy_resourceArn,+    putDataProtectionPolicy_dataProtectionPolicy,++    -- * Destructuring the Response+    PutDataProtectionPolicyResponse (..),+    newPutDataProtectionPolicyResponse,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newPutDataProtectionPolicy' smart constructor.+data PutDataProtectionPolicy = PutDataProtectionPolicy'+  { -- | The ARN of the topic whose @DataProtectionPolicy@ you want to add or+    -- update.+    --+    -- For more information about ARNs, see+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+    -- in the Amazon Web Services General Reference.+    resourceArn :: Prelude.Text,+    -- | The JSON serialization of the topic\'s @DataProtectionPolicy@.+    --+    -- The @DataProtectionPolicy@ must be in JSON string format.+    --+    -- Length Constraints: Maximum length of 30,720.+    dataProtectionPolicy :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutDataProtectionPolicy' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'putDataProtectionPolicy_resourceArn' - The ARN of the topic whose @DataProtectionPolicy@ you want to add or+-- update.+--+-- For more information about ARNs, see+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- in the Amazon Web Services General Reference.+--+-- 'dataProtectionPolicy', 'putDataProtectionPolicy_dataProtectionPolicy' - The JSON serialization of the topic\'s @DataProtectionPolicy@.+--+-- The @DataProtectionPolicy@ must be in JSON string format.+--+-- Length Constraints: Maximum length of 30,720.+newPutDataProtectionPolicy ::+  -- | 'resourceArn'+  Prelude.Text ->+  -- | 'dataProtectionPolicy'+  Prelude.Text ->+  PutDataProtectionPolicy+newPutDataProtectionPolicy+  pResourceArn_+  pDataProtectionPolicy_ =+    PutDataProtectionPolicy'+      { resourceArn =+          pResourceArn_,+        dataProtectionPolicy = pDataProtectionPolicy_+      }++-- | The ARN of the topic whose @DataProtectionPolicy@ you want to add or+-- update.+--+-- For more information about ARNs, see+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- in the Amazon Web Services General Reference.+putDataProtectionPolicy_resourceArn :: Lens.Lens' PutDataProtectionPolicy Prelude.Text+putDataProtectionPolicy_resourceArn = Lens.lens (\PutDataProtectionPolicy' {resourceArn} -> resourceArn) (\s@PutDataProtectionPolicy' {} a -> s {resourceArn = a} :: PutDataProtectionPolicy)++-- | The JSON serialization of the topic\'s @DataProtectionPolicy@.+--+-- The @DataProtectionPolicy@ must be in JSON string format.+--+-- Length Constraints: Maximum length of 30,720.+putDataProtectionPolicy_dataProtectionPolicy :: Lens.Lens' PutDataProtectionPolicy Prelude.Text+putDataProtectionPolicy_dataProtectionPolicy = Lens.lens (\PutDataProtectionPolicy' {dataProtectionPolicy} -> dataProtectionPolicy) (\s@PutDataProtectionPolicy' {} a -> s {dataProtectionPolicy = a} :: PutDataProtectionPolicy)++instance Core.AWSRequest PutDataProtectionPolicy where+  type+    AWSResponse PutDataProtectionPolicy =+      PutDataProtectionPolicyResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveNull+      PutDataProtectionPolicyResponse'++instance Prelude.Hashable PutDataProtectionPolicy where+  hashWithSalt _salt PutDataProtectionPolicy' {..} =+    _salt+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` dataProtectionPolicy++instance Prelude.NFData PutDataProtectionPolicy where+  rnf PutDataProtectionPolicy' {..} =+    Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf dataProtectionPolicy++instance Data.ToHeaders PutDataProtectionPolicy where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath PutDataProtectionPolicy where+  toPath = Prelude.const "/"++instance Data.ToQuery PutDataProtectionPolicy where+  toQuery PutDataProtectionPolicy' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("PutDataProtectionPolicy" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "ResourceArn" Data.=: resourceArn,+        "DataProtectionPolicy" Data.=: dataProtectionPolicy+      ]++-- | /See:/ 'newPutDataProtectionPolicyResponse' smart constructor.+data PutDataProtectionPolicyResponse = PutDataProtectionPolicyResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutDataProtectionPolicyResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newPutDataProtectionPolicyResponse ::+  PutDataProtectionPolicyResponse+newPutDataProtectionPolicyResponse =+  PutDataProtectionPolicyResponse'++instance+  Prelude.NFData+    PutDataProtectionPolicyResponse+  where+  rnf _ = ()
+ gen/Amazonka/SNS/RemovePermission.hs view
@@ -0,0 +1,146 @@+{-# 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.SNS.RemovePermission+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes a statement from a topic\'s access control policy.+--+-- To remove the ability to change topic permissions, you must deny+-- permissions to the @AddPermission@, @RemovePermission@, and+-- @SetTopicAttributes@ actions in your IAM policy.+module Amazonka.SNS.RemovePermission+  ( -- * Creating a Request+    RemovePermission (..),+    newRemovePermission,++    -- * Request Lenses+    removePermission_topicArn,+    removePermission_label,++    -- * Destructuring the Response+    RemovePermissionResponse (..),+    newRemovePermissionResponse,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for RemovePermission action.+--+-- /See:/ 'newRemovePermission' smart constructor.+data RemovePermission = RemovePermission'+  { -- | The ARN of the topic whose access control policy you wish to modify.+    topicArn :: Prelude.Text,+    -- | The unique label of the statement you want to remove.+    label :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RemovePermission' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'removePermission_topicArn' - The ARN of the topic whose access control policy you wish to modify.+--+-- 'label', 'removePermission_label' - The unique label of the statement you want to remove.+newRemovePermission ::+  -- | 'topicArn'+  Prelude.Text ->+  -- | 'label'+  Prelude.Text ->+  RemovePermission+newRemovePermission pTopicArn_ pLabel_ =+  RemovePermission'+    { topicArn = pTopicArn_,+      label = pLabel_+    }++-- | The ARN of the topic whose access control policy you wish to modify.+removePermission_topicArn :: Lens.Lens' RemovePermission Prelude.Text+removePermission_topicArn = Lens.lens (\RemovePermission' {topicArn} -> topicArn) (\s@RemovePermission' {} a -> s {topicArn = a} :: RemovePermission)++-- | The unique label of the statement you want to remove.+removePermission_label :: Lens.Lens' RemovePermission Prelude.Text+removePermission_label = Lens.lens (\RemovePermission' {label} -> label) (\s@RemovePermission' {} a -> s {label = a} :: RemovePermission)++instance Core.AWSRequest RemovePermission where+  type+    AWSResponse RemovePermission =+      RemovePermissionResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveNull RemovePermissionResponse'++instance Prelude.Hashable RemovePermission where+  hashWithSalt _salt RemovePermission' {..} =+    _salt+      `Prelude.hashWithSalt` topicArn+      `Prelude.hashWithSalt` label++instance Prelude.NFData RemovePermission where+  rnf RemovePermission' {..} =+    Prelude.rnf topicArn+      `Prelude.seq` Prelude.rnf label++instance Data.ToHeaders RemovePermission where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath RemovePermission where+  toPath = Prelude.const "/"++instance Data.ToQuery RemovePermission where+  toQuery RemovePermission' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("RemovePermission" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "TopicArn" Data.=: topicArn,+        "Label" Data.=: label+      ]++-- | /See:/ 'newRemovePermissionResponse' smart constructor.+data RemovePermissionResponse = RemovePermissionResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RemovePermissionResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newRemovePermissionResponse ::+  RemovePermissionResponse+newRemovePermissionResponse =+  RemovePermissionResponse'++instance Prelude.NFData RemovePermissionResponse where+  rnf _ = ()
+ gen/Amazonka/SNS/SetEndpointAttributes.hs view
@@ -0,0 +1,189 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SNS.SetEndpointAttributes+-- 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 attributes for an endpoint for a device on one of the supported+-- push notification services, such as GCM (Firebase Cloud Messaging) and+-- APNS. For more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+module Amazonka.SNS.SetEndpointAttributes+  ( -- * Creating a Request+    SetEndpointAttributes (..),+    newSetEndpointAttributes,++    -- * Request Lenses+    setEndpointAttributes_endpointArn,+    setEndpointAttributes_attributes,++    -- * Destructuring the Response+    SetEndpointAttributesResponse (..),+    newSetEndpointAttributesResponse,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for SetEndpointAttributes action.+--+-- /See:/ 'newSetEndpointAttributes' smart constructor.+data SetEndpointAttributes = SetEndpointAttributes'+  { -- | EndpointArn used for SetEndpointAttributes action.+    endpointArn :: Prelude.Text,+    -- | A map of the endpoint attributes. Attributes in this map include the+    -- following:+    --+    -- -   @CustomUserData@ – arbitrary user data to associate with the+    --     endpoint. Amazon SNS does not use this data. The data must be in+    --     UTF-8 format and less than 2KB.+    --+    -- -   @Enabled@ – flag that enables\/disables delivery to the endpoint.+    --     Amazon SNS will set this to false when a notification service+    --     indicates to Amazon SNS that the endpoint is invalid. Users can set+    --     it back to true, typically after updating Token.+    --+    -- -   @Token@ – device token, also referred to as a registration id, for+    --     an app and mobile device. This is returned from the notification+    --     service when an app and mobile device are registered with the+    --     notification service.+    attributes :: Prelude.HashMap Prelude.Text Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetEndpointAttributes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'endpointArn', 'setEndpointAttributes_endpointArn' - EndpointArn used for SetEndpointAttributes action.+--+-- 'attributes', 'setEndpointAttributes_attributes' - A map of the endpoint attributes. Attributes in this map include the+-- following:+--+-- -   @CustomUserData@ – arbitrary user data to associate with the+--     endpoint. Amazon SNS does not use this data. The data must be in+--     UTF-8 format and less than 2KB.+--+-- -   @Enabled@ – flag that enables\/disables delivery to the endpoint.+--     Amazon SNS will set this to false when a notification service+--     indicates to Amazon SNS that the endpoint is invalid. Users can set+--     it back to true, typically after updating Token.+--+-- -   @Token@ – device token, also referred to as a registration id, for+--     an app and mobile device. This is returned from the notification+--     service when an app and mobile device are registered with the+--     notification service.+newSetEndpointAttributes ::+  -- | 'endpointArn'+  Prelude.Text ->+  SetEndpointAttributes+newSetEndpointAttributes pEndpointArn_ =+  SetEndpointAttributes'+    { endpointArn = pEndpointArn_,+      attributes = Prelude.mempty+    }++-- | EndpointArn used for SetEndpointAttributes action.+setEndpointAttributes_endpointArn :: Lens.Lens' SetEndpointAttributes Prelude.Text+setEndpointAttributes_endpointArn = Lens.lens (\SetEndpointAttributes' {endpointArn} -> endpointArn) (\s@SetEndpointAttributes' {} a -> s {endpointArn = a} :: SetEndpointAttributes)++-- | A map of the endpoint attributes. Attributes in this map include the+-- following:+--+-- -   @CustomUserData@ – arbitrary user data to associate with the+--     endpoint. Amazon SNS does not use this data. The data must be in+--     UTF-8 format and less than 2KB.+--+-- -   @Enabled@ – flag that enables\/disables delivery to the endpoint.+--     Amazon SNS will set this to false when a notification service+--     indicates to Amazon SNS that the endpoint is invalid. Users can set+--     it back to true, typically after updating Token.+--+-- -   @Token@ – device token, also referred to as a registration id, for+--     an app and mobile device. This is returned from the notification+--     service when an app and mobile device are registered with the+--     notification service.+setEndpointAttributes_attributes :: Lens.Lens' SetEndpointAttributes (Prelude.HashMap Prelude.Text Prelude.Text)+setEndpointAttributes_attributes = Lens.lens (\SetEndpointAttributes' {attributes} -> attributes) (\s@SetEndpointAttributes' {} a -> s {attributes = a} :: SetEndpointAttributes) Prelude.. Lens.coerced++instance Core.AWSRequest SetEndpointAttributes where+  type+    AWSResponse SetEndpointAttributes =+      SetEndpointAttributesResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveNull SetEndpointAttributesResponse'++instance Prelude.Hashable SetEndpointAttributes where+  hashWithSalt _salt SetEndpointAttributes' {..} =+    _salt+      `Prelude.hashWithSalt` endpointArn+      `Prelude.hashWithSalt` attributes++instance Prelude.NFData SetEndpointAttributes where+  rnf SetEndpointAttributes' {..} =+    Prelude.rnf endpointArn+      `Prelude.seq` Prelude.rnf attributes++instance Data.ToHeaders SetEndpointAttributes where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath SetEndpointAttributes where+  toPath = Prelude.const "/"++instance Data.ToQuery SetEndpointAttributes where+  toQuery SetEndpointAttributes' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("SetEndpointAttributes" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "EndpointArn" Data.=: endpointArn,+        "Attributes"+          Data.=: Data.toQueryMap "entry" "key" "value" attributes+      ]++-- | /See:/ 'newSetEndpointAttributesResponse' smart constructor.+data SetEndpointAttributesResponse = SetEndpointAttributesResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetEndpointAttributesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newSetEndpointAttributesResponse ::+  SetEndpointAttributesResponse+newSetEndpointAttributesResponse =+  SetEndpointAttributesResponse'++instance Prelude.NFData SetEndpointAttributesResponse where+  rnf _ = ()
+ gen/Amazonka/SNS/SetPlatformApplicationAttributes.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.SNS.SetPlatformApplicationAttributes+-- 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 attributes of the platform application object for the supported+-- push notification services, such as APNS and GCM (Firebase Cloud+-- Messaging). For more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+-- For information on configuring attributes for message delivery status,+-- see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html Using Amazon SNS Application Attributes for Message Delivery Status>.+module Amazonka.SNS.SetPlatformApplicationAttributes+  ( -- * Creating a Request+    SetPlatformApplicationAttributes (..),+    newSetPlatformApplicationAttributes,++    -- * Request Lenses+    setPlatformApplicationAttributes_platformApplicationArn,+    setPlatformApplicationAttributes_attributes,++    -- * Destructuring the Response+    SetPlatformApplicationAttributesResponse (..),+    newSetPlatformApplicationAttributesResponse,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for SetPlatformApplicationAttributes action.+--+-- /See:/ 'newSetPlatformApplicationAttributes' smart constructor.+data SetPlatformApplicationAttributes = SetPlatformApplicationAttributes'+  { -- | PlatformApplicationArn for SetPlatformApplicationAttributes action.+    platformApplicationArn :: Prelude.Text,+    -- | A map of the platform application attributes. Attributes in this map+    -- include the following:+    --+    -- -   @PlatformCredential@ – The credential received from the notification+    --     service.+    --+    --     -   For ADM, @PlatformCredential@is client secret.+    --+    --     -   For Apple Services using certificate credentials,+    --         @PlatformCredential@ is private key.+    --+    --     -   For Apple Services using token credentials, @PlatformCredential@+    --         is signing key.+    --+    --     -   For GCM (Firebase Cloud Messaging), @PlatformCredential@ is API+    --         key.+    --+    -- -   @PlatformPrincipal@ – The principal received from the notification+    --     service.+    --+    --     -   For ADM, @PlatformPrincipal@is client id.+    --+    --     -   For Apple Services using certificate credentials,+    --         @PlatformPrincipal@ is SSL certificate.+    --+    --     -   For Apple Services using token credentials, @PlatformPrincipal@+    --         is signing key ID.+    --+    --     -   For GCM (Firebase Cloud Messaging), there is no+    --         @PlatformPrincipal@.+    --+    -- -   @EventEndpointCreated@ – Topic ARN to which @EndpointCreated@ event+    --     notifications are sent.+    --+    -- -   @EventEndpointDeleted@ – Topic ARN to which @EndpointDeleted@ event+    --     notifications are sent.+    --+    -- -   @EventEndpointUpdated@ – Topic ARN to which @EndpointUpdate@ event+    --     notifications are sent.+    --+    -- -   @EventDeliveryFailure@ – Topic ARN to which @DeliveryFailure@ event+    --     notifications are sent upon Direct Publish delivery failure+    --     (permanent) to one of the application\'s endpoints.+    --+    -- -   @SuccessFeedbackRoleArn@ – IAM role ARN used to give Amazon SNS+    --     write access to use CloudWatch Logs on your behalf.+    --+    -- -   @FailureFeedbackRoleArn@ – IAM role ARN used to give Amazon SNS+    --     write access to use CloudWatch Logs on your behalf.+    --+    -- -   @SuccessFeedbackSampleRate@ – Sample rate percentage (0-100) of+    --     successfully delivered messages.+    --+    -- The following attributes only apply to @APNs@ token-based+    -- authentication:+    --+    -- -   @ApplePlatformTeamID@ – The identifier that\'s assigned to your+    --     Apple developer account team.+    --+    -- -   @ApplePlatformBundleID@ – The bundle identifier that\'s assigned to+    --     your iOS app.+    attributes :: Prelude.HashMap Prelude.Text Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetPlatformApplicationAttributes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'platformApplicationArn', 'setPlatformApplicationAttributes_platformApplicationArn' - PlatformApplicationArn for SetPlatformApplicationAttributes action.+--+-- 'attributes', 'setPlatformApplicationAttributes_attributes' - A map of the platform application attributes. Attributes in this map+-- include the following:+--+-- -   @PlatformCredential@ – The credential received from the notification+--     service.+--+--     -   For ADM, @PlatformCredential@is client secret.+--+--     -   For Apple Services using certificate credentials,+--         @PlatformCredential@ is private key.+--+--     -   For Apple Services using token credentials, @PlatformCredential@+--         is signing key.+--+--     -   For GCM (Firebase Cloud Messaging), @PlatformCredential@ is API+--         key.+--+-- -   @PlatformPrincipal@ – The principal received from the notification+--     service.+--+--     -   For ADM, @PlatformPrincipal@is client id.+--+--     -   For Apple Services using certificate credentials,+--         @PlatformPrincipal@ is SSL certificate.+--+--     -   For Apple Services using token credentials, @PlatformPrincipal@+--         is signing key ID.+--+--     -   For GCM (Firebase Cloud Messaging), there is no+--         @PlatformPrincipal@.+--+-- -   @EventEndpointCreated@ – Topic ARN to which @EndpointCreated@ event+--     notifications are sent.+--+-- -   @EventEndpointDeleted@ – Topic ARN to which @EndpointDeleted@ event+--     notifications are sent.+--+-- -   @EventEndpointUpdated@ – Topic ARN to which @EndpointUpdate@ event+--     notifications are sent.+--+-- -   @EventDeliveryFailure@ – Topic ARN to which @DeliveryFailure@ event+--     notifications are sent upon Direct Publish delivery failure+--     (permanent) to one of the application\'s endpoints.+--+-- -   @SuccessFeedbackRoleArn@ – IAM role ARN used to give Amazon SNS+--     write access to use CloudWatch Logs on your behalf.+--+-- -   @FailureFeedbackRoleArn@ – IAM role ARN used to give Amazon SNS+--     write access to use CloudWatch Logs on your behalf.+--+-- -   @SuccessFeedbackSampleRate@ – Sample rate percentage (0-100) of+--     successfully delivered messages.+--+-- The following attributes only apply to @APNs@ token-based+-- authentication:+--+-- -   @ApplePlatformTeamID@ – The identifier that\'s assigned to your+--     Apple developer account team.+--+-- -   @ApplePlatformBundleID@ – The bundle identifier that\'s assigned to+--     your iOS app.+newSetPlatformApplicationAttributes ::+  -- | 'platformApplicationArn'+  Prelude.Text ->+  SetPlatformApplicationAttributes+newSetPlatformApplicationAttributes+  pPlatformApplicationArn_ =+    SetPlatformApplicationAttributes'+      { platformApplicationArn =+          pPlatformApplicationArn_,+        attributes = Prelude.mempty+      }++-- | PlatformApplicationArn for SetPlatformApplicationAttributes action.+setPlatformApplicationAttributes_platformApplicationArn :: Lens.Lens' SetPlatformApplicationAttributes Prelude.Text+setPlatformApplicationAttributes_platformApplicationArn = Lens.lens (\SetPlatformApplicationAttributes' {platformApplicationArn} -> platformApplicationArn) (\s@SetPlatformApplicationAttributes' {} a -> s {platformApplicationArn = a} :: SetPlatformApplicationAttributes)++-- | A map of the platform application attributes. Attributes in this map+-- include the following:+--+-- -   @PlatformCredential@ – The credential received from the notification+--     service.+--+--     -   For ADM, @PlatformCredential@is client secret.+--+--     -   For Apple Services using certificate credentials,+--         @PlatformCredential@ is private key.+--+--     -   For Apple Services using token credentials, @PlatformCredential@+--         is signing key.+--+--     -   For GCM (Firebase Cloud Messaging), @PlatformCredential@ is API+--         key.+--+-- -   @PlatformPrincipal@ – The principal received from the notification+--     service.+--+--     -   For ADM, @PlatformPrincipal@is client id.+--+--     -   For Apple Services using certificate credentials,+--         @PlatformPrincipal@ is SSL certificate.+--+--     -   For Apple Services using token credentials, @PlatformPrincipal@+--         is signing key ID.+--+--     -   For GCM (Firebase Cloud Messaging), there is no+--         @PlatformPrincipal@.+--+-- -   @EventEndpointCreated@ – Topic ARN to which @EndpointCreated@ event+--     notifications are sent.+--+-- -   @EventEndpointDeleted@ – Topic ARN to which @EndpointDeleted@ event+--     notifications are sent.+--+-- -   @EventEndpointUpdated@ – Topic ARN to which @EndpointUpdate@ event+--     notifications are sent.+--+-- -   @EventDeliveryFailure@ – Topic ARN to which @DeliveryFailure@ event+--     notifications are sent upon Direct Publish delivery failure+--     (permanent) to one of the application\'s endpoints.+--+-- -   @SuccessFeedbackRoleArn@ – IAM role ARN used to give Amazon SNS+--     write access to use CloudWatch Logs on your behalf.+--+-- -   @FailureFeedbackRoleArn@ – IAM role ARN used to give Amazon SNS+--     write access to use CloudWatch Logs on your behalf.+--+-- -   @SuccessFeedbackSampleRate@ – Sample rate percentage (0-100) of+--     successfully delivered messages.+--+-- The following attributes only apply to @APNs@ token-based+-- authentication:+--+-- -   @ApplePlatformTeamID@ – The identifier that\'s assigned to your+--     Apple developer account team.+--+-- -   @ApplePlatformBundleID@ – The bundle identifier that\'s assigned to+--     your iOS app.+setPlatformApplicationAttributes_attributes :: Lens.Lens' SetPlatformApplicationAttributes (Prelude.HashMap Prelude.Text Prelude.Text)+setPlatformApplicationAttributes_attributes = Lens.lens (\SetPlatformApplicationAttributes' {attributes} -> attributes) (\s@SetPlatformApplicationAttributes' {} a -> s {attributes = a} :: SetPlatformApplicationAttributes) Prelude.. Lens.coerced++instance+  Core.AWSRequest+    SetPlatformApplicationAttributes+  where+  type+    AWSResponse SetPlatformApplicationAttributes =+      SetPlatformApplicationAttributesResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveNull+      SetPlatformApplicationAttributesResponse'++instance+  Prelude.Hashable+    SetPlatformApplicationAttributes+  where+  hashWithSalt+    _salt+    SetPlatformApplicationAttributes' {..} =+      _salt+        `Prelude.hashWithSalt` platformApplicationArn+        `Prelude.hashWithSalt` attributes++instance+  Prelude.NFData+    SetPlatformApplicationAttributes+  where+  rnf SetPlatformApplicationAttributes' {..} =+    Prelude.rnf platformApplicationArn+      `Prelude.seq` Prelude.rnf attributes++instance+  Data.ToHeaders+    SetPlatformApplicationAttributes+  where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath SetPlatformApplicationAttributes where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    SetPlatformApplicationAttributes+  where+  toQuery SetPlatformApplicationAttributes' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ( "SetPlatformApplicationAttributes" ::+                      Prelude.ByteString+                  ),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "PlatformApplicationArn"+          Data.=: platformApplicationArn,+        "Attributes"+          Data.=: Data.toQueryMap "entry" "key" "value" attributes+      ]++-- | /See:/ 'newSetPlatformApplicationAttributesResponse' smart constructor.+data SetPlatformApplicationAttributesResponse = SetPlatformApplicationAttributesResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetPlatformApplicationAttributesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newSetPlatformApplicationAttributesResponse ::+  SetPlatformApplicationAttributesResponse+newSetPlatformApplicationAttributesResponse =+  SetPlatformApplicationAttributesResponse'++instance+  Prelude.NFData+    SetPlatformApplicationAttributesResponse+  where+  rnf _ = ()
+ gen/Amazonka/SNS/SetSMSAttributes.hs view
@@ -0,0 +1,389 @@+{-# 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.SNS.SetSMSAttributes+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Use this request to set the default settings for sending SMS messages+-- and receiving daily SMS usage reports.+--+-- You can override some of these settings for a single message when you+-- use the @Publish@ action with the @MessageAttributes.entry.N@ parameter.+-- For more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html Publishing to a mobile phone>+-- in the /Amazon SNS Developer Guide/.+--+-- To use this operation, you must grant the Amazon SNS service principal+-- (@sns.amazonaws.com@) permission to perform the @s3:ListBucket@ action.+module Amazonka.SNS.SetSMSAttributes+  ( -- * Creating a Request+    SetSMSAttributes (..),+    newSetSMSAttributes,++    -- * Request Lenses+    setSMSAttributes_attributes,++    -- * Destructuring the Response+    SetSMSAttributesResponse (..),+    newSetSMSAttributesResponse,++    -- * Response Lenses+    setSMSAttributesResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | The input for the SetSMSAttributes action.+--+-- /See:/ 'newSetSMSAttributes' smart constructor.+data SetSMSAttributes = SetSMSAttributes'+  { -- | The default settings for sending SMS messages from your Amazon Web+    -- Services account. You can set values for the following attribute names:+    --+    -- @MonthlySpendLimit@ – The maximum amount in USD that you are willing to+    -- spend each month to send SMS messages. When Amazon SNS determines that+    -- sending an SMS message would incur a cost that exceeds this limit, it+    -- stops sending SMS messages within minutes.+    --+    -- Amazon SNS stops sending SMS messages within minutes of the limit being+    -- crossed. During that interval, if you continue to send SMS messages, you+    -- will incur costs that exceed your limit.+    --+    -- By default, the spend limit is set to the maximum allowed by Amazon SNS.+    -- If you want to raise the limit, submit an+    -- <https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-sns SNS Limit Increase case>.+    -- For __New limit value__, enter your desired monthly spend limit. In the+    -- __Use Case Description__ field, explain that you are requesting an SMS+    -- monthly spend limit increase.+    --+    -- @DeliveryStatusIAMRole@ – The ARN of the IAM role that allows Amazon SNS+    -- to write logs about SMS deliveries in CloudWatch Logs. For each SMS+    -- message that you send, Amazon SNS writes a log that includes the message+    -- price, the success or failure status, the reason for failure (if the+    -- message failed), the message dwell time, and other information.+    --+    -- @DeliveryStatusSuccessSamplingRate@ – The percentage of successful SMS+    -- deliveries for which Amazon SNS will write logs in CloudWatch Logs. The+    -- value can be an integer from 0 - 100. For example, to write logs only+    -- for failed deliveries, set this value to @0@. To write logs for 10% of+    -- your successful deliveries, set it to @10@.+    --+    -- @DefaultSenderID@ – A string, such as your business brand, that is+    -- displayed as the sender on the receiving device. Support for sender IDs+    -- varies by country. The sender ID can be 1 - 11 alphanumeric characters,+    -- and it must contain at least one letter.+    --+    -- @DefaultSMSType@ – The type of SMS message that you will send by+    -- default. You can assign the following values:+    --+    -- -   @Promotional@ – (Default) Noncritical messages, such as marketing+    --     messages. Amazon SNS optimizes the message delivery to incur the+    --     lowest cost.+    --+    -- -   @Transactional@ – Critical messages that support customer+    --     transactions, such as one-time passcodes for multi-factor+    --     authentication. Amazon SNS optimizes the message delivery to achieve+    --     the highest reliability.+    --+    -- @UsageReportS3Bucket@ – The name of the Amazon S3 bucket to receive+    -- daily SMS usage reports from Amazon SNS. Each day, Amazon SNS will+    -- deliver a usage report as a CSV file to the bucket. The report includes+    -- the following information for each SMS message that was successfully+    -- delivered by your Amazon Web Services account:+    --+    -- -   Time that the message was published (in UTC)+    --+    -- -   Message ID+    --+    -- -   Destination phone number+    --+    -- -   Message type+    --+    -- -   Delivery status+    --+    -- -   Message price (in USD)+    --+    -- -   Part number (a message is split into multiple parts if it is too+    --     long for a single message)+    --+    -- -   Total number of parts+    --+    -- To receive the report, the bucket must have a policy that allows the+    -- Amazon SNS service principal to perform the @s3:PutObject@ and+    -- @s3:GetBucketLocation@ actions.+    --+    -- For an example bucket policy and usage report, see+    -- <https://docs.aws.amazon.com/sns/latest/dg/sms_stats.html Monitoring SMS Activity>+    -- in the /Amazon SNS Developer Guide/.+    attributes :: Prelude.HashMap Prelude.Text Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetSMSAttributes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'setSMSAttributes_attributes' - The default settings for sending SMS messages from your Amazon Web+-- Services account. You can set values for the following attribute names:+--+-- @MonthlySpendLimit@ – The maximum amount in USD that you are willing to+-- spend each month to send SMS messages. When Amazon SNS determines that+-- sending an SMS message would incur a cost that exceeds this limit, it+-- stops sending SMS messages within minutes.+--+-- Amazon SNS stops sending SMS messages within minutes of the limit being+-- crossed. During that interval, if you continue to send SMS messages, you+-- will incur costs that exceed your limit.+--+-- By default, the spend limit is set to the maximum allowed by Amazon SNS.+-- If you want to raise the limit, submit an+-- <https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-sns SNS Limit Increase case>.+-- For __New limit value__, enter your desired monthly spend limit. In the+-- __Use Case Description__ field, explain that you are requesting an SMS+-- monthly spend limit increase.+--+-- @DeliveryStatusIAMRole@ – The ARN of the IAM role that allows Amazon SNS+-- to write logs about SMS deliveries in CloudWatch Logs. For each SMS+-- message that you send, Amazon SNS writes a log that includes the message+-- price, the success or failure status, the reason for failure (if the+-- message failed), the message dwell time, and other information.+--+-- @DeliveryStatusSuccessSamplingRate@ – The percentage of successful SMS+-- deliveries for which Amazon SNS will write logs in CloudWatch Logs. The+-- value can be an integer from 0 - 100. For example, to write logs only+-- for failed deliveries, set this value to @0@. To write logs for 10% of+-- your successful deliveries, set it to @10@.+--+-- @DefaultSenderID@ – A string, such as your business brand, that is+-- displayed as the sender on the receiving device. Support for sender IDs+-- varies by country. The sender ID can be 1 - 11 alphanumeric characters,+-- and it must contain at least one letter.+--+-- @DefaultSMSType@ – The type of SMS message that you will send by+-- default. You can assign the following values:+--+-- -   @Promotional@ – (Default) Noncritical messages, such as marketing+--     messages. Amazon SNS optimizes the message delivery to incur the+--     lowest cost.+--+-- -   @Transactional@ – Critical messages that support customer+--     transactions, such as one-time passcodes for multi-factor+--     authentication. Amazon SNS optimizes the message delivery to achieve+--     the highest reliability.+--+-- @UsageReportS3Bucket@ – The name of the Amazon S3 bucket to receive+-- daily SMS usage reports from Amazon SNS. Each day, Amazon SNS will+-- deliver a usage report as a CSV file to the bucket. The report includes+-- the following information for each SMS message that was successfully+-- delivered by your Amazon Web Services account:+--+-- -   Time that the message was published (in UTC)+--+-- -   Message ID+--+-- -   Destination phone number+--+-- -   Message type+--+-- -   Delivery status+--+-- -   Message price (in USD)+--+-- -   Part number (a message is split into multiple parts if it is too+--     long for a single message)+--+-- -   Total number of parts+--+-- To receive the report, the bucket must have a policy that allows the+-- Amazon SNS service principal to perform the @s3:PutObject@ and+-- @s3:GetBucketLocation@ actions.+--+-- For an example bucket policy and usage report, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sms_stats.html Monitoring SMS Activity>+-- in the /Amazon SNS Developer Guide/.+newSetSMSAttributes ::+  SetSMSAttributes+newSetSMSAttributes =+  SetSMSAttributes' {attributes = Prelude.mempty}++-- | The default settings for sending SMS messages from your Amazon Web+-- Services account. You can set values for the following attribute names:+--+-- @MonthlySpendLimit@ – The maximum amount in USD that you are willing to+-- spend each month to send SMS messages. When Amazon SNS determines that+-- sending an SMS message would incur a cost that exceeds this limit, it+-- stops sending SMS messages within minutes.+--+-- Amazon SNS stops sending SMS messages within minutes of the limit being+-- crossed. During that interval, if you continue to send SMS messages, you+-- will incur costs that exceed your limit.+--+-- By default, the spend limit is set to the maximum allowed by Amazon SNS.+-- If you want to raise the limit, submit an+-- <https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-sns SNS Limit Increase case>.+-- For __New limit value__, enter your desired monthly spend limit. In the+-- __Use Case Description__ field, explain that you are requesting an SMS+-- monthly spend limit increase.+--+-- @DeliveryStatusIAMRole@ – The ARN of the IAM role that allows Amazon SNS+-- to write logs about SMS deliveries in CloudWatch Logs. For each SMS+-- message that you send, Amazon SNS writes a log that includes the message+-- price, the success or failure status, the reason for failure (if the+-- message failed), the message dwell time, and other information.+--+-- @DeliveryStatusSuccessSamplingRate@ – The percentage of successful SMS+-- deliveries for which Amazon SNS will write logs in CloudWatch Logs. The+-- value can be an integer from 0 - 100. For example, to write logs only+-- for failed deliveries, set this value to @0@. To write logs for 10% of+-- your successful deliveries, set it to @10@.+--+-- @DefaultSenderID@ – A string, such as your business brand, that is+-- displayed as the sender on the receiving device. Support for sender IDs+-- varies by country. The sender ID can be 1 - 11 alphanumeric characters,+-- and it must contain at least one letter.+--+-- @DefaultSMSType@ – The type of SMS message that you will send by+-- default. You can assign the following values:+--+-- -   @Promotional@ – (Default) Noncritical messages, such as marketing+--     messages. Amazon SNS optimizes the message delivery to incur the+--     lowest cost.+--+-- -   @Transactional@ – Critical messages that support customer+--     transactions, such as one-time passcodes for multi-factor+--     authentication. Amazon SNS optimizes the message delivery to achieve+--     the highest reliability.+--+-- @UsageReportS3Bucket@ – The name of the Amazon S3 bucket to receive+-- daily SMS usage reports from Amazon SNS. Each day, Amazon SNS will+-- deliver a usage report as a CSV file to the bucket. The report includes+-- the following information for each SMS message that was successfully+-- delivered by your Amazon Web Services account:+--+-- -   Time that the message was published (in UTC)+--+-- -   Message ID+--+-- -   Destination phone number+--+-- -   Message type+--+-- -   Delivery status+--+-- -   Message price (in USD)+--+-- -   Part number (a message is split into multiple parts if it is too+--     long for a single message)+--+-- -   Total number of parts+--+-- To receive the report, the bucket must have a policy that allows the+-- Amazon SNS service principal to perform the @s3:PutObject@ and+-- @s3:GetBucketLocation@ actions.+--+-- For an example bucket policy and usage report, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sms_stats.html Monitoring SMS Activity>+-- in the /Amazon SNS Developer Guide/.+setSMSAttributes_attributes :: Lens.Lens' SetSMSAttributes (Prelude.HashMap Prelude.Text Prelude.Text)+setSMSAttributes_attributes = Lens.lens (\SetSMSAttributes' {attributes} -> attributes) (\s@SetSMSAttributes' {} a -> s {attributes = a} :: SetSMSAttributes) Prelude.. Lens.coerced++instance Core.AWSRequest SetSMSAttributes where+  type+    AWSResponse SetSMSAttributes =+      SetSMSAttributesResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "SetSMSAttributesResult"+      ( \s h x ->+          SetSMSAttributesResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable SetSMSAttributes where+  hashWithSalt _salt SetSMSAttributes' {..} =+    _salt `Prelude.hashWithSalt` attributes++instance Prelude.NFData SetSMSAttributes where+  rnf SetSMSAttributes' {..} = Prelude.rnf attributes++instance Data.ToHeaders SetSMSAttributes where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath SetSMSAttributes where+  toPath = Prelude.const "/"++instance Data.ToQuery SetSMSAttributes where+  toQuery SetSMSAttributes' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("SetSMSAttributes" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "attributes"+          Data.=: Data.toQueryMap "entry" "key" "value" attributes+      ]++-- | The response for the SetSMSAttributes action.+--+-- /See:/ 'newSetSMSAttributesResponse' smart constructor.+data SetSMSAttributesResponse = SetSMSAttributesResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetSMSAttributesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'setSMSAttributesResponse_httpStatus' - The response's http status code.+newSetSMSAttributesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  SetSMSAttributesResponse+newSetSMSAttributesResponse pHttpStatus_ =+  SetSMSAttributesResponse'+    { httpStatus =+        pHttpStatus_+    }++-- | The response's http status code.+setSMSAttributesResponse_httpStatus :: Lens.Lens' SetSMSAttributesResponse Prelude.Int+setSMSAttributesResponse_httpStatus = Lens.lens (\SetSMSAttributesResponse' {httpStatus} -> httpStatus) (\s@SetSMSAttributesResponse' {} a -> s {httpStatus = a} :: SetSMSAttributesResponse)++instance Prelude.NFData SetSMSAttributesResponse where+  rnf SetSMSAttributesResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/SNS/SetSubscriptionAttributes.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.SNS.SetSubscriptionAttributes+-- 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 a subscription owner to set an attribute of the subscription to a+-- new value.+module Amazonka.SNS.SetSubscriptionAttributes+  ( -- * Creating a Request+    SetSubscriptionAttributes (..),+    newSetSubscriptionAttributes,++    -- * Request Lenses+    setSubscriptionAttributes_attributeValue,+    setSubscriptionAttributes_subscriptionArn,+    setSubscriptionAttributes_attributeName,++    -- * Destructuring the Response+    SetSubscriptionAttributesResponse (..),+    newSetSubscriptionAttributesResponse,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for SetSubscriptionAttributes action.+--+-- /See:/ 'newSetSubscriptionAttributes' smart constructor.+data SetSubscriptionAttributes = SetSubscriptionAttributes'+  { -- | The new value for the attribute in JSON format.+    attributeValue :: Prelude.Maybe Prelude.Text,+    -- | The ARN of the subscription to modify.+    subscriptionArn :: Prelude.Text,+    -- | A map of attributes with their corresponding values.+    --+    -- The following lists the names, descriptions, and values of the special+    -- request parameters that this action uses:+    --+    -- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+    --     failed deliveries to HTTP\/S endpoints.+    --+    -- -   @FilterPolicy@ – The simple JSON object that lets your subscriber+    --     receive only a subset of messages, rather than receiving every+    --     message published to the topic.+    --+    -- -   @FilterPolicyScope@ – This attribute lets you choose the filtering+    --     scope by using one of the following string value types:+    --+    --     -   @MessageAttributes@ (default) – The filter is applied on the+    --         message attributes.+    --+    --     -   @MessageBody@ – The filter is applied on the message body.+    --+    -- -   @RawMessageDelivery@ – When set to @true@, enables raw message+    --     delivery to Amazon SQS or HTTP\/S endpoints. This eliminates the+    --     need for the endpoints to process JSON formatting, which is+    --     otherwise created for Amazon SNS metadata.+    --+    -- -   @RedrivePolicy@ – When specified, sends undeliverable messages to+    --     the specified Amazon SQS dead-letter queue. Messages that can\'t be+    --     delivered due to client errors (for example, when the subscribed+    --     endpoint is unreachable) or server errors (for example, when the+    --     service that powers the subscribed endpoint becomes unavailable) are+    --     held in the dead-letter queue for further analysis or reprocessing.+    --+    -- The following attribute applies only to Amazon Kinesis Data Firehose+    -- delivery stream subscriptions:+    --+    -- -   @SubscriptionRoleArn@ – The ARN of the IAM role that has the+    --     following:+    --+    --     -   Permission to write to the Kinesis Data Firehose delivery stream+    --+    --     -   Amazon SNS listed as a trusted entity+    --+    --     Specifying a valid ARN for this attribute is required for Kinesis+    --     Data Firehose delivery stream subscriptions. For more information,+    --     see+    --     <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html Fanout to Kinesis Data Firehose delivery streams>+    --     in the /Amazon SNS Developer Guide/.+    attributeName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetSubscriptionAttributes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributeValue', 'setSubscriptionAttributes_attributeValue' - The new value for the attribute in JSON format.+--+-- 'subscriptionArn', 'setSubscriptionAttributes_subscriptionArn' - The ARN of the subscription to modify.+--+-- 'attributeName', 'setSubscriptionAttributes_attributeName' - A map of attributes with their corresponding values.+--+-- The following lists the names, descriptions, and values of the special+-- request parameters that this action uses:+--+-- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+--     failed deliveries to HTTP\/S endpoints.+--+-- -   @FilterPolicy@ – The simple JSON object that lets your subscriber+--     receive only a subset of messages, rather than receiving every+--     message published to the topic.+--+-- -   @FilterPolicyScope@ – This attribute lets you choose the filtering+--     scope by using one of the following string value types:+--+--     -   @MessageAttributes@ (default) – The filter is applied on the+--         message attributes.+--+--     -   @MessageBody@ – The filter is applied on the message body.+--+-- -   @RawMessageDelivery@ – When set to @true@, enables raw message+--     delivery to Amazon SQS or HTTP\/S endpoints. This eliminates the+--     need for the endpoints to process JSON formatting, which is+--     otherwise created for Amazon SNS metadata.+--+-- -   @RedrivePolicy@ – When specified, sends undeliverable messages to+--     the specified Amazon SQS dead-letter queue. Messages that can\'t be+--     delivered due to client errors (for example, when the subscribed+--     endpoint is unreachable) or server errors (for example, when the+--     service that powers the subscribed endpoint becomes unavailable) are+--     held in the dead-letter queue for further analysis or reprocessing.+--+-- The following attribute applies only to Amazon Kinesis Data Firehose+-- delivery stream subscriptions:+--+-- -   @SubscriptionRoleArn@ – The ARN of the IAM role that has the+--     following:+--+--     -   Permission to write to the Kinesis Data Firehose delivery stream+--+--     -   Amazon SNS listed as a trusted entity+--+--     Specifying a valid ARN for this attribute is required for Kinesis+--     Data Firehose delivery stream subscriptions. For more information,+--     see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html Fanout to Kinesis Data Firehose delivery streams>+--     in the /Amazon SNS Developer Guide/.+newSetSubscriptionAttributes ::+  -- | 'subscriptionArn'+  Prelude.Text ->+  -- | 'attributeName'+  Prelude.Text ->+  SetSubscriptionAttributes+newSetSubscriptionAttributes+  pSubscriptionArn_+  pAttributeName_ =+    SetSubscriptionAttributes'+      { attributeValue =+          Prelude.Nothing,+        subscriptionArn = pSubscriptionArn_,+        attributeName = pAttributeName_+      }++-- | The new value for the attribute in JSON format.+setSubscriptionAttributes_attributeValue :: Lens.Lens' SetSubscriptionAttributes (Prelude.Maybe Prelude.Text)+setSubscriptionAttributes_attributeValue = Lens.lens (\SetSubscriptionAttributes' {attributeValue} -> attributeValue) (\s@SetSubscriptionAttributes' {} a -> s {attributeValue = a} :: SetSubscriptionAttributes)++-- | The ARN of the subscription to modify.+setSubscriptionAttributes_subscriptionArn :: Lens.Lens' SetSubscriptionAttributes Prelude.Text+setSubscriptionAttributes_subscriptionArn = Lens.lens (\SetSubscriptionAttributes' {subscriptionArn} -> subscriptionArn) (\s@SetSubscriptionAttributes' {} a -> s {subscriptionArn = a} :: SetSubscriptionAttributes)++-- | A map of attributes with their corresponding values.+--+-- The following lists the names, descriptions, and values of the special+-- request parameters that this action uses:+--+-- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+--     failed deliveries to HTTP\/S endpoints.+--+-- -   @FilterPolicy@ – The simple JSON object that lets your subscriber+--     receive only a subset of messages, rather than receiving every+--     message published to the topic.+--+-- -   @FilterPolicyScope@ – This attribute lets you choose the filtering+--     scope by using one of the following string value types:+--+--     -   @MessageAttributes@ (default) – The filter is applied on the+--         message attributes.+--+--     -   @MessageBody@ – The filter is applied on the message body.+--+-- -   @RawMessageDelivery@ – When set to @true@, enables raw message+--     delivery to Amazon SQS or HTTP\/S endpoints. This eliminates the+--     need for the endpoints to process JSON formatting, which is+--     otherwise created for Amazon SNS metadata.+--+-- -   @RedrivePolicy@ – When specified, sends undeliverable messages to+--     the specified Amazon SQS dead-letter queue. Messages that can\'t be+--     delivered due to client errors (for example, when the subscribed+--     endpoint is unreachable) or server errors (for example, when the+--     service that powers the subscribed endpoint becomes unavailable) are+--     held in the dead-letter queue for further analysis or reprocessing.+--+-- The following attribute applies only to Amazon Kinesis Data Firehose+-- delivery stream subscriptions:+--+-- -   @SubscriptionRoleArn@ – The ARN of the IAM role that has the+--     following:+--+--     -   Permission to write to the Kinesis Data Firehose delivery stream+--+--     -   Amazon SNS listed as a trusted entity+--+--     Specifying a valid ARN for this attribute is required for Kinesis+--     Data Firehose delivery stream subscriptions. For more information,+--     see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html Fanout to Kinesis Data Firehose delivery streams>+--     in the /Amazon SNS Developer Guide/.+setSubscriptionAttributes_attributeName :: Lens.Lens' SetSubscriptionAttributes Prelude.Text+setSubscriptionAttributes_attributeName = Lens.lens (\SetSubscriptionAttributes' {attributeName} -> attributeName) (\s@SetSubscriptionAttributes' {} a -> s {attributeName = a} :: SetSubscriptionAttributes)++instance Core.AWSRequest SetSubscriptionAttributes where+  type+    AWSResponse SetSubscriptionAttributes =+      SetSubscriptionAttributesResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveNull+      SetSubscriptionAttributesResponse'++instance Prelude.Hashable SetSubscriptionAttributes where+  hashWithSalt _salt SetSubscriptionAttributes' {..} =+    _salt+      `Prelude.hashWithSalt` attributeValue+      `Prelude.hashWithSalt` subscriptionArn+      `Prelude.hashWithSalt` attributeName++instance Prelude.NFData SetSubscriptionAttributes where+  rnf SetSubscriptionAttributes' {..} =+    Prelude.rnf attributeValue+      `Prelude.seq` Prelude.rnf subscriptionArn+      `Prelude.seq` Prelude.rnf attributeName++instance Data.ToHeaders SetSubscriptionAttributes where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath SetSubscriptionAttributes where+  toPath = Prelude.const "/"++instance Data.ToQuery SetSubscriptionAttributes where+  toQuery SetSubscriptionAttributes' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("SetSubscriptionAttributes" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "AttributeValue" Data.=: attributeValue,+        "SubscriptionArn" Data.=: subscriptionArn,+        "AttributeName" Data.=: attributeName+      ]++-- | /See:/ 'newSetSubscriptionAttributesResponse' smart constructor.+data SetSubscriptionAttributesResponse = SetSubscriptionAttributesResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetSubscriptionAttributesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newSetSubscriptionAttributesResponse ::+  SetSubscriptionAttributesResponse+newSetSubscriptionAttributesResponse =+  SetSubscriptionAttributesResponse'++instance+  Prelude.NFData+    SetSubscriptionAttributesResponse+  where+  rnf _ = ()
+ gen/Amazonka/SNS/SetTopicAttributes.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.SNS.SetTopicAttributes+-- 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 a topic owner to set an attribute of the topic to a new value.+--+-- To remove the ability to change topic permissions, you must deny+-- permissions to the @AddPermission@, @RemovePermission@, and+-- @SetTopicAttributes@ actions in your IAM policy.+module Amazonka.SNS.SetTopicAttributes+  ( -- * Creating a Request+    SetTopicAttributes (..),+    newSetTopicAttributes,++    -- * Request Lenses+    setTopicAttributes_attributeValue,+    setTopicAttributes_topicArn,+    setTopicAttributes_attributeName,++    -- * Destructuring the Response+    SetTopicAttributesResponse (..),+    newSetTopicAttributesResponse,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for SetTopicAttributes action.+--+-- /See:/ 'newSetTopicAttributes' smart constructor.+data SetTopicAttributes = SetTopicAttributes'+  { -- | The new value for the attribute.+    attributeValue :: Prelude.Maybe Prelude.Text,+    -- | The ARN of the topic to modify.+    topicArn :: Prelude.Text,+    -- | A map of attributes with their corresponding values.+    --+    -- The following lists the names, descriptions, and values of the special+    -- request parameters that the @SetTopicAttributes@ action uses:+    --+    -- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+    --     failed deliveries to HTTP\/S endpoints.+    --+    -- -   @DisplayName@ – The display name to use for a topic with SMS+    --     subscriptions.+    --+    -- -   @Policy@ – The policy that defines who can access your topic. By+    --     default, only the topic owner can publish or subscribe to the topic.+    --+    -- -   @TracingConfig@ – Tracing mode of an Amazon SNS topic. By default+    --     @TracingConfig@ is set to @PassThrough@, and the topic passes+    --     through the tracing header it receives from an Amazon SNS publisher+    --     to its subscriptions. If set to Active, Amazon SNS will vend X-Ray+    --     segment data to topic owner account if the sampled flag in the+    --     tracing header is true. This is only supported on standard topics.+    --+    -- The following attribute applies only to+    -- <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html server-side-encryption>:+    --+    -- -   @KmsMasterKeyId@ – The ID of an Amazon Web Services managed customer+    --     master key (CMK) for Amazon SNS or a custom CMK. For more+    --     information, see+    --     <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms Key Terms>.+    --     For more examples, see+    --     <https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters KeyId>+    --     in the /Key Management Service API Reference/.+    --+    -- -   @SignatureVersion@ – The signature version corresponds to the+    --     hashing algorithm used while creating the signature of the+    --     notifications, subscription confirmations, or unsubscribe+    --     confirmation messages sent by Amazon SNS.+    --+    -- The following attribute applies only to+    -- <https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html FIFO topics>:+    --+    -- -   @ContentBasedDeduplication@ – Enables content-based deduplication+    --     for FIFO topics.+    --+    --     -   By default, @ContentBasedDeduplication@ is set to @false@. If+    --         you create a FIFO topic and this attribute is @false@, you must+    --         specify a value for the @MessageDeduplicationId@ parameter for+    --         the+    --         <https://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish>+    --         action.+    --+    --     -   When you set @ContentBasedDeduplication@ to @true@, Amazon SNS+    --         uses a SHA-256 hash to generate the @MessageDeduplicationId@+    --         using the body of the message (but not the attributes of the+    --         message).+    --+    --         (Optional) To override the generated value, you can specify a+    --         value for the @MessageDeduplicationId@ parameter for the+    --         @Publish@ action.+    attributeName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetTopicAttributes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributeValue', 'setTopicAttributes_attributeValue' - The new value for the attribute.+--+-- 'topicArn', 'setTopicAttributes_topicArn' - The ARN of the topic to modify.+--+-- 'attributeName', 'setTopicAttributes_attributeName' - A map of attributes with their corresponding values.+--+-- The following lists the names, descriptions, and values of the special+-- request parameters that the @SetTopicAttributes@ action uses:+--+-- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+--     failed deliveries to HTTP\/S endpoints.+--+-- -   @DisplayName@ – The display name to use for a topic with SMS+--     subscriptions.+--+-- -   @Policy@ – The policy that defines who can access your topic. By+--     default, only the topic owner can publish or subscribe to the topic.+--+-- -   @TracingConfig@ – Tracing mode of an Amazon SNS topic. By default+--     @TracingConfig@ is set to @PassThrough@, and the topic passes+--     through the tracing header it receives from an Amazon SNS publisher+--     to its subscriptions. If set to Active, Amazon SNS will vend X-Ray+--     segment data to topic owner account if the sampled flag in the+--     tracing header is true. This is only supported on standard topics.+--+-- The following attribute applies only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html server-side-encryption>:+--+-- -   @KmsMasterKeyId@ – The ID of an Amazon Web Services managed customer+--     master key (CMK) for Amazon SNS or a custom CMK. For more+--     information, see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms Key Terms>.+--     For more examples, see+--     <https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters KeyId>+--     in the /Key Management Service API Reference/.+--+-- -   @SignatureVersion@ – The signature version corresponds to the+--     hashing algorithm used while creating the signature of the+--     notifications, subscription confirmations, or unsubscribe+--     confirmation messages sent by Amazon SNS.+--+-- The following attribute applies only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html FIFO topics>:+--+-- -   @ContentBasedDeduplication@ – Enables content-based deduplication+--     for FIFO topics.+--+--     -   By default, @ContentBasedDeduplication@ is set to @false@. If+--         you create a FIFO topic and this attribute is @false@, you must+--         specify a value for the @MessageDeduplicationId@ parameter for+--         the+--         <https://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish>+--         action.+--+--     -   When you set @ContentBasedDeduplication@ to @true@, Amazon SNS+--         uses a SHA-256 hash to generate the @MessageDeduplicationId@+--         using the body of the message (but not the attributes of the+--         message).+--+--         (Optional) To override the generated value, you can specify a+--         value for the @MessageDeduplicationId@ parameter for the+--         @Publish@ action.+newSetTopicAttributes ::+  -- | 'topicArn'+  Prelude.Text ->+  -- | 'attributeName'+  Prelude.Text ->+  SetTopicAttributes+newSetTopicAttributes pTopicArn_ pAttributeName_ =+  SetTopicAttributes'+    { attributeValue =+        Prelude.Nothing,+      topicArn = pTopicArn_,+      attributeName = pAttributeName_+    }++-- | The new value for the attribute.+setTopicAttributes_attributeValue :: Lens.Lens' SetTopicAttributes (Prelude.Maybe Prelude.Text)+setTopicAttributes_attributeValue = Lens.lens (\SetTopicAttributes' {attributeValue} -> attributeValue) (\s@SetTopicAttributes' {} a -> s {attributeValue = a} :: SetTopicAttributes)++-- | The ARN of the topic to modify.+setTopicAttributes_topicArn :: Lens.Lens' SetTopicAttributes Prelude.Text+setTopicAttributes_topicArn = Lens.lens (\SetTopicAttributes' {topicArn} -> topicArn) (\s@SetTopicAttributes' {} a -> s {topicArn = a} :: SetTopicAttributes)++-- | A map of attributes with their corresponding values.+--+-- The following lists the names, descriptions, and values of the special+-- request parameters that the @SetTopicAttributes@ action uses:+--+-- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+--     failed deliveries to HTTP\/S endpoints.+--+-- -   @DisplayName@ – The display name to use for a topic with SMS+--     subscriptions.+--+-- -   @Policy@ – The policy that defines who can access your topic. By+--     default, only the topic owner can publish or subscribe to the topic.+--+-- -   @TracingConfig@ – Tracing mode of an Amazon SNS topic. By default+--     @TracingConfig@ is set to @PassThrough@, and the topic passes+--     through the tracing header it receives from an Amazon SNS publisher+--     to its subscriptions. If set to Active, Amazon SNS will vend X-Ray+--     segment data to topic owner account if the sampled flag in the+--     tracing header is true. This is only supported on standard topics.+--+-- The following attribute applies only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html server-side-encryption>:+--+-- -   @KmsMasterKeyId@ – The ID of an Amazon Web Services managed customer+--     master key (CMK) for Amazon SNS or a custom CMK. For more+--     information, see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms Key Terms>.+--     For more examples, see+--     <https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters KeyId>+--     in the /Key Management Service API Reference/.+--+-- -   @SignatureVersion@ – The signature version corresponds to the+--     hashing algorithm used while creating the signature of the+--     notifications, subscription confirmations, or unsubscribe+--     confirmation messages sent by Amazon SNS.+--+-- The following attribute applies only to+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html FIFO topics>:+--+-- -   @ContentBasedDeduplication@ – Enables content-based deduplication+--     for FIFO topics.+--+--     -   By default, @ContentBasedDeduplication@ is set to @false@. If+--         you create a FIFO topic and this attribute is @false@, you must+--         specify a value for the @MessageDeduplicationId@ parameter for+--         the+--         <https://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish>+--         action.+--+--     -   When you set @ContentBasedDeduplication@ to @true@, Amazon SNS+--         uses a SHA-256 hash to generate the @MessageDeduplicationId@+--         using the body of the message (but not the attributes of the+--         message).+--+--         (Optional) To override the generated value, you can specify a+--         value for the @MessageDeduplicationId@ parameter for the+--         @Publish@ action.+setTopicAttributes_attributeName :: Lens.Lens' SetTopicAttributes Prelude.Text+setTopicAttributes_attributeName = Lens.lens (\SetTopicAttributes' {attributeName} -> attributeName) (\s@SetTopicAttributes' {} a -> s {attributeName = a} :: SetTopicAttributes)++instance Core.AWSRequest SetTopicAttributes where+  type+    AWSResponse SetTopicAttributes =+      SetTopicAttributesResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveNull SetTopicAttributesResponse'++instance Prelude.Hashable SetTopicAttributes where+  hashWithSalt _salt SetTopicAttributes' {..} =+    _salt+      `Prelude.hashWithSalt` attributeValue+      `Prelude.hashWithSalt` topicArn+      `Prelude.hashWithSalt` attributeName++instance Prelude.NFData SetTopicAttributes where+  rnf SetTopicAttributes' {..} =+    Prelude.rnf attributeValue+      `Prelude.seq` Prelude.rnf topicArn+      `Prelude.seq` Prelude.rnf attributeName++instance Data.ToHeaders SetTopicAttributes where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath SetTopicAttributes where+  toPath = Prelude.const "/"++instance Data.ToQuery SetTopicAttributes where+  toQuery SetTopicAttributes' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("SetTopicAttributes" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "AttributeValue" Data.=: attributeValue,+        "TopicArn" Data.=: topicArn,+        "AttributeName" Data.=: attributeName+      ]++-- | /See:/ 'newSetTopicAttributesResponse' smart constructor.+data SetTopicAttributesResponse = SetTopicAttributesResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SetTopicAttributesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newSetTopicAttributesResponse ::+  SetTopicAttributesResponse+newSetTopicAttributesResponse =+  SetTopicAttributesResponse'++instance Prelude.NFData SetTopicAttributesResponse where+  rnf _ = ()
+ gen/Amazonka/SNS/Subscribe.hs view
@@ -0,0 +1,548 @@+{-# 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.SNS.Subscribe+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Subscribes an endpoint to an Amazon SNS topic. If the endpoint type is+-- HTTP\/S or email, or if the endpoint and the topic are not in the same+-- Amazon Web Services account, the endpoint owner must run the+-- @ConfirmSubscription@ action to confirm the subscription.+--+-- You call the @ConfirmSubscription@ action with the token from the+-- subscription response. Confirmation tokens are valid for three days.+--+-- This action is throttled at 100 transactions per second (TPS).+module Amazonka.SNS.Subscribe+  ( -- * Creating a Request+    Subscribe (..),+    newSubscribe,++    -- * Request Lenses+    subscribe_attributes,+    subscribe_endpoint,+    subscribe_returnSubscriptionArn,+    subscribe_topicArn,+    subscribe_protocol,++    -- * Destructuring the Response+    SubscribeResponse (..),+    newSubscribeResponse,++    -- * Response Lenses+    subscribeResponse_subscriptionArn,+    subscribeResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for Subscribe action.+--+-- /See:/ 'newSubscribe' smart constructor.+data Subscribe = Subscribe'+  { -- | A map of attributes with their corresponding values.+    --+    -- The following lists the names, descriptions, and values of the special+    -- request parameters that the @Subscribe@ action uses:+    --+    -- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+    --     failed deliveries to HTTP\/S endpoints.+    --+    -- -   @FilterPolicy@ – The simple JSON object that lets your subscriber+    --     receive only a subset of messages, rather than receiving every+    --     message published to the topic.+    --+    -- -   @FilterPolicyScope@ – This attribute lets you choose the filtering+    --     scope by using one of the following string value types:+    --+    --     -   @MessageAttributes@ (default) – The filter is applied on the+    --         message attributes.+    --+    --     -   @MessageBody@ – The filter is applied on the message body.+    --+    -- -   @RawMessageDelivery@ – When set to @true@, enables raw message+    --     delivery to Amazon SQS or HTTP\/S endpoints. This eliminates the+    --     need for the endpoints to process JSON formatting, which is+    --     otherwise created for Amazon SNS metadata.+    --+    -- -   @RedrivePolicy@ – When specified, sends undeliverable messages to+    --     the specified Amazon SQS dead-letter queue. Messages that can\'t be+    --     delivered due to client errors (for example, when the subscribed+    --     endpoint is unreachable) or server errors (for example, when the+    --     service that powers the subscribed endpoint becomes unavailable) are+    --     held in the dead-letter queue for further analysis or reprocessing.+    --+    -- The following attribute applies only to Amazon Kinesis Data Firehose+    -- delivery stream subscriptions:+    --+    -- -   @SubscriptionRoleArn@ – The ARN of the IAM role that has the+    --     following:+    --+    --     -   Permission to write to the Kinesis Data Firehose delivery stream+    --+    --     -   Amazon SNS listed as a trusted entity+    --+    --     Specifying a valid ARN for this attribute is required for Kinesis+    --     Data Firehose delivery stream subscriptions. For more information,+    --     see+    --     <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html Fanout to Kinesis Data Firehose delivery streams>+    --     in the /Amazon SNS Developer Guide/.+    attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The endpoint that you want to receive notifications. Endpoints vary by+    -- protocol:+    --+    -- -   For the @http@ protocol, the (public) endpoint is a URL beginning+    --     with @http:\/\/@.+    --+    -- -   For the @https@ protocol, the (public) endpoint is a URL beginning+    --     with @https:\/\/@.+    --+    -- -   For the @email@ protocol, the endpoint is an email address.+    --+    -- -   For the @email-json@ protocol, the endpoint is an email address.+    --+    -- -   For the @sms@ protocol, the endpoint is a phone number of an+    --     SMS-enabled device.+    --+    -- -   For the @sqs@ protocol, the endpoint is the ARN of an Amazon SQS+    --     queue.+    --+    -- -   For the @application@ protocol, the endpoint is the EndpointArn of a+    --     mobile app and device.+    --+    -- -   For the @lambda@ protocol, the endpoint is the ARN of an Lambda+    --     function.+    --+    -- -   For the @firehose@ protocol, the endpoint is the ARN of an Amazon+    --     Kinesis Data Firehose delivery stream.+    endpoint :: Prelude.Maybe Prelude.Text,+    -- | Sets whether the response from the @Subscribe@ request includes the+    -- subscription ARN, even if the subscription is not yet confirmed.+    --+    -- If you set this parameter to @true@, the response includes the ARN in+    -- all cases, even if the subscription is not yet confirmed. In addition to+    -- the ARN for confirmed subscriptions, the response also includes the+    -- @pending subscription@ ARN value for subscriptions that aren\'t yet+    -- confirmed. A subscription becomes confirmed when the subscriber calls+    -- the @ConfirmSubscription@ action with a confirmation token.+    --+    -- The default value is @false@.+    returnSubscriptionArn :: Prelude.Maybe Prelude.Bool,+    -- | The ARN of the topic you want to subscribe to.+    topicArn :: Prelude.Text,+    -- | The protocol that you want to use. Supported protocols include:+    --+    -- -   @http@ – delivery of JSON-encoded message via HTTP POST+    --+    -- -   @https@ – delivery of JSON-encoded message via HTTPS POST+    --+    -- -   @email@ – delivery of message via SMTP+    --+    -- -   @email-json@ – delivery of JSON-encoded message via SMTP+    --+    -- -   @sms@ – delivery of message via SMS+    --+    -- -   @sqs@ – delivery of JSON-encoded message to an Amazon SQS queue+    --+    -- -   @application@ – delivery of JSON-encoded message to an EndpointArn+    --     for a mobile app and device+    --+    -- -   @lambda@ – delivery of JSON-encoded message to an Lambda function+    --+    -- -   @firehose@ – delivery of JSON-encoded message to an Amazon Kinesis+    --     Data Firehose delivery stream.+    protocol :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Subscribe' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'subscribe_attributes' - A map of attributes with their corresponding values.+--+-- The following lists the names, descriptions, and values of the special+-- request parameters that the @Subscribe@ action uses:+--+-- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+--     failed deliveries to HTTP\/S endpoints.+--+-- -   @FilterPolicy@ – The simple JSON object that lets your subscriber+--     receive only a subset of messages, rather than receiving every+--     message published to the topic.+--+-- -   @FilterPolicyScope@ – This attribute lets you choose the filtering+--     scope by using one of the following string value types:+--+--     -   @MessageAttributes@ (default) – The filter is applied on the+--         message attributes.+--+--     -   @MessageBody@ – The filter is applied on the message body.+--+-- -   @RawMessageDelivery@ – When set to @true@, enables raw message+--     delivery to Amazon SQS or HTTP\/S endpoints. This eliminates the+--     need for the endpoints to process JSON formatting, which is+--     otherwise created for Amazon SNS metadata.+--+-- -   @RedrivePolicy@ – When specified, sends undeliverable messages to+--     the specified Amazon SQS dead-letter queue. Messages that can\'t be+--     delivered due to client errors (for example, when the subscribed+--     endpoint is unreachable) or server errors (for example, when the+--     service that powers the subscribed endpoint becomes unavailable) are+--     held in the dead-letter queue for further analysis or reprocessing.+--+-- The following attribute applies only to Amazon Kinesis Data Firehose+-- delivery stream subscriptions:+--+-- -   @SubscriptionRoleArn@ – The ARN of the IAM role that has the+--     following:+--+--     -   Permission to write to the Kinesis Data Firehose delivery stream+--+--     -   Amazon SNS listed as a trusted entity+--+--     Specifying a valid ARN for this attribute is required for Kinesis+--     Data Firehose delivery stream subscriptions. For more information,+--     see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html Fanout to Kinesis Data Firehose delivery streams>+--     in the /Amazon SNS Developer Guide/.+--+-- 'endpoint', 'subscribe_endpoint' - The endpoint that you want to receive notifications. Endpoints vary by+-- protocol:+--+-- -   For the @http@ protocol, the (public) endpoint is a URL beginning+--     with @http:\/\/@.+--+-- -   For the @https@ protocol, the (public) endpoint is a URL beginning+--     with @https:\/\/@.+--+-- -   For the @email@ protocol, the endpoint is an email address.+--+-- -   For the @email-json@ protocol, the endpoint is an email address.+--+-- -   For the @sms@ protocol, the endpoint is a phone number of an+--     SMS-enabled device.+--+-- -   For the @sqs@ protocol, the endpoint is the ARN of an Amazon SQS+--     queue.+--+-- -   For the @application@ protocol, the endpoint is the EndpointArn of a+--     mobile app and device.+--+-- -   For the @lambda@ protocol, the endpoint is the ARN of an Lambda+--     function.+--+-- -   For the @firehose@ protocol, the endpoint is the ARN of an Amazon+--     Kinesis Data Firehose delivery stream.+--+-- 'returnSubscriptionArn', 'subscribe_returnSubscriptionArn' - Sets whether the response from the @Subscribe@ request includes the+-- subscription ARN, even if the subscription is not yet confirmed.+--+-- If you set this parameter to @true@, the response includes the ARN in+-- all cases, even if the subscription is not yet confirmed. In addition to+-- the ARN for confirmed subscriptions, the response also includes the+-- @pending subscription@ ARN value for subscriptions that aren\'t yet+-- confirmed. A subscription becomes confirmed when the subscriber calls+-- the @ConfirmSubscription@ action with a confirmation token.+--+-- The default value is @false@.+--+-- 'topicArn', 'subscribe_topicArn' - The ARN of the topic you want to subscribe to.+--+-- 'protocol', 'subscribe_protocol' - The protocol that you want to use. Supported protocols include:+--+-- -   @http@ – delivery of JSON-encoded message via HTTP POST+--+-- -   @https@ – delivery of JSON-encoded message via HTTPS POST+--+-- -   @email@ – delivery of message via SMTP+--+-- -   @email-json@ – delivery of JSON-encoded message via SMTP+--+-- -   @sms@ – delivery of message via SMS+--+-- -   @sqs@ – delivery of JSON-encoded message to an Amazon SQS queue+--+-- -   @application@ – delivery of JSON-encoded message to an EndpointArn+--     for a mobile app and device+--+-- -   @lambda@ – delivery of JSON-encoded message to an Lambda function+--+-- -   @firehose@ – delivery of JSON-encoded message to an Amazon Kinesis+--     Data Firehose delivery stream.+newSubscribe ::+  -- | 'topicArn'+  Prelude.Text ->+  -- | 'protocol'+  Prelude.Text ->+  Subscribe+newSubscribe pTopicArn_ pProtocol_ =+  Subscribe'+    { attributes = Prelude.Nothing,+      endpoint = Prelude.Nothing,+      returnSubscriptionArn = Prelude.Nothing,+      topicArn = pTopicArn_,+      protocol = pProtocol_+    }++-- | A map of attributes with their corresponding values.+--+-- The following lists the names, descriptions, and values of the special+-- request parameters that the @Subscribe@ action uses:+--+-- -   @DeliveryPolicy@ – The policy that defines how Amazon SNS retries+--     failed deliveries to HTTP\/S endpoints.+--+-- -   @FilterPolicy@ – The simple JSON object that lets your subscriber+--     receive only a subset of messages, rather than receiving every+--     message published to the topic.+--+-- -   @FilterPolicyScope@ – This attribute lets you choose the filtering+--     scope by using one of the following string value types:+--+--     -   @MessageAttributes@ (default) – The filter is applied on the+--         message attributes.+--+--     -   @MessageBody@ – The filter is applied on the message body.+--+-- -   @RawMessageDelivery@ – When set to @true@, enables raw message+--     delivery to Amazon SQS or HTTP\/S endpoints. This eliminates the+--     need for the endpoints to process JSON formatting, which is+--     otherwise created for Amazon SNS metadata.+--+-- -   @RedrivePolicy@ – When specified, sends undeliverable messages to+--     the specified Amazon SQS dead-letter queue. Messages that can\'t be+--     delivered due to client errors (for example, when the subscribed+--     endpoint is unreachable) or server errors (for example, when the+--     service that powers the subscribed endpoint becomes unavailable) are+--     held in the dead-letter queue for further analysis or reprocessing.+--+-- The following attribute applies only to Amazon Kinesis Data Firehose+-- delivery stream subscriptions:+--+-- -   @SubscriptionRoleArn@ – The ARN of the IAM role that has the+--     following:+--+--     -   Permission to write to the Kinesis Data Firehose delivery stream+--+--     -   Amazon SNS listed as a trusted entity+--+--     Specifying a valid ARN for this attribute is required for Kinesis+--     Data Firehose delivery stream subscriptions. For more information,+--     see+--     <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html Fanout to Kinesis Data Firehose delivery streams>+--     in the /Amazon SNS Developer Guide/.+subscribe_attributes :: Lens.Lens' Subscribe (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+subscribe_attributes = Lens.lens (\Subscribe' {attributes} -> attributes) (\s@Subscribe' {} a -> s {attributes = a} :: Subscribe) Prelude.. Lens.mapping Lens.coerced++-- | The endpoint that you want to receive notifications. Endpoints vary by+-- protocol:+--+-- -   For the @http@ protocol, the (public) endpoint is a URL beginning+--     with @http:\/\/@.+--+-- -   For the @https@ protocol, the (public) endpoint is a URL beginning+--     with @https:\/\/@.+--+-- -   For the @email@ protocol, the endpoint is an email address.+--+-- -   For the @email-json@ protocol, the endpoint is an email address.+--+-- -   For the @sms@ protocol, the endpoint is a phone number of an+--     SMS-enabled device.+--+-- -   For the @sqs@ protocol, the endpoint is the ARN of an Amazon SQS+--     queue.+--+-- -   For the @application@ protocol, the endpoint is the EndpointArn of a+--     mobile app and device.+--+-- -   For the @lambda@ protocol, the endpoint is the ARN of an Lambda+--     function.+--+-- -   For the @firehose@ protocol, the endpoint is the ARN of an Amazon+--     Kinesis Data Firehose delivery stream.+subscribe_endpoint :: Lens.Lens' Subscribe (Prelude.Maybe Prelude.Text)+subscribe_endpoint = Lens.lens (\Subscribe' {endpoint} -> endpoint) (\s@Subscribe' {} a -> s {endpoint = a} :: Subscribe)++-- | Sets whether the response from the @Subscribe@ request includes the+-- subscription ARN, even if the subscription is not yet confirmed.+--+-- If you set this parameter to @true@, the response includes the ARN in+-- all cases, even if the subscription is not yet confirmed. In addition to+-- the ARN for confirmed subscriptions, the response also includes the+-- @pending subscription@ ARN value for subscriptions that aren\'t yet+-- confirmed. A subscription becomes confirmed when the subscriber calls+-- the @ConfirmSubscription@ action with a confirmation token.+--+-- The default value is @false@.+subscribe_returnSubscriptionArn :: Lens.Lens' Subscribe (Prelude.Maybe Prelude.Bool)+subscribe_returnSubscriptionArn = Lens.lens (\Subscribe' {returnSubscriptionArn} -> returnSubscriptionArn) (\s@Subscribe' {} a -> s {returnSubscriptionArn = a} :: Subscribe)++-- | The ARN of the topic you want to subscribe to.+subscribe_topicArn :: Lens.Lens' Subscribe Prelude.Text+subscribe_topicArn = Lens.lens (\Subscribe' {topicArn} -> topicArn) (\s@Subscribe' {} a -> s {topicArn = a} :: Subscribe)++-- | The protocol that you want to use. Supported protocols include:+--+-- -   @http@ – delivery of JSON-encoded message via HTTP POST+--+-- -   @https@ – delivery of JSON-encoded message via HTTPS POST+--+-- -   @email@ – delivery of message via SMTP+--+-- -   @email-json@ – delivery of JSON-encoded message via SMTP+--+-- -   @sms@ – delivery of message via SMS+--+-- -   @sqs@ – delivery of JSON-encoded message to an Amazon SQS queue+--+-- -   @application@ – delivery of JSON-encoded message to an EndpointArn+--     for a mobile app and device+--+-- -   @lambda@ – delivery of JSON-encoded message to an Lambda function+--+-- -   @firehose@ – delivery of JSON-encoded message to an Amazon Kinesis+--     Data Firehose delivery stream.+subscribe_protocol :: Lens.Lens' Subscribe Prelude.Text+subscribe_protocol = Lens.lens (\Subscribe' {protocol} -> protocol) (\s@Subscribe' {} a -> s {protocol = a} :: Subscribe)++instance Core.AWSRequest Subscribe where+  type AWSResponse Subscribe = SubscribeResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "SubscribeResult"+      ( \s h x ->+          SubscribeResponse'+            Prelude.<$> (x Data..@? "SubscriptionArn")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable Subscribe where+  hashWithSalt _salt Subscribe' {..} =+    _salt+      `Prelude.hashWithSalt` attributes+      `Prelude.hashWithSalt` endpoint+      `Prelude.hashWithSalt` returnSubscriptionArn+      `Prelude.hashWithSalt` topicArn+      `Prelude.hashWithSalt` protocol++instance Prelude.NFData Subscribe where+  rnf Subscribe' {..} =+    Prelude.rnf attributes+      `Prelude.seq` Prelude.rnf endpoint+      `Prelude.seq` Prelude.rnf returnSubscriptionArn+      `Prelude.seq` Prelude.rnf topicArn+      `Prelude.seq` Prelude.rnf protocol++instance Data.ToHeaders Subscribe where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath Subscribe where+  toPath = Prelude.const "/"++instance Data.ToQuery Subscribe where+  toQuery Subscribe' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("Subscribe" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "Attributes"+          Data.=: Data.toQuery+            ( Data.toQueryMap "entry" "key" "value"+                Prelude.<$> attributes+            ),+        "Endpoint" Data.=: endpoint,+        "ReturnSubscriptionArn"+          Data.=: returnSubscriptionArn,+        "TopicArn" Data.=: topicArn,+        "Protocol" Data.=: protocol+      ]++-- | Response for Subscribe action.+--+-- /See:/ 'newSubscribeResponse' smart constructor.+data SubscribeResponse = SubscribeResponse'+  { -- | The ARN of the subscription if it is confirmed, or the string \"pending+    -- confirmation\" if the subscription requires confirmation. However, if+    -- the API request parameter @ReturnSubscriptionArn@ is true, then the+    -- value is always the subscription ARN, even if the subscription requires+    -- confirmation.+    subscriptionArn :: 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 'SubscribeResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'subscriptionArn', 'subscribeResponse_subscriptionArn' - The ARN of the subscription if it is confirmed, or the string \"pending+-- confirmation\" if the subscription requires confirmation. However, if+-- the API request parameter @ReturnSubscriptionArn@ is true, then the+-- value is always the subscription ARN, even if the subscription requires+-- confirmation.+--+-- 'httpStatus', 'subscribeResponse_httpStatus' - The response's http status code.+newSubscribeResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  SubscribeResponse+newSubscribeResponse pHttpStatus_ =+  SubscribeResponse'+    { subscriptionArn =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The ARN of the subscription if it is confirmed, or the string \"pending+-- confirmation\" if the subscription requires confirmation. However, if+-- the API request parameter @ReturnSubscriptionArn@ is true, then the+-- value is always the subscription ARN, even if the subscription requires+-- confirmation.+subscribeResponse_subscriptionArn :: Lens.Lens' SubscribeResponse (Prelude.Maybe Prelude.Text)+subscribeResponse_subscriptionArn = Lens.lens (\SubscribeResponse' {subscriptionArn} -> subscriptionArn) (\s@SubscribeResponse' {} a -> s {subscriptionArn = a} :: SubscribeResponse)++-- | The response's http status code.+subscribeResponse_httpStatus :: Lens.Lens' SubscribeResponse Prelude.Int+subscribeResponse_httpStatus = Lens.lens (\SubscribeResponse' {httpStatus} -> httpStatus) (\s@SubscribeResponse' {} a -> s {httpStatus = a} :: SubscribeResponse)++instance Prelude.NFData SubscribeResponse where+  rnf SubscribeResponse' {..} =+    Prelude.rnf subscriptionArn+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SNS/TagResource.hs view
@@ -0,0 +1,178 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SNS.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)+--+-- Add tags to the specified Amazon SNS topic. For an overview, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-tags.html Amazon SNS Tags>+-- in the /Amazon SNS Developer Guide/.+--+-- When you use topic tags, keep the following guidelines in mind:+--+-- -   Adding more than 50 tags to a topic isn\'t recommended.+--+-- -   Tags don\'t have any semantic meaning. Amazon SNS interprets tags as+--     character strings.+--+-- -   Tags are case-sensitive.+--+-- -   A new tag with a key identical to that of an existing tag overwrites+--     the existing tag.+--+-- -   Tagging actions are limited to 10 TPS per Amazon Web Services+--     account, per Amazon Web Services Region. If your application+--     requires a higher throughput, file a+--     <https://console.aws.amazon.com/support/home#/case/create?issueType=technical technical support request>.+module Amazonka.SNS.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 qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+  { -- | The ARN of the topic to which to add tags.+    resourceArn :: Prelude.Text,+    -- | The tags to be added to the specified topic. A tag consists of a+    -- required key and an optional value.+    tags :: [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 ARN of the topic to which to add tags.+--+-- 'tags', 'tagResource_tags' - The tags to be added to the specified topic. A tag consists of a+-- required key and an optional value.+newTagResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  TagResource+newTagResource pResourceArn_ =+  TagResource'+    { resourceArn = pResourceArn_,+      tags = Prelude.mempty+    }++-- | The ARN of the topic to which to add tags.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | The tags to be added to the specified topic. A tag consists of a+-- required key and an optional value.+tagResource_tags :: Lens.Lens' TagResource [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.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "TagResourceResult"+      ( \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.mempty++instance Data.ToPath TagResource where+  toPath = Prelude.const "/"++instance Data.ToQuery TagResource where+  toQuery TagResource' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("TagResource" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "ResourceArn" Data.=: resourceArn,+        "Tags" Data.=: Data.toQueryList "member" tags+      ]++-- | /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/SNS/Types.hs view
@@ -0,0 +1,509 @@+{-# 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.SNS.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.SNS.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _AuthorizationErrorException,+    _BatchEntryIdsNotDistinctException,+    _BatchRequestTooLongException,+    _ConcurrentAccessException,+    _EmptyBatchRequestException,+    _EndpointDisabledException,+    _FilterPolicyLimitExceededException,+    _InternalErrorException,+    _InvalidBatchEntryIdException,+    _InvalidParameterException,+    _InvalidParameterValueException,+    _InvalidSecurityException,+    _KMSAccessDeniedException,+    _KMSDisabledException,+    _KMSInvalidStateException,+    _KMSNotFoundException,+    _KMSOptInRequired,+    _KMSThrottlingException,+    _NotFoundException,+    _OptedOutException,+    _PlatformApplicationDisabledException,+    _ResourceNotFoundException,+    _StaleTagException,+    _SubscriptionLimitExceededException,+    _TagLimitExceededException,+    _TagPolicyException,+    _ThrottledException,+    _TooManyEntriesInBatchRequestException,+    _TopicLimitExceededException,+    _UserErrorException,+    _ValidationException,+    _VerificationException,++    -- * LanguageCodeString+    LanguageCodeString (..),++    -- * NumberCapability+    NumberCapability (..),++    -- * RouteType+    RouteType (..),++    -- * SMSSandboxPhoneNumberVerificationStatus+    SMSSandboxPhoneNumberVerificationStatus (..),++    -- * BatchResultErrorEntry+    BatchResultErrorEntry (..),+    newBatchResultErrorEntry,+    batchResultErrorEntry_message,+    batchResultErrorEntry_id,+    batchResultErrorEntry_code,+    batchResultErrorEntry_senderFault,++    -- * Endpoint+    Endpoint (..),+    newEndpoint,+    endpoint_attributes,+    endpoint_endpointArn,++    -- * MessageAttributeValue+    MessageAttributeValue (..),+    newMessageAttributeValue,+    messageAttributeValue_binaryValue,+    messageAttributeValue_stringValue,+    messageAttributeValue_dataType,++    -- * PhoneNumberInformation+    PhoneNumberInformation (..),+    newPhoneNumberInformation,+    phoneNumberInformation_createdAt,+    phoneNumberInformation_iso2CountryCode,+    phoneNumberInformation_numberCapabilities,+    phoneNumberInformation_phoneNumber,+    phoneNumberInformation_routeType,+    phoneNumberInformation_status,++    -- * PlatformApplication+    PlatformApplication (..),+    newPlatformApplication,+    platformApplication_attributes,+    platformApplication_platformApplicationArn,++    -- * PublishBatchRequestEntry+    PublishBatchRequestEntry (..),+    newPublishBatchRequestEntry,+    publishBatchRequestEntry_messageAttributes,+    publishBatchRequestEntry_messageDeduplicationId,+    publishBatchRequestEntry_messageGroupId,+    publishBatchRequestEntry_messageStructure,+    publishBatchRequestEntry_subject,+    publishBatchRequestEntry_id,+    publishBatchRequestEntry_message,++    -- * PublishBatchResultEntry+    PublishBatchResultEntry (..),+    newPublishBatchResultEntry,+    publishBatchResultEntry_id,+    publishBatchResultEntry_messageId,+    publishBatchResultEntry_sequenceNumber,++    -- * SMSSandboxPhoneNumber+    SMSSandboxPhoneNumber (..),+    newSMSSandboxPhoneNumber,+    sMSSandboxPhoneNumber_phoneNumber,+    sMSSandboxPhoneNumber_status,++    -- * Subscription+    Subscription (..),+    newSubscription,+    subscription_endpoint,+    subscription_owner,+    subscription_protocol,+    subscription_subscriptionArn,+    subscription_topicArn,++    -- * Tag+    Tag (..),+    newTag,+    tag_key,+    tag_value,++    -- * Topic+    Topic (..),+    newTopic,+    topic_topicArn,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import Amazonka.SNS.Types.BatchResultErrorEntry+import Amazonka.SNS.Types.Endpoint+import Amazonka.SNS.Types.LanguageCodeString+import Amazonka.SNS.Types.MessageAttributeValue+import Amazonka.SNS.Types.NumberCapability+import Amazonka.SNS.Types.PhoneNumberInformation+import Amazonka.SNS.Types.PlatformApplication+import Amazonka.SNS.Types.PublishBatchRequestEntry+import Amazonka.SNS.Types.PublishBatchResultEntry+import Amazonka.SNS.Types.RouteType+import Amazonka.SNS.Types.SMSSandboxPhoneNumber+import Amazonka.SNS.Types.SMSSandboxPhoneNumberVerificationStatus+import Amazonka.SNS.Types.Subscription+import Amazonka.SNS.Types.Tag+import Amazonka.SNS.Types.Topic+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2010-03-31@ of the Amazon Simple Notification Service SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "SNS",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "sns",+      Core.signingName = "sns",+      Core.version = "2010-03-31",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error = Core.parseXMLError "SNS",+      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++-- | Indicates that the user has been denied access to the requested+-- resource.+_AuthorizationErrorException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AuthorizationErrorException =+  Core._MatchServiceError+    defaultService+    "AuthorizationError"+    Prelude.. Core.hasStatus 403++-- | Two or more batch entries in the request have the same @Id@.+_BatchEntryIdsNotDistinctException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_BatchEntryIdsNotDistinctException =+  Core._MatchServiceError+    defaultService+    "BatchEntryIdsNotDistinct"+    Prelude.. Core.hasStatus 400++-- | The length of all the batch messages put together is more than the+-- limit.+_BatchRequestTooLongException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_BatchRequestTooLongException =+  Core._MatchServiceError+    defaultService+    "BatchRequestTooLong"+    Prelude.. Core.hasStatus 400++-- | Can\'t perform multiple operations on a tag simultaneously. Perform the+-- operations sequentially.+_ConcurrentAccessException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConcurrentAccessException =+  Core._MatchServiceError+    defaultService+    "ConcurrentAccess"+    Prelude.. Core.hasStatus 400++-- | The batch request doesn\'t contain any entries.+_EmptyBatchRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_EmptyBatchRequestException =+  Core._MatchServiceError+    defaultService+    "EmptyBatchRequest"+    Prelude.. Core.hasStatus 400++-- | Exception error indicating endpoint disabled.+_EndpointDisabledException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_EndpointDisabledException =+  Core._MatchServiceError+    defaultService+    "EndpointDisabled"+    Prelude.. Core.hasStatus 400++-- | Indicates that the number of filter polices in your Amazon Web Services+-- account exceeds the limit. To add more filter polices, submit an Amazon+-- SNS Limit Increase case in the Amazon Web Services Support Center.+_FilterPolicyLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_FilterPolicyLimitExceededException =+  Core._MatchServiceError+    defaultService+    "FilterPolicyLimitExceeded"+    Prelude.. Core.hasStatus 403++-- | Indicates an internal service error.+_InternalErrorException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalErrorException =+  Core._MatchServiceError+    defaultService+    "InternalError"+    Prelude.. Core.hasStatus 500++-- | The @Id@ of a batch entry in a batch request doesn\'t abide by the+-- specification.+_InvalidBatchEntryIdException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidBatchEntryIdException =+  Core._MatchServiceError+    defaultService+    "InvalidBatchEntryId"+    Prelude.. Core.hasStatus 400++-- | Indicates that a request parameter does not comply with the associated+-- constraints.+_InvalidParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidParameterException =+  Core._MatchServiceError+    defaultService+    "InvalidParameter"+    Prelude.. Core.hasStatus 400++-- | Indicates that a request parameter does not comply with the associated+-- constraints.+_InvalidParameterValueException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidParameterValueException =+  Core._MatchServiceError+    defaultService+    "ParameterValueInvalid"+    Prelude.. Core.hasStatus 400++-- | The credential signature isn\'t valid. You must use an HTTPS endpoint+-- and sign your request using Signature Version 4.+_InvalidSecurityException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidSecurityException =+  Core._MatchServiceError+    defaultService+    "InvalidSecurity"+    Prelude.. Core.hasStatus 403++-- | The ciphertext references a key that doesn\'t exist or that you don\'t+-- have access to.+_KMSAccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_KMSAccessDeniedException =+  Core._MatchServiceError+    defaultService+    "KMSAccessDenied"+    Prelude.. Core.hasStatus 400++-- | The request was rejected because the specified customer master key (CMK)+-- isn\'t enabled.+_KMSDisabledException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_KMSDisabledException =+  Core._MatchServiceError+    defaultService+    "KMSDisabled"+    Prelude.. Core.hasStatus 400++-- | The request was rejected because the state of the specified resource+-- isn\'t valid for this request. For more information, see+-- <https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html How Key State Affects Use of a Customer Master Key>+-- in the /Key Management Service Developer Guide/.+_KMSInvalidStateException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_KMSInvalidStateException =+  Core._MatchServiceError+    defaultService+    "KMSInvalidState"+    Prelude.. Core.hasStatus 400++-- | The request was rejected because the specified entity or resource can\'t+-- be found.+_KMSNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_KMSNotFoundException =+  Core._MatchServiceError+    defaultService+    "KMSNotFound"+    Prelude.. Core.hasStatus 400++-- | The Amazon Web Services access key ID needs a subscription for the+-- service.+_KMSOptInRequired :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_KMSOptInRequired =+  Core._MatchServiceError+    defaultService+    "KMSOptInRequired"+    Prelude.. Core.hasStatus 403++-- | The request was denied due to request throttling. For more information+-- about throttling, see+-- <https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second Limits>+-- in the /Key Management Service Developer Guide./+_KMSThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_KMSThrottlingException =+  Core._MatchServiceError+    defaultService+    "KMSThrottling"+    Prelude.. Core.hasStatus 400++-- | Indicates that the requested resource does not exist.+_NotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_NotFoundException =+  Core._MatchServiceError defaultService "NotFound"+    Prelude.. Core.hasStatus 404++-- | Indicates that the specified phone number opted out of receiving SMS+-- messages from your Amazon Web Services account. You can\'t send SMS+-- messages to phone numbers that opt out.+_OptedOutException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_OptedOutException =+  Core._MatchServiceError defaultService "OptedOut"+    Prelude.. Core.hasStatus 400++-- | Exception error indicating platform application disabled.+_PlatformApplicationDisabledException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_PlatformApplicationDisabledException =+  Core._MatchServiceError+    defaultService+    "PlatformApplicationDisabled"+    Prelude.. Core.hasStatus 400++-- | Can’t perform the action on the specified resource. Make sure that the+-- resource exists.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+  Core._MatchServiceError+    defaultService+    "ResourceNotFound"+    Prelude.. Core.hasStatus 404++-- | A tag has been added to a resource with the same ARN as a deleted+-- resource. Wait a short while and then retry the operation.+_StaleTagException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_StaleTagException =+  Core._MatchServiceError defaultService "StaleTag"+    Prelude.. Core.hasStatus 400++-- | Indicates that the customer already owns the maximum allowed number of+-- subscriptions.+_SubscriptionLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_SubscriptionLimitExceededException =+  Core._MatchServiceError+    defaultService+    "SubscriptionLimitExceeded"+    Prelude.. Core.hasStatus 403++-- | Can\'t add more than 50 tags to a topic.+_TagLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_TagLimitExceededException =+  Core._MatchServiceError+    defaultService+    "TagLimitExceeded"+    Prelude.. Core.hasStatus 400++-- | The request doesn\'t comply with the IAM tag policy. Correct your+-- request and then retry it.+_TagPolicyException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_TagPolicyException =+  Core._MatchServiceError defaultService "TagPolicy"+    Prelude.. Core.hasStatus 400++-- | Indicates that the rate at which requests have been submitted for this+-- action exceeds the limit for your Amazon Web Services account.+_ThrottledException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottledException =+  Core._MatchServiceError defaultService "Throttled"+    Prelude.. Core.hasStatus 429++-- | The batch request contains more entries than permissible.+_TooManyEntriesInBatchRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_TooManyEntriesInBatchRequestException =+  Core._MatchServiceError+    defaultService+    "TooManyEntriesInBatchRequest"+    Prelude.. Core.hasStatus 400++-- | Indicates that the customer already owns the maximum allowed number of+-- topics.+_TopicLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_TopicLimitExceededException =+  Core._MatchServiceError+    defaultService+    "TopicLimitExceeded"+    Prelude.. Core.hasStatus 403++-- | Indicates that a request parameter does not comply with the associated+-- constraints.+_UserErrorException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_UserErrorException =+  Core._MatchServiceError defaultService "UserError"+    Prelude.. Core.hasStatus 400++-- | Indicates that a parameter in the request is invalid.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+  Core._MatchServiceError+    defaultService+    "ValidationException"+    Prelude.. Core.hasStatus 400++-- | Indicates that the one-time password (OTP) used for verification is+-- invalid.+_VerificationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_VerificationException =+  Core._MatchServiceError+    defaultService+    "VerificationException"
+ gen/Amazonka/SNS/Types/BatchResultErrorEntry.hs view
@@ -0,0 +1,113 @@+{-# 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.SNS.Types.BatchResultErrorEntry+-- 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.SNS.Types.BatchResultErrorEntry 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++-- | Gives a detailed description of failed messages in the batch.+--+-- /See:/ 'newBatchResultErrorEntry' smart constructor.+data BatchResultErrorEntry = BatchResultErrorEntry'+  { -- | A message explaining why the action failed on this entry.+    message :: Prelude.Maybe Prelude.Text,+    -- | The @Id@ of an entry in a batch request+    id :: Prelude.Text,+    -- | An error code representing why the action failed on this entry.+    code :: Prelude.Text,+    -- | Specifies whether the error happened due to the caller of the batch API+    -- action.+    senderFault :: Prelude.Bool+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchResultErrorEntry' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'message', 'batchResultErrorEntry_message' - A message explaining why the action failed on this entry.+--+-- 'id', 'batchResultErrorEntry_id' - The @Id@ of an entry in a batch request+--+-- 'code', 'batchResultErrorEntry_code' - An error code representing why the action failed on this entry.+--+-- 'senderFault', 'batchResultErrorEntry_senderFault' - Specifies whether the error happened due to the caller of the batch API+-- action.+newBatchResultErrorEntry ::+  -- | 'id'+  Prelude.Text ->+  -- | 'code'+  Prelude.Text ->+  -- | 'senderFault'+  Prelude.Bool ->+  BatchResultErrorEntry+newBatchResultErrorEntry pId_ pCode_ pSenderFault_ =+  BatchResultErrorEntry'+    { message = Prelude.Nothing,+      id = pId_,+      code = pCode_,+      senderFault = pSenderFault_+    }++-- | A message explaining why the action failed on this entry.+batchResultErrorEntry_message :: Lens.Lens' BatchResultErrorEntry (Prelude.Maybe Prelude.Text)+batchResultErrorEntry_message = Lens.lens (\BatchResultErrorEntry' {message} -> message) (\s@BatchResultErrorEntry' {} a -> s {message = a} :: BatchResultErrorEntry)++-- | The @Id@ of an entry in a batch request+batchResultErrorEntry_id :: Lens.Lens' BatchResultErrorEntry Prelude.Text+batchResultErrorEntry_id = Lens.lens (\BatchResultErrorEntry' {id} -> id) (\s@BatchResultErrorEntry' {} a -> s {id = a} :: BatchResultErrorEntry)++-- | An error code representing why the action failed on this entry.+batchResultErrorEntry_code :: Lens.Lens' BatchResultErrorEntry Prelude.Text+batchResultErrorEntry_code = Lens.lens (\BatchResultErrorEntry' {code} -> code) (\s@BatchResultErrorEntry' {} a -> s {code = a} :: BatchResultErrorEntry)++-- | Specifies whether the error happened due to the caller of the batch API+-- action.+batchResultErrorEntry_senderFault :: Lens.Lens' BatchResultErrorEntry Prelude.Bool+batchResultErrorEntry_senderFault = Lens.lens (\BatchResultErrorEntry' {senderFault} -> senderFault) (\s@BatchResultErrorEntry' {} a -> s {senderFault = a} :: BatchResultErrorEntry)++instance Data.FromXML BatchResultErrorEntry where+  parseXML x =+    BatchResultErrorEntry'+      Prelude.<$> (x Data..@? "Message")+      Prelude.<*> (x Data..@ "Id")+      Prelude.<*> (x Data..@ "Code")+      Prelude.<*> (x Data..@ "SenderFault")++instance Prelude.Hashable BatchResultErrorEntry where+  hashWithSalt _salt BatchResultErrorEntry' {..} =+    _salt+      `Prelude.hashWithSalt` message+      `Prelude.hashWithSalt` id+      `Prelude.hashWithSalt` code+      `Prelude.hashWithSalt` senderFault++instance Prelude.NFData BatchResultErrorEntry where+  rnf BatchResultErrorEntry' {..} =+    Prelude.rnf message+      `Prelude.seq` Prelude.rnf id+      `Prelude.seq` Prelude.rnf code+      `Prelude.seq` Prelude.rnf senderFault
+ gen/Amazonka/SNS/Types/Endpoint.hs view
@@ -0,0 +1,84 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SNS.Types.Endpoint+-- 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.SNS.Types.Endpoint 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 endpoint for mobile app and device.+--+-- /See:/ 'newEndpoint' smart constructor.+data Endpoint = Endpoint'+  { -- | Attributes for endpoint.+    attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The @EndpointArn@ for mobile app and device.+    endpointArn :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Endpoint' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'endpoint_attributes' - Attributes for endpoint.+--+-- 'endpointArn', 'endpoint_endpointArn' - The @EndpointArn@ for mobile app and device.+newEndpoint ::+  Endpoint+newEndpoint =+  Endpoint'+    { attributes = Prelude.Nothing,+      endpointArn = Prelude.Nothing+    }++-- | Attributes for endpoint.+endpoint_attributes :: Lens.Lens' Endpoint (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+endpoint_attributes = Lens.lens (\Endpoint' {attributes} -> attributes) (\s@Endpoint' {} a -> s {attributes = a} :: Endpoint) Prelude.. Lens.mapping Lens.coerced++-- | The @EndpointArn@ for mobile app and device.+endpoint_endpointArn :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)+endpoint_endpointArn = Lens.lens (\Endpoint' {endpointArn} -> endpointArn) (\s@Endpoint' {} a -> s {endpointArn = a} :: Endpoint)++instance Data.FromXML Endpoint where+  parseXML x =+    Endpoint'+      Prelude.<$> ( x+                      Data..@? "Attributes"+                      Core..!@ Prelude.mempty+                      Prelude.>>= Core.may (Data.parseXMLMap "entry" "key" "value")+                  )+      Prelude.<*> (x Data..@? "EndpointArn")++instance Prelude.Hashable Endpoint where+  hashWithSalt _salt Endpoint' {..} =+    _salt+      `Prelude.hashWithSalt` attributes+      `Prelude.hashWithSalt` endpointArn++instance Prelude.NFData Endpoint where+  rnf Endpoint' {..} =+    Prelude.rnf attributes+      `Prelude.seq` Prelude.rnf endpointArn
+ gen/Amazonka/SNS/Types/LanguageCodeString.hs view
@@ -0,0 +1,127 @@+{-# 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.SNS.Types.LanguageCodeString+-- 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.SNS.Types.LanguageCodeString+  ( LanguageCodeString+      ( ..,+        LanguageCodeString_De_DE,+        LanguageCodeString_En_GB,+        LanguageCodeString_En_US,+        LanguageCodeString_Es_419,+        LanguageCodeString_Es_ES,+        LanguageCodeString_Fr_CA,+        LanguageCodeString_Fr_FR,+        LanguageCodeString_It_IT,+        LanguageCodeString_Ja_JP,+        LanguageCodeString_Kr_KR,+        LanguageCodeString_Pt_BR,+        LanguageCodeString_Zh_CN,+        LanguageCodeString_Zh_TW+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Supported language code for sending OTP message+newtype LanguageCodeString = LanguageCodeString'+  { fromLanguageCodeString ::+      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 LanguageCodeString_De_DE :: LanguageCodeString+pattern LanguageCodeString_De_DE = LanguageCodeString' "de-DE"++pattern LanguageCodeString_En_GB :: LanguageCodeString+pattern LanguageCodeString_En_GB = LanguageCodeString' "en-GB"++pattern LanguageCodeString_En_US :: LanguageCodeString+pattern LanguageCodeString_En_US = LanguageCodeString' "en-US"++pattern LanguageCodeString_Es_419 :: LanguageCodeString+pattern LanguageCodeString_Es_419 = LanguageCodeString' "es-419"++pattern LanguageCodeString_Es_ES :: LanguageCodeString+pattern LanguageCodeString_Es_ES = LanguageCodeString' "es-ES"++pattern LanguageCodeString_Fr_CA :: LanguageCodeString+pattern LanguageCodeString_Fr_CA = LanguageCodeString' "fr-CA"++pattern LanguageCodeString_Fr_FR :: LanguageCodeString+pattern LanguageCodeString_Fr_FR = LanguageCodeString' "fr-FR"++pattern LanguageCodeString_It_IT :: LanguageCodeString+pattern LanguageCodeString_It_IT = LanguageCodeString' "it-IT"++pattern LanguageCodeString_Ja_JP :: LanguageCodeString+pattern LanguageCodeString_Ja_JP = LanguageCodeString' "ja-JP"++pattern LanguageCodeString_Kr_KR :: LanguageCodeString+pattern LanguageCodeString_Kr_KR = LanguageCodeString' "kr-KR"++pattern LanguageCodeString_Pt_BR :: LanguageCodeString+pattern LanguageCodeString_Pt_BR = LanguageCodeString' "pt-BR"++pattern LanguageCodeString_Zh_CN :: LanguageCodeString+pattern LanguageCodeString_Zh_CN = LanguageCodeString' "zh-CN"++pattern LanguageCodeString_Zh_TW :: LanguageCodeString+pattern LanguageCodeString_Zh_TW = LanguageCodeString' "zh-TW"++{-# COMPLETE+  LanguageCodeString_De_DE,+  LanguageCodeString_En_GB,+  LanguageCodeString_En_US,+  LanguageCodeString_Es_419,+  LanguageCodeString_Es_ES,+  LanguageCodeString_Fr_CA,+  LanguageCodeString_Fr_FR,+  LanguageCodeString_It_IT,+  LanguageCodeString_Ja_JP,+  LanguageCodeString_Kr_KR,+  LanguageCodeString_Pt_BR,+  LanguageCodeString_Zh_CN,+  LanguageCodeString_Zh_TW,+  LanguageCodeString'+  #-}
+ gen/Amazonka/SNS/Types/MessageAttributeValue.hs view
@@ -0,0 +1,132 @@+{-# 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.SNS.Types.MessageAttributeValue+-- 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.SNS.Types.MessageAttributeValue 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 user-specified message attribute value. For string data types, the+-- value attribute has the same restrictions on the content as the message+-- body. For more information, see+-- <https://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish>.+--+-- Name, type, and value must not be empty or null. In addition, the+-- message body should not be empty or null. All parts of the message+-- attribute, including name, type, and value, are included in the message+-- size restriction, which is currently 256 KB (262,144 bytes). For more+-- information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html Amazon SNS message attributes>+-- and+-- <https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html Publishing to a mobile phone>+-- in the /Amazon SNS Developer Guide./+--+-- /See:/ 'newMessageAttributeValue' smart constructor.+data MessageAttributeValue = MessageAttributeValue'+  { -- | Binary type attributes can store any binary data, for example,+    -- compressed data, encrypted data, or images.+    binaryValue :: Prelude.Maybe Data.Base64,+    -- | Strings are Unicode with UTF8 binary encoding. For a list of code+    -- values, see+    -- <https://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters ASCII Printable Characters>.+    stringValue :: Prelude.Maybe Prelude.Text,+    -- | Amazon SNS supports the following logical data types: String,+    -- String.Array, Number, and Binary. For more information, see+    -- <https://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes Message Attribute Data Types>.+    dataType :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MessageAttributeValue' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'binaryValue', 'messageAttributeValue_binaryValue' - Binary type attributes can store any binary data, for example,+-- compressed data, encrypted data, or images.--+-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.+-- -- The underlying isomorphism will encode to Base64 representation during+-- -- serialisation, and decode from Base64 representation during deserialisation.+-- -- This 'Lens' accepts and returns only raw unencoded data.+--+-- 'stringValue', 'messageAttributeValue_stringValue' - Strings are Unicode with UTF8 binary encoding. For a list of code+-- values, see+-- <https://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters ASCII Printable Characters>.+--+-- 'dataType', 'messageAttributeValue_dataType' - Amazon SNS supports the following logical data types: String,+-- String.Array, Number, and Binary. For more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes Message Attribute Data Types>.+newMessageAttributeValue ::+  -- | 'dataType'+  Prelude.Text ->+  MessageAttributeValue+newMessageAttributeValue pDataType_ =+  MessageAttributeValue'+    { binaryValue =+        Prelude.Nothing,+      stringValue = Prelude.Nothing,+      dataType = pDataType_+    }++-- | Binary type attributes can store any binary data, for example,+-- compressed data, encrypted data, or images.--+-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.+-- -- The underlying isomorphism will encode to Base64 representation during+-- -- serialisation, and decode from Base64 representation during deserialisation.+-- -- This 'Lens' accepts and returns only raw unencoded data.+messageAttributeValue_binaryValue :: Lens.Lens' MessageAttributeValue (Prelude.Maybe Prelude.ByteString)+messageAttributeValue_binaryValue = Lens.lens (\MessageAttributeValue' {binaryValue} -> binaryValue) (\s@MessageAttributeValue' {} a -> s {binaryValue = a} :: MessageAttributeValue) Prelude.. Lens.mapping Data._Base64++-- | Strings are Unicode with UTF8 binary encoding. For a list of code+-- values, see+-- <https://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters ASCII Printable Characters>.+messageAttributeValue_stringValue :: Lens.Lens' MessageAttributeValue (Prelude.Maybe Prelude.Text)+messageAttributeValue_stringValue = Lens.lens (\MessageAttributeValue' {stringValue} -> stringValue) (\s@MessageAttributeValue' {} a -> s {stringValue = a} :: MessageAttributeValue)++-- | Amazon SNS supports the following logical data types: String,+-- String.Array, Number, and Binary. For more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes Message Attribute Data Types>.+messageAttributeValue_dataType :: Lens.Lens' MessageAttributeValue Prelude.Text+messageAttributeValue_dataType = Lens.lens (\MessageAttributeValue' {dataType} -> dataType) (\s@MessageAttributeValue' {} a -> s {dataType = a} :: MessageAttributeValue)++instance Prelude.Hashable MessageAttributeValue where+  hashWithSalt _salt MessageAttributeValue' {..} =+    _salt+      `Prelude.hashWithSalt` binaryValue+      `Prelude.hashWithSalt` stringValue+      `Prelude.hashWithSalt` dataType++instance Prelude.NFData MessageAttributeValue where+  rnf MessageAttributeValue' {..} =+    Prelude.rnf binaryValue+      `Prelude.seq` Prelude.rnf stringValue+      `Prelude.seq` Prelude.rnf dataType++instance Data.ToQuery MessageAttributeValue where+  toQuery MessageAttributeValue' {..} =+    Prelude.mconcat+      [ "BinaryValue" Data.=: binaryValue,+        "StringValue" Data.=: stringValue,+        "DataType" Data.=: dataType+      ]
+ gen/Amazonka/SNS/Types/NumberCapability.hs view
@@ -0,0 +1,77 @@+{-# 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.SNS.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.SNS.Types.NumberCapability+  ( NumberCapability+      ( ..,+        NumberCapability_MMS,+        NumberCapability_SMS,+        NumberCapability_VOICE+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Enum listing out all supported number capabilities.+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_MMS :: NumberCapability+pattern NumberCapability_MMS = NumberCapability' "MMS"++pattern NumberCapability_SMS :: NumberCapability+pattern NumberCapability_SMS = NumberCapability' "SMS"++pattern NumberCapability_VOICE :: NumberCapability+pattern NumberCapability_VOICE = NumberCapability' "VOICE"++{-# COMPLETE+  NumberCapability_MMS,+  NumberCapability_SMS,+  NumberCapability_VOICE,+  NumberCapability'+  #-}
+ gen/Amazonka/SNS/Types/PhoneNumberInformation.hs view
@@ -0,0 +1,138 @@+{-# 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.SNS.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.SNS.Types.PhoneNumberInformation 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+import Amazonka.SNS.Types.NumberCapability+import Amazonka.SNS.Types.RouteType++-- | A list of phone numbers and their metadata.+--+-- /See:/ 'newPhoneNumberInformation' smart constructor.+data PhoneNumberInformation = PhoneNumberInformation'+  { -- | The date and time when the phone number was created.+    createdAt :: Prelude.Maybe Data.ISO8601,+    -- | The two-character code for the country or region, in ISO 3166-1 alpha-2+    -- format.+    iso2CountryCode :: Prelude.Maybe Prelude.Text,+    -- | The capabilities of each phone number.+    numberCapabilities :: Prelude.Maybe [NumberCapability],+    -- | The phone number.+    phoneNumber :: Prelude.Maybe Prelude.Text,+    -- | The list of supported routes.+    routeType :: Prelude.Maybe RouteType,+    -- | The status of the phone number.+    status :: Prelude.Maybe Prelude.Text+  }+  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:+--+-- 'createdAt', 'phoneNumberInformation_createdAt' - The date and time when the phone number was created.+--+-- 'iso2CountryCode', 'phoneNumberInformation_iso2CountryCode' - The two-character code for the country or region, in ISO 3166-1 alpha-2+-- format.+--+-- 'numberCapabilities', 'phoneNumberInformation_numberCapabilities' - The capabilities of each phone number.+--+-- 'phoneNumber', 'phoneNumberInformation_phoneNumber' - The phone number.+--+-- 'routeType', 'phoneNumberInformation_routeType' - The list of supported routes.+--+-- 'status', 'phoneNumberInformation_status' - The status of the phone number.+newPhoneNumberInformation ::+  PhoneNumberInformation+newPhoneNumberInformation =+  PhoneNumberInformation'+    { createdAt =+        Prelude.Nothing,+      iso2CountryCode = Prelude.Nothing,+      numberCapabilities = Prelude.Nothing,+      phoneNumber = Prelude.Nothing,+      routeType = Prelude.Nothing,+      status = Prelude.Nothing+    }++-- | The date and time when the phone number was created.+phoneNumberInformation_createdAt :: Lens.Lens' PhoneNumberInformation (Prelude.Maybe Prelude.UTCTime)+phoneNumberInformation_createdAt = Lens.lens (\PhoneNumberInformation' {createdAt} -> createdAt) (\s@PhoneNumberInformation' {} a -> s {createdAt = a} :: PhoneNumberInformation) Prelude.. Lens.mapping Data._Time++-- | The two-character code for the country or region, in ISO 3166-1 alpha-2+-- format.+phoneNumberInformation_iso2CountryCode :: Lens.Lens' PhoneNumberInformation (Prelude.Maybe Prelude.Text)+phoneNumberInformation_iso2CountryCode = Lens.lens (\PhoneNumberInformation' {iso2CountryCode} -> iso2CountryCode) (\s@PhoneNumberInformation' {} a -> s {iso2CountryCode = a} :: PhoneNumberInformation)++-- | The capabilities of each phone number.+phoneNumberInformation_numberCapabilities :: Lens.Lens' PhoneNumberInformation (Prelude.Maybe [NumberCapability])+phoneNumberInformation_numberCapabilities = Lens.lens (\PhoneNumberInformation' {numberCapabilities} -> numberCapabilities) (\s@PhoneNumberInformation' {} a -> s {numberCapabilities = a} :: PhoneNumberInformation) Prelude.. Lens.mapping Lens.coerced++-- | The phone number.+phoneNumberInformation_phoneNumber :: Lens.Lens' PhoneNumberInformation (Prelude.Maybe Prelude.Text)+phoneNumberInformation_phoneNumber = Lens.lens (\PhoneNumberInformation' {phoneNumber} -> phoneNumber) (\s@PhoneNumberInformation' {} a -> s {phoneNumber = a} :: PhoneNumberInformation)++-- | The list of supported routes.+phoneNumberInformation_routeType :: Lens.Lens' PhoneNumberInformation (Prelude.Maybe RouteType)+phoneNumberInformation_routeType = Lens.lens (\PhoneNumberInformation' {routeType} -> routeType) (\s@PhoneNumberInformation' {} a -> s {routeType = a} :: PhoneNumberInformation)++-- | The status of the phone number.+phoneNumberInformation_status :: Lens.Lens' PhoneNumberInformation (Prelude.Maybe Prelude.Text)+phoneNumberInformation_status = Lens.lens (\PhoneNumberInformation' {status} -> status) (\s@PhoneNumberInformation' {} a -> s {status = a} :: PhoneNumberInformation)++instance Data.FromXML PhoneNumberInformation where+  parseXML x =+    PhoneNumberInformation'+      Prelude.<$> (x Data..@? "CreatedAt")+      Prelude.<*> (x Data..@? "Iso2CountryCode")+      Prelude.<*> ( x+                      Data..@? "NumberCapabilities"+                      Core..!@ Prelude.mempty+                      Prelude.>>= Core.may (Data.parseXMLList "member")+                  )+      Prelude.<*> (x Data..@? "PhoneNumber")+      Prelude.<*> (x Data..@? "RouteType")+      Prelude.<*> (x Data..@? "Status")++instance Prelude.Hashable PhoneNumberInformation where+  hashWithSalt _salt PhoneNumberInformation' {..} =+    _salt+      `Prelude.hashWithSalt` createdAt+      `Prelude.hashWithSalt` iso2CountryCode+      `Prelude.hashWithSalt` numberCapabilities+      `Prelude.hashWithSalt` phoneNumber+      `Prelude.hashWithSalt` routeType+      `Prelude.hashWithSalt` status++instance Prelude.NFData PhoneNumberInformation where+  rnf PhoneNumberInformation' {..} =+    Prelude.rnf createdAt+      `Prelude.seq` Prelude.rnf iso2CountryCode+      `Prelude.seq` Prelude.rnf numberCapabilities+      `Prelude.seq` Prelude.rnf phoneNumber+      `Prelude.seq` Prelude.rnf routeType+      `Prelude.seq` Prelude.rnf status
+ gen/Amazonka/SNS/Types/PlatformApplication.hs view
@@ -0,0 +1,84 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SNS.Types.PlatformApplication+-- 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.SNS.Types.PlatformApplication 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++-- | Platform application object.+--+-- /See:/ 'newPlatformApplication' smart constructor.+data PlatformApplication = PlatformApplication'+  { -- | Attributes for platform application object.+    attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | PlatformApplicationArn for platform application object.+    platformApplicationArn :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PlatformApplication' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'attributes', 'platformApplication_attributes' - Attributes for platform application object.+--+-- 'platformApplicationArn', 'platformApplication_platformApplicationArn' - PlatformApplicationArn for platform application object.+newPlatformApplication ::+  PlatformApplication+newPlatformApplication =+  PlatformApplication'+    { attributes = Prelude.Nothing,+      platformApplicationArn = Prelude.Nothing+    }++-- | Attributes for platform application object.+platformApplication_attributes :: Lens.Lens' PlatformApplication (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+platformApplication_attributes = Lens.lens (\PlatformApplication' {attributes} -> attributes) (\s@PlatformApplication' {} a -> s {attributes = a} :: PlatformApplication) Prelude.. Lens.mapping Lens.coerced++-- | PlatformApplicationArn for platform application object.+platformApplication_platformApplicationArn :: Lens.Lens' PlatformApplication (Prelude.Maybe Prelude.Text)+platformApplication_platformApplicationArn = Lens.lens (\PlatformApplication' {platformApplicationArn} -> platformApplicationArn) (\s@PlatformApplication' {} a -> s {platformApplicationArn = a} :: PlatformApplication)++instance Data.FromXML PlatformApplication where+  parseXML x =+    PlatformApplication'+      Prelude.<$> ( x+                      Data..@? "Attributes"+                      Core..!@ Prelude.mempty+                      Prelude.>>= Core.may (Data.parseXMLMap "entry" "key" "value")+                  )+      Prelude.<*> (x Data..@? "PlatformApplicationArn")++instance Prelude.Hashable PlatformApplication where+  hashWithSalt _salt PlatformApplication' {..} =+    _salt+      `Prelude.hashWithSalt` attributes+      `Prelude.hashWithSalt` platformApplicationArn++instance Prelude.NFData PlatformApplication where+  rnf PlatformApplication' {..} =+    Prelude.rnf attributes+      `Prelude.seq` Prelude.rnf platformApplicationArn
+ gen/Amazonka/SNS/Types/PublishBatchRequestEntry.hs view
@@ -0,0 +1,417 @@+{-# 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.SNS.Types.PublishBatchRequestEntry+-- 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.SNS.Types.PublishBatchRequestEntry 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+import Amazonka.SNS.Types.MessageAttributeValue++-- | Contains the details of a single Amazon SNS message along with an @Id@+-- that identifies a message within the batch.+--+-- /See:/ 'newPublishBatchRequestEntry' smart constructor.+data PublishBatchRequestEntry = PublishBatchRequestEntry'+  { -- | Each message attribute consists of a @Name@, @Type@, and @Value@. For+    -- more information, see+    -- <https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html Amazon SNS message attributes>+    -- in the Amazon SNS Developer Guide.+    messageAttributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text MessageAttributeValue),+    -- | This parameter applies only to FIFO (first-in-first-out) topics.+    --+    -- The token used for deduplication of messages within a 5-minute minimum+    -- deduplication interval. If a message with a particular+    -- @MessageDeduplicationId@ is sent successfully, subsequent messages with+    -- the same @MessageDeduplicationId@ are accepted successfully but aren\'t+    -- delivered.+    --+    -- -   Every message must have a unique @MessageDeduplicationId@.+    --+    --     -   You may provide a @MessageDeduplicationId@ explicitly.+    --+    --     -   If you aren\'t able to provide a @MessageDeduplicationId@ and+    --         you enable @ContentBasedDeduplication@ for your topic, Amazon+    --         SNS uses a SHA-256 hash to generate the @MessageDeduplicationId@+    --         using the body of the message (but not the attributes of the+    --         message).+    --+    --     -   If you don\'t provide a @MessageDeduplicationId@ and the topic+    --         doesn\'t have @ContentBasedDeduplication@ set, the action fails+    --         with an error.+    --+    --     -   If the topic has a @ContentBasedDeduplication@ set, your+    --         @MessageDeduplicationId@ overrides the generated one.+    --+    -- -   When @ContentBasedDeduplication@ is in effect, messages with+    --     identical content sent within the deduplication interval are treated+    --     as duplicates and only one copy of the message is delivered.+    --+    -- -   If you send one message with @ContentBasedDeduplication@ enabled,+    --     and then another message with a @MessageDeduplicationId@ that is the+    --     same as the one generated for the first @MessageDeduplicationId@,+    --     the two messages are treated as duplicates and only one copy of the+    --     message is delivered.+    --+    -- The @MessageDeduplicationId@ is available to the consumer of the message+    -- (this can be useful for troubleshooting delivery issues).+    --+    -- If a message is sent successfully but the acknowledgement is lost and+    -- the message is resent with the same @MessageDeduplicationId@ after the+    -- deduplication interval, Amazon SNS can\'t detect duplicate messages.+    --+    -- Amazon SNS continues to keep track of the message deduplication ID even+    -- after the message is received and deleted.+    --+    -- The length of @MessageDeduplicationId@ is 128 characters.+    --+    -- @MessageDeduplicationId@ can contain alphanumeric characters+    -- @(a-z, A-Z, 0-9)@ and punctuation+    -- @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+    messageDeduplicationId :: Prelude.Maybe Prelude.Text,+    -- | This parameter applies only to FIFO (first-in-first-out) topics.+    --+    -- The tag that specifies that a message belongs to a specific message+    -- group. Messages that belong to the same message group are processed in a+    -- FIFO manner (however, messages in different message groups might be+    -- processed out of order). To interleave multiple ordered streams within a+    -- single topic, use @MessageGroupId@ values (for example, session data for+    -- multiple users). In this scenario, multiple consumers can process the+    -- topic, but the session data of each user is processed in a FIFO fashion.+    --+    -- You must associate a non-empty @MessageGroupId@ with a message. If you+    -- don\'t provide a @MessageGroupId@, the action fails.+    --+    -- The length of @MessageGroupId@ is 128 characters.+    --+    -- @MessageGroupId@ can contain alphanumeric characters @(a-z, A-Z, 0-9)@+    -- and punctuation @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+    --+    -- @MessageGroupId@ is required for FIFO topics. You can\'t use it for+    -- standard topics.+    messageGroupId :: Prelude.Maybe Prelude.Text,+    -- | Set @MessageStructure@ to @json@ if you want to send a different message+    -- for each protocol. For example, using one publish action, you can send a+    -- short message to your SMS subscribers and a longer message to your email+    -- subscribers. If you set @MessageStructure@ to @json@, the value of the+    -- @Message@ parameter must:+    --+    -- -   be a syntactically valid JSON object; and+    --+    -- -   contain at least a top-level JSON key of \"default\" with a value+    --     that is a string.+    --+    -- You can define other top-level keys that define the message you want to+    -- send to a specific transport protocol (e.g. http).+    messageStructure :: Prelude.Maybe Prelude.Text,+    -- | The subject of the batch message.+    subject :: Prelude.Maybe Prelude.Text,+    -- | An identifier for the message in this batch.+    --+    -- The @Ids@ of a batch request must be unique within a request.+    --+    -- This identifier can have up to 80 characters. The following characters+    -- are accepted: alphanumeric characters, hyphens(-), and underscores (_).+    id :: Prelude.Text,+    -- | The body of the message.+    message :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PublishBatchRequestEntry' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'messageAttributes', 'publishBatchRequestEntry_messageAttributes' - Each message attribute consists of a @Name@, @Type@, and @Value@. For+-- more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html Amazon SNS message attributes>+-- in the Amazon SNS Developer Guide.+--+-- 'messageDeduplicationId', 'publishBatchRequestEntry_messageDeduplicationId' - This parameter applies only to FIFO (first-in-first-out) topics.+--+-- The token used for deduplication of messages within a 5-minute minimum+-- deduplication interval. If a message with a particular+-- @MessageDeduplicationId@ is sent successfully, subsequent messages with+-- the same @MessageDeduplicationId@ are accepted successfully but aren\'t+-- delivered.+--+-- -   Every message must have a unique @MessageDeduplicationId@.+--+--     -   You may provide a @MessageDeduplicationId@ explicitly.+--+--     -   If you aren\'t able to provide a @MessageDeduplicationId@ and+--         you enable @ContentBasedDeduplication@ for your topic, Amazon+--         SNS uses a SHA-256 hash to generate the @MessageDeduplicationId@+--         using the body of the message (but not the attributes of the+--         message).+--+--     -   If you don\'t provide a @MessageDeduplicationId@ and the topic+--         doesn\'t have @ContentBasedDeduplication@ set, the action fails+--         with an error.+--+--     -   If the topic has a @ContentBasedDeduplication@ set, your+--         @MessageDeduplicationId@ overrides the generated one.+--+-- -   When @ContentBasedDeduplication@ is in effect, messages with+--     identical content sent within the deduplication interval are treated+--     as duplicates and only one copy of the message is delivered.+--+-- -   If you send one message with @ContentBasedDeduplication@ enabled,+--     and then another message with a @MessageDeduplicationId@ that is the+--     same as the one generated for the first @MessageDeduplicationId@,+--     the two messages are treated as duplicates and only one copy of the+--     message is delivered.+--+-- The @MessageDeduplicationId@ is available to the consumer of the message+-- (this can be useful for troubleshooting delivery issues).+--+-- If a message is sent successfully but the acknowledgement is lost and+-- the message is resent with the same @MessageDeduplicationId@ after the+-- deduplication interval, Amazon SNS can\'t detect duplicate messages.+--+-- Amazon SNS continues to keep track of the message deduplication ID even+-- after the message is received and deleted.+--+-- The length of @MessageDeduplicationId@ is 128 characters.+--+-- @MessageDeduplicationId@ can contain alphanumeric characters+-- @(a-z, A-Z, 0-9)@ and punctuation+-- @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+--+-- 'messageGroupId', 'publishBatchRequestEntry_messageGroupId' - This parameter applies only to FIFO (first-in-first-out) topics.+--+-- The tag that specifies that a message belongs to a specific message+-- group. Messages that belong to the same message group are processed in a+-- FIFO manner (however, messages in different message groups might be+-- processed out of order). To interleave multiple ordered streams within a+-- single topic, use @MessageGroupId@ values (for example, session data for+-- multiple users). In this scenario, multiple consumers can process the+-- topic, but the session data of each user is processed in a FIFO fashion.+--+-- You must associate a non-empty @MessageGroupId@ with a message. If you+-- don\'t provide a @MessageGroupId@, the action fails.+--+-- The length of @MessageGroupId@ is 128 characters.+--+-- @MessageGroupId@ can contain alphanumeric characters @(a-z, A-Z, 0-9)@+-- and punctuation @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+--+-- @MessageGroupId@ is required for FIFO topics. You can\'t use it for+-- standard topics.+--+-- 'messageStructure', 'publishBatchRequestEntry_messageStructure' - Set @MessageStructure@ to @json@ if you want to send a different message+-- for each protocol. For example, using one publish action, you can send a+-- short message to your SMS subscribers and a longer message to your email+-- subscribers. If you set @MessageStructure@ to @json@, the value of the+-- @Message@ parameter must:+--+-- -   be a syntactically valid JSON object; and+--+-- -   contain at least a top-level JSON key of \"default\" with a value+--     that is a string.+--+-- You can define other top-level keys that define the message you want to+-- send to a specific transport protocol (e.g. http).+--+-- 'subject', 'publishBatchRequestEntry_subject' - The subject of the batch message.+--+-- 'id', 'publishBatchRequestEntry_id' - An identifier for the message in this batch.+--+-- The @Ids@ of a batch request must be unique within a request.+--+-- This identifier can have up to 80 characters. The following characters+-- are accepted: alphanumeric characters, hyphens(-), and underscores (_).+--+-- 'message', 'publishBatchRequestEntry_message' - The body of the message.+newPublishBatchRequestEntry ::+  -- | 'id'+  Prelude.Text ->+  -- | 'message'+  Prelude.Text ->+  PublishBatchRequestEntry+newPublishBatchRequestEntry pId_ pMessage_ =+  PublishBatchRequestEntry'+    { messageAttributes =+        Prelude.Nothing,+      messageDeduplicationId = Prelude.Nothing,+      messageGroupId = Prelude.Nothing,+      messageStructure = Prelude.Nothing,+      subject = Prelude.Nothing,+      id = pId_,+      message = pMessage_+    }++-- | Each message attribute consists of a @Name@, @Type@, and @Value@. For+-- more information, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html Amazon SNS message attributes>+-- in the Amazon SNS Developer Guide.+publishBatchRequestEntry_messageAttributes :: Lens.Lens' PublishBatchRequestEntry (Prelude.Maybe (Prelude.HashMap Prelude.Text MessageAttributeValue))+publishBatchRequestEntry_messageAttributes = Lens.lens (\PublishBatchRequestEntry' {messageAttributes} -> messageAttributes) (\s@PublishBatchRequestEntry' {} a -> s {messageAttributes = a} :: PublishBatchRequestEntry) Prelude.. Lens.mapping Lens.coerced++-- | This parameter applies only to FIFO (first-in-first-out) topics.+--+-- The token used for deduplication of messages within a 5-minute minimum+-- deduplication interval. If a message with a particular+-- @MessageDeduplicationId@ is sent successfully, subsequent messages with+-- the same @MessageDeduplicationId@ are accepted successfully but aren\'t+-- delivered.+--+-- -   Every message must have a unique @MessageDeduplicationId@.+--+--     -   You may provide a @MessageDeduplicationId@ explicitly.+--+--     -   If you aren\'t able to provide a @MessageDeduplicationId@ and+--         you enable @ContentBasedDeduplication@ for your topic, Amazon+--         SNS uses a SHA-256 hash to generate the @MessageDeduplicationId@+--         using the body of the message (but not the attributes of the+--         message).+--+--     -   If you don\'t provide a @MessageDeduplicationId@ and the topic+--         doesn\'t have @ContentBasedDeduplication@ set, the action fails+--         with an error.+--+--     -   If the topic has a @ContentBasedDeduplication@ set, your+--         @MessageDeduplicationId@ overrides the generated one.+--+-- -   When @ContentBasedDeduplication@ is in effect, messages with+--     identical content sent within the deduplication interval are treated+--     as duplicates and only one copy of the message is delivered.+--+-- -   If you send one message with @ContentBasedDeduplication@ enabled,+--     and then another message with a @MessageDeduplicationId@ that is the+--     same as the one generated for the first @MessageDeduplicationId@,+--     the two messages are treated as duplicates and only one copy of the+--     message is delivered.+--+-- The @MessageDeduplicationId@ is available to the consumer of the message+-- (this can be useful for troubleshooting delivery issues).+--+-- If a message is sent successfully but the acknowledgement is lost and+-- the message is resent with the same @MessageDeduplicationId@ after the+-- deduplication interval, Amazon SNS can\'t detect duplicate messages.+--+-- Amazon SNS continues to keep track of the message deduplication ID even+-- after the message is received and deleted.+--+-- The length of @MessageDeduplicationId@ is 128 characters.+--+-- @MessageDeduplicationId@ can contain alphanumeric characters+-- @(a-z, A-Z, 0-9)@ and punctuation+-- @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+publishBatchRequestEntry_messageDeduplicationId :: Lens.Lens' PublishBatchRequestEntry (Prelude.Maybe Prelude.Text)+publishBatchRequestEntry_messageDeduplicationId = Lens.lens (\PublishBatchRequestEntry' {messageDeduplicationId} -> messageDeduplicationId) (\s@PublishBatchRequestEntry' {} a -> s {messageDeduplicationId = a} :: PublishBatchRequestEntry)++-- | This parameter applies only to FIFO (first-in-first-out) topics.+--+-- The tag that specifies that a message belongs to a specific message+-- group. Messages that belong to the same message group are processed in a+-- FIFO manner (however, messages in different message groups might be+-- processed out of order). To interleave multiple ordered streams within a+-- single topic, use @MessageGroupId@ values (for example, session data for+-- multiple users). In this scenario, multiple consumers can process the+-- topic, but the session data of each user is processed in a FIFO fashion.+--+-- You must associate a non-empty @MessageGroupId@ with a message. If you+-- don\'t provide a @MessageGroupId@, the action fails.+--+-- The length of @MessageGroupId@ is 128 characters.+--+-- @MessageGroupId@ can contain alphanumeric characters @(a-z, A-Z, 0-9)@+-- and punctuation @(!\"#$%&\'()*+,-.\/:;\<=>?\@[\\]^_\`{|}~)@.+--+-- @MessageGroupId@ is required for FIFO topics. You can\'t use it for+-- standard topics.+publishBatchRequestEntry_messageGroupId :: Lens.Lens' PublishBatchRequestEntry (Prelude.Maybe Prelude.Text)+publishBatchRequestEntry_messageGroupId = Lens.lens (\PublishBatchRequestEntry' {messageGroupId} -> messageGroupId) (\s@PublishBatchRequestEntry' {} a -> s {messageGroupId = a} :: PublishBatchRequestEntry)++-- | Set @MessageStructure@ to @json@ if you want to send a different message+-- for each protocol. For example, using one publish action, you can send a+-- short message to your SMS subscribers and a longer message to your email+-- subscribers. If you set @MessageStructure@ to @json@, the value of the+-- @Message@ parameter must:+--+-- -   be a syntactically valid JSON object; and+--+-- -   contain at least a top-level JSON key of \"default\" with a value+--     that is a string.+--+-- You can define other top-level keys that define the message you want to+-- send to a specific transport protocol (e.g. http).+publishBatchRequestEntry_messageStructure :: Lens.Lens' PublishBatchRequestEntry (Prelude.Maybe Prelude.Text)+publishBatchRequestEntry_messageStructure = Lens.lens (\PublishBatchRequestEntry' {messageStructure} -> messageStructure) (\s@PublishBatchRequestEntry' {} a -> s {messageStructure = a} :: PublishBatchRequestEntry)++-- | The subject of the batch message.+publishBatchRequestEntry_subject :: Lens.Lens' PublishBatchRequestEntry (Prelude.Maybe Prelude.Text)+publishBatchRequestEntry_subject = Lens.lens (\PublishBatchRequestEntry' {subject} -> subject) (\s@PublishBatchRequestEntry' {} a -> s {subject = a} :: PublishBatchRequestEntry)++-- | An identifier for the message in this batch.+--+-- The @Ids@ of a batch request must be unique within a request.+--+-- This identifier can have up to 80 characters. The following characters+-- are accepted: alphanumeric characters, hyphens(-), and underscores (_).+publishBatchRequestEntry_id :: Lens.Lens' PublishBatchRequestEntry Prelude.Text+publishBatchRequestEntry_id = Lens.lens (\PublishBatchRequestEntry' {id} -> id) (\s@PublishBatchRequestEntry' {} a -> s {id = a} :: PublishBatchRequestEntry)++-- | The body of the message.+publishBatchRequestEntry_message :: Lens.Lens' PublishBatchRequestEntry Prelude.Text+publishBatchRequestEntry_message = Lens.lens (\PublishBatchRequestEntry' {message} -> message) (\s@PublishBatchRequestEntry' {} a -> s {message = a} :: PublishBatchRequestEntry)++instance Prelude.Hashable PublishBatchRequestEntry where+  hashWithSalt _salt PublishBatchRequestEntry' {..} =+    _salt+      `Prelude.hashWithSalt` messageAttributes+      `Prelude.hashWithSalt` messageDeduplicationId+      `Prelude.hashWithSalt` messageGroupId+      `Prelude.hashWithSalt` messageStructure+      `Prelude.hashWithSalt` subject+      `Prelude.hashWithSalt` id+      `Prelude.hashWithSalt` message++instance Prelude.NFData PublishBatchRequestEntry where+  rnf PublishBatchRequestEntry' {..} =+    Prelude.rnf messageAttributes+      `Prelude.seq` Prelude.rnf messageDeduplicationId+      `Prelude.seq` Prelude.rnf messageGroupId+      `Prelude.seq` Prelude.rnf messageStructure+      `Prelude.seq` Prelude.rnf subject+      `Prelude.seq` Prelude.rnf id+      `Prelude.seq` Prelude.rnf message++instance Data.ToQuery PublishBatchRequestEntry where+  toQuery PublishBatchRequestEntry' {..} =+    Prelude.mconcat+      [ "MessageAttributes"+          Data.=: Data.toQuery+            ( Data.toQueryMap "entry" "Name" "Value"+                Prelude.<$> messageAttributes+            ),+        "MessageDeduplicationId"+          Data.=: messageDeduplicationId,+        "MessageGroupId" Data.=: messageGroupId,+        "MessageStructure" Data.=: messageStructure,+        "Subject" Data.=: subject,+        "Id" Data.=: id,+        "Message" Data.=: message+      ]
+ gen/Amazonka/SNS/Types/PublishBatchResultEntry.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.SNS.Types.PublishBatchResultEntry+-- 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.SNS.Types.PublishBatchResultEntry 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++-- | Encloses data related to a successful message in a batch request for+-- topic.+--+-- /See:/ 'newPublishBatchResultEntry' smart constructor.+data PublishBatchResultEntry = PublishBatchResultEntry'+  { -- | The @Id@ of an entry in a batch request.+    id :: Prelude.Maybe Prelude.Text,+    -- | An identifier for the message.+    messageId :: Prelude.Maybe Prelude.Text,+    -- | This parameter applies only to FIFO (first-in-first-out) topics.+    --+    -- The large, non-consecutive number that Amazon SNS assigns to each+    -- message.+    --+    -- The length of @SequenceNumber@ is 128 bits. @SequenceNumber@ continues+    -- to increase for a particular @MessageGroupId@.+    sequenceNumber :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PublishBatchResultEntry' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'id', 'publishBatchResultEntry_id' - The @Id@ of an entry in a batch request.+--+-- 'messageId', 'publishBatchResultEntry_messageId' - An identifier for the message.+--+-- 'sequenceNumber', 'publishBatchResultEntry_sequenceNumber' - This parameter applies only to FIFO (first-in-first-out) topics.+--+-- The large, non-consecutive number that Amazon SNS assigns to each+-- message.+--+-- The length of @SequenceNumber@ is 128 bits. @SequenceNumber@ continues+-- to increase for a particular @MessageGroupId@.+newPublishBatchResultEntry ::+  PublishBatchResultEntry+newPublishBatchResultEntry =+  PublishBatchResultEntry'+    { id = Prelude.Nothing,+      messageId = Prelude.Nothing,+      sequenceNumber = Prelude.Nothing+    }++-- | The @Id@ of an entry in a batch request.+publishBatchResultEntry_id :: Lens.Lens' PublishBatchResultEntry (Prelude.Maybe Prelude.Text)+publishBatchResultEntry_id = Lens.lens (\PublishBatchResultEntry' {id} -> id) (\s@PublishBatchResultEntry' {} a -> s {id = a} :: PublishBatchResultEntry)++-- | An identifier for the message.+publishBatchResultEntry_messageId :: Lens.Lens' PublishBatchResultEntry (Prelude.Maybe Prelude.Text)+publishBatchResultEntry_messageId = Lens.lens (\PublishBatchResultEntry' {messageId} -> messageId) (\s@PublishBatchResultEntry' {} a -> s {messageId = a} :: PublishBatchResultEntry)++-- | This parameter applies only to FIFO (first-in-first-out) topics.+--+-- The large, non-consecutive number that Amazon SNS assigns to each+-- message.+--+-- The length of @SequenceNumber@ is 128 bits. @SequenceNumber@ continues+-- to increase for a particular @MessageGroupId@.+publishBatchResultEntry_sequenceNumber :: Lens.Lens' PublishBatchResultEntry (Prelude.Maybe Prelude.Text)+publishBatchResultEntry_sequenceNumber = Lens.lens (\PublishBatchResultEntry' {sequenceNumber} -> sequenceNumber) (\s@PublishBatchResultEntry' {} a -> s {sequenceNumber = a} :: PublishBatchResultEntry)++instance Data.FromXML PublishBatchResultEntry where+  parseXML x =+    PublishBatchResultEntry'+      Prelude.<$> (x Data..@? "Id")+      Prelude.<*> (x Data..@? "MessageId")+      Prelude.<*> (x Data..@? "SequenceNumber")++instance Prelude.Hashable PublishBatchResultEntry where+  hashWithSalt _salt PublishBatchResultEntry' {..} =+    _salt+      `Prelude.hashWithSalt` id+      `Prelude.hashWithSalt` messageId+      `Prelude.hashWithSalt` sequenceNumber++instance Prelude.NFData PublishBatchResultEntry where+  rnf PublishBatchResultEntry' {..} =+    Prelude.rnf id+      `Prelude.seq` Prelude.rnf messageId+      `Prelude.seq` Prelude.rnf sequenceNumber
+ gen/Amazonka/SNS/Types/RouteType.hs view
@@ -0,0 +1,79 @@+{-# 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.SNS.Types.RouteType+-- 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.SNS.Types.RouteType+  ( RouteType+      ( ..,+        RouteType_Premium,+        RouteType_Promotional,+        RouteType_Transactional+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Enum listing out all supported route types. The following enum values+-- are supported. 1. Transactional : Non-marketing traffic 2. Promotional :+-- Marketing 3. Premium : Premium routes for OTP delivery to the carriers+newtype RouteType = RouteType'+  { fromRouteType ::+      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 RouteType_Premium :: RouteType+pattern RouteType_Premium = RouteType' "Premium"++pattern RouteType_Promotional :: RouteType+pattern RouteType_Promotional = RouteType' "Promotional"++pattern RouteType_Transactional :: RouteType+pattern RouteType_Transactional = RouteType' "Transactional"++{-# COMPLETE+  RouteType_Premium,+  RouteType_Promotional,+  RouteType_Transactional,+  RouteType'+  #-}
+ gen/Amazonka/SNS/Types/SMSSandboxPhoneNumber.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.SNS.Types.SMSSandboxPhoneNumber+-- 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.SNS.Types.SMSSandboxPhoneNumber 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+import Amazonka.SNS.Types.SMSSandboxPhoneNumberVerificationStatus++-- | A verified or pending destination phone number in the SMS sandbox.+--+-- When you start using Amazon SNS to send SMS messages, your Amazon Web+-- Services account is in the /SMS sandbox/. The SMS sandbox provides a+-- safe environment for you to try Amazon SNS features without risking your+-- reputation as an SMS sender. While your Amazon Web Services account is+-- in the SMS sandbox, you can use all of the features of Amazon SNS.+-- However, you can send SMS messages only to verified destination phone+-- numbers. For more information, including how to move out of the sandbox+-- to send messages without restrictions, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html SMS sandbox>+-- in the /Amazon SNS Developer Guide/.+--+-- /See:/ 'newSMSSandboxPhoneNumber' smart constructor.+data SMSSandboxPhoneNumber = SMSSandboxPhoneNumber'+  { -- | The destination phone number.+    phoneNumber :: Prelude.Maybe Prelude.Text,+    -- | The destination phone number\'s verification status.+    status :: Prelude.Maybe SMSSandboxPhoneNumberVerificationStatus+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SMSSandboxPhoneNumber' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'phoneNumber', 'sMSSandboxPhoneNumber_phoneNumber' - The destination phone number.+--+-- 'status', 'sMSSandboxPhoneNumber_status' - The destination phone number\'s verification status.+newSMSSandboxPhoneNumber ::+  SMSSandboxPhoneNumber+newSMSSandboxPhoneNumber =+  SMSSandboxPhoneNumber'+    { phoneNumber =+        Prelude.Nothing,+      status = Prelude.Nothing+    }++-- | The destination phone number.+sMSSandboxPhoneNumber_phoneNumber :: Lens.Lens' SMSSandboxPhoneNumber (Prelude.Maybe Prelude.Text)+sMSSandboxPhoneNumber_phoneNumber = Lens.lens (\SMSSandboxPhoneNumber' {phoneNumber} -> phoneNumber) (\s@SMSSandboxPhoneNumber' {} a -> s {phoneNumber = a} :: SMSSandboxPhoneNumber)++-- | The destination phone number\'s verification status.+sMSSandboxPhoneNumber_status :: Lens.Lens' SMSSandboxPhoneNumber (Prelude.Maybe SMSSandboxPhoneNumberVerificationStatus)+sMSSandboxPhoneNumber_status = Lens.lens (\SMSSandboxPhoneNumber' {status} -> status) (\s@SMSSandboxPhoneNumber' {} a -> s {status = a} :: SMSSandboxPhoneNumber)++instance Data.FromXML SMSSandboxPhoneNumber where+  parseXML x =+    SMSSandboxPhoneNumber'+      Prelude.<$> (x Data..@? "PhoneNumber")+      Prelude.<*> (x Data..@? "Status")++instance Prelude.Hashable SMSSandboxPhoneNumber where+  hashWithSalt _salt SMSSandboxPhoneNumber' {..} =+    _salt+      `Prelude.hashWithSalt` phoneNumber+      `Prelude.hashWithSalt` status++instance Prelude.NFData SMSSandboxPhoneNumber where+  rnf SMSSandboxPhoneNumber' {..} =+    Prelude.rnf phoneNumber+      `Prelude.seq` Prelude.rnf status
+ gen/Amazonka/SNS/Types/SMSSandboxPhoneNumberVerificationStatus.hs view
@@ -0,0 +1,75 @@+{-# 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.SNS.Types.SMSSandboxPhoneNumberVerificationStatus+-- 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.SNS.Types.SMSSandboxPhoneNumberVerificationStatus+  ( SMSSandboxPhoneNumberVerificationStatus+      ( ..,+        SMSSandboxPhoneNumberVerificationStatus_Pending,+        SMSSandboxPhoneNumberVerificationStatus_Verified+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Enum listing out all supported destination phone number verification+-- statuses. The following enum values are supported. 1. PENDING : The+-- destination phone number is pending verification. 2. VERIFIED : The+-- destination phone number is verified.+newtype SMSSandboxPhoneNumberVerificationStatus = SMSSandboxPhoneNumberVerificationStatus'+  { fromSMSSandboxPhoneNumberVerificationStatus ::+      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 SMSSandboxPhoneNumberVerificationStatus_Pending :: SMSSandboxPhoneNumberVerificationStatus+pattern SMSSandboxPhoneNumberVerificationStatus_Pending = SMSSandboxPhoneNumberVerificationStatus' "Pending"++pattern SMSSandboxPhoneNumberVerificationStatus_Verified :: SMSSandboxPhoneNumberVerificationStatus+pattern SMSSandboxPhoneNumberVerificationStatus_Verified = SMSSandboxPhoneNumberVerificationStatus' "Verified"++{-# COMPLETE+  SMSSandboxPhoneNumberVerificationStatus_Pending,+  SMSSandboxPhoneNumberVerificationStatus_Verified,+  SMSSandboxPhoneNumberVerificationStatus'+  #-}
+ gen/Amazonka/SNS/Types/Subscription.hs view
@@ -0,0 +1,116 @@+{-# 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.SNS.Types.Subscription+-- 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.SNS.Types.Subscription 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++-- | A wrapper type for the attributes of an Amazon SNS subscription.+--+-- /See:/ 'newSubscription' smart constructor.+data Subscription = Subscription'+  { -- | The subscription\'s endpoint (format depends on the protocol).+    endpoint :: Prelude.Maybe Prelude.Text,+    -- | The subscription\'s owner.+    owner :: Prelude.Maybe Prelude.Text,+    -- | The subscription\'s protocol.+    protocol :: Prelude.Maybe Prelude.Text,+    -- | The subscription\'s ARN.+    subscriptionArn :: Prelude.Maybe Prelude.Text,+    -- | The ARN of the subscription\'s topic.+    topicArn :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Subscription' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'endpoint', 'subscription_endpoint' - The subscription\'s endpoint (format depends on the protocol).+--+-- 'owner', 'subscription_owner' - The subscription\'s owner.+--+-- 'protocol', 'subscription_protocol' - The subscription\'s protocol.+--+-- 'subscriptionArn', 'subscription_subscriptionArn' - The subscription\'s ARN.+--+-- 'topicArn', 'subscription_topicArn' - The ARN of the subscription\'s topic.+newSubscription ::+  Subscription+newSubscription =+  Subscription'+    { endpoint = Prelude.Nothing,+      owner = Prelude.Nothing,+      protocol = Prelude.Nothing,+      subscriptionArn = Prelude.Nothing,+      topicArn = Prelude.Nothing+    }++-- | The subscription\'s endpoint (format depends on the protocol).+subscription_endpoint :: Lens.Lens' Subscription (Prelude.Maybe Prelude.Text)+subscription_endpoint = Lens.lens (\Subscription' {endpoint} -> endpoint) (\s@Subscription' {} a -> s {endpoint = a} :: Subscription)++-- | The subscription\'s owner.+subscription_owner :: Lens.Lens' Subscription (Prelude.Maybe Prelude.Text)+subscription_owner = Lens.lens (\Subscription' {owner} -> owner) (\s@Subscription' {} a -> s {owner = a} :: Subscription)++-- | The subscription\'s protocol.+subscription_protocol :: Lens.Lens' Subscription (Prelude.Maybe Prelude.Text)+subscription_protocol = Lens.lens (\Subscription' {protocol} -> protocol) (\s@Subscription' {} a -> s {protocol = a} :: Subscription)++-- | The subscription\'s ARN.+subscription_subscriptionArn :: Lens.Lens' Subscription (Prelude.Maybe Prelude.Text)+subscription_subscriptionArn = Lens.lens (\Subscription' {subscriptionArn} -> subscriptionArn) (\s@Subscription' {} a -> s {subscriptionArn = a} :: Subscription)++-- | The ARN of the subscription\'s topic.+subscription_topicArn :: Lens.Lens' Subscription (Prelude.Maybe Prelude.Text)+subscription_topicArn = Lens.lens (\Subscription' {topicArn} -> topicArn) (\s@Subscription' {} a -> s {topicArn = a} :: Subscription)++instance Data.FromXML Subscription where+  parseXML x =+    Subscription'+      Prelude.<$> (x Data..@? "Endpoint")+      Prelude.<*> (x Data..@? "Owner")+      Prelude.<*> (x Data..@? "Protocol")+      Prelude.<*> (x Data..@? "SubscriptionArn")+      Prelude.<*> (x Data..@? "TopicArn")++instance Prelude.Hashable Subscription where+  hashWithSalt _salt Subscription' {..} =+    _salt+      `Prelude.hashWithSalt` endpoint+      `Prelude.hashWithSalt` owner+      `Prelude.hashWithSalt` protocol+      `Prelude.hashWithSalt` subscriptionArn+      `Prelude.hashWithSalt` topicArn++instance Prelude.NFData Subscription where+  rnf Subscription' {..} =+    Prelude.rnf endpoint+      `Prelude.seq` Prelude.rnf owner+      `Prelude.seq` Prelude.rnf protocol+      `Prelude.seq` Prelude.rnf subscriptionArn+      `Prelude.seq` Prelude.rnf topicArn
+ gen/Amazonka/SNS/Types/Tag.hs view
@@ -0,0 +1,85 @@+{-# 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.SNS.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.SNS.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 required key portion of the tag.+    key :: Prelude.Text,+    -- | The optional value portion 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 required key portion of the tag.+--+-- 'value', 'tag_value' - The optional value portion of the tag.+newTag ::+  -- | 'key'+  Prelude.Text ->+  -- | 'value'+  Prelude.Text ->+  Tag+newTag pKey_ pValue_ =+  Tag' {key = pKey_, value = pValue_}++-- | The required key portion 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 optional value portion 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.FromXML Tag where+  parseXML 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.ToQuery Tag where+  toQuery Tag' {..} =+    Prelude.mconcat+      ["Key" Data.=: key, "Value" Data.=: value]
+ gen/Amazonka/SNS/Types/Topic.hs view
@@ -0,0 +1,63 @@+{-# 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.SNS.Types.Topic+-- 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.SNS.Types.Topic 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++-- | A wrapper type for the topic\'s Amazon Resource Name (ARN). To retrieve+-- a topic\'s attributes, use @GetTopicAttributes@.+--+-- /See:/ 'newTopic' smart constructor.+data Topic = Topic'+  { -- | The topic\'s ARN.+    topicArn :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Topic' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'topic_topicArn' - The topic\'s ARN.+newTopic ::+  Topic+newTopic = Topic' {topicArn = Prelude.Nothing}++-- | The topic\'s ARN.+topic_topicArn :: Lens.Lens' Topic (Prelude.Maybe Prelude.Text)+topic_topicArn = Lens.lens (\Topic' {topicArn} -> topicArn) (\s@Topic' {} a -> s {topicArn = a} :: Topic)++instance Data.FromXML Topic where+  parseXML x =+    Topic' Prelude.<$> (x Data..@? "TopicArn")++instance Prelude.Hashable Topic where+  hashWithSalt _salt Topic' {..} =+    _salt `Prelude.hashWithSalt` topicArn++instance Prelude.NFData Topic where+  rnf Topic' {..} = Prelude.rnf topicArn
+ gen/Amazonka/SNS/Unsubscribe.hs view
@@ -0,0 +1,131 @@+{-# 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.SNS.Unsubscribe+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a subscription. If the subscription requires authentication for+-- deletion, only the owner of the subscription or the topic\'s owner can+-- unsubscribe, and an Amazon Web Services signature is required. If the+-- @Unsubscribe@ call does not require authentication and the requester is+-- not the subscription owner, a final cancellation message is delivered to+-- the endpoint, so that the endpoint owner can easily resubscribe to the+-- topic if the @Unsubscribe@ request was unintended.+--+-- Amazon SQS queue subscriptions require authentication for deletion. Only+-- the owner of the subscription, or the owner of the topic can unsubscribe+-- using the required Amazon Web Services signature.+--+-- This action is throttled at 100 transactions per second (TPS).+module Amazonka.SNS.Unsubscribe+  ( -- * Creating a Request+    Unsubscribe (..),+    newUnsubscribe,++    -- * Request Lenses+    unsubscribe_subscriptionArn,++    -- * Destructuring the Response+    UnsubscribeResponse (..),+    newUnsubscribeResponse,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | Input for Unsubscribe action.+--+-- /See:/ 'newUnsubscribe' smart constructor.+data Unsubscribe = Unsubscribe'+  { -- | The ARN of the subscription to be deleted.+    subscriptionArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Unsubscribe' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'subscriptionArn', 'unsubscribe_subscriptionArn' - The ARN of the subscription to be deleted.+newUnsubscribe ::+  -- | 'subscriptionArn'+  Prelude.Text ->+  Unsubscribe+newUnsubscribe pSubscriptionArn_ =+  Unsubscribe' {subscriptionArn = pSubscriptionArn_}++-- | The ARN of the subscription to be deleted.+unsubscribe_subscriptionArn :: Lens.Lens' Unsubscribe Prelude.Text+unsubscribe_subscriptionArn = Lens.lens (\Unsubscribe' {subscriptionArn} -> subscriptionArn) (\s@Unsubscribe' {} a -> s {subscriptionArn = a} :: Unsubscribe)++instance Core.AWSRequest Unsubscribe where+  type AWSResponse Unsubscribe = UnsubscribeResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response = Response.receiveNull UnsubscribeResponse'++instance Prelude.Hashable Unsubscribe where+  hashWithSalt _salt Unsubscribe' {..} =+    _salt `Prelude.hashWithSalt` subscriptionArn++instance Prelude.NFData Unsubscribe where+  rnf Unsubscribe' {..} = Prelude.rnf subscriptionArn++instance Data.ToHeaders Unsubscribe where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath Unsubscribe where+  toPath = Prelude.const "/"++instance Data.ToQuery Unsubscribe where+  toQuery Unsubscribe' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("Unsubscribe" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "SubscriptionArn" Data.=: subscriptionArn+      ]++-- | /See:/ 'newUnsubscribeResponse' smart constructor.+data UnsubscribeResponse = UnsubscribeResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UnsubscribeResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newUnsubscribeResponse ::+  UnsubscribeResponse+newUnsubscribeResponse = UnsubscribeResponse'++instance Prelude.NFData UnsubscribeResponse where+  rnf _ = ()
+ gen/Amazonka/SNS/UntagResource.hs view
@@ -0,0 +1,161 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SNS.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)+--+-- Remove tags from the specified Amazon SNS topic. For an overview, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-tags.html Amazon SNS Tags>+-- in the /Amazon SNS Developer Guide/.+module Amazonka.SNS.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 qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+  { -- | The ARN of the topic from which to remove tags.+    resourceArn :: Prelude.Text,+    -- | The list of tag keys to remove from the specified topic.+    tagKeys :: [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'untagResource_resourceArn' - The ARN of the topic from which to remove tags.+--+-- 'tagKeys', 'untagResource_tagKeys' - The list of tag keys to remove from the specified topic.+newUntagResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  UntagResource+newUntagResource pResourceArn_ =+  UntagResource'+    { resourceArn = pResourceArn_,+      tagKeys = Prelude.mempty+    }++-- | The ARN of the topic from which to remove tags.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | The list of tag keys to remove from the specified topic.+untagResource_tagKeys :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+  type+    AWSResponse UntagResource =+      UntagResourceResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "UntagResourceResult"+      ( \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.mempty++instance Data.ToPath UntagResource where+  toPath = Prelude.const "/"++instance Data.ToQuery UntagResource where+  toQuery UntagResource' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ("UntagResource" :: Prelude.ByteString),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "ResourceArn" Data.=: resourceArn,+        "TagKeys" Data.=: Data.toQueryList "member" tagKeys+      ]++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code.+newUntagResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UntagResourceResponse+newUntagResourceResponse pHttpStatus_ =+  UntagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int+untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse)++instance Prelude.NFData UntagResourceResponse where+  rnf UntagResourceResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/SNS/VerifySMSSandboxPhoneNumber.hs view
@@ -0,0 +1,189 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SNS.VerifySMSSandboxPhoneNumber+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Verifies a destination phone number with a one-time password (OTP) for+-- the calling Amazon Web Services account.+--+-- When you start using Amazon SNS to send SMS messages, your Amazon Web+-- Services account is in the /SMS sandbox/. The SMS sandbox provides a+-- safe environment for you to try Amazon SNS features without risking your+-- reputation as an SMS sender. While your Amazon Web Services account is+-- in the SMS sandbox, you can use all of the features of Amazon SNS.+-- However, you can send SMS messages only to verified destination phone+-- numbers. For more information, including how to move out of the sandbox+-- to send messages without restrictions, see+-- <https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html SMS sandbox>+-- in the /Amazon SNS Developer Guide/.+module Amazonka.SNS.VerifySMSSandboxPhoneNumber+  ( -- * Creating a Request+    VerifySMSSandboxPhoneNumber (..),+    newVerifySMSSandboxPhoneNumber,++    -- * Request Lenses+    verifySMSSandboxPhoneNumber_phoneNumber,+    verifySMSSandboxPhoneNumber_oneTimePassword,++    -- * Destructuring the Response+    VerifySMSSandboxPhoneNumberResponse (..),+    newVerifySMSSandboxPhoneNumberResponse,++    -- * Response Lenses+    verifySMSSandboxPhoneNumberResponse_httpStatus,+  )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SNS.Types++-- | /See:/ 'newVerifySMSSandboxPhoneNumber' smart constructor.+data VerifySMSSandboxPhoneNumber = VerifySMSSandboxPhoneNumber'+  { -- | The destination phone number to verify.+    phoneNumber :: Prelude.Text,+    -- | The OTP sent to the destination number from the+    -- @CreateSMSSandBoxPhoneNumber@ call.+    oneTimePassword :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VerifySMSSandboxPhoneNumber' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'phoneNumber', 'verifySMSSandboxPhoneNumber_phoneNumber' - The destination phone number to verify.+--+-- 'oneTimePassword', 'verifySMSSandboxPhoneNumber_oneTimePassword' - The OTP sent to the destination number from the+-- @CreateSMSSandBoxPhoneNumber@ call.+newVerifySMSSandboxPhoneNumber ::+  -- | 'phoneNumber'+  Prelude.Text ->+  -- | 'oneTimePassword'+  Prelude.Text ->+  VerifySMSSandboxPhoneNumber+newVerifySMSSandboxPhoneNumber+  pPhoneNumber_+  pOneTimePassword_ =+    VerifySMSSandboxPhoneNumber'+      { phoneNumber =+          pPhoneNumber_,+        oneTimePassword = pOneTimePassword_+      }++-- | The destination phone number to verify.+verifySMSSandboxPhoneNumber_phoneNumber :: Lens.Lens' VerifySMSSandboxPhoneNumber Prelude.Text+verifySMSSandboxPhoneNumber_phoneNumber = Lens.lens (\VerifySMSSandboxPhoneNumber' {phoneNumber} -> phoneNumber) (\s@VerifySMSSandboxPhoneNumber' {} a -> s {phoneNumber = a} :: VerifySMSSandboxPhoneNumber)++-- | The OTP sent to the destination number from the+-- @CreateSMSSandBoxPhoneNumber@ call.+verifySMSSandboxPhoneNumber_oneTimePassword :: Lens.Lens' VerifySMSSandboxPhoneNumber Prelude.Text+verifySMSSandboxPhoneNumber_oneTimePassword = Lens.lens (\VerifySMSSandboxPhoneNumber' {oneTimePassword} -> oneTimePassword) (\s@VerifySMSSandboxPhoneNumber' {} a -> s {oneTimePassword = a} :: VerifySMSSandboxPhoneNumber)++instance Core.AWSRequest VerifySMSSandboxPhoneNumber where+  type+    AWSResponse VerifySMSSandboxPhoneNumber =+      VerifySMSSandboxPhoneNumberResponse+  request overrides =+    Request.postQuery (overrides defaultService)+  response =+    Response.receiveXMLWrapper+      "VerifySMSSandboxPhoneNumberResult"+      ( \s h x ->+          VerifySMSSandboxPhoneNumberResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable VerifySMSSandboxPhoneNumber where+  hashWithSalt _salt VerifySMSSandboxPhoneNumber' {..} =+    _salt+      `Prelude.hashWithSalt` phoneNumber+      `Prelude.hashWithSalt` oneTimePassword++instance Prelude.NFData VerifySMSSandboxPhoneNumber where+  rnf VerifySMSSandboxPhoneNumber' {..} =+    Prelude.rnf phoneNumber+      `Prelude.seq` Prelude.rnf oneTimePassword++instance Data.ToHeaders VerifySMSSandboxPhoneNumber where+  toHeaders = Prelude.const Prelude.mempty++instance Data.ToPath VerifySMSSandboxPhoneNumber where+  toPath = Prelude.const "/"++instance Data.ToQuery VerifySMSSandboxPhoneNumber where+  toQuery VerifySMSSandboxPhoneNumber' {..} =+    Prelude.mconcat+      [ "Action"+          Data.=: ( "VerifySMSSandboxPhoneNumber" ::+                      Prelude.ByteString+                  ),+        "Version"+          Data.=: ("2010-03-31" :: Prelude.ByteString),+        "PhoneNumber" Data.=: phoneNumber,+        "OneTimePassword" Data.=: oneTimePassword+      ]++-- | The destination phone number\'s verification status.+--+-- /See:/ 'newVerifySMSSandboxPhoneNumberResponse' smart constructor.+data VerifySMSSandboxPhoneNumberResponse = VerifySMSSandboxPhoneNumberResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VerifySMSSandboxPhoneNumberResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'verifySMSSandboxPhoneNumberResponse_httpStatus' - The response's http status code.+newVerifySMSSandboxPhoneNumberResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  VerifySMSSandboxPhoneNumberResponse+newVerifySMSSandboxPhoneNumberResponse pHttpStatus_ =+  VerifySMSSandboxPhoneNumberResponse'+    { httpStatus =+        pHttpStatus_+    }++-- | The response's http status code.+verifySMSSandboxPhoneNumberResponse_httpStatus :: Lens.Lens' VerifySMSSandboxPhoneNumberResponse Prelude.Int+verifySMSSandboxPhoneNumberResponse_httpStatus = Lens.lens (\VerifySMSSandboxPhoneNumberResponse' {httpStatus} -> httpStatus) (\s@VerifySMSSandboxPhoneNumberResponse' {} a -> s {httpStatus = a} :: VerifySMSSandboxPhoneNumberResponse)++instance+  Prelude.NFData+    VerifySMSSandboxPhoneNumberResponse+  where+  rnf VerifySMSSandboxPhoneNumberResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/SNS/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.SNS.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.SNS.Waiters 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+import Amazonka.SNS.Lens+import Amazonka.SNS.Types
− gen/Network/AWS/SNS.hs
@@ -1,251 +0,0 @@-{-# OPTIONS_GHC -fno-warn-unused-imports    #-}-{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ __Amazon Simple Notification Service__------ Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build distributed web-enabled applications. Applications can use Amazon SNS to easily push real-time notification messages to interested subscribers over multiple delivery protocols. For more information about this product see <http://aws.amazon.com/sns/ http://aws.amazon.com/sns> . For detailed information about Amazon SNS features and their associated API calls, see the <http://docs.aws.amazon.com/sns/latest/dg/ Amazon SNS Developer Guide> .------ We also provide SDKs that enable you to access Amazon SNS from your preferred programming language. The SDKs contain functionality that automatically takes care of tasks such as: cryptographically signing your service requests, retrying requests, and handling error responses. For a list of available SDKs, go to <http://aws.amazon.com/tools/ Tools for Amazon Web Services> .----module Network.AWS.SNS-    (-    -- * Service Configuration-      sns--    -- * Errors-    -- $errors--    -- ** EndpointDisabledException-    , _EndpointDisabledException--    -- ** AuthorizationErrorException-    , _AuthorizationErrorException--    -- ** InvalidParameterException-    , _InvalidParameterException--    -- ** SubscriptionLimitExceededException-    , _SubscriptionLimitExceededException--    -- ** PlatformApplicationDisabledException-    , _PlatformApplicationDisabledException--    -- ** InternalErrorException-    , _InternalErrorException--    -- ** ThrottledException-    , _ThrottledException--    -- ** InvalidParameterValueException-    , _InvalidParameterValueException--    -- ** NotFoundException-    , _NotFoundException--    -- ** TopicLimitExceededException-    , _TopicLimitExceededException--    -- * Waiters-    -- $waiters--    -- * Operations-    -- $operations--    -- ** ListPhoneNumbersOptedOut-    , module Network.AWS.SNS.ListPhoneNumbersOptedOut--    -- ** DeleteEndpoint-    , module Network.AWS.SNS.DeleteEndpoint--    -- ** RemovePermission-    , module Network.AWS.SNS.RemovePermission--    -- ** DeleteTopic-    , module Network.AWS.SNS.DeleteTopic--    -- ** SetSMSAttributes-    , module Network.AWS.SNS.SetSMSAttributes--    -- ** ListTopics (Paginated)-    , module Network.AWS.SNS.ListTopics--    -- ** CreatePlatformEndpoint-    , module Network.AWS.SNS.CreatePlatformEndpoint--    -- ** SetPlatformApplicationAttributes-    , module Network.AWS.SNS.SetPlatformApplicationAttributes--    -- ** ListSubscriptionsByTopic (Paginated)-    , module Network.AWS.SNS.ListSubscriptionsByTopic--    -- ** GetTopicAttributes-    , module Network.AWS.SNS.GetTopicAttributes--    -- ** OptInPhoneNumber-    , module Network.AWS.SNS.OptInPhoneNumber--    -- ** CreatePlatformApplication-    , module Network.AWS.SNS.CreatePlatformApplication--    -- ** GetPlatformApplicationAttributes-    , module Network.AWS.SNS.GetPlatformApplicationAttributes--    -- ** ListEndpointsByPlatformApplication (Paginated)-    , module Network.AWS.SNS.ListEndpointsByPlatformApplication--    -- ** SetTopicAttributes-    , module Network.AWS.SNS.SetTopicAttributes--    -- ** DeletePlatformApplication-    , module Network.AWS.SNS.DeletePlatformApplication--    -- ** GetSMSAttributes-    , module Network.AWS.SNS.GetSMSAttributes--    -- ** ListPlatformApplications (Paginated)-    , module Network.AWS.SNS.ListPlatformApplications--    -- ** AddPermission-    , module Network.AWS.SNS.AddPermission--    -- ** GetEndpointAttributes-    , module Network.AWS.SNS.GetEndpointAttributes--    -- ** ListSubscriptions (Paginated)-    , module Network.AWS.SNS.ListSubscriptions--    -- ** GetSubscriptionAttributes-    , module Network.AWS.SNS.GetSubscriptionAttributes--    -- ** CreateTopic-    , module Network.AWS.SNS.CreateTopic--    -- ** CheckIfPhoneNumberIsOptedOut-    , module Network.AWS.SNS.CheckIfPhoneNumberIsOptedOut--    -- ** Subscribe-    , module Network.AWS.SNS.Subscribe--    -- ** Unsubscribe-    , module Network.AWS.SNS.Unsubscribe--    -- ** SetEndpointAttributes-    , module Network.AWS.SNS.SetEndpointAttributes--    -- ** SetSubscriptionAttributes-    , module Network.AWS.SNS.SetSubscriptionAttributes--    -- ** ConfirmSubscription-    , module Network.AWS.SNS.ConfirmSubscription--    -- ** Publish-    , module Network.AWS.SNS.Publish--    -- * Types--    -- ** Endpoint-    , Endpoint-    , endpoint-    , eAttributes-    , eEndpointARN--    -- ** MessageAttributeValue-    , MessageAttributeValue-    , messageAttributeValue-    , mavBinaryValue-    , mavStringValue-    , mavDataType--    -- ** PlatformApplication-    , PlatformApplication-    , platformApplication-    , paPlatformApplicationARN-    , paAttributes--    -- ** Subscription-    , Subscription-    , subscription-    , sProtocol-    , sOwner-    , sTopicARN-    , sEndpoint-    , sSubscriptionARN--    -- ** Topic-    , Topic-    , topic-    , tTopicARN-    ) where--import Network.AWS.SNS.AddPermission-import Network.AWS.SNS.CheckIfPhoneNumberIsOptedOut-import Network.AWS.SNS.ConfirmSubscription-import Network.AWS.SNS.CreatePlatformApplication-import Network.AWS.SNS.CreatePlatformEndpoint-import Network.AWS.SNS.CreateTopic-import Network.AWS.SNS.DeleteEndpoint-import Network.AWS.SNS.DeletePlatformApplication-import Network.AWS.SNS.DeleteTopic-import Network.AWS.SNS.GetEndpointAttributes-import Network.AWS.SNS.GetPlatformApplicationAttributes-import Network.AWS.SNS.GetSMSAttributes-import Network.AWS.SNS.GetSubscriptionAttributes-import Network.AWS.SNS.GetTopicAttributes-import Network.AWS.SNS.ListEndpointsByPlatformApplication-import Network.AWS.SNS.ListPhoneNumbersOptedOut-import Network.AWS.SNS.ListPlatformApplications-import Network.AWS.SNS.ListSubscriptions-import Network.AWS.SNS.ListSubscriptionsByTopic-import Network.AWS.SNS.ListTopics-import Network.AWS.SNS.OptInPhoneNumber-import Network.AWS.SNS.Publish-import Network.AWS.SNS.RemovePermission-import Network.AWS.SNS.SetEndpointAttributes-import Network.AWS.SNS.SetPlatformApplicationAttributes-import Network.AWS.SNS.SetSMSAttributes-import Network.AWS.SNS.SetSubscriptionAttributes-import Network.AWS.SNS.SetTopicAttributes-import Network.AWS.SNS.Subscribe-import Network.AWS.SNS.Types-import Network.AWS.SNS.Unsubscribe-import Network.AWS.SNS.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 'SNS'.--}--{- $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/Network/AWS/SNS/AddPermission.hs
@@ -1,134 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.AddPermission--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.-------module Network.AWS.SNS.AddPermission-    (-    -- * Creating a Request-      addPermission-    , AddPermission-    -- * Request Lenses-    , apTopicARN-    , apLabel-    , apAWSAccountId-    , apActionName--    -- * Destructuring the Response-    , addPermissionResponse-    , AddPermissionResponse-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | /See:/ 'addPermission' smart constructor.-data AddPermission = AddPermission'-  { _apTopicARN     :: !Text-  , _apLabel        :: !Text-  , _apAWSAccountId :: ![Text]-  , _apActionName   :: ![Text]-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'AddPermission' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'apTopicARN' - The ARN of the topic whose access control policy you wish to modify.------ * 'apLabel' - A unique identifier for the new policy statement.------ * 'apAWSAccountId' - The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.------ * 'apActionName' - The action you want to allow for the specified principal(s). Valid values: any Amazon SNS action name.-addPermission-    :: Text -- ^ 'apTopicARN'-    -> Text -- ^ 'apLabel'-    -> AddPermission-addPermission pTopicARN_ pLabel_ =-  AddPermission'-  { _apTopicARN = pTopicARN_-  , _apLabel = pLabel_-  , _apAWSAccountId = mempty-  , _apActionName = mempty-  }----- | The ARN of the topic whose access control policy you wish to modify.-apTopicARN :: Lens' AddPermission Text-apTopicARN = lens _apTopicARN (\ s a -> s{_apTopicARN = a});---- | A unique identifier for the new policy statement.-apLabel :: Lens' AddPermission Text-apLabel = lens _apLabel (\ s a -> s{_apLabel = a});---- | The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.-apAWSAccountId :: Lens' AddPermission [Text]-apAWSAccountId = lens _apAWSAccountId (\ s a -> s{_apAWSAccountId = a}) . _Coerce;---- | The action you want to allow for the specified principal(s). Valid values: any Amazon SNS action name.-apActionName :: Lens' AddPermission [Text]-apActionName = lens _apActionName (\ s a -> s{_apActionName = a}) . _Coerce;--instance AWSRequest AddPermission where-        type Rs AddPermission = AddPermissionResponse-        request = postQuery sns-        response = receiveNull AddPermissionResponse'--instance Hashable AddPermission where--instance NFData AddPermission where--instance ToHeaders AddPermission where-        toHeaders = const mempty--instance ToPath AddPermission where-        toPath = const "/"--instance ToQuery AddPermission where-        toQuery AddPermission'{..}-          = mconcat-              ["Action" =: ("AddPermission" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "TopicArn" =: _apTopicARN, "Label" =: _apLabel,-               "AWSAccountId" =:-                 toQueryList "member" _apAWSAccountId,-               "ActionName" =: toQueryList "member" _apActionName]---- | /See:/ 'addPermissionResponse' smart constructor.-data AddPermissionResponse =-  AddPermissionResponse'-  deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'AddPermissionResponse' with the minimum fields required to make a request.----addPermissionResponse-    :: AddPermissionResponse-addPermissionResponse = AddPermissionResponse'---instance NFData AddPermissionResponse where
− gen/Network/AWS/SNS/CheckIfPhoneNumberIsOptedOut.hs
@@ -1,140 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.CheckIfPhoneNumberIsOptedOut--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account. You cannot send SMS messages to a number that is opted out.--------- To resume sending messages, you can opt in the number by using the @OptInPhoneNumber@ action.----module Network.AWS.SNS.CheckIfPhoneNumberIsOptedOut-    (-    -- * Creating a Request-      checkIfPhoneNumberIsOptedOut-    , CheckIfPhoneNumberIsOptedOut-    -- * Request Lenses-    , cipniooPhoneNumber--    -- * Destructuring the Response-    , checkIfPhoneNumberIsOptedOutResponse-    , CheckIfPhoneNumberIsOptedOutResponse-    -- * Response Lenses-    , cipnioorsIsOptedOut-    , cipnioorsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | The input for the @CheckIfPhoneNumberIsOptedOut@ action.------------ /See:/ 'checkIfPhoneNumberIsOptedOut' smart constructor.-newtype CheckIfPhoneNumberIsOptedOut = CheckIfPhoneNumberIsOptedOut'-  { _cipniooPhoneNumber :: Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'CheckIfPhoneNumberIsOptedOut' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'cipniooPhoneNumber' - The phone number for which you want to check the opt out status.-checkIfPhoneNumberIsOptedOut-    :: Text -- ^ 'cipniooPhoneNumber'-    -> CheckIfPhoneNumberIsOptedOut-checkIfPhoneNumberIsOptedOut pPhoneNumber_ =-  CheckIfPhoneNumberIsOptedOut' {_cipniooPhoneNumber = pPhoneNumber_}----- | The phone number for which you want to check the opt out status.-cipniooPhoneNumber :: Lens' CheckIfPhoneNumberIsOptedOut Text-cipniooPhoneNumber = lens _cipniooPhoneNumber (\ s a -> s{_cipniooPhoneNumber = a});--instance AWSRequest CheckIfPhoneNumberIsOptedOut-         where-        type Rs CheckIfPhoneNumberIsOptedOut =-             CheckIfPhoneNumberIsOptedOutResponse-        request = postQuery sns-        response-          = receiveXMLWrapper-              "CheckIfPhoneNumberIsOptedOutResult"-              (\ s h x ->-                 CheckIfPhoneNumberIsOptedOutResponse' <$>-                   (x .@? "isOptedOut") <*> (pure (fromEnum s)))--instance Hashable CheckIfPhoneNumberIsOptedOut where--instance NFData CheckIfPhoneNumberIsOptedOut where--instance ToHeaders CheckIfPhoneNumberIsOptedOut where-        toHeaders = const mempty--instance ToPath CheckIfPhoneNumberIsOptedOut where-        toPath = const "/"--instance ToQuery CheckIfPhoneNumberIsOptedOut where-        toQuery CheckIfPhoneNumberIsOptedOut'{..}-          = mconcat-              ["Action" =:-                 ("CheckIfPhoneNumberIsOptedOut" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "phoneNumber" =: _cipniooPhoneNumber]---- | The response from the @CheckIfPhoneNumberIsOptedOut@ action.------------ /See:/ 'checkIfPhoneNumberIsOptedOutResponse' smart constructor.-data CheckIfPhoneNumberIsOptedOutResponse = CheckIfPhoneNumberIsOptedOutResponse'-  { _cipnioorsIsOptedOut     :: !(Maybe Bool)-  , _cipnioorsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'CheckIfPhoneNumberIsOptedOutResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'cipnioorsIsOptedOut' - Indicates whether the phone number is opted out:     * @true@ – The phone number is opted out, meaning you cannot publish SMS messages to it.     * @false@ – The phone number is opted in, meaning you can publish SMS messages to it.------ * 'cipnioorsResponseStatus' - -- | The response status code.-checkIfPhoneNumberIsOptedOutResponse-    :: Int -- ^ 'cipnioorsResponseStatus'-    -> CheckIfPhoneNumberIsOptedOutResponse-checkIfPhoneNumberIsOptedOutResponse pResponseStatus_ =-  CheckIfPhoneNumberIsOptedOutResponse'-  {_cipnioorsIsOptedOut = Nothing, _cipnioorsResponseStatus = pResponseStatus_}----- | Indicates whether the phone number is opted out:     * @true@ – The phone number is opted out, meaning you cannot publish SMS messages to it.     * @false@ – The phone number is opted in, meaning you can publish SMS messages to it.-cipnioorsIsOptedOut :: Lens' CheckIfPhoneNumberIsOptedOutResponse (Maybe Bool)-cipnioorsIsOptedOut = lens _cipnioorsIsOptedOut (\ s a -> s{_cipnioorsIsOptedOut = a});---- | -- | The response status code.-cipnioorsResponseStatus :: Lens' CheckIfPhoneNumberIsOptedOutResponse Int-cipnioorsResponseStatus = lens _cipnioorsResponseStatus (\ s a -> s{_cipnioorsResponseStatus = a});--instance NFData CheckIfPhoneNumberIsOptedOutResponse-         where
− gen/Network/AWS/SNS/ConfirmSubscription.hs
@@ -1,157 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.ConfirmSubscription--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier @Subscribe@ action. If the token is valid, the action creates a new subscription and returns its Amazon Resource Name (ARN). This call requires an AWS signature only when the @AuthenticateOnUnsubscribe@ flag is set to "true".-------module Network.AWS.SNS.ConfirmSubscription-    (-    -- * Creating a Request-      confirmSubscription-    , ConfirmSubscription-    -- * Request Lenses-    , csAuthenticateOnUnsubscribe-    , csTopicARN-    , csToken--    -- * Destructuring the Response-    , confirmSubscriptionResponse-    , ConfirmSubscriptionResponse-    -- * Response Lenses-    , csrsSubscriptionARN-    , csrsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for ConfirmSubscription action.------------ /See:/ 'confirmSubscription' smart constructor.-data ConfirmSubscription = ConfirmSubscription'-  { _csAuthenticateOnUnsubscribe :: !(Maybe Text)-  , _csTopicARN                  :: !Text-  , _csToken                     :: !Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ConfirmSubscription' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'csAuthenticateOnUnsubscribe' - Disallows unauthenticated unsubscribes of the subscription. If the value of this parameter is @true@ and the request has an AWS signature, then only the topic owner and the subscription owner can unsubscribe the endpoint. The unsubscribe action requires AWS authentication.------ * 'csTopicARN' - The ARN of the topic for which you wish to confirm a subscription.------ * 'csToken' - Short-lived token sent to an endpoint during the @Subscribe@ action.-confirmSubscription-    :: Text -- ^ 'csTopicARN'-    -> Text -- ^ 'csToken'-    -> ConfirmSubscription-confirmSubscription pTopicARN_ pToken_ =-  ConfirmSubscription'-  { _csAuthenticateOnUnsubscribe = Nothing-  , _csTopicARN = pTopicARN_-  , _csToken = pToken_-  }----- | Disallows unauthenticated unsubscribes of the subscription. If the value of this parameter is @true@ and the request has an AWS signature, then only the topic owner and the subscription owner can unsubscribe the endpoint. The unsubscribe action requires AWS authentication.-csAuthenticateOnUnsubscribe :: Lens' ConfirmSubscription (Maybe Text)-csAuthenticateOnUnsubscribe = lens _csAuthenticateOnUnsubscribe (\ s a -> s{_csAuthenticateOnUnsubscribe = a});---- | The ARN of the topic for which you wish to confirm a subscription.-csTopicARN :: Lens' ConfirmSubscription Text-csTopicARN = lens _csTopicARN (\ s a -> s{_csTopicARN = a});---- | Short-lived token sent to an endpoint during the @Subscribe@ action.-csToken :: Lens' ConfirmSubscription Text-csToken = lens _csToken (\ s a -> s{_csToken = a});--instance AWSRequest ConfirmSubscription where-        type Rs ConfirmSubscription =-             ConfirmSubscriptionResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "ConfirmSubscriptionResult"-              (\ s h x ->-                 ConfirmSubscriptionResponse' <$>-                   (x .@? "SubscriptionArn") <*> (pure (fromEnum s)))--instance Hashable ConfirmSubscription where--instance NFData ConfirmSubscription where--instance ToHeaders ConfirmSubscription where-        toHeaders = const mempty--instance ToPath ConfirmSubscription where-        toPath = const "/"--instance ToQuery ConfirmSubscription where-        toQuery ConfirmSubscription'{..}-          = mconcat-              ["Action" =: ("ConfirmSubscription" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "AuthenticateOnUnsubscribe" =:-                 _csAuthenticateOnUnsubscribe,-               "TopicArn" =: _csTopicARN, "Token" =: _csToken]---- | Response for ConfirmSubscriptions action.------------ /See:/ 'confirmSubscriptionResponse' smart constructor.-data ConfirmSubscriptionResponse = ConfirmSubscriptionResponse'-  { _csrsSubscriptionARN :: !(Maybe Text)-  , _csrsResponseStatus  :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ConfirmSubscriptionResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'csrsSubscriptionARN' - The ARN of the created subscription.------ * 'csrsResponseStatus' - -- | The response status code.-confirmSubscriptionResponse-    :: Int -- ^ 'csrsResponseStatus'-    -> ConfirmSubscriptionResponse-confirmSubscriptionResponse pResponseStatus_ =-  ConfirmSubscriptionResponse'-  {_csrsSubscriptionARN = Nothing, _csrsResponseStatus = pResponseStatus_}----- | The ARN of the created subscription.-csrsSubscriptionARN :: Lens' ConfirmSubscriptionResponse (Maybe Text)-csrsSubscriptionARN = lens _csrsSubscriptionARN (\ s a -> s{_csrsSubscriptionARN = a});---- | -- | The response status code.-csrsResponseStatus :: Lens' ConfirmSubscriptionResponse Int-csrsResponseStatus = lens _csrsResponseStatus (\ s a -> s{_csrsResponseStatus = a});--instance NFData ConfirmSubscriptionResponse where
− gen/Network/AWS/SNS/CreatePlatformApplication.hs
@@ -1,161 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.CreatePlatformApplication--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Creates a platform application object for one of the supported push notification services, such as APNS and GCM, to which devices and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential attributes when using the @CreatePlatformApplication@ action. The PlatformPrincipal is received from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is "SSL certificate". For GCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client id". The PlatformCredential is also received from the notification service. For WNS, PlatformPrincipal is "Package Security Identifier". For MPNS, PlatformPrincipal is "TLS certificate". For Baidu, PlatformPrincipal is "API key".--------- For APNS/APNS_SANDBOX, PlatformCredential is "private key". For GCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client secret". For WNS, PlatformCredential is "secret key". For MPNS, PlatformCredential is "private key". For Baidu, PlatformCredential is "secret key". The PlatformApplicationArn that is returned when using @CreatePlatformApplication@ is then used as an attribute for the @CreatePlatformEndpoint@ action. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications> . For more information about obtaining the PlatformPrincipal and PlatformCredential for each of the supported push notification services, see <http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html Getting Started with Apple Push Notification Service> , <http://docs.aws.amazon.com/sns/latest/dg/mobile-push-adm.html Getting Started with Amazon Device Messaging> , <http://docs.aws.amazon.com/sns/latest/dg/mobile-push-baidu.html Getting Started with Baidu Cloud Push> , <http://docs.aws.amazon.com/sns/latest/dg/mobile-push-gcm.html Getting Started with Google Cloud Messaging for Android> , <http://docs.aws.amazon.com/sns/latest/dg/mobile-push-mpns.html Getting Started with MPNS> , or <http://docs.aws.amazon.com/sns/latest/dg/mobile-push-wns.html Getting Started with WNS> .----module Network.AWS.SNS.CreatePlatformApplication-    (-    -- * Creating a Request-      createPlatformApplication-    , CreatePlatformApplication-    -- * Request Lenses-    , cpaName-    , cpaPlatform-    , cpaAttributes--    -- * Destructuring the Response-    , createPlatformApplicationResponse-    , CreatePlatformApplicationResponse-    -- * Response Lenses-    , cparsPlatformApplicationARN-    , cparsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for CreatePlatformApplication action.------------ /See:/ 'createPlatformApplication' smart constructor.-data CreatePlatformApplication = CreatePlatformApplication'-  { _cpaName       :: !Text-  , _cpaPlatform   :: !Text-  , _cpaAttributes :: !(Map Text Text)-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'CreatePlatformApplication' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'cpaName' - Application names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, hyphens, and periods, and must be between 1 and 256 characters long.------ * 'cpaPlatform' - The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Google Cloud Messaging).------ * 'cpaAttributes' - For a list of attributes, see <http://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html SetPlatformApplicationAttributes>-createPlatformApplication-    :: Text -- ^ 'cpaName'-    -> Text -- ^ 'cpaPlatform'-    -> CreatePlatformApplication-createPlatformApplication pName_ pPlatform_ =-  CreatePlatformApplication'-  {_cpaName = pName_, _cpaPlatform = pPlatform_, _cpaAttributes = mempty}----- | Application names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, hyphens, and periods, and must be between 1 and 256 characters long.-cpaName :: Lens' CreatePlatformApplication Text-cpaName = lens _cpaName (\ s a -> s{_cpaName = a});---- | The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Google Cloud Messaging).-cpaPlatform :: Lens' CreatePlatformApplication Text-cpaPlatform = lens _cpaPlatform (\ s a -> s{_cpaPlatform = a});---- | For a list of attributes, see <http://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html SetPlatformApplicationAttributes>-cpaAttributes :: Lens' CreatePlatformApplication (HashMap Text Text)-cpaAttributes = lens _cpaAttributes (\ s a -> s{_cpaAttributes = a}) . _Map;--instance AWSRequest CreatePlatformApplication where-        type Rs CreatePlatformApplication =-             CreatePlatformApplicationResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "CreatePlatformApplicationResult"-              (\ s h x ->-                 CreatePlatformApplicationResponse' <$>-                   (x .@? "PlatformApplicationArn") <*>-                     (pure (fromEnum s)))--instance Hashable CreatePlatformApplication where--instance NFData CreatePlatformApplication where--instance ToHeaders CreatePlatformApplication where-        toHeaders = const mempty--instance ToPath CreatePlatformApplication where-        toPath = const "/"--instance ToQuery CreatePlatformApplication where-        toQuery CreatePlatformApplication'{..}-          = mconcat-              ["Action" =:-                 ("CreatePlatformApplication" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "Name" =: _cpaName, "Platform" =: _cpaPlatform,-               "Attributes" =:-                 toQueryMap "entry" "key" "value" _cpaAttributes]---- | Response from CreatePlatformApplication action.------------ /See:/ 'createPlatformApplicationResponse' smart constructor.-data CreatePlatformApplicationResponse = CreatePlatformApplicationResponse'-  { _cparsPlatformApplicationARN :: !(Maybe Text)-  , _cparsResponseStatus         :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'CreatePlatformApplicationResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'cparsPlatformApplicationARN' - PlatformApplicationArn is returned.------ * 'cparsResponseStatus' - -- | The response status code.-createPlatformApplicationResponse-    :: Int -- ^ 'cparsResponseStatus'-    -> CreatePlatformApplicationResponse-createPlatformApplicationResponse pResponseStatus_ =-  CreatePlatformApplicationResponse'-  { _cparsPlatformApplicationARN = Nothing-  , _cparsResponseStatus = pResponseStatus_-  }----- | PlatformApplicationArn is returned.-cparsPlatformApplicationARN :: Lens' CreatePlatformApplicationResponse (Maybe Text)-cparsPlatformApplicationARN = lens _cparsPlatformApplicationARN (\ s a -> s{_cparsPlatformApplicationARN = a});---- | -- | The response status code.-cparsResponseStatus :: Lens' CreatePlatformApplicationResponse Int-cparsResponseStatus = lens _cparsResponseStatus (\ s a -> s{_cparsResponseStatus = a});--instance NFData CreatePlatformApplicationResponse-         where
− gen/Network/AWS/SNS/CreatePlatformEndpoint.hs
@@ -1,174 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.CreatePlatformEndpoint--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM and APNS. @CreatePlatformEndpoint@ requires the PlatformApplicationArn that is returned from @CreatePlatformApplication@ . The EndpointArn that is returned when using @CreatePlatformEndpoint@ can then be used by the @Publish@ action to send a message to a mobile app or by the @Subscribe@ action for subscription to a topic. The @CreatePlatformEndpoint@ action is idempotent, so if the requester already owns an endpoint with the same device token and attributes, that endpoint's ARN is returned without creating a new endpoint. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications> .--------- When using @CreatePlatformEndpoint@ with Baidu, two attributes must be provided: ChannelId and UserId. The token field must also contain the ChannelId. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html Creating an Amazon SNS Endpoint for Baidu> .----module Network.AWS.SNS.CreatePlatformEndpoint-    (-    -- * Creating a Request-      createPlatformEndpoint-    , CreatePlatformEndpoint-    -- * Request Lenses-    , cpeCustomUserData-    , cpeAttributes-    , cpePlatformApplicationARN-    , cpeToken--    -- * Destructuring the Response-    , createPlatformEndpointResponse-    , CreatePlatformEndpointResponse-    -- * Response Lenses-    , cpersEndpointARN-    , cpersResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for CreatePlatformEndpoint action.------------ /See:/ 'createPlatformEndpoint' smart constructor.-data CreatePlatformEndpoint = CreatePlatformEndpoint'-  { _cpeCustomUserData         :: !(Maybe Text)-  , _cpeAttributes             :: !(Maybe (Map Text Text))-  , _cpePlatformApplicationARN :: !Text-  , _cpeToken                  :: !Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'CreatePlatformEndpoint' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'cpeCustomUserData' - Arbitrary user data to associate with the endpoint. Amazon SNS does not use this data. The data must be in UTF-8 format and less than 2KB.------ * 'cpeAttributes' - For a list of attributes, see <http://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html SetEndpointAttributes> .------ * 'cpePlatformApplicationARN' - PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.------ * 'cpeToken' - Unique identifier created by the notification service for an app on a device. The specific name for Token will vary, depending on which notification service is being used. For example, when using APNS as the notification service, you need the device token. Alternatively, when using GCM or ADM, the device token equivalent is called the registration ID.-createPlatformEndpoint-    :: Text -- ^ 'cpePlatformApplicationARN'-    -> Text -- ^ 'cpeToken'-    -> CreatePlatformEndpoint-createPlatformEndpoint pPlatformApplicationARN_ pToken_ =-  CreatePlatformEndpoint'-  { _cpeCustomUserData = Nothing-  , _cpeAttributes = Nothing-  , _cpePlatformApplicationARN = pPlatformApplicationARN_-  , _cpeToken = pToken_-  }----- | Arbitrary user data to associate with the endpoint. Amazon SNS does not use this data. The data must be in UTF-8 format and less than 2KB.-cpeCustomUserData :: Lens' CreatePlatformEndpoint (Maybe Text)-cpeCustomUserData = lens _cpeCustomUserData (\ s a -> s{_cpeCustomUserData = a});---- | For a list of attributes, see <http://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html SetEndpointAttributes> .-cpeAttributes :: Lens' CreatePlatformEndpoint (HashMap Text Text)-cpeAttributes = lens _cpeAttributes (\ s a -> s{_cpeAttributes = a}) . _Default . _Map;---- | PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.-cpePlatformApplicationARN :: Lens' CreatePlatformEndpoint Text-cpePlatformApplicationARN = lens _cpePlatformApplicationARN (\ s a -> s{_cpePlatformApplicationARN = a});---- | Unique identifier created by the notification service for an app on a device. The specific name for Token will vary, depending on which notification service is being used. For example, when using APNS as the notification service, you need the device token. Alternatively, when using GCM or ADM, the device token equivalent is called the registration ID.-cpeToken :: Lens' CreatePlatformEndpoint Text-cpeToken = lens _cpeToken (\ s a -> s{_cpeToken = a});--instance AWSRequest CreatePlatformEndpoint where-        type Rs CreatePlatformEndpoint =-             CreatePlatformEndpointResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "CreatePlatformEndpointResult"-              (\ s h x ->-                 CreatePlatformEndpointResponse' <$>-                   (x .@? "EndpointArn") <*> (pure (fromEnum s)))--instance Hashable CreatePlatformEndpoint where--instance NFData CreatePlatformEndpoint where--instance ToHeaders CreatePlatformEndpoint where-        toHeaders = const mempty--instance ToPath CreatePlatformEndpoint where-        toPath = const "/"--instance ToQuery CreatePlatformEndpoint where-        toQuery CreatePlatformEndpoint'{..}-          = mconcat-              ["Action" =:-                 ("CreatePlatformEndpoint" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "CustomUserData" =: _cpeCustomUserData,-               "Attributes" =:-                 toQuery-                   (toQueryMap "entry" "key" "value" <$>-                      _cpeAttributes),-               "PlatformApplicationArn" =:-                 _cpePlatformApplicationARN,-               "Token" =: _cpeToken]---- | Response from CreateEndpoint action.------------ /See:/ 'createPlatformEndpointResponse' smart constructor.-data CreatePlatformEndpointResponse = CreatePlatformEndpointResponse'-  { _cpersEndpointARN    :: !(Maybe Text)-  , _cpersResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'CreatePlatformEndpointResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'cpersEndpointARN' - EndpointArn returned from CreateEndpoint action.------ * 'cpersResponseStatus' - -- | The response status code.-createPlatformEndpointResponse-    :: Int -- ^ 'cpersResponseStatus'-    -> CreatePlatformEndpointResponse-createPlatformEndpointResponse pResponseStatus_ =-  CreatePlatformEndpointResponse'-  {_cpersEndpointARN = Nothing, _cpersResponseStatus = pResponseStatus_}----- | EndpointArn returned from CreateEndpoint action.-cpersEndpointARN :: Lens' CreatePlatformEndpointResponse (Maybe Text)-cpersEndpointARN = lens _cpersEndpointARN (\ s a -> s{_cpersEndpointARN = a});---- | -- | The response status code.-cpersResponseStatus :: Lens' CreatePlatformEndpointResponse Int-cpersResponseStatus = lens _cpersResponseStatus (\ s a -> s{_cpersResponseStatus = a});--instance NFData CreatePlatformEndpointResponse where
− gen/Network/AWS/SNS/CreateTopic.hs
@@ -1,132 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.CreateTopic--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Creates a topic to which notifications can be published. Users can create at most 100,000 topics. For more information, see <http://aws.amazon.com/sns/ http://aws.amazon.com/sns> . This action is idempotent, so if the requester already owns a topic with the specified name, that topic's ARN is returned without creating a new topic.-------module Network.AWS.SNS.CreateTopic-    (-    -- * Creating a Request-      createTopic-    , CreateTopic-    -- * Request Lenses-    , ctName--    -- * Destructuring the Response-    , createTopicResponse-    , CreateTopicResponse-    -- * Response Lenses-    , ctrsTopicARN-    , ctrsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for CreateTopic action.------------ /See:/ 'createTopic' smart constructor.-newtype CreateTopic = CreateTopic'-  { _ctName :: Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'CreateTopic' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'ctName' - The name of the topic you want to create. Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.-createTopic-    :: Text -- ^ 'ctName'-    -> CreateTopic-createTopic pName_ = CreateTopic' {_ctName = pName_}----- | The name of the topic you want to create. Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.-ctName :: Lens' CreateTopic Text-ctName = lens _ctName (\ s a -> s{_ctName = a});--instance AWSRequest CreateTopic where-        type Rs CreateTopic = CreateTopicResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "CreateTopicResult"-              (\ s h x ->-                 CreateTopicResponse' <$>-                   (x .@? "TopicArn") <*> (pure (fromEnum s)))--instance Hashable CreateTopic where--instance NFData CreateTopic where--instance ToHeaders CreateTopic where-        toHeaders = const mempty--instance ToPath CreateTopic where-        toPath = const "/"--instance ToQuery CreateTopic where-        toQuery CreateTopic'{..}-          = mconcat-              ["Action" =: ("CreateTopic" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "Name" =: _ctName]---- | Response from CreateTopic action.------------ /See:/ 'createTopicResponse' smart constructor.-data CreateTopicResponse = CreateTopicResponse'-  { _ctrsTopicARN       :: !(Maybe Text)-  , _ctrsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'CreateTopicResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'ctrsTopicARN' - The Amazon Resource Name (ARN) assigned to the created topic.------ * 'ctrsResponseStatus' - -- | The response status code.-createTopicResponse-    :: Int -- ^ 'ctrsResponseStatus'-    -> CreateTopicResponse-createTopicResponse pResponseStatus_ =-  CreateTopicResponse'-  {_ctrsTopicARN = Nothing, _ctrsResponseStatus = pResponseStatus_}----- | The Amazon Resource Name (ARN) assigned to the created topic.-ctrsTopicARN :: Lens' CreateTopicResponse (Maybe Text)-ctrsTopicARN = lens _ctrsTopicARN (\ s a -> s{_ctrsTopicARN = a});---- | -- | The response status code.-ctrsResponseStatus :: Lens' CreateTopicResponse Int-ctrsResponseStatus = lens _ctrsResponseStatus (\ s a -> s{_ctrsResponseStatus = a});--instance NFData CreateTopicResponse where
− gen/Network/AWS/SNS/DeleteEndpoint.hs
@@ -1,106 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.DeleteEndpoint--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Deletes the endpoint for a device and mobile app from Amazon SNS. This action is idempotent. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications> .--------- When you delete an endpoint that is also subscribed to a topic, then you must also unsubscribe the endpoint from the topic.----module Network.AWS.SNS.DeleteEndpoint-    (-    -- * Creating a Request-      deleteEndpoint-    , DeleteEndpoint-    -- * Request Lenses-    , deEndpointARN--    -- * Destructuring the Response-    , deleteEndpointResponse-    , DeleteEndpointResponse-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for DeleteEndpoint action.------------ /See:/ 'deleteEndpoint' smart constructor.-newtype DeleteEndpoint = DeleteEndpoint'-  { _deEndpointARN :: Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'DeleteEndpoint' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'deEndpointARN' - EndpointArn of endpoint to delete.-deleteEndpoint-    :: Text -- ^ 'deEndpointARN'-    -> DeleteEndpoint-deleteEndpoint pEndpointARN_ = DeleteEndpoint' {_deEndpointARN = pEndpointARN_}----- | EndpointArn of endpoint to delete.-deEndpointARN :: Lens' DeleteEndpoint Text-deEndpointARN = lens _deEndpointARN (\ s a -> s{_deEndpointARN = a});--instance AWSRequest DeleteEndpoint where-        type Rs DeleteEndpoint = DeleteEndpointResponse-        request = postQuery sns-        response = receiveNull DeleteEndpointResponse'--instance Hashable DeleteEndpoint where--instance NFData DeleteEndpoint where--instance ToHeaders DeleteEndpoint where-        toHeaders = const mempty--instance ToPath DeleteEndpoint where-        toPath = const "/"--instance ToQuery DeleteEndpoint where-        toQuery DeleteEndpoint'{..}-          = mconcat-              ["Action" =: ("DeleteEndpoint" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "EndpointArn" =: _deEndpointARN]---- | /See:/ 'deleteEndpointResponse' smart constructor.-data DeleteEndpointResponse =-  DeleteEndpointResponse'-  deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'DeleteEndpointResponse' with the minimum fields required to make a request.----deleteEndpointResponse-    :: DeleteEndpointResponse-deleteEndpointResponse = DeleteEndpointResponse'---instance NFData DeleteEndpointResponse where
− gen/Network/AWS/SNS/DeletePlatformApplication.hs
@@ -1,111 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.DeletePlatformApplication--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Deletes a platform application object for one of the supported push notification services, such as APNS and GCM. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications> .-------module Network.AWS.SNS.DeletePlatformApplication-    (-    -- * Creating a Request-      deletePlatformApplication-    , DeletePlatformApplication-    -- * Request Lenses-    , dpaPlatformApplicationARN--    -- * Destructuring the Response-    , deletePlatformApplicationResponse-    , DeletePlatformApplicationResponse-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for DeletePlatformApplication action.------------ /See:/ 'deletePlatformApplication' smart constructor.-newtype DeletePlatformApplication = DeletePlatformApplication'-  { _dpaPlatformApplicationARN :: Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'DeletePlatformApplication' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'dpaPlatformApplicationARN' - PlatformApplicationArn of platform application object to delete.-deletePlatformApplication-    :: Text -- ^ 'dpaPlatformApplicationARN'-    -> DeletePlatformApplication-deletePlatformApplication pPlatformApplicationARN_ =-  DeletePlatformApplication'-  {_dpaPlatformApplicationARN = pPlatformApplicationARN_}----- | PlatformApplicationArn of platform application object to delete.-dpaPlatformApplicationARN :: Lens' DeletePlatformApplication Text-dpaPlatformApplicationARN = lens _dpaPlatformApplicationARN (\ s a -> s{_dpaPlatformApplicationARN = a});--instance AWSRequest DeletePlatformApplication where-        type Rs DeletePlatformApplication =-             DeletePlatformApplicationResponse-        request = postQuery sns-        response-          = receiveNull DeletePlatformApplicationResponse'--instance Hashable DeletePlatformApplication where--instance NFData DeletePlatformApplication where--instance ToHeaders DeletePlatformApplication where-        toHeaders = const mempty--instance ToPath DeletePlatformApplication where-        toPath = const "/"--instance ToQuery DeletePlatformApplication where-        toQuery DeletePlatformApplication'{..}-          = mconcat-              ["Action" =:-                 ("DeletePlatformApplication" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "PlatformApplicationArn" =:-                 _dpaPlatformApplicationARN]---- | /See:/ 'deletePlatformApplicationResponse' smart constructor.-data DeletePlatformApplicationResponse =-  DeletePlatformApplicationResponse'-  deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'DeletePlatformApplicationResponse' with the minimum fields required to make a request.----deletePlatformApplicationResponse-    :: DeletePlatformApplicationResponse-deletePlatformApplicationResponse = DeletePlatformApplicationResponse'---instance NFData DeletePlatformApplicationResponse-         where
− gen/Network/AWS/SNS/DeleteTopic.hs
@@ -1,100 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.DeleteTopic--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Deletes a topic and all its subscriptions. Deleting a topic might prevent some messages previously sent to the topic from being delivered to subscribers. This action is idempotent, so deleting a topic that does not exist does not result in an error.-------module Network.AWS.SNS.DeleteTopic-    (-    -- * Creating a Request-      deleteTopic-    , DeleteTopic-    -- * Request Lenses-    , dtTopicARN--    -- * Destructuring the Response-    , deleteTopicResponse-    , DeleteTopicResponse-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | /See:/ 'deleteTopic' smart constructor.-newtype DeleteTopic = DeleteTopic'-  { _dtTopicARN :: Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'DeleteTopic' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'dtTopicARN' - The ARN of the topic you want to delete.-deleteTopic-    :: Text -- ^ 'dtTopicARN'-    -> DeleteTopic-deleteTopic pTopicARN_ = DeleteTopic' {_dtTopicARN = pTopicARN_}----- | The ARN of the topic you want to delete.-dtTopicARN :: Lens' DeleteTopic Text-dtTopicARN = lens _dtTopicARN (\ s a -> s{_dtTopicARN = a});--instance AWSRequest DeleteTopic where-        type Rs DeleteTopic = DeleteTopicResponse-        request = postQuery sns-        response = receiveNull DeleteTopicResponse'--instance Hashable DeleteTopic where--instance NFData DeleteTopic where--instance ToHeaders DeleteTopic where-        toHeaders = const mempty--instance ToPath DeleteTopic where-        toPath = const "/"--instance ToQuery DeleteTopic where-        toQuery DeleteTopic'{..}-          = mconcat-              ["Action" =: ("DeleteTopic" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "TopicArn" =: _dtTopicARN]---- | /See:/ 'deleteTopicResponse' smart constructor.-data DeleteTopicResponse =-  DeleteTopicResponse'-  deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'DeleteTopicResponse' with the minimum fields required to make a request.----deleteTopicResponse-    :: DeleteTopicResponse-deleteTopicResponse = DeleteTopicResponse'---instance NFData DeleteTopicResponse where
− gen/Network/AWS/SNS/GetEndpointAttributes.hs
@@ -1,136 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.GetEndpointAttributes--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM and APNS. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications> .-------module Network.AWS.SNS.GetEndpointAttributes-    (-    -- * Creating a Request-      getEndpointAttributes-    , GetEndpointAttributes-    -- * Request Lenses-    , geaEndpointARN--    -- * Destructuring the Response-    , getEndpointAttributesResponse-    , GetEndpointAttributesResponse-    -- * Response Lenses-    , gearsAttributes-    , gearsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for GetEndpointAttributes action.------------ /See:/ 'getEndpointAttributes' smart constructor.-newtype GetEndpointAttributes = GetEndpointAttributes'-  { _geaEndpointARN :: Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'GetEndpointAttributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'geaEndpointARN' - EndpointArn for GetEndpointAttributes input.-getEndpointAttributes-    :: Text -- ^ 'geaEndpointARN'-    -> GetEndpointAttributes-getEndpointAttributes pEndpointARN_ =-  GetEndpointAttributes' {_geaEndpointARN = pEndpointARN_}----- | EndpointArn for GetEndpointAttributes input.-geaEndpointARN :: Lens' GetEndpointAttributes Text-geaEndpointARN = lens _geaEndpointARN (\ s a -> s{_geaEndpointARN = a});--instance AWSRequest GetEndpointAttributes where-        type Rs GetEndpointAttributes =-             GetEndpointAttributesResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "GetEndpointAttributesResult"-              (\ s h x ->-                 GetEndpointAttributesResponse' <$>-                   (x .@? "Attributes" .!@ mempty >>=-                      may (parseXMLMap "entry" "key" "value"))-                     <*> (pure (fromEnum s)))--instance Hashable GetEndpointAttributes where--instance NFData GetEndpointAttributes where--instance ToHeaders GetEndpointAttributes where-        toHeaders = const mempty--instance ToPath GetEndpointAttributes where-        toPath = const "/"--instance ToQuery GetEndpointAttributes where-        toQuery GetEndpointAttributes'{..}-          = mconcat-              ["Action" =: ("GetEndpointAttributes" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "EndpointArn" =: _geaEndpointARN]---- | Response from GetEndpointAttributes of the EndpointArn.------------ /See:/ 'getEndpointAttributesResponse' smart constructor.-data GetEndpointAttributesResponse = GetEndpointAttributesResponse'-  { _gearsAttributes     :: !(Maybe (Map Text Text))-  , _gearsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'GetEndpointAttributesResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'gearsAttributes' - Attributes include the following:     * @CustomUserData@ -- arbitrary user data to associate with the endpoint. Amazon SNS does not use this data. The data must be in UTF-8 format and less than 2KB.     * @Enabled@ -- flag that enables/disables delivery to the endpoint. Amazon SNS will set this to false when a notification service indicates to Amazon SNS that the endpoint is invalid. Users can set it back to true, typically after updating Token.     * @Token@ -- device token, also referred to as a registration id, for an app and mobile device. This is returned from the notification service when an app and mobile device are registered with the notification service.------ * 'gearsResponseStatus' - -- | The response status code.-getEndpointAttributesResponse-    :: Int -- ^ 'gearsResponseStatus'-    -> GetEndpointAttributesResponse-getEndpointAttributesResponse pResponseStatus_ =-  GetEndpointAttributesResponse'-  {_gearsAttributes = Nothing, _gearsResponseStatus = pResponseStatus_}----- | Attributes include the following:     * @CustomUserData@ -- arbitrary user data to associate with the endpoint. Amazon SNS does not use this data. The data must be in UTF-8 format and less than 2KB.     * @Enabled@ -- flag that enables/disables delivery to the endpoint. Amazon SNS will set this to false when a notification service indicates to Amazon SNS that the endpoint is invalid. Users can set it back to true, typically after updating Token.     * @Token@ -- device token, also referred to as a registration id, for an app and mobile device. This is returned from the notification service when an app and mobile device are registered with the notification service.-gearsAttributes :: Lens' GetEndpointAttributesResponse (HashMap Text Text)-gearsAttributes = lens _gearsAttributes (\ s a -> s{_gearsAttributes = a}) . _Default . _Map;---- | -- | The response status code.-gearsResponseStatus :: Lens' GetEndpointAttributesResponse Int-gearsResponseStatus = lens _gearsResponseStatus (\ s a -> s{_gearsResponseStatus = a});--instance NFData GetEndpointAttributesResponse where
− gen/Network/AWS/SNS/GetPlatformApplicationAttributes.hs
@@ -1,148 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.GetPlatformApplicationAttributes--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications> .-------module Network.AWS.SNS.GetPlatformApplicationAttributes-    (-    -- * Creating a Request-      getPlatformApplicationAttributes-    , GetPlatformApplicationAttributes-    -- * Request Lenses-    , gpaaPlatformApplicationARN--    -- * Destructuring the Response-    , getPlatformApplicationAttributesResponse-    , GetPlatformApplicationAttributesResponse-    -- * Response Lenses-    , gpaarsAttributes-    , gpaarsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for GetPlatformApplicationAttributes action.------------ /See:/ 'getPlatformApplicationAttributes' smart constructor.-newtype GetPlatformApplicationAttributes = GetPlatformApplicationAttributes'-  { _gpaaPlatformApplicationARN :: Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'GetPlatformApplicationAttributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'gpaaPlatformApplicationARN' - PlatformApplicationArn for GetPlatformApplicationAttributesInput.-getPlatformApplicationAttributes-    :: Text -- ^ 'gpaaPlatformApplicationARN'-    -> GetPlatformApplicationAttributes-getPlatformApplicationAttributes pPlatformApplicationARN_ =-  GetPlatformApplicationAttributes'-  {_gpaaPlatformApplicationARN = pPlatformApplicationARN_}----- | PlatformApplicationArn for GetPlatformApplicationAttributesInput.-gpaaPlatformApplicationARN :: Lens' GetPlatformApplicationAttributes Text-gpaaPlatformApplicationARN = lens _gpaaPlatformApplicationARN (\ s a -> s{_gpaaPlatformApplicationARN = a});--instance AWSRequest GetPlatformApplicationAttributes-         where-        type Rs GetPlatformApplicationAttributes =-             GetPlatformApplicationAttributesResponse-        request = postQuery sns-        response-          = receiveXMLWrapper-              "GetPlatformApplicationAttributesResult"-              (\ s h x ->-                 GetPlatformApplicationAttributesResponse' <$>-                   (x .@? "Attributes" .!@ mempty >>=-                      may (parseXMLMap "entry" "key" "value"))-                     <*> (pure (fromEnum s)))--instance Hashable GetPlatformApplicationAttributes-         where--instance NFData GetPlatformApplicationAttributes-         where--instance ToHeaders GetPlatformApplicationAttributes-         where-        toHeaders = const mempty--instance ToPath GetPlatformApplicationAttributes-         where-        toPath = const "/"--instance ToQuery GetPlatformApplicationAttributes-         where-        toQuery GetPlatformApplicationAttributes'{..}-          = mconcat-              ["Action" =:-                 ("GetPlatformApplicationAttributes" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "PlatformApplicationArn" =:-                 _gpaaPlatformApplicationARN]---- | Response for GetPlatformApplicationAttributes action.------------ /See:/ 'getPlatformApplicationAttributesResponse' smart constructor.-data GetPlatformApplicationAttributesResponse = GetPlatformApplicationAttributesResponse'-  { _gpaarsAttributes     :: !(Maybe (Map Text Text))-  , _gpaarsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'GetPlatformApplicationAttributesResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'gpaarsAttributes' - Attributes include the following:     * @EventEndpointCreated@ -- Topic ARN to which EndpointCreated event notifications should be sent.     * @EventEndpointDeleted@ -- Topic ARN to which EndpointDeleted event notifications should be sent.     * @EventEndpointUpdated@ -- Topic ARN to which EndpointUpdate event notifications should be sent.     * @EventDeliveryFailure@ -- Topic ARN to which DeliveryFailure event notifications should be sent upon Direct Publish delivery failure (permanent) to one of the application's endpoints.------ * 'gpaarsResponseStatus' - -- | The response status code.-getPlatformApplicationAttributesResponse-    :: Int -- ^ 'gpaarsResponseStatus'-    -> GetPlatformApplicationAttributesResponse-getPlatformApplicationAttributesResponse pResponseStatus_ =-  GetPlatformApplicationAttributesResponse'-  {_gpaarsAttributes = Nothing, _gpaarsResponseStatus = pResponseStatus_}----- | Attributes include the following:     * @EventEndpointCreated@ -- Topic ARN to which EndpointCreated event notifications should be sent.     * @EventEndpointDeleted@ -- Topic ARN to which EndpointDeleted event notifications should be sent.     * @EventEndpointUpdated@ -- Topic ARN to which EndpointUpdate event notifications should be sent.     * @EventDeliveryFailure@ -- Topic ARN to which DeliveryFailure event notifications should be sent upon Direct Publish delivery failure (permanent) to one of the application's endpoints.-gpaarsAttributes :: Lens' GetPlatformApplicationAttributesResponse (HashMap Text Text)-gpaarsAttributes = lens _gpaarsAttributes (\ s a -> s{_gpaarsAttributes = a}) . _Default . _Map;---- | -- | The response status code.-gpaarsResponseStatus :: Lens' GetPlatformApplicationAttributesResponse Int-gpaarsResponseStatus = lens _gpaarsResponseStatus (\ s a -> s{_gpaarsResponseStatus = a});--instance NFData-           GetPlatformApplicationAttributesResponse-         where
− gen/Network/AWS/SNS/GetSMSAttributes.hs
@@ -1,136 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.GetSMSAttributes--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Returns the settings for sending SMS messages from your account.--------- These settings are set with the @SetSMSAttributes@ action.----module Network.AWS.SNS.GetSMSAttributes-    (-    -- * Creating a Request-      getSMSAttributes-    , GetSMSAttributes-    -- * Request Lenses-    , gsmsaAttributes--    -- * Destructuring the Response-    , getSMSAttributesResponse-    , GetSMSAttributesResponse-    -- * Response Lenses-    , gsmsarsAttributes-    , gsmsarsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | The input for the @GetSMSAttributes@ request.------------ /See:/ 'getSMSAttributes' smart constructor.-newtype GetSMSAttributes = GetSMSAttributes'-  { _gsmsaAttributes :: Maybe [Text]-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'GetSMSAttributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'gsmsaAttributes' - A list of the individual attribute names, such as @MonthlySpendLimit@ , for which you want values. For all attribute names, see <http://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html SetSMSAttributes> . If you don't use this parameter, Amazon SNS returns all SMS attributes.-getSMSAttributes-    :: GetSMSAttributes-getSMSAttributes = GetSMSAttributes' {_gsmsaAttributes = Nothing}----- | A list of the individual attribute names, such as @MonthlySpendLimit@ , for which you want values. For all attribute names, see <http://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html SetSMSAttributes> . If you don't use this parameter, Amazon SNS returns all SMS attributes.-gsmsaAttributes :: Lens' GetSMSAttributes [Text]-gsmsaAttributes = lens _gsmsaAttributes (\ s a -> s{_gsmsaAttributes = a}) . _Default . _Coerce;--instance AWSRequest GetSMSAttributes where-        type Rs GetSMSAttributes = GetSMSAttributesResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "GetSMSAttributesResult"-              (\ s h x ->-                 GetSMSAttributesResponse' <$>-                   (x .@? "attributes" .!@ mempty >>=-                      may (parseXMLMap "entry" "key" "value"))-                     <*> (pure (fromEnum s)))--instance Hashable GetSMSAttributes where--instance NFData GetSMSAttributes where--instance ToHeaders GetSMSAttributes where-        toHeaders = const mempty--instance ToPath GetSMSAttributes where-        toPath = const "/"--instance ToQuery GetSMSAttributes where-        toQuery GetSMSAttributes'{..}-          = mconcat-              ["Action" =: ("GetSMSAttributes" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "attributes" =:-                 toQuery (toQueryList "member" <$> _gsmsaAttributes)]---- | The response from the @GetSMSAttributes@ request.------------ /See:/ 'getSMSAttributesResponse' smart constructor.-data GetSMSAttributesResponse = GetSMSAttributesResponse'-  { _gsmsarsAttributes     :: !(Maybe (Map Text Text))-  , _gsmsarsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'GetSMSAttributesResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'gsmsarsAttributes' - The SMS attribute names and their values.------ * 'gsmsarsResponseStatus' - -- | The response status code.-getSMSAttributesResponse-    :: Int -- ^ 'gsmsarsResponseStatus'-    -> GetSMSAttributesResponse-getSMSAttributesResponse pResponseStatus_ =-  GetSMSAttributesResponse'-  {_gsmsarsAttributes = Nothing, _gsmsarsResponseStatus = pResponseStatus_}----- | The SMS attribute names and their values.-gsmsarsAttributes :: Lens' GetSMSAttributesResponse (HashMap Text Text)-gsmsarsAttributes = lens _gsmsarsAttributes (\ s a -> s{_gsmsarsAttributes = a}) . _Default . _Map;---- | -- | The response status code.-gsmsarsResponseStatus :: Lens' GetSMSAttributesResponse Int-gsmsarsResponseStatus = lens _gsmsarsResponseStatus (\ s a -> s{_gsmsarsResponseStatus = a});--instance NFData GetSMSAttributesResponse where
− gen/Network/AWS/SNS/GetSubscriptionAttributes.hs
@@ -1,138 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.GetSubscriptionAttributes--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Returns all of the properties of a subscription.-------module Network.AWS.SNS.GetSubscriptionAttributes-    (-    -- * Creating a Request-      getSubscriptionAttributes-    , GetSubscriptionAttributes-    -- * Request Lenses-    , gsaSubscriptionARN--    -- * Destructuring the Response-    , getSubscriptionAttributesResponse-    , GetSubscriptionAttributesResponse-    -- * Response Lenses-    , gsarsAttributes-    , gsarsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for GetSubscriptionAttributes.------------ /See:/ 'getSubscriptionAttributes' smart constructor.-newtype GetSubscriptionAttributes = GetSubscriptionAttributes'-  { _gsaSubscriptionARN :: Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'GetSubscriptionAttributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'gsaSubscriptionARN' - The ARN of the subscription whose properties you want to get.-getSubscriptionAttributes-    :: Text -- ^ 'gsaSubscriptionARN'-    -> GetSubscriptionAttributes-getSubscriptionAttributes pSubscriptionARN_ =-  GetSubscriptionAttributes' {_gsaSubscriptionARN = pSubscriptionARN_}----- | The ARN of the subscription whose properties you want to get.-gsaSubscriptionARN :: Lens' GetSubscriptionAttributes Text-gsaSubscriptionARN = lens _gsaSubscriptionARN (\ s a -> s{_gsaSubscriptionARN = a});--instance AWSRequest GetSubscriptionAttributes where-        type Rs GetSubscriptionAttributes =-             GetSubscriptionAttributesResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "GetSubscriptionAttributesResult"-              (\ s h x ->-                 GetSubscriptionAttributesResponse' <$>-                   (x .@? "Attributes" .!@ mempty >>=-                      may (parseXMLMap "entry" "key" "value"))-                     <*> (pure (fromEnum s)))--instance Hashable GetSubscriptionAttributes where--instance NFData GetSubscriptionAttributes where--instance ToHeaders GetSubscriptionAttributes where-        toHeaders = const mempty--instance ToPath GetSubscriptionAttributes where-        toPath = const "/"--instance ToQuery GetSubscriptionAttributes where-        toQuery GetSubscriptionAttributes'{..}-          = mconcat-              ["Action" =:-                 ("GetSubscriptionAttributes" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "SubscriptionArn" =: _gsaSubscriptionARN]---- | Response for GetSubscriptionAttributes action.------------ /See:/ 'getSubscriptionAttributesResponse' smart constructor.-data GetSubscriptionAttributesResponse = GetSubscriptionAttributesResponse'-  { _gsarsAttributes     :: !(Maybe (Map Text Text))-  , _gsarsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'GetSubscriptionAttributesResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'gsarsAttributes' - A map of the subscription's attributes. Attributes in this map include the following:     * @SubscriptionArn@ -- the subscription's ARN     * @TopicArn@ -- the topic ARN that the subscription is associated with     * @Owner@ -- the AWS account ID of the subscription's owner     * @ConfirmationWasAuthenticated@ -- true if the subscription confirmation request was authenticated     * @DeliveryPolicy@ -- the JSON serialization of the subscription's delivery policy     * @EffectiveDeliveryPolicy@ -- the JSON serialization of the effective delivery policy that takes into account the topic delivery policy and account system defaults------ * 'gsarsResponseStatus' - -- | The response status code.-getSubscriptionAttributesResponse-    :: Int -- ^ 'gsarsResponseStatus'-    -> GetSubscriptionAttributesResponse-getSubscriptionAttributesResponse pResponseStatus_ =-  GetSubscriptionAttributesResponse'-  {_gsarsAttributes = Nothing, _gsarsResponseStatus = pResponseStatus_}----- | A map of the subscription's attributes. Attributes in this map include the following:     * @SubscriptionArn@ -- the subscription's ARN     * @TopicArn@ -- the topic ARN that the subscription is associated with     * @Owner@ -- the AWS account ID of the subscription's owner     * @ConfirmationWasAuthenticated@ -- true if the subscription confirmation request was authenticated     * @DeliveryPolicy@ -- the JSON serialization of the subscription's delivery policy     * @EffectiveDeliveryPolicy@ -- the JSON serialization of the effective delivery policy that takes into account the topic delivery policy and account system defaults-gsarsAttributes :: Lens' GetSubscriptionAttributesResponse (HashMap Text Text)-gsarsAttributes = lens _gsarsAttributes (\ s a -> s{_gsarsAttributes = a}) . _Default . _Map;---- | -- | The response status code.-gsarsResponseStatus :: Lens' GetSubscriptionAttributesResponse Int-gsarsResponseStatus = lens _gsarsResponseStatus (\ s a -> s{_gsarsResponseStatus = a});--instance NFData GetSubscriptionAttributesResponse-         where
− gen/Network/AWS/SNS/GetTopicAttributes.hs
@@ -1,135 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.GetTopicAttributes--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.-------module Network.AWS.SNS.GetTopicAttributes-    (-    -- * Creating a Request-      getTopicAttributes-    , GetTopicAttributes-    -- * Request Lenses-    , gtaTopicARN--    -- * Destructuring the Response-    , getTopicAttributesResponse-    , GetTopicAttributesResponse-    -- * Response Lenses-    , gtarsAttributes-    , gtarsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for GetTopicAttributes action.------------ /See:/ 'getTopicAttributes' smart constructor.-newtype GetTopicAttributes = GetTopicAttributes'-  { _gtaTopicARN :: Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'GetTopicAttributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'gtaTopicARN' - The ARN of the topic whose properties you want to get.-getTopicAttributes-    :: Text -- ^ 'gtaTopicARN'-    -> GetTopicAttributes-getTopicAttributes pTopicARN_ = GetTopicAttributes' {_gtaTopicARN = pTopicARN_}----- | The ARN of the topic whose properties you want to get.-gtaTopicARN :: Lens' GetTopicAttributes Text-gtaTopicARN = lens _gtaTopicARN (\ s a -> s{_gtaTopicARN = a});--instance AWSRequest GetTopicAttributes where-        type Rs GetTopicAttributes =-             GetTopicAttributesResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "GetTopicAttributesResult"-              (\ s h x ->-                 GetTopicAttributesResponse' <$>-                   (x .@? "Attributes" .!@ mempty >>=-                      may (parseXMLMap "entry" "key" "value"))-                     <*> (pure (fromEnum s)))--instance Hashable GetTopicAttributes where--instance NFData GetTopicAttributes where--instance ToHeaders GetTopicAttributes where-        toHeaders = const mempty--instance ToPath GetTopicAttributes where-        toPath = const "/"--instance ToQuery GetTopicAttributes where-        toQuery GetTopicAttributes'{..}-          = mconcat-              ["Action" =: ("GetTopicAttributes" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "TopicArn" =: _gtaTopicARN]---- | Response for GetTopicAttributes action.------------ /See:/ 'getTopicAttributesResponse' smart constructor.-data GetTopicAttributesResponse = GetTopicAttributesResponse'-  { _gtarsAttributes     :: !(Maybe (Map Text Text))-  , _gtarsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'GetTopicAttributesResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'gtarsAttributes' - A map of the topic's attributes. Attributes in this map include the following:     * @TopicArn@ -- the topic's ARN     * @Owner@ -- the AWS account ID of the topic's owner     * @Policy@ -- the JSON serialization of the topic's access control policy     * @DisplayName@ -- the human-readable name used in the "From" field for notifications to email and email-json endpoints     * @SubscriptionsPending@ -- the number of subscriptions pending confirmation on this topic     * @SubscriptionsConfirmed@ -- the number of confirmed subscriptions on this topic     * @SubscriptionsDeleted@ -- the number of deleted subscriptions on this topic     * @DeliveryPolicy@ -- the JSON serialization of the topic's delivery policy     * @EffectiveDeliveryPolicy@ -- the JSON serialization of the effective delivery policy that takes into account system defaults------ * 'gtarsResponseStatus' - -- | The response status code.-getTopicAttributesResponse-    :: Int -- ^ 'gtarsResponseStatus'-    -> GetTopicAttributesResponse-getTopicAttributesResponse pResponseStatus_ =-  GetTopicAttributesResponse'-  {_gtarsAttributes = Nothing, _gtarsResponseStatus = pResponseStatus_}----- | A map of the topic's attributes. Attributes in this map include the following:     * @TopicArn@ -- the topic's ARN     * @Owner@ -- the AWS account ID of the topic's owner     * @Policy@ -- the JSON serialization of the topic's access control policy     * @DisplayName@ -- the human-readable name used in the "From" field for notifications to email and email-json endpoints     * @SubscriptionsPending@ -- the number of subscriptions pending confirmation on this topic     * @SubscriptionsConfirmed@ -- the number of confirmed subscriptions on this topic     * @SubscriptionsDeleted@ -- the number of deleted subscriptions on this topic     * @DeliveryPolicy@ -- the JSON serialization of the topic's delivery policy     * @EffectiveDeliveryPolicy@ -- the JSON serialization of the effective delivery policy that takes into account system defaults-gtarsAttributes :: Lens' GetTopicAttributesResponse (HashMap Text Text)-gtarsAttributes = lens _gtarsAttributes (\ s a -> s{_gtarsAttributes = a}) . _Default . _Map;---- | -- | The response status code.-gtarsResponseStatus :: Lens' GetTopicAttributesResponse Int-gtarsResponseStatus = lens _gtarsResponseStatus (\ s a -> s{_gtarsResponseStatus = a});--instance NFData GetTopicAttributesResponse where
− gen/Network/AWS/SNS/ListEndpointsByPlatformApplication.hs
@@ -1,183 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.ListEndpointsByPlatformApplication--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM and APNS. The results for @ListEndpointsByPlatformApplication@ are paginated and return a limited list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call @ListEndpointsByPlatformApplication@ again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications> .------------ This operation returns paginated results.-module Network.AWS.SNS.ListEndpointsByPlatformApplication-    (-    -- * Creating a Request-      listEndpointsByPlatformApplication-    , ListEndpointsByPlatformApplication-    -- * Request Lenses-    , lebpaNextToken-    , lebpaPlatformApplicationARN--    -- * Destructuring the Response-    , listEndpointsByPlatformApplicationResponse-    , ListEndpointsByPlatformApplicationResponse-    -- * Response Lenses-    , lebparsNextToken-    , lebparsEndpoints-    , lebparsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Pager-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for ListEndpointsByPlatformApplication action.------------ /See:/ 'listEndpointsByPlatformApplication' smart constructor.-data ListEndpointsByPlatformApplication = ListEndpointsByPlatformApplication'-  { _lebpaNextToken              :: !(Maybe Text)-  , _lebpaPlatformApplicationARN :: !Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListEndpointsByPlatformApplication' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lebpaNextToken' - NextToken string is used when calling ListEndpointsByPlatformApplication action to retrieve additional records that are available after the first page results.------ * 'lebpaPlatformApplicationARN' - PlatformApplicationArn for ListEndpointsByPlatformApplicationInput action.-listEndpointsByPlatformApplication-    :: Text -- ^ 'lebpaPlatformApplicationARN'-    -> ListEndpointsByPlatformApplication-listEndpointsByPlatformApplication pPlatformApplicationARN_ =-  ListEndpointsByPlatformApplication'-  { _lebpaNextToken = Nothing-  , _lebpaPlatformApplicationARN = pPlatformApplicationARN_-  }----- | NextToken string is used when calling ListEndpointsByPlatformApplication action to retrieve additional records that are available after the first page results.-lebpaNextToken :: Lens' ListEndpointsByPlatformApplication (Maybe Text)-lebpaNextToken = lens _lebpaNextToken (\ s a -> s{_lebpaNextToken = a});---- | PlatformApplicationArn for ListEndpointsByPlatformApplicationInput action.-lebpaPlatformApplicationARN :: Lens' ListEndpointsByPlatformApplication Text-lebpaPlatformApplicationARN = lens _lebpaPlatformApplicationARN (\ s a -> s{_lebpaPlatformApplicationARN = a});--instance AWSPager ListEndpointsByPlatformApplication-         where-        page rq rs-          | stop (rs ^. lebparsNextToken) = Nothing-          | stop (rs ^. lebparsEndpoints) = Nothing-          | otherwise =-            Just $ rq & lebpaNextToken .~ rs ^. lebparsNextToken--instance AWSRequest-           ListEndpointsByPlatformApplication-         where-        type Rs ListEndpointsByPlatformApplication =-             ListEndpointsByPlatformApplicationResponse-        request = postQuery sns-        response-          = receiveXMLWrapper-              "ListEndpointsByPlatformApplicationResult"-              (\ s h x ->-                 ListEndpointsByPlatformApplicationResponse' <$>-                   (x .@? "NextToken") <*>-                     (x .@? "Endpoints" .!@ mempty >>=-                        may (parseXMLList "member"))-                     <*> (pure (fromEnum s)))--instance Hashable ListEndpointsByPlatformApplication-         where--instance NFData ListEndpointsByPlatformApplication-         where--instance ToHeaders ListEndpointsByPlatformApplication-         where-        toHeaders = const mempty--instance ToPath ListEndpointsByPlatformApplication-         where-        toPath = const "/"--instance ToQuery ListEndpointsByPlatformApplication-         where-        toQuery ListEndpointsByPlatformApplication'{..}-          = mconcat-              ["Action" =:-                 ("ListEndpointsByPlatformApplication" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "NextToken" =: _lebpaNextToken,-               "PlatformApplicationArn" =:-                 _lebpaPlatformApplicationARN]---- | Response for ListEndpointsByPlatformApplication action.------------ /See:/ 'listEndpointsByPlatformApplicationResponse' smart constructor.-data ListEndpointsByPlatformApplicationResponse = ListEndpointsByPlatformApplicationResponse'-  { _lebparsNextToken      :: !(Maybe Text)-  , _lebparsEndpoints      :: !(Maybe [Endpoint])-  , _lebparsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListEndpointsByPlatformApplicationResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lebparsNextToken' - NextToken string is returned when calling ListEndpointsByPlatformApplication action if additional records are available after the first page results.------ * 'lebparsEndpoints' - Endpoints returned for ListEndpointsByPlatformApplication action.------ * 'lebparsResponseStatus' - -- | The response status code.-listEndpointsByPlatformApplicationResponse-    :: Int -- ^ 'lebparsResponseStatus'-    -> ListEndpointsByPlatformApplicationResponse-listEndpointsByPlatformApplicationResponse pResponseStatus_ =-  ListEndpointsByPlatformApplicationResponse'-  { _lebparsNextToken = Nothing-  , _lebparsEndpoints = Nothing-  , _lebparsResponseStatus = pResponseStatus_-  }----- | NextToken string is returned when calling ListEndpointsByPlatformApplication action if additional records are available after the first page results.-lebparsNextToken :: Lens' ListEndpointsByPlatformApplicationResponse (Maybe Text)-lebparsNextToken = lens _lebparsNextToken (\ s a -> s{_lebparsNextToken = a});---- | Endpoints returned for ListEndpointsByPlatformApplication action.-lebparsEndpoints :: Lens' ListEndpointsByPlatformApplicationResponse [Endpoint]-lebparsEndpoints = lens _lebparsEndpoints (\ s a -> s{_lebparsEndpoints = a}) . _Default . _Coerce;---- | -- | The response status code.-lebparsResponseStatus :: Lens' ListEndpointsByPlatformApplicationResponse Int-lebparsResponseStatus = lens _lebparsResponseStatus (\ s a -> s{_lebparsResponseStatus = a});--instance NFData-           ListEndpointsByPlatformApplicationResponse-         where
− gen/Network/AWS/SNS/ListPhoneNumbersOptedOut.hs
@@ -1,150 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.ListPhoneNumbersOptedOut--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them.--------- The results for @ListPhoneNumbersOptedOut@ are paginated, and each page returns up to 100 phone numbers. If additional phone numbers are available after the first page of results, then a @NextToken@ string will be returned. To receive the next page, you call @ListPhoneNumbersOptedOut@ again using the @NextToken@ string received from the previous call. When there are no more records to return, @NextToken@ will be null.----module Network.AWS.SNS.ListPhoneNumbersOptedOut-    (-    -- * Creating a Request-      listPhoneNumbersOptedOut-    , ListPhoneNumbersOptedOut-    -- * Request Lenses-    , lpnooNextToken--    -- * Destructuring the Response-    , listPhoneNumbersOptedOutResponse-    , ListPhoneNumbersOptedOutResponse-    -- * Response Lenses-    , lpnoorsPhoneNumbers-    , lpnoorsNextToken-    , lpnoorsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | The input for the @ListPhoneNumbersOptedOut@ action.------------ /See:/ 'listPhoneNumbersOptedOut' smart constructor.-newtype ListPhoneNumbersOptedOut = ListPhoneNumbersOptedOut'-  { _lpnooNextToken :: Maybe Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListPhoneNumbersOptedOut' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lpnooNextToken' - A @NextToken@ string is used when you call the @ListPhoneNumbersOptedOut@ action to retrieve additional records that are available after the first page of results.-listPhoneNumbersOptedOut-    :: ListPhoneNumbersOptedOut-listPhoneNumbersOptedOut = ListPhoneNumbersOptedOut' {_lpnooNextToken = Nothing}----- | A @NextToken@ string is used when you call the @ListPhoneNumbersOptedOut@ action to retrieve additional records that are available after the first page of results.-lpnooNextToken :: Lens' ListPhoneNumbersOptedOut (Maybe Text)-lpnooNextToken = lens _lpnooNextToken (\ s a -> s{_lpnooNextToken = a});--instance AWSRequest ListPhoneNumbersOptedOut where-        type Rs ListPhoneNumbersOptedOut =-             ListPhoneNumbersOptedOutResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "ListPhoneNumbersOptedOutResult"-              (\ s h x ->-                 ListPhoneNumbersOptedOutResponse' <$>-                   (x .@? "phoneNumbers" .!@ mempty >>=-                      may (parseXMLList "member"))-                     <*> (x .@? "nextToken")-                     <*> (pure (fromEnum s)))--instance Hashable ListPhoneNumbersOptedOut where--instance NFData ListPhoneNumbersOptedOut where--instance ToHeaders ListPhoneNumbersOptedOut where-        toHeaders = const mempty--instance ToPath ListPhoneNumbersOptedOut where-        toPath = const "/"--instance ToQuery ListPhoneNumbersOptedOut where-        toQuery ListPhoneNumbersOptedOut'{..}-          = mconcat-              ["Action" =:-                 ("ListPhoneNumbersOptedOut" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "nextToken" =: _lpnooNextToken]---- | The response from the @ListPhoneNumbersOptedOut@ action.------------ /See:/ 'listPhoneNumbersOptedOutResponse' smart constructor.-data ListPhoneNumbersOptedOutResponse = ListPhoneNumbersOptedOutResponse'-  { _lpnoorsPhoneNumbers   :: !(Maybe [Text])-  , _lpnoorsNextToken      :: !(Maybe Text)-  , _lpnoorsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListPhoneNumbersOptedOutResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lpnoorsPhoneNumbers' - A list of phone numbers that are opted out of receiving SMS messages. The list is paginated, and each page can contain up to 100 phone numbers.------ * 'lpnoorsNextToken' - A @NextToken@ string is returned when you call the @ListPhoneNumbersOptedOut@ action if additional records are available after the first page of results.------ * 'lpnoorsResponseStatus' - -- | The response status code.-listPhoneNumbersOptedOutResponse-    :: Int -- ^ 'lpnoorsResponseStatus'-    -> ListPhoneNumbersOptedOutResponse-listPhoneNumbersOptedOutResponse pResponseStatus_ =-  ListPhoneNumbersOptedOutResponse'-  { _lpnoorsPhoneNumbers = Nothing-  , _lpnoorsNextToken = Nothing-  , _lpnoorsResponseStatus = pResponseStatus_-  }----- | A list of phone numbers that are opted out of receiving SMS messages. The list is paginated, and each page can contain up to 100 phone numbers.-lpnoorsPhoneNumbers :: Lens' ListPhoneNumbersOptedOutResponse [Text]-lpnoorsPhoneNumbers = lens _lpnoorsPhoneNumbers (\ s a -> s{_lpnoorsPhoneNumbers = a}) . _Default . _Coerce;---- | A @NextToken@ string is returned when you call the @ListPhoneNumbersOptedOut@ action if additional records are available after the first page of results.-lpnoorsNextToken :: Lens' ListPhoneNumbersOptedOutResponse (Maybe Text)-lpnoorsNextToken = lens _lpnoorsNextToken (\ s a -> s{_lpnoorsNextToken = a});---- | -- | The response status code.-lpnoorsResponseStatus :: Lens' ListPhoneNumbersOptedOutResponse Int-lpnoorsResponseStatus = lens _lpnoorsResponseStatus (\ s a -> s{_lpnoorsResponseStatus = a});--instance NFData ListPhoneNumbersOptedOutResponse-         where
− gen/Network/AWS/SNS/ListPlatformApplications.hs
@@ -1,158 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.ListPlatformApplications--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Lists the platform application objects for the supported push notification services, such as APNS and GCM. The results for @ListPlatformApplications@ are paginated and return a limited list of applications, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call @ListPlatformApplications@ using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications> .------------ This operation returns paginated results.-module Network.AWS.SNS.ListPlatformApplications-    (-    -- * Creating a Request-      listPlatformApplications-    , ListPlatformApplications-    -- * Request Lenses-    , lpaNextToken--    -- * Destructuring the Response-    , listPlatformApplicationsResponse-    , ListPlatformApplicationsResponse-    -- * Response Lenses-    , lparsPlatformApplications-    , lparsNextToken-    , lparsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Pager-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for ListPlatformApplications action.------------ /See:/ 'listPlatformApplications' smart constructor.-newtype ListPlatformApplications = ListPlatformApplications'-  { _lpaNextToken :: Maybe Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListPlatformApplications' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lpaNextToken' - NextToken string is used when calling ListPlatformApplications action to retrieve additional records that are available after the first page results.-listPlatformApplications-    :: ListPlatformApplications-listPlatformApplications = ListPlatformApplications' {_lpaNextToken = Nothing}----- | NextToken string is used when calling ListPlatformApplications action to retrieve additional records that are available after the first page results.-lpaNextToken :: Lens' ListPlatformApplications (Maybe Text)-lpaNextToken = lens _lpaNextToken (\ s a -> s{_lpaNextToken = a});--instance AWSPager ListPlatformApplications where-        page rq rs-          | stop (rs ^. lparsNextToken) = Nothing-          | stop (rs ^. lparsPlatformApplications) = Nothing-          | otherwise =-            Just $ rq & lpaNextToken .~ rs ^. lparsNextToken--instance AWSRequest ListPlatformApplications where-        type Rs ListPlatformApplications =-             ListPlatformApplicationsResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "ListPlatformApplicationsResult"-              (\ s h x ->-                 ListPlatformApplicationsResponse' <$>-                   (x .@? "PlatformApplications" .!@ mempty >>=-                      may (parseXMLList "member"))-                     <*> (x .@? "NextToken")-                     <*> (pure (fromEnum s)))--instance Hashable ListPlatformApplications where--instance NFData ListPlatformApplications where--instance ToHeaders ListPlatformApplications where-        toHeaders = const mempty--instance ToPath ListPlatformApplications where-        toPath = const "/"--instance ToQuery ListPlatformApplications where-        toQuery ListPlatformApplications'{..}-          = mconcat-              ["Action" =:-                 ("ListPlatformApplications" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "NextToken" =: _lpaNextToken]---- | Response for ListPlatformApplications action.------------ /See:/ 'listPlatformApplicationsResponse' smart constructor.-data ListPlatformApplicationsResponse = ListPlatformApplicationsResponse'-  { _lparsPlatformApplications :: !(Maybe [PlatformApplication])-  , _lparsNextToken            :: !(Maybe Text)-  , _lparsResponseStatus       :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListPlatformApplicationsResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lparsPlatformApplications' - Platform applications returned when calling ListPlatformApplications action.------ * 'lparsNextToken' - NextToken string is returned when calling ListPlatformApplications action if additional records are available after the first page results.------ * 'lparsResponseStatus' - -- | The response status code.-listPlatformApplicationsResponse-    :: Int -- ^ 'lparsResponseStatus'-    -> ListPlatformApplicationsResponse-listPlatformApplicationsResponse pResponseStatus_ =-  ListPlatformApplicationsResponse'-  { _lparsPlatformApplications = Nothing-  , _lparsNextToken = Nothing-  , _lparsResponseStatus = pResponseStatus_-  }----- | Platform applications returned when calling ListPlatformApplications action.-lparsPlatformApplications :: Lens' ListPlatformApplicationsResponse [PlatformApplication]-lparsPlatformApplications = lens _lparsPlatformApplications (\ s a -> s{_lparsPlatformApplications = a}) . _Default . _Coerce;---- | NextToken string is returned when calling ListPlatformApplications action if additional records are available after the first page results.-lparsNextToken :: Lens' ListPlatformApplicationsResponse (Maybe Text)-lparsNextToken = lens _lparsNextToken (\ s a -> s{_lparsNextToken = a});---- | -- | The response status code.-lparsResponseStatus :: Lens' ListPlatformApplicationsResponse Int-lparsResponseStatus = lens _lparsResponseStatus (\ s a -> s{_lparsResponseStatus = a});--instance NFData ListPlatformApplicationsResponse-         where
− gen/Network/AWS/SNS/ListSubscriptions.hs
@@ -1,155 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.ListSubscriptions--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Returns a list of the requester's subscriptions. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a @NextToken@ is also returned. Use the @NextToken@ parameter in a new @ListSubscriptions@ call to get further results.------------ This operation returns paginated results.-module Network.AWS.SNS.ListSubscriptions-    (-    -- * Creating a Request-      listSubscriptions-    , ListSubscriptions-    -- * Request Lenses-    , lsNextToken--    -- * Destructuring the Response-    , listSubscriptionsResponse-    , ListSubscriptionsResponse-    -- * Response Lenses-    , lsrsNextToken-    , lsrsSubscriptions-    , lsrsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Pager-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for ListSubscriptions action.------------ /See:/ 'listSubscriptions' smart constructor.-newtype ListSubscriptions = ListSubscriptions'-  { _lsNextToken :: Maybe Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListSubscriptions' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lsNextToken' - Token returned by the previous @ListSubscriptions@ request.-listSubscriptions-    :: ListSubscriptions-listSubscriptions = ListSubscriptions' {_lsNextToken = Nothing}----- | Token returned by the previous @ListSubscriptions@ request.-lsNextToken :: Lens' ListSubscriptions (Maybe Text)-lsNextToken = lens _lsNextToken (\ s a -> s{_lsNextToken = a});--instance AWSPager ListSubscriptions where-        page rq rs-          | stop (rs ^. lsrsNextToken) = Nothing-          | stop (rs ^. lsrsSubscriptions) = Nothing-          | otherwise =-            Just $ rq & lsNextToken .~ rs ^. lsrsNextToken--instance AWSRequest ListSubscriptions where-        type Rs ListSubscriptions = ListSubscriptionsResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "ListSubscriptionsResult"-              (\ s h x ->-                 ListSubscriptionsResponse' <$>-                   (x .@? "NextToken") <*>-                     (x .@? "Subscriptions" .!@ mempty >>=-                        may (parseXMLList "member"))-                     <*> (pure (fromEnum s)))--instance Hashable ListSubscriptions where--instance NFData ListSubscriptions where--instance ToHeaders ListSubscriptions where-        toHeaders = const mempty--instance ToPath ListSubscriptions where-        toPath = const "/"--instance ToQuery ListSubscriptions where-        toQuery ListSubscriptions'{..}-          = mconcat-              ["Action" =: ("ListSubscriptions" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "NextToken" =: _lsNextToken]---- | Response for ListSubscriptions action------------ /See:/ 'listSubscriptionsResponse' smart constructor.-data ListSubscriptionsResponse = ListSubscriptionsResponse'-  { _lsrsNextToken      :: !(Maybe Text)-  , _lsrsSubscriptions  :: !(Maybe [Subscription])-  , _lsrsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListSubscriptionsResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lsrsNextToken' - Token to pass along to the next @ListSubscriptions@ request. This element is returned if there are more subscriptions to retrieve.------ * 'lsrsSubscriptions' - A list of subscriptions.------ * 'lsrsResponseStatus' - -- | The response status code.-listSubscriptionsResponse-    :: Int -- ^ 'lsrsResponseStatus'-    -> ListSubscriptionsResponse-listSubscriptionsResponse pResponseStatus_ =-  ListSubscriptionsResponse'-  { _lsrsNextToken = Nothing-  , _lsrsSubscriptions = Nothing-  , _lsrsResponseStatus = pResponseStatus_-  }----- | Token to pass along to the next @ListSubscriptions@ request. This element is returned if there are more subscriptions to retrieve.-lsrsNextToken :: Lens' ListSubscriptionsResponse (Maybe Text)-lsrsNextToken = lens _lsrsNextToken (\ s a -> s{_lsrsNextToken = a});---- | A list of subscriptions.-lsrsSubscriptions :: Lens' ListSubscriptionsResponse [Subscription]-lsrsSubscriptions = lens _lsrsSubscriptions (\ s a -> s{_lsrsSubscriptions = a}) . _Default . _Coerce;---- | -- | The response status code.-lsrsResponseStatus :: Lens' ListSubscriptionsResponse Int-lsrsResponseStatus = lens _lsrsResponseStatus (\ s a -> s{_lsrsResponseStatus = a});--instance NFData ListSubscriptionsResponse where
− gen/Network/AWS/SNS/ListSubscriptionsByTopic.hs
@@ -1,170 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.ListSubscriptionsByTopic--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Returns a list of the subscriptions to a specific topic. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a @NextToken@ is also returned. Use the @NextToken@ parameter in a new @ListSubscriptionsByTopic@ call to get further results.------------ This operation returns paginated results.-module Network.AWS.SNS.ListSubscriptionsByTopic-    (-    -- * Creating a Request-      listSubscriptionsByTopic-    , ListSubscriptionsByTopic-    -- * Request Lenses-    , lsbtNextToken-    , lsbtTopicARN--    -- * Destructuring the Response-    , listSubscriptionsByTopicResponse-    , ListSubscriptionsByTopicResponse-    -- * Response Lenses-    , lsbtrsNextToken-    , lsbtrsSubscriptions-    , lsbtrsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Pager-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for ListSubscriptionsByTopic action.------------ /See:/ 'listSubscriptionsByTopic' smart constructor.-data ListSubscriptionsByTopic = ListSubscriptionsByTopic'-  { _lsbtNextToken :: !(Maybe Text)-  , _lsbtTopicARN  :: !Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListSubscriptionsByTopic' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lsbtNextToken' - Token returned by the previous @ListSubscriptionsByTopic@ request.------ * 'lsbtTopicARN' - The ARN of the topic for which you wish to find subscriptions.-listSubscriptionsByTopic-    :: Text -- ^ 'lsbtTopicARN'-    -> ListSubscriptionsByTopic-listSubscriptionsByTopic pTopicARN_ =-  ListSubscriptionsByTopic'-  {_lsbtNextToken = Nothing, _lsbtTopicARN = pTopicARN_}----- | Token returned by the previous @ListSubscriptionsByTopic@ request.-lsbtNextToken :: Lens' ListSubscriptionsByTopic (Maybe Text)-lsbtNextToken = lens _lsbtNextToken (\ s a -> s{_lsbtNextToken = a});---- | The ARN of the topic for which you wish to find subscriptions.-lsbtTopicARN :: Lens' ListSubscriptionsByTopic Text-lsbtTopicARN = lens _lsbtTopicARN (\ s a -> s{_lsbtTopicARN = a});--instance AWSPager ListSubscriptionsByTopic where-        page rq rs-          | stop (rs ^. lsbtrsNextToken) = Nothing-          | stop (rs ^. lsbtrsSubscriptions) = Nothing-          | otherwise =-            Just $ rq & lsbtNextToken .~ rs ^. lsbtrsNextToken--instance AWSRequest ListSubscriptionsByTopic where-        type Rs ListSubscriptionsByTopic =-             ListSubscriptionsByTopicResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "ListSubscriptionsByTopicResult"-              (\ s h x ->-                 ListSubscriptionsByTopicResponse' <$>-                   (x .@? "NextToken") <*>-                     (x .@? "Subscriptions" .!@ mempty >>=-                        may (parseXMLList "member"))-                     <*> (pure (fromEnum s)))--instance Hashable ListSubscriptionsByTopic where--instance NFData ListSubscriptionsByTopic where--instance ToHeaders ListSubscriptionsByTopic where-        toHeaders = const mempty--instance ToPath ListSubscriptionsByTopic where-        toPath = const "/"--instance ToQuery ListSubscriptionsByTopic where-        toQuery ListSubscriptionsByTopic'{..}-          = mconcat-              ["Action" =:-                 ("ListSubscriptionsByTopic" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "NextToken" =: _lsbtNextToken,-               "TopicArn" =: _lsbtTopicARN]---- | Response for ListSubscriptionsByTopic action.------------ /See:/ 'listSubscriptionsByTopicResponse' smart constructor.-data ListSubscriptionsByTopicResponse = ListSubscriptionsByTopicResponse'-  { _lsbtrsNextToken      :: !(Maybe Text)-  , _lsbtrsSubscriptions  :: !(Maybe [Subscription])-  , _lsbtrsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListSubscriptionsByTopicResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lsbtrsNextToken' - Token to pass along to the next @ListSubscriptionsByTopic@ request. This element is returned if there are more subscriptions to retrieve.------ * 'lsbtrsSubscriptions' - A list of subscriptions.------ * 'lsbtrsResponseStatus' - -- | The response status code.-listSubscriptionsByTopicResponse-    :: Int -- ^ 'lsbtrsResponseStatus'-    -> ListSubscriptionsByTopicResponse-listSubscriptionsByTopicResponse pResponseStatus_ =-  ListSubscriptionsByTopicResponse'-  { _lsbtrsNextToken = Nothing-  , _lsbtrsSubscriptions = Nothing-  , _lsbtrsResponseStatus = pResponseStatus_-  }----- | Token to pass along to the next @ListSubscriptionsByTopic@ request. This element is returned if there are more subscriptions to retrieve.-lsbtrsNextToken :: Lens' ListSubscriptionsByTopicResponse (Maybe Text)-lsbtrsNextToken = lens _lsbtrsNextToken (\ s a -> s{_lsbtrsNextToken = a});---- | A list of subscriptions.-lsbtrsSubscriptions :: Lens' ListSubscriptionsByTopicResponse [Subscription]-lsbtrsSubscriptions = lens _lsbtrsSubscriptions (\ s a -> s{_lsbtrsSubscriptions = a}) . _Default . _Coerce;---- | -- | The response status code.-lsbtrsResponseStatus :: Lens' ListSubscriptionsByTopicResponse Int-lsbtrsResponseStatus = lens _lsbtrsResponseStatus (\ s a -> s{_lsbtrsResponseStatus = a});--instance NFData ListSubscriptionsByTopicResponse-         where
− gen/Network/AWS/SNS/ListTopics.hs
@@ -1,151 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.ListTopics--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Returns a list of the requester's topics. Each call returns a limited list of topics, up to 100. If there are more topics, a @NextToken@ is also returned. Use the @NextToken@ parameter in a new @ListTopics@ call to get further results.------------ This operation returns paginated results.-module Network.AWS.SNS.ListTopics-    (-    -- * Creating a Request-      listTopics-    , ListTopics-    -- * Request Lenses-    , ltNextToken--    -- * Destructuring the Response-    , listTopicsResponse-    , ListTopicsResponse-    -- * Response Lenses-    , ltrsTopics-    , ltrsNextToken-    , ltrsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Pager-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | /See:/ 'listTopics' smart constructor.-newtype ListTopics = ListTopics'-  { _ltNextToken :: Maybe Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListTopics' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'ltNextToken' - Token returned by the previous @ListTopics@ request.-listTopics-    :: ListTopics-listTopics = ListTopics' {_ltNextToken = Nothing}----- | Token returned by the previous @ListTopics@ request.-ltNextToken :: Lens' ListTopics (Maybe Text)-ltNextToken = lens _ltNextToken (\ s a -> s{_ltNextToken = a});--instance AWSPager ListTopics where-        page rq rs-          | stop (rs ^. ltrsNextToken) = Nothing-          | stop (rs ^. ltrsTopics) = Nothing-          | otherwise =-            Just $ rq & ltNextToken .~ rs ^. ltrsNextToken--instance AWSRequest ListTopics where-        type Rs ListTopics = ListTopicsResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "ListTopicsResult"-              (\ s h x ->-                 ListTopicsResponse' <$>-                   (x .@? "Topics" .!@ mempty >>=-                      may (parseXMLList "member"))-                     <*> (x .@? "NextToken")-                     <*> (pure (fromEnum s)))--instance Hashable ListTopics where--instance NFData ListTopics where--instance ToHeaders ListTopics where-        toHeaders = const mempty--instance ToPath ListTopics where-        toPath = const "/"--instance ToQuery ListTopics where-        toQuery ListTopics'{..}-          = mconcat-              ["Action" =: ("ListTopics" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "NextToken" =: _ltNextToken]---- | Response for ListTopics action.------------ /See:/ 'listTopicsResponse' smart constructor.-data ListTopicsResponse = ListTopicsResponse'-  { _ltrsTopics         :: !(Maybe [Topic])-  , _ltrsNextToken      :: !(Maybe Text)-  , _ltrsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'ListTopicsResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'ltrsTopics' - A list of topic ARNs.------ * 'ltrsNextToken' - Token to pass along to the next @ListTopics@ request. This element is returned if there are additional topics to retrieve.------ * 'ltrsResponseStatus' - -- | The response status code.-listTopicsResponse-    :: Int -- ^ 'ltrsResponseStatus'-    -> ListTopicsResponse-listTopicsResponse pResponseStatus_ =-  ListTopicsResponse'-  { _ltrsTopics = Nothing-  , _ltrsNextToken = Nothing-  , _ltrsResponseStatus = pResponseStatus_-  }----- | A list of topic ARNs.-ltrsTopics :: Lens' ListTopicsResponse [Topic]-ltrsTopics = lens _ltrsTopics (\ s a -> s{_ltrsTopics = a}) . _Default . _Coerce;---- | Token to pass along to the next @ListTopics@ request. This element is returned if there are additional topics to retrieve.-ltrsNextToken :: Lens' ListTopicsResponse (Maybe Text)-ltrsNextToken = lens _ltrsNextToken (\ s a -> s{_ltrsNextToken = a});---- | -- | The response status code.-ltrsResponseStatus :: Lens' ListTopicsResponse Int-ltrsResponseStatus = lens _ltrsResponseStatus (\ s a -> s{_ltrsResponseStatus = a});--instance NFData ListTopicsResponse where
− gen/Network/AWS/SNS/OptInPhoneNumber.hs
@@ -1,125 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.OptInPhoneNumber--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.--------- You can opt in a phone number only once every 30 days.----module Network.AWS.SNS.OptInPhoneNumber-    (-    -- * Creating a Request-      optInPhoneNumber-    , OptInPhoneNumber-    -- * Request Lenses-    , oipnPhoneNumber--    -- * Destructuring the Response-    , optInPhoneNumberResponse-    , OptInPhoneNumberResponse-    -- * Response Lenses-    , oipnrsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for the OptInPhoneNumber action.------------ /See:/ 'optInPhoneNumber' smart constructor.-newtype OptInPhoneNumber = OptInPhoneNumber'-  { _oipnPhoneNumber :: Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'OptInPhoneNumber' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'oipnPhoneNumber' - The phone number to opt in.-optInPhoneNumber-    :: Text -- ^ 'oipnPhoneNumber'-    -> OptInPhoneNumber-optInPhoneNumber pPhoneNumber_ =-  OptInPhoneNumber' {_oipnPhoneNumber = pPhoneNumber_}----- | The phone number to opt in.-oipnPhoneNumber :: Lens' OptInPhoneNumber Text-oipnPhoneNumber = lens _oipnPhoneNumber (\ s a -> s{_oipnPhoneNumber = a});--instance AWSRequest OptInPhoneNumber where-        type Rs OptInPhoneNumber = OptInPhoneNumberResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "OptInPhoneNumberResult"-              (\ s h x ->-                 OptInPhoneNumberResponse' <$> (pure (fromEnum s)))--instance Hashable OptInPhoneNumber where--instance NFData OptInPhoneNumber where--instance ToHeaders OptInPhoneNumber where-        toHeaders = const mempty--instance ToPath OptInPhoneNumber where-        toPath = const "/"--instance ToQuery OptInPhoneNumber where-        toQuery OptInPhoneNumber'{..}-          = mconcat-              ["Action" =: ("OptInPhoneNumber" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "phoneNumber" =: _oipnPhoneNumber]---- | The response for the OptInPhoneNumber action.------------ /See:/ 'optInPhoneNumberResponse' smart constructor.-newtype OptInPhoneNumberResponse = OptInPhoneNumberResponse'-  { _oipnrsResponseStatus :: Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'OptInPhoneNumberResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'oipnrsResponseStatus' - -- | The response status code.-optInPhoneNumberResponse-    :: Int -- ^ 'oipnrsResponseStatus'-    -> OptInPhoneNumberResponse-optInPhoneNumberResponse pResponseStatus_ =-  OptInPhoneNumberResponse' {_oipnrsResponseStatus = pResponseStatus_}----- | -- | The response status code.-oipnrsResponseStatus :: Lens' OptInPhoneNumberResponse Int-oipnrsResponseStatus = lens _oipnrsResponseStatus (\ s a -> s{_oipnrsResponseStatus = a});--instance NFData OptInPhoneNumberResponse where
− gen/Network/AWS/SNS/Publish.hs
@@ -1,201 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.Publish--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Sends a message to all of a topic's subscribed endpoints. When a @messageId@ is returned, the message has been saved and Amazon SNS will attempt to deliver it to the topic's subscribers shortly. The format of the outgoing message to each subscribed endpoint depends on the notification protocol.--------- To use the @Publish@ action for sending a message to a mobile endpoint, such as an app on a Kindle device or mobile phone, you must specify the EndpointArn for the TargetArn parameter. The EndpointArn is returned when making a call with the @CreatePlatformEndpoint@ action.------ For more information about formatting messages, see <http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html Send Custom Platform-Specific Payloads in Messages to Mobile Devices> .----module Network.AWS.SNS.Publish-    (-    -- * Creating a Request-      publish-    , Publish-    -- * Request Lenses-    , pSubject-    , pTargetARN-    , pMessageAttributes-    , pTopicARN-    , pPhoneNumber-    , pMessageStructure-    , pMessage--    -- * Destructuring the Response-    , publishResponse-    , PublishResponse-    -- * Response Lenses-    , prsMessageId-    , prsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for Publish action.------------ /See:/ 'publish' smart constructor.-data Publish = Publish'-  { _pSubject           :: !(Maybe Text)-  , _pTargetARN         :: !(Maybe Text)-  , _pMessageAttributes :: !(Maybe (Map Text MessageAttributeValue))-  , _pTopicARN          :: !(Maybe Text)-  , _pPhoneNumber       :: !(Maybe Text)-  , _pMessageStructure  :: !(Maybe Text)-  , _pMessage           :: !Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'Publish' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'pSubject' - Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints. Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.------ * 'pTargetARN' - Either TopicArn or EndpointArn, but not both. If you don't specify a value for the @TargetArn@ parameter, you must specify a value for the @PhoneNumber@ or @TopicArn@ parameters.------ * 'pMessageAttributes' - Message attributes for Publish action.------ * 'pTopicARN' - The topic you want to publish to. If you don't specify a value for the @TopicArn@ parameter, you must specify a value for the @PhoneNumber@ or @TargetArn@ parameters.------ * 'pPhoneNumber' - The phone number to which you want to deliver an SMS message. Use E.164 format. If you don't specify a value for the @PhoneNumber@ parameter, you must specify a value for the @TargetArn@ or @TopicArn@ parameters.------ * 'pMessageStructure' - Set @MessageStructure@ to @json@ if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set @MessageStructure@ to @json@ , the value of the @Message@ parameter must:      * be a syntactically valid JSON object; and     * contain at least a top-level JSON key of "default" with a value that is a string. You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http"). For information about sending different messages for each protocol using the AWS Management Console, go to <http://docs.aws.amazon.com/sns/latest/gsg/Publish.html#sns-message-formatting-by-protocol Create Different Messages for Each Protocol> in the /Amazon Simple Notification Service Getting Started Guide/ .  Valid value: @json@------ * 'pMessage' - The message you want to send to the topic. If you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the @MessageStructure@ parameter to @json@ and use a JSON object for the @Message@ parameter.  Constraints: Messages must be UTF-8 encoded strings at most 256 KB in size (262144 bytes, not 262144 characters). JSON-specific constraints:     * Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.     * The values will be parsed (unescaped) before they are used in outgoing messages.     * Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).     * Values have a minimum length of 0 (the empty string, "", is allowed).     * Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).     * Non-string values will cause the key to be ignored.     * Keys that do not correspond to supported transport protocols are ignored.     * Duplicate keys are not allowed.     * Failure to parse or validate any key or value in the message will cause the @Publish@ call to return an error (no partial delivery).-publish-    :: Text -- ^ 'pMessage'-    -> Publish-publish pMessage_ =-  Publish'-  { _pSubject = Nothing-  , _pTargetARN = Nothing-  , _pMessageAttributes = Nothing-  , _pTopicARN = Nothing-  , _pPhoneNumber = Nothing-  , _pMessageStructure = Nothing-  , _pMessage = pMessage_-  }----- | Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints. Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.-pSubject :: Lens' Publish (Maybe Text)-pSubject = lens _pSubject (\ s a -> s{_pSubject = a});---- | Either TopicArn or EndpointArn, but not both. If you don't specify a value for the @TargetArn@ parameter, you must specify a value for the @PhoneNumber@ or @TopicArn@ parameters.-pTargetARN :: Lens' Publish (Maybe Text)-pTargetARN = lens _pTargetARN (\ s a -> s{_pTargetARN = a});---- | Message attributes for Publish action.-pMessageAttributes :: Lens' Publish (HashMap Text MessageAttributeValue)-pMessageAttributes = lens _pMessageAttributes (\ s a -> s{_pMessageAttributes = a}) . _Default . _Map;---- | The topic you want to publish to. If you don't specify a value for the @TopicArn@ parameter, you must specify a value for the @PhoneNumber@ or @TargetArn@ parameters.-pTopicARN :: Lens' Publish (Maybe Text)-pTopicARN = lens _pTopicARN (\ s a -> s{_pTopicARN = a});---- | The phone number to which you want to deliver an SMS message. Use E.164 format. If you don't specify a value for the @PhoneNumber@ parameter, you must specify a value for the @TargetArn@ or @TopicArn@ parameters.-pPhoneNumber :: Lens' Publish (Maybe Text)-pPhoneNumber = lens _pPhoneNumber (\ s a -> s{_pPhoneNumber = a});---- | Set @MessageStructure@ to @json@ if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set @MessageStructure@ to @json@ , the value of the @Message@ parameter must:      * be a syntactically valid JSON object; and     * contain at least a top-level JSON key of "default" with a value that is a string. You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http"). For information about sending different messages for each protocol using the AWS Management Console, go to <http://docs.aws.amazon.com/sns/latest/gsg/Publish.html#sns-message-formatting-by-protocol Create Different Messages for Each Protocol> in the /Amazon Simple Notification Service Getting Started Guide/ .  Valid value: @json@-pMessageStructure :: Lens' Publish (Maybe Text)-pMessageStructure = lens _pMessageStructure (\ s a -> s{_pMessageStructure = a});---- | The message you want to send to the topic. If you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the @MessageStructure@ parameter to @json@ and use a JSON object for the @Message@ parameter.  Constraints: Messages must be UTF-8 encoded strings at most 256 KB in size (262144 bytes, not 262144 characters). JSON-specific constraints:     * Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.     * The values will be parsed (unescaped) before they are used in outgoing messages.     * Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).     * Values have a minimum length of 0 (the empty string, "", is allowed).     * Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).     * Non-string values will cause the key to be ignored.     * Keys that do not correspond to supported transport protocols are ignored.     * Duplicate keys are not allowed.     * Failure to parse or validate any key or value in the message will cause the @Publish@ call to return an error (no partial delivery).-pMessage :: Lens' Publish Text-pMessage = lens _pMessage (\ s a -> s{_pMessage = a});--instance AWSRequest Publish where-        type Rs Publish = PublishResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "PublishResult"-              (\ s h x ->-                 PublishResponse' <$>-                   (x .@? "MessageId") <*> (pure (fromEnum s)))--instance Hashable Publish where--instance NFData Publish where--instance ToHeaders Publish where-        toHeaders = const mempty--instance ToPath Publish where-        toPath = const "/"--instance ToQuery Publish where-        toQuery Publish'{..}-          = mconcat-              ["Action" =: ("Publish" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "Subject" =: _pSubject, "TargetArn" =: _pTargetARN,-               "MessageAttributes" =:-                 toQuery-                   (toQueryMap "entry" "Name" "Value" <$>-                      _pMessageAttributes),-               "TopicArn" =: _pTopicARN,-               "PhoneNumber" =: _pPhoneNumber,-               "MessageStructure" =: _pMessageStructure,-               "Message" =: _pMessage]---- | Response for Publish action.------------ /See:/ 'publishResponse' smart constructor.-data PublishResponse = PublishResponse'-  { _prsMessageId      :: !(Maybe Text)-  , _prsResponseStatus :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'PublishResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'prsMessageId' - Unique identifier assigned to the published message. Length Constraint: Maximum 100 characters------ * 'prsResponseStatus' - -- | The response status code.-publishResponse-    :: Int -- ^ 'prsResponseStatus'-    -> PublishResponse-publishResponse pResponseStatus_ =-  PublishResponse'-  {_prsMessageId = Nothing, _prsResponseStatus = pResponseStatus_}----- | Unique identifier assigned to the published message. Length Constraint: Maximum 100 characters-prsMessageId :: Lens' PublishResponse (Maybe Text)-prsMessageId = lens _prsMessageId (\ s a -> s{_prsMessageId = a});---- | -- | The response status code.-prsResponseStatus :: Lens' PublishResponse Int-prsResponseStatus = lens _prsResponseStatus (\ s a -> s{_prsResponseStatus = a});--instance NFData PublishResponse where
− gen/Network/AWS/SNS/RemovePermission.hs
@@ -1,114 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.RemovePermission--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Removes a statement from a topic's access control policy.-------module Network.AWS.SNS.RemovePermission-    (-    -- * Creating a Request-      removePermission-    , RemovePermission-    -- * Request Lenses-    , rpTopicARN-    , rpLabel--    -- * Destructuring the Response-    , removePermissionResponse-    , RemovePermissionResponse-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for RemovePermission action.------------ /See:/ 'removePermission' smart constructor.-data RemovePermission = RemovePermission'-  { _rpTopicARN :: !Text-  , _rpLabel    :: !Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'RemovePermission' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'rpTopicARN' - The ARN of the topic whose access control policy you wish to modify.------ * 'rpLabel' - The unique label of the statement you want to remove.-removePermission-    :: Text -- ^ 'rpTopicARN'-    -> Text -- ^ 'rpLabel'-    -> RemovePermission-removePermission pTopicARN_ pLabel_ =-  RemovePermission' {_rpTopicARN = pTopicARN_, _rpLabel = pLabel_}----- | The ARN of the topic whose access control policy you wish to modify.-rpTopicARN :: Lens' RemovePermission Text-rpTopicARN = lens _rpTopicARN (\ s a -> s{_rpTopicARN = a});---- | The unique label of the statement you want to remove.-rpLabel :: Lens' RemovePermission Text-rpLabel = lens _rpLabel (\ s a -> s{_rpLabel = a});--instance AWSRequest RemovePermission where-        type Rs RemovePermission = RemovePermissionResponse-        request = postQuery sns-        response = receiveNull RemovePermissionResponse'--instance Hashable RemovePermission where--instance NFData RemovePermission where--instance ToHeaders RemovePermission where-        toHeaders = const mempty--instance ToPath RemovePermission where-        toPath = const "/"--instance ToQuery RemovePermission where-        toQuery RemovePermission'{..}-          = mconcat-              ["Action" =: ("RemovePermission" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "TopicArn" =: _rpTopicARN, "Label" =: _rpLabel]---- | /See:/ 'removePermissionResponse' smart constructor.-data RemovePermissionResponse =-  RemovePermissionResponse'-  deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'RemovePermissionResponse' with the minimum fields required to make a request.----removePermissionResponse-    :: RemovePermissionResponse-removePermissionResponse = RemovePermissionResponse'---instance NFData RemovePermissionResponse where
− gen/Network/AWS/SNS/SetEndpointAttributes.hs
@@ -1,117 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.SetEndpointAttributes--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM and APNS. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications> .-------module Network.AWS.SNS.SetEndpointAttributes-    (-    -- * Creating a Request-      setEndpointAttributes-    , SetEndpointAttributes-    -- * Request Lenses-    , seaEndpointARN-    , seaAttributes--    -- * Destructuring the Response-    , setEndpointAttributesResponse-    , SetEndpointAttributesResponse-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for SetEndpointAttributes action.------------ /See:/ 'setEndpointAttributes' smart constructor.-data SetEndpointAttributes = SetEndpointAttributes'-  { _seaEndpointARN :: !Text-  , _seaAttributes  :: !(Map Text Text)-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'SetEndpointAttributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'seaEndpointARN' - EndpointArn used for SetEndpointAttributes action.------ * 'seaAttributes' - A map of the endpoint attributes. Attributes in this map include the following:     * @CustomUserData@ -- arbitrary user data to associate with the endpoint. Amazon SNS does not use this data. The data must be in UTF-8 format and less than 2KB.     * @Enabled@ -- flag that enables/disables delivery to the endpoint. Amazon SNS will set this to false when a notification service indicates to Amazon SNS that the endpoint is invalid. Users can set it back to true, typically after updating Token.     * @Token@ -- device token, also referred to as a registration id, for an app and mobile device. This is returned from the notification service when an app and mobile device are registered with the notification service.-setEndpointAttributes-    :: Text -- ^ 'seaEndpointARN'-    -> SetEndpointAttributes-setEndpointAttributes pEndpointARN_ =-  SetEndpointAttributes'-  {_seaEndpointARN = pEndpointARN_, _seaAttributes = mempty}----- | EndpointArn used for SetEndpointAttributes action.-seaEndpointARN :: Lens' SetEndpointAttributes Text-seaEndpointARN = lens _seaEndpointARN (\ s a -> s{_seaEndpointARN = a});---- | A map of the endpoint attributes. Attributes in this map include the following:     * @CustomUserData@ -- arbitrary user data to associate with the endpoint. Amazon SNS does not use this data. The data must be in UTF-8 format and less than 2KB.     * @Enabled@ -- flag that enables/disables delivery to the endpoint. Amazon SNS will set this to false when a notification service indicates to Amazon SNS that the endpoint is invalid. Users can set it back to true, typically after updating Token.     * @Token@ -- device token, also referred to as a registration id, for an app and mobile device. This is returned from the notification service when an app and mobile device are registered with the notification service.-seaAttributes :: Lens' SetEndpointAttributes (HashMap Text Text)-seaAttributes = lens _seaAttributes (\ s a -> s{_seaAttributes = a}) . _Map;--instance AWSRequest SetEndpointAttributes where-        type Rs SetEndpointAttributes =-             SetEndpointAttributesResponse-        request = postQuery sns-        response = receiveNull SetEndpointAttributesResponse'--instance Hashable SetEndpointAttributes where--instance NFData SetEndpointAttributes where--instance ToHeaders SetEndpointAttributes where-        toHeaders = const mempty--instance ToPath SetEndpointAttributes where-        toPath = const "/"--instance ToQuery SetEndpointAttributes where-        toQuery SetEndpointAttributes'{..}-          = mconcat-              ["Action" =: ("SetEndpointAttributes" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "EndpointArn" =: _seaEndpointARN,-               "Attributes" =:-                 toQueryMap "entry" "key" "value" _seaAttributes]---- | /See:/ 'setEndpointAttributesResponse' smart constructor.-data SetEndpointAttributesResponse =-  SetEndpointAttributesResponse'-  deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'SetEndpointAttributesResponse' with the minimum fields required to make a request.----setEndpointAttributesResponse-    :: SetEndpointAttributesResponse-setEndpointAttributesResponse = SetEndpointAttributesResponse'---instance NFData SetEndpointAttributesResponse where
− gen/Network/AWS/SNS/SetPlatformApplicationAttributes.hs
@@ -1,132 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.SetPlatformApplicationAttributes--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Sets the attributes of the platform application object for the supported push notification services, such as APNS and GCM. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications> . For information on configuring attributes for message delivery status, see <http://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html Using Amazon SNS Application Attributes for Message Delivery Status> .-------module Network.AWS.SNS.SetPlatformApplicationAttributes-    (-    -- * Creating a Request-      setPlatformApplicationAttributes-    , SetPlatformApplicationAttributes-    -- * Request Lenses-    , spaaPlatformApplicationARN-    , spaaAttributes--    -- * Destructuring the Response-    , setPlatformApplicationAttributesResponse-    , SetPlatformApplicationAttributesResponse-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for SetPlatformApplicationAttributes action.------------ /See:/ 'setPlatformApplicationAttributes' smart constructor.-data SetPlatformApplicationAttributes = SetPlatformApplicationAttributes'-  { _spaaPlatformApplicationARN :: !Text-  , _spaaAttributes             :: !(Map Text Text)-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'SetPlatformApplicationAttributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'spaaPlatformApplicationARN' - PlatformApplicationArn for SetPlatformApplicationAttributes action.------ * 'spaaAttributes' - A map of the platform application attributes. Attributes in this map include the following:     * @PlatformCredential@ -- The credential received from the notification service. For APNS/APNS_SANDBOX, PlatformCredential is private key. For GCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client secret".     * @PlatformPrincipal@ -- The principal received from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is SSL certificate. For GCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client id".     * @EventEndpointCreated@ -- Topic ARN to which EndpointCreated event notifications should be sent.     * @EventEndpointDeleted@ -- Topic ARN to which EndpointDeleted event notifications should be sent.     * @EventEndpointUpdated@ -- Topic ARN to which EndpointUpdate event notifications should be sent.     * @EventDeliveryFailure@ -- Topic ARN to which DeliveryFailure event notifications should be sent upon Direct Publish delivery failure (permanent) to one of the application's endpoints.     * @SuccessFeedbackRoleArn@ -- IAM role ARN used to give Amazon SNS write access to use CloudWatch Logs on your behalf.     * @FailureFeedbackRoleArn@ -- IAM role ARN used to give Amazon SNS write access to use CloudWatch Logs on your behalf.     * @SuccessFeedbackSampleRate@ -- Sample rate percentage (0-100) of successfully delivered messages.-setPlatformApplicationAttributes-    :: Text -- ^ 'spaaPlatformApplicationARN'-    -> SetPlatformApplicationAttributes-setPlatformApplicationAttributes pPlatformApplicationARN_ =-  SetPlatformApplicationAttributes'-  { _spaaPlatformApplicationARN = pPlatformApplicationARN_-  , _spaaAttributes = mempty-  }----- | PlatformApplicationArn for SetPlatformApplicationAttributes action.-spaaPlatformApplicationARN :: Lens' SetPlatformApplicationAttributes Text-spaaPlatformApplicationARN = lens _spaaPlatformApplicationARN (\ s a -> s{_spaaPlatformApplicationARN = a});---- | A map of the platform application attributes. Attributes in this map include the following:     * @PlatformCredential@ -- The credential received from the notification service. For APNS/APNS_SANDBOX, PlatformCredential is private key. For GCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client secret".     * @PlatformPrincipal@ -- The principal received from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is SSL certificate. For GCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client id".     * @EventEndpointCreated@ -- Topic ARN to which EndpointCreated event notifications should be sent.     * @EventEndpointDeleted@ -- Topic ARN to which EndpointDeleted event notifications should be sent.     * @EventEndpointUpdated@ -- Topic ARN to which EndpointUpdate event notifications should be sent.     * @EventDeliveryFailure@ -- Topic ARN to which DeliveryFailure event notifications should be sent upon Direct Publish delivery failure (permanent) to one of the application's endpoints.     * @SuccessFeedbackRoleArn@ -- IAM role ARN used to give Amazon SNS write access to use CloudWatch Logs on your behalf.     * @FailureFeedbackRoleArn@ -- IAM role ARN used to give Amazon SNS write access to use CloudWatch Logs on your behalf.     * @SuccessFeedbackSampleRate@ -- Sample rate percentage (0-100) of successfully delivered messages.-spaaAttributes :: Lens' SetPlatformApplicationAttributes (HashMap Text Text)-spaaAttributes = lens _spaaAttributes (\ s a -> s{_spaaAttributes = a}) . _Map;--instance AWSRequest SetPlatformApplicationAttributes-         where-        type Rs SetPlatformApplicationAttributes =-             SetPlatformApplicationAttributesResponse-        request = postQuery sns-        response-          = receiveNull-              SetPlatformApplicationAttributesResponse'--instance Hashable SetPlatformApplicationAttributes-         where--instance NFData SetPlatformApplicationAttributes-         where--instance ToHeaders SetPlatformApplicationAttributes-         where-        toHeaders = const mempty--instance ToPath SetPlatformApplicationAttributes-         where-        toPath = const "/"--instance ToQuery SetPlatformApplicationAttributes-         where-        toQuery SetPlatformApplicationAttributes'{..}-          = mconcat-              ["Action" =:-                 ("SetPlatformApplicationAttributes" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "PlatformApplicationArn" =:-                 _spaaPlatformApplicationARN,-               "Attributes" =:-                 toQueryMap "entry" "key" "value" _spaaAttributes]---- | /See:/ 'setPlatformApplicationAttributesResponse' smart constructor.-data SetPlatformApplicationAttributesResponse =-  SetPlatformApplicationAttributesResponse'-  deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'SetPlatformApplicationAttributesResponse' with the minimum fields required to make a request.----setPlatformApplicationAttributesResponse-    :: SetPlatformApplicationAttributesResponse-setPlatformApplicationAttributesResponse =-  SetPlatformApplicationAttributesResponse'---instance NFData-           SetPlatformApplicationAttributesResponse-         where
− gen/Network/AWS/SNS/SetSMSAttributes.hs
@@ -1,124 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.SetSMSAttributes--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports.--------- You can override some of these settings for a single message when you use the @Publish@ action with the @MessageAttributes.entry.N@ parameter. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html Sending an SMS Message> in the /Amazon SNS Developer Guide/ .----module Network.AWS.SNS.SetSMSAttributes-    (-    -- * Creating a Request-      setSMSAttributes-    , SetSMSAttributes-    -- * Request Lenses-    , ssmsaAttributes--    -- * Destructuring the Response-    , setSMSAttributesResponse-    , SetSMSAttributesResponse-    -- * Response Lenses-    , ssmsarsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | The input for the SetSMSAttributes action.------------ /See:/ 'setSMSAttributes' smart constructor.-newtype SetSMSAttributes = SetSMSAttributes'-  { _ssmsaAttributes :: Map Text Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'SetSMSAttributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'ssmsaAttributes' - The default settings for sending SMS messages from your account. You can set values for the following attribute names: @MonthlySpendLimit@ – The maximum amount in USD that you are willing to spend each month to send SMS messages. When Amazon SNS determines that sending an SMS message would incur a cost that exceeds this limit, it stops sending SMS messages within minutes. /Important:/ Amazon SNS stops sending SMS messages within minutes of the limit being crossed. During that interval, if you continue to send SMS messages, you will incur costs that exceed your limit. By default, the spend limit is set to the maximum allowed by Amazon SNS. If you want to exceed the maximum, contact <https://aws.amazon.com/premiumsupport/ AWS Support> or your AWS sales representative for a service limit increase. @DeliveryStatusIAMRole@ – The ARN of the IAM role that allows Amazon SNS to write logs about SMS deliveries in CloudWatch Logs. For each SMS message that you send, Amazon SNS writes a log that includes the message price, the success or failure status, the reason for failure (if the message failed), the message dwell time, and other information. @DeliveryStatusSuccessSamplingRate@ – The percentage of successful SMS deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value can be an integer from 0 - 100. For example, to write logs only for failed deliveries, set this value to @0@ . To write logs for 10% of your successful deliveries, set it to @10@ . @DefaultSenderID@ – A string, such as your business brand, that is displayed as the sender on the receiving device. Support for sender IDs varies by country. The sender ID can be 1 - 11 alphanumeric characters, and it must contain at least one letter. @DefaultSMSType@ – The type of SMS message that you will send by default. You can assign the following values:     * @Promotional@ – (Default) Noncritical messages, such as marketing messages. Amazon SNS optimizes the message delivery to incur the lowest cost.     * @Transactional@ – Critical messages that support customer transactions, such as one-time passcodes for multi-factor authentication. Amazon SNS optimizes the message delivery to achieve the highest reliability. @UsageReportS3Bucket@ – The name of the Amazon S3 bucket to receive daily SMS usage reports from Amazon SNS. Each day, Amazon SNS will deliver a usage report as a CSV file to the bucket. The report includes the following information for each SMS message that was successfully delivered by your account:     * Time that the message was published (in UTC)     * Message ID     * Destination phone number     * Message type     * Delivery status     * Message price (in USD)     * Part number (a message is split into multiple parts if it is too long for a single message)     * Total number of parts To receive the report, the bucket must have a policy that allows the Amazon SNS service principle to perform the @s3:PutObject@ and @s3:GetBucketLocation@ actions. For an example bucket policy and usage report, see <http://docs.aws.amazon.com/sns/latest/dg/sms_stats.html Monitoring SMS Activity> in the /Amazon SNS Developer Guide/ .-setSMSAttributes-    :: SetSMSAttributes-setSMSAttributes = SetSMSAttributes' {_ssmsaAttributes = mempty}----- | The default settings for sending SMS messages from your account. You can set values for the following attribute names: @MonthlySpendLimit@ – The maximum amount in USD that you are willing to spend each month to send SMS messages. When Amazon SNS determines that sending an SMS message would incur a cost that exceeds this limit, it stops sending SMS messages within minutes. /Important:/ Amazon SNS stops sending SMS messages within minutes of the limit being crossed. During that interval, if you continue to send SMS messages, you will incur costs that exceed your limit. By default, the spend limit is set to the maximum allowed by Amazon SNS. If you want to exceed the maximum, contact <https://aws.amazon.com/premiumsupport/ AWS Support> or your AWS sales representative for a service limit increase. @DeliveryStatusIAMRole@ – The ARN of the IAM role that allows Amazon SNS to write logs about SMS deliveries in CloudWatch Logs. For each SMS message that you send, Amazon SNS writes a log that includes the message price, the success or failure status, the reason for failure (if the message failed), the message dwell time, and other information. @DeliveryStatusSuccessSamplingRate@ – The percentage of successful SMS deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value can be an integer from 0 - 100. For example, to write logs only for failed deliveries, set this value to @0@ . To write logs for 10% of your successful deliveries, set it to @10@ . @DefaultSenderID@ – A string, such as your business brand, that is displayed as the sender on the receiving device. Support for sender IDs varies by country. The sender ID can be 1 - 11 alphanumeric characters, and it must contain at least one letter. @DefaultSMSType@ – The type of SMS message that you will send by default. You can assign the following values:     * @Promotional@ – (Default) Noncritical messages, such as marketing messages. Amazon SNS optimizes the message delivery to incur the lowest cost.     * @Transactional@ – Critical messages that support customer transactions, such as one-time passcodes for multi-factor authentication. Amazon SNS optimizes the message delivery to achieve the highest reliability. @UsageReportS3Bucket@ – The name of the Amazon S3 bucket to receive daily SMS usage reports from Amazon SNS. Each day, Amazon SNS will deliver a usage report as a CSV file to the bucket. The report includes the following information for each SMS message that was successfully delivered by your account:     * Time that the message was published (in UTC)     * Message ID     * Destination phone number     * Message type     * Delivery status     * Message price (in USD)     * Part number (a message is split into multiple parts if it is too long for a single message)     * Total number of parts To receive the report, the bucket must have a policy that allows the Amazon SNS service principle to perform the @s3:PutObject@ and @s3:GetBucketLocation@ actions. For an example bucket policy and usage report, see <http://docs.aws.amazon.com/sns/latest/dg/sms_stats.html Monitoring SMS Activity> in the /Amazon SNS Developer Guide/ .-ssmsaAttributes :: Lens' SetSMSAttributes (HashMap Text Text)-ssmsaAttributes = lens _ssmsaAttributes (\ s a -> s{_ssmsaAttributes = a}) . _Map;--instance AWSRequest SetSMSAttributes where-        type Rs SetSMSAttributes = SetSMSAttributesResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "SetSMSAttributesResult"-              (\ s h x ->-                 SetSMSAttributesResponse' <$> (pure (fromEnum s)))--instance Hashable SetSMSAttributes where--instance NFData SetSMSAttributes where--instance ToHeaders SetSMSAttributes where-        toHeaders = const mempty--instance ToPath SetSMSAttributes where-        toPath = const "/"--instance ToQuery SetSMSAttributes where-        toQuery SetSMSAttributes'{..}-          = mconcat-              ["Action" =: ("SetSMSAttributes" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "attributes" =:-                 toQueryMap "entry" "key" "value" _ssmsaAttributes]---- | The response for the SetSMSAttributes action.------------ /See:/ 'setSMSAttributesResponse' smart constructor.-newtype SetSMSAttributesResponse = SetSMSAttributesResponse'-  { _ssmsarsResponseStatus :: Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'SetSMSAttributesResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'ssmsarsResponseStatus' - -- | The response status code.-setSMSAttributesResponse-    :: Int -- ^ 'ssmsarsResponseStatus'-    -> SetSMSAttributesResponse-setSMSAttributesResponse pResponseStatus_ =-  SetSMSAttributesResponse' {_ssmsarsResponseStatus = pResponseStatus_}----- | -- | The response status code.-ssmsarsResponseStatus :: Lens' SetSMSAttributesResponse Int-ssmsarsResponseStatus = lens _ssmsarsResponseStatus (\ s a -> s{_ssmsarsResponseStatus = a});--instance NFData SetSMSAttributesResponse where
− gen/Network/AWS/SNS/SetSubscriptionAttributes.hs
@@ -1,132 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.SetSubscriptionAttributes--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Allows a subscription owner to set an attribute of the topic to a new value.-------module Network.AWS.SNS.SetSubscriptionAttributes-    (-    -- * Creating a Request-      setSubscriptionAttributes-    , SetSubscriptionAttributes-    -- * Request Lenses-    , ssaAttributeValue-    , ssaSubscriptionARN-    , ssaAttributeName--    -- * Destructuring the Response-    , setSubscriptionAttributesResponse-    , SetSubscriptionAttributesResponse-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for SetSubscriptionAttributes action.------------ /See:/ 'setSubscriptionAttributes' smart constructor.-data SetSubscriptionAttributes = SetSubscriptionAttributes'-  { _ssaAttributeValue  :: !(Maybe Text)-  , _ssaSubscriptionARN :: !Text-  , _ssaAttributeName   :: !Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'SetSubscriptionAttributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'ssaAttributeValue' - The new value for the attribute in JSON format.------ * 'ssaSubscriptionARN' - The ARN of the subscription to modify.------ * 'ssaAttributeName' - The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable. Valid values: @DeliveryPolicy@ | @RawMessageDelivery@-setSubscriptionAttributes-    :: Text -- ^ 'ssaSubscriptionARN'-    -> Text -- ^ 'ssaAttributeName'-    -> SetSubscriptionAttributes-setSubscriptionAttributes pSubscriptionARN_ pAttributeName_ =-  SetSubscriptionAttributes'-  { _ssaAttributeValue = Nothing-  , _ssaSubscriptionARN = pSubscriptionARN_-  , _ssaAttributeName = pAttributeName_-  }----- | The new value for the attribute in JSON format.-ssaAttributeValue :: Lens' SetSubscriptionAttributes (Maybe Text)-ssaAttributeValue = lens _ssaAttributeValue (\ s a -> s{_ssaAttributeValue = a});---- | The ARN of the subscription to modify.-ssaSubscriptionARN :: Lens' SetSubscriptionAttributes Text-ssaSubscriptionARN = lens _ssaSubscriptionARN (\ s a -> s{_ssaSubscriptionARN = a});---- | The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable. Valid values: @DeliveryPolicy@ | @RawMessageDelivery@-ssaAttributeName :: Lens' SetSubscriptionAttributes Text-ssaAttributeName = lens _ssaAttributeName (\ s a -> s{_ssaAttributeName = a});--instance AWSRequest SetSubscriptionAttributes where-        type Rs SetSubscriptionAttributes =-             SetSubscriptionAttributesResponse-        request = postQuery sns-        response-          = receiveNull SetSubscriptionAttributesResponse'--instance Hashable SetSubscriptionAttributes where--instance NFData SetSubscriptionAttributes where--instance ToHeaders SetSubscriptionAttributes where-        toHeaders = const mempty--instance ToPath SetSubscriptionAttributes where-        toPath = const "/"--instance ToQuery SetSubscriptionAttributes where-        toQuery SetSubscriptionAttributes'{..}-          = mconcat-              ["Action" =:-                 ("SetSubscriptionAttributes" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "AttributeValue" =: _ssaAttributeValue,-               "SubscriptionArn" =: _ssaSubscriptionARN,-               "AttributeName" =: _ssaAttributeName]---- | /See:/ 'setSubscriptionAttributesResponse' smart constructor.-data SetSubscriptionAttributesResponse =-  SetSubscriptionAttributesResponse'-  deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'SetSubscriptionAttributesResponse' with the minimum fields required to make a request.----setSubscriptionAttributesResponse-    :: SetSubscriptionAttributesResponse-setSubscriptionAttributesResponse = SetSubscriptionAttributesResponse'---instance NFData SetSubscriptionAttributesResponse-         where
− gen/Network/AWS/SNS/SetTopicAttributes.hs
@@ -1,129 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.SetTopicAttributes--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Allows a topic owner to set an attribute of the topic to a new value.-------module Network.AWS.SNS.SetTopicAttributes-    (-    -- * Creating a Request-      setTopicAttributes-    , SetTopicAttributes-    -- * Request Lenses-    , staAttributeValue-    , staTopicARN-    , staAttributeName--    -- * Destructuring the Response-    , setTopicAttributesResponse-    , SetTopicAttributesResponse-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for SetTopicAttributes action.------------ /See:/ 'setTopicAttributes' smart constructor.-data SetTopicAttributes = SetTopicAttributes'-  { _staAttributeValue :: !(Maybe Text)-  , _staTopicARN       :: !Text-  , _staAttributeName  :: !Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'SetTopicAttributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'staAttributeValue' - The new value for the attribute.------ * 'staTopicARN' - The ARN of the topic to modify.------ * 'staAttributeName' - The name of the attribute you want to set. Only a subset of the topic's attributes are mutable. Valid values: @Policy@ | @DisplayName@ | @DeliveryPolicy@-setTopicAttributes-    :: Text -- ^ 'staTopicARN'-    -> Text -- ^ 'staAttributeName'-    -> SetTopicAttributes-setTopicAttributes pTopicARN_ pAttributeName_ =-  SetTopicAttributes'-  { _staAttributeValue = Nothing-  , _staTopicARN = pTopicARN_-  , _staAttributeName = pAttributeName_-  }----- | The new value for the attribute.-staAttributeValue :: Lens' SetTopicAttributes (Maybe Text)-staAttributeValue = lens _staAttributeValue (\ s a -> s{_staAttributeValue = a});---- | The ARN of the topic to modify.-staTopicARN :: Lens' SetTopicAttributes Text-staTopicARN = lens _staTopicARN (\ s a -> s{_staTopicARN = a});---- | The name of the attribute you want to set. Only a subset of the topic's attributes are mutable. Valid values: @Policy@ | @DisplayName@ | @DeliveryPolicy@-staAttributeName :: Lens' SetTopicAttributes Text-staAttributeName = lens _staAttributeName (\ s a -> s{_staAttributeName = a});--instance AWSRequest SetTopicAttributes where-        type Rs SetTopicAttributes =-             SetTopicAttributesResponse-        request = postQuery sns-        response = receiveNull SetTopicAttributesResponse'--instance Hashable SetTopicAttributes where--instance NFData SetTopicAttributes where--instance ToHeaders SetTopicAttributes where-        toHeaders = const mempty--instance ToPath SetTopicAttributes where-        toPath = const "/"--instance ToQuery SetTopicAttributes where-        toQuery SetTopicAttributes'{..}-          = mconcat-              ["Action" =: ("SetTopicAttributes" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "AttributeValue" =: _staAttributeValue,-               "TopicArn" =: _staTopicARN,-               "AttributeName" =: _staAttributeName]---- | /See:/ 'setTopicAttributesResponse' smart constructor.-data SetTopicAttributesResponse =-  SetTopicAttributesResponse'-  deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'SetTopicAttributesResponse' with the minimum fields required to make a request.----setTopicAttributesResponse-    :: SetTopicAttributesResponse-setTopicAttributesResponse = SetTopicAttributesResponse'---instance NFData SetTopicAttributesResponse where
− gen/Network/AWS/SNS/Subscribe.hs
@@ -1,153 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.Subscribe--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Prepares to subscribe an endpoint by sending the endpoint a confirmation message. To actually create a subscription, the endpoint owner must call the @ConfirmSubscription@ action with the token from the confirmation message. Confirmation tokens are valid for three days.-------module Network.AWS.SNS.Subscribe-    (-    -- * Creating a Request-      subscribe-    , Subscribe-    -- * Request Lenses-    , subEndpoint-    , subTopicARN-    , subProtocol--    -- * Destructuring the Response-    , subscribeResponse-    , SubscribeResponse-    -- * Response Lenses-    , srsSubscriptionARN-    , srsResponseStatus-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for Subscribe action.------------ /See:/ 'subscribe' smart constructor.-data Subscribe = Subscribe'-  { _subEndpoint :: !(Maybe Text)-  , _subTopicARN :: !Text-  , _subProtocol :: !Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'Subscribe' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'subEndpoint' - The endpoint that you want to receive notifications. Endpoints vary by protocol:     * For the @http@ protocol, the endpoint is an URL beginning with "http://"     * For the @https@ protocol, the endpoint is a URL beginning with "https://"     * For the @email@ protocol, the endpoint is an email address     * For the @email-json@ protocol, the endpoint is an email address     * For the @sms@ protocol, the endpoint is a phone number of an SMS-enabled device     * For the @sqs@ protocol, the endpoint is the ARN of an Amazon SQS queue     * For the @application@ protocol, the endpoint is the EndpointArn of a mobile app and device.     * For the @lambda@ protocol, the endpoint is the ARN of an AWS Lambda function.------ * 'subTopicARN' - The ARN of the topic you want to subscribe to.------ * 'subProtocol' - The protocol you want to use. Supported protocols include:     * @http@ -- delivery of JSON-encoded message via HTTP POST     * @https@ -- delivery of JSON-encoded message via HTTPS POST     * @email@ -- delivery of message via SMTP     * @email-json@ -- delivery of JSON-encoded message via SMTP     * @sms@ -- delivery of message via SMS     * @sqs@ -- delivery of JSON-encoded message to an Amazon SQS queue     * @application@ -- delivery of JSON-encoded message to an EndpointArn for a mobile app and device.     * @lambda@ -- delivery of JSON-encoded message to an AWS Lambda function.-subscribe-    :: Text -- ^ 'subTopicARN'-    -> Text -- ^ 'subProtocol'-    -> Subscribe-subscribe pTopicARN_ pProtocol_ =-  Subscribe'-  {_subEndpoint = Nothing, _subTopicARN = pTopicARN_, _subProtocol = pProtocol_}----- | The endpoint that you want to receive notifications. Endpoints vary by protocol:     * For the @http@ protocol, the endpoint is an URL beginning with "http://"     * For the @https@ protocol, the endpoint is a URL beginning with "https://"     * For the @email@ protocol, the endpoint is an email address     * For the @email-json@ protocol, the endpoint is an email address     * For the @sms@ protocol, the endpoint is a phone number of an SMS-enabled device     * For the @sqs@ protocol, the endpoint is the ARN of an Amazon SQS queue     * For the @application@ protocol, the endpoint is the EndpointArn of a mobile app and device.     * For the @lambda@ protocol, the endpoint is the ARN of an AWS Lambda function.-subEndpoint :: Lens' Subscribe (Maybe Text)-subEndpoint = lens _subEndpoint (\ s a -> s{_subEndpoint = a});---- | The ARN of the topic you want to subscribe to.-subTopicARN :: Lens' Subscribe Text-subTopicARN = lens _subTopicARN (\ s a -> s{_subTopicARN = a});---- | The protocol you want to use. Supported protocols include:     * @http@ -- delivery of JSON-encoded message via HTTP POST     * @https@ -- delivery of JSON-encoded message via HTTPS POST     * @email@ -- delivery of message via SMTP     * @email-json@ -- delivery of JSON-encoded message via SMTP     * @sms@ -- delivery of message via SMS     * @sqs@ -- delivery of JSON-encoded message to an Amazon SQS queue     * @application@ -- delivery of JSON-encoded message to an EndpointArn for a mobile app and device.     * @lambda@ -- delivery of JSON-encoded message to an AWS Lambda function.-subProtocol :: Lens' Subscribe Text-subProtocol = lens _subProtocol (\ s a -> s{_subProtocol = a});--instance AWSRequest Subscribe where-        type Rs Subscribe = SubscribeResponse-        request = postQuery sns-        response-          = receiveXMLWrapper "SubscribeResult"-              (\ s h x ->-                 SubscribeResponse' <$>-                   (x .@? "SubscriptionArn") <*> (pure (fromEnum s)))--instance Hashable Subscribe where--instance NFData Subscribe where--instance ToHeaders Subscribe where-        toHeaders = const mempty--instance ToPath Subscribe where-        toPath = const "/"--instance ToQuery Subscribe where-        toQuery Subscribe'{..}-          = mconcat-              ["Action" =: ("Subscribe" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "Endpoint" =: _subEndpoint,-               "TopicArn" =: _subTopicARN,-               "Protocol" =: _subProtocol]---- | Response for Subscribe action.------------ /See:/ 'subscribeResponse' smart constructor.-data SubscribeResponse = SubscribeResponse'-  { _srsSubscriptionARN :: !(Maybe Text)-  , _srsResponseStatus  :: !Int-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'SubscribeResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'srsSubscriptionARN' - The ARN of the subscription, if the service was able to create a subscription immediately (without requiring endpoint owner confirmation).------ * 'srsResponseStatus' - -- | The response status code.-subscribeResponse-    :: Int -- ^ 'srsResponseStatus'-    -> SubscribeResponse-subscribeResponse pResponseStatus_ =-  SubscribeResponse'-  {_srsSubscriptionARN = Nothing, _srsResponseStatus = pResponseStatus_}----- | The ARN of the subscription, if the service was able to create a subscription immediately (without requiring endpoint owner confirmation).-srsSubscriptionARN :: Lens' SubscribeResponse (Maybe Text)-srsSubscriptionARN = lens _srsSubscriptionARN (\ s a -> s{_srsSubscriptionARN = a});---- | -- | The response status code.-srsResponseStatus :: Lens' SubscribeResponse Int-srsResponseStatus = lens _srsResponseStatus (\ s a -> s{_srsResponseStatus = a});--instance NFData SubscribeResponse where
− gen/Network/AWS/SNS/Types.hs
@@ -1,182 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.Types--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)----module Network.AWS.SNS.Types-    (-    -- * Service Configuration-      sns--    -- * Errors-    , _EndpointDisabledException-    , _AuthorizationErrorException-    , _InvalidParameterException-    , _SubscriptionLimitExceededException-    , _PlatformApplicationDisabledException-    , _InternalErrorException-    , _ThrottledException-    , _InvalidParameterValueException-    , _NotFoundException-    , _TopicLimitExceededException--    -- * Endpoint-    , Endpoint-    , endpoint-    , eAttributes-    , eEndpointARN--    -- * MessageAttributeValue-    , MessageAttributeValue-    , messageAttributeValue-    , mavBinaryValue-    , mavStringValue-    , mavDataType--    -- * PlatformApplication-    , PlatformApplication-    , platformApplication-    , paPlatformApplicationARN-    , paAttributes--    -- * Subscription-    , Subscription-    , subscription-    , sProtocol-    , sOwner-    , sTopicARN-    , sEndpoint-    , sSubscriptionARN--    -- * Topic-    , Topic-    , topic-    , tTopicARN-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Sign.V4-import Network.AWS.SNS.Types.Product-import Network.AWS.SNS.Types.Sum---- | API version @2010-03-31@ of the Amazon Simple Notification Service SDK configuration.-sns :: Service-sns =-  Service-  { _svcAbbrev = "SNS"-  , _svcSigner = v4-  , _svcPrefix = "sns"-  , _svcVersion = "2010-03-31"-  , _svcEndpoint = defaultEndpoint sns-  , _svcTimeout = Just 70-  , _svcCheck = statusSuccess-  , _svcError = parseXMLError "SNS"-  , _svcRetry = retry-  }-  where-    retry =-      Exponential-      { _retryBase = 5.0e-2-      , _retryGrowth = 2-      , _retryAttempts = 5-      , _retryCheck = check-      }-    check e-      | has (hasCode "ThrottledException" . hasStatus 400) e =-        Just "throttled_exception"-      | has (hasStatus 429) e = Just "too_many_requests"-      | has (hasCode "ThrottlingException" . hasStatus 400) e =-        Just "throttling_exception"-      | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"-      | has (hasStatus 504) e = Just "gateway_timeout"-      | has (hasStatus 502) e = Just "bad_gateway"-      | has (hasStatus 503) e = Just "service_unavailable"-      | has (hasStatus 500) e = Just "general_server_error"-      | has (hasStatus 509) e = Just "limit_exceeded"-      | otherwise = Nothing----- | Exception error indicating endpoint disabled.-------_EndpointDisabledException :: AsError a => Getting (First ServiceError) a ServiceError-_EndpointDisabledException =-  _MatchServiceError sns "EndpointDisabled" . hasStatus 400----- | Indicates that the user has been denied access to the requested resource.-------_AuthorizationErrorException :: AsError a => Getting (First ServiceError) a ServiceError-_AuthorizationErrorException =-  _MatchServiceError sns "AuthorizationError" . hasStatus 403----- | Indicates that a request parameter does not comply with the associated constraints.-------_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError-_InvalidParameterException =-  _MatchServiceError sns "InvalidParameter" . hasStatus 400----- | Indicates that the customer already owns the maximum allowed number of subscriptions.-------_SubscriptionLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError-_SubscriptionLimitExceededException =-  _MatchServiceError sns "SubscriptionLimitExceeded" . hasStatus 403----- | Exception error indicating platform application disabled.-------_PlatformApplicationDisabledException :: AsError a => Getting (First ServiceError) a ServiceError-_PlatformApplicationDisabledException =-  _MatchServiceError sns "PlatformApplicationDisabled" . hasStatus 400----- | Indicates an internal service error.-------_InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError-_InternalErrorException = _MatchServiceError sns "InternalError" . hasStatus 500----- | Indicates that the rate at which requests have been submitted for this action exceeds the limit for your account.-------_ThrottledException :: AsError a => Getting (First ServiceError) a ServiceError-_ThrottledException = _MatchServiceError sns "Throttled" . hasStatus 429----- | Indicates that a request parameter does not comply with the associated constraints.-------_InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError-_InvalidParameterValueException =-  _MatchServiceError sns "ParameterValueInvalid" . hasStatus 400----- | Indicates that the requested resource does not exist.-------_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError-_NotFoundException = _MatchServiceError sns "NotFound" . hasStatus 404----- | Indicates that the customer already owns the maximum allowed number of topics.-------_TopicLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError-_TopicLimitExceededException =-  _MatchServiceError sns "TopicLimitExceeded" . hasStatus 403-
− gen/Network/AWS/SNS/Types/Product.hs
@@ -1,267 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.Types.Product--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)----module Network.AWS.SNS.Types.Product where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.SNS.Types.Sum---- | Endpoint for mobile app and device.------------ /See:/ 'endpoint' smart constructor.-data Endpoint = Endpoint'-  { _eAttributes  :: !(Maybe (Map Text Text))-  , _eEndpointARN :: !(Maybe Text)-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'Endpoint' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'eAttributes' - Attributes for endpoint.------ * 'eEndpointARN' - EndpointArn for mobile app and device.-endpoint-    :: Endpoint-endpoint = Endpoint' {_eAttributes = Nothing, _eEndpointARN = Nothing}----- | Attributes for endpoint.-eAttributes :: Lens' Endpoint (HashMap Text Text)-eAttributes = lens _eAttributes (\ s a -> s{_eAttributes = a}) . _Default . _Map;---- | EndpointArn for mobile app and device.-eEndpointARN :: Lens' Endpoint (Maybe Text)-eEndpointARN = lens _eEndpointARN (\ s a -> s{_eEndpointARN = a});--instance FromXML Endpoint where-        parseXML x-          = Endpoint' <$>-              (x .@? "Attributes" .!@ mempty >>=-                 may (parseXMLMap "entry" "key" "value"))-                <*> (x .@? "EndpointArn")--instance Hashable Endpoint where--instance NFData Endpoint where---- | The user-specified message attribute value. For string data types, the value attribute has the same restrictions on the content as the message body. For more information, see <http://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish> .--------- Name, type, and value must not be empty or null. In addition, the message body should not be empty or null. All parts of the message attribute, including name, type, and value, are included in the message size restriction, which is currently 256 KB (262,144 bytes). For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html Using Amazon SNS Message Attributes> .--------- /See:/ 'messageAttributeValue' smart constructor.-data MessageAttributeValue = MessageAttributeValue'-  { _mavBinaryValue :: !(Maybe Base64)-  , _mavStringValue :: !(Maybe Text)-  , _mavDataType    :: !Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'MessageAttributeValue' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'mavBinaryValue' - Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.-- /Note:/ This 'Lens' automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This 'Lens' accepts and returns only raw unencoded data.------ * 'mavStringValue' - Strings are Unicode with UTF8 binary encoding. For a list of code values, see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters> .------ * 'mavDataType' - Amazon SNS supports the following logical data types: String, Number, and Binary. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes Message Attribute Data Types> .-messageAttributeValue-    :: Text -- ^ 'mavDataType'-    -> MessageAttributeValue-messageAttributeValue pDataType_ =-  MessageAttributeValue'-  { _mavBinaryValue = Nothing-  , _mavStringValue = Nothing-  , _mavDataType = pDataType_-  }----- | Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.-- /Note:/ This 'Lens' automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This 'Lens' accepts and returns only raw unencoded data.-mavBinaryValue :: Lens' MessageAttributeValue (Maybe ByteString)-mavBinaryValue = lens _mavBinaryValue (\ s a -> s{_mavBinaryValue = a}) . mapping _Base64;---- | Strings are Unicode with UTF8 binary encoding. For a list of code values, see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters> .-mavStringValue :: Lens' MessageAttributeValue (Maybe Text)-mavStringValue = lens _mavStringValue (\ s a -> s{_mavStringValue = a});---- | Amazon SNS supports the following logical data types: String, Number, and Binary. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes Message Attribute Data Types> .-mavDataType :: Lens' MessageAttributeValue Text-mavDataType = lens _mavDataType (\ s a -> s{_mavDataType = a});--instance Hashable MessageAttributeValue where--instance NFData MessageAttributeValue where--instance ToQuery MessageAttributeValue where-        toQuery MessageAttributeValue'{..}-          = mconcat-              ["BinaryValue" =: _mavBinaryValue,-               "StringValue" =: _mavStringValue,-               "DataType" =: _mavDataType]---- | Platform application object.------------ /See:/ 'platformApplication' smart constructor.-data PlatformApplication = PlatformApplication'-  { _paPlatformApplicationARN :: !(Maybe Text)-  , _paAttributes             :: !(Maybe (Map Text Text))-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'PlatformApplication' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'paPlatformApplicationARN' - PlatformApplicationArn for platform application object.------ * 'paAttributes' - Attributes for platform application object.-platformApplication-    :: PlatformApplication-platformApplication =-  PlatformApplication'-  {_paPlatformApplicationARN = Nothing, _paAttributes = Nothing}----- | PlatformApplicationArn for platform application object.-paPlatformApplicationARN :: Lens' PlatformApplication (Maybe Text)-paPlatformApplicationARN = lens _paPlatformApplicationARN (\ s a -> s{_paPlatformApplicationARN = a});---- | Attributes for platform application object.-paAttributes :: Lens' PlatformApplication (HashMap Text Text)-paAttributes = lens _paAttributes (\ s a -> s{_paAttributes = a}) . _Default . _Map;--instance FromXML PlatformApplication where-        parseXML x-          = PlatformApplication' <$>-              (x .@? "PlatformApplicationArn") <*>-                (x .@? "Attributes" .!@ mempty >>=-                   may (parseXMLMap "entry" "key" "value"))--instance Hashable PlatformApplication where--instance NFData PlatformApplication where---- | A wrapper type for the attributes of an Amazon SNS subscription.------------ /See:/ 'subscription' smart constructor.-data Subscription = Subscription'-  { _sProtocol        :: !(Maybe Text)-  , _sOwner           :: !(Maybe Text)-  , _sTopicARN        :: !(Maybe Text)-  , _sEndpoint        :: !(Maybe Text)-  , _sSubscriptionARN :: !(Maybe Text)-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'Subscription' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'sProtocol' - The subscription's protocol.------ * 'sOwner' - The subscription's owner.------ * 'sTopicARN' - The ARN of the subscription's topic.------ * 'sEndpoint' - The subscription's endpoint (format depends on the protocol).------ * 'sSubscriptionARN' - The subscription's ARN.-subscription-    :: Subscription-subscription =-  Subscription'-  { _sProtocol = Nothing-  , _sOwner = Nothing-  , _sTopicARN = Nothing-  , _sEndpoint = Nothing-  , _sSubscriptionARN = Nothing-  }----- | The subscription's protocol.-sProtocol :: Lens' Subscription (Maybe Text)-sProtocol = lens _sProtocol (\ s a -> s{_sProtocol = a});---- | The subscription's owner.-sOwner :: Lens' Subscription (Maybe Text)-sOwner = lens _sOwner (\ s a -> s{_sOwner = a});---- | The ARN of the subscription's topic.-sTopicARN :: Lens' Subscription (Maybe Text)-sTopicARN = lens _sTopicARN (\ s a -> s{_sTopicARN = a});---- | The subscription's endpoint (format depends on the protocol).-sEndpoint :: Lens' Subscription (Maybe Text)-sEndpoint = lens _sEndpoint (\ s a -> s{_sEndpoint = a});---- | The subscription's ARN.-sSubscriptionARN :: Lens' Subscription (Maybe Text)-sSubscriptionARN = lens _sSubscriptionARN (\ s a -> s{_sSubscriptionARN = a});--instance FromXML Subscription where-        parseXML x-          = Subscription' <$>-              (x .@? "Protocol") <*> (x .@? "Owner") <*>-                (x .@? "TopicArn")-                <*> (x .@? "Endpoint")-                <*> (x .@? "SubscriptionArn")--instance Hashable Subscription where--instance NFData Subscription where---- | A wrapper type for the topic's Amazon Resource Name (ARN). To retrieve a topic's attributes, use @GetTopicAttributes@ .------------ /See:/ 'topic' smart constructor.-newtype Topic = Topic'-  { _tTopicARN :: Maybe Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'Topic' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'tTopicARN' - The topic's ARN.-topic-    :: Topic-topic = Topic' {_tTopicARN = Nothing}----- | The topic's ARN.-tTopicARN :: Lens' Topic (Maybe Text)-tTopicARN = lens _tTopicARN (\ s a -> s{_tTopicARN = a});--instance FromXML Topic where-        parseXML x = Topic' <$> (x .@? "TopicArn")--instance Hashable Topic where--instance NFData Topic where
− gen/Network/AWS/SNS/Types/Sum.hs
@@ -1,20 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE LambdaCase         #-}-{-# LANGUAGE OverloadedStrings  #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.Types.Sum--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)----module Network.AWS.SNS.Types.Sum where--import Network.AWS.Prelude
− gen/Network/AWS/SNS/Unsubscribe.hs
@@ -1,105 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.Unsubscribe--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)------ Deletes a subscription. If the subscription requires authentication for deletion, only the owner of the subscription or the topic's owner can unsubscribe, and an AWS signature is required. If the @Unsubscribe@ call does not require authentication and the requester is not the subscription owner, a final cancellation message is delivered to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the @Unsubscribe@ request was unintended.-------module Network.AWS.SNS.Unsubscribe-    (-    -- * Creating a Request-      unsubscribe-    , Unsubscribe-    -- * Request Lenses-    , uSubscriptionARN--    -- * Destructuring the Response-    , unsubscribeResponse-    , UnsubscribeResponse-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SNS.Types-import Network.AWS.SNS.Types.Product---- | Input for Unsubscribe action.------------ /See:/ 'unsubscribe' smart constructor.-newtype Unsubscribe = Unsubscribe'-  { _uSubscriptionARN :: Text-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'Unsubscribe' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'uSubscriptionARN' - The ARN of the subscription to be deleted.-unsubscribe-    :: Text -- ^ 'uSubscriptionARN'-    -> Unsubscribe-unsubscribe pSubscriptionARN_ =-  Unsubscribe' {_uSubscriptionARN = pSubscriptionARN_}----- | The ARN of the subscription to be deleted.-uSubscriptionARN :: Lens' Unsubscribe Text-uSubscriptionARN = lens _uSubscriptionARN (\ s a -> s{_uSubscriptionARN = a});--instance AWSRequest Unsubscribe where-        type Rs Unsubscribe = UnsubscribeResponse-        request = postQuery sns-        response = receiveNull UnsubscribeResponse'--instance Hashable Unsubscribe where--instance NFData Unsubscribe where--instance ToHeaders Unsubscribe where-        toHeaders = const mempty--instance ToPath Unsubscribe where-        toPath = const "/"--instance ToQuery Unsubscribe where-        toQuery Unsubscribe'{..}-          = mconcat-              ["Action" =: ("Unsubscribe" :: ByteString),-               "Version" =: ("2010-03-31" :: ByteString),-               "SubscriptionArn" =: _uSubscriptionARN]---- | /See:/ 'unsubscribeResponse' smart constructor.-data UnsubscribeResponse =-  UnsubscribeResponse'-  deriving (Eq, Read, Show, Data, Typeable, Generic)----- | Creates a value of 'UnsubscribeResponse' with the minimum fields required to make a request.----unsubscribeResponse-    :: UnsubscribeResponse-unsubscribeResponse = UnsubscribeResponse'---instance NFData UnsubscribeResponse where
− gen/Network/AWS/SNS/Waiters.hs
@@ -1,21 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeFamilies      #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SNS.Waiters--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)----module Network.AWS.SNS.Waiters where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.SNS.Types-import Network.AWS.Waiter
test/Main.hs view
@@ -2,20 +2,22 @@  -- | -- Module      : Main--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2023 Brendan Hay -- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Maintainer  : Brendan Hay -- Stability   : auto-generated -- Portability : non-portable (GHC extensions)--- module Main (main) where +import Test.Amazonka.SNS+import Test.Amazonka.SNS.Internal import Test.Tasty-import Test.AWS.SNS-import Test.AWS.SNS.Internal  main :: IO ()-main = defaultMain $ testGroup "SNS"-    [ testGroup "tests"    tests-    , testGroup "fixtures" fixtures-    ]+main =+  defaultMain $+    testGroup+      "SNS"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
− test/Test/AWS/Gen/SNS.hs
@@ -1,579 +0,0 @@-{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-orphans        #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Test.AWS.Gen.SNS--- Copyright   : (c) 2013-2017 Brendan Hay--- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>--- Stability   : auto-generated--- Portability : non-portable (GHC extensions)----module Test.AWS.Gen.SNS where--import Data.Proxy-import Network.AWS.SNS-import Test.AWS.Fixture-import Test.AWS.Prelude-import Test.AWS.SNS.Internal-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"---         [ requestListPhoneNumbersOptedOut $---             listPhoneNumbersOptedOut------         , requestDeleteEndpoint $---             deleteEndpoint------         , requestRemovePermission $---             removePermission------         , requestDeleteTopic $---             deleteTopic------         , requestSetSMSAttributes $---             setSMSAttributes------         , requestListTopics $---             listTopics------         , requestCreatePlatformEndpoint $---             createPlatformEndpoint------         , requestSetPlatformApplicationAttributes $---             setPlatformApplicationAttributes------         , requestListSubscriptionsByTopic $---             listSubscriptionsByTopic------         , requestGetTopicAttributes $---             getTopicAttributes------         , requestOptInPhoneNumber $---             optInPhoneNumber------         , requestCreatePlatformApplication $---             createPlatformApplication------         , requestGetPlatformApplicationAttributes $---             getPlatformApplicationAttributes------         , requestListEndpointsByPlatformApplication $---             listEndpointsByPlatformApplication------         , requestSetTopicAttributes $---             setTopicAttributes------         , requestDeletePlatformApplication $---             deletePlatformApplication------         , requestGetSMSAttributes $---             getSMSAttributes------         , requestListPlatformApplications $---             listPlatformApplications------         , requestAddPermission $---             addPermission------         , requestGetEndpointAttributes $---             getEndpointAttributes------         , requestListSubscriptions $---             listSubscriptions------         , requestGetSubscriptionAttributes $---             getSubscriptionAttributes------         , requestCreateTopic $---             createTopic------         , requestCheckIfPhoneNumberIsOptedOut $---             checkIfPhoneNumberIsOptedOut------         , requestSubscribe $---             subscribe------         , requestUnsubscribe $---             unsubscribe------         , requestSetEndpointAttributes $---             setEndpointAttributes------         , requestSetSubscriptionAttributes $---             setSubscriptionAttributes------         , requestConfirmSubscription $---             confirmSubscription------         , requestPublish $---             publish------           ]----     , testGroup "response"---         [ responseListPhoneNumbersOptedOut $---             listPhoneNumbersOptedOutResponse------         , responseDeleteEndpoint $---             deleteEndpointResponse------         , responseRemovePermission $---             removePermissionResponse------         , responseDeleteTopic $---             deleteTopicResponse------         , responseSetSMSAttributes $---             setSMSAttributesResponse------         , responseListTopics $---             listTopicsResponse------         , responseCreatePlatformEndpoint $---             createPlatformEndpointResponse------         , responseSetPlatformApplicationAttributes $---             setPlatformApplicationAttributesResponse------         , responseListSubscriptionsByTopic $---             listSubscriptionsByTopicResponse------         , responseGetTopicAttributes $---             getTopicAttributesResponse------         , responseOptInPhoneNumber $---             optInPhoneNumberResponse------         , responseCreatePlatformApplication $---             createPlatformApplicationResponse------         , responseGetPlatformApplicationAttributes $---             getPlatformApplicationAttributesResponse------         , responseListEndpointsByPlatformApplication $---             listEndpointsByPlatformApplicationResponse------         , responseSetTopicAttributes $---             setTopicAttributesResponse------         , responseDeletePlatformApplication $---             deletePlatformApplicationResponse------         , responseGetSMSAttributes $---             getSMSAttributesResponse------         , responseListPlatformApplications $---             listPlatformApplicationsResponse------         , responseAddPermission $---             addPermissionResponse------         , responseGetEndpointAttributes $---             getEndpointAttributesResponse------         , responseListSubscriptions $---             listSubscriptionsResponse------         , responseGetSubscriptionAttributes $---             getSubscriptionAttributesResponse------         , responseCreateTopic $---             createTopicResponse------         , responseCheckIfPhoneNumberIsOptedOut $---             checkIfPhoneNumberIsOptedOutResponse------         , responseSubscribe $---             subscribeResponse------         , responseUnsubscribe $---             unsubscribeResponse------         , responseSetEndpointAttributes $---             setEndpointAttributesResponse------         , responseSetSubscriptionAttributes $---             setSubscriptionAttributesResponse------         , responseConfirmSubscription $---             confirmSubscriptionResponse------         , responsePublish $---             publishResponse------           ]---     ]---- Requests--requestListPhoneNumbersOptedOut :: ListPhoneNumbersOptedOut -> TestTree-requestListPhoneNumbersOptedOut = req-    "ListPhoneNumbersOptedOut"-    "fixture/ListPhoneNumbersOptedOut.yaml"--requestDeleteEndpoint :: DeleteEndpoint -> TestTree-requestDeleteEndpoint = req-    "DeleteEndpoint"-    "fixture/DeleteEndpoint.yaml"--requestRemovePermission :: RemovePermission -> TestTree-requestRemovePermission = req-    "RemovePermission"-    "fixture/RemovePermission.yaml"--requestDeleteTopic :: DeleteTopic -> TestTree-requestDeleteTopic = req-    "DeleteTopic"-    "fixture/DeleteTopic.yaml"--requestSetSMSAttributes :: SetSMSAttributes -> TestTree-requestSetSMSAttributes = req-    "SetSMSAttributes"-    "fixture/SetSMSAttributes.yaml"--requestListTopics :: ListTopics -> TestTree-requestListTopics = req-    "ListTopics"-    "fixture/ListTopics.yaml"--requestCreatePlatformEndpoint :: CreatePlatformEndpoint -> TestTree-requestCreatePlatformEndpoint = req-    "CreatePlatformEndpoint"-    "fixture/CreatePlatformEndpoint.yaml"--requestSetPlatformApplicationAttributes :: SetPlatformApplicationAttributes -> TestTree-requestSetPlatformApplicationAttributes = req-    "SetPlatformApplicationAttributes"-    "fixture/SetPlatformApplicationAttributes.yaml"--requestListSubscriptionsByTopic :: ListSubscriptionsByTopic -> TestTree-requestListSubscriptionsByTopic = req-    "ListSubscriptionsByTopic"-    "fixture/ListSubscriptionsByTopic.yaml"--requestGetTopicAttributes :: GetTopicAttributes -> TestTree-requestGetTopicAttributes = req-    "GetTopicAttributes"-    "fixture/GetTopicAttributes.yaml"--requestOptInPhoneNumber :: OptInPhoneNumber -> TestTree-requestOptInPhoneNumber = req-    "OptInPhoneNumber"-    "fixture/OptInPhoneNumber.yaml"--requestCreatePlatformApplication :: CreatePlatformApplication -> TestTree-requestCreatePlatformApplication = req-    "CreatePlatformApplication"-    "fixture/CreatePlatformApplication.yaml"--requestGetPlatformApplicationAttributes :: GetPlatformApplicationAttributes -> TestTree-requestGetPlatformApplicationAttributes = req-    "GetPlatformApplicationAttributes"-    "fixture/GetPlatformApplicationAttributes.yaml"--requestListEndpointsByPlatformApplication :: ListEndpointsByPlatformApplication -> TestTree-requestListEndpointsByPlatformApplication = req-    "ListEndpointsByPlatformApplication"-    "fixture/ListEndpointsByPlatformApplication.yaml"--requestSetTopicAttributes :: SetTopicAttributes -> TestTree-requestSetTopicAttributes = req-    "SetTopicAttributes"-    "fixture/SetTopicAttributes.yaml"--requestDeletePlatformApplication :: DeletePlatformApplication -> TestTree-requestDeletePlatformApplication = req-    "DeletePlatformApplication"-    "fixture/DeletePlatformApplication.yaml"--requestGetSMSAttributes :: GetSMSAttributes -> TestTree-requestGetSMSAttributes = req-    "GetSMSAttributes"-    "fixture/GetSMSAttributes.yaml"--requestListPlatformApplications :: ListPlatformApplications -> TestTree-requestListPlatformApplications = req-    "ListPlatformApplications"-    "fixture/ListPlatformApplications.yaml"--requestAddPermission :: AddPermission -> TestTree-requestAddPermission = req-    "AddPermission"-    "fixture/AddPermission.yaml"--requestGetEndpointAttributes :: GetEndpointAttributes -> TestTree-requestGetEndpointAttributes = req-    "GetEndpointAttributes"-    "fixture/GetEndpointAttributes.yaml"--requestListSubscriptions :: ListSubscriptions -> TestTree-requestListSubscriptions = req-    "ListSubscriptions"-    "fixture/ListSubscriptions.yaml"--requestGetSubscriptionAttributes :: GetSubscriptionAttributes -> TestTree-requestGetSubscriptionAttributes = req-    "GetSubscriptionAttributes"-    "fixture/GetSubscriptionAttributes.yaml"--requestCreateTopic :: CreateTopic -> TestTree-requestCreateTopic = req-    "CreateTopic"-    "fixture/CreateTopic.yaml"--requestCheckIfPhoneNumberIsOptedOut :: CheckIfPhoneNumberIsOptedOut -> TestTree-requestCheckIfPhoneNumberIsOptedOut = req-    "CheckIfPhoneNumberIsOptedOut"-    "fixture/CheckIfPhoneNumberIsOptedOut.yaml"--requestSubscribe :: Subscribe -> TestTree-requestSubscribe = req-    "Subscribe"-    "fixture/Subscribe.yaml"--requestUnsubscribe :: Unsubscribe -> TestTree-requestUnsubscribe = req-    "Unsubscribe"-    "fixture/Unsubscribe.yaml"--requestSetEndpointAttributes :: SetEndpointAttributes -> TestTree-requestSetEndpointAttributes = req-    "SetEndpointAttributes"-    "fixture/SetEndpointAttributes.yaml"--requestSetSubscriptionAttributes :: SetSubscriptionAttributes -> TestTree-requestSetSubscriptionAttributes = req-    "SetSubscriptionAttributes"-    "fixture/SetSubscriptionAttributes.yaml"--requestConfirmSubscription :: ConfirmSubscription -> TestTree-requestConfirmSubscription = req-    "ConfirmSubscription"-    "fixture/ConfirmSubscription.yaml"--requestPublish :: Publish -> TestTree-requestPublish = req-    "Publish"-    "fixture/Publish.yaml"---- Responses--responseListPhoneNumbersOptedOut :: ListPhoneNumbersOptedOutResponse -> TestTree-responseListPhoneNumbersOptedOut = res-    "ListPhoneNumbersOptedOutResponse"-    "fixture/ListPhoneNumbersOptedOutResponse.proto"-    sns-    (Proxy :: Proxy ListPhoneNumbersOptedOut)--responseDeleteEndpoint :: DeleteEndpointResponse -> TestTree-responseDeleteEndpoint = res-    "DeleteEndpointResponse"-    "fixture/DeleteEndpointResponse.proto"-    sns-    (Proxy :: Proxy DeleteEndpoint)--responseRemovePermission :: RemovePermissionResponse -> TestTree-responseRemovePermission = res-    "RemovePermissionResponse"-    "fixture/RemovePermissionResponse.proto"-    sns-    (Proxy :: Proxy RemovePermission)--responseDeleteTopic :: DeleteTopicResponse -> TestTree-responseDeleteTopic = res-    "DeleteTopicResponse"-    "fixture/DeleteTopicResponse.proto"-    sns-    (Proxy :: Proxy DeleteTopic)--responseSetSMSAttributes :: SetSMSAttributesResponse -> TestTree-responseSetSMSAttributes = res-    "SetSMSAttributesResponse"-    "fixture/SetSMSAttributesResponse.proto"-    sns-    (Proxy :: Proxy SetSMSAttributes)--responseListTopics :: ListTopicsResponse -> TestTree-responseListTopics = res-    "ListTopicsResponse"-    "fixture/ListTopicsResponse.proto"-    sns-    (Proxy :: Proxy ListTopics)--responseCreatePlatformEndpoint :: CreatePlatformEndpointResponse -> TestTree-responseCreatePlatformEndpoint = res-    "CreatePlatformEndpointResponse"-    "fixture/CreatePlatformEndpointResponse.proto"-    sns-    (Proxy :: Proxy CreatePlatformEndpoint)--responseSetPlatformApplicationAttributes :: SetPlatformApplicationAttributesResponse -> TestTree-responseSetPlatformApplicationAttributes = res-    "SetPlatformApplicationAttributesResponse"-    "fixture/SetPlatformApplicationAttributesResponse.proto"-    sns-    (Proxy :: Proxy SetPlatformApplicationAttributes)--responseListSubscriptionsByTopic :: ListSubscriptionsByTopicResponse -> TestTree-responseListSubscriptionsByTopic = res-    "ListSubscriptionsByTopicResponse"-    "fixture/ListSubscriptionsByTopicResponse.proto"-    sns-    (Proxy :: Proxy ListSubscriptionsByTopic)--responseGetTopicAttributes :: GetTopicAttributesResponse -> TestTree-responseGetTopicAttributes = res-    "GetTopicAttributesResponse"-    "fixture/GetTopicAttributesResponse.proto"-    sns-    (Proxy :: Proxy GetTopicAttributes)--responseOptInPhoneNumber :: OptInPhoneNumberResponse -> TestTree-responseOptInPhoneNumber = res-    "OptInPhoneNumberResponse"-    "fixture/OptInPhoneNumberResponse.proto"-    sns-    (Proxy :: Proxy OptInPhoneNumber)--responseCreatePlatformApplication :: CreatePlatformApplicationResponse -> TestTree-responseCreatePlatformApplication = res-    "CreatePlatformApplicationResponse"-    "fixture/CreatePlatformApplicationResponse.proto"-    sns-    (Proxy :: Proxy CreatePlatformApplication)--responseGetPlatformApplicationAttributes :: GetPlatformApplicationAttributesResponse -> TestTree-responseGetPlatformApplicationAttributes = res-    "GetPlatformApplicationAttributesResponse"-    "fixture/GetPlatformApplicationAttributesResponse.proto"-    sns-    (Proxy :: Proxy GetPlatformApplicationAttributes)--responseListEndpointsByPlatformApplication :: ListEndpointsByPlatformApplicationResponse -> TestTree-responseListEndpointsByPlatformApplication = res-    "ListEndpointsByPlatformApplicationResponse"-    "fixture/ListEndpointsByPlatformApplicationResponse.proto"-    sns-    (Proxy :: Proxy ListEndpointsByPlatformApplication)--responseSetTopicAttributes :: SetTopicAttributesResponse -> TestTree-responseSetTopicAttributes = res-    "SetTopicAttributesResponse"-    "fixture/SetTopicAttributesResponse.proto"-    sns-    (Proxy :: Proxy SetTopicAttributes)--responseDeletePlatformApplication :: DeletePlatformApplicationResponse -> TestTree-responseDeletePlatformApplication = res-    "DeletePlatformApplicationResponse"-    "fixture/DeletePlatformApplicationResponse.proto"-    sns-    (Proxy :: Proxy DeletePlatformApplication)--responseGetSMSAttributes :: GetSMSAttributesResponse -> TestTree-responseGetSMSAttributes = res-    "GetSMSAttributesResponse"-    "fixture/GetSMSAttributesResponse.proto"-    sns-    (Proxy :: Proxy GetSMSAttributes)--responseListPlatformApplications :: ListPlatformApplicationsResponse -> TestTree-responseListPlatformApplications = res-    "ListPlatformApplicationsResponse"-    "fixture/ListPlatformApplicationsResponse.proto"-    sns-    (Proxy :: Proxy ListPlatformApplications)--responseAddPermission :: AddPermissionResponse -> TestTree-responseAddPermission = res-    "AddPermissionResponse"-    "fixture/AddPermissionResponse.proto"-    sns-    (Proxy :: Proxy AddPermission)--responseGetEndpointAttributes :: GetEndpointAttributesResponse -> TestTree-responseGetEndpointAttributes = res-    "GetEndpointAttributesResponse"-    "fixture/GetEndpointAttributesResponse.proto"-    sns-    (Proxy :: Proxy GetEndpointAttributes)--responseListSubscriptions :: ListSubscriptionsResponse -> TestTree-responseListSubscriptions = res-    "ListSubscriptionsResponse"-    "fixture/ListSubscriptionsResponse.proto"-    sns-    (Proxy :: Proxy ListSubscriptions)--responseGetSubscriptionAttributes :: GetSubscriptionAttributesResponse -> TestTree-responseGetSubscriptionAttributes = res-    "GetSubscriptionAttributesResponse"-    "fixture/GetSubscriptionAttributesResponse.proto"-    sns-    (Proxy :: Proxy GetSubscriptionAttributes)--responseCreateTopic :: CreateTopicResponse -> TestTree-responseCreateTopic = res-    "CreateTopicResponse"-    "fixture/CreateTopicResponse.proto"-    sns-    (Proxy :: Proxy CreateTopic)--responseCheckIfPhoneNumberIsOptedOut :: CheckIfPhoneNumberIsOptedOutResponse -> TestTree-responseCheckIfPhoneNumberIsOptedOut = res-    "CheckIfPhoneNumberIsOptedOutResponse"-    "fixture/CheckIfPhoneNumberIsOptedOutResponse.proto"-    sns-    (Proxy :: Proxy CheckIfPhoneNumberIsOptedOut)--responseSubscribe :: SubscribeResponse -> TestTree-responseSubscribe = res-    "SubscribeResponse"-    "fixture/SubscribeResponse.proto"-    sns-    (Proxy :: Proxy Subscribe)--responseUnsubscribe :: UnsubscribeResponse -> TestTree-responseUnsubscribe = res-    "UnsubscribeResponse"-    "fixture/UnsubscribeResponse.proto"-    sns-    (Proxy :: Proxy Unsubscribe)--responseSetEndpointAttributes :: SetEndpointAttributesResponse -> TestTree-responseSetEndpointAttributes = res-    "SetEndpointAttributesResponse"-    "fixture/SetEndpointAttributesResponse.proto"-    sns-    (Proxy :: Proxy SetEndpointAttributes)--responseSetSubscriptionAttributes :: SetSubscriptionAttributesResponse -> TestTree-responseSetSubscriptionAttributes = res-    "SetSubscriptionAttributesResponse"-    "fixture/SetSubscriptionAttributesResponse.proto"-    sns-    (Proxy :: Proxy SetSubscriptionAttributes)--responseConfirmSubscription :: ConfirmSubscriptionResponse -> TestTree-responseConfirmSubscription = res-    "ConfirmSubscriptionResponse"-    "fixture/ConfirmSubscriptionResponse.proto"-    sns-    (Proxy :: Proxy ConfirmSubscription)--responsePublish :: PublishResponse -> TestTree-responsePublish = res-    "PublishResponse"-    "fixture/PublishResponse.proto"-    sns-    (Proxy :: Proxy Publish)
− test/Test/AWS/SNS.hs
@@ -1,26 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}---- Module      : Test.AWS.SNS--- Copyright   : (c) 2013-2016 Brendan Hay--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.--- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental--- Portability : non-portable (GHC extensions)--module Test.AWS.SNS-    ( tests-    , fixtures-    ) where--import           Network.AWS.SNS-import           Test.AWS.Gen.SNS-import           Test.Tasty--tests :: [TestTree]-tests = []--fixtures :: [TestTree]-fixtures = []
− test/Test/AWS/SNS/Internal.hs
@@ -1,16 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- Module      : Test.AWS.SNS.Internal--- Copyright   : (c) 2013-2016 Brendan Hay--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.--- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental--- Portability : non-portable (GHC extensions)--module Test.AWS.SNS.Internal where--import Test.AWS.Prelude
+ test/Test/Amazonka/Gen/SNS.hs view
@@ -0,0 +1,878 @@+{-# 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.SNS+-- 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.SNS where++import Amazonka.SNS+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Amazonka.SNS.Internal+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"+--         [ requestAddPermission $+--             newAddPermission+--+--         , requestCheckIfPhoneNumberIsOptedOut $+--             newCheckIfPhoneNumberIsOptedOut+--+--         , requestConfirmSubscription $+--             newConfirmSubscription+--+--         , requestCreatePlatformApplication $+--             newCreatePlatformApplication+--+--         , requestCreatePlatformEndpoint $+--             newCreatePlatformEndpoint+--+--         , requestCreateSMSSandboxPhoneNumber $+--             newCreateSMSSandboxPhoneNumber+--+--         , requestCreateTopic $+--             newCreateTopic+--+--         , requestDeleteEndpoint $+--             newDeleteEndpoint+--+--         , requestDeletePlatformApplication $+--             newDeletePlatformApplication+--+--         , requestDeleteSMSSandboxPhoneNumber $+--             newDeleteSMSSandboxPhoneNumber+--+--         , requestDeleteTopic $+--             newDeleteTopic+--+--         , requestGetDataProtectionPolicy $+--             newGetDataProtectionPolicy+--+--         , requestGetEndpointAttributes $+--             newGetEndpointAttributes+--+--         , requestGetPlatformApplicationAttributes $+--             newGetPlatformApplicationAttributes+--+--         , requestGetSMSAttributes $+--             newGetSMSAttributes+--+--         , requestGetSMSSandboxAccountStatus $+--             newGetSMSSandboxAccountStatus+--+--         , requestGetSubscriptionAttributes $+--             newGetSubscriptionAttributes+--+--         , requestGetTopicAttributes $+--             newGetTopicAttributes+--+--         , requestListEndpointsByPlatformApplication $+--             newListEndpointsByPlatformApplication+--+--         , requestListOriginationNumbers $+--             newListOriginationNumbers+--+--         , requestListPhoneNumbersOptedOut $+--             newListPhoneNumbersOptedOut+--+--         , requestListPlatformApplications $+--             newListPlatformApplications+--+--         , requestListSMSSandboxPhoneNumbers $+--             newListSMSSandboxPhoneNumbers+--+--         , requestListSubscriptions $+--             newListSubscriptions+--+--         , requestListSubscriptionsByTopic $+--             newListSubscriptionsByTopic+--+--         , requestListTagsForResource $+--             newListTagsForResource+--+--         , requestListTopics $+--             newListTopics+--+--         , requestOptInPhoneNumber $+--             newOptInPhoneNumber+--+--         , requestPublish $+--             newPublish+--+--         , requestPublishBatch $+--             newPublishBatch+--+--         , requestPutDataProtectionPolicy $+--             newPutDataProtectionPolicy+--+--         , requestRemovePermission $+--             newRemovePermission+--+--         , requestSetEndpointAttributes $+--             newSetEndpointAttributes+--+--         , requestSetPlatformApplicationAttributes $+--             newSetPlatformApplicationAttributes+--+--         , requestSetSMSAttributes $+--             newSetSMSAttributes+--+--         , requestSetSubscriptionAttributes $+--             newSetSubscriptionAttributes+--+--         , requestSetTopicAttributes $+--             newSetTopicAttributes+--+--         , requestSubscribe $+--             newSubscribe+--+--         , requestTagResource $+--             newTagResource+--+--         , requestUnsubscribe $+--             newUnsubscribe+--+--         , requestUntagResource $+--             newUntagResource+--+--         , requestVerifySMSSandboxPhoneNumber $+--             newVerifySMSSandboxPhoneNumber+--+--           ]++--     , testGroup "response"+--         [ responseAddPermission $+--             newAddPermissionResponse+--+--         , responseCheckIfPhoneNumberIsOptedOut $+--             newCheckIfPhoneNumberIsOptedOutResponse+--+--         , responseConfirmSubscription $+--             newConfirmSubscriptionResponse+--+--         , responseCreatePlatformApplication $+--             newCreatePlatformApplicationResponse+--+--         , responseCreatePlatformEndpoint $+--             newCreatePlatformEndpointResponse+--+--         , responseCreateSMSSandboxPhoneNumber $+--             newCreateSMSSandboxPhoneNumberResponse+--+--         , responseCreateTopic $+--             newCreateTopicResponse+--+--         , responseDeleteEndpoint $+--             newDeleteEndpointResponse+--+--         , responseDeletePlatformApplication $+--             newDeletePlatformApplicationResponse+--+--         , responseDeleteSMSSandboxPhoneNumber $+--             newDeleteSMSSandboxPhoneNumberResponse+--+--         , responseDeleteTopic $+--             newDeleteTopicResponse+--+--         , responseGetDataProtectionPolicy $+--             newGetDataProtectionPolicyResponse+--+--         , responseGetEndpointAttributes $+--             newGetEndpointAttributesResponse+--+--         , responseGetPlatformApplicationAttributes $+--             newGetPlatformApplicationAttributesResponse+--+--         , responseGetSMSAttributes $+--             newGetSMSAttributesResponse+--+--         , responseGetSMSSandboxAccountStatus $+--             newGetSMSSandboxAccountStatusResponse+--+--         , responseGetSubscriptionAttributes $+--             newGetSubscriptionAttributesResponse+--+--         , responseGetTopicAttributes $+--             newGetTopicAttributesResponse+--+--         , responseListEndpointsByPlatformApplication $+--             newListEndpointsByPlatformApplicationResponse+--+--         , responseListOriginationNumbers $+--             newListOriginationNumbersResponse+--+--         , responseListPhoneNumbersOptedOut $+--             newListPhoneNumbersOptedOutResponse+--+--         , responseListPlatformApplications $+--             newListPlatformApplicationsResponse+--+--         , responseListSMSSandboxPhoneNumbers $+--             newListSMSSandboxPhoneNumbersResponse+--+--         , responseListSubscriptions $+--             newListSubscriptionsResponse+--+--         , responseListSubscriptionsByTopic $+--             newListSubscriptionsByTopicResponse+--+--         , responseListTagsForResource $+--             newListTagsForResourceResponse+--+--         , responseListTopics $+--             newListTopicsResponse+--+--         , responseOptInPhoneNumber $+--             newOptInPhoneNumberResponse+--+--         , responsePublish $+--             newPublishResponse+--+--         , responsePublishBatch $+--             newPublishBatchResponse+--+--         , responsePutDataProtectionPolicy $+--             newPutDataProtectionPolicyResponse+--+--         , responseRemovePermission $+--             newRemovePermissionResponse+--+--         , responseSetEndpointAttributes $+--             newSetEndpointAttributesResponse+--+--         , responseSetPlatformApplicationAttributes $+--             newSetPlatformApplicationAttributesResponse+--+--         , responseSetSMSAttributes $+--             newSetSMSAttributesResponse+--+--         , responseSetSubscriptionAttributes $+--             newSetSubscriptionAttributesResponse+--+--         , responseSetTopicAttributes $+--             newSetTopicAttributesResponse+--+--         , responseSubscribe $+--             newSubscribeResponse+--+--         , responseTagResource $+--             newTagResourceResponse+--+--         , responseUnsubscribe $+--             newUnsubscribeResponse+--+--         , responseUntagResource $+--             newUntagResourceResponse+--+--         , responseVerifySMSSandboxPhoneNumber $+--             newVerifySMSSandboxPhoneNumberResponse+--+--           ]+--     ]++-- Requests++requestAddPermission :: AddPermission -> TestTree+requestAddPermission =+  req+    "AddPermission"+    "fixture/AddPermission.yaml"++requestCheckIfPhoneNumberIsOptedOut :: CheckIfPhoneNumberIsOptedOut -> TestTree+requestCheckIfPhoneNumberIsOptedOut =+  req+    "CheckIfPhoneNumberIsOptedOut"+    "fixture/CheckIfPhoneNumberIsOptedOut.yaml"++requestConfirmSubscription :: ConfirmSubscription -> TestTree+requestConfirmSubscription =+  req+    "ConfirmSubscription"+    "fixture/ConfirmSubscription.yaml"++requestCreatePlatformApplication :: CreatePlatformApplication -> TestTree+requestCreatePlatformApplication =+  req+    "CreatePlatformApplication"+    "fixture/CreatePlatformApplication.yaml"++requestCreatePlatformEndpoint :: CreatePlatformEndpoint -> TestTree+requestCreatePlatformEndpoint =+  req+    "CreatePlatformEndpoint"+    "fixture/CreatePlatformEndpoint.yaml"++requestCreateSMSSandboxPhoneNumber :: CreateSMSSandboxPhoneNumber -> TestTree+requestCreateSMSSandboxPhoneNumber =+  req+    "CreateSMSSandboxPhoneNumber"+    "fixture/CreateSMSSandboxPhoneNumber.yaml"++requestCreateTopic :: CreateTopic -> TestTree+requestCreateTopic =+  req+    "CreateTopic"+    "fixture/CreateTopic.yaml"++requestDeleteEndpoint :: DeleteEndpoint -> TestTree+requestDeleteEndpoint =+  req+    "DeleteEndpoint"+    "fixture/DeleteEndpoint.yaml"++requestDeletePlatformApplication :: DeletePlatformApplication -> TestTree+requestDeletePlatformApplication =+  req+    "DeletePlatformApplication"+    "fixture/DeletePlatformApplication.yaml"++requestDeleteSMSSandboxPhoneNumber :: DeleteSMSSandboxPhoneNumber -> TestTree+requestDeleteSMSSandboxPhoneNumber =+  req+    "DeleteSMSSandboxPhoneNumber"+    "fixture/DeleteSMSSandboxPhoneNumber.yaml"++requestDeleteTopic :: DeleteTopic -> TestTree+requestDeleteTopic =+  req+    "DeleteTopic"+    "fixture/DeleteTopic.yaml"++requestGetDataProtectionPolicy :: GetDataProtectionPolicy -> TestTree+requestGetDataProtectionPolicy =+  req+    "GetDataProtectionPolicy"+    "fixture/GetDataProtectionPolicy.yaml"++requestGetEndpointAttributes :: GetEndpointAttributes -> TestTree+requestGetEndpointAttributes =+  req+    "GetEndpointAttributes"+    "fixture/GetEndpointAttributes.yaml"++requestGetPlatformApplicationAttributes :: GetPlatformApplicationAttributes -> TestTree+requestGetPlatformApplicationAttributes =+  req+    "GetPlatformApplicationAttributes"+    "fixture/GetPlatformApplicationAttributes.yaml"++requestGetSMSAttributes :: GetSMSAttributes -> TestTree+requestGetSMSAttributes =+  req+    "GetSMSAttributes"+    "fixture/GetSMSAttributes.yaml"++requestGetSMSSandboxAccountStatus :: GetSMSSandboxAccountStatus -> TestTree+requestGetSMSSandboxAccountStatus =+  req+    "GetSMSSandboxAccountStatus"+    "fixture/GetSMSSandboxAccountStatus.yaml"++requestGetSubscriptionAttributes :: GetSubscriptionAttributes -> TestTree+requestGetSubscriptionAttributes =+  req+    "GetSubscriptionAttributes"+    "fixture/GetSubscriptionAttributes.yaml"++requestGetTopicAttributes :: GetTopicAttributes -> TestTree+requestGetTopicAttributes =+  req+    "GetTopicAttributes"+    "fixture/GetTopicAttributes.yaml"++requestListEndpointsByPlatformApplication :: ListEndpointsByPlatformApplication -> TestTree+requestListEndpointsByPlatformApplication =+  req+    "ListEndpointsByPlatformApplication"+    "fixture/ListEndpointsByPlatformApplication.yaml"++requestListOriginationNumbers :: ListOriginationNumbers -> TestTree+requestListOriginationNumbers =+  req+    "ListOriginationNumbers"+    "fixture/ListOriginationNumbers.yaml"++requestListPhoneNumbersOptedOut :: ListPhoneNumbersOptedOut -> TestTree+requestListPhoneNumbersOptedOut =+  req+    "ListPhoneNumbersOptedOut"+    "fixture/ListPhoneNumbersOptedOut.yaml"++requestListPlatformApplications :: ListPlatformApplications -> TestTree+requestListPlatformApplications =+  req+    "ListPlatformApplications"+    "fixture/ListPlatformApplications.yaml"++requestListSMSSandboxPhoneNumbers :: ListSMSSandboxPhoneNumbers -> TestTree+requestListSMSSandboxPhoneNumbers =+  req+    "ListSMSSandboxPhoneNumbers"+    "fixture/ListSMSSandboxPhoneNumbers.yaml"++requestListSubscriptions :: ListSubscriptions -> TestTree+requestListSubscriptions =+  req+    "ListSubscriptions"+    "fixture/ListSubscriptions.yaml"++requestListSubscriptionsByTopic :: ListSubscriptionsByTopic -> TestTree+requestListSubscriptionsByTopic =+  req+    "ListSubscriptionsByTopic"+    "fixture/ListSubscriptionsByTopic.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+  req+    "ListTagsForResource"+    "fixture/ListTagsForResource.yaml"++requestListTopics :: ListTopics -> TestTree+requestListTopics =+  req+    "ListTopics"+    "fixture/ListTopics.yaml"++requestOptInPhoneNumber :: OptInPhoneNumber -> TestTree+requestOptInPhoneNumber =+  req+    "OptInPhoneNumber"+    "fixture/OptInPhoneNumber.yaml"++requestPublish :: Publish -> TestTree+requestPublish =+  req+    "Publish"+    "fixture/Publish.yaml"++requestPublishBatch :: PublishBatch -> TestTree+requestPublishBatch =+  req+    "PublishBatch"+    "fixture/PublishBatch.yaml"++requestPutDataProtectionPolicy :: PutDataProtectionPolicy -> TestTree+requestPutDataProtectionPolicy =+  req+    "PutDataProtectionPolicy"+    "fixture/PutDataProtectionPolicy.yaml"++requestRemovePermission :: RemovePermission -> TestTree+requestRemovePermission =+  req+    "RemovePermission"+    "fixture/RemovePermission.yaml"++requestSetEndpointAttributes :: SetEndpointAttributes -> TestTree+requestSetEndpointAttributes =+  req+    "SetEndpointAttributes"+    "fixture/SetEndpointAttributes.yaml"++requestSetPlatformApplicationAttributes :: SetPlatformApplicationAttributes -> TestTree+requestSetPlatformApplicationAttributes =+  req+    "SetPlatformApplicationAttributes"+    "fixture/SetPlatformApplicationAttributes.yaml"++requestSetSMSAttributes :: SetSMSAttributes -> TestTree+requestSetSMSAttributes =+  req+    "SetSMSAttributes"+    "fixture/SetSMSAttributes.yaml"++requestSetSubscriptionAttributes :: SetSubscriptionAttributes -> TestTree+requestSetSubscriptionAttributes =+  req+    "SetSubscriptionAttributes"+    "fixture/SetSubscriptionAttributes.yaml"++requestSetTopicAttributes :: SetTopicAttributes -> TestTree+requestSetTopicAttributes =+  req+    "SetTopicAttributes"+    "fixture/SetTopicAttributes.yaml"++requestSubscribe :: Subscribe -> TestTree+requestSubscribe =+  req+    "Subscribe"+    "fixture/Subscribe.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+  req+    "TagResource"+    "fixture/TagResource.yaml"++requestUnsubscribe :: Unsubscribe -> TestTree+requestUnsubscribe =+  req+    "Unsubscribe"+    "fixture/Unsubscribe.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+  req+    "UntagResource"+    "fixture/UntagResource.yaml"++requestVerifySMSSandboxPhoneNumber :: VerifySMSSandboxPhoneNumber -> TestTree+requestVerifySMSSandboxPhoneNumber =+  req+    "VerifySMSSandboxPhoneNumber"+    "fixture/VerifySMSSandboxPhoneNumber.yaml"++-- Responses++responseAddPermission :: AddPermissionResponse -> TestTree+responseAddPermission =+  res+    "AddPermissionResponse"+    "fixture/AddPermissionResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy AddPermission)++responseCheckIfPhoneNumberIsOptedOut :: CheckIfPhoneNumberIsOptedOutResponse -> TestTree+responseCheckIfPhoneNumberIsOptedOut =+  res+    "CheckIfPhoneNumberIsOptedOutResponse"+    "fixture/CheckIfPhoneNumberIsOptedOutResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CheckIfPhoneNumberIsOptedOut)++responseConfirmSubscription :: ConfirmSubscriptionResponse -> TestTree+responseConfirmSubscription =+  res+    "ConfirmSubscriptionResponse"+    "fixture/ConfirmSubscriptionResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ConfirmSubscription)++responseCreatePlatformApplication :: CreatePlatformApplicationResponse -> TestTree+responseCreatePlatformApplication =+  res+    "CreatePlatformApplicationResponse"+    "fixture/CreatePlatformApplicationResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreatePlatformApplication)++responseCreatePlatformEndpoint :: CreatePlatformEndpointResponse -> TestTree+responseCreatePlatformEndpoint =+  res+    "CreatePlatformEndpointResponse"+    "fixture/CreatePlatformEndpointResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreatePlatformEndpoint)++responseCreateSMSSandboxPhoneNumber :: CreateSMSSandboxPhoneNumberResponse -> TestTree+responseCreateSMSSandboxPhoneNumber =+  res+    "CreateSMSSandboxPhoneNumberResponse"+    "fixture/CreateSMSSandboxPhoneNumberResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateSMSSandboxPhoneNumber)++responseCreateTopic :: CreateTopicResponse -> TestTree+responseCreateTopic =+  res+    "CreateTopicResponse"+    "fixture/CreateTopicResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateTopic)++responseDeleteEndpoint :: DeleteEndpointResponse -> TestTree+responseDeleteEndpoint =+  res+    "DeleteEndpointResponse"+    "fixture/DeleteEndpointResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteEndpoint)++responseDeletePlatformApplication :: DeletePlatformApplicationResponse -> TestTree+responseDeletePlatformApplication =+  res+    "DeletePlatformApplicationResponse"+    "fixture/DeletePlatformApplicationResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeletePlatformApplication)++responseDeleteSMSSandboxPhoneNumber :: DeleteSMSSandboxPhoneNumberResponse -> TestTree+responseDeleteSMSSandboxPhoneNumber =+  res+    "DeleteSMSSandboxPhoneNumberResponse"+    "fixture/DeleteSMSSandboxPhoneNumberResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteSMSSandboxPhoneNumber)++responseDeleteTopic :: DeleteTopicResponse -> TestTree+responseDeleteTopic =+  res+    "DeleteTopicResponse"+    "fixture/DeleteTopicResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteTopic)++responseGetDataProtectionPolicy :: GetDataProtectionPolicyResponse -> TestTree+responseGetDataProtectionPolicy =+  res+    "GetDataProtectionPolicyResponse"+    "fixture/GetDataProtectionPolicyResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetDataProtectionPolicy)++responseGetEndpointAttributes :: GetEndpointAttributesResponse -> TestTree+responseGetEndpointAttributes =+  res+    "GetEndpointAttributesResponse"+    "fixture/GetEndpointAttributesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetEndpointAttributes)++responseGetPlatformApplicationAttributes :: GetPlatformApplicationAttributesResponse -> TestTree+responseGetPlatformApplicationAttributes =+  res+    "GetPlatformApplicationAttributesResponse"+    "fixture/GetPlatformApplicationAttributesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetPlatformApplicationAttributes)++responseGetSMSAttributes :: GetSMSAttributesResponse -> TestTree+responseGetSMSAttributes =+  res+    "GetSMSAttributesResponse"+    "fixture/GetSMSAttributesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetSMSAttributes)++responseGetSMSSandboxAccountStatus :: GetSMSSandboxAccountStatusResponse -> TestTree+responseGetSMSSandboxAccountStatus =+  res+    "GetSMSSandboxAccountStatusResponse"+    "fixture/GetSMSSandboxAccountStatusResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetSMSSandboxAccountStatus)++responseGetSubscriptionAttributes :: GetSubscriptionAttributesResponse -> TestTree+responseGetSubscriptionAttributes =+  res+    "GetSubscriptionAttributesResponse"+    "fixture/GetSubscriptionAttributesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetSubscriptionAttributes)++responseGetTopicAttributes :: GetTopicAttributesResponse -> TestTree+responseGetTopicAttributes =+  res+    "GetTopicAttributesResponse"+    "fixture/GetTopicAttributesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetTopicAttributes)++responseListEndpointsByPlatformApplication :: ListEndpointsByPlatformApplicationResponse -> TestTree+responseListEndpointsByPlatformApplication =+  res+    "ListEndpointsByPlatformApplicationResponse"+    "fixture/ListEndpointsByPlatformApplicationResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListEndpointsByPlatformApplication)++responseListOriginationNumbers :: ListOriginationNumbersResponse -> TestTree+responseListOriginationNumbers =+  res+    "ListOriginationNumbersResponse"+    "fixture/ListOriginationNumbersResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListOriginationNumbers)++responseListPhoneNumbersOptedOut :: ListPhoneNumbersOptedOutResponse -> TestTree+responseListPhoneNumbersOptedOut =+  res+    "ListPhoneNumbersOptedOutResponse"+    "fixture/ListPhoneNumbersOptedOutResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListPhoneNumbersOptedOut)++responseListPlatformApplications :: ListPlatformApplicationsResponse -> TestTree+responseListPlatformApplications =+  res+    "ListPlatformApplicationsResponse"+    "fixture/ListPlatformApplicationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListPlatformApplications)++responseListSMSSandboxPhoneNumbers :: ListSMSSandboxPhoneNumbersResponse -> TestTree+responseListSMSSandboxPhoneNumbers =+  res+    "ListSMSSandboxPhoneNumbersResponse"+    "fixture/ListSMSSandboxPhoneNumbersResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListSMSSandboxPhoneNumbers)++responseListSubscriptions :: ListSubscriptionsResponse -> TestTree+responseListSubscriptions =+  res+    "ListSubscriptionsResponse"+    "fixture/ListSubscriptionsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListSubscriptions)++responseListSubscriptionsByTopic :: ListSubscriptionsByTopicResponse -> TestTree+responseListSubscriptionsByTopic =+  res+    "ListSubscriptionsByTopicResponse"+    "fixture/ListSubscriptionsByTopicResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListSubscriptionsByTopic)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+  res+    "ListTagsForResourceResponse"+    "fixture/ListTagsForResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responseListTopics :: ListTopicsResponse -> TestTree+responseListTopics =+  res+    "ListTopicsResponse"+    "fixture/ListTopicsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListTopics)++responseOptInPhoneNumber :: OptInPhoneNumberResponse -> TestTree+responseOptInPhoneNumber =+  res+    "OptInPhoneNumberResponse"+    "fixture/OptInPhoneNumberResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy OptInPhoneNumber)++responsePublish :: PublishResponse -> TestTree+responsePublish =+  res+    "PublishResponse"+    "fixture/PublishResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy Publish)++responsePublishBatch :: PublishBatchResponse -> TestTree+responsePublishBatch =+  res+    "PublishBatchResponse"+    "fixture/PublishBatchResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy PublishBatch)++responsePutDataProtectionPolicy :: PutDataProtectionPolicyResponse -> TestTree+responsePutDataProtectionPolicy =+  res+    "PutDataProtectionPolicyResponse"+    "fixture/PutDataProtectionPolicyResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy PutDataProtectionPolicy)++responseRemovePermission :: RemovePermissionResponse -> TestTree+responseRemovePermission =+  res+    "RemovePermissionResponse"+    "fixture/RemovePermissionResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy RemovePermission)++responseSetEndpointAttributes :: SetEndpointAttributesResponse -> TestTree+responseSetEndpointAttributes =+  res+    "SetEndpointAttributesResponse"+    "fixture/SetEndpointAttributesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy SetEndpointAttributes)++responseSetPlatformApplicationAttributes :: SetPlatformApplicationAttributesResponse -> TestTree+responseSetPlatformApplicationAttributes =+  res+    "SetPlatformApplicationAttributesResponse"+    "fixture/SetPlatformApplicationAttributesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy SetPlatformApplicationAttributes)++responseSetSMSAttributes :: SetSMSAttributesResponse -> TestTree+responseSetSMSAttributes =+  res+    "SetSMSAttributesResponse"+    "fixture/SetSMSAttributesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy SetSMSAttributes)++responseSetSubscriptionAttributes :: SetSubscriptionAttributesResponse -> TestTree+responseSetSubscriptionAttributes =+  res+    "SetSubscriptionAttributesResponse"+    "fixture/SetSubscriptionAttributesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy SetSubscriptionAttributes)++responseSetTopicAttributes :: SetTopicAttributesResponse -> TestTree+responseSetTopicAttributes =+  res+    "SetTopicAttributesResponse"+    "fixture/SetTopicAttributesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy SetTopicAttributes)++responseSubscribe :: SubscribeResponse -> TestTree+responseSubscribe =+  res+    "SubscribeResponse"+    "fixture/SubscribeResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy Subscribe)++responseTagResource :: TagResourceResponse -> TestTree+responseTagResource =+  res+    "TagResourceResponse"+    "fixture/TagResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy TagResource)++responseUnsubscribe :: UnsubscribeResponse -> TestTree+responseUnsubscribe =+  res+    "UnsubscribeResponse"+    "fixture/UnsubscribeResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy Unsubscribe)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource =+  res+    "UntagResourceResponse"+    "fixture/UntagResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UntagResource)++responseVerifySMSSandboxPhoneNumber :: VerifySMSSandboxPhoneNumberResponse -> TestTree+responseVerifySMSSandboxPhoneNumber =+  res+    "VerifySMSSandboxPhoneNumberResponse"+    "fixture/VerifySMSSandboxPhoneNumberResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy VerifySMSSandboxPhoneNumber)
+ test/Test/Amazonka/SNS.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.SNS+-- 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.SNS+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/SNS/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.SNS.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.SNS.Internal where