module Stratosphere.ResourceExplorer2.Index (
        Index(..), mkIndex
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Index
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resourceexplorer2-index.html>
    Index {Index -> ()
haddock_workaround_ :: (),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resourceexplorer2-index.html#cfn-resourceexplorer2-index-tags>
           Index -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-resourceexplorer2-index.html#cfn-resourceexplorer2-index-type>
           Index -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (Index -> Index -> Bool
(Index -> Index -> Bool) -> (Index -> Index -> Bool) -> Eq Index
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Index -> Index -> Bool
== :: Index -> Index -> Bool
$c/= :: Index -> Index -> Bool
/= :: Index -> Index -> Bool
Prelude.Eq, Int -> Index -> ShowS
[Index] -> ShowS
Index -> String
(Int -> Index -> ShowS)
-> (Index -> String) -> ([Index] -> ShowS) -> Show Index
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Index -> ShowS
showsPrec :: Int -> Index -> ShowS
$cshow :: Index -> String
show :: Index -> String
$cshowList :: [Index] -> ShowS
showList :: [Index] -> ShowS
Prelude.Show)
mkIndex :: Value Prelude.Text -> Index
mkIndex :: Value Text -> Index
mkIndex Value Text
type'
  = Index
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type', tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Index where
  toResourceProperties :: Index -> ResourceProperties
toResourceProperties Index {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: Index -> ()
tags :: Index -> Maybe (Map Text (Value Text))
type' :: Index -> Value Text
haddock_workaround_ :: ()
tags :: Maybe (Map Text (Value Text))
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ResourceExplorer2::Index",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Type" 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..= Value Text
type']
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags]))}
instance JSON.ToJSON Index where
  toJSON :: Index -> Value
toJSON Index {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: Index -> ()
tags :: Index -> Maybe (Map Text (Value Text))
type' :: Index -> Value Text
haddock_workaround_ :: ()
tags :: Maybe (Map Text (Value Text))
type' :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Type" 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..= Value Text
type']
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags])))
instance Property "Tags" Index where
  type PropertyType "Tags" Index = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Tags" Index -> Index -> Index
set PropertyType "Tags" Index
newValue Index {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: Index -> ()
tags :: Index -> Maybe (Map Text (Value Text))
type' :: Index -> Value Text
haddock_workaround_ :: ()
tags :: Maybe (Map Text (Value Text))
type' :: Value Text
..} = Index {tags :: Maybe (Map Text (Value Text))
tags = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Tags" Index
newValue, ()
Value Text
haddock_workaround_ :: ()
type' :: Value Text
haddock_workaround_ :: ()
type' :: Value Text
..}
instance Property "Type" Index where
  type PropertyType "Type" Index = Value Prelude.Text
  set :: PropertyType "Type" Index -> Index -> Index
set PropertyType "Type" Index
newValue Index {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: Index -> ()
tags :: Index -> Maybe (Map Text (Value Text))
type' :: Index -> Value Text
haddock_workaround_ :: ()
tags :: Maybe (Map Text (Value Text))
type' :: Value Text
..} = Index {type' :: Value Text
type' = PropertyType "Type" Index
Value Text
newValue, Maybe (Map Text (Value Text))
()
haddock_workaround_ :: ()
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
tags :: Maybe (Map Text (Value Text))
..}