{-# 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.Panorama.DescribeNode
-- 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 information about a node.
module Amazonka.Panorama.DescribeNode
  ( -- * Creating a Request
    DescribeNode (..),
    newDescribeNode,

    -- * Request Lenses
    describeNode_ownerAccount,
    describeNode_nodeId,

    -- * Destructuring the Response
    DescribeNodeResponse (..),
    newDescribeNodeResponse,

    -- * Response Lenses
    describeNodeResponse_assetName,
    describeNodeResponse_packageArn,
    describeNodeResponse_httpStatus,
    describeNodeResponse_nodeId,
    describeNodeResponse_name,
    describeNodeResponse_category,
    describeNodeResponse_ownerAccount,
    describeNodeResponse_packageName,
    describeNodeResponse_packageId,
    describeNodeResponse_packageVersion,
    describeNodeResponse_patchVersion,
    describeNodeResponse_nodeInterface,
    describeNodeResponse_description,
    describeNodeResponse_createdTime,
    describeNodeResponse_lastUpdatedTime,
  )
where

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

-- | /See:/ 'newDescribeNode' smart constructor.
data DescribeNode = DescribeNode'
  { -- | The account ID of the node\'s owner.
    DescribeNode -> Maybe Text
ownerAccount :: Prelude.Maybe Prelude.Text,
    -- | The node\'s ID.
    DescribeNode -> Text
nodeId :: Prelude.Text
  }
  deriving (DescribeNode -> DescribeNode -> Bool
(DescribeNode -> DescribeNode -> Bool)
-> (DescribeNode -> DescribeNode -> Bool) -> Eq DescribeNode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeNode -> DescribeNode -> Bool
$c/= :: DescribeNode -> DescribeNode -> Bool
== :: DescribeNode -> DescribeNode -> Bool
$c== :: DescribeNode -> DescribeNode -> Bool
Prelude.Eq, ReadPrec [DescribeNode]
ReadPrec DescribeNode
Int -> ReadS DescribeNode
ReadS [DescribeNode]
(Int -> ReadS DescribeNode)
-> ReadS [DescribeNode]
-> ReadPrec DescribeNode
-> ReadPrec [DescribeNode]
-> Read DescribeNode
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeNode]
$creadListPrec :: ReadPrec [DescribeNode]
readPrec :: ReadPrec DescribeNode
$creadPrec :: ReadPrec DescribeNode
readList :: ReadS [DescribeNode]
$creadList :: ReadS [DescribeNode]
readsPrec :: Int -> ReadS DescribeNode
$creadsPrec :: Int -> ReadS DescribeNode
Prelude.Read, Int -> DescribeNode -> ShowS
[DescribeNode] -> ShowS
DescribeNode -> String
(Int -> DescribeNode -> ShowS)
-> (DescribeNode -> String)
-> ([DescribeNode] -> ShowS)
-> Show DescribeNode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeNode] -> ShowS
$cshowList :: [DescribeNode] -> ShowS
show :: DescribeNode -> String
$cshow :: DescribeNode -> String
showsPrec :: Int -> DescribeNode -> ShowS
$cshowsPrec :: Int -> DescribeNode -> ShowS
Prelude.Show, (forall x. DescribeNode -> Rep DescribeNode x)
-> (forall x. Rep DescribeNode x -> DescribeNode)
-> Generic DescribeNode
forall x. Rep DescribeNode x -> DescribeNode
forall x. DescribeNode -> Rep DescribeNode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeNode x -> DescribeNode
$cfrom :: forall x. DescribeNode -> Rep DescribeNode x
Prelude.Generic)

-- |
-- Create a value of 'DescribeNode' 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:
--
-- 'ownerAccount', 'describeNode_ownerAccount' - The account ID of the node\'s owner.
--
-- 'nodeId', 'describeNode_nodeId' - The node\'s ID.
newDescribeNode ::
  -- | 'nodeId'
  Prelude.Text ->
  DescribeNode
newDescribeNode :: Text -> DescribeNode
newDescribeNode Text
pNodeId_ =
  DescribeNode' :: Maybe Text -> Text -> DescribeNode
DescribeNode'
    { $sel:ownerAccount:DescribeNode' :: Maybe Text
ownerAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeId:DescribeNode' :: Text
nodeId = Text
pNodeId_
    }

-- | The account ID of the node\'s owner.
describeNode_ownerAccount :: Lens.Lens' DescribeNode (Prelude.Maybe Prelude.Text)
describeNode_ownerAccount :: (Maybe Text -> f (Maybe Text)) -> DescribeNode -> f DescribeNode
describeNode_ownerAccount = (DescribeNode -> Maybe Text)
-> (DescribeNode -> Maybe Text -> DescribeNode)
-> Lens DescribeNode DescribeNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNode' {Maybe Text
ownerAccount :: Maybe Text
$sel:ownerAccount:DescribeNode' :: DescribeNode -> Maybe Text
ownerAccount} -> Maybe Text
ownerAccount) (\s :: DescribeNode
s@DescribeNode' {} Maybe Text
a -> DescribeNode
s {$sel:ownerAccount:DescribeNode' :: Maybe Text
ownerAccount = Maybe Text
a} :: DescribeNode)

-- | The node\'s ID.
describeNode_nodeId :: Lens.Lens' DescribeNode Prelude.Text
describeNode_nodeId :: (Text -> f Text) -> DescribeNode -> f DescribeNode
describeNode_nodeId = (DescribeNode -> Text)
-> (DescribeNode -> Text -> DescribeNode)
-> Lens DescribeNode DescribeNode Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNode' {Text
nodeId :: Text
$sel:nodeId:DescribeNode' :: DescribeNode -> Text
nodeId} -> Text
nodeId) (\s :: DescribeNode
s@DescribeNode' {} Text
a -> DescribeNode
s {$sel:nodeId:DescribeNode' :: Text
nodeId = Text
a} :: DescribeNode)

instance Core.AWSRequest DescribeNode where
  type AWSResponse DescribeNode = DescribeNodeResponse
  request :: DescribeNode -> Request DescribeNode
request = Service -> DescribeNode -> Request DescribeNode
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeNode
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeNode)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeNode))
-> Logger
-> Service
-> Proxy DescribeNode
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeNode)))
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
-> Maybe Text
-> Int
-> Text
-> Text
-> NodeCategory
-> Text
-> Text
-> Text
-> Text
-> Text
-> NodeInterface
-> Text
-> POSIX
-> POSIX
-> DescribeNodeResponse
DescribeNodeResponse'
            (Maybe Text
 -> Maybe Text
 -> Int
 -> Text
 -> Text
 -> NodeCategory
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> NodeInterface
 -> Text
 -> POSIX
 -> POSIX
 -> DescribeNodeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Int
      -> Text
      -> Text
      -> NodeCategory
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> NodeInterface
      -> Text
      -> POSIX
      -> POSIX
      -> DescribeNodeResponse)
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
"AssetName")
            Either
  String
  (Maybe Text
   -> Int
   -> Text
   -> Text
   -> NodeCategory
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> NodeInterface
   -> Text
   -> POSIX
   -> POSIX
   -> DescribeNodeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> Text
      -> Text
      -> NodeCategory
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> NodeInterface
      -> Text
      -> POSIX
      -> POSIX
      -> DescribeNodeResponse)
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
"PackageArn")
            Either
  String
  (Int
   -> Text
   -> Text
   -> NodeCategory
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> NodeInterface
   -> Text
   -> POSIX
   -> POSIX
   -> DescribeNodeResponse)
-> Either String Int
-> Either
     String
     (Text
      -> Text
      -> NodeCategory
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> NodeInterface
      -> Text
      -> POSIX
      -> POSIX
      -> DescribeNodeResponse)
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
  (Text
   -> Text
   -> NodeCategory
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> NodeInterface
   -> Text
   -> POSIX
   -> POSIX
   -> DescribeNodeResponse)
-> Either String Text
-> Either
     String
     (Text
      -> NodeCategory
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> NodeInterface
      -> Text
      -> POSIX
      -> POSIX
      -> DescribeNodeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"NodeId")
            Either
  String
  (Text
   -> NodeCategory
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> NodeInterface
   -> Text
   -> POSIX
   -> POSIX
   -> DescribeNodeResponse)
-> Either String Text
-> Either
     String
     (NodeCategory
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> NodeInterface
      -> Text
      -> POSIX
      -> POSIX
      -> DescribeNodeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Name")
            Either
  String
  (NodeCategory
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> NodeInterface
   -> Text
   -> POSIX
   -> POSIX
   -> DescribeNodeResponse)
-> Either String NodeCategory
-> Either
     String
     (Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> NodeInterface
      -> Text
      -> POSIX
      -> POSIX
      -> DescribeNodeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String NodeCategory
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Category")
            Either
  String
  (Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> NodeInterface
   -> Text
   -> POSIX
   -> POSIX
   -> DescribeNodeResponse)
-> Either String Text
-> Either
     String
     (Text
      -> Text
      -> Text
      -> Text
      -> NodeInterface
      -> Text
      -> POSIX
      -> POSIX
      -> DescribeNodeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"OwnerAccount")
            Either
  String
  (Text
   -> Text
   -> Text
   -> Text
   -> NodeInterface
   -> Text
   -> POSIX
   -> POSIX
   -> DescribeNodeResponse)
-> Either String Text
-> Either
     String
     (Text
      -> Text
      -> Text
      -> NodeInterface
      -> Text
      -> POSIX
      -> POSIX
      -> DescribeNodeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"PackageName")
            Either
  String
  (Text
   -> Text
   -> Text
   -> NodeInterface
   -> Text
   -> POSIX
   -> POSIX
   -> DescribeNodeResponse)
-> Either String Text
-> Either
     String
     (Text
      -> Text
      -> NodeInterface
      -> Text
      -> POSIX
      -> POSIX
      -> DescribeNodeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"PackageId")
            Either
  String
  (Text
   -> Text
   -> NodeInterface
   -> Text
   -> POSIX
   -> POSIX
   -> DescribeNodeResponse)
-> Either String Text
-> Either
     String
     (Text
      -> NodeInterface -> Text -> POSIX -> POSIX -> DescribeNodeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"PackageVersion")
            Either
  String
  (Text
   -> NodeInterface -> Text -> POSIX -> POSIX -> DescribeNodeResponse)
-> Either String Text
-> Either
     String
     (NodeInterface -> Text -> POSIX -> POSIX -> DescribeNodeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"PatchVersion")
            Either
  String
  (NodeInterface -> Text -> POSIX -> POSIX -> DescribeNodeResponse)
-> Either String NodeInterface
-> Either String (Text -> POSIX -> POSIX -> DescribeNodeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String NodeInterface
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"NodeInterface")
            Either String (Text -> POSIX -> POSIX -> DescribeNodeResponse)
-> Either String Text
-> Either String (POSIX -> POSIX -> DescribeNodeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Description")
            Either String (POSIX -> POSIX -> DescribeNodeResponse)
-> Either String POSIX
-> Either String (POSIX -> DescribeNodeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CreatedTime")
            Either String (POSIX -> DescribeNodeResponse)
-> Either String POSIX -> Either String DescribeNodeResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"LastUpdatedTime")
      )

instance Prelude.Hashable DescribeNode

instance Prelude.NFData DescribeNode

instance Core.ToHeaders DescribeNode where
  toHeaders :: DescribeNode -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeNode -> 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.ToPath DescribeNode where
  toPath :: DescribeNode -> ByteString
toPath DescribeNode' {Maybe Text
Text
nodeId :: Text
ownerAccount :: Maybe Text
$sel:nodeId:DescribeNode' :: DescribeNode -> Text
$sel:ownerAccount:DescribeNode' :: DescribeNode -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/nodes/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
nodeId]

instance Core.ToQuery DescribeNode where
  toQuery :: DescribeNode -> QueryString
toQuery DescribeNode' {Maybe Text
Text
nodeId :: Text
ownerAccount :: Maybe Text
$sel:nodeId:DescribeNode' :: DescribeNode -> Text
$sel:ownerAccount:DescribeNode' :: DescribeNode -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"OwnerAccount" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
ownerAccount]

