module Stratosphere.OpenSearchService.Domain.OffPeakWindowProperty (
        module Exports, OffPeakWindowProperty(..), mkOffPeakWindowProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.OpenSearchService.Domain.WindowStartTimeProperty as Exports
import Stratosphere.ResourceProperties
data OffPeakWindowProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-offpeakwindow.html>
    OffPeakWindowProperty {OffPeakWindowProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-offpeakwindow.html#cfn-opensearchservice-domain-offpeakwindow-windowstarttime>
                           OffPeakWindowProperty -> Maybe WindowStartTimeProperty
windowStartTime :: (Prelude.Maybe WindowStartTimeProperty)}
  deriving stock (OffPeakWindowProperty -> OffPeakWindowProperty -> Bool
(OffPeakWindowProperty -> OffPeakWindowProperty -> Bool)
-> (OffPeakWindowProperty -> OffPeakWindowProperty -> Bool)
-> Eq OffPeakWindowProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OffPeakWindowProperty -> OffPeakWindowProperty -> Bool
== :: OffPeakWindowProperty -> OffPeakWindowProperty -> Bool
$c/= :: OffPeakWindowProperty -> OffPeakWindowProperty -> Bool
/= :: OffPeakWindowProperty -> OffPeakWindowProperty -> Bool
Prelude.Eq, Int -> OffPeakWindowProperty -> ShowS
[OffPeakWindowProperty] -> ShowS
OffPeakWindowProperty -> String
(Int -> OffPeakWindowProperty -> ShowS)
-> (OffPeakWindowProperty -> String)
-> ([OffPeakWindowProperty] -> ShowS)
-> Show OffPeakWindowProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OffPeakWindowProperty -> ShowS
showsPrec :: Int -> OffPeakWindowProperty -> ShowS
$cshow :: OffPeakWindowProperty -> String
show :: OffPeakWindowProperty -> String
$cshowList :: [OffPeakWindowProperty] -> ShowS
showList :: [OffPeakWindowProperty] -> ShowS
Prelude.Show)
mkOffPeakWindowProperty :: OffPeakWindowProperty
mkOffPeakWindowProperty :: OffPeakWindowProperty
mkOffPeakWindowProperty
  = OffPeakWindowProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), windowStartTime :: Maybe WindowStartTimeProperty
windowStartTime = Maybe WindowStartTimeProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OffPeakWindowProperty where
  toResourceProperties :: OffPeakWindowProperty -> ResourceProperties
toResourceProperties OffPeakWindowProperty {Maybe WindowStartTimeProperty
()
haddock_workaround_ :: OffPeakWindowProperty -> ()
windowStartTime :: OffPeakWindowProperty -> Maybe WindowStartTimeProperty
haddock_workaround_ :: ()
windowStartTime :: Maybe WindowStartTimeProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpenSearchService::Domain.OffPeakWindow",
         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 -> WindowStartTimeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"WindowStartTime" (WindowStartTimeProperty -> (Key, Value))
-> Maybe WindowStartTimeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WindowStartTimeProperty
windowStartTime])}
instance JSON.ToJSON OffPeakWindowProperty where
  toJSON :: OffPeakWindowProperty -> Value
toJSON OffPeakWindowProperty {Maybe WindowStartTimeProperty
()
haddock_workaround_ :: OffPeakWindowProperty -> ()
windowStartTime :: OffPeakWindowProperty -> Maybe WindowStartTimeProperty
haddock_workaround_ :: ()
windowStartTime :: Maybe WindowStartTimeProperty
..}
    = [(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 -> WindowStartTimeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"WindowStartTime" (WindowStartTimeProperty -> (Key, Value))
-> Maybe WindowStartTimeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WindowStartTimeProperty
windowStartTime]))
instance Property "WindowStartTime" OffPeakWindowProperty where
  type PropertyType "WindowStartTime" OffPeakWindowProperty = WindowStartTimeProperty
  set :: PropertyType "WindowStartTime" OffPeakWindowProperty
-> OffPeakWindowProperty -> OffPeakWindowProperty
set PropertyType "WindowStartTime" OffPeakWindowProperty
newValue OffPeakWindowProperty {Maybe WindowStartTimeProperty
()
haddock_workaround_ :: OffPeakWindowProperty -> ()
windowStartTime :: OffPeakWindowProperty -> Maybe WindowStartTimeProperty
haddock_workaround_ :: ()
windowStartTime :: Maybe WindowStartTimeProperty
..}
    = OffPeakWindowProperty
        {windowStartTime :: Maybe WindowStartTimeProperty
windowStartTime = WindowStartTimeProperty -> Maybe WindowStartTimeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "WindowStartTime" OffPeakWindowProperty
WindowStartTimeProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}