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

import com.pulumi.azure.network.outputs.VpnGatewayBgpSettingsInstance0BgpPeeringAddress;
import com.pulumi.azure.network.outputs.VpnGatewayBgpSettingsInstance1BgpPeeringAddress;
import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class VpnGatewayBgpSettings {
    /**
     * @return The ASN of the BGP Speaker. Changing this forces a new resource to be created.
     * 
     */
    private Integer asn;
    /**
     * @return The Address which should be used for the BGP Peering.
     * 
     */
    private @Nullable String bgpPeeringAddress;
    /**
     * @return An `instance_bgp_peering_address` block as defined below.
     * 
     */
    private @Nullable VpnGatewayBgpSettingsInstance0BgpPeeringAddress instance0BgpPeeringAddress;
    /**
     * @return An `instance_bgp_peering_address` block as defined below.
     * 
     */
    private @Nullable VpnGatewayBgpSettingsInstance1BgpPeeringAddress instance1BgpPeeringAddress;
    /**
     * @return The weight added to Routes learned from this BGP Speaker. Changing this forces a new resource to be created.
     * 
     */
    private Integer peerWeight;

    private VpnGatewayBgpSettings() {}
    /**
     * @return The ASN of the BGP Speaker. Changing this forces a new resource to be created.
     * 
     */
    public Integer asn() {
        return this.asn;
    }
    /**
     * @return The Address which should be used for the BGP Peering.
     * 
     */
    public Optional<String> bgpPeeringAddress() {
        return Optional.ofNullable(this.bgpPeeringAddress);
    }
    /**
     * @return An `instance_bgp_peering_address` block as defined below.
     * 
     */
    public Optional<VpnGatewayBgpSettingsInstance0BgpPeeringAddress> instance0BgpPeeringAddress() {
        return Optional.ofNullable(this.instance0BgpPeeringAddress);
    }
    /**
     * @return An `instance_bgp_peering_address` block as defined below.
     * 
     */
    public Optional<VpnGatewayBgpSettingsInstance1BgpPeeringAddress> instance1BgpPeeringAddress() {
        return Optional.ofNullable(this.instance1BgpPeeringAddress);
    }
    /**
     * @return The weight added to Routes learned from this BGP Speaker. Changing this forces a new resource to be created.
     * 
     */
    public Integer peerWeight() {
        return this.peerWeight;
    }

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

    public static Builder builder(VpnGatewayBgpSettings defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private Integer asn;
        private @Nullable String bgpPeeringAddress;
        private @Nullable VpnGatewayBgpSettingsInstance0BgpPeeringAddress instance0BgpPeeringAddress;
        private @Nullable VpnGatewayBgpSettingsInstance1BgpPeeringAddress instance1BgpPeeringAddress;
        private Integer peerWeight;
        public Builder() {}
        public Builder(VpnGatewayBgpSettings defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.asn = defaults.asn;
    	      this.bgpPeeringAddress = defaults.bgpPeeringAddress;
    	      this.instance0BgpPeeringAddress = defaults.instance0BgpPeeringAddress;
    	      this.instance1BgpPeeringAddress = defaults.instance1BgpPeeringAddress;
    	      this.peerWeight = defaults.peerWeight;
        }

        @CustomType.Setter
        public Builder asn(Integer asn) {
            this.asn = Objects.requireNonNull(asn);
            return this;
        }
        @CustomType.Setter
        public Builder bgpPeeringAddress(@Nullable String bgpPeeringAddress) {
            this.bgpPeeringAddress = bgpPeeringAddress;
            return this;
        }
        @CustomType.Setter
        public Builder instance0BgpPeeringAddress(@Nullable VpnGatewayBgpSettingsInstance0BgpPeeringAddress instance0BgpPeeringAddress) {
            this.instance0BgpPeeringAddress = instance0BgpPeeringAddress;
            return this;
        }
        @CustomType.Setter
        public Builder instance1BgpPeeringAddress(@Nullable VpnGatewayBgpSettingsInstance1BgpPeeringAddress instance1BgpPeeringAddress) {
            this.instance1BgpPeeringAddress = instance1BgpPeeringAddress;
            return this;
        }
        @CustomType.Setter
        public Builder peerWeight(Integer peerWeight) {
            this.peerWeight = Objects.requireNonNull(peerWeight);
            return this;
        }
        public VpnGatewayBgpSettings build() {
            final var o = new VpnGatewayBgpSettings();
            o.asn = asn;
            o.bgpPeeringAddress = bgpPeeringAddress;
            o.instance0BgpPeeringAddress = instance0BgpPeeringAddress;
            o.instance1BgpPeeringAddress = instance1BgpPeeringAddress;
            o.peerWeight = peerWeight;
            return o;
        }
    }
}
