module Stratosphere.QuickSight.Analysis.DateDimensionFieldProperty (
        module Exports, DateDimensionFieldProperty(..),
        mkDateDimensionFieldProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.ColumnIdentifierProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.DateTimeFormatConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DateDimensionFieldProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-datedimensionfield.html>
    DateDimensionFieldProperty {DateDimensionFieldProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-datedimensionfield.html#cfn-quicksight-analysis-datedimensionfield-column>
                                DateDimensionFieldProperty -> ColumnIdentifierProperty
column :: ColumnIdentifierProperty,
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-datedimensionfield.html#cfn-quicksight-analysis-datedimensionfield-dategranularity>
                                DateDimensionFieldProperty -> Maybe (Value Text)
dateGranularity :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-datedimensionfield.html#cfn-quicksight-analysis-datedimensionfield-fieldid>
                                DateDimensionFieldProperty -> Value Text
fieldId :: (Value Prelude.Text),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-datedimensionfield.html#cfn-quicksight-analysis-datedimensionfield-formatconfiguration>
                                DateDimensionFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
formatConfiguration :: (Prelude.Maybe DateTimeFormatConfigurationProperty),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-datedimensionfield.html#cfn-quicksight-analysis-datedimensionfield-hierarchyid>
                                DateDimensionFieldProperty -> Maybe (Value Text)
hierarchyId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DateDimensionFieldProperty -> DateDimensionFieldProperty -> Bool
(DateDimensionFieldProperty -> DateDimensionFieldProperty -> Bool)
-> (DateDimensionFieldProperty
    -> DateDimensionFieldProperty -> Bool)
-> Eq DateDimensionFieldProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DateDimensionFieldProperty -> DateDimensionFieldProperty -> Bool
== :: DateDimensionFieldProperty -> DateDimensionFieldProperty -> Bool
$c/= :: DateDimensionFieldProperty -> DateDimensionFieldProperty -> Bool
/= :: DateDimensionFieldProperty -> DateDimensionFieldProperty -> Bool
Prelude.Eq, Int -> DateDimensionFieldProperty -> ShowS
[DateDimensionFieldProperty] -> ShowS
DateDimensionFieldProperty -> String
(Int -> DateDimensionFieldProperty -> ShowS)
-> (DateDimensionFieldProperty -> String)
-> ([DateDimensionFieldProperty] -> ShowS)
-> Show DateDimensionFieldProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DateDimensionFieldProperty -> ShowS
showsPrec :: Int -> DateDimensionFieldProperty -> ShowS
$cshow :: DateDimensionFieldProperty -> String
show :: DateDimensionFieldProperty -> String
$cshowList :: [DateDimensionFieldProperty] -> ShowS
showList :: [DateDimensionFieldProperty] -> ShowS
Prelude.Show)
mkDateDimensionFieldProperty ::
  ColumnIdentifierProperty
  -> Value Prelude.Text -> DateDimensionFieldProperty
mkDateDimensionFieldProperty :: ColumnIdentifierProperty
-> Value Text -> DateDimensionFieldProperty
mkDateDimensionFieldProperty ColumnIdentifierProperty
column Value Text
fieldId
  = DateDimensionFieldProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), column :: ColumnIdentifierProperty
column = ColumnIdentifierProperty
column, fieldId :: Value Text
fieldId = Value Text
fieldId,
       dateGranularity :: Maybe (Value Text)
dateGranularity = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
formatConfiguration = Maybe DateTimeFormatConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       hierarchyId :: Maybe (Value Text)
hierarchyId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DateDimensionFieldProperty where
  toResourceProperties :: DateDimensionFieldProperty -> ResourceProperties
toResourceProperties DateDimensionFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateDimensionFieldProperty -> ()
column :: DateDimensionFieldProperty -> ColumnIdentifierProperty
dateGranularity :: DateDimensionFieldProperty -> Maybe (Value Text)
fieldId :: DateDimensionFieldProperty -> Value Text
formatConfiguration :: DateDimensionFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
hierarchyId :: DateDimensionFieldProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Analysis.DateDimensionField",
         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
"Column" Key -> ColumnIdentifierProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ColumnIdentifierProperty
column, Key
"FieldId" 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
fieldId]
                           ([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
"DateGranularity" (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)
dateGranularity,
                               Key -> DateTimeFormatConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FormatConfiguration" (DateTimeFormatConfigurationProperty -> (Key, Value))
-> Maybe DateTimeFormatConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DateTimeFormatConfigurationProperty
formatConfiguration,
                               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
"HierarchyId" (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)
hierarchyId]))}
instance JSON.ToJSON DateDimensionFieldProperty where
  toJSON :: DateDimensionFieldProperty -> Value
toJSON DateDimensionFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateDimensionFieldProperty -> ()
column :: DateDimensionFieldProperty -> ColumnIdentifierProperty
dateGranularity :: DateDimensionFieldProperty -> Maybe (Value Text)
fieldId :: DateDimensionFieldProperty -> Value Text
formatConfiguration :: DateDimensionFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
hierarchyId :: DateDimensionFieldProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (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
"Column" Key -> ColumnIdentifierProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ColumnIdentifierProperty
column, Key
"FieldId" 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
fieldId]
              ([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
"DateGranularity" (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)
dateGranularity,
                  Key -> DateTimeFormatConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FormatConfiguration" (DateTimeFormatConfigurationProperty -> (Key, Value))
-> Maybe DateTimeFormatConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DateTimeFormatConfigurationProperty
formatConfiguration,
                  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
"HierarchyId" (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)
hierarchyId])))
instance Property "Column" DateDimensionFieldProperty where
  type PropertyType "Column" DateDimensionFieldProperty = ColumnIdentifierProperty
  set :: PropertyType "Column" DateDimensionFieldProperty
-> DateDimensionFieldProperty -> DateDimensionFieldProperty
set PropertyType "Column" DateDimensionFieldProperty
newValue DateDimensionFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateDimensionFieldProperty -> ()
column :: DateDimensionFieldProperty -> ColumnIdentifierProperty
dateGranularity :: DateDimensionFieldProperty -> Maybe (Value Text)
fieldId :: DateDimensionFieldProperty -> Value Text
formatConfiguration :: DateDimensionFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
hierarchyId :: DateDimensionFieldProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
..}
    = DateDimensionFieldProperty {column :: ColumnIdentifierProperty
column = PropertyType "Column" DateDimensionFieldProperty
ColumnIdentifierProperty
newValue, Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
haddock_workaround_ :: ()
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
..}
instance Property "DateGranularity" DateDimensionFieldProperty where
  type PropertyType "DateGranularity" DateDimensionFieldProperty = Value Prelude.Text
  set :: PropertyType "DateGranularity" DateDimensionFieldProperty
-> DateDimensionFieldProperty -> DateDimensionFieldProperty
set PropertyType "DateGranularity" DateDimensionFieldProperty
newValue DateDimensionFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateDimensionFieldProperty -> ()
column :: DateDimensionFieldProperty -> ColumnIdentifierProperty
dateGranularity :: DateDimensionFieldProperty -> Maybe (Value Text)
fieldId :: DateDimensionFieldProperty -> Value Text
formatConfiguration :: DateDimensionFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
hierarchyId :: DateDimensionFieldProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
..}
    = DateDimensionFieldProperty
        {dateGranularity :: Maybe (Value Text)
dateGranularity = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DateGranularity" DateDimensionFieldProperty
Value Text
newValue, Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
..}
instance Property "FieldId" DateDimensionFieldProperty where
  type PropertyType "FieldId" DateDimensionFieldProperty = Value Prelude.Text
  set :: PropertyType "FieldId" DateDimensionFieldProperty
-> DateDimensionFieldProperty -> DateDimensionFieldProperty
set PropertyType "FieldId" DateDimensionFieldProperty
newValue DateDimensionFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateDimensionFieldProperty -> ()
column :: DateDimensionFieldProperty -> ColumnIdentifierProperty
dateGranularity :: DateDimensionFieldProperty -> Maybe (Value Text)
fieldId :: DateDimensionFieldProperty -> Value Text
formatConfiguration :: DateDimensionFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
hierarchyId :: DateDimensionFieldProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
..}
    = DateDimensionFieldProperty {fieldId :: Value Text
fieldId = PropertyType "FieldId" DateDimensionFieldProperty
Value Text
newValue, Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
ColumnIdentifierProperty
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
..}
instance Property "FormatConfiguration" DateDimensionFieldProperty where
  type PropertyType "FormatConfiguration" DateDimensionFieldProperty = DateTimeFormatConfigurationProperty
  set :: PropertyType "FormatConfiguration" DateDimensionFieldProperty
-> DateDimensionFieldProperty -> DateDimensionFieldProperty
set PropertyType "FormatConfiguration" DateDimensionFieldProperty
newValue DateDimensionFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateDimensionFieldProperty -> ()
column :: DateDimensionFieldProperty -> ColumnIdentifierProperty
dateGranularity :: DateDimensionFieldProperty -> Maybe (Value Text)
fieldId :: DateDimensionFieldProperty -> Value Text
formatConfiguration :: DateDimensionFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
hierarchyId :: DateDimensionFieldProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
..}
    = DateDimensionFieldProperty
        {formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
formatConfiguration = DateTimeFormatConfigurationProperty
-> Maybe DateTimeFormatConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FormatConfiguration" DateDimensionFieldProperty
DateTimeFormatConfigurationProperty
newValue, Maybe (Value Text)
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
hierarchyId :: Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
hierarchyId :: Maybe (Value Text)
..}
instance Property "HierarchyId" DateDimensionFieldProperty where
  type PropertyType "HierarchyId" DateDimensionFieldProperty = Value Prelude.Text
  set :: PropertyType "HierarchyId" DateDimensionFieldProperty
-> DateDimensionFieldProperty -> DateDimensionFieldProperty
set PropertyType "HierarchyId" DateDimensionFieldProperty
newValue DateDimensionFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateDimensionFieldProperty -> ()
column :: DateDimensionFieldProperty -> ColumnIdentifierProperty
dateGranularity :: DateDimensionFieldProperty -> Maybe (Value Text)
fieldId :: DateDimensionFieldProperty -> Value Text
formatConfiguration :: DateDimensionFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
hierarchyId :: DateDimensionFieldProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
hierarchyId :: Maybe (Value Text)
..}
    = DateDimensionFieldProperty
        {hierarchyId :: Maybe (Value Text)
hierarchyId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HierarchyId" DateDimensionFieldProperty
Value Text
newValue, Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
dateGranularity :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
..}