{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CloudFront.Types.StreamingDistributionSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CloudFront.Types.StreamingDistributionSummary where

import Amazonka.CloudFront.Types.Aliases
import Amazonka.CloudFront.Types.PriceClass
import Amazonka.CloudFront.Types.S3Origin
import Amazonka.CloudFront.Types.TrustedSigners
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A summary of the information for a CloudFront streaming distribution.
--
-- /See:/ 'newStreamingDistributionSummary' smart constructor.
data StreamingDistributionSummary = StreamingDistributionSummary'
  { -- | The identifier for the distribution, for example, @EDFDVBD632BHDS5@.
    StreamingDistributionSummary -> Text
id :: Prelude.Text,
    -- | The ARN (Amazon Resource Name) for the streaming distribution. For
    -- example:
    -- @arn:aws:cloudfront::123456789012:streaming-distribution\/EDFDVBD632BHDS5@,
    -- where @123456789012@ is your account ID.
    StreamingDistributionSummary -> Text
arn :: Prelude.Text,
    -- | Indicates the current status of the distribution. When the status is
    -- @Deployed@, the distribution\'s information is fully propagated
    -- throughout the Amazon CloudFront system.
    StreamingDistributionSummary -> Text
status :: Prelude.Text,
    -- | The date and time the distribution was last modified.
    StreamingDistributionSummary -> ISO8601
lastModifiedTime :: Core.ISO8601,
    -- | The domain name corresponding to the distribution, for example,
    -- @d111111abcdef8.cloudfront.net@.
    StreamingDistributionSummary -> Text
domainName :: Prelude.Text,
    -- | A complex type that contains information about the Amazon S3 bucket from
    -- which you want CloudFront to get your media files for distribution.
    StreamingDistributionSummary -> S3Origin
s3Origin :: S3Origin,
    -- | A complex type that contains information about CNAMEs (alternate domain
    -- names), if any, for this streaming distribution.
    StreamingDistributionSummary -> Aliases
aliases :: Aliases,
    -- | A complex type that specifies the accounts, if any, that you want to
    -- allow to create signed URLs for private content. If you want to require
    -- signed URLs in requests for objects in the target origin that match the
    -- @PathPattern@ for this cache behavior, specify @true@ for @Enabled@, and
    -- specify the applicable values for @Quantity@ and @Items@.If you don\'t
    -- want to require signed URLs in requests for objects that match
    -- @PathPattern@, specify @false@ for @Enabled@ and @0@ for @Quantity@.
    -- Omit @Items@. To add, change, or remove one or more trusted signers,
    -- change @Enabled@ to @true@ (if it\'s currently @false@), change
    -- @Quantity@ as applicable, and specify all of the trusted signers that
    -- you want to include in the updated distribution.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html Serving Private Content through CloudFront>
    -- in the /Amazon CloudFront Developer Guide/.
    StreamingDistributionSummary -> TrustedSigners
trustedSigners :: TrustedSigners,
    -- | The comment originally specified when this distribution was created.
    StreamingDistributionSummary -> Text
comment :: Prelude.Text,
    -- | A complex type that contains information about price class for this
    -- streaming distribution.
    StreamingDistributionSummary -> PriceClass
priceClass :: PriceClass,
    -- | Whether the distribution is enabled to accept end user requests for
    -- content.
    StreamingDistributionSummary -> Bool
enabled :: Prelude.Bool
  }
  deriving (StreamingDistributionSummary
-> StreamingDistributionSummary -> Bool
(StreamingDistributionSummary
 -> StreamingDistributionSummary -> Bool)
-> (StreamingDistributionSummary
    -> StreamingDistributionSummary -> Bool)
-> Eq StreamingDistributionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamingDistributionSummary
-> StreamingDistributionSummary -> Bool
$c/= :: StreamingDistributionSummary
-> StreamingDistributionSummary -> Bool
== :: StreamingDistributionSummary
-> StreamingDistributionSummary -> Bool
$c== :: StreamingDistributionSummary
-> StreamingDistributionSummary -> Bool
Prelude.Eq, ReadPrec [StreamingDistributionSummary]
ReadPrec StreamingDistributionSummary
Int -> ReadS StreamingDistributionSummary
ReadS [StreamingDistributionSummary]
(Int -> ReadS StreamingDistributionSummary)
-> ReadS [StreamingDistributionSummary]
-> ReadPrec StreamingDistributionSummary
-> ReadPrec [StreamingDistributionSummary]
-> Read StreamingDistributionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamingDistributionSummary]
$creadListPrec :: ReadPrec [StreamingDistributionSummary]
readPrec :: ReadPrec StreamingDistributionSummary
$creadPrec :: ReadPrec StreamingDistributionSummary
readList :: ReadS [StreamingDistributionSummary]
$creadList :: ReadS [StreamingDistributionSummary]
readsPrec :: Int -> ReadS StreamingDistributionSummary
$creadsPrec :: Int -> ReadS StreamingDistributionSummary
Prelude.Read, Int -> StreamingDistributionSummary -> ShowS
[StreamingDistributionSummary] -> ShowS
StreamingDistributionSummary -> String
(Int -> StreamingDistributionSummary -> ShowS)
-> (StreamingDistributionSummary -> String)
-> ([StreamingDistributionSummary] -> ShowS)
-> Show StreamingDistributionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamingDistributionSummary] -> ShowS
$cshowList :: [StreamingDistributionSummary] -> ShowS
show :: StreamingDistributionSummary -> String
$cshow :: StreamingDistributionSummary -> String
showsPrec :: Int -> StreamingDistributionSummary -> ShowS
$cshowsPrec :: Int -> StreamingDistributionSummary -> ShowS
Prelude.Show, (forall x.
 StreamingDistributionSummary -> Rep StreamingDistributionSummary x)
-> (forall x.
    Rep StreamingDistributionSummary x -> StreamingDistributionSummary)
-> Generic StreamingDistributionSummary
forall x.
Rep StreamingDistributionSummary x -> StreamingDistributionSummary
forall x.
StreamingDistributionSummary -> Rep StreamingDistributionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StreamingDistributionSummary x -> StreamingDistributionSummary
$cfrom :: forall x.
StreamingDistributionSummary -> Rep StreamingDistributionSummary x
Prelude.Generic)

-- |
-- Create a value of 'StreamingDistributionSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'id', 'streamingDistributionSummary_id' - The identifier for the distribution, for example, @EDFDVBD632BHDS5@.
--
-- 'arn', 'streamingDistributionSummary_arn' - The ARN (Amazon Resource Name) for the streaming distribution. For
-- example:
-- @arn:aws:cloudfront::123456789012:streaming-distribution\/EDFDVBD632BHDS5@,
-- where @123456789012@ is your account ID.
--
-- 'status', 'streamingDistributionSummary_status' - Indicates the current status of the distribution. When the status is
-- @Deployed@, the distribution\'s information is fully propagated
-- throughout the Amazon CloudFront system.
--
-- 'lastModifiedTime', 'streamingDistributionSummary_lastModifiedTime' - The date and time the distribution was last modified.
--
-- 'domainName', 'streamingDistributionSummary_domainName' - The domain name corresponding to the distribution, for example,
-- @d111111abcdef8.cloudfront.net@.
--
-- 's3Origin', 'streamingDistributionSummary_s3Origin' - A complex type that contains information about the Amazon S3 bucket from
-- which you want CloudFront to get your media files for distribution.
--
-- 'aliases', 'streamingDistributionSummary_aliases' - A complex type that contains information about CNAMEs (alternate domain
-- names), if any, for this streaming distribution.
--
-- 'trustedSigners', 'streamingDistributionSummary_trustedSigners' - A complex type that specifies the accounts, if any, that you want to
-- allow to create signed URLs for private content. If you want to require
-- signed URLs in requests for objects in the target origin that match the
-- @PathPattern@ for this cache behavior, specify @true@ for @Enabled@, and
-- specify the applicable values for @Quantity@ and @Items@.If you don\'t
-- want to require signed URLs in requests for objects that match
-- @PathPattern@, specify @false@ for @Enabled@ and @0@ for @Quantity@.
-- Omit @Items@. To add, change, or remove one or more trusted signers,
-- change @Enabled@ to @true@ (if it\'s currently @false@), change
-- @Quantity@ as applicable, and specify all of the trusted signers that
-- you want to include in the updated distribution.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html Serving Private Content through CloudFront>
-- in the /Amazon CloudFront Developer Guide/.
--
-- 'comment', 'streamingDistributionSummary_comment' - The comment originally specified when this distribution was created.
--
-- 'priceClass', 'streamingDistributionSummary_priceClass' - A complex type that contains information about price class for this
-- streaming distribution.
--
-- 'enabled', 'streamingDistributionSummary_enabled' - Whether the distribution is enabled to accept end user requests for
-- content.
newStreamingDistributionSummary ::
  -- | 'id'
  Prelude.Text ->
  -- | 'arn'
  Prelude.Text ->
  -- | 'status'
  Prelude.Text ->
  -- | 'lastModifiedTime'
  Prelude.UTCTime ->
  -- | 'domainName'
  Prelude.Text ->
  -- | 's3Origin'
  S3Origin ->
  -- | 'aliases'
  Aliases ->
  -- | 'trustedSigners'
  TrustedSigners ->
  -- | 'comment'
  Prelude.Text ->
  -- | 'priceClass'
  PriceClass ->
  -- | 'enabled'
  Prelude.Bool ->
  StreamingDistributionSummary
newStreamingDistributionSummary :: Text
-> Text
-> Text
-> UTCTime
-> Text
-> S3Origin
-> Aliases
-> TrustedSigners
-> Text
-> PriceClass
-> Bool
-> StreamingDistributionSummary
newStreamingDistributionSummary
  Text
pId_
  Text
pARN_
  Text
pStatus_
  UTCTime
pLastModifiedTime_
  Text
pDomainName_
  S3Origin
pS3Origin_
  Aliases
pAliases_
  TrustedSigners
pTrustedSigners_
  Text
pComment_
  PriceClass
pPriceClass_
  Bool
pEnabled_ =
    StreamingDistributionSummary' :: Text
-> Text
-> Text
-> ISO8601
-> Text
-> S3Origin
-> Aliases
-> TrustedSigners
-> Text
-> PriceClass
-> Bool
-> StreamingDistributionSummary
StreamingDistributionSummary'
      { $sel:id:StreamingDistributionSummary' :: Text
id = Text
pId_,
        $sel:arn:StreamingDistributionSummary' :: Text
arn = Text
pARN_,
        $sel:status:StreamingDistributionSummary' :: Text
status = Text
pStatus_,
        $sel:lastModifiedTime:StreamingDistributionSummary' :: ISO8601
lastModifiedTime =
          Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged ISO8601 (Identity ISO8601))
-> UTCTime -> ISO8601
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedTime_,
        $sel:domainName:StreamingDistributionSummary' :: Text
domainName = Text
pDomainName_,
        $sel:s3Origin:StreamingDistributionSummary' :: S3Origin
s3Origin = S3Origin
pS3Origin_,
        $sel:aliases:StreamingDistributionSummary' :: Aliases
aliases = Aliases
pAliases_,
        $sel:trustedSigners:StreamingDistributionSummary' :: TrustedSigners
trustedSigners = TrustedSigners
pTrustedSigners_,
        $sel:comment:StreamingDistributionSummary' :: Text
comment = Text
pComment_,
        $sel:priceClass:StreamingDistributionSummary' :: PriceClass
priceClass = PriceClass
pPriceClass_,
        $sel:enabled:StreamingDistributionSummary' :: Bool
enabled = Bool
pEnabled_
      }

