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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.container.outputs.NodePoolNetworkConfigAdditionalNodeNetworkConfig;
import com.pulumi.gcp.container.outputs.NodePoolNetworkConfigAdditionalPodNetworkConfig;
import com.pulumi.gcp.container.outputs.NodePoolNetworkConfigPodCidrOverprovisionConfig;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class NodePoolNetworkConfig {
    /**
     * @return We specify the additional node networks for this node pool using this list. Each node network corresponds to an additional interface.
     * Structure is documented below
     * 
     */
    private @Nullable List<NodePoolNetworkConfigAdditionalNodeNetworkConfig> additionalNodeNetworkConfigs;
    /**
     * @return We specify the additional pod networks for this node pool using this list. Each pod network corresponds to an additional alias IP range for the node.
     * Structure is documented below
     * 
     */
    private @Nullable List<NodePoolNetworkConfigAdditionalPodNetworkConfig> additionalPodNetworkConfigs;
    /**
     * @return Whether to create a new range for pod IPs in this node pool. Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they are not specified.
     * 
     */
    private @Nullable Boolean createPodRange;
    /**
     * @return Whether nodes have internal IP addresses only.
     * 
     */
    private @Nullable Boolean enablePrivateNodes;
    private @Nullable NodePoolNetworkConfigPodCidrOverprovisionConfig podCidrOverprovisionConfig;
    /**
     * @return The IP address range for pod IPs in this node pool. Only applicable if createPodRange is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) to pick a specific range to use.
     * 
     */
    private @Nullable String podIpv4CidrBlock;
    /**
     * @return The ID of the secondary range for pod IPs. If `create_pod_range` is true, this ID is used for the new range. If `create_pod_range` is false, uses an existing secondary range with this ID.
     * 
     */
    private @Nullable String podRange;

    private NodePoolNetworkConfig() {}
    /**
     * @return We specify the additional node networks for this node pool using this list. Each node network corresponds to an additional interface.
     * Structure is documented below
     * 
     */
    public List<NodePoolNetworkConfigAdditionalNodeNetworkConfig> additionalNodeNetworkConfigs() {
        return this.additionalNodeNetworkConfigs == null ? List.of() : this.additionalNodeNetworkConfigs;
    }
    /**
     * @return We specify the additional pod networks for this node pool using this list. Each pod network corresponds to an additional alias IP range for the node.
     * Structure is documented below
     * 
     */
    public List<NodePoolNetworkConfigAdditionalPodNetworkConfig> additionalPodNetworkConfigs() {
        return this.additionalPodNetworkConfigs == null ? List.of() : this.additionalPodNetworkConfigs;
    }
    /**
     * @return Whether to create a new range for pod IPs in this node pool. Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they are not specified.
     * 
     */
    public Optional<Boolean> createPodRange() {
        return Optional.ofNullable(this.createPodRange);
    }
    /**
     * @return Whether nodes have internal IP addresses only.
     * 
     */
    public Optional<Boolean> enablePrivateNodes() {
        return Optional.ofNullable(this.enablePrivateNodes);
    }
    public Optional<NodePoolNetworkConfigPodCidrOverprovisionConfig> podCidrOverprovisionConfig() {
        return Optional.ofNullable(this.podCidrOverprovisionConfig);
    }
    /**
     * @return The IP address range for pod IPs in this node pool. Only applicable if createPodRange is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) to pick a specific range to use.
     * 
     */
    public Optional<String> podIpv4CidrBlock() {
        return Optional.ofNullable(this.podIpv4CidrBlock);
    }
    /**
     * @return The ID of the secondary range for pod IPs. If `create_pod_range` is true, this ID is used for the new range. If `create_pod_range` is false, uses an existing secondary range with this ID.
     * 
     */
    public Optional<String> podRange() {
        return Optional.ofNullable(this.podRange);
    }

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

    public static Builder builder(NodePoolNetworkConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<NodePoolNetworkConfigAdditionalNodeNetworkConfig> additionalNodeNetworkConfigs;
        private @Nullable List<NodePoolNetworkConfigAdditionalPodNetworkConfig> additionalPodNetworkConfigs;
        private @Nullable Boolean createPodRange;
        private @Nullable Boolean enablePrivateNodes;
        private @Nullable NodePoolNetworkConfigPodCidrOverprovisionConfig podCidrOverprovisionConfig;
        private @Nullable String podIpv4CidrBlock;
        private @Nullable String podRange;
        public Builder() {}
        public Builder(NodePoolNetworkConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.additionalNodeNetworkConfigs = defaults.additionalNodeNetworkConfigs;
    	      this.additionalPodNetworkConfigs = defaults.additionalPodNetworkConfigs;
    	      this.createPodRange = defaults.createPodRange;
    	      this.enablePrivateNodes = defaults.enablePrivateNodes;
    	      this.podCidrOverprovisionConfig = defaults.podCidrOverprovisionConfig;
    	      this.podIpv4CidrBlock = defaults.podIpv4CidrBlock;
    	      this.podRange = defaults.podRange;
        }

        @CustomType.Setter
        public Builder additionalNodeNetworkConfigs(@Nullable List<NodePoolNetworkConfigAdditionalNodeNetworkConfig> additionalNodeNetworkConfigs) {
            this.additionalNodeNetworkConfigs = additionalNodeNetworkConfigs;
            return this;
        }
        public Builder additionalNodeNetworkConfigs(NodePoolNetworkConfigAdditionalNodeNetworkConfig... additionalNodeNetworkConfigs) {
            return additionalNodeNetworkConfigs(List.of(additionalNodeNetworkConfigs));
        }
        @CustomType.Setter
        public Builder additionalPodNetworkConfigs(@Nullable List<NodePoolNetworkConfigAdditionalPodNetworkConfig> additionalPodNetworkConfigs) {
            this.additionalPodNetworkConfigs = additionalPodNetworkConfigs;
            return this;
        }
        public Builder additionalPodNetworkConfigs(NodePoolNetworkConfigAdditionalPodNetworkConfig... additionalPodNetworkConfigs) {
            return additionalPodNetworkConfigs(List.of(additionalPodNetworkConfigs));
        }
        @CustomType.Setter
        public Builder createPodRange(@Nullable Boolean createPodRange) {
            this.createPodRange = createPodRange;
            return this;
        }
        @CustomType.Setter
        public Builder enablePrivateNodes(@Nullable Boolean enablePrivateNodes) {
            this.enablePrivateNodes = enablePrivateNodes;
            return this;
        }
        @CustomType.Setter
        public Builder podCidrOverprovisionConfig(@Nullable NodePoolNetworkConfigPodCidrOverprovisionConfig podCidrOverprovisionConfig) {
            this.podCidrOverprovisionConfig = podCidrOverprovisionConfig;
            return this;
        }
        @CustomType.Setter
        public Builder podIpv4CidrBlock(@Nullable String podIpv4CidrBlock) {
            this.podIpv4CidrBlock = podIpv4CidrBlock;
            return this;
        }
        @CustomType.Setter
        public Builder podRange(@Nullable String podRange) {
            this.podRange = podRange;
            return this;
        }
        public NodePoolNetworkConfig build() {
            final var o = new NodePoolNetworkConfig();
            o.additionalNodeNetworkConfigs = additionalNodeNetworkConfigs;
            o.additionalPodNetworkConfigs = additionalPodNetworkConfigs;
            o.createPodRange = createPodRange;
            o.enablePrivateNodes = enablePrivateNodes;
            o.podCidrOverprovisionConfig = podCidrOverprovisionConfig;
            o.podIpv4CidrBlock = podIpv4CidrBlock;
            o.podRange = podRange;
            return o;
        }
    }
}
