# 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__ = ['NetworkListArgs', 'NetworkList']

@pulumi.input_type
class NetworkListArgs:
    def __init__(__self__, *,
                 description: pulumi.Input[str],
                 mode: pulumi.Input[str],
                 type: pulumi.Input[str],
                 lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a NetworkList resource.
        :param pulumi.Input[str] description: The description to be assigned to the network list.
        :param pulumi.Input[str] mode: A string specifying the interpretation of the `list` parameter. Must be one of the following:
        :param pulumi.Input[str] type: The type of the network list; must be either "IP" or "GEO".
        :param pulumi.Input[Sequence[pulumi.Input[str]]] lists: : (Optional) A list of IP addresses or locations to be included in the list, added to an existing list, or
               removed from an existing list.
        :param pulumi.Input[str] name: The name to be assigned to the network list.
        """
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "mode", mode)
        pulumi.set(__self__, "type", type)
        if lists is not None:
            pulumi.set(__self__, "lists", lists)
        if name is not None:
            pulumi.set(__self__, "name", name)

    @property
    @pulumi.getter
    def description(self) -> pulumi.Input[str]:
        """
        The description to be assigned to the network list.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter
    def mode(self) -> pulumi.Input[str]:
        """
        A string specifying the interpretation of the `list` parameter. Must be one of the following:
        """
        return pulumi.get(self, "mode")

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

    @property
    @pulumi.getter
    def type(self) -> pulumi.Input[str]:
        """
        The type of the network list; must be either "IP" or "GEO".
        """
        return pulumi.get(self, "type")

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

    @property
    @pulumi.getter
    def lists(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        : (Optional) A list of IP addresses or locations to be included in the list, added to an existing list, or
        removed from an existing list.
        """
        return pulumi.get(self, "lists")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The name to be assigned to the network list.
        """
        return pulumi.get(self, "name")

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


@pulumi.input_type
class _NetworkListState:
    def __init__(__self__, *,
                 description: Optional[pulumi.Input[str]] = None,
                 lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 mode: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 network_list_id: Optional[pulumi.Input[str]] = None,
                 sync_point: Optional[pulumi.Input[int]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 uniqueid: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering NetworkList resources.
        :param pulumi.Input[str] description: The description to be assigned to the network list.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] lists: : (Optional) A list of IP addresses or locations to be included in the list, added to an existing list, or
               removed from an existing list.
        :param pulumi.Input[str] mode: A string specifying the interpretation of the `list` parameter. Must be one of the following:
        :param pulumi.Input[str] name: The name to be assigned to the network list.
        :param pulumi.Input[str] network_list_id: The ID of the network list.
        :param pulumi.Input[int] sync_point: An integer that identifies the current version of the network list; this value is incremented each time
               the list is modified.
        :param pulumi.Input[str] type: The type of the network list; must be either "IP" or "GEO".
        :param pulumi.Input[str] uniqueid: uniqueId
        """
        if description is not None:
            pulumi.set(__self__, "description", description)
        if lists is not None:
            pulumi.set(__self__, "lists", lists)
        if mode is not None:
            pulumi.set(__self__, "mode", mode)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if network_list_id is not None:
            pulumi.set(__self__, "network_list_id", network_list_id)
        if sync_point is not None:
            pulumi.set(__self__, "sync_point", sync_point)
        if type is not None:
            pulumi.set(__self__, "type", type)
        if uniqueid is not None:
            pulumi.set(__self__, "uniqueid", uniqueid)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        The description to be assigned to the network list.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter
    def lists(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        : (Optional) A list of IP addresses or locations to be included in the list, added to an existing list, or
        removed from an existing list.
        """
        return pulumi.get(self, "lists")

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

    @property
    @pulumi.getter
    def mode(self) -> Optional[pulumi.Input[str]]:
        """
        A string specifying the interpretation of the `list` parameter. Must be one of the following:
        """
        return pulumi.get(self, "mode")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The name to be assigned to the network list.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter(name="networkListId")
    def network_list_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID of the network list.
        """
        return pulumi.get(self, "network_list_id")

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

    @property
    @pulumi.getter(name="syncPoint")
    def sync_point(self) -> Optional[pulumi.Input[int]]:
        """
        An integer that identifies the current version of the network list; this value is incremented each time
        the list is modified.
        """
        return pulumi.get(self, "sync_point")

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

    @property
    @pulumi.getter
    def type(self) -> Optional[pulumi.Input[str]]:
        """
        The type of the network list; must be either "IP" or "GEO".
        """
        return pulumi.get(self, "type")

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

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

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


class NetworkList(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 mode: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Use the `NetworkList` resource to create a network list, or to modify an existing list.

        ## Example Usage

        Basic usage:

        ```python
        import pulumi
        import pulumi_akamai as akamai

        network_list = akamai.NetworkList("networkList",
            type="IP",
            description="network list description",
            lists=var["list"],
            mode="APPEND")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] description: The description to be assigned to the network list.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] lists: : (Optional) A list of IP addresses or locations to be included in the list, added to an existing list, or
               removed from an existing list.
        :param pulumi.Input[str] mode: A string specifying the interpretation of the `list` parameter. Must be one of the following:
        :param pulumi.Input[str] name: The name to be assigned to the network list.
        :param pulumi.Input[str] type: The type of the network list; must be either "IP" or "GEO".
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: NetworkListArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Use the `NetworkList` resource to create a network list, or to modify an existing list.

        ## Example Usage

        Basic usage:

        ```python
        import pulumi
        import pulumi_akamai as akamai

        network_list = akamai.NetworkList("networkList",
            type="IP",
            description="network list description",
            lists=var["list"],
            mode="APPEND")
        ```

        :param str resource_name: The name of the resource.
        :param NetworkListArgs 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(NetworkListArgs, 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,
                 description: Optional[pulumi.Input[str]] = None,
                 lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 mode: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 type: Optional[pulumi.Input[str]] = 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__ = NetworkListArgs.__new__(NetworkListArgs)

            if description is None and not opts.urn:
                raise TypeError("Missing required property 'description'")
            __props__.__dict__["description"] = description
            __props__.__dict__["lists"] = lists
            if mode is None and not opts.urn:
                raise TypeError("Missing required property 'mode'")
            __props__.__dict__["mode"] = mode
            __props__.__dict__["name"] = name
            if type is None and not opts.urn:
                raise TypeError("Missing required property 'type'")
            __props__.__dict__["type"] = type
            __props__.__dict__["network_list_id"] = None
            __props__.__dict__["sync_point"] = None
            __props__.__dict__["uniqueid"] = None
        super(NetworkList, __self__).__init__(
            'akamai:index/networkList:NetworkList',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            description: Optional[pulumi.Input[str]] = None,
            lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            mode: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            network_list_id: Optional[pulumi.Input[str]] = None,
            sync_point: Optional[pulumi.Input[int]] = None,
            type: Optional[pulumi.Input[str]] = None,
            uniqueid: Optional[pulumi.Input[str]] = None) -> 'NetworkList':
        """
        Get an existing NetworkList 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: The description to be assigned to the network list.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] lists: : (Optional) A list of IP addresses or locations to be included in the list, added to an existing list, or
               removed from an existing list.
        :param pulumi.Input[str] mode: A string specifying the interpretation of the `list` parameter. Must be one of the following:
        :param pulumi.Input[str] name: The name to be assigned to the network list.
        :param pulumi.Input[str] network_list_id: The ID of the network list.
        :param pulumi.Input[int] sync_point: An integer that identifies the current version of the network list; this value is incremented each time
               the list is modified.
        :param pulumi.Input[str] type: The type of the network list; must be either "IP" or "GEO".
        :param pulumi.Input[str] uniqueid: uniqueId
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _NetworkListState.__new__(_NetworkListState)

        __props__.__dict__["description"] = description
        __props__.__dict__["lists"] = lists
        __props__.__dict__["mode"] = mode
        __props__.__dict__["name"] = name
        __props__.__dict__["network_list_id"] = network_list_id
        __props__.__dict__["sync_point"] = sync_point
        __props__.__dict__["type"] = type
        __props__.__dict__["uniqueid"] = uniqueid
        return NetworkList(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[str]:
        """
        The description to be assigned to the network list.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def lists(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        : (Optional) A list of IP addresses or locations to be included in the list, added to an existing list, or
        removed from an existing list.
        """
        return pulumi.get(self, "lists")

    @property
    @pulumi.getter
    def mode(self) -> pulumi.Output[str]:
        """
        A string specifying the interpretation of the `list` parameter. Must be one of the following:
        """
        return pulumi.get(self, "mode")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        The name to be assigned to the network list.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="networkListId")
    def network_list_id(self) -> pulumi.Output[str]:
        """
        The ID of the network list.
        """
        return pulumi.get(self, "network_list_id")

    @property
    @pulumi.getter(name="syncPoint")
    def sync_point(self) -> pulumi.Output[int]:
        """
        An integer that identifies the current version of the network list; this value is incremented each time
        the list is modified.
        """
        return pulumi.get(self, "sync_point")

    @property
    @pulumi.getter
    def type(self) -> pulumi.Output[str]:
        """
        The type of the network list; must be either "IP" or "GEO".
        """
        return pulumi.get(self, "type")

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

