{-# 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.EnvironmentInfoDescription where
import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.Types.EnvironmentInfoType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EnvironmentInfoDescription = EnvironmentInfoDescription'
{
EnvironmentInfoDescription -> Maybe ISO8601
sampleTimestamp :: Prelude.Maybe Core.ISO8601,
EnvironmentInfoDescription -> Maybe Text
ec2InstanceId :: Prelude.Maybe Prelude.Text,
EnvironmentInfoDescription -> Maybe EnvironmentInfoType
infoType :: Prelude.Maybe EnvironmentInfoType,
EnvironmentInfoDescription -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (EnvironmentInfoDescription -> EnvironmentInfoDescription -> Bool
(EnvironmentInfoDescription -> EnvironmentInfoDescription -> Bool)
-> (EnvironmentInfoDescription
-> EnvironmentInfoDescription -> Bool)
-> Eq EnvironmentInfoDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnvironmentInfoDescription -> EnvironmentInfoDescription -> Bool
$c/= :: EnvironmentInfoDescription -> EnvironmentInfoDescription -> Bool
== :: EnvironmentInfoDescription -> EnvironmentInfoDescription -> Bool
$c== :: EnvironmentInfoDescription -> EnvironmentInfoDescription -> Bool
Prelude.Eq, ReadPrec [EnvironmentInfoDescription]
ReadPrec EnvironmentInfoDescription
Int -> ReadS EnvironmentInfoDescription
ReadS [EnvironmentInfoDescription]
(Int -> ReadS EnvironmentInfoDescription)
-> ReadS [EnvironmentInfoDescription]
-> ReadPrec EnvironmentInfoDescription
-> ReadPrec [EnvironmentInfoDescription]
-> Read EnvironmentInfoDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnvironmentInfoDescription]
$creadListPrec :: ReadPrec [EnvironmentInfoDescription]
readPrec :: ReadPrec EnvironmentInfoDescription
$creadPrec :: ReadPrec EnvironmentInfoDescription
readList :: ReadS [EnvironmentInfoDescription]
$creadList :: ReadS [EnvironmentInfoDescription]
readsPrec :: Int -> ReadS EnvironmentInfoDescription
$creadsPrec :: Int -> ReadS EnvironmentInfoDescription
Prelude.Read, Int -> EnvironmentInfoDescription -> ShowS
[EnvironmentInfoDescription] -> ShowS
EnvironmentInfoDescription -> String
(Int -> EnvironmentInfoDescription -> ShowS)
-> (EnvironmentInfoDescription -> String)
-> ([EnvironmentInfoDescription] -> ShowS)
-> Show EnvironmentInfoDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnvironmentInfoDescription] -> ShowS
$cshowList :: [EnvironmentInfoDescription] -> ShowS
show :: EnvironmentInfoDescription -> String
$cshow :: EnvironmentInfoDescription -> String
showsPrec :: Int -> EnvironmentInfoDescription -> ShowS
$cshowsPrec :: Int -> EnvironmentInfoDescription -> ShowS
Prelude.Show, (forall x.
EnvironmentInfoDescription -> Rep EnvironmentInfoDescription x)
-> (forall x.
Rep EnvironmentInfoDescription x -> EnvironmentInfoDescription)
-> Generic EnvironmentInfoDescription
forall x.
Rep EnvironmentInfoDescription x -> EnvironmentInfoDescription
forall x.
EnvironmentInfoDescription -> Rep EnvironmentInfoDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnvironmentInfoDescription x -> EnvironmentInfoDescription
$cfrom :: forall x.
EnvironmentInfoDescription -> Rep EnvironmentInfoDescription x
Prelude.Generic)
newEnvironmentInfoDescription ::
EnvironmentInfoDescription
newEnvironmentInfoDescription :: EnvironmentInfoDescription
newEnvironmentInfoDescription =
EnvironmentInfoDescription' :: Maybe ISO8601
-> Maybe Text
-> Maybe EnvironmentInfoType
-> Maybe Text
-> EnvironmentInfoDescription
EnvironmentInfoDescription'
{ $sel:sampleTimestamp:EnvironmentInfoDescription' :: Maybe ISO8601
sampleTimestamp =
Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:ec2InstanceId:EnvironmentInfoDescription' :: Maybe Text
ec2InstanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:infoType:EnvironmentInfoDescription' :: Maybe EnvironmentInfoType
infoType = Maybe EnvironmentInfoType
forall a. Maybe a
Prelude.Nothing,
$sel:message:EnvironmentInfoDescription' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
environmentInfoDescription_sampleTimestamp :: Lens.Lens' EnvironmentInfoDescription (Prelude.Maybe Prelude.UTCTime)
environmentInfoDescription_sampleTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EnvironmentInfoDescription -> f EnvironmentInfoDescription
environmentInfoDescription_sampleTimestamp = (EnvironmentInfoDescription -> Maybe ISO8601)
-> (EnvironmentInfoDescription
-> Maybe ISO8601 -> EnvironmentInfoDescription)
-> Lens
EnvironmentInfoDescription
EnvironmentInfoDescription
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentInfoDescription' {Maybe ISO8601
sampleTimestamp :: Maybe ISO8601
$sel:sampleTimestamp:EnvironmentInfoDescription' :: EnvironmentInfoDescription -> Maybe ISO8601
sampleTimestamp} -> Maybe ISO8601
sampleTimestamp) (\s :: EnvironmentInfoDescription
s@EnvironmentInfoDescription' {} Maybe ISO8601
a -> EnvironmentInfoDescription
s {$sel:sampleTimestamp:EnvironmentInfoDescription' :: Maybe ISO8601
sampleTimestamp = Maybe ISO8601
a} :: EnvironmentInfoDescription) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> EnvironmentInfoDescription -> f EnvironmentInfoDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EnvironmentInfoDescription
-> f EnvironmentInfoDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
environmentInfoDescription_ec2InstanceId :: Lens.Lens' EnvironmentInfoDescription (Prelude.Maybe Prelude.Text)
environmentInfoDescription_ec2InstanceId :: (Maybe Text -> f (Maybe Text))
-> EnvironmentInfoDescription -> f EnvironmentInfoDescription
environmentInfoDescription_ec2InstanceId = (EnvironmentInfoDescription -> Maybe Text)
-> (EnvironmentInfoDescription
-> Maybe Text -> EnvironmentInfoDescription)
-> Lens
EnvironmentInfoDescription
EnvironmentInfoDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentInfoDescription' {Maybe Text
ec2InstanceId :: Maybe Text
$sel:ec2InstanceId:EnvironmentInfoDescription' :: EnvironmentInfoDescription -> Maybe Text
ec2InstanceId} -> Maybe Text
ec2InstanceId) (\s :: EnvironmentInfoDescription
s@EnvironmentInfoDescription' {} Maybe Text
a -> EnvironmentInfoDescription
s {$sel:ec2InstanceId:EnvironmentInfoDescription' :: Maybe Text
ec2InstanceId = Maybe Text
a} :: EnvironmentInfoDescription)
environmentInfoDescription_infoType :: Lens.Lens' EnvironmentInfoDescription (Prelude.Maybe EnvironmentInfoType)
environmentInfoDescription_infoType :: (Maybe EnvironmentInfoType -> f (Maybe EnvironmentInfoType))
-> EnvironmentInfoDescription -> f EnvironmentInfoDescription
environmentInfoDescription_infoType = (EnvironmentInfoDescription -> Maybe EnvironmentInfoType)
-> (EnvironmentInfoDescription
-> Maybe EnvironmentInfoType -> EnvironmentInfoDescription)
-> Lens
EnvironmentInfoDescription
EnvironmentInfoDescription
(Maybe EnvironmentInfoType)
(Maybe EnvironmentInfoType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentInfoDescription' {Maybe EnvironmentInfoType
infoType :: Maybe EnvironmentInfoType
$sel:infoType:EnvironmentInfoDescription' :: EnvironmentInfoDescription -> Maybe EnvironmentInfoType
infoType} -> Maybe EnvironmentInfoType
infoType) (\s :: EnvironmentInfoDescription
s@EnvironmentInfoDescription' {} Maybe EnvironmentInfoType
a -> EnvironmentInfoDescription
s {$sel:infoType:EnvironmentInfoDescription' :: Maybe EnvironmentInfoType
infoType = Maybe EnvironmentInfoType
a} :: EnvironmentInfoDescription)
environmentInfoDescription_message :: Lens.Lens' EnvironmentInfoDescription (Prelude.Maybe Prelude.Text)
environmentInfoDescription_message :: (Maybe Text -> f (Maybe Text))
-> EnvironmentInfoDescription -> f EnvironmentInfoDescription
environmentInfoDescription_message = (EnvironmentInfoDescription -> Maybe Text)
-> (EnvironmentInfoDescription
-> Maybe Text -> EnvironmentInfoDescription)
-> Lens
EnvironmentInfoDescription
EnvironmentInfoDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentInfoDescription' {Maybe Text
message :: Maybe Text
$sel:message:EnvironmentInfoDescription' :: EnvironmentInfoDescription -> Maybe Text
message} -> Maybe Text
message) (\s :: EnvironmentInfoDescription
s@EnvironmentInfoDescription' {} Maybe Text
a -> EnvironmentInfoDescription
s {$sel:message:EnvironmentInfoDescription' :: Maybe Text
message = Maybe Text
a} :: EnvironmentInfoDescription)
instance Core.FromXML EnvironmentInfoDescription where
parseXML :: [Node] -> Either String EnvironmentInfoDescription
parseXML [Node]
x =
Maybe ISO8601
-> Maybe Text
-> Maybe EnvironmentInfoType
-> Maybe Text
-> EnvironmentInfoDescription
EnvironmentInfoDescription'
(Maybe ISO8601
-> Maybe Text
-> Maybe EnvironmentInfoType
-> Maybe Text
-> EnvironmentInfoDescription)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Text
-> Maybe EnvironmentInfoType
-> Maybe Text
-> EnvironmentInfoDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SampleTimestamp")
Either
String
(Maybe Text
-> Maybe EnvironmentInfoType
-> Maybe Text
-> EnvironmentInfoDescription)
-> Either String (Maybe Text)
-> Either
String
(Maybe EnvironmentInfoType
-> Maybe Text -> EnvironmentInfoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Ec2InstanceId")
Either
String
(Maybe EnvironmentInfoType
-> Maybe Text -> EnvironmentInfoDescription)
-> Either String (Maybe EnvironmentInfoType)
-> Either String (Maybe Text -> EnvironmentInfoDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe EnvironmentInfoType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"InfoType")
Either String (Maybe Text -> EnvironmentInfoDescription)
-> Either String (Maybe Text)
-> Either String EnvironmentInfoDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Message")
instance Prelude.Hashable EnvironmentInfoDescription
instance Prelude.NFData EnvironmentInfoDescription