# coding: utf-8

"""
    Cherwell REST API

    Unofficial Python Cherwell REST API library.  # noqa: E501

    The version of the OpenAPI document: 9.3.2
    Contact: See AUTHORS.
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from pycherwell.configuration import Configuration


class Attachment(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'attached_bus_ob_id': 'str',
        'attached_bus_ob_rec_id': 'str',
        'attachment_file_id': 'str',
        'attachment_file_name': 'str',
        'attachment_file_type': 'str',
        'attachment_id': 'str',
        'attachment_type': 'str',
        'bus_ob_id': 'str',
        'bus_ob_rec_id': 'str',
        'comment': 'str',
        'created': 'datetime',
        'display_text': 'str',
        'links': 'list[Link]',
        'owner': 'str',
        'scope': 'str',
        'scope_owner': 'str',
        'type': 'str'
    }

    attribute_map = {
        'attached_bus_ob_id': 'attachedBusObId',
        'attached_bus_ob_rec_id': 'attachedBusObRecId',
        'attachment_file_id': 'attachmentFileId',
        'attachment_file_name': 'attachmentFileName',
        'attachment_file_type': 'attachmentFileType',
        'attachment_id': 'attachmentId',
        'attachment_type': 'attachmentType',
        'bus_ob_id': 'busObId',
        'bus_ob_rec_id': 'busObRecId',
        'comment': 'comment',
        'created': 'created',
        'display_text': 'displayText',
        'links': 'links',
        'owner': 'owner',
        'scope': 'scope',
        'scope_owner': 'scopeOwner',
        'type': 'type'
    }

    def __init__(self, attached_bus_ob_id=None, attached_bus_ob_rec_id=None, attachment_file_id=None, attachment_file_name=None, attachment_file_type=None, attachment_id=None, attachment_type=None, bus_ob_id=None, bus_ob_rec_id=None, comment=None, created=None, display_text=None, links=None, owner=None, scope=None, scope_owner=None, type=None, local_vars_configuration=None):  # noqa: E501
        """Attachment - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._attached_bus_ob_id = None
        self._attached_bus_ob_rec_id = None
        self._attachment_file_id = None
        self._attachment_file_name = None
        self._attachment_file_type = None
        self._attachment_id = None
        self._attachment_type = None
        self._bus_ob_id = None
        self._bus_ob_rec_id = None
        self._comment = None
        self._created = None
        self._display_text = None
        self._links = None
        self._owner = None
        self._scope = None
        self._scope_owner = None
        self._type = None
        self.discriminator = None

        if attached_bus_ob_id is not None:
            self.attached_bus_ob_id = attached_bus_ob_id
        if attached_bus_ob_rec_id is not None:
            self.attached_bus_ob_rec_id = attached_bus_ob_rec_id
        if attachment_file_id is not None:
            self.attachment_file_id = attachment_file_id
        if attachment_file_name is not None:
            self.attachment_file_name = attachment_file_name
        if attachment_file_type is not None:
            self.attachment_file_type = attachment_file_type
        if attachment_id is not None:
            self.attachment_id = attachment_id
        if attachment_type is not None:
            self.attachment_type = attachment_type
        if bus_ob_id is not None:
            self.bus_ob_id = bus_ob_id
        if bus_ob_rec_id is not None:
            self.bus_ob_rec_id = bus_ob_rec_id
        if comment is not None:
            self.comment = comment
        if created is not None:
            self.created = created
        if display_text is not None:
            self.display_text = display_text
        if links is not None:
            self.links = links
        if owner is not None:
            self.owner = owner
        if scope is not None:
            self.scope = scope
        if scope_owner is not None:
            self.scope_owner = scope_owner
        if type is not None:
            self.type = type

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


        :return: The attached_bus_ob_id of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._attached_bus_ob_id

    @attached_bus_ob_id.setter
    def attached_bus_ob_id(self, attached_bus_ob_id):
        """Sets the attached_bus_ob_id of this Attachment.


        :param attached_bus_ob_id: The attached_bus_ob_id of this Attachment.  # noqa: E501
        :type: str
        """

        self._attached_bus_ob_id = attached_bus_ob_id

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


        :return: The attached_bus_ob_rec_id of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._attached_bus_ob_rec_id

    @attached_bus_ob_rec_id.setter
    def attached_bus_ob_rec_id(self, attached_bus_ob_rec_id):
        """Sets the attached_bus_ob_rec_id of this Attachment.


        :param attached_bus_ob_rec_id: The attached_bus_ob_rec_id of this Attachment.  # noqa: E501
        :type: str
        """

        self._attached_bus_ob_rec_id = attached_bus_ob_rec_id

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


        :return: The attachment_file_id of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._attachment_file_id

    @attachment_file_id.setter
    def attachment_file_id(self, attachment_file_id):
        """Sets the attachment_file_id of this Attachment.


        :param attachment_file_id: The attachment_file_id of this Attachment.  # noqa: E501
        :type: str
        """

        self._attachment_file_id = attachment_file_id

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


        :return: The attachment_file_name of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._attachment_file_name

    @attachment_file_name.setter
    def attachment_file_name(self, attachment_file_name):
        """Sets the attachment_file_name of this Attachment.


        :param attachment_file_name: The attachment_file_name of this Attachment.  # noqa: E501
        :type: str
        """

        self._attachment_file_name = attachment_file_name

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


        :return: The attachment_file_type of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._attachment_file_type

    @attachment_file_type.setter
    def attachment_file_type(self, attachment_file_type):
        """Sets the attachment_file_type of this Attachment.


        :param attachment_file_type: The attachment_file_type of this Attachment.  # noqa: E501
        :type: str
        """

        self._attachment_file_type = attachment_file_type

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


        :return: The attachment_id of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._attachment_id

    @attachment_id.setter
    def attachment_id(self, attachment_id):
        """Sets the attachment_id of this Attachment.


        :param attachment_id: The attachment_id of this Attachment.  # noqa: E501
        :type: str
        """

        self._attachment_id = attachment_id

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


        :return: The attachment_type of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._attachment_type

    @attachment_type.setter
    def attachment_type(self, attachment_type):
        """Sets the attachment_type of this Attachment.


        :param attachment_type: The attachment_type of this Attachment.  # noqa: E501
        :type: str
        """
        allowed_values = ["Imported", "Linked", "URL"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and attachment_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `attachment_type` ({0}), must be one of {1}"  # noqa: E501
                .format(attachment_type, allowed_values)
            )

        self._attachment_type = attachment_type

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


        :return: The bus_ob_id of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_id

    @bus_ob_id.setter
    def bus_ob_id(self, bus_ob_id):
        """Sets the bus_ob_id of this Attachment.


        :param bus_ob_id: The bus_ob_id of this Attachment.  # noqa: E501
        :type: str
        """

        self._bus_ob_id = bus_ob_id

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


        :return: The bus_ob_rec_id of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_rec_id

    @bus_ob_rec_id.setter
    def bus_ob_rec_id(self, bus_ob_rec_id):
        """Sets the bus_ob_rec_id of this Attachment.


        :param bus_ob_rec_id: The bus_ob_rec_id of this Attachment.  # noqa: E501
        :type: str
        """

        self._bus_ob_rec_id = bus_ob_rec_id

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


        :return: The comment of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._comment

    @comment.setter
    def comment(self, comment):
        """Sets the comment of this Attachment.


        :param comment: The comment of this Attachment.  # noqa: E501
        :type: str
        """

        self._comment = comment

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


        :return: The created of this Attachment.  # noqa: E501
        :rtype: datetime
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this Attachment.


        :param created: The created of this Attachment.  # noqa: E501
        :type: datetime
        """

        self._created = created

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


        :return: The display_text of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._display_text

    @display_text.setter
    def display_text(self, display_text):
        """Sets the display_text of this Attachment.


        :param display_text: The display_text of this Attachment.  # noqa: E501
        :type: str
        """

        self._display_text = display_text

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


        :return: The links of this Attachment.  # noqa: E501
        :rtype: list[Link]
        """
        return self._links

    @links.setter
    def links(self, links):
        """Sets the links of this Attachment.


        :param links: The links of this Attachment.  # noqa: E501
        :type: list[Link]
        """

        self._links = links

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


        :return: The owner of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._owner

    @owner.setter
    def owner(self, owner):
        """Sets the owner of this Attachment.


        :param owner: The owner of this Attachment.  # noqa: E501
        :type: str
        """

        self._owner = owner

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


        :return: The scope of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._scope

    @scope.setter
    def scope(self, scope):
        """Sets the scope of this Attachment.


        :param scope: The scope of this Attachment.  # noqa: E501
        :type: str
        """
        allowed_values = ["None", "Global", "Team", "Persona", "SecurityGroup", "User", "UserInPersona", "OtherUsers", "Core", "BusIntel", "FromResource", "Site", "Custom"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and scope not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `scope` ({0}), must be one of {1}"  # noqa: E501
                .format(scope, allowed_values)
            )

        self._scope = scope

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


        :return: The scope_owner of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._scope_owner

    @scope_owner.setter
    def scope_owner(self, scope_owner):
        """Sets the scope_owner of this Attachment.


        :param scope_owner: The scope_owner of this Attachment.  # noqa: E501
        :type: str
        """

        self._scope_owner = scope_owner

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


        :return: The type of this Attachment.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this Attachment.


        :param type: The type of this Attachment.  # noqa: E501
        :type: str
        """
        allowed_values = ["None", "File", "FileManagerFile", "BusOb", "History", "Other"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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

        for attr, _ in six.iteritems(self.openapi_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

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

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