{-# 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.MediaLive.Types.ChannelEgressEndpoint 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 ChannelEgressEndpoint = ChannelEgressEndpoint'
{
ChannelEgressEndpoint -> Maybe Text
sourceIp :: Prelude.Maybe Prelude.Text
}
deriving (ChannelEgressEndpoint -> ChannelEgressEndpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChannelEgressEndpoint -> ChannelEgressEndpoint -> Bool
$c/= :: ChannelEgressEndpoint -> ChannelEgressEndpoint -> Bool
== :: ChannelEgressEndpoint -> ChannelEgressEndpoint -> Bool
$c== :: ChannelEgressEndpoint -> ChannelEgressEndpoint -> Bool
Prelude.Eq, ReadPrec [ChannelEgressEndpoint]
ReadPrec ChannelEgressEndpoint
Int -> ReadS ChannelEgressEndpoint
ReadS [ChannelEgressEndpoint]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChannelEgressEndpoint]
$creadListPrec :: ReadPrec [ChannelEgressEndpoint]
readPrec :: ReadPrec ChannelEgressEndpoint
$creadPrec :: ReadPrec ChannelEgressEndpoint
readList :: ReadS [ChannelEgressEndpoint]
$creadList :: ReadS [ChannelEgressEndpoint]
readsPrec :: Int -> ReadS ChannelEgressEndpoint
$creadsPrec :: Int -> ReadS ChannelEgressEndpoint
Prelude.Read, Int -> ChannelEgressEndpoint -> ShowS
[ChannelEgressEndpoint] -> ShowS
ChannelEgressEndpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChannelEgressEndpoint] -> ShowS
$cshowList :: [ChannelEgressEndpoint] -> ShowS
show :: ChannelEgressEndpoint -> String
$cshow :: ChannelEgressEndpoint -> String
showsPrec :: Int -> ChannelEgressEndpoint -> ShowS
$cshowsPrec :: Int -> ChannelEgressEndpoint -> ShowS
Prelude.Show, forall x. Rep ChannelEgressEndpoint x -> ChannelEgressEndpoint
forall x. ChannelEgressEndpoint -> Rep ChannelEgressEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChannelEgressEndpoint x -> ChannelEgressEndpoint
$cfrom :: forall x. ChannelEgressEndpoint -> Rep ChannelEgressEndpoint x
Prelude.Generic)
newChannelEgressEndpoint ::
ChannelEgressEndpoint
newChannelEgressEndpoint :: ChannelEgressEndpoint
newChannelEgressEndpoint =
ChannelEgressEndpoint' {$sel:sourceIp:ChannelEgressEndpoint' :: Maybe Text
sourceIp = forall a. Maybe a
Prelude.Nothing}
channelEgressEndpoint_sourceIp :: Lens.Lens' ChannelEgressEndpoint (Prelude.Maybe Prelude.Text)
channelEgressEndpoint_sourceIp :: Lens' ChannelEgressEndpoint (Maybe Text)
channelEgressEndpoint_sourceIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelEgressEndpoint' {Maybe Text
sourceIp :: Maybe Text
$sel:sourceIp:ChannelEgressEndpoint' :: ChannelEgressEndpoint -> Maybe Text
sourceIp} -> Maybe Text
sourceIp) (\s :: ChannelEgressEndpoint
s@ChannelEgressEndpoint' {} Maybe Text
a -> ChannelEgressEndpoint
s {$sel:sourceIp:ChannelEgressEndpoint' :: Maybe Text
sourceIp = Maybe Text
a} :: ChannelEgressEndpoint)
instance Data.FromJSON ChannelEgressEndpoint where
parseJSON :: Value -> Parser ChannelEgressEndpoint
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ChannelEgressEndpoint"
( \Object
x ->
Maybe Text -> ChannelEgressEndpoint
ChannelEgressEndpoint'
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
"sourceIp")
)
instance Prelude.Hashable ChannelEgressEndpoint where
hashWithSalt :: Int -> ChannelEgressEndpoint -> Int
hashWithSalt Int
_salt ChannelEgressEndpoint' {Maybe Text
sourceIp :: Maybe Text
$sel:sourceIp:ChannelEgressEndpoint' :: ChannelEgressEndpoint -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceIp
instance Prelude.NFData ChannelEgressEndpoint where
rnf :: ChannelEgressEndpoint -> ()
rnf ChannelEgressEndpoint' {Maybe Text
sourceIp :: Maybe Text
$sel:sourceIp:ChannelEgressEndpoint' :: ChannelEgressEndpoint -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceIp