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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 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,
    -- | 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 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,
    -- | 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 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,
    -- | 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 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
  }
  deriving (UpdateEncryption -> UpdateEncryption -> Bool
(UpdateEncryption -> UpdateEncryption -> Bool)
-> (UpdateEncryption -> UpdateEncryption -> Bool)
-> Eq UpdateEncryption
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]
(Int -> ReadS UpdateEncryption)
-> ReadS [UpdateEncryption]
-> ReadPrec UpdateEncryption
-> ReadPrec [UpdateEncryption]
-> Read 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
(Int -> UpdateEncryption -> ShowS)
-> (UpdateEncryption -> String)
-> ([UpdateEncryption] -> ShowS)
-> Show UpdateEncryption
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. UpdateEncryption -> Rep UpdateEncryption x)
-> (forall x. Rep UpdateEncryption x -> UpdateEncryption)
-> Generic UpdateEncryption
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:
--
-- '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).
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- 'roleArn', 'updateEncryption_roleArn' - The ARN of the role that you created during setup (when you set up AWS
-- Elemental MediaConnect as a trusted entity).
newUpdateEncryption ::
  UpdateEncryption
newUpdateEncryption :: UpdateEncryption
newUpdateEncryption =
  UpdateEncryption' :: Maybe KeyType
-> Maybe Text
-> Maybe Text
-> Maybe Algorithm
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> UpdateEncryption
UpdateEncryption'
    { $sel:keyType:UpdateEncryption' :: Maybe KeyType
keyType = Maybe KeyType
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceId:UpdateEncryption' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:url:UpdateEncryption' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:algorithm:UpdateEncryption' :: Maybe Algorithm
algorithm = Maybe Algorithm
forall a. Maybe a
Prelude.Nothing,
      $sel:constantInitializationVector:UpdateEncryption' :: Maybe Text
constantInitializationVector = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceId:UpdateEncryption' :: Maybe Text
deviceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:region:UpdateEncryption' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:secretArn:UpdateEncryption' :: Maybe Text
secretArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:UpdateEncryption' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: (Maybe KeyType -> f (Maybe KeyType))
-> UpdateEncryption -> f UpdateEncryption
updateEncryption_keyType = (UpdateEncryption -> Maybe KeyType)
-> (UpdateEncryption -> Maybe KeyType -> UpdateEncryption)
-> Lens
     UpdateEncryption UpdateEncryption (Maybe KeyType) (Maybe 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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateEncryption -> f UpdateEncryption
updateEncryption_resourceId = (UpdateEncryption -> Maybe Text)
-> (UpdateEncryption -> Maybe Text -> UpdateEncryption)
-> Lens UpdateEncryption UpdateEncryption (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateEncryption -> f UpdateEncryption
updateEncryption_url = (UpdateEncryption -> Maybe Text)
-> (UpdateEncryption -> Maybe Text -> UpdateEncryption)
-> Lens UpdateEncryption UpdateEncryption (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Algorithm -> f (Maybe Algorithm))
-> UpdateEncryption -> f UpdateEncryption
updateEncryption_algorithm = (UpdateEncryption -> Maybe Algorithm)
-> (UpdateEncryption -> Maybe Algorithm -> UpdateEncryption)
-> Lens
     UpdateEncryption
     UpdateEncryption
     (Maybe Algorithm)
     (Maybe 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateEncryption -> f UpdateEncryption
updateEncryption_constantInitializationVector = (UpdateEncryption -> Maybe Text)
-> (UpdateEncryption -> Maybe Text -> UpdateEncryption)
-> Lens UpdateEncryption UpdateEncryption (Maybe Text) (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> UpdateEncryption -> f UpdateEncryption
updateEncryption_deviceId = (UpdateEncryption -> Maybe Text)
-> (UpdateEncryption -> Maybe Text -> UpdateEncryption)
-> Lens UpdateEncryption UpdateEncryption (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateEncryption -> f UpdateEncryption
updateEncryption_region = (UpdateEncryption -> Maybe Text)
-> (UpdateEncryption -> Maybe Text -> UpdateEncryption)
-> Lens UpdateEncryption UpdateEncryption (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateEncryption -> f UpdateEncryption
updateEncryption_secretArn = (UpdateEncryption -> Maybe Text)
-> (UpdateEncryption -> Maybe Text -> UpdateEncryption)
-> Lens UpdateEncryption UpdateEncryption (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateEncryption -> f UpdateEncryption
updateEncryption_roleArn = (UpdateEncryption -> Maybe Text)
-> (UpdateEncryption -> Maybe Text -> UpdateEncryption)
-> Lens UpdateEncryption UpdateEncryption (Maybe Text) (Maybe Text)
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)

instance Prelude.Hashable UpdateEncryption

instance Prelude.NFData UpdateEncryption

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