module Stratosphere.CE.AnomalySubscription.SubscriberProperty (
        SubscriberProperty(..), mkSubscriberProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SubscriberProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ce-anomalysubscription-subscriber.html>
    SubscriberProperty {SubscriberProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ce-anomalysubscription-subscriber.html#cfn-ce-anomalysubscription-subscriber-address>
                        SubscriberProperty -> Value Text
address :: (Value Prelude.Text),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ce-anomalysubscription-subscriber.html#cfn-ce-anomalysubscription-subscriber-status>
                        SubscriberProperty -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ce-anomalysubscription-subscriber.html#cfn-ce-anomalysubscription-subscriber-type>
                        SubscriberProperty -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (SubscriberProperty -> SubscriberProperty -> Bool
(SubscriberProperty -> SubscriberProperty -> Bool)
-> (SubscriberProperty -> SubscriberProperty -> Bool)
-> Eq SubscriberProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SubscriberProperty -> SubscriberProperty -> Bool
== :: SubscriberProperty -> SubscriberProperty -> Bool
$c/= :: SubscriberProperty -> SubscriberProperty -> Bool
/= :: SubscriberProperty -> SubscriberProperty -> Bool
Prelude.Eq, Int -> SubscriberProperty -> ShowS
[SubscriberProperty] -> ShowS
SubscriberProperty -> String
(Int -> SubscriberProperty -> ShowS)
-> (SubscriberProperty -> String)
-> ([SubscriberProperty] -> ShowS)
-> Show SubscriberProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SubscriberProperty -> ShowS
showsPrec :: Int -> SubscriberProperty -> ShowS
$cshow :: SubscriberProperty -> String
show :: SubscriberProperty -> String
$cshowList :: [SubscriberProperty] -> ShowS
showList :: [SubscriberProperty] -> ShowS
Prelude.Show)
mkSubscriberProperty ::
  Value Prelude.Text -> Value Prelude.Text -> SubscriberProperty
mkSubscriberProperty :: Value Text -> Value Text -> SubscriberProperty
mkSubscriberProperty Value Text
address Value Text
type'
  = SubscriberProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), address :: Value Text
address = Value Text
address, type' :: Value Text
type' = Value Text
type',
       status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SubscriberProperty where
  toResourceProperties :: SubscriberProperty -> ResourceProperties
toResourceProperties SubscriberProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SubscriberProperty -> ()
address :: SubscriberProperty -> Value Text
status :: SubscriberProperty -> Maybe (Value Text)
type' :: SubscriberProperty -> Value Text
haddock_workaround_ :: ()
address :: Value Text
status :: Maybe (Value Text)
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CE::AnomalySubscription.Subscriber",
         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
"Address" 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
address, Key
"Type" 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
type']
                           ([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
"Status" (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)
status]))}
instance JSON.ToJSON SubscriberProperty where
  toJSON :: SubscriberProperty -> Value
toJSON SubscriberProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SubscriberProperty -> ()
address :: SubscriberProperty -> Value Text
status :: SubscriberProperty -> Maybe (Value Text)
type' :: SubscriberProperty -> Value Text
haddock_workaround_ :: ()
address :: Value Text
status :: Maybe (Value Text)
type' :: 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
"Address" 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
address, Key
"Type" 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
type']
              ([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
"Status" (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)
status])))
instance Property "Address" SubscriberProperty where
  type PropertyType "Address" SubscriberProperty = Value Prelude.Text
  set :: PropertyType "Address" SubscriberProperty
-> SubscriberProperty -> SubscriberProperty
set PropertyType "Address" SubscriberProperty
newValue SubscriberProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SubscriberProperty -> ()
address :: SubscriberProperty -> Value Text
status :: SubscriberProperty -> Maybe (Value Text)
type' :: SubscriberProperty -> Value Text
haddock_workaround_ :: ()
address :: Value Text
status :: Maybe (Value Text)
type' :: Value Text
..}
    = SubscriberProperty {address :: Value Text
address = PropertyType "Address" SubscriberProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
status :: Maybe (Value Text)
type' :: Value Text
haddock_workaround_ :: ()
status :: Maybe (Value Text)
type' :: Value Text
..}
instance Property "Status" SubscriberProperty where
  type PropertyType "Status" SubscriberProperty = Value Prelude.Text
  set :: PropertyType "Status" SubscriberProperty
-> SubscriberProperty -> SubscriberProperty
set PropertyType "Status" SubscriberProperty
newValue SubscriberProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SubscriberProperty -> ()
address :: SubscriberProperty -> Value Text
status :: SubscriberProperty -> Maybe (Value Text)
type' :: SubscriberProperty -> Value Text
haddock_workaround_ :: ()
address :: Value Text
status :: Maybe (Value Text)
type' :: Value Text
..}
    = SubscriberProperty {status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" SubscriberProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
address :: Value Text
type' :: Value Text
haddock_workaround_ :: ()
address :: Value Text
type' :: Value Text
..}
instance Property "Type" SubscriberProperty where
  type PropertyType "Type" SubscriberProperty = Value Prelude.Text
  set :: PropertyType "Type" SubscriberProperty
-> SubscriberProperty -> SubscriberProperty
set PropertyType "Type" SubscriberProperty
newValue SubscriberProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SubscriberProperty -> ()
address :: SubscriberProperty -> Value Text
status :: SubscriberProperty -> Maybe (Value Text)
type' :: SubscriberProperty -> Value Text
haddock_workaround_ :: ()
address :: Value Text
status :: Maybe (Value Text)
type' :: Value Text
..}
    = SubscriberProperty {type' :: Value Text
type' = PropertyType "Type" SubscriberProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
address :: Value Text
status :: Maybe (Value Text)
haddock_workaround_ :: ()
address :: Value Text
status :: Maybe (Value Text)
..}