// *** 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 java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final NetworkArgs Empty = new NetworkArgs();

    /**
     * When set to `true`, the network is created in &#34;auto subnet mode&#34; and
     * it will create a subnet for each region automatically across the
     * `10.128.0.0/9` address range.
     * When set to `false`, the network is created in &#34;custom subnet mode&#34; so
     * the user can explicitly connect subnetwork resources.
     * 
     */
    @Import(name="autoCreateSubnetworks")
    private @Nullable Output<Boolean> autoCreateSubnetworks;

    /**
     * @return When set to `true`, the network is created in &#34;auto subnet mode&#34; and
     * it will create a subnet for each region automatically across the
     * `10.128.0.0/9` address range.
     * When set to `false`, the network is created in &#34;custom subnet mode&#34; so
     * the user can explicitly connect subnetwork resources.
     * 
     */
    public Optional<Output<Boolean>> autoCreateSubnetworks() {
        return Optional.ofNullable(this.autoCreateSubnetworks);
    }

    /**
     * If set to `true`, default routes (`0.0.0.0/0`) will be deleted
     * immediately after network creation. Defaults to `false`.
     * 
     */
    @Import(name="deleteDefaultRoutesOnCreate")
    private @Nullable Output<Boolean> deleteDefaultRoutesOnCreate;

    /**
     * @return If set to `true`, default routes (`0.0.0.0/0`) will be deleted
     * immediately after network creation. Defaults to `false`.
     * 
     */
    public Optional<Output<Boolean>> deleteDefaultRoutesOnCreate() {
        return Optional.ofNullable(this.deleteDefaultRoutesOnCreate);
    }

    /**
     * An optional description of this resource. The resource must be
     * recreated to modify this field.
     * 
     */
    @Import(name="description")
    private @Nullable Output<String> description;

    /**
     * @return An optional description of this resource. The resource must be
     * recreated to modify this field.
     * 
     */
    public Optional<Output<String>> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Enable ULA internal ipv6 on this network. Enabling this feature will assign
     * a /48 from google defined ULA prefix fd20::/20.
     * 
     */
    @Import(name="enableUlaInternalIpv6")
    private @Nullable Output<Boolean> enableUlaInternalIpv6;

    /**
     * @return Enable ULA internal ipv6 on this network. Enabling this feature will assign
     * a /48 from google defined ULA prefix fd20::/20.
     * 
     */
    public Optional<Output<Boolean>> enableUlaInternalIpv6() {
        return Optional.ofNullable(this.enableUlaInternalIpv6);
    }

    /**
     * When enabling ula internal ipv6, caller optionally can specify the /48 range
     * they want from the google defined ULA prefix fd20::/20. The input must be a
     * valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will
     * fail if the speficied /48 is already in used by another resource.
     * If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
     * 
     */
    @Import(name="internalIpv6Range")
    private @Nullable Output<String> internalIpv6Range;

    /**
     * @return When enabling ula internal ipv6, caller optionally can specify the /48 range
     * they want from the google defined ULA prefix fd20::/20. The input must be a
     * valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will
     * fail if the speficied /48 is already in used by another resource.
     * If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
     * 
     */
    public Optional<Output<String>> internalIpv6Range() {
        return Optional.ofNullable(this.internalIpv6Range);
    }

    /**
     * Maximum Transmission Unit in bytes. The default value is 1460 bytes.
     * The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames).
     * Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped
     * with an ICMP `Fragmentation-Needed` message if the packets are routed to the Internet or other VPCs
     * with varying MTUs.
     * 
     */
    @Import(name="mtu")
    private @Nullable Output<Integer> mtu;

    /**
     * @return Maximum Transmission Unit in bytes. The default value is 1460 bytes.
     * The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames).
     * Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped
     * with an ICMP `Fragmentation-Needed` message if the packets are routed to the Internet or other VPCs
     * with varying MTUs.
     * 
     */
    public Optional<Output<Integer>> mtu() {
        return Optional.ofNullable(this.mtu);
    }

    /**
     * Name of the resource. Provided by the client when the resource is
     * created. 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 Name of the resource. Provided by the client when the resource is
     * created. 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);
    }

    /**
     * Set the order that Firewall Rules and Firewall Policies are evaluated.
     * Default value is `AFTER_CLASSIC_FIREWALL`.
     * Possible values are: `BEFORE_CLASSIC_FIREWALL`, `AFTER_CLASSIC_FIREWALL`.
     * 
     */
    @Import(name="networkFirewallPolicyEnforcementOrder")
    private @Nullable Output<String> networkFirewallPolicyEnforcementOrder;

    /**
     * @return Set the order that Firewall Rules and Firewall Policies are evaluated.
     * Default value is `AFTER_CLASSIC_FIREWALL`.
     * Possible values are: `BEFORE_CLASSIC_FIREWALL`, `AFTER_CLASSIC_FIREWALL`.
     * 
     */
    public Optional<Output<String>> networkFirewallPolicyEnforcementOrder() {
        return Optional.ofNullable(this.networkFirewallPolicyEnforcementOrder);
    }

    /**
     * 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 network-wide routing mode to use. If set to `REGIONAL`, this
     * network&#39;s cloud routers will only advertise routes with subnetworks
     * of this network in the same region as the router. If set to `GLOBAL`,
     * this network&#39;s cloud routers will advertise routes with all
     * subnetworks of this network, across regions.
     * Possible values are: `REGIONAL`, `GLOBAL`.
     * 
     */
    @Import(name="routingMode")
    private @Nullable Output<String> routingMode;

    /**
     * @return The network-wide routing mode to use. If set to `REGIONAL`, this
     * network&#39;s cloud routers will only advertise routes with subnetworks
     * of this network in the same region as the router. If set to `GLOBAL`,
     * this network&#39;s cloud routers will advertise routes with all
     * subnetworks of this network, across regions.
     * Possible values are: `REGIONAL`, `GLOBAL`.
     * 
     */
    public Optional<Output<String>> routingMode() {
        return Optional.ofNullable(this.routingMode);
    }

    private NetworkArgs() {}

    private NetworkArgs(NetworkArgs $) {
        this.autoCreateSubnetworks = $.autoCreateSubnetworks;
        this.deleteDefaultRoutesOnCreate = $.deleteDefaultRoutesOnCreate;
        this.description = $.description;
        this.enableUlaInternalIpv6 = $.enableUlaInternalIpv6;
        this.internalIpv6Range = $.internalIpv6Range;
        this.mtu = $.mtu;
        this.name = $.name;
        this.networkFirewallPolicyEnforcementOrder = $.networkFirewallPolicyEnforcementOrder;
        this.project = $.project;
        this.routingMode = $.routingMode;
    }

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

    public static final class Builder {
        private NetworkArgs $;

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

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

        /**
         * @param autoCreateSubnetworks When set to `true`, the network is created in &#34;auto subnet mode&#34; and
         * it will create a subnet for each region automatically across the
         * `10.128.0.0/9` address range.
         * When set to `false`, the network is created in &#34;custom subnet mode&#34; so
         * the user can explicitly connect subnetwork resources.
         * 
         * @return builder
         * 
         */
        public Builder autoCreateSubnetworks(@Nullable Output<Boolean> autoCreateSubnetworks) {
            $.autoCreateSubnetworks = autoCreateSubnetworks;
            return this;
        }

        /**
         * @param autoCreateSubnetworks When set to `true`, the network is created in &#34;auto subnet mode&#34; and
         * it will create a subnet for each region automatically across the
         * `10.128.0.0/9` address range.
         * When set to `false`, the network is created in &#34;custom subnet mode&#34; so
         * the user can explicitly connect subnetwork resources.
         * 
         * @return builder
         * 
         */
        public Builder autoCreateSubnetworks(Boolean autoCreateSubnetworks) {
            return autoCreateSubnetworks(Output.of(autoCreateSubnetworks));
        }

        /**
         * @param deleteDefaultRoutesOnCreate If set to `true`, default routes (`0.0.0.0/0`) will be deleted
         * immediately after network creation. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder deleteDefaultRoutesOnCreate(@Nullable Output<Boolean> deleteDefaultRoutesOnCreate) {
            $.deleteDefaultRoutesOnCreate = deleteDefaultRoutesOnCreate;
            return this;
        }

        /**
         * @param deleteDefaultRoutesOnCreate If set to `true`, default routes (`0.0.0.0/0`) will be deleted
         * immediately after network creation. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder deleteDefaultRoutesOnCreate(Boolean deleteDefaultRoutesOnCreate) {
            return deleteDefaultRoutesOnCreate(Output.of(deleteDefaultRoutesOnCreate));
        }

        /**
         * @param description An optional description of this resource. The resource must be
         * recreated to modify this field.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output<String> description) {
            $.description = description;
            return this;
        }

        /**
         * @param description An optional description of this resource. The resource must be
         * recreated to modify this field.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param enableUlaInternalIpv6 Enable ULA internal ipv6 on this network. Enabling this feature will assign
         * a /48 from google defined ULA prefix fd20::/20.
         * 
         * @return builder
         * 
         */
        public Builder enableUlaInternalIpv6(@Nullable Output<Boolean> enableUlaInternalIpv6) {
            $.enableUlaInternalIpv6 = enableUlaInternalIpv6;
            return this;
        }

        /**
         * @param enableUlaInternalIpv6 Enable ULA internal ipv6 on this network. Enabling this feature will assign
         * a /48 from google defined ULA prefix fd20::/20.
         * 
         * @return builder
         * 
         */
        public Builder enableUlaInternalIpv6(Boolean enableUlaInternalIpv6) {
            return enableUlaInternalIpv6(Output.of(enableUlaInternalIpv6));
        }

        /**
         * @param internalIpv6Range When enabling ula internal ipv6, caller optionally can specify the /48 range
         * they want from the google defined ULA prefix fd20::/20. The input must be a
         * valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will
         * fail if the speficied /48 is already in used by another resource.
         * If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
         * 
         * @return builder
         * 
         */
        public Builder internalIpv6Range(@Nullable Output<String> internalIpv6Range) {
            $.internalIpv6Range = internalIpv6Range;
            return this;
        }

        /**
         * @param internalIpv6Range When enabling ula internal ipv6, caller optionally can specify the /48 range
         * they want from the google defined ULA prefix fd20::/20. The input must be a
         * valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will
         * fail if the speficied /48 is already in used by another resource.
         * If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
         * 
         * @return builder
         * 
         */
        public Builder internalIpv6Range(String internalIpv6Range) {
            return internalIpv6Range(Output.of(internalIpv6Range));
        }

        /**
         * @param mtu Maximum Transmission Unit in bytes. The default value is 1460 bytes.
         * The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames).
         * Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped
         * with an ICMP `Fragmentation-Needed` message if the packets are routed to the Internet or other VPCs
         * with varying MTUs.
         * 
         * @return builder
         * 
         */
        public Builder mtu(@Nullable Output<Integer> mtu) {
            $.mtu = mtu;
            return this;
        }

        /**
         * @param mtu Maximum Transmission Unit in bytes. The default value is 1460 bytes.
         * The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames).
         * Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped
         * with an ICMP `Fragmentation-Needed` message if the packets are routed to the Internet or other VPCs
         * with varying MTUs.
         * 
         * @return builder
         * 
         */
        public Builder mtu(Integer mtu) {
            return mtu(Output.of(mtu));
        }

        /**
         * @param name Name of the resource. Provided by the client when the resource is
         * created. 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 Name of the resource. Provided by the client when the resource is
         * created. 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 networkFirewallPolicyEnforcementOrder Set the order that Firewall Rules and Firewall Policies are evaluated.
         * Default value is `AFTER_CLASSIC_FIREWALL`.
         * Possible values are: `BEFORE_CLASSIC_FIREWALL`, `AFTER_CLASSIC_FIREWALL`.
         * 
         * @return builder
         * 
         */
        public Builder networkFirewallPolicyEnforcementOrder(@Nullable Output<String> networkFirewallPolicyEnforcementOrder) {
            $.networkFirewallPolicyEnforcementOrder = networkFirewallPolicyEnforcementOrder;
            return this;
        }

        /**
         * @param networkFirewallPolicyEnforcementOrder Set the order that Firewall Rules and Firewall Policies are evaluated.
         * Default value is `AFTER_CLASSIC_FIREWALL`.
         * Possible values are: `BEFORE_CLASSIC_FIREWALL`, `AFTER_CLASSIC_FIREWALL`.
         * 
         * @return builder
         * 
         */
        public Builder networkFirewallPolicyEnforcementOrder(String networkFirewallPolicyEnforcementOrder) {
            return networkFirewallPolicyEnforcementOrder(Output.of(networkFirewallPolicyEnforcementOrder));
        }

        /**
         * @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 routingMode The network-wide routing mode to use. If set to `REGIONAL`, this
         * network&#39;s cloud routers will only advertise routes with subnetworks
         * of this network in the same region as the router. If set to `GLOBAL`,
         * this network&#39;s cloud routers will advertise routes with all
         * subnetworks of this network, across regions.
         * Possible values are: `REGIONAL`, `GLOBAL`.
         * 
         * @return builder
         * 
         */
        public Builder routingMode(@Nullable Output<String> routingMode) {
            $.routingMode = routingMode;
            return this;
        }

        /**
         * @param routingMode The network-wide routing mode to use. If set to `REGIONAL`, this
         * network&#39;s cloud routers will only advertise routes with subnetworks
         * of this network in the same region as the router. If set to `GLOBAL`,
         * this network&#39;s cloud routers will advertise routes with all
         * subnetworks of this network, across regions.
         * Possible values are: `REGIONAL`, `GLOBAL`.
         * 
         * @return builder
         * 
         */
        public Builder routingMode(String routingMode) {
            return routingMode(Output.of(routingMode));
        }

        public NetworkArgs build() {
            return $;
        }
    }

}
