module Stratosphere.Location.PlaceIndex (
        module Exports, PlaceIndex(..), mkPlaceIndex
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Location.PlaceIndex.DataSourceConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data PlaceIndex
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-location-placeindex.html>
    PlaceIndex {PlaceIndex -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-location-placeindex.html#cfn-location-placeindex-datasource>
                PlaceIndex -> Value Text
dataSource :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-location-placeindex.html#cfn-location-placeindex-datasourceconfiguration>
                PlaceIndex -> Maybe DataSourceConfigurationProperty
dataSourceConfiguration :: (Prelude.Maybe DataSourceConfigurationProperty),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-location-placeindex.html#cfn-location-placeindex-description>
                PlaceIndex -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-location-placeindex.html#cfn-location-placeindex-indexname>
                PlaceIndex -> Value Text
indexName :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-location-placeindex.html#cfn-location-placeindex-pricingplan>
                PlaceIndex -> Maybe (Value Text)
pricingPlan :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-location-placeindex.html#cfn-location-placeindex-tags>
                PlaceIndex -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (PlaceIndex -> PlaceIndex -> Bool
(PlaceIndex -> PlaceIndex -> Bool)
-> (PlaceIndex -> PlaceIndex -> Bool) -> Eq PlaceIndex
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PlaceIndex -> PlaceIndex -> Bool
== :: PlaceIndex -> PlaceIndex -> Bool
$c/= :: PlaceIndex -> PlaceIndex -> Bool
/= :: PlaceIndex -> PlaceIndex -> Bool
Prelude.Eq, Int -> PlaceIndex -> ShowS
[PlaceIndex] -> ShowS
PlaceIndex -> String
(Int -> PlaceIndex -> ShowS)
-> (PlaceIndex -> String)
-> ([PlaceIndex] -> ShowS)
-> Show PlaceIndex
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PlaceIndex -> ShowS
showsPrec :: Int -> PlaceIndex -> ShowS
$cshow :: PlaceIndex -> String
show :: PlaceIndex -> String
$cshowList :: [PlaceIndex] -> ShowS
showList :: [PlaceIndex] -> ShowS
Prelude.Show)
mkPlaceIndex ::
  Value Prelude.Text -> Value Prelude.Text -> PlaceIndex
mkPlaceIndex :: Value Text -> Value Text -> PlaceIndex
mkPlaceIndex Value Text
dataSource Value Text
indexName
  = PlaceIndex
      {haddock_workaround_ :: ()
haddock_workaround_ = (), dataSource :: Value Text
dataSource = Value Text
dataSource,
       indexName :: Value Text
indexName = Value Text
indexName, dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
dataSourceConfiguration = Maybe DataSourceConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, pricingPlan :: Maybe (Value Text)
pricingPlan = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PlaceIndex where
  toResourceProperties :: PlaceIndex -> ResourceProperties
toResourceProperties PlaceIndex {Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: PlaceIndex -> ()
dataSource :: PlaceIndex -> Value Text
dataSourceConfiguration :: PlaceIndex -> Maybe DataSourceConfigurationProperty
description :: PlaceIndex -> Maybe (Value Text)
indexName :: PlaceIndex -> Value Text
pricingPlan :: PlaceIndex -> Maybe (Value Text)
tags :: PlaceIndex -> Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Location::PlaceIndex",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"DataSource" 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
dataSource, Key
"IndexName" 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
indexName]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> DataSourceConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DataSourceConfiguration"
                                 (DataSourceConfigurationProperty -> (Key, Value))
-> Maybe DataSourceConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataSourceConfigurationProperty
dataSourceConfiguration,
                               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
"Description" (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)
description,
                               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
"PricingPlan" (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)
pricingPlan,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON PlaceIndex where
  toJSON :: PlaceIndex -> Value
toJSON PlaceIndex {Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: PlaceIndex -> ()
dataSource :: PlaceIndex -> Value Text
dataSourceConfiguration :: PlaceIndex -> Maybe DataSourceConfigurationProperty
description :: PlaceIndex -> Maybe (Value Text)
indexName :: PlaceIndex -> Value Text
pricingPlan :: PlaceIndex -> Maybe (Value Text)
tags :: PlaceIndex -> Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = [(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
"DataSource" 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
dataSource, Key
"IndexName" 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
indexName]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> DataSourceConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DataSourceConfiguration"
                    (DataSourceConfigurationProperty -> (Key, Value))
-> Maybe DataSourceConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataSourceConfigurationProperty
dataSourceConfiguration,
                  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
"Description" (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)
description,
                  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
"PricingPlan" (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)
pricingPlan,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "DataSource" PlaceIndex where
  type PropertyType "DataSource" PlaceIndex = Value Prelude.Text
  set :: PropertyType "DataSource" PlaceIndex -> PlaceIndex -> PlaceIndex
set PropertyType "DataSource" PlaceIndex
newValue PlaceIndex {Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: PlaceIndex -> ()
dataSource :: PlaceIndex -> Value Text
dataSourceConfiguration :: PlaceIndex -> Maybe DataSourceConfigurationProperty
description :: PlaceIndex -> Maybe (Value Text)
indexName :: PlaceIndex -> Value Text
pricingPlan :: PlaceIndex -> Maybe (Value Text)
tags :: PlaceIndex -> Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = PlaceIndex {dataSource :: Value Text
dataSource = PropertyType "DataSource" PlaceIndex
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "DataSourceConfiguration" PlaceIndex where
  type PropertyType "DataSourceConfiguration" PlaceIndex = DataSourceConfigurationProperty
  set :: PropertyType "DataSourceConfiguration" PlaceIndex
-> PlaceIndex -> PlaceIndex
set PropertyType "DataSourceConfiguration" PlaceIndex
newValue PlaceIndex {Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: PlaceIndex -> ()
dataSource :: PlaceIndex -> Value Text
dataSourceConfiguration :: PlaceIndex -> Maybe DataSourceConfigurationProperty
description :: PlaceIndex -> Maybe (Value Text)
indexName :: PlaceIndex -> Value Text
pricingPlan :: PlaceIndex -> Maybe (Value Text)
tags :: PlaceIndex -> Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = PlaceIndex {dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
dataSourceConfiguration = DataSourceConfigurationProperty
-> Maybe DataSourceConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DataSourceConfiguration" PlaceIndex
DataSourceConfigurationProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
dataSource :: Value Text
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Description" PlaceIndex where
  type PropertyType "Description" PlaceIndex = Value Prelude.Text
  set :: PropertyType "Description" PlaceIndex -> PlaceIndex -> PlaceIndex
set PropertyType "Description" PlaceIndex
newValue PlaceIndex {Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: PlaceIndex -> ()
dataSource :: PlaceIndex -> Value Text
dataSourceConfiguration :: PlaceIndex -> Maybe DataSourceConfigurationProperty
description :: PlaceIndex -> Maybe (Value Text)
indexName :: PlaceIndex -> Value Text
pricingPlan :: PlaceIndex -> Maybe (Value Text)
tags :: PlaceIndex -> Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = PlaceIndex {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" PlaceIndex
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "IndexName" PlaceIndex where
  type PropertyType "IndexName" PlaceIndex = Value Prelude.Text
  set :: PropertyType "IndexName" PlaceIndex -> PlaceIndex -> PlaceIndex
set PropertyType "IndexName" PlaceIndex
newValue PlaceIndex {Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: PlaceIndex -> ()
dataSource :: PlaceIndex -> Value Text
dataSourceConfiguration :: PlaceIndex -> Maybe DataSourceConfigurationProperty
description :: PlaceIndex -> Maybe (Value Text)
indexName :: PlaceIndex -> Value Text
pricingPlan :: PlaceIndex -> Maybe (Value Text)
tags :: PlaceIndex -> Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = PlaceIndex {indexName :: Value Text
indexName = PropertyType "IndexName" PlaceIndex
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "PricingPlan" PlaceIndex where
  type PropertyType "PricingPlan" PlaceIndex = Value Prelude.Text
  set :: PropertyType "PricingPlan" PlaceIndex -> PlaceIndex -> PlaceIndex
set PropertyType "PricingPlan" PlaceIndex
newValue PlaceIndex {Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: PlaceIndex -> ()
dataSource :: PlaceIndex -> Value Text
dataSourceConfiguration :: PlaceIndex -> Maybe DataSourceConfigurationProperty
description :: PlaceIndex -> Maybe (Value Text)
indexName :: PlaceIndex -> Value Text
pricingPlan :: PlaceIndex -> Maybe (Value Text)
tags :: PlaceIndex -> Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = PlaceIndex {pricingPlan :: Maybe (Value Text)
pricingPlan = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PricingPlan" PlaceIndex
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" PlaceIndex where
  type PropertyType "Tags" PlaceIndex = [Tag]
  set :: PropertyType "Tags" PlaceIndex -> PlaceIndex -> PlaceIndex
set PropertyType "Tags" PlaceIndex
newValue PlaceIndex {Maybe [Tag]
Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: PlaceIndex -> ()
dataSource :: PlaceIndex -> Value Text
dataSourceConfiguration :: PlaceIndex -> Maybe DataSourceConfigurationProperty
description :: PlaceIndex -> Maybe (Value Text)
indexName :: PlaceIndex -> Value Text
pricingPlan :: PlaceIndex -> Maybe (Value Text)
tags :: PlaceIndex -> Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = PlaceIndex {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" PlaceIndex
newValue, Maybe (Value Text)
Maybe DataSourceConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
haddock_workaround_ :: ()
dataSource :: Value Text
dataSourceConfiguration :: Maybe DataSourceConfigurationProperty
description :: Maybe (Value Text)
indexName :: Value Text
pricingPlan :: Maybe (Value Text)
..}