# coding: utf-8

"""
    Trackside Software TeamDB API v2.0

    This API enables you to access TeamDB data  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: support@trackside.fr
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from teamdbapi.configuration import Configuration


class Assembly(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 = {
        'id': 'str',
        'name': 'str',
        'date_assembly': 'datetime',
        'version_id': 'str',
        'revision_list': 'list[str]',
        'description': 'str',
        'group_id': 'str',
        'last_update_date_utc': 'datetime',
        'last_update_user': 'str',
        'revision_last_update_date_utc': 'datetime',
        'revision_last_update_user': 'str',
        'is_locked': 'bool',
        'is_new': 'bool',
        'is_obsolete': 'bool',
        'is_partial': 'bool',
        'is_draft': 'bool',
        'global_assembly_tag': 'str',
        'tags': 'list[str]'
    }

    attribute_map = {
        'id': 'Id',
        'name': 'Name',
        'date_assembly': 'DateAssembly',
        'version_id': 'VersionId',
        'revision_list': 'RevisionList',
        'description': 'Description',
        'group_id': 'GroupId',
        'last_update_date_utc': 'LastUpdateDateUtc',
        'last_update_user': 'LastUpdateUser',
        'revision_last_update_date_utc': 'RevisionLastUpdateDateUtc',
        'revision_last_update_user': 'RevisionLastUpdateUser',
        'is_locked': 'IsLocked',
        'is_new': 'IsNew',
        'is_obsolete': 'IsObsolete',
        'is_partial': 'IsPartial',
        'is_draft': 'IsDraft',
        'global_assembly_tag': 'GlobalAssemblyTag',
        'tags': 'Tags'
    }

    def __init__(self, id=None, name=None, date_assembly=None, version_id=None, revision_list=None, description=None, group_id=None, last_update_date_utc=None, last_update_user=None, revision_last_update_date_utc=None, revision_last_update_user=None, is_locked=None, is_new=None, is_obsolete=None, is_partial=None, is_draft=None, global_assembly_tag=None, tags=None, _configuration=None):  # noqa: E501
        """Assembly - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._name = None
        self._date_assembly = None
        self._version_id = None
        self._revision_list = None
        self._description = None
        self._group_id = None
        self._last_update_date_utc = None
        self._last_update_user = None
        self._revision_last_update_date_utc = None
        self._revision_last_update_user = None
        self._is_locked = None
        self._is_new = None
        self._is_obsolete = None
        self._is_partial = None
        self._is_draft = None
        self._global_assembly_tag = None
        self._tags = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.date_assembly = date_assembly
        self.version_id = version_id
        if revision_list is not None:
            self.revision_list = revision_list
        if description is not None:
            self.description = description
        if group_id is not None:
            self.group_id = group_id
        if last_update_date_utc is not None:
            self.last_update_date_utc = last_update_date_utc
        if last_update_user is not None:
            self.last_update_user = last_update_user
        if revision_last_update_date_utc is not None:
            self.revision_last_update_date_utc = revision_last_update_date_utc
        if revision_last_update_user is not None:
            self.revision_last_update_user = revision_last_update_user
        if is_locked is not None:
            self.is_locked = is_locked
        if is_new is not None:
            self.is_new = is_new
        if is_obsolete is not None:
            self.is_obsolete = is_obsolete
        if is_partial is not None:
            self.is_partial = is_partial
        if is_draft is not None:
            self.is_draft = is_draft
        if global_assembly_tag is not None:
            self.global_assembly_tag = global_assembly_tag
        if tags is not None:
            self.tags = tags

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

        The unique assembly Id.  Set the Id to Guid.Empty (00000000-0000-0000-0000-000000000000) if you want to create a new Assembly.  # noqa: E501

        :return: The id of this Assembly.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Assembly.

        The unique assembly Id.  Set the Id to Guid.Empty (00000000-0000-0000-0000-000000000000) if you want to create a new Assembly.  # noqa: E501

        :param id: The id of this Assembly.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

        The assembly name  # noqa: E501

        :return: The name of this Assembly.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Assembly.

        The assembly name  # noqa: E501

        :param name: The name of this Assembly.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                name is not None and len(name) < 1):
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")  # noqa: E501

        self._name = name

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

        The creation date.  The date must be an UTC date time. Here is an example : 2018-06-05T12:36:34.168Z  # noqa: E501

        :return: The date_assembly of this Assembly.  # noqa: E501
        :rtype: datetime
        """
        return self._date_assembly

    @date_assembly.setter
    def date_assembly(self, date_assembly):
        """Sets the date_assembly of this Assembly.

        The creation date.  The date must be an UTC date time. Here is an example : 2018-06-05T12:36:34.168Z  # noqa: E501

        :param date_assembly: The date_assembly of this Assembly.  # noqa: E501
        :type: datetime
        """
        if self._configuration.client_side_validation and date_assembly is None:
            raise ValueError("Invalid value for `date_assembly`, must not be `None`")  # noqa: E501

        self._date_assembly = date_assembly

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

        The version to which the assembly belongs to  # noqa: E501

        :return: The version_id of this Assembly.  # noqa: E501
        :rtype: str
        """
        return self._version_id

    @version_id.setter
    def version_id(self, version_id):
        """Sets the version_id of this Assembly.

        The version to which the assembly belongs to  # noqa: E501

        :param version_id: The version_id of this Assembly.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and version_id is None:
            raise ValueError("Invalid value for `version_id`, must not be `None`")  # noqa: E501

        self._version_id = version_id

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

        The revision ids associated to the assembly  # noqa: E501

        :return: The revision_list of this Assembly.  # noqa: E501
        :rtype: list[str]
        """
        return self._revision_list

    @revision_list.setter
    def revision_list(self, revision_list):
        """Sets the revision_list of this Assembly.

        The revision ids associated to the assembly  # noqa: E501

        :param revision_list: The revision_list of this Assembly.  # noqa: E501
        :type: list[str]
        """

        self._revision_list = revision_list

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

        The assembly description  # noqa: E501

        :return: The description of this Assembly.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this Assembly.

        The assembly description  # noqa: E501

        :param description: The description of this Assembly.  # noqa: E501
        :type: str
        """

        self._description = description

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

        If the assembly represents a group revision: the group id to which belongs the group revision.  Otherwise leave the property to Guid.Empty : 00000000-0000-0000-0000-000000000000  # noqa: E501

        :return: The group_id of this Assembly.  # noqa: E501
        :rtype: str
        """
        return self._group_id

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

        If the assembly represents a group revision: the group id to which belongs the group revision.  Otherwise leave the property to Guid.Empty : 00000000-0000-0000-0000-000000000000  # noqa: E501

        :param group_id: The group_id of this Assembly.  # noqa: E501
        :type: str
        """

        self._group_id = group_id

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

        The last utc date time when the properties of the assembly have been updated.  This field will be automatically updated from the server side each time you update the object.  # noqa: E501

        :return: The last_update_date_utc of this Assembly.  # noqa: E501
        :rtype: datetime
        """
        return self._last_update_date_utc

    @last_update_date_utc.setter
    def last_update_date_utc(self, last_update_date_utc):
        """Sets the last_update_date_utc of this Assembly.

        The last utc date time when the properties of the assembly have been updated.  This field will be automatically updated from the server side each time you update the object.  # noqa: E501

        :param last_update_date_utc: The last_update_date_utc of this Assembly.  # noqa: E501
        :type: datetime
        """

        self._last_update_date_utc = last_update_date_utc

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

        The name of the last user having updated the assembly  This field will be automatically updated from the server side each time you update the object.  # noqa: E501

        :return: The last_update_user of this Assembly.  # noqa: E501
        :rtype: str
        """
        return self._last_update_user

    @last_update_user.setter
    def last_update_user(self, last_update_user):
        """Sets the last_update_user of this Assembly.

        The name of the last user having updated the assembly  This field will be automatically updated from the server side each time you update the object.  # noqa: E501

        :param last_update_user: The last_update_user of this Assembly.  # noqa: E501
        :type: str
        """

        self._last_update_user = last_update_user

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

        The last utc date time when the revisions list has been updated  This field will be automatically updated from the server side each time you update the object.  # noqa: E501

        :return: The revision_last_update_date_utc of this Assembly.  # noqa: E501
        :rtype: datetime
        """
        return self._revision_last_update_date_utc

    @revision_last_update_date_utc.setter
    def revision_last_update_date_utc(self, revision_last_update_date_utc):
        """Sets the revision_last_update_date_utc of this Assembly.

        The last utc date time when the revisions list has been updated  This field will be automatically updated from the server side each time you update the object.  # noqa: E501

        :param revision_last_update_date_utc: The revision_last_update_date_utc of this Assembly.  # noqa: E501
        :type: datetime
        """

        self._revision_last_update_date_utc = revision_last_update_date_utc

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

        The name of the last user having updated the revisions list   This field will be automatically updated from the server side each time you update the object.  # noqa: E501

        :return: The revision_last_update_user of this Assembly.  # noqa: E501
        :rtype: str
        """
        return self._revision_last_update_user

    @revision_last_update_user.setter
    def revision_last_update_user(self, revision_last_update_user):
        """Sets the revision_last_update_user of this Assembly.

        The name of the last user having updated the revisions list   This field will be automatically updated from the server side each time you update the object.  # noqa: E501

        :param revision_last_update_user: The revision_last_update_user of this Assembly.  # noqa: E501
        :type: str
        """

        self._revision_last_update_user = revision_last_update_user

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

        Return true if the assembly is locked  # noqa: E501

        :return: The is_locked of this Assembly.  # noqa: E501
        :rtype: bool
        """
        return self._is_locked

    @is_locked.setter
    def is_locked(self, is_locked):
        """Sets the is_locked of this Assembly.

        Return true if the assembly is locked  # noqa: E501

        :param is_locked: The is_locked of this Assembly.  # noqa: E501
        :type: bool
        """

        self._is_locked = is_locked

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

        Return true if the assembly is new  # noqa: E501

        :return: The is_new of this Assembly.  # noqa: E501
        :rtype: bool
        """
        return self._is_new

    @is_new.setter
    def is_new(self, is_new):
        """Sets the is_new of this Assembly.

        Return true if the assembly is new  # noqa: E501

        :param is_new: The is_new of this Assembly.  # noqa: E501
        :type: bool
        """

        self._is_new = is_new

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

        Return true if the assembly is obsolete  # noqa: E501

        :return: The is_obsolete of this Assembly.  # noqa: E501
        :rtype: bool
        """
        return self._is_obsolete

    @is_obsolete.setter
    def is_obsolete(self, is_obsolete):
        """Sets the is_obsolete of this Assembly.

        Return true if the assembly is obsolete  # noqa: E501

        :param is_obsolete: The is_obsolete of this Assembly.  # noqa: E501
        :type: bool
        """

        self._is_obsolete = is_obsolete

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

        Return true if the assembly is partial  # noqa: E501

        :return: The is_partial of this Assembly.  # noqa: E501
        :rtype: bool
        """
        return self._is_partial

    @is_partial.setter
    def is_partial(self, is_partial):
        """Sets the is_partial of this Assembly.

        Return true if the assembly is partial  # noqa: E501

        :param is_partial: The is_partial of this Assembly.  # noqa: E501
        :type: bool
        """

        self._is_partial = is_partial

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

        Return true if the assembly is draft  # noqa: E501

        :return: The is_draft of this Assembly.  # noqa: E501
        :rtype: bool
        """
        return self._is_draft

    @is_draft.setter
    def is_draft(self, is_draft):
        """Sets the is_draft of this Assembly.

        Return true if the assembly is draft  # noqa: E501

        :param is_draft: The is_draft of this Assembly.  # noqa: E501
        :type: bool
        """

        self._is_draft = is_draft

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

        Obsolete: No longer used anymore. Return the global export tag  # noqa: E501

        :return: The global_assembly_tag of this Assembly.  # noqa: E501
        :rtype: str
        """
        return self._global_assembly_tag

    @global_assembly_tag.setter
    def global_assembly_tag(self, global_assembly_tag):
        """Sets the global_assembly_tag of this Assembly.

        Obsolete: No longer used anymore. Return the global export tag  # noqa: E501

        :param global_assembly_tag: The global_assembly_tag of this Assembly.  # noqa: E501
        :type: str
        """

        self._global_assembly_tag = global_assembly_tag

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

        Return the list of tags used to perform research on assemblies  # noqa: E501

        :return: The tags of this Assembly.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this Assembly.

        Return the list of tags used to perform research on assemblies  # noqa: E501

        :param tags: The tags of this Assembly.  # noqa: E501
        :type: list[str]
        """

        self._tags = tags

    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(Assembly, 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, Assembly):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
