module Stratosphere.Pinpoint.Segment.GroupsProperty (
        module Exports, GroupsProperty(..), mkGroupsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Pinpoint.Segment.SegmentDimensionsProperty as Exports
import {-# SOURCE #-} Stratosphere.Pinpoint.Segment.SourceSegmentsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GroupsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html>
    GroupsProperty {GroupsProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-dimensions>
                    GroupsProperty -> Maybe [SegmentDimensionsProperty]
dimensions :: (Prelude.Maybe [SegmentDimensionsProperty]),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-sourcesegments>
                    GroupsProperty -> Maybe [SourceSegmentsProperty]
sourceSegments :: (Prelude.Maybe [SourceSegmentsProperty]),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-sourcetype>
                    GroupsProperty -> Maybe (Value Text)
sourceType :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-type>
                    GroupsProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (GroupsProperty -> GroupsProperty -> Bool
(GroupsProperty -> GroupsProperty -> Bool)
-> (GroupsProperty -> GroupsProperty -> Bool) -> Eq GroupsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GroupsProperty -> GroupsProperty -> Bool
== :: GroupsProperty -> GroupsProperty -> Bool
$c/= :: GroupsProperty -> GroupsProperty -> Bool
/= :: GroupsProperty -> GroupsProperty -> Bool
Prelude.Eq, Int -> GroupsProperty -> ShowS
[GroupsProperty] -> ShowS
GroupsProperty -> String
(Int -> GroupsProperty -> ShowS)
-> (GroupsProperty -> String)
-> ([GroupsProperty] -> ShowS)
-> Show GroupsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GroupsProperty -> ShowS
showsPrec :: Int -> GroupsProperty -> ShowS
$cshow :: GroupsProperty -> String
show :: GroupsProperty -> String
$cshowList :: [GroupsProperty] -> ShowS
showList :: [GroupsProperty] -> ShowS
Prelude.Show)
mkGroupsProperty :: GroupsProperty
mkGroupsProperty :: GroupsProperty
mkGroupsProperty
  = GroupsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), dimensions :: Maybe [SegmentDimensionsProperty]
dimensions = Maybe [SegmentDimensionsProperty]
forall a. Maybe a
Prelude.Nothing,
       sourceSegments :: Maybe [SourceSegmentsProperty]
sourceSegments = Maybe [SourceSegmentsProperty]
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 GroupsProperty where
  toResourceProperties :: GroupsProperty -> ResourceProperties
toResourceProperties GroupsProperty {Maybe [SegmentDimensionsProperty]
Maybe [SourceSegmentsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupsProperty -> ()
dimensions :: GroupsProperty -> Maybe [SegmentDimensionsProperty]
sourceSegments :: GroupsProperty -> Maybe [SourceSegmentsProperty]
sourceType :: GroupsProperty -> Maybe (Value Text)
type' :: GroupsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceSegments :: Maybe [SourceSegmentsProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Pinpoint::Segment.Groups",
         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 -> [SegmentDimensionsProperty] -> (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" ([SegmentDimensionsProperty] -> (Key, Value))
-> Maybe [SegmentDimensionsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SegmentDimensionsProperty]
dimensions,
                            Key -> [SourceSegmentsProperty] -> (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" ([SourceSegmentsProperty] -> (Key, Value))
-> Maybe [SourceSegmentsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SourceSegmentsProperty]
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 GroupsProperty where
  toJSON :: GroupsProperty -> Value
toJSON GroupsProperty {Maybe [SegmentDimensionsProperty]
Maybe [SourceSegmentsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupsProperty -> ()
dimensions :: GroupsProperty -> Maybe [SegmentDimensionsProperty]
sourceSegments :: GroupsProperty -> Maybe [SourceSegmentsProperty]
sourceType :: GroupsProperty -> Maybe (Value Text)
type' :: GroupsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceSegments :: Maybe [SourceSegmentsProperty]
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 -> [SegmentDimensionsProperty] -> (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" ([SegmentDimensionsProperty] -> (Key, Value))
-> Maybe [SegmentDimensionsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SegmentDimensionsProperty]
dimensions,
               Key -> [SourceSegmentsProperty] -> (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" ([SourceSegmentsProperty] -> (Key, Value))
-> Maybe [SourceSegmentsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SourceSegmentsProperty]
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" GroupsProperty where
  type PropertyType "Dimensions" GroupsProperty = [SegmentDimensionsProperty]
  set :: PropertyType "Dimensions" GroupsProperty
-> GroupsProperty -> GroupsProperty
set PropertyType "Dimensions" GroupsProperty
newValue GroupsProperty {Maybe [SegmentDimensionsProperty]
Maybe [SourceSegmentsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupsProperty -> ()
dimensions :: GroupsProperty -> Maybe [SegmentDimensionsProperty]
sourceSegments :: GroupsProperty -> Maybe [SourceSegmentsProperty]
sourceType :: GroupsProperty -> Maybe (Value Text)
type' :: GroupsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceSegments :: Maybe [SourceSegmentsProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = GroupsProperty {dimensions :: Maybe [SegmentDimensionsProperty]
dimensions = [SegmentDimensionsProperty] -> Maybe [SegmentDimensionsProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [SegmentDimensionsProperty]
PropertyType "Dimensions" GroupsProperty
newValue, Maybe [SourceSegmentsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
sourceSegments :: Maybe [SourceSegmentsProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
sourceSegments :: Maybe [SourceSegmentsProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
instance Property "SourceSegments" GroupsProperty where
  type PropertyType "SourceSegments" GroupsProperty = [SourceSegmentsProperty]
  set :: PropertyType "SourceSegments" GroupsProperty
-> GroupsProperty -> GroupsProperty
set PropertyType "SourceSegments" GroupsProperty
newValue GroupsProperty {Maybe [SegmentDimensionsProperty]
Maybe [SourceSegmentsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupsProperty -> ()
dimensions :: GroupsProperty -> Maybe [SegmentDimensionsProperty]
sourceSegments :: GroupsProperty -> Maybe [SourceSegmentsProperty]
sourceType :: GroupsProperty -> Maybe (Value Text)
type' :: GroupsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceSegments :: Maybe [SourceSegmentsProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = GroupsProperty {sourceSegments :: Maybe [SourceSegmentsProperty]
sourceSegments = [SourceSegmentsProperty] -> Maybe [SourceSegmentsProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [SourceSegmentsProperty]
PropertyType "SourceSegments" GroupsProperty
newValue, Maybe [SegmentDimensionsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
instance Property "SourceType" GroupsProperty where
  type PropertyType "SourceType" GroupsProperty = Value Prelude.Text
  set :: PropertyType "SourceType" GroupsProperty
-> GroupsProperty -> GroupsProperty
set PropertyType "SourceType" GroupsProperty
newValue GroupsProperty {Maybe [SegmentDimensionsProperty]
Maybe [SourceSegmentsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupsProperty -> ()
dimensions :: GroupsProperty -> Maybe [SegmentDimensionsProperty]
sourceSegments :: GroupsProperty -> Maybe [SourceSegmentsProperty]
sourceType :: GroupsProperty -> Maybe (Value Text)
type' :: GroupsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceSegments :: Maybe [SourceSegmentsProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = GroupsProperty {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" GroupsProperty
Value Text
newValue, Maybe [SegmentDimensionsProperty]
Maybe [SourceSegmentsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceSegments :: Maybe [SourceSegmentsProperty]
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceSegments :: Maybe [SourceSegmentsProperty]
type' :: Maybe (Value Text)
..}
instance Property "Type" GroupsProperty where
  type PropertyType "Type" GroupsProperty = Value Prelude.Text
  set :: PropertyType "Type" GroupsProperty
-> GroupsProperty -> GroupsProperty
set PropertyType "Type" GroupsProperty
newValue GroupsProperty {Maybe [SegmentDimensionsProperty]
Maybe [SourceSegmentsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: GroupsProperty -> ()
dimensions :: GroupsProperty -> Maybe [SegmentDimensionsProperty]
sourceSegments :: GroupsProperty -> Maybe [SourceSegmentsProperty]
sourceType :: GroupsProperty -> Maybe (Value Text)
type' :: GroupsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceSegments :: Maybe [SourceSegmentsProperty]
sourceType :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = GroupsProperty {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" GroupsProperty
Value Text
newValue, Maybe [SegmentDimensionsProperty]
Maybe [SourceSegmentsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceSegments :: Maybe [SourceSegmentsProperty]
sourceType :: Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [SegmentDimensionsProperty]
sourceSegments :: Maybe [SourceSegmentsProperty]
sourceType :: Maybe (Value Text)
..}