module Stratosphere.ConnectCampaignsV2.Campaign.RestrictedPeriodProperty (
        RestrictedPeriodProperty(..), mkRestrictedPeriodProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RestrictedPeriodProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-restrictedperiod.html>
    RestrictedPeriodProperty {RestrictedPeriodProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-restrictedperiod.html#cfn-connectcampaignsv2-campaign-restrictedperiod-enddate>
                              RestrictedPeriodProperty -> Value Text
endDate :: (Value Prelude.Text),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-restrictedperiod.html#cfn-connectcampaignsv2-campaign-restrictedperiod-name>
                              RestrictedPeriodProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-restrictedperiod.html#cfn-connectcampaignsv2-campaign-restrictedperiod-startdate>
                              RestrictedPeriodProperty -> Value Text
startDate :: (Value Prelude.Text)}
  deriving stock (RestrictedPeriodProperty -> RestrictedPeriodProperty -> Bool
(RestrictedPeriodProperty -> RestrictedPeriodProperty -> Bool)
-> (RestrictedPeriodProperty -> RestrictedPeriodProperty -> Bool)
-> Eq RestrictedPeriodProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RestrictedPeriodProperty -> RestrictedPeriodProperty -> Bool
== :: RestrictedPeriodProperty -> RestrictedPeriodProperty -> Bool
$c/= :: RestrictedPeriodProperty -> RestrictedPeriodProperty -> Bool
/= :: RestrictedPeriodProperty -> RestrictedPeriodProperty -> Bool
Prelude.Eq, Int -> RestrictedPeriodProperty -> ShowS
[RestrictedPeriodProperty] -> ShowS
RestrictedPeriodProperty -> String
(Int -> RestrictedPeriodProperty -> ShowS)
-> (RestrictedPeriodProperty -> String)
-> ([RestrictedPeriodProperty] -> ShowS)
-> Show RestrictedPeriodProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RestrictedPeriodProperty -> ShowS
showsPrec :: Int -> RestrictedPeriodProperty -> ShowS
$cshow :: RestrictedPeriodProperty -> String
show :: RestrictedPeriodProperty -> String
$cshowList :: [RestrictedPeriodProperty] -> ShowS
showList :: [RestrictedPeriodProperty] -> ShowS
Prelude.Show)
mkRestrictedPeriodProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> RestrictedPeriodProperty
mkRestrictedPeriodProperty :: Value Text -> Value Text -> RestrictedPeriodProperty
mkRestrictedPeriodProperty Value Text
endDate Value Text
startDate
  = RestrictedPeriodProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), endDate :: Value Text
endDate = Value Text
endDate,
       startDate :: Value Text
startDate = Value Text
startDate, name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RestrictedPeriodProperty where
  toResourceProperties :: RestrictedPeriodProperty -> ResourceProperties
toResourceProperties RestrictedPeriodProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RestrictedPeriodProperty -> ()
endDate :: RestrictedPeriodProperty -> Value Text
name :: RestrictedPeriodProperty -> Maybe (Value Text)
startDate :: RestrictedPeriodProperty -> Value Text
haddock_workaround_ :: ()
endDate :: Value Text
name :: Maybe (Value Text)
startDate :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ConnectCampaignsV2::Campaign.RestrictedPeriod",
         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
"EndDate" 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
endDate, Key
"StartDate" 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
startDate]
                           ([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
"Name" (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)
name]))}
instance JSON.ToJSON RestrictedPeriodProperty where
  toJSON :: RestrictedPeriodProperty -> Value
toJSON RestrictedPeriodProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RestrictedPeriodProperty -> ()
endDate :: RestrictedPeriodProperty -> Value Text
name :: RestrictedPeriodProperty -> Maybe (Value Text)
startDate :: RestrictedPeriodProperty -> Value Text
haddock_workaround_ :: ()
endDate :: Value Text
name :: Maybe (Value Text)
startDate :: 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
"EndDate" 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
endDate, Key
"StartDate" 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
startDate]
              ([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
"Name" (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)
name])))
instance Property "EndDate" RestrictedPeriodProperty where
  type PropertyType "EndDate" RestrictedPeriodProperty = Value Prelude.Text
  set :: PropertyType "EndDate" RestrictedPeriodProperty
-> RestrictedPeriodProperty -> RestrictedPeriodProperty
set PropertyType "EndDate" RestrictedPeriodProperty
newValue RestrictedPeriodProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RestrictedPeriodProperty -> ()
endDate :: RestrictedPeriodProperty -> Value Text
name :: RestrictedPeriodProperty -> Maybe (Value Text)
startDate :: RestrictedPeriodProperty -> Value Text
haddock_workaround_ :: ()
endDate :: Value Text
name :: Maybe (Value Text)
startDate :: Value Text
..}
    = RestrictedPeriodProperty {endDate :: Value Text
endDate = PropertyType "EndDate" RestrictedPeriodProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
startDate :: Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
startDate :: Value Text
..}
instance Property "Name" RestrictedPeriodProperty where
  type PropertyType "Name" RestrictedPeriodProperty = Value Prelude.Text
  set :: PropertyType "Name" RestrictedPeriodProperty
-> RestrictedPeriodProperty -> RestrictedPeriodProperty
set PropertyType "Name" RestrictedPeriodProperty
newValue RestrictedPeriodProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RestrictedPeriodProperty -> ()
endDate :: RestrictedPeriodProperty -> Value Text
name :: RestrictedPeriodProperty -> Maybe (Value Text)
startDate :: RestrictedPeriodProperty -> Value Text
haddock_workaround_ :: ()
endDate :: Value Text
name :: Maybe (Value Text)
startDate :: Value Text
..}
    = RestrictedPeriodProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" RestrictedPeriodProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
endDate :: Value Text
startDate :: Value Text
haddock_workaround_ :: ()
endDate :: Value Text
startDate :: Value Text
..}
instance Property "StartDate" RestrictedPeriodProperty where
  type PropertyType "StartDate" RestrictedPeriodProperty = Value Prelude.Text
  set :: PropertyType "StartDate" RestrictedPeriodProperty
-> RestrictedPeriodProperty -> RestrictedPeriodProperty
set PropertyType "StartDate" RestrictedPeriodProperty
newValue RestrictedPeriodProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RestrictedPeriodProperty -> ()
endDate :: RestrictedPeriodProperty -> Value Text
name :: RestrictedPeriodProperty -> Maybe (Value Text)
startDate :: RestrictedPeriodProperty -> Value Text
haddock_workaround_ :: ()
endDate :: Value Text
name :: Maybe (Value Text)
startDate :: Value Text
..}
    = RestrictedPeriodProperty {startDate :: Value Text
startDate = PropertyType "StartDate" RestrictedPeriodProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
endDate :: Value Text
name :: Maybe (Value Text)
haddock_workaround_ :: ()
endDate :: Value Text
name :: Maybe (Value Text)
..}