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