{-# 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.OpsWorksCM.DescribeNodeAssociationStatus
-- 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)
--
-- Returns the current status of an existing association or disassociation
-- request.
--
-- A @ResourceNotFoundException@ is thrown when no recent association or
-- disassociation request with the specified token is found, or when the
-- server does not exist. A @ValidationException@ is raised when parameters
-- of the request are not valid.
module Amazonka.OpsWorksCM.DescribeNodeAssociationStatus
  ( -- * Creating a Request
    DescribeNodeAssociationStatus (..),
    newDescribeNodeAssociationStatus,

    -- * Request Lenses
    describeNodeAssociationStatus_nodeAssociationStatusToken,
    describeNodeAssociationStatus_serverName,

    -- * Destructuring the Response
    DescribeNodeAssociationStatusResponse (..),
    newDescribeNodeAssociationStatusResponse,

    -- * Response Lenses
    describeNodeAssociationStatusResponse_engineAttributes,
    describeNodeAssociationStatusResponse_httpStatus,
    describeNodeAssociationStatusResponse_nodeAssociationStatus,
  )
where

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

-- | /See:/ 'newDescribeNodeAssociationStatus' smart constructor.
data DescribeNodeAssociationStatus = DescribeNodeAssociationStatus'
  { -- | The token returned in either the AssociateNodeResponse or the
    -- DisassociateNodeResponse.
    DescribeNodeAssociationStatus -> Text
nodeAssociationStatusToken :: Prelude.Text,
    -- | The name of the server from which to disassociate the node.
    DescribeNodeAssociationStatus -> Text
serverName :: Prelude.Text
  }
  deriving (DescribeNodeAssociationStatus
-> DescribeNodeAssociationStatus -> Bool
(DescribeNodeAssociationStatus
 -> DescribeNodeAssociationStatus -> Bool)
-> (DescribeNodeAssociationStatus
    -> DescribeNodeAssociationStatus -> Bool)
-> Eq DescribeNodeAssociationStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeNodeAssociationStatus
-> DescribeNodeAssociationStatus -> Bool
$c/= :: DescribeNodeAssociationStatus
-> DescribeNodeAssociationStatus -> Bool
== :: DescribeNodeAssociationStatus
-> DescribeNodeAssociationStatus -> Bool
$c== :: DescribeNodeAssociationStatus
-> DescribeNodeAssociationStatus -> Bool
Prelude.Eq, ReadPrec [DescribeNodeAssociationStatus]
ReadPrec DescribeNodeAssociationStatus
Int -> ReadS DescribeNodeAssociationStatus
ReadS [DescribeNodeAssociationStatus]
(Int -> ReadS DescribeNodeAssociationStatus)
-> ReadS [DescribeNodeAssociationStatus]
-> ReadPrec DescribeNodeAssociationStatus
-> ReadPrec [DescribeNodeAssociationStatus]
-> Read DescribeNodeAssociationStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeNodeAssociationStatus]
$creadListPrec :: ReadPrec [DescribeNodeAssociationStatus]
readPrec :: ReadPrec DescribeNodeAssociationStatus
$creadPrec :: ReadPrec DescribeNodeAssociationStatus
readList :: ReadS [DescribeNodeAssociationStatus]
$creadList :: ReadS [DescribeNodeAssociationStatus]
readsPrec :: Int -> ReadS DescribeNodeAssociationStatus
$creadsPrec :: Int -> ReadS DescribeNodeAssociationStatus
Prelude.Read, Int -> DescribeNodeAssociationStatus -> ShowS
[DescribeNodeAssociationStatus] -> ShowS
DescribeNodeAssociationStatus -> String
(Int -> DescribeNodeAssociationStatus -> ShowS)
-> (DescribeNodeAssociationStatus -> String)
-> ([DescribeNodeAssociationStatus] -> ShowS)
-> Show DescribeNodeAssociationStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeNodeAssociationStatus] -> ShowS
$cshowList :: [DescribeNodeAssociationStatus] -> ShowS
show :: DescribeNodeAssociationStatus -> String
$cshow :: DescribeNodeAssociationStatus -> String
showsPrec :: Int -> DescribeNodeAssociationStatus -> ShowS
$cshowsPrec :: Int -> DescribeNodeAssociationStatus -> ShowS
Prelude.Show, (forall x.
 DescribeNodeAssociationStatus
 -> Rep DescribeNodeAssociationStatus x)
-> (forall x.
    Rep DescribeNodeAssociationStatus x
    -> DescribeNodeAssociationStatus)
-> Generic DescribeNodeAssociationStatus
forall x.
Rep DescribeNodeAssociationStatus x
-> DescribeNodeAssociationStatus
forall x.
DescribeNodeAssociationStatus
-> Rep DescribeNodeAssociationStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeNodeAssociationStatus x
-> DescribeNodeAssociationStatus
$cfrom :: forall x.
DescribeNodeAssociationStatus
-> Rep DescribeNodeAssociationStatus x
Prelude.Generic)

-- |
-- Create a value of 'DescribeNodeAssociationStatus' 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:
--
-- 'nodeAssociationStatusToken', 'describeNodeAssociationStatus_nodeAssociationStatusToken' - The token returned in either the AssociateNodeResponse or the
-- DisassociateNodeResponse.
--
-- 'serverName', 'describeNodeAssociationStatus_serverName' - The name of the server from which to disassociate the node.
newDescribeNodeAssociationStatus ::
  -- | 'nodeAssociationStatusToken'
  Prelude.Text ->
  -- | 'serverName'
  Prelude.Text ->
  DescribeNodeAssociationStatus
newDescribeNodeAssociationStatus :: Text -> Text -> DescribeNodeAssociationStatus
newDescribeNodeAssociationStatus
  Text
pNodeAssociationStatusToken_
  Text
pServerName_ =
    DescribeNodeAssociationStatus' :: Text -> Text -> DescribeNodeAssociationStatus
DescribeNodeAssociationStatus'
      { $sel:nodeAssociationStatusToken:DescribeNodeAssociationStatus' :: Text
nodeAssociationStatusToken =
          Text
pNodeAssociationStatusToken_,
        $sel:serverName:DescribeNodeAssociationStatus' :: Text
serverName = Text
pServerName_
      }

-- | The token returned in either the AssociateNodeResponse or the
-- DisassociateNodeResponse.
describeNodeAssociationStatus_nodeAssociationStatusToken :: Lens.Lens' DescribeNodeAssociationStatus Prelude.Text
describeNodeAssociationStatus_nodeAssociationStatusToken :: (Text -> f Text)
-> DescribeNodeAssociationStatus -> f DescribeNodeAssociationStatus
describeNodeAssociationStatus_nodeAssociationStatusToken = (DescribeNodeAssociationStatus -> Text)
-> (DescribeNodeAssociationStatus
    -> Text -> DescribeNodeAssociationStatus)
-> Lens
     DescribeNodeAssociationStatus
     DescribeNodeAssociationStatus
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeAssociationStatus' {Text
nodeAssociationStatusToken :: Text
$sel:nodeAssociationStatusToken:DescribeNodeAssociationStatus' :: DescribeNodeAssociationStatus -> Text
nodeAssociationStatusToken} -> Text
nodeAssociationStatusToken) (\s :: DescribeNodeAssociationStatus
s@DescribeNodeAssociationStatus' {} Text
a -> DescribeNodeAssociationStatus
s {$sel:nodeAssociationStatusToken:DescribeNodeAssociationStatus' :: Text
nodeAssociationStatusToken = Text
a} :: DescribeNodeAssociationStatus)

-- | The name of the server from which to disassociate the node.
describeNodeAssociationStatus_serverName :: Lens.Lens' DescribeNodeAssociationStatus Prelude.Text
describeNodeAssociationStatus_serverName :: (Text -> f Text)
-> DescribeNodeAssociationStatus -> f DescribeNodeAssociationStatus
describeNodeAssociationStatus_serverName = (DescribeNodeAssociationStatus -> Text)
-> (DescribeNodeAssociationStatus
    -> Text -> DescribeNodeAssociationStatus)
-> Lens
     DescribeNodeAssociationStatus
     DescribeNodeAssociationStatus
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeAssociationStatus' {Text
serverName :: Text
$sel:serverName:DescribeNodeAssociationStatus' :: DescribeNodeAssociationStatus -> Text
serverName} -> Text
serverName) (\s :: DescribeNodeAssociationStatus
s@DescribeNodeAssociationStatus' {} Text
a -> DescribeNodeAssociationStatus
s {$sel:serverName:DescribeNodeAssociationStatus' :: Text
serverName = Text
a} :: DescribeNodeAssociationStatus)

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

instance
  Prelude.Hashable
    DescribeNodeAssociationStatus

instance Prelude.NFData DescribeNodeAssociationStatus

instance Core.ToHeaders DescribeNodeAssociationStatus where
  toHeaders :: DescribeNodeAssociationStatus -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeNodeAssociationStatus -> 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
"OpsWorksCM_V2016_11_01.DescribeNodeAssociationStatus" ::
                          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 DescribeNodeAssociationStatus where
  toJSON :: DescribeNodeAssociationStatus -> Value
toJSON DescribeNodeAssociationStatus' {Text
serverName :: Text
nodeAssociationStatusToken :: Text
$sel:serverName:DescribeNodeAssociationStatus' :: DescribeNodeAssociationStatus -> Text
$sel:nodeAssociationStatusToken:DescribeNodeAssociationStatus' :: DescribeNodeAssociationStatus -> 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
"NodeAssociationStatusToken"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
nodeAssociationStatusToken
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ServerName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serverName)
          ]
      )

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

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

-- | /See:/ 'newDescribeNodeAssociationStatusResponse' smart constructor.
data DescribeNodeAssociationStatusResponse = DescribeNodeAssociationStatusResponse'
  { -- | Attributes specific to the node association. In Puppet, the attibute
    -- PUPPET_NODE_CERT contains the signed certificate (the result of the
    -- CSR).
    DescribeNodeAssociationStatusResponse -> Maybe [EngineAttribute]
engineAttributes :: Prelude.Maybe [EngineAttribute],
    -- | The response's http status code.
    DescribeNodeAssociationStatusResponse -> Int
httpStatus :: Prelude.Int,
    -- | The status of the association or disassociation request.
    --
    -- __Possible values:__
    --
    -- -   @SUCCESS@: The association or disassociation succeeded.
    --
    -- -   @FAILED@: The association or disassociation failed.
    --
    -- -   @IN_PROGRESS@: The association or disassociation is still in
    --     progress.
    DescribeNodeAssociationStatusResponse -> NodeAssociationStatus
nodeAssociationStatus :: NodeAssociationStatus
  }
  deriving (DescribeNodeAssociationStatusResponse
-> DescribeNodeAssociationStatusResponse -> Bool
(DescribeNodeAssociationStatusResponse
 -> DescribeNodeAssociationStatusResponse -> Bool)
-> (DescribeNodeAssociationStatusResponse
    -> DescribeNodeAssociationStatusResponse -> Bool)
-> Eq DescribeNodeAssociationStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeNodeAssociationStatusResponse
-> DescribeNodeAssociationStatusResponse -> Bool
$c/= :: DescribeNodeAssociationStatusResponse
-> DescribeNodeAssociationStatusResponse -> Bool
== :: DescribeNodeAssociationStatusResponse
-> DescribeNodeAssociationStatusResponse -> Bool
$c== :: DescribeNodeAssociationStatusResponse
-> DescribeNodeAssociationStatusResponse -> Bool
Prelude.Eq, Int -> DescribeNodeAssociationStatusResponse -> ShowS
[DescribeNodeAssociationStatusResponse] -> ShowS
DescribeNodeAssociationStatusResponse -> String
(Int -> DescribeNodeAssociationStatusResponse -> ShowS)
-> (DescribeNodeAssociationStatusResponse -> String)
-> ([DescribeNodeAssociationStatusResponse] -> ShowS)
-> Show DescribeNodeAssociationStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeNodeAssociationStatusResponse] -> ShowS
$cshowList :: [DescribeNodeAssociationStatusResponse] -> ShowS
show :: DescribeNodeAssociationStatusResponse -> String
$cshow :: DescribeNodeAssociationStatusResponse -> String
showsPrec :: Int -> DescribeNodeAssociationStatusResponse -> ShowS
$cshowsPrec :: Int -> DescribeNodeAssociationStatusResponse -> ShowS
Prelude.Show, (forall x.
 DescribeNodeAssociationStatusResponse
 -> Rep DescribeNodeAssociationStatusResponse x)