-- | The identifier for the distribution, for example, @EDFDVBD632BHDS5@.
streamingDistributionSummary_id :: Lens.Lens' StreamingDistributionSummary Prelude.Text
streamingDistributionSummary_id :: (Text -> f Text)
-> StreamingDistributionSummary -> f StreamingDistributionSummary
streamingDistributionSummary_id = (StreamingDistributionSummary -> Text)
-> (StreamingDistributionSummary
    -> Text -> StreamingDistributionSummary)
-> Lens
     StreamingDistributionSummary StreamingDistributionSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistributionSummary' {Text
id :: Text
$sel:id:StreamingDistributionSummary' :: StreamingDistributionSummary -> Text
id} -> Text
id) (\s :: StreamingDistributionSummary
s@StreamingDistributionSummary' {} Text
a -> StreamingDistributionSummary
s {$sel:id:StreamingDistributionSummary' :: Text
id = Text
a} :: StreamingDistributionSummary)

-- | The ARN (Amazon Resource Name) for the streaming distribution. For
-- example:
-- @arn:aws:cloudfront::123456789012:streaming-distribution\/EDFDVBD632BHDS5@,
-- where @123456789012@ is your account ID.
streamingDistributionSummary_arn :: Lens.Lens' StreamingDistributionSummary Prelude.Text
streamingDistributionSummary_arn :: (Text -> f Text)
-> StreamingDistributionSummary -> f StreamingDistributionSummary
streamingDistributionSummary_arn = (StreamingDistributionSummary -> Text)
-> (StreamingDistributionSummary
    -> Text -> StreamingDistributionSummary)
-> Lens
     StreamingDistributionSummary StreamingDistributionSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistributionSummary' {Text
arn :: Text
$sel:arn:StreamingDistributionSummary' :: StreamingDistributionSummary -> Text
arn} -> Text
arn) (\s :: StreamingDistributionSummary
s@StreamingDistributionSummary' {} Text
a -> StreamingDistributionSummary
s {$sel:arn:StreamingDistributionSummary' :: Text
arn = Text
a} :: StreamingDistributionSummary)

-- | Indicates the current status of the distribution. When the status is
-- @Deployed@, the distribution\'s information is fully propagated
-- throughout the Amazon CloudFront system.
streamingDistributionSummary_status :: Lens.Lens' StreamingDistributionSummary Prelude.Text
streamingDistributionSummary_status :: (Text -> f Text)
-> StreamingDistributionSummary -> f StreamingDistributionSummary
streamingDistributionSummary_status = (StreamingDistributionSummary -> Text)
-> (StreamingDistributionSummary
    -> Text -> StreamingDistributionSummary)
-> Lens
     StreamingDistributionSummary StreamingDistributionSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistributionSummary' {Text
status :: Text
$sel:status:StreamingDistributionSummary' :: StreamingDistributionSummary -> Text
status} -> Text
status) (\s :: StreamingDistributionSummary
s@StreamingDistributionSummary' {} Text
a -> StreamingDistributionSummary
s {$sel:status:StreamingDistributionSummary' :: Text
status = Text
a} :: StreamingDistributionSummary)

-- | The date and time the distribution was last modified.
streamingDistributionSummary_lastModifiedTime :: Lens.Lens' StreamingDistributionSummary Prelude.UTCTime
streamingDistributionSummary_lastModifiedTime :: (UTCTime -> f UTCTime)
-> StreamingDistributionSummary -> f StreamingDistributionSummary
streamingDistributionSummary_lastModifiedTime = (StreamingDistributionSummary -> ISO8601)
-> (StreamingDistributionSummary
    -> ISO8601 -> StreamingDistributionSummary)
-> Lens
     StreamingDistributionSummary
     StreamingDistributionSummary
     ISO8601
     ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistributionSummary' {ISO8601
lastModifiedTime :: ISO8601
$sel:lastModifiedTime:StreamingDistributionSummary' :: StreamingDistributionSummary -> ISO8601
lastModifiedTime} -> ISO8601
lastModifiedTime) (\s :: StreamingDistributionSummary
s@StreamingDistributionSummary' {} ISO8601
a -> StreamingDistributionSummary
s {$sel:lastModifiedTime:StreamingDistributionSummary' :: ISO8601
lastModifiedTime = ISO8601
a} :: StreamingDistributionSummary) ((ISO8601 -> f ISO8601)
 -> StreamingDistributionSummary -> f StreamingDistributionSummary)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> StreamingDistributionSummary
-> f StreamingDistributionSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The domain name corresponding to the distribution, for example,
-- @d111111abcdef8.cloudfront.net@.
streamingDistributionSummary_domainName :: Lens.Lens' StreamingDistributionSummary Prelude.Text
streamingDistributionSummary_domainName :: (Text -> f Text)
-> StreamingDistributionSummary -> f StreamingDistributionSummary
streamingDistributionSummary_domainName = (StreamingDistributionSummary -> Text)
-> (StreamingDistributionSummary
    -> Text -> StreamingDistributionSummary)
