{-# 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.DescribeWebsiteCertificateAuthority
-- 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 certificate authority.
module Amazonka.WorkLink.DescribeWebsiteCertificateAuthority
  ( -- * Creating a Request
    DescribeWebsiteCertificateAuthority (..),
    newDescribeWebsiteCertificateAuthority,

    -- * Request Lenses
    describeWebsiteCertificateAuthority_fleetArn,
    describeWebsiteCertificateAuthority_websiteCaId,

    -- * Destructuring the Response
    DescribeWebsiteCertificateAuthorityResponse (..),
    newDescribeWebsiteCertificateAuthorityResponse,

    -- * Response Lenses
    describeWebsiteCertificateAuthorityResponse_createdTime,
    describeWebsiteCertificateAuthorityResponse_certificate,
    describeWebsiteCertificateAuthorityResponse_displayName,
    describeWebsiteCertificateAuthorityResponse_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:/ 'newDescribeWebsiteCertificateAuthority' smart constructor.
data DescribeWebsiteCertificateAuthority = DescribeWebsiteCertificateAuthority'
  { -- | The ARN of the fleet.
    DescribeWebsiteCertificateAuthority -> Text
fleetArn :: Prelude.Text,
    -- | A unique identifier for the certificate authority.
    DescribeWebsiteCertificateAuthority -> Text
websiteCaId :: Prelude.Text
  }
  deriving (DescribeWebsiteCertificateAuthority
-> DescribeWebsiteCertificateAuthority -> Bool
(DescribeWebsiteCertificateAuthority
 -> DescribeWebsiteCertificateAuthority -> Bool)
-> (DescribeWebsiteCertificateAuthority
    -> DescribeWebsiteCertificateAuthority -> Bool)
-> Eq DescribeWebsiteCertificateAuthority
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWebsiteCertificateAuthority
-> DescribeWebsiteCertificateAuthority -> Bool
$c/= :: DescribeWebsiteCertificateAuthority
-> DescribeWebsiteCertificateAuthority -> Bool
== :: DescribeWebsiteCertificateAuthority
-> DescribeWebsiteCertificateAuthority -> Bool
$c== :: DescribeWebsiteCertificateAuthority
-> DescribeWebsiteCertificateAuthority -> Bool
Prelude.Eq, ReadPrec [DescribeWebsiteCertificateAuthority]
ReadPrec DescribeWebsiteCertificateAuthority
Int -> ReadS DescribeWebsiteCertificateAuthority
ReadS [DescribeWebsiteCertificateAuthority]
(Int -> ReadS DescribeWebsiteCertificateAuthority)
-> ReadS [DescribeWebsiteCertificateAuthority]
-> ReadPrec DescribeWebsiteCertificateAuthority
-> ReadPrec [DescribeWebsiteCertificateAuthority]
-> Read DescribeWebsiteCertificateAuthority
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWebsiteCertificateAuthority]
$creadListPrec :: ReadPrec [DescribeWebsiteCertificateAuthority]
readPrec :: ReadPrec DescribeWebsiteCertificateAuthority
$creadPrec :: ReadPrec DescribeWebsiteCertificateAuthority
readList :: ReadS [DescribeWebsiteCertificateAuthority]
$creadList :: ReadS [DescribeWebsiteCertificateAuthority]
readsPrec :: Int -> ReadS DescribeWebsiteCertificateAuthority
$creadsPrec :: Int -> ReadS DescribeWebsiteCertificateAuthority
Prelude.Read, Int -> DescribeWebsiteCertificateAuthority -> ShowS
[DescribeWebsiteCertificateAuthority] -> ShowS
DescribeWebsiteCertificateAuthority -> String
(Int -> DescribeWebsiteCertificateAuthority -> ShowS)
-> (DescribeWebsiteCertificateAuthority -> String)
-> ([DescribeWebsiteCertificateAuthority] -> ShowS)
-> Show DescribeWebsiteCertificateAuthority
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWebsiteCertificateAuthority] -> ShowS
$cshowList :: [DescribeWebsiteCertificateAuthority] -> ShowS
show :: DescribeWebsiteCertificateAuthority -> String
$cshow :: DescribeWebsiteCertificateAuthority -> String
showsPrec :: Int -> DescribeWebsiteCertificateAuthority -> ShowS
$cshowsPrec :: Int -> DescribeWebsiteCertificateAuthority -> ShowS
Prelude.Show, (forall x.
 DescribeWebsiteCertificateAuthority
 -> Rep DescribeWebsiteCertificateAuthority x)
-> (forall x.
    Rep DescribeWebsiteCertificateAuthority x
    -> DescribeWebsiteCertificateAuthority)
-> Generic DescribeWebsiteCertificateAuthority
forall x.
Rep DescribeWebsiteCertificateAuthority x
-> DescribeWebsiteCertificateAuthority
forall x.
DescribeWebsiteCertificateAuthority
-> Rep DescribeWebsiteCertificateAuthority x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeWebsiteCertificateAuthority x
-> DescribeWebsiteCertificateAuthority
$cfrom :: forall x.
DescribeWebsiteCertificateAuthority
-> Rep DescribeWebsiteCertificateAuthority x
Prelude.Generic)

-- |
-- Create a value of 'DescribeWebsiteCertificateAuthority' 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', 'describeWebsiteCertificateAuthority_fleetArn' - The ARN of the fleet.
--
-- 'websiteCaId', 'describeWebsiteCertificateAuthority_websiteCaId' - A unique identifier for the certificate authority.
newDescribeWebsiteCertificateAuthority ::
  -- | 'fleetArn'
  Prelude.Text ->
  -- | 'websiteCaId'
  Prelude.Text ->
  DescribeWebsiteCertificateAuthority
newDescribeWebsiteCertificateAuthority :: Text -> Text -> DescribeWebsiteCertificateAuthority
newDescribeWebsiteCertificateAuthority
  Text
pFleetArn_
  Text
pWebsiteCaId_ =
    DescribeWebsiteCertificateAuthority' :: Text -> Text -> DescribeWebsiteCertificateAuthority
DescribeWebsiteCertificateAuthority'
      { $sel:fleetArn:DescribeWebsiteCertificateAuthority' :: Text
fleetArn =
          Text
pFleetArn_,
        $sel:websiteCaId:DescribeWebsiteCertificateAuthority' :: Text
websiteCaId = Text
pWebsiteCaId_
      }

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

-- | A unique identifier for the certificate authority.
describeWebsiteCertificateAuthority_websiteCaId :: Lens.Lens' DescribeWebsiteCertificateAuthority Prelude.Text
describeWebsiteCertificateAuthority_websiteCaId :: (Text -> f Text)
-> DescribeWebsiteCertificateAuthority
-> f DescribeWebsiteCertificateAuthority
describeWebsiteCertificateAuthority_websiteCaId = (DescribeWebsiteCertificateAuthority -> Text)
-> (DescribeWebsiteCertificateAuthority
    -> Text -> DescribeWebsiteCertificateAuthority)
-> Lens
     DescribeWebsiteCertificateAuthority
     DescribeWebsiteCertificateAuthority
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWebsiteCertificateAuthority' {Text
websiteCaId :: Text
$sel:websiteCaId:DescribeWebsiteCertificateAuthority' :: DescribeWebsiteCertificateAuthority -> Text
websiteCaId} -> Text
websiteCaId) (\s :: DescribeWebsiteCertificateAuthority
s@DescribeWebsiteCertificateAuthority' {} Text
a -> DescribeWebsiteCertificateAuthority
s {$sel:websiteCaId:DescribeWebsiteCertificateAuthority' :: Text
websiteCaId = Text
a} :: DescribeWebsiteCertificateAuthority)

instance
  Core.AWSRequest
    DescribeWebsiteCertificateAuthority
  where
  type
    AWSResponse DescribeWebsiteCertificateAuthority =
      DescribeWebsiteCertificateAuthorityResponse
  request :: DescribeWebsiteCertificateAuthority
-> Request DescribeWebsiteCertificateAuthority
request = Service
-> DescribeWebsiteCertificateAuthority
-> Request DescribeWebsiteCertificateAuthority
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeWebsiteCertificateAuthority
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeWebsiteCertificateAuthority)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeWebsiteCertificateAuthority))
-> Logger
-> Service
-> Proxy DescribeWebsiteCertificateAuthority
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeWebsiteCertificateAuthority)))
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 POSIX
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeWebsiteCertificateAuthorityResponse
DescribeWebsiteCertificateAuthorityResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeWebsiteCertificateAuthorityResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeWebsiteCertificateAuthorityResponse)
forall (f :: * -> *) a b. Functor 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
   -> DescribeWebsiteCertificateAuthorityResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Int -> DescribeWebsiteCertificateAuthorityResponse)
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
"Certificate")
              Either
  String
  (Maybe Text -> Int -> DescribeWebsiteCertificateAuthorityResponse)
-> Either String (Maybe Text)
-> Either
     String (Int -> DescribeWebsiteCertificateAuthorityResponse)
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 -> DescribeWebsiteCertificateAuthorityResponse)
-> Either String Int
-> Either String DescribeWebsiteCertificateAuthorityResponse
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
    DescribeWebsiteCertificateAuthority

instance
  Prelude.NFData
    DescribeWebsiteCertificateAuthority

instance
  Core.ToHeaders
    DescribeWebsiteCertificateAuthority
  where
  toHeaders :: DescribeWebsiteCertificateAuthority -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribeWebsiteCertificateAuthority -> 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
    DescribeWebsiteCertificateAuthority
  where
  toJSON :: DescribeWebsiteCertificateAuthority -> Value
toJSON DescribeWebsiteCertificateAuthority' {Text
websiteCaId :: Text
fleetArn :: Text
$sel:websiteCaId:DescribeWebsiteCertificateAuthority' :: DescribeWebsiteCertificateAuthority -> Text
$sel:fleetArn:DescribeWebsiteCertificateAuthority' :: DescribeWebsiteCertificateAuthority -> 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
"WebsiteCaId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
websiteCaId)
          ]
      )

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

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

-- | /See:/ 'newDescribeWebsiteCertificateAuthorityResponse' smart constructor.
data DescribeWebsiteCertificateAuthorityResponse = DescribeWebsiteCertificateAuthorityResponse'
  { -- | The time that the certificate authority was added.
    DescribeWebsiteCertificateAuthorityResponse -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | The root certificate of the certificate authority.
    DescribeWebsiteCertificateAuthorityResponse -> Maybe Text
certificate :: Prelude.Maybe Prelude.Text,
    -- | The certificate name to display.
    DescribeWebsiteCertificateAuthorityResponse -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeWebsiteCertificateAuthorityResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeWebsiteCertificateAuthorityResponse
-> DescribeWebsiteCertificateAuthorityResponse -> Bool
(DescribeWebsiteCertificateAuthorityResponse
 -> DescribeWebsiteCertificateAuthorityResponse -> Bool)
-> (DescribeWebsiteCertificateAuthorityResponse
    -> DescribeWebsiteCertificateAuthorityResponse -> Bool)
-> Eq DescribeWebsiteCertificateAuthorityResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWebsiteCertificateAuthorityResponse
-> DescribeWebsiteCertificateAuthorityResponse -> Bool
$c/= :: DescribeWebsiteCertificateAuthorityResponse
-> DescribeWebsiteCertificateAuthorityResponse -> Bool
== :: DescribeWebsiteCertificateAuthorityResponse
-> DescribeWebsiteCertificateAuthorityResponse -> Bool
$c== :: DescribeWebsiteCertificateAuthorityResponse
-> DescribeWebsiteCertificateAuthorityResponse -> Bool
Prelude.Eq, ReadPrec [DescribeWebsiteCertificateAuthorityResponse]
ReadPrec DescribeWebsiteCertificateAuthorityResponse
Int -> ReadS DescribeWebsiteCertificateAuthorityResponse
ReadS [DescribeWebsiteCertificateAuthorityResponse]
(Int -> ReadS DescribeWebsiteCertificateAuthorityResponse)
-> ReadS [DescribeWebsiteCertificateAuthorityResponse]
-> ReadPrec DescribeWebsiteCertificateAuthorityResponse
-> ReadPrec [DescribeWebsiteCertificateAuthorityResponse]
-> Read DescribeWebsiteCertificateAuthorityResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWebsiteCertificateAuthorityResponse]
$creadListPrec :: ReadPrec [DescribeWebsiteCertificateAuthorityResponse]
readPrec :: ReadPrec DescribeWebsiteCertificateAuthorityResponse
$creadPrec :: ReadPrec DescribeWebsiteCertificateAuthorityResponse
readList :: ReadS [DescribeWebsiteCertificateAuthorityResponse]
$creadList :: ReadS [DescribeWebsiteCertificateAuthorityResponse]
readsPrec :: Int -> ReadS DescribeWebsiteCertificateAuthorityResponse
$creadsPrec :: Int -> ReadS DescribeWebsiteCertificateAuthorityResponse
Prelude.Read, Int -> DescribeWebsiteCertificateAuthorityResponse -> ShowS
[DescribeWebsiteCertificateAuthorityResponse] -> ShowS
DescribeWebsiteCertificateAuthorityResponse -> String
(Int -> DescribeWebsiteCertificateAuthorityResponse -> ShowS)
-> (DescribeWebsiteCertificateAuthorityResponse -> String)
-> ([DescribeWebsiteCertificateAuthorityResponse] -> ShowS)
-> Show DescribeWebsiteCertificateAuthorityResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWebsiteCertificateAuthorityResponse] -> ShowS
$cshowList :: [DescribeWebsiteCertificateAuthorityResponse] -> ShowS
show :: DescribeWebsiteCertificateAuthorityResponse -> String
$cshow :: DescribeWebsiteCertificateAuthorityResponse -> String
showsPrec :: Int -> DescribeWebsiteCertificateAuthorityResponse -> ShowS
$cshowsPrec :: Int -> DescribeWebsiteCertificateAuthorityResponse -> ShowS
Prelude.Show, (forall x.
 DescribeWebsiteCertificateAuthorityResponse
 -> Rep DescribeWebsiteCertificateAuthorityResponse x)
-> (forall x.
    Rep DescribeWebsiteCertificateAuthorityResponse x
    -> DescribeWebsiteCertificateAuthorityResponse)
-> Generic DescribeWebsiteCertificateAuthorityResponse
forall x.
Rep DescribeWebsiteCertificateAuthorityResponse x
-> DescribeWebsiteCertificateAuthorityResponse
forall x.
DescribeWebsiteCertificateAuthorityResponse
-> Rep DescribeWebsiteCertificateAuthorityResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeWebsiteCertificateAuthorityResponse x
-> DescribeWebsiteCertificateAuthorityResponse
$cfrom :: forall x.
DescribeWebsiteCertificateAuthorityResponse
-> Rep DescribeWebsiteCertificateAuthorityResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeWebsiteCertificateAuthorityResponse' 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:
--
-- 'createdTime', 'describeWebsiteCertificateAuthorityResponse_createdTime' - The time that the certificate authority was added.
--
-- 'certificate', 'describeWebsiteCertificateAuthorityResponse_certificate' - The root certificate of the certificate authority.
--
-- 'displayName', 'describeWebsiteCertificateAuthorityResponse_displayName' - The certificate name to display.
--
-- 'httpStatus', 'describeWebsiteCertificateAuthorityResponse_httpStatus' - The response's http status code.
newDescribeWebsiteCertificateAuthorityResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeWebsiteCertificateAuthorityResponse
newDescribeWebsiteCertificateAuthorityResponse :: Int -> DescribeWebsiteCertificateAuthorityResponse
newDescribeWebsiteCertificateAuthorityResponse
  Int
pHttpStatus_ =
    DescribeWebsiteCertificateAuthorityResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeWebsiteCertificateAuthorityResponse
DescribeWebsiteCertificateAuthorityResponse'
      { $sel:createdTime:DescribeWebsiteCertificateAuthorityResponse' :: Maybe POSIX
createdTime =
          Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:certificate:DescribeWebsiteCertificateAuthorityResponse' :: Maybe Text
certificate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:displayName:DescribeWebsiteCertificateAuthorityResponse' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeWebsiteCertificateAuthorityResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The time that the certificate authority was added.
describeWebsiteCertificateAuthorityResponse_createdTime :: Lens.Lens' DescribeWebsiteCertificateAuthorityResponse (Prelude.Maybe Prelude.UTCTime)
describeWebsiteCertificateAuthorityResponse_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeWebsiteCertificateAuthorityResponse
-> f DescribeWebsiteCertificateAuthorityResponse
describeWebsiteCertificateAuthorityResponse_createdTime = (DescribeWebsiteCertificateAuthorityResponse -> Maybe POSIX)
-> (DescribeWebsiteCertificateAuthorityResponse
    -> Maybe POSIX -> DescribeWebsiteCertificateAuthorityResponse)
-> Lens
     DescribeWebsiteCertificateAuthorityResponse
     DescribeWebsiteCertificateAuthorityResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWebsiteCertificateAuthorityResponse' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:DescribeWebsiteCertificateAuthorityResponse' :: DescribeWebsiteCertificateAuthorityResponse -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: DescribeWebsiteCertificateAuthorityResponse
s@DescribeWebsiteCertificateAuthorityResponse' {} Maybe POSIX
a -> DescribeWebsiteCertificateAuthorityResponse
s {$sel:createdTime:DescribeWebsiteCertificateAuthorityResponse' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: DescribeWebsiteCertificateAuthorityResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeWebsiteCertificateAuthorityResponse
 -> f DescribeWebsiteCertificateAuthorityResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeWebsiteCertificateAuthorityResponse
-> f DescribeWebsiteCertificateAuthorityResponse
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 root certificate of the certificate authority.
describeWebsiteCertificateAuthorityResponse_certificate :: Lens.Lens' DescribeWebsiteCertificateAuthorityResponse (Prelude.Maybe Prelude.Text)
describeWebsiteCertificateAuthorityResponse_certificate :: (Maybe Text -> f (Maybe Text))
-> DescribeWebsiteCertificateAuthorityResponse
-> f DescribeWebsiteCertificateAuthorityResponse
describeWebsiteCertificateAuthorityResponse_certificate = (DescribeWebsiteCertificateAuthorityResponse -> Maybe Text)
-> (DescribeWebsiteCertificateAuthorityResponse
    -> Maybe Text -> DescribeWebsiteCertificateAuthorityResponse)
-> Lens
     DescribeWebsiteCertificateAuthorityResponse
     DescribeWebsiteCertificateAuthorityResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWebsiteCertificateAuthorityResponse' {Maybe Text
certificate :: Maybe Text
$sel:certificate:DescribeWebsiteCertificateAuthorityResponse' :: DescribeWebsiteCertificateAuthorityResponse -> Maybe Text
certificate} -> Maybe Text
certificate) (\s :: DescribeWebsiteCertificateAuthorityResponse
s@DescribeWebsiteCertificateAuthorityResponse' {} Maybe Text
a -> DescribeWebsiteCertificateAuthorityResponse
s {$sel:certificate:DescribeWebsiteCertificateAuthorityResponse' :: Maybe Text
certificate = Maybe Text
a} :: DescribeWebsiteCertificateAuthorityResponse)

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

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

instance
  Prelude.NFData
    DescribeWebsiteCertificateAuthorityResponse