module Stratosphere.Elasticsearch.Domain.EncryptionAtRestOptionsProperty (
EncryptionAtRestOptionsProperty(..),
mkEncryptionAtRestOptionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EncryptionAtRestOptionsProperty
=
EncryptionAtRestOptionsProperty {EncryptionAtRestOptionsProperty -> ()
haddock_workaround_ :: (),
EncryptionAtRestOptionsProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
EncryptionAtRestOptionsProperty -> Maybe (Value Text)
kmsKeyId :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (EncryptionAtRestOptionsProperty
-> EncryptionAtRestOptionsProperty -> Bool
(EncryptionAtRestOptionsProperty
-> EncryptionAtRestOptionsProperty -> Bool)
-> (EncryptionAtRestOptionsProperty
-> EncryptionAtRestOptionsProperty -> Bool)
-> Eq EncryptionAtRestOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EncryptionAtRestOptionsProperty
-> EncryptionAtRestOptionsProperty -> Bool
== :: EncryptionAtRestOptionsProperty
-> EncryptionAtRestOptionsProperty -> Bool
$c/= :: EncryptionAtRestOptionsProperty
-> EncryptionAtRestOptionsProperty -> Bool
/= :: EncryptionAtRestOptionsProperty
-> EncryptionAtRestOptionsProperty -> Bool
Prelude.Eq, Int -> EncryptionAtRestOptionsProperty -> ShowS
[EncryptionAtRestOptionsProperty] -> ShowS
EncryptionAtRestOptionsProperty -> String
(Int -> EncryptionAtRestOptionsProperty -> ShowS)
-> (EncryptionAtRestOptionsProperty -> String)
-> ([EncryptionAtRestOptionsProperty] -> ShowS)
-> Show EncryptionAtRestOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EncryptionAtRestOptionsProperty -> ShowS
showsPrec :: Int -> EncryptionAtRestOptionsProperty -> ShowS
$cshow :: EncryptionAtRestOptionsProperty -> String
show :: EncryptionAtRestOptionsProperty -> String
$cshowList :: [EncryptionAtRestOptionsProperty] -> ShowS
showList :: [EncryptionAtRestOptionsProperty] -> ShowS
Prelude.Show)
mkEncryptionAtRestOptionsProperty ::
EncryptionAtRestOptionsProperty
mkEncryptionAtRestOptionsProperty :: EncryptionAtRestOptionsProperty
mkEncryptionAtRestOptionsProperty
= EncryptionAtRestOptionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
kmsKeyId :: Maybe (Value Text)
kmsKeyId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EncryptionAtRestOptionsProperty where
toResourceProperties :: EncryptionAtRestOptionsProperty -> ResourceProperties
toResourceProperties EncryptionAtRestOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EncryptionAtRestOptionsProperty -> ()
enabled :: EncryptionAtRestOptionsProperty -> Maybe (Value Bool)
kmsKeyId :: EncryptionAtRestOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
kmsKeyId :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Elasticsearch::Domain.EncryptionAtRestOptions",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KmsKeyId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
kmsKeyId])}
instance JSON.ToJSON EncryptionAtRestOptionsProperty where
toJSON :: EncryptionAtRestOptionsProperty -> Value
toJSON EncryptionAtRestOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EncryptionAtRestOptionsProperty -> ()
enabled :: EncryptionAtRestOptionsProperty -> Maybe (Value Bool)
kmsKeyId :: EncryptionAtRestOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
kmsKeyId :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KmsKeyId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
kmsKeyId]))
instance Property "Enabled" EncryptionAtRestOptionsProperty where
type PropertyType "Enabled" EncryptionAtRestOptionsProperty = Value Prelude.Bool
set :: PropertyType "Enabled" EncryptionAtRestOptionsProperty
-> EncryptionAtRestOptionsProperty
-> EncryptionAtRestOptionsProperty
set PropertyType "Enabled" EncryptionAtRestOptionsProperty
newValue EncryptionAtRestOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EncryptionAtRestOptionsProperty -> ()
enabled :: EncryptionAtRestOptionsProperty -> Maybe (Value Bool)
kmsKeyId :: EncryptionAtRestOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
kmsKeyId :: Maybe (Value Text)
..}
= EncryptionAtRestOptionsProperty
{enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" EncryptionAtRestOptionsProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
..}
instance Property "KmsKeyId" EncryptionAtRestOptionsProperty where
type PropertyType "KmsKeyId" EncryptionAtRestOptionsProperty = Value Prelude.Text
set :: PropertyType "KmsKeyId" EncryptionAtRestOptionsProperty
-> EncryptionAtRestOptionsProperty
-> EncryptionAtRestOptionsProperty
set PropertyType "KmsKeyId" EncryptionAtRestOptionsProperty
newValue EncryptionAtRestOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EncryptionAtRestOptionsProperty -> ()
enabled :: EncryptionAtRestOptionsProperty -> Maybe (Value Bool)
kmsKeyId :: EncryptionAtRestOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
kmsKeyId :: Maybe (Value Text)
..}
= EncryptionAtRestOptionsProperty
{kmsKeyId :: Maybe (Value Text)
kmsKeyId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KmsKeyId" EncryptionAtRestOptionsProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}