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