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

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

@CustomType
public final class IotHubDpsLinkedHub {
    /**
     * @return The weight applied to the IoT Hub. Defaults to `1`.
     * 
     */
    private @Nullable Integer allocationWeight;
    /**
     * @return Determines whether to apply allocation policies to the IoT Hub. Defaults to `true`.
     * 
     */
    private @Nullable Boolean applyAllocationPolicy;
    /**
     * @return The connection string to connect to the IoT Hub.
     * 
     */
    private String connectionString;
    /**
     * @return The IoT Hub hostname.
     * 
     */
    private @Nullable String hostname;
    /**
     * @return The location of the IoT hub.
     * 
     */
    private String location;

    private IotHubDpsLinkedHub() {}
    /**
     * @return The weight applied to the IoT Hub. Defaults to `1`.
     * 
     */
    public Optional<Integer> allocationWeight() {
        return Optional.ofNullable(this.allocationWeight);
    }
    /**
     * @return Determines whether to apply allocation policies to the IoT Hub. Defaults to `true`.
     * 
     */
    public Optional<Boolean> applyAllocationPolicy() {
        return Optional.ofNullable(this.applyAllocationPolicy);
    }
    /**
     * @return The connection string to connect to the IoT Hub.
     * 
     */
    public String connectionString() {
        return this.connectionString;
    }
    /**
     * @return The IoT Hub hostname.
     * 
     */
    public Optional<String> hostname() {
        return Optional.ofNullable(this.hostname);
    }
    /**
     * @return The location of the IoT hub.
     * 
     */
    public String location() {
        return this.location;
    }

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

    public static Builder builder(IotHubDpsLinkedHub defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Integer allocationWeight;
        private @Nullable Boolean applyAllocationPolicy;
        private String connectionString;
        private @Nullable String hostname;
        private String location;
        public Builder() {}
        public Builder(IotHubDpsLinkedHub defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.allocationWeight = defaults.allocationWeight;
    	      this.applyAllocationPolicy = defaults.applyAllocationPolicy;
    	      this.connectionString = defaults.connectionString;
    	      this.hostname = defaults.hostname;
    	      this.location = defaults.location;
        }

        @CustomType.Setter
        public Builder allocationWeight(@Nullable Integer allocationWeight) {
            this.allocationWeight = allocationWeight;
            return this;
        }
        @CustomType.Setter
        public Builder applyAllocationPolicy(@Nullable Boolean applyAllocationPolicy) {
            this.applyAllocationPolicy = applyAllocationPolicy;
            return this;
        }
        @CustomType.Setter
        public Builder connectionString(String connectionString) {
            this.connectionString = Objects.requireNonNull(connectionString);
            return this;
        }
        @CustomType.Setter
        public Builder hostname(@Nullable String hostname) {
            this.hostname = hostname;
            return this;
        }
        @CustomType.Setter
        public Builder location(String location) {
            this.location = Objects.requireNonNull(location);
            return this;
        }
        public IotHubDpsLinkedHub build() {
            final var o = new IotHubDpsLinkedHub();
            o.allocationWeight = allocationWeight;
            o.applyAllocationPolicy = applyAllocationPolicy;
            o.connectionString = connectionString;
            o.hostname = hostname;
            o.location = location;
            return o;
        }
    }
}
