{-# 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.IoT.DescribeDomainConfiguration
-- 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 summary information about a domain configuration.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions DescribeDomainConfiguration>
-- action.
module Amazonka.IoT.DescribeDomainConfiguration
  ( -- * Creating a Request
    DescribeDomainConfiguration (..),
    newDescribeDomainConfiguration,

    -- * Request Lenses
    describeDomainConfiguration_domainConfigurationName,

    -- * Destructuring the Response
    DescribeDomainConfigurationResponse (..),
    newDescribeDomainConfigurationResponse,

    -- * Response Lenses
    describeDomainConfigurationResponse_domainConfigurationName,
    describeDomainConfigurationResponse_serverCertificates,
    describeDomainConfigurationResponse_authorizerConfig,
    describeDomainConfigurationResponse_lastStatusChangeDate,
    describeDomainConfigurationResponse_domainConfigurationStatus,
    describeDomainConfigurationResponse_domainName,
    describeDomainConfigurationResponse_domainConfigurationArn,
    describeDomainConfigurationResponse_serviceType,
    describeDomainConfigurationResponse_domainType,
    describeDomainConfigurationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.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:/ 'newDescribeDomainConfiguration' smart constructor.
data DescribeDomainConfiguration = DescribeDomainConfiguration'
  { -- | The name of the domain configuration.
    DescribeDomainConfiguration -> Text
domainConfigurationName :: Prelude.Text
  }
  deriving (DescribeDomainConfiguration -> DescribeDomainConfiguration -> Bool
(DescribeDomainConfiguration
 -> DescribeDomainConfiguration -> Bool)
-> (DescribeDomainConfiguration
    -> DescribeDomainConfiguration -> Bool)
-> Eq DescribeDomainConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDomainConfiguration -> DescribeDomainConfiguration -> Bool
$c/= :: DescribeDomainConfiguration -> DescribeDomainConfiguration -> Bool
== :: DescribeDomainConfiguration -> DescribeDomainConfiguration -> Bool
$c== :: DescribeDomainConfiguration -> DescribeDomainConfiguration -> Bool
Prelude.Eq, ReadPrec [DescribeDomainConfiguration]
ReadPrec DescribeDomainConfiguration
Int -> ReadS DescribeDomainConfiguration
ReadS [DescribeDomainConfiguration]
(Int -> ReadS DescribeDomainConfiguration)
-> ReadS [DescribeDomainConfiguration]
-> ReadPrec DescribeDomainConfiguration
-> ReadPrec [DescribeDomainConfiguration]
-> Read DescribeDomainConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDomainConfiguration]
$creadListPrec :: ReadPrec [DescribeDomainConfiguration]
readPrec :: ReadPrec DescribeDomainConfiguration
$creadPrec :: ReadPrec DescribeDomainConfiguration
readList :: ReadS [DescribeDomainConfiguration]
$creadList :: ReadS [DescribeDomainConfiguration]
readsPrec :: Int -> ReadS DescribeDomainConfiguration
$creadsPrec :: Int -> ReadS DescribeDomainConfiguration
Prelude.Read, Int -> DescribeDomainConfiguration -> ShowS
[DescribeDomainConfiguration] -> ShowS
DescribeDomainConfiguration -> String
(Int -> DescribeDomainConfiguration -> ShowS)
-> (DescribeDomainConfiguration -> String)
-> ([DescribeDomainConfiguration] -> ShowS)
-> Show DescribeDomainConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDomainConfiguration] -> ShowS
$cshowList :: [DescribeDomainConfiguration] -> ShowS
show :: DescribeDomainConfiguration -> String
$cshow :: DescribeDomainConfiguration -> String
showsPrec :: Int -> DescribeDomainConfiguration -> ShowS
$cshowsPrec :: Int -> DescribeDomainConfiguration -> ShowS
Prelude.Show, (forall x.
 DescribeDomainConfiguration -> Rep DescribeDomainConfiguration x)
-> (forall x.
    Rep DescribeDomainConfiguration x -> DescribeDomainConfiguration)
-> Generic DescribeDomainConfiguration
forall x.
Rep DescribeDomainConfiguration x -> DescribeDomainConfiguration
forall x.
DescribeDomainConfiguration -> Rep DescribeDomainConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDomainConfiguration x -> DescribeDomainConfiguration
$cfrom :: forall x.
DescribeDomainConfiguration -> Rep DescribeDomainConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDomainConfiguration' 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:
--
-- 'domainConfigurationName', 'describeDomainConfiguration_domainConfigurationName' - The name of the domain configuration.
newDescribeDomainConfiguration ::
  -- | 'domainConfigurationName'
  Prelude.Text ->
  DescribeDomainConfiguration
newDescribeDomainConfiguration :: Text -> DescribeDomainConfiguration
newDescribeDomainConfiguration
  Text
pDomainConfigurationName_ =
    DescribeDomainConfiguration' :: Text -> DescribeDomainConfiguration
DescribeDomainConfiguration'
      { $sel:domainConfigurationName:DescribeDomainConfiguration' :: Text
domainConfigurationName =
          Text
pDomainConfigurationName_
      }

-- | The name of the domain configuration.
describeDomainConfiguration_domainConfigurationName :: Lens.Lens' DescribeDomainConfiguration Prelude.Text
describeDomainConfiguration_domainConfigurationName :: (Text -> f Text)
-> DescribeDomainConfiguration -> f DescribeDomainConfiguration
describeDomainConfiguration_domainConfigurationName = (DescribeDomainConfiguration -> Text)
-> (DescribeDomainConfiguration
    -> Text -> DescribeDomainConfiguration)
-> Lens
     DescribeDomainConfiguration DescribeDomainConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainConfiguration' {Text
domainConfigurationName :: Text
$sel:domainConfigurationName:DescribeDomainConfiguration' :: DescribeDomainConfiguration -> Text
domainConfigurationName} -> Text
domainConfigurationName) (\s :: DescribeDomainConfiguration
s@DescribeDomainConfiguration' {} Text
a -> DescribeDomainConfiguration
s {$sel:domainConfigurationName:DescribeDomainConfiguration' :: Text
domainConfigurationName = Text
a} :: DescribeDomainConfiguration)

