{-# 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.InputDeviceNetworkSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.InputDeviceIpScheme
import qualified Amazonka.Prelude as Prelude
data InputDeviceNetworkSettings = InputDeviceNetworkSettings'
{
InputDeviceNetworkSettings -> Maybe Text
ipAddress :: Prelude.Maybe Prelude.Text,
InputDeviceNetworkSettings -> Maybe Text
gateway :: Prelude.Maybe Prelude.Text,
InputDeviceNetworkSettings -> Maybe [Text]
dnsAddresses :: Prelude.Maybe [Prelude.Text],
InputDeviceNetworkSettings -> Maybe InputDeviceIpScheme
ipScheme :: Prelude.Maybe InputDeviceIpScheme,
InputDeviceNetworkSettings -> Maybe Text
subnetMask :: Prelude.Maybe Prelude.Text
}
deriving (InputDeviceNetworkSettings -> InputDeviceNetworkSettings -> Bool
(InputDeviceNetworkSettings -> InputDeviceNetworkSettings -> Bool)
-> (InputDeviceNetworkSettings
-> InputDeviceNetworkSettings -> Bool)
-> Eq InputDeviceNetworkSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputDeviceNetworkSettings -> InputDeviceNetworkSettings -> Bool
$c/= :: InputDeviceNetworkSettings -> InputDeviceNetworkSettings -> Bool
== :: InputDeviceNetworkSettings -> InputDeviceNetworkSettings -> Bool
$c== :: InputDeviceNetworkSettings -> InputDeviceNetworkSettings -> Bool
Prelude.Eq, ReadPrec [InputDeviceNetworkSettings]
ReadPrec InputDeviceNetworkSettings
Int -> ReadS InputDeviceNetworkSettings
ReadS [InputDeviceNetworkSettings]
(Int -> ReadS InputDeviceNetworkSettings)
-> ReadS [InputDeviceNetworkSettings]
-> ReadPrec InputDeviceNetworkSettings
-> ReadPrec [InputDeviceNetworkSettings]
-> Read InputDeviceNetworkSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputDeviceNetworkSettings]
$creadListPrec :: ReadPrec [InputDeviceNetworkSettings]
readPrec :: ReadPrec InputDeviceNetworkSettings
$creadPrec :: ReadPrec InputDeviceNetworkSettings
readList :: ReadS [InputDeviceNetworkSettings]
$creadList :: ReadS [InputDeviceNetworkSettings]
readsPrec :: Int -> ReadS InputDeviceNetworkSettings
$creadsPrec :: Int -> ReadS InputDeviceNetworkSettings
Prelude.Read, Int -> InputDeviceNetworkSettings -> ShowS
[InputDeviceNetworkSettings] -> ShowS
InputDeviceNetworkSettings -> String
(Int -> InputDeviceNetworkSettings -> ShowS)
-> (InputDeviceNetworkSettings -> String)
-> ([InputDeviceNetworkSettings] -> ShowS)
-> Show InputDeviceNetworkSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputDeviceNetworkSettings] -> ShowS
$cshowList :: [InputDeviceNetworkSettings] -> ShowS
show :: InputDeviceNetworkSettings -> String
$cshow :: InputDeviceNetworkSettings -> String
showsPrec :: Int -> InputDeviceNetworkSettings -> ShowS
$cshowsPrec :: Int -> InputDeviceNetworkSettings -> ShowS
Prelude.Show, (forall x.
InputDeviceNetworkSettings -> Rep InputDeviceNetworkSettings x)
-> (forall x.
Rep InputDeviceNetworkSettings x -> InputDeviceNetworkSettings)
-> Generic InputDeviceNetworkSettings
forall x.
Rep InputDeviceNetworkSettings x -> InputDeviceNetworkSettings
forall x.
InputDeviceNetworkSettings -> Rep InputDeviceNetworkSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InputDeviceNetworkSettings x -> InputDeviceNetworkSettings
$cfrom :: forall x.
InputDeviceNetworkSettings -> Rep InputDeviceNetworkSettings x
Prelude.Generic)
newInputDeviceNetworkSettings ::
InputDeviceNetworkSettings
newInputDeviceNetworkSettings :: InputDeviceNetworkSettings
newInputDeviceNetworkSettings =
InputDeviceNetworkSettings' :: Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe InputDeviceIpScheme
-> Maybe Text
-> InputDeviceNetworkSettings
InputDeviceNetworkSettings'
{ $sel:ipAddress:InputDeviceNetworkSettings' :: Maybe Text
ipAddress =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gateway:InputDeviceNetworkSettings' :: Maybe Text
gateway = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dnsAddresses:InputDeviceNetworkSettings' :: Maybe [Text]
dnsAddresses = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:ipScheme:InputDeviceNetworkSettings' :: Maybe InputDeviceIpScheme
ipScheme = Maybe InputDeviceIpScheme
forall a. Maybe a
Prelude.Nothing,
$sel:subnetMask:InputDeviceNetworkSettings' :: Maybe Text
subnetMask = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
inputDeviceNetworkSettings_ipAddress :: Lens.Lens' InputDeviceNetworkSettings (Prelude.Maybe Prelude.Text)
inputDeviceNetworkSettings_ipAddress :: (Maybe Text -> f (Maybe Text))
-> InputDeviceNetworkSettings -> f InputDeviceNetworkSettings
inputDeviceNetworkSettings_ipAddress = (InputDeviceNetworkSettings -> Maybe Text)
-> (InputDeviceNetworkSettings
-> Maybe Text -> InputDeviceNetworkSettings)
-> Lens
InputDeviceNetworkSettings
InputDeviceNetworkSettings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceNetworkSettings' {Maybe Text
ipAddress :: Maybe Text
$sel:ipAddress:InputDeviceNetworkSettings' :: InputDeviceNetworkSettings -> Maybe Text
ipAddress} -> Maybe Text
ipAddress) (\s :: InputDeviceNetworkSettings
s@InputDeviceNetworkSettings' {} Maybe Text
a -> InputDeviceNetworkSettings
s {$sel:ipAddress:InputDeviceNetworkSettings' :: Maybe Text
ipAddress = Maybe Text
a} :: InputDeviceNetworkSettings)
inputDeviceNetworkSettings_gateway :: Lens.Lens' InputDeviceNetworkSettings (Prelude.Maybe Prelude.Text)
inputDeviceNetworkSettings_gateway :: (Maybe Text -> f (Maybe Text))
-> InputDeviceNetworkSettings -> f InputDeviceNetworkSettings
inputDeviceNetworkSettings_gateway = (InputDeviceNetworkSettings -> Maybe Text)
-> (InputDeviceNetworkSettings
-> Maybe Text -> InputDeviceNetworkSettings)
-> Lens
InputDeviceNetworkSettings
InputDeviceNetworkSettings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceNetworkSettings' {Maybe Text
gateway :: Maybe Text
$sel:gateway:InputDeviceNetworkSettings' :: InputDeviceNetworkSettings -> Maybe Text
gateway} -> Maybe Text
gateway) (\s :: InputDeviceNetworkSettings
s@InputDeviceNetworkSettings' {} Maybe Text
a -> InputDeviceNetworkSettings
s {$sel:gateway:InputDeviceNetworkSettings' :: Maybe Text
gateway = Maybe Text
a} :: InputDeviceNetworkSettings)
inputDeviceNetworkSettings_dnsAddresses :: Lens.Lens' InputDeviceNetworkSettings (Prelude.Maybe [Prelude.Text])
inputDeviceNetworkSettings_dnsAddresses :: (Maybe [Text] -> f (Maybe [Text]))
-> InputDeviceNetworkSettings -> f InputDeviceNetworkSettings
inputDeviceNetworkSettings_dnsAddresses = (InputDeviceNetworkSettings -> Maybe [Text])
-> (InputDeviceNetworkSettings
-> Maybe [Text] -> InputDeviceNetworkSettings)
-> Lens
InputDeviceNetworkSettings
InputDeviceNetworkSettings
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceNetworkSettings' {Maybe [Text]
dnsAddresses :: Maybe [Text]
$sel:dnsAddresses:InputDeviceNetworkSettings' :: InputDeviceNetworkSettings -> Maybe [Text]
dnsAddresses} -> Maybe [Text]
dnsAddresses) (\s :: InputDeviceNetworkSettings
s@InputDeviceNetworkSettings' {} Maybe [Text]
a -> InputDeviceNetworkSettings
s {$sel:dnsAddresses:InputDeviceNetworkSettings' :: Maybe [Text]
dnsAddresses = Maybe [Text]
a} :: InputDeviceNetworkSettings) ((Maybe [Text] -> f (Maybe [Text]))
-> InputDeviceNetworkSettings -> f InputDeviceNetworkSettings)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> InputDeviceNetworkSettings
-> f InputDeviceNetworkSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
inputDeviceNetworkSettings_ipScheme :: Lens.Lens' InputDeviceNetworkSettings (Prelude.Maybe InputDeviceIpScheme)
inputDeviceNetworkSettings_ipScheme :: (Maybe InputDeviceIpScheme -> f (Maybe InputDeviceIpScheme))
-> InputDeviceNetworkSettings -> f InputDeviceNetworkSettings
inputDeviceNetworkSettings_ipScheme = (InputDeviceNetworkSettings -> Maybe InputDeviceIpScheme)
-> (InputDeviceNetworkSettings
-> Maybe InputDeviceIpScheme -> InputDeviceNetworkSettings)
-> Lens
InputDeviceNetworkSettings
InputDeviceNetworkSettings
(Maybe InputDeviceIpScheme)
(Maybe InputDeviceIpScheme)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceNetworkSettings' {Maybe InputDeviceIpScheme
ipScheme :: Maybe InputDeviceIpScheme
$sel:ipScheme:InputDeviceNetworkSettings' :: InputDeviceNetworkSettings -> Maybe InputDeviceIpScheme
ipScheme} -> Maybe InputDeviceIpScheme
ipScheme) (\s :: InputDeviceNetworkSettings
s@InputDeviceNetworkSettings' {} Maybe InputDeviceIpScheme
a -> InputDeviceNetworkSettings
s {$sel:ipScheme:InputDeviceNetworkSettings' :: Maybe InputDeviceIpScheme
ipScheme = Maybe InputDeviceIpScheme
a} :: InputDeviceNetworkSettings)
inputDeviceNetworkSettings_subnetMask :: Lens.Lens' InputDeviceNetworkSettings (Prelude.Maybe Prelude.Text)
inputDeviceNetworkSettings_subnetMask :: (Maybe Text -> f (Maybe Text))
-> InputDeviceNetworkSettings -> f InputDeviceNetworkSettings
inputDeviceNetworkSettings_subnetMask = (InputDeviceNetworkSettings -> Maybe Text)
-> (InputDeviceNetworkSettings
-> Maybe Text -> InputDeviceNetworkSettings)
-> Lens
InputDeviceNetworkSettings
InputDeviceNetworkSettings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDeviceNetworkSettings' {Maybe Text
subnetMask :: Maybe Text
$sel:subnetMask:InputDeviceNetworkSettings' :: InputDeviceNetworkSettings -> Maybe Text
subnetMask} -> Maybe Text
subnetMask) (\s :: InputDeviceNetworkSettings
s@InputDeviceNetworkSettings' {} Maybe Text
a -> InputDeviceNetworkSettings
s {$sel:subnetMask:InputDeviceNetworkSettings' :: Maybe Text
subnetMask = Maybe Text
a} :: InputDeviceNetworkSettings)
instance Core.FromJSON InputDeviceNetworkSettings where
parseJSON :: Value -> Parser InputDeviceNetworkSettings
parseJSON =
String
-> (Object -> Parser InputDeviceNetworkSettings)
-> Value
-> Parser InputDeviceNetworkSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InputDeviceNetworkSettings"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe InputDeviceIpScheme
-> Maybe Text
-> InputDeviceNetworkSettings
InputDeviceNetworkSettings'
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe InputDeviceIpScheme
-> Maybe Text
-> InputDeviceNetworkSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe InputDeviceIpScheme
-> Maybe Text
-> InputDeviceNetworkSettings)
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
"ipAddress")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe InputDeviceIpScheme
-> Maybe Text
-> InputDeviceNetworkSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe InputDeviceIpScheme
-> Maybe Text
-> InputDeviceNetworkSettings)
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
"gateway")
Parser
(Maybe [Text]
-> Maybe InputDeviceIpScheme
-> Maybe Text
-> InputDeviceNetworkSettings)
-> Parser (Maybe [Text])
-> Parser
(Maybe InputDeviceIpScheme
-> Maybe Text -> InputDeviceNetworkSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dnsAddresses" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe InputDeviceIpScheme
-> Maybe Text -> InputDeviceNetworkSettings)
-> Parser (Maybe InputDeviceIpScheme)
-> Parser (Maybe Text -> InputDeviceNetworkSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputDeviceIpScheme)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ipScheme")
Parser (Maybe Text -> InputDeviceNetworkSettings)
-> Parser (Maybe Text) -> Parser InputDeviceNetworkSettings
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
"subnetMask")
)
instance Prelude.Hashable InputDeviceNetworkSettings
instance Prelude.NFData InputDeviceNetworkSettings