{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MediaPackageVOD.Types.EgressEndpoint where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EgressEndpoint = EgressEndpoint'
{
EgressEndpoint -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
EgressEndpoint -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
EgressEndpoint -> Maybe Text
packagingConfigurationId :: Prelude.Maybe Prelude.Text
}
deriving (EgressEndpoint -> EgressEndpoint -> Bool
(EgressEndpoint -> EgressEndpoint -> Bool)
-> (EgressEndpoint -> EgressEndpoint -> Bool) -> Eq EgressEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EgressEndpoint -> EgressEndpoint -> Bool
$c/= :: EgressEndpoint -> EgressEndpoint -> Bool
== :: EgressEndpoint -> EgressEndpoint -> Bool
$c== :: EgressEndpoint -> EgressEndpoint -> Bool
Prelude.Eq, ReadPrec [EgressEndpoint]
ReadPrec EgressEndpoint
Int -> ReadS EgressEndpoint
ReadS [EgressEndpoint]
(Int -> ReadS EgressEndpoint)
-> ReadS [EgressEndpoint]
-> ReadPrec EgressEndpoint
-> ReadPrec [EgressEndpoint]
-> Read EgressEndpoint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EgressEndpoint]
$creadListPrec :: ReadPrec [EgressEndpoint]
readPrec :: ReadPrec EgressEndpoint
$creadPrec :: ReadPrec EgressEndpoint
readList :: ReadS [EgressEndpoint]
$creadList :: ReadS [EgressEndpoint]
readsPrec :: Int -> ReadS EgressEndpoint
$creadsPrec :: Int -> ReadS EgressEndpoint
Prelude.Read, Int -> EgressEndpoint -> ShowS
[EgressEndpoint] -> ShowS
EgressEndpoint -> String
(Int -> EgressEndpoint -> ShowS)
-> (EgressEndpoint -> String)
-> ([EgressEndpoint] -> ShowS)
-> Show EgressEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EgressEndpoint] -> ShowS
$cshowList :: [EgressEndpoint] -> ShowS
show :: EgressEndpoint -> String
$cshow :: EgressEndpoint -> String
showsPrec :: Int -> EgressEndpoint -> ShowS
$cshowsPrec :: Int -> EgressEndpoint -> ShowS
Prelude.Show, (forall x. EgressEndpoint -> Rep EgressEndpoint x)
-> (forall x. Rep EgressEndpoint x -> EgressEndpoint)
-> Generic EgressEndpoint
forall x. Rep EgressEndpoint x -> EgressEndpoint
forall x. EgressEndpoint -> Rep EgressEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EgressEndpoint x -> EgressEndpoint
$cfrom :: forall x. EgressEndpoint -> Rep EgressEndpoint x
Prelude.Generic)
newEgressEndpoint ::
EgressEndpoint
newEgressEndpoint :: EgressEndpoint
newEgressEndpoint =
EgressEndpoint' :: Maybe Text -> Maybe Text -> Maybe Text -> EgressEndpoint
EgressEndpoint'
{ $sel:status:EgressEndpoint' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:url:EgressEndpoint' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:packagingConfigurationId:EgressEndpoint' :: Maybe Text
packagingConfigurationId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
egressEndpoint_status :: Lens.Lens' EgressEndpoint (Prelude.Maybe Prelude.Text)
egressEndpoint_status :: (Maybe Text -> f (Maybe Text))
-> EgressEndpoint -> f EgressEndpoint
egressEndpoint_status = (EgressEndpoint -> Maybe Text)
-> (EgressEndpoint -> Maybe Text -> EgressEndpoint)
-> Lens EgressEndpoint EgressEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EgressEndpoint' {Maybe Text
status :: Maybe Text
$sel:status:EgressEndpoint' :: EgressEndpoint -> Maybe Text
status} -> Maybe Text
status) (\s :: EgressEndpoint
s@EgressEndpoint' {} Maybe Text
a -> EgressEndpoint
s {$sel:status:EgressEndpoint' :: Maybe Text
status = Maybe Text
a} :: EgressEndpoint)
egressEndpoint_url :: Lens.Lens' EgressEndpoint (Prelude.Maybe Prelude.Text)
egressEndpoint_url :: (Maybe Text -> f (Maybe Text))
-> EgressEndpoint -> f EgressEndpoint
egressEndpoint_url = (EgressEndpoint -> Maybe Text)
-> (EgressEndpoint -> Maybe Text -> EgressEndpoint)
-> Lens EgressEndpoint EgressEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EgressEndpoint' {Maybe Text
url :: Maybe Text
$sel:url:EgressEndpoint' :: EgressEndpoint -> Maybe Text
url} -> Maybe Text
url) (\s :: EgressEndpoint
s@EgressEndpoint' {} Maybe Text
a -> EgressEndpoint
s {$sel:url:EgressEndpoint' :: Maybe Text
url = Maybe Text
a} :: EgressEndpoint)
egressEndpoint_packagingConfigurationId :: Lens.Lens' EgressEndpoint (Prelude.Maybe Prelude.Text)
egressEndpoint_packagingConfigurationId :: (Maybe Text -> f (Maybe Text))
-> EgressEndpoint -> f EgressEndpoint
egressEndpoint_packagingConfigurationId = (EgressEndpoint -> Maybe Text)
-> (EgressEndpoint -> Maybe Text -> EgressEndpoint)
-> Lens EgressEndpoint EgressEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EgressEndpoint' {Maybe Text
packagingConfigurationId :: Maybe Text
$sel:packagingConfigurationId:EgressEndpoint' :: EgressEndpoint -> Maybe Text
packagingConfigurationId} -> Maybe Text
packagingConfigurationId) (\s :: EgressEndpoint
s@EgressEndpoint' {} Maybe Text
a -> EgressEndpoint
s {$sel:packagingConfigurationId:EgressEndpoint' :: Maybe Text
packagingConfigurationId = Maybe Text
a} :: EgressEndpoint)
instance Core.FromJSON EgressEndpoint where
parseJSON :: Value -> Parser EgressEndpoint
parseJSON =
String
-> (Object -> Parser EgressEndpoint)
-> Value
-> Parser EgressEndpoint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EgressEndpoint"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> EgressEndpoint
EgressEndpoint'
(Maybe Text -> Maybe Text -> Maybe Text -> EgressEndpoint)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> EgressEndpoint)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser (Maybe Text -> Maybe Text -> EgressEndpoint)
-> Parser (Maybe Text) -> Parser (Maybe Text -> EgressEndpoint)
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 Text -> EgressEndpoint)
-> Parser (Maybe Text) -> Parser EgressEndpoint
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
"packagingConfigurationId")
)
instance Prelude.Hashable EgressEndpoint
instance Prelude.NFData EgressEndpoint