# coding: utf-8

"""
    Tator REST API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.6.5
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class UploadPart(object):
    """
    """

    """
    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 = {
        'e_tag': 'str',
        'part_number': 'int'
    }

    attribute_map = {
        'e_tag': 'ETag',
        'part_number': 'PartNumber'
    }

    def __init__(self, e_tag=None, part_number=None, local_vars_configuration=None):  # noqa: E501
        """UploadPart - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._e_tag = None
        self._part_number = None
        self.discriminator = None

        if e_tag is not None:
            self.e_tag = e_tag
        if part_number is not None:
            self.part_number = part_number

    @property
    def e_tag(self):
        """
        Content of ETag header returned from PUT request for an upload part. NOTE: key is case-sensitive!

        :return: The e_tag of this UploadPart. 
        :rtype: str
        """
        return self._e_tag

    @e_tag.setter
    def e_tag(self, e_tag):
        """
        Content of ETag header returned from PUT request for an upload part. NOTE: key is case-sensitive!

        :param e_tag: The e_tag of this UploadPart.
        :type: str
        """

        self._e_tag = e_tag

    @property
    def part_number(self):
        """
        Part number for the given ETag response header. NOTE: key is case-sensitive!

        :return: The part_number of this UploadPart. 
        :rtype: int
        """
        return self._part_number

    @part_number.setter
    def part_number(self, part_number):
        """
        Part number for the given ETag response header. NOTE: key is case-sensitive!

        :param part_number: The part_number of this UploadPart.
        :type: int
        """

        self._part_number = part_number

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

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