{-# 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.RobOMaker.DescribeRobot
-- 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)
--
-- Describes a robot.
module Amazonka.RobOMaker.DescribeRobot
  ( -- * Creating a Request
    DescribeRobot (..),
    newDescribeRobot,

    -- * Request Lenses
    describeRobot_robot,

    -- * Destructuring the Response
    DescribeRobotResponse (..),
    newDescribeRobotResponse,

    -- * Response Lenses
    describeRobotResponse_lastDeploymentJob,
    describeRobotResponse_status,
    describeRobotResponse_arn,
    describeRobotResponse_createdAt,
    describeRobotResponse_greengrassGroupId,
    describeRobotResponse_fleetArn,
    describeRobotResponse_name,
    describeRobotResponse_architecture,
    describeRobotResponse_lastDeploymentTime,
    describeRobotResponse_tags,
    describeRobotResponse_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.RobOMaker.Types

-- | /See:/ 'newDescribeRobot' smart constructor.
data DescribeRobot = DescribeRobot'
  { -- | The Amazon Resource Name (ARN) of the robot to be described.
    DescribeRobot -> Text
robot :: Prelude.Text
  }
  deriving (DescribeRobot -> DescribeRobot -> Bool
(DescribeRobot -> DescribeRobot -> Bool)
-> (DescribeRobot -> DescribeRobot -> Bool) -> Eq DescribeRobot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRobot -> DescribeRobot -> Bool
$c/= :: DescribeRobot -> DescribeRobot -> Bool
== :: DescribeRobot -> DescribeRobot -> Bool
$c== :: DescribeRobot -> DescribeRobot -> Bool
Prelude.Eq, ReadPrec [DescribeRobot]
ReadPrec DescribeRobot
Int -> ReadS DescribeRobot
ReadS [DescribeRobot]
(Int -> ReadS DescribeRobot)
-> ReadS [DescribeRobot]
-> ReadPrec DescribeRobot
-> ReadPrec [DescribeRobot]
-> Read DescribeRobot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRobot]
$creadListPrec :: ReadPrec [DescribeRobot]
readPrec :: ReadPrec DescribeRobot
$creadPrec :: ReadPrec DescribeRobot
readList :: ReadS [DescribeRobot]
$creadList :: ReadS [DescribeRobot]
readsPrec :: Int -> ReadS DescribeRobot
$creadsPrec :: Int -> ReadS DescribeRobot
Prelude.Read, Int -> DescribeRobot -> ShowS
[DescribeRobot] -> ShowS
DescribeRobot -> String
(Int -> DescribeRobot -> ShowS)
-> (DescribeRobot -> String)
-> ([DescribeRobot] -> ShowS)
-> Show DescribeRobot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRobot] -> ShowS
$cshowList :: [DescribeRobot] -> ShowS
show :: DescribeRobot -> String
$cshow :: DescribeRobot -> String
showsPrec :: Int -> DescribeRobot -> ShowS
$cshowsPrec :: Int -> DescribeRobot -> ShowS
Prelude.Show, (forall x. DescribeRobot -> Rep DescribeRobot x)
-> (forall x. Rep DescribeRobot x -> DescribeRobot)
-> Generic DescribeRobot
forall x. Rep DescribeRobot x -> DescribeRobot
forall x. DescribeRobot -> Rep DescribeRobot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRobot x -> DescribeRobot
$cfrom :: forall x. DescribeRobot -> Rep DescribeRobot x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRobot' 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:
--
-- 'robot', 'describeRobot_robot' - The Amazon Resource Name (ARN) of the robot to be described.
newDescribeRobot ::
  -- | 'robot'
  Prelude.Text ->
  DescribeRobot
newDescribeRobot :: Text -> DescribeRobot
newDescribeRobot Text
pRobot_ =
  DescribeRobot' :: Text -> DescribeRobot
DescribeRobot' {$sel:robot:DescribeRobot' :: Text
robot = Text
pRobot_}