instance Core.AWSRequest DescribeDomainConfiguration where
  type
    AWSResponse DescribeDomainConfiguration =
      DescribeDomainConfigurationResponse
  request :: DescribeDomainConfiguration -> Request DescribeDomainConfiguration
request = Service
-> DescribeDomainConfiguration
-> Request DescribeDomainConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDomainConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDomainConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeDomainConfiguration))
-> Logger
-> Service
-> Proxy DescribeDomainConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDomainConfiguration)))
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 [ServerCertificateSummary]
-> Maybe AuthorizerConfig
-> Maybe POSIX
-> Maybe DomainConfigurationStatus
-> Maybe Text
-> Maybe Text
-> Maybe ServiceType
-> Maybe DomainType
-> Int
-> DescribeDomainConfigurationResponse
DescribeDomainConfigurationResponse'
            (Maybe Text
 -> Maybe [ServerCertificateSummary]
 -> Maybe AuthorizerConfig
 -> Maybe POSIX
 -> Maybe DomainConfigurationStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe ServiceType
 -> Maybe DomainType
 -> Int
 -> DescribeDomainConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ServerCertificateSummary]
      -> Maybe AuthorizerConfig
      -> Maybe POSIX
      -> Maybe DomainConfigurationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ServiceType
      -> Maybe DomainType
      -> Int
      -> DescribeDomainConfigurationResponse)
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
"domainConfigurationName")
            Either
  String
  (Maybe [ServerCertificateSummary]
   -> Maybe AuthorizerConfig
   -> Maybe POSIX
   -> Maybe DomainConfigurationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ServiceType
   -> Maybe DomainType
   -> Int
   -> DescribeDomainConfigurationResponse)
-> Either String (Maybe [ServerCertificateSummary])
-> Either
     String
     (Maybe AuthorizerConfig
      -> Maybe POSIX
      -> Maybe DomainConfigurationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ServiceType
      -> Maybe DomainType
      -> Int
      -> DescribeDomainConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [ServerCertificateSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"serverCertificates"
                            Either String (Maybe (Maybe [ServerCertificateSummary]))
-> Maybe [ServerCertificateSummary]
-> Either String (Maybe [ServerCertificateSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ServerCertificateSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe AuthorizerConfig
   -> Maybe POSIX
   -> Maybe DomainConfigurationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ServiceType
   -> Maybe DomainType
   -> Int
   -> DescribeDomainConfigurationResponse)
-> Either String (Maybe AuthorizerConfig)
-> Either
     String
     (Maybe POSIX
      -> Maybe DomainConfigurationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ServiceType
      -> Maybe DomainType
      -> Int
      -> DescribeDomainConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe AuthorizerConfig)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"authorizerConfig")
            Either
  String
  (Maybe POSIX
   -> Maybe DomainConfigurationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ServiceType
   -> Maybe DomainType
   -> Int
   -> DescribeDomainConfigurationResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe DomainConfigurationStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ServiceType
      -> Maybe DomainType
      -> Int
      -> DescribeDomainConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastStatusChangeDate")
            Either
  String
  (Maybe DomainConfigurationStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ServiceType
   -> Maybe DomainType
   -> Int
   -> DescribeDomainConfigurationResponse)
-> Either String (Maybe DomainConfigurationStatus)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ServiceType
      -> Maybe DomainType
      -> Int
      -> DescribeDomainConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DomainConfigurationStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"domainConfigurationStatus")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ServiceType
   -> Maybe DomainType
   -> Int
   -> DescribeDomainConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ServiceType
      -> Maybe DomainType
      -> Int
      -> DescribeDomainConfigurationResponse)
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
"domainName")
            Either
  String
  (Maybe Text
   -> Maybe ServiceType
   -> Maybe DomainType
   -> Int
   -> DescribeDomainConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ServiceType
      -> Maybe DomainType -> Int -> DescribeDomainConfigurationResponse)
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
"domainConfigurationArn")
            Either
  String
  (Maybe ServiceType
   -> Maybe DomainType -> Int -> DescribeDomainConfigurationResponse)
-> Either String (Maybe ServiceType)
-> Either
     String
     (Maybe DomainType -> Int -> DescribeDomainConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ServiceType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"serviceType")
            Either
  String
  (Maybe DomainType -> Int -> DescribeDomainConfigurationResponse)
-> Either String (Maybe DomainType)
-> Either String (Int -> DescribeDomainConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DomainType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"domainType")
            Either String (Int -> DescribeDomainConfigurationResponse)
-> Either String Int
-> Either String DescribeDomainConfigurationResponse
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 DescribeDomainConfiguration

instance Prelude.NFData DescribeDomainConfiguration

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

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

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

-- | /See:/ 'newDescribeDomainConfigurationResponse' smart constructor.
data DescribeDomainConfigurationResponse = DescribeDomainConfigurationResponse'
  { -- | The name of the domain configuration.
    DescribeDomainConfigurationResponse -> Maybe Text
domainConfigurationName :: Prelude.Maybe Prelude.Text,
    -- | A list containing summary information about the server certificate
    -- included in the domain configuration.
    DescribeDomainConfigurationResponse
-> Maybe [ServerCertificateSummary]
serverCertificates :: Prelude.Maybe [ServerCertificateSummary],
    -- | An object that specifies the authorization service for a domain.
    DescribeDomainConfigurationResponse -> Maybe AuthorizerConfig
authorizerConfig :: Prelude.Maybe AuthorizerConfig,
    -- | The date and time the domain configuration\'s status was last changed.
    DescribeDomainConfigurationResponse -> Maybe POSIX
lastStatusChangeDate :: Prelude.Maybe Core.POSIX,
    -- | A Boolean value that specifies the current state of the domain
    -- configuration.
    DescribeDomainConfigurationResponse
-> Maybe DomainConfigurationStatus
domainConfigurationStatus :: Prelude.Maybe DomainConfigurationStatus,
    -- | The name of the domain.
    DescribeDomainConfigurationResponse -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the domain configuration.
    DescribeDomainConfigurationResponse -> Maybe Text
domainConfigurationArn :: Prelude.Maybe Prelude.Text,
    -- | The type of service delivered by the endpoint.
    DescribeDomainConfigurationResponse -> Maybe ServiceType
serviceType :: Prelude.Maybe ServiceType,
    -- | The type of the domain.
    DescribeDomainConfigurationResponse -> Maybe DomainType
domainType :: Prelude.Maybe DomainType,
    -- | The response's http status code.
    DescribeDomainConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDomainConfigurationResponse
-> DescribeDomainConfigurationResponse -> Bool
(DescribeDomainConfigurationResponse
 -> DescribeDomainConfigurationResponse -> Bool)
-> (DescribeDomainConfigurationResponse
    -> DescribeDomainConfigurationResponse -> Bool)
-> Eq DescribeDomainConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDomainConfigurationResponse
-> DescribeDomainConfigurationResponse -> Bool
$c/= :: DescribeDomainConfigurationResponse
-> DescribeDomainConfigurationResponse -> Bool
== :: DescribeDomainConfigurationResponse
-> DescribeDomainConfigurationResponse -> Bool
$c== :: DescribeDomainConfigurationResponse
-> DescribeDomainConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDomainConfigurationResponse]
ReadPrec DescribeDomainConfigurationResponse
Int -> ReadS DescribeDomainConfigurationResponse
ReadS [DescribeDomainConfigurationResponse]
(Int -> ReadS DescribeDomainConfigurationResponse)
-> ReadS [DescribeDomainConfigurationResponse]
-> ReadPrec DescribeDomainConfigurationResponse
-> ReadPrec [DescribeDomainConfigurationResponse]
-> Read DescribeDomainConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDomainConfigurationResponse]
$creadListPrec :: ReadPrec [DescribeDomainConfigurationResponse]
readPrec :: ReadPrec DescribeDomainConfigurationResponse
$creadPrec :: ReadPrec DescribeDomainConfigurationResponse
readList :: ReadS [DescribeDomainConfigurationResponse]
$creadList :: ReadS [DescribeDomainConfigurationResponse]
readsPrec :: Int -> ReadS DescribeDomainConfigurationResponse
$creadsPrec :: Int -> ReadS DescribeDomainConfigurationResponse
Prelude.Read, Int -> DescribeDomainConfigurationResponse -> ShowS
[DescribeDomainConfigurationResponse] -> ShowS
DescribeDomainConfigurationResponse -> String
(Int -> DescribeDomainConfigurationResponse -> ShowS)
-> (DescribeDomainConfigurationResponse -> String)
-> ([DescribeDomainConfigurationResponse] -> ShowS)
-> Show DescribeDomainConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDomainConfigurationResponse] -> ShowS
$cshowList :: [DescribeDomainConfigurationResponse] -> ShowS
show :: DescribeDomainConfigurationResponse -> String
$cshow :: DescribeDomainConfigurationResponse -> String
showsPrec :: Int -> DescribeDomainConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DescribeDomainConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDomainConfigurationResponse
 -> Rep DescribeDomainConfigurationResponse x)
-> (forall x.
    Rep DescribeDomainConfigurationResponse x
    -> DescribeDomainConfigurationResponse)
-> Generic DescribeDomainConfigurationResponse
forall x.
Rep DescribeDomainConfigurationResponse x
-> DescribeDomainConfigurationResponse
forall x.
DescribeDomainConfigurationResponse
-> Rep DescribeDomainConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDomainConfigurationResponse x
-> DescribeDomainConfigurationResponse
$cfrom :: forall x.
DescribeDomainConfigurationResponse
-> Rep DescribeDomainConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDomainConfigurationResponse' 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:
--
-- 'domainConfigurationName', 'describeDomainConfigurationResponse_domainConfigurationName' - The name of the domain configuration.
--
-- 'serverCertificates', 'describeDomainConfigurationResponse_serverCertificates' - A list containing summary information about the server certificate
-- included in the domain configuration.
--
-- 'authorizerConfig', 'describeDomainConfigurationResponse_authorizerConfig' - An object that specifies the authorization service for a domain.
--
-- 'lastStatusChangeDate', 'describeDomainConfigurationResponse_lastStatusChangeDate' - The date and time the domain configuration\'s status was last changed.
--
-- 'domainConfigurationStatus', 'describeDomainConfigurationResponse_domainConfigurationStatus' - A Boolean value that specifies the current state of the domain
-- configuration.
--
-- 'domainName', 'describeDomainConfigurationResponse_domainName' - The name of the domain.
--
-- 'domainConfigurationArn', 'describeDomainConfigurationResponse_domainConfigurationArn' - The ARN of the domain configuration.
--
-- 'serviceType', 'describeDomainConfigurationResponse_serviceType' - The type of service delivered by the endpoint.
--
-- 'domainType', 'describeDomainConfigurationResponse_domainType' - The type of the domain.
--
-- 'httpStatus', 'describeDomainConfigurationResponse_httpStatus' - The response's http status code.
newDescribeDomainConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDomainConfigurationResponse
newDescribeDomainConfigurationResponse :: Int -> DescribeDomainConfigurationResponse
newDescribeDomainConfigurationResponse Int
pHttpStatus_ =
  DescribeDomainConfigurationResponse' :: Maybe Text
