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

com.pulumi.rabbitmq.outputs.ExchangeSettings Maven / Gradle / Ivy

There is a newer version: 3.4.0-alpha.1731737837
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.rabbitmq.outputs;

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

@CustomType
public final class ExchangeSettings {
    /**
     * @return Additional key/value settings for the exchange.
     * 
     */
    private @Nullable Map arguments;
    /**
     * @return Whether the exchange will self-delete when all
     * queues have finished using it.
     * 
     */
    private @Nullable Boolean autoDelete;
    /**
     * @return Whether the exchange survives server restarts.
     * Defaults to `false`.
     * 
     */
    private @Nullable Boolean durable;
    /**
     * @return The type of exchange.
     * 
     */
    private String type;

    private ExchangeSettings() {}
    /**
     * @return Additional key/value settings for the exchange.
     * 
     */
    public Map arguments() {
        return this.arguments == null ? Map.of() : this.arguments;
    }
    /**
     * @return Whether the exchange will self-delete when all
     * queues have finished using it.
     * 
     */
    public Optional autoDelete() {
        return Optional.ofNullable(this.autoDelete);
    }
    /**
     * @return Whether the exchange survives server restarts.
     * Defaults to `false`.
     * 
     */
    public Optional durable() {
        return Optional.ofNullable(this.durable);
    }
    /**
     * @return The type of exchange.
     * 
     */
    public String type() {
        return this.type;
    }

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

    public static Builder builder(ExchangeSettings defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Map arguments;
        private @Nullable Boolean autoDelete;
        private @Nullable Boolean durable;
        private String type;
        public Builder() {}
        public Builder(ExchangeSettings defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.arguments = defaults.arguments;
    	      this.autoDelete = defaults.autoDelete;
    	      this.durable = defaults.durable;
    	      this.type = defaults.type;
        }

        @CustomType.Setter
        public Builder arguments(@Nullable Map arguments) {

            this.arguments = arguments;
            return this;
        }
        @CustomType.Setter
        public Builder autoDelete(@Nullable Boolean autoDelete) {

            this.autoDelete = autoDelete;
            return this;
        }
        @CustomType.Setter
        public Builder durable(@Nullable Boolean durable) {

            this.durable = durable;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("ExchangeSettings", "type");
            }
            this.type = type;
            return this;
        }
        public ExchangeSettings build() {
            final var _resultValue = new ExchangeSettings();
            _resultValue.arguments = arguments;
            _resultValue.autoDelete = autoDelete;
            _resultValue.durable = durable;
            _resultValue.type = type;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy