{-# 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.Lightsail.AttachLoadBalancerTlsCertificate
-- 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)
--
-- Attaches a Transport Layer Security (TLS) certificate to your load
-- balancer. TLS is just an updated, more secure version of Secure Socket
-- Layer (SSL).
--
-- Once you create and validate your certificate, you can attach it to your
-- load balancer. You can also use this API to rotate the certificates on
-- your account. Use the @AttachLoadBalancerTlsCertificate@ action with the
-- non-attached certificate, and it will replace the existing one and
-- become the attached certificate.
--
-- The @AttachLoadBalancerTlsCertificate@ operation supports tag-based
-- access control via resource tags applied to the resource identified by
-- @load balancer name@. For more information, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags Amazon Lightsail Developer Guide>.
module Amazonka.Lightsail.AttachLoadBalancerTlsCertificate
  ( -- * Creating a Request
    AttachLoadBalancerTlsCertificate (..),
    newAttachLoadBalancerTlsCertificate,

    -- * Request Lenses
    attachLoadBalancerTlsCertificate_loadBalancerName,
    attachLoadBalancerTlsCertificate_certificateName,

    -- * Destructuring the Response
    AttachLoadBalancerTlsCertificateResponse (..),
    newAttachLoadBalancerTlsCertificateResponse,

    -- * Response Lenses
    attachLoadBalancerTlsCertificateResponse_operations,
    attachLoadBalancerTlsCertificateResponse_httpStatus,
  )
where

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

-- | /See:/ 'newAttachLoadBalancerTlsCertificate' smart constructor.
data AttachLoadBalancerTlsCertificate = AttachLoadBalancerTlsCertificate'
  { -- | The name of the load balancer to which you want to associate the
    -- SSL\/TLS certificate.
    AttachLoadBalancerTlsCertificate -> Text
loadBalancerName :: Prelude.Text,
    -- | The name of your SSL\/TLS certificate.
    AttachLoadBalancerTlsCertificate -> Text
certificateName :: Prelude.Text
  }
  deriving (AttachLoadBalancerTlsCertificate
-> AttachLoadBalancerTlsCertificate -> Bool
(AttachLoadBalancerTlsCertificate
 -> AttachLoadBalancerTlsCertificate -> Bool)
-> (AttachLoadBalancerTlsCertificate
    -> AttachLoadBalancerTlsCertificate -> Bool)
-> Eq AttachLoadBalancerTlsCertificate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttachLoadBalancerTlsCertificate
-> AttachLoadBalancerTlsCertificate -> Bool
$c/= :: AttachLoadBalancerTlsCertificate
-> AttachLoadBalancerTlsCertificate -> Bool
== :: AttachLoadBalancerTlsCertificate
-> AttachLoadBalancerTlsCertificate -> Bool
$c== :: AttachLoadBalancerTlsCertificate
-> AttachLoadBalancerTlsCertificate -> Bool
Prelude.Eq, ReadPrec [AttachLoadBalancerTlsCertificate]
ReadPrec AttachLoadBalancerTlsCertificate
Int -> ReadS AttachLoadBalancerTlsCertificate
ReadS [AttachLoadBalancerTlsCertificate]
(Int -> ReadS AttachLoadBalancerTlsCertificate)
-> ReadS [AttachLoadBalancerTlsCertificate]
-> ReadPrec AttachLoadBalancerTlsCertificate
-> ReadPrec [AttachLoadBalancerTlsCertificate]
-> Read AttachLoadBalancerTlsCertificate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttachLoadBalancerTlsCertificate]
$creadListPrec :: ReadPrec [AttachLoadBalancerTlsCertificate]
readPrec :: ReadPrec AttachLoadBalancerTlsCertificate
$creadPrec :: ReadPrec AttachLoadBalancerTlsCertificate
readList :: ReadS [AttachLoadBalancerTlsCertificate]
$creadList :: ReadS [AttachLoadBalancerTlsCertificate]
readsPrec :: Int -> ReadS AttachLoadBalancerTlsCertificate
$creadsPrec :: Int -> ReadS AttachLoadBalancerTlsCertificate
Prelude.Read, Int -> AttachLoadBalancerTlsCertificate -> ShowS
[AttachLoadBalancerTlsCertificate] -> ShowS
AttachLoadBalancerTlsCertificate -> String
(Int -> AttachLoadBalancerTlsCertificate -> ShowS)
-> (AttachLoadBalancerTlsCertificate -> String)
-> ([AttachLoadBalancerTlsCertificate] -> ShowS)
-> Show AttachLoadBalancerTlsCertificate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttachLoadBalancerTlsCertificate] -> ShowS
$cshowList :: [AttachLoadBalancerTlsCertificate] -> ShowS
show :: AttachLoadBalancerTlsCertificate -> String
$cshow :: AttachLoadBalancerTlsCertificate -> String
showsPrec :: Int -> AttachLoadBalancerTlsCertificate -> ShowS
$cshowsPrec :: Int -> AttachLoadBalancerTlsCertificate -> ShowS
Prelude.Show, (forall x.
 AttachLoadBalancerTlsCertificate
 -> Rep AttachLoadBalancerTlsCertificate x)
-> (forall x.
    Rep AttachLoadBalancerTlsCertificate x
    -> AttachLoadBalancerTlsCertificate)
-> Generic AttachLoadBalancerTlsCertificate
forall x.
Rep AttachLoadBalancerTlsCertificate x
-> AttachLoadBalancerTlsCertificate
forall x.
AttachLoadBalancerTlsCertificate
-> Rep AttachLoadBalancerTlsCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AttachLoadBalancerTlsCertificate x
-> AttachLoadBalancerTlsCertificate
$cfrom :: forall x.
AttachLoadBalancerTlsCertificate
-> Rep AttachLoadBalancerTlsCertificate x
Prelude.Generic)

-- |
-- Create a value of 'AttachLoadBalancerTlsCertificate' 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:
--
-- 'loadBalancerName', 'attachLoadBalancerTlsCertificate_loadBalancerName' - The name of the load balancer to which you want to associate the
-- SSL\/TLS certificate.
--
-- 'certificateName', 'attachLoadBalancerTlsCertificate_certificateName' - The name of your SSL\/TLS certificate.
newAttachLoadBalancerTlsCertificate ::
  -- | 'loadBalancerName'
  Prelude.Text ->
  -- | 'certificateName'
  Prelude.Text ->
  AttachLoadBalancerTlsCertificate
newAttachLoadBalancerTlsCertificate :: Text -> Text -> AttachLoadBalancerTlsCertificate
newAttachLoadBalancerTlsCertificate
  Text
pLoadBalancerName_
  Text
pCertificateName_ =
    AttachLoadBalancerTlsCertificate' :: Text -> Text -> AttachLoadBalancerTlsCertificate
AttachLoadBalancerTlsCertificate'
      { $sel:loadBalancerName:AttachLoadBalancerTlsCertificate' :: Text
loadBalancerName =
          Text
pLoadBalancerName_,
        $sel:certificateName:AttachLoadBalancerTlsCertificate' :: Text
certificateName = Text
pCertificateName_
      }

-- | The name of the load balancer to which you want to associate the
-- SSL\/TLS certificate.
attachLoadBalancerTlsCertificate_loadBalancerName :: Lens.Lens' AttachLoadBalancerTlsCertificate Prelude.Text
attachLoadBalancerTlsCertificate_loadBalancerName :: (Text -> f Text)
-> AttachLoadBalancerTlsCertificate
-> f AttachLoadBalancerTlsCertificate
attachLoadBalancerTlsCertificate_loadBalancerName = (AttachLoadBalancerTlsCertificate -> Text)
-> (AttachLoadBalancerTlsCertificate
    -> Text -> AttachLoadBalancerTlsCertificate)
-> Lens
     AttachLoadBalancerTlsCertificate
     AttachLoadBalancerTlsCertificate
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttachLoadBalancerTlsCertificate' {Text
loadBalancerName :: Text
$sel:loadBalancerName:AttachLoadBalancerTlsCertificate' :: AttachLoadBalancerTlsCertificate -> Text
loadBalancerName} -> Text
loadBalancerName) (\s :: AttachLoadBalancerTlsCertificate
s@AttachLoadBalancerTlsCertificate' {} Text
a -> AttachLoadBalancerTlsCertificate
s {$sel:loadBalancerName:AttachLoadBalancerTlsCertificate' :: Text
loadBalancerName = Text
a} :: AttachLoadBalancerTlsCertificate)

-- | The name of your SSL\/TLS certificate.
attachLoadBalancerTlsCertificate_certificateName :: Lens.Lens' AttachLoadBalancerTlsCertificate Prelude.Text
attachLoadBalancerTlsCertificate_certificateName :: (Text -> f Text)
-> AttachLoadBalancerTlsCertificate
-> f AttachLoadBalancerTlsCertificate
attachLoadBalancerTlsCertificate_certificateName = (AttachLoadBalancerTlsCertificate -> Text)
-> (AttachLoadBalancerTlsCertificate
    -> Text -> AttachLoadBalancerTlsCertificate)
-> Lens
     AttachLoadBalancerTlsCertificate
     AttachLoadBalancerTlsCertificate
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttachLoadBalancerTlsCertificate' {Text
certificateName :: Text
$sel:certificateName:AttachLoadBalancerTlsCertificate' :: AttachLoadBalancerTlsCertificate -> Text
certificateName} -> Text
certificateName) (\s :: AttachLoadBalancerTlsCertificate
s@AttachLoadBalancerTlsCertificate' {} Text
a -> AttachLoadBalancerTlsCertificate
s {$sel:certificateName:AttachLoadBalancerTlsCertificate' :: Text
certificateName = Text
a} :: AttachLoadBalancerTlsCertificate)

instance
  Core.AWSRequest
    AttachLoadBalancerTlsCertificate
  where
  type
    AWSResponse AttachLoadBalancerTlsCertificate =
      AttachLoadBalancerTlsCertificateResponse
  request :: AttachLoadBalancerTlsCertificate
-> Request AttachLoadBalancerTlsCertificate
request = Service
-> AttachLoadBalancerTlsCertificate
-> Request AttachLoadBalancerTlsCertificate
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AttachLoadBalancerTlsCertificate
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse AttachLoadBalancerTlsCertificate)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse AttachLoadBalancerTlsCertificate))
-> Logger
-> Service
-> Proxy AttachLoadBalancerTlsCertificate
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse AttachLoadBalancerTlsCertificate)))
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 [Operation]
-> Int -> AttachLoadBalancerTlsCertificateResponse
AttachLoadBalancerTlsCertificateResponse'
            (Maybe [Operation]
 -> Int -> AttachLoadBalancerTlsCertificateResponse)
-> Either String (Maybe [Operation])
-> Either String (Int -> AttachLoadBalancerTlsCertificateResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Operation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"operations" Either String (Maybe (Maybe [Operation]))
-> Maybe [Operation] -> Either String (Maybe [Operation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Operation]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> AttachLoadBalancerTlsCertificateResponse)
-> Either String Int
-> Either String AttachLoadBalancerTlsCertificateResponse
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
    AttachLoadBalancerTlsCertificate

instance
  Prelude.NFData
    AttachLoadBalancerTlsCertificate

instance
  Core.ToHeaders
    AttachLoadBalancerTlsCertificate
  where
  toHeaders :: AttachLoadBalancerTlsCertificate -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> AttachLoadBalancerTlsCertificate -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Lightsail_20161128.AttachLoadBalancerTlsCertificate" ::
                          Prelude.ByteString
                      ),
            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 AttachLoadBalancerTlsCertificate where
  toJSON :: AttachLoadBalancerTlsCertificate -> Value
toJSON AttachLoadBalancerTlsCertificate' {Text
certificateName :: Text
loadBalancerName :: Text
$sel:certificateName:AttachLoadBalancerTlsCertificate' :: AttachLoadBalancerTlsCertificate -> Text
$sel:loadBalancerName:AttachLoadBalancerTlsCertificate' :: AttachLoadBalancerTlsCertificate -> 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
"loadBalancerName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
loadBalancerName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"certificateName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
certificateName)
          ]
      )

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

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

-- | /See:/ 'newAttachLoadBalancerTlsCertificateResponse' smart constructor.
data AttachLoadBalancerTlsCertificateResponse = AttachLoadBalancerTlsCertificateResponse'
  { -- | An array of objects that describe the result of the action, such as the
    -- status of the request, the timestamp of the request, and the resources
    -- affected by the request.
    --
    -- These SSL\/TLS certificates are only usable by Lightsail load balancers.
    -- You can\'t get the certificate and use it for another purpose.
    AttachLoadBalancerTlsCertificateResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
    -- | The response's http status code.
    AttachLoadBalancerTlsCertificateResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AttachLoadBalancerTlsCertificateResponse
-> AttachLoadBalancerTlsCertificateResponse -> Bool
(AttachLoadBalancerTlsCertificateResponse
 -> AttachLoadBalancerTlsCertificateResponse -> Bool)
-> (AttachLoadBalancerTlsCertificateResponse
    -> AttachLoadBalancerTlsCertificateResponse -> Bool)
-> Eq AttachLoadBalancerTlsCertificateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttachLoadBalancerTlsCertificateResponse
-> AttachLoadBalancerTlsCertificateResponse -> Bool
$c/= :: AttachLoadBalancerTlsCertificateResponse
-> AttachLoadBalancerTlsCertificateResponse -> Bool
== :: AttachLoadBalancerTlsCertificateResponse
-> AttachLoadBalancerTlsCertificateResponse -> Bool
$c== :: AttachLoadBalancerTlsCertificateResponse
-> AttachLoadBalancerTlsCertificateResponse -> Bool
Prelude.Eq, ReadPrec [AttachLoadBalancerTlsCertificateResponse]
ReadPrec AttachLoadBalancerTlsCertificateResponse
Int -> ReadS AttachLoadBalancerTlsCertificateResponse
ReadS [AttachLoadBalancerTlsCertificateResponse]
(Int -> ReadS AttachLoadBalancerTlsCertificateResponse)
-> ReadS [AttachLoadBalancerTlsCertificateResponse]
-> ReadPrec AttachLoadBalancerTlsCertificateResponse
-> ReadPrec [AttachLoadBalancerTlsCertificateResponse]
-> Read AttachLoadBalancerTlsCertificateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttachLoadBalancerTlsCertificateResponse]
$creadListPrec :: ReadPrec [AttachLoadBalancerTlsCertificateResponse]
readPrec :: ReadPrec AttachLoadBalancerTlsCertificateResponse
$creadPrec :: ReadPrec AttachLoadBalancerTlsCertificateResponse
readList :: ReadS [AttachLoadBalancerTlsCertificateResponse]
$creadList :: ReadS [AttachLoadBalancerTlsCertificateResponse]
readsPrec :: Int -> ReadS AttachLoadBalancerTlsCertificateResponse
$creadsPrec :: Int -> ReadS AttachLoadBalancerTlsCertificateResponse
Prelude.Read, Int -> AttachLoadBalancerTlsCertificateResponse -> ShowS
[AttachLoadBalancerTlsCertificateResponse] -> ShowS
AttachLoadBalancerTlsCertificateResponse -> String
(Int -> AttachLoadBalancerTlsCertificateResponse -> ShowS)
-> (AttachLoadBalancerTlsCertificateResponse -> String)
-> ([AttachLoadBalancerTlsCertificateResponse] -> ShowS)
-> Show AttachLoadBalancerTlsCertificateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttachLoadBalancerTlsCertificateResponse] -> ShowS
$cshowList :: [AttachLoadBalancerTlsCertificateResponse] -> ShowS
show :: AttachLoadBalancerTlsCertificateResponse -> String
$cshow :: AttachLoadBalancerTlsCertificateResponse -> String
showsPrec :: Int -> AttachLoadBalancerTlsCertificateResponse -> ShowS
$cshowsPrec :: Int -> AttachLoadBalancerTlsCertificateResponse -> ShowS
Prelude.Show, (forall x.
 AttachLoadBalancerTlsCertificateResponse
 -> Rep AttachLoadBalancerTlsCertificateResponse x)
-> (forall x.
    Rep AttachLoadBalancerTlsCertificateResponse x
    -> AttachLoadBalancerTlsCertificateResponse)