-> (forall x.
    Rep DescribeNodeAssociationStatusResponse x
    -> DescribeNodeAssociationStatusResponse)
-> Generic DescribeNodeAssociationStatusResponse
forall x.
Rep DescribeNodeAssociationStatusResponse x
-> DescribeNodeAssociationStatusResponse
forall x.
DescribeNodeAssociationStatusResponse
-> Rep DescribeNodeAssociationStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeNodeAssociationStatusResponse x
-> DescribeNodeAssociationStatusResponse
$cfrom :: forall x.
DescribeNodeAssociationStatusResponse
-> Rep DescribeNodeAssociationStatusResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeNodeAssociationStatusResponse' 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:
--
-- 'engineAttributes', 'describeNodeAssociationStatusResponse_engineAttributes' - Attributes specific to the node association. In Puppet, the attibute
-- PUPPET_NODE_CERT contains the signed certificate (the result of the
-- CSR).
--
-- 'httpStatus', 'describeNodeAssociationStatusResponse_httpStatus' - The response's http status code.
--
-- 'nodeAssociationStatus', 'describeNodeAssociationStatusResponse_nodeAssociationStatus' - The status of the association or disassociation request.
--
-- __Possible values:__
--
-- -   @SUCCESS@: The association or disassociation succeeded.
--
-- -   @FAILED@: The association or disassociation failed.
--
-- -   @IN_PROGRESS@: The association or disassociation is still in
--     progress.
newDescribeNodeAssociationStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'nodeAssociationStatus'
  NodeAssociationStatus ->
  DescribeNodeAssociationStatusResponse
newDescribeNodeAssociationStatusResponse :: Int
-> NodeAssociationStatus -> DescribeNodeAssociationStatusResponse
newDescribeNodeAssociationStatusResponse
  Int
pHttpStatus_
  NodeAssociationStatus
pNodeAssociationStatus_ =
    DescribeNodeAssociationStatusResponse' :: Maybe [EngineAttribute]
-> Int
-> NodeAssociationStatus
-> DescribeNodeAssociationStatusResponse
DescribeNodeAssociationStatusResponse'
      { $sel:engineAttributes:DescribeNodeAssociationStatusResponse' :: Maybe [EngineAttribute]
engineAttributes =
          Maybe [EngineAttribute]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeNodeAssociationStatusResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:nodeAssociationStatus:DescribeNodeAssociationStatusResponse' :: NodeAssociationStatus
nodeAssociationStatus =
          NodeAssociationStatus
pNodeAssociationStatus_
      }

-- | Attributes specific to the node association. In Puppet, the attibute
-- PUPPET_NODE_CERT contains the signed certificate (the result of the
-- CSR).
describeNodeAssociationStatusResponse_engineAttributes :: Lens.Lens' DescribeNodeAssociationStatusResponse (Prelude.Maybe [EngineAttribute])
describeNodeAssociationStatusResponse_engineAttributes :: (Maybe [EngineAttribute] -> f (Maybe [EngineAttribute]))
-> DescribeNodeAssociationStatusResponse
-> f DescribeNodeAssociationStatusResponse
describeNodeAssociationStatusResponse_engineAttributes = (DescribeNodeAssociationStatusResponse -> Maybe [EngineAttribute])
-> (DescribeNodeAssociationStatusResponse
    -> Maybe [EngineAttribute]
    -> DescribeNodeAssociationStatusResponse)
-> Lens
     DescribeNodeAssociationStatusResponse
     DescribeNodeAssociationStatusResponse
     (Maybe [EngineAttribute])
     (Maybe [EngineAttribute])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeAssociationStatusResponse' {Maybe [EngineAttribute]
engineAttributes :: Maybe [EngineAttribute]
$sel:engineAttributes:DescribeNodeAssociationStatusResponse' :: DescribeNodeAssociationStatusResponse -> Maybe [EngineAttribute]
engineAttributes} -> Maybe [EngineAttribute]
engineAttributes) (\s :: DescribeNodeAssociationStatusResponse
s@DescribeNodeAssociationStatusResponse' {} Maybe [EngineAttribute]
a -> DescribeNodeAssociationStatusResponse
s {$sel:engineAttributes:DescribeNodeAssociationStatusResponse' :: Maybe [EngineAttribute]
engineAttributes = Maybe [EngineAttribute]
a} :: DescribeNodeAssociationStatusResponse) ((Maybe [EngineAttribute] -> f (Maybe [EngineAttribute]))
 -> DescribeNodeAssociationStatusResponse
 -> f DescribeNodeAssociationStatusResponse)
-> ((Maybe [EngineAttribute] -> f (Maybe [EngineAttribute]))
    -> Maybe [EngineAttribute] -> f (Maybe [EngineAttribute]))
-> (Maybe [EngineAttribute] -> f (Maybe [EngineAttribute]))
-> DescribeNodeAssociationStatusResponse
-> f DescribeNodeAssociationStatusResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EngineAttribute]
  [EngineAttribute]
  [EngineAttribute]
  [EngineAttribute]
-> Iso
     (Maybe [EngineAttribute])
     (Maybe [EngineAttribute])
     (Maybe [EngineAttribute])
     (Maybe [EngineAttribute])
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
  [EngineAttribute]
  [EngineAttribute]
  [EngineAttribute]
  [EngineAttribute]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The status of the association or disassociation request.
--
-- __Possible values:__
--
-- -   @SUCCESS@: The association or disassociation succeeded.
--
-- -   @FAILED@: The association or disassociation failed.
--
-- -   @IN_PROGRESS@: The association or disassociation is still in
--     progress.
describeNodeAssociationStatusResponse_nodeAssociationStatus :: Lens.Lens' DescribeNodeAssociationStatusResponse NodeAssociationStatus
describeNodeAssociationStatusResponse_nodeAssociationStatus :: (NodeAssociationStatus -> f NodeAssociationStatus)
-> DescribeNodeAssociationStatusResponse
-> f DescribeNodeAssociationStatusResponse
describeNodeAssociationStatusResponse_nodeAssociationStatus = (DescribeNodeAssociationStatusResponse -> NodeAssociationStatus)
-> (DescribeNodeAssociationStatusResponse
    -> NodeAssociationStatus -> DescribeNodeAssociationStatusResponse)
-> Lens
     DescribeNodeAssociationStatusResponse
     DescribeNodeAssociationStatusResponse
     NodeAssociationStatus
     NodeAssociationStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeAssociationStatusResponse' {NodeAssociationStatus
nodeAssociationStatus :: NodeAssociationStatus
$sel:nodeAssociationStatus:DescribeNodeAssociationStatusResponse' :: DescribeNodeAssociationStatusResponse -> NodeAssociationStatus
nodeAssociationStatus} -> NodeAssociationStatus
nodeAssociationStatus) (\s :: DescribeNodeAssociationStatusResponse
s@DescribeNodeAssociationStatusResponse' {} NodeAssociationStatus
a -> DescribeNodeAssociationStatusResponse
s {$sel:nodeAssociationStatus:DescribeNodeAssociationStatusResponse' :: NodeAssociationStatus
nodeAssociationStatus = NodeAssociationStatus
a} :: DescribeNodeAssociationStatusResponse)

instance
  Prelude.NFData
    DescribeNodeAssociationStatusResponse