{-# 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.SecurityHub.Types.AwsIamAccessKeySessionContextSessionIssuer where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsIamAccessKeySessionContextSessionIssuer = AwsIamAccessKeySessionContextSessionIssuer'
{
AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
principalId :: Prelude.Maybe Prelude.Text,
AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
userName :: Prelude.Maybe Prelude.Text,
AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
type' :: Prelude.Maybe Prelude.Text
}
deriving (AwsIamAccessKeySessionContextSessionIssuer
-> AwsIamAccessKeySessionContextSessionIssuer -> Bool
(AwsIamAccessKeySessionContextSessionIssuer
-> AwsIamAccessKeySessionContextSessionIssuer -> Bool)
-> (AwsIamAccessKeySessionContextSessionIssuer
-> AwsIamAccessKeySessionContextSessionIssuer -> Bool)
-> Eq AwsIamAccessKeySessionContextSessionIssuer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsIamAccessKeySessionContextSessionIssuer
-> AwsIamAccessKeySessionContextSessionIssuer -> Bool
$c/= :: AwsIamAccessKeySessionContextSessionIssuer
-> AwsIamAccessKeySessionContextSessionIssuer -> Bool
== :: AwsIamAccessKeySessionContextSessionIssuer
-> AwsIamAccessKeySessionContextSessionIssuer -> Bool
$c== :: AwsIamAccessKeySessionContextSessionIssuer
-> AwsIamAccessKeySessionContextSessionIssuer -> Bool
Prelude.Eq, ReadPrec [AwsIamAccessKeySessionContextSessionIssuer]
ReadPrec AwsIamAccessKeySessionContextSessionIssuer
Int -> ReadS AwsIamAccessKeySessionContextSessionIssuer
ReadS [AwsIamAccessKeySessionContextSessionIssuer]
(Int -> ReadS AwsIamAccessKeySessionContextSessionIssuer)
-> ReadS [AwsIamAccessKeySessionContextSessionIssuer]
-> ReadPrec AwsIamAccessKeySessionContextSessionIssuer
-> ReadPrec [AwsIamAccessKeySessionContextSessionIssuer]
-> Read AwsIamAccessKeySessionContextSessionIssuer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsIamAccessKeySessionContextSessionIssuer]
$creadListPrec :: ReadPrec [AwsIamAccessKeySessionContextSessionIssuer]
readPrec :: ReadPrec AwsIamAccessKeySessionContextSessionIssuer
$creadPrec :: ReadPrec AwsIamAccessKeySessionContextSessionIssuer
readList :: ReadS [AwsIamAccessKeySessionContextSessionIssuer]
$creadList :: ReadS [AwsIamAccessKeySessionContextSessionIssuer]
readsPrec :: Int -> ReadS AwsIamAccessKeySessionContextSessionIssuer
$creadsPrec :: Int -> ReadS AwsIamAccessKeySessionContextSessionIssuer
Prelude.Read, Int -> AwsIamAccessKeySessionContextSessionIssuer -> ShowS
[AwsIamAccessKeySessionContextSessionIssuer] -> ShowS
AwsIamAccessKeySessionContextSessionIssuer -> String
(Int -> AwsIamAccessKeySessionContextSessionIssuer -> ShowS)
-> (AwsIamAccessKeySessionContextSessionIssuer -> String)
-> ([AwsIamAccessKeySessionContextSessionIssuer] -> ShowS)
-> Show AwsIamAccessKeySessionContextSessionIssuer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsIamAccessKeySessionContextSessionIssuer] -> ShowS
$cshowList :: [AwsIamAccessKeySessionContextSessionIssuer] -> ShowS
show :: AwsIamAccessKeySessionContextSessionIssuer -> String
$cshow :: AwsIamAccessKeySessionContextSessionIssuer -> String
showsPrec :: Int -> AwsIamAccessKeySessionContextSessionIssuer -> ShowS
$cshowsPrec :: Int -> AwsIamAccessKeySessionContextSessionIssuer -> ShowS
Prelude.Show, (forall x.
AwsIamAccessKeySessionContextSessionIssuer
-> Rep AwsIamAccessKeySessionContextSessionIssuer x)
-> (forall x.
Rep AwsIamAccessKeySessionContextSessionIssuer x
-> AwsIamAccessKeySessionContextSessionIssuer)
-> Generic AwsIamAccessKeySessionContextSessionIssuer
forall x.
Rep AwsIamAccessKeySessionContextSessionIssuer x
-> AwsIamAccessKeySessionContextSessionIssuer
forall x.
AwsIamAccessKeySessionContextSessionIssuer
-> Rep AwsIamAccessKeySessionContextSessionIssuer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsIamAccessKeySessionContextSessionIssuer x
-> AwsIamAccessKeySessionContextSessionIssuer
$cfrom :: forall x.
AwsIamAccessKeySessionContextSessionIssuer
-> Rep AwsIamAccessKeySessionContextSessionIssuer x
Prelude.Generic)
newAwsIamAccessKeySessionContextSessionIssuer ::
AwsIamAccessKeySessionContextSessionIssuer
newAwsIamAccessKeySessionContextSessionIssuer :: AwsIamAccessKeySessionContextSessionIssuer
newAwsIamAccessKeySessionContextSessionIssuer =
AwsIamAccessKeySessionContextSessionIssuer' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeySessionContextSessionIssuer
AwsIamAccessKeySessionContextSessionIssuer'
{ $sel:principalId:AwsIamAccessKeySessionContextSessionIssuer' :: Maybe Text
principalId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:AwsIamAccessKeySessionContextSessionIssuer' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userName:AwsIamAccessKeySessionContextSessionIssuer' :: Maybe Text
userName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:AwsIamAccessKeySessionContextSessionIssuer' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':AwsIamAccessKeySessionContextSessionIssuer' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsIamAccessKeySessionContextSessionIssuer_principalId :: Lens.Lens' AwsIamAccessKeySessionContextSessionIssuer (Prelude.Maybe Prelude.Text)
awsIamAccessKeySessionContextSessionIssuer_principalId :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeySessionContextSessionIssuer
-> f AwsIamAccessKeySessionContextSessionIssuer
awsIamAccessKeySessionContextSessionIssuer_principalId = (AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text)
-> (AwsIamAccessKeySessionContextSessionIssuer
-> Maybe Text -> AwsIamAccessKeySessionContextSessionIssuer)
-> Lens
AwsIamAccessKeySessionContextSessionIssuer
AwsIamAccessKeySessionContextSessionIssuer
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeySessionContextSessionIssuer' {Maybe Text
principalId :: Maybe Text
$sel:principalId:AwsIamAccessKeySessionContextSessionIssuer' :: AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
principalId} -> Maybe Text
principalId) (\s :: AwsIamAccessKeySessionContextSessionIssuer
s@AwsIamAccessKeySessionContextSessionIssuer' {} Maybe Text
a -> AwsIamAccessKeySessionContextSessionIssuer
s {$sel:principalId:AwsIamAccessKeySessionContextSessionIssuer' :: Maybe Text
principalId = Maybe Text
a} :: AwsIamAccessKeySessionContextSessionIssuer)
awsIamAccessKeySessionContextSessionIssuer_arn :: Lens.Lens' AwsIamAccessKeySessionContextSessionIssuer (Prelude.Maybe Prelude.Text)
awsIamAccessKeySessionContextSessionIssuer_arn :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeySessionContextSessionIssuer
-> f AwsIamAccessKeySessionContextSessionIssuer
awsIamAccessKeySessionContextSessionIssuer_arn = (AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text)
-> (AwsIamAccessKeySessionContextSessionIssuer
-> Maybe Text -> AwsIamAccessKeySessionContextSessionIssuer)
-> Lens
AwsIamAccessKeySessionContextSessionIssuer
AwsIamAccessKeySessionContextSessionIssuer
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeySessionContextSessionIssuer' {Maybe Text
arn :: Maybe Text
$sel:arn:AwsIamAccessKeySessionContextSessionIssuer' :: AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
arn} -> Maybe Text
arn) (\s :: AwsIamAccessKeySessionContextSessionIssuer
s@AwsIamAccessKeySessionContextSessionIssuer' {} Maybe Text
a -> AwsIamAccessKeySessionContextSessionIssuer
s {$sel:arn:AwsIamAccessKeySessionContextSessionIssuer' :: Maybe Text
arn = Maybe Text
a} :: AwsIamAccessKeySessionContextSessionIssuer)
awsIamAccessKeySessionContextSessionIssuer_userName :: Lens.Lens' AwsIamAccessKeySessionContextSessionIssuer (Prelude.Maybe Prelude.Text)
awsIamAccessKeySessionContextSessionIssuer_userName :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeySessionContextSessionIssuer
-> f AwsIamAccessKeySessionContextSessionIssuer
awsIamAccessKeySessionContextSessionIssuer_userName = (AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text)
-> (AwsIamAccessKeySessionContextSessionIssuer
-> Maybe Text -> AwsIamAccessKeySessionContextSessionIssuer)
-> Lens
AwsIamAccessKeySessionContextSessionIssuer
AwsIamAccessKeySessionContextSessionIssuer
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeySessionContextSessionIssuer' {Maybe Text
userName :: Maybe Text
$sel:userName:AwsIamAccessKeySessionContextSessionIssuer' :: AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
userName} -> Maybe Text
userName) (\s :: AwsIamAccessKeySessionContextSessionIssuer
s@AwsIamAccessKeySessionContextSessionIssuer' {} Maybe Text
a -> AwsIamAccessKeySessionContextSessionIssuer
s {$sel:userName:AwsIamAccessKeySessionContextSessionIssuer' :: Maybe Text
userName = Maybe Text
a} :: AwsIamAccessKeySessionContextSessionIssuer)
awsIamAccessKeySessionContextSessionIssuer_accountId :: Lens.Lens' AwsIamAccessKeySessionContextSessionIssuer (Prelude.Maybe Prelude.Text)
awsIamAccessKeySessionContextSessionIssuer_accountId :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeySessionContextSessionIssuer
-> f AwsIamAccessKeySessionContextSessionIssuer
awsIamAccessKeySessionContextSessionIssuer_accountId = (AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text)
-> (AwsIamAccessKeySessionContextSessionIssuer
-> Maybe Text -> AwsIamAccessKeySessionContextSessionIssuer)
-> Lens
AwsIamAccessKeySessionContextSessionIssuer
AwsIamAccessKeySessionContextSessionIssuer
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeySessionContextSessionIssuer' {Maybe Text
accountId :: Maybe Text
$sel:accountId:AwsIamAccessKeySessionContextSessionIssuer' :: AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: AwsIamAccessKeySessionContextSessionIssuer
s@AwsIamAccessKeySessionContextSessionIssuer' {} Maybe Text
a -> AwsIamAccessKeySessionContextSessionIssuer
s {$sel:accountId:AwsIamAccessKeySessionContextSessionIssuer' :: Maybe Text
accountId = Maybe Text
a} :: AwsIamAccessKeySessionContextSessionIssuer)
awsIamAccessKeySessionContextSessionIssuer_type :: Lens.Lens' AwsIamAccessKeySessionContextSessionIssuer (Prelude.Maybe Prelude.Text)
awsIamAccessKeySessionContextSessionIssuer_type :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeySessionContextSessionIssuer
-> f AwsIamAccessKeySessionContextSessionIssuer
awsIamAccessKeySessionContextSessionIssuer_type = (AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text)
-> (AwsIamAccessKeySessionContextSessionIssuer
-> Maybe Text -> AwsIamAccessKeySessionContextSessionIssuer)
-> Lens
AwsIamAccessKeySessionContextSessionIssuer
AwsIamAccessKeySessionContextSessionIssuer
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeySessionContextSessionIssuer' {Maybe Text
type' :: Maybe Text
$sel:type':AwsIamAccessKeySessionContextSessionIssuer' :: AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
type'} -> Maybe Text
type') (\s :: AwsIamAccessKeySessionContextSessionIssuer
s@AwsIamAccessKeySessionContextSessionIssuer' {} Maybe Text
a -> AwsIamAccessKeySessionContextSessionIssuer
s {$sel:type':AwsIamAccessKeySessionContextSessionIssuer' :: Maybe Text
type' = Maybe Text
a} :: AwsIamAccessKeySessionContextSessionIssuer)
instance
Core.FromJSON
AwsIamAccessKeySessionContextSessionIssuer
where
parseJSON :: Value -> Parser AwsIamAccessKeySessionContextSessionIssuer
parseJSON =
String
-> (Object -> Parser AwsIamAccessKeySessionContextSessionIssuer)
-> Value
-> Parser AwsIamAccessKeySessionContextSessionIssuer
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsIamAccessKeySessionContextSessionIssuer"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeySessionContextSessionIssuer
AwsIamAccessKeySessionContextSessionIssuer'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeySessionContextSessionIssuer)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeySessionContextSessionIssuer)
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
"PrincipalId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeySessionContextSessionIssuer)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeySessionContextSessionIssuer)
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
"Arn")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeySessionContextSessionIssuer)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> AwsIamAccessKeySessionContextSessionIssuer)
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
"UserName")
Parser
(Maybe Text
-> Maybe Text -> AwsIamAccessKeySessionContextSessionIssuer)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> AwsIamAccessKeySessionContextSessionIssuer)
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
"AccountId")
Parser (Maybe Text -> AwsIamAccessKeySessionContextSessionIssuer)
-> Parser (Maybe Text)
-> Parser AwsIamAccessKeySessionContextSessionIssuer
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
"Type")
)
instance
Prelude.Hashable
AwsIamAccessKeySessionContextSessionIssuer
instance
Prelude.NFData
AwsIamAccessKeySessionContextSessionIssuer
instance
Core.ToJSON
AwsIamAccessKeySessionContextSessionIssuer
where
toJSON :: AwsIamAccessKeySessionContextSessionIssuer -> Value
toJSON
AwsIamAccessKeySessionContextSessionIssuer' {Maybe Text
type' :: Maybe Text
accountId :: Maybe Text
userName :: Maybe Text
arn :: Maybe Text
principalId :: Maybe Text
$sel:type':AwsIamAccessKeySessionContextSessionIssuer' :: AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
$sel:accountId:AwsIamAccessKeySessionContextSessionIssuer' :: AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
$sel:userName:AwsIamAccessKeySessionContextSessionIssuer' :: AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
$sel:arn:AwsIamAccessKeySessionContextSessionIssuer' :: AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
$sel:principalId:AwsIamAccessKeySessionContextSessionIssuer' :: AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"PrincipalId" 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
principalId,
(Text
"Arn" 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
arn,
(Text
"UserName" 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
userName,
(Text
"AccountId" 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
accountId,
(Text
"Type" 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
type'
]
)