{-# 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.AssociateWebsiteCertificateAuthority
-- 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)
--
-- Imports the root certificate of a certificate authority (CA) used to
-- obtain TLS certificates used by associated websites within the company
-- network.
module Amazonka.WorkLink.AssociateWebsiteCertificateAuthority
  ( -- * Creating a Request
    AssociateWebsiteCertificateAuthority (..),
    newAssociateWebsiteCertificateAuthority,

    -- * Request Lenses
    associateWebsiteCertificateAuthority_displayName,
    associateWebsiteCertificateAuthority_fleetArn,
    associateWebsiteCertificateAuthority_certificate,

    -- * Destructuring the Response
    AssociateWebsiteCertificateAuthorityResponse (..),
    newAssociateWebsiteCertificateAuthorityResponse,

    -- * Response Lenses
    associateWebsiteCertificateAuthorityResponse_websiteCaId,
    associateWebsiteCertificateAuthorityResponse_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:/ 'newAssociateWebsiteCertificateAuthority' smart constructor.
data AssociateWebsiteCertificateAuthority = AssociateWebsiteCertificateAuthority'
  { -- | The certificate name to display.
    AssociateWebsiteCertificateAuthority -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the fleet.
    AssociateWebsiteCertificateAuthority -> Text
fleetArn :: Prelude.Text,
    -- | The root certificate of the CA.
    AssociateWebsiteCertificateAuthority -> Text
certificate :: Prelude.Text
  }
  deriving (AssociateWebsiteCertificateAuthority
-> AssociateWebsiteCertificateAuthority -> Bool
(AssociateWebsiteCertificateAuthority
 -> AssociateWebsiteCertificateAuthority -> Bool)
-> (AssociateWebsiteCertificateAuthority
    -> AssociateWebsiteCertificateAuthority -> Bool)
-> Eq AssociateWebsiteCertificateAuthority
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateWebsiteCertificateAuthority
-> AssociateWebsiteCertificateAuthority -> Bool
$c/= :: AssociateWebsiteCertificateAuthority
-> AssociateWebsiteCertificateAuthority -> Bool
== :: AssociateWebsiteCertificateAuthority
-> AssociateWebsiteCertificateAuthority -> Bool
$c== :: AssociateWebsiteCertificateAuthority
-> AssociateWebsiteCertificateAuthority -> Bool
Prelude.Eq, ReadPrec [AssociateWebsiteCertificateAuthority]
ReadPrec AssociateWebsiteCertificateAuthority
Int -> ReadS AssociateWebsiteCertificateAuthority
ReadS [AssociateWebsiteCertificateAuthority]
(Int -> ReadS AssociateWebsiteCertificateAuthority)
-> ReadS [AssociateWebsiteCertificateAuthority]
-> ReadPrec AssociateWebsiteCertificateAuthority
-> ReadPrec [AssociateWebsiteCertificateAuthority]
-> Read AssociateWebsiteCertificateAuthority
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateWebsiteCertificateAuthority]
$creadListPrec :: ReadPrec [AssociateWebsiteCertificateAuthority]
readPrec :: ReadPrec AssociateWebsiteCertificateAuthority
$creadPrec :: ReadPrec AssociateWebsiteCertificateAuthority
readList :: ReadS [AssociateWebsiteCertificateAuthority]
$creadList :: ReadS [AssociateWebsiteCertificateAuthority]
readsPrec :: Int -> ReadS AssociateWebsiteCertificateAuthority
$creadsPrec :: Int -> ReadS AssociateWebsiteCertificateAuthority
Prelude.Read, Int -> AssociateWebsiteCertificateAuthority -> ShowS
[AssociateWebsiteCertificateAuthority] -> ShowS
AssociateWebsiteCertificateAuthority -> String
(Int -> AssociateWebsiteCertificateAuthority -> ShowS)
-> (AssociateWebsiteCertificateAuthority -> String)
-> ([AssociateWebsiteCertificateAuthority] -> ShowS)
-> Show AssociateWebsiteCertificateAuthority
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateWebsiteCertificateAuthority] -> ShowS
$cshowList :: [AssociateWebsiteCertificateAuthority] -> ShowS
show :: AssociateWebsiteCertificateAuthority -> String
$cshow :: AssociateWebsiteCertificateAuthority -> String
showsPrec :: Int -> AssociateWebsiteCertificateAuthority -> ShowS
$cshowsPrec :: Int -> AssociateWebsiteCertificateAuthority -> ShowS
Prelude.Show, (forall x.
 AssociateWebsiteCertificateAuthority
 -> Rep AssociateWebsiteCertificateAuthority x)
