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

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

There is a newer version: 6.4.0-alpha.1731735876
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 com.pulumi.github.inputs.OrganizationWebhookConfigurationArgs;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final OrganizationWebhookArgs Empty = new OrganizationWebhookArgs();

    /**
     * Indicate of the webhook should receive events. Defaults to `true`.
     * 
     */
    @Import(name="active")
    private @Nullable Output active;

    /**
     * @return Indicate of the webhook should receive events. Defaults to `true`.
     * 
     */
    public Optional> active() {
        return Optional.ofNullable(this.active);
    }

    /**
     * key/value pair of configuration for this webhook. Available keys are `url`, `content_type`, `secret` and `insecure_ssl`.
     * 
     */
    @Import(name="configuration")
    private @Nullable Output configuration;

    /**
     * @return key/value pair of configuration for this webhook. Available keys are `url`, `content_type`, `secret` and `insecure_ssl`.
     * 
     */
    public Optional> configuration() {
        return Optional.ofNullable(this.configuration);
    }

    /**
     * A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/)
     * 
     */
    @Import(name="events", required=true)
    private Output> events;

    /**
     * @return A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/)
     * 
     */
    public Output> events() {
        return this.events;
    }

    private OrganizationWebhookArgs() {}

    private OrganizationWebhookArgs(OrganizationWebhookArgs $) {
        this.active = $.active;
        this.configuration = $.configuration;
        this.events = $.events;
    }

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

    public static final class Builder {
        private OrganizationWebhookArgs $;

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

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

        /**
         * @param active Indicate of the webhook should receive events. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder active(@Nullable Output active) {
            $.active = active;
            return this;
        }

        /**
         * @param active Indicate of the webhook should receive events. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder active(Boolean active) {
            return active(Output.of(active));
        }

        /**
         * @param configuration key/value pair of configuration for this webhook. Available keys are `url`, `content_type`, `secret` and `insecure_ssl`.
         * 
         * @return builder
         * 
         */
        public Builder configuration(@Nullable Output configuration) {
            $.configuration = configuration;
            return this;
        }

        /**
         * @param configuration key/value pair of configuration for this webhook. Available keys are `url`, `content_type`, `secret` and `insecure_ssl`.
         * 
         * @return builder
         * 
         */
        public Builder configuration(OrganizationWebhookConfigurationArgs configuration) {
            return configuration(Output.of(configuration));
        }

        /**
         * @param events A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/)
         * 
         * @return builder
         * 
         */
        public Builder events(Output> events) {
            $.events = events;
            return this;
        }

        /**
         * @param events A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/)
         * 
         * @return builder
         * 
         */
        public Builder events(List events) {
            return events(Output.of(events));
        }

        /**
         * @param events A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/)
         * 
         * @return builder
         * 
         */
        public Builder events(String... events) {
            return events(List.of(events));
        }

        public OrganizationWebhookArgs build() {
            if ($.events == null) {
                throw new MissingRequiredPropertyException("OrganizationWebhookArgs", "events");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy