{-# 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.Lens as Lens
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
(InputVpcRequest -> InputVpcRequest -> Bool)
-> (InputVpcRequest -> InputVpcRequest -> Bool)
-> Eq InputVpcRequest
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]
(Int -> ReadS InputVpcRequest)
-> ReadS [InputVpcRequest]
-> ReadPrec InputVpcRequest
-> ReadPrec [InputVpcRequest]
-> Read 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
(Int -> InputVpcRequest -> ShowS)
-> (InputVpcRequest -> String)
-> ([InputVpcRequest] -> ShowS)
-> Show InputVpcRequest
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. InputVpcRequest -> Rep InputVpcRequest x)
-> (forall x. Rep InputVpcRequest x -> InputVpcRequest)
-> Generic InputVpcRequest
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' :: Maybe [Text] -> [Text] -> InputVpcRequest
InputVpcRequest'
{ $sel:securityGroupIds:InputVpcRequest' :: Maybe [Text]
securityGroupIds =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:subnetIds:InputVpcRequest' :: [Text]
subnetIds = [Text]
forall a. Monoid a => a
Prelude.mempty
}
inputVpcRequest_securityGroupIds :: Lens.Lens' InputVpcRequest (Prelude.Maybe [Prelude.Text])
inputVpcRequest_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> InputVpcRequest -> f InputVpcRequest
inputVpcRequest_securityGroupIds = (InputVpcRequest -> Maybe [Text])
-> (InputVpcRequest -> Maybe [Text] -> InputVpcRequest)
-> Lens
InputVpcRequest InputVpcRequest (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
-> InputVpcRequest -> f InputVpcRequest)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> InputVpcRequest
-> f InputVpcRequest
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
inputVpcRequest_subnetIds :: Lens.Lens' InputVpcRequest [Prelude.Text]
inputVpcRequest_subnetIds :: ([Text] -> f [Text]) -> InputVpcRequest -> f InputVpcRequest
inputVpcRequest_subnetIds = (InputVpcRequest -> [Text])
-> (InputVpcRequest -> [Text] -> InputVpcRequest)
-> Lens InputVpcRequest InputVpcRequest [Text] [Text]
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) (([Text] -> f [Text]) -> InputVpcRequest -> f InputVpcRequest)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> InputVpcRequest
-> f InputVpcRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable InputVpcRequest
instance Prelude.NFData InputVpcRequest
instance Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"securityGroupIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroupIds,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"subnetIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
subnetIds)
]
)