// *** 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.gcp.storage.inputs;

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


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

    public static final TransferJobNotificationConfigArgs Empty = new TransferJobNotificationConfigArgs();

    /**
     * Event types for which a notification is desired. If empty, send notifications for all event types. The valid types are &#34;TRANSFER_OPERATION_SUCCESS&#34;, &#34;TRANSFER_OPERATION_FAILED&#34;, &#34;TRANSFER_OPERATION_ABORTED&#34;.
     * 
     */
    @Import(name="eventTypes")
    private @Nullable Output<List<String>> eventTypes;

    /**
     * @return Event types for which a notification is desired. If empty, send notifications for all event types. The valid types are &#34;TRANSFER_OPERATION_SUCCESS&#34;, &#34;TRANSFER_OPERATION_FAILED&#34;, &#34;TRANSFER_OPERATION_ABORTED&#34;.
     * 
     */
    public Optional<Output<List<String>>> eventTypes() {
        return Optional.ofNullable(this.eventTypes);
    }

    /**
     * The desired format of the notification message payloads. One of &#34;NONE&#34; or &#34;JSON&#34;.
     * 
     */
    @Import(name="payloadFormat", required=true)
    private Output<String> payloadFormat;

    /**
     * @return The desired format of the notification message payloads. One of &#34;NONE&#34; or &#34;JSON&#34;.
     * 
     */
    public Output<String> payloadFormat() {
        return this.payloadFormat;
    }

    /**
     * The Topic.name of the Pub/Sub topic to which to publish notifications. Must be of the format: projects/{project}/topics/{topic}. Not matching this format results in an INVALID_ARGUMENT error.
     * 
     */
    @Import(name="pubsubTopic", required=true)
    private Output<String> pubsubTopic;

    /**
     * @return The Topic.name of the Pub/Sub topic to which to publish notifications. Must be of the format: projects/{project}/topics/{topic}. Not matching this format results in an INVALID_ARGUMENT error.
     * 
     */
    public Output<String> pubsubTopic() {
        return this.pubsubTopic;
    }

    private TransferJobNotificationConfigArgs() {}

    private TransferJobNotificationConfigArgs(TransferJobNotificationConfigArgs $) {
        this.eventTypes = $.eventTypes;
        this.payloadFormat = $.payloadFormat;
        this.pubsubTopic = $.pubsubTopic;
    }

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

    public static final class Builder {
        private TransferJobNotificationConfigArgs $;

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

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

        /**
         * @param eventTypes Event types for which a notification is desired. If empty, send notifications for all event types. The valid types are &#34;TRANSFER_OPERATION_SUCCESS&#34;, &#34;TRANSFER_OPERATION_FAILED&#34;, &#34;TRANSFER_OPERATION_ABORTED&#34;.
         * 
         * @return builder
         * 
         */
        public Builder eventTypes(@Nullable Output<List<String>> eventTypes) {
            $.eventTypes = eventTypes;
            return this;
        }

        /**
         * @param eventTypes Event types for which a notification is desired. If empty, send notifications for all event types. The valid types are &#34;TRANSFER_OPERATION_SUCCESS&#34;, &#34;TRANSFER_OPERATION_FAILED&#34;, &#34;TRANSFER_OPERATION_ABORTED&#34;.
         * 
         * @return builder
         * 
         */
        public Builder eventTypes(List<String> eventTypes) {
            return eventTypes(Output.of(eventTypes));
        }

        /**
         * @param eventTypes Event types for which a notification is desired. If empty, send notifications for all event types. The valid types are &#34;TRANSFER_OPERATION_SUCCESS&#34;, &#34;TRANSFER_OPERATION_FAILED&#34;, &#34;TRANSFER_OPERATION_ABORTED&#34;.
         * 
         * @return builder
         * 
         */
        public Builder eventTypes(String... eventTypes) {
            return eventTypes(List.of(eventTypes));
        }

        /**
         * @param payloadFormat The desired format of the notification message payloads. One of &#34;NONE&#34; or &#34;JSON&#34;.
         * 
         * @return builder
         * 
         */
        public Builder payloadFormat(Output<String> payloadFormat) {
            $.payloadFormat = payloadFormat;
            return this;
        }

        /**
         * @param payloadFormat The desired format of the notification message payloads. One of &#34;NONE&#34; or &#34;JSON&#34;.
         * 
         * @return builder
         * 
         */
        public Builder payloadFormat(String payloadFormat) {
            return payloadFormat(Output.of(payloadFormat));
        }

        /**
         * @param pubsubTopic The Topic.name of the Pub/Sub topic to which to publish notifications. Must be of the format: projects/{project}/topics/{topic}. Not matching this format results in an INVALID_ARGUMENT error.
         * 
         * @return builder
         * 
         */
        public Builder pubsubTopic(Output<String> pubsubTopic) {
            $.pubsubTopic = pubsubTopic;
            return this;
        }

        /**
         * @param pubsubTopic The Topic.name of the Pub/Sub topic to which to publish notifications. Must be of the format: projects/{project}/topics/{topic}. Not matching this format results in an INVALID_ARGUMENT error.
         * 
         * @return builder
         * 
         */
        public Builder pubsubTopic(String pubsubTopic) {
            return pubsubTopic(Output.of(pubsubTopic));
        }

        public TransferJobNotificationConfigArgs build() {
            $.payloadFormat = Objects.requireNonNull($.payloadFormat, "expected parameter 'payloadFormat' to be non-null");
            $.pubsubTopic = Objects.requireNonNull($.pubsubTopic, "expected parameter 'pubsubTopic' to be non-null");
            return $;
        }
    }

}
