{-# 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.MediaPackage.Types.OriginEndpoint
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaPackage.Types.OriginEndpoint where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaPackage.Types.Authorization
import Amazonka.MediaPackage.Types.CmafPackage
import Amazonka.MediaPackage.Types.DashPackage
import Amazonka.MediaPackage.Types.HlsPackage
import Amazonka.MediaPackage.Types.MssPackage
import Amazonka.MediaPackage.Types.Origination
import qualified Amazonka.Prelude as Prelude

-- | An OriginEndpoint resource configuration.
--
-- /See:/ 'newOriginEndpoint' smart constructor.
data OriginEndpoint = OriginEndpoint'
  { -- | The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
    OriginEndpoint -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    OriginEndpoint -> Maybe Authorization
authorization :: Prelude.Maybe Authorization,
    -- | The ID of the Channel the OriginEndpoint is associated with.
    OriginEndpoint -> Maybe Text
channelId :: Prelude.Maybe Prelude.Text,
    OriginEndpoint -> Maybe CmafPackage
cmafPackage :: Prelude.Maybe CmafPackage,
    OriginEndpoint -> Maybe DashPackage
dashPackage :: Prelude.Maybe DashPackage,
    -- | A short text description of the OriginEndpoint.
    OriginEndpoint -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    OriginEndpoint -> Maybe HlsPackage
hlsPackage :: Prelude.Maybe HlsPackage,
    -- | The ID of the OriginEndpoint.
    OriginEndpoint -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | A short string appended to the end of the OriginEndpoint URL.
    OriginEndpoint -> Maybe Text
manifestName :: Prelude.Maybe Prelude.Text,
    OriginEndpoint -> Maybe MssPackage
mssPackage :: Prelude.Maybe MssPackage,
    -- | Control whether origination of video is allowed for this OriginEndpoint.
    -- If set to ALLOW, the OriginEndpoint may by requested, pursuant to any
    -- other form of access control. If set to DENY, the OriginEndpoint may not
    -- be requested. This can be helpful for Live to VOD harvesting, or for
    -- temporarily disabling origination
    OriginEndpoint -> Maybe Origination
origination :: Prelude.Maybe Origination,
    -- | Maximum duration (seconds) of content to retain for startover playback.
    -- If not specified, startover playback will be disabled for the
    -- OriginEndpoint.
    OriginEndpoint -> Maybe Int
startoverWindowSeconds :: Prelude.Maybe Prelude.Int,
    OriginEndpoint -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Amount of delay (seconds) to enforce on the playback of live content. If
    -- not specified, there will be no time delay in effect for the
    -- OriginEndpoint.
    OriginEndpoint -> Maybe Int
timeDelaySeconds :: Prelude.Maybe Prelude.Int,
    -- | The URL of the packaged OriginEndpoint for consumption.
    OriginEndpoint -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
    -- | A list of source IP CIDR blocks that will be allowed to access the
    -- OriginEndpoint.
    OriginEndpoint -> Maybe [Text]
whitelist :: Prelude.Maybe [Prelude.Text]
  }
  deriving (OriginEndpoint -> OriginEndpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OriginEndpoint -> OriginEndpoint -> Bool
$c/= :: OriginEndpoint -> OriginEndpoint -> Bool
== :: OriginEndpoint -> OriginEndpoint -> Bool
$c== :: OriginEndpoint -> OriginEndpoint -> Bool
Prelude.Eq, ReadPrec [OriginEndpoint]
ReadPrec OriginEndpoint
Int -> ReadS OriginEndpoint
ReadS [OriginEndpoint]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OriginEndpoint]
$creadListPrec :: ReadPrec [OriginEndpoint]
readPrec :: ReadPrec OriginEndpoint
$creadPrec :: ReadPrec OriginEndpoint
readList :: ReadS [OriginEndpoint]
$creadList :: ReadS [OriginEndpoint]
readsPrec :: Int -> ReadS OriginEndpoint
$creadsPrec :: Int -> ReadS OriginEndpoint
Prelude.Read, Int -> OriginEndpoint -> ShowS
[OriginEndpoint] -> ShowS
OriginEndpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OriginEndpoint] -> ShowS
$cshowList :: [OriginEndpoint] -> ShowS
show :: OriginEndpoint -> String
$cshow :: OriginEndpoint -> String
showsPrec :: Int -> OriginEndpoint -> ShowS
$cshowsPrec :: Int -> OriginEndpoint -> ShowS
Prelude.Show, forall x. Rep OriginEndpoint x -> OriginEndpoint
forall x. OriginEndpoint -> Rep OriginEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OriginEndpoint x -> OriginEndpoint
$cfrom :: forall x. OriginEndpoint -> Rep OriginEndpoint x
Prelude.Generic)

-- |
-- Create a value of 'OriginEndpoint' 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:
--
-- 'arn', 'originEndpoint_arn' - The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
--
-- 'authorization', 'originEndpoint_authorization' - Undocumented member.
--
-- 'channelId', 'originEndpoint_channelId' - The ID of the Channel the OriginEndpoint is associated with.
--
-- 'cmafPackage', 'originEndpoint_cmafPackage' - Undocumented member.
--
-- 'dashPackage', 'originEndpoint_dashPackage' - Undocumented member.
--
-- 'description', 'originEndpoint_description' - A short text description of the OriginEndpoint.
--
-- 'hlsPackage', 'originEndpoint_hlsPackage' - Undocumented member.
--
-- 'id', 'originEndpoint_id' - The ID of the OriginEndpoint.
--
-- 'manifestName', 'originEndpoint_manifestName' - A short string appended to the end of the OriginEndpoint URL.
--
-- 'mssPackage', 'originEndpoint_mssPackage' - Undocumented member.
--
-- 'origination', 'originEndpoint_origination' - Control whether origination of video is allowed for this OriginEndpoint.
-- If set to ALLOW, the OriginEndpoint may by requested, pursuant to any
-- other form of access control. If set to DENY, the OriginEndpoint may not
-- be requested. This can be helpful for Live to VOD harvesting, or for
-- temporarily disabling origination
--
-- 'startoverWindowSeconds', 'originEndpoint_startoverWindowSeconds' - Maximum duration (seconds) of content to retain for startover playback.
-- If not specified, startover playback will be disabled for the
-- OriginEndpoint.
--
-- 'tags', 'originEndpoint_tags' - Undocumented member.
--
-- 'timeDelaySeconds', 'originEndpoint_timeDelaySeconds' - Amount of delay (seconds) to enforce on the playback of live content. If
-- not specified, there will be no time delay in effect for the
-- OriginEndpoint.
--
-- 'url', 'originEndpoint_url' - The URL of the packaged OriginEndpoint for consumption.
--
-- 'whitelist', 'originEndpoint_whitelist' - A list of source IP CIDR blocks that will be allowed to access the
-- OriginEndpoint.
newOriginEndpoint ::
  OriginEndpoint
newOriginEndpoint :: OriginEndpoint
newOriginEndpoint =
  OriginEndpoint'
    { $sel:arn:OriginEndpoint' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:authorization:OriginEndpoint' :: Maybe Authorization
authorization = forall a. Maybe a
Prelude.Nothing,
      $sel:channelId:OriginEndpoint' :: Maybe Text
channelId = forall a. Maybe a
Prelude.Nothing,
      $sel:cmafPackage:OriginEndpoint' :: Maybe CmafPackage
cmafPackage = forall a. Maybe a
Prelude.Nothing,
      $sel:dashPackage:OriginEndpoint' :: Maybe DashPackage
dashPackage = forall a. Maybe a
Prelude.Nothing,
      $sel:description:OriginEndpoint' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:hlsPackage:OriginEndpoint' :: Maybe HlsPackage
hlsPackage = forall a. Maybe a
Prelude.Nothing,
      $sel:id:OriginEndpoint' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:manifestName:OriginEndpoint' :: Maybe Text
manifestName = forall a. Maybe a
Prelude.Nothing,
      $sel:mssPackage:OriginEndpoint' :: Maybe MssPackage
mssPackage = forall a. Maybe a
Prelude.Nothing,
      $sel:origination:OriginEndpoint' :: Maybe Origination
origination = forall a. Maybe a
Prelude.Nothing,
      $sel:startoverWindowSeconds:OriginEndpoint' :: Maybe Int
startoverWindowSeconds = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:OriginEndpoint' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:timeDelaySeconds:OriginEndpoint' :: Maybe Int
timeDelaySeconds = forall a. Maybe a
Prelude.Nothing,
      $sel:url:OriginEndpoint' :: Maybe Text
url = forall a. Maybe a
Prelude.Nothing,
      $sel:whitelist:OriginEndpoint' :: Maybe [Text]
whitelist = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
originEndpoint_arn :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Text)
originEndpoint_arn :: Lens' OriginEndpoint (Maybe Text)
originEndpoint_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe Text
arn :: Maybe Text
$sel:arn:OriginEndpoint' :: OriginEndpoint -> Maybe Text
arn} -> Maybe Text
arn) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe Text
a -> OriginEndpoint
s {$sel:arn:OriginEndpoint' :: Maybe Text
arn = Maybe Text
a} :: OriginEndpoint)

-- | Undocumented member.
originEndpoint_authorization :: Lens.Lens' OriginEndpoint (Prelude.Maybe Authorization)
originEndpoint_authorization :: Lens' OriginEndpoint (Maybe Authorization)
originEndpoint_authorization = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe Authorization
authorization :: Maybe Authorization
$sel:authorization:OriginEndpoint' :: OriginEndpoint -> Maybe Authorization
authorization} -> Maybe Authorization
authorization) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe Authorization
a -> OriginEndpoint
s {$sel:authorization:OriginEndpoint' :: Maybe Authorization
authorization = Maybe Authorization
a} :: OriginEndpoint)

-- | The ID of the Channel the OriginEndpoint is associated with.
originEndpoint_channelId :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Text)
originEndpoint_channelId :: Lens' OriginEndpoint (Maybe Text)
originEndpoint_channelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe Text
channelId :: Maybe Text
$sel:channelId:OriginEndpoint' :: OriginEndpoint -> Maybe Text
channelId} -> Maybe Text
channelId) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe Text
a -> OriginEndpoint
s {$sel:channelId:OriginEndpoint' :: Maybe Text
channelId = Maybe Text
a} :: OriginEndpoint)

-- | Undocumented member.
originEndpoint_cmafPackage :: Lens.Lens' OriginEndpoint (Prelude.Maybe CmafPackage)
originEndpoint_cmafPackage :: Lens' OriginEndpoint (Maybe CmafPackage)
originEndpoint_cmafPackage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe CmafPackage
cmafPackage :: Maybe CmafPackage
$sel:cmafPackage:OriginEndpoint' :: OriginEndpoint -> Maybe CmafPackage
cmafPackage} -> Maybe CmafPackage
cmafPackage) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe CmafPackage
a -> OriginEndpoint
s {$sel:cmafPackage:OriginEndpoint' :: Maybe CmafPackage
cmafPackage = Maybe CmafPackage
a} :: OriginEndpoint)

-- | Undocumented member.
originEndpoint_dashPackage :: Lens.Lens' OriginEndpoint (Prelude.Maybe DashPackage)
originEndpoint_dashPackage :: Lens' OriginEndpoint (Maybe DashPackage)
originEndpoint_dashPackage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe DashPackage
dashPackage :: Maybe DashPackage
$sel:dashPackage:OriginEndpoint' :: OriginEndpoint -> Maybe DashPackage
dashPackage} -> Maybe DashPackage
dashPackage) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe DashPackage
a -> OriginEndpoint
s {$sel:dashPackage:OriginEndpoint' :: Maybe DashPackage
dashPackage = Maybe DashPackage
a} :: OriginEndpoint)

-- | A short text description of the OriginEndpoint.
originEndpoint_description :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Text)
originEndpoint_description :: Lens' OriginEndpoint (Maybe Text)
originEndpoint_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe Text
description :: Maybe Text
$sel:description:OriginEndpoint' :: OriginEndpoint -> Maybe Text
description} -> Maybe Text
description) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe Text
a -> OriginEndpoint
s {$sel:description:OriginEndpoint' :: Maybe Text
description = Maybe Text
a} :: OriginEndpoint)

-- | Undocumented member.
originEndpoint_hlsPackage :: Lens.Lens' OriginEndpoint (Prelude.Maybe HlsPackage)
originEndpoint_hlsPackage :: Lens' OriginEndpoint (Maybe HlsPackage)
originEndpoint_hlsPackage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe HlsPackage
hlsPackage :: Maybe HlsPackage
$sel:hlsPackage:OriginEndpoint' :: OriginEndpoint -> Maybe HlsPackage
hlsPackage} -> Maybe HlsPackage
hlsPackage) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe HlsPackage
a -> OriginEndpoint
s {$sel:hlsPackage:OriginEndpoint' :: Maybe HlsPackage
hlsPackage = Maybe HlsPackage
a} :: OriginEndpoint)

-- | The ID of the OriginEndpoint.
originEndpoint_id :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Text)
originEndpoint_id :: Lens' OriginEndpoint (Maybe Text)
originEndpoint_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe Text
id :: Maybe Text
$sel:id:OriginEndpoint' :: OriginEndpoint -> Maybe Text
id} -> Maybe Text
id) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe Text
a -> OriginEndpoint
s {$sel:id:OriginEndpoint' :: Maybe Text
id = Maybe Text
a} :: OriginEndpoint)

-- | A short string appended to the end of the OriginEndpoint URL.
originEndpoint_manifestName :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Text)
originEndpoint_manifestName :: Lens' OriginEndpoint (Maybe Text)
originEndpoint_manifestName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe Text
manifestName :: Maybe Text
$sel:manifestName:OriginEndpoint' :: OriginEndpoint -> Maybe Text
manifestName} -> Maybe Text
manifestName) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe Text
a -> OriginEndpoint
s {$sel:manifestName:OriginEndpoint' :: Maybe Text
manifestName = Maybe Text
a} :: OriginEndpoint)

-- | Undocumented member.
originEndpoint_mssPackage :: Lens.Lens' OriginEndpoint (Prelude.Maybe MssPackage)
originEndpoint_mssPackage :: Lens' OriginEndpoint (Maybe MssPackage)
originEndpoint_mssPackage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe MssPackage
mssPackage :: Maybe MssPackage
$sel:mssPackage:OriginEndpoint' :: OriginEndpoint -> Maybe MssPackage
mssPackage} -> Maybe MssPackage
mssPackage) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe MssPackage
a -> OriginEndpoint
s {$sel:mssPackage:OriginEndpoint' :: Maybe MssPackage
mssPackage = Maybe MssPackage
a} :: OriginEndpoint)

-- | Control whether origination of video is allowed for this OriginEndpoint.
-- If set to ALLOW, the OriginEndpoint may by requested, pursuant to any
-- other form of access control. If set to DENY, the OriginEndpoint may not
-- be requested. This can be helpful for Live to VOD harvesting, or for
-- temporarily disabling origination
originEndpoint_origination :: Lens.Lens' OriginEndpoint (Prelude.Maybe Origination)
originEndpoint_origination :: Lens' OriginEndpoint (Maybe Origination)
originEndpoint_origination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe Origination
origination :: Maybe Origination
$sel:origination:OriginEndpoint' :: OriginEndpoint -> Maybe Origination
origination} -> Maybe Origination
origination) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe Origination
a -> OriginEndpoint
s {$sel:origination:OriginEndpoint' :: Maybe Origination
origination = Maybe Origination
a} :: OriginEndpoint)

-- | Maximum duration (seconds) of content to retain for startover playback.
-- If not specified, startover playback will be disabled for the
-- OriginEndpoint.
originEndpoint_startoverWindowSeconds :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Int)
originEndpoint_startoverWindowSeconds :: Lens' OriginEndpoint (Maybe Int)
originEndpoint_startoverWindowSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe Int
startoverWindowSeconds :: Maybe Int
$sel:startoverWindowSeconds:OriginEndpoint' :: OriginEndpoint -> Maybe Int
startoverWindowSeconds} -> Maybe Int
startoverWindowSeconds) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe Int
a -> OriginEndpoint
s {$sel:startoverWindowSeconds:OriginEndpoint' :: Maybe Int
startoverWindowSeconds = Maybe Int
a} :: OriginEndpoint)

-- | Undocumented member.
originEndpoint_tags :: Lens.Lens' OriginEndpoint (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
originEndpoint_tags :: Lens' OriginEndpoint (Maybe (HashMap Text Text))
originEndpoint_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:OriginEndpoint' :: OriginEndpoint -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe (HashMap Text Text)
a -> OriginEndpoint
s {$sel:tags:OriginEndpoint' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: OriginEndpoint) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Amount of delay (seconds) to enforce on the playback of live content. If
-- not specified, there will be no time delay in effect for the
-- OriginEndpoint.
originEndpoint_timeDelaySeconds :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Int)
originEndpoint_timeDelaySeconds :: Lens' OriginEndpoint (Maybe Int)
originEndpoint_timeDelaySeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe Int
timeDelaySeconds :: Maybe Int
$sel:timeDelaySeconds:OriginEndpoint' :: OriginEndpoint -> Maybe Int
timeDelaySeconds} -> Maybe Int
timeDelaySeconds) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe Int
a -> OriginEndpoint
s {$sel:timeDelaySeconds:OriginEndpoint' :: Maybe Int
timeDelaySeconds = Maybe Int
a} :: OriginEndpoint)

-- | The URL of the packaged OriginEndpoint for consumption.
originEndpoint_url :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Text)
originEndpoint_url :: Lens' OriginEndpoint (Maybe Text)
originEndpoint_url = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe Text
url :: Maybe Text
$sel:url:OriginEndpoint' :: OriginEndpoint -> Maybe Text
url} -> Maybe Text
url) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe Text
a -> OriginEndpoint
s {$sel:url:OriginEndpoint' :: Maybe Text
url = Maybe Text
a} :: OriginEndpoint)

