# coding: utf-8

"""
    Memsource REST API

    Welcome to Memsource's API documentation. To view our legacy APIs please [visit our documentation](https://wiki.memsource.com/wiki/Memsource_API) and for more information about our new APIs, [visit our blog](https://www.memsource.com/blog/2017/10/24/introducing-rest-apis-qa-with-the-memsource-api-team/).    If you have any questions, please contact [Memsource Support](<mailto:support@memsource.com>).  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from memsource_cli.models.input_stream import InputStream  # noqa: F401,E501


class InputStreamLength(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 = {
        'stream': 'InputStream',
        'length': 'int',
        'name': 'str',
        'character_encoding': 'str',
        'extension': 'str'
    }

    attribute_map = {
        'stream': 'stream',
        'length': 'length',
        'name': 'name',
        'character_encoding': 'characterEncoding',
        'extension': 'extension'
    }

    def __init__(self, stream=None, length=None, name=None, character_encoding=None, extension=None):  # noqa: E501
        """InputStreamLength - a model defined in Swagger"""  # noqa: E501

        self._stream = None
        self._length = None
        self._name = None
        self._character_encoding = None
        self._extension = None
        self.discriminator = None

        if stream is not None:
            self.stream = stream
        if length is not None:
            self.length = length
        if name is not None:
            self.name = name
        if character_encoding is not None:
            self.character_encoding = character_encoding
        if extension is not None:
            self.extension = extension

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


        :return: The stream of this InputStreamLength.  # noqa: E501
        :rtype: InputStream
        """
        return self._stream

    @stream.setter
    def stream(self, stream):
        """Sets the stream of this InputStreamLength.


        :param stream: The stream of this InputStreamLength.  # noqa: E501
        :type: InputStream
        """

        self._stream = stream

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


        :return: The length of this InputStreamLength.  # noqa: E501
        :rtype: int
        """
        return self._length

    @length.setter
    def length(self, length):
        """Sets the length of this InputStreamLength.


        :param length: The length of this InputStreamLength.  # noqa: E501
        :type: int
        """

        self._length = length

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


        :return: The name of this InputStreamLength.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this InputStreamLength.


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

        self._name = name

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


        :return: The character_encoding of this InputStreamLength.  # noqa: E501
        :rtype: str
        """
        return self._character_encoding

    @character_encoding.setter
    def character_encoding(self, character_encoding):
        """Sets the character_encoding of this InputStreamLength.


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

        self._character_encoding = character_encoding

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


        :return: The extension of this InputStreamLength.  # noqa: E501
        :rtype: str
        """
        return self._extension

    @extension.setter
    def extension(self, extension):
        """Sets the extension of this InputStreamLength.


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

        self._extension = extension

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

        return self.__dict__ == other.__dict__

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