module Stratosphere.ResourceGroups.Group.QueryProperty (
        module Exports, QueryProperty(..), mkQueryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ResourceGroups.Group.TagFilterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data QueryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourcegroups-group-query.html>
    QueryProperty {QueryProperty -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourcegroups-group-query.html#cfn-resourcegroups-group-query-resourcetypefilters>
                   QueryProperty -> Maybe (ValueList Text)
resourceTypeFilters :: (Prelude.Maybe (ValueList Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourcegroups-group-query.html#cfn-resourcegroups-group-query-stackidentifier>
                   QueryProperty -> Maybe (Value Text)
stackIdentifier :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourcegroups-group-query.html#cfn-resourcegroups-group-query-tagfilters>
                   QueryProperty -> Maybe [TagFilterProperty]
tagFilters :: (Prelude.Maybe [TagFilterProperty])}
  deriving stock (QueryProperty -> QueryProperty -> Bool
(QueryProperty -> QueryProperty -> Bool)
-> (QueryProperty -> QueryProperty -> Bool) -> Eq QueryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: QueryProperty -> QueryProperty -> Bool
== :: QueryProperty -> QueryProperty -> Bool
$c/= :: QueryProperty -> QueryProperty -> Bool
/= :: QueryProperty -> QueryProperty -> Bool
Prelude.Eq, Int -> QueryProperty -> ShowS
[QueryProperty] -> ShowS
QueryProperty -> String
(Int -> QueryProperty -> ShowS)
-> (QueryProperty -> String)
-> ([QueryProperty] -> ShowS)
-> Show QueryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryProperty -> ShowS
showsPrec :: Int -> QueryProperty -> ShowS
$cshow :: QueryProperty -> String
show :: QueryProperty -> String
$cshowList :: [QueryProperty] -> ShowS
showList :: [QueryProperty] -> ShowS
Prelude.Show)
mkQueryProperty :: QueryProperty
mkQueryProperty :: QueryProperty
mkQueryProperty
  = QueryProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), resourceTypeFilters :: Maybe (ValueList Text)
resourceTypeFilters = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       stackIdentifier :: Maybe (Value Text)
stackIdentifier = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tagFilters :: Maybe [TagFilterProperty]
tagFilters = Maybe [TagFilterProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties QueryProperty where
  toResourceProperties :: QueryProperty -> ResourceProperties
toResourceProperties QueryProperty {Maybe [TagFilterProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: QueryProperty -> ()
resourceTypeFilters :: QueryProperty -> Maybe (ValueList Text)
stackIdentifier :: QueryProperty -> Maybe (Value Text)
tagFilters :: QueryProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
resourceTypeFilters :: Maybe (ValueList Text)
stackIdentifier :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ResourceGroups::Group.Query",
         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 -> ValueList 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
"ResourceTypeFilters" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
resourceTypeFilters,
                            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
"StackIdentifier" (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)
stackIdentifier,
                            Key -> [TagFilterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TagFilters" ([TagFilterProperty] -> (Key, Value))
-> Maybe [TagFilterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagFilterProperty]
tagFilters])}
instance JSON.ToJSON QueryProperty where
  toJSON :: QueryProperty -> Value
toJSON QueryProperty {Maybe [TagFilterProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: QueryProperty -> ()
resourceTypeFilters :: QueryProperty -> Maybe (ValueList Text)
stackIdentifier :: QueryProperty -> Maybe (Value Text)
tagFilters :: QueryProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
resourceTypeFilters :: Maybe (ValueList Text)
stackIdentifier :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
    = [(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 -> ValueList 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
"ResourceTypeFilters" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
resourceTypeFilters,
               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
"StackIdentifier" (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)
stackIdentifier,
               Key -> [TagFilterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TagFilters" ([TagFilterProperty] -> (Key, Value))
-> Maybe [TagFilterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagFilterProperty]
tagFilters]))
instance Property "ResourceTypeFilters" QueryProperty where
  type PropertyType "ResourceTypeFilters" QueryProperty = ValueList Prelude.Text
  set :: PropertyType "ResourceTypeFilters" QueryProperty
-> QueryProperty -> QueryProperty
set PropertyType "ResourceTypeFilters" QueryProperty
newValue QueryProperty {Maybe [TagFilterProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: QueryProperty -> ()
resourceTypeFilters :: QueryProperty -> Maybe (ValueList Text)
stackIdentifier :: QueryProperty -> Maybe (Value Text)
tagFilters :: QueryProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
resourceTypeFilters :: Maybe (ValueList Text)
stackIdentifier :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
    = QueryProperty {resourceTypeFilters :: Maybe (ValueList Text)
resourceTypeFilters = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ResourceTypeFilters" QueryProperty
ValueList Text
newValue, Maybe [TagFilterProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
stackIdentifier :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
haddock_workaround_ :: ()
stackIdentifier :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
instance Property "StackIdentifier" QueryProperty where
  type PropertyType "StackIdentifier" QueryProperty = Value Prelude.Text
  set :: PropertyType "StackIdentifier" QueryProperty
-> QueryProperty -> QueryProperty
set PropertyType "StackIdentifier" QueryProperty
newValue QueryProperty {Maybe [TagFilterProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: QueryProperty -> ()
resourceTypeFilters :: QueryProperty -> Maybe (ValueList Text)
stackIdentifier :: QueryProperty -> Maybe (Value Text)
tagFilters :: QueryProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
resourceTypeFilters :: Maybe (ValueList Text)
stackIdentifier :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
    = QueryProperty {stackIdentifier :: Maybe (Value Text)
stackIdentifier = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StackIdentifier" QueryProperty
Value Text
newValue, Maybe [TagFilterProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ()
resourceTypeFilters :: Maybe (ValueList Text)
tagFilters :: Maybe [TagFilterProperty]
haddock_workaround_ :: ()
resourceTypeFilters :: Maybe (ValueList Text)
tagFilters :: Maybe [TagFilterProperty]
..}
instance Property "TagFilters" QueryProperty where
  type PropertyType "TagFilters" QueryProperty = [TagFilterProperty]
  set :: PropertyType "TagFilters" QueryProperty
-> QueryProperty -> QueryProperty
set PropertyType "TagFilters" QueryProperty
newValue QueryProperty {Maybe [TagFilterProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: QueryProperty -> ()
resourceTypeFilters :: QueryProperty -> Maybe (ValueList Text)
stackIdentifier :: QueryProperty -> Maybe (Value Text)
tagFilters :: QueryProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
resourceTypeFilters :: Maybe (ValueList Text)
stackIdentifier :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
    = QueryProperty {tagFilters :: Maybe [TagFilterProperty]
tagFilters = [TagFilterProperty] -> Maybe [TagFilterProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TagFilterProperty]
PropertyType "TagFilters" QueryProperty
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
resourceTypeFilters :: Maybe (ValueList Text)
stackIdentifier :: Maybe (Value Text)
haddock_workaround_ :: ()
resourceTypeFilters :: Maybe (ValueList Text)
stackIdentifier :: Maybe (Value Text)
..}