{-# 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-2021 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 (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@, @PlatformPrincipal@ is
--     @SSL certificate@ and @PlatformCredential@ is @private 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.Lens as Lens
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.
    CreatePlatformApplication -> Text
name :: Prelude.Text,
    -- | The following platforms are supported: ADM (Amazon Device Messaging),
    -- APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase
    -- Cloud Messaging).
    CreatePlatformApplication -> Text
platform :: Prelude.Text,
    -- | For a list of attributes, see
    -- <https://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html SetPlatformApplicationAttributes>.
    CreatePlatformApplication -> HashMap Text Text
attributes :: Prelude.HashMap Prelude.Text Prelude.Text
  }
  deriving (CreatePlatformApplication -> CreatePlatformApplication -> Bool
(CreatePlatformApplication -> CreatePlatformApplication -> Bool)
-> (CreatePlatformApplication -> CreatePlatformApplication -> Bool)
-> Eq CreatePlatformApplication
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePlatformApplication -> CreatePlatformApplication -> Bool
$c/= :: CreatePlatformApplication -> CreatePlatformApplication -> Bool
== :: CreatePlatformApplication -> CreatePlatformApplication -> Bool
$c== :: CreatePlatformApplication -> CreatePlatformApplication -> Bool
Prelude.Eq, ReadPrec [CreatePlatformApplication]
ReadPrec CreatePlatformApplication
Int -> ReadS CreatePlatformApplication
ReadS [CreatePlatformApplication]
(Int -> ReadS CreatePlatformApplication)
-> ReadS [CreatePlatformApplication]
-> ReadPrec CreatePlatformApplication
-> ReadPrec [CreatePlatformApplication]
-> Read CreatePlatformApplication
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePlatformApplication]
$creadListPrec :: ReadPrec [CreatePlatformApplication]
readPrec :: ReadPrec CreatePlatformApplication
$creadPrec :: ReadPrec CreatePlatformApplication
readList :: ReadS [CreatePlatformApplication]
$creadList :: ReadS [CreatePlatformApplication]
readsPrec :: Int -> ReadS CreatePlatformApplication
$creadsPrec :: Int -> ReadS CreatePlatformApplication
Prelude.Read, Int -> CreatePlatformApplication -> ShowS
[CreatePlatformApplication] -> ShowS
CreatePlatformApplication -> String
(Int -> CreatePlatformApplication -> ShowS)
-> (CreatePlatformApplication -> String)
-> ([CreatePlatformApplication] -> ShowS)
-> Show CreatePlatformApplication
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePlatformApplication] -> ShowS
$cshowList :: [CreatePlatformApplication] -> ShowS
show :: CreatePlatformApplication -> String
$cshow :: CreatePlatformApplication -> String
showsPrec :: Int -> CreatePlatformApplication -> ShowS
$cshowsPrec :: Int -> CreatePlatformApplication -> ShowS
Prelude.Show, (forall x.
 CreatePlatformApplication -> Rep CreatePlatformApplication x)
-> (forall x.
    Rep CreatePlatformApplication x -> CreatePlatformApplication)
-> Generic CreatePlatformApplication
forall x.
Rep CreatePlatformApplication x -> CreatePlatformApplication
forall x.
CreatePlatformApplication -> Rep CreatePlatformApplication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreatePlatformApplication x -> CreatePlatformApplication
$cfrom :: forall x.
CreatePlatformApplication -> Rep CreatePlatformApplication x
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 :: Text -> Text -> CreatePlatformApplication
newCreatePlatformApplication Text
pName_ Text
pPlatform_ =
  CreatePlatformApplication' :: Text -> Text -> HashMap Text Text -> CreatePlatformApplication