-> Maybe [ServerCertificateSummary]
-> Maybe AuthorizerConfig
-> Maybe POSIX
-> Maybe DomainConfigurationStatus
-> Maybe Text
-> Maybe Text
-> Maybe ServiceType
-> Maybe DomainType
-> Int
-> DescribeDomainConfigurationResponse
DescribeDomainConfigurationResponse'
    { $sel:domainConfigurationName:DescribeDomainConfigurationResponse' :: Maybe Text
domainConfigurationName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serverCertificates:DescribeDomainConfigurationResponse' :: Maybe [ServerCertificateSummary]
serverCertificates = Maybe [ServerCertificateSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:authorizerConfig:DescribeDomainConfigurationResponse' :: Maybe AuthorizerConfig
authorizerConfig = Maybe AuthorizerConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:lastStatusChangeDate:DescribeDomainConfigurationResponse' :: Maybe POSIX
lastStatusChangeDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:domainConfigurationStatus:DescribeDomainConfigurationResponse' :: Maybe DomainConfigurationStatus
domainConfigurationStatus =
        Maybe DomainConfigurationStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:DescribeDomainConfigurationResponse' :: Maybe Text
domainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domainConfigurationArn:DescribeDomainConfigurationResponse' :: Maybe Text
domainConfigurationArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceType:DescribeDomainConfigurationResponse' :: Maybe ServiceType
serviceType = Maybe ServiceType
forall a. Maybe a
Prelude.Nothing,
      $sel:domainType:DescribeDomainConfigurationResponse' :: Maybe DomainType
domainType = Maybe DomainType
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDomainConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the domain configuration.
describeDomainConfigurationResponse_domainConfigurationName :: Lens.Lens' DescribeDomainConfigurationResponse (Prelude.Maybe Prelude.Text)
describeDomainConfigurationResponse_domainConfigurationName :: (Maybe Text -> f (Maybe Text))
-> DescribeDomainConfigurationResponse
-> f DescribeDomainConfigurationResponse
describeDomainConfigurationResponse_domainConfigurationName = (DescribeDomainConfigurationResponse -> Maybe Text)
-> (DescribeDomainConfigurationResponse
    -> Maybe Text -> DescribeDomainConfigurationResponse)
-> Lens
     DescribeDomainConfigurationResponse
     DescribeDomainConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainConfigurationResponse' {Maybe Text
domainConfigurationName :: Maybe Text
$sel:domainConfigurationName:DescribeDomainConfigurationResponse' :: DescribeDomainConfigurationResponse -> Maybe Text
domainConfigurationName} -> Maybe Text
domainConfigurationName) (\s :: DescribeDomainConfigurationResponse
s@DescribeDomainConfigurationResponse' {} Maybe Text
a -> DescribeDomainConfigurationResponse
s {$sel:domainConfigurationName:DescribeDomainConfigurationResponse' :: Maybe Text
domainConfigurationName = Maybe Text
a} :: DescribeDomainConfigurationResponse)

-- | A list containing summary information about the server certificate
-- included in the domain configuration.
describeDomainConfigurationResponse_serverCertificates :: Lens.Lens' DescribeDomainConfigurationResponse (Prelude.Maybe [ServerCertificateSummary])
describeDomainConfigurationResponse_serverCertificates :: (Maybe [ServerCertificateSummary]
 -> f (Maybe [ServerCertificateSummary]))
-> DescribeDomainConfigurationResponse
-> f DescribeDomainConfigurationResponse
describeDomainConfigurationResponse_serverCertificates = (DescribeDomainConfigurationResponse
 -> Maybe [ServerCertificateSummary])
