module Stratosphere.Glue.Connection (
        module Exports, Connection(..), mkConnection
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Glue.Connection.ConnectionInputProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Connection
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-connection.html>
    Connection {Connection -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-connection.html#cfn-glue-connection-catalogid>
                Connection -> Value Text
catalogId :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-connection.html#cfn-glue-connection-connectioninput>
                Connection -> ConnectionInputProperty
connectionInput :: ConnectionInputProperty}
  deriving stock (Connection -> Connection -> Bool
(Connection -> Connection -> Bool)
-> (Connection -> Connection -> Bool) -> Eq Connection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Connection -> Connection -> Bool
== :: Connection -> Connection -> Bool
$c/= :: Connection -> Connection -> Bool
/= :: Connection -> Connection -> Bool
Prelude.Eq, Int -> Connection -> ShowS
[Connection] -> ShowS
Connection -> String
(Int -> Connection -> ShowS)
-> (Connection -> String)
-> ([Connection] -> ShowS)
-> Show Connection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Connection -> ShowS
showsPrec :: Int -> Connection -> ShowS
$cshow :: Connection -> String
show :: Connection -> String
$cshowList :: [Connection] -> ShowS
showList :: [Connection] -> ShowS
Prelude.Show)
mkConnection ::
  Value Prelude.Text -> ConnectionInputProperty -> Connection
mkConnection :: Value Text -> ConnectionInputProperty -> Connection
mkConnection Value Text
catalogId ConnectionInputProperty
connectionInput
  = Connection
      {haddock_workaround_ :: ()
haddock_workaround_ = (), catalogId :: Value Text
catalogId = Value Text
catalogId,
       connectionInput :: ConnectionInputProperty
connectionInput = ConnectionInputProperty
connectionInput}
instance ToResourceProperties Connection where
  toResourceProperties :: Connection -> ResourceProperties
toResourceProperties Connection {()
Value Text
ConnectionInputProperty
haddock_workaround_ :: Connection -> ()
catalogId :: Connection -> Value Text
connectionInput :: Connection -> ConnectionInputProperty
haddock_workaround_ :: ()
catalogId :: Value Text
connectionInput :: ConnectionInputProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Glue::Connection", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"CatalogId" 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
catalogId,
                       Key
"ConnectionInput" Key -> ConnectionInputProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ConnectionInputProperty
connectionInput]}
instance JSON.ToJSON Connection where
  toJSON :: Connection -> Value
toJSON Connection {()
Value Text
ConnectionInputProperty
haddock_workaround_ :: Connection -> ()
catalogId :: Connection -> Value Text
connectionInput :: Connection -> ConnectionInputProperty
haddock_workaround_ :: ()
catalogId :: Value Text
connectionInput :: ConnectionInputProperty
..}
    = [(Key, Value)] -> Value
JSON.object
        [Key
"CatalogId" 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
catalogId,
         Key
"ConnectionInput" Key -> ConnectionInputProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ConnectionInputProperty
connectionInput]
instance Property "CatalogId" Connection where
  type PropertyType "CatalogId" Connection = Value Prelude.Text
  set :: PropertyType "CatalogId" Connection -> Connection -> Connection
set PropertyType "CatalogId" Connection
newValue Connection {()
Value Text
ConnectionInputProperty
haddock_workaround_ :: Connection -> ()
catalogId :: Connection -> Value Text
connectionInput :: Connection -> ConnectionInputProperty
haddock_workaround_ :: ()
catalogId :: Value Text
connectionInput :: ConnectionInputProperty
..}
    = Connection {catalogId :: Value Text
catalogId = PropertyType "CatalogId" Connection
Value Text
newValue, ()
ConnectionInputProperty
haddock_workaround_ :: ()
connectionInput :: ConnectionInputProperty
haddock_workaround_ :: ()
connectionInput :: ConnectionInputProperty
..}
instance Property "ConnectionInput" Connection where
  type PropertyType "ConnectionInput" Connection = ConnectionInputProperty
  set :: PropertyType "ConnectionInput" Connection
-> Connection -> Connection
set PropertyType "ConnectionInput" Connection
newValue Connection {()
Value Text
ConnectionInputProperty
haddock_workaround_ :: Connection -> ()
catalogId :: Connection -> Value Text
connectionInput :: Connection -> ConnectionInputProperty
haddock_workaround_ :: ()
catalogId :: Value Text
connectionInput :: ConnectionInputProperty
..}
    = Connection {connectionInput :: ConnectionInputProperty
connectionInput = PropertyType "ConnectionInput" Connection
ConnectionInputProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
catalogId :: Value Text
haddock_workaround_ :: ()
catalogId :: Value Text
..}