module Stratosphere.SMSVOICE.ProtectConfiguration.CountryRuleProperty (
        CountryRuleProperty(..), mkCountryRuleProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CountryRuleProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-smsvoice-protectconfiguration-countryrule.html>
    CountryRuleProperty {CountryRuleProperty -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-smsvoice-protectconfiguration-countryrule.html#cfn-smsvoice-protectconfiguration-countryrule-countrycode>
                         CountryRuleProperty -> Value Text
countryCode :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-smsvoice-protectconfiguration-countryrule.html#cfn-smsvoice-protectconfiguration-countryrule-protectstatus>
                         CountryRuleProperty -> Value Text
protectStatus :: (Value Prelude.Text)}
  deriving stock (CountryRuleProperty -> CountryRuleProperty -> Bool
(CountryRuleProperty -> CountryRuleProperty -> Bool)
-> (CountryRuleProperty -> CountryRuleProperty -> Bool)
-> Eq CountryRuleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CountryRuleProperty -> CountryRuleProperty -> Bool
== :: CountryRuleProperty -> CountryRuleProperty -> Bool
$c/= :: CountryRuleProperty -> CountryRuleProperty -> Bool
/= :: CountryRuleProperty -> CountryRuleProperty -> Bool
Prelude.Eq, Int -> CountryRuleProperty -> ShowS
[CountryRuleProperty] -> ShowS
CountryRuleProperty -> String
(Int -> CountryRuleProperty -> ShowS)
-> (CountryRuleProperty -> String)
-> ([CountryRuleProperty] -> ShowS)
-> Show CountryRuleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CountryRuleProperty -> ShowS
showsPrec :: Int -> CountryRuleProperty -> ShowS
$cshow :: CountryRuleProperty -> String
show :: CountryRuleProperty -> String
$cshowList :: [CountryRuleProperty] -> ShowS
showList :: [CountryRuleProperty] -> ShowS
Prelude.Show)
mkCountryRuleProperty ::
  Value Prelude.Text -> Value Prelude.Text -> CountryRuleProperty
mkCountryRuleProperty :: Value Text -> Value Text -> CountryRuleProperty
mkCountryRuleProperty Value Text
countryCode Value Text
protectStatus
  = CountryRuleProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), countryCode :: Value Text
countryCode = Value Text
countryCode,
       protectStatus :: Value Text
protectStatus = Value Text
protectStatus}
instance ToResourceProperties CountryRuleProperty where
  toResourceProperties :: CountryRuleProperty -> ResourceProperties
toResourceProperties CountryRuleProperty {()
Value Text
haddock_workaround_ :: CountryRuleProperty -> ()
countryCode :: CountryRuleProperty -> Value Text
protectStatus :: CountryRuleProperty -> Value Text
haddock_workaround_ :: ()
countryCode :: Value Text
protectStatus :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SMSVOICE::ProtectConfiguration.CountryRule",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"CountryCode" 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
countryCode,
                       Key
"ProtectStatus" 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
protectStatus]}
instance JSON.ToJSON CountryRuleProperty where
  toJSON :: CountryRuleProperty -> Value
toJSON CountryRuleProperty {()
Value Text
haddock_workaround_ :: CountryRuleProperty -> ()
countryCode :: CountryRuleProperty -> Value Text
protectStatus :: CountryRuleProperty -> Value Text
haddock_workaround_ :: ()
countryCode :: Value Text
protectStatus :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        [Key
"CountryCode" 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
countryCode,
         Key
"ProtectStatus" 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
protectStatus]
instance Property "CountryCode" CountryRuleProperty where
  type PropertyType "CountryCode" CountryRuleProperty = Value Prelude.Text
  set :: PropertyType "CountryCode" CountryRuleProperty
-> CountryRuleProperty -> CountryRuleProperty
set PropertyType "CountryCode" CountryRuleProperty
newValue CountryRuleProperty {()
Value Text
haddock_workaround_ :: CountryRuleProperty -> ()
countryCode :: CountryRuleProperty -> Value Text
protectStatus :: CountryRuleProperty -> Value Text
haddock_workaround_ :: ()
countryCode :: Value Text
protectStatus :: Value Text
..}
    = CountryRuleProperty {countryCode :: Value Text
countryCode = PropertyType "CountryCode" CountryRuleProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
protectStatus :: Value Text
haddock_workaround_ :: ()
protectStatus :: Value Text
..}
instance Property "ProtectStatus" CountryRuleProperty where
  type PropertyType "ProtectStatus" CountryRuleProperty = Value Prelude.Text
  set :: PropertyType "ProtectStatus" CountryRuleProperty
-> CountryRuleProperty -> CountryRuleProperty
set PropertyType "ProtectStatus" CountryRuleProperty
newValue CountryRuleProperty {()
Value Text
haddock_workaround_ :: CountryRuleProperty -> ()
countryCode :: CountryRuleProperty -> Value Text
protectStatus :: CountryRuleProperty -> Value Text
haddock_workaround_ :: ()
countryCode :: Value Text
protectStatus :: Value Text
..}
    = CountryRuleProperty {protectStatus :: Value Text
protectStatus = PropertyType "ProtectStatus" CountryRuleProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
countryCode :: Value Text
haddock_workaround_ :: ()
countryCode :: Value Text
..}