module Stratosphere.QuickSight.Analysis.DateMeasureFieldProperty (
        module Exports, DateMeasureFieldProperty(..),
        mkDateMeasureFieldProperty
    ) 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 DateMeasureFieldProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-datemeasurefield.html>
    DateMeasureFieldProperty {DateMeasureFieldProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-datemeasurefield.html#cfn-quicksight-analysis-datemeasurefield-aggregationfunction>
                              DateMeasureFieldProperty -> Maybe (Value Text)
aggregationFunction :: (Prelude.Maybe (Value Prelude.Text)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-datemeasurefield.html#cfn-quicksight-analysis-datemeasurefield-column>
                              DateMeasureFieldProperty -> ColumnIdentifierProperty
column :: ColumnIdentifierProperty,
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-datemeasurefield.html#cfn-quicksight-analysis-datemeasurefield-fieldid>
                              DateMeasureFieldProperty -> Value Text
fieldId :: (Value Prelude.Text),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-datemeasurefield.html#cfn-quicksight-analysis-datemeasurefield-formatconfiguration>
                              DateMeasureFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
formatConfiguration :: (Prelude.Maybe DateTimeFormatConfigurationProperty)}
  deriving stock (DateMeasureFieldProperty -> DateMeasureFieldProperty -> Bool
(DateMeasureFieldProperty -> DateMeasureFieldProperty -> Bool)
-> (DateMeasureFieldProperty -> DateMeasureFieldProperty -> Bool)
-> Eq DateMeasureFieldProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DateMeasureFieldProperty -> DateMeasureFieldProperty -> Bool
== :: DateMeasureFieldProperty -> DateMeasureFieldProperty -> Bool
$c/= :: DateMeasureFieldProperty -> DateMeasureFieldProperty -> Bool
/= :: DateMeasureFieldProperty -> DateMeasureFieldProperty -> Bool
Prelude.Eq, Int -> DateMeasureFieldProperty -> ShowS
[DateMeasureFieldProperty] -> ShowS
DateMeasureFieldProperty -> String
(Int -> DateMeasureFieldProperty -> ShowS)
-> (DateMeasureFieldProperty -> String)
-> ([DateMeasureFieldProperty] -> ShowS)
-> Show DateMeasureFieldProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DateMeasureFieldProperty -> ShowS
showsPrec :: Int -> DateMeasureFieldProperty -> ShowS
$cshow :: DateMeasureFieldProperty -> String
show :: DateMeasureFieldProperty -> String
$cshowList :: [DateMeasureFieldProperty] -> ShowS
showList :: [DateMeasureFieldProperty] -> ShowS
Prelude.Show)
mkDateMeasureFieldProperty ::
  ColumnIdentifierProperty
  -> Value Prelude.Text -> DateMeasureFieldProperty
mkDateMeasureFieldProperty :: ColumnIdentifierProperty -> Value Text -> DateMeasureFieldProperty
mkDateMeasureFieldProperty ColumnIdentifierProperty
column Value Text
fieldId
  = DateMeasureFieldProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), column :: ColumnIdentifierProperty
column = ColumnIdentifierProperty
column, fieldId :: Value Text
fieldId = Value Text
fieldId,
       aggregationFunction :: Maybe (Value Text)
aggregationFunction = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
formatConfiguration = Maybe DateTimeFormatConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DateMeasureFieldProperty where
  toResourceProperties :: DateMeasureFieldProperty -> ResourceProperties
toResourceProperties DateMeasureFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateMeasureFieldProperty -> ()
aggregationFunction :: DateMeasureFieldProperty -> Maybe (Value Text)
column :: DateMeasureFieldProperty -> ColumnIdentifierProperty
fieldId :: DateMeasureFieldProperty -> Value Text
formatConfiguration :: DateMeasureFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
column :: ColumnIdentifierProperty
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Analysis.DateMeasureField",
         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
"AggregationFunction" (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)
aggregationFunction,
                               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]))}
instance JSON.ToJSON DateMeasureFieldProperty where
  toJSON :: DateMeasureFieldProperty -> Value
toJSON DateMeasureFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateMeasureFieldProperty -> ()
aggregationFunction :: DateMeasureFieldProperty -> Maybe (Value Text)
column :: DateMeasureFieldProperty -> ColumnIdentifierProperty
fieldId :: DateMeasureFieldProperty -> Value Text
formatConfiguration :: DateMeasureFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
column :: ColumnIdentifierProperty
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
..}
    = [(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
"AggregationFunction" (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)
aggregationFunction,
                  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])))
instance Property "AggregationFunction" DateMeasureFieldProperty where
  type PropertyType "AggregationFunction" DateMeasureFieldProperty = Value Prelude.Text
  set :: PropertyType "AggregationFunction" DateMeasureFieldProperty
-> DateMeasureFieldProperty -> DateMeasureFieldProperty
set PropertyType "AggregationFunction" DateMeasureFieldProperty
newValue DateMeasureFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateMeasureFieldProperty -> ()
aggregationFunction :: DateMeasureFieldProperty -> Maybe (Value Text)
column :: DateMeasureFieldProperty -> ColumnIdentifierProperty
fieldId :: DateMeasureFieldProperty -> Value Text
formatConfiguration :: DateMeasureFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
column :: ColumnIdentifierProperty
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
..}
    = DateMeasureFieldProperty
        {aggregationFunction :: Maybe (Value Text)
aggregationFunction = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AggregationFunction" DateMeasureFieldProperty
Value Text
newValue, Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
..}
instance Property "Column" DateMeasureFieldProperty where
  type PropertyType "Column" DateMeasureFieldProperty = ColumnIdentifierProperty
  set :: PropertyType "Column" DateMeasureFieldProperty
-> DateMeasureFieldProperty -> DateMeasureFieldProperty
set PropertyType "Column" DateMeasureFieldProperty
newValue DateMeasureFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateMeasureFieldProperty -> ()
aggregationFunction :: DateMeasureFieldProperty -> Maybe (Value Text)
column :: DateMeasureFieldProperty -> ColumnIdentifierProperty
fieldId :: DateMeasureFieldProperty -> Value Text
formatConfiguration :: DateMeasureFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
column :: ColumnIdentifierProperty
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
..}
    = DateMeasureFieldProperty {column :: ColumnIdentifierProperty
column = PropertyType "Column" DateMeasureFieldProperty
ColumnIdentifierProperty
newValue, Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
..}
instance Property "FieldId" DateMeasureFieldProperty where
  type PropertyType "FieldId" DateMeasureFieldProperty = Value Prelude.Text
  set :: PropertyType "FieldId" DateMeasureFieldProperty
-> DateMeasureFieldProperty -> DateMeasureFieldProperty
set PropertyType "FieldId" DateMeasureFieldProperty
newValue DateMeasureFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateMeasureFieldProperty -> ()
aggregationFunction :: DateMeasureFieldProperty -> Maybe (Value Text)
column :: DateMeasureFieldProperty -> ColumnIdentifierProperty
fieldId :: DateMeasureFieldProperty -> Value Text
formatConfiguration :: DateMeasureFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
column :: ColumnIdentifierProperty
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
..}
    = DateMeasureFieldProperty {fieldId :: Value Text
fieldId = PropertyType "FieldId" DateMeasureFieldProperty
Value Text
newValue, Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
ColumnIdentifierProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
column :: ColumnIdentifierProperty
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
column :: ColumnIdentifierProperty
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
..}
instance Property "FormatConfiguration" DateMeasureFieldProperty where
  type PropertyType "FormatConfiguration" DateMeasureFieldProperty = DateTimeFormatConfigurationProperty
  set :: PropertyType "FormatConfiguration" DateMeasureFieldProperty
-> DateMeasureFieldProperty -> DateMeasureFieldProperty
set PropertyType "FormatConfiguration" DateMeasureFieldProperty
newValue DateMeasureFieldProperty {Maybe (Value Text)
Maybe DateTimeFormatConfigurationProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: DateMeasureFieldProperty -> ()
aggregationFunction :: DateMeasureFieldProperty -> Maybe (Value Text)
column :: DateMeasureFieldProperty -> ColumnIdentifierProperty
fieldId :: DateMeasureFieldProperty -> Value Text
formatConfiguration :: DateMeasureFieldProperty
-> Maybe DateTimeFormatConfigurationProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
column :: ColumnIdentifierProperty
fieldId :: Value Text
formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
..}
    = DateMeasureFieldProperty
        {formatConfiguration :: Maybe DateTimeFormatConfigurationProperty
formatConfiguration = DateTimeFormatConfigurationProperty
-> Maybe DateTimeFormatConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FormatConfiguration" DateMeasureFieldProperty
DateTimeFormatConfigurationProperty
newValue, Maybe (Value Text)
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
column :: ColumnIdentifierProperty
fieldId :: Value Text
haddock_workaround_ :: ()
aggregationFunction :: Maybe (Value Text)
column :: ColumnIdentifierProperty
fieldId :: Value Text
..}