{-# 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-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.MediaPackage.Types.OriginEndpoint where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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'
  { -- | A list of source IP CIDR blocks that will be allowed to access the
    -- OriginEndpoint.
    OriginEndpoint -> Maybe [Text]
whitelist :: Prelude.Maybe [Prelude.Text],
    OriginEndpoint -> Maybe HlsPackage
hlsPackage :: Prelude.Maybe HlsPackage,
    -- | The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
    OriginEndpoint -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | A short string appended to the end of the OriginEndpoint URL.
    OriginEndpoint -> Maybe Text
manifestName :: Prelude.Maybe Prelude.Text,
    -- | The URL of the packaged OriginEndpoint for consumption.
    OriginEndpoint -> Maybe Text
url :: 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,
    -- | 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 DashPackage
dashPackage :: Prelude.Maybe DashPackage,
    OriginEndpoint -> Maybe MssPackage
mssPackage :: Prelude.Maybe MssPackage,
    -- | The ID of the OriginEndpoint.
    OriginEndpoint -> Maybe Text
id :: Prelude.Maybe 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,
    OriginEndpoint -> Maybe CmafPackage
cmafPackage :: Prelude.Maybe CmafPackage,
    -- | A short text description of the OriginEndpoint.
    OriginEndpoint -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    OriginEndpoint -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | 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
  }
  deriving (OriginEndpoint -> OriginEndpoint -> Bool
(OriginEndpoint -> OriginEndpoint -> Bool)
-> (OriginEndpoint -> OriginEndpoint -> Bool) -> Eq OriginEndpoint
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]
(Int -> ReadS OriginEndpoint)
-> ReadS [OriginEndpoint]
-> ReadPrec OriginEndpoint
-> ReadPrec [OriginEndpoint]
-> Read 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
(Int -> OriginEndpoint -> ShowS)
-> (OriginEndpoint -> String)
-> ([OriginEndpoint] -> ShowS)
-> Show OriginEndpoint
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. OriginEndpoint -> Rep OriginEndpoint x)
-> (forall x. Rep OriginEndpoint x -> OriginEndpoint)
-> Generic OriginEndpoint
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:
--
-- 'whitelist', 'originEndpoint_whitelist' - A list of source IP CIDR blocks that will be allowed to access the
-- OriginEndpoint.
--
-- 'hlsPackage', 'originEndpoint_hlsPackage' - Undocumented member.
--
-- 'arn', 'originEndpoint_arn' - The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
--
-- 'manifestName', 'originEndpoint_manifestName' - A short string appended to the end of the OriginEndpoint URL.
--
-- 'url', 'originEndpoint_url' - The URL of the packaged OriginEndpoint for consumption.
--
-- 'authorization', 'originEndpoint_authorization' - Undocumented member.
--
-- 'channelId', 'originEndpoint_channelId' - The ID of the Channel the OriginEndpoint is associated with.
--
-- 'startoverWindowSeconds', 'originEndpoint_startoverWindowSeconds' - Maximum duration (seconds) of content to retain for startover playback.
-- If not specified, startover playback will be disabled for the
-- OriginEndpoint.
--
-- 'dashPackage', 'originEndpoint_dashPackage' - Undocumented member.
--
-- 'mssPackage', 'originEndpoint_mssPackage' - Undocumented member.
--
-- 'id', 'originEndpoint_id' - The ID of the OriginEndpoint.
--
-- '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.
--
-- 'cmafPackage', 'originEndpoint_cmafPackage' - Undocumented member.
--
-- 'description', 'originEndpoint_description' - A short text description of the OriginEndpoint.
--
-- 'tags', 'originEndpoint_tags' - 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
newOriginEndpoint ::
  OriginEndpoint
newOriginEndpoint :: OriginEndpoint
newOriginEndpoint =
  OriginEndpoint' :: Maybe [Text]
-> Maybe HlsPackage
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Authorization
-> Maybe Text
-> Maybe Int
-> Maybe DashPackage
-> Maybe MssPackage
-> Maybe Text
-> Maybe Int
-> Maybe CmafPackage
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Origination
-> OriginEndpoint
OriginEndpoint'
    { $sel:whitelist:OriginEndpoint' :: Maybe [Text]
whitelist = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:hlsPackage:OriginEndpoint' :: Maybe HlsPackage
hlsPackage = Maybe HlsPackage
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:OriginEndpoint' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:manifestName:OriginEndpoint' :: Maybe Text
manifestName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:url:OriginEndpoint' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authorization:OriginEndpoint' :: Maybe Authorization
authorization = Maybe Authorization
forall a. Maybe a
Prelude.Nothing,
      $sel:channelId:OriginEndpoint' :: Maybe Text
channelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startoverWindowSeconds:OriginEndpoint' :: Maybe Int
startoverWindowSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:dashPackage:OriginEndpoint' :: Maybe DashPackage
dashPackage = Maybe DashPackage
forall a. Maybe a
Prelude.Nothing,
      $sel:mssPackage:OriginEndpoint' :: Maybe MssPackage
mssPackage = Maybe MssPackage
forall a. Maybe a
Prelude.Nothing,
      $sel:id:OriginEndpoint' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timeDelaySeconds:OriginEndpoint' :: Maybe Int
timeDelaySeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:cmafPackage:OriginEndpoint' :: Maybe CmafPackage
cmafPackage = Maybe CmafPackage
forall a. Maybe a
Prelude.Nothing,
      $sel:description:OriginEndpoint' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:OriginEndpoint' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:origination:OriginEndpoint' :: Maybe Origination
origination = Maybe Origination
forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: (Maybe [Text] -> f (Maybe [Text]))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_whitelist = (OriginEndpoint -> Maybe [Text])
-> (OriginEndpoint -> Maybe [Text] -> OriginEndpoint)
-> Lens OriginEndpoint OriginEndpoint (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> OriginEndpoint -> f OriginEndpoint)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> OriginEndpoint
-> f OriginEndpoint
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

-- | Undocumented member.
originEndpoint_hlsPackage :: Lens.Lens' OriginEndpoint (Prelude.Maybe HlsPackage)
originEndpoint_hlsPackage :: (Maybe HlsPackage -> f (Maybe HlsPackage))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_hlsPackage = (OriginEndpoint -> Maybe HlsPackage)
-> (OriginEndpoint -> Maybe HlsPackage -> OriginEndpoint)
-> Lens
     OriginEndpoint OriginEndpoint (Maybe HlsPackage) (Maybe 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 Amazon Resource Name (ARN) assigned to the OriginEndpoint.
originEndpoint_arn :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Text)
originEndpoint_arn :: (Maybe Text -> f (Maybe Text))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_arn = (OriginEndpoint -> Maybe Text)
-> (OriginEndpoint -> Maybe Text -> OriginEndpoint)
-> Lens OriginEndpoint OriginEndpoint (Maybe Text) (Maybe Text)
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)

-- | A short string appended to the end of the OriginEndpoint URL.
originEndpoint_manifestName :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Text)
originEndpoint_manifestName :: (Maybe Text -> f (Maybe Text))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_manifestName = (OriginEndpoint -> Maybe Text)
-> (OriginEndpoint -> Maybe Text -> OriginEndpoint)
-> Lens OriginEndpoint OriginEndpoint (Maybe Text) (Maybe Text)
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)

-- | The URL of the packaged OriginEndpoint for consumption.
originEndpoint_url :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Text)
originEndpoint_url :: (Maybe Text -> f (Maybe Text))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_url = (OriginEndpoint -> Maybe Text)
-> (OriginEndpoint -> Maybe Text -> OriginEndpoint)
-> Lens OriginEndpoint OriginEndpoint (Maybe Text) (Maybe Text)
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)

-- | Undocumented member.
originEndpoint_authorization :: Lens.Lens' OriginEndpoint (Prelude.Maybe Authorization)
originEndpoint_authorization :: (Maybe Authorization -> f (Maybe Authorization))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_authorization = (OriginEndpoint -> Maybe Authorization)
-> (OriginEndpoint -> Maybe Authorization -> OriginEndpoint)
-> Lens
     OriginEndpoint
     OriginEndpoint
     (Maybe Authorization)
     (Maybe 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 :: (Maybe Text -> f (Maybe Text))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_channelId = (OriginEndpoint -> Maybe Text)
-> (OriginEndpoint -> Maybe Text -> OriginEndpoint)
-> Lens OriginEndpoint OriginEndpoint (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Int -> f (Maybe Int)) -> OriginEndpoint -> f OriginEndpoint
originEndpoint_startoverWindowSeconds = (OriginEndpoint -> Maybe Int)
-> (OriginEndpoint -> Maybe Int -> OriginEndpoint)
-> Lens OriginEndpoint OriginEndpoint (Maybe Int) (Maybe Int)
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_dashPackage :: Lens.Lens' OriginEndpoint (Prelude.Maybe DashPackage)
originEndpoint_dashPackage :: (Maybe DashPackage -> f (Maybe DashPackage))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_dashPackage = (OriginEndpoint -> Maybe DashPackage)
-> (OriginEndpoint -> Maybe DashPackage -> OriginEndpoint)
-> Lens
     OriginEndpoint
     OriginEndpoint
     (Maybe DashPackage)
     (Maybe 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)

-- | Undocumented member.
originEndpoint_mssPackage :: Lens.Lens' OriginEndpoint (Prelude.Maybe MssPackage)
originEndpoint_mssPackage :: (Maybe MssPackage -> f (Maybe MssPackage))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_mssPackage = (OriginEndpoint -> Maybe MssPackage)
-> (OriginEndpoint -> Maybe MssPackage -> OriginEndpoint)
-> Lens
     OriginEndpoint OriginEndpoint (Maybe MssPackage) (Maybe 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)

-- | The ID of the OriginEndpoint.
originEndpoint_id :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Text)
originEndpoint_id :: (Maybe Text -> f (Maybe Text))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_id = (OriginEndpoint -> Maybe Text)
-> (OriginEndpoint -> Maybe Text -> OriginEndpoint)
-> Lens OriginEndpoint OriginEndpoint (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Int -> f (Maybe Int)) -> OriginEndpoint -> f OriginEndpoint
originEndpoint_timeDelaySeconds = (OriginEndpoint -> Maybe Int)
-> (OriginEndpoint -> Maybe Int -> OriginEndpoint)
-> Lens OriginEndpoint OriginEndpoint (Maybe Int) (Maybe Int)
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)

-- | Undocumented member.
originEndpoint_cmafPackage :: Lens.Lens' OriginEndpoint (Prelude.Maybe CmafPackage)
originEndpoint_cmafPackage :: (Maybe CmafPackage -> f (Maybe CmafPackage))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_cmafPackage = (OriginEndpoint -> Maybe CmafPackage)
-> (OriginEndpoint -> Maybe CmafPackage -> OriginEndpoint)
-> Lens
     OriginEndpoint
     OriginEndpoint
     (Maybe CmafPackage)
     (Maybe 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)

-- | A short text description of the OriginEndpoint.
originEndpoint_description :: Lens.Lens' OriginEndpoint (Prelude.Maybe Prelude.Text)
originEndpoint_description :: (Maybe Text -> f (Maybe Text))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_description = (OriginEndpoint -> Maybe Text)
-> (OriginEndpoint -> Maybe Text -> OriginEndpoint)
-> Lens OriginEndpoint OriginEndpoint (Maybe Text) (Maybe Text)
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_tags :: Lens.Lens' OriginEndpoint (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
originEndpoint_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_tags = (OriginEndpoint -> Maybe (HashMap Text Text))
-> (OriginEndpoint -> Maybe (HashMap Text Text) -> OriginEndpoint)
-> Lens
     OriginEndpoint
     OriginEndpoint
     (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 (\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) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> OriginEndpoint -> f OriginEndpoint)
-> ((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)))
-> OriginEndpoint
-> f OriginEndpoint
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

-- | 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 :: (Maybe Origination -> f (Maybe Origination))
-> OriginEndpoint -> f OriginEndpoint
originEndpoint_origination = (OriginEndpoint -> Maybe Origination)
-> (OriginEndpoint -> Maybe Origination -> OriginEndpoint)
-> Lens
     OriginEndpoint
     OriginEndpoint
     (Maybe Origination)
     (Maybe 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)

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

instance Prelude.Hashable OriginEndpoint

instance Prelude.NFData OriginEndpoint