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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.compute.inputs.SubnetworkLogConfigArgs;
import com.pulumi.gcp.compute.inputs.SubnetworkSecondaryIpRangeArgs;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class SubnetworkArgs extends com.pulumi.resources.ResourceArgs {

    public static final SubnetworkArgs Empty = new SubnetworkArgs();

    /**
     * An optional description of this resource. Provide this property when
     * you create the resource. This field can be set only at resource
     * creation time.
     * 
     */
    @Import(name="description")
    private @Nullable Output<String> description;

    /**
     * @return An optional description of this resource. Provide this property when
     * you create the resource. This field can be set only at resource
     * creation time.
     * 
     */
    public Optional<Output<String>> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The range of internal addresses that are owned by this subnetwork.
     * Provide this property when you create the subnetwork. For example,
     * 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
     * non-overlapping within a network. Only IPv4 is supported.
     * 
     */
    @Import(name="ipCidrRange", required=true)
    private Output<String> ipCidrRange;

    /**
     * @return The range of internal addresses that are owned by this subnetwork.
     * Provide this property when you create the subnetwork. For example,
     * 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
     * non-overlapping within a network. Only IPv4 is supported.
     * 
     */
    public Output<String> ipCidrRange() {
        return this.ipCidrRange;
    }

    /**
     * The access type of IPv6 address this subnet holds. It&#39;s immutable and can only be specified during creation
     * or the first time the subnet is updated into IPV4_IPV6 dual stack. If the ipv6_type is EXTERNAL then this subnet
     * cannot enable direct path.
     * Possible values are: `EXTERNAL`, `INTERNAL`.
     * 
     */
    @Import(name="ipv6AccessType")
    private @Nullable Output<String> ipv6AccessType;

    /**
     * @return The access type of IPv6 address this subnet holds. It&#39;s immutable and can only be specified during creation
     * or the first time the subnet is updated into IPV4_IPV6 dual stack. If the ipv6_type is EXTERNAL then this subnet
     * cannot enable direct path.
     * Possible values are: `EXTERNAL`, `INTERNAL`.
     * 
     */
    public Optional<Output<String>> ipv6AccessType() {
        return Optional.ofNullable(this.ipv6AccessType);
    }

    /**
     * This field denotes the VPC flow logging options for this subnetwork. If
     * logging is enabled, logs are exported to Cloud Logging. Flow logging
     * isn&#39;t supported if the subnet `purpose` field is set to subnetwork is
     * `REGIONAL_MANAGED_PROXY` or `GLOBAL_MANAGED_PROXY`.
     * Structure is documented below.
     * 
     */
    @Import(name="logConfig")
    private @Nullable Output<SubnetworkLogConfigArgs> logConfig;

    /**
     * @return This field denotes the VPC flow logging options for this subnetwork. If
     * logging is enabled, logs are exported to Cloud Logging. Flow logging
     * isn&#39;t supported if the subnet `purpose` field is set to subnetwork is
     * `REGIONAL_MANAGED_PROXY` or `GLOBAL_MANAGED_PROXY`.
     * Structure is documented below.
     * 
     */
    public Optional<Output<SubnetworkLogConfigArgs>> logConfig() {
        return Optional.ofNullable(this.logConfig);
    }

    /**
     * The name of the resource, provided by the client when initially
     * creating the resource. The name must be 1-63 characters long, and
     * comply with RFC1035. Specifically, the name must be 1-63 characters
     * long and match the regular expression `a-z?` which
     * means the first character must be a lowercase letter, and all
     * following characters must be a dash, lowercase letter, or digit,
     * except the last character, which cannot be a dash.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return The name of the resource, provided by the client when initially
     * creating the resource. The name must be 1-63 characters long, and
     * comply with RFC1035. Specifically, the name must be 1-63 characters
     * long and match the regular expression `a-z?` which
     * means the first character must be a lowercase letter, and all
     * following characters must be a dash, lowercase letter, or digit,
     * except the last character, which cannot be a dash.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The network this subnet belongs to.
     * Only networks that are in the distributed mode can have subnetworks.
     * 
     * ***
     * 
     */
    @Import(name="network", required=true)
    private Output<String> network;

    /**
     * @return The network this subnet belongs to.
     * Only networks that are in the distributed mode can have subnetworks.
     * 
     * ***
     * 
     */
    public Output<String> network() {
        return this.network;
    }

    /**
     * When enabled, VMs in this subnetwork without external IP addresses can
     * access Google APIs and services by using Private Google Access.
     * 
     */
    @Import(name="privateIpGoogleAccess")
    private @Nullable Output<Boolean> privateIpGoogleAccess;

    /**
     * @return When enabled, VMs in this subnetwork without external IP addresses can
     * access Google APIs and services by using Private Google Access.
     * 
     */
    public Optional<Output<Boolean>> privateIpGoogleAccess() {
        return Optional.ofNullable(this.privateIpGoogleAccess);
    }

    /**
     * The private IPv6 google access type for the VMs in this subnet.
     * 
     */
    @Import(name="privateIpv6GoogleAccess")
    private @Nullable Output<String> privateIpv6GoogleAccess;

    /**
     * @return The private IPv6 google access type for the VMs in this subnet.
     * 
     */
    public Optional<Output<String>> privateIpv6GoogleAccess() {
        return Optional.ofNullable(this.privateIpv6GoogleAccess);
    }

    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    @Import(name="project")
    private @Nullable Output<String> project;

    /**
     * @return The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    public Optional<Output<String>> project() {
        return Optional.ofNullable(this.project);
    }

    /**
     * The purpose of the resource. This field can be either `PRIVATE_RFC_1918`, `REGIONAL_MANAGED_PROXY`, `GLOBAL_MANAGED_PROXY`, or `PRIVATE_SERVICE_CONNECT`.
     * A subnet with purpose set to `REGIONAL_MANAGED_PROXY` is a user-created subnetwork that is reserved for regional Envoy-based load balancers.
     * A subnetwork in a given region with purpose set to `GLOBAL_MANAGED_PROXY` is a proxy-only subnet and is shared between all the cross-regional Envoy-based load balancers.
     * A subnetwork with purpose set to `PRIVATE_SERVICE_CONNECT` reserves the subnet for hosting a Private Service Connect published service.
     * Note that `REGIONAL_MANAGED_PROXY` is the preferred setting for all regional Envoy load balancers.
     * If unspecified, the purpose defaults to `PRIVATE_RFC_1918`.
     * 
     */
    @Import(name="purpose")
    private @Nullable Output<String> purpose;

    /**
     * @return The purpose of the resource. This field can be either `PRIVATE_RFC_1918`, `REGIONAL_MANAGED_PROXY`, `GLOBAL_MANAGED_PROXY`, or `PRIVATE_SERVICE_CONNECT`.
     * A subnet with purpose set to `REGIONAL_MANAGED_PROXY` is a user-created subnetwork that is reserved for regional Envoy-based load balancers.
     * A subnetwork in a given region with purpose set to `GLOBAL_MANAGED_PROXY` is a proxy-only subnet and is shared between all the cross-regional Envoy-based load balancers.
     * A subnetwork with purpose set to `PRIVATE_SERVICE_CONNECT` reserves the subnet for hosting a Private Service Connect published service.
     * Note that `REGIONAL_MANAGED_PROXY` is the preferred setting for all regional Envoy load balancers.
     * If unspecified, the purpose defaults to `PRIVATE_RFC_1918`.
     * 
     */
    public Optional<Output<String>> purpose() {
        return Optional.ofNullable(this.purpose);
    }

    /**
     * The GCP region for this subnetwork.
     * 
     */
    @Import(name="region")
    private @Nullable Output<String> region;

    /**
     * @return The GCP region for this subnetwork.
     * 
     */
    public Optional<Output<String>> region() {
        return Optional.ofNullable(this.region);
    }

    /**
     * The role of subnetwork.
     * Currently, this field is only used when `purpose` is `REGIONAL_MANAGED_PROXY`.
     * The value can be set to `ACTIVE` or `BACKUP`.
     * An `ACTIVE` subnetwork is one that is currently being used for Envoy-based load balancers in a region.
     * A `BACKUP` subnetwork is one that is ready to be promoted to `ACTIVE` or is currently draining.
     * Possible values are: `ACTIVE`, `BACKUP`.
     * 
     */
    @Import(name="role")
    private @Nullable Output<String> role;

    /**
     * @return The role of subnetwork.
     * Currently, this field is only used when `purpose` is `REGIONAL_MANAGED_PROXY`.
     * The value can be set to `ACTIVE` or `BACKUP`.
     * An `ACTIVE` subnetwork is one that is currently being used for Envoy-based load balancers in a region.
     * A `BACKUP` subnetwork is one that is ready to be promoted to `ACTIVE` or is currently draining.
     * Possible values are: `ACTIVE`, `BACKUP`.
     * 
     */
    public Optional<Output<String>> role() {
        return Optional.ofNullable(this.role);
    }

    /**
     * An array of configurations for secondary IP ranges for VM instances
     * contained in this subnetwork. The primary IP of such VM must belong
     * to the primary ipCidrRange of the subnetwork. The alias IPs may belong
     * to either primary or secondary ranges.
     * Structure is documented below.
     * 
     */
    @Import(name="secondaryIpRanges")
    private @Nullable Output<List<SubnetworkSecondaryIpRangeArgs>> secondaryIpRanges;

    /**
     * @return An array of configurations for secondary IP ranges for VM instances
     * contained in this subnetwork. The primary IP of such VM must belong
     * to the primary ipCidrRange of the subnetwork. The alias IPs may belong
     * to either primary or secondary ranges.
     * Structure is documented below.
     * 
     */
    public Optional<Output<List<SubnetworkSecondaryIpRangeArgs>>> secondaryIpRanges() {
        return Optional.ofNullable(this.secondaryIpRanges);
    }

    /**
     * The stack type for this subnet to identify whether the IPv6 feature is enabled or not.
     * If not specified IPV4_ONLY will be used.
     * Possible values are: `IPV4_ONLY`, `IPV4_IPV6`.
     * 
     */
    @Import(name="stackType")
    private @Nullable Output<String> stackType;

    /**
     * @return The stack type for this subnet to identify whether the IPv6 feature is enabled or not.
     * If not specified IPV4_ONLY will be used.
     * Possible values are: `IPV4_ONLY`, `IPV4_IPV6`.
     * 
     */
    public Optional<Output<String>> stackType() {
        return Optional.ofNullable(this.stackType);
    }

    private SubnetworkArgs() {}

    private SubnetworkArgs(SubnetworkArgs $) {
        this.description = $.description;
        this.ipCidrRange = $.ipCidrRange;
        this.ipv6AccessType = $.ipv6AccessType;
        this.logConfig = $.logConfig;
        this.name = $.name;
        this.network = $.network;
        this.privateIpGoogleAccess = $.privateIpGoogleAccess;
        this.privateIpv6GoogleAccess = $.privateIpv6GoogleAccess;
        this.project = $.project;
        this.purpose = $.purpose;
        this.region = $.region;
        this.role = $.role;
        this.secondaryIpRanges = $.secondaryIpRanges;
        this.stackType = $.stackType;
    }

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

    public static final class Builder {
        private SubnetworkArgs $;

        public Builder() {
            $ = new SubnetworkArgs();
        }

        public Builder(SubnetworkArgs defaults) {
            $ = new SubnetworkArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param description An optional description of this resource. Provide this property when
         * you create the resource. This field can be set only at resource
         * creation time.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output<String> description) {
            $.description = description;
            return this;
        }

        /**
         * @param description An optional description of this resource. Provide this property when
         * you create the resource. This field can be set only at resource
         * creation time.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param ipCidrRange The range of internal addresses that are owned by this subnetwork.
         * Provide this property when you create the subnetwork. For example,
         * 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
         * non-overlapping within a network. Only IPv4 is supported.
         * 
         * @return builder
         * 
         */
        public Builder ipCidrRange(Output<String> ipCidrRange) {
            $.ipCidrRange = ipCidrRange;
            return this;
        }

        /**
         * @param ipCidrRange The range of internal addresses that are owned by this subnetwork.
         * Provide this property when you create the subnetwork. For example,
         * 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
         * non-overlapping within a network. Only IPv4 is supported.
         * 
         * @return builder
         * 
         */
        public Builder ipCidrRange(String ipCidrRange) {
            return ipCidrRange(Output.of(ipCidrRange));
        }

        /**
         * @param ipv6AccessType The access type of IPv6 address this subnet holds. It&#39;s immutable and can only be specified during creation
         * or the first time the subnet is updated into IPV4_IPV6 dual stack. If the ipv6_type is EXTERNAL then this subnet
         * cannot enable direct path.
         * Possible values are: `EXTERNAL`, `INTERNAL`.
         * 
         * @return builder
         * 
         */
        public Builder ipv6AccessType(@Nullable Output<String> ipv6AccessType) {
            $.ipv6AccessType = ipv6AccessType;
            return this;
        }

        /**
         * @param ipv6AccessType The access type of IPv6 address this subnet holds. It&#39;s immutable and can only be specified during creation
         * or the first time the subnet is updated into IPV4_IPV6 dual stack. If the ipv6_type is EXTERNAL then this subnet
         * cannot enable direct path.
         * Possible values are: `EXTERNAL`, `INTERNAL`.
         * 
         * @return builder
         * 
         */
        public Builder ipv6AccessType(String ipv6AccessType) {
            return ipv6AccessType(Output.of(ipv6AccessType));
        }

        /**
         * @param logConfig This field denotes the VPC flow logging options for this subnetwork. If
         * logging is enabled, logs are exported to Cloud Logging. Flow logging
         * isn&#39;t supported if the subnet `purpose` field is set to subnetwork is
         * `REGIONAL_MANAGED_PROXY` or `GLOBAL_MANAGED_PROXY`.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder logConfig(@Nullable Output<SubnetworkLogConfigArgs> logConfig) {
            $.logConfig = logConfig;
            return this;
        }

        /**
         * @param logConfig This field denotes the VPC flow logging options for this subnetwork. If
         * logging is enabled, logs are exported to Cloud Logging. Flow logging
         * isn&#39;t supported if the subnet `purpose` field is set to subnetwork is
         * `REGIONAL_MANAGED_PROXY` or `GLOBAL_MANAGED_PROXY`.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder logConfig(SubnetworkLogConfigArgs logConfig) {
            return logConfig(Output.of(logConfig));
        }

        /**
         * @param name The name of the resource, provided by the client when initially
         * creating the resource. The name must be 1-63 characters long, and
         * comply with RFC1035. Specifically, the name must be 1-63 characters
         * long and match the regular expression `a-z?` which
         * means the first character must be a lowercase letter, and all
         * following characters must be a dash, lowercase letter, or digit,
         * except the last character, which cannot be a dash.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the resource, provided by the client when initially
         * creating the resource. The name must be 1-63 characters long, and
         * comply with RFC1035. Specifically, the name must be 1-63 characters
         * long and match the regular expression `a-z?` which
         * means the first character must be a lowercase letter, and all
         * following characters must be a dash, lowercase letter, or digit,
         * except the last character, which cannot be a dash.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param network The network this subnet belongs to.
         * Only networks that are in the distributed mode can have subnetworks.
         * 
         * ***
         * 
         * @return builder
         * 
         */
        public Builder network(Output<String> network) {
            $.network = network;
            return this;
        }

        /**
         * @param network The network this subnet belongs to.
         * Only networks that are in the distributed mode can have subnetworks.
         * 
         * ***
         * 
         * @return builder
         * 
         */
        public Builder network(String network) {
            return network(Output.of(network));
        }

        /**
         * @param privateIpGoogleAccess When enabled, VMs in this subnetwork without external IP addresses can
         * access Google APIs and services by using Private Google Access.
         * 
         * @return builder
         * 
         */
        public Builder privateIpGoogleAccess(@Nullable Output<Boolean> privateIpGoogleAccess) {
            $.privateIpGoogleAccess = privateIpGoogleAccess;
            return this;
        }

        /**
         * @param privateIpGoogleAccess When enabled, VMs in this subnetwork without external IP addresses can
         * access Google APIs and services by using Private Google Access.
         * 
         * @return builder
         * 
         */
        public Builder privateIpGoogleAccess(Boolean privateIpGoogleAccess) {
            return privateIpGoogleAccess(Output.of(privateIpGoogleAccess));
        }

        /**
         * @param privateIpv6GoogleAccess The private IPv6 google access type for the VMs in this subnet.
         * 
         * @return builder
         * 
         */
        public Builder privateIpv6GoogleAccess(@Nullable Output<String> privateIpv6GoogleAccess) {
            $.privateIpv6GoogleAccess = privateIpv6GoogleAccess;
            return this;
        }

        /**
         * @param privateIpv6GoogleAccess The private IPv6 google access type for the VMs in this subnet.
         * 
         * @return builder
         * 
         */
        public Builder privateIpv6GoogleAccess(String privateIpv6GoogleAccess) {
            return privateIpv6GoogleAccess(Output.of(privateIpv6GoogleAccess));
        }

        /**
         * @param project The ID of the project in which the resource belongs.
         * If it is not provided, the provider project is used.
         * 
         * @return builder
         * 
         */
        public Builder project(@Nullable Output<String> project) {
            $.project = project;
            return this;
        }

        /**
         * @param project The ID of the project in which the resource belongs.
         * If it is not provided, the provider project is used.
         * 
         * @return builder
         * 
         */
        public Builder project(String project) {
            return project(Output.of(project));
        }

        /**
         * @param purpose The purpose of the resource. This field can be either `PRIVATE_RFC_1918`, `REGIONAL_MANAGED_PROXY`, `GLOBAL_MANAGED_PROXY`, or `PRIVATE_SERVICE_CONNECT`.
         * A subnet with purpose set to `REGIONAL_MANAGED_PROXY` is a user-created subnetwork that is reserved for regional Envoy-based load balancers.
         * A subnetwork in a given region with purpose set to `GLOBAL_MANAGED_PROXY` is a proxy-only subnet and is shared between all the cross-regional Envoy-based load balancers.
         * A subnetwork with purpose set to `PRIVATE_SERVICE_CONNECT` reserves the subnet for hosting a Private Service Connect published service.
         * Note that `REGIONAL_MANAGED_PROXY` is the preferred setting for all regional Envoy load balancers.
         * If unspecified, the purpose defaults to `PRIVATE_RFC_1918`.
         * 
         * @return builder
         * 
         */
        public Builder purpose(@Nullable Output<String> purpose) {
            $.purpose = purpose;
            return this;
        }

        /**
         * @param purpose The purpose of the resource. This field can be either `PRIVATE_RFC_1918`, `REGIONAL_MANAGED_PROXY`, `GLOBAL_MANAGED_PROXY`, or `PRIVATE_SERVICE_CONNECT`.
         * A subnet with purpose set to `REGIONAL_MANAGED_PROXY` is a user-created subnetwork that is reserved for regional Envoy-based load balancers.
         * A subnetwork in a given region with purpose set to `GLOBAL_MANAGED_PROXY` is a proxy-only subnet and is shared between all the cross-regional Envoy-based load balancers.
         * A subnetwork with purpose set to `PRIVATE_SERVICE_CONNECT` reserves the subnet for hosting a Private Service Connect published service.
         * Note that `REGIONAL_MANAGED_PROXY` is the preferred setting for all regional Envoy load balancers.
         * If unspecified, the purpose defaults to `PRIVATE_RFC_1918`.
         * 
         * @return builder
         * 
         */
        public Builder purpose(String purpose) {
            return purpose(Output.of(purpose));
        }

        /**
         * @param region The GCP region for this subnetwork.
         * 
         * @return builder
         * 
         */
        public Builder region(@Nullable Output<String> region) {
            $.region = region;
            return this;
        }

        /**
         * @param region The GCP region for this subnetwork.
         * 
         * @return builder
         * 
         */
        public Builder region(String region) {
            return region(Output.of(region));
        }

        /**
         * @param role The role of subnetwork.
         * Currently, this field is only used when `purpose` is `REGIONAL_MANAGED_PROXY`.
         * The value can be set to `ACTIVE` or `BACKUP`.
         * An `ACTIVE` subnetwork is one that is currently being used for Envoy-based load balancers in a region.
         * A `BACKUP` subnetwork is one that is ready to be promoted to `ACTIVE` or is currently draining.
         * Possible values are: `ACTIVE`, `BACKUP`.
         * 
         * @return builder
         * 
         */
        public Builder role(@Nullable Output<String> role) {
            $.role = role;
            return this;
        }

        /**
         * @param role The role of subnetwork.
         * Currently, this field is only used when `purpose` is `REGIONAL_MANAGED_PROXY`.
         * The value can be set to `ACTIVE` or `BACKUP`.
         * An `ACTIVE` subnetwork is one that is currently being used for Envoy-based load balancers in a region.
         * A `BACKUP` subnetwork is one that is ready to be promoted to `ACTIVE` or is currently draining.
         * Possible values are: `ACTIVE`, `BACKUP`.
         * 
         * @return builder
         * 
         */
        public Builder role(String role) {
            return role(Output.of(role));
        }

        /**
         * @param secondaryIpRanges An array of configurations for secondary IP ranges for VM instances
         * contained in this subnetwork. The primary IP of such VM must belong
         * to the primary ipCidrRange of the subnetwork. The alias IPs may belong
         * to either primary or secondary ranges.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder secondaryIpRanges(@Nullable Output<List<SubnetworkSecondaryIpRangeArgs>> secondaryIpRanges) {
            $.secondaryIpRanges = secondaryIpRanges;
            return this;
        }

        /**
         * @param secondaryIpRanges An array of configurations for secondary IP ranges for VM instances
         * contained in this subnetwork. The primary IP of such VM must belong
         * to the primary ipCidrRange of the subnetwork. The alias IPs may belong
         * to either primary or secondary ranges.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder secondaryIpRanges(List<SubnetworkSecondaryIpRangeArgs> secondaryIpRanges) {
            return secondaryIpRanges(Output.of(secondaryIpRanges));
        }

        /**
         * @param secondaryIpRanges An array of configurations for secondary IP ranges for VM instances
         * contained in this subnetwork. The primary IP of such VM must belong
         * to the primary ipCidrRange of the subnetwork. The alias IPs may belong
         * to either primary or secondary ranges.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder secondaryIpRanges(SubnetworkSecondaryIpRangeArgs... secondaryIpRanges) {
            return secondaryIpRanges(List.of(secondaryIpRanges));
        }

        /**
         * @param stackType The stack type for this subnet to identify whether the IPv6 feature is enabled or not.
         * If not specified IPV4_ONLY will be used.
         * Possible values are: `IPV4_ONLY`, `IPV4_IPV6`.
         * 
         * @return builder
         * 
         */
        public Builder stackType(@Nullable Output<String> stackType) {
            $.stackType = stackType;
            return this;
        }

        /**
         * @param stackType The stack type for this subnet to identify whether the IPv6 feature is enabled or not.
         * If not specified IPV4_ONLY will be used.
         * Possible values are: `IPV4_ONLY`, `IPV4_IPV6`.
         * 
         * @return builder
         * 
         */
        public Builder stackType(String stackType) {
            return stackType(Output.of(stackType));
        }

        public SubnetworkArgs build() {
            $.ipCidrRange = Objects.requireNonNull($.ipCidrRange, "expected parameter 'ipCidrRange' to be non-null");
            $.network = Objects.requireNonNull($.network, "expected parameter 'network' to be non-null");
            return $;
        }
    }

}
