# coding: utf-8

"""
    Onshape REST API

    The Onshape REST API consumed by all clients.  # noqa: E501

    OpenAPI spec version: 1.96
    Contact: api-support@onshape.zendesk.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class BTDocumentSearchParams(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 = {
        'type': 'str',
        'raw_query': 'str',
        'offset': 'int',
        'limit': 'int',
        'owner_id': 'str',
        'parent_id': 'str',
        'document_filter': 'int',
        'sort_column': 'str',
        'sort_order': 'str',
        'found_in': 'str',
        'when': 'str'
    }

    attribute_map = {
        'type': 'type',
        'raw_query': 'rawQuery',
        'offset': 'offset',
        'limit': 'limit',
        'owner_id': 'ownerId',
        'parent_id': 'parentId',
        'document_filter': 'documentFilter',
        'sort_column': 'sortColumn',
        'sort_order': 'sortOrder',
        'found_in': 'foundIn',
        'when': 'when'
    }

    def __init__(self, type=None, raw_query=None, offset=None, limit=None, owner_id=None, parent_id=None, document_filter=None, sort_column=None, sort_order=None, found_in=None, when=None):  # noqa: E501
        """BTDocumentSearchParams - a model defined in OpenAPI"""  # noqa: E501

        self._type = None
        self._raw_query = None
        self._offset = None
        self._limit = None
        self._owner_id = None
        self._parent_id = None
        self._document_filter = None
        self._sort_column = None
        self._sort_order = None
        self._found_in = None
        self._when = None
        self.discriminator = None

        if type is not None:
            self.type = type
        if raw_query is not None:
            self.raw_query = raw_query
        if offset is not None:
            self.offset = offset
        if limit is not None:
            self.limit = limit
        if owner_id is not None:
            self.owner_id = owner_id
        if parent_id is not None:
            self.parent_id = parent_id
        if document_filter is not None:
            self.document_filter = document_filter
        if sort_column is not None:
            self.sort_column = sort_column
        if sort_order is not None:
            self.sort_order = sort_order
        if found_in is not None:
            self.found_in = found_in
        if when is not None:
            self.when = when

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


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

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


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

        self._type = type

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


        :return: The raw_query of this BTDocumentSearchParams.  # noqa: E501
        :rtype: str
        """
        return self._raw_query

    @raw_query.setter
    def raw_query(self, raw_query):
        """Sets the raw_query of this BTDocumentSearchParams.


        :param raw_query: The raw_query of this BTDocumentSearchParams.  # noqa: E501
        :type: str
        """

        self._raw_query = raw_query

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


        :return: The offset of this BTDocumentSearchParams.  # noqa: E501
        :rtype: int
        """
        return self._offset

    @offset.setter
    def offset(self, offset):
        """Sets the offset of this BTDocumentSearchParams.


        :param offset: The offset of this BTDocumentSearchParams.  # noqa: E501
        :type: int
        """

        self._offset = offset

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


        :return: The limit of this BTDocumentSearchParams.  # noqa: E501
        :rtype: int
        """
        return self._limit

    @limit.setter
    def limit(self, limit):
        """Sets the limit of this BTDocumentSearchParams.


        :param limit: The limit of this BTDocumentSearchParams.  # noqa: E501
        :type: int
        """

        self._limit = limit

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


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

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


        :param owner_id: The owner_id of this BTDocumentSearchParams.  # noqa: E501
        :type: str
        """

        self._owner_id = owner_id

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


        :return: The parent_id of this BTDocumentSearchParams.  # noqa: E501
        :rtype: str
        """
        return self._parent_id

    @parent_id.setter
    def parent_id(self, parent_id):
        """Sets the parent_id of this BTDocumentSearchParams.


        :param parent_id: The parent_id of this BTDocumentSearchParams.  # noqa: E501
        :type: str
        """

        self._parent_id = parent_id

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


        :return: The document_filter of this BTDocumentSearchParams.  # noqa: E501
        :rtype: int
        """
        return self._document_filter

    @document_filter.setter
    def document_filter(self, document_filter):
        """Sets the document_filter of this BTDocumentSearchParams.


        :param document_filter: The document_filter of this BTDocumentSearchParams.  # noqa: E501
        :type: int
        """

        self._document_filter = document_filter

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


        :return: The sort_column of this BTDocumentSearchParams.  # noqa: E501
        :rtype: str
        """
        return self._sort_column

    @sort_column.setter
    def sort_column(self, sort_column):
        """Sets the sort_column of this BTDocumentSearchParams.


        :param sort_column: The sort_column of this BTDocumentSearchParams.  # noqa: E501
        :type: str
        """

        self._sort_column = sort_column

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


        :return: The sort_order of this BTDocumentSearchParams.  # noqa: E501
        :rtype: str
        """
        return self._sort_order

    @sort_order.setter
    def sort_order(self, sort_order):
        """Sets the sort_order of this BTDocumentSearchParams.


        :param sort_order: The sort_order of this BTDocumentSearchParams.  # noqa: E501
        :type: str
        """

        self._sort_order = sort_order

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


        :return: The found_in of this BTDocumentSearchParams.  # noqa: E501
        :rtype: str
        """
        return self._found_in

    @found_in.setter
    def found_in(self, found_in):
        """Sets the found_in of this BTDocumentSearchParams.


        :param found_in: The found_in of this BTDocumentSearchParams.  # noqa: E501
        :type: str
        """
        allowed_values = ["ALL", "WORKSPACES", "VERSIONS"]  # noqa: E501
        if found_in not in allowed_values:
            raise ValueError(
                "Invalid value for `found_in` ({0}), must be one of {1}"  # noqa: E501
                .format(found_in, allowed_values)
            )

        self._found_in = found_in

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


        :return: The when of this BTDocumentSearchParams.  # noqa: E501
        :rtype: str
        """
        return self._when

    @when.setter
    def when(self, when):
        """Sets the when of this BTDocumentSearchParams.


        :param when: The when of this BTDocumentSearchParams.  # noqa: E501
        :type: str
        """
        allowed_values = ["ALL", "LATEST", "LATEST_PER_HIT"]  # noqa: E501
        if when not in allowed_values:
            raise ValueError(
                "Invalid value for `when` ({0}), must be one of {1}"  # noqa: E501
                .format(when, allowed_values)
            )

        self._when = when

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

        return self.__dict__ == other.__dict__

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