module Stratosphere.CodeConnections.Connection (
Connection(..), mkConnection
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Connection
=
Connection {Connection -> ()
haddock_workaround_ :: (),
Connection -> Value Text
connectionName :: (Value Prelude.Text),
Connection -> Maybe (Value Text)
hostArn :: (Prelude.Maybe (Value Prelude.Text)),
Connection -> Maybe (Value Text)
providerType :: (Prelude.Maybe (Value Prelude.Text)),
Connection -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
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 -> Connection
mkConnection :: Value Text -> Connection
mkConnection Value Text
connectionName
= Connection
{haddock_workaround_ :: ()
haddock_workaround_ = (), connectionName :: Value Text
connectionName = Value Text
connectionName,
hostArn :: Maybe (Value Text)
hostArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, providerType :: Maybe (Value Text)
providerType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Connection where
toResourceProperties :: Connection -> ResourceProperties
toResourceProperties Connection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Connection -> ()
connectionName :: Connection -> Value Text
hostArn :: Connection -> Maybe (Value Text)
providerType :: Connection -> Maybe (Value Text)
tags :: Connection -> Maybe [Tag]
haddock_workaround_ :: ()
connectionName :: Value Text
hostArn :: Maybe (Value Text)
providerType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodeConnections::Connection",
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
"ConnectionName" 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
connectionName]
([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
"HostArn" (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)
hostArn,
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
"ProviderType" (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)
providerType,
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 Connection where
toJSON :: Connection -> Value
toJSON Connection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Connection -> ()
connectionName :: Connection -> Value Text
hostArn :: Connection -> Maybe (Value Text)
providerType :: Connection -> Maybe (Value Text)
tags :: Connection -> Maybe [Tag]
haddock_workaround_ :: ()
connectionName :: Value Text
hostArn :: Maybe (Value Text)
providerType :: 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
"ConnectionName" 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
connectionName]
([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
"HostArn" (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)
hostArn,
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
"ProviderType" (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)
providerType,
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 "ConnectionName" Connection where
type PropertyType "ConnectionName" Connection = Value Prelude.Text
set :: PropertyType "ConnectionName" Connection
-> Connection -> Connection
set PropertyType "ConnectionName" Connection
newValue Connection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Connection -> ()
connectionName :: Connection -> Value Text
hostArn :: Connection -> Maybe (Value Text)
providerType :: Connection -> Maybe (Value Text)
tags :: Connection -> Maybe [Tag]
haddock_workaround_ :: ()
connectionName :: Value Text
hostArn :: Maybe (Value Text)
providerType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= Connection {connectionName :: Value Text
connectionName = PropertyType "ConnectionName" Connection
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
hostArn :: Maybe (Value Text)
providerType :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
hostArn :: Maybe (Value Text)
providerType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "HostArn" Connection where
type PropertyType "HostArn" Connection = Value Prelude.Text
set :: PropertyType "HostArn" Connection -> Connection -> Connection
set PropertyType "HostArn" Connection
newValue Connection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Connection -> ()
connectionName :: Connection -> Value Text
hostArn :: Connection -> Maybe (Value Text)
providerType :: Connection -> Maybe (Value Text)
tags :: Connection -> Maybe [Tag]
haddock_workaround_ :: ()
connectionName :: Value Text
hostArn :: Maybe (Value Text)
providerType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= Connection {hostArn :: Maybe (Value Text)
hostArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HostArn" Connection
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionName :: Value Text
providerType :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
connectionName :: Value Text
providerType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "ProviderType" Connection where
type PropertyType "ProviderType" Connection = Value Prelude.Text
set :: PropertyType "ProviderType" Connection -> Connection -> Connection
set PropertyType "ProviderType" Connection
newValue Connection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Connection -> ()
connectionName :: Connection -> Value Text
hostArn :: Connection -> Maybe (Value Text)
providerType :: Connection -> Maybe (Value Text)
tags :: Connection -> Maybe [Tag]
haddock_workaround_ :: ()
connectionName :: Value Text
hostArn :: Maybe (Value Text)
providerType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= Connection {providerType :: Maybe (Value Text)
providerType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ProviderType" Connection
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionName :: Value Text
hostArn :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
connectionName :: Value Text
hostArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" Connection where
type PropertyType "Tags" Connection = [Tag]
set :: PropertyType "Tags" Connection -> Connection -> Connection
set PropertyType "Tags" Connection
newValue Connection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Connection -> ()
connectionName :: Connection -> Value Text
hostArn :: Connection -> Maybe (Value Text)
providerType :: Connection -> Maybe (Value Text)
tags :: Connection -> Maybe [Tag]
haddock_workaround_ :: ()
connectionName :: Value Text
hostArn :: Maybe (Value Text)
providerType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= Connection {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" Connection
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionName :: Value Text
hostArn :: Maybe (Value Text)
providerType :: Maybe (Value Text)
haddock_workaround_ :: ()
connectionName :: Value Text
hostArn :: Maybe (Value Text)
providerType :: Maybe (Value Text)
..}