module Stratosphere.OpenSearchService.Domain.OffPeakWindowOptionsProperty (
module Exports, OffPeakWindowOptionsProperty(..),
mkOffPeakWindowOptionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.OpenSearchService.Domain.OffPeakWindowProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data OffPeakWindowOptionsProperty
=
OffPeakWindowOptionsProperty {OffPeakWindowOptionsProperty -> ()
haddock_workaround_ :: (),
OffPeakWindowOptionsProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
OffPeakWindowOptionsProperty -> Maybe OffPeakWindowProperty
offPeakWindow :: (Prelude.Maybe OffPeakWindowProperty)}
deriving stock (OffPeakWindowOptionsProperty
-> OffPeakWindowOptionsProperty -> Bool
(OffPeakWindowOptionsProperty
-> OffPeakWindowOptionsProperty -> Bool)
-> (OffPeakWindowOptionsProperty
-> OffPeakWindowOptionsProperty -> Bool)
-> Eq OffPeakWindowOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OffPeakWindowOptionsProperty
-> OffPeakWindowOptionsProperty -> Bool
== :: OffPeakWindowOptionsProperty
-> OffPeakWindowOptionsProperty -> Bool
$c/= :: OffPeakWindowOptionsProperty
-> OffPeakWindowOptionsProperty -> Bool
/= :: OffPeakWindowOptionsProperty
-> OffPeakWindowOptionsProperty -> Bool
Prelude.Eq, Int -> OffPeakWindowOptionsProperty -> ShowS
[OffPeakWindowOptionsProperty] -> ShowS
OffPeakWindowOptionsProperty -> String
(Int -> OffPeakWindowOptionsProperty -> ShowS)
-> (OffPeakWindowOptionsProperty -> String)
-> ([OffPeakWindowOptionsProperty] -> ShowS)
-> Show OffPeakWindowOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OffPeakWindowOptionsProperty -> ShowS
showsPrec :: Int -> OffPeakWindowOptionsProperty -> ShowS
$cshow :: OffPeakWindowOptionsProperty -> String
show :: OffPeakWindowOptionsProperty -> String
$cshowList :: [OffPeakWindowOptionsProperty] -> ShowS
showList :: [OffPeakWindowOptionsProperty] -> ShowS
Prelude.Show)
mkOffPeakWindowOptionsProperty :: OffPeakWindowOptionsProperty
mkOffPeakWindowOptionsProperty :: OffPeakWindowOptionsProperty
mkOffPeakWindowOptionsProperty
= OffPeakWindowOptionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
offPeakWindow :: Maybe OffPeakWindowProperty
offPeakWindow = Maybe OffPeakWindowProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OffPeakWindowOptionsProperty where
toResourceProperties :: OffPeakWindowOptionsProperty -> ResourceProperties
toResourceProperties OffPeakWindowOptionsProperty {Maybe (Value Bool)
Maybe OffPeakWindowProperty
()
haddock_workaround_ :: OffPeakWindowOptionsProperty -> ()
enabled :: OffPeakWindowOptionsProperty -> Maybe (Value Bool)
offPeakWindow :: OffPeakWindowOptionsProperty -> Maybe OffPeakWindowProperty
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
offPeakWindow :: Maybe OffPeakWindowProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::OpenSearchService::Domain.OffPeakWindowOptions",
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 -> OffPeakWindowProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OffPeakWindow" (OffPeakWindowProperty -> (Key, Value))
-> Maybe OffPeakWindowProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OffPeakWindowProperty
offPeakWindow])}
instance JSON.ToJSON OffPeakWindowOptionsProperty where
toJSON :: OffPeakWindowOptionsProperty -> Value
toJSON OffPeakWindowOptionsProperty {Maybe (Value Bool)
Maybe OffPeakWindowProperty
()
haddock_workaround_ :: OffPeakWindowOptionsProperty -> ()
enabled :: OffPeakWindowOptionsProperty -> Maybe (Value Bool)
offPeakWindow :: OffPeakWindowOptionsProperty -> Maybe OffPeakWindowProperty
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
offPeakWindow :: Maybe OffPeakWindowProperty
..}
= [(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 -> OffPeakWindowProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OffPeakWindow" (OffPeakWindowProperty -> (Key, Value))
-> Maybe OffPeakWindowProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OffPeakWindowProperty
offPeakWindow]))
instance Property "Enabled" OffPeakWindowOptionsProperty where
type PropertyType "Enabled" OffPeakWindowOptionsProperty = Value Prelude.Bool
set :: PropertyType "Enabled" OffPeakWindowOptionsProperty
-> OffPeakWindowOptionsProperty -> OffPeakWindowOptionsProperty
set PropertyType "Enabled" OffPeakWindowOptionsProperty
newValue OffPeakWindowOptionsProperty {Maybe (Value Bool)
Maybe OffPeakWindowProperty
()
haddock_workaround_ :: OffPeakWindowOptionsProperty -> ()
enabled :: OffPeakWindowOptionsProperty -> Maybe (Value Bool)
offPeakWindow :: OffPeakWindowOptionsProperty -> Maybe OffPeakWindowProperty
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
offPeakWindow :: Maybe OffPeakWindowProperty
..}
= OffPeakWindowOptionsProperty
{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" OffPeakWindowOptionsProperty
Value Bool
newValue, Maybe OffPeakWindowProperty
()
haddock_workaround_ :: ()
offPeakWindow :: Maybe OffPeakWindowProperty
haddock_workaround_ :: ()
offPeakWindow :: Maybe OffPeakWindowProperty
..}
instance Property "OffPeakWindow" OffPeakWindowOptionsProperty where
type PropertyType "OffPeakWindow" OffPeakWindowOptionsProperty = OffPeakWindowProperty
set :: PropertyType "OffPeakWindow" OffPeakWindowOptionsProperty
-> OffPeakWindowOptionsProperty -> OffPeakWindowOptionsProperty
set PropertyType "OffPeakWindow" OffPeakWindowOptionsProperty
newValue OffPeakWindowOptionsProperty {Maybe (Value Bool)
Maybe OffPeakWindowProperty
()
haddock_workaround_ :: OffPeakWindowOptionsProperty -> ()
enabled :: OffPeakWindowOptionsProperty -> Maybe (Value Bool)
offPeakWindow :: OffPeakWindowOptionsProperty -> Maybe OffPeakWindowProperty
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
offPeakWindow :: Maybe OffPeakWindowProperty
..}
= OffPeakWindowOptionsProperty
{offPeakWindow :: Maybe OffPeakWindowProperty
offPeakWindow = OffPeakWindowProperty -> Maybe OffPeakWindowProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "OffPeakWindow" OffPeakWindowOptionsProperty
OffPeakWindowProperty
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}