# 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 copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = ['LkeNodePoolArgs', 'LkeNodePool']

@pulumi.input_type
class LkeNodePoolArgs:
    def __init__(__self__, *,
                 cluster_id: pulumi.Input[int],
                 type: pulumi.Input[str],
                 autoscaler: Optional[pulumi.Input['LkeNodePoolAutoscalerArgs']] = None,
                 node_count: Optional[pulumi.Input[int]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        The set of arguments for constructing a LkeNodePool resource.
        :param pulumi.Input[int] cluster_id: The ID of the cluster to associate this node pool with.
        :param pulumi.Input[str] type: The type of node pool.
        :param pulumi.Input[int] node_count: The number of nodes in the Node Pool.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: An array of tags applied to this object. Tags are for organizational purposes only.
        """
        pulumi.set(__self__, "cluster_id", cluster_id)
        pulumi.set(__self__, "type", type)
        if autoscaler is not None:
            pulumi.set(__self__, "autoscaler", autoscaler)
        if node_count is not None:
            pulumi.set(__self__, "node_count", node_count)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> pulumi.Input[int]:
        """
        The ID of the cluster to associate this node pool with.
        """
        return pulumi.get(self, "cluster_id")

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

    @property
    @pulumi.getter
    def type(self) -> pulumi.Input[str]:
        """
        The type of node pool.
        """
        return pulumi.get(self, "type")

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

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

    @autoscaler.setter
    def autoscaler(self, value: Optional[pulumi.Input['LkeNodePoolAutoscalerArgs']]):
        pulumi.set(self, "autoscaler", value)

    @property
    @pulumi.getter(name="nodeCount")
    def node_count(self) -> Optional[pulumi.Input[int]]:
        """
        The number of nodes in the Node Pool.
        """
        return pulumi.get(self, "node_count")

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

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        An array of tags applied to this object. Tags are for organizational purposes only.
        """
        return pulumi.get(self, "tags")

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


@pulumi.input_type
class _LkeNodePoolState:
    def __init__(__self__, *,
                 autoscaler: Optional[pulumi.Input['LkeNodePoolAutoscalerArgs']] = None,
                 cluster_id: Optional[pulumi.Input[int]] = None,
                 node_count: Optional[pulumi.Input[int]] = None,
                 nodes: Optional[pulumi.Input[Sequence[pulumi.Input['LkeNodePoolNodeArgs']]]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 type: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering LkeNodePool resources.
        :param pulumi.Input[int] cluster_id: The ID of the cluster to associate this node pool with.
        :param pulumi.Input[int] node_count: The number of nodes in the Node Pool.
        :param pulumi.Input[Sequence[pulumi.Input['LkeNodePoolNodeArgs']]] nodes: A list of nodes in the node pool.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: An array of tags applied to this object. Tags are for organizational purposes only.
        :param pulumi.Input[str] type: The type of node pool.
        """
        if autoscaler is not None:
            pulumi.set(__self__, "autoscaler", autoscaler)
        if cluster_id is not None:
            pulumi.set(__self__, "cluster_id", cluster_id)
        if node_count is not None:
            pulumi.set(__self__, "node_count", node_count)
        if nodes is not None:
            pulumi.set(__self__, "nodes", nodes)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if type is not None:
            pulumi.set(__self__, "type", type)

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

    @autoscaler.setter
    def autoscaler(self, value: Optional[pulumi.Input['LkeNodePoolAutoscalerArgs']]):
        pulumi.set(self, "autoscaler", value)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> Optional[pulumi.Input[int]]:
        """
        The ID of the cluster to associate this node pool with.
        """
        return pulumi.get(self, "cluster_id")

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

    @property
    @pulumi.getter(name="nodeCount")
    def node_count(self) -> Optional[pulumi.Input[int]]:
        """
        The number of nodes in the Node Pool.
        """
        return pulumi.get(self, "node_count")

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

    @property
    @pulumi.getter
    def nodes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['LkeNodePoolNodeArgs']]]]:
        """
        A list of nodes in the node pool.
        """
        return pulumi.get(self, "nodes")

    @nodes.setter
    def nodes(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['LkeNodePoolNodeArgs']]]]):
        pulumi.set(self, "nodes", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        An array of tags applied to this object. Tags are for organizational purposes only.
        """
        return pulumi.get(self, "tags")

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

    @property
    @pulumi.getter
    def type(self) -> Optional[pulumi.Input[str]]:
        """
        The type of node pool.
        """
        return pulumi.get(self, "type")

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


class LkeNodePool(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 autoscaler: Optional[pulumi.Input[pulumi.InputType['LkeNodePoolAutoscalerArgs']]] = None,
                 cluster_id: Optional[pulumi.Input[int]] = None,
                 node_count: Optional[pulumi.Input[int]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Create a LkeNodePool resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[int] cluster_id: The ID of the cluster to associate this node pool with.
        :param pulumi.Input[int] node_count: The number of nodes in the Node Pool.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: An array of tags applied to this object. Tags are for organizational purposes only.
        :param pulumi.Input[str] type: The type of node pool.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: LkeNodePoolArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a LkeNodePool resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param LkeNodePoolArgs 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(LkeNodePoolArgs, 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,
                 autoscaler: Optional[pulumi.Input[pulumi.InputType['LkeNodePoolAutoscalerArgs']]] = None,
                 cluster_id: Optional[pulumi.Input[int]] = None,
                 node_count: Optional[pulumi.Input[int]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        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__ = LkeNodePoolArgs.__new__(LkeNodePoolArgs)

            __props__.__dict__["autoscaler"] = autoscaler
            if cluster_id is None and not opts.urn:
                raise TypeError("Missing required property 'cluster_id'")
            __props__.__dict__["cluster_id"] = cluster_id
            __props__.__dict__["node_count"] = node_count
            __props__.__dict__["tags"] = tags
            if type is None and not opts.urn:
                raise TypeError("Missing required property 'type'")
            __props__.__dict__["type"] = type
            __props__.__dict__["nodes"] = None
        super(LkeNodePool, __self__).__init__(
            'linode:index/lkeNodePool:LkeNodePool',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            autoscaler: Optional[pulumi.Input[pulumi.InputType['LkeNodePoolAutoscalerArgs']]] = None,
            cluster_id: Optional[pulumi.Input[int]] = None,
            node_count: Optional[pulumi.Input[int]] = None,
            nodes: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['LkeNodePoolNodeArgs']]]]] = None,
            tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            type: Optional[pulumi.Input[str]] = None) -> 'LkeNodePool':
        """
        Get an existing LkeNodePool 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[int] cluster_id: The ID of the cluster to associate this node pool with.
        :param pulumi.Input[int] node_count: The number of nodes in the Node Pool.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['LkeNodePoolNodeArgs']]]] nodes: A list of nodes in the node pool.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: An array of tags applied to this object. Tags are for organizational purposes only.
        :param pulumi.Input[str] type: The type of node pool.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _LkeNodePoolState.__new__(_LkeNodePoolState)

        __props__.__dict__["autoscaler"] = autoscaler
        __props__.__dict__["cluster_id"] = cluster_id
        __props__.__dict__["node_count"] = node_count
        __props__.__dict__["nodes"] = nodes
        __props__.__dict__["tags"] = tags
        __props__.__dict__["type"] = type
        return LkeNodePool(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def autoscaler(self) -> pulumi.Output[Optional['outputs.LkeNodePoolAutoscaler']]:
        return pulumi.get(self, "autoscaler")

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> pulumi.Output[int]:
        """
        The ID of the cluster to associate this node pool with.
        """
        return pulumi.get(self, "cluster_id")

    @property
    @pulumi.getter(name="nodeCount")
    def node_count(self) -> pulumi.Output[int]:
        """
        The number of nodes in the Node Pool.
        """
        return pulumi.get(self, "node_count")

    @property
    @pulumi.getter
    def nodes(self) -> pulumi.Output[Sequence['outputs.LkeNodePoolNode']]:
        """
        A list of nodes in the node pool.
        """
        return pulumi.get(self, "nodes")

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Sequence[str]]:
        """
        An array of tags applied to this object. Tags are for organizational purposes only.
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def type(self) -> pulumi.Output[str]:
        """
        The type of node pool.
        """
        return pulumi.get(self, "type")

