# 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 AttachmentsRequest(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 = {
        'attachment_id': 'str',
        'attachment_types': 'list[str]',
        'bus_ob_id': 'str',
        'bus_ob_name': 'str',
        'bus_ob_public_id': 'str',
        'bus_ob_rec_id': 'str',
        'include_links': 'bool',
        'types': 'list[str]'
    }

    attribute_map = {
        'attachment_id': 'attachmentId',
        'attachment_types': 'attachmentTypes',
        'bus_ob_id': 'busObId',
        'bus_ob_name': 'busObName',
        'bus_ob_public_id': 'busObPublicId',
        'bus_ob_rec_id': 'busObRecId',
        'include_links': 'includeLinks',
        'types': 'types'
    }

    def __init__(self, attachment_id=None, attachment_types=None, bus_ob_id=None, bus_ob_name=None, bus_ob_public_id=None, bus_ob_rec_id=None, include_links=None, types=None, local_vars_configuration=None):  # noqa: E501
        """AttachmentsRequest - 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._attachment_id = None
        self._attachment_types = None
        self._bus_ob_id = None
        self._bus_ob_name = None
        self._bus_ob_public_id = None
        self._bus_ob_rec_id = None
        self._include_links = None
        self._types = None
        self.discriminator = None

        if attachment_id is not None:
            self.attachment_id = attachment_id
        if attachment_types is not None:
            self.attachment_types = attachment_types
        if bus_ob_id is not None:
            self.bus_ob_id = bus_ob_id
        if bus_ob_name is not None:
            self.bus_ob_name = bus_ob_name
        if bus_ob_public_id is not None:
            self.bus_ob_public_id = bus_ob_public_id
        if bus_ob_rec_id is not None:
            self.bus_ob_rec_id = bus_ob_rec_id
        if include_links is not None:
            self.include_links = include_links
        if types is not None:
            self.types = types

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


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

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


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

        self._attachment_id = attachment_id

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


        :return: The attachment_types of this AttachmentsRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._attachment_types

    @attachment_types.setter
    def attachment_types(self, attachment_types):
        """Sets the attachment_types of this AttachmentsRequest.


        :param attachment_types: The attachment_types of this AttachmentsRequest.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["Imported", "Linked", "URL"]  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                not set(attachment_types).issubset(set(allowed_values))):  # noqa: E501
            raise ValueError(
                "Invalid values for `attachment_types` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(attachment_types) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._attachment_types = attachment_types

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


        :return: The bus_ob_id of this AttachmentsRequest.  # 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 AttachmentsRequest.


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

        self._bus_ob_id = bus_ob_id

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


        :return: The bus_ob_name of this AttachmentsRequest.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_name

    @bus_ob_name.setter
    def bus_ob_name(self, bus_ob_name):
        """Sets the bus_ob_name of this AttachmentsRequest.


        :param bus_ob_name: The bus_ob_name of this AttachmentsRequest.  # noqa: E501
        :type: str
        """

        self._bus_ob_name = bus_ob_name

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


        :return: The bus_ob_public_id of this AttachmentsRequest.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_public_id

    @bus_ob_public_id.setter
    def bus_ob_public_id(self, bus_ob_public_id):
        """Sets the bus_ob_public_id of this AttachmentsRequest.


        :param bus_ob_public_id: The bus_ob_public_id of this AttachmentsRequest.  # noqa: E501
        :type: str
        """

        self._bus_ob_public_id = bus_ob_public_id

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


        :return: The bus_ob_rec_id of this AttachmentsRequest.  # 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 AttachmentsRequest.


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

        self._bus_ob_rec_id = bus_ob_rec_id

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


        :return: The include_links of this AttachmentsRequest.  # noqa: E501
        :rtype: bool
        """
        return self._include_links

    @include_links.setter
    def include_links(self, include_links):
        """Sets the include_links of this AttachmentsRequest.


        :param include_links: The include_links of this AttachmentsRequest.  # noqa: E501
        :type: bool
        """

        self._include_links = include_links

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


        :return: The types of this AttachmentsRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._types

    @types.setter
    def types(self, types):
        """Sets the types of this AttachmentsRequest.


        :param types: The types of this AttachmentsRequest.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["None", "File", "FileManagerFile", "BusOb", "History", "Other"]  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                not set(types).issubset(set(allowed_values))):  # noqa: E501
            raise ValueError(
                "Invalid values for `types` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(types) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._types = types

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

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