{-# 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.MediaConnect.Types.VpcInterface where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConnect.Types.NetworkInterfaceType
import qualified Amazonka.Prelude as Prelude
data VpcInterface = VpcInterface'
{
VpcInterface -> NetworkInterfaceType
networkInterfaceType :: NetworkInterfaceType,
VpcInterface -> [Text]
networkInterfaceIds :: [Prelude.Text],
VpcInterface -> Text
subnetId :: Prelude.Text,
VpcInterface -> [Text]
securityGroupIds :: [Prelude.Text],
VpcInterface -> Text
roleArn :: Prelude.Text,
VpcInterface -> Text
name :: Prelude.Text
}
deriving (VpcInterface -> VpcInterface -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcInterface -> VpcInterface -> Bool
$c/= :: VpcInterface -> VpcInterface -> Bool
== :: VpcInterface -> VpcInterface -> Bool
$c== :: VpcInterface -> VpcInterface -> Bool
Prelude.Eq, ReadPrec [VpcInterface]
ReadPrec VpcInterface
Int -> ReadS VpcInterface
ReadS [VpcInterface]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcInterface]
$creadListPrec :: ReadPrec [VpcInterface]
readPrec :: ReadPrec VpcInterface
$creadPrec :: ReadPrec VpcInterface
readList :: ReadS [VpcInterface]
$creadList :: ReadS [VpcInterface]
readsPrec :: Int -> ReadS VpcInterface
$creadsPrec :: Int -> ReadS VpcInterface
Prelude.Read, Int -> VpcInterface -> ShowS
[VpcInterface] -> ShowS
VpcInterface -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcInterface] -> ShowS
$cshowList :: [VpcInterface] -> ShowS
show :: VpcInterface -> String
$cshow :: VpcInterface -> String
showsPrec :: Int -> VpcInterface -> ShowS
$cshowsPrec :: Int -> VpcInterface -> ShowS
Prelude.Show, forall x. Rep VpcInterface x -> VpcInterface
forall x. VpcInterface -> Rep VpcInterface x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpcInterface x -> VpcInterface
$cfrom :: forall x. VpcInterface -> Rep VpcInterface x
Prelude.Generic)
newVpcInterface ::
NetworkInterfaceType ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
VpcInterface
newVpcInterface :: NetworkInterfaceType -> Text -> Text -> Text -> VpcInterface
newVpcInterface
NetworkInterfaceType
pNetworkInterfaceType_
Text
pSubnetId_
Text
pRoleArn_
Text
pName_ =
VpcInterface'
{ $sel:networkInterfaceType:VpcInterface' :: NetworkInterfaceType
networkInterfaceType =
NetworkInterfaceType
pNetworkInterfaceType_,
$sel:networkInterfaceIds:VpcInterface' :: [Text]
networkInterfaceIds = forall a. Monoid a => a
Prelude.mempty,
$sel:subnetId:VpcInterface' :: Text
subnetId = Text
pSubnetId_,
$sel:securityGroupIds:VpcInterface' :: [Text]
securityGroupIds = forall a. Monoid a => a
Prelude.mempty,
$sel:roleArn:VpcInterface' :: Text
roleArn = Text
pRoleArn_,
$sel:name:VpcInterface' :: Text
name = Text
pName_
}
vpcInterface_networkInterfaceType :: Lens.Lens' VpcInterface NetworkInterfaceType
vpcInterface_networkInterfaceType :: Lens' VpcInterface NetworkInterfaceType
vpcInterface_networkInterfaceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcInterface' {NetworkInterfaceType
networkInterfaceType :: NetworkInterfaceType
$sel:networkInterfaceType:VpcInterface' :: VpcInterface -> NetworkInterfaceType
networkInterfaceType} -> NetworkInterfaceType
networkInterfaceType) (\s :: VpcInterface
s@VpcInterface' {} NetworkInterfaceType
a -> VpcInterface
s {$sel:networkInterfaceType:VpcInterface' :: NetworkInterfaceType
networkInterfaceType = NetworkInterfaceType
a} :: VpcInterface)
vpcInterface_networkInterfaceIds :: Lens.Lens' VpcInterface [Prelude.Text]
vpcInterface_networkInterfaceIds :: Lens' VpcInterface [Text]
vpcInterface_networkInterfaceIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcInterface' {[Text]
networkInterfaceIds :: [Text]
$sel:networkInterfaceIds:VpcInterface' :: VpcInterface -> [Text]
networkInterfaceIds} -> [Text]
networkInterfaceIds) (\s :: VpcInterface
s@VpcInterface' {} [Text]
a -> VpcInterface
s {$sel:networkInterfaceIds:VpcInterface' :: [Text]
networkInterfaceIds = [Text]
a} :: VpcInterface) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
vpcInterface_subnetId :: Lens.Lens' VpcInterface Prelude.Text
vpcInterface_subnetId :: Lens' VpcInterface Text
vpcInterface_subnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcInterface' {Text
subnetId :: Text
$sel:subnetId:VpcInterface' :: VpcInterface -> Text
subnetId} -> Text
subnetId) (\s :: VpcInterface
s@VpcInterface' {} Text
a -> VpcInterface
s {$sel:subnetId:VpcInterface' :: Text
subnetId = Text
a} :: VpcInterface)
vpcInterface_securityGroupIds :: Lens.Lens' VpcInterface [Prelude.Text]
vpcInterface_securityGroupIds :: Lens' VpcInterface [Text]
vpcInterface_securityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcInterface' {[Text]
securityGroupIds :: [Text]
$sel:securityGroupIds:VpcInterface' :: VpcInterface -> [Text]
securityGroupIds} -> [Text]
securityGroupIds) (\s :: VpcInterface
s@VpcInterface' {} [Text]
a -> VpcInterface
s {$sel:securityGroupIds:VpcInterface' :: [Text]
securityGroupIds = [Text]
a} :: VpcInterface) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
vpcInterface_roleArn :: Lens.Lens' VpcInterface Prelude.Text
vpcInterface_roleArn :: Lens' VpcInterface Text
vpcInterface_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcInterface' {Text
roleArn :: Text
$sel:roleArn:VpcInterface' :: VpcInterface -> Text
roleArn} -> Text
roleArn) (\s :: VpcInterface
s@VpcInterface' {} Text
a -> VpcInterface
s {$sel:roleArn:VpcInterface' :: Text
roleArn = Text
a} :: VpcInterface)
vpcInterface_name :: Lens.Lens' VpcInterface Prelude.Text
vpcInterface_name :: Lens' VpcInterface Text
vpcInterface_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcInterface' {Text
name :: Text
$sel:name:VpcInterface' :: VpcInterface -> Text
name} -> Text
name) (\s :: VpcInterface
s@VpcInterface' {} Text
a -> VpcInterface
s {$sel:name:VpcInterface' :: Text
name = Text
a} :: VpcInterface)
instance Data.FromJSON VpcInterface where
parseJSON :: Value -> Parser VpcInterface
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VpcInterface"
( \Object
x ->
NetworkInterfaceType
-> [Text] -> Text -> [Text] -> Text -> Text -> VpcInterface
VpcInterface'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"networkInterfaceType")
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
"networkInterfaceIds"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"subnetId")
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
"securityGroupIds"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"roleArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
)
instance Prelude.Hashable VpcInterface where
hashWithSalt :: Int -> VpcInterface -> Int
hashWithSalt Int
_salt VpcInterface' {[Text]
Text
NetworkInterfaceType
name :: Text
roleArn :: Text
securityGroupIds :: [Text]
subnetId :: Text
networkInterfaceIds :: [Text]
networkInterfaceType :: NetworkInterfaceType
$sel:name:VpcInterface' :: VpcInterface -> Text
$sel:roleArn:VpcInterface' :: VpcInterface -> Text
$sel:securityGroupIds:VpcInterface' :: VpcInterface -> [Text]
$sel:subnetId:VpcInterface' :: VpcInterface -> Text
$sel:networkInterfaceIds:VpcInterface' :: VpcInterface -> [Text]
$sel:networkInterfaceType:VpcInterface' :: VpcInterface -> NetworkInterfaceType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NetworkInterfaceType
networkInterfaceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
networkInterfaceIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
subnetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
securityGroupIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData VpcInterface where
rnf :: VpcInterface -> ()
rnf VpcInterface' {[Text]
Text
NetworkInterfaceType
name :: Text
roleArn :: Text
securityGroupIds :: [Text]
subnetId :: Text
networkInterfaceIds :: [Text]
networkInterfaceType :: NetworkInterfaceType
$sel:name:VpcInterface' :: VpcInterface -> Text
$sel:roleArn:VpcInterface' :: VpcInterface -> Text
$sel:securityGroupIds:VpcInterface' :: VpcInterface -> [Text]
$sel:subnetId:VpcInterface' :: VpcInterface -> Text
$sel:networkInterfaceIds:VpcInterface' :: VpcInterface -> [Text]
$sel:networkInterfaceType:VpcInterface' :: VpcInterface -> NetworkInterfaceType
..} =
forall a. NFData a => a -> ()
Prelude.rnf NetworkInterfaceType
networkInterfaceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
networkInterfaceIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
subnetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
securityGroupIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name