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