CreatePlatformApplication'
    { $sel:name:CreatePlatformApplication' :: Text
name = Text
pName_,
      $sel:platform:CreatePlatformApplication' :: Text
platform = Text
pPlatform_,
      $sel:attributes:CreatePlatformApplication' :: HashMap Text Text
attributes = HashMap Text Text
forall a. Monoid a => a
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 :: (Text -> f Text)
-> CreatePlatformApplication -> f CreatePlatformApplication
createPlatformApplication_name = (CreatePlatformApplication -> Text)
-> (CreatePlatformApplication -> Text -> CreatePlatformApplication)
-> Lens
     CreatePlatformApplication CreatePlatformApplication Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlatformApplication' {Text
name :: Text
$sel:name:CreatePlatformApplication' :: CreatePlatformApplication -> Text
name} -> Text
name) (\s :: CreatePlatformApplication
s@CreatePlatformApplication' {} Text
a -> CreatePlatformApplication
s {$sel:name:CreatePlatformApplication' :: Text
name = Text
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 :: (Text -> f Text)
-> CreatePlatformApplication -> f CreatePlatformApplication
createPlatformApplication_platform = (CreatePlatformApplication -> Text)
-> (CreatePlatformApplication -> Text -> CreatePlatformApplication)
-> Lens
     CreatePlatformApplication CreatePlatformApplication Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlatformApplication' {Text
platform :: Text
$sel:platform:CreatePlatformApplication' :: CreatePlatformApplication -> Text
platform} -> Text
platform) (\s :: CreatePlatformApplication
s@CreatePlatformApplication' {} Text
a -> CreatePlatformApplication
s {$sel:platform:CreatePlatformApplication' :: Text
platform = Text
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 :: (HashMap Text Text -> f (HashMap Text Text))
-> CreatePlatformApplication -> f CreatePlatformApplication
createPlatformApplication_attributes = (CreatePlatformApplication -> HashMap Text Text)
-> (CreatePlatformApplication
    -> HashMap Text Text -> CreatePlatformApplication)
-> Lens
     CreatePlatformApplication
     CreatePlatformApplication
     (HashMap Text Text)
     (HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlatformApplication' {HashMap Text Text
attributes :: HashMap Text Text
$sel:attributes:CreatePlatformApplication' :: CreatePlatformApplication -> HashMap Text Text
attributes} -> HashMap Text Text
attributes) (\s :: CreatePlatformApplication
s@CreatePlatformApplication' {} HashMap Text Text
a -> CreatePlatformApplication
s {$sel:attributes:CreatePlatformApplication' :: HashMap Text Text
attributes = HashMap Text Text
a} :: CreatePlatformApplication) ((HashMap Text Text -> f (HashMap Text Text))
 -> CreatePlatformApplication -> f CreatePlatformApplication)
-> ((HashMap Text Text -> f (HashMap Text Text))
    -> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> CreatePlatformApplication
-> f CreatePlatformApplication
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest CreatePlatformApplication where
  type
    AWSResponse CreatePlatformApplication =
      CreatePlatformApplicationResponse
  request :: CreatePlatformApplication -> Request CreatePlatformApplication
request = Service
-> CreatePlatformApplication -> Request CreatePlatformApplication
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreatePlatformApplication
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreatePlatformApplication)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreatePlatformApplication))
-> Logger
-> Service
-> Proxy CreatePlatformApplication
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreatePlatformApplication)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"CreatePlatformApplicationResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Int -> CreatePlatformApplicationResponse
CreatePlatformApplicationResponse'
            (Maybe Text -> Int -> CreatePlatformApplicationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreatePlatformApplicationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PlatformApplicationArn")
            Either String (Int -> CreatePlatformApplicationResponse)
-> Either String Int
-> Either String CreatePlatformApplicationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreatePlatformApplication

instance Prelude.NFData CreatePlatformApplication

instance Core.ToHeaders CreatePlatformApplication where
  toHeaders :: CreatePlatformApplication -> ResponseHeaders
toHeaders = ResponseHeaders -> CreatePlatformApplication -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath CreatePlatformApplication where
  toPath :: CreatePlatformApplication -> ByteString
toPath = ByteString -> CreatePlatformApplication -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery CreatePlatformApplication where
  toQuery :: CreatePlatformApplication -> QueryString
toQuery CreatePlatformApplication' {Text
HashMap Text Text
attributes :: HashMap Text Text
platform :: Text
name :: Text
$sel:attributes:CreatePlatformApplication' :: CreatePlatformApplication -> HashMap Text Text
$sel:platform:CreatePlatformApplication' :: CreatePlatformApplication -> Text
$sel:name:CreatePlatformApplication' :: CreatePlatformApplication -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreatePlatformApplication" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-03-31" :: Prelude.ByteString),
        ByteString
"Name" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
name,
        ByteString
"Platform" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
platform,
        ByteString
"Attributes"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString
-> ByteString -> ByteString -> HashMap Text Text -> QueryString
forall k v.
(ToQuery k, ToQuery v) =>
ByteString
-> ByteString -> ByteString -> HashMap k v -> QueryString
Core.toQueryMap ByteString
"entry" ByteString
"key" ByteString
"value" HashMap Text Text
attributes
      ]

-- | Response from CreatePlatformApplication action.
--
-- /See:/ 'newCreatePlatformApplicationResponse' smart constructor.
data CreatePlatformApplicationResponse = CreatePlatformApplicationResponse'
  { -- | PlatformApplicationArn is returned.
    CreatePlatformApplicationResponse -> Maybe Text
platformApplicationArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreatePlatformApplicationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreatePlatformApplicationResponse
-> CreatePlatformApplicationResponse -> Bool
(CreatePlatformApplicationResponse
 -> CreatePlatformApplicationResponse -> Bool)
-> (CreatePlatformApplicationResponse
    -> CreatePlatformApplicationResponse -> Bool)
-> Eq CreatePlatformApplicationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePlatformApplicationResponse
-> CreatePlatformApplicationResponse -> Bool
$c/= :: CreatePlatformApplicationResponse
-> CreatePlatformApplicationResponse -> Bool
== :: CreatePlatformApplicationResponse
-> CreatePlatformApplicationResponse -> Bool
$c== :: CreatePlatformApplicationResponse
-> CreatePlatformApplicationResponse -> Bool
Prelude.Eq, ReadPrec [CreatePlatformApplicationResponse]
ReadPrec CreatePlatformApplicationResponse
Int -> ReadS CreatePlatformApplicationResponse
ReadS [CreatePlatformApplicationResponse]
(Int -> ReadS CreatePlatformApplicationResponse)
-> ReadS [CreatePlatformApplicationResponse]
-> ReadPrec CreatePlatformApplicationResponse
-> ReadPrec [CreatePlatformApplicationResponse]
-> Read CreatePlatformApplicationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePlatformApplicationResponse]
$creadListPrec :: ReadPrec [CreatePlatformApplicationResponse]
readPrec :: ReadPrec CreatePlatformApplicationResponse
$creadPrec :: ReadPrec CreatePlatformApplicationResponse
readList :: ReadS [CreatePlatformApplicationResponse]
$creadList :: ReadS [CreatePlatformApplicationResponse]
readsPrec :: Int -> ReadS CreatePlatformApplicationResponse
$creadsPrec :: Int -> ReadS CreatePlatformApplicationResponse
Prelude.Read, Int -> CreatePlatformApplicationResponse -> ShowS
[CreatePlatformApplicationResponse] -> ShowS
CreatePlatformApplicationResponse -> String
(Int -> CreatePlatformApplicationResponse -> ShowS)
-> (CreatePlatformApplicationResponse -> String)
-> ([CreatePlatformApplicationResponse] -> ShowS)
-> Show CreatePlatformApplicationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePlatformApplicationResponse] -> ShowS
$cshowList :: [CreatePlatformApplicationResponse] -> ShowS
show :: CreatePlatformApplicationResponse -> String
$cshow :: CreatePlatformApplicationResponse -> String
showsPrec :: Int -> CreatePlatformApplicationResponse -> ShowS
$cshowsPrec :: Int -> CreatePlatformApplicationResponse -> ShowS
Prelude.Show, (forall x.
 CreatePlatformApplicationResponse
 -> Rep CreatePlatformApplicationResponse x)
-> (forall x.
    Rep CreatePlatformApplicationResponse x
    -> CreatePlatformApplicationResponse)
-> Generic CreatePlatformApplicationResponse
forall x.
Rep CreatePlatformApplicationResponse x
-> CreatePlatformApplicationResponse
forall x.
CreatePlatformApplicationResponse
-> Rep CreatePlatformApplicationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreatePlatformApplicationResponse x
-> CreatePlatformApplicationResponse
$cfrom :: forall x.
CreatePlatformApplicationResponse
-> Rep CreatePlatformApplicationResponse x
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 :: Int -> CreatePlatformApplicationResponse
newCreatePlatformApplicationResponse Int
pHttpStatus_ =
  CreatePlatformApplicationResponse' :: Maybe Text -> Int -> CreatePlatformApplicationResponse
CreatePlatformApplicationResponse'
    { $sel:platformApplicationArn:CreatePlatformApplicationResponse' :: Maybe Text
platformApplicationArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreatePlatformApplicationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | PlatformApplicationArn is returned.
createPlatformApplicationResponse_platformApplicationArn :: Lens.Lens' CreatePlatformApplicationResponse (Prelude.Maybe Prelude.Text)
createPlatformApplicationResponse_platformApplicationArn :: (Maybe Text -> f (Maybe Text))
-> CreatePlatformApplicationResponse
-> f CreatePlatformApplicationResponse
createPlatformApplicationResponse_platformApplicationArn = (CreatePlatformApplicationResponse -> Maybe Text)
-> (CreatePlatformApplicationResponse
    -> Maybe Text -> CreatePlatformApplicationResponse)
-> Lens
     CreatePlatformApplicationResponse
     CreatePlatformApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlatformApplicationResponse' {Maybe Text
platformApplicationArn :: Maybe Text
$sel:platformApplicationArn:CreatePlatformApplicationResponse' :: CreatePlatformApplicationResponse -> Maybe Text
platformApplicationArn} -> Maybe Text
platformApplicationArn) (\s :: CreatePlatformApplicationResponse
s@CreatePlatformApplicationResponse' {} Maybe Text
a -> CreatePlatformApplicationResponse
s {$sel:platformApplicationArn:CreatePlatformApplicationResponse' :: Maybe Text
platformApplicationArn = Maybe Text
a} :: CreatePlatformApplicationResponse)

-- | The response's http status code.
createPlatformApplicationResponse_httpStatus :: Lens.Lens' CreatePlatformApplicationResponse Prelude.Int
createPlatformApplicationResponse_httpStatus :: (Int -> f Int)
-> CreatePlatformApplicationResponse
-> f CreatePlatformApplicationResponse
createPlatformApplicationResponse_httpStatus = (CreatePlatformApplicationResponse -> Int)
-> (CreatePlatformApplicationResponse
    -> Int -> CreatePlatformApplicationResponse)
-> Lens
     CreatePlatformApplicationResponse
     CreatePlatformApplicationResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePlatformApplicationResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreatePlatformApplicationResponse' :: CreatePlatformApplicationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreatePlatformApplicationResponse
s@CreatePlatformApplicationResponse' {} Int
a -> CreatePlatformApplicationResponse
s {$sel:httpStatus:CreatePlatformApplicationResponse' :: Int
httpStatus = Int
a} :: CreatePlatformApplicationResponse)

instance
  Prelude.NFData
    CreatePlatformApplicationResponse