# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = ['NetworkArgs', 'Network']

@pulumi.input_type
class NetworkArgs:
    def __init__(__self__, *,
                 vlan_id: pulumi.Input[int],
                 config: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 namespace: Optional[pulumi.Input[str]] = None,
                 route_cidr: Optional[pulumi.Input[str]] = None,
                 route_dhcp_server_ip: Optional[pulumi.Input[str]] = None,
                 route_gateway: Optional[pulumi.Input[str]] = None,
                 route_mode: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, Any]]] = None):
        """
        The set of arguments for constructing a Network resource.
        :param pulumi.Input[int] vlan_id: e.g. 1-4094
        :param pulumi.Input[str] description: Any text you want that better describes this resource
        :param pulumi.Input[str] name: A unique name
        :param pulumi.Input[str] route_cidr: e.g. 172.16.0.1/24
        :param pulumi.Input[str] route_gateway: e.g. 172.16.0.1
        """
        pulumi.set(__self__, "vlan_id", vlan_id)
        if config is not None:
            pulumi.set(__self__, "config", config)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if namespace is not None:
            pulumi.set(__self__, "namespace", namespace)
        if route_cidr is not None:
            pulumi.set(__self__, "route_cidr", route_cidr)
        if route_dhcp_server_ip is not None:
            pulumi.set(__self__, "route_dhcp_server_ip", route_dhcp_server_ip)
        if route_gateway is not None:
            pulumi.set(__self__, "route_gateway", route_gateway)
        if route_mode is not None:
            pulumi.set(__self__, "route_mode", route_mode)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)

    @property
    @pulumi.getter(name="vlanId")
    def vlan_id(self) -> pulumi.Input[int]:
        """
        e.g. 1-4094
        """
        return pulumi.get(self, "vlan_id")

    @vlan_id.setter
    def vlan_id(self, value: pulumi.Input[int]):
        pulumi.set(self, "vlan_id", value)

    @property
    @pulumi.getter
    def config(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "config")

    @config.setter
    def config(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "config", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        Any text you want that better describes this resource
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        A unique name
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def namespace(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "namespace")

    @namespace.setter
    def namespace(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "namespace", value)

    @property
    @pulumi.getter(name="routeCidr")
    def route_cidr(self) -> Optional[pulumi.Input[str]]:
        """
        e.g. 172.16.0.1/24
        """
        return pulumi.get(self, "route_cidr")

    @route_cidr.setter
    def route_cidr(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "route_cidr", value)

    @property
    @pulumi.getter(name="routeDhcpServerIp")
    def route_dhcp_server_ip(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "route_dhcp_server_ip")

    @route_dhcp_server_ip.setter
    def route_dhcp_server_ip(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "route_dhcp_server_ip", value)

    @property
    @pulumi.getter(name="routeGateway")
    def route_gateway(self) -> Optional[pulumi.Input[str]]:
        """
        e.g. 172.16.0.1
        """
        return pulumi.get(self, "route_gateway")

    @route_gateway.setter
    def route_gateway(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "route_gateway", value)

    @property
    @pulumi.getter(name="routeMode")
    def route_mode(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "route_mode")

    @route_mode.setter
    def route_mode(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "route_mode", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
        pulumi.set(self, "tags", value)


@pulumi.input_type
class _NetworkState:
    def __init__(__self__, *,
                 config: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 namespace: Optional[pulumi.Input[str]] = None,
                 route_cidr: Optional[pulumi.Input[str]] = None,
                 route_connectivity: Optional[pulumi.Input[str]] = None,
                 route_dhcp_server_ip: Optional[pulumi.Input[str]] = None,
                 route_gateway: Optional[pulumi.Input[str]] = None,
                 route_mode: Optional[pulumi.Input[str]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                 vlan_id: Optional[pulumi.Input[int]] = None):
        """
        Input properties used for looking up and filtering Network resources.
        :param pulumi.Input[str] description: Any text you want that better describes this resource
        :param pulumi.Input[str] name: A unique name
        :param pulumi.Input[str] route_cidr: e.g. 172.16.0.1/24
        :param pulumi.Input[str] route_gateway: e.g. 172.16.0.1
        :param pulumi.Input[int] vlan_id: e.g. 1-4094
        """
        if config is not None:
            pulumi.set(__self__, "config", config)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if namespace is not None:
            pulumi.set(__self__, "namespace", namespace)
        if route_cidr is not None:
            pulumi.set(__self__, "route_cidr", route_cidr)
        if route_connectivity is not None:
            pulumi.set(__self__, "route_connectivity", route_connectivity)
        if route_dhcp_server_ip is not None:
            pulumi.set(__self__, "route_dhcp_server_ip", route_dhcp_server_ip)
        if route_gateway is not None:
            pulumi.set(__self__, "route_gateway", route_gateway)
        if route_mode is not None:
            pulumi.set(__self__, "route_mode", route_mode)
        if state is not None:
            pulumi.set(__self__, "state", state)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if vlan_id is not None:
            pulumi.set(__self__, "vlan_id", vlan_id)

    @property
    @pulumi.getter
    def config(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "config")

    @config.setter
    def config(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "config", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        Any text you want that better describes this resource
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        A unique name
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def namespace(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "namespace")

    @namespace.setter
    def namespace(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "namespace", value)

    @property
    @pulumi.getter(name="routeCidr")
    def route_cidr(self) -> Optional[pulumi.Input[str]]:
        """
        e.g. 172.16.0.1/24
        """
        return pulumi.get(self, "route_cidr")

    @route_cidr.setter
    def route_cidr(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "route_cidr", value)

    @property
    @pulumi.getter(name="routeConnectivity")
    def route_connectivity(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "route_connectivity")

    @route_connectivity.setter
    def route_connectivity(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "route_connectivity", value)

    @property
    @pulumi.getter(name="routeDhcpServerIp")
    def route_dhcp_server_ip(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "route_dhcp_server_ip")

    @route_dhcp_server_ip.setter
    def route_dhcp_server_ip(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "route_dhcp_server_ip", value)

    @property
    @pulumi.getter(name="routeGateway")
    def route_gateway(self) -> Optional[pulumi.Input[str]]:
        """
        e.g. 172.16.0.1
        """
        return pulumi.get(self, "route_gateway")

    @route_gateway.setter
    def route_gateway(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "route_gateway", value)

    @property
    @pulumi.getter(name="routeMode")
    def route_mode(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "route_mode")

    @route_mode.setter
    def route_mode(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "route_mode", value)

    @property
    @pulumi.getter
    def state(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "state")

    @state.setter
    def state(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "state", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter(name="vlanId")
    def vlan_id(self) -> Optional[pulumi.Input[int]]:
        """
        e.g. 1-4094
        """
        return pulumi.get(self, "vlan_id")

    @vlan_id.setter
    def vlan_id(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "vlan_id", value)


class Network(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 config: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 namespace: Optional[pulumi.Input[str]] = None,
                 route_cidr: Optional[pulumi.Input[str]] = None,
                 route_dhcp_server_ip: Optional[pulumi.Input[str]] = None,
                 route_gateway: Optional[pulumi.Input[str]] = None,
                 route_mode: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                 vlan_id: Optional[pulumi.Input[int]] = None,
                 __props__=None):
        """
        ## Import

        ```sh
         $ pulumi import harvester:index/network:Network foo <Namespace>/<Name>
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] description: Any text you want that better describes this resource
        :param pulumi.Input[str] name: A unique name
        :param pulumi.Input[str] route_cidr: e.g. 172.16.0.1/24
        :param pulumi.Input[str] route_gateway: e.g. 172.16.0.1
        :param pulumi.Input[int] vlan_id: e.g. 1-4094
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: NetworkArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        ## Import

        ```sh
         $ pulumi import harvester:index/network:Network foo <Namespace>/<Name>
        ```

        :param str resource_name: The name of the resource.
        :param NetworkArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(NetworkArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 config: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 namespace: Optional[pulumi.Input[str]] = None,
                 route_cidr: Optional[pulumi.Input[str]] = None,
                 route_dhcp_server_ip: Optional[pulumi.Input[str]] = None,
                 route_gateway: Optional[pulumi.Input[str]] = None,
                 route_mode: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                 vlan_id: Optional[pulumi.Input[int]] = None,
                 __props__=None):
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = NetworkArgs.__new__(NetworkArgs)

            __props__.__dict__["config"] = config
            __props__.__dict__["description"] = description
            __props__.__dict__["name"] = name
            __props__.__dict__["namespace"] = namespace
            __props__.__dict__["route_cidr"] = route_cidr
            __props__.__dict__["route_dhcp_server_ip"] = route_dhcp_server_ip
            __props__.__dict__["route_gateway"] = route_gateway
            __props__.__dict__["route_mode"] = route_mode
            __props__.__dict__["tags"] = tags
            if vlan_id is None and not opts.urn:
                raise TypeError("Missing required property 'vlan_id'")
            __props__.__dict__["vlan_id"] = vlan_id
            __props__.__dict__["route_connectivity"] = None
            __props__.__dict__["state"] = None
        super(Network, __self__).__init__(
            'harvester:index/network:Network',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            config: Optional[pulumi.Input[str]] = None,
            description: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            namespace: Optional[pulumi.Input[str]] = None,
            route_cidr: Optional[pulumi.Input[str]] = None,
            route_connectivity: Optional[pulumi.Input[str]] = None,
            route_dhcp_server_ip: Optional[pulumi.Input[str]] = None,
            route_gateway: Optional[pulumi.Input[str]] = None,
            route_mode: Optional[pulumi.Input[str]] = None,
            state: Optional[pulumi.Input[str]] = None,
            tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
            vlan_id: Optional[pulumi.Input[int]] = None) -> 'Network':
        """
        Get an existing Network resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] description: Any text you want that better describes this resource
        :param pulumi.Input[str] name: A unique name
        :param pulumi.Input[str] route_cidr: e.g. 172.16.0.1/24
        :param pulumi.Input[str] route_gateway: e.g. 172.16.0.1
        :param pulumi.Input[int] vlan_id: e.g. 1-4094
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _NetworkState.__new__(_NetworkState)

        __props__.__dict__["config"] = config
        __props__.__dict__["description"] = description
        __props__.__dict__["name"] = name
        __props__.__dict__["namespace"] = namespace
        __props__.__dict__["route_cidr"] = route_cidr
        __props__.__dict__["route_connectivity"] = route_connectivity
        __props__.__dict__["route_dhcp_server_ip"] = route_dhcp_server_ip
        __props__.__dict__["route_gateway"] = route_gateway
        __props__.__dict__["route_mode"] = route_mode
        __props__.__dict__["state"] = state
        __props__.__dict__["tags"] = tags
        __props__.__dict__["vlan_id"] = vlan_id
        return Network(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def config(self) -> pulumi.Output[str]:
        return pulumi.get(self, "config")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[str]]:
        """
        Any text you want that better describes this resource
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        A unique name
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def namespace(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "namespace")

    @property
    @pulumi.getter(name="routeCidr")
    def route_cidr(self) -> pulumi.Output[Optional[str]]:
        """
        e.g. 172.16.0.1/24
        """
        return pulumi.get(self, "route_cidr")

    @property
    @pulumi.getter(name="routeConnectivity")
    def route_connectivity(self) -> pulumi.Output[str]:
        return pulumi.get(self, "route_connectivity")

    @property
    @pulumi.getter(name="routeDhcpServerIp")
    def route_dhcp_server_ip(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "route_dhcp_server_ip")

    @property
    @pulumi.getter(name="routeGateway")
    def route_gateway(self) -> pulumi.Output[Optional[str]]:
        """
        e.g. 172.16.0.1
        """
        return pulumi.get(self, "route_gateway")

    @property
    @pulumi.getter(name="routeMode")
    def route_mode(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "route_mode")

    @property
    @pulumi.getter
    def state(self) -> pulumi.Output[str]:
        return pulumi.get(self, "state")

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Optional[Mapping[str, Any]]]:
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="vlanId")
    def vlan_id(self) -> pulumi.Output[int]:
        """
        e.g. 1-4094
        """
        return pulumi.get(self, "vlan_id")

