module Stratosphere.Budgets.Budget.ResourceTagProperty (
        ResourceTagProperty(..), mkResourceTagProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ResourceTagProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-resourcetag.html>
    ResourceTagProperty {ResourceTagProperty -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-resourcetag.html#cfn-budgets-budget-resourcetag-key>
                         ResourceTagProperty -> Value Text
key :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-resourcetag.html#cfn-budgets-budget-resourcetag-value>
                         ResourceTagProperty -> Maybe (Value Text)
value :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ResourceTagProperty -> ResourceTagProperty -> Bool
(ResourceTagProperty -> ResourceTagProperty -> Bool)
-> (ResourceTagProperty -> ResourceTagProperty -> Bool)
-> Eq ResourceTagProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ResourceTagProperty -> ResourceTagProperty -> Bool
== :: ResourceTagProperty -> ResourceTagProperty -> Bool
$c/= :: ResourceTagProperty -> ResourceTagProperty -> Bool
/= :: ResourceTagProperty -> ResourceTagProperty -> Bool
Prelude.Eq, Int -> ResourceTagProperty -> ShowS
[ResourceTagProperty] -> ShowS
ResourceTagProperty -> String
(Int -> ResourceTagProperty -> ShowS)
-> (ResourceTagProperty -> String)
-> ([ResourceTagProperty] -> ShowS)
-> Show ResourceTagProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ResourceTagProperty -> ShowS
showsPrec :: Int -> ResourceTagProperty -> ShowS
$cshow :: ResourceTagProperty -> String
show :: ResourceTagProperty -> String
$cshowList :: [ResourceTagProperty] -> ShowS
showList :: [ResourceTagProperty] -> ShowS
Prelude.Show)
mkResourceTagProperty :: Value Prelude.Text -> ResourceTagProperty
mkResourceTagProperty :: Value Text -> ResourceTagProperty
mkResourceTagProperty Value Text
key
  = ResourceTagProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), key :: Value Text
key = Value Text
key, value :: Maybe (Value Text)
value = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ResourceTagProperty where
  toResourceProperties :: ResourceTagProperty -> ResourceProperties
toResourceProperties ResourceTagProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ResourceTagProperty -> ()
key :: ResourceTagProperty -> Value Text
value :: ResourceTagProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Value Text
value :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Budgets::Budget.ResourceTag",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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
"Key" 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
key]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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
"Value" (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)
value]))}
instance JSON.ToJSON ResourceTagProperty where
  toJSON :: ResourceTagProperty -> Value
toJSON ResourceTagProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ResourceTagProperty -> ()
key :: ResourceTagProperty -> Value Text
value :: ResourceTagProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Value Text
value :: Maybe (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
"Key" 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
key]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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
"Value" (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)
value])))
instance Property "Key" ResourceTagProperty where
  type PropertyType "Key" ResourceTagProperty = Value Prelude.Text
  set :: PropertyType "Key" ResourceTagProperty
-> ResourceTagProperty -> ResourceTagProperty
set PropertyType "Key" ResourceTagProperty
newValue ResourceTagProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ResourceTagProperty -> ()
key :: ResourceTagProperty -> Value Text
value :: ResourceTagProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Value Text
value :: Maybe (Value Text)
..}
    = ResourceTagProperty {key :: Value Text
key = PropertyType "Key" ResourceTagProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
value :: Maybe (Value Text)
haddock_workaround_ :: ()
value :: Maybe (Value Text)
..}
instance Property "Value" ResourceTagProperty where
  type PropertyType "Value" ResourceTagProperty = Value Prelude.Text
  set :: PropertyType "Value" ResourceTagProperty
-> ResourceTagProperty -> ResourceTagProperty
set PropertyType "Value" ResourceTagProperty
newValue ResourceTagProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ResourceTagProperty -> ()
key :: ResourceTagProperty -> Value Text
value :: ResourceTagProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Value Text
value :: Maybe (Value Text)
..}
    = ResourceTagProperty {value :: Maybe (Value Text)
value = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" ResourceTagProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
key :: Value Text
haddock_workaround_ :: ()
key :: Value Text
..}