{-# 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.ImageBuilder.Types.DistributionConfigurationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DistributionConfigurationSummary = DistributionConfigurationSummary'
{
DistributionConfigurationSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
DistributionConfigurationSummary -> Maybe [Text]
regions :: Prelude.Maybe [Prelude.Text],
DistributionConfigurationSummary -> Maybe Text
dateUpdated :: Prelude.Maybe Prelude.Text,
DistributionConfigurationSummary -> Maybe Text
dateCreated :: Prelude.Maybe Prelude.Text,
DistributionConfigurationSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DistributionConfigurationSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
DistributionConfigurationSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (DistributionConfigurationSummary
-> DistributionConfigurationSummary -> Bool
(DistributionConfigurationSummary
-> DistributionConfigurationSummary -> Bool)
-> (DistributionConfigurationSummary
-> DistributionConfigurationSummary -> Bool)
-> Eq DistributionConfigurationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DistributionConfigurationSummary
-> DistributionConfigurationSummary -> Bool
$c/= :: DistributionConfigurationSummary
-> DistributionConfigurationSummary -> Bool
== :: DistributionConfigurationSummary
-> DistributionConfigurationSummary -> Bool
$c== :: DistributionConfigurationSummary
-> DistributionConfigurationSummary -> Bool
Prelude.Eq, ReadPrec [DistributionConfigurationSummary]
ReadPrec DistributionConfigurationSummary
Int -> ReadS DistributionConfigurationSummary
ReadS [DistributionConfigurationSummary]
(Int -> ReadS DistributionConfigurationSummary)
-> ReadS [DistributionConfigurationSummary]
-> ReadPrec DistributionConfigurationSummary
-> ReadPrec [DistributionConfigurationSummary]
-> Read DistributionConfigurationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DistributionConfigurationSummary]
$creadListPrec :: ReadPrec [DistributionConfigurationSummary]
readPrec :: ReadPrec DistributionConfigurationSummary
$creadPrec :: ReadPrec DistributionConfigurationSummary
readList :: ReadS [DistributionConfigurationSummary]
$creadList :: ReadS [DistributionConfigurationSummary]
readsPrec :: Int -> ReadS DistributionConfigurationSummary
$creadsPrec :: Int -> ReadS DistributionConfigurationSummary
Prelude.Read, Int -> DistributionConfigurationSummary -> ShowS
[DistributionConfigurationSummary] -> ShowS
DistributionConfigurationSummary -> String
(Int -> DistributionConfigurationSummary -> ShowS)
-> (DistributionConfigurationSummary -> String)
-> ([DistributionConfigurationSummary] -> ShowS)
-> Show DistributionConfigurationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DistributionConfigurationSummary] -> ShowS
$cshowList :: [DistributionConfigurationSummary] -> ShowS
show :: DistributionConfigurationSummary -> String
$cshow :: DistributionConfigurationSummary -> String
showsPrec :: Int -> DistributionConfigurationSummary -> ShowS
$cshowsPrec :: Int -> DistributionConfigurationSummary -> ShowS
Prelude.Show, (forall x.
DistributionConfigurationSummary
-> Rep DistributionConfigurationSummary x)
-> (forall x.
Rep DistributionConfigurationSummary x
-> DistributionConfigurationSummary)
-> Generic DistributionConfigurationSummary
forall x.
Rep DistributionConfigurationSummary x
-> DistributionConfigurationSummary
forall x.
DistributionConfigurationSummary
-> Rep DistributionConfigurationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DistributionConfigurationSummary x
-> DistributionConfigurationSummary
$cfrom :: forall x.
DistributionConfigurationSummary
-> Rep DistributionConfigurationSummary x
Prelude.Generic)
newDistributionConfigurationSummary ::
DistributionConfigurationSummary
newDistributionConfigurationSummary :: DistributionConfigurationSummary
newDistributionConfigurationSummary =
DistributionConfigurationSummary' :: Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> DistributionConfigurationSummary
DistributionConfigurationSummary'
{ $sel:arn:DistributionConfigurationSummary' :: Maybe Text
arn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:regions:DistributionConfigurationSummary' :: Maybe [Text]
regions = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:dateUpdated:DistributionConfigurationSummary' :: Maybe Text
dateUpdated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dateCreated:DistributionConfigurationSummary' :: Maybe Text
dateCreated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:DistributionConfigurationSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:DistributionConfigurationSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:DistributionConfigurationSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
distributionConfigurationSummary_arn :: Lens.Lens' DistributionConfigurationSummary (Prelude.Maybe Prelude.Text)
distributionConfigurationSummary_arn :: (Maybe Text -> f (Maybe Text))
-> DistributionConfigurationSummary
-> f DistributionConfigurationSummary
distributionConfigurationSummary_arn = (DistributionConfigurationSummary -> Maybe Text)
-> (DistributionConfigurationSummary
-> Maybe Text -> DistributionConfigurationSummary)
-> Lens
DistributionConfigurationSummary
DistributionConfigurationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfigurationSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:DistributionConfigurationSummary' :: DistributionConfigurationSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DistributionConfigurationSummary
s@DistributionConfigurationSummary' {} Maybe Text
a -> DistributionConfigurationSummary
s {$sel:arn:DistributionConfigurationSummary' :: Maybe Text
arn = Maybe Text
a} :: DistributionConfigurationSummary)
distributionConfigurationSummary_regions :: Lens.Lens' DistributionConfigurationSummary (Prelude.Maybe [Prelude.Text])
distributionConfigurationSummary_regions :: (Maybe [Text] -> f (Maybe [Text]))
-> DistributionConfigurationSummary
-> f DistributionConfigurationSummary
distributionConfigurationSummary_regions = (DistributionConfigurationSummary -> Maybe [Text])
-> (DistributionConfigurationSummary
-> Maybe [Text] -> DistributionConfigurationSummary)
-> Lens
DistributionConfigurationSummary
DistributionConfigurationSummary
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfigurationSummary' {Maybe [Text]
regions :: Maybe [Text]
$sel:regions:DistributionConfigurationSummary' :: DistributionConfigurationSummary -> Maybe [Text]
regions} -> Maybe [Text]
regions) (\s :: DistributionConfigurationSummary
s@DistributionConfigurationSummary' {} Maybe [Text]
a -> DistributionConfigurationSummary
s {$sel:regions:DistributionConfigurationSummary' :: Maybe [Text]
regions = Maybe [Text]
a} :: DistributionConfigurationSummary) ((Maybe [Text] -> f (Maybe [Text]))
-> DistributionConfigurationSummary
-> f DistributionConfigurationSummary)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DistributionConfigurationSummary
-> f DistributionConfigurationSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
distributionConfigurationSummary_dateUpdated :: Lens.Lens' DistributionConfigurationSummary (Prelude.Maybe Prelude.Text)
distributionConfigurationSummary_dateUpdated :: (Maybe Text -> f (Maybe Text))
-> DistributionConfigurationSummary
-> f DistributionConfigurationSummary
distributionConfigurationSummary_dateUpdated = (DistributionConfigurationSummary -> Maybe Text)
-> (DistributionConfigurationSummary
-> Maybe Text -> DistributionConfigurationSummary)
-> Lens
DistributionConfigurationSummary
DistributionConfigurationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfigurationSummary' {Maybe Text
dateUpdated :: Maybe Text
$sel:dateUpdated:DistributionConfigurationSummary' :: DistributionConfigurationSummary -> Maybe Text
dateUpdated} -> Maybe Text
dateUpdated) (\s :: DistributionConfigurationSummary
s@DistributionConfigurationSummary' {} Maybe Text
a -> DistributionConfigurationSummary
s {$sel:dateUpdated:DistributionConfigurationSummary' :: Maybe Text
dateUpdated = Maybe Text
a} :: DistributionConfigurationSummary)
distributionConfigurationSummary_dateCreated :: Lens.Lens' DistributionConfigurationSummary (Prelude.Maybe Prelude.Text)
distributionConfigurationSummary_dateCreated :: (Maybe Text -> f (Maybe Text))
-> DistributionConfigurationSummary
-> f DistributionConfigurationSummary
distributionConfigurationSummary_dateCreated = (DistributionConfigurationSummary -> Maybe Text)
-> (DistributionConfigurationSummary
-> Maybe Text -> DistributionConfigurationSummary)
-> Lens
DistributionConfigurationSummary
DistributionConfigurationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfigurationSummary' {Maybe Text
dateCreated :: Maybe Text
$sel:dateCreated:DistributionConfigurationSummary' :: DistributionConfigurationSummary -> Maybe Text
dateCreated} -> Maybe Text
dateCreated) (\s :: DistributionConfigurationSummary
s@DistributionConfigurationSummary' {} Maybe Text
a -> DistributionConfigurationSummary
s {$sel:dateCreated:DistributionConfigurationSummary' :: Maybe Text
dateCreated = Maybe Text
a} :: DistributionConfigurationSummary)
distributionConfigurationSummary_name :: Lens.Lens' DistributionConfigurationSummary (Prelude.Maybe Prelude.Text)
distributionConfigurationSummary_name :: (Maybe Text -> f (Maybe Text))
-> DistributionConfigurationSummary
-> f DistributionConfigurationSummary
distributionConfigurationSummary_name = (DistributionConfigurationSummary -> Maybe Text)
-> (DistributionConfigurationSummary
-> Maybe Text -> DistributionConfigurationSummary)
-> Lens
DistributionConfigurationSummary
DistributionConfigurationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfigurationSummary' {Maybe Text
name :: Maybe Text
$sel:name:DistributionConfigurationSummary' :: DistributionConfigurationSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: DistributionConfigurationSummary
s@DistributionConfigurationSummary' {} Maybe Text
a -> DistributionConfigurationSummary
s {$sel:name:DistributionConfigurationSummary' :: Maybe Text
name = Maybe Text
a} :: DistributionConfigurationSummary)
distributionConfigurationSummary_description :: Lens.Lens' DistributionConfigurationSummary (Prelude.Maybe Prelude.Text)
distributionConfigurationSummary_description :: (Maybe Text -> f (Maybe Text))
-> DistributionConfigurationSummary
-> f DistributionConfigurationSummary
distributionConfigurationSummary_description = (DistributionConfigurationSummary -> Maybe Text)
-> (DistributionConfigurationSummary
-> Maybe Text -> DistributionConfigurationSummary)
-> Lens
DistributionConfigurationSummary
DistributionConfigurationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfigurationSummary' {Maybe Text
description :: Maybe Text
$sel:description:DistributionConfigurationSummary' :: DistributionConfigurationSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: DistributionConfigurationSummary
s@DistributionConfigurationSummary' {} Maybe Text
a -> DistributionConfigurationSummary
s {$sel:description:DistributionConfigurationSummary' :: Maybe Text
description = Maybe Text
a} :: DistributionConfigurationSummary)
distributionConfigurationSummary_tags :: Lens.Lens' DistributionConfigurationSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
distributionConfigurationSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DistributionConfigurationSummary
-> f DistributionConfigurationSummary
distributionConfigurationSummary_tags = (DistributionConfigurationSummary -> Maybe (HashMap Text Text))
-> (DistributionConfigurationSummary
-> Maybe (HashMap Text Text) -> DistributionConfigurationSummary)
-> Lens
DistributionConfigurationSummary
DistributionConfigurationSummary
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfigurationSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DistributionConfigurationSummary' :: DistributionConfigurationSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DistributionConfigurationSummary
s@DistributionConfigurationSummary' {} Maybe (HashMap Text Text)
a -> DistributionConfigurationSummary
s {$sel:tags:DistributionConfigurationSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DistributionConfigurationSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DistributionConfigurationSummary
-> f DistributionConfigurationSummary)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DistributionConfigurationSummary
-> f DistributionConfigurationSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.FromJSON
DistributionConfigurationSummary
where
parseJSON :: Value -> Parser DistributionConfigurationSummary
parseJSON =
String
-> (Object -> Parser DistributionConfigurationSummary)
-> Value
-> Parser DistributionConfigurationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DistributionConfigurationSummary"
( \Object
x ->
Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> DistributionConfigurationSummary
DistributionConfigurationSummary'
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> DistributionConfigurationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> DistributionConfigurationSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> DistributionConfigurationSummary)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> DistributionConfigurationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"regions" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> DistributionConfigurationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> DistributionConfigurationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dateUpdated")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> DistributionConfigurationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> DistributionConfigurationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dateCreated")
Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> DistributionConfigurationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text) -> DistributionConfigurationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
Parser
(Maybe Text
-> Maybe (HashMap Text Text) -> DistributionConfigurationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text) -> DistributionConfigurationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
Parser
(Maybe (HashMap Text Text) -> DistributionConfigurationSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser DistributionConfigurationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
DistributionConfigurationSummary
instance
Prelude.NFData
DistributionConfigurationSummary