All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gitlab.kotlin.outputs.ProjectPushRules.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.4.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gitlab.kotlin.outputs

import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress

/**
 *
 * @property authorEmailRegex All commit author emails must match this regex, e.g. `@my-company.com$`.
 * @property branchNameRegex All branch names must match this regex, e.g. `(feature|hotfix)\/*`.
 * @property commitCommitterCheck Users can only push commits to this repository that were committed with one of their own verified emails.
 * @property commitCommitterNameCheck Users can only push commits to this repository if the commit author name is consistent with their GitLab account name.
 * @property commitMessageNegativeRegex No commit message is allowed to match this regex, e.g. `ssh\:\/\/`.
 * @property commitMessageRegex All commit messages must match this regex, e.g. `Fixed \d+\..*`.
 * @property denyDeleteTag Deny deleting a tag.
 * @property fileNameRegex All committed filenames must not match this regex, e.g. `(jar|exe)$`.
 * @property maxFileSize Maximum file size (MB).
 * @property memberCheck Restrict commits by author (email) to existing GitLab users.
 * @property preventSecrets GitLab will reject any files that are likely to contain secrets.
 * @property rejectUnsignedCommits Reject commit when it’s not signed through GPG.
 * */
 */
public data class ProjectPushRules(
    public val authorEmailRegex: String? = null,
    public val branchNameRegex: String? = null,
    public val commitCommitterCheck: Boolean? = null,
    public val commitCommitterNameCheck: Boolean? = null,
    public val commitMessageNegativeRegex: String? = null,
    public val commitMessageRegex: String? = null,
    public val denyDeleteTag: Boolean? = null,
    public val fileNameRegex: String? = null,
    public val maxFileSize: Int? = null,
    public val memberCheck: Boolean? = null,
    public val preventSecrets: Boolean? = null,
    public val rejectUnsignedCommits: Boolean? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gitlab.outputs.ProjectPushRules): ProjectPushRules =
            ProjectPushRules(
                authorEmailRegex = javaType.authorEmailRegex().map({ args0 -> args0 }).orElse(null),
                branchNameRegex = javaType.branchNameRegex().map({ args0 -> args0 }).orElse(null),
                commitCommitterCheck = javaType.commitCommitterCheck().map({ args0 -> args0 }).orElse(null),
                commitCommitterNameCheck = javaType.commitCommitterNameCheck().map({ args0 -> args0 }).orElse(null),
                commitMessageNegativeRegex = javaType.commitMessageNegativeRegex().map({ args0 ->
                    args0
                }).orElse(null),
                commitMessageRegex = javaType.commitMessageRegex().map({ args0 -> args0 }).orElse(null),
                denyDeleteTag = javaType.denyDeleteTag().map({ args0 -> args0 }).orElse(null),
                fileNameRegex = javaType.fileNameRegex().map({ args0 -> args0 }).orElse(null),
                maxFileSize = javaType.maxFileSize().map({ args0 -> args0 }).orElse(null),
                memberCheck = javaType.memberCheck().map({ args0 -> args0 }).orElse(null),
                preventSecrets = javaType.preventSecrets().map({ args0 -> args0 }).orElse(null),
                rejectUnsignedCommits = javaType.rejectUnsignedCommits().map({ args0 -> args0 }).orElse(null),
            )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy