# coding: utf-8

"""
    bmq

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

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


import pprint
import re  # noqa: F401

import six

from volcenginesdkcore.configuration import Configuration


class ResetSubscriptionOffsetRequest(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 = {
        'group_id': 'str',
        'offset_type': 'str',
        'partition_id': 'int',
        'reset_by': 'str',
        'reset_value': 'int',
        'topic_id': 'str'
    }

    attribute_map = {
        'group_id': 'GroupId',
        'offset_type': 'OffsetType',
        'partition_id': 'PartitionId',
        'reset_by': 'ResetBy',
        'reset_value': 'ResetValue',
        'topic_id': 'TopicId'
    }

    def __init__(self, group_id=None, offset_type=None, partition_id=None, reset_by=None, reset_value=None, topic_id=None, _configuration=None):  # noqa: E501
        """ResetSubscriptionOffsetRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._group_id = None
        self._offset_type = None
        self._partition_id = None
        self._reset_by = None
        self._reset_value = None
        self._topic_id = None
        self.discriminator = None

        self.group_id = group_id
        if offset_type is not None:
            self.offset_type = offset_type
        if partition_id is not None:
            self.partition_id = partition_id
        self.reset_by = reset_by
        self.reset_value = reset_value
        self.topic_id = topic_id

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


        :return: The group_id of this ResetSubscriptionOffsetRequest.  # noqa: E501
        :rtype: str
        """
        return self._group_id

    @group_id.setter
    def group_id(self, group_id):
        """Sets the group_id of this ResetSubscriptionOffsetRequest.


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

        self._group_id = group_id

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


        :return: The offset_type of this ResetSubscriptionOffsetRequest.  # noqa: E501
        :rtype: str
        """
        return self._offset_type

    @offset_type.setter
    def offset_type(self, offset_type):
        """Sets the offset_type of this ResetSubscriptionOffsetRequest.


        :param offset_type: The offset_type of this ResetSubscriptionOffsetRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["EARLIEST", "CURRENT", "LATEST"]  # noqa: E501
        if (self._configuration.client_side_validation and
                offset_type not in allowed_values):
            raise ValueError(
                "Invalid value for `offset_type` ({0}), must be one of {1}"  # noqa: E501
                .format(offset_type, allowed_values)
            )

        self._offset_type = offset_type

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


        :return: The partition_id of this ResetSubscriptionOffsetRequest.  # noqa: E501
        :rtype: int
        """
        return self._partition_id

    @partition_id.setter
    def partition_id(self, partition_id):
        """Sets the partition_id of this ResetSubscriptionOffsetRequest.


        :param partition_id: The partition_id of this ResetSubscriptionOffsetRequest.  # noqa: E501
        :type: int
        """

        self._partition_id = partition_id

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


        :return: The reset_by of this ResetSubscriptionOffsetRequest.  # noqa: E501
        :rtype: str
        """
        return self._reset_by

    @reset_by.setter
    def reset_by(self, reset_by):
        """Sets the reset_by of this ResetSubscriptionOffsetRequest.


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

        self._reset_by = reset_by

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


        :return: The reset_value of this ResetSubscriptionOffsetRequest.  # noqa: E501
        :rtype: int
        """
        return self._reset_value

    @reset_value.setter
    def reset_value(self, reset_value):
        """Sets the reset_value of this ResetSubscriptionOffsetRequest.


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

        self._reset_value = reset_value

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


        :return: The topic_id of this ResetSubscriptionOffsetRequest.  # noqa: E501
        :rtype: str
        """
        return self._topic_id

    @topic_id.setter
    def topic_id(self, topic_id):
        """Sets the topic_id of this ResetSubscriptionOffsetRequest.


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

        self._topic_id = topic_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(ResetSubscriptionOffsetRequest, 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, ResetSubscriptionOffsetRequest):
            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, ResetSubscriptionOffsetRequest):
            return True

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