-- | The Amazon Resource Name (ARN) of the robot to be described.
describeRobot_robot :: Lens.Lens' DescribeRobot Prelude.Text
describeRobot_robot :: (Text -> f Text) -> DescribeRobot -> f DescribeRobot
describeRobot_robot = (DescribeRobot -> Text)
-> (DescribeRobot -> Text -> DescribeRobot)
-> Lens DescribeRobot DescribeRobot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRobot' {Text
robot :: Text
$sel:robot:DescribeRobot' :: DescribeRobot -> Text
robot} -> Text
robot) (\s :: DescribeRobot
s@DescribeRobot' {} Text
a -> DescribeRobot
s {$sel:robot:DescribeRobot' :: Text
robot = Text
a} :: DescribeRobot)

instance Core.AWSRequest DescribeRobot where
  type
    AWSResponse DescribeRobot =
      DescribeRobotResponse
  request :: DescribeRobot -> Request DescribeRobot
request = Service -> DescribeRobot -> Request DescribeRobot
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeRobot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeRobot)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeRobot))
-> Logger
-> Service
-> Proxy DescribeRobot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeRobot)))
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 RobotStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Architecture
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Int
-> DescribeRobotResponse
DescribeRobotResponse'
            (Maybe Text
 -> Maybe RobotStatus
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Architecture
 -> Maybe POSIX
 -> Maybe (HashMap Text Text)
 -> Int
 -> DescribeRobotResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe RobotStatus
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Architecture
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeRobotResponse)
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
"lastDeploymentJob")
            Either
  String
  (Maybe RobotStatus
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Architecture
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeRobotResponse)
-> Either String (Maybe RobotStatus)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Architecture
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeRobotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe RobotStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"status")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Architecture
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeRobotResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Architecture
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeRobotResponse)
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
"arn")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Architecture
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeRobotResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Architecture
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeRobotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdAt")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Architecture
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeRobotResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Architecture
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeRobotResponse)
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
"greengrassGroupId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Architecture
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeRobotResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Architecture
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeRobotResponse)
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
"fleetArn")
            Either
  String
  (Maybe Text
   -> Maybe Architecture
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeRobotResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Architecture
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeRobotResponse)
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
"name")
            Either
  String
  (Maybe Architecture
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeRobotResponse)
-> Either String (Maybe Architecture)
-> Either
     String
     (Maybe POSIX
      -> Maybe (HashMap Text Text) -> Int -> DescribeRobotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Architecture)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"architecture")
            Either
  String
  (Maybe POSIX
   -> Maybe (HashMap Text Text) -> Int -> DescribeRobotResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> DescribeRobotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastDeploymentTime")
            Either
  String (Maybe (HashMap Text Text) -> Int -> DescribeRobotResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeRobotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeRobotResponse)
-> Either String Int -> Either String DescribeRobotResponse
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 DescribeRobot

instance Prelude.NFData DescribeRobot

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

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

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

-- | /See:/ 'newDescribeRobotResponse' smart constructor.
data DescribeRobotResponse = DescribeRobotResponse'
  { -- | The Amazon Resource Name (ARN) of the last deployment job.
    DescribeRobotResponse -> Maybe Text
lastDeploymentJob :: Prelude.Maybe Prelude.Text,
    -- | The status of the fleet.
    DescribeRobotResponse -> Maybe RobotStatus
status :: Prelude.Maybe RobotStatus,
    -- | The Amazon Resource Name (ARN) of the robot.
    DescribeRobotResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the robot was created.
    DescribeRobotResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The Greengrass group id.
    DescribeRobotResponse -> Maybe Text
greengrassGroupId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the fleet.
    DescribeRobotResponse -> Maybe Text
fleetArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the robot.
    DescribeRobotResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The target architecture of the robot application.
    DescribeRobotResponse -> Maybe Architecture
architecture :: Prelude.Maybe Architecture,
    -- | The time of the last deployment job.
    DescribeRobotResponse -> Maybe POSIX
lastDeploymentTime :: Prelude.Maybe Core.POSIX,
    -- | The list of all tags added to the specified robot.
    DescribeRobotResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeRobotResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeRobotResponse -> DescribeRobotResponse -> Bool
(DescribeRobotResponse -> DescribeRobotResponse -> Bool)
-> (DescribeRobotResponse -> DescribeRobotResponse -> Bool)
-> Eq DescribeRobotResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRobotResponse -> DescribeRobotResponse -> Bool
$c/= :: DescribeRobotResponse -> DescribeRobotResponse -> Bool
== :: DescribeRobotResponse -> DescribeRobotResponse -> Bool
$c== :: DescribeRobotResponse -> DescribeRobotResponse -> Bool
Prelude.Eq, ReadPrec [DescribeRobotResponse]
ReadPrec DescribeRobotResponse
Int -> ReadS DescribeRobotResponse
ReadS [DescribeRobotResponse]
(Int -> ReadS DescribeRobotResponse)
-> ReadS [DescribeRobotResponse]
-> ReadPrec DescribeRobotResponse
-> ReadPrec [DescribeRobotResponse]
-> Read DescribeRobotResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRobotResponse]
$creadListPrec :: ReadPrec [DescribeRobotResponse]
readPrec :: ReadPrec DescribeRobotResponse
$creadPrec :: ReadPrec DescribeRobotResponse
readList :: ReadS [DescribeRobotResponse]
$creadList :: ReadS [DescribeRobotResponse]
readsPrec :: Int -> ReadS DescribeRobotResponse
$creadsPrec :: Int -> ReadS DescribeRobotResponse
Prelude.Read, Int -> DescribeRobotResponse -> ShowS
[DescribeRobotResponse] -> ShowS
DescribeRobotResponse -> String
(Int -> DescribeRobotResponse -> ShowS)
-> (DescribeRobotResponse -> String)
-> ([DescribeRobotResponse] -> ShowS)
-> Show DescribeRobotResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRobotResponse] -> ShowS
$cshowList :: [DescribeRobotResponse] -> ShowS
show :: DescribeRobotResponse -> String
$cshow :: DescribeRobotResponse -> String
showsPrec :: Int -> DescribeRobotResponse -> ShowS
$cshowsPrec :: Int -> DescribeRobotResponse -> ShowS
Prelude.Show, (forall x. DescribeRobotResponse -> Rep DescribeRobotResponse x)
-> (forall x. Rep DescribeRobotResponse x -> DescribeRobotResponse)
-> Generic DescribeRobotResponse
forall x. Rep DescribeRobotResponse x -> DescribeRobotResponse
forall x. DescribeRobotResponse -> Rep DescribeRobotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRobotResponse x -> DescribeRobotResponse
$cfrom :: forall x. DescribeRobotResponse -> Rep DescribeRobotResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRobotResponse' 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:
--
-- 'lastDeploymentJob', 'describeRobotResponse_lastDeploymentJob' - The Amazon Resource Name (ARN) of the last deployment job.
--
-- 'status', 'describeRobotResponse_status' - The status of the fleet.
--
-- 'arn', 'describeRobotResponse_arn' - The Amazon Resource Name (ARN) of the robot.
--
-- 'createdAt', 'describeRobotResponse_createdAt' - The time, in milliseconds since the epoch, when the robot was created.
--
-- 'greengrassGroupId', 'describeRobotResponse_greengrassGroupId' - The Greengrass group id.
--
-- 'fleetArn', 'describeRobotResponse_fleetArn' - The Amazon Resource Name (ARN) of the fleet.
--
-- 'name', 'describeRobotResponse_name' - The name of the robot.
--
-- 'architecture', 'describeRobotResponse_architecture' - The target architecture of the robot application.
--
-- 'lastDeploymentTime', 'describeRobotResponse_lastDeploymentTime' - The time of the last deployment job.
--
-- 'tags', 'describeRobotResponse_tags' - The list of all tags added to the specified robot.
--
-- 'httpStatus', 'describeRobotResponse_httpStatus' - The response's http status code.
newDescribeRobotResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeRobotResponse
newDescribeRobotResponse :: Int -> DescribeRobotResponse
newDescribeRobotResponse Int
pHttpStatus_ =
  DescribeRobotResponse' :: Maybe Text
