module Stratosphere.Connect.Rule.FieldProperty (
        module Exports, FieldProperty(..), mkFieldProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Connect.Rule.FieldValueProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FieldProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-rule-field.html>
    FieldProperty {FieldProperty -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-rule-field.html#cfn-connect-rule-field-id>
                   FieldProperty -> Value Text
id :: (Value Prelude.Text),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-rule-field.html#cfn-connect-rule-field-value>
                   FieldProperty -> FieldValueProperty
value :: FieldValueProperty}
  deriving stock (FieldProperty -> FieldProperty -> Bool
(FieldProperty -> FieldProperty -> Bool)
-> (FieldProperty -> FieldProperty -> Bool) -> Eq FieldProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FieldProperty -> FieldProperty -> Bool
== :: FieldProperty -> FieldProperty -> Bool
$c/= :: FieldProperty -> FieldProperty -> Bool
/= :: FieldProperty -> FieldProperty -> Bool
Prelude.Eq, Int -> FieldProperty -> ShowS
[FieldProperty] -> ShowS
FieldProperty -> String
(Int -> FieldProperty -> ShowS)
-> (FieldProperty -> String)
-> ([FieldProperty] -> ShowS)
-> Show FieldProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FieldProperty -> ShowS
showsPrec :: Int -> FieldProperty -> ShowS
$cshow :: FieldProperty -> String
show :: FieldProperty -> String
$cshowList :: [FieldProperty] -> ShowS
showList :: [FieldProperty] -> ShowS
Prelude.Show)
mkFieldProperty ::
  Value Prelude.Text -> FieldValueProperty -> FieldProperty
mkFieldProperty :: Value Text -> FieldValueProperty -> FieldProperty
mkFieldProperty Value Text
id FieldValueProperty
value
  = FieldProperty {haddock_workaround_ :: ()
haddock_workaround_ = (), id :: Value Text
id = Value Text
id, value :: FieldValueProperty
value = FieldValueProperty
value}
instance ToResourceProperties FieldProperty where
  toResourceProperties :: FieldProperty -> ResourceProperties
toResourceProperties FieldProperty {()
Value Text
FieldValueProperty
haddock_workaround_ :: FieldProperty -> ()
id :: FieldProperty -> Value Text
value :: FieldProperty -> FieldValueProperty
haddock_workaround_ :: ()
id :: Value Text
value :: FieldValueProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Connect::Rule.Field",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"Id" 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
id, Key
"Value" Key -> FieldValueProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FieldValueProperty
value]}
instance JSON.ToJSON FieldProperty where
  toJSON :: FieldProperty -> Value
toJSON FieldProperty {()
Value Text
FieldValueProperty
haddock_workaround_ :: FieldProperty -> ()
id :: FieldProperty -> Value Text
value :: FieldProperty -> FieldValueProperty
haddock_workaround_ :: ()
id :: Value Text
value :: FieldValueProperty
..}
    = [(Key, Value)] -> Value
JSON.object [Key
"Id" 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
id, Key
"Value" Key -> FieldValueProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FieldValueProperty
value]
instance Property "Id" FieldProperty where
  type PropertyType "Id" FieldProperty = Value Prelude.Text
  set :: PropertyType "Id" FieldProperty -> FieldProperty -> FieldProperty
set PropertyType "Id" FieldProperty
newValue FieldProperty {()
Value Text
FieldValueProperty
haddock_workaround_ :: FieldProperty -> ()
id :: FieldProperty -> Value Text
value :: FieldProperty -> FieldValueProperty
haddock_workaround_ :: ()
id :: Value Text
value :: FieldValueProperty
..} = FieldProperty {id :: Value Text
id = PropertyType "Id" FieldProperty
Value Text
newValue, ()
FieldValueProperty
haddock_workaround_ :: ()
value :: FieldValueProperty
haddock_workaround_ :: ()
value :: FieldValueProperty
..}
instance Property "Value" FieldProperty where
  type PropertyType "Value" FieldProperty = FieldValueProperty
  set :: PropertyType "Value" FieldProperty
-> FieldProperty -> FieldProperty
set PropertyType "Value" FieldProperty
newValue FieldProperty {()
Value Text
FieldValueProperty
haddock_workaround_ :: FieldProperty -> ()
id :: FieldProperty -> Value Text
value :: FieldProperty -> FieldValueProperty
haddock_workaround_ :: ()
id :: Value Text
value :: FieldValueProperty
..}
    = FieldProperty {value :: FieldValueProperty
value = PropertyType "Value" FieldProperty
FieldValueProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
id :: Value Text
haddock_workaround_ :: ()
id :: Value Text
..}