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