// *** 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;

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


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

    public static final NotificationArgs Empty = new NotificationArgs();

    /**
     * The name of the bucket.
     * 
     */
    @Import(name="bucket", required=true)
    private Output<String> bucket;

    /**
     * @return The name of the bucket.
     * 
     */
    public Output<String> bucket() {
        return this.bucket;
    }

    /**
     * A set of key/value attribute pairs to attach to each Cloud PubSub message published for this notification subscription
     * 
     */
    @Import(name="customAttributes")
    private @Nullable Output<Map<String,String>> customAttributes;

    /**
     * @return A set of key/value attribute pairs to attach to each Cloud PubSub message published for this notification subscription
     * 
     */
    public Optional<Output<Map<String,String>>> customAttributes() {
        return Optional.ofNullable(this.customAttributes);
    }

    /**
     * List of event type filters for this notification config. If not specified, Cloud Storage will send notifications for all event types. The valid types are: `&#34;OBJECT_FINALIZE&#34;`, `&#34;OBJECT_METADATA_UPDATE&#34;`, `&#34;OBJECT_DELETE&#34;`, `&#34;OBJECT_ARCHIVE&#34;`
     * 
     */
    @Import(name="eventTypes")
    private @Nullable Output<List<String>> eventTypes;

    /**
     * @return List of event type filters for this notification config. If not specified, Cloud Storage will send notifications for all event types. The valid types are: `&#34;OBJECT_FINALIZE&#34;`, `&#34;OBJECT_METADATA_UPDATE&#34;`, `&#34;OBJECT_DELETE&#34;`, `&#34;OBJECT_ARCHIVE&#34;`
     * 
     */
    public Optional<Output<List<String>>> eventTypes() {
        return Optional.ofNullable(this.eventTypes);
    }

    /**
     * Specifies a prefix path filter for this notification config. Cloud Storage will only send notifications for objects in this bucket whose names begin with the specified prefix.
     * 
     */
    @Import(name="objectNamePrefix")
    private @Nullable Output<String> objectNamePrefix;

    /**
     * @return Specifies a prefix path filter for this notification config. Cloud Storage will only send notifications for objects in this bucket whose names begin with the specified prefix.
     * 
     */
    public Optional<Output<String>> objectNamePrefix() {
        return Optional.ofNullable(this.objectNamePrefix);
    }

    /**
     * The desired content of the Payload. One of `&#34;JSON_API_V1&#34;` or `&#34;NONE&#34;`.
     * 
     */
    @Import(name="payloadFormat", required=true)
    private Output<String> payloadFormat;

    /**
     * @return The desired content of the Payload. One of `&#34;JSON_API_V1&#34;` or `&#34;NONE&#34;`.
     * 
     */
    public Output<String> payloadFormat() {
        return this.payloadFormat;
    }

    /**
     * The Cloud PubSub topic to which this subscription publishes. Expects either the
     * topic name, assumed to belong to the default GCP provider project, or the project-level name,
     * i.e. `projects/my-gcp-project/topics/my-topic` or `my-topic`. If the project is not set in the provider,
     * you will need to use the project-level name.
     * 
     * ***
     * 
     */
    @Import(name="topic", required=true)
    private Output<String> topic;

    /**
     * @return The Cloud PubSub topic to which this subscription publishes. Expects either the
     * topic name, assumed to belong to the default GCP provider project, or the project-level name,
     * i.e. `projects/my-gcp-project/topics/my-topic` or `my-topic`. If the project is not set in the provider,
     * you will need to use the project-level name.
     * 
     * ***
     * 
     */
    public Output<String> topic() {
        return this.topic;
    }

    private NotificationArgs() {}

    private NotificationArgs(NotificationArgs $) {
        this.bucket = $.bucket;
        this.customAttributes = $.customAttributes;
        this.eventTypes = $.eventTypes;
        this.objectNamePrefix = $.objectNamePrefix;
        this.payloadFormat = $.payloadFormat;
        this.topic = $.topic;
    }

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

    public static final class Builder {
        private NotificationArgs $;

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

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

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

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

        /**
         * @param customAttributes A set of key/value attribute pairs to attach to each Cloud PubSub message published for this notification subscription
         * 
         * @return builder
         * 
         */
        public Builder customAttributes(@Nullable Output<Map<String,String>> customAttributes) {
            $.customAttributes = customAttributes;
            return this;
        }

        /**
         * @param customAttributes A set of key/value attribute pairs to attach to each Cloud PubSub message published for this notification subscription
         * 
         * @return builder
         * 
         */
        public Builder customAttributes(Map<String,String> customAttributes) {
            return customAttributes(Output.of(customAttributes));
        }

        /**
         * @param eventTypes List of event type filters for this notification config. If not specified, Cloud Storage will send notifications for all event types. The valid types are: `&#34;OBJECT_FINALIZE&#34;`, `&#34;OBJECT_METADATA_UPDATE&#34;`, `&#34;OBJECT_DELETE&#34;`, `&#34;OBJECT_ARCHIVE&#34;`
         * 
         * @return builder
         * 
         */
        public Builder eventTypes(@Nullable Output<List<String>> eventTypes) {
            $.eventTypes = eventTypes;
            return this;
        }

        /**
         * @param eventTypes List of event type filters for this notification config. If not specified, Cloud Storage will send notifications for all event types. The valid types are: `&#34;OBJECT_FINALIZE&#34;`, `&#34;OBJECT_METADATA_UPDATE&#34;`, `&#34;OBJECT_DELETE&#34;`, `&#34;OBJECT_ARCHIVE&#34;`
         * 
         * @return builder
         * 
         */
        public Builder eventTypes(List<String> eventTypes) {
            return eventTypes(Output.of(eventTypes));
        }

        /**
         * @param eventTypes List of event type filters for this notification config. If not specified, Cloud Storage will send notifications for all event types. The valid types are: `&#34;OBJECT_FINALIZE&#34;`, `&#34;OBJECT_METADATA_UPDATE&#34;`, `&#34;OBJECT_DELETE&#34;`, `&#34;OBJECT_ARCHIVE&#34;`
         * 
         * @return builder
         * 
         */
        public Builder eventTypes(String... eventTypes) {
            return eventTypes(List.of(eventTypes));
        }

        /**
         * @param objectNamePrefix Specifies a prefix path filter for this notification config. Cloud Storage will only send notifications for objects in this bucket whose names begin with the specified prefix.
         * 
         * @return builder
         * 
         */
        public Builder objectNamePrefix(@Nullable Output<String> objectNamePrefix) {
            $.objectNamePrefix = objectNamePrefix;
            return this;
        }

        /**
         * @param objectNamePrefix Specifies a prefix path filter for this notification config. Cloud Storage will only send notifications for objects in this bucket whose names begin with the specified prefix.
         * 
         * @return builder
         * 
         */
        public Builder objectNamePrefix(String objectNamePrefix) {
            return objectNamePrefix(Output.of(objectNamePrefix));
        }

        /**
         * @param payloadFormat The desired content of the Payload. One of `&#34;JSON_API_V1&#34;` or `&#34;NONE&#34;`.
         * 
         * @return builder
         * 
         */
        public Builder payloadFormat(Output<String> payloadFormat) {
            $.payloadFormat = payloadFormat;
            return this;
        }

        /**
         * @param payloadFormat The desired content of the Payload. One of `&#34;JSON_API_V1&#34;` or `&#34;NONE&#34;`.
         * 
         * @return builder
         * 
         */
        public Builder payloadFormat(String payloadFormat) {
            return payloadFormat(Output.of(payloadFormat));
        }

        /**
         * @param topic The Cloud PubSub topic to which this subscription publishes. Expects either the
         * topic name, assumed to belong to the default GCP provider project, or the project-level name,
         * i.e. `projects/my-gcp-project/topics/my-topic` or `my-topic`. If the project is not set in the provider,
         * you will need to use the project-level name.
         * 
         * ***
         * 
         * @return builder
         * 
         */
        public Builder topic(Output<String> topic) {
            $.topic = topic;
            return this;
        }

        /**
         * @param topic The Cloud PubSub topic to which this subscription publishes. Expects either the
         * topic name, assumed to belong to the default GCP provider project, or the project-level name,
         * i.e. `projects/my-gcp-project/topics/my-topic` or `my-topic`. If the project is not set in the provider,
         * you will need to use the project-level name.
         * 
         * ***
         * 
         * @return builder
         * 
         */
        public Builder topic(String topic) {
            return topic(Output.of(topic));
        }

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

}