-> Generic AttachLoadBalancerTlsCertificateResponse
forall x.
Rep AttachLoadBalancerTlsCertificateResponse x
-> AttachLoadBalancerTlsCertificateResponse
forall x.
AttachLoadBalancerTlsCertificateResponse
-> Rep AttachLoadBalancerTlsCertificateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AttachLoadBalancerTlsCertificateResponse x
-> AttachLoadBalancerTlsCertificateResponse
$cfrom :: forall x.
AttachLoadBalancerTlsCertificateResponse
-> Rep AttachLoadBalancerTlsCertificateResponse x
Prelude.Generic)

-- |
-- Create a value of 'AttachLoadBalancerTlsCertificateResponse' 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:
--
-- 'operations', 'attachLoadBalancerTlsCertificateResponse_operations' - An array of objects that describe the result of the action, such as the
-- status of the request, the timestamp of the request, and the resources
-- affected by the request.
--
-- These SSL\/TLS certificates are only usable by Lightsail load balancers.
-- You can\'t get the certificate and use it for another purpose.
--
-- 'httpStatus', 'attachLoadBalancerTlsCertificateResponse_httpStatus' - The response's http status code.
newAttachLoadBalancerTlsCertificateResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AttachLoadBalancerTlsCertificateResponse
newAttachLoadBalancerTlsCertificateResponse :: Int -> AttachLoadBalancerTlsCertificateResponse
newAttachLoadBalancerTlsCertificateResponse
  Int
pHttpStatus_ =
    AttachLoadBalancerTlsCertificateResponse' :: Maybe [Operation]
-> Int -> AttachLoadBalancerTlsCertificateResponse
AttachLoadBalancerTlsCertificateResponse'
      { $sel:operations:AttachLoadBalancerTlsCertificateResponse' :: Maybe [Operation]
operations =
          Maybe [Operation]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:AttachLoadBalancerTlsCertificateResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | An array of objects that describe the result of the action, such as the
-- status of the request, the timestamp of the request, and the resources
-- affected by the request.
--
-- These SSL\/TLS certificates are only usable by Lightsail load balancers.
-- You can\'t get the certificate and use it for another purpose.
attachLoadBalancerTlsCertificateResponse_operations :: Lens.Lens' AttachLoadBalancerTlsCertificateResponse (Prelude.Maybe [Operation])
attachLoadBalancerTlsCertificateResponse_operations :: (Maybe [Operation] -> f (Maybe [Operation]))
-> AttachLoadBalancerTlsCertificateResponse
-> f AttachLoadBalancerTlsCertificateResponse
attachLoadBalancerTlsCertificateResponse_operations = (AttachLoadBalancerTlsCertificateResponse -> Maybe [Operation])
-> (AttachLoadBalancerTlsCertificateResponse
    -> Maybe [Operation] -> AttachLoadBalancerTlsCertificateResponse)
-> Lens
     AttachLoadBalancerTlsCertificateResponse
     AttachLoadBalancerTlsCertificateResponse
     (Maybe [Operation])
     (Maybe [Operation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttachLoadBalancerTlsCertificateResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:AttachLoadBalancerTlsCertificateResponse' :: AttachLoadBalancerTlsCertificateResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: AttachLoadBalancerTlsCertificateResponse
s@AttachLoadBalancerTlsCertificateResponse' {} Maybe [Operation]
a -> AttachLoadBalancerTlsCertificateResponse
s {$sel:operations:AttachLoadBalancerTlsCertificateResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: AttachLoadBalancerTlsCertificateResponse) ((Maybe [Operation] -> f (Maybe [Operation]))
 -> AttachLoadBalancerTlsCertificateResponse
 -> f AttachLoadBalancerTlsCertificateResponse)
-> ((Maybe [Operation] -> f (Maybe [Operation]))
    -> Maybe [Operation] -> f (Maybe [Operation]))
-> (Maybe [Operation] -> f (Maybe [Operation]))
-> AttachLoadBalancerTlsCertificateResponse
-> f AttachLoadBalancerTlsCertificateResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Operation] [Operation] [Operation] [Operation]
-> Iso
     (Maybe [Operation])
     (Maybe [Operation])
     (Maybe [Operation])
     (Maybe [Operation])
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 [Operation] [Operation] [Operation] [Operation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    AttachLoadBalancerTlsCertificateResponse