{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TypeVersionSummary = TypeVersionSummary'
{
TypeVersionSummary -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text,
TypeVersionSummary -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
TypeVersionSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
TypeVersionSummary -> Maybe Text
publicVersionNumber :: Prelude.Maybe Prelude.Text,
TypeVersionSummary -> Maybe ISO8601
timeCreated :: Prelude.Maybe Core.ISO8601,
TypeVersionSummary -> Maybe RegistryType
type' :: Prelude.Maybe RegistryType,
TypeVersionSummary -> Maybe Bool
isDefaultVersion :: Prelude.Maybe Prelude.Bool,
TypeVersionSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (TypeVersionSummary -> TypeVersionSummary -> Bool
(TypeVersionSummary -> TypeVersionSummary -> Bool)
-> (TypeVersionSummary -> TypeVersionSummary -> Bool)
-> Eq TypeVersionSummary
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]
(Int -> ReadS TypeVersionSummary)
-> ReadS [TypeVersionSummary]
-> ReadPrec TypeVersionSummary
-> ReadPrec [TypeVersionSummary]
-> Read 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
(Int -> TypeVersionSummary -> ShowS)
-> (TypeVersionSummary -> String)
-> ([TypeVersionSummary] -> ShowS)
-> Show TypeVersionSummary
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. TypeVersionSummary -> Rep TypeVersionSummary x)
-> (forall x. Rep TypeVersionSummary x -> TypeVersionSummary)
-> Generic TypeVersionSummary
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' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe RegistryType
-> Maybe Bool
-> Maybe Text
-> TypeVersionSummary
TypeVersionSummary'
{ $sel:versionId:TypeVersionSummary' :: Maybe Text
versionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:typeName:TypeVersionSummary' :: Maybe Text
typeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:TypeVersionSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:publicVersionNumber:TypeVersionSummary' :: Maybe Text
publicVersionNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timeCreated:TypeVersionSummary' :: Maybe ISO8601
timeCreated = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:type':TypeVersionSummary' :: Maybe RegistryType
type' = Maybe RegistryType
forall a. Maybe a
Prelude.Nothing,
$sel:isDefaultVersion:TypeVersionSummary' :: Maybe Bool
isDefaultVersion = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:description:TypeVersionSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
typeVersionSummary_versionId :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Text)
typeVersionSummary_versionId :: (Maybe Text -> f (Maybe Text))
-> TypeVersionSummary -> f TypeVersionSummary
typeVersionSummary_versionId = (TypeVersionSummary -> Maybe Text)
-> (TypeVersionSummary -> Maybe Text -> TypeVersionSummary)
-> Lens
TypeVersionSummary TypeVersionSummary (Maybe Text) (Maybe Text)
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)
typeVersionSummary_typeName :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Text)
typeVersionSummary_typeName :: (Maybe Text -> f (Maybe Text))
-> TypeVersionSummary -> f TypeVersionSummary
typeVersionSummary_typeName = (TypeVersionSummary -> Maybe Text)
-> (TypeVersionSummary -> Maybe Text -> TypeVersionSummary)
-> Lens
TypeVersionSummary TypeVersionSummary (Maybe Text) (Maybe Text)
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_arn :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Text)
typeVersionSummary_arn :: (Maybe Text -> f (Maybe Text))
-> TypeVersionSummary -> f TypeVersionSummary
typeVersionSummary_arn = (TypeVersionSummary -> Maybe Text)
-> (TypeVersionSummary -> Maybe Text -> TypeVersionSummary)
-> Lens
TypeVersionSummary TypeVersionSummary (Maybe Text) (Maybe Text)
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_publicVersionNumber :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Text)
typeVersionSummary_publicVersionNumber :: (Maybe Text -> f (Maybe Text))
-> TypeVersionSummary -> f TypeVersionSummary
typeVersionSummary_publicVersionNumber = (TypeVersionSummary -> Maybe Text)
-> (TypeVersionSummary -> Maybe Text -> TypeVersionSummary)
-> Lens
TypeVersionSummary TypeVersionSummary (Maybe Text) (Maybe Text)
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 :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TypeVersionSummary -> f TypeVersionSummary
typeVersionSummary_timeCreated = (TypeVersionSummary -> Maybe ISO8601)
-> (TypeVersionSummary -> Maybe ISO8601 -> TypeVersionSummary)
-> Lens
TypeVersionSummary
TypeVersionSummary
(Maybe ISO8601)
(Maybe ISO8601)
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) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> TypeVersionSummary -> f TypeVersionSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TypeVersionSummary
-> f TypeVersionSummary
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
typeVersionSummary_type :: Lens.Lens' TypeVersionSummary (Prelude.Maybe RegistryType)
typeVersionSummary_type :: (Maybe RegistryType -> f (Maybe RegistryType))
-> TypeVersionSummary -> f TypeVersionSummary
typeVersionSummary_type = (TypeVersionSummary -> Maybe RegistryType)
-> (TypeVersionSummary -> Maybe RegistryType -> TypeVersionSummary)
-> Lens
TypeVersionSummary
TypeVersionSummary
(Maybe RegistryType)
(Maybe RegistryType)
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_isDefaultVersion :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Bool)
typeVersionSummary_isDefaultVersion :: (Maybe Bool -> f (Maybe Bool))
-> TypeVersionSummary -> f TypeVersionSummary
typeVersionSummary_isDefaultVersion = (TypeVersionSummary -> Maybe Bool)
-> (TypeVersionSummary -> Maybe Bool -> TypeVersionSummary)
-> Lens
TypeVersionSummary TypeVersionSummary (Maybe Bool) (Maybe Bool)
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_description :: Lens.Lens' TypeVersionSummary (Prelude.Maybe Prelude.Text)
typeVersionSummary_description :: (Maybe Text -> f (Maybe Text))
-> TypeVersionSummary -> f TypeVersionSummary
typeVersionSummary_description = (TypeVersionSummary -> Maybe Text)
-> (TypeVersionSummary -> Maybe Text -> TypeVersionSummary)
-> Lens
TypeVersionSummary TypeVersionSummary (Maybe Text) (Maybe Text)
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)
instance Core.FromXML TypeVersionSummary where
parseXML :: [Node] -> Either String TypeVersionSummary
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe RegistryType
-> Maybe Bool
-> Maybe Text
-> TypeVersionSummary
TypeVersionSummary'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe RegistryType
-> Maybe Bool
-> Maybe Text
-> TypeVersionSummary)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe RegistryType
-> Maybe Bool
-> Maybe Text
-> TypeVersionSummary)
forall (f :: * -> *) a b. Functor 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
"VersionId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe RegistryType
-> Maybe Bool
-> Maybe Text
-> TypeVersionSummary)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe RegistryType
-> Maybe Bool
-> Maybe Text
-> TypeVersionSummary)
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
"TypeName")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe RegistryType
-> Maybe Bool
-> Maybe Text
-> TypeVersionSummary)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe RegistryType
-> Maybe Bool
-> Maybe Text
-> TypeVersionSummary)
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
"Arn")
Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe RegistryType
-> Maybe Bool
-> Maybe Text
-> TypeVersionSummary)
-> Either String (Maybe Text)
-> Either
String
(Maybe ISO8601
-> Maybe RegistryType
-> Maybe Bool
-> Maybe Text
-> TypeVersionSummary)
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
"PublicVersionNumber")
Either
String
(Maybe ISO8601
-> Maybe RegistryType
-> Maybe Bool
-> Maybe Text
-> TypeVersionSummary)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe RegistryType
-> Maybe Bool -> Maybe Text -> TypeVersionSummary)
forall (f :: * -> *) a b. Applicative f => 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
"TimeCreated")
Either
String
(Maybe RegistryType
-> Maybe Bool -> Maybe Text -> TypeVersionSummary)
-> Either String (Maybe RegistryType)
-> Either String (Maybe Bool -> Maybe Text -> TypeVersionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe RegistryType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Type")
Either String (Maybe Bool -> Maybe Text -> TypeVersionSummary)
-> Either String (Maybe Bool)
-> Either String (Maybe Text -> TypeVersionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsDefaultVersion")
Either String (Maybe Text -> TypeVersionSummary)
-> Either String (Maybe Text) -> Either String TypeVersionSummary
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
"Description")
instance Prelude.Hashable TypeVersionSummary
instance Prelude.NFData TypeVersionSummary