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

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

@CustomType
public final class InstanceNetwork {
    /**
     * @return The network connect mode of the Filestore instance.
     * If not provided, the connect mode defaults to
     * DIRECT_PEERING.
     * Default value is `DIRECT_PEERING`.
     * Possible values are: `DIRECT_PEERING`, `PRIVATE_SERVICE_ACCESS`.
     * 
     * ***
     * 
     */
    private @Nullable String connectMode;
    /**
     * @return (Output)
     * A list of IPv4 or IPv6 addresses.
     * 
     */
    private @Nullable List<String> ipAddresses;
    /**
     * @return IP versions for which the instance has
     * IP addresses assigned.
     * Each value may be one of: `ADDRESS_MODE_UNSPECIFIED`, `MODE_IPV4`, `MODE_IPV6`.
     * 
     */
    private List<String> modes;
    /**
     * @return The name of the GCE VPC network to which the
     * instance is connected.
     * 
     */
    private String network;
    /**
     * @return A /29 CIDR block that identifies the range of IP
     * addresses reserved for this instance.
     * 
     */
    private @Nullable String reservedIpRange;

    private InstanceNetwork() {}
    /**
     * @return The network connect mode of the Filestore instance.
     * If not provided, the connect mode defaults to
     * DIRECT_PEERING.
     * Default value is `DIRECT_PEERING`.
     * Possible values are: `DIRECT_PEERING`, `PRIVATE_SERVICE_ACCESS`.
     * 
     * ***
     * 
     */
    public Optional<String> connectMode() {
        return Optional.ofNullable(this.connectMode);
    }
    /**
     * @return (Output)
     * A list of IPv4 or IPv6 addresses.
     * 
     */
    public List<String> ipAddresses() {
        return this.ipAddresses == null ? List.of() : this.ipAddresses;
    }
    /**
     * @return IP versions for which the instance has
     * IP addresses assigned.
     * Each value may be one of: `ADDRESS_MODE_UNSPECIFIED`, `MODE_IPV4`, `MODE_IPV6`.
     * 
     */
    public List<String> modes() {
        return this.modes;
    }
    /**
     * @return The name of the GCE VPC network to which the
     * instance is connected.
     * 
     */
    public String network() {
        return this.network;
    }
    /**
     * @return A /29 CIDR block that identifies the range of IP
     * addresses reserved for this instance.
     * 
     */
    public Optional<String> reservedIpRange() {
        return Optional.ofNullable(this.reservedIpRange);
    }

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

    public static Builder builder(InstanceNetwork defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String connectMode;
        private @Nullable List<String> ipAddresses;
        private List<String> modes;
        private String network;
        private @Nullable String reservedIpRange;
        public Builder() {}
        public Builder(InstanceNetwork defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.connectMode = defaults.connectMode;
    	      this.ipAddresses = defaults.ipAddresses;
    	      this.modes = defaults.modes;
    	      this.network = defaults.network;
    	      this.reservedIpRange = defaults.reservedIpRange;
        }

        @CustomType.Setter
        public Builder connectMode(@Nullable String connectMode) {
            this.connectMode = connectMode;
            return this;
        }
        @CustomType.Setter
        public Builder ipAddresses(@Nullable List<String> ipAddresses) {
            this.ipAddresses = ipAddresses;
            return this;
        }
        public Builder ipAddresses(String... ipAddresses) {
            return ipAddresses(List.of(ipAddresses));
        }
        @CustomType.Setter
        public Builder modes(List<String> modes) {
            this.modes = Objects.requireNonNull(modes);
            return this;
        }
        public Builder modes(String... modes) {
            return modes(List.of(modes));
        }
        @CustomType.Setter
        public Builder network(String network) {
            this.network = Objects.requireNonNull(network);
            return this;
        }
        @CustomType.Setter
        public Builder reservedIpRange(@Nullable String reservedIpRange) {
            this.reservedIpRange = reservedIpRange;
            return this;
        }
        public InstanceNetwork build() {
            final var o = new InstanceNetwork();
            o.connectMode = connectMode;
            o.ipAddresses = ipAddresses;
            o.modes = modes;
            o.network = network;
            o.reservedIpRange = reservedIpRange;
            return o;
        }
    }
}
