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

com.pulumi.gitlab.kotlin.IntegrationEmailsOnPushArgs.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

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gitlab.IntegrationEmailsOnPushArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * The `gitlab.IntegrationEmailsOnPush` resource allows to manage the lifecycle of a project integration with Emails on Push Service.
 * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#emails-on-push)
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gitlab from "@pulumi/gitlab";
 * const awesomeProject = new gitlab.Project("awesome_project", {
 *     name: "awesome_project",
 *     description: "My awesome project.",
 *     visibilityLevel: "public",
 * });
 * const emails = new gitlab.IntegrationEmailsOnPush("emails", {
 *     project: awesomeProject.id,
 *     recipients: "[email protected] [email protected]",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gitlab as gitlab
 * awesome_project = gitlab.Project("awesome_project",
 *     name="awesome_project",
 *     description="My awesome project.",
 *     visibility_level="public")
 * emails = gitlab.IntegrationEmailsOnPush("emails",
 *     project=awesome_project.id,
 *     recipients="[email protected] [email protected]")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using GitLab = Pulumi.GitLab;
 * return await Deployment.RunAsync(() =>
 * {
 *     var awesomeProject = new GitLab.Project("awesome_project", new()
 *     {
 *         Name = "awesome_project",
 *         Description = "My awesome project.",
 *         VisibilityLevel = "public",
 *     });
 *     var emails = new GitLab.IntegrationEmailsOnPush("emails", new()
 *     {
 *         Project = awesomeProject.Id,
 *         Recipients = "[email protected] [email protected]",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		awesomeProject, err := gitlab.NewProject(ctx, "awesome_project", &gitlab.ProjectArgs{
 * 			Name:            pulumi.String("awesome_project"),
 * 			Description:     pulumi.String("My awesome project."),
 * 			VisibilityLevel: pulumi.String("public"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = gitlab.NewIntegrationEmailsOnPush(ctx, "emails", &gitlab.IntegrationEmailsOnPushArgs{
 * 			Project:    awesomeProject.ID(),
 * 			Recipients: pulumi.String("[email protected] [email protected]"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gitlab.Project;
 * import com.pulumi.gitlab.ProjectArgs;
 * import com.pulumi.gitlab.IntegrationEmailsOnPush;
 * import com.pulumi.gitlab.IntegrationEmailsOnPushArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var awesomeProject = new Project("awesomeProject", ProjectArgs.builder()
 *             .name("awesome_project")
 *             .description("My awesome project.")
 *             .visibilityLevel("public")
 *             .build());
 *         var emails = new IntegrationEmailsOnPush("emails", IntegrationEmailsOnPushArgs.builder()
 *             .project(awesomeProject.id())
 *             .recipients("[email protected] [email protected]")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   awesomeProject:
 *     type: gitlab:Project
 *     name: awesome_project
 *     properties:
 *       name: awesome_project
 *       description: My awesome project.
 *       visibilityLevel: public
 *   emails:
 *     type: gitlab:IntegrationEmailsOnPush
 *     properties:
 *       project: ${awesomeProject.id}
 *       recipients: [email protected] [email protected]
 * ```
 * 
 * ## Import
 * Starting in Terraform v1.5.0 you can use an import block to import `gitlab_integration_emails_on_push`. For example:
 * terraform
 * import {
 *   to = gitlab_integration_emails_on_push.example
 *   id = "see CLI command below for ID"
 * }
 * Import using the CLI is supported using the following syntax:
 * You can import a gitlab_integration_emails_on_push state using the project ID, e.g.
 * ```sh
 * $ pulumi import gitlab:index/integrationEmailsOnPush:IntegrationEmailsOnPush emails 1
 * ```
 * @property branchesToBeNotified Branches to send notifications for. Valid options are `all`, `default`, `protected`, `default_and_protected`. Notifications are always fired for tag pushes.
 * @property disableDiffs Disable code diffs.
 * @property project ID or full-path of the project you want to activate integration on.
 * @property pushEvents Enable notifications for push events.
 * @property recipients Emails separated by whitespace.
 * @property sendFromCommitterEmail Send from committer.
 * @property tagPushEvents Enable notifications for tag push events.
 */
public data class IntegrationEmailsOnPushArgs(
    public val branchesToBeNotified: Output? = null,
    public val disableDiffs: Output? = null,
    public val project: Output? = null,
    public val pushEvents: Output? = null,
    public val recipients: Output? = null,
    public val sendFromCommitterEmail: Output? = null,
    public val tagPushEvents: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.IntegrationEmailsOnPushArgs =
        com.pulumi.gitlab.IntegrationEmailsOnPushArgs.builder()
            .branchesToBeNotified(branchesToBeNotified?.applyValue({ args0 -> args0 }))
            .disableDiffs(disableDiffs?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .pushEvents(pushEvents?.applyValue({ args0 -> args0 }))
            .recipients(recipients?.applyValue({ args0 -> args0 }))
            .sendFromCommitterEmail(sendFromCommitterEmail?.applyValue({ args0 -> args0 }))
            .tagPushEvents(tagPushEvents?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [IntegrationEmailsOnPushArgs].
 */
@PulumiTagMarker
public class IntegrationEmailsOnPushArgsBuilder internal constructor() {
    private var branchesToBeNotified: Output? = null

    private var disableDiffs: Output? = null

    private var project: Output? = null

    private var pushEvents: Output? = null

    private var recipients: Output? = null

    private var sendFromCommitterEmail: Output? = null

    private var tagPushEvents: Output? = null

    /**
     * @param value Branches to send notifications for. Valid options are `all`, `default`, `protected`, `default_and_protected`. Notifications are always fired for tag pushes.
     */
    @JvmName("emupgjmfkugcduwn")
    public suspend fun branchesToBeNotified(`value`: Output) {
        this.branchesToBeNotified = value
    }

    /**
     * @param value Disable code diffs.
     */
    @JvmName("hxcjuilibbijqtwe")
    public suspend fun disableDiffs(`value`: Output) {
        this.disableDiffs = value
    }

    /**
     * @param value ID or full-path of the project you want to activate integration on.
     */
    @JvmName("jjqapqmctynulgqt")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Enable notifications for push events.
     */
    @JvmName("yaoxyocawecigwjm")
    public suspend fun pushEvents(`value`: Output) {
        this.pushEvents = value
    }

    /**
     * @param value Emails separated by whitespace.
     */
    @JvmName("jmgmrtnqfvlfsgcx")
    public suspend fun recipients(`value`: Output) {
        this.recipients = value
    }

    /**
     * @param value Send from committer.
     */
    @JvmName("fhhfooslxcihwjio")
    public suspend fun sendFromCommitterEmail(`value`: Output) {
        this.sendFromCommitterEmail = value
    }

    /**
     * @param value Enable notifications for tag push events.
     */
    @JvmName("fpyywphlixbbsywa")
    public suspend fun tagPushEvents(`value`: Output) {
        this.tagPushEvents = value
    }

    /**
     * @param value Branches to send notifications for. Valid options are `all`, `default`, `protected`, `default_and_protected`. Notifications are always fired for tag pushes.
     */
    @JvmName("rllulrijlerbtogb")
    public suspend fun branchesToBeNotified(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.branchesToBeNotified = mapped
    }

    /**
     * @param value Disable code diffs.
     */
    @JvmName("jclpkmmgvaqhmhsr")
    public suspend fun disableDiffs(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disableDiffs = mapped
    }

    /**
     * @param value ID or full-path of the project you want to activate integration on.
     */
    @JvmName("ridsjefowjijntgd")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Enable notifications for push events.
     */
    @JvmName("hbivmtymttipfxdj")
    public suspend fun pushEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pushEvents = mapped
    }

    /**
     * @param value Emails separated by whitespace.
     */
    @JvmName("ykdrnxgmxvtccjiv")
    public suspend fun recipients(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.recipients = mapped
    }

    /**
     * @param value Send from committer.
     */
    @JvmName("ptxryqauxhojdajb")
    public suspend fun sendFromCommitterEmail(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sendFromCommitterEmail = mapped
    }

    /**
     * @param value Enable notifications for tag push events.
     */
    @JvmName("etyxhywyajoelycr")
    public suspend fun tagPushEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagPushEvents = mapped
    }

    internal fun build(): IntegrationEmailsOnPushArgs = IntegrationEmailsOnPushArgs(
        branchesToBeNotified = branchesToBeNotified,
        disableDiffs = disableDiffs,
        project = project,
        pushEvents = pushEvents,
        recipients = recipients,
        sendFromCommitterEmail = sendFromCommitterEmail,
        tagPushEvents = tagPushEvents,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy