{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data EgressEndpoint = EgressEndpoint'
{
EgressEndpoint -> Maybe Text
packagingConfigurationId :: Prelude.Maybe Prelude.Text,
EgressEndpoint -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
EgressEndpoint -> Maybe Text
url :: Prelude.Maybe Prelude.Text
}
deriving (EgressEndpoint -> EgressEndpoint -> Bool
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]
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
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. 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'
{ $sel:packagingConfigurationId:EgressEndpoint' :: Maybe Text
packagingConfigurationId =
forall a. Maybe a
Prelude.Nothing,
$sel:status:EgressEndpoint' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
$sel:url:EgressEndpoint' :: Maybe Text
url = forall a. Maybe a
Prelude.Nothing
}
egressEndpoint_packagingConfigurationId :: Lens.Lens' EgressEndpoint (Prelude.Maybe Prelude.Text)
egressEndpoint_packagingConfigurationId :: Lens' EgressEndpoint (Maybe Text)
egressEndpoint_packagingConfigurationId = 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)
egressEndpoint_status :: Lens.Lens' EgressEndpoint (Prelude.Maybe Prelude.Text)
egressEndpoint_status :: Lens' EgressEndpoint (Maybe Text)
egressEndpoint_status = 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 :: Lens' EgressEndpoint (Maybe Text)
egressEndpoint_url = 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)
instance Data.FromJSON EgressEndpoint where
parseJSON :: Value -> Parser EgressEndpoint
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EgressEndpoint"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> EgressEndpoint
EgressEndpoint'
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
"packagingConfigurationId")
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
"status")
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")
)
instance Prelude.Hashable EgressEndpoint where
hashWithSalt :: Int -> EgressEndpoint -> Int
hashWithSalt Int
_salt EgressEndpoint' {Maybe Text
url :: Maybe Text
status :: Maybe Text
packagingConfigurationId :: Maybe Text
$sel:url:EgressEndpoint' :: EgressEndpoint -> Maybe Text
$sel:status:EgressEndpoint' :: EgressEndpoint -> Maybe Text
$sel:packagingConfigurationId:EgressEndpoint' :: EgressEndpoint -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
packagingConfigurationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
url
instance Prelude.NFData EgressEndpoint where
rnf :: EgressEndpoint -> ()
rnf EgressEndpoint' {Maybe Text
url :: Maybe Text
status :: Maybe Text
packagingConfigurationId :: Maybe Text
$sel:url:EgressEndpoint' :: EgressEndpoint -> Maybe Text
$sel:status:EgressEndpoint' :: EgressEndpoint -> Maybe Text
$sel:packagingConfigurationId:EgressEndpoint' :: EgressEndpoint -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
packagingConfigurationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
url