{-# 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.IoTFleetHub.DescribeApplication
-- 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)
--
-- Gets information about a Fleet Hub for AWS IoT Device Management web
-- application.
--
-- Fleet Hub for AWS IoT Device Management is in public preview and is
-- subject to change.
module Amazonka.IoTFleetHub.DescribeApplication
  ( -- * Creating a Request
    DescribeApplication (..),
    newDescribeApplication,

    -- * Request Lenses
    describeApplication_applicationId,

    -- * Destructuring the Response
    DescribeApplicationResponse (..),
    newDescribeApplicationResponse,

    -- * Response Lenses
    describeApplicationResponse_applicationDescription,
    describeApplicationResponse_ssoClientId,
    describeApplicationResponse_errorMessage,
    describeApplicationResponse_tags,
    describeApplicationResponse_httpStatus,
    describeApplicationResponse_applicationId,
    describeApplicationResponse_applicationArn,
    describeApplicationResponse_applicationName,
    describeApplicationResponse_applicationUrl,
    describeApplicationResponse_applicationState,
    describeApplicationResponse_applicationCreationDate,
    describeApplicationResponse_applicationLastUpdateDate,
    describeApplicationResponse_roleArn,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoTFleetHub.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeApplication' smart constructor.
data DescribeApplication = DescribeApplication'
  { -- | The unique Id of the web application.
    DescribeApplication -> Text
applicationId :: Prelude.Text
  }
  deriving (DescribeApplication -> DescribeApplication -> Bool
(DescribeApplication -> DescribeApplication -> Bool)
-> (DescribeApplication -> DescribeApplication -> Bool)
-> Eq DescribeApplication
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeApplication -> DescribeApplication -> Bool
$c/= :: DescribeApplication -> DescribeApplication -> Bool
== :: DescribeApplication -> DescribeApplication -> Bool
$c== :: DescribeApplication -> DescribeApplication -> Bool
Prelude.Eq, ReadPrec [DescribeApplication]
ReadPrec DescribeApplication
Int -> ReadS DescribeApplication
ReadS [DescribeApplication]
(Int -> ReadS DescribeApplication)
-> ReadS [DescribeApplication]
-> ReadPrec DescribeApplication
-> ReadPrec [DescribeApplication]
-> Read DescribeApplication
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeApplication]
$creadListPrec :: ReadPrec [DescribeApplication]
readPrec :: ReadPrec DescribeApplication
$creadPrec :: ReadPrec DescribeApplication
readList :: ReadS [DescribeApplication]
$creadList :: ReadS [DescribeApplication]
readsPrec :: Int -> ReadS DescribeApplication
$creadsPrec :: Int -> ReadS DescribeApplication
Prelude.Read, Int -> DescribeApplication -> ShowS
[DescribeApplication] -> ShowS
DescribeApplication -> String
(Int -> DescribeApplication -> ShowS)
-> (DescribeApplication -> String)
-> ([DescribeApplication] -> ShowS)
-> Show DescribeApplication
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeApplication] -> ShowS
$cshowList :: [DescribeApplication] -> ShowS
show :: DescribeApplication -> String
$cshow :: DescribeApplication -> String
showsPrec :: Int -> DescribeApplication -> ShowS
$cshowsPrec :: Int -> DescribeApplication -> ShowS
Prelude.Show, (forall x. DescribeApplication -> Rep DescribeApplication x)
-> (forall x. Rep DescribeApplication x -> DescribeApplication)
-> Generic DescribeApplication
forall x. Rep DescribeApplication x -> DescribeApplication
forall x. DescribeApplication -> Rep DescribeApplication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeApplication x -> DescribeApplication
$cfrom :: forall x. DescribeApplication -> Rep DescribeApplication x
Prelude.Generic)

-- |
-- Create a value of 'DescribeApplication' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'applicationId', 'describeApplication_applicationId' - The unique Id of the web application.
newDescribeApplication ::
  -- | 'applicationId'
  Prelude.Text ->
  DescribeApplication
newDescribeApplication :: Text -> DescribeApplication
newDescribeApplication Text
pApplicationId_ =
  DescribeApplication' :: Text -> DescribeApplication
DescribeApplication'
    { $sel:applicationId:DescribeApplication' :: Text
applicationId =
        Text
pApplicationId_
    }

-- | The unique Id of the web application.
describeApplication_applicationId :: Lens.Lens' DescribeApplication Prelude.Text
describeApplication_applicationId :: (Text -> f Text) -> DescribeApplication -> f DescribeApplication
describeApplication_applicationId = (DescribeApplication -> Text)
-> (DescribeApplication -> Text -> DescribeApplication)
-> Lens DescribeApplication DescribeApplication Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplication' {Text
applicationId :: Text
$sel:applicationId:DescribeApplication' :: DescribeApplication -> Text
applicationId} -> Text
applicationId) (\s :: DescribeApplication
s@DescribeApplication' {} Text
a -> DescribeApplication
s {$sel:applicationId:DescribeApplication' :: Text
applicationId = Text
a} :: DescribeApplication)

instance Core.AWSRequest DescribeApplication where
  type
    AWSResponse DescribeApplication =
      DescribeApplicationResponse
  request :: DescribeApplication -> Request DescribeApplication
request = Service -> DescribeApplication -> Request DescribeApplication
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeApplication
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeApplication)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeApplication))
-> Logger
-> Service
-> Proxy DescribeApplication
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeApplication)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> Text
-> Text
-> Text
-> ApplicationState
-> Integer
-> Integer
-> Text
-> DescribeApplicationResponse
DescribeApplicationResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> Text
 -> Text
 -> Text
 -> Text
 -> ApplicationState
 -> Integer
 -> Integer
 -> Text
 -> DescribeApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Text
      -> Text
      -> Text
      -> ApplicationState
      -> Integer
      -> Integer
      -> Text
      -> DescribeApplicationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"applicationDescription")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Text
   -> Text
   -> Text
   -> ApplicationState
   -> Integer
   -> Integer
   -> Text
   -> DescribeApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Text
      -> Text
      -> Text
      -> ApplicationState
      -> Integer
      -> Integer
      -> Text
      -> DescribeApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ssoClientId")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Text
   -> Text
   -> Text
   -> ApplicationState
   -> Integer
   -> Integer
   -> Text
   -> DescribeApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Text
      -> Text
      -> Text
      -> ApplicationState
      -> Integer
      -> Integer
      -> Text
      -> DescribeApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"errorMessage")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Text
   -> Text
   -> Text
   -> ApplicationState
   -> Integer
   -> Integer
   -> Text
   -> DescribeApplicationResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Int
      -> Text
      -> Text
      -> Text
      -> Text
      -> ApplicationState
      -> Integer
      -> Integer
      -> Text
      -> DescribeApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Int
   -> Text
   -> Text
   -> Text
   -> Text
   -> ApplicationState
   -> Integer
   -> Integer
   -> Text
   -> DescribeApplicationResponse)
-> Either String Int
-> Either
     String
     (Text
      -> Text
      -> Text
      -> Text
      -> ApplicationState
      -> Integer
      -> Integer
      -> Text
      -> DescribeApplicationResponse)
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))
            Either
  String
  (Text
   -> Text
   -> Text
   -> Text
   -> ApplicationState
   -> Integer
   -> Integer
   -> Text
   -> DescribeApplicationResponse)
-> Either String Text
-> Either
     String
     (Text
      -> Text
      -> Text
      -> ApplicationState
      -> Integer
      -> Integer
      -> Text
      -> DescribeApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"applicationId")
            Either
  String
  (Text
   -> Text
   -> Text
   -> ApplicationState
   -> Integer
   -> Integer
   -> Text
   -> DescribeApplicationResponse)
-> Either String Text
-> Either
     String
     (Text
      -> Text
      -> ApplicationState
      -> Integer
      -> Integer
      -> Text
      -> DescribeApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"applicationArn")
            Either
  String
  (Text
   -> Text
   -> ApplicationState
   -> Integer
   -> Integer
   -> Text
   -> DescribeApplicationResponse)
-> Either String Text
-> Either
     String
     (Text
      -> ApplicationState
      -> Integer
      -> Integer
      -> Text
      -> DescribeApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"applicationName")
            Either
  String
  (Text
   -> ApplicationState
   -> Integer
   -> Integer
   -> Text
   -> DescribeApplicationResponse)
-> Either String Text
-> Either
     String
     (ApplicationState
      -> Integer -> Integer -> Text -> DescribeApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"applicationUrl")
            Either
  String
  (ApplicationState
   -> Integer -> Integer -> Text -> DescribeApplicationResponse)
-> Either String ApplicationState
-> Either
     String (Integer -> Integer -> Text -> DescribeApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String ApplicationState
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"applicationState")
            Either
  String (Integer -> Integer -> Text -> DescribeApplicationResponse)
-> Either String Integer
-> Either String (Integer -> Text -> DescribeApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Integer
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"applicationCreationDate")
            Either String (Integer -> Text -> DescribeApplicationResponse)
-> Either String Integer
-> Either String (Text -> DescribeApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Integer
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"applicationLastUpdateDate")
            Either String (Text -> DescribeApplicationResponse)
-> Either String Text -> Either String DescribeApplicationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"roleArn")
      )

instance Prelude.Hashable DescribeApplication

instance Prelude.NFData DescribeApplication

instance Core.ToHeaders DescribeApplication where
  toHeaders :: DescribeApplication -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeApplication -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath DescribeApplication where
  toPath :: DescribeApplication -> ByteString
toPath DescribeApplication' {Text
applicationId :: Text
$sel:applicationId:DescribeApplication' :: DescribeApplication -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/applications/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
applicationId]

instance Core.ToQuery DescribeApplication where
  toQuery :: DescribeApplication -> QueryString
toQuery = QueryString -> DescribeApplication -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeApplicationResponse' smart constructor.
data DescribeApplicationResponse = DescribeApplicationResponse'
  { -- | An optional description of the web application.
    DescribeApplicationResponse -> Maybe Text
applicationDescription :: Prelude.Maybe Prelude.Text,
    -- | The Id of the single sign-on client that you use to authenticate and
    -- authorize users on the web application.
    DescribeApplicationResponse -> Maybe Text
ssoClientId :: Prelude.Maybe Prelude.Text,
    -- | A message indicating why the @DescribeApplication@ API failed.
    DescribeApplicationResponse -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | A set of key\/value pairs that you can use to manage the web application
    -- resource.
    DescribeApplicationResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeApplicationResponse -> Int
httpStatus :: Prelude.Int,
    -- | The unique Id of the web application.
    DescribeApplicationResponse -> Text
applicationId :: Prelude.Text,
    -- | The ARN of the web application.
    DescribeApplicationResponse -> Text
applicationArn :: Prelude.Text,
    -- | The name of the web application.
    DescribeApplicationResponse -> Text
applicationName :: Prelude.Text,
    -- | The URL of the web application.
    DescribeApplicationResponse -> Text
applicationUrl :: Prelude.Text,
    -- | The current state of the web application.
    DescribeApplicationResponse -> ApplicationState
applicationState :: ApplicationState,
    -- | The date (in Unix epoch time) when the application was created.
    DescribeApplicationResponse -> Integer
applicationCreationDate :: Prelude.Integer,
    -- | The date (in Unix epoch time) when the application was last updated.
    DescribeApplicationResponse -> Integer
applicationLastUpdateDate :: Prelude.Integer,
    -- | The ARN of the role that the web application assumes when it interacts
    -- with AWS IoT Core.
    DescribeApplicationResponse -> Text
roleArn :: Prelude.Text
  }
  deriving (DescribeApplicationResponse -> DescribeApplicationResponse -> Bool
(DescribeApplicationResponse
 -> DescribeApplicationResponse -> Bool)
-> (DescribeApplicationResponse
    -> DescribeApplicationResponse -> Bool)
-> Eq DescribeApplicationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeApplicationResponse -> DescribeApplicationResponse -> Bool
$c/= :: DescribeApplicationResponse -> DescribeApplicationResponse -> Bool
== :: DescribeApplicationResponse -> DescribeApplicationResponse -> Bool
$c== :: DescribeApplicationResponse -> DescribeApplicationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeApplicationResponse]
ReadPrec DescribeApplicationResponse
Int -> ReadS DescribeApplicationResponse
ReadS [DescribeApplicationResponse]
(Int -> ReadS DescribeApplicationResponse)
-> ReadS [DescribeApplicationResponse]
-> ReadPrec DescribeApplicationResponse
-> ReadPrec [DescribeApplicationResponse]
-> Read DescribeApplicationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeApplicationResponse]
$creadListPrec :: ReadPrec [DescribeApplicationResponse]
readPrec :: ReadPrec DescribeApplicationResponse
$creadPrec :: ReadPrec DescribeApplicationResponse
readList :: ReadS [DescribeApplicationResponse]
$creadList :: ReadS [DescribeApplicationResponse]
readsPrec :: Int -> ReadS DescribeApplicationResponse
$creadsPrec :: Int -> ReadS DescribeApplicationResponse
Prelude.Read, Int -> DescribeApplicationResponse -> ShowS
[DescribeApplicationResponse] -> ShowS
DescribeApplicationResponse -> String
(Int -> DescribeApplicationResponse -> ShowS)
-> (DescribeApplicationResponse -> String)
-> ([DescribeApplicationResponse] -> ShowS)
-> Show DescribeApplicationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeApplicationResponse] -> ShowS
$cshowList :: [DescribeApplicationResponse] -> ShowS
show :: DescribeApplicationResponse -> String
$cshow :: DescribeApplicationResponse -> String
showsPrec :: Int -> DescribeApplicationResponse -> ShowS
$cshowsPrec :: Int -> DescribeApplicationResponse -> ShowS
Prelude.Show, (forall x.
 DescribeApplicationResponse -> Rep DescribeApplicationResponse x)
