{-# 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.AwsIamInstanceProfileRole
-- 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.AwsIamInstanceProfileRole where

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

-- | Information about a role associated with an instance profile.
--
-- /See:/ 'newAwsIamInstanceProfileRole' smart constructor.
data AwsIamInstanceProfileRole = AwsIamInstanceProfileRole'
  { -- | The policy that grants an entity permission to assume the role.
    AwsIamInstanceProfileRole -> Maybe Text
assumeRolePolicyDocument :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the role.
    AwsIamInstanceProfileRole -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The path to the role.
    AwsIamInstanceProfileRole -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
    -- | Indicates when the role was created.
    --
    -- Uses the @date-time@ format specified in
    -- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
    -- The value cannot contain spaces. For example,
    -- @2020-03-22T13:22:13.933Z@.
    AwsIamInstanceProfileRole -> Maybe Text
createDate :: Prelude.Maybe Prelude.Text,
    -- | The name of the role.
    AwsIamInstanceProfileRole -> Maybe Text
roleName :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the role.
    AwsIamInstanceProfileRole -> Maybe Text
roleId :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsIamInstanceProfileRole -> AwsIamInstanceProfileRole -> Bool
(AwsIamInstanceProfileRole -> AwsIamInstanceProfileRole -> Bool)
-> (AwsIamInstanceProfileRole -> AwsIamInstanceProfileRole -> Bool)
-> Eq AwsIamInstanceProfileRole
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsIamInstanceProfileRole -> AwsIamInstanceProfileRole -> Bool
$c/= :: AwsIamInstanceProfileRole -> AwsIamInstanceProfileRole -> Bool
== :: AwsIamInstanceProfileRole -> AwsIamInstanceProfileRole -> Bool
$c== :: AwsIamInstanceProfileRole -> AwsIamInstanceProfileRole -> Bool
Prelude.Eq, ReadPrec [AwsIamInstanceProfileRole]
ReadPrec AwsIamInstanceProfileRole
Int -> ReadS AwsIamInstanceProfileRole
ReadS [AwsIamInstanceProfileRole]
(Int -> ReadS AwsIamInstanceProfileRole)
-> ReadS [AwsIamInstanceProfileRole]
-> ReadPrec AwsIamInstanceProfileRole
-> ReadPrec [AwsIamInstanceProfileRole]
-> Read AwsIamInstanceProfileRole
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsIamInstanceProfileRole]
$creadListPrec :: ReadPrec [AwsIamInstanceProfileRole]
readPrec :: ReadPrec AwsIamInstanceProfileRole
$creadPrec :: ReadPrec AwsIamInstanceProfileRole
readList :: ReadS [AwsIamInstanceProfileRole]
$creadList :: ReadS [AwsIamInstanceProfileRole]
readsPrec :: Int -> ReadS AwsIamInstanceProfileRole
$creadsPrec :: Int -> ReadS AwsIamInstanceProfileRole
Prelude.Read, Int -> AwsIamInstanceProfileRole -> ShowS
[AwsIamInstanceProfileRole] -> ShowS
AwsIamInstanceProfileRole -> String
(Int -> AwsIamInstanceProfileRole -> ShowS)
-> (AwsIamInstanceProfileRole -> String)
-> ([AwsIamInstanceProfileRole] -> ShowS)
-> Show AwsIamInstanceProfileRole
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsIamInstanceProfileRole] -> ShowS
$cshowList :: [AwsIamInstanceProfileRole] -> ShowS
show :: AwsIamInstanceProfileRole -> String
$cshow :: AwsIamInstanceProfileRole -> String
showsPrec :: Int -> AwsIamInstanceProfileRole -> ShowS
$cshowsPrec :: Int -> AwsIamInstanceProfileRole -> ShowS
Prelude.Show, (forall x.
 AwsIamInstanceProfileRole -> Rep AwsIamInstanceProfileRole x)
-> (forall x.
    Rep AwsIamInstanceProfileRole x -> AwsIamInstanceProfileRole)
-> Generic AwsIamInstanceProfileRole
forall x.
Rep AwsIamInstanceProfileRole x -> AwsIamInstanceProfileRole
forall x.
AwsIamInstanceProfileRole -> Rep AwsIamInstanceProfileRole x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsIamInstanceProfileRole x -> AwsIamInstanceProfileRole
$cfrom :: forall x.
AwsIamInstanceProfileRole -> Rep AwsIamInstanceProfileRole x
Prelude.Generic)

-- |
-- Create a value of 'AwsIamInstanceProfileRole' 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:
--
-- 'assumeRolePolicyDocument', 'awsIamInstanceProfileRole_assumeRolePolicyDocument' - The policy that grants an entity permission to assume the role.
--
-- 'arn', 'awsIamInstanceProfileRole_arn' - The ARN of the role.
--
-- 'path', 'awsIamInstanceProfileRole_path' - The path to the role.
--
-- 'createDate', 'awsIamInstanceProfileRole_createDate' - Indicates when the role was created.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
--
-- 'roleName', 'awsIamInstanceProfileRole_roleName' - The name of the role.
--
-- 'roleId', 'awsIamInstanceProfileRole_roleId' - The identifier of the role.
newAwsIamInstanceProfileRole ::
  AwsIamInstanceProfileRole
newAwsIamInstanceProfileRole :: AwsIamInstanceProfileRole
newAwsIamInstanceProfileRole =
  AwsIamInstanceProfileRole' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsIamInstanceProfileRole
AwsIamInstanceProfileRole'
    { $sel:assumeRolePolicyDocument:AwsIamInstanceProfileRole' :: Maybe Text
assumeRolePolicyDocument =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:AwsIamInstanceProfileRole' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:path:AwsIamInstanceProfileRole' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createDate:AwsIamInstanceProfileRole' :: Maybe Text
createDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleName:AwsIamInstanceProfileRole' :: Maybe Text
roleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleId:AwsIamInstanceProfileRole' :: Maybe Text
roleId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The policy that grants an entity permission to assume the role.
awsIamInstanceProfileRole_assumeRolePolicyDocument :: Lens.Lens' AwsIamInstanceProfileRole (Prelude.Maybe Prelude.Text)
awsIamInstanceProfileRole_assumeRolePolicyDocument :: (Maybe Text -> f (Maybe Text))
-> AwsIamInstanceProfileRole -> f AwsIamInstanceProfileRole
awsIamInstanceProfileRole_assumeRolePolicyDocument = (AwsIamInstanceProfileRole -> Maybe Text)
-> (AwsIamInstanceProfileRole
    -> Maybe Text -> AwsIamInstanceProfileRole)
-> Lens
     AwsIamInstanceProfileRole
     AwsIamInstanceProfileRole
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamInstanceProfileRole' {Maybe Text
assumeRolePolicyDocument :: Maybe Text
$sel:assumeRolePolicyDocument:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
assumeRolePolicyDocument} -> Maybe Text
assumeRolePolicyDocument) (\s :: AwsIamInstanceProfileRole
s@AwsIamInstanceProfileRole' {} Maybe Text
a -> AwsIamInstanceProfileRole
s {$sel:assumeRolePolicyDocument:AwsIamInstanceProfileRole' :: Maybe Text
assumeRolePolicyDocument = Maybe Text
a} :: AwsIamInstanceProfileRole)

-- | The ARN of the role.
awsIamInstanceProfileRole_arn :: Lens.Lens' AwsIamInstanceProfileRole (Prelude.Maybe Prelude.Text)
awsIamInstanceProfileRole_arn :: (Maybe Text -> f (Maybe Text))
-> AwsIamInstanceProfileRole -> f AwsIamInstanceProfileRole
awsIamInstanceProfileRole_arn = (AwsIamInstanceProfileRole -> Maybe Text)
-> (AwsIamInstanceProfileRole
    -> Maybe Text -> AwsIamInstanceProfileRole)
-> Lens
     AwsIamInstanceProfileRole
     AwsIamInstanceProfileRole
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamInstanceProfileRole' {Maybe Text
arn :: Maybe Text
$sel:arn:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
arn} -> Maybe Text
arn) (\s :: AwsIamInstanceProfileRole
s@AwsIamInstanceProfileRole' {} Maybe Text
a -> AwsIamInstanceProfileRole
s {$sel:arn:AwsIamInstanceProfileRole' :: Maybe Text
arn = Maybe Text
a} :: AwsIamInstanceProfileRole)

-- | The path to the role.
awsIamInstanceProfileRole_path :: Lens.Lens' AwsIamInstanceProfileRole (Prelude.Maybe Prelude.Text)
awsIamInstanceProfileRole_path :: (Maybe Text -> f (Maybe Text))
-> AwsIamInstanceProfileRole -> f AwsIamInstanceProfileRole
awsIamInstanceProfileRole_path = (AwsIamInstanceProfileRole -> Maybe Text)
-> (AwsIamInstanceProfileRole
    -> Maybe Text -> AwsIamInstanceProfileRole)
-> Lens
     AwsIamInstanceProfileRole
     AwsIamInstanceProfileRole
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamInstanceProfileRole' {Maybe Text
path :: Maybe Text
$sel:path:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
path} -> Maybe Text
path) (\s :: AwsIamInstanceProfileRole
s@AwsIamInstanceProfileRole' {} Maybe Text
a -> AwsIamInstanceProfileRole
s {$sel:path:AwsIamInstanceProfileRole' :: Maybe Text
path = Maybe Text
a} :: AwsIamInstanceProfileRole)

-- | Indicates when the role was created.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
awsIamInstanceProfileRole_createDate :: Lens.Lens' AwsIamInstanceProfileRole (Prelude.Maybe Prelude.Text)
awsIamInstanceProfileRole_createDate :: (Maybe Text -> f (Maybe Text))
-> AwsIamInstanceProfileRole -> f AwsIamInstanceProfileRole
awsIamInstanceProfileRole_createDate = (AwsIamInstanceProfileRole -> Maybe Text)
-> (AwsIamInstanceProfileRole
    -> Maybe Text -> AwsIamInstanceProfileRole)
-> Lens
     AwsIamInstanceProfileRole
     AwsIamInstanceProfileRole
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamInstanceProfileRole' {Maybe Text
createDate :: Maybe Text
$sel:createDate:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
createDate} -> Maybe Text
createDate) (\s :: AwsIamInstanceProfileRole
s@AwsIamInstanceProfileRole' {} Maybe Text
a -> AwsIamInstanceProfileRole
s {$sel:createDate:AwsIamInstanceProfileRole' :: Maybe Text
createDate = Maybe Text
a} :: AwsIamInstanceProfileRole)

-- | The name of the role.
awsIamInstanceProfileRole_roleName :: Lens.Lens' AwsIamInstanceProfileRole (Prelude.Maybe Prelude.Text)
awsIamInstanceProfileRole_roleName :: (Maybe Text -> f (Maybe Text))
-> AwsIamInstanceProfileRole -> f AwsIamInstanceProfileRole
awsIamInstanceProfileRole_roleName = (AwsIamInstanceProfileRole -> Maybe Text)
-> (AwsIamInstanceProfileRole
    -> Maybe Text -> AwsIamInstanceProfileRole)
-> Lens
     AwsIamInstanceProfileRole
     AwsIamInstanceProfileRole
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamInstanceProfileRole' {Maybe Text
roleName :: Maybe Text
$sel:roleName:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
roleName} -> Maybe Text
roleName) (\s :: AwsIamInstanceProfileRole
s@AwsIamInstanceProfileRole' {} Maybe Text
a -> AwsIamInstanceProfileRole
s {$sel:roleName:AwsIamInstanceProfileRole' :: Maybe Text
roleName = Maybe Text
a} :: AwsIamInstanceProfileRole)

-- | The identifier of the role.
awsIamInstanceProfileRole_roleId :: Lens.Lens' AwsIamInstanceProfileRole (Prelude.Maybe Prelude.Text)
awsIamInstanceProfileRole_roleId :: (Maybe Text -> f (Maybe Text))
-> AwsIamInstanceProfileRole -> f AwsIamInstanceProfileRole
awsIamInstanceProfileRole_roleId = (AwsIamInstanceProfileRole -> Maybe Text)
-> (AwsIamInstanceProfileRole
    -> Maybe Text -> AwsIamInstanceProfileRole)
-> Lens
     AwsIamInstanceProfileRole
     AwsIamInstanceProfileRole
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsIamInstanceProfileRole' {Maybe Text
roleId :: Maybe Text
$sel:roleId:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
roleId} -> Maybe Text
roleId) (\s :: AwsIamInstanceProfileRole
s@AwsIamInstanceProfileRole' {} Maybe Text
a -> AwsIamInstanceProfileRole
s {$sel:roleId:AwsIamInstanceProfileRole' :: Maybe Text
roleId = Maybe Text
a} :: AwsIamInstanceProfileRole)

instance Core.FromJSON AwsIamInstanceProfileRole where
  parseJSON :: Value -> Parser AwsIamInstanceProfileRole
parseJSON =
    String
-> (Object -> Parser AwsIamInstanceProfileRole)
-> Value
-> Parser AwsIamInstanceProfileRole
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsIamInstanceProfileRole"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AwsIamInstanceProfileRole
AwsIamInstanceProfileRole'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> AwsIamInstanceProfileRole)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AwsIamInstanceProfileRole)
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
"AssumeRolePolicyDocument")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AwsIamInstanceProfileRole)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AwsIamInstanceProfileRole)
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
   -> Maybe Text
   -> AwsIamInstanceProfileRole)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> AwsIamInstanceProfileRole)
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
"Path")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> AwsIamInstanceProfileRole)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> AwsIamInstanceProfileRole)
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
"CreateDate")
            Parser (Maybe Text -> Maybe Text -> AwsIamInstanceProfileRole)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsIamInstanceProfileRole)
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
"RoleName")
            Parser (Maybe Text -> AwsIamInstanceProfileRole)
-> Parser (Maybe Text) -> Parser AwsIamInstanceProfileRole
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
"RoleId")
      )

instance Prelude.Hashable AwsIamInstanceProfileRole

instance Prelude.NFData AwsIamInstanceProfileRole

instance Core.ToJSON AwsIamInstanceProfileRole where
  toJSON :: AwsIamInstanceProfileRole -> Value
toJSON AwsIamInstanceProfileRole' {Maybe Text
roleId :: Maybe Text
roleName :: Maybe Text
createDate :: Maybe Text
path :: Maybe Text
arn :: Maybe Text
assumeRolePolicyDocument :: Maybe Text
$sel:roleId:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
$sel:roleName:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
$sel:createDate:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
$sel:path:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
$sel:arn:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
$sel:assumeRolePolicyDocument:AwsIamInstanceProfileRole' :: AwsIamInstanceProfileRole -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AssumeRolePolicyDocument" 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
assumeRolePolicyDocument,
            (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
"Path" 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
path,
            (Text
"CreateDate" 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
createDate,
            (Text
"RoleName" 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
roleName,
            (Text
"RoleId" 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
roleId
          ]
      )