{-# 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.UpdateEncryption
-- 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.UpdateEncryption 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:/ 'newUpdateEncryption' smart constructor.
data UpdateEncryption = UpdateEncryption'
  { -- | The type of algorithm that is used for the encryption (such as aes128,
    -- aes192, or aes256).
    UpdateEncryption -> 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.
    UpdateEncryption -> 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.
    UpdateEncryption -> 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).
    UpdateEncryption -> 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.
    UpdateEncryption -> 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.
    UpdateEncryption -> Maybe Text
resourceId :: 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).
    UpdateEncryption -> Maybe Text
roleArn :: 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.
    UpdateEncryption -> 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.
    UpdateEncryption -> Maybe Text
url :: Prelude.Maybe Prelude.Text
  }
  deriving (UpdateEncryption -> UpdateEncryption -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEncryption -> UpdateEncryption -> Bool
$c/= :: UpdateEncryption -> UpdateEncryption -> Bool
== :: UpdateEncryption -> UpdateEncryption -> Bool
$c== :: UpdateEncryption -> UpdateEncryption -> Bool
Prelude.Eq, ReadPrec [UpdateEncryption]
ReadPrec UpdateEncryption
Int -> ReadS UpdateEncryption
ReadS [UpdateEncryption]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateEncryption]
$creadListPrec :: ReadPrec [UpdateEncryption]
readPrec :: ReadPrec UpdateEncryption
$creadPrec :: ReadPrec UpdateEncryption
readList :: ReadS [UpdateEncryption]
$creadList :: ReadS [UpdateEncryption]
readsPrec :: Int -> ReadS UpdateEncryption
$creadsPrec :: Int -> ReadS UpdateEncryption
Prelude.Read, Int -> UpdateEncryption -> ShowS
[UpdateEncryption] -> ShowS
UpdateEncryption -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEncryption] -> ShowS
$cshowList :: [UpdateEncryption] -> ShowS
show :: UpdateEncryption -> String
$cshow :: UpdateEncryption -> String
showsPrec :: Int -> UpdateEncryption -> ShowS
$cshowsPrec :: Int -> UpdateEncryption -> ShowS
Prelude.Show, forall x. Rep UpdateEncryption x -> UpdateEncryption
forall x. UpdateEncryption -> Rep UpdateEncryption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateEncryption x -> UpdateEncryption
$cfrom :: forall x. UpdateEncryption -> Rep UpdateEncryption x
Prelude.Generic)

-- |
-- Create a value of 'UpdateEncryption' 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', 'updateEncryption_algorithm' - The type of algorithm that is used for the encryption (such as aes128,
-- aes192, or aes256).
--
-- 'constantInitializationVector', 'updateEncryption_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', 'updateEncryption_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', 'updateEncryption_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', 'updateEncryption_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', 'updateEncryption_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.
--
-- 'roleArn', 'updateEncryption_roleArn' - The ARN of the role that you created during setup (when you set up AWS
-- Elemental MediaConnect as a trusted entity).
--
-- 'secretArn', 'updateEncryption_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', 'updateEncryption_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.
newUpdateEncryption ::
  UpdateEncryption
newUpdateEncryption :: UpdateEncryption
newUpdateEncryption =
  UpdateEncryption'
    { $sel:algorithm:UpdateEncryption' :: Maybe Algorithm
algorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:constantInitializationVector:UpdateEncryption' :: Maybe Text
constantInitializationVector = forall a. Maybe a
Prelude.Nothing,
      $sel:deviceId:UpdateEncryption' :: Maybe Text
deviceId = forall a. Maybe a
Prelude.Nothing,
      $sel:keyType:UpdateEncryption' :: Maybe KeyType
keyType = forall a. Maybe a
Prelude.Nothing,
      $sel:region:UpdateEncryption' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceId:UpdateEncryption' :: Maybe Text
resourceId = forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:UpdateEncryption' :: Maybe Text
roleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:secretArn:UpdateEncryption' :: Maybe Text
secretArn = forall a. Maybe a
Prelude.Nothing,
      $sel:url:UpdateEncryption' :: Maybe Text
url = forall a. Maybe a
Prelude.Nothing
    }

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

-- | 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.
updateEncryption_constantInitializationVector :: Lens.Lens' UpdateEncryption (Prelude.Maybe Prelude.Text)
updateEncryption_constantInitializationVector :: Lens' UpdateEncryption (Maybe Text)
updateEncryption_constantInitializationVector = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEncryption' {Maybe Text
constantInitializationVector :: Maybe Text
$sel:constantInitializationVector:UpdateEncryption' :: UpdateEncryption -> Maybe Text
constantInitializationVector} -> Maybe Text
constantInitializationVector) (\s :: UpdateEncryption
s@UpdateEncryption' {} Maybe Text
a -> UpdateEncryption
s {$sel:constantInitializationVector:UpdateEncryption' :: Maybe Text
constantInitializationVector = Maybe Text
a} :: UpdateEncryption)

-- | 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.
updateEncryption_deviceId :: Lens.Lens' UpdateEncryption (Prelude.Maybe Prelude.Text)
updateEncryption_deviceId :: Lens' UpdateEncryption (Maybe Text)
updateEncryption_deviceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEncryption' {Maybe Text
deviceId :: Maybe Text
$sel:deviceId:UpdateEncryption' :: UpdateEncryption -> Maybe Text
deviceId} -> Maybe Text
deviceId) (\s :: UpdateEncryption
s@UpdateEncryption' {} Maybe Text
a -> UpdateEncryption
s {$sel:deviceId:UpdateEncryption' :: Maybe Text
deviceId = Maybe Text
a} :: UpdateEncryption)

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

-- | 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.
updateEncryption_region :: Lens.Lens' UpdateEncryption (Prelude.Maybe Prelude.Text)
updateEncryption_region :: Lens' UpdateEncryption (Maybe Text)
updateEncryption_region = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEncryption' {Maybe Text
region :: Maybe Text
$sel:region:UpdateEncryption' :: UpdateEncryption -> Maybe Text
region} -> Maybe Text
region) (\s :: UpdateEncryption
s@UpdateEncryption' {} Maybe Text
a -> UpdateEncryption
s {$sel:region:UpdateEncryption' :: Maybe Text
region = Maybe Text
a} :: UpdateEncryption)

-- | 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.
updateEncryption_resourceId :: Lens.Lens' UpdateEncryption (Prelude.Maybe Prelude.Text)
updateEncryption_resourceId :: Lens' UpdateEncryption (Maybe Text)
updateEncryption_resourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEncryption' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:UpdateEncryption' :: UpdateEncryption -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: UpdateEncryption
s@UpdateEncryption' {} Maybe Text
a -> UpdateEncryption
s {$sel:resourceId:UpdateEncryption' :: Maybe Text
resourceId = Maybe Text
a} :: UpdateEncryption)

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

-- | 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.
updateEncryption_secretArn :: Lens.Lens' UpdateEncryption (Prelude.Maybe Prelude.Text)
updateEncryption_secretArn :: Lens' UpdateEncryption (Maybe Text)
updateEncryption_secretArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEncryption' {Maybe Text
secretArn :: Maybe Text
$sel:secretArn:UpdateEncryption' :: UpdateEncryption -> Maybe Text
secretArn} -> Maybe Text
secretArn) (\s :: UpdateEncryption
s@UpdateEncryption' {} Maybe Text
a -> UpdateEncryption
s {$sel:secretArn:UpdateEncryption' :: Maybe Text
secretArn = Maybe Text
a} :: UpdateEncryption)

-- | 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.
updateEncryption_url :: Lens.Lens' UpdateEncryption (Prelude.Maybe Prelude.Text)
updateEncryption_url :: Lens' UpdateEncryption (Maybe Text)
updateEncryption_url = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEncryption' {Maybe Text
url :: Maybe Text
$sel:url:UpdateEncryption' :: UpdateEncryption -> Maybe Text
url} -> Maybe Text
url) (\s :: UpdateEncryption
s@UpdateEncryption' {} Maybe Text
a -> UpdateEncryption
s {$sel:url:UpdateEncryption' :: Maybe Text
url = Maybe Text
a} :: UpdateEncryption)

instance Prelude.Hashable UpdateEncryption where
  hashWithSalt :: Int -> UpdateEncryption -> Int
hashWithSalt Int
_salt UpdateEncryption' {Maybe Text
Maybe Algorithm
Maybe KeyType
url :: Maybe Text
secretArn :: Maybe Text
roleArn :: Maybe Text
resourceId :: Maybe Text
region :: Maybe Text
keyType :: Maybe KeyType
deviceId :: Maybe Text
constantInitializationVector :: Maybe Text
algorithm :: Maybe Algorithm
$sel:url:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:secretArn:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:roleArn:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:resourceId:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:region:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:keyType:UpdateEncryption' :: UpdateEncryption -> Maybe KeyType
$sel:deviceId:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:constantInitializationVector:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:algorithm:UpdateEncryption' :: UpdateEncryption -> 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
roleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secretArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
url

instance Prelude.NFData UpdateEncryption where
  rnf :: UpdateEncryption -> ()
rnf UpdateEncryption' {Maybe Text
Maybe Algorithm
Maybe KeyType
url :: Maybe Text
secretArn :: Maybe Text
roleArn :: Maybe Text
resourceId :: Maybe Text
region :: Maybe Text
keyType :: Maybe KeyType
deviceId :: Maybe Text
constantInitializationVector :: Maybe Text
algorithm :: Maybe Algorithm
$sel:url:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:secretArn:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:roleArn:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:resourceId:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:region:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:keyType:UpdateEncryption' :: UpdateEncryption -> Maybe KeyType
$sel:deviceId:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:constantInitializationVector:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:algorithm:UpdateEncryption' :: UpdateEncryption -> 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
roleArn
      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

instance Data.ToJSON UpdateEncryption where
  toJSON :: UpdateEncryption -> Value
toJSON UpdateEncryption' {Maybe Text
Maybe Algorithm
Maybe KeyType
url :: Maybe Text
secretArn :: Maybe Text
roleArn :: Maybe Text
resourceId :: Maybe Text
region :: Maybe Text
keyType :: Maybe KeyType
deviceId :: Maybe Text
constantInitializationVector :: Maybe Text
algorithm :: Maybe Algorithm
$sel:url:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:secretArn:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:roleArn:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:resourceId:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:region:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:keyType:UpdateEncryption' :: UpdateEncryption -> Maybe KeyType
$sel:deviceId:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:constantInitializationVector:UpdateEncryption' :: UpdateEncryption -> Maybe Text
$sel:algorithm:UpdateEncryption' :: UpdateEncryption -> 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
"roleArn" 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
roleArn,
            (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
          ]
      )