# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class UDFCreate(Model):
    """UDFCreate.

    All required parameters must be populated in order to send to Azure.

    :param udf_type: Required. The UDF type. Possible value include: "Vendor",
     "Place", "Account", "Meter", "ChannelVersion", "Rate", and "Bill" <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 32 characters</span>
    :type udf_type: str
    :param name: Required. The UDF's name <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 32 characters</span>
    :type name: str
    :param data_type_id: Required. The UDF's data type identifier.
     Possible value include:
     1 (boolean), 2 (integer), 3 (string),
     4 (double), 6 (date), 12 (select list),
     13 (url), 15 (formatted text), 16 (image),
     17 (pdf), 18 (document file), 19 (JSON text) <span
     class='property-internal'>Required</span>
    :type data_type_id: int
    :param display_order: Required. <p>The UDF's display order</p>
     <p>A value of 1 or less will put this record the beginning of the list</p>
     <p>If the display order exists it will put this record at that spot.
     Display orders greater than or equal to this will be incremented by 1</p>
     <p>A value greater than the stored max will put this record at the end of
     the list</p> <span class='property-internal'>Required</span>
    :type display_order: int
    :param udf_select_values: <p>An array of options to populate a UDF select
     list.</p>
     <p>Required when dataTypeId is 12 otherwise this will be ignored.</p>
     <span class='property-internal'>Required when dataTypeId is set to
     12</span>
    :type udf_select_values: list[~energycap.sdk.models.UDFSelectValueCreate]
    """

    _validation = {
        'udf_type': {'required': True, 'max_length': 32, 'min_length': 0},
        'name': {'required': True, 'max_length': 32, 'min_length': 0},
        'data_type_id': {'required': True},
        'display_order': {'required': True},
    }

    _attribute_map = {
        'udf_type': {'key': 'udfType', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'data_type_id': {'key': 'dataTypeId', 'type': 'int'},
        'display_order': {'key': 'displayOrder', 'type': 'int'},
        'udf_select_values': {'key': 'udfSelectValues', 'type': '[UDFSelectValueCreate]'},
    }

    def __init__(self, **kwargs):
        super(UDFCreate, self).__init__(**kwargs)
        self.udf_type = kwargs.get('udf_type', None)
        self.name = kwargs.get('name', None)
        self.data_type_id = kwargs.get('data_type_id', None)
        self.display_order = kwargs.get('display_order', None)
        self.udf_select_values = kwargs.get('udf_select_values', None)
