# 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 Target(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',
        'description': 'str',
        'file_format': 'str',
        'auto_generate_assembly': 'bool',
        'auto_generate_assembly_version_id': 'str',
        'revision_merge_comment_mandatory': 'bool',
        'assembly_name_suffix': 'str'
    }

    attribute_map = {
        'id': 'Id',
        'name': 'Name',
        'description': 'Description',
        'file_format': 'FileFormat',
        'auto_generate_assembly': 'AutoGenerateAssembly',
        'auto_generate_assembly_version_id': 'AutoGenerateAssemblyVersionId',
        'revision_merge_comment_mandatory': 'RevisionMergeCommentMandatory',
        'assembly_name_suffix': 'AssemblyNameSuffix'
    }

    def __init__(self, id=None, name=None, description=None, file_format=None, auto_generate_assembly=None, auto_generate_assembly_version_id=None, revision_merge_comment_mandatory=None, assembly_name_suffix=None, _configuration=None):  # noqa: E501
        """Target - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._name = None
        self._description = None
        self._file_format = None
        self._auto_generate_assembly = None
        self._auto_generate_assembly_version_id = None
        self._revision_merge_comment_mandatory = None
        self._assembly_name_suffix = None
        self.discriminator = None

        self.id = id
        self.name = name
        if description is not None:
            self.description = description
        self.file_format = file_format
        if auto_generate_assembly is not None:
            self.auto_generate_assembly = auto_generate_assembly
        if auto_generate_assembly_version_id is not None:
            self.auto_generate_assembly_version_id = auto_generate_assembly_version_id
        if revision_merge_comment_mandatory is not None:
            self.revision_merge_comment_mandatory = revision_merge_comment_mandatory
        if assembly_name_suffix is not None:
            self.assembly_name_suffix = assembly_name_suffix

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

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

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

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

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

        :param id: The id of this Target.  # 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 Target.  # noqa: E501

        The target unique name  # noqa: E501

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

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

        The target unique name  # noqa: E501

        :param name: The name of this Target.  # 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 description(self):
        """Gets the description of this Target.  # noqa: E501

        The target description  # noqa: E501

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

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

        The target description  # noqa: E501

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

        self._description = description

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

        The file format used to create the target versions.  Simu = 1, M = 2, Dcm = 3, Clx = 4  # noqa: E501

        :return: The file_format of this Target.  # noqa: E501
        :rtype: str
        """
        return self._file_format

    @file_format.setter
    def file_format(self, file_format):
        """Sets the file_format of this Target.

        The file format used to create the target versions.  Simu = 1, M = 2, Dcm = 3, Clx = 4  # noqa: E501

        :param file_format: The file_format of this Target.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and file_format is None:
            raise ValueError("Invalid value for `file_format`, must not be `None`")  # noqa: E501
        allowed_values = ["Simu", "M", "Dcm", "Clx"]  # noqa: E501
        if (self._configuration.client_side_validation and
                file_format not in allowed_values):
            raise ValueError(
                "Invalid value for `file_format` ({0}), must be one of {1}"  # noqa: E501
                .format(file_format, allowed_values)
            )

        self._file_format = file_format

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

        True if we want to automatically generate assemblies when new Runs are created  # noqa: E501

        :return: The auto_generate_assembly of this Target.  # noqa: E501
        :rtype: bool
        """
        return self._auto_generate_assembly

    @auto_generate_assembly.setter
    def auto_generate_assembly(self, auto_generate_assembly):
        """Sets the auto_generate_assembly of this Target.

        True if we want to automatically generate assemblies when new Runs are created  # noqa: E501

        :param auto_generate_assembly: The auto_generate_assembly of this Target.  # noqa: E501
        :type: bool
        """

        self._auto_generate_assembly = auto_generate_assembly

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

        The version unqiue Id used as reference to create the assemblies when AutoGenerateAssembly is true.  It is also used to display the current version in the drop down list.  # noqa: E501

        :return: The auto_generate_assembly_version_id of this Target.  # noqa: E501
        :rtype: str
        """
        return self._auto_generate_assembly_version_id

    @auto_generate_assembly_version_id.setter
    def auto_generate_assembly_version_id(self, auto_generate_assembly_version_id):
        """Sets the auto_generate_assembly_version_id of this Target.

        The version unqiue Id used as reference to create the assemblies when AutoGenerateAssembly is true.  It is also used to display the current version in the drop down list.  # noqa: E501

        :param auto_generate_assembly_version_id: The auto_generate_assembly_version_id of this Target.  # noqa: E501
        :type: str
        """

        self._auto_generate_assembly_version_id = auto_generate_assembly_version_id

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

        True if you want to set comments mandatory when you merge revisions after a comparison.  # noqa: E501

        :return: The revision_merge_comment_mandatory of this Target.  # noqa: E501
        :rtype: bool
        """
        return self._revision_merge_comment_mandatory

    @revision_merge_comment_mandatory.setter
    def revision_merge_comment_mandatory(self, revision_merge_comment_mandatory):
        """Sets the revision_merge_comment_mandatory of this Target.

        True if you want to set comments mandatory when you merge revisions after a comparison.  # noqa: E501

        :param revision_merge_comment_mandatory: The revision_merge_comment_mandatory of this Target.  # noqa: E501
        :type: bool
        """

        self._revision_merge_comment_mandatory = revision_merge_comment_mandatory

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

        The suffix name automatically applyed to the assemblies name created by Teamdb.  Must not contains _. Only contains zero or many letters and end with at least one 0.  # noqa: E501

        :return: The assembly_name_suffix of this Target.  # noqa: E501
        :rtype: str
        """
        return self._assembly_name_suffix

    @assembly_name_suffix.setter
    def assembly_name_suffix(self, assembly_name_suffix):
        """Sets the assembly_name_suffix of this Target.

        The suffix name automatically applyed to the assemblies name created by Teamdb.  Must not contains _. Only contains zero or many letters and end with at least one 0.  # noqa: E501

        :param assembly_name_suffix: The assembly_name_suffix of this Target.  # noqa: E501
        :type: str
        """

        self._assembly_name_suffix = assembly_name_suffix

    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(Target, 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, Target):
            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, Target):
            return True

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