-> (forall x.
    Rep DescribeApplicationResponse x -> DescribeApplicationResponse)
-> Generic DescribeApplicationResponse
forall x.
Rep DescribeApplicationResponse x -> DescribeApplicationResponse
forall x.
DescribeApplicationResponse -> Rep DescribeApplicationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeApplicationResponse x -> DescribeApplicationResponse
$cfrom :: forall x.
DescribeApplicationResponse -> Rep DescribeApplicationResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeApplicationResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'applicationDescription', 'describeApplicationResponse_applicationDescription' - An optional description of the web application.
--
-- 'ssoClientId', 'describeApplicationResponse_ssoClientId' - The Id of the single sign-on client that you use to authenticate and
-- authorize users on the web application.
--
-- 'errorMessage', 'describeApplicationResponse_errorMessage' - A message indicating why the @DescribeApplication@ API failed.
--
-- 'tags', 'describeApplicationResponse_tags' - A set of key\/value pairs that you can use to manage the web application
-- resource.
--
-- 'httpStatus', 'describeApplicationResponse_httpStatus' - The response's http status code.
--
-- 'applicationId', 'describeApplicationResponse_applicationId' - The unique Id of the web application.
--
-- 'applicationArn', 'describeApplicationResponse_applicationArn' - The ARN of the web application.
--
-- 'applicationName', 'describeApplicationResponse_applicationName' - The name of the web application.
--
-- 'applicationUrl', 'describeApplicationResponse_applicationUrl' - The URL of the web application.
--
-- 'applicationState', 'describeApplicationResponse_applicationState' - The current state of the web application.
--
-- 'applicationCreationDate', 'describeApplicationResponse_applicationCreationDate' - The date (in Unix epoch time) when the application was created.
--
-- 'applicationLastUpdateDate', 'describeApplicationResponse_applicationLastUpdateDate' - The date (in Unix epoch time) when the application was last updated.
--
-- 'roleArn', 'describeApplicationResponse_roleArn' - The ARN of the role that the web application assumes when it interacts
-- with AWS IoT Core.
newDescribeApplicationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'applicationId'
  Prelude.Text ->
  -- | 'applicationArn'
  Prelude.Text ->
  -- | 'applicationName'
  Prelude.Text ->
  -- | 'applicationUrl'
  Prelude.Text ->
  -- | 'applicationState'
  ApplicationState ->
  -- | 'applicationCreationDate'
  Prelude.Integer ->
  -- | 'applicationLastUpdateDate'
  Prelude.Integer ->
  -- | 'roleArn'
  Prelude.Text ->
  DescribeApplicationResponse
newDescribeApplicationResponse :: Int
-> Text
-> Text
-> Text
-> Text
-> ApplicationState
-> Integer
-> Integer
-> Text
-> DescribeApplicationResponse
newDescribeApplicationResponse
  Int
pHttpStatus_
  Text
pApplicationId_
  Text
pApplicationArn_
  Text
pApplicationName_
  Text
pApplicationUrl_
  ApplicationState
pApplicationState_
  Integer
pApplicationCreationDate_
  Integer
pApplicationLastUpdateDate_
  Text
pRoleArn_ =
    DescribeApplicationResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> Text
-> Text
-> Text
-> ApplicationState
-> Integer
-> Integer
-> Text
-> DescribeApplicationResponse
DescribeApplicationResponse'
      { $sel:applicationDescription:DescribeApplicationResponse' :: Maybe Text
applicationDescription =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:ssoClientId:DescribeApplicationResponse' :: Maybe Text
ssoClientId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:errorMessage:DescribeApplicationResponse' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:DescribeApplicationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeApplicationResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:applicationId:DescribeApplicationResponse' :: Text
applicationId = Text
pApplicationId_,
        $sel:applicationArn:DescribeApplicationResponse' :: Text
applicationArn = Text
pApplicationArn_,
        $sel:applicationName:DescribeApplicationResponse' :: Text
applicationName = Text
pApplicationName_,
        $sel:applicationUrl:DescribeApplicationResponse' :: Text
applicationUrl = Text
pApplicationUrl_,
        $sel:applicationState:DescribeApplicationResponse' :: ApplicationState
applicationState = ApplicationState
pApplicationState_,
        $sel:applicationCreationDate:DescribeApplicationResponse' :: Integer
applicationCreationDate =
          Integer
pApplicationCreationDate_,
        $sel:applicationLastUpdateDate:DescribeApplicationResponse' :: Integer
applicationLastUpdateDate =
          Integer
pApplicationLastUpdateDate_,
        $sel:roleArn:DescribeApplicationResponse' :: Text
roleArn = Text
pRoleArn_
      }

-- | An optional description of the web application.
describeApplicationResponse_applicationDescription :: Lens.Lens' DescribeApplicationResponse (Prelude.Maybe Prelude.Text)
describeApplicationResponse_applicationDescription :: (Maybe Text -> f (Maybe Text))
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_applicationDescription = (DescribeApplicationResponse -> Maybe Text)
-> (DescribeApplicationResponse
    -> Maybe Text -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse
     DescribeApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {Maybe Text
applicationDescription :: Maybe Text
$sel:applicationDescription:DescribeApplicationResponse' :: DescribeApplicationResponse -> Maybe Text
applicationDescription} -> Maybe Text
applicationDescription) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} Maybe Text
a -> DescribeApplicationResponse
s {$sel:applicationDescription:DescribeApplicationResponse' :: Maybe Text
applicationDescription = Maybe Text
a} :: DescribeApplicationResponse)

-- | The Id of the single sign-on client that you use to authenticate and
-- authorize users on the web application.
describeApplicationResponse_ssoClientId :: Lens.Lens' DescribeApplicationResponse (Prelude.Maybe Prelude.Text)
describeApplicationResponse_ssoClientId :: (Maybe Text -> f (Maybe Text))
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_ssoClientId = (DescribeApplicationResponse -> Maybe Text)
-> (DescribeApplicationResponse
    -> Maybe Text -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse
     DescribeApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {Maybe Text
ssoClientId :: Maybe Text
$sel:ssoClientId:DescribeApplicationResponse' :: DescribeApplicationResponse -> Maybe Text
ssoClientId} -> Maybe Text
ssoClientId) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} Maybe Text
a -> DescribeApplicationResponse
s {$sel:ssoClientId:DescribeApplicationResponse' :: Maybe Text
ssoClientId = Maybe Text
a} :: DescribeApplicationResponse)

-- | A message indicating why the @DescribeApplication@ API failed.
describeApplicationResponse_errorMessage :: Lens.Lens' DescribeApplicationResponse (Prelude.Maybe Prelude.Text)
describeApplicationResponse_errorMessage :: (Maybe Text -> f (Maybe Text))
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_errorMessage = (DescribeApplicationResponse -> Maybe Text)
-> (DescribeApplicationResponse
    -> Maybe Text -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse
     DescribeApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:DescribeApplicationResponse' :: DescribeApplicationResponse -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} Maybe Text
a -> DescribeApplicationResponse
s {$sel:errorMessage:DescribeApplicationResponse' :: Maybe Text
errorMessage = Maybe Text
a} :: DescribeApplicationResponse)

-- | A set of key\/value pairs that you can use to manage the web application
-- resource.
describeApplicationResponse_tags :: Lens.Lens' DescribeApplicationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeApplicationResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_tags = (DescribeApplicationResponse -> Maybe (HashMap Text Text))
-> (DescribeApplicationResponse
    -> Maybe (HashMap Text Text) -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse
     DescribeApplicationResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeApplicationResponse' :: DescribeApplicationResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} Maybe (HashMap Text Text)
a -> DescribeApplicationResponse
s {$sel:tags:DescribeApplicationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeApplicationResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeApplicationResponse -> f DescribeApplicationResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeApplicationResponse
-> f DescribeApplicationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The unique Id of the web application.
describeApplicationResponse_applicationId :: Lens.Lens' DescribeApplicationResponse Prelude.Text
describeApplicationResponse_applicationId :: (Text -> f Text)
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_applicationId = (DescribeApplicationResponse -> Text)
-> (DescribeApplicationResponse
    -> Text -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse DescribeApplicationResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {Text
applicationId :: Text
$sel:applicationId:DescribeApplicationResponse' :: DescribeApplicationResponse -> Text
applicationId} -> Text
applicationId) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} Text
a -> DescribeApplicationResponse
s {$sel:applicationId:DescribeApplicationResponse' :: Text
applicationId = Text
a} :: DescribeApplicationResponse)

-- | The ARN of the web application.
describeApplicationResponse_applicationArn :: Lens.Lens' DescribeApplicationResponse Prelude.Text
describeApplicationResponse_applicationArn :: (Text -> f Text)
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_applicationArn = (DescribeApplicationResponse -> Text)
-> (DescribeApplicationResponse
    -> Text -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse DescribeApplicationResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {Text
applicationArn :: Text
$sel:applicationArn:DescribeApplicationResponse' :: DescribeApplicationResponse -> Text
applicationArn} -> Text
applicationArn) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} Text
a -> DescribeApplicationResponse
s {$sel:applicationArn:DescribeApplicationResponse' :: Text
applicationArn = Text
a} :: DescribeApplicationResponse)

-- | The name of the web application.
describeApplicationResponse_applicationName :: Lens.Lens' DescribeApplicationResponse Prelude.Text
describeApplicationResponse_applicationName :: (Text -> f Text)
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_applicationName = (DescribeApplicationResponse -> Text)
-> (DescribeApplicationResponse
    -> Text -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse DescribeApplicationResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {Text
applicationName :: Text
$sel:applicationName:DescribeApplicationResponse' :: DescribeApplicationResponse -> Text
applicationName} -> Text
applicationName) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} Text
a -> DescribeApplicationResponse
s {$sel:applicationName:DescribeApplicationResponse' :: Text
applicationName = Text
a} :: DescribeApplicationResponse)

-- | The URL of the web application.
describeApplicationResponse_applicationUrl :: Lens.Lens' DescribeApplicationResponse Prelude.Text
describeApplicationResponse_applicationUrl :: (Text -> f Text)
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_applicationUrl = (DescribeApplicationResponse -> Text)
-> (DescribeApplicationResponse
    -> Text -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse DescribeApplicationResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {Text
applicationUrl :: Text
$sel:applicationUrl:DescribeApplicationResponse' :: DescribeApplicationResponse -> Text
applicationUrl} -> Text
applicationUrl) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} Text
a -> DescribeApplicationResponse
s {$sel:applicationUrl:DescribeApplicationResponse' :: Text
applicationUrl = Text
a} :: DescribeApplicationResponse)

