{-# 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.CloudFormationStackRecord where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lightsail.Types.CloudFormationStackRecordSourceInfo
import Amazonka.Lightsail.Types.DestinationInfo
import Amazonka.Lightsail.Types.RecordState
import Amazonka.Lightsail.Types.ResourceLocation
import Amazonka.Lightsail.Types.ResourceType
import qualified Amazonka.Prelude as Prelude
data CloudFormationStackRecord = CloudFormationStackRecord'
{
CloudFormationStackRecord -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CloudFormationStackRecord -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
CloudFormationStackRecord -> Maybe DestinationInfo
destinationInfo :: Prelude.Maybe DestinationInfo,
CloudFormationStackRecord -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
CloudFormationStackRecord -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CloudFormationStackRecord -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
CloudFormationStackRecord
-> Maybe [CloudFormationStackRecordSourceInfo]
sourceInfo :: Prelude.Maybe [CloudFormationStackRecordSourceInfo],
CloudFormationStackRecord -> Maybe RecordState
state :: Prelude.Maybe RecordState
}
deriving (CloudFormationStackRecord -> CloudFormationStackRecord -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudFormationStackRecord -> CloudFormationStackRecord -> Bool
$c/= :: CloudFormationStackRecord -> CloudFormationStackRecord -> Bool
== :: CloudFormationStackRecord -> CloudFormationStackRecord -> Bool
$c== :: CloudFormationStackRecord -> CloudFormationStackRecord -> Bool
Prelude.Eq, ReadPrec [CloudFormationStackRecord]
ReadPrec CloudFormationStackRecord
Int -> ReadS CloudFormationStackRecord
ReadS [CloudFormationStackRecord]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudFormationStackRecord]
$creadListPrec :: ReadPrec [CloudFormationStackRecord]
readPrec :: ReadPrec CloudFormationStackRecord
$creadPrec :: ReadPrec CloudFormationStackRecord
readList :: ReadS [CloudFormationStackRecord]
$creadList :: ReadS [CloudFormationStackRecord]
readsPrec :: Int -> ReadS CloudFormationStackRecord
$creadsPrec :: Int -> ReadS CloudFormationStackRecord
Prelude.Read, Int -> CloudFormationStackRecord -> ShowS
[CloudFormationStackRecord] -> ShowS
CloudFormationStackRecord -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudFormationStackRecord] -> ShowS
$cshowList :: [CloudFormationStackRecord] -> ShowS
show :: CloudFormationStackRecord -> String
$cshow :: CloudFormationStackRecord -> String
showsPrec :: Int -> CloudFormationStackRecord -> ShowS
$cshowsPrec :: Int -> CloudFormationStackRecord -> ShowS
Prelude.Show, forall x.
Rep CloudFormationStackRecord x -> CloudFormationStackRecord
forall x.
CloudFormationStackRecord -> Rep CloudFormationStackRecord x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CloudFormationStackRecord x -> CloudFormationStackRecord
$cfrom :: forall x.
CloudFormationStackRecord -> Rep CloudFormationStackRecord x
Prelude.Generic)
newCloudFormationStackRecord ::
CloudFormationStackRecord
newCloudFormationStackRecord :: CloudFormationStackRecord
newCloudFormationStackRecord =
CloudFormationStackRecord'
{ $sel:arn:CloudFormationStackRecord' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:CloudFormationStackRecord' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
$sel:destinationInfo:CloudFormationStackRecord' :: Maybe DestinationInfo
destinationInfo = forall a. Maybe a
Prelude.Nothing,
$sel:location:CloudFormationStackRecord' :: Maybe ResourceLocation
location = forall a. Maybe a
Prelude.Nothing,
$sel:name:CloudFormationStackRecord' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:CloudFormationStackRecord' :: Maybe ResourceType
resourceType = forall a. Maybe a
Prelude.Nothing,
$sel:sourceInfo:CloudFormationStackRecord' :: Maybe [CloudFormationStackRecordSourceInfo]
sourceInfo = forall a. Maybe a
Prelude.Nothing,
$sel:state:CloudFormationStackRecord' :: Maybe RecordState
state = forall a. Maybe a
Prelude.Nothing
}
cloudFormationStackRecord_arn :: Lens.Lens' CloudFormationStackRecord (Prelude.Maybe Prelude.Text)
cloudFormationStackRecord_arn :: Lens' CloudFormationStackRecord (Maybe Text)
cloudFormationStackRecord_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationStackRecord' {Maybe Text
arn :: Maybe Text
$sel:arn:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CloudFormationStackRecord
s@CloudFormationStackRecord' {} Maybe Text
a -> CloudFormationStackRecord
s {$sel:arn:CloudFormationStackRecord' :: Maybe Text
arn = Maybe Text
a} :: CloudFormationStackRecord)
cloudFormationStackRecord_createdAt :: Lens.Lens' CloudFormationStackRecord (Prelude.Maybe Prelude.UTCTime)
cloudFormationStackRecord_createdAt :: Lens' CloudFormationStackRecord (Maybe UTCTime)
cloudFormationStackRecord_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationStackRecord' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: CloudFormationStackRecord
s@CloudFormationStackRecord' {} Maybe POSIX
a -> CloudFormationStackRecord
s {$sel:createdAt:CloudFormationStackRecord' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: CloudFormationStackRecord) 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
cloudFormationStackRecord_destinationInfo :: Lens.Lens' CloudFormationStackRecord (Prelude.Maybe DestinationInfo)
cloudFormationStackRecord_destinationInfo :: Lens' CloudFormationStackRecord (Maybe DestinationInfo)
cloudFormationStackRecord_destinationInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationStackRecord' {Maybe DestinationInfo
destinationInfo :: Maybe DestinationInfo
$sel:destinationInfo:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe DestinationInfo
destinationInfo} -> Maybe DestinationInfo
destinationInfo) (\s :: CloudFormationStackRecord
s@CloudFormationStackRecord' {} Maybe DestinationInfo
a -> CloudFormationStackRecord
s {$sel:destinationInfo:CloudFormationStackRecord' :: Maybe DestinationInfo
destinationInfo = Maybe DestinationInfo
a} :: CloudFormationStackRecord)
cloudFormationStackRecord_location :: Lens.Lens' CloudFormationStackRecord (Prelude.Maybe ResourceLocation)
cloudFormationStackRecord_location :: Lens' CloudFormationStackRecord (Maybe ResourceLocation)
cloudFormationStackRecord_location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationStackRecord' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: CloudFormationStackRecord
s@CloudFormationStackRecord' {} Maybe ResourceLocation
a -> CloudFormationStackRecord
s {$sel:location:CloudFormationStackRecord' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: CloudFormationStackRecord)
cloudFormationStackRecord_name :: Lens.Lens' CloudFormationStackRecord (Prelude.Maybe Prelude.Text)
cloudFormationStackRecord_name :: Lens' CloudFormationStackRecord (Maybe Text)
cloudFormationStackRecord_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationStackRecord' {Maybe Text
name :: Maybe Text
$sel:name:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe Text
name} -> Maybe Text
name) (\s :: CloudFormationStackRecord
s@CloudFormationStackRecord' {} Maybe Text
a -> CloudFormationStackRecord
s {$sel:name:CloudFormationStackRecord' :: Maybe Text
name = Maybe Text
a} :: CloudFormationStackRecord)
cloudFormationStackRecord_resourceType :: Lens.Lens' CloudFormationStackRecord (Prelude.Maybe ResourceType)
cloudFormationStackRecord_resourceType :: Lens' CloudFormationStackRecord (Maybe ResourceType)
cloudFormationStackRecord_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationStackRecord' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: CloudFormationStackRecord
s@CloudFormationStackRecord' {} Maybe ResourceType
a -> CloudFormationStackRecord
s {$sel:resourceType:CloudFormationStackRecord' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: CloudFormationStackRecord)
cloudFormationStackRecord_sourceInfo :: Lens.Lens' CloudFormationStackRecord (Prelude.Maybe [CloudFormationStackRecordSourceInfo])
cloudFormationStackRecord_sourceInfo :: Lens'
CloudFormationStackRecord
(Maybe [CloudFormationStackRecordSourceInfo])
cloudFormationStackRecord_sourceInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationStackRecord' {Maybe [CloudFormationStackRecordSourceInfo]
sourceInfo :: Maybe [CloudFormationStackRecordSourceInfo]
$sel:sourceInfo:CloudFormationStackRecord' :: CloudFormationStackRecord
-> Maybe [CloudFormationStackRecordSourceInfo]
sourceInfo} -> Maybe [CloudFormationStackRecordSourceInfo]
sourceInfo) (\s :: CloudFormationStackRecord
s@CloudFormationStackRecord' {} Maybe [CloudFormationStackRecordSourceInfo]
a -> CloudFormationStackRecord
s {$sel:sourceInfo:CloudFormationStackRecord' :: Maybe [CloudFormationStackRecordSourceInfo]
sourceInfo = Maybe [CloudFormationStackRecordSourceInfo]
a} :: CloudFormationStackRecord) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cloudFormationStackRecord_state :: Lens.Lens' CloudFormationStackRecord (Prelude.Maybe RecordState)
cloudFormationStackRecord_state :: Lens' CloudFormationStackRecord (Maybe RecordState)
cloudFormationStackRecord_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationStackRecord' {Maybe RecordState
state :: Maybe RecordState
$sel:state:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe RecordState
state} -> Maybe RecordState
state) (\s :: CloudFormationStackRecord
s@CloudFormationStackRecord' {} Maybe RecordState
a -> CloudFormationStackRecord
s {$sel:state:CloudFormationStackRecord' :: Maybe RecordState
state = Maybe RecordState
a} :: CloudFormationStackRecord)
instance Data.FromJSON CloudFormationStackRecord where
parseJSON :: Value -> Parser CloudFormationStackRecord
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CloudFormationStackRecord"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe DestinationInfo
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe ResourceType
-> Maybe [CloudFormationStackRecordSourceInfo]
-> Maybe RecordState
-> CloudFormationStackRecord
CloudFormationStackRecord'
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
"createdAt")
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
"destinationInfo")
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
"location")
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
"resourceType")
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
"sourceInfo" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"state")
)
instance Prelude.Hashable CloudFormationStackRecord where
hashWithSalt :: Int -> CloudFormationStackRecord -> Int
hashWithSalt Int
_salt CloudFormationStackRecord' {Maybe [CloudFormationStackRecordSourceInfo]
Maybe Text
Maybe POSIX
Maybe DestinationInfo
Maybe RecordState
Maybe ResourceLocation
Maybe ResourceType
state :: Maybe RecordState
sourceInfo :: Maybe [CloudFormationStackRecordSourceInfo]
resourceType :: Maybe ResourceType
name :: Maybe Text
location :: Maybe ResourceLocation
destinationInfo :: Maybe DestinationInfo
createdAt :: Maybe POSIX
arn :: Maybe Text
$sel:state:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe RecordState
$sel:sourceInfo:CloudFormationStackRecord' :: CloudFormationStackRecord
-> Maybe [CloudFormationStackRecordSourceInfo]
$sel:resourceType:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe ResourceType
$sel:name:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe Text
$sel:location:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe ResourceLocation
$sel:destinationInfo:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe DestinationInfo
$sel:createdAt:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe POSIX
$sel:arn:CloudFormationStackRecord' :: CloudFormationStackRecord -> 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
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DestinationInfo
destinationInfo
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceLocation
location
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceType
resourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [CloudFormationStackRecordSourceInfo]
sourceInfo
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RecordState
state
instance Prelude.NFData CloudFormationStackRecord where
rnf :: CloudFormationStackRecord -> ()
rnf CloudFormationStackRecord' {Maybe [CloudFormationStackRecordSourceInfo]
Maybe Text
Maybe POSIX
Maybe DestinationInfo
Maybe RecordState
Maybe ResourceLocation
Maybe ResourceType
state :: Maybe RecordState
sourceInfo :: Maybe [CloudFormationStackRecordSourceInfo]
resourceType :: Maybe ResourceType
name :: Maybe Text
location :: Maybe ResourceLocation
destinationInfo :: Maybe DestinationInfo
createdAt :: Maybe POSIX
arn :: Maybe Text
$sel:state:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe RecordState
$sel:sourceInfo:CloudFormationStackRecord' :: CloudFormationStackRecord
-> Maybe [CloudFormationStackRecordSourceInfo]
$sel:resourceType:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe ResourceType
$sel:name:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe Text
$sel:location:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe ResourceLocation
$sel:destinationInfo:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe DestinationInfo
$sel:createdAt:CloudFormationStackRecord' :: CloudFormationStackRecord -> Maybe POSIX
$sel:arn:CloudFormationStackRecord' :: CloudFormationStackRecord -> 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
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DestinationInfo
destinationInfo
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceLocation
location
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 ResourceType
resourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [CloudFormationStackRecordSourceInfo]
sourceInfo
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RecordState
state