{-# 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 #-}
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
data UpdateEncryption = UpdateEncryption'
{
UpdateEncryption -> Maybe KeyType
keyType :: Prelude.Maybe KeyType,
UpdateEncryption -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
UpdateEncryption -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
UpdateEncryption -> Maybe Algorithm
algorithm :: Prelude.Maybe Algorithm,
UpdateEncryption -> Maybe Text
constantInitializationVector :: Prelude.Maybe Prelude.Text,
UpdateEncryption -> Maybe Text
deviceId :: Prelude.Maybe Prelude.Text,
UpdateEncryption -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
UpdateEncryption -> Maybe Text
secretArn :: Prelude.Maybe Prelude.Text,
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)
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
}
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)
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)
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)
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)
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)
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)
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)
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)
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
]
)