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