{-# 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.ElasticBeanstalk.Types.Deployment 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
data Deployment = Deployment'
{
Deployment -> Maybe Integer
deploymentId :: Prelude.Maybe Prelude.Integer,
Deployment -> Maybe ISO8601
deploymentTime :: Prelude.Maybe Data.ISO8601,
Deployment -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
Deployment -> Maybe Text
versionLabel :: Prelude.Maybe Prelude.Text
}
deriving (Deployment -> Deployment -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Deployment -> Deployment -> Bool
$c/= :: Deployment -> Deployment -> Bool
== :: Deployment -> Deployment -> Bool
$c== :: Deployment -> Deployment -> Bool
Prelude.Eq, ReadPrec [Deployment]
ReadPrec Deployment
Int -> ReadS Deployment
ReadS [Deployment]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Deployment]
$creadListPrec :: ReadPrec [Deployment]
readPrec :: ReadPrec Deployment
$creadPrec :: ReadPrec Deployment
readList :: ReadS [Deployment]
$creadList :: ReadS [Deployment]
readsPrec :: Int -> ReadS Deployment
$creadsPrec :: Int -> ReadS Deployment
Prelude.Read, Int -> Deployment -> ShowS
[Deployment] -> ShowS
Deployment -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Deployment] -> ShowS
$cshowList :: [Deployment] -> ShowS
show :: Deployment -> String
$cshow :: Deployment -> String
showsPrec :: Int -> Deployment -> ShowS
$cshowsPrec :: Int -> Deployment -> ShowS
Prelude.Show, forall x. Rep Deployment x -> Deployment
forall x. Deployment -> Rep Deployment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Deployment x -> Deployment
$cfrom :: forall x. Deployment -> Rep Deployment x
Prelude.Generic)
newDeployment ::
Deployment
newDeployment :: Deployment
newDeployment =
Deployment'
{ $sel:deploymentId:Deployment' :: Maybe Integer
deploymentId = forall a. Maybe a
Prelude.Nothing,
$sel:deploymentTime:Deployment' :: Maybe ISO8601
deploymentTime = forall a. Maybe a
Prelude.Nothing,
$sel:status:Deployment' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
$sel:versionLabel:Deployment' :: Maybe Text
versionLabel = forall a. Maybe a
Prelude.Nothing
}
deployment_deploymentId :: Lens.Lens' Deployment (Prelude.Maybe Prelude.Integer)
deployment_deploymentId :: Lens' Deployment (Maybe Integer)
deployment_deploymentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Deployment' {Maybe Integer
deploymentId :: Maybe Integer
$sel:deploymentId:Deployment' :: Deployment -> Maybe Integer
deploymentId} -> Maybe Integer
deploymentId) (\s :: Deployment
s@Deployment' {} Maybe Integer
a -> Deployment
s {$sel:deploymentId:Deployment' :: Maybe Integer
deploymentId = Maybe Integer
a} :: Deployment)
deployment_deploymentTime :: Lens.Lens' Deployment (Prelude.Maybe Prelude.UTCTime)
deployment_deploymentTime :: Lens' Deployment (Maybe UTCTime)
deployment_deploymentTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Deployment' {Maybe ISO8601
deploymentTime :: Maybe ISO8601
$sel:deploymentTime:Deployment' :: Deployment -> Maybe ISO8601
deploymentTime} -> Maybe ISO8601
deploymentTime) (\s :: Deployment
s@Deployment' {} Maybe ISO8601
a -> Deployment
s {$sel:deploymentTime:Deployment' :: Maybe ISO8601
deploymentTime = Maybe ISO8601
a} :: Deployment) 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
deployment_status :: Lens.Lens' Deployment (Prelude.Maybe Prelude.Text)
deployment_status :: Lens' Deployment (Maybe Text)
deployment_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Deployment' {Maybe Text
status :: Maybe Text
$sel:status:Deployment' :: Deployment -> Maybe Text
status} -> Maybe Text
status) (\s :: Deployment
s@Deployment' {} Maybe Text
a -> Deployment
s {$sel:status:Deployment' :: Maybe Text
status = Maybe Text
a} :: Deployment)
deployment_versionLabel :: Lens.Lens' Deployment (Prelude.Maybe Prelude.Text)
deployment_versionLabel :: Lens' Deployment (Maybe Text)
deployment_versionLabel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Deployment' {Maybe Text
versionLabel :: Maybe Text
$sel:versionLabel:Deployment' :: Deployment -> Maybe Text
versionLabel} -> Maybe Text
versionLabel) (\s :: Deployment
s@Deployment' {} Maybe Text
a -> Deployment
s {$sel:versionLabel:Deployment' :: Maybe Text
versionLabel = Maybe Text
a} :: Deployment)
instance Data.FromXML Deployment where
parseXML :: [Node] -> Either String Deployment
parseXML [Node]
x =
Maybe Integer
-> Maybe ISO8601 -> Maybe Text -> Maybe Text -> Deployment
Deployment'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DeploymentId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DeploymentTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"VersionLabel")
instance Prelude.Hashable Deployment where
hashWithSalt :: Int -> Deployment -> Int
hashWithSalt Int
_salt Deployment' {Maybe Integer
Maybe Text
Maybe ISO8601
versionLabel :: Maybe Text
status :: Maybe Text
deploymentTime :: Maybe ISO8601
deploymentId :: Maybe Integer
$sel:versionLabel:Deployment' :: Deployment -> Maybe Text
$sel:status:Deployment' :: Deployment -> Maybe Text
$sel:deploymentTime:Deployment' :: Deployment -> Maybe ISO8601
$sel:deploymentId:Deployment' :: Deployment -> Maybe Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
deploymentId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
deploymentTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
versionLabel
instance Prelude.NFData Deployment where
rnf :: Deployment -> ()
rnf Deployment' {Maybe Integer
Maybe Text
Maybe ISO8601
versionLabel :: Maybe Text
status :: Maybe Text
deploymentTime :: Maybe ISO8601
deploymentId :: Maybe Integer
$sel:versionLabel:Deployment' :: Deployment -> Maybe Text
$sel:status:Deployment' :: Deployment -> Maybe Text
$sel:deploymentTime:Deployment' :: Deployment -> Maybe ISO8601
$sel:deploymentId:Deployment' :: Deployment -> Maybe Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
deploymentId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
deploymentTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
versionLabel