-- | /See:/ 'newDescribeNodeResponse' smart constructor.
data DescribeNodeResponse = DescribeNodeResponse'
  { -- | The node\'s asset name.
    DescribeNodeResponse -> Maybe Text
assetName :: Prelude.Maybe Prelude.Text,
    -- | The node\'s ARN.
    DescribeNodeResponse -> Maybe Text
packageArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeNodeResponse -> Int
httpStatus :: Prelude.Int,
    -- | The node\'s ID.
    DescribeNodeResponse -> Text
nodeId :: Prelude.Text,
    -- | The node\'s name.
    DescribeNodeResponse -> Text
name :: Prelude.Text,
    -- | The node\'s category.
    DescribeNodeResponse -> NodeCategory
category :: NodeCategory,
    -- | The account ID of the node\'s owner.
    DescribeNodeResponse -> Text
ownerAccount :: Prelude.Text,
    -- | The node\'s package name.
    DescribeNodeResponse -> Text
packageName :: Prelude.Text,
    -- | The node\'s package ID.
    DescribeNodeResponse -> Text
packageId :: Prelude.Text,
    -- | The node\'s package version.
    DescribeNodeResponse -> Text
packageVersion :: Prelude.Text,
    -- | The node\'s patch version.
    DescribeNodeResponse -> Text
patchVersion :: Prelude.Text,
    -- | The node\'s interface.
    DescribeNodeResponse -> NodeInterface
nodeInterface :: NodeInterface,
    -- | The node\'s description.
    DescribeNodeResponse -> Text
description :: Prelude.Text,
    -- | When the node was created.
    DescribeNodeResponse -> POSIX
createdTime :: Core.POSIX,
    -- | When the node was updated.
    DescribeNodeResponse -> POSIX
lastUpdatedTime :: Core.POSIX
  }
  deriving (DescribeNodeResponse -> DescribeNodeResponse -> Bool
(DescribeNodeResponse -> DescribeNodeResponse -> Bool)
-> (DescribeNodeResponse -> DescribeNodeResponse -> Bool)
-> Eq DescribeNodeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeNodeResponse -> DescribeNodeResponse -> Bool
$c/= :: DescribeNodeResponse -> DescribeNodeResponse -> Bool
== :: DescribeNodeResponse -> DescribeNodeResponse -> Bool
$c== :: DescribeNodeResponse -> DescribeNodeResponse -> Bool
Prelude.Eq, ReadPrec [DescribeNodeResponse]
ReadPrec DescribeNodeResponse
Int -> ReadS DescribeNodeResponse
ReadS [DescribeNodeResponse]
(Int -> ReadS DescribeNodeResponse)
-> ReadS [DescribeNodeResponse]
-> ReadPrec DescribeNodeResponse
-> ReadPrec [DescribeNodeResponse]
-> Read DescribeNodeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeNodeResponse]
$creadListPrec :: ReadPrec [DescribeNodeResponse]
readPrec :: ReadPrec DescribeNodeResponse
$creadPrec :: ReadPrec DescribeNodeResponse
readList :: ReadS [DescribeNodeResponse]
$creadList :: ReadS [DescribeNodeResponse]
readsPrec :: Int -> ReadS DescribeNodeResponse
$creadsPrec :: Int -> ReadS DescribeNodeResponse
Prelude.Read, Int -> DescribeNodeResponse -> ShowS
[DescribeNodeResponse] -> ShowS
DescribeNodeResponse -> String
(Int -> DescribeNodeResponse -> ShowS)
-> (DescribeNodeResponse -> String)
-> ([DescribeNodeResponse] -> ShowS)
-> Show DescribeNodeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeNodeResponse] -> ShowS
$cshowList :: [DescribeNodeResponse] -> ShowS
show :: DescribeNodeResponse -> String
$cshow :: DescribeNodeResponse -> String
showsPrec :: Int -> DescribeNodeResponse -> ShowS
$cshowsPrec :: Int -> DescribeNodeResponse -> ShowS
Prelude.Show, (forall x. DescribeNodeResponse -> Rep DescribeNodeResponse x)
-> (forall x. Rep DescribeNodeResponse x -> DescribeNodeResponse)
-> Generic DescribeNodeResponse
forall x. Rep DescribeNodeResponse x -> DescribeNodeResponse
forall x. DescribeNodeResponse -> Rep DescribeNodeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeNodeResponse x -> DescribeNodeResponse
$cfrom :: forall x. DescribeNodeResponse -> Rep DescribeNodeResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeNodeResponse' 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:
--
-- 'assetName', 'describeNodeResponse_assetName' - The node\'s asset name.
--
-- 'packageArn', 'describeNodeResponse_packageArn' - The node\'s ARN.
--
-- 'httpStatus', 'describeNodeResponse_httpStatus' - The response's http status code.
--
-- 'nodeId', 'describeNodeResponse_nodeId' - The node\'s ID.
--
-- 'name', 'describeNodeResponse_name' - The node\'s name.
--
-- 'category', 'describeNodeResponse_category' - The node\'s category.
--
-- 'ownerAccount', 'describeNodeResponse_ownerAccount' - The account ID of the node\'s owner.
--
-- 'packageName', 'describeNodeResponse_packageName' - The node\'s package name.
--
-- 'packageId', 'describeNodeResponse_packageId' - The node\'s package ID.
--
-- 'packageVersion', 'describeNodeResponse_packageVersion' - The node\'s package version.
--
-- 'patchVersion', 'describeNodeResponse_patchVersion' - The node\'s patch version.
--
-- 'nodeInterface', 'describeNodeResponse_nodeInterface' - The node\'s interface.
--
-- 'description', 'describeNodeResponse_description' - The node\'s description.
--
-- 'createdTime', 'describeNodeResponse_createdTime' - When the node was created.
--
-- 'lastUpdatedTime', 'describeNodeResponse_lastUpdatedTime' - When the node was updated.
newDescribeNodeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'nodeId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'category'
  NodeCategory ->
  -- | 'ownerAccount'
  Prelude.Text ->
  -- | 'packageName'
  Prelude.Text ->
  -- | 'packageId'
  Prelude.Text ->
  -- | 'packageVersion'
  Prelude.Text ->
  -- | 'patchVersion'
  Prelude.Text ->
  -- | 'nodeInterface'
  NodeInterface ->
  -- | 'description'
  Prelude.Text ->
  -- | 'createdTime'
  Prelude.UTCTime ->
  -- | 'lastUpdatedTime'
  Prelude.UTCTime ->
  DescribeNodeResponse
