{-# 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.Nimble.Types.NewLaunchProfileMember where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Nimble.Types.LaunchProfilePersona
import qualified Amazonka.Prelude as Prelude
data NewLaunchProfileMember = NewLaunchProfileMember'
{
NewLaunchProfileMember -> LaunchProfilePersona
persona :: LaunchProfilePersona,
NewLaunchProfileMember -> Text
principalId :: Prelude.Text
}
deriving (NewLaunchProfileMember -> NewLaunchProfileMember -> Bool
(NewLaunchProfileMember -> NewLaunchProfileMember -> Bool)
-> (NewLaunchProfileMember -> NewLaunchProfileMember -> Bool)
-> Eq NewLaunchProfileMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NewLaunchProfileMember -> NewLaunchProfileMember -> Bool
$c/= :: NewLaunchProfileMember -> NewLaunchProfileMember -> Bool
== :: NewLaunchProfileMember -> NewLaunchProfileMember -> Bool
$c== :: NewLaunchProfileMember -> NewLaunchProfileMember -> Bool
Prelude.Eq, ReadPrec [NewLaunchProfileMember]
ReadPrec NewLaunchProfileMember
Int -> ReadS NewLaunchProfileMember
ReadS [NewLaunchProfileMember]
(Int -> ReadS NewLaunchProfileMember)
-> ReadS [NewLaunchProfileMember]
-> ReadPrec NewLaunchProfileMember
-> ReadPrec [NewLaunchProfileMember]
-> Read NewLaunchProfileMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NewLaunchProfileMember]
$creadListPrec :: ReadPrec [NewLaunchProfileMember]
readPrec :: ReadPrec NewLaunchProfileMember
$creadPrec :: ReadPrec NewLaunchProfileMember
readList :: ReadS [NewLaunchProfileMember]
$creadList :: ReadS [NewLaunchProfileMember]
readsPrec :: Int -> ReadS NewLaunchProfileMember
$creadsPrec :: Int -> ReadS NewLaunchProfileMember
Prelude.Read, Int -> NewLaunchProfileMember -> ShowS
[NewLaunchProfileMember] -> ShowS
NewLaunchProfileMember -> String
(Int -> NewLaunchProfileMember -> ShowS)
-> (NewLaunchProfileMember -> String)
-> ([NewLaunchProfileMember] -> ShowS)
-> Show NewLaunchProfileMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NewLaunchProfileMember] -> ShowS
$cshowList :: [NewLaunchProfileMember] -> ShowS
show :: NewLaunchProfileMember -> String
$cshow :: NewLaunchProfileMember -> String
showsPrec :: Int -> NewLaunchProfileMember -> ShowS
$cshowsPrec :: Int -> NewLaunchProfileMember -> ShowS
Prelude.Show, (forall x. NewLaunchProfileMember -> Rep NewLaunchProfileMember x)
-> (forall x.
Rep NewLaunchProfileMember x -> NewLaunchProfileMember)
-> Generic NewLaunchProfileMember
forall x. Rep NewLaunchProfileMember x -> NewLaunchProfileMember
forall x. NewLaunchProfileMember -> Rep NewLaunchProfileMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NewLaunchProfileMember x -> NewLaunchProfileMember
$cfrom :: forall x. NewLaunchProfileMember -> Rep NewLaunchProfileMember x
Prelude.Generic)
newNewLaunchProfileMember ::
LaunchProfilePersona ->
Prelude.Text ->
NewLaunchProfileMember
newNewLaunchProfileMember :: LaunchProfilePersona -> Text -> NewLaunchProfileMember
newNewLaunchProfileMember LaunchProfilePersona
pPersona_ Text
pPrincipalId_ =
NewLaunchProfileMember' :: LaunchProfilePersona -> Text -> NewLaunchProfileMember
NewLaunchProfileMember'
{ $sel:persona:NewLaunchProfileMember' :: LaunchProfilePersona
persona = LaunchProfilePersona
pPersona_,
$sel:principalId:NewLaunchProfileMember' :: Text
principalId = Text
pPrincipalId_
}
newLaunchProfileMember_persona :: Lens.Lens' NewLaunchProfileMember LaunchProfilePersona
newLaunchProfileMember_persona :: (LaunchProfilePersona -> f LaunchProfilePersona)
-> NewLaunchProfileMember -> f NewLaunchProfileMember
newLaunchProfileMember_persona = (NewLaunchProfileMember -> LaunchProfilePersona)
-> (NewLaunchProfileMember
-> LaunchProfilePersona -> NewLaunchProfileMember)
-> Lens
NewLaunchProfileMember
NewLaunchProfileMember
LaunchProfilePersona
LaunchProfilePersona
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewLaunchProfileMember' {LaunchProfilePersona
persona :: LaunchProfilePersona
$sel:persona:NewLaunchProfileMember' :: NewLaunchProfileMember -> LaunchProfilePersona
persona} -> LaunchProfilePersona
persona) (\s :: NewLaunchProfileMember
s@NewLaunchProfileMember' {} LaunchProfilePersona
a -> NewLaunchProfileMember
s {$sel:persona:NewLaunchProfileMember' :: LaunchProfilePersona
persona = LaunchProfilePersona
a} :: NewLaunchProfileMember)
newLaunchProfileMember_principalId :: Lens.Lens' NewLaunchProfileMember Prelude.Text
newLaunchProfileMember_principalId :: (Text -> f Text)
-> NewLaunchProfileMember -> f NewLaunchProfileMember
newLaunchProfileMember_principalId = (NewLaunchProfileMember -> Text)
-> (NewLaunchProfileMember -> Text -> NewLaunchProfileMember)
-> Lens NewLaunchProfileMember NewLaunchProfileMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewLaunchProfileMember' {Text
principalId :: Text
$sel:principalId:NewLaunchProfileMember' :: NewLaunchProfileMember -> Text
principalId} -> Text
principalId) (\s :: NewLaunchProfileMember
s@NewLaunchProfileMember' {} Text
a -> NewLaunchProfileMember
s {$sel:principalId:NewLaunchProfileMember' :: Text
principalId = Text
a} :: NewLaunchProfileMember)
instance Prelude.Hashable NewLaunchProfileMember
instance Prelude.NFData NewLaunchProfileMember
instance Core.ToJSON NewLaunchProfileMember where
toJSON :: NewLaunchProfileMember -> Value
toJSON NewLaunchProfileMember' {Text
LaunchProfilePersona
principalId :: Text
persona :: LaunchProfilePersona
$sel:principalId:NewLaunchProfileMember' :: NewLaunchProfileMember -> Text
$sel:persona:NewLaunchProfileMember' :: NewLaunchProfileMember -> LaunchProfilePersona
..} =
[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
"persona" Text -> LaunchProfilePersona -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LaunchProfilePersona
persona),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"principalId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
principalId)
]
)