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

com.pulumi.github.ReleaseArgs Maven / Gradle / Ivy

There is a newer version: 6.3.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.github;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ReleaseArgs extends com.pulumi.resources.ResourceArgs {

    public static final ReleaseArgs Empty = new ReleaseArgs();

    /**
     * Text describing the contents of the tag.
     * 
     */
    @Import(name="body")
    private @Nullable Output body;

    /**
     * @return Text describing the contents of the tag.
     * 
     */
    public Optional> body() {
        return Optional.ofNullable(this.body);
    }

    /**
     * If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see [Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).
     * 
     */
    @Import(name="discussionCategoryName")
    private @Nullable Output discussionCategoryName;

    /**
     * @return If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see [Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).
     * 
     */
    public Optional> discussionCategoryName() {
        return Optional.ofNullable(this.discussionCategoryName);
    }

    /**
     * Set to `false` to create a published release.
     * 
     */
    @Import(name="draft")
    private @Nullable Output draft;

    /**
     * @return Set to `false` to create a published release.
     * 
     */
    public Optional> draft() {
        return Optional.ofNullable(this.draft);
    }

    /**
     * Set to `true` to automatically generate the name and body for this release. If `name` is specified, the specified `name` will be used; otherwise, a name will be automatically generated. If `body` is specified, the `body` will be pre-pended to the automatically generated notes.
     * 
     */
    @Import(name="generateReleaseNotes")
    private @Nullable Output generateReleaseNotes;

    /**
     * @return Set to `true` to automatically generate the name and body for this release. If `name` is specified, the specified `name` will be used; otherwise, a name will be automatically generated. If `body` is specified, the `body` will be pre-pended to the automatically generated notes.
     * 
     */
    public Optional> generateReleaseNotes() {
        return Optional.ofNullable(this.generateReleaseNotes);
    }

    /**
     * The name of the release.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the release.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Set to `false` to identify the release as a full release.
     * 
     */
    @Import(name="prerelease")
    private @Nullable Output prerelease;

    /**
     * @return Set to `false` to identify the release as a full release.
     * 
     */
    public Optional> prerelease() {
        return Optional.ofNullable(this.prerelease);
    }

    /**
     * The name of the repository.
     * 
     */
    @Import(name="repository", required=true)
    private Output repository;

    /**
     * @return The name of the repository.
     * 
     */
    public Output repository() {
        return this.repository;
    }

    /**
     * The name of the tag.
     * 
     */
    @Import(name="tagName", required=true)
    private Output tagName;

    /**
     * @return The name of the tag.
     * 
     */
    public Output tagName() {
        return this.tagName;
    }

    /**
     * The branch name or commit SHA the tag is created from. Defaults to the default branch of the repository.
     * 
     */
    @Import(name="targetCommitish")
    private @Nullable Output targetCommitish;

    /**
     * @return The branch name or commit SHA the tag is created from. Defaults to the default branch of the repository.
     * 
     */
    public Optional> targetCommitish() {
        return Optional.ofNullable(this.targetCommitish);
    }

    private ReleaseArgs() {}

    private ReleaseArgs(ReleaseArgs $) {
        this.body = $.body;
        this.discussionCategoryName = $.discussionCategoryName;
        this.draft = $.draft;
        this.generateReleaseNotes = $.generateReleaseNotes;
        this.name = $.name;
        this.prerelease = $.prerelease;
        this.repository = $.repository;
        this.tagName = $.tagName;
        this.targetCommitish = $.targetCommitish;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ReleaseArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ReleaseArgs $;

        public Builder() {
            $ = new ReleaseArgs();
        }

        public Builder(ReleaseArgs defaults) {
            $ = new ReleaseArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param body Text describing the contents of the tag.
         * 
         * @return builder
         * 
         */
        public Builder body(@Nullable Output body) {
            $.body = body;
            return this;
        }

        /**
         * @param body Text describing the contents of the tag.
         * 
         * @return builder
         * 
         */
        public Builder body(String body) {
            return body(Output.of(body));
        }

        /**
         * @param discussionCategoryName If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see [Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).
         * 
         * @return builder
         * 
         */
        public Builder discussionCategoryName(@Nullable Output discussionCategoryName) {
            $.discussionCategoryName = discussionCategoryName;
            return this;
        }

        /**
         * @param discussionCategoryName If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see [Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).
         * 
         * @return builder
         * 
         */
        public Builder discussionCategoryName(String discussionCategoryName) {
            return discussionCategoryName(Output.of(discussionCategoryName));
        }

        /**
         * @param draft Set to `false` to create a published release.
         * 
         * @return builder
         * 
         */
        public Builder draft(@Nullable Output draft) {
            $.draft = draft;
            return this;
        }

        /**
         * @param draft Set to `false` to create a published release.
         * 
         * @return builder
         * 
         */
        public Builder draft(Boolean draft) {
            return draft(Output.of(draft));
        }

        /**
         * @param generateReleaseNotes Set to `true` to automatically generate the name and body for this release. If `name` is specified, the specified `name` will be used; otherwise, a name will be automatically generated. If `body` is specified, the `body` will be pre-pended to the automatically generated notes.
         * 
         * @return builder
         * 
         */
        public Builder generateReleaseNotes(@Nullable Output generateReleaseNotes) {
            $.generateReleaseNotes = generateReleaseNotes;
            return this;
        }

        /**
         * @param generateReleaseNotes Set to `true` to automatically generate the name and body for this release. If `name` is specified, the specified `name` will be used; otherwise, a name will be automatically generated. If `body` is specified, the `body` will be pre-pended to the automatically generated notes.
         * 
         * @return builder
         * 
         */
        public Builder generateReleaseNotes(Boolean generateReleaseNotes) {
            return generateReleaseNotes(Output.of(generateReleaseNotes));
        }

        /**
         * @param name The name of the release.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the release.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param prerelease Set to `false` to identify the release as a full release.
         * 
         * @return builder
         * 
         */
        public Builder prerelease(@Nullable Output prerelease) {
            $.prerelease = prerelease;
            return this;
        }

        /**
         * @param prerelease Set to `false` to identify the release as a full release.
         * 
         * @return builder
         * 
         */
        public Builder prerelease(Boolean prerelease) {
            return prerelease(Output.of(prerelease));
        }

        /**
         * @param repository The name of the repository.
         * 
         * @return builder
         * 
         */
        public Builder repository(Output repository) {
            $.repository = repository;
            return this;
        }

        /**
         * @param repository The name of the repository.
         * 
         * @return builder
         * 
         */
        public Builder repository(String repository) {
            return repository(Output.of(repository));
        }

        /**
         * @param tagName The name of the tag.
         * 
         * @return builder
         * 
         */
        public Builder tagName(Output tagName) {
            $.tagName = tagName;
            return this;
        }

        /**
         * @param tagName The name of the tag.
         * 
         * @return builder
         * 
         */
        public Builder tagName(String tagName) {
            return tagName(Output.of(tagName));
        }

        /**
         * @param targetCommitish The branch name or commit SHA the tag is created from. Defaults to the default branch of the repository.
         * 
         * @return builder
         * 
         */
        public Builder targetCommitish(@Nullable Output targetCommitish) {
            $.targetCommitish = targetCommitish;
            return this;
        }

        /**
         * @param targetCommitish The branch name or commit SHA the tag is created from. Defaults to the default branch of the repository.
         * 
         * @return builder
         * 
         */
        public Builder targetCommitish(String targetCommitish) {
            return targetCommitish(Output.of(targetCommitish));
        }

        public ReleaseArgs build() {
            if ($.repository == null) {
                throw new MissingRequiredPropertyException("ReleaseArgs", "repository");
            }
            if ($.tagName == null) {
                throw new MissingRequiredPropertyException("ReleaseArgs", "tagName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy