# coding: utf-8

"""
    Laserfiche API

    Welcome to the Laserfiche API Swagger Playground. You can try out any of our API calls against your live Laserfiche Cloud account. Visit the developer center for more details: <a href=\"https://developer.laserfiche.com\">https://developer.laserfiche.com</a><p><strong>Build# : </strong>650780</p>  # noqa: E501

    OpenAPI spec version: 1-alpha
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class FieldValue(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'field_name': 'str',
        'values': 'list[dict(str, object)]',
        'field_type': 'OneOfFieldValueFieldType',
        'group_id': 'int',
        'field_id': 'int',
        'is_multi_value': 'bool',
        'is_required': 'bool'
    }

    attribute_map = {
        'field_name': 'fieldName',
        'values': 'values',
        'field_type': 'fieldType',
        'group_id': 'groupId',
        'field_id': 'fieldId',
        'is_multi_value': 'isMultiValue',
        'is_required': 'isRequired'
    }

    def __init__(self, field_name=None, values=None, field_type=None, group_id=None, field_id=None, is_multi_value=None, is_required=None):  # noqa: E501
        """FieldValue - a model defined in Swagger"""  # noqa: E501
        self._field_name = None
        self._values = None
        self._field_type = None
        self._group_id = None
        self._field_id = None
        self._is_multi_value = None
        self._is_required = None
        self.discriminator = None
        if field_name is not None:
            self.field_name = field_name
        if values is not None:
            self.values = values
        if field_type is not None:
            self.field_type = field_type
        if group_id is not None:
            self.group_id = group_id
        if field_id is not None:
            self.field_id = field_id
        if is_multi_value is not None:
            self.is_multi_value = is_multi_value
        if is_required is not None:
            self.is_required = is_required

    @property
    def field_name(self):
        """Gets the field_name of this FieldValue.  # noqa: E501

        The name of the field.  # noqa: E501

        :return: The field_name of this FieldValue.  # noqa: E501
        :rtype: str
        """
        return self._field_name

    @field_name.setter
    def field_name(self, field_name):
        """Sets the field_name of this FieldValue.

        The name of the field.  # noqa: E501

        :param field_name: The field_name of this FieldValue.  # noqa: E501
        :type: str
        """

        self._field_name = field_name

    @property
    def values(self):
        """Gets the values of this FieldValue.  # noqa: E501

        The values assigned to the field.  # noqa: E501

        :return: The values of this FieldValue.  # noqa: E501
        :rtype: list[dict(str, object)]
        """
        return self._values

    @values.setter
    def values(self, values):
        """Sets the values of this FieldValue.

        The values assigned to the field.  # noqa: E501

        :param values: The values of this FieldValue.  # noqa: E501
        :type: list[dict(str, object)]
        """

        self._values = values

    @property
    def field_type(self):
        """Gets the field_type of this FieldValue.  # noqa: E501

        The type of the field. The possible field types are listed below.  # noqa: E501

        :return: The field_type of this FieldValue.  # noqa: E501
        :rtype: OneOfFieldValueFieldType
        """
        return self._field_type

    @field_type.setter
    def field_type(self, field_type):
        """Sets the field_type of this FieldValue.

        The type of the field. The possible field types are listed below.  # noqa: E501

        :param field_type: The field_type of this FieldValue.  # noqa: E501
        :type: OneOfFieldValueFieldType
        """

        self._field_type = field_type

    @property
    def group_id(self):
        """Gets the group_id of this FieldValue.  # noqa: E501

        The group id of the multi value field group. If the field is not a part of a multi value field group, then there is no group id.  # noqa: E501

        :return: The group_id of this FieldValue.  # noqa: E501
        :rtype: int
        """
        return self._group_id

    @group_id.setter
    def group_id(self, group_id):
        """Sets the group_id of this FieldValue.

        The group id of the multi value field group. If the field is not a part of a multi value field group, then there is no group id.  # noqa: E501

        :param group_id: The group_id of this FieldValue.  # noqa: E501
        :type: int
        """

        self._group_id = group_id

    @property
    def field_id(self):
        """Gets the field_id of this FieldValue.  # noqa: E501

        The ID of the field.  # noqa: E501

        :return: The field_id of this FieldValue.  # noqa: E501
        :rtype: int
        """
        return self._field_id

    @field_id.setter
    def field_id(self, field_id):
        """Sets the field_id of this FieldValue.

        The ID of the field.  # noqa: E501

        :param field_id: The field_id of this FieldValue.  # noqa: E501
        :type: int
        """

        self._field_id = field_id

    @property
    def is_multi_value(self):
        """Gets the is_multi_value of this FieldValue.  # noqa: E501

        A boolean indicating if the represented field supports multiple values.  # noqa: E501

        :return: The is_multi_value of this FieldValue.  # noqa: E501
        :rtype: bool
        """
        return self._is_multi_value

    @is_multi_value.setter
    def is_multi_value(self, is_multi_value):
        """Sets the is_multi_value of this FieldValue.

        A boolean indicating if the represented field supports multiple values.  # noqa: E501

        :param is_multi_value: The is_multi_value of this FieldValue.  # noqa: E501
        :type: bool
        """

        self._is_multi_value = is_multi_value

    @property
    def is_required(self):
        """Gets the is_required of this FieldValue.  # noqa: E501

        A boolean indicating if the represented field must have a value set on entries assigned to a template that the field is a member of.  # noqa: E501

        :return: The is_required of this FieldValue.  # noqa: E501
        :rtype: bool
        """
        return self._is_required

    @is_required.setter
    def is_required(self, is_required):
        """Sets the is_required of this FieldValue.

        A boolean indicating if the represented field must have a value set on entries assigned to a template that the field is a member of.  # noqa: E501

        :param is_required: The is_required of this FieldValue.  # noqa: E501
        :type: bool
        """

        self._is_required = is_required

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(FieldValue, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, FieldValue):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
