{-# 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.InputVpcRequest 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 InputVpcRequest = InputVpcRequest'
{
InputVpcRequest -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
InputVpcRequest -> [Text]
subnetIds :: [Prelude.Text]
}
deriving (InputVpcRequest -> InputVpcRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputVpcRequest -> InputVpcRequest -> Bool
$c/= :: InputVpcRequest -> InputVpcRequest -> Bool
== :: InputVpcRequest -> InputVpcRequest -> Bool
$c== :: InputVpcRequest -> InputVpcRequest -> Bool
Prelude.Eq, ReadPrec [InputVpcRequest]
ReadPrec InputVpcRequest
Int -> ReadS InputVpcRequest
ReadS [InputVpcRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputVpcRequest]
$creadListPrec :: ReadPrec [InputVpcRequest]
readPrec :: ReadPrec InputVpcRequest
$creadPrec :: ReadPrec InputVpcRequest
readList :: ReadS [InputVpcRequest]
$creadList :: ReadS [InputVpcRequest]
readsPrec :: Int -> ReadS InputVpcRequest
$creadsPrec :: Int -> ReadS InputVpcRequest
Prelude.Read, Int -> InputVpcRequest -> ShowS
[InputVpcRequest] -> ShowS
InputVpcRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputVpcRequest] -> ShowS
$cshowList :: [InputVpcRequest] -> ShowS
show :: InputVpcRequest -> String
$cshow :: InputVpcRequest -> String
showsPrec :: Int -> InputVpcRequest -> ShowS
$cshowsPrec :: Int -> InputVpcRequest -> ShowS
Prelude.Show, forall x. Rep InputVpcRequest x -> InputVpcRequest
forall x. InputVpcRequest -> Rep InputVpcRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InputVpcRequest x -> InputVpcRequest
$cfrom :: forall x. InputVpcRequest -> Rep InputVpcRequest x
Prelude.Generic)
newInputVpcRequest ::
InputVpcRequest
newInputVpcRequest :: InputVpcRequest
newInputVpcRequest =
InputVpcRequest'
{ $sel:securityGroupIds:InputVpcRequest' :: Maybe [Text]
securityGroupIds =
forall a. Maybe a
Prelude.Nothing,
$sel:subnetIds:InputVpcRequest' :: [Text]
subnetIds = forall a. Monoid a => a
Prelude.mempty
}
inputVpcRequest_securityGroupIds :: Lens.Lens' InputVpcRequest (Prelude.Maybe [Prelude.Text])
inputVpcRequest_securityGroupIds :: Lens' InputVpcRequest (Maybe [Text])
inputVpcRequest_securityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputVpcRequest' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:InputVpcRequest' :: InputVpcRequest -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: InputVpcRequest
s@InputVpcRequest' {} Maybe [Text]
a -> InputVpcRequest
s {$sel:securityGroupIds:InputVpcRequest' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: InputVpcRequest) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
inputVpcRequest_subnetIds :: Lens.Lens' InputVpcRequest [Prelude.Text]
inputVpcRequest_subnetIds :: Lens' InputVpcRequest [Text]
inputVpcRequest_subnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputVpcRequest' {[Text]
subnetIds :: [Text]
$sel:subnetIds:InputVpcRequest' :: InputVpcRequest -> [Text]
subnetIds} -> [Text]
subnetIds) (\s :: InputVpcRequest
s@InputVpcRequest' {} [Text]
a -> InputVpcRequest
s {$sel:subnetIds:InputVpcRequest' :: [Text]
subnetIds = [Text]
a} :: InputVpcRequest) 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
instance Prelude.Hashable InputVpcRequest where
hashWithSalt :: Int -> InputVpcRequest -> Int
hashWithSalt Int
_salt InputVpcRequest' {[Text]
Maybe [Text]
subnetIds :: [Text]
securityGroupIds :: Maybe [Text]
$sel:subnetIds:InputVpcRequest' :: InputVpcRequest -> [Text]
$sel:securityGroupIds:InputVpcRequest' :: InputVpcRequest -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
securityGroupIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
subnetIds
instance Prelude.NFData InputVpcRequest where
rnf :: InputVpcRequest -> ()
rnf InputVpcRequest' {[Text]
Maybe [Text]
subnetIds :: [Text]
securityGroupIds :: Maybe [Text]
$sel:subnetIds:InputVpcRequest' :: InputVpcRequest -> [Text]
$sel:securityGroupIds:InputVpcRequest' :: InputVpcRequest -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
securityGroupIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
subnetIds
instance Data.ToJSON InputVpcRequest where
toJSON :: InputVpcRequest -> Value
toJSON InputVpcRequest' {[Text]
Maybe [Text]
subnetIds :: [Text]
securityGroupIds :: Maybe [Text]
$sel:subnetIds:InputVpcRequest' :: InputVpcRequest -> [Text]
$sel:securityGroupIds:InputVpcRequest' :: InputVpcRequest -> Maybe [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"securityGroupIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroupIds,
forall a. a -> Maybe a
Prelude.Just (Key
"subnetIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Text]
subnetIds)
]
)