module Stratosphere.OpsWorks.App.DataSourceProperty (
        DataSourceProperty(..), mkDataSourceProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DataSourceProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-datasource.html>
    DataSourceProperty {DataSourceProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-datasource.html#cfn-opsworks-app-datasource-arn>
                        DataSourceProperty -> Maybe (Value Text)
arn :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-datasource.html#cfn-opsworks-app-datasource-databasename>
                        DataSourceProperty -> Maybe (Value Text)
databaseName :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-datasource.html#cfn-opsworks-app-datasource-type>
                        DataSourceProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DataSourceProperty -> DataSourceProperty -> Bool
(DataSourceProperty -> DataSourceProperty -> Bool)
-> (DataSourceProperty -> DataSourceProperty -> Bool)
-> Eq DataSourceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataSourceProperty -> DataSourceProperty -> Bool
== :: DataSourceProperty -> DataSourceProperty -> Bool
$c/= :: DataSourceProperty -> DataSourceProperty -> Bool
/= :: DataSourceProperty -> DataSourceProperty -> Bool
Prelude.Eq, Int -> DataSourceProperty -> ShowS
[DataSourceProperty] -> ShowS
DataSourceProperty -> String
(Int -> DataSourceProperty -> ShowS)
-> (DataSourceProperty -> String)
-> ([DataSourceProperty] -> ShowS)
-> Show DataSourceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataSourceProperty -> ShowS
showsPrec :: Int -> DataSourceProperty -> ShowS
$cshow :: DataSourceProperty -> String
show :: DataSourceProperty -> String
$cshowList :: [DataSourceProperty] -> ShowS
showList :: [DataSourceProperty] -> ShowS
Prelude.Show)
mkDataSourceProperty :: DataSourceProperty
mkDataSourceProperty :: DataSourceProperty
mkDataSourceProperty
  = DataSourceProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), arn :: Maybe (Value Text)
arn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       databaseName :: Maybe (Value Text)
databaseName = 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 DataSourceProperty where
  toResourceProperties :: DataSourceProperty -> ResourceProperties
toResourceProperties DataSourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceProperty -> ()
arn :: DataSourceProperty -> Maybe (Value Text)
databaseName :: DataSourceProperty -> Maybe (Value Text)
type' :: DataSourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
databaseName :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpsWorks::App.DataSource",
         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
"Arn" (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)
arn,
                            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
"DatabaseName" (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)
databaseName,
                            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 DataSourceProperty where
  toJSON :: DataSourceProperty -> Value
toJSON DataSourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceProperty -> ()
arn :: DataSourceProperty -> Maybe (Value Text)
databaseName :: DataSourceProperty -> Maybe (Value Text)
type' :: DataSourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
databaseName :: 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 -> 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
"Arn" (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)
arn,
               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
"DatabaseName" (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)
databaseName,
               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 "Arn" DataSourceProperty where
  type PropertyType "Arn" DataSourceProperty = Value Prelude.Text
  set :: PropertyType "Arn" DataSourceProperty
-> DataSourceProperty -> DataSourceProperty
set PropertyType "Arn" DataSourceProperty
newValue DataSourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceProperty -> ()
arn :: DataSourceProperty -> Maybe (Value Text)
databaseName :: DataSourceProperty -> Maybe (Value Text)
type' :: DataSourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
databaseName :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = DataSourceProperty {arn :: Maybe (Value Text)
arn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Arn" DataSourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
databaseName :: Maybe (Value Text)
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
databaseName :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
instance Property "DatabaseName" DataSourceProperty where
  type PropertyType "DatabaseName" DataSourceProperty = Value Prelude.Text
  set :: PropertyType "DatabaseName" DataSourceProperty
-> DataSourceProperty -> DataSourceProperty
set PropertyType "DatabaseName" DataSourceProperty
newValue DataSourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceProperty -> ()
arn :: DataSourceProperty -> Maybe (Value Text)
databaseName :: DataSourceProperty -> Maybe (Value Text)
type' :: DataSourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
databaseName :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = DataSourceProperty {databaseName :: Maybe (Value Text)
databaseName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DatabaseName" DataSourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
instance Property "Type" DataSourceProperty where
  type PropertyType "Type" DataSourceProperty = Value Prelude.Text
  set :: PropertyType "Type" DataSourceProperty
-> DataSourceProperty -> DataSourceProperty
set PropertyType "Type" DataSourceProperty
newValue DataSourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceProperty -> ()
arn :: DataSourceProperty -> Maybe (Value Text)
databaseName :: DataSourceProperty -> Maybe (Value Text)
type' :: DataSourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
databaseName :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = DataSourceProperty {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" DataSourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
databaseName :: Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
databaseName :: Maybe (Value Text)
..}