{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SecurityHub.Types.AwsIamAccessKeySessionContextSessionIssuer
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SecurityHub.Types.AwsIamAccessKeySessionContextSessionIssuer where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about the entity that created the session.
--
-- /See:/ 'newAwsIamAccessKeySessionContextSessionIssuer' smart constructor.
data AwsIamAccessKeySessionContextSessionIssuer = AwsIamAccessKeySessionContextSessionIssuer'
  { -- | The principal ID of the principal (user, role, or group) that created
    -- the session.
    AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
principalId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the session.
    AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The name of the principal that created the session.
    AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
userName :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the Amazon Web Services account that created the
    -- session.
    AwsIamAccessKeySessionContextSessionIssuer -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | The type of principal (user, role, or group) that created the session.
    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)

-- |
-- Create a value of 'AwsIamAccessKeySessionContextSessionIssuer' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'principalId', 'awsIamAccessKeySessionContextSessionIssuer_principalId' - The principal ID of the principal (user, role, or group) that created
-- the session.
--
-- 'arn', 'awsIamAccessKeySessionContextSessionIssuer_arn' - The ARN of the session.
--
-- 'userName', 'awsIamAccessKeySessionContextSessionIssuer_userName' - The name of the principal that created the session.
--
-- 'accountId', 'awsIamAccessKeySessionContextSessionIssuer_accountId' - The identifier of the Amazon Web Services account that created the
-- session.
--
-- 'type'', 'awsIamAccessKeySessionContextSessionIssuer_type' - The type of principal (user, role, or group) that created the session.
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
    }

-- | The principal ID of the principal (user, role, or group) that created
-- the session.
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)

-- | The ARN of the session.
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)

-- | The name of the principal that created the session.
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)

-- | The identifier of the Amazon Web Services account that created the
-- session.
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)

-- | The type of principal (user, role, or group) that created the session.
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'
            ]
        )