{-# 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.WorkLink.DescribeDomain
-- 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)
--
-- Provides information about the domain.
module Amazonka.WorkLink.DescribeDomain
  ( -- * Creating a Request
    DescribeDomain (..),
    newDescribeDomain,

    -- * Request Lenses
    describeDomain_fleetArn,
    describeDomain_domainName,

    -- * Destructuring the Response
    DescribeDomainResponse (..),
    newDescribeDomainResponse,

    -- * Response Lenses
    describeDomainResponse_domainStatus,
    describeDomainResponse_acmCertificateArn,
    describeDomainResponse_createdTime,
    describeDomainResponse_domainName,
    describeDomainResponse_displayName,
    describeDomainResponse_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.WorkLink.Types

-- | /See:/ 'newDescribeDomain' smart constructor.
data DescribeDomain = DescribeDomain'
  { -- | The ARN of the fleet.
    DescribeDomain -> Text
fleetArn :: Prelude.Text,
    -- | The name of the domain.
    DescribeDomain -> Text
domainName :: Prelude.Text
  }
  deriving (DescribeDomain -> DescribeDomain -> Bool
(DescribeDomain -> DescribeDomain -> Bool)
-> (DescribeDomain -> DescribeDomain -> Bool) -> Eq DescribeDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDomain -> DescribeDomain -> Bool
$c/= :: DescribeDomain -> DescribeDomain -> Bool
== :: DescribeDomain -> DescribeDomain -> Bool
$c== :: DescribeDomain -> DescribeDomain -> Bool
Prelude.Eq, ReadPrec [DescribeDomain]
ReadPrec DescribeDomain
Int -> ReadS DescribeDomain
ReadS [DescribeDomain]
(Int -> ReadS DescribeDomain)
-> ReadS [DescribeDomain]
-> ReadPrec DescribeDomain
-> ReadPrec [DescribeDomain]
-> Read DescribeDomain
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDomain]
$creadListPrec :: ReadPrec [DescribeDomain]
readPrec :: ReadPrec DescribeDomain
$creadPrec :: ReadPrec DescribeDomain
readList :: ReadS [DescribeDomain]
$creadList :: ReadS [DescribeDomain]
readsPrec :: Int -> ReadS DescribeDomain
$creadsPrec :: Int -> ReadS DescribeDomain
Prelude.Read, Int -> DescribeDomain -> ShowS
[DescribeDomain] -> ShowS
DescribeDomain -> String
(Int -> DescribeDomain -> ShowS)
-> (DescribeDomain -> String)
-> ([DescribeDomain] -> ShowS)
-> Show DescribeDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDomain] -> ShowS
$cshowList :: [DescribeDomain] -> ShowS
show :: DescribeDomain -> String
$cshow :: DescribeDomain -> String
showsPrec :: Int -> DescribeDomain -> ShowS
$cshowsPrec :: Int -> DescribeDomain -> ShowS
Prelude.Show, (forall x. DescribeDomain -> Rep DescribeDomain x)
-> (forall x. Rep DescribeDomain x -> DescribeDomain)
-> Generic DescribeDomain
forall x. Rep DescribeDomain x -> DescribeDomain
forall x. DescribeDomain -> Rep DescribeDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDomain x -> DescribeDomain
$cfrom :: forall x. DescribeDomain -> Rep DescribeDomain x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDomain' 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:
--
-- 'fleetArn', 'describeDomain_fleetArn' - The ARN of the fleet.
--
-- 'domainName', 'describeDomain_domainName' - The name of the domain.
newDescribeDomain ::
  -- | 'fleetArn'
  Prelude.Text ->
  -- | 'domainName'
  Prelude.Text ->
  DescribeDomain
newDescribeDomain :: Text -> Text -> DescribeDomain
newDescribeDomain Text
pFleetArn_ Text
pDomainName_ =
  DescribeDomain' :: Text -> Text -> DescribeDomain
DescribeDomain'
    { $sel:fleetArn:DescribeDomain' :: Text
fleetArn = Text
pFleetArn_,
      $sel:domainName:DescribeDomain' :: Text
domainName = Text
pDomainName_
    }

-- | The ARN of the fleet.
describeDomain_fleetArn :: Lens.Lens' DescribeDomain Prelude.Text
describeDomain_fleetArn :: (Text -> f Text) -> DescribeDomain -> f DescribeDomain
describeDomain_fleetArn = (DescribeDomain -> Text)
-> (DescribeDomain -> Text -> DescribeDomain)
-> Lens DescribeDomain DescribeDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomain' {Text
fleetArn :: Text
$sel:fleetArn:DescribeDomain' :: DescribeDomain -> Text
fleetArn} -> Text
fleetArn) (\s :: DescribeDomain
s@DescribeDomain' {} Text
a -> DescribeDomain
s {$sel:fleetArn:DescribeDomain' :: Text
fleetArn = Text
a} :: DescribeDomain)

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

instance Core.AWSRequest DescribeDomain where
  type
    AWSResponse DescribeDomain =
      DescribeDomainResponse
  request :: DescribeDomain -> Request DescribeDomain
request = Service -> DescribeDomain -> Request DescribeDomain
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeDomain)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeDomain))
-> Logger
-> Service
-> Proxy DescribeDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeDomain)))
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 DomainStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeDomainResponse
DescribeDomainResponse'
            (Maybe DomainStatus
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeDomainResponse)
-> Either String (Maybe DomainStatus)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeDomainResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe DomainStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DomainStatus")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeDomainResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text -> Maybe Text -> Int -> DescribeDomainResponse)
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
"AcmCertificateArn")
            Either
  String
  (Maybe POSIX
   -> Maybe Text -> Maybe Text -> Int -> DescribeDomainResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> DescribeDomainResponse)
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
"CreatedTime")
            Either
  String (Maybe Text -> Maybe Text -> Int -> DescribeDomainResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> DescribeDomainResponse)
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 -> Int -> DescribeDomainResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeDomainResponse)
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
"DisplayName")
            Either String (Int -> DescribeDomainResponse)
-> Either String Int -> Either String DescribeDomainResponse
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 DescribeDomain

instance Prelude.NFData DescribeDomain

instance Core.ToHeaders DescribeDomain where
  toHeaders :: DescribeDomain -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeDomain -> 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.ToJSON DescribeDomain where
  toJSON :: DescribeDomain -> Value
toJSON DescribeDomain' {Text
domainName :: Text
fleetArn :: Text
$sel:domainName:DescribeDomain' :: DescribeDomain -> Text
$sel:fleetArn:DescribeDomain' :: DescribeDomain -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FleetArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fleetArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainName)
          ]
      )

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

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

-- | /See:/ 'newDescribeDomainResponse' smart constructor.
data DescribeDomainResponse = DescribeDomainResponse'
  { -- | The current state for the domain.
    DescribeDomainResponse -> Maybe DomainStatus
domainStatus :: Prelude.Maybe DomainStatus,
    -- | The ARN of an issued ACM certificate that is valid for the domain being
    -- associated.
    DescribeDomainResponse -> Maybe Text
acmCertificateArn :: Prelude.Maybe Prelude.Text,
    -- | The time that the domain was added.
    DescribeDomainResponse -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | The name of the domain.
    DescribeDomainResponse -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    -- | The name to display.
    DescribeDomainResponse -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeDomainResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDomainResponse -> DescribeDomainResponse -> Bool
(DescribeDomainResponse -> DescribeDomainResponse -> Bool)
-> (DescribeDomainResponse -> DescribeDomainResponse -> Bool)
-> Eq DescribeDomainResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDomainResponse -> DescribeDomainResponse -> Bool
$c/= :: DescribeDomainResponse -> DescribeDomainResponse -> Bool
== :: DescribeDomainResponse -> DescribeDomainResponse -> Bool
$c== :: DescribeDomainResponse -> DescribeDomainResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDomainResponse]
ReadPrec DescribeDomainResponse
Int -> ReadS DescribeDomainResponse
ReadS [DescribeDomainResponse]
(Int -> ReadS DescribeDomainResponse)
-> ReadS [DescribeDomainResponse]
-> ReadPrec DescribeDomainResponse
-> ReadPrec [DescribeDomainResponse]
-> Read DescribeDomainResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDomainResponse]
$creadListPrec :: ReadPrec [DescribeDomainResponse]
readPrec :: ReadPrec DescribeDomainResponse
$creadPrec :: ReadPrec DescribeDomainResponse
readList :: ReadS [DescribeDomainResponse]
$creadList :: ReadS [DescribeDomainResponse]
readsPrec :: Int -> ReadS DescribeDomainResponse
$creadsPrec :: Int -> ReadS DescribeDomainResponse
Prelude.Read, Int -> DescribeDomainResponse -> ShowS
[DescribeDomainResponse] -> ShowS
DescribeDomainResponse -> String
(Int -> DescribeDomainResponse -> ShowS)
-> (DescribeDomainResponse -> String)
-> ([DescribeDomainResponse] -> ShowS)
-> Show DescribeDomainResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDomainResponse] -> ShowS
$cshowList :: [DescribeDomainResponse] -> ShowS
show :: DescribeDomainResponse -> String
$cshow :: DescribeDomainResponse -> String
showsPrec :: Int -> DescribeDomainResponse -> ShowS
$cshowsPrec :: Int -> DescribeDomainResponse -> ShowS
Prelude.Show, (forall x. DescribeDomainResponse -> Rep DescribeDomainResponse x)
-> (forall x.
    Rep DescribeDomainResponse x -> DescribeDomainResponse)
-> Generic DescribeDomainResponse
forall x. Rep DescribeDomainResponse x -> DescribeDomainResponse
forall x. DescribeDomainResponse -> Rep DescribeDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDomainResponse x -> DescribeDomainResponse
$cfrom :: forall x. DescribeDomainResponse -> Rep DescribeDomainResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDomainResponse' 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:
--
-- 'domainStatus', 'describeDomainResponse_domainStatus' - The current state for the domain.
--
-- 'acmCertificateArn', 'describeDomainResponse_acmCertificateArn' - The ARN of an issued ACM certificate that is valid for the domain being
-- associated.
--
-- 'createdTime', 'describeDomainResponse_createdTime' - The time that the domain was added.
--
-- 'domainName', 'describeDomainResponse_domainName' - The name of the domain.
--
-- 'displayName', 'describeDomainResponse_displayName' - The name to display.
--
-- 'httpStatus', 'describeDomainResponse_httpStatus' - The response's http status code.
newDescribeDomainResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDomainResponse
newDescribeDomainResponse :: Int -> DescribeDomainResponse
newDescribeDomainResponse Int
pHttpStatus_ =
  DescribeDomainResponse' :: Maybe DomainStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeDomainResponse
DescribeDomainResponse'
    { $sel:domainStatus:DescribeDomainResponse' :: Maybe DomainStatus
domainStatus =
        Maybe DomainStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:acmCertificateArn:DescribeDomainResponse' :: Maybe Text
acmCertificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:DescribeDomainResponse' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:DescribeDomainResponse' :: Maybe Text
domainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:DescribeDomainResponse' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDomainResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current state for the domain.
describeDomainResponse_domainStatus :: Lens.Lens' DescribeDomainResponse (Prelude.Maybe DomainStatus)
describeDomainResponse_domainStatus :: (Maybe DomainStatus -> f (Maybe DomainStatus))
-> DescribeDomainResponse -> f DescribeDomainResponse
describeDomainResponse_domainStatus = (DescribeDomainResponse -> Maybe DomainStatus)
-> (DescribeDomainResponse
    -> Maybe DomainStatus -> DescribeDomainResponse)
-> Lens
     DescribeDomainResponse
     DescribeDomainResponse
     (Maybe DomainStatus)
     (Maybe DomainStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainResponse' {Maybe DomainStatus
domainStatus :: Maybe DomainStatus
$sel:domainStatus:DescribeDomainResponse' :: DescribeDomainResponse -> Maybe DomainStatus
domainStatus} -> Maybe DomainStatus
domainStatus) (\s :: DescribeDomainResponse
s@DescribeDomainResponse' {} Maybe DomainStatus
a -> DescribeDomainResponse
s {$sel:domainStatus:DescribeDomainResponse' :: Maybe DomainStatus
domainStatus = Maybe DomainStatus
a} :: DescribeDomainResponse)

-- | The ARN of an issued ACM certificate that is valid for the domain being
-- associated.
describeDomainResponse_acmCertificateArn :: Lens.Lens' DescribeDomainResponse (Prelude.Maybe Prelude.Text)
describeDomainResponse_acmCertificateArn :: (Maybe Text -> f (Maybe Text))
-> DescribeDomainResponse -> f DescribeDomainResponse
describeDomainResponse_acmCertificateArn = (DescribeDomainResponse -> Maybe Text)
-> (DescribeDomainResponse -> Maybe Text -> DescribeDomainResponse)
-> Lens
     DescribeDomainResponse
     DescribeDomainResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainResponse' {Maybe Text
acmCertificateArn :: Maybe Text
$sel:acmCertificateArn:DescribeDomainResponse' :: DescribeDomainResponse -> Maybe Text
acmCertificateArn} -> Maybe Text
acmCertificateArn) (\s :: DescribeDomainResponse
s@DescribeDomainResponse' {} Maybe Text
a -> DescribeDomainResponse
s {$sel:acmCertificateArn:DescribeDomainResponse' :: Maybe Text
acmCertificateArn = Maybe Text
a} :: DescribeDomainResponse)

-- | The time that the domain was added.
describeDomainResponse_createdTime :: Lens.Lens' DescribeDomainResponse (Prelude.Maybe Prelude.UTCTime)
describeDomainResponse_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDomainResponse -> f DescribeDomainResponse
describeDomainResponse_createdTime = (DescribeDomainResponse -> Maybe POSIX)
-> (DescribeDomainResponse
    -> Maybe POSIX -> DescribeDomainResponse)
-> Lens
     DescribeDomainResponse
     DescribeDomainResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainResponse' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:DescribeDomainResponse' :: DescribeDomainResponse -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: DescribeDomainResponse
s@DescribeDomainResponse' {} Maybe POSIX
a -> DescribeDomainResponse
s {$sel:createdTime:DescribeDomainResponse' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: DescribeDomainResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDomainResponse -> f DescribeDomainResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDomainResponse
-> f DescribeDomainResponse
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

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

-- | The name to display.
describeDomainResponse_displayName :: Lens.Lens' DescribeDomainResponse (Prelude.Maybe Prelude.Text)
describeDomainResponse_displayName :: (Maybe Text -> f (Maybe Text))
-> DescribeDomainResponse -> f DescribeDomainResponse
describeDomainResponse_displayName = (DescribeDomainResponse -> Maybe Text)
-> (DescribeDomainResponse -> Maybe Text -> DescribeDomainResponse)
-> Lens
     DescribeDomainResponse
     DescribeDomainResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainResponse' {Maybe Text
displayName :: Maybe Text
$sel:displayName:DescribeDomainResponse' :: DescribeDomainResponse -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: DescribeDomainResponse
s@DescribeDomainResponse' {} Maybe Text
a -> DescribeDomainResponse
s {$sel:displayName:DescribeDomainResponse' :: Maybe Text
displayName = Maybe Text
a} :: DescribeDomainResponse)

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

instance Prelude.NFData DescribeDomainResponse