// *** 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.azure.servicebus.outputs;

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

@CustomType
public final class SubscriptionRuleCorrelationFilter {
    /**
     * @return Content type of the message.
     * 
     */
    private @Nullable String contentType;
    /**
     * @return Identifier of the correlation.
     * 
     */
    private @Nullable String correlationId;
    /**
     * @return Application specific label.
     * 
     */
    private @Nullable String label;
    /**
     * @return Identifier of the message.
     * 
     */
    private @Nullable String messageId;
    /**
     * @return A list of user defined properties to be included in the filter. Specified as a map of name/value pairs.
     * 
     * &gt; **NOTE:** When creating a subscription rule of type `CorrelationFilter` at least one property must be set in the `correlation_filter` block.
     * 
     */
    private @Nullable Map<String,String> properties;
    /**
     * @return Address of the queue to reply to.
     * 
     */
    private @Nullable String replyTo;
    /**
     * @return Session identifier to reply to.
     * 
     */
    private @Nullable String replyToSessionId;
    /**
     * @return Session identifier.
     * 
     */
    private @Nullable String sessionId;
    /**
     * @return Address to send to.
     * 
     */
    private @Nullable String to;

    private SubscriptionRuleCorrelationFilter() {}
    /**
     * @return Content type of the message.
     * 
     */
    public Optional<String> contentType() {
        return Optional.ofNullable(this.contentType);
    }
    /**
     * @return Identifier of the correlation.
     * 
     */
    public Optional<String> correlationId() {
        return Optional.ofNullable(this.correlationId);
    }
    /**
     * @return Application specific label.
     * 
     */
    public Optional<String> label() {
        return Optional.ofNullable(this.label);
    }
    /**
     * @return Identifier of the message.
     * 
     */
    public Optional<String> messageId() {
        return Optional.ofNullable(this.messageId);
    }
    /**
     * @return A list of user defined properties to be included in the filter. Specified as a map of name/value pairs.
     * 
     * &gt; **NOTE:** When creating a subscription rule of type `CorrelationFilter` at least one property must be set in the `correlation_filter` block.
     * 
     */
    public Map<String,String> properties() {
        return this.properties == null ? Map.of() : this.properties;
    }
    /**
     * @return Address of the queue to reply to.
     * 
     */
    public Optional<String> replyTo() {
        return Optional.ofNullable(this.replyTo);
    }
    /**
     * @return Session identifier to reply to.
     * 
     */
    public Optional<String> replyToSessionId() {
        return Optional.ofNullable(this.replyToSessionId);
    }
    /**
     * @return Session identifier.
     * 
     */
    public Optional<String> sessionId() {
        return Optional.ofNullable(this.sessionId);
    }
    /**
     * @return Address to send to.
     * 
     */
    public Optional<String> to() {
        return Optional.ofNullable(this.to);
    }

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

    public static Builder builder(SubscriptionRuleCorrelationFilter defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String contentType;
        private @Nullable String correlationId;
        private @Nullable String label;
        private @Nullable String messageId;
        private @Nullable Map<String,String> properties;
        private @Nullable String replyTo;
        private @Nullable String replyToSessionId;
        private @Nullable String sessionId;
        private @Nullable String to;
        public Builder() {}
        public Builder(SubscriptionRuleCorrelationFilter defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.contentType = defaults.contentType;
    	      this.correlationId = defaults.correlationId;
    	      this.label = defaults.label;
    	      this.messageId = defaults.messageId;
    	      this.properties = defaults.properties;
    	      this.replyTo = defaults.replyTo;
    	      this.replyToSessionId = defaults.replyToSessionId;
    	      this.sessionId = defaults.sessionId;
    	      this.to = defaults.to;
        }

        @CustomType.Setter
        public Builder contentType(@Nullable String contentType) {
            this.contentType = contentType;
            return this;
        }
        @CustomType.Setter
        public Builder correlationId(@Nullable String correlationId) {
            this.correlationId = correlationId;
            return this;
        }
        @CustomType.Setter
        public Builder label(@Nullable String label) {
            this.label = label;
            return this;
        }
        @CustomType.Setter
        public Builder messageId(@Nullable String messageId) {
            this.messageId = messageId;
            return this;
        }
        @CustomType.Setter
        public Builder properties(@Nullable Map<String,String> properties) {
            this.properties = properties;
            return this;
        }
        @CustomType.Setter
        public Builder replyTo(@Nullable String replyTo) {
            this.replyTo = replyTo;
            return this;
        }
        @CustomType.Setter
        public Builder replyToSessionId(@Nullable String replyToSessionId) {
            this.replyToSessionId = replyToSessionId;
            return this;
        }
        @CustomType.Setter
        public Builder sessionId(@Nullable String sessionId) {
            this.sessionId = sessionId;
            return this;
        }
        @CustomType.Setter
        public Builder to(@Nullable String to) {
            this.to = to;
            return this;
        }
        public SubscriptionRuleCorrelationFilter build() {
            final var o = new SubscriptionRuleCorrelationFilter();
            o.contentType = contentType;
            o.correlationId = correlationId;
            o.label = label;
            o.messageId = messageId;
            o.properties = properties;
            o.replyTo = replyTo;
            o.replyToSessionId = replyToSessionId;
            o.sessionId = sessionId;
            o.to = to;
            return o;
        }
    }
}
