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