{-# 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.Lightsail.Types.ContainerServiceDeployment where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.Container
import Amazonka.Lightsail.Types.ContainerServiceDeploymentState
import Amazonka.Lightsail.Types.ContainerServiceEndpoint
import qualified Amazonka.Prelude as Prelude
data ContainerServiceDeployment = ContainerServiceDeployment'
{
ContainerServiceDeployment -> Maybe ContainerServiceDeploymentState
state :: Prelude.Maybe ContainerServiceDeploymentState,
ContainerServiceDeployment -> Maybe ContainerServiceEndpoint
publicEndpoint :: Prelude.Maybe ContainerServiceEndpoint,
ContainerServiceDeployment -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
ContainerServiceDeployment -> Maybe (HashMap Text Container)
containers :: Prelude.Maybe (Prelude.HashMap Prelude.Text Container),
ContainerServiceDeployment -> Maybe Int
version :: Prelude.Maybe Prelude.Int
}
deriving (ContainerServiceDeployment -> ContainerServiceDeployment -> Bool
(ContainerServiceDeployment -> ContainerServiceDeployment -> Bool)
-> (ContainerServiceDeployment
-> ContainerServiceDeployment -> Bool)
-> Eq ContainerServiceDeployment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContainerServiceDeployment -> ContainerServiceDeployment -> Bool
$c/= :: ContainerServiceDeployment -> ContainerServiceDeployment -> Bool
== :: ContainerServiceDeployment -> ContainerServiceDeployment -> Bool
$c== :: ContainerServiceDeployment -> ContainerServiceDeployment -> Bool
Prelude.Eq, ReadPrec [ContainerServiceDeployment]
ReadPrec ContainerServiceDeployment
Int -> ReadS ContainerServiceDeployment
ReadS [ContainerServiceDeployment]
(Int -> ReadS ContainerServiceDeployment)
-> ReadS [ContainerServiceDeployment]
-> ReadPrec ContainerServiceDeployment
-> ReadPrec [ContainerServiceDeployment]
-> Read ContainerServiceDeployment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContainerServiceDeployment]
$creadListPrec :: ReadPrec [ContainerServiceDeployment]
readPrec :: ReadPrec ContainerServiceDeployment
$creadPrec :: ReadPrec ContainerServiceDeployment
readList :: ReadS [ContainerServiceDeployment]
$creadList :: ReadS [ContainerServiceDeployment]
readsPrec :: Int -> ReadS ContainerServiceDeployment
$creadsPrec :: Int -> ReadS ContainerServiceDeployment
Prelude.Read, Int -> ContainerServiceDeployment -> ShowS
[ContainerServiceDeployment] -> ShowS
ContainerServiceDeployment -> String
(Int -> ContainerServiceDeployment -> ShowS)
-> (ContainerServiceDeployment -> String)
-> ([ContainerServiceDeployment] -> ShowS)
-> Show ContainerServiceDeployment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContainerServiceDeployment] -> ShowS
$cshowList :: [ContainerServiceDeployment] -> ShowS
show :: ContainerServiceDeployment -> String
$cshow :: ContainerServiceDeployment -> String
showsPrec :: Int -> ContainerServiceDeployment -> ShowS
$cshowsPrec :: Int -> ContainerServiceDeployment -> ShowS
Prelude.Show, (forall x.
ContainerServiceDeployment -> Rep ContainerServiceDeployment x)
-> (forall x.
Rep ContainerServiceDeployment x -> ContainerServiceDeployment)
-> Generic ContainerServiceDeployment
forall x.
Rep ContainerServiceDeployment x -> ContainerServiceDeployment
forall x.
ContainerServiceDeployment -> Rep ContainerServiceDeployment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ContainerServiceDeployment x -> ContainerServiceDeployment
$cfrom :: forall x.
ContainerServiceDeployment -> Rep ContainerServiceDeployment x
Prelude.Generic)
newContainerServiceDeployment ::
ContainerServiceDeployment
newContainerServiceDeployment :: ContainerServiceDeployment
newContainerServiceDeployment =
ContainerServiceDeployment' :: Maybe ContainerServiceDeploymentState
-> Maybe ContainerServiceEndpoint
-> Maybe POSIX
-> Maybe (HashMap Text Container)
-> Maybe Int
-> ContainerServiceDeployment
ContainerServiceDeployment'
{ $sel:state:ContainerServiceDeployment' :: Maybe ContainerServiceDeploymentState
state =
Maybe ContainerServiceDeploymentState
forall a. Maybe a
Prelude.Nothing,
$sel:publicEndpoint:ContainerServiceDeployment' :: Maybe ContainerServiceEndpoint
publicEndpoint = Maybe ContainerServiceEndpoint
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:ContainerServiceDeployment' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:containers:ContainerServiceDeployment' :: Maybe (HashMap Text Container)
containers = Maybe (HashMap Text Container)
forall a. Maybe a
Prelude.Nothing,
$sel:version:ContainerServiceDeployment' :: Maybe Int
version = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
containerServiceDeployment_state :: Lens.Lens' ContainerServiceDeployment (Prelude.Maybe ContainerServiceDeploymentState)
containerServiceDeployment_state :: (Maybe ContainerServiceDeploymentState
-> f (Maybe ContainerServiceDeploymentState))
-> ContainerServiceDeployment -> f ContainerServiceDeployment
containerServiceDeployment_state = (ContainerServiceDeployment
-> Maybe ContainerServiceDeploymentState)
-> (ContainerServiceDeployment
-> Maybe ContainerServiceDeploymentState
-> ContainerServiceDeployment)
-> Lens
ContainerServiceDeployment
ContainerServiceDeployment
(Maybe ContainerServiceDeploymentState)
(Maybe ContainerServiceDeploymentState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServiceDeployment' {Maybe ContainerServiceDeploymentState
state :: Maybe ContainerServiceDeploymentState
$sel:state:ContainerServiceDeployment' :: ContainerServiceDeployment -> Maybe ContainerServiceDeploymentState
state} -> Maybe ContainerServiceDeploymentState
state) (\s :: ContainerServiceDeployment
s@ContainerServiceDeployment' {} Maybe ContainerServiceDeploymentState
a -> ContainerServiceDeployment
s {$sel:state:ContainerServiceDeployment' :: Maybe ContainerServiceDeploymentState
state = Maybe ContainerServiceDeploymentState
a} :: ContainerServiceDeployment)
containerServiceDeployment_publicEndpoint :: Lens.Lens' ContainerServiceDeployment (Prelude.Maybe ContainerServiceEndpoint)
containerServiceDeployment_publicEndpoint :: (Maybe ContainerServiceEndpoint
-> f (Maybe ContainerServiceEndpoint))
-> ContainerServiceDeployment -> f ContainerServiceDeployment
containerServiceDeployment_publicEndpoint = (ContainerServiceDeployment -> Maybe ContainerServiceEndpoint)
-> (ContainerServiceDeployment
-> Maybe ContainerServiceEndpoint -> ContainerServiceDeployment)
-> Lens
ContainerServiceDeployment
ContainerServiceDeployment
(Maybe ContainerServiceEndpoint)
(Maybe ContainerServiceEndpoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServiceDeployment' {Maybe ContainerServiceEndpoint
publicEndpoint :: Maybe ContainerServiceEndpoint
$sel:publicEndpoint:ContainerServiceDeployment' :: ContainerServiceDeployment -> Maybe ContainerServiceEndpoint
publicEndpoint} -> Maybe ContainerServiceEndpoint
publicEndpoint) (\s :: ContainerServiceDeployment
s@ContainerServiceDeployment' {} Maybe ContainerServiceEndpoint
a -> ContainerServiceDeployment
s {$sel:publicEndpoint:ContainerServiceDeployment' :: Maybe ContainerServiceEndpoint
publicEndpoint = Maybe ContainerServiceEndpoint
a} :: ContainerServiceDeployment)
containerServiceDeployment_createdAt :: Lens.Lens' ContainerServiceDeployment (Prelude.Maybe Prelude.UTCTime)
containerServiceDeployment_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ContainerServiceDeployment -> f ContainerServiceDeployment
containerServiceDeployment_createdAt = (ContainerServiceDeployment -> Maybe POSIX)
-> (ContainerServiceDeployment
-> Maybe POSIX -> ContainerServiceDeployment)
-> Lens
ContainerServiceDeployment
ContainerServiceDeployment
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServiceDeployment' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:ContainerServiceDeployment' :: ContainerServiceDeployment -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: ContainerServiceDeployment
s@ContainerServiceDeployment' {} Maybe POSIX
a -> ContainerServiceDeployment
s {$sel:createdAt:ContainerServiceDeployment' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: ContainerServiceDeployment) ((Maybe POSIX -> f (Maybe POSIX))
-> ContainerServiceDeployment -> f ContainerServiceDeployment)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ContainerServiceDeployment
-> f ContainerServiceDeployment
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
containerServiceDeployment_containers :: Lens.Lens' ContainerServiceDeployment (Prelude.Maybe (Prelude.HashMap Prelude.Text Container))
containerServiceDeployment_containers :: (Maybe (HashMap Text Container)
-> f (Maybe (HashMap Text Container)))
-> ContainerServiceDeployment -> f ContainerServiceDeployment
containerServiceDeployment_containers = (ContainerServiceDeployment -> Maybe (HashMap Text Container))
-> (ContainerServiceDeployment
-> Maybe (HashMap Text Container) -> ContainerServiceDeployment)
-> Lens
ContainerServiceDeployment
ContainerServiceDeployment
(Maybe (HashMap Text Container))
(Maybe (HashMap Text Container))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServiceDeployment' {Maybe (HashMap Text Container)
containers :: Maybe (HashMap Text Container)
$sel:containers:ContainerServiceDeployment' :: ContainerServiceDeployment -> Maybe (HashMap Text Container)
containers} -> Maybe (HashMap Text Container)
containers) (\s :: ContainerServiceDeployment
s@ContainerServiceDeployment' {} Maybe (HashMap Text Container)
a -> ContainerServiceDeployment
s {$sel:containers:ContainerServiceDeployment' :: Maybe (HashMap Text Container)
containers = Maybe (HashMap Text Container)
a} :: ContainerServiceDeployment) ((Maybe (HashMap Text Container)
-> f (Maybe (HashMap Text Container)))
-> ContainerServiceDeployment -> f ContainerServiceDeployment)
-> ((Maybe (HashMap Text Container)
-> f (Maybe (HashMap Text Container)))
-> Maybe (HashMap Text Container)
-> f (Maybe (HashMap Text Container)))
-> (Maybe (HashMap Text Container)
-> f (Maybe (HashMap Text Container)))
-> ContainerServiceDeployment
-> f ContainerServiceDeployment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Container)
(HashMap Text Container)
(HashMap Text Container)
(HashMap Text Container)
-> Iso
(Maybe (HashMap Text Container))
(Maybe (HashMap Text Container))
(Maybe (HashMap Text Container))
(Maybe (HashMap Text Container))
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 Container)
(HashMap Text Container)
(HashMap Text Container)
(HashMap Text Container)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
containerServiceDeployment_version :: Lens.Lens' ContainerServiceDeployment (Prelude.Maybe Prelude.Int)
containerServiceDeployment_version :: (Maybe Int -> f (Maybe Int))
-> ContainerServiceDeployment -> f ContainerServiceDeployment
containerServiceDeployment_version = (ContainerServiceDeployment -> Maybe Int)
-> (ContainerServiceDeployment
-> Maybe Int -> ContainerServiceDeployment)
-> Lens
ContainerServiceDeployment
ContainerServiceDeployment
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServiceDeployment' {Maybe Int
version :: Maybe Int
$sel:version:ContainerServiceDeployment' :: ContainerServiceDeployment -> Maybe Int
version} -> Maybe Int
version) (\s :: ContainerServiceDeployment
s@ContainerServiceDeployment' {} Maybe Int
a -> ContainerServiceDeployment
s {$sel:version:ContainerServiceDeployment' :: Maybe Int
version = Maybe Int
a} :: ContainerServiceDeployment)
instance Core.FromJSON ContainerServiceDeployment where
parseJSON :: Value -> Parser ContainerServiceDeployment
parseJSON =
String
-> (Object -> Parser ContainerServiceDeployment)
-> Value
-> Parser ContainerServiceDeployment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ContainerServiceDeployment"
( \Object
x ->
Maybe ContainerServiceDeploymentState
-> Maybe ContainerServiceEndpoint
-> Maybe POSIX
-> Maybe (HashMap Text Container)
-> Maybe Int
-> ContainerServiceDeployment
ContainerServiceDeployment'
(Maybe ContainerServiceDeploymentState
-> Maybe ContainerServiceEndpoint
-> Maybe POSIX
-> Maybe (HashMap Text Container)
-> Maybe Int
-> ContainerServiceDeployment)
-> Parser (Maybe ContainerServiceDeploymentState)
-> Parser
(Maybe ContainerServiceEndpoint
-> Maybe POSIX
-> Maybe (HashMap Text Container)
-> Maybe Int
-> ContainerServiceDeployment)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ContainerServiceDeploymentState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
Parser
(Maybe ContainerServiceEndpoint
-> Maybe POSIX
-> Maybe (HashMap Text Container)
-> Maybe Int
-> ContainerServiceDeployment)
-> Parser (Maybe ContainerServiceEndpoint)
-> Parser
(Maybe POSIX
-> Maybe (HashMap Text Container)
-> Maybe Int
-> ContainerServiceDeployment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContainerServiceEndpoint)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"publicEndpoint")
Parser
(Maybe POSIX
-> Maybe (HashMap Text Container)
-> Maybe Int
-> ContainerServiceDeployment)
-> Parser (Maybe POSIX)
-> Parser
(Maybe (HashMap Text Container)
-> Maybe Int -> ContainerServiceDeployment)
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 (HashMap Text Container)
-> Maybe Int -> ContainerServiceDeployment)
-> Parser (Maybe (HashMap Text Container))
-> Parser (Maybe Int -> ContainerServiceDeployment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Container)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"containers" Parser (Maybe (Maybe (HashMap Text Container)))
-> Maybe (HashMap Text Container)
-> Parser (Maybe (HashMap Text Container))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Container)
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Int -> ContainerServiceDeployment)
-> Parser (Maybe Int) -> Parser ContainerServiceDeployment
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"version")
)
instance Prelude.Hashable ContainerServiceDeployment
instance Prelude.NFData ContainerServiceDeployment