-> Lens
     StreamingDistributionSummary StreamingDistributionSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistributionSummary' {Text
domainName :: Text
$sel:domainName:StreamingDistributionSummary' :: StreamingDistributionSummary -> Text
domainName} -> Text
domainName) (\s :: StreamingDistributionSummary
s@StreamingDistributionSummary' {} Text
a -> StreamingDistributionSummary
s {$sel:domainName:StreamingDistributionSummary' :: Text
domainName = Text
a} :: StreamingDistributionSummary)

-- | A complex type that contains information about the Amazon S3 bucket from
-- which you want CloudFront to get your media files for distribution.
streamingDistributionSummary_s3Origin :: Lens.Lens' StreamingDistributionSummary S3Origin
streamingDistributionSummary_s3Origin :: (S3Origin -> f S3Origin)
-> StreamingDistributionSummary -> f StreamingDistributionSummary
streamingDistributionSummary_s3Origin = (StreamingDistributionSummary -> S3Origin)
-> (StreamingDistributionSummary
    -> S3Origin -> StreamingDistributionSummary)
-> Lens
     StreamingDistributionSummary
     StreamingDistributionSummary
     S3Origin
     S3Origin
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistributionSummary' {S3Origin
s3Origin :: S3Origin
$sel:s3Origin:StreamingDistributionSummary' :: StreamingDistributionSummary -> S3Origin
s3Origin} -> S3Origin
s3Origin) (\s :: StreamingDistributionSummary
s@StreamingDistributionSummary' {} S3Origin
a -> StreamingDistributionSummary
s {$sel:s3Origin:StreamingDistributionSummary' :: S3Origin
s3Origin = S3Origin
a} :: StreamingDistributionSummary)

-- | A complex type that contains information about CNAMEs (alternate domain
-- names), if any, for this streaming distribution.
streamingDistributionSummary_aliases :: Lens.Lens' StreamingDistributionSummary Aliases
streamingDistributionSummary_aliases :: (Aliases -> f Aliases)
-> StreamingDistributionSummary -> f StreamingDistributionSummary
streamingDistributionSummary_aliases = (StreamingDistributionSummary -> Aliases)
-> (StreamingDistributionSummary
    -> Aliases -> StreamingDistributionSummary)
-> Lens
     StreamingDistributionSummary
     StreamingDistributionSummary
     Aliases
     Aliases
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistributionSummary' {Aliases
aliases :: Aliases
$sel:aliases:StreamingDistributionSummary' :: StreamingDistributionSummary -> Aliases
aliases} -> Aliases
aliases) (\s :: StreamingDistributionSummary
s@StreamingDistributionSummary' {} Aliases
a -> StreamingDistributionSummary
s {$sel:aliases:StreamingDistributionSummary' :: Aliases
aliases = Aliases
a} :: StreamingDistributionSummary)

-- | A complex type that specifies the accounts, if any, that you want to
-- allow to create signed URLs for private content. If you want to require
-- signed URLs in requests for objects in the target origin that match the
-- @PathPattern@ for this cache behavior, specify @true@ for @Enabled@, and
-- specify the applicable values for @Quantity@ and @Items@.If you don\'t
-- want to require signed URLs in requests for objects that match
-- @PathPattern@, specify @false@ for @Enabled@ and @0@ for @Quantity@.
-- Omit @Items@. To add, change, or remove one or more trusted signers,
-- change @Enabled@ to @true@ (if it\'s currently @false@), change
-- @Quantity@ as applicable, and specify all of the trusted signers that
-- you want to include in the updated distribution.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html Serving Private Content through CloudFront>
-- in the /Amazon CloudFront Developer Guide/.
streamingDistributionSummary_trustedSigners :: Lens.Lens' StreamingDistributionSummary TrustedSigners
streamingDistributionSummary_trustedSigners :: (TrustedSigners -> f TrustedSigners)
-> StreamingDistributionSummary -> f StreamingDistributionSummary
streamingDistributionSummary_trustedSigners = (StreamingDistributionSummary -> TrustedSigners)
-> (StreamingDistributionSummary
    -> TrustedSigners -> StreamingDistributionSummary)
-> Lens
     StreamingDistributionSummary
     StreamingDistributionSummary
     TrustedSigners
     TrustedSigners
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistributionSummary' {TrustedSigners
trustedSigners :: TrustedSigners
$sel:trustedSigners:StreamingDistributionSummary' :: StreamingDistributionSummary -> TrustedSigners
trustedSigners} -> TrustedSigners
trustedSigners) (\s :: StreamingDistributionSummary
s@StreamingDistributionSummary' {} TrustedSigners
a -> StreamingDistributionSummary
s {$sel:trustedSigners:StreamingDistributionSummary' :: TrustedSigners
trustedSigners = TrustedSigners
a} :: StreamingDistributionSummary)

-- | The comment originally specified when this distribution was created.
streamingDistributionSummary_comment :: Lens.Lens' StreamingDistributionSummary Prelude.Text
streamingDistributionSummary_comment :: (Text -> f Text)
-> StreamingDistributionSummary -> f StreamingDistributionSummary
streamingDistributionSummary_comment = (StreamingDistributionSummary -> Text)
-> (StreamingDistributionSummary
    -> Text -> StreamingDistributionSummary)
-> Lens
     StreamingDistributionSummary StreamingDistributionSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistributionSummary' {Text
comment :: Text
$sel:comment:StreamingDistributionSummary' :: StreamingDistributionSummary -> Text
comment} -> Text
comment) (\s :: StreamingDistributionSummary
s@StreamingDistributionSummary' {} Text
a -> StreamingDistributionSummary
s {$sel:comment:StreamingDistributionSummary' :: Text
comment = Text
a} :: StreamingDistributionSummary)

-- | A complex type that contains information about price class for this
-- streaming distribution.
streamingDistributionSummary_priceClass :: Lens.Lens' StreamingDistributionSummary PriceClass
streamingDistributionSummary_priceClass :: (PriceClass -> f PriceClass)
-> StreamingDistributionSummary -> f StreamingDistributionSummary
streamingDistributionSummary_priceClass = (StreamingDistributionSummary -> PriceClass)
-> (StreamingDistributionSummary
    -> PriceClass -> StreamingDistributionSummary)
-> Lens
     StreamingDistributionSummary
     StreamingDistributionSummary
     PriceClass
     PriceClass
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistributionSummary' {PriceClass
priceClass :: PriceClass
$sel:priceClass:StreamingDistributionSummary' :: StreamingDistributionSummary -> PriceClass
priceClass} -> PriceClass
priceClass) (\s :: StreamingDistributionSummary
s@StreamingDistributionSummary' {} PriceClass
a -> StreamingDistributionSummary
s {$sel:priceClass:StreamingDistributionSummary' :: PriceClass
priceClass = PriceClass
a} :: StreamingDistributionSummary)

-- | Whether the distribution is enabled to accept end user requests for
-- content.
streamingDistributionSummary_enabled :: Lens.Lens' StreamingDistributionSummary Prelude.Bool
streamingDistributionSummary_enabled :: (Bool -> f Bool)
-> StreamingDistributionSummary -> f StreamingDistributionSummary
streamingDistributionSummary_enabled = (StreamingDistributionSummary -> Bool)
-> (StreamingDistributionSummary
    -> Bool -> StreamingDistributionSummary)
-> Lens
     StreamingDistributionSummary StreamingDistributionSummary Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingDistributionSummary' {Bool
enabled :: Bool
$sel:enabled:StreamingDistributionSummary' :: StreamingDistributionSummary -> Bool
enabled} -> Bool
enabled) (\s :: StreamingDistributionSummary
s@StreamingDistributionSummary' {} Bool
a -> StreamingDistributionSummary
s {$sel:enabled:StreamingDistributionSummary' :: Bool
enabled = Bool
a} :: StreamingDistributionSummary)

instance Core.FromXML StreamingDistributionSummary where
  parseXML :: [Node] -> Either String StreamingDistributionSummary
parseXML [Node]
x =
    Text
-> Text
-> Text
-> ISO8601
-> Text
-> S3Origin
-> Aliases
-> TrustedSigners
-> Text
-> PriceClass
-> Bool
-> StreamingDistributionSummary
StreamingDistributionSummary'
      (Text
 -> Text
 -> Text
 -> ISO8601
 -> Text
 -> S3Origin
 -> Aliases
 -> TrustedSigners
 -> Text
 -> PriceClass
 -> Bool
 -> StreamingDistributionSummary)
-> Either String Text
-> Either
     String
     (Text
      -> Text
      -> ISO8601
      -> Text
      -> S3Origin
      -> Aliases
      -> TrustedSigners
      -> Text
      -> PriceClass
      -> Bool
      -> StreamingDistributionSummary)
forall (f :: * -> *) a b. Functor 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
   -> ISO8601
   -> Text
   -> S3Origin
   -> Aliases
   -> TrustedSigners
   -> Text
   -> PriceClass
   -> Bool
   -> StreamingDistributionSummary)
-> Either String Text
-> Either
     String
     (Text
      -> ISO8601
      -> Text
      -> S3Origin
      -> Aliases
      -> TrustedSigners
      -> Text
      -> PriceClass
      -> Bool
      -> StreamingDistributionSummary)
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
   -> ISO8601
   -> Text
   -> S3Origin
   -> Aliases
   -> TrustedSigners
   -> Text
   -> PriceClass
   -> Bool
   -> StreamingDistributionSummary)
-> Either String Text
-> Either
     String
     (ISO8601
      -> Text
      -> S3Origin
      -> Aliases
      -> TrustedSigners
      -> Text
      -> PriceClass
      -> Bool
      -> StreamingDistributionSummary)
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
  (ISO8601
   -> Text
   -> S3Origin
   -> Aliases
   -> TrustedSigners
   -> Text
   -> PriceClass
   -> Bool
   -> StreamingDistributionSummary)
-> Either String ISO8601
-> Either
     String
     (Text
      -> S3Origin
      -> Aliases
      -> TrustedSigners
      -> Text
      -> PriceClass
      -> Bool
      -> StreamingDistributionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ISO8601
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"LastModifiedTime")
      Either
  String
  (Text
   -> S3Origin
   -> Aliases
   -> TrustedSigners
   -> Text
   -> PriceClass
   -> Bool
   -> StreamingDistributionSummary)
-> Either String Text
-> Either
     String
     (S3Origin
      -> Aliases
      -> TrustedSigners
      -> Text
      -> PriceClass
      -> Bool
      -> StreamingDistributionSummary)
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
  (S3Origin
   -> Aliases
   -> TrustedSigners
   -> Text
   -> PriceClass
   -> Bool
   -> StreamingDistributionSummary)
-> Either String S3Origin
-> Either
     String
     (Aliases
      -> TrustedSigners
      -> Text
      -> PriceClass
      -> Bool
      -> StreamingDistributionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String S3Origin
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"S3Origin")
      Either
  String
  (Aliases
   -> TrustedSigners
   -> Text
   -> PriceClass
   -> Bool
   -> StreamingDistributionSummary)
-> Either String Aliases
-> Either
     String
     (TrustedSigners
      -> Text -> PriceClass -> Bool -> StreamingDistributionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Aliases
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Aliases")
      Either
  String
  (TrustedSigners
   -> Text -> PriceClass -> Bool -> StreamingDistributionSummary)
-> Either String TrustedSigners
-> Either
     String (Text -> PriceClass -> Bool -> StreamingDistributionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String TrustedSigners
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"TrustedSigners")
      Either
  String (Text -> PriceClass -> Bool -> StreamingDistributionSummary)
-> Either String Text
-> Either
     String (PriceClass -> Bool -> StreamingDistributionSummary)
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
"Comment")
      Either String (PriceClass -> Bool -> StreamingDistributionSummary)
-> Either String PriceClass
-> Either String (Bool -> StreamingDistributionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String PriceClass
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"PriceClass")
      Either String (Bool -> StreamingDistributionSummary)
-> Either String Bool -> Either String StreamingDistributionSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Bool
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Enabled")

instance
  Prelude.Hashable
    StreamingDistributionSummary

instance Prelude.NFData StreamingDistributionSummary