{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.RobotApplicationSummary
-- 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)
module Amazonka.RobOMaker.Types.RobotApplicationSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RobOMaker.Types.RobotSoftwareSuite

-- | Summary information for a robot application.
--
-- /See:/ 'newRobotApplicationSummary' smart constructor.
data RobotApplicationSummary = RobotApplicationSummary'
  { -- | The time, in milliseconds since the epoch, when the robot application
    -- was last updated.
    RobotApplicationSummary -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the robot.
    RobotApplicationSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The name of the robot application.
    RobotApplicationSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The version of the robot application.
    RobotApplicationSummary -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | Information about a robot software suite (ROS distribution).
    RobotApplicationSummary -> Maybe RobotSoftwareSuite
robotSoftwareSuite :: Prelude.Maybe RobotSoftwareSuite
  }
  deriving (RobotApplicationSummary -> RobotApplicationSummary -> Bool
(RobotApplicationSummary -> RobotApplicationSummary -> Bool)
-> (RobotApplicationSummary -> RobotApplicationSummary -> Bool)
-> Eq RobotApplicationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RobotApplicationSummary -> RobotApplicationSummary -> Bool
$c/= :: RobotApplicationSummary -> RobotApplicationSummary -> Bool
== :: RobotApplicationSummary -> RobotApplicationSummary -> Bool
$c== :: RobotApplicationSummary -> RobotApplicationSummary -> Bool
Prelude.Eq, ReadPrec [RobotApplicationSummary]
ReadPrec RobotApplicationSummary
Int -> ReadS RobotApplicationSummary
ReadS [RobotApplicationSummary]
(Int -> ReadS RobotApplicationSummary)
-> ReadS [RobotApplicationSummary]
-> ReadPrec RobotApplicationSummary
-> ReadPrec [RobotApplicationSummary]
-> Read RobotApplicationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RobotApplicationSummary]
$creadListPrec :: ReadPrec [RobotApplicationSummary]
readPrec :: ReadPrec RobotApplicationSummary
$creadPrec :: ReadPrec RobotApplicationSummary
readList :: ReadS [RobotApplicationSummary]
$creadList :: ReadS [RobotApplicationSummary]
readsPrec :: Int -> ReadS RobotApplicationSummary
$creadsPrec :: Int -> ReadS RobotApplicationSummary
Prelude.Read, Int -> RobotApplicationSummary -> ShowS
[RobotApplicationSummary] -> ShowS
RobotApplicationSummary -> String
(Int -> RobotApplicationSummary -> ShowS)
-> (RobotApplicationSummary -> String)
-> ([RobotApplicationSummary] -> ShowS)
-> Show RobotApplicationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RobotApplicationSummary] -> ShowS
$cshowList :: [RobotApplicationSummary] -> ShowS
show :: RobotApplicationSummary -> String
$cshow :: RobotApplicationSummary -> String
showsPrec :: Int -> RobotApplicationSummary -> ShowS
$cshowsPrec :: Int -> RobotApplicationSummary -> ShowS
Prelude.Show, (forall x.
 RobotApplicationSummary -> Rep RobotApplicationSummary x)
-> (forall x.
    Rep RobotApplicationSummary x -> RobotApplicationSummary)
-> Generic RobotApplicationSummary
forall x. Rep RobotApplicationSummary x -> RobotApplicationSummary
forall x. RobotApplicationSummary -> Rep RobotApplicationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RobotApplicationSummary x -> RobotApplicationSummary
$cfrom :: forall x. RobotApplicationSummary -> Rep RobotApplicationSummary x
Prelude.Generic)

-- |
-- Create a value of 'RobotApplicationSummary' 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:
--
-- 'lastUpdatedAt', 'robotApplicationSummary_lastUpdatedAt' - The time, in milliseconds since the epoch, when the robot application
-- was last updated.
--
-- 'arn', 'robotApplicationSummary_arn' - The Amazon Resource Name (ARN) of the robot.
--
-- 'name', 'robotApplicationSummary_name' - The name of the robot application.
--
-- 'version', 'robotApplicationSummary_version' - The version of the robot application.
--
-- 'robotSoftwareSuite', 'robotApplicationSummary_robotSoftwareSuite' - Information about a robot software suite (ROS distribution).
newRobotApplicationSummary ::
  RobotApplicationSummary
newRobotApplicationSummary :: RobotApplicationSummary
newRobotApplicationSummary =
  RobotApplicationSummary' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RobotSoftwareSuite
-> RobotApplicationSummary
RobotApplicationSummary'
    { $sel:lastUpdatedAt:RobotApplicationSummary' :: Maybe POSIX
lastUpdatedAt =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:RobotApplicationSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:RobotApplicationSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:RobotApplicationSummary' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:robotSoftwareSuite:RobotApplicationSummary' :: Maybe RobotSoftwareSuite
robotSoftwareSuite = Maybe RobotSoftwareSuite
forall a. Maybe a
Prelude.Nothing
    }