-> (forall x.
    Rep AssociateWebsiteCertificateAuthority x
    -> AssociateWebsiteCertificateAuthority)
-> Generic AssociateWebsiteCertificateAuthority
forall x.
Rep AssociateWebsiteCertificateAuthority x
-> AssociateWebsiteCertificateAuthority
forall x.
AssociateWebsiteCertificateAuthority
-> Rep AssociateWebsiteCertificateAuthority x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateWebsiteCertificateAuthority x
-> AssociateWebsiteCertificateAuthority
$cfrom :: forall x.
AssociateWebsiteCertificateAuthority
-> Rep AssociateWebsiteCertificateAuthority x
Prelude.Generic)

-- |
-- Create a value of 'AssociateWebsiteCertificateAuthority' 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:
--
-- 'displayName', 'associateWebsiteCertificateAuthority_displayName' - The certificate name to display.
--
-- 'fleetArn', 'associateWebsiteCertificateAuthority_fleetArn' - The ARN of the fleet.
--
-- 'certificate', 'associateWebsiteCertificateAuthority_certificate' - The root certificate of the CA.
newAssociateWebsiteCertificateAuthority ::
  -- | 'fleetArn'
  Prelude.Text ->
  -- | 'certificate'
  Prelude.Text ->
  AssociateWebsiteCertificateAuthority
newAssociateWebsiteCertificateAuthority :: Text -> Text -> AssociateWebsiteCertificateAuthority
newAssociateWebsiteCertificateAuthority
  Text
pFleetArn_
  Text
pCertificate_ =
    AssociateWebsiteCertificateAuthority' :: Maybe Text -> Text -> Text -> AssociateWebsiteCertificateAuthority
AssociateWebsiteCertificateAuthority'
      { $sel:displayName:AssociateWebsiteCertificateAuthority' :: Maybe Text
displayName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:fleetArn:AssociateWebsiteCertificateAuthority' :: Text
fleetArn = Text
pFleetArn_,
        $sel:certificate:AssociateWebsiteCertificateAuthority' :: Text
certificate = Text
pCertificate_
      }

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

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

-- | The root certificate of the CA.
associateWebsiteCertificateAuthority_certificate :: Lens.Lens' AssociateWebsiteCertificateAuthority Prelude.Text
associateWebsiteCertificateAuthority_certificate :: (Text -> f Text)
-> AssociateWebsiteCertificateAuthority
-> f AssociateWebsiteCertificateAuthority
associateWebsiteCertificateAuthority_certificate = (AssociateWebsiteCertificateAuthority -> Text)
-> (AssociateWebsiteCertificateAuthority
    -> Text -> AssociateWebsiteCertificateAuthority)
-> Lens
     AssociateWebsiteCertificateAuthority
     AssociateWebsiteCertificateAuthority
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateWebsiteCertificateAuthority' {Text
certificate :: Text
$sel:certificate:AssociateWebsiteCertificateAuthority' :: AssociateWebsiteCertificateAuthority -> Text
certificate} -> Text
certificate) (\s :: AssociateWebsiteCertificateAuthority
s@AssociateWebsiteCertificateAuthority' {} Text
a -> AssociateWebsiteCertificateAuthority
s {$sel:certificate:AssociateWebsiteCertificateAuthority' :: Text
certificate = Text
a} :: AssociateWebsiteCertificateAuthority)

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

instance
  Prelude.NFData
    AssociateWebsiteCertificateAuthority

instance
  Core.ToHeaders
    AssociateWebsiteCertificateAuthority
  where
  toHeaders :: AssociateWebsiteCertificateAuthority -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> AssociateWebsiteCertificateAuthority -> 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
    AssociateWebsiteCertificateAuthority
  where
  toJSON :: AssociateWebsiteCertificateAuthority -> Value
