{-# 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.Kendra.Types.JwtTokenTypeConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Kendra.Types.JwtTokenTypeConfiguration where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Kendra.Types.KeyLocation
import qualified Amazonka.Prelude as Prelude

-- | Provides the configuration information for the JWT token type.
--
-- /See:/ 'newJwtTokenTypeConfiguration' smart constructor.
data JwtTokenTypeConfiguration = JwtTokenTypeConfiguration'
  { -- | The regular expression that identifies the claim.
    JwtTokenTypeConfiguration -> Maybe Text
claimRegex :: Prelude.Maybe Prelude.Text,
    -- | The group attribute field.
    JwtTokenTypeConfiguration -> Maybe Text
groupAttributeField :: Prelude.Maybe Prelude.Text,
    -- | The issuer of the token.
    JwtTokenTypeConfiguration -> Maybe Text
issuer :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (arn) of the secret.
    JwtTokenTypeConfiguration -> Maybe Text
secretManagerArn :: Prelude.Maybe Prelude.Text,
    -- | The signing key URL.
    JwtTokenTypeConfiguration -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
    -- | The user name attribute field.
    JwtTokenTypeConfiguration -> Maybe Text
userNameAttributeField :: Prelude.Maybe Prelude.Text,
    -- | The location of the key.
    JwtTokenTypeConfiguration -> KeyLocation
keyLocation :: KeyLocation
  }
  deriving (JwtTokenTypeConfiguration -> JwtTokenTypeConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JwtTokenTypeConfiguration -> JwtTokenTypeConfiguration -> Bool
$c/= :: JwtTokenTypeConfiguration -> JwtTokenTypeConfiguration -> Bool
== :: JwtTokenTypeConfiguration -> JwtTokenTypeConfiguration -> Bool
$c== :: JwtTokenTypeConfiguration -> JwtTokenTypeConfiguration -> Bool
Prelude.Eq, ReadPrec [JwtTokenTypeConfiguration]
ReadPrec JwtTokenTypeConfiguration
Int -> ReadS JwtTokenTypeConfiguration
ReadS [JwtTokenTypeConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JwtTokenTypeConfiguration]
$creadListPrec :: ReadPrec [JwtTokenTypeConfiguration]
readPrec :: ReadPrec JwtTokenTypeConfiguration
$creadPrec :: ReadPrec JwtTokenTypeConfiguration
readList :: ReadS [JwtTokenTypeConfiguration]
$creadList :: ReadS [JwtTokenTypeConfiguration]
readsPrec :: Int -> ReadS JwtTokenTypeConfiguration
$creadsPrec :: Int -> ReadS JwtTokenTypeConfiguration
Prelude.Read, Int -> JwtTokenTypeConfiguration -> ShowS
[JwtTokenTypeConfiguration] -> ShowS
JwtTokenTypeConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JwtTokenTypeConfiguration] -> ShowS
$cshowList :: [JwtTokenTypeConfiguration] -> ShowS
show :: JwtTokenTypeConfiguration -> String
$cshow :: JwtTokenTypeConfiguration -> String
showsPrec :: Int -> JwtTokenTypeConfiguration -> ShowS
$cshowsPrec :: Int -> JwtTokenTypeConfiguration -> ShowS
Prelude.Show, forall x.
Rep JwtTokenTypeConfiguration x -> JwtTokenTypeConfiguration
forall x.
JwtTokenTypeConfiguration -> Rep JwtTokenTypeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep JwtTokenTypeConfiguration x -> JwtTokenTypeConfiguration
$cfrom :: forall x.
JwtTokenTypeConfiguration -> Rep JwtTokenTypeConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'JwtTokenTypeConfiguration' 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:
--
-- 'claimRegex', 'jwtTokenTypeConfiguration_claimRegex' - The regular expression that identifies the claim.
--
-- 'groupAttributeField', 'jwtTokenTypeConfiguration_groupAttributeField' - The group attribute field.
--
-- 'issuer', 'jwtTokenTypeConfiguration_issuer' - The issuer of the token.
--
-- 'secretManagerArn', 'jwtTokenTypeConfiguration_secretManagerArn' - The Amazon Resource Name (arn) of the secret.
--
-- 'url', 'jwtTokenTypeConfiguration_url' - The signing key URL.
--
-- 'userNameAttributeField', 'jwtTokenTypeConfiguration_userNameAttributeField' - The user name attribute field.
--
-- 'keyLocation', 'jwtTokenTypeConfiguration_keyLocation' - The location of the key.
newJwtTokenTypeConfiguration ::
  -- | 'keyLocation'
  KeyLocation ->
  JwtTokenTypeConfiguration
newJwtTokenTypeConfiguration :: KeyLocation -> JwtTokenTypeConfiguration
newJwtTokenTypeConfiguration KeyLocation
pKeyLocation_ =
  JwtTokenTypeConfiguration'
    { $sel:claimRegex:JwtTokenTypeConfiguration' :: Maybe Text
claimRegex =
        forall a. Maybe a
Prelude.Nothing,
      $sel:groupAttributeField:JwtTokenTypeConfiguration' :: Maybe Text
groupAttributeField = forall a. Maybe a
Prelude.Nothing,
      $sel:issuer:JwtTokenTypeConfiguration' :: Maybe Text
issuer = forall a. Maybe a
Prelude.Nothing,
      $sel:secretManagerArn:JwtTokenTypeConfiguration' :: Maybe Text
secretManagerArn = forall a. Maybe a
Prelude.Nothing,
      $sel:url:JwtTokenTypeConfiguration' :: Maybe Text
url = forall a. Maybe a
Prelude.Nothing,
      $sel:userNameAttributeField:JwtTokenTypeConfiguration' :: Maybe Text
userNameAttributeField = forall a. Maybe a
Prelude.Nothing,
      $sel:keyLocation:JwtTokenTypeConfiguration' :: KeyLocation
keyLocation = KeyLocation
pKeyLocation_
    }

-- | The regular expression that identifies the claim.
jwtTokenTypeConfiguration_claimRegex :: Lens.Lens' JwtTokenTypeConfiguration (Prelude.Maybe Prelude.Text)
jwtTokenTypeConfiguration_claimRegex :: Lens' JwtTokenTypeConfiguration (Maybe Text)
jwtTokenTypeConfiguration_claimRegex = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JwtTokenTypeConfiguration' {Maybe Text
claimRegex :: Maybe Text
$sel:claimRegex:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
claimRegex} -> Maybe Text
claimRegex) (\s :: JwtTokenTypeConfiguration
s@JwtTokenTypeConfiguration' {} Maybe Text
a -> JwtTokenTypeConfiguration
s {$sel:claimRegex:JwtTokenTypeConfiguration' :: Maybe Text
claimRegex = Maybe Text
a} :: JwtTokenTypeConfiguration)

-- | The group attribute field.
jwtTokenTypeConfiguration_groupAttributeField :: Lens.Lens' JwtTokenTypeConfiguration (Prelude.Maybe Prelude.Text)
jwtTokenTypeConfiguration_groupAttributeField :: Lens' JwtTokenTypeConfiguration (Maybe Text)
jwtTokenTypeConfiguration_groupAttributeField = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JwtTokenTypeConfiguration' {Maybe Text
groupAttributeField :: Maybe Text
$sel:groupAttributeField:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
groupAttributeField} -> Maybe Text
groupAttributeField) (\s :: JwtTokenTypeConfiguration
s@JwtTokenTypeConfiguration' {} Maybe Text
a -> JwtTokenTypeConfiguration
s {$sel:groupAttributeField:JwtTokenTypeConfiguration' :: Maybe Text
groupAttributeField = Maybe Text
a} :: JwtTokenTypeConfiguration)

-- | The issuer of the token.
jwtTokenTypeConfiguration_issuer :: Lens.Lens' JwtTokenTypeConfiguration (Prelude.Maybe Prelude.Text)
jwtTokenTypeConfiguration_issuer :: Lens' JwtTokenTypeConfiguration (Maybe Text)
jwtTokenTypeConfiguration_issuer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JwtTokenTypeConfiguration' {Maybe Text
issuer :: Maybe Text
$sel:issuer:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
issuer} -> Maybe Text
issuer) (\s :: JwtTokenTypeConfiguration
s@JwtTokenTypeConfiguration' {} Maybe Text
a -> JwtTokenTypeConfiguration
s {$sel:issuer:JwtTokenTypeConfiguration' :: Maybe Text
issuer = Maybe Text
a} :: JwtTokenTypeConfiguration)

-- | The Amazon Resource Name (arn) of the secret.
jwtTokenTypeConfiguration_secretManagerArn :: Lens.Lens' JwtTokenTypeConfiguration (Prelude.Maybe Prelude.Text)
jwtTokenTypeConfiguration_secretManagerArn :: Lens' JwtTokenTypeConfiguration (Maybe Text)
jwtTokenTypeConfiguration_secretManagerArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JwtTokenTypeConfiguration' {Maybe Text
secretManagerArn :: Maybe Text
$sel:secretManagerArn:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
secretManagerArn} -> Maybe Text
secretManagerArn) (\s :: JwtTokenTypeConfiguration
s@JwtTokenTypeConfiguration' {} Maybe Text
a -> JwtTokenTypeConfiguration
s {$sel:secretManagerArn:JwtTokenTypeConfiguration' :: Maybe Text
secretManagerArn = Maybe Text
a} :: JwtTokenTypeConfiguration)

-- | The signing key URL.
jwtTokenTypeConfiguration_url :: Lens.Lens' JwtTokenTypeConfiguration (Prelude.Maybe Prelude.Text)
jwtTokenTypeConfiguration_url :: Lens' JwtTokenTypeConfiguration (Maybe Text)
jwtTokenTypeConfiguration_url = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JwtTokenTypeConfiguration' {Maybe Text
url :: Maybe Text
$sel:url:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
url} -> Maybe Text
url) (\s :: JwtTokenTypeConfiguration
s@JwtTokenTypeConfiguration' {} Maybe Text
a -> JwtTokenTypeConfiguration
s {$sel:url:JwtTokenTypeConfiguration' :: Maybe Text
url = Maybe Text
a} :: JwtTokenTypeConfiguration)

-- | The user name attribute field.
jwtTokenTypeConfiguration_userNameAttributeField :: Lens.Lens' JwtTokenTypeConfiguration (Prelude.Maybe Prelude.Text)
jwtTokenTypeConfiguration_userNameAttributeField :: Lens' JwtTokenTypeConfiguration (Maybe Text)
jwtTokenTypeConfiguration_userNameAttributeField = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JwtTokenTypeConfiguration' {Maybe Text
userNameAttributeField :: Maybe Text
$sel:userNameAttributeField:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
userNameAttributeField} -> Maybe Text
userNameAttributeField) (\s :: JwtTokenTypeConfiguration
s@JwtTokenTypeConfiguration' {} Maybe Text
a -> JwtTokenTypeConfiguration
s {$sel:userNameAttributeField:JwtTokenTypeConfiguration' :: Maybe Text
userNameAttributeField = Maybe Text
a} :: JwtTokenTypeConfiguration)

-- | The location of the key.
jwtTokenTypeConfiguration_keyLocation :: Lens.Lens' JwtTokenTypeConfiguration KeyLocation
jwtTokenTypeConfiguration_keyLocation :: Lens' JwtTokenTypeConfiguration KeyLocation
jwtTokenTypeConfiguration_keyLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JwtTokenTypeConfiguration' {KeyLocation
keyLocation :: KeyLocation
$sel:keyLocation:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> KeyLocation
keyLocation} -> KeyLocation
keyLocation) (\s :: JwtTokenTypeConfiguration
s@JwtTokenTypeConfiguration' {} KeyLocation
a -> JwtTokenTypeConfiguration
s {$sel:keyLocation:JwtTokenTypeConfiguration' :: KeyLocation
keyLocation = KeyLocation
a} :: JwtTokenTypeConfiguration)

instance Data.FromJSON JwtTokenTypeConfiguration where
  parseJSON :: Value -> Parser JwtTokenTypeConfiguration
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"JwtTokenTypeConfiguration"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> KeyLocation
-> JwtTokenTypeConfiguration
JwtTokenTypeConfiguration'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ClaimRegex")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GroupAttributeField")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Issuer")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SecretManagerArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"URL")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UserNameAttributeField")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"KeyLocation")
      )

instance Prelude.Hashable JwtTokenTypeConfiguration where
  hashWithSalt :: Int -> JwtTokenTypeConfiguration -> Int
hashWithSalt Int
_salt JwtTokenTypeConfiguration' {Maybe Text
KeyLocation
keyLocation :: KeyLocation
userNameAttributeField :: Maybe Text
url :: Maybe Text
secretManagerArn :: Maybe Text
issuer :: Maybe Text
groupAttributeField :: Maybe Text
claimRegex :: Maybe Text
$sel:keyLocation:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> KeyLocation
$sel:userNameAttributeField:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:url:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:secretManagerArn:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:issuer:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:groupAttributeField:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:claimRegex:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
claimRegex
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupAttributeField
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
issuer
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secretManagerArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
url
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userNameAttributeField
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` KeyLocation
keyLocation

instance Prelude.NFData JwtTokenTypeConfiguration where
  rnf :: JwtTokenTypeConfiguration -> ()
rnf JwtTokenTypeConfiguration' {Maybe Text
KeyLocation
keyLocation :: KeyLocation
userNameAttributeField :: Maybe Text
url :: Maybe Text
secretManagerArn :: Maybe Text
issuer :: Maybe Text
groupAttributeField :: Maybe Text
claimRegex :: Maybe Text
$sel:keyLocation:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> KeyLocation
$sel:userNameAttributeField:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:url:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:secretManagerArn:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:issuer:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:groupAttributeField:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:claimRegex:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
claimRegex
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupAttributeField
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
issuer
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
secretManagerArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
url
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userNameAttributeField
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf KeyLocation
keyLocation

instance Data.ToJSON JwtTokenTypeConfiguration where
  toJSON :: JwtTokenTypeConfiguration -> Value
toJSON JwtTokenTypeConfiguration' {Maybe Text
KeyLocation
keyLocation :: KeyLocation
userNameAttributeField :: Maybe Text
url :: Maybe Text
secretManagerArn :: Maybe Text
issuer :: Maybe Text
groupAttributeField :: Maybe Text
claimRegex :: Maybe Text
$sel:keyLocation:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> KeyLocation
$sel:userNameAttributeField:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:url:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:secretManagerArn:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:issuer:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:groupAttributeField:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
$sel:claimRegex:JwtTokenTypeConfiguration' :: JwtTokenTypeConfiguration -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ClaimRegex" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
claimRegex,
            (Key
"GroupAttributeField" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
groupAttributeField,
            (Key
"Issuer" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
issuer,
            (Key
"SecretManagerArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
secretManagerArn,
            (Key
"URL" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
url,
            (Key
"UserNameAttributeField" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
userNameAttributeField,
            forall a. a -> Maybe a
Prelude.Just (Key
"KeyLocation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= KeyLocation
keyLocation)
          ]
      )