{-# 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.MwAA.Types.UpdateNetworkConfigurationInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateNetworkConfigurationInput = UpdateNetworkConfigurationInput'
{
UpdateNetworkConfigurationInput -> NonEmpty Text
securityGroupIds :: Prelude.NonEmpty Prelude.Text
}
deriving (UpdateNetworkConfigurationInput
-> UpdateNetworkConfigurationInput -> Bool
(UpdateNetworkConfigurationInput
-> UpdateNetworkConfigurationInput -> Bool)
-> (UpdateNetworkConfigurationInput
-> UpdateNetworkConfigurationInput -> Bool)
-> Eq UpdateNetworkConfigurationInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNetworkConfigurationInput
-> UpdateNetworkConfigurationInput -> Bool
$c/= :: UpdateNetworkConfigurationInput
-> UpdateNetworkConfigurationInput -> Bool
== :: UpdateNetworkConfigurationInput
-> UpdateNetworkConfigurationInput -> Bool
$c== :: UpdateNetworkConfigurationInput
-> UpdateNetworkConfigurationInput -> Bool
Prelude.Eq, ReadPrec [UpdateNetworkConfigurationInput]
ReadPrec UpdateNetworkConfigurationInput
Int -> ReadS UpdateNetworkConfigurationInput
ReadS [UpdateNetworkConfigurationInput]
(Int -> ReadS UpdateNetworkConfigurationInput)
-> ReadS [UpdateNetworkConfigurationInput]
-> ReadPrec UpdateNetworkConfigurationInput
-> ReadPrec [UpdateNetworkConfigurationInput]
-> Read UpdateNetworkConfigurationInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNetworkConfigurationInput]
$creadListPrec :: ReadPrec [UpdateNetworkConfigurationInput]
readPrec :: ReadPrec UpdateNetworkConfigurationInput
$creadPrec :: ReadPrec UpdateNetworkConfigurationInput
readList :: ReadS [UpdateNetworkConfigurationInput]
$creadList :: ReadS [UpdateNetworkConfigurationInput]
readsPrec :: Int -> ReadS UpdateNetworkConfigurationInput
$creadsPrec :: Int -> ReadS UpdateNetworkConfigurationInput
Prelude.Read, Int -> UpdateNetworkConfigurationInput -> ShowS
[UpdateNetworkConfigurationInput] -> ShowS
UpdateNetworkConfigurationInput -> String
(Int -> UpdateNetworkConfigurationInput -> ShowS)
-> (UpdateNetworkConfigurationInput -> String)
-> ([UpdateNetworkConfigurationInput] -> ShowS)
-> Show UpdateNetworkConfigurationInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNetworkConfigurationInput] -> ShowS
$cshowList :: [UpdateNetworkConfigurationInput] -> ShowS
show :: UpdateNetworkConfigurationInput -> String
$cshow :: UpdateNetworkConfigurationInput -> String
showsPrec :: Int -> UpdateNetworkConfigurationInput -> ShowS
$cshowsPrec :: Int -> UpdateNetworkConfigurationInput -> ShowS
Prelude.Show, (forall x.
UpdateNetworkConfigurationInput
-> Rep UpdateNetworkConfigurationInput x)
-> (forall x.
Rep UpdateNetworkConfigurationInput x
-> UpdateNetworkConfigurationInput)
-> Generic UpdateNetworkConfigurationInput
forall x.
Rep UpdateNetworkConfigurationInput x
-> UpdateNetworkConfigurationInput
forall x.
UpdateNetworkConfigurationInput
-> Rep UpdateNetworkConfigurationInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateNetworkConfigurationInput x
-> UpdateNetworkConfigurationInput
$cfrom :: forall x.
UpdateNetworkConfigurationInput
-> Rep UpdateNetworkConfigurationInput x
Prelude.Generic)
newUpdateNetworkConfigurationInput ::
Prelude.NonEmpty Prelude.Text ->
UpdateNetworkConfigurationInput
newUpdateNetworkConfigurationInput :: NonEmpty Text -> UpdateNetworkConfigurationInput
newUpdateNetworkConfigurationInput NonEmpty Text
pSecurityGroupIds_ =
UpdateNetworkConfigurationInput' :: NonEmpty Text -> UpdateNetworkConfigurationInput
UpdateNetworkConfigurationInput'
{ $sel:securityGroupIds:UpdateNetworkConfigurationInput' :: NonEmpty Text
securityGroupIds =
Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pSecurityGroupIds_
}
updateNetworkConfigurationInput_securityGroupIds :: Lens.Lens' UpdateNetworkConfigurationInput (Prelude.NonEmpty Prelude.Text)
updateNetworkConfigurationInput_securityGroupIds :: (NonEmpty Text -> f (NonEmpty Text))
-> UpdateNetworkConfigurationInput
-> f UpdateNetworkConfigurationInput
updateNetworkConfigurationInput_securityGroupIds = (UpdateNetworkConfigurationInput -> NonEmpty Text)
-> (UpdateNetworkConfigurationInput
-> NonEmpty Text -> UpdateNetworkConfigurationInput)
-> Lens
UpdateNetworkConfigurationInput
UpdateNetworkConfigurationInput
(NonEmpty Text)
(NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNetworkConfigurationInput' {NonEmpty Text
securityGroupIds :: NonEmpty Text
$sel:securityGroupIds:UpdateNetworkConfigurationInput' :: UpdateNetworkConfigurationInput -> NonEmpty Text
securityGroupIds} -> NonEmpty Text
securityGroupIds) (\s :: UpdateNetworkConfigurationInput
s@UpdateNetworkConfigurationInput' {} NonEmpty Text
a -> UpdateNetworkConfigurationInput
s {$sel:securityGroupIds:UpdateNetworkConfigurationInput' :: NonEmpty Text
securityGroupIds = NonEmpty Text
a} :: UpdateNetworkConfigurationInput) ((NonEmpty Text -> f (NonEmpty Text))
-> UpdateNetworkConfigurationInput
-> f UpdateNetworkConfigurationInput)
-> ((NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> UpdateNetworkConfigurationInput
-> f UpdateNetworkConfigurationInput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.Hashable
UpdateNetworkConfigurationInput
instance
Prelude.NFData
UpdateNetworkConfigurationInput
instance Core.ToJSON UpdateNetworkConfigurationInput where
toJSON :: UpdateNetworkConfigurationInput -> Value
toJSON UpdateNetworkConfigurationInput' {NonEmpty Text
securityGroupIds :: NonEmpty Text
$sel:securityGroupIds:UpdateNetworkConfigurationInput' :: UpdateNetworkConfigurationInput -> NonEmpty Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"SecurityGroupIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
securityGroupIds)
]
)