# coding: utf-8

"""
    Memsource REST API

    Welcome to Memsource's API documentation. To view our legacy APIs please [visit our documentation](https://wiki.memsource.com/wiki/Memsource_API) and for more information about our new APIs, [visit our blog](https://www.memsource.com/blog/2017/10/24/introducing-rest-apis-qa-with-the-memsource-api-team/).    If you have any questions, please contact [Memsource Support](<mailto:support@memsource.com>).  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from memsource_cli.models.uid_reference import UidReference  # noqa: F401,E501


class PreTranslateJobsDto(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 = {
        'jobs': 'list[UidReference]',
        'use_translation_memory': 'bool',
        'use_machine_translation': 'bool',
        'translation_memory_treshold': 'float',
        'insert_machine_translation_into_target': 'bool',
        'pre_translate_non_translatables': 'bool',
        'confirm100_non_translatable_matches': 'bool',
        'confirm100_translation_memory_matches': 'bool',
        'confirm101_translation_memory_matches': 'bool',
        'lock100_non_translatable_matches': 'bool',
        'lock100_translation_memory_matches': 'bool',
        'lock101_translation_memory_matches': 'bool',
        'overwrite': 'bool',
        'segment_filters': 'list[str]',
        'use_project_pre_translate_settings': 'bool',
        'callback_url': 'str'
    }

    attribute_map = {
        'jobs': 'jobs',
        'use_translation_memory': 'useTranslationMemory',
        'use_machine_translation': 'useMachineTranslation',
        'translation_memory_treshold': 'translationMemoryTreshold',
        'insert_machine_translation_into_target': 'insertMachineTranslationIntoTarget',
        'pre_translate_non_translatables': 'preTranslateNonTranslatables',
        'confirm100_non_translatable_matches': 'confirm100NonTranslatableMatches',
        'confirm100_translation_memory_matches': 'confirm100TranslationMemoryMatches',
        'confirm101_translation_memory_matches': 'confirm101TranslationMemoryMatches',
        'lock100_non_translatable_matches': 'lock100NonTranslatableMatches',
        'lock100_translation_memory_matches': 'lock100TranslationMemoryMatches',
        'lock101_translation_memory_matches': 'lock101TranslationMemoryMatches',
        'overwrite': 'overwrite',
        'segment_filters': 'segmentFilters',
        'use_project_pre_translate_settings': 'useProjectPreTranslateSettings',
        'callback_url': 'callbackUrl'
    }

    def __init__(self, jobs=None, use_translation_memory=None, use_machine_translation=None, translation_memory_treshold=None, insert_machine_translation_into_target=None, pre_translate_non_translatables=None, confirm100_non_translatable_matches=None, confirm100_translation_memory_matches=None, confirm101_translation_memory_matches=None, lock100_non_translatable_matches=None, lock100_translation_memory_matches=None, lock101_translation_memory_matches=None, overwrite=None, segment_filters=None, use_project_pre_translate_settings=None, callback_url=None):  # noqa: E501
        """PreTranslateJobsDto - a model defined in Swagger"""  # noqa: E501

        self._jobs = None
        self._use_translation_memory = None
        self._use_machine_translation = None
        self._translation_memory_treshold = None
        self._insert_machine_translation_into_target = None
        self._pre_translate_non_translatables = None
        self._confirm100_non_translatable_matches = None
        self._confirm100_translation_memory_matches = None
        self._confirm101_translation_memory_matches = None
        self._lock100_non_translatable_matches = None
        self._lock100_translation_memory_matches = None
        self._lock101_translation_memory_matches = None
        self._overwrite = None
        self._segment_filters = None
        self._use_project_pre_translate_settings = None
        self._callback_url = None
        self.discriminator = None

        self.jobs = jobs
        if use_translation_memory is not None:
            self.use_translation_memory = use_translation_memory
        if use_machine_translation is not None:
            self.use_machine_translation = use_machine_translation
        if translation_memory_treshold is not None:
            self.translation_memory_treshold = translation_memory_treshold
        if insert_machine_translation_into_target is not None:
            self.insert_machine_translation_into_target = insert_machine_translation_into_target
        if pre_translate_non_translatables is not None:
            self.pre_translate_non_translatables = pre_translate_non_translatables
        if confirm100_non_translatable_matches is not None:
            self.confirm100_non_translatable_matches = confirm100_non_translatable_matches
        if confirm100_translation_memory_matches is not None:
            self.confirm100_translation_memory_matches = confirm100_translation_memory_matches
        if confirm101_translation_memory_matches is not None:
            self.confirm101_translation_memory_matches = confirm101_translation_memory_matches
        if lock100_non_translatable_matches is not None:
            self.lock100_non_translatable_matches = lock100_non_translatable_matches
        if lock100_translation_memory_matches is not None:
            self.lock100_translation_memory_matches = lock100_translation_memory_matches
        if lock101_translation_memory_matches is not None:
            self.lock101_translation_memory_matches = lock101_translation_memory_matches
        if overwrite is not None:
            self.overwrite = overwrite
        if segment_filters is not None:
            self.segment_filters = segment_filters
        if use_project_pre_translate_settings is not None:
            self.use_project_pre_translate_settings = use_project_pre_translate_settings
        if callback_url is not None:
            self.callback_url = callback_url

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


        :return: The jobs of this PreTranslateJobsDto.  # noqa: E501
        :rtype: list[UidReference]
        """
        return self._jobs

    @jobs.setter
    def jobs(self, jobs):
        """Sets the jobs of this PreTranslateJobsDto.


        :param jobs: The jobs of this PreTranslateJobsDto.  # noqa: E501
        :type: list[UidReference]
        """
        if jobs is None:
            raise ValueError("Invalid value for `jobs`, must not be `None`")  # noqa: E501

        self._jobs = jobs

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

        Default: true  # noqa: E501

        :return: The use_translation_memory of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._use_translation_memory

    @use_translation_memory.setter
    def use_translation_memory(self, use_translation_memory):
        """Sets the use_translation_memory of this PreTranslateJobsDto.

        Default: true  # noqa: E501

        :param use_translation_memory: The use_translation_memory of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._use_translation_memory = use_translation_memory

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

        Default: true  # noqa: E501

        :return: The use_machine_translation of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._use_machine_translation

    @use_machine_translation.setter
    def use_machine_translation(self, use_machine_translation):
        """Sets the use_machine_translation of this PreTranslateJobsDto.

        Default: true  # noqa: E501

        :param use_machine_translation: The use_machine_translation of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._use_machine_translation = use_machine_translation

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

        default: 0.7  # noqa: E501

        :return: The translation_memory_treshold of this PreTranslateJobsDto.  # noqa: E501
        :rtype: float
        """
        return self._translation_memory_treshold

    @translation_memory_treshold.setter
    def translation_memory_treshold(self, translation_memory_treshold):
        """Sets the translation_memory_treshold of this PreTranslateJobsDto.

        default: 0.7  # noqa: E501

        :param translation_memory_treshold: The translation_memory_treshold of this PreTranslateJobsDto.  # noqa: E501
        :type: float
        """

        self._translation_memory_treshold = translation_memory_treshold

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

        Default: false  # noqa: E501

        :return: The insert_machine_translation_into_target of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._insert_machine_translation_into_target

    @insert_machine_translation_into_target.setter
    def insert_machine_translation_into_target(self, insert_machine_translation_into_target):
        """Sets the insert_machine_translation_into_target of this PreTranslateJobsDto.

        Default: false  # noqa: E501

        :param insert_machine_translation_into_target: The insert_machine_translation_into_target of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._insert_machine_translation_into_target = insert_machine_translation_into_target

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

        Default: false  # noqa: E501

        :return: The pre_translate_non_translatables of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._pre_translate_non_translatables

    @pre_translate_non_translatables.setter
    def pre_translate_non_translatables(self, pre_translate_non_translatables):
        """Sets the pre_translate_non_translatables of this PreTranslateJobsDto.

        Default: false  # noqa: E501

        :param pre_translate_non_translatables: The pre_translate_non_translatables of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._pre_translate_non_translatables = pre_translate_non_translatables

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

        Default: false  # noqa: E501

        :return: The confirm100_non_translatable_matches of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._confirm100_non_translatable_matches

    @confirm100_non_translatable_matches.setter
    def confirm100_non_translatable_matches(self, confirm100_non_translatable_matches):
        """Sets the confirm100_non_translatable_matches of this PreTranslateJobsDto.

        Default: false  # noqa: E501

        :param confirm100_non_translatable_matches: The confirm100_non_translatable_matches of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._confirm100_non_translatable_matches = confirm100_non_translatable_matches

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

        Default: false  # noqa: E501

        :return: The confirm100_translation_memory_matches of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._confirm100_translation_memory_matches

    @confirm100_translation_memory_matches.setter
    def confirm100_translation_memory_matches(self, confirm100_translation_memory_matches):
        """Sets the confirm100_translation_memory_matches of this PreTranslateJobsDto.

        Default: false  # noqa: E501

        :param confirm100_translation_memory_matches: The confirm100_translation_memory_matches of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._confirm100_translation_memory_matches = confirm100_translation_memory_matches

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

        Default: false  # noqa: E501

        :return: The confirm101_translation_memory_matches of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._confirm101_translation_memory_matches

    @confirm101_translation_memory_matches.setter
    def confirm101_translation_memory_matches(self, confirm101_translation_memory_matches):
        """Sets the confirm101_translation_memory_matches of this PreTranslateJobsDto.

        Default: false  # noqa: E501

        :param confirm101_translation_memory_matches: The confirm101_translation_memory_matches of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._confirm101_translation_memory_matches = confirm101_translation_memory_matches

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

        Default: false  # noqa: E501

        :return: The lock100_non_translatable_matches of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._lock100_non_translatable_matches

    @lock100_non_translatable_matches.setter
    def lock100_non_translatable_matches(self, lock100_non_translatable_matches):
        """Sets the lock100_non_translatable_matches of this PreTranslateJobsDto.

        Default: false  # noqa: E501

        :param lock100_non_translatable_matches: The lock100_non_translatable_matches of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._lock100_non_translatable_matches = lock100_non_translatable_matches

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

        Default: false  # noqa: E501

        :return: The lock100_translation_memory_matches of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._lock100_translation_memory_matches

    @lock100_translation_memory_matches.setter
    def lock100_translation_memory_matches(self, lock100_translation_memory_matches):
        """Sets the lock100_translation_memory_matches of this PreTranslateJobsDto.

        Default: false  # noqa: E501

        :param lock100_translation_memory_matches: The lock100_translation_memory_matches of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._lock100_translation_memory_matches = lock100_translation_memory_matches

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

        Default: false  # noqa: E501

        :return: The lock101_translation_memory_matches of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._lock101_translation_memory_matches

    @lock101_translation_memory_matches.setter
    def lock101_translation_memory_matches(self, lock101_translation_memory_matches):
        """Sets the lock101_translation_memory_matches of this PreTranslateJobsDto.

        Default: false  # noqa: E501

        :param lock101_translation_memory_matches: The lock101_translation_memory_matches of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._lock101_translation_memory_matches = lock101_translation_memory_matches

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

        Default: false  # noqa: E501

        :return: The overwrite of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._overwrite

    @overwrite.setter
    def overwrite(self, overwrite):
        """Sets the overwrite of this PreTranslateJobsDto.

        Default: false  # noqa: E501

        :param overwrite: The overwrite of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._overwrite = overwrite

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


        :return: The segment_filters of this PreTranslateJobsDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._segment_filters

    @segment_filters.setter
    def segment_filters(self, segment_filters):
        """Sets the segment_filters of this PreTranslateJobsDto.


        :param segment_filters: The segment_filters of this PreTranslateJobsDto.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["LOCKED", "NOT_LOCKED"]  # noqa: E501
        if not set(segment_filters).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `segment_filters` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(segment_filters) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._segment_filters = segment_filters

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

        Default: false  # noqa: E501

        :return: The use_project_pre_translate_settings of this PreTranslateJobsDto.  # noqa: E501
        :rtype: bool
        """
        return self._use_project_pre_translate_settings

    @use_project_pre_translate_settings.setter
    def use_project_pre_translate_settings(self, use_project_pre_translate_settings):
        """Sets the use_project_pre_translate_settings of this PreTranslateJobsDto.

        Default: false  # noqa: E501

        :param use_project_pre_translate_settings: The use_project_pre_translate_settings of this PreTranslateJobsDto.  # noqa: E501
        :type: bool
        """

        self._use_project_pre_translate_settings = use_project_pre_translate_settings

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


        :return: The callback_url of this PreTranslateJobsDto.  # noqa: E501
        :rtype: str
        """
        return self._callback_url

    @callback_url.setter
    def callback_url(self, callback_url):
        """Sets the callback_url of this PreTranslateJobsDto.


        :param callback_url: The callback_url of this PreTranslateJobsDto.  # noqa: E501
        :type: str
        """

        self._callback_url = callback_url

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

        return self.__dict__ == other.__dict__

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