-- | The time, in milliseconds since the epoch, when the robot application
-- was last updated.
robotApplicationSummary_lastUpdatedAt :: Lens.Lens' RobotApplicationSummary (Prelude.Maybe Prelude.UTCTime)
robotApplicationSummary_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RobotApplicationSummary -> f RobotApplicationSummary
robotApplicationSummary_lastUpdatedAt = (RobotApplicationSummary -> Maybe POSIX)
-> (RobotApplicationSummary
    -> Maybe POSIX -> RobotApplicationSummary)
-> Lens
     RobotApplicationSummary
     RobotApplicationSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RobotApplicationSummary' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: RobotApplicationSummary
s@RobotApplicationSummary' {} Maybe POSIX
a -> RobotApplicationSummary
s {$sel:lastUpdatedAt:RobotApplicationSummary' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: RobotApplicationSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> RobotApplicationSummary -> f RobotApplicationSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RobotApplicationSummary
-> f RobotApplicationSummary
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 Amazon Resource Name (ARN) of the robot.
robotApplicationSummary_arn :: Lens.Lens' RobotApplicationSummary (Prelude.Maybe Prelude.Text)
robotApplicationSummary_arn :: (Maybe Text -> f (Maybe Text))
-> RobotApplicationSummary -> f RobotApplicationSummary
robotApplicationSummary_arn = (RobotApplicationSummary -> Maybe Text)
-> (RobotApplicationSummary
    -> Maybe Text -> RobotApplicationSummary)
-> Lens
     RobotApplicationSummary
     RobotApplicationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RobotApplicationSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RobotApplicationSummary
s@RobotApplicationSummary' {} Maybe Text
a -> RobotApplicationSummary
s {$sel:arn:RobotApplicationSummary' :: Maybe Text
arn = Maybe Text
a} :: RobotApplicationSummary)

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

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

-- | Information about a robot software suite (ROS distribution).
robotApplicationSummary_robotSoftwareSuite :: Lens.Lens' RobotApplicationSummary (Prelude.Maybe RobotSoftwareSuite)
robotApplicationSummary_robotSoftwareSuite :: (Maybe RobotSoftwareSuite -> f (Maybe RobotSoftwareSuite))
-> RobotApplicationSummary -> f RobotApplicationSummary
robotApplicationSummary_robotSoftwareSuite = (RobotApplicationSummary -> Maybe RobotSoftwareSuite)
-> (RobotApplicationSummary
    -> Maybe RobotSoftwareSuite -> RobotApplicationSummary)
-> Lens
     RobotApplicationSummary
     RobotApplicationSummary
     (Maybe RobotSoftwareSuite)
     (Maybe RobotSoftwareSuite)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RobotApplicationSummary' {Maybe RobotSoftwareSuite
robotSoftwareSuite :: Maybe RobotSoftwareSuite
$sel:robotSoftwareSuite:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe RobotSoftwareSuite
robotSoftwareSuite} -> Maybe RobotSoftwareSuite
robotSoftwareSuite) (\s :: RobotApplicationSummary
s@RobotApplicationSummary' {} Maybe RobotSoftwareSuite
a -> RobotApplicationSummary
s {$sel:robotSoftwareSuite:RobotApplicationSummary' :: Maybe RobotSoftwareSuite
robotSoftwareSuite = Maybe RobotSoftwareSuite
a} :: RobotApplicationSummary)

instance Core.FromJSON RobotApplicationSummary where
  parseJSON :: Value -> Parser RobotApplicationSummary
parseJSON =
    String
-> (Object -> Parser RobotApplicationSummary)
-> Value
-> Parser RobotApplicationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RobotApplicationSummary"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RobotSoftwareSuite
-> RobotApplicationSummary
RobotApplicationSummary'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe RobotSoftwareSuite
 -> RobotApplicationSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RobotSoftwareSuite
      -> RobotApplicationSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdatedAt")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RobotSoftwareSuite
   -> RobotApplicationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe RobotSoftwareSuite
      -> RobotApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe RobotSoftwareSuite
   -> RobotApplicationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe RobotSoftwareSuite -> RobotApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe Text -> Maybe RobotSoftwareSuite -> RobotApplicationSummary)
-> Parser (Maybe Text)
-> Parser (Maybe RobotSoftwareSuite -> RobotApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"version")
            Parser (Maybe RobotSoftwareSuite -> RobotApplicationSummary)
-> Parser (Maybe RobotSoftwareSuite)
-> Parser RobotApplicationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RobotSoftwareSuite)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"robotSoftwareSuite")
      )

instance Prelude.Hashable RobotApplicationSummary

instance Prelude.NFData RobotApplicationSummary