{-# 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.MediaConnect.Types.Encryption
-- 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.MediaConnect.Types.Encryption where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConnect.Types.Algorithm
import Amazonka.MediaConnect.Types.KeyType
import qualified Amazonka.Prelude as Prelude

-- | Information about the encryption of the flow.
--
-- /See:/ 'newEncryption' smart constructor.
data Encryption = Encryption'
  { -- | The type of algorithm that is used for the encryption (such as aes128,
    -- aes192, or aes256).
    Encryption -> Maybe Algorithm
algorithm :: Prelude.Maybe Algorithm,
    -- | A 128-bit, 16-byte hex value represented by a 32-character string, to be
    -- used with the key for encrypting content. This parameter is not valid
    -- for static key encryption.
    Encryption -> Maybe Text
constantInitializationVector :: Prelude.Maybe Prelude.Text,
    -- | The value of one of the devices that you configured with your digital
    -- rights management (DRM) platform key provider. This parameter is
    -- required for SPEKE encryption and is not valid for static key
    -- encryption.
    Encryption -> Maybe Text
deviceId :: Prelude.Maybe Prelude.Text,
    -- | The type of key that is used for the encryption. If no keyType is
    -- provided, the service will use the default setting (static-key).
    Encryption -> Maybe KeyType
keyType :: Prelude.Maybe KeyType,
    -- | The AWS Region that the API Gateway proxy endpoint was created in. This
    -- parameter is required for SPEKE encryption and is not valid for static
    -- key encryption.
    Encryption -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
    -- | An identifier for the content. The service sends this value to the key
    -- server to identify the current endpoint. The resource ID is also known
    -- as the content ID. This parameter is required for SPEKE encryption and
    -- is not valid for static key encryption.
    Encryption -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the secret that you created in AWS Secrets Manager to store
    -- the encryption key. This parameter is required for static key encryption
    -- and is not valid for SPEKE encryption.
    Encryption -> Maybe Text
secretArn :: Prelude.Maybe Prelude.Text,
    -- | The URL from the API Gateway proxy that you set up to talk to your key
    -- server. This parameter is required for SPEKE encryption and is not valid
    -- for static key encryption.
    Encryption -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the role that you created during setup (when you set up AWS
    -- Elemental MediaConnect as a trusted entity).
    Encryption -> Text
roleArn :: Prelude.Text
  }
  deriving (Encryption -> Encryption -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Encryption -> Encryption -> Bool
$c/= :: Encryption -> Encryption -> Bool
== :: Encryption -> Encryption -> Bool
$c== :: Encryption -> Encryption -> Bool
Prelude.Eq, ReadPrec [Encryption]
ReadPrec Encryption
Int -> ReadS Encryption
ReadS [Encryption]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Encryption]
$creadListPrec :: ReadPrec [Encryption]
readPrec :: ReadPrec Encryption
$creadPrec :: ReadPrec Encryption
readList :: ReadS [Encryption]
$creadList :: ReadS [Encryption]
readsPrec :: Int -> ReadS Encryption
$creadsPrec :: Int -> ReadS Encryption
Prelude.Read, Int -> Encryption -> ShowS
[Encryption] -> ShowS
Encryption -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Encryption] -> ShowS
$cshowList :: [Encryption] -> ShowS
show :: Encryption -> String
$cshow :: Encryption -> String
showsPrec :: Int -> Encryption -> ShowS
$cshowsPrec :: Int -> Encryption -> ShowS
Prelude.Show, forall x. Rep Encryption x -> Encryption
forall x. Encryption -> Rep Encryption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Encryption x -> Encryption
$cfrom :: forall x. Encryption -> Rep Encryption x
Prelude.Generic)

-- |
-- Create a value of 'Encryption' 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:
--
-- 'algorithm', 'encryption_algorithm' - The type of algorithm that is used for the encryption (such as aes128,
-- aes192, or aes256).
--
-- 'constantInitializationVector', 'encryption_constantInitializationVector' - A 128-bit, 16-byte hex value represented by a 32-character string, to be
-- used with the key for encrypting content. This parameter is not valid
-- for static key encryption.
--
-- 'deviceId', 'encryption_deviceId' - The value of one of the devices that you configured with your digital
-- rights management (DRM) platform key provider. This parameter is
-- required for SPEKE encryption and is not valid for static key
-- encryption.
--
-- 'keyType', 'encryption_keyType' - The type of key that is used for the encryption. If no keyType is
-- provided, the service will use the default setting (static-key).
--
-- 'region', 'encryption_region' - The AWS Region that the API Gateway proxy endpoint was created in. This
-- parameter is required for SPEKE encryption and is not valid for static
-- key encryption.
--
-- 'resourceId', 'encryption_resourceId' - An identifier for the content. The service sends this value to the key
-- server to identify the current endpoint. The resource ID is also known
-- as the content ID. This parameter is required for SPEKE encryption and
-- is not valid for static key encryption.
--
-- 'secretArn', 'encryption_secretArn' - The ARN of the secret that you created in AWS Secrets Manager to store
-- the encryption key. This parameter is required for static key encryption
-- and is not valid for SPEKE encryption.
--
-- 'url', 'encryption_url' - The URL from the API Gateway proxy that you set up to talk to your key
-- server. This parameter is required for SPEKE encryption and is not valid
-- for static key encryption.
--
-- 'roleArn', 'encryption_roleArn' - The ARN of the role that you created during setup (when you set up AWS
-- Elemental MediaConnect as a trusted entity).
newEncryption ::
  -- | 'roleArn'
  Prelude.Text ->
  Encryption
newEncryption :: Text -> Encryption
newEncryption Text
pRoleArn_ =
  Encryption'
    { $sel:algorithm:Encryption' :: Maybe Algorithm
algorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:constantInitializationVector:Encryption' :: Maybe Text
constantInitializationVector = forall a. Maybe a
Prelude.Nothing,
      $sel:deviceId:Encryption' :: Maybe Text
deviceId = forall a. Maybe a
Prelude.Nothing,
      $sel:keyType:Encryption' :: Maybe KeyType
keyType = forall a. Maybe a
Prelude.Nothing,
      $sel:region:Encryption' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceId:Encryption' :: Maybe Text
resourceId = forall a. Maybe a
Prelude.Nothing,
      $sel:secretArn:Encryption' :: Maybe Text
secretArn = forall a. Maybe a
Prelude.Nothing,
      $sel:url:Encryption' :: Maybe Text
url = forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:Encryption' :: Text
roleArn = Text
pRoleArn_
    }

-- | The type of algorithm that is used for the encryption (such as aes128,
-- aes192, or aes256).
encryption_algorithm :: Lens.Lens' Encryption (Prelude.Maybe Algorithm)
encryption_algorithm :: Lens' Encryption (Maybe Algorithm)
encryption_algorithm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Encryption' {Maybe Algorithm
algorithm :: Maybe Algorithm
$sel:algorithm:Encryption' :: Encryption -> Maybe Algorithm
algorithm} -> Maybe Algorithm
algorithm) (\s :: Encryption
s@Encryption' {} Maybe Algorithm
a -> Encryption
s {$sel:algorithm:Encryption' :: Maybe Algorithm
algorithm = Maybe Algorithm
a} :: Encryption)

-- | A 128-bit, 16-byte hex value represented by a 32-character string, to be
-- used with the key for encrypting content. This parameter is not valid
-- for static key encryption.
encryption_constantInitializationVector :: Lens.Lens' Encryption (Prelude.Maybe Prelude.Text)
encryption_constantInitializationVector :: Lens' Encryption (Maybe Text)
encryption_constantInitializationVector = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Encryption' {Maybe Text
constantInitializationVector :: Maybe Text
$sel:constantInitializationVector:Encryption' :: Encryption -> Maybe Text
constantInitializationVector} -> Maybe Text
constantInitializationVector) (\s :: Encryption
s@Encryption' {} Maybe Text
a -> Encryption
s {$sel:constantInitializationVector:Encryption' :: Maybe Text
constantInitializationVector = Maybe Text
a} :: Encryption)

-- | The value of one of the devices that you configured with your digital
-- rights management (DRM) platform key provider. This parameter is
-- required for SPEKE encryption and is not valid for static key
-- encryption.
encryption_deviceId :: Lens.Lens' Encryption (Prelude.Maybe Prelude.Text)
encryption_deviceId :: Lens' Encryption (Maybe Text)
encryption_deviceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Encryption' {Maybe Text
deviceId :: Maybe Text
$sel:deviceId:Encryption' :: Encryption -> Maybe Text
deviceId} -> Maybe Text
deviceId) (\s :: Encryption
s@Encryption' {} Maybe Text
a -> Encryption
s {$sel:deviceId:Encryption' :: Maybe Text
deviceId = Maybe Text
a} :: Encryption)

-- | The type of key that is used for the encryption. If no keyType is
-- provided, the service will use the default setting (static-key).
encryption_keyType :: Lens.Lens' Encryption (Prelude.Maybe KeyType)
encryption_keyType :: Lens' Encryption (Maybe KeyType)
encryption_keyType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Encryption' {Maybe KeyType
keyType :: Maybe KeyType
$sel:keyType:Encryption' :: Encryption -> Maybe KeyType
keyType} -> Maybe KeyType
keyType) (\s :: Encryption
s@Encryption' {} Maybe KeyType
a -> Encryption
s {$sel:keyType:Encryption' :: Maybe KeyType
keyType = Maybe KeyType
a} :: Encryption)

-- | The AWS Region that the API Gateway proxy endpoint was created in. This
-- parameter is required for SPEKE encryption and is not valid for static
-- key encryption.
encryption_region :: Lens.Lens' Encryption (Prelude.Maybe Prelude.Text)
encryption_region :: Lens' Encryption (Maybe Text)
encryption_region = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Encryption' {Maybe Text
region :: Maybe Text
$sel:region:Encryption' :: Encryption -> Maybe Text
region} -> Maybe Text
region) (\s :: Encryption
s@Encryption' {} Maybe Text
a -> Encryption
s {$sel:region:Encryption' :: Maybe Text
region = Maybe Text
a} :: Encryption)

-- | An identifier for the content. The service sends this value to the key
-- server to identify the current endpoint. The resource ID is also known
-- as the content ID. This parameter is required for SPEKE encryption and
-- is not valid for static key encryption.
encryption_resourceId :: Lens.Lens' Encryption (Prelude.Maybe Prelude.Text)
encryption_resourceId :: Lens' Encryption (Maybe Text)
encryption_resourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Encryption' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:Encryption' :: Encryption -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: Encryption
s@Encryption' {} Maybe Text
a -> Encryption
s {$sel:resourceId:Encryption' :: Maybe Text
resourceId = Maybe Text
a} :: Encryption)

-- | The ARN of the secret that you created in AWS Secrets Manager to store
-- the encryption key. This parameter is required for static key encryption
-- and is not valid for SPEKE encryption.
encryption_secretArn :: Lens.Lens' Encryption (Prelude.Maybe Prelude.Text)
encryption_secretArn :: Lens' Encryption (Maybe Text)
encryption_secretArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Encryption' {Maybe Text
secretArn :: Maybe Text
$sel:secretArn:Encryption' :: Encryption -> Maybe Text
secretArn} -> Maybe Text
secretArn) (\s :: Encryption
s@Encryption' {} Maybe Text
a -> Encryption
s {$sel:secretArn:Encryption' :: Maybe Text
secretArn = Maybe Text
a} :: Encryption)

-- | The URL from the API Gateway proxy that you set up to talk to your key
-- server. This parameter is required for SPEKE encryption and is not valid
-- for static key encryption.
encryption_url :: Lens.Lens' Encryption (Prelude.Maybe Prelude.Text)
encryption_url :: Lens' Encryption (Maybe Text)
encryption_url = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Encryption' {Maybe Text
url :: Maybe Text
$sel:url:Encryption' :: Encryption -> Maybe Text
url} -> Maybe Text
url) (\s :: Encryption
s@Encryption' {} Maybe Text
a -> Encryption
s {$sel:url:Encryption' :: Maybe Text
url = Maybe Text
a} :: Encryption)

-- | The ARN of the role that you created during setup (when you set up AWS
-- Elemental MediaConnect as a trusted entity).
encryption_roleArn :: Lens.Lens' Encryption Prelude.Text
encryption_roleArn :: Lens' Encryption Text
encryption_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Encryption' {Text
roleArn :: Text
$sel:roleArn:Encryption' :: Encryption -> Text
roleArn} -> Text
roleArn) (\s :: Encryption
s@Encryption' {} Text
a -> Encryption
s {$sel:roleArn:Encryption' :: Text
roleArn = Text
a} :: Encryption)

instance Data.FromJSON Encryption where
  parseJSON :: Value -> Parser Encryption
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Encryption"
      ( \Object
x ->
          Maybe Algorithm
-> Maybe Text
-> Maybe Text
-> Maybe KeyType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Encryption
Encryption'
            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
"algorithm")
            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
"constantInitializationVector")
            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
"deviceId")
            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
"keyType")
            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
"region")
            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
"resourceId")
            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
"secretArn")
            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 a
Data..: Key
"roleArn")
      )

instance Prelude.Hashable Encryption where
  hashWithSalt :: Int -> Encryption -> Int
hashWithSalt Int
_salt Encryption' {Maybe Text
Maybe Algorithm
Maybe KeyType
Text
roleArn :: Text
url :: Maybe Text
secretArn :: Maybe Text
resourceId :: Maybe Text
region :: Maybe Text
keyType :: Maybe KeyType
deviceId :: Maybe Text
constantInitializationVector :: Maybe Text
algorithm :: Maybe Algorithm
$sel:roleArn:Encryption' :: Encryption -> Text
$sel:url:Encryption' :: Encryption -> Maybe Text
$sel:secretArn:Encryption' :: Encryption -> Maybe Text
$sel:resourceId:Encryption' :: Encryption -> Maybe Text
$sel:region:Encryption' :: Encryption -> Maybe Text
$sel:keyType:Encryption' :: Encryption -> Maybe KeyType
$sel:deviceId:Encryption' :: Encryption -> Maybe Text
$sel:constantInitializationVector:Encryption' :: Encryption -> Maybe Text
$sel:algorithm:Encryption' :: Encryption -> Maybe Algorithm
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Algorithm
algorithm
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
constantInitializationVector
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deviceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe KeyType
keyType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secretArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
url
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn

instance Prelude.NFData Encryption where
  rnf :: Encryption -> ()
rnf Encryption' {Maybe Text
Maybe Algorithm
Maybe KeyType
Text
roleArn :: Text
url :: Maybe Text
secretArn :: Maybe Text
resourceId :: Maybe Text
region :: Maybe Text
keyType :: Maybe KeyType
deviceId :: Maybe Text
constantInitializationVector :: Maybe Text
algorithm :: Maybe Algorithm
$sel:roleArn:Encryption' :: Encryption -> Text
$sel:url:Encryption' :: Encryption -> Maybe Text
$sel:secretArn:Encryption' :: Encryption -> Maybe Text
$sel:resourceId:Encryption' :: Encryption -> Maybe Text
$sel:region:Encryption' :: Encryption -> Maybe Text
$sel:keyType:Encryption' :: Encryption -> Maybe KeyType
$sel:deviceId:Encryption' :: Encryption -> Maybe Text
$sel:constantInitializationVector:Encryption' :: Encryption -> Maybe Text
$sel:algorithm:Encryption' :: Encryption -> Maybe Algorithm
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Algorithm
algorithm
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
constantInitializationVector
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deviceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe KeyType
keyType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
region
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
secretArn
      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 Text
roleArn

instance Data.ToJSON Encryption where
  toJSON :: Encryption -> Value
toJSON Encryption' {Maybe Text
Maybe Algorithm
Maybe KeyType
Text
roleArn :: Text
url :: Maybe Text
secretArn :: Maybe Text
resourceId :: Maybe Text
region :: Maybe Text
keyType :: Maybe KeyType
deviceId :: Maybe Text
constantInitializationVector :: Maybe Text
algorithm :: Maybe Algorithm
$sel:roleArn:Encryption' :: Encryption -> Text
$sel:url:Encryption' :: Encryption -> Maybe Text
$sel:secretArn:Encryption' :: Encryption -> Maybe Text
$sel:resourceId:Encryption' :: Encryption -> Maybe Text
$sel:region:Encryption' :: Encryption -> Maybe Text
$sel:keyType:Encryption' :: Encryption -> Maybe KeyType
$sel:deviceId:Encryption' :: Encryption -> Maybe Text
$sel:constantInitializationVector:Encryption' :: Encryption -> Maybe Text
$sel:algorithm:Encryption' :: Encryption -> Maybe Algorithm
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"algorithm" 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 Algorithm
algorithm,
            (Key
"constantInitializationVector" 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
constantInitializationVector,
            (Key
"deviceId" 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
deviceId,
            (Key
"keyType" 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 KeyType
keyType,
            (Key
"region" 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
region,
            (Key
"resourceId" 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
resourceId,
            (Key
"secretArn" 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
secretArn,
            (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,
            forall a. a -> Maybe a
Prelude.Just (Key
"roleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleArn)
          ]
      )