module Stratosphere.CustomerProfiles.SegmentDefinition.SourceSegmentProperty (
SourceSegmentProperty(..), mkSourceSegmentProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SourceSegmentProperty
=
SourceSegmentProperty {SourceSegmentProperty -> ()
haddock_workaround_ :: (),
SourceSegmentProperty -> Maybe (Value Text)
segmentDefinitionName :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (SourceSegmentProperty -> SourceSegmentProperty -> Bool
(SourceSegmentProperty -> SourceSegmentProperty -> Bool)
-> (SourceSegmentProperty -> SourceSegmentProperty -> Bool)
-> Eq SourceSegmentProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SourceSegmentProperty -> SourceSegmentProperty -> Bool
== :: SourceSegmentProperty -> SourceSegmentProperty -> Bool
$c/= :: SourceSegmentProperty -> SourceSegmentProperty -> Bool
/= :: SourceSegmentProperty -> SourceSegmentProperty -> Bool
Prelude.Eq, Int -> SourceSegmentProperty -> ShowS
[SourceSegmentProperty] -> ShowS
SourceSegmentProperty -> String
(Int -> SourceSegmentProperty -> ShowS)
-> (SourceSegmentProperty -> String)
-> ([SourceSegmentProperty] -> ShowS)
-> Show SourceSegmentProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SourceSegmentProperty -> ShowS
showsPrec :: Int -> SourceSegmentProperty -> ShowS
$cshow :: SourceSegmentProperty -> String
show :: SourceSegmentProperty -> String
$cshowList :: [SourceSegmentProperty] -> ShowS
showList :: [SourceSegmentProperty] -> ShowS
Prelude.Show)
mkSourceSegmentProperty :: SourceSegmentProperty
mkSourceSegmentProperty :: SourceSegmentProperty
mkSourceSegmentProperty
= SourceSegmentProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), segmentDefinitionName :: Maybe (Value Text)
segmentDefinitionName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SourceSegmentProperty where
toResourceProperties :: SourceSegmentProperty -> ResourceProperties
toResourceProperties SourceSegmentProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceSegmentProperty -> ()
segmentDefinitionName :: SourceSegmentProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
segmentDefinitionName :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CustomerProfiles::SegmentDefinition.SourceSegment",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"SegmentDefinitionName"
(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)
segmentDefinitionName])}
instance JSON.ToJSON SourceSegmentProperty where
toJSON :: SourceSegmentProperty -> Value
toJSON SourceSegmentProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceSegmentProperty -> ()
segmentDefinitionName :: SourceSegmentProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
segmentDefinitionName :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"SegmentDefinitionName"
(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)
segmentDefinitionName]))
instance Property "SegmentDefinitionName" SourceSegmentProperty where
type PropertyType "SegmentDefinitionName" SourceSegmentProperty = Value Prelude.Text
set :: PropertyType "SegmentDefinitionName" SourceSegmentProperty
-> SourceSegmentProperty -> SourceSegmentProperty
set PropertyType "SegmentDefinitionName" SourceSegmentProperty
newValue SourceSegmentProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceSegmentProperty -> ()
segmentDefinitionName :: SourceSegmentProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
segmentDefinitionName :: Maybe (Value Text)
..}
= SourceSegmentProperty
{segmentDefinitionName :: Maybe (Value Text)
segmentDefinitionName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SegmentDefinitionName" SourceSegmentProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}