newDescribeNodeResponse :: Int
-> Text
-> Text
-> NodeCategory
-> Text
-> Text
-> Text
-> Text
-> Text
-> NodeInterface
-> Text
-> UTCTime
-> UTCTime
-> DescribeNodeResponse
newDescribeNodeResponse
  Int
pHttpStatus_
  Text
pNodeId_
  Text
pName_
  NodeCategory
pCategory_
  Text
pOwnerAccount_
  Text
pPackageName_
  Text
pPackageId_
  Text
pPackageVersion_
  Text
pPatchVersion_
  NodeInterface
pNodeInterface_
  Text
pDescription_
  UTCTime
pCreatedTime_
  UTCTime
pLastUpdatedTime_ =
    DescribeNodeResponse' :: Maybe Text
-> Maybe Text
-> Int
-> Text
-> Text
-> NodeCategory
-> Text
-> Text
-> Text
-> Text
-> Text
-> NodeInterface
-> Text
-> POSIX
-> POSIX
-> DescribeNodeResponse
DescribeNodeResponse'
      { $sel:assetName:DescribeNodeResponse' :: Maybe Text
assetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:packageArn:DescribeNodeResponse' :: Maybe Text
packageArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeNodeResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:nodeId:DescribeNodeResponse' :: Text
nodeId = Text
pNodeId_,
        $sel:name:DescribeNodeResponse' :: Text
name = Text
pName_,
        $sel:category:DescribeNodeResponse' :: NodeCategory
category = NodeCategory
pCategory_,
        $sel:ownerAccount:DescribeNodeResponse' :: Text
ownerAccount = Text
pOwnerAccount_,
        $sel:packageName:DescribeNodeResponse' :: Text
packageName = Text
pPackageName_,
        $sel:packageId:DescribeNodeResponse' :: Text
packageId = Text
pPackageId_,
        $sel:packageVersion:DescribeNodeResponse' :: Text
packageVersion = Text
pPackageVersion_,
        $sel:patchVersion:DescribeNodeResponse' :: Text
patchVersion = Text
pPatchVersion_,
        $sel:nodeInterface:DescribeNodeResponse' :: NodeInterface
nodeInterface = NodeInterface
pNodeInterface_,
        $sel:description:DescribeNodeResponse' :: Text
description = Text
pDescription_,
        $sel:createdTime:DescribeNodeResponse' :: POSIX
createdTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedTime_,
        $sel:lastUpdatedTime:DescribeNodeResponse' :: POSIX
lastUpdatedTime =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdatedTime_
      }

-- | The node\'s asset name.
describeNodeResponse_assetName :: Lens.Lens' DescribeNodeResponse (Prelude.Maybe Prelude.Text)
describeNodeResponse_assetName :: (Maybe Text -> f (Maybe Text))
-> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_assetName = (DescribeNodeResponse -> Maybe Text)
-> (DescribeNodeResponse -> Maybe Text -> DescribeNodeResponse)
-> Lens
     DescribeNodeResponse DescribeNodeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {Maybe Text
assetName :: Maybe Text
$sel:assetName:DescribeNodeResponse' :: DescribeNodeResponse -> Maybe Text
assetName} -> Maybe Text
assetName) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} Maybe Text
a -> DescribeNodeResponse
s {$sel:assetName:DescribeNodeResponse' :: Maybe Text
assetName = Maybe Text
a} :: DescribeNodeResponse)

-- | The node\'s ARN.
describeNodeResponse_packageArn :: Lens.Lens' DescribeNodeResponse (Prelude.Maybe Prelude.Text)
describeNodeResponse_packageArn :: (Maybe Text -> f (Maybe Text))
-> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_packageArn = (DescribeNodeResponse -> Maybe Text)
-> (DescribeNodeResponse -> Maybe Text -> DescribeNodeResponse)
-> Lens
     DescribeNodeResponse DescribeNodeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {Maybe Text
packageArn :: Maybe Text
$sel:packageArn:DescribeNodeResponse' :: DescribeNodeResponse -> Maybe Text
packageArn} -> Maybe Text
packageArn) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} Maybe Text
a -> DescribeNodeResponse
s {$sel:packageArn:DescribeNodeResponse' :: Maybe Text
packageArn = Maybe Text
a} :: DescribeNodeResponse)

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

-- | The node\'s ID.
describeNodeResponse_nodeId :: Lens.Lens' DescribeNodeResponse Prelude.Text
describeNodeResponse_nodeId :: (Text -> f Text) -> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_nodeId = (DescribeNodeResponse -> Text)
-> (DescribeNodeResponse -> Text -> DescribeNodeResponse)
-> Lens DescribeNodeResponse DescribeNodeResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {Text
nodeId :: Text
$sel:nodeId:DescribeNodeResponse' :: DescribeNodeResponse -> Text
nodeId} -> Text
nodeId) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} Text
a -> DescribeNodeResponse
s {$sel:nodeId:DescribeNodeResponse' :: Text
nodeId = Text
a} :: DescribeNodeResponse)

-- | The node\'s name.
describeNodeResponse_name :: Lens.Lens' DescribeNodeResponse Prelude.Text
describeNodeResponse_name :: (Text -> f Text) -> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_name = (DescribeNodeResponse -> Text)
-> (DescribeNodeResponse -> Text -> DescribeNodeResponse)
-> Lens DescribeNodeResponse DescribeNodeResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {Text
name :: Text
$sel:name:DescribeNodeResponse' :: DescribeNodeResponse -> Text
name} -> Text
name) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} Text
a -> DescribeNodeResponse
s {$sel:name:DescribeNodeResponse' :: Text
name = Text
a} :: DescribeNodeResponse)

-- | The node\'s category.
describeNodeResponse_category :: Lens.Lens' DescribeNodeResponse NodeCategory
describeNodeResponse_category :: (NodeCategory -> f NodeCategory)
-> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_category = (DescribeNodeResponse -> NodeCategory)
-> (DescribeNodeResponse -> NodeCategory -> DescribeNodeResponse)
-> Lens
     DescribeNodeResponse DescribeNodeResponse NodeCategory NodeCategory
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {NodeCategory
category :: NodeCategory
$sel:category:DescribeNodeResponse' :: DescribeNodeResponse -> NodeCategory
category} -> NodeCategory
category) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} NodeCategory
a -> DescribeNodeResponse
s {$sel:category:DescribeNodeResponse' :: NodeCategory
category = NodeCategory
a} :: DescribeNodeResponse)

-- | The account ID of the node\'s owner.
describeNodeResponse_ownerAccount :: Lens.Lens' DescribeNodeResponse Prelude.Text
describeNodeResponse_ownerAccount :: (Text -> f Text) -> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_ownerAccount = (DescribeNodeResponse -> Text)
-> (DescribeNodeResponse -> Text -> DescribeNodeResponse)
-> Lens DescribeNodeResponse DescribeNodeResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {Text
ownerAccount :: Text
$sel:ownerAccount:DescribeNodeResponse' :: DescribeNodeResponse -> Text
ownerAccount} -> Text
ownerAccount) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} Text
a -> DescribeNodeResponse
s {$sel:ownerAccount:DescribeNodeResponse' :: Text
ownerAccount = Text
a} :: DescribeNodeResponse)

-- | The node\'s package name.
describeNodeResponse_packageName :: Lens.Lens' DescribeNodeResponse Prelude.Text
describeNodeResponse_packageName :: (Text -> f Text) -> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_packageName = (DescribeNodeResponse -> Text)
-> (DescribeNodeResponse -> Text -> DescribeNodeResponse)
-> Lens DescribeNodeResponse DescribeNodeResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {Text
packageName :: Text
$sel:packageName:DescribeNodeResponse' :: DescribeNodeResponse -> Text
packageName} -> Text
packageName) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} Text
a -> DescribeNodeResponse
s {$sel:packageName:DescribeNodeResponse' :: Text
packageName = Text
a} :: DescribeNodeResponse)

-- | The node\'s package ID.
describeNodeResponse_packageId :: Lens.Lens' DescribeNodeResponse Prelude.Text
describeNodeResponse_packageId :: (Text -> f Text) -> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_packageId = (DescribeNodeResponse -> Text)
-> (DescribeNodeResponse -> Text -> DescribeNodeResponse)
-> Lens DescribeNodeResponse DescribeNodeResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {Text
packageId :: Text
$sel:packageId:DescribeNodeResponse' :: DescribeNodeResponse -> Text
packageId} -> Text
packageId) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} Text
a -> DescribeNodeResponse
s {$sel:packageId:DescribeNodeResponse' :: Text
packageId = Text
a} :: DescribeNodeResponse)

-- | The node\'s package version.
describeNodeResponse_packageVersion :: Lens.Lens' DescribeNodeResponse Prelude.Text
describeNodeResponse_packageVersion :: (Text -> f Text) -> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_packageVersion = (DescribeNodeResponse -> Text)
-> (DescribeNodeResponse -> Text -> DescribeNodeResponse)
-> Lens DescribeNodeResponse DescribeNodeResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {Text
packageVersion :: Text
$sel:packageVersion:DescribeNodeResponse' :: DescribeNodeResponse -> Text
packageVersion} -> Text
packageVersion) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} Text
a -> DescribeNodeResponse
s {$sel:packageVersion:DescribeNodeResponse' :: Text
packageVersion = Text
a} :: DescribeNodeResponse)

-- | The node\'s patch version.
describeNodeResponse_patchVersion :: Lens.Lens' DescribeNodeResponse Prelude.Text
describeNodeResponse_patchVersion :: (Text -> f Text) -> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_patchVersion = (DescribeNodeResponse -> Text)
-> (DescribeNodeResponse -> Text -> DescribeNodeResponse)
-> Lens DescribeNodeResponse DescribeNodeResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {Text
patchVersion :: Text
$sel:patchVersion:DescribeNodeResponse' :: DescribeNodeResponse -> Text
patchVersion} -> Text
patchVersion) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} Text
a -> DescribeNodeResponse
s {$sel:patchVersion:DescribeNodeResponse' :: Text
patchVersion = Text
a} :: DescribeNodeResponse)

-- | The node\'s interface.
describeNodeResponse_nodeInterface :: Lens.Lens' DescribeNodeResponse NodeInterface
describeNodeResponse_nodeInterface :: (NodeInterface -> f NodeInterface)
-> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_nodeInterface = (DescribeNodeResponse -> NodeInterface)
-> (DescribeNodeResponse -> NodeInterface -> DescribeNodeResponse)
-> Lens
     DescribeNodeResponse
     DescribeNodeResponse
     NodeInterface
     NodeInterface
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {NodeInterface
nodeInterface :: NodeInterface
$sel:nodeInterface:DescribeNodeResponse' :: DescribeNodeResponse -> NodeInterface
nodeInterface} -> NodeInterface
nodeInterface) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} NodeInterface
a -> DescribeNodeResponse
s {$sel:nodeInterface:DescribeNodeResponse' :: NodeInterface
nodeInterface = NodeInterface
a} :: DescribeNodeResponse)

-- | The node\'s description.
describeNodeResponse_description :: Lens.Lens' DescribeNodeResponse Prelude.Text
describeNodeResponse_description :: (Text -> f Text) -> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_description = (DescribeNodeResponse -> Text)
-> (DescribeNodeResponse -> Text -> DescribeNodeResponse)
-> Lens DescribeNodeResponse DescribeNodeResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {Text
description :: Text
$sel:description:DescribeNodeResponse' :: DescribeNodeResponse -> Text
description} -> Text
description) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} Text
a -> DescribeNodeResponse
s {$sel:description:DescribeNodeResponse' :: Text
description = Text
a} :: DescribeNodeResponse)

-- | When the node was created.
describeNodeResponse_createdTime :: Lens.Lens' DescribeNodeResponse Prelude.UTCTime
describeNodeResponse_createdTime :: (UTCTime -> f UTCTime)
-> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_createdTime = (DescribeNodeResponse -> POSIX)
-> (DescribeNodeResponse -> POSIX -> DescribeNodeResponse)
-> Lens DescribeNodeResponse DescribeNodeResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {POSIX
createdTime :: POSIX
$sel:createdTime:DescribeNodeResponse' :: DescribeNodeResponse -> POSIX
createdTime} -> POSIX
createdTime) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} POSIX
a -> DescribeNodeResponse
s {$sel:createdTime:DescribeNodeResponse' :: POSIX
createdTime = POSIX
a} :: DescribeNodeResponse) ((POSIX -> f POSIX)
 -> DescribeNodeResponse -> f DescribeNodeResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeNodeResponse
-> f DescribeNodeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | When the node was updated.
describeNodeResponse_lastUpdatedTime :: Lens.Lens' DescribeNodeResponse Prelude.UTCTime
describeNodeResponse_lastUpdatedTime :: (UTCTime -> f UTCTime)
-> DescribeNodeResponse -> f DescribeNodeResponse
describeNodeResponse_lastUpdatedTime = (DescribeNodeResponse -> POSIX)
-> (DescribeNodeResponse -> POSIX -> DescribeNodeResponse)
-> Lens DescribeNodeResponse DescribeNodeResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNodeResponse' {POSIX
lastUpdatedTime :: POSIX
$sel:lastUpdatedTime:DescribeNodeResponse' :: DescribeNodeResponse -> POSIX
lastUpdatedTime} -> POSIX
lastUpdatedTime) (\s :: DescribeNodeResponse
s@DescribeNodeResponse' {} POSIX
a -> DescribeNodeResponse
s {$sel:lastUpdatedTime:DescribeNodeResponse' :: POSIX
lastUpdatedTime = POSIX
a} :: DescribeNodeResponse) ((POSIX -> f POSIX)
 -> DescribeNodeResponse -> f DescribeNodeResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeNodeResponse
-> f DescribeNodeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Prelude.NFData DescribeNodeResponse