toJSON AssociateWebsiteCertificateAuthority' {Maybe Text
Text
certificate :: Text
fleetArn :: Text
displayName :: Maybe Text
$sel:certificate:AssociateWebsiteCertificateAuthority' :: AssociateWebsiteCertificateAuthority -> Text
$sel:fleetArn:AssociateWebsiteCertificateAuthority' :: AssociateWebsiteCertificateAuthority -> Text
$sel:displayName:AssociateWebsiteCertificateAuthority' :: AssociateWebsiteCertificateAuthority -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DisplayName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
displayName,
            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
"Certificate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
certificate)
          ]
      )

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

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

-- | /See:/ 'newAssociateWebsiteCertificateAuthorityResponse' smart constructor.
data AssociateWebsiteCertificateAuthorityResponse = AssociateWebsiteCertificateAuthorityResponse'
  { -- | A unique identifier for the CA.
    AssociateWebsiteCertificateAuthorityResponse -> Maybe Text
websiteCaId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    AssociateWebsiteCertificateAuthorityResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AssociateWebsiteCertificateAuthorityResponse
-> AssociateWebsiteCertificateAuthorityResponse -> Bool
(AssociateWebsiteCertificateAuthorityResponse
 -> AssociateWebsiteCertificateAuthorityResponse -> Bool)
-> (AssociateWebsiteCertificateAuthorityResponse
    -> AssociateWebsiteCertificateAuthorityResponse -> Bool)
-> Eq AssociateWebsiteCertificateAuthorityResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateWebsiteCertificateAuthorityResponse
-> AssociateWebsiteCertificateAuthorityResponse -> Bool
$c/= :: AssociateWebsiteCertificateAuthorityResponse
-> AssociateWebsiteCertificateAuthorityResponse -> Bool
== :: AssociateWebsiteCertificateAuthorityResponse
-> AssociateWebsiteCertificateAuthorityResponse -> Bool
$c== :: AssociateWebsiteCertificateAuthorityResponse
-> AssociateWebsiteCertificateAuthorityResponse -> Bool
Prelude.Eq, ReadPrec [AssociateWebsiteCertificateAuthorityResponse]
ReadPrec AssociateWebsiteCertificateAuthorityResponse
Int -> ReadS AssociateWebsiteCertificateAuthorityResponse
ReadS [AssociateWebsiteCertificateAuthorityResponse]
(Int -> ReadS AssociateWebsiteCertificateAuthorityResponse)
-> ReadS [AssociateWebsiteCertificateAuthorityResponse]
-> ReadPrec AssociateWebsiteCertificateAuthorityResponse
-> ReadPrec [AssociateWebsiteCertificateAuthorityResponse]
-> Read AssociateWebsiteCertificateAuthorityResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateWebsiteCertificateAuthorityResponse]
$creadListPrec :: ReadPrec [AssociateWebsiteCertificateAuthorityResponse]
readPrec :: ReadPrec AssociateWebsiteCertificateAuthorityResponse
$creadPrec :: ReadPrec AssociateWebsiteCertificateAuthorityResponse
readList :: ReadS [AssociateWebsiteCertificateAuthorityResponse]
$creadList :: ReadS [AssociateWebsiteCertificateAuthorityResponse]
readsPrec :: Int -> ReadS AssociateWebsiteCertificateAuthorityResponse
$creadsPrec :: Int -> ReadS AssociateWebsiteCertificateAuthorityResponse
Prelude.Read, Int -> AssociateWebsiteCertificateAuthorityResponse -> ShowS
[AssociateWebsiteCertificateAuthorityResponse] -> ShowS
AssociateWebsiteCertificateAuthorityResponse -> String
(Int -> AssociateWebsiteCertificateAuthorityResponse -> ShowS)
-> (AssociateWebsiteCertificateAuthorityResponse -> String)
-> ([AssociateWebsiteCertificateAuthorityResponse] -> ShowS)
-> Show AssociateWebsiteCertificateAuthorityResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateWebsiteCertificateAuthorityResponse] -> ShowS
$cshowList :: [AssociateWebsiteCertificateAuthorityResponse] -> ShowS
show :: AssociateWebsiteCertificateAuthorityResponse -> String
$cshow :: AssociateWebsiteCertificateAuthorityResponse -> String
showsPrec :: Int -> AssociateWebsiteCertificateAuthorityResponse -> ShowS
$cshowsPrec :: Int -> AssociateWebsiteCertificateAuthorityResponse -> ShowS
Prelude.Show, (forall x.
 AssociateWebsiteCertificateAuthorityResponse
 -> Rep AssociateWebsiteCertificateAuthorityResponse x)
