{-# 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.AwsIamAccessKeyDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsIamAccessKeySessionContext
import Amazonka.SecurityHub.Types.AwsIamAccessKeyStatus
data AwsIamAccessKeyDetails = AwsIamAccessKeyDetails'
{
AwsIamAccessKeyDetails -> Maybe AwsIamAccessKeyStatus
status :: Prelude.Maybe AwsIamAccessKeyStatus,
AwsIamAccessKeyDetails -> Maybe Text
principalId :: Prelude.Maybe Prelude.Text,
AwsIamAccessKeyDetails -> Maybe Text
principalType :: Prelude.Maybe Prelude.Text,
AwsIamAccessKeyDetails -> Maybe Text
principalName :: Prelude.Maybe Prelude.Text,
AwsIamAccessKeyDetails -> Maybe Text
createdAt :: Prelude.Maybe Prelude.Text,
AwsIamAccessKeyDetails -> Maybe Text
userName :: Prelude.Maybe Prelude.Text,
AwsIamAccessKeyDetails -> Maybe AwsIamAccessKeySessionContext
sessionContext :: Prelude.Maybe AwsIamAccessKeySessionContext,
AwsIamAccessKeyDetails -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
AwsIamAccessKeyDetails -> Maybe Text
accessKeyId :: Prelude.Maybe Prelude.Text
}
deriving (AwsIamAccessKeyDetails -> AwsIamAccessKeyDetails -> Bool
(AwsIamAccessKeyDetails -> AwsIamAccessKeyDetails -> Bool)
-> (AwsIamAccessKeyDetails -> AwsIamAccessKeyDetails -> Bool)
-> Eq AwsIamAccessKeyDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsIamAccessKeyDetails -> AwsIamAccessKeyDetails -> Bool
$c/= :: AwsIamAccessKeyDetails -> AwsIamAccessKeyDetails -> Bool
== :: AwsIamAccessKeyDetails -> AwsIamAccessKeyDetails -> Bool
$c== :: AwsIamAccessKeyDetails -> AwsIamAccessKeyDetails -> Bool
Prelude.Eq, ReadPrec [AwsIamAccessKeyDetails]
ReadPrec AwsIamAccessKeyDetails
Int -> ReadS AwsIamAccessKeyDetails
ReadS [AwsIamAccessKeyDetails]
(Int -> ReadS AwsIamAccessKeyDetails)
-> ReadS [AwsIamAccessKeyDetails]
-> ReadPrec AwsIamAccessKeyDetails
-> ReadPrec [AwsIamAccessKeyDetails]
-> Read AwsIamAccessKeyDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsIamAccessKeyDetails]
$creadListPrec :: ReadPrec [AwsIamAccessKeyDetails]
readPrec :: ReadPrec AwsIamAccessKeyDetails
$creadPrec :: ReadPrec AwsIamAccessKeyDetails
readList :: ReadS [AwsIamAccessKeyDetails]
$creadList :: ReadS [AwsIamAccessKeyDetails]
readsPrec :: Int -> ReadS AwsIamAccessKeyDetails
$creadsPrec :: Int -> ReadS AwsIamAccessKeyDetails
Prelude.Read, Int -> AwsIamAccessKeyDetails -> ShowS
[AwsIamAccessKeyDetails] -> ShowS
AwsIamAccessKeyDetails -> String
(Int -> AwsIamAccessKeyDetails -> ShowS)
-> (AwsIamAccessKeyDetails -> String)
-> ([AwsIamAccessKeyDetails] -> ShowS)
-> Show AwsIamAccessKeyDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsIamAccessKeyDetails] -> ShowS
$cshowList :: [AwsIamAccessKeyDetails] -> ShowS
show :: AwsIamAccessKeyDetails -> String
$cshow :: AwsIamAccessKeyDetails -> String
showsPrec :: Int -> AwsIamAccessKeyDetails -> ShowS
$cshowsPrec :: Int -> AwsIamAccessKeyDetails -> ShowS
Prelude.Show, (forall x. AwsIamAccessKeyDetails -> Rep AwsIamAccessKeyDetails x)
-> (forall x.
Rep AwsIamAccessKeyDetails x -> AwsIamAccessKeyDetails)
-> Generic AwsIamAccessKeyDetails
forall x. Rep AwsIamAccessKeyDetails x -> AwsIamAccessKeyDetails
forall x. AwsIamAccessKeyDetails -> Rep AwsIamAccessKeyDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AwsIamAccessKeyDetails x -> AwsIamAccessKeyDetails
$cfrom :: forall x. AwsIamAccessKeyDetails -> Rep AwsIamAccessKeyDetails x
Prelude.Generic)
newAwsIamAccessKeyDetails ::
AwsIamAccessKeyDetails
newAwsIamAccessKeyDetails :: AwsIamAccessKeyDetails
newAwsIamAccessKeyDetails =
AwsIamAccessKeyDetails' :: Maybe AwsIamAccessKeyStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails
AwsIamAccessKeyDetails'
{ $sel:status:AwsIamAccessKeyDetails' :: Maybe AwsIamAccessKeyStatus
status = Maybe AwsIamAccessKeyStatus
forall a. Maybe a
Prelude.Nothing,
$sel:principalId:AwsIamAccessKeyDetails' :: Maybe Text
principalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:principalType:AwsIamAccessKeyDetails' :: Maybe Text
principalType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:principalName:AwsIamAccessKeyDetails' :: Maybe Text
principalName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:AwsIamAccessKeyDetails' :: Maybe Text
createdAt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userName:AwsIamAccessKeyDetails' :: Maybe Text
userName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sessionContext:AwsIamAccessKeyDetails' :: Maybe AwsIamAccessKeySessionContext
sessionContext = Maybe AwsIamAccessKeySessionContext
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:AwsIamAccessKeyDetails' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:accessKeyId:AwsIamAccessKeyDetails' :: Maybe Text
accessKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsIamAccessKeyDetails_status :: Lens.Lens' AwsIamAccessKeyDetails (Prelude.Maybe AwsIamAccessKeyStatus)
awsIamAccessKeyDetails_status :: (Maybe AwsIamAccessKeyStatus -> f (Maybe AwsIamAccessKeyStatus))
-> AwsIamAccessKeyDetails -> f AwsIamAccessKeyDetails
awsIamAccessKeyDetails_status = (AwsIamAccessKeyDetails -> Maybe AwsIamAccessKeyStatus)
-> (AwsIamAccessKeyDetails
-> Maybe AwsIamAccessKeyStatus -> AwsIamAccessKeyDetails)
-> Lens
AwsIamAccessKeyDetails
AwsIamAccessKeyDetails
(Maybe AwsIamAccessKeyStatus)
(Maybe AwsIamAccessKeyStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeyDetails' {Maybe AwsIamAccessKeyStatus
status :: Maybe AwsIamAccessKeyStatus
$sel:status:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe AwsIamAccessKeyStatus
status} -> Maybe AwsIamAccessKeyStatus
status) (\s :: AwsIamAccessKeyDetails
s@AwsIamAccessKeyDetails' {} Maybe AwsIamAccessKeyStatus
a -> AwsIamAccessKeyDetails
s {$sel:status:AwsIamAccessKeyDetails' :: Maybe AwsIamAccessKeyStatus
status = Maybe AwsIamAccessKeyStatus
a} :: AwsIamAccessKeyDetails)
awsIamAccessKeyDetails_principalId :: Lens.Lens' AwsIamAccessKeyDetails (Prelude.Maybe Prelude.Text)
awsIamAccessKeyDetails_principalId :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeyDetails -> f AwsIamAccessKeyDetails
awsIamAccessKeyDetails_principalId = (AwsIamAccessKeyDetails -> Maybe Text)
-> (AwsIamAccessKeyDetails -> Maybe Text -> AwsIamAccessKeyDetails)
-> Lens
AwsIamAccessKeyDetails
AwsIamAccessKeyDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeyDetails' {Maybe Text
principalId :: Maybe Text
$sel:principalId:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
principalId} -> Maybe Text
principalId) (\s :: AwsIamAccessKeyDetails
s@AwsIamAccessKeyDetails' {} Maybe Text
a -> AwsIamAccessKeyDetails
s {$sel:principalId:AwsIamAccessKeyDetails' :: Maybe Text
principalId = Maybe Text
a} :: AwsIamAccessKeyDetails)
awsIamAccessKeyDetails_principalType :: Lens.Lens' AwsIamAccessKeyDetails (Prelude.Maybe Prelude.Text)
awsIamAccessKeyDetails_principalType :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeyDetails -> f AwsIamAccessKeyDetails
awsIamAccessKeyDetails_principalType = (AwsIamAccessKeyDetails -> Maybe Text)
-> (AwsIamAccessKeyDetails -> Maybe Text -> AwsIamAccessKeyDetails)
-> Lens
AwsIamAccessKeyDetails
AwsIamAccessKeyDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeyDetails' {Maybe Text
principalType :: Maybe Text
$sel:principalType:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
principalType} -> Maybe Text
principalType) (\s :: AwsIamAccessKeyDetails
s@AwsIamAccessKeyDetails' {} Maybe Text
a -> AwsIamAccessKeyDetails
s {$sel:principalType:AwsIamAccessKeyDetails' :: Maybe Text
principalType = Maybe Text
a} :: AwsIamAccessKeyDetails)
awsIamAccessKeyDetails_principalName :: Lens.Lens' AwsIamAccessKeyDetails (Prelude.Maybe Prelude.Text)
awsIamAccessKeyDetails_principalName :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeyDetails -> f AwsIamAccessKeyDetails
awsIamAccessKeyDetails_principalName = (AwsIamAccessKeyDetails -> Maybe Text)
-> (AwsIamAccessKeyDetails -> Maybe Text -> AwsIamAccessKeyDetails)
-> Lens
AwsIamAccessKeyDetails
AwsIamAccessKeyDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeyDetails' {Maybe Text
principalName :: Maybe Text
$sel:principalName:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
principalName} -> Maybe Text
principalName) (\s :: AwsIamAccessKeyDetails
s@AwsIamAccessKeyDetails' {} Maybe Text
a -> AwsIamAccessKeyDetails
s {$sel:principalName:AwsIamAccessKeyDetails' :: Maybe Text
principalName = Maybe Text
a} :: AwsIamAccessKeyDetails)
awsIamAccessKeyDetails_createdAt :: Lens.Lens' AwsIamAccessKeyDetails (Prelude.Maybe Prelude.Text)
awsIamAccessKeyDetails_createdAt :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeyDetails -> f AwsIamAccessKeyDetails
awsIamAccessKeyDetails_createdAt = (AwsIamAccessKeyDetails -> Maybe Text)
-> (AwsIamAccessKeyDetails -> Maybe Text -> AwsIamAccessKeyDetails)
-> Lens
AwsIamAccessKeyDetails
AwsIamAccessKeyDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeyDetails' {Maybe Text
createdAt :: Maybe Text
$sel:createdAt:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
createdAt} -> Maybe Text
createdAt) (\s :: AwsIamAccessKeyDetails
s@AwsIamAccessKeyDetails' {} Maybe Text
a -> AwsIamAccessKeyDetails
s {$sel:createdAt:AwsIamAccessKeyDetails' :: Maybe Text
createdAt = Maybe Text
a} :: AwsIamAccessKeyDetails)
awsIamAccessKeyDetails_userName :: Lens.Lens' AwsIamAccessKeyDetails (Prelude.Maybe Prelude.Text)
awsIamAccessKeyDetails_userName :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeyDetails -> f AwsIamAccessKeyDetails
awsIamAccessKeyDetails_userName = (AwsIamAccessKeyDetails -> Maybe Text)
-> (AwsIamAccessKeyDetails -> Maybe Text -> AwsIamAccessKeyDetails)
-> Lens
AwsIamAccessKeyDetails
AwsIamAccessKeyDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeyDetails' {Maybe Text
userName :: Maybe Text
$sel:userName:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
userName} -> Maybe Text
userName) (\s :: AwsIamAccessKeyDetails
s@AwsIamAccessKeyDetails' {} Maybe Text
a -> AwsIamAccessKeyDetails
s {$sel:userName:AwsIamAccessKeyDetails' :: Maybe Text
userName = Maybe Text
a} :: AwsIamAccessKeyDetails)
awsIamAccessKeyDetails_sessionContext :: Lens.Lens' AwsIamAccessKeyDetails (Prelude.Maybe AwsIamAccessKeySessionContext)
awsIamAccessKeyDetails_sessionContext :: (Maybe AwsIamAccessKeySessionContext
-> f (Maybe AwsIamAccessKeySessionContext))
-> AwsIamAccessKeyDetails -> f AwsIamAccessKeyDetails
awsIamAccessKeyDetails_sessionContext = (AwsIamAccessKeyDetails -> Maybe AwsIamAccessKeySessionContext)
-> (AwsIamAccessKeyDetails
-> Maybe AwsIamAccessKeySessionContext -> AwsIamAccessKeyDetails)
-> Lens
AwsIamAccessKeyDetails
AwsIamAccessKeyDetails
(Maybe AwsIamAccessKeySessionContext)
(Maybe AwsIamAccessKeySessionContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeyDetails' {Maybe AwsIamAccessKeySessionContext
sessionContext :: Maybe AwsIamAccessKeySessionContext
$sel:sessionContext:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe AwsIamAccessKeySessionContext
sessionContext} -> Maybe AwsIamAccessKeySessionContext
sessionContext) (\s :: AwsIamAccessKeyDetails
s@AwsIamAccessKeyDetails' {} Maybe AwsIamAccessKeySessionContext
a -> AwsIamAccessKeyDetails
s {$sel:sessionContext:AwsIamAccessKeyDetails' :: Maybe AwsIamAccessKeySessionContext
sessionContext = Maybe AwsIamAccessKeySessionContext
a} :: AwsIamAccessKeyDetails)
awsIamAccessKeyDetails_accountId :: Lens.Lens' AwsIamAccessKeyDetails (Prelude.Maybe Prelude.Text)
awsIamAccessKeyDetails_accountId :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeyDetails -> f AwsIamAccessKeyDetails
awsIamAccessKeyDetails_accountId = (AwsIamAccessKeyDetails -> Maybe Text)
-> (AwsIamAccessKeyDetails -> Maybe Text -> AwsIamAccessKeyDetails)
-> Lens
AwsIamAccessKeyDetails
AwsIamAccessKeyDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeyDetails' {Maybe Text
accountId :: Maybe Text
$sel:accountId:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: AwsIamAccessKeyDetails
s@AwsIamAccessKeyDetails' {} Maybe Text
a -> AwsIamAccessKeyDetails
s {$sel:accountId:AwsIamAccessKeyDetails' :: Maybe Text
accountId = Maybe Text
a} :: AwsIamAccessKeyDetails)
awsIamAccessKeyDetails_accessKeyId :: Lens.Lens' AwsIamAccessKeyDetails (Prelude.Maybe Prelude.Text)
awsIamAccessKeyDetails_accessKeyId :: (Maybe Text -> f (Maybe Text))
-> AwsIamAccessKeyDetails -> f AwsIamAccessKeyDetails
awsIamAccessKeyDetails_accessKeyId = (AwsIamAccessKeyDetails -> Maybe Text)
-> (AwsIamAccessKeyDetails -> Maybe Text -> AwsIamAccessKeyDetails)
-> Lens
AwsIamAccessKeyDetails
AwsIamAccessKeyDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamAccessKeyDetails' {Maybe Text
accessKeyId :: Maybe Text
$sel:accessKeyId:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
accessKeyId} -> Maybe Text
accessKeyId) (\s :: AwsIamAccessKeyDetails
s@AwsIamAccessKeyDetails' {} Maybe Text
a -> AwsIamAccessKeyDetails
s {$sel:accessKeyId:AwsIamAccessKeyDetails' :: Maybe Text
accessKeyId = Maybe Text
a} :: AwsIamAccessKeyDetails)
instance Core.FromJSON AwsIamAccessKeyDetails where
parseJSON :: Value -> Parser AwsIamAccessKeyDetails
parseJSON =
String
-> (Object -> Parser AwsIamAccessKeyDetails)
-> Value
-> Parser AwsIamAccessKeyDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsIamAccessKeyDetails"
( \Object
x ->
Maybe AwsIamAccessKeyStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails
AwsIamAccessKeyDetails'
(Maybe AwsIamAccessKeyStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails)
-> Parser (Maybe AwsIamAccessKeyStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AwsIamAccessKeyStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails)
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
"PrincipalType")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails)
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
"PrincipalName")
Parser
(Maybe Text
-> Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails)
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
"CreatedAt")
Parser
(Maybe Text
-> Maybe AwsIamAccessKeySessionContext
-> Maybe Text
-> Maybe Text
-> AwsIamAccessKeyDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe AwsIamAccessKeySessionContext
-> Maybe Text -> Maybe Text -> AwsIamAccessKeyDetails)
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 AwsIamAccessKeySessionContext
-> Maybe Text -> Maybe Text -> AwsIamAccessKeyDetails)
-> Parser (Maybe AwsIamAccessKeySessionContext)
-> Parser (Maybe Text -> Maybe Text -> AwsIamAccessKeyDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AwsIamAccessKeySessionContext)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SessionContext")
Parser (Maybe Text -> Maybe Text -> AwsIamAccessKeyDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsIamAccessKeyDetails)
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 -> AwsIamAccessKeyDetails)
-> Parser (Maybe Text) -> Parser AwsIamAccessKeyDetails
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
"AccessKeyId")
)
instance Prelude.Hashable AwsIamAccessKeyDetails
instance Prelude.NFData AwsIamAccessKeyDetails
instance Core.ToJSON AwsIamAccessKeyDetails where
toJSON :: AwsIamAccessKeyDetails -> Value
toJSON AwsIamAccessKeyDetails' {Maybe Text
Maybe AwsIamAccessKeySessionContext
Maybe AwsIamAccessKeyStatus
accessKeyId :: Maybe Text
accountId :: Maybe Text
sessionContext :: Maybe AwsIamAccessKeySessionContext
userName :: Maybe Text
createdAt :: Maybe Text
principalName :: Maybe Text
principalType :: Maybe Text
principalId :: Maybe Text
status :: Maybe AwsIamAccessKeyStatus
$sel:accessKeyId:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
$sel:accountId:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
$sel:sessionContext:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe AwsIamAccessKeySessionContext
$sel:userName:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
$sel:createdAt:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
$sel:principalName:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
$sel:principalType:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
$sel:principalId:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe Text
$sel:status:AwsIamAccessKeyDetails' :: AwsIamAccessKeyDetails -> Maybe AwsIamAccessKeyStatus
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Status" Text -> AwsIamAccessKeyStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AwsIamAccessKeyStatus -> Pair)
-> Maybe AwsIamAccessKeyStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsIamAccessKeyStatus
status,
(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
"PrincipalType" 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
principalType,
(Text
"PrincipalName" 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
principalName,
(Text
"CreatedAt" 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
createdAt,
(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
"SessionContext" Text -> AwsIamAccessKeySessionContext -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AwsIamAccessKeySessionContext -> Pair)
-> Maybe AwsIamAccessKeySessionContext -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsIamAccessKeySessionContext
sessionContext,
(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
"AccessKeyId" 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
accessKeyId
]
)