module Stratosphere.Pinpoint.Segment.SourceSegmentsProperty (
SourceSegmentsProperty(..), mkSourceSegmentsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SourceSegmentsProperty
=
SourceSegmentsProperty {SourceSegmentsProperty -> ()
haddock_workaround_ :: (),
SourceSegmentsProperty -> Value Text
id :: (Value Prelude.Text),
SourceSegmentsProperty -> Maybe (Value Integer)
version :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (SourceSegmentsProperty -> SourceSegmentsProperty -> Bool
(SourceSegmentsProperty -> SourceSegmentsProperty -> Bool)
-> (SourceSegmentsProperty -> SourceSegmentsProperty -> Bool)
-> Eq SourceSegmentsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SourceSegmentsProperty -> SourceSegmentsProperty -> Bool
== :: SourceSegmentsProperty -> SourceSegmentsProperty -> Bool
$c/= :: SourceSegmentsProperty -> SourceSegmentsProperty -> Bool
/= :: SourceSegmentsProperty -> SourceSegmentsProperty -> Bool
Prelude.Eq, Int -> SourceSegmentsProperty -> ShowS
[SourceSegmentsProperty] -> ShowS
SourceSegmentsProperty -> String
(Int -> SourceSegmentsProperty -> ShowS)
-> (SourceSegmentsProperty -> String)
-> ([SourceSegmentsProperty] -> ShowS)
-> Show SourceSegmentsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SourceSegmentsProperty -> ShowS
showsPrec :: Int -> SourceSegmentsProperty -> ShowS
$cshow :: SourceSegmentsProperty -> String
show :: SourceSegmentsProperty -> String
$cshowList :: [SourceSegmentsProperty] -> ShowS
showList :: [SourceSegmentsProperty] -> ShowS
Prelude.Show)
mkSourceSegmentsProperty ::
Value Prelude.Text -> SourceSegmentsProperty
mkSourceSegmentsProperty :: Value Text -> SourceSegmentsProperty
mkSourceSegmentsProperty Value Text
id
= SourceSegmentsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), id :: Value Text
id = Value Text
id, version :: Maybe (Value Integer)
version = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SourceSegmentsProperty where
toResourceProperties :: SourceSegmentsProperty -> ResourceProperties
toResourceProperties SourceSegmentsProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: SourceSegmentsProperty -> ()
id :: SourceSegmentsProperty -> Value Text
version :: SourceSegmentsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
id :: Value Text
version :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Pinpoint::Segment.SourceSegments",
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
"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]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Version" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
version]))}
instance JSON.ToJSON SourceSegmentsProperty where
toJSON :: SourceSegmentsProperty -> Value
toJSON SourceSegmentsProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: SourceSegmentsProperty -> ()
id :: SourceSegmentsProperty -> Value Text
version :: SourceSegmentsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
id :: Value Text
version :: Maybe (Value Integer)
..}
= [(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
"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]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Version" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
version])))
instance Property "Id" SourceSegmentsProperty where
type PropertyType "Id" SourceSegmentsProperty = Value Prelude.Text
set :: PropertyType "Id" SourceSegmentsProperty
-> SourceSegmentsProperty -> SourceSegmentsProperty
set PropertyType "Id" SourceSegmentsProperty
newValue SourceSegmentsProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: SourceSegmentsProperty -> ()
id :: SourceSegmentsProperty -> Value Text
version :: SourceSegmentsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
id :: Value Text
version :: Maybe (Value Integer)
..}
= SourceSegmentsProperty {id :: Value Text
id = PropertyType "Id" SourceSegmentsProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
version :: Maybe (Value Integer)
haddock_workaround_ :: ()
version :: Maybe (Value Integer)
..}
instance Property "Version" SourceSegmentsProperty where
type PropertyType "Version" SourceSegmentsProperty = Value Prelude.Integer
set :: PropertyType "Version" SourceSegmentsProperty
-> SourceSegmentsProperty -> SourceSegmentsProperty
set PropertyType "Version" SourceSegmentsProperty
newValue SourceSegmentsProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: SourceSegmentsProperty -> ()
id :: SourceSegmentsProperty -> Value Text
version :: SourceSegmentsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
id :: Value Text
version :: Maybe (Value Integer)
..}
= SourceSegmentsProperty {version :: Maybe (Value Integer)
version = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Version" SourceSegmentsProperty
Value Integer
newValue, ()
Value Text
haddock_workaround_ :: ()
id :: Value Text
haddock_workaround_ :: ()
id :: Value Text
..}