{-# 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.LaunchProfileMembership 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 LaunchProfileMembership = LaunchProfileMembership'
{
LaunchProfileMembership -> Maybe Text
identityStoreId :: Prelude.Maybe Prelude.Text,
LaunchProfileMembership -> Maybe Text
principalId :: Prelude.Maybe Prelude.Text,
LaunchProfileMembership -> Maybe LaunchProfilePersona
persona :: Prelude.Maybe LaunchProfilePersona
}
deriving (LaunchProfileMembership -> LaunchProfileMembership -> Bool
(LaunchProfileMembership -> LaunchProfileMembership -> Bool)
-> (LaunchProfileMembership -> LaunchProfileMembership -> Bool)
-> Eq LaunchProfileMembership
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LaunchProfileMembership -> LaunchProfileMembership -> Bool
$c/= :: LaunchProfileMembership -> LaunchProfileMembership -> Bool
== :: LaunchProfileMembership -> LaunchProfileMembership -> Bool
$c== :: LaunchProfileMembership -> LaunchProfileMembership -> Bool
Prelude.Eq, ReadPrec [LaunchProfileMembership]
ReadPrec LaunchProfileMembership
Int -> ReadS LaunchProfileMembership
ReadS [LaunchProfileMembership]
(Int -> ReadS LaunchProfileMembership)
-> ReadS [LaunchProfileMembership]
-> ReadPrec LaunchProfileMembership
-> ReadPrec [LaunchProfileMembership]
-> Read LaunchProfileMembership
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LaunchProfileMembership]
$creadListPrec :: ReadPrec [LaunchProfileMembership]
readPrec :: ReadPrec LaunchProfileMembership
$creadPrec :: ReadPrec LaunchProfileMembership
readList :: ReadS [LaunchProfileMembership]
$creadList :: ReadS [LaunchProfileMembership]
readsPrec :: Int -> ReadS LaunchProfileMembership
$creadsPrec :: Int -> ReadS LaunchProfileMembership
Prelude.Read, Int -> LaunchProfileMembership -> ShowS
[LaunchProfileMembership] -> ShowS
LaunchProfileMembership -> String
(Int -> LaunchProfileMembership -> ShowS)
-> (LaunchProfileMembership -> String)
-> ([LaunchProfileMembership] -> ShowS)
-> Show LaunchProfileMembership
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LaunchProfileMembership] -> ShowS
$cshowList :: [LaunchProfileMembership] -> ShowS
show :: LaunchProfileMembership -> String
$cshow :: LaunchProfileMembership -> String
showsPrec :: Int -> LaunchProfileMembership -> ShowS
$cshowsPrec :: Int -> LaunchProfileMembership -> ShowS
Prelude.Show, (forall x.
LaunchProfileMembership -> Rep LaunchProfileMembership x)
-> (forall x.
Rep LaunchProfileMembership x -> LaunchProfileMembership)
-> Generic LaunchProfileMembership
forall x. Rep LaunchProfileMembership x -> LaunchProfileMembership
forall x. LaunchProfileMembership -> Rep LaunchProfileMembership x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LaunchProfileMembership x -> LaunchProfileMembership
$cfrom :: forall x. LaunchProfileMembership -> Rep LaunchProfileMembership x
Prelude.Generic)
newLaunchProfileMembership ::
LaunchProfileMembership
newLaunchProfileMembership :: LaunchProfileMembership
newLaunchProfileMembership =
LaunchProfileMembership' :: Maybe Text
-> Maybe Text
-> Maybe LaunchProfilePersona
-> LaunchProfileMembership
LaunchProfileMembership'
{ $sel:identityStoreId:LaunchProfileMembership' :: Maybe Text
identityStoreId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:principalId:LaunchProfileMembership' :: Maybe Text
principalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:persona:LaunchProfileMembership' :: Maybe LaunchProfilePersona
persona = Maybe LaunchProfilePersona
forall a. Maybe a
Prelude.Nothing
}
launchProfileMembership_identityStoreId :: Lens.Lens' LaunchProfileMembership (Prelude.Maybe Prelude.Text)
launchProfileMembership_identityStoreId :: (Maybe Text -> f (Maybe Text))
-> LaunchProfileMembership -> f LaunchProfileMembership
launchProfileMembership_identityStoreId = (LaunchProfileMembership -> Maybe Text)
-> (LaunchProfileMembership
-> Maybe Text -> LaunchProfileMembership)
-> Lens
LaunchProfileMembership
LaunchProfileMembership
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileMembership' {Maybe Text
identityStoreId :: Maybe Text
$sel:identityStoreId:LaunchProfileMembership' :: LaunchProfileMembership -> Maybe Text
identityStoreId} -> Maybe Text
identityStoreId) (\s :: LaunchProfileMembership
s@LaunchProfileMembership' {} Maybe Text
a -> LaunchProfileMembership
s {$sel:identityStoreId:LaunchProfileMembership' :: Maybe Text
identityStoreId = Maybe Text
a} :: LaunchProfileMembership)
launchProfileMembership_principalId :: Lens.Lens' LaunchProfileMembership (Prelude.Maybe Prelude.Text)
launchProfileMembership_principalId :: (Maybe Text -> f (Maybe Text))
-> LaunchProfileMembership -> f LaunchProfileMembership
launchProfileMembership_principalId = (LaunchProfileMembership -> Maybe Text)
-> (LaunchProfileMembership
-> Maybe Text -> LaunchProfileMembership)
-> Lens
LaunchProfileMembership
LaunchProfileMembership
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileMembership' {Maybe Text
principalId :: Maybe Text
$sel:principalId:LaunchProfileMembership' :: LaunchProfileMembership -> Maybe Text
principalId} -> Maybe Text
principalId) (\s :: LaunchProfileMembership
s@LaunchProfileMembership' {} Maybe Text
a -> LaunchProfileMembership
s {$sel:principalId:LaunchProfileMembership' :: Maybe Text
principalId = Maybe Text
a} :: LaunchProfileMembership)
launchProfileMembership_persona :: Lens.Lens' LaunchProfileMembership (Prelude.Maybe LaunchProfilePersona)
launchProfileMembership_persona :: (Maybe LaunchProfilePersona -> f (Maybe LaunchProfilePersona))
-> LaunchProfileMembership -> f LaunchProfileMembership
launchProfileMembership_persona = (LaunchProfileMembership -> Maybe LaunchProfilePersona)
-> (LaunchProfileMembership
-> Maybe LaunchProfilePersona -> LaunchProfileMembership)
-> Lens
LaunchProfileMembership
LaunchProfileMembership
(Maybe LaunchProfilePersona)
(Maybe LaunchProfilePersona)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileMembership' {Maybe LaunchProfilePersona
persona :: Maybe LaunchProfilePersona
$sel:persona:LaunchProfileMembership' :: LaunchProfileMembership -> Maybe LaunchProfilePersona
persona} -> Maybe LaunchProfilePersona
persona) (\s :: LaunchProfileMembership
s@LaunchProfileMembership' {} Maybe LaunchProfilePersona
a -> LaunchProfileMembership
s {$sel:persona:LaunchProfileMembership' :: Maybe LaunchProfilePersona
persona = Maybe LaunchProfilePersona
a} :: LaunchProfileMembership)
instance Core.FromJSON LaunchProfileMembership where
parseJSON :: Value -> Parser LaunchProfileMembership
parseJSON =
String
-> (Object -> Parser LaunchProfileMembership)
-> Value
-> Parser LaunchProfileMembership
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LaunchProfileMembership"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe LaunchProfilePersona
-> LaunchProfileMembership
LaunchProfileMembership'
(Maybe Text
-> Maybe Text
-> Maybe LaunchProfilePersona
-> LaunchProfileMembership)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe LaunchProfilePersona -> LaunchProfileMembership)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"identityStoreId")
Parser
(Maybe Text
-> Maybe LaunchProfilePersona -> LaunchProfileMembership)
-> Parser (Maybe Text)
-> Parser (Maybe LaunchProfilePersona -> LaunchProfileMembership)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"principalId")
Parser (Maybe LaunchProfilePersona -> LaunchProfileMembership)
-> Parser (Maybe LaunchProfilePersona)
-> Parser LaunchProfileMembership
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LaunchProfilePersona)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"persona")
)
instance Prelude.Hashable LaunchProfileMembership
instance Prelude.NFData LaunchProfileMembership