-> (DescribeDomainConfigurationResponse
    -> Maybe [ServerCertificateSummary]
    -> DescribeDomainConfigurationResponse)
-> Lens
     DescribeDomainConfigurationResponse
     DescribeDomainConfigurationResponse
     (Maybe [ServerCertificateSummary])
     (Maybe [ServerCertificateSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainConfigurationResponse' {Maybe [ServerCertificateSummary]
serverCertificates :: Maybe [ServerCertificateSummary]
$sel:serverCertificates:DescribeDomainConfigurationResponse' :: DescribeDomainConfigurationResponse
-> Maybe [ServerCertificateSummary]
serverCertificates} -> Maybe [ServerCertificateSummary]
serverCertificates) (\s :: DescribeDomainConfigurationResponse
s@DescribeDomainConfigurationResponse' {} Maybe [ServerCertificateSummary]
a -> DescribeDomainConfigurationResponse
s {$sel:serverCertificates:DescribeDomainConfigurationResponse' :: Maybe [ServerCertificateSummary]
serverCertificates = Maybe [ServerCertificateSummary]
a} :: DescribeDomainConfigurationResponse) ((Maybe [ServerCertificateSummary]
  -> f (Maybe [ServerCertificateSummary]))
 -> DescribeDomainConfigurationResponse
 -> f DescribeDomainConfigurationResponse)
-> ((Maybe [ServerCertificateSummary]
     -> f (Maybe [ServerCertificateSummary]))
    -> Maybe [ServerCertificateSummary]
    -> f (Maybe [ServerCertificateSummary]))
-> (Maybe [ServerCertificateSummary]
    -> f (Maybe [ServerCertificateSummary]))
-> DescribeDomainConfigurationResponse
-> f DescribeDomainConfigurationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ServerCertificateSummary]
  [ServerCertificateSummary]
  [ServerCertificateSummary]
  [ServerCertificateSummary]
-> Iso
     (Maybe [ServerCertificateSummary])
     (Maybe [ServerCertificateSummary])
     (Maybe [ServerCertificateSummary])
     (Maybe [ServerCertificateSummary])
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
  [ServerCertificateSummary]
  [ServerCertificateSummary]
  [ServerCertificateSummary]
  [ServerCertificateSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An object that specifies the authorization service for a domain.
describeDomainConfigurationResponse_authorizerConfig :: Lens.Lens' DescribeDomainConfigurationResponse (Prelude.Maybe AuthorizerConfig)
describeDomainConfigurationResponse_authorizerConfig :: (Maybe AuthorizerConfig -> f (Maybe AuthorizerConfig))
-> DescribeDomainConfigurationResponse
-> f DescribeDomainConfigurationResponse
describeDomainConfigurationResponse_authorizerConfig = (DescribeDomainConfigurationResponse -> Maybe AuthorizerConfig)
-> (DescribeDomainConfigurationResponse
    -> Maybe AuthorizerConfig -> DescribeDomainConfigurationResponse)
-> Lens
     DescribeDomainConfigurationResponse
     DescribeDomainConfigurationResponse
     (Maybe AuthorizerConfig)
     (Maybe AuthorizerConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainConfigurationResponse' {Maybe AuthorizerConfig
authorizerConfig :: Maybe AuthorizerConfig
$sel:authorizerConfig:DescribeDomainConfigurationResponse' :: DescribeDomainConfigurationResponse -> Maybe AuthorizerConfig
authorizerConfig} -> Maybe AuthorizerConfig
authorizerConfig) (\s :: DescribeDomainConfigurationResponse
s@DescribeDomainConfigurationResponse' {} Maybe AuthorizerConfig
a -> DescribeDomainConfigurationResponse
s {$sel:authorizerConfig:DescribeDomainConfigurationResponse' :: Maybe AuthorizerConfig
authorizerConfig = Maybe AuthorizerConfig
a} :: DescribeDomainConfigurationResponse)

-- | The date and time the domain configuration\'s status was last changed.
describeDomainConfigurationResponse_lastStatusChangeDate :: Lens.Lens' DescribeDomainConfigurationResponse (Prelude.Maybe Prelude.UTCTime)
describeDomainConfigurationResponse_lastStatusChangeDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDomainConfigurationResponse
-> f DescribeDomainConfigurationResponse
describeDomainConfigurationResponse_lastStatusChangeDate = (DescribeDomainConfigurationResponse -> Maybe POSIX)
-> (DescribeDomainConfigurationResponse
    -> Maybe POSIX -> DescribeDomainConfigurationResponse)
-> Lens
     DescribeDomainConfigurationResponse
     DescribeDomainConfigurationResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainConfigurationResponse' {Maybe POSIX
lastStatusChangeDate :: Maybe POSIX
$sel:lastStatusChangeDate:DescribeDomainConfigurationResponse' :: DescribeDomainConfigurationResponse -> Maybe POSIX
lastStatusChangeDate} -> Maybe POSIX
lastStatusChangeDate) (\s :: DescribeDomainConfigurationResponse
s@DescribeDomainConfigurationResponse' {} Maybe POSIX
a -> DescribeDomainConfigurationResponse
s {$sel:lastStatusChangeDate:DescribeDomainConfigurationResponse' :: Maybe POSIX
lastStatusChangeDate = Maybe POSIX
a} :: DescribeDomainConfigurationResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDomainConfigurationResponse
 -> f DescribeDomainConfigurationResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDomainConfigurationResponse
-> f DescribeDomainConfigurationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A Boolean value that specifies the current state of the domain
-- configuration.
describeDomainConfigurationResponse_domainConfigurationStatus :: Lens.Lens' DescribeDomainConfigurationResponse (Prelude.Maybe DomainConfigurationStatus)
describeDomainConfigurationResponse_domainConfigurationStatus :: (Maybe DomainConfigurationStatus
 -> f (Maybe DomainConfigurationStatus))
-> DescribeDomainConfigurationResponse
-> f DescribeDomainConfigurationResponse
describeDomainConfigurationResponse_domainConfigurationStatus = (DescribeDomainConfigurationResponse
 -> Maybe DomainConfigurationStatus)
-> (DescribeDomainConfigurationResponse
    -> Maybe DomainConfigurationStatus
    -> DescribeDomainConfigurationResponse)
-> Lens
     DescribeDomainConfigurationResponse
     DescribeDomainConfigurationResponse
     (Maybe DomainConfigurationStatus)
     (Maybe DomainConfigurationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainConfigurationResponse' {Maybe DomainConfigurationStatus
domainConfigurationStatus :: Maybe DomainConfigurationStatus
$sel:domainConfigurationStatus:DescribeDomainConfigurationResponse' :: DescribeDomainConfigurationResponse
-> Maybe DomainConfigurationStatus
domainConfigurationStatus} -> Maybe DomainConfigurationStatus
domainConfigurationStatus) (\s :: DescribeDomainConfigurationResponse
s@DescribeDomainConfigurationResponse' {} Maybe DomainConfigurationStatus
a -> DescribeDomainConfigurationResponse
s {$sel:domainConfigurationStatus:DescribeDomainConfigurationResponse' :: Maybe DomainConfigurationStatus
domainConfigurationStatus = Maybe DomainConfigurationStatus
a} :: DescribeDomainConfigurationResponse)

-- | The name of the domain.
describeDomainConfigurationResponse_domainName :: Lens.Lens' DescribeDomainConfigurationResponse (Prelude.Maybe Prelude.Text)
describeDomainConfigurationResponse_domainName :: (Maybe Text -> f (Maybe Text))
-> DescribeDomainConfigurationResponse
-> f DescribeDomainConfigurationResponse
describeDomainConfigurationResponse_domainName = (DescribeDomainConfigurationResponse -> Maybe Text)
-> (DescribeDomainConfigurationResponse
    -> Maybe Text -> DescribeDomainConfigurationResponse)
-> Lens
     DescribeDomainConfigurationResponse
     DescribeDomainConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainConfigurationResponse' {Maybe Text
domainName :: Maybe Text
$sel:domainName:DescribeDomainConfigurationResponse' :: DescribeDomainConfigurationResponse -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: DescribeDomainConfigurationResponse
s@DescribeDomainConfigurationResponse' {} Maybe Text
a -> DescribeDomainConfigurationResponse
s {$sel:domainName:DescribeDomainConfigurationResponse' :: Maybe Text
domainName = Maybe Text
a} :: DescribeDomainConfigurationResponse)

-- | The ARN of the domain configuration.
describeDomainConfigurationResponse_domainConfigurationArn :: Lens.Lens' DescribeDomainConfigurationResponse (Prelude.Maybe Prelude.Text)
describeDomainConfigurationResponse_domainConfigurationArn :: (Maybe Text -> f (Maybe Text))
-> DescribeDomainConfigurationResponse
-> f DescribeDomainConfigurationResponse
describeDomainConfigurationResponse_domainConfigurationArn = (DescribeDomainConfigurationResponse -> Maybe Text)
-> (DescribeDomainConfigurationResponse
    -> Maybe Text -> DescribeDomainConfigurationResponse)
-> Lens
     DescribeDomainConfigurationResponse
     DescribeDomainConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainConfigurationResponse' {Maybe Text
domainConfigurationArn :: Maybe Text
$sel:domainConfigurationArn:DescribeDomainConfigurationResponse' :: DescribeDomainConfigurationResponse -> Maybe Text
domainConfigurationArn} -> Maybe Text
domainConfigurationArn) (\s :: DescribeDomainConfigurationResponse
s@DescribeDomainConfigurationResponse' {} Maybe Text
a -> DescribeDomainConfigurationResponse
s {$sel:domainConfigurationArn:DescribeDomainConfigurationResponse' :: Maybe Text
domainConfigurationArn = Maybe Text
a} :: DescribeDomainConfigurationResponse)

-- | The type of service delivered by the endpoint.
describeDomainConfigurationResponse_serviceType :: Lens.Lens' DescribeDomainConfigurationResponse (Prelude.Maybe ServiceType)
describeDomainConfigurationResponse_serviceType :: (Maybe ServiceType -> f (Maybe ServiceType))
-> DescribeDomainConfigurationResponse
-> f DescribeDomainConfigurationResponse
describeDomainConfigurationResponse_serviceType = (DescribeDomainConfigurationResponse -> Maybe ServiceType)
-> (DescribeDomainConfigurationResponse
    -> Maybe ServiceType -> DescribeDomainConfigurationResponse)
-> Lens
     DescribeDomainConfigurationResponse
     DescribeDomainConfigurationResponse
     (Maybe ServiceType)
     (Maybe ServiceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainConfigurationResponse' {Maybe ServiceType
serviceType :: Maybe ServiceType
$sel:serviceType:DescribeDomainConfigurationResponse' :: DescribeDomainConfigurationResponse -> Maybe ServiceType
serviceType} -> Maybe ServiceType
serviceType) (\s :: DescribeDomainConfigurationResponse
s@DescribeDomainConfigurationResponse' {} Maybe ServiceType
a -> DescribeDomainConfigurationResponse
s {$sel:serviceType:DescribeDomainConfigurationResponse' :: Maybe ServiceType
serviceType = Maybe ServiceType
a} :: DescribeDomainConfigurationResponse)

-- | The type of the domain.
describeDomainConfigurationResponse_domainType :: Lens.Lens' DescribeDomainConfigurationResponse (Prelude.Maybe DomainType)
describeDomainConfigurationResponse_domainType :: (Maybe DomainType -> f (Maybe DomainType))
-> DescribeDomainConfigurationResponse
-> f DescribeDomainConfigurationResponse
describeDomainConfigurationResponse_domainType = (DescribeDomainConfigurationResponse -> Maybe DomainType)
-> (DescribeDomainConfigurationResponse
    -> Maybe DomainType -> DescribeDomainConfigurationResponse)
-> Lens
     DescribeDomainConfigurationResponse
     DescribeDomainConfigurationResponse
     (Maybe DomainType)
     (Maybe DomainType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainConfigurationResponse' {Maybe DomainType
domainType :: Maybe DomainType
$sel:domainType:DescribeDomainConfigurationResponse' :: DescribeDomainConfigurationResponse -> Maybe DomainType
domainType} -> Maybe DomainType
domainType) (\s :: DescribeDomainConfigurationResponse
s@DescribeDomainConfigurationResponse' {} Maybe DomainType
a -> DescribeDomainConfigurationResponse
s {$sel:domainType:DescribeDomainConfigurationResponse' :: Maybe DomainType
domainType = Maybe DomainType
a} :: DescribeDomainConfigurationResponse)

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

instance
  Prelude.NFData
    DescribeDomainConfigurationResponse