-- | The current state of the web application.
describeApplicationResponse_applicationState :: Lens.Lens' DescribeApplicationResponse ApplicationState
describeApplicationResponse_applicationState :: (ApplicationState -> f ApplicationState)
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_applicationState = (DescribeApplicationResponse -> ApplicationState)
-> (DescribeApplicationResponse
    -> ApplicationState -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse
     DescribeApplicationResponse
     ApplicationState
     ApplicationState
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {ApplicationState
applicationState :: ApplicationState
$sel:applicationState:DescribeApplicationResponse' :: DescribeApplicationResponse -> ApplicationState
applicationState} -> ApplicationState
applicationState) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} ApplicationState
a -> DescribeApplicationResponse
s {$sel:applicationState:DescribeApplicationResponse' :: ApplicationState
applicationState = ApplicationState
a} :: DescribeApplicationResponse)

-- | The date (in Unix epoch time) when the application was created.
describeApplicationResponse_applicationCreationDate :: Lens.Lens' DescribeApplicationResponse Prelude.Integer
describeApplicationResponse_applicationCreationDate :: (Integer -> f Integer)
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_applicationCreationDate = (DescribeApplicationResponse -> Integer)
-> (DescribeApplicationResponse
    -> Integer -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse
     DescribeApplicationResponse
     Integer
     Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {Integer
applicationCreationDate :: Integer
$sel:applicationCreationDate:DescribeApplicationResponse' :: DescribeApplicationResponse -> Integer
applicationCreationDate} -> Integer
applicationCreationDate) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} Integer
a -> DescribeApplicationResponse
s {$sel:applicationCreationDate:DescribeApplicationResponse' :: Integer
applicationCreationDate = Integer
a} :: DescribeApplicationResponse)

-- | The date (in Unix epoch time) when the application was last updated.
describeApplicationResponse_applicationLastUpdateDate :: Lens.Lens' DescribeApplicationResponse Prelude.Integer
describeApplicationResponse_applicationLastUpdateDate :: (Integer -> f Integer)
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_applicationLastUpdateDate = (DescribeApplicationResponse -> Integer)
-> (DescribeApplicationResponse
    -> Integer -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse
     DescribeApplicationResponse
     Integer
     Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {Integer
applicationLastUpdateDate :: Integer
$sel:applicationLastUpdateDate:DescribeApplicationResponse' :: DescribeApplicationResponse -> Integer
applicationLastUpdateDate} -> Integer
applicationLastUpdateDate) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} Integer
a -> DescribeApplicationResponse
s {$sel:applicationLastUpdateDate:DescribeApplicationResponse' :: Integer
applicationLastUpdateDate = Integer
a} :: DescribeApplicationResponse)

-- | The ARN of the role that the web application assumes when it interacts
-- with AWS IoT Core.
describeApplicationResponse_roleArn :: Lens.Lens' DescribeApplicationResponse Prelude.Text
describeApplicationResponse_roleArn :: (Text -> f Text)
-> DescribeApplicationResponse -> f DescribeApplicationResponse
describeApplicationResponse_roleArn = (DescribeApplicationResponse -> Text)
-> (DescribeApplicationResponse
    -> Text -> DescribeApplicationResponse)
-> Lens
     DescribeApplicationResponse DescribeApplicationResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicationResponse' {Text
roleArn :: Text
$sel:roleArn:DescribeApplicationResponse' :: DescribeApplicationResponse -> Text
roleArn} -> Text
roleArn) (\s :: DescribeApplicationResponse
s@DescribeApplicationResponse' {} Text
a -> DescribeApplicationResponse
s {$sel:roleArn:DescribeApplicationResponse' :: Text
roleArn = Text
a} :: DescribeApplicationResponse)

instance Prelude.NFData DescribeApplicationResponse