{-# 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.CloudFront.Types.StreamingDistribution where
import Amazonka.CloudFront.Types.ActiveTrustedSigners
import Amazonka.CloudFront.Types.StreamingDistributionConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StreamingDistribution = StreamingDistribution'
{
StreamingDistribution -> Maybe ISO8601
lastModifiedTime :: Prelude.Maybe Core.ISO8601,
StreamingDistribution -> Text
id :: Prelude.Text,
StreamingDistribution -> Text
arn :: Prelude.Text,
StreamingDistribution -> Text
status :: Prelude.Text,
StreamingDistribution -> Text
domainName :: Prelude.Text,
StreamingDistribution -> ActiveTrustedSigners
activeTrustedSigners :: ActiveTrustedSigners,
StreamingDistribution -> StreamingDistributionConfig
streamingDistributionConfig :: StreamingDistributionConfig
}
deriving (StreamingDistribution -> StreamingDistribution -> Bool
(StreamingDistribution -> StreamingDistribution -> Bool)
-> (StreamingDistribution -> StreamingDistribution -> Bool)
-> Eq StreamingDistribution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamingDistribution -> StreamingDistribution -> Bool
$c/= :: StreamingDistribution -> StreamingDistribution -> Bool
== :: StreamingDistribution -> StreamingDistribution -> Bool
$c== :: StreamingDistribution -> StreamingDistribution -> Bool
Prelude.Eq, ReadPrec [StreamingDistribution]
ReadPrec StreamingDistribution
Int -> ReadS StreamingDistribution
ReadS [StreamingDistribution]
(Int -> ReadS StreamingDistribution)
-> ReadS [StreamingDistribution]
-> ReadPrec StreamingDistribution
-> ReadPrec [StreamingDistribution]
-> Read StreamingDistribution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamingDistribution]
$creadListPrec :: ReadPrec [StreamingDistribution]
readPrec :: ReadPrec StreamingDistribution
$creadPrec :: ReadPrec StreamingDistribution
readList :: ReadS [StreamingDistribution]
$creadList :: ReadS [StreamingDistribution]
readsPrec :: Int -> ReadS StreamingDistribution
$creadsPrec :: Int -> ReadS StreamingDistribution
Prelude.Read, Int -> StreamingDistribution -> ShowS
[StreamingDistribution] -> ShowS
StreamingDistribution -> String
(Int -> StreamingDistribution -> ShowS)
-> (StreamingDistribution -> String)
-> ([StreamingDistribution] -> ShowS)
-> Show StreamingDistribution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamingDistribution] -> ShowS
$cshowList :: [StreamingDistribution] -> ShowS
show :: StreamingDistribution -> String
$cshow :: StreamingDistribution -> String
showsPrec :: Int -> StreamingDistribution -> ShowS
$cshowsPrec :: Int -> StreamingDistribution -> ShowS
Prelude.Show, (forall x. StreamingDistribution -> Rep StreamingDistribution x)
-> (forall x. Rep StreamingDistribution x -> StreamingDistribution)
-> Generic StreamingDistribution
forall x. Rep StreamingDistribution x -> StreamingDistribution
forall x. StreamingDistribution -> Rep StreamingDistribution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StreamingDistribution x -> StreamingDistribution
$cfrom :: forall x. StreamingDistribution -> Rep StreamingDistribution x
Prelude.Generic)
newStreamingDistribution ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ActiveTrustedSigners ->
StreamingDistributionConfig ->
StreamingDistribution
newStreamingDistribution :: Text
-> Text
-> Text
-> Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution
newStreamingDistribution
Text
pId_
Text
pARN_
Text
pStatus_
Text
pDomainName_
ActiveTrustedSigners
pActiveTrustedSigners_
StreamingDistributionConfig
pStreamingDistributionConfig_ =
StreamingDistribution' :: Maybe ISO8601
-> Text
-> Text
-> Text
-> Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution
StreamingDistribution'
{ $sel:lastModifiedTime:StreamingDistribution' :: Maybe ISO8601
lastModifiedTime =
Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:id:StreamingDistribution' :: Text
id = Text
pId_,
$sel:arn:StreamingDistribution' :: Text
arn = Text
pARN_,
$sel:status:StreamingDistribution' :: Text
status = Text
pStatus_,
$sel:domainName:StreamingDistribution' :: Text
domainName = Text
pDomainName_,
$sel:activeTrustedSigners:StreamingDistribution' :: ActiveTrustedSigners
activeTrustedSigners = ActiveTrustedSigners
pActiveTrustedSigners_,
$sel:streamingDistributionConfig:StreamingDistribution' :: StreamingDistributionConfig
streamingDistributionConfig =
StreamingDistributionConfig
pStreamingDistributionConfig_
}
streamingDistribution_lastModifiedTime :: Lens.Lens' StreamingDistribution (Prelude.Maybe Prelude.UTCTime)
streamingDistribution_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingDistribution -> f StreamingDistribution
streamingDistribution_lastModifiedTime = (StreamingDistribution -> Maybe ISO8601)
-> (StreamingDistribution
-> Maybe ISO8601 -> StreamingDistribution)
-> Lens
StreamingDistribution
StreamingDistribution
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistribution' {Maybe ISO8601
lastModifiedTime :: Maybe ISO8601
$sel:lastModifiedTime:StreamingDistribution' :: StreamingDistribution -> Maybe ISO8601
lastModifiedTime} -> Maybe ISO8601
lastModifiedTime) (\s :: StreamingDistribution
s@StreamingDistribution' {} Maybe ISO8601
a -> StreamingDistribution
s {$sel:lastModifiedTime:StreamingDistribution' :: Maybe ISO8601
lastModifiedTime = Maybe ISO8601
a} :: StreamingDistribution) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> StreamingDistribution -> f StreamingDistribution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingDistribution
-> f StreamingDistribution
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
streamingDistribution_id :: Lens.Lens' StreamingDistribution Prelude.Text
streamingDistribution_id :: (Text -> f Text)
-> StreamingDistribution -> f StreamingDistribution
streamingDistribution_id = (StreamingDistribution -> Text)
-> (StreamingDistribution -> Text -> StreamingDistribution)
-> Lens StreamingDistribution StreamingDistribution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistribution' {Text
id :: Text
$sel:id:StreamingDistribution' :: StreamingDistribution -> Text
id} -> Text
id) (\s :: StreamingDistribution
s@StreamingDistribution' {} Text
a -> StreamingDistribution
s {$sel:id:StreamingDistribution' :: Text
id = Text
a} :: StreamingDistribution)
streamingDistribution_arn :: Lens.Lens' StreamingDistribution Prelude.Text
streamingDistribution_arn :: (Text -> f Text)
-> StreamingDistribution -> f StreamingDistribution
streamingDistribution_arn = (StreamingDistribution -> Text)
-> (StreamingDistribution -> Text -> StreamingDistribution)
-> Lens StreamingDistribution StreamingDistribution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistribution' {Text
arn :: Text
$sel:arn:StreamingDistribution' :: StreamingDistribution -> Text
arn} -> Text
arn) (\s :: StreamingDistribution
s@StreamingDistribution' {} Text
a -> StreamingDistribution
s {$sel:arn:StreamingDistribution' :: Text
arn = Text
a} :: StreamingDistribution)
streamingDistribution_status :: Lens.Lens' StreamingDistribution Prelude.Text
streamingDistribution_status :: (Text -> f Text)
-> StreamingDistribution -> f StreamingDistribution
streamingDistribution_status = (StreamingDistribution -> Text)
-> (StreamingDistribution -> Text -> StreamingDistribution)
-> Lens StreamingDistribution StreamingDistribution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistribution' {Text
status :: Text
$sel:status:StreamingDistribution' :: StreamingDistribution -> Text
status} -> Text
status) (\s :: StreamingDistribution
s@StreamingDistribution' {} Text
a -> StreamingDistribution
s {$sel:status:StreamingDistribution' :: Text
status = Text
a} :: StreamingDistribution)
streamingDistribution_domainName :: Lens.Lens' StreamingDistribution Prelude.Text
streamingDistribution_domainName :: (Text -> f Text)
-> StreamingDistribution -> f StreamingDistribution
streamingDistribution_domainName = (StreamingDistribution -> Text)
-> (StreamingDistribution -> Text -> StreamingDistribution)
-> Lens StreamingDistribution StreamingDistribution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistribution' {Text
domainName :: Text
$sel:domainName:StreamingDistribution' :: StreamingDistribution -> Text
domainName} -> Text
domainName) (\s :: StreamingDistribution
s@StreamingDistribution' {} Text
a -> StreamingDistribution
s {$sel:domainName:StreamingDistribution' :: Text
domainName = Text
a} :: StreamingDistribution)
streamingDistribution_activeTrustedSigners :: Lens.Lens' StreamingDistribution ActiveTrustedSigners
streamingDistribution_activeTrustedSigners :: (ActiveTrustedSigners -> f ActiveTrustedSigners)
-> StreamingDistribution -> f StreamingDistribution
streamingDistribution_activeTrustedSigners = (StreamingDistribution -> ActiveTrustedSigners)
-> (StreamingDistribution
-> ActiveTrustedSigners -> StreamingDistribution)
-> Lens
StreamingDistribution
StreamingDistribution
ActiveTrustedSigners
ActiveTrustedSigners
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistribution' {ActiveTrustedSigners
activeTrustedSigners :: ActiveTrustedSigners
$sel:activeTrustedSigners:StreamingDistribution' :: StreamingDistribution -> ActiveTrustedSigners
activeTrustedSigners} -> ActiveTrustedSigners
activeTrustedSigners) (\s :: StreamingDistribution
s@StreamingDistribution' {} ActiveTrustedSigners
a -> StreamingDistribution
s {$sel:activeTrustedSigners:StreamingDistribution' :: ActiveTrustedSigners
activeTrustedSigners = ActiveTrustedSigners
a} :: StreamingDistribution)
streamingDistribution_streamingDistributionConfig :: Lens.Lens' StreamingDistribution StreamingDistributionConfig
streamingDistribution_streamingDistributionConfig :: (StreamingDistributionConfig -> f StreamingDistributionConfig)
-> StreamingDistribution -> f StreamingDistribution
streamingDistribution_streamingDistributionConfig = (StreamingDistribution -> StreamingDistributionConfig)
-> (StreamingDistribution
-> StreamingDistributionConfig -> StreamingDistribution)
-> Lens
StreamingDistribution
StreamingDistribution
StreamingDistributionConfig
StreamingDistributionConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistribution' {StreamingDistributionConfig
streamingDistributionConfig :: StreamingDistributionConfig
$sel:streamingDistributionConfig:StreamingDistribution' :: StreamingDistribution -> StreamingDistributionConfig
streamingDistributionConfig} -> StreamingDistributionConfig
streamingDistributionConfig) (\s :: StreamingDistribution
s@StreamingDistribution' {} StreamingDistributionConfig
a -> StreamingDistribution
s {$sel:streamingDistributionConfig:StreamingDistribution' :: StreamingDistributionConfig
streamingDistributionConfig = StreamingDistributionConfig
a} :: StreamingDistribution)
instance Core.FromXML StreamingDistribution where
parseXML :: [Node] -> Either String StreamingDistribution
parseXML [Node]
x =
Maybe ISO8601
-> Text
-> Text
-> Text
-> Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution
StreamingDistribution'
(Maybe ISO8601
-> Text
-> Text
-> Text
-> Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution)
-> Either String (Maybe ISO8601)
-> Either
String
(Text
-> Text
-> Text
-> Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution)
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
"LastModifiedTime")
Either
String
(Text
-> Text
-> Text
-> Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution)
-> Either String Text
-> Either
String
(Text
-> Text
-> Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Id")
Either
String
(Text
-> Text
-> Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution)
-> Either String Text
-> Either
String
(Text
-> Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ARN")
Either
String
(Text
-> Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution)
-> Either String Text
-> Either
String
(Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Status")
Either
String
(Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution)
-> Either String Text
-> Either
String
(ActiveTrustedSigners
-> StreamingDistributionConfig -> StreamingDistribution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"DomainName")
Either
String
(ActiveTrustedSigners
-> StreamingDistributionConfig -> StreamingDistribution)
-> Either String ActiveTrustedSigners
-> Either
String (StreamingDistributionConfig -> StreamingDistribution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ActiveTrustedSigners
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ActiveTrustedSigners")
Either
String (StreamingDistributionConfig -> StreamingDistribution)
-> Either String StreamingDistributionConfig
-> Either String StreamingDistribution
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String StreamingDistributionConfig
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"StreamingDistributionConfig")
instance Prelude.Hashable StreamingDistribution
instance Prelude.NFData StreamingDistribution