{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.RobOMaker.Types.RobotApplicationSummary where

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

-- | The Amazon Resource Name (ARN) of the robot.
robotApplicationSummary_arn :: Lens.Lens' RobotApplicationSummary (Prelude.Maybe Prelude.Text)
robotApplicationSummary_arn :: Lens' RobotApplicationSummary (Maybe Text)
robotApplicationSummary_arn = 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 time, in milliseconds since the epoch, when the robot application
-- was last updated.
robotApplicationSummary_lastUpdatedAt :: Lens.Lens' RobotApplicationSummary (Prelude.Maybe Prelude.UTCTime)
robotApplicationSummary_lastUpdatedAt :: Lens' RobotApplicationSummary (Maybe UTCTime)
robotApplicationSummary_lastUpdatedAt = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The name of the robot application.
robotApplicationSummary_name :: Lens.Lens' RobotApplicationSummary (Prelude.Maybe Prelude.Text)
robotApplicationSummary_name :: Lens' RobotApplicationSummary (Maybe Text)
robotApplicationSummary_name = 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)

-- | Information about a robot software suite (ROS distribution).
robotApplicationSummary_robotSoftwareSuite :: Lens.Lens' RobotApplicationSummary (Prelude.Maybe RobotSoftwareSuite)
robotApplicationSummary_robotSoftwareSuite :: Lens' RobotApplicationSummary (Maybe RobotSoftwareSuite)
robotApplicationSummary_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)

-- | The version of the robot application.
robotApplicationSummary_version :: Lens.Lens' RobotApplicationSummary (Prelude.Maybe Prelude.Text)
robotApplicationSummary_version :: Lens' RobotApplicationSummary (Maybe Text)
robotApplicationSummary_version = 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)

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

instance Prelude.Hashable RobotApplicationSummary where
  hashWithSalt :: Int -> RobotApplicationSummary -> Int
hashWithSalt Int
_salt RobotApplicationSummary' {Maybe Text
Maybe POSIX
Maybe RobotSoftwareSuite
version :: Maybe Text
robotSoftwareSuite :: Maybe RobotSoftwareSuite
name :: Maybe Text
lastUpdatedAt :: Maybe POSIX
arn :: Maybe Text
$sel:version:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe Text
$sel:robotSoftwareSuite:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe RobotSoftwareSuite
$sel:name:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe Text
$sel:lastUpdatedAt:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe POSIX
$sel:arn:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RobotSoftwareSuite
robotSoftwareSuite
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
version

instance Prelude.NFData RobotApplicationSummary where
  rnf :: RobotApplicationSummary -> ()
rnf RobotApplicationSummary' {Maybe Text
Maybe POSIX
Maybe RobotSoftwareSuite
version :: Maybe Text
robotSoftwareSuite :: Maybe RobotSoftwareSuite
name :: Maybe Text
lastUpdatedAt :: Maybe POSIX
arn :: Maybe Text
$sel:version:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe Text
$sel:robotSoftwareSuite:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe RobotSoftwareSuite
$sel:name:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe Text
$sel:lastUpdatedAt:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe POSIX
$sel:arn:RobotApplicationSummary' :: RobotApplicationSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RobotSoftwareSuite
robotSoftwareSuite
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version