module Stratosphere.CodeStarConnections.RepositoryLink (
        RepositoryLink(..), mkRepositoryLink
    ) 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 RepositoryLink
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarconnections-repositorylink.html>
    RepositoryLink {RepositoryLink -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarconnections-repositorylink.html#cfn-codestarconnections-repositorylink-connectionarn>
                    RepositoryLink -> Value Text
connectionArn :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarconnections-repositorylink.html#cfn-codestarconnections-repositorylink-encryptionkeyarn>
                    RepositoryLink -> Maybe (Value Text)
encryptionKeyArn :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarconnections-repositorylink.html#cfn-codestarconnections-repositorylink-ownerid>
                    RepositoryLink -> Value Text
ownerId :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarconnections-repositorylink.html#cfn-codestarconnections-repositorylink-repositoryname>
                    RepositoryLink -> Value Text
repositoryName :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarconnections-repositorylink.html#cfn-codestarconnections-repositorylink-tags>
                    RepositoryLink -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (RepositoryLink -> RepositoryLink -> Bool
(RepositoryLink -> RepositoryLink -> Bool)
-> (RepositoryLink -> RepositoryLink -> Bool) -> Eq RepositoryLink
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RepositoryLink -> RepositoryLink -> Bool
== :: RepositoryLink -> RepositoryLink -> Bool
$c/= :: RepositoryLink -> RepositoryLink -> Bool
/= :: RepositoryLink -> RepositoryLink -> Bool
Prelude.Eq, Int -> RepositoryLink -> ShowS
[RepositoryLink] -> ShowS
RepositoryLink -> String
(Int -> RepositoryLink -> ShowS)
-> (RepositoryLink -> String)
-> ([RepositoryLink] -> ShowS)
-> Show RepositoryLink
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RepositoryLink -> ShowS
showsPrec :: Int -> RepositoryLink -> ShowS
$cshow :: RepositoryLink -> String
show :: RepositoryLink -> String
$cshowList :: [RepositoryLink] -> ShowS
showList :: [RepositoryLink] -> ShowS
Prelude.Show)
mkRepositoryLink ::
  Value Prelude.Text
  -> Value Prelude.Text -> Value Prelude.Text -> RepositoryLink
mkRepositoryLink :: Value Text -> Value Text -> Value Text -> RepositoryLink
mkRepositoryLink Value Text
connectionArn Value Text
ownerId Value Text
repositoryName
  = RepositoryLink
      {haddock_workaround_ :: ()
haddock_workaround_ = (), connectionArn :: Value Text
connectionArn = Value Text
connectionArn,
       ownerId :: Value Text
ownerId = Value Text
ownerId, repositoryName :: Value Text
repositoryName = Value Text
repositoryName,
       encryptionKeyArn :: Maybe (Value Text)
encryptionKeyArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RepositoryLink where
  toResourceProperties :: RepositoryLink -> ResourceProperties
toResourceProperties RepositoryLink {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RepositoryLink -> ()
connectionArn :: RepositoryLink -> Value Text
encryptionKeyArn :: RepositoryLink -> Maybe (Value Text)
ownerId :: RepositoryLink -> Value Text
repositoryName :: RepositoryLink -> Value Text
tags :: RepositoryLink -> Maybe [Tag]
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
repositoryName :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodeStarConnections::RepositoryLink",
         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
"ConnectionArn" 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
connectionArn, Key
"OwnerId" 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
ownerId,
                            Key
"RepositoryName" 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
repositoryName]
                           ([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
"EncryptionKeyArn" (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)
encryptionKeyArn,
                               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 RepositoryLink where
  toJSON :: RepositoryLink -> Value
toJSON RepositoryLink {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RepositoryLink -> ()
connectionArn :: RepositoryLink -> Value Text
encryptionKeyArn :: RepositoryLink -> Maybe (Value Text)
ownerId :: RepositoryLink -> Value Text
repositoryName :: RepositoryLink -> Value Text
tags :: RepositoryLink -> Maybe [Tag]
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
repositoryName :: 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
"ConnectionArn" 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
connectionArn, Key
"OwnerId" 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
ownerId,
               Key
"RepositoryName" 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
repositoryName]
              ([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
"EncryptionKeyArn" (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)
encryptionKeyArn,
                  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 "ConnectionArn" RepositoryLink where
  type PropertyType "ConnectionArn" RepositoryLink = Value Prelude.Text
  set :: PropertyType "ConnectionArn" RepositoryLink
-> RepositoryLink -> RepositoryLink
set PropertyType "ConnectionArn" RepositoryLink
newValue RepositoryLink {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RepositoryLink -> ()
connectionArn :: RepositoryLink -> Value Text
encryptionKeyArn :: RepositoryLink -> Maybe (Value Text)
ownerId :: RepositoryLink -> Value Text
repositoryName :: RepositoryLink -> Value Text
tags :: RepositoryLink -> Maybe [Tag]
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
repositoryName :: Value Text
tags :: Maybe [Tag]
..}
    = RepositoryLink {connectionArn :: Value Text
connectionArn = PropertyType "ConnectionArn" RepositoryLink
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
repositoryName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
repositoryName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "EncryptionKeyArn" RepositoryLink where
  type PropertyType "EncryptionKeyArn" RepositoryLink = Value Prelude.Text
  set :: PropertyType "EncryptionKeyArn" RepositoryLink
-> RepositoryLink -> RepositoryLink
set PropertyType "EncryptionKeyArn" RepositoryLink
newValue RepositoryLink {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RepositoryLink -> ()
connectionArn :: RepositoryLink -> Value Text
encryptionKeyArn :: RepositoryLink -> Maybe (Value Text)
ownerId :: RepositoryLink -> Value Text
repositoryName :: RepositoryLink -> Value Text
tags :: RepositoryLink -> Maybe [Tag]
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
repositoryName :: Value Text
tags :: Maybe [Tag]
..}
    = RepositoryLink {encryptionKeyArn :: Maybe (Value Text)
encryptionKeyArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EncryptionKeyArn" RepositoryLink
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
connectionArn :: Value Text
ownerId :: Value Text
repositoryName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
connectionArn :: Value Text
ownerId :: Value Text
repositoryName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "OwnerId" RepositoryLink where
  type PropertyType "OwnerId" RepositoryLink = Value Prelude.Text
  set :: PropertyType "OwnerId" RepositoryLink
-> RepositoryLink -> RepositoryLink
set PropertyType "OwnerId" RepositoryLink
newValue RepositoryLink {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RepositoryLink -> ()
connectionArn :: RepositoryLink -> Value Text
encryptionKeyArn :: RepositoryLink -> Maybe (Value Text)
ownerId :: RepositoryLink -> Value Text
repositoryName :: RepositoryLink -> Value Text
tags :: RepositoryLink -> Maybe [Tag]
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
repositoryName :: Value Text
tags :: Maybe [Tag]
..}
    = RepositoryLink {ownerId :: Value Text
ownerId = PropertyType "OwnerId" RepositoryLink
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
repositoryName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
repositoryName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "RepositoryName" RepositoryLink where
  type PropertyType "RepositoryName" RepositoryLink = Value Prelude.Text
  set :: PropertyType "RepositoryName" RepositoryLink
-> RepositoryLink -> RepositoryLink
set PropertyType "RepositoryName" RepositoryLink
newValue RepositoryLink {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RepositoryLink -> ()
connectionArn :: RepositoryLink -> Value Text
encryptionKeyArn :: RepositoryLink -> Maybe (Value Text)
ownerId :: RepositoryLink -> Value Text
repositoryName :: RepositoryLink -> Value Text
tags :: RepositoryLink -> Maybe [Tag]
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
repositoryName :: Value Text
tags :: Maybe [Tag]
..}
    = RepositoryLink {repositoryName :: Value Text
repositoryName = PropertyType "RepositoryName" RepositoryLink
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" RepositoryLink where
  type PropertyType "Tags" RepositoryLink = [Tag]
  set :: PropertyType "Tags" RepositoryLink
-> RepositoryLink -> RepositoryLink
set PropertyType "Tags" RepositoryLink
newValue RepositoryLink {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RepositoryLink -> ()
connectionArn :: RepositoryLink -> Value Text
encryptionKeyArn :: RepositoryLink -> Maybe (Value Text)
ownerId :: RepositoryLink -> Value Text
repositoryName :: RepositoryLink -> Value Text
tags :: RepositoryLink -> Maybe [Tag]
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
repositoryName :: Value Text
tags :: Maybe [Tag]
..}
    = RepositoryLink {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" RepositoryLink
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
repositoryName :: Value Text
haddock_workaround_ :: ()
connectionArn :: Value Text
encryptionKeyArn :: Maybe (Value Text)
ownerId :: Value Text
repositoryName :: Value Text
..}