# coding: utf-8

"""
    Alteryx Server API V3

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

from src.server_client.configuration import Configuration


class UpdateWorkflowContract(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 = {
        'name': 'str',
        'version_id': 'str',
        'make_published': 'bool',
        'owner_id': 'str',
        'worker_tag': 'str',
        'district_tags': 'list[str]',
        'comments': 'str',
        'is_public': 'bool',
        'is_ready_for_migration': 'bool',
        'others_may_download': 'bool',
        'others_can_execute': 'bool',
        'execution_mode': 'str',
        'has_private_data_exemption': 'bool',
        'workflow_credential_type': 'str',
        'credential_id': 'str'
    }

    attribute_map = {
        'name': 'name',
        'version_id': 'versionId',
        'make_published': 'makePublished',
        'owner_id': 'ownerId',
        'worker_tag': 'workerTag',
        'district_tags': 'districtTags',
        'comments': 'comments',
        'is_public': 'isPublic',
        'is_ready_for_migration': 'isReadyForMigration',
        'others_may_download': 'othersMayDownload',
        'others_can_execute': 'othersCanExecute',
        'execution_mode': 'executionMode',
        'has_private_data_exemption': 'hasPrivateDataExemption',
        'workflow_credential_type': 'workflowCredentialType',
        'credential_id': 'credentialId'
    }

    def __init__(self, name=None, version_id=None, make_published=None, owner_id=None, worker_tag=None, district_tags=None, comments=None, is_public=None, is_ready_for_migration=None, others_may_download=None, others_can_execute=None, execution_mode=None, has_private_data_exemption=None, workflow_credential_type=None, credential_id=None, _configuration=None):  # noqa: E501
        """UpdateWorkflowContract - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._version_id = None
        self._make_published = None
        self._owner_id = None
        self._worker_tag = None
        self._district_tags = None
        self._comments = None
        self._is_public = None
        self._is_ready_for_migration = None
        self._others_may_download = None
        self._others_can_execute = None
        self._execution_mode = None
        self._has_private_data_exemption = None
        self._workflow_credential_type = None
        self._credential_id = None
        self.discriminator = None

        self.name = name
        self.version_id = version_id
        self.make_published = make_published
        self.owner_id = owner_id
        self.worker_tag = worker_tag
        self.district_tags = district_tags
        self.comments = comments
        self.is_public = is_public
        self.is_ready_for_migration = is_ready_for_migration
        self.others_may_download = others_may_download
        self.others_can_execute = others_can_execute
        self.execution_mode = execution_mode
        if has_private_data_exemption is not None:
            self.has_private_data_exemption = has_private_data_exemption
        self.workflow_credential_type = workflow_credential_type
        self.credential_id = credential_id

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


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

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


        :param name: The name of this UpdateWorkflowContract.  # 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) > 255):
            raise ValueError("Invalid value for `name`, length must be less than or equal to `255`")  # 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 version_id(self):
        """Gets the version_id of this UpdateWorkflowContract.  # noqa: E501


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

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


        :param version_id: The version_id of this UpdateWorkflowContract.  # 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 make_published(self):
        """Gets the make_published of this UpdateWorkflowContract.  # noqa: E501


        :return: The make_published of this UpdateWorkflowContract.  # noqa: E501
        :rtype: bool
        """
        return self._make_published

    @make_published.setter
    def make_published(self, make_published):
        """Sets the make_published of this UpdateWorkflowContract.


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

        self._make_published = make_published

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


        :return: The owner_id of this UpdateWorkflowContract.  # noqa: E501
        :rtype: str
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this UpdateWorkflowContract.


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

        self._owner_id = owner_id

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


        :return: The worker_tag of this UpdateWorkflowContract.  # noqa: E501
        :rtype: str
        """
        return self._worker_tag

    @worker_tag.setter
    def worker_tag(self, worker_tag):
        """Sets the worker_tag of this UpdateWorkflowContract.


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

        self._worker_tag = worker_tag

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


        :return: The district_tags of this UpdateWorkflowContract.  # noqa: E501
        :rtype: list[str]
        """
        return self._district_tags

    @district_tags.setter
    def district_tags(self, district_tags):
        """Sets the district_tags of this UpdateWorkflowContract.


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

        self._district_tags = district_tags

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


        :return: The comments of this UpdateWorkflowContract.  # noqa: E501
        :rtype: str
        """
        return self._comments

    @comments.setter
    def comments(self, comments):
        """Sets the comments of this UpdateWorkflowContract.


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

        self._comments = comments

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


        :return: The is_public of this UpdateWorkflowContract.  # noqa: E501
        :rtype: bool
        """
        return self._is_public

    @is_public.setter
    def is_public(self, is_public):
        """Sets the is_public of this UpdateWorkflowContract.


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

        self._is_public = is_public

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


        :return: The is_ready_for_migration of this UpdateWorkflowContract.  # noqa: E501
        :rtype: bool
        """
        return self._is_ready_for_migration

    @is_ready_for_migration.setter
    def is_ready_for_migration(self, is_ready_for_migration):
        """Sets the is_ready_for_migration of this UpdateWorkflowContract.


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

        self._is_ready_for_migration = is_ready_for_migration

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


        :return: The others_may_download of this UpdateWorkflowContract.  # noqa: E501
        :rtype: bool
        """
        return self._others_may_download

    @others_may_download.setter
    def others_may_download(self, others_may_download):
        """Sets the others_may_download of this UpdateWorkflowContract.


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

        self._others_may_download = others_may_download

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


        :return: The others_can_execute of this UpdateWorkflowContract.  # noqa: E501
        :rtype: bool
        """
        return self._others_can_execute

    @others_can_execute.setter
    def others_can_execute(self, others_can_execute):
        """Sets the others_can_execute of this UpdateWorkflowContract.


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

        self._others_can_execute = others_can_execute

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


        :return: The execution_mode of this UpdateWorkflowContract.  # noqa: E501
        :rtype: str
        """
        return self._execution_mode

    @execution_mode.setter
    def execution_mode(self, execution_mode):
        """Sets the execution_mode of this UpdateWorkflowContract.


        :param execution_mode: The execution_mode of this UpdateWorkflowContract.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and execution_mode is None:
            raise ValueError("Invalid value for `execution_mode`, must not be `None`")  # noqa: E501
        allowed_values = ["Safe", "SemiSafe", "Standard"]  # noqa: E501
        if (self._configuration.client_side_validation and
                execution_mode not in allowed_values):
            raise ValueError(
                "Invalid value for `execution_mode` ({0}), must be one of {1}"  # noqa: E501
                .format(execution_mode, allowed_values)
            )

        self._execution_mode = execution_mode

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


        :return: The has_private_data_exemption of this UpdateWorkflowContract.  # noqa: E501
        :rtype: bool
        """
        return self._has_private_data_exemption

    @has_private_data_exemption.setter
    def has_private_data_exemption(self, has_private_data_exemption):
        """Sets the has_private_data_exemption of this UpdateWorkflowContract.


        :param has_private_data_exemption: The has_private_data_exemption of this UpdateWorkflowContract.  # noqa: E501
        :type: bool
        """

        self._has_private_data_exemption = has_private_data_exemption

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


        :return: The workflow_credential_type of this UpdateWorkflowContract.  # noqa: E501
        :rtype: str
        """
        return self._workflow_credential_type

    @workflow_credential_type.setter
    def workflow_credential_type(self, workflow_credential_type):
        """Sets the workflow_credential_type of this UpdateWorkflowContract.


        :param workflow_credential_type: The workflow_credential_type of this UpdateWorkflowContract.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and workflow_credential_type is None:
            raise ValueError("Invalid value for `workflow_credential_type`, must not be `None`")  # noqa: E501
        allowed_values = ["Default", "Required", "Specific"]  # noqa: E501
        if (self._configuration.client_side_validation and
                workflow_credential_type not in allowed_values):
            raise ValueError(
                "Invalid value for `workflow_credential_type` ({0}), must be one of {1}"  # noqa: E501
                .format(workflow_credential_type, allowed_values)
            )

        self._workflow_credential_type = workflow_credential_type

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


        :return: The credential_id of this UpdateWorkflowContract.  # noqa: E501
        :rtype: str
        """
        return self._credential_id

    @credential_id.setter
    def credential_id(self, credential_id):
        """Sets the credential_id of this UpdateWorkflowContract.


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

        self._credential_id = credential_id

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

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