module Stratosphere.CustomerProfiles.SegmentDefinition.GroupProperty (
        module Exports, GroupProperty(..), mkGroupProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CustomerProfiles.SegmentDefinition.DimensionProperty as Exports
import {-# SOURCE #-} Stratosphere.CustomerProfiles.SegmentDefinition.SourceSegmentProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GroupProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-segmentdefinition-group.html>
    GroupProperty {GroupProperty -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-segmentdefinition-group.html#cfn-customerprofiles-segmentdefinition-group-dimensions>
                   GroupProperty -> Maybe [DimensionProperty]
dimensions :: (Prelude.Maybe [DimensionProperty]),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-segmentdefinition-group.html#cfn-customerprofiles-segmentdefinition-group-sourcesegments>
                   GroupProperty -> Maybe [SourceSegmentProperty]
sourceSegments :: (Prelude.Maybe [SourceSegmentProperty]),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-segmentdefinition-group.html#cfn-customerprofiles-segmentdefinition-group-sourcetype>
                   GroupProperty -> Maybe (Value Text)
sourceType :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-segmentdefinition-group.html#cfn-customerprofiles-segmentdefinition-group-type>
                   GroupProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (GroupProperty -> GroupProperty -> Bool
(GroupProperty -> GroupProperty -> Bool)
-> (GroupProperty -> GroupProperty -> Bool) -> Eq GroupProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GroupProperty -> GroupProperty -> Bool
== :: GroupProperty -> GroupProperty -> Bool
$c/= :: GroupProperty -> GroupProperty -> Bool
/= :: GroupProperty -> GroupProperty -> Bool
Prelude.Eq, Int -> GroupProperty -> ShowS
[GroupProperty] -> ShowS
GroupProperty -> String
(Int -> GroupProperty -> ShowS)
-> (GroupProperty -> String)
-> ([GroupProperty] -> ShowS)
-> Show GroupProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GroupProperty -> ShowS
showsPrec :: Int -> GroupProperty -> ShowS
$cshow :: GroupProperty -> String
show :: GroupProperty -> String
$cshowList :: [GroupProperty] -> ShowS
showList :: [GroupProperty] -> ShowS
Prelude.Show)
mkGroupProperty :: GroupProperty
mkGroupProperty :: GroupProperty
mkGroupProperty
  = GroupProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), dimensions :: Maybe [DimensionProperty]
dimensions = Maybe [DimensionProperty]
forall a. Maybe a
Prelude.Nothing,
       sourceSegments :: Maybe [SourceSegmentProperty]
sourceSegments = Maybe [SourceSegmentProperty]
forall a. Maybe a
Prelude.Nothing, sourceType :: Maybe (Value Text)
sourceType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       type' :: Maybe (Value Text)
type' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GroupProperty where
  toResourceProperties :: GroupProperty -> ResourceProperties
toResourceProperties GroupProperty {Maybe [DimensionProperty]
Maybe [SourceSegmentProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupProperty -> ()
dimensions :: GroupProperty -> Maybe [DimensionProperty]
sourceSegments :: GroupProperty -> Maybe [SourceSegmentProperty]
sourceType :: GroupProperty -> Maybe (Value Text)
type' :: GroupProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceSegments :: Maybe [SourceSegmentProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CustomerProfiles::SegmentDefinition.Group",
         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 -> [DimensionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Dimensions" ([DimensionProperty] -> (Key, Value))
-> Maybe [DimensionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DimensionProperty]
dimensions,
                            Key -> [SourceSegmentProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceSegments" ([SourceSegmentProperty] -> (Key, Value))
-> Maybe [SourceSegmentProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SourceSegmentProperty]
sourceSegments,
                            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
"SourceType" (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)
sourceType,
                            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
"Type" (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)
type'])}
instance JSON.ToJSON GroupProperty where
  toJSON :: GroupProperty -> Value
toJSON GroupProperty {Maybe [DimensionProperty]
Maybe [SourceSegmentProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupProperty -> ()
dimensions :: GroupProperty -> Maybe [DimensionProperty]
sourceSegments :: GroupProperty -> Maybe [SourceSegmentProperty]
sourceType :: GroupProperty -> Maybe (Value Text)
type' :: GroupProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceSegments :: Maybe [SourceSegmentProperty]
sourceType :: Maybe (Value Text)
type' :: 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 -> [DimensionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Dimensions" ([DimensionProperty] -> (Key, Value))
-> Maybe [DimensionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DimensionProperty]
dimensions,
               Key -> [SourceSegmentProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceSegments" ([SourceSegmentProperty] -> (Key, Value))
-> Maybe [SourceSegmentProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SourceSegmentProperty]
sourceSegments,
               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
"SourceType" (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)
sourceType,
               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
"Type" (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)
type']))
instance Property "Dimensions" GroupProperty where
  type PropertyType "Dimensions" GroupProperty = [DimensionProperty]
  set :: PropertyType "Dimensions" GroupProperty
-> GroupProperty -> GroupProperty
set PropertyType "Dimensions" GroupProperty
newValue GroupProperty {Maybe [DimensionProperty]
Maybe [SourceSegmentProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupProperty -> ()
dimensions :: GroupProperty -> Maybe [DimensionProperty]
sourceSegments :: GroupProperty -> Maybe [SourceSegmentProperty]
sourceType :: GroupProperty -> Maybe (Value Text)
type' :: GroupProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceSegments :: Maybe [SourceSegmentProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = GroupProperty {dimensions :: Maybe [DimensionProperty]
dimensions = [DimensionProperty] -> Maybe [DimensionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [DimensionProperty]
PropertyType "Dimensions" GroupProperty
newValue, Maybe [SourceSegmentProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
sourceSegments :: Maybe [SourceSegmentProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
sourceSegments :: Maybe [SourceSegmentProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
instance Property "SourceSegments" GroupProperty where
  type PropertyType "SourceSegments" GroupProperty = [SourceSegmentProperty]
  set :: PropertyType "SourceSegments" GroupProperty
-> GroupProperty -> GroupProperty
set PropertyType "SourceSegments" GroupProperty
newValue GroupProperty {Maybe [DimensionProperty]
Maybe [SourceSegmentProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupProperty -> ()
dimensions :: GroupProperty -> Maybe [DimensionProperty]
sourceSegments :: GroupProperty -> Maybe [SourceSegmentProperty]
sourceType :: GroupProperty -> Maybe (Value Text)
type' :: GroupProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceSegments :: Maybe [SourceSegmentProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = GroupProperty {sourceSegments :: Maybe [SourceSegmentProperty]
sourceSegments = [SourceSegmentProperty] -> Maybe [SourceSegmentProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [SourceSegmentProperty]
PropertyType "SourceSegments" GroupProperty
newValue, Maybe [DimensionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
instance Property "SourceType" GroupProperty where
  type PropertyType "SourceType" GroupProperty = Value Prelude.Text
  set :: PropertyType "SourceType" GroupProperty
-> GroupProperty -> GroupProperty
set PropertyType "SourceType" GroupProperty
newValue GroupProperty {Maybe [DimensionProperty]
Maybe [SourceSegmentProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupProperty -> ()
dimensions :: GroupProperty -> Maybe [DimensionProperty]
sourceSegments :: GroupProperty -> Maybe [SourceSegmentProperty]
sourceType :: GroupProperty -> Maybe (Value Text)
type' :: GroupProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceSegments :: Maybe [SourceSegmentProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = GroupProperty {sourceType :: Maybe (Value Text)
sourceType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceType" GroupProperty
Value Text
newValue, Maybe [DimensionProperty]
Maybe [SourceSegmentProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceSegments :: Maybe [SourceSegmentProperty]
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceSegments :: Maybe [SourceSegmentProperty]
type' :: Maybe (Value Text)
..}
instance Property "Type" GroupProperty where
  type PropertyType "Type" GroupProperty = Value Prelude.Text
  set :: PropertyType "Type" GroupProperty -> GroupProperty -> GroupProperty
set PropertyType "Type" GroupProperty
newValue GroupProperty {Maybe [DimensionProperty]
Maybe [SourceSegmentProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupProperty -> ()
dimensions :: GroupProperty -> Maybe [DimensionProperty]
sourceSegments :: GroupProperty -> Maybe [SourceSegmentProperty]
sourceType :: GroupProperty -> Maybe (Value Text)
type' :: GroupProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceSegments :: Maybe [SourceSegmentProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = GroupProperty {type' :: Maybe (Value Text)
type' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" GroupProperty
Value Text
newValue, Maybe [DimensionProperty]
Maybe [SourceSegmentProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceSegments :: Maybe [SourceSegmentProperty]
sourceType :: Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
sourceSegments :: Maybe [SourceSegmentProperty]
sourceType :: Maybe (Value Text)
..}