{-# 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 #-}
module Amazonka.RobOMaker.Types.Fleet where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RobOMaker.Types.DeploymentStatus
data Fleet = Fleet'
{
Fleet -> Maybe Text
lastDeploymentJob :: Prelude.Maybe Prelude.Text,
Fleet -> Maybe DeploymentStatus
lastDeploymentStatus :: Prelude.Maybe DeploymentStatus,
Fleet -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Fleet -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
Fleet -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Fleet -> Maybe POSIX
lastDeploymentTime :: Prelude.Maybe Core.POSIX
}
deriving (Fleet -> Fleet -> Bool
(Fleet -> Fleet -> Bool) -> (Fleet -> Fleet -> Bool) -> Eq Fleet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Fleet -> Fleet -> Bool
$c/= :: Fleet -> Fleet -> Bool
== :: Fleet -> Fleet -> Bool
$c== :: Fleet -> Fleet -> Bool
Prelude.Eq, ReadPrec [Fleet]
ReadPrec Fleet
Int -> ReadS Fleet
ReadS [Fleet]
(Int -> ReadS Fleet)
-> ReadS [Fleet]
-> ReadPrec Fleet
-> ReadPrec [Fleet]
-> Read Fleet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Fleet]
$creadListPrec :: ReadPrec [Fleet]
readPrec :: ReadPrec Fleet
$creadPrec :: ReadPrec Fleet
readList :: ReadS [Fleet]
$creadList :: ReadS [Fleet]
readsPrec :: Int -> ReadS Fleet
$creadsPrec :: Int -> ReadS Fleet
Prelude.Read, Int -> Fleet -> ShowS
[Fleet] -> ShowS
Fleet -> String
(Int -> Fleet -> ShowS)
-> (Fleet -> String) -> ([Fleet] -> ShowS) -> Show Fleet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Fleet] -> ShowS
$cshowList :: [Fleet] -> ShowS
show :: Fleet -> String
$cshow :: Fleet -> String
showsPrec :: Int -> Fleet -> ShowS
$cshowsPrec :: Int -> Fleet -> ShowS
Prelude.Show, (forall x. Fleet -> Rep Fleet x)
-> (forall x. Rep Fleet x -> Fleet) -> Generic Fleet
forall x. Rep Fleet x -> Fleet
forall x. Fleet -> Rep Fleet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Fleet x -> Fleet
$cfrom :: forall x. Fleet -> Rep Fleet x
Prelude.Generic)
newFleet ::
Fleet
newFleet :: Fleet
newFleet =
Fleet' :: Maybe Text
-> Maybe DeploymentStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Fleet
Fleet'
{ $sel:lastDeploymentJob:Fleet' :: Maybe Text
lastDeploymentJob = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastDeploymentStatus:Fleet' :: Maybe DeploymentStatus
lastDeploymentStatus = Maybe DeploymentStatus
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Fleet' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:Fleet' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:Fleet' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastDeploymentTime:Fleet' :: Maybe POSIX
lastDeploymentTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
fleet_lastDeploymentJob :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Text)
fleet_lastDeploymentJob :: (Maybe Text -> f (Maybe Text)) -> Fleet -> f Fleet
fleet_lastDeploymentJob = (Fleet -> Maybe Text)
-> (Fleet -> Maybe Text -> Fleet)
-> Lens Fleet Fleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Text
lastDeploymentJob :: Maybe Text
$sel:lastDeploymentJob:Fleet' :: Fleet -> Maybe Text
lastDeploymentJob} -> Maybe Text
lastDeploymentJob) (\s :: Fleet
s@Fleet' {} Maybe Text
a -> Fleet
s {$sel:lastDeploymentJob:Fleet' :: Maybe Text
lastDeploymentJob = Maybe Text
a} :: Fleet)
fleet_lastDeploymentStatus :: Lens.Lens' Fleet (Prelude.Maybe DeploymentStatus)
fleet_lastDeploymentStatus :: (Maybe DeploymentStatus -> f (Maybe DeploymentStatus))
-> Fleet -> f Fleet
fleet_lastDeploymentStatus = (Fleet -> Maybe DeploymentStatus)
-> (Fleet -> Maybe DeploymentStatus -> Fleet)
-> Lens
Fleet Fleet (Maybe DeploymentStatus) (Maybe DeploymentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe DeploymentStatus
lastDeploymentStatus :: Maybe DeploymentStatus
$sel:lastDeploymentStatus:Fleet' :: Fleet -> Maybe DeploymentStatus
lastDeploymentStatus} -> Maybe DeploymentStatus
lastDeploymentStatus) (\s :: Fleet
s@Fleet' {} Maybe DeploymentStatus
a -> Fleet
s {$sel:lastDeploymentStatus:Fleet' :: Maybe DeploymentStatus
lastDeploymentStatus = Maybe DeploymentStatus
a} :: Fleet)
fleet_arn :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Text)
fleet_arn :: (Maybe Text -> f (Maybe Text)) -> Fleet -> f Fleet
fleet_arn = (Fleet -> Maybe Text)
-> (Fleet -> Maybe Text -> Fleet)
-> Lens Fleet Fleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Text
arn :: Maybe Text
$sel:arn:Fleet' :: Fleet -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Fleet
s@Fleet' {} Maybe Text
a -> Fleet
s {$sel:arn:Fleet' :: Maybe Text
arn = Maybe Text
a} :: Fleet)
fleet_createdAt :: Lens.Lens' Fleet (Prelude.Maybe Prelude.UTCTime)
fleet_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Fleet -> f Fleet
fleet_createdAt = (Fleet -> Maybe POSIX)
-> (Fleet -> Maybe POSIX -> Fleet)
-> Lens Fleet Fleet (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Fleet' :: Fleet -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Fleet
s@Fleet' {} Maybe POSIX
a -> Fleet
s {$sel:createdAt:Fleet' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Fleet) ((Maybe POSIX -> f (Maybe POSIX)) -> Fleet -> f Fleet)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Fleet
-> f Fleet
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
fleet_name :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Text)
fleet_name :: (Maybe Text -> f (Maybe Text)) -> Fleet -> f Fleet
fleet_name = (Fleet -> Maybe Text)
-> (Fleet -> Maybe Text -> Fleet)
-> Lens Fleet Fleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Text
name :: Maybe Text
$sel:name:Fleet' :: Fleet -> Maybe Text
name} -> Maybe Text
name) (\s :: Fleet
s@Fleet' {} Maybe Text
a -> Fleet
s {$sel:name:Fleet' :: Maybe Text
name = Maybe Text
a} :: Fleet)
fleet_lastDeploymentTime :: Lens.Lens' Fleet (Prelude.Maybe Prelude.UTCTime)
fleet_lastDeploymentTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Fleet -> f Fleet
fleet_lastDeploymentTime = (Fleet -> Maybe POSIX)
-> (Fleet -> Maybe POSIX -> Fleet)
-> Lens Fleet Fleet (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe POSIX
lastDeploymentTime :: Maybe POSIX
$sel:lastDeploymentTime:Fleet' :: Fleet -> Maybe POSIX
lastDeploymentTime} -> Maybe POSIX
lastDeploymentTime) (\s :: Fleet
s@Fleet' {} Maybe POSIX
a -> Fleet
s {$sel:lastDeploymentTime:Fleet' :: Maybe POSIX
lastDeploymentTime = Maybe POSIX
a} :: Fleet) ((Maybe POSIX -> f (Maybe POSIX)) -> Fleet -> f Fleet)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Fleet
-> f Fleet
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
instance Core.FromJSON Fleet where
parseJSON :: Value -> Parser Fleet
parseJSON =
String -> (Object -> Parser Fleet) -> Value -> Parser Fleet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Fleet"
( \Object
x ->
Maybe Text
-> Maybe DeploymentStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Fleet
Fleet'
(Maybe Text
-> Maybe DeploymentStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Fleet)
-> Parser (Maybe Text)
-> Parser
(Maybe DeploymentStatus
-> Maybe Text -> Maybe POSIX -> Maybe Text -> Maybe POSIX -> Fleet)
forall (f :: * -> *) a b. Functor 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
"lastDeploymentJob")
Parser
(Maybe DeploymentStatus
-> Maybe Text -> Maybe POSIX -> Maybe Text -> Maybe POSIX -> Fleet)
-> Parser (Maybe DeploymentStatus)
-> Parser
(Maybe Text -> Maybe POSIX -> Maybe Text -> Maybe POSIX -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeploymentStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastDeploymentStatus")
Parser
(Maybe Text -> Maybe POSIX -> Maybe Text -> Maybe POSIX -> Fleet)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> Maybe POSIX -> Fleet)
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 POSIX -> Maybe Text -> Maybe POSIX -> Fleet)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe POSIX -> Fleet)
forall (f :: * -> *) a b. Applicative f => 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
"createdAt")
Parser (Maybe Text -> Maybe POSIX -> Fleet)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> Fleet)
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 POSIX -> Fleet)
-> Parser (Maybe POSIX) -> Parser Fleet
forall (f :: * -> *) a b. Applicative f => 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
"lastDeploymentTime")
)
instance Prelude.Hashable Fleet
instance Prelude.NFData Fleet