-> Maybe RobotStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Architecture
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Int
-> DescribeRobotResponse
DescribeRobotResponse'
    { $sel:lastDeploymentJob:DescribeRobotResponse' :: Maybe Text
lastDeploymentJob =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeRobotResponse' :: Maybe RobotStatus
status = Maybe RobotStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeRobotResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:DescribeRobotResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:greengrassGroupId:DescribeRobotResponse' :: Maybe Text
greengrassGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fleetArn:DescribeRobotResponse' :: Maybe Text
fleetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeRobotResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:architecture:DescribeRobotResponse' :: Maybe Architecture
architecture = Maybe Architecture
forall a. Maybe a
Prelude.Nothing,
      $sel:lastDeploymentTime:DescribeRobotResponse' :: Maybe POSIX
lastDeploymentTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeRobotResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeRobotResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the last deployment job.
describeRobotResponse_lastDeploymentJob :: Lens.Lens' DescribeRobotResponse (Prelude.Maybe Prelude.Text)
describeRobotResponse_lastDeploymentJob :: (Maybe Text -> f (Maybe Text))
-> DescribeRobotResponse -> f DescribeRobotResponse
describeRobotResponse_lastDeploymentJob = (DescribeRobotResponse -> Maybe Text)
-> (DescribeRobotResponse -> Maybe Text -> DescribeRobotResponse)
-> Lens
     DescribeRobotResponse
     DescribeRobotResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRobotResponse' {Maybe Text
lastDeploymentJob :: Maybe Text
$sel:lastDeploymentJob:DescribeRobotResponse' :: DescribeRobotResponse -> Maybe Text
lastDeploymentJob} -> Maybe Text
lastDeploymentJob) (\s :: DescribeRobotResponse
s@DescribeRobotResponse' {} Maybe Text
a -> DescribeRobotResponse
s {$sel:lastDeploymentJob:DescribeRobotResponse' :: Maybe Text
lastDeploymentJob = Maybe Text
a} :: DescribeRobotResponse)

-- | The status of the fleet.
describeRobotResponse_status :: Lens.Lens' DescribeRobotResponse (Prelude.Maybe RobotStatus)
describeRobotResponse_status :: (Maybe RobotStatus -> f (Maybe RobotStatus))
-> DescribeRobotResponse -> f DescribeRobotResponse
describeRobotResponse_status = (DescribeRobotResponse -> Maybe RobotStatus)
-> (DescribeRobotResponse
    -> Maybe RobotStatus -> DescribeRobotResponse)
-> Lens
     DescribeRobotResponse
     DescribeRobotResponse
     (Maybe RobotStatus)
     (Maybe RobotStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRobotResponse' {Maybe RobotStatus
status :: Maybe RobotStatus
$sel:status:DescribeRobotResponse' :: DescribeRobotResponse -> Maybe RobotStatus
status} -> Maybe RobotStatus
status) (\s :: DescribeRobotResponse
s@DescribeRobotResponse' {} Maybe RobotStatus
a -> DescribeRobotResponse
s {$sel:status:DescribeRobotResponse' :: Maybe RobotStatus
status = Maybe RobotStatus
a} :: DescribeRobotResponse)

-- | The Amazon Resource Name (ARN) of the robot.
describeRobotResponse_arn :: Lens.Lens' DescribeRobotResponse (Prelude.Maybe Prelude.Text)
describeRobotResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeRobotResponse -> f DescribeRobotResponse
describeRobotResponse_arn = (DescribeRobotResponse -> Maybe Text)
-> (DescribeRobotResponse -> Maybe Text -> DescribeRobotResponse)
-> Lens
     DescribeRobotResponse
     DescribeRobotResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRobotResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeRobotResponse' :: DescribeRobotResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeRobotResponse
s@DescribeRobotResponse' {} Maybe Text
a -> DescribeRobotResponse
s {$sel:arn:DescribeRobotResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeRobotResponse)

-- | The time, in milliseconds since the epoch, when the robot was created.
describeRobotResponse_createdAt :: Lens.Lens' DescribeRobotResponse (Prelude.Maybe Prelude.UTCTime)
describeRobotResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRobotResponse -> f DescribeRobotResponse
describeRobotResponse_createdAt = (DescribeRobotResponse -> Maybe POSIX)
-> (DescribeRobotResponse -> Maybe POSIX -> DescribeRobotResponse)
-> Lens
     DescribeRobotResponse
     DescribeRobotResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRobotResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:DescribeRobotResponse' :: DescribeRobotResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: DescribeRobotResponse
s@DescribeRobotResponse' {} Maybe POSIX
a -> DescribeRobotResponse
s {$sel:createdAt:DescribeRobotResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: DescribeRobotResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeRobotResponse -> f DescribeRobotResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRobotResponse
-> f DescribeRobotResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The Greengrass group id.
describeRobotResponse_greengrassGroupId :: Lens.Lens' DescribeRobotResponse (Prelude.Maybe Prelude.Text)
describeRobotResponse_greengrassGroupId :: (Maybe Text -> f (Maybe Text))
-> DescribeRobotResponse -> f DescribeRobotResponse
describeRobotResponse_greengrassGroupId = (DescribeRobotResponse -> Maybe Text)
-> (DescribeRobotResponse -> Maybe Text -> DescribeRobotResponse)
-> Lens
     DescribeRobotResponse
     DescribeRobotResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRobotResponse' {Maybe Text
greengrassGroupId :: Maybe Text
$sel:greengrassGroupId:DescribeRobotResponse' :: DescribeRobotResponse -> Maybe Text
greengrassGroupId} -> Maybe Text
greengrassGroupId) (\s :: DescribeRobotResponse
s@DescribeRobotResponse' {} Maybe Text
a -> DescribeRobotResponse
s {$sel:greengrassGroupId:DescribeRobotResponse' :: Maybe Text
greengrassGroupId = Maybe Text
a} :: DescribeRobotResponse)

-- | The Amazon Resource Name (ARN) of the fleet.
describeRobotResponse_fleetArn :: Lens.Lens' DescribeRobotResponse (Prelude.Maybe Prelude.Text)
describeRobotResponse_fleetArn :: (Maybe Text -> f (Maybe Text))
-> DescribeRobotResponse -> f DescribeRobotResponse
describeRobotResponse_fleetArn = (DescribeRobotResponse -> Maybe Text)
-> (DescribeRobotResponse -> Maybe Text -> DescribeRobotResponse)
-> Lens
     DescribeRobotResponse
     DescribeRobotResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRobotResponse' {Maybe Text
fleetArn :: Maybe Text
$sel:fleetArn:DescribeRobotResponse' :: DescribeRobotResponse -> Maybe Text
fleetArn} -> Maybe Text
fleetArn) (\s :: DescribeRobotResponse
s@DescribeRobotResponse' {} Maybe Text
a -> DescribeRobotResponse
s {$sel:fleetArn:DescribeRobotResponse' :: Maybe Text
fleetArn = Maybe Text
a} :: DescribeRobotResponse)

-- | The name of the robot.
describeRobotResponse_name :: Lens.Lens' DescribeRobotResponse (Prelude.Maybe Prelude.Text)
describeRobotResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeRobotResponse -> f DescribeRobotResponse
describeRobotResponse_name = (DescribeRobotResponse -> Maybe Text)
-> (DescribeRobotResponse -> Maybe Text -> DescribeRobotResponse)
-> Lens
     DescribeRobotResponse
     DescribeRobotResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRobotResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeRobotResponse' :: DescribeRobotResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeRobotResponse
s@DescribeRobotResponse' {} Maybe Text
a -> DescribeRobotResponse
s {$sel:name:DescribeRobotResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeRobotResponse)

-- | The target architecture of the robot application.
describeRobotResponse_architecture :: Lens.Lens' DescribeRobotResponse (Prelude.Maybe Architecture)
describeRobotResponse_architecture :: (Maybe Architecture -> f (Maybe Architecture))
-> DescribeRobotResponse -> f DescribeRobotResponse
describeRobotResponse_architecture = (DescribeRobotResponse -> Maybe Architecture)
-> (DescribeRobotResponse
    -> Maybe Architecture -> DescribeRobotResponse)
-> Lens
     DescribeRobotResponse
     DescribeRobotResponse
     (Maybe Architecture)
     (Maybe Architecture)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRobotResponse' {Maybe Architecture
architecture :: Maybe Architecture
$sel:architecture:DescribeRobotResponse' :: DescribeRobotResponse -> Maybe Architecture
architecture} -> Maybe Architecture
architecture) (\s :: DescribeRobotResponse
s@DescribeRobotResponse' {} Maybe Architecture
a -> DescribeRobotResponse
s {$sel:architecture:DescribeRobotResponse' :: Maybe Architecture
architecture = Maybe Architecture
a} :: DescribeRobotResponse)

-- | The time of the last deployment job.
describeRobotResponse_lastDeploymentTime :: Lens.Lens' DescribeRobotResponse (Prelude.Maybe Prelude.UTCTime)
describeRobotResponse_lastDeploymentTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRobotResponse -> f DescribeRobotResponse
describeRobotResponse_lastDeploymentTime = (DescribeRobotResponse -> Maybe POSIX)
-> (DescribeRobotResponse -> Maybe POSIX -> DescribeRobotResponse)
-> Lens
     DescribeRobotResponse
     DescribeRobotResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRobotResponse' {Maybe POSIX
lastDeploymentTime :: Maybe POSIX
$sel:lastDeploymentTime:DescribeRobotResponse' :: DescribeRobotResponse -> Maybe POSIX
lastDeploymentTime} -> Maybe POSIX
lastDeploymentTime) (\s :: DescribeRobotResponse
s@DescribeRobotResponse' {} Maybe POSIX
a -> DescribeRobotResponse
s {$sel:lastDeploymentTime:DescribeRobotResponse' :: Maybe POSIX
lastDeploymentTime = Maybe POSIX
a} :: DescribeRobotResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeRobotResponse -> f DescribeRobotResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRobotResponse
-> f DescribeRobotResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The list of all tags added to the specified robot.
describeRobotResponse_tags :: Lens.Lens' DescribeRobotResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeRobotResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeRobotResponse -> f DescribeRobotResponse
describeRobotResponse_tags = (DescribeRobotResponse -> Maybe (HashMap Text Text))
-> (DescribeRobotResponse
    -> Maybe (HashMap Text Text) -> DescribeRobotResponse)
-> Lens
     DescribeRobotResponse
     DescribeRobotResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRobotResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeRobotResponse' :: DescribeRobotResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeRobotResponse
s@DescribeRobotResponse' {} Maybe (HashMap Text Text)
a -> DescribeRobotResponse
s {$sel:tags:DescribeRobotResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeRobotResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeRobotResponse -> f DescribeRobotResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeRobotResponse
-> f DescribeRobotResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeRobotResponse