{-# 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.MediaPackage.Types.IngestEndpoint where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data IngestEndpoint = IngestEndpoint'
{
IngestEndpoint -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
IngestEndpoint -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
IngestEndpoint -> Maybe Text
password :: Prelude.Maybe Prelude.Text,
IngestEndpoint -> Maybe Text
id :: Prelude.Maybe Prelude.Text
}
deriving (IngestEndpoint -> IngestEndpoint -> Bool
(IngestEndpoint -> IngestEndpoint -> Bool)
-> (IngestEndpoint -> IngestEndpoint -> Bool) -> Eq IngestEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IngestEndpoint -> IngestEndpoint -> Bool
$c/= :: IngestEndpoint -> IngestEndpoint -> Bool
== :: IngestEndpoint -> IngestEndpoint -> Bool
$c== :: IngestEndpoint -> IngestEndpoint -> Bool
Prelude.Eq, ReadPrec [IngestEndpoint]
ReadPrec IngestEndpoint
Int -> ReadS IngestEndpoint
ReadS [IngestEndpoint]
(Int -> ReadS IngestEndpoint)
-> ReadS [IngestEndpoint]
-> ReadPrec IngestEndpoint
-> ReadPrec [IngestEndpoint]
-> Read IngestEndpoint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IngestEndpoint]
$creadListPrec :: ReadPrec [IngestEndpoint]
readPrec :: ReadPrec IngestEndpoint
$creadPrec :: ReadPrec IngestEndpoint
readList :: ReadS [IngestEndpoint]
$creadList :: ReadS [IngestEndpoint]
readsPrec :: Int -> ReadS IngestEndpoint
$creadsPrec :: Int -> ReadS IngestEndpoint
Prelude.Read, Int -> IngestEndpoint -> ShowS
[IngestEndpoint] -> ShowS
IngestEndpoint -> String
(Int -> IngestEndpoint -> ShowS)
-> (IngestEndpoint -> String)
-> ([IngestEndpoint] -> ShowS)
-> Show IngestEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IngestEndpoint] -> ShowS
$cshowList :: [IngestEndpoint] -> ShowS
show :: IngestEndpoint -> String
$cshow :: IngestEndpoint -> String
showsPrec :: Int -> IngestEndpoint -> ShowS
$cshowsPrec :: Int -> IngestEndpoint -> ShowS
Prelude.Show, (forall x. IngestEndpoint -> Rep IngestEndpoint x)
-> (forall x. Rep IngestEndpoint x -> IngestEndpoint)
-> Generic IngestEndpoint
forall x. Rep IngestEndpoint x -> IngestEndpoint
forall x. IngestEndpoint -> Rep IngestEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IngestEndpoint x -> IngestEndpoint
$cfrom :: forall x. IngestEndpoint -> Rep IngestEndpoint x
Prelude.Generic)
newIngestEndpoint ::
IngestEndpoint
newIngestEndpoint :: IngestEndpoint
newIngestEndpoint =
IngestEndpoint' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> IngestEndpoint
IngestEndpoint'
{ $sel:url:IngestEndpoint' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:username:IngestEndpoint' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:password:IngestEndpoint' :: Maybe Text
password = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:IngestEndpoint' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
ingestEndpoint_url :: Lens.Lens' IngestEndpoint (Prelude.Maybe Prelude.Text)
ingestEndpoint_url :: (Maybe Text -> f (Maybe Text))
-> IngestEndpoint -> f IngestEndpoint
ingestEndpoint_url = (IngestEndpoint -> Maybe Text)
-> (IngestEndpoint -> Maybe Text -> IngestEndpoint)
-> Lens IngestEndpoint IngestEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IngestEndpoint' {Maybe Text
url :: Maybe Text
$sel:url:IngestEndpoint' :: IngestEndpoint -> Maybe Text
url} -> Maybe Text
url) (\s :: IngestEndpoint
s@IngestEndpoint' {} Maybe Text
a -> IngestEndpoint
s {$sel:url:IngestEndpoint' :: Maybe Text
url = Maybe Text
a} :: IngestEndpoint)
ingestEndpoint_username :: Lens.Lens' IngestEndpoint (Prelude.Maybe Prelude.Text)
ingestEndpoint_username :: (Maybe Text -> f (Maybe Text))
-> IngestEndpoint -> f IngestEndpoint
ingestEndpoint_username = (IngestEndpoint -> Maybe Text)
-> (IngestEndpoint -> Maybe Text -> IngestEndpoint)
-> Lens IngestEndpoint IngestEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IngestEndpoint' {Maybe Text
username :: Maybe Text
$sel:username:IngestEndpoint' :: IngestEndpoint -> Maybe Text
username} -> Maybe Text
username) (\s :: IngestEndpoint
s@IngestEndpoint' {} Maybe Text
a -> IngestEndpoint
s {$sel:username:IngestEndpoint' :: Maybe Text
username = Maybe Text
a} :: IngestEndpoint)
ingestEndpoint_password :: Lens.Lens' IngestEndpoint (Prelude.Maybe Prelude.Text)
ingestEndpoint_password :: (Maybe Text -> f (Maybe Text))
-> IngestEndpoint -> f IngestEndpoint
ingestEndpoint_password = (IngestEndpoint -> Maybe Text)
-> (IngestEndpoint -> Maybe Text -> IngestEndpoint)
-> Lens IngestEndpoint IngestEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IngestEndpoint' {Maybe Text
password :: Maybe Text
$sel:password:IngestEndpoint' :: IngestEndpoint -> Maybe Text
password} -> Maybe Text
password) (\s :: IngestEndpoint
s@IngestEndpoint' {} Maybe Text
a -> IngestEndpoint
s {$sel:password:IngestEndpoint' :: Maybe Text
password = Maybe Text
a} :: IngestEndpoint)
ingestEndpoint_id :: Lens.Lens' IngestEndpoint (Prelude.Maybe Prelude.Text)
ingestEndpoint_id :: (Maybe Text -> f (Maybe Text))
-> IngestEndpoint -> f IngestEndpoint
ingestEndpoint_id = (IngestEndpoint -> Maybe Text)
-> (IngestEndpoint -> Maybe Text -> IngestEndpoint)
-> Lens IngestEndpoint IngestEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IngestEndpoint' {Maybe Text
id :: Maybe Text
$sel:id:IngestEndpoint' :: IngestEndpoint -> Maybe Text
id} -> Maybe Text
id) (\s :: IngestEndpoint
s@IngestEndpoint' {} Maybe Text
a -> IngestEndpoint
s {$sel:id:IngestEndpoint' :: Maybe Text
id = Maybe Text
a} :: IngestEndpoint)
instance Core.FromJSON IngestEndpoint where
parseJSON :: Value -> Parser IngestEndpoint
parseJSON =
String
-> (Object -> Parser IngestEndpoint)
-> Value
-> Parser IngestEndpoint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"IngestEndpoint"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> IngestEndpoint
IngestEndpoint'
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> IngestEndpoint)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> IngestEndpoint)
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
"url")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> IngestEndpoint)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> IngestEndpoint)
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
"username")
Parser (Maybe Text -> Maybe Text -> IngestEndpoint)
-> Parser (Maybe Text) -> Parser (Maybe Text -> IngestEndpoint)
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
"password")
Parser (Maybe Text -> IngestEndpoint)
-> Parser (Maybe Text) -> Parser IngestEndpoint
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")
)
instance Prelude.Hashable IngestEndpoint
instance Prelude.NFData IngestEndpoint