-> (forall x.
    Rep AssociateWebsiteCertificateAuthorityResponse x
    -> AssociateWebsiteCertificateAuthorityResponse)
-> Generic AssociateWebsiteCertificateAuthorityResponse
forall x.
Rep AssociateWebsiteCertificateAuthorityResponse x
-> AssociateWebsiteCertificateAuthorityResponse
forall x.
AssociateWebsiteCertificateAuthorityResponse
-> Rep AssociateWebsiteCertificateAuthorityResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateWebsiteCertificateAuthorityResponse x
-> AssociateWebsiteCertificateAuthorityResponse
$cfrom :: forall x.
AssociateWebsiteCertificateAuthorityResponse
-> Rep AssociateWebsiteCertificateAuthorityResponse x
Prelude.Generic)

-- |
-- Create a value of 'AssociateWebsiteCertificateAuthorityResponse' 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:
--
-- 'websiteCaId', 'associateWebsiteCertificateAuthorityResponse_websiteCaId' - A unique identifier for the CA.
--
-- 'httpStatus', 'associateWebsiteCertificateAuthorityResponse_httpStatus' - The response's http status code.
newAssociateWebsiteCertificateAuthorityResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AssociateWebsiteCertificateAuthorityResponse
newAssociateWebsiteCertificateAuthorityResponse :: Int -> AssociateWebsiteCertificateAuthorityResponse
newAssociateWebsiteCertificateAuthorityResponse
  Int
pHttpStatus_ =
    AssociateWebsiteCertificateAuthorityResponse' :: Maybe Text -> Int -> AssociateWebsiteCertificateAuthorityResponse
AssociateWebsiteCertificateAuthorityResponse'
      { $sel:websiteCaId:AssociateWebsiteCertificateAuthorityResponse' :: Maybe Text
websiteCaId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:AssociateWebsiteCertificateAuthorityResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | A unique identifier for the CA.
associateWebsiteCertificateAuthorityResponse_websiteCaId :: Lens.Lens' AssociateWebsiteCertificateAuthorityResponse (Prelude.Maybe Prelude.Text)
associateWebsiteCertificateAuthorityResponse_websiteCaId :: (Maybe Text -> f (Maybe Text))
-> AssociateWebsiteCertificateAuthorityResponse
-> f AssociateWebsiteCertificateAuthorityResponse
associateWebsiteCertificateAuthorityResponse_websiteCaId = (AssociateWebsiteCertificateAuthorityResponse -> Maybe Text)
-> (AssociateWebsiteCertificateAuthorityResponse
    -> Maybe Text -> AssociateWebsiteCertificateAuthorityResponse)
-> Lens
     AssociateWebsiteCertificateAuthorityResponse
     AssociateWebsiteCertificateAuthorityResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateWebsiteCertificateAuthorityResponse' {Maybe Text
websiteCaId :: Maybe Text
$sel:websiteCaId:AssociateWebsiteCertificateAuthorityResponse' :: AssociateWebsiteCertificateAuthorityResponse -> Maybe Text
websiteCaId} -> Maybe Text
websiteCaId) (\s :: AssociateWebsiteCertificateAuthorityResponse
s@AssociateWebsiteCertificateAuthorityResponse' {} Maybe Text
a -> AssociateWebsiteCertificateAuthorityResponse
s {$sel:websiteCaId:AssociateWebsiteCertificateAuthorityResponse' :: Maybe Text
websiteCaId = Maybe Text
a} :: AssociateWebsiteCertificateAuthorityResponse)

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

instance
  Prelude.NFData
    AssociateWebsiteCertificateAuthorityResponse