-- | A list of source IP CIDR blocks that will be allowed to access the
-- OriginEndpoint.
originEndpoint_whitelist :: Lens.Lens' OriginEndpoint (Prelude.Maybe [Prelude.Text])
originEndpoint_whitelist :: Lens' OriginEndpoint (Maybe [Text])
originEndpoint_whitelist = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginEndpoint' {Maybe [Text]
whitelist :: Maybe [Text]
$sel:whitelist:OriginEndpoint' :: OriginEndpoint -> Maybe [Text]
whitelist} -> Maybe [Text]
whitelist) (\s :: OriginEndpoint
s@OriginEndpoint' {} Maybe [Text]
a -> OriginEndpoint
s {$sel:whitelist:OriginEndpoint' :: Maybe [Text]
whitelist = Maybe [Text]
a} :: OriginEndpoint) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Data.FromJSON OriginEndpoint where
  parseJSON :: Value -> Parser OriginEndpoint
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"OriginEndpoint"
      ( \Object
x ->
          Maybe Text
-> Maybe Authorization
-> Maybe Text
-> Maybe CmafPackage
-> Maybe DashPackage
-> Maybe Text
-> Maybe HlsPackage
-> Maybe Text
-> Maybe Text
-> Maybe MssPackage
-> Maybe Origination
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Maybe Text
-> Maybe [Text]
-> OriginEndpoint
OriginEndpoint'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"authorization")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"channelId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"cmafPackage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"dashPackage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"hlsPackage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"manifestName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"mssPackage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"origination")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"startoverWindowSeconds")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"timeDelaySeconds")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"url")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"whitelist" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable OriginEndpoint where
  hashWithSalt :: Int -> OriginEndpoint -> Int
hashWithSalt Int
_salt OriginEndpoint' {Maybe Int
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe Authorization
Maybe Origination
Maybe MssPackage
Maybe HlsPackage
Maybe CmafPackage
Maybe DashPackage
whitelist :: Maybe [Text]
url :: Maybe Text
timeDelaySeconds :: Maybe Int
tags :: Maybe (HashMap Text Text)
startoverWindowSeconds :: Maybe Int
origination :: Maybe Origination
mssPackage :: Maybe MssPackage
manifestName :: Maybe Text
id :: Maybe Text
hlsPackage :: Maybe HlsPackage
description :: Maybe Text
dashPackage :: Maybe DashPackage
cmafPackage :: Maybe CmafPackage
channelId :: Maybe Text
authorization :: Maybe Authorization
arn :: Maybe Text
$sel:whitelist:OriginEndpoint' :: OriginEndpoint -> Maybe [Text]
$sel:url:OriginEndpoint' :: OriginEndpoint -> Maybe Text
$sel:timeDelaySeconds:OriginEndpoint' :: OriginEndpoint -> Maybe Int
$sel:tags:OriginEndpoint' :: OriginEndpoint -> Maybe (HashMap Text Text)
$sel:startoverWindowSeconds:OriginEndpoint' :: OriginEndpoint -> Maybe Int
$sel:origination:OriginEndpoint' :: OriginEndpoint -> Maybe Origination
$sel:mssPackage:OriginEndpoint' :: OriginEndpoint -> Maybe MssPackage
$sel:manifestName:OriginEndpoint' :: OriginEndpoint -> Maybe Text
$sel:id:OriginEndpoint' :: OriginEndpoint -> Maybe Text
$sel:hlsPackage:OriginEndpoint' :: OriginEndpoint -> Maybe HlsPackage
$sel:description:OriginEndpoint' :: OriginEndpoint -> Maybe Text
$sel:dashPackage:OriginEndpoint' :: OriginEndpoint -> Maybe DashPackage
$sel:cmafPackage:OriginEndpoint' :: OriginEndpoint -> Maybe CmafPackage
$sel:channelId:OriginEndpoint' :: OriginEndpoint -> Maybe Text
$sel:authorization:OriginEndpoint' :: OriginEndpoint -> Maybe Authorization
$sel:arn:OriginEndpoint' :: OriginEndpoint -> 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 Authorization
authorization
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
channelId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CmafPackage
cmafPackage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DashPackage
dashPackage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsPackage
hlsPackage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
manifestName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MssPackage
mssPackage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Origination
origination
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
startoverWindowSeconds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
timeDelaySeconds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
url
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
whitelist

instance Prelude.NFData OriginEndpoint where
  rnf :: OriginEndpoint -> ()
rnf OriginEndpoint' {Maybe Int
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe Authorization
Maybe Origination
Maybe MssPackage
Maybe HlsPackage
Maybe CmafPackage
Maybe DashPackage
whitelist :: Maybe [Text]
url :: Maybe Text
timeDelaySeconds :: Maybe Int
tags :: Maybe (HashMap Text Text)
startoverWindowSeconds :: Maybe Int
origination :: Maybe Origination
mssPackage :: Maybe MssPackage
manifestName :: Maybe Text
id :: Maybe Text
hlsPackage :: Maybe HlsPackage
description :: Maybe Text
dashPackage :: Maybe DashPackage
cmafPackage :: Maybe CmafPackage
channelId :: Maybe Text
authorization :: Maybe Authorization
arn :: Maybe Text
$sel:whitelist:OriginEndpoint' :: OriginEndpoint -> Maybe [Text]
$sel:url:OriginEndpoint' :: OriginEndpoint -> Maybe Text
$sel:timeDelaySeconds:OriginEndpoint' :: OriginEndpoint -> Maybe Int
$sel:tags:OriginEndpoint' :: OriginEndpoint -> Maybe (HashMap Text Text)
$sel:startoverWindowSeconds:OriginEndpoint' :: OriginEndpoint -> Maybe Int
$sel:origination:OriginEndpoint' :: OriginEndpoint -> Maybe Origination
$sel:mssPackage:OriginEndpoint' :: OriginEndpoint -> Maybe MssPackage
$sel:manifestName:OriginEndpoint' :: OriginEndpoint -> Maybe Text
$sel:id:OriginEndpoint' :: OriginEndpoint -> Maybe Text
$sel:hlsPackage:OriginEndpoint' :: OriginEndpoint -> Maybe HlsPackage
$sel:description:OriginEndpoint' :: OriginEndpoint -> Maybe Text
$sel:dashPackage:OriginEndpoint' :: OriginEndpoint -> Maybe DashPackage
$sel:cmafPackage:OriginEndpoint' :: OriginEndpoint -> Maybe CmafPackage
$sel:channelId:OriginEndpoint' :: OriginEndpoint -> Maybe Text
$sel:authorization:OriginEndpoint' :: OriginEndpoint -> Maybe Authorization
$sel:arn:OriginEndpoint' :: OriginEndpoint -> 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 Authorization
authorization
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
channelId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CmafPackage
cmafPackage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DashPackage
dashPackage
      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 HlsPackage
hlsPackage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
manifestName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MssPackage
mssPackage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Origination
origination
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
startoverWindowSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
timeDelaySeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
url
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
whitelist