module Stratosphere.Location.PlaceIndex.DataSourceConfigurationProperty (
        DataSourceConfigurationProperty(..),
        mkDataSourceConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DataSourceConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-location-placeindex-datasourceconfiguration.html>
    DataSourceConfigurationProperty {DataSourceConfigurationProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-location-placeindex-datasourceconfiguration.html#cfn-location-placeindex-datasourceconfiguration-intendeduse>
                                     DataSourceConfigurationProperty -> Maybe (Value Text)
intendedUse :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool
(DataSourceConfigurationProperty
 -> DataSourceConfigurationProperty -> Bool)
-> (DataSourceConfigurationProperty
    -> DataSourceConfigurationProperty -> Bool)
-> Eq DataSourceConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool
== :: DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool
$c/= :: DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool
/= :: DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool
Prelude.Eq, Int -> DataSourceConfigurationProperty -> ShowS
[DataSourceConfigurationProperty] -> ShowS
DataSourceConfigurationProperty -> String
(Int -> DataSourceConfigurationProperty -> ShowS)
-> (DataSourceConfigurationProperty -> String)
-> ([DataSourceConfigurationProperty] -> ShowS)
-> Show DataSourceConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataSourceConfigurationProperty -> ShowS
showsPrec :: Int -> DataSourceConfigurationProperty -> ShowS
$cshow :: DataSourceConfigurationProperty -> String
show :: DataSourceConfigurationProperty -> String
$cshowList :: [DataSourceConfigurationProperty] -> ShowS
showList :: [DataSourceConfigurationProperty] -> ShowS
Prelude.Show)
mkDataSourceConfigurationProperty ::
  DataSourceConfigurationProperty
mkDataSourceConfigurationProperty :: DataSourceConfigurationProperty
mkDataSourceConfigurationProperty
  = DataSourceConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), intendedUse :: Maybe (Value Text)
intendedUse = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DataSourceConfigurationProperty where
  toResourceProperties :: DataSourceConfigurationProperty -> ResourceProperties
toResourceProperties DataSourceConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceConfigurationProperty -> ()
intendedUse :: DataSourceConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
intendedUse :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Location::PlaceIndex.DataSourceConfiguration",
         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 -> 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
"IntendedUse" (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)
intendedUse])}
instance JSON.ToJSON DataSourceConfigurationProperty where
  toJSON :: DataSourceConfigurationProperty -> Value
toJSON DataSourceConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceConfigurationProperty -> ()
intendedUse :: DataSourceConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
intendedUse :: 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 -> 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
"IntendedUse" (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)
intendedUse]))
instance Property "IntendedUse" DataSourceConfigurationProperty where
  type PropertyType "IntendedUse" DataSourceConfigurationProperty = Value Prelude.Text
  set :: PropertyType "IntendedUse" DataSourceConfigurationProperty
-> DataSourceConfigurationProperty
-> DataSourceConfigurationProperty
set PropertyType "IntendedUse" DataSourceConfigurationProperty
newValue DataSourceConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceConfigurationProperty -> ()
intendedUse :: DataSourceConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
intendedUse :: Maybe (Value Text)
..}
    = DataSourceConfigurationProperty
        {intendedUse :: Maybe (Value Text)
intendedUse = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IntendedUse" DataSourceConfigurationProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}