# 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

__all__ = ['CustomFieldArgs', 'CustomField']

@pulumi.input_type
class CustomFieldArgs:
    def __init__(__self__, *,
                 content_types: pulumi.Input[Sequence[pulumi.Input[str]]],
                 type: pulumi.Input[str],
                 weight: pulumi.Input[int],
                 choices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 default: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 label: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 required: Optional[pulumi.Input[bool]] = None,
                 validation_maximum: Optional[pulumi.Input[int]] = None,
                 validation_minimum: Optional[pulumi.Input[int]] = None,
                 validation_regex: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a CustomField resource.
        """
        pulumi.set(__self__, "content_types", content_types)
        pulumi.set(__self__, "type", type)
        pulumi.set(__self__, "weight", weight)
        if choices is not None:
            pulumi.set(__self__, "choices", choices)
        if default is not None:
            pulumi.set(__self__, "default", default)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if label is not None:
            pulumi.set(__self__, "label", label)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if required is not None:
            pulumi.set(__self__, "required", required)
        if validation_maximum is not None:
            pulumi.set(__self__, "validation_maximum", validation_maximum)
        if validation_minimum is not None:
            pulumi.set(__self__, "validation_minimum", validation_minimum)
        if validation_regex is not None:
            pulumi.set(__self__, "validation_regex", validation_regex)

    @property
    @pulumi.getter(name="contentTypes")
    def content_types(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
        return pulumi.get(self, "content_types")

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

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

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

    @property
    @pulumi.getter
    def weight(self) -> pulumi.Input[int]:
        return pulumi.get(self, "weight")

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

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

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

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

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

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

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

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

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

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

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

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

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

    @property
    @pulumi.getter(name="validationMaximum")
    def validation_maximum(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "validation_maximum")

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

    @property
    @pulumi.getter(name="validationMinimum")
    def validation_minimum(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "validation_minimum")

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

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

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


@pulumi.input_type
class _CustomFieldState:
    def __init__(__self__, *,
                 choices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 content_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 default: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 label: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 required: Optional[pulumi.Input[bool]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 validation_maximum: Optional[pulumi.Input[int]] = None,
                 validation_minimum: Optional[pulumi.Input[int]] = None,
                 validation_regex: Optional[pulumi.Input[str]] = None,
                 weight: Optional[pulumi.Input[int]] = None):
        """
        Input properties used for looking up and filtering CustomField resources.
        """
        if choices is not None:
            pulumi.set(__self__, "choices", choices)
        if content_types is not None:
            pulumi.set(__self__, "content_types", content_types)
        if default is not None:
            pulumi.set(__self__, "default", default)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if label is not None:
            pulumi.set(__self__, "label", label)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if required is not None:
            pulumi.set(__self__, "required", required)
        if type is not None:
            pulumi.set(__self__, "type", type)
        if validation_maximum is not None:
            pulumi.set(__self__, "validation_maximum", validation_maximum)
        if validation_minimum is not None:
            pulumi.set(__self__, "validation_minimum", validation_minimum)
        if validation_regex is not None:
            pulumi.set(__self__, "validation_regex", validation_regex)
        if weight is not None:
            pulumi.set(__self__, "weight", weight)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    @property
    @pulumi.getter(name="validationMaximum")
    def validation_maximum(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "validation_maximum")

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

    @property
    @pulumi.getter(name="validationMinimum")
    def validation_minimum(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "validation_minimum")

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

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

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

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

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


class CustomField(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 choices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 content_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 default: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 label: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 required: Optional[pulumi.Input[bool]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 validation_maximum: Optional[pulumi.Input[int]] = None,
                 validation_minimum: Optional[pulumi.Input[int]] = None,
                 validation_regex: Optional[pulumi.Input[str]] = None,
                 weight: Optional[pulumi.Input[int]] = None,
                 __props__=None):
        """
        Create a CustomField 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.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: CustomFieldArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a CustomField resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param CustomFieldArgs 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(CustomFieldArgs, 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,
                 choices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 content_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 default: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 label: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 required: Optional[pulumi.Input[bool]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 validation_maximum: Optional[pulumi.Input[int]] = None,
                 validation_minimum: Optional[pulumi.Input[int]] = None,
                 validation_regex: Optional[pulumi.Input[str]] = None,
                 weight: Optional[pulumi.Input[int]] = 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__ = CustomFieldArgs.__new__(CustomFieldArgs)

            __props__.__dict__["choices"] = choices
            if content_types is None and not opts.urn:
                raise TypeError("Missing required property 'content_types'")
            __props__.__dict__["content_types"] = content_types
            __props__.__dict__["default"] = default
            __props__.__dict__["description"] = description
            __props__.__dict__["label"] = label
            __props__.__dict__["name"] = name
            __props__.__dict__["required"] = required
            if type is None and not opts.urn:
                raise TypeError("Missing required property 'type'")
            __props__.__dict__["type"] = type
            __props__.__dict__["validation_maximum"] = validation_maximum
            __props__.__dict__["validation_minimum"] = validation_minimum
            __props__.__dict__["validation_regex"] = validation_regex
            if weight is None and not opts.urn:
                raise TypeError("Missing required property 'weight'")
            __props__.__dict__["weight"] = weight
        super(CustomField, __self__).__init__(
            'netbox:index/customField:CustomField',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            choices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            content_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            default: Optional[pulumi.Input[str]] = None,
            description: Optional[pulumi.Input[str]] = None,
            label: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            required: Optional[pulumi.Input[bool]] = None,
            type: Optional[pulumi.Input[str]] = None,
            validation_maximum: Optional[pulumi.Input[int]] = None,
            validation_minimum: Optional[pulumi.Input[int]] = None,
            validation_regex: Optional[pulumi.Input[str]] = None,
            weight: Optional[pulumi.Input[int]] = None) -> 'CustomField':
        """
        Get an existing CustomField 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.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _CustomFieldState.__new__(_CustomFieldState)

        __props__.__dict__["choices"] = choices
        __props__.__dict__["content_types"] = content_types
        __props__.__dict__["default"] = default
        __props__.__dict__["description"] = description
        __props__.__dict__["label"] = label
        __props__.__dict__["name"] = name
        __props__.__dict__["required"] = required
        __props__.__dict__["type"] = type
        __props__.__dict__["validation_maximum"] = validation_maximum
        __props__.__dict__["validation_minimum"] = validation_minimum
        __props__.__dict__["validation_regex"] = validation_regex
        __props__.__dict__["weight"] = weight
        return CustomField(resource_name, opts=opts, __props__=__props__)

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

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

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

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

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

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

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

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

    @property
    @pulumi.getter(name="validationMaximum")
    def validation_maximum(self) -> pulumi.Output[Optional[int]]:
        return pulumi.get(self, "validation_maximum")

    @property
    @pulumi.getter(name="validationMinimum")
    def validation_minimum(self) -> pulumi.Output[Optional[int]]:
        return pulumi.get(self, "validation_minimum")

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

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

