{-# 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.CloudFormation.Types.TypeVersionSummary where
import Amazonka.CloudFormation.Types.RegistryType
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 TypeVersionSummary = TypeVersionSummary'
{
TypeVersionSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
TypeVersionSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
TypeVersionSummary -> Maybe Bool
isDefaultVersion :: Prelude.Maybe Prelude.Bool,
TypeVersionSummary -> Maybe Text
publicVersionNumber :: Prelude.Maybe Prelude.Text,
TypeVersionSummary -> Maybe ISO8601
timeCreated :: Prelude.Maybe Data.ISO8601,
TypeVersionSummary -> Maybe RegistryType
type' :: Prelude.Maybe RegistryType,
TypeVersionSummary -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
TypeVersionSummary -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text
}
deriving (TypeVersionSummary -> TypeVersionSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TypeVersionSummary -> TypeVersionSummary -> Bool
$c/= :: TypeVersionSummary -> TypeVersionSummary -> Bool
== :: TypeVersionSummary -> TypeVersionSummary -> Bool
$c== :: TypeVersionSummary -> TypeVersionSummary -> Bool
Prelude.Eq, ReadPrec [TypeVersionSummary]
ReadPrec TypeVersionSummary
Int -> ReadS TypeVersionSummary
ReadS [TypeVersionSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TypeVersionSummary]
$creadListPrec :: ReadPrec [TypeVersionSummary]
readPrec :: ReadPrec TypeVersionSummary
$creadPrec :: ReadPrec TypeVersionSummary
readList :: ReadS [TypeVersionSummary]
$creadList :: ReadS [TypeVersionSummary]
readsPrec :: Int -> ReadS TypeVersionSummary
$creadsPrec :: Int -> ReadS TypeVersionSummary
Prelude.Read, Int -> TypeVersionSummary -> ShowS
[TypeVersionSummary] -> ShowS
TypeVersionSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypeVersionSummary] -> ShowS
$cshowList :: [TypeVersionSummary] -> ShowS
show :: TypeVersionSummary -> String
$cshow :: TypeVersionSummary -> String
showsPrec :: Int -> TypeVersionSummary -> ShowS
$cshowsPrec :: Int -> TypeVersionSummary -> ShowS
Prelude.Show, forall x. Rep TypeVersionSummary x -> TypeVersionSummary
forall x. TypeVersionSummary -> Rep TypeVersionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TypeVersionSummary x -> TypeVersionSummary
$cfrom :: forall x. TypeVersionSummary -> Rep TypeVersionSummary x
Prelude.Generic)
newTypeVersionSummary ::
TypeVersionSummary
newTypeVersionSummary :: TypeVersionSummary
newTypeVersionSummary =
TypeVersionSummary'
{ $sel:arn:TypeVersionSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:description:TypeVersionSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:isDefaultVersion:TypeVersionSummary' :: Maybe Bool
isDefaultVersion = forall a. Maybe a
Prelude.Nothing,
$sel:publicVersionNumber:TypeVersionSummary' :: Maybe Text
publicVersionNumber = forall a. Maybe a
Prelude.Nothing,
$sel:timeCreated:TypeVersionSummary' :: Maybe ISO8601
timeCreated = forall a. Maybe a
Prelude.Nothing,
$sel:type':TypeVersionSummary' :: Maybe RegistryType
type' = forall a. Maybe a
Prelude.Nothing,
$sel:typeName:TypeVersionSummary' :: Maybe Text
typeName = forall a. Maybe a
Prelude.Nothing,
$sel:versionId:TypeVersionSummary' :: Maybe Text
versionId = forall a. Maybe a
Prelude.Nothing
}
typeVersionSummary_arn :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Text)
typeVersionSummary_arn :: Lens' TypeVersionSummary (Maybe Text)
typeVersionSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeVersionSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: TypeVersionSummary
s@TypeVersionSummary' {} Maybe Text
a -> TypeVersionSummary
s {$sel:arn:TypeVersionSummary' :: Maybe Text
arn = Maybe Text
a} :: TypeVersionSummary)
typeVersionSummary_description :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Text)
typeVersionSummary_description :: Lens' TypeVersionSummary (Maybe Text)
typeVersionSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeVersionSummary' {Maybe Text
description :: Maybe Text
$sel:description:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: TypeVersionSummary
s@TypeVersionSummary' {} Maybe Text
a -> TypeVersionSummary
s {$sel:description:TypeVersionSummary' :: Maybe Text
description = Maybe Text
a} :: TypeVersionSummary)
typeVersionSummary_isDefaultVersion :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Bool)
typeVersionSummary_isDefaultVersion :: Lens' TypeVersionSummary (Maybe Bool)
typeVersionSummary_isDefaultVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeVersionSummary' {Maybe Bool
isDefaultVersion :: Maybe Bool
$sel:isDefaultVersion:TypeVersionSummary' :: TypeVersionSummary -> Maybe Bool
isDefaultVersion} -> Maybe Bool
isDefaultVersion) (\s :: TypeVersionSummary
s@TypeVersionSummary' {} Maybe Bool
a -> TypeVersionSummary
s {$sel:isDefaultVersion:TypeVersionSummary' :: Maybe Bool
isDefaultVersion = Maybe Bool
a} :: TypeVersionSummary)
typeVersionSummary_publicVersionNumber :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Text)
typeVersionSummary_publicVersionNumber :: Lens' TypeVersionSummary (Maybe Text)
typeVersionSummary_publicVersionNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeVersionSummary' {Maybe Text
publicVersionNumber :: Maybe Text
$sel:publicVersionNumber:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
publicVersionNumber} -> Maybe Text
publicVersionNumber) (\s :: TypeVersionSummary
s@TypeVersionSummary' {} Maybe Text
a -> TypeVersionSummary
s {$sel:publicVersionNumber:TypeVersionSummary' :: Maybe Text
publicVersionNumber = Maybe Text
a} :: TypeVersionSummary)
typeVersionSummary_timeCreated :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.UTCTime)
typeVersionSummary_timeCreated :: Lens' TypeVersionSummary (Maybe UTCTime)
typeVersionSummary_timeCreated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeVersionSummary' {Maybe ISO8601
timeCreated :: Maybe ISO8601
$sel:timeCreated:TypeVersionSummary' :: TypeVersionSummary -> Maybe ISO8601
timeCreated} -> Maybe ISO8601
timeCreated) (\s :: TypeVersionSummary
s@TypeVersionSummary' {} Maybe ISO8601
a -> TypeVersionSummary
s {$sel:timeCreated:TypeVersionSummary' :: Maybe ISO8601
timeCreated = Maybe ISO8601
a} :: TypeVersionSummary) 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
typeVersionSummary_type :: Lens.Lens' TypeVersionSummary (Prelude.Maybe RegistryType)
typeVersionSummary_type :: Lens' TypeVersionSummary (Maybe RegistryType)
typeVersionSummary_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeVersionSummary' {Maybe RegistryType
type' :: Maybe RegistryType
$sel:type':TypeVersionSummary' :: TypeVersionSummary -> Maybe RegistryType
type'} -> Maybe RegistryType
type') (\s :: TypeVersionSummary
s@TypeVersionSummary' {} Maybe RegistryType
a -> TypeVersionSummary
s {$sel:type':TypeVersionSummary' :: Maybe RegistryType
type' = Maybe RegistryType
a} :: TypeVersionSummary)
typeVersionSummary_typeName :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Text)
typeVersionSummary_typeName :: Lens' TypeVersionSummary (Maybe Text)
typeVersionSummary_typeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeVersionSummary' {Maybe Text
typeName :: Maybe Text
$sel:typeName:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: TypeVersionSummary
s@TypeVersionSummary' {} Maybe Text
a -> TypeVersionSummary
s {$sel:typeName:TypeVersionSummary' :: Maybe Text
typeName = Maybe Text
a} :: TypeVersionSummary)
typeVersionSummary_versionId :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Text)
typeVersionSummary_versionId :: Lens' TypeVersionSummary (Maybe Text)
typeVersionSummary_versionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeVersionSummary' {Maybe Text
versionId :: Maybe Text
$sel:versionId:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
versionId} -> Maybe Text
versionId) (\s :: TypeVersionSummary
s@TypeVersionSummary' {} Maybe Text
a -> TypeVersionSummary
s {$sel:versionId:TypeVersionSummary' :: Maybe Text
versionId = Maybe Text
a} :: TypeVersionSummary)
instance Data.FromXML TypeVersionSummary where
parseXML :: [Node] -> Either String TypeVersionSummary
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe ISO8601
-> Maybe RegistryType
-> Maybe Text
-> Maybe Text
-> TypeVersionSummary
TypeVersionSummary'
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
"Arn")
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
"Description")
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
"IsDefaultVersion")
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
"PublicVersionNumber")
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
"TimeCreated")
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
"Type")
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
"TypeName")
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
"VersionId")
instance Prelude.Hashable TypeVersionSummary where
hashWithSalt :: Int -> TypeVersionSummary -> Int
hashWithSalt Int
_salt TypeVersionSummary' {Maybe Bool
Maybe Text
Maybe ISO8601
Maybe RegistryType
versionId :: Maybe Text
typeName :: Maybe Text
type' :: Maybe RegistryType
timeCreated :: Maybe ISO8601
publicVersionNumber :: Maybe Text
isDefaultVersion :: Maybe Bool
description :: Maybe Text
arn :: Maybe Text
$sel:versionId:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
$sel:typeName:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
$sel:type':TypeVersionSummary' :: TypeVersionSummary -> Maybe RegistryType
$sel:timeCreated:TypeVersionSummary' :: TypeVersionSummary -> Maybe ISO8601
$sel:publicVersionNumber:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
$sel:isDefaultVersion:TypeVersionSummary' :: TypeVersionSummary -> Maybe Bool
$sel:description:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
$sel:arn:TypeVersionSummary' :: TypeVersionSummary -> 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 Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isDefaultVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
publicVersionNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
timeCreated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RegistryType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
typeName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
versionId
instance Prelude.NFData TypeVersionSummary where
rnf :: TypeVersionSummary -> ()
rnf TypeVersionSummary' {Maybe Bool
Maybe Text
Maybe ISO8601
Maybe RegistryType
versionId :: Maybe Text
typeName :: Maybe Text
type' :: Maybe RegistryType
timeCreated :: Maybe ISO8601
publicVersionNumber :: Maybe Text
isDefaultVersion :: Maybe Bool
description :: Maybe Text
arn :: Maybe Text
$sel:versionId:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
$sel:typeName:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
$sel:type':TypeVersionSummary' :: TypeVersionSummary -> Maybe RegistryType
$sel:timeCreated:TypeVersionSummary' :: TypeVersionSummary -> Maybe ISO8601
$sel:publicVersionNumber:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
$sel:isDefaultVersion:TypeVersionSummary' :: TypeVersionSummary -> Maybe Bool
$sel:description:TypeVersionSummary' :: TypeVersionSummary -> Maybe Text
$sel:arn:TypeVersionSummary' :: TypeVersionSummary -> 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 Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isDefaultVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
publicVersionNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
timeCreated
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RegistryType
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
typeName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
versionId