# coding: utf-8

"""
    Task Execution Service

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

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


import pprint
import re  # noqa: F401

import six

from libica.openapi.libtes.configuration import Configuration


class InputStreamSettings(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 = {
        'access_pattern': 'str',
        'cache_size_gb': 'int',
        'block_size_mb': 'float',
        'prefetch_blocks': 'int'
    }

    attribute_map = {
        'access_pattern': 'accessPattern',
        'cache_size_gb': 'cacheSizeGB',
        'block_size_mb': 'blockSizeMB',
        'prefetch_blocks': 'prefetchBlocks'
    }

    def __init__(self, access_pattern='sequential', cache_size_gb=50, block_size_mb=32.0, prefetch_blocks=32, local_vars_configuration=None):  # noqa: E501
        """InputStreamSettings - 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._access_pattern = None
        self._cache_size_gb = None
        self._block_size_mb = None
        self._prefetch_blocks = None
        self.discriminator = None

        if access_pattern is not None:
            self.access_pattern = access_pattern
        if cache_size_gb is not None:
            self.cache_size_gb = cache_size_gb
        if block_size_mb is not None:
            self.block_size_mb = block_size_mb
        if prefetch_blocks is not None:
            self.prefetch_blocks = prefetch_blocks

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


        :return: The access_pattern of this InputStreamSettings.  # noqa: E501
        :rtype: str
        """
        return self._access_pattern

    @access_pattern.setter
    def access_pattern(self, access_pattern):
        """Sets the access_pattern of this InputStreamSettings.


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

        self._access_pattern = access_pattern

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


        :return: The cache_size_gb of this InputStreamSettings.  # noqa: E501
        :rtype: int
        """
        return self._cache_size_gb

    @cache_size_gb.setter
    def cache_size_gb(self, cache_size_gb):
        """Sets the cache_size_gb of this InputStreamSettings.


        :param cache_size_gb: The cache_size_gb of this InputStreamSettings.  # noqa: E501
        :type: int
        """
        if (self.local_vars_configuration.client_side_validation and
                cache_size_gb is not None and cache_size_gb > 10000):  # noqa: E501
            raise ValueError("Invalid value for `cache_size_gb`, must be a value less than or equal to `10000`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                cache_size_gb is not None and cache_size_gb < 50):  # noqa: E501
            raise ValueError("Invalid value for `cache_size_gb`, must be a value greater than or equal to `50`")  # noqa: E501

        self._cache_size_gb = cache_size_gb

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


        :return: The block_size_mb of this InputStreamSettings.  # noqa: E501
        :rtype: float
        """
        return self._block_size_mb

    @block_size_mb.setter
    def block_size_mb(self, block_size_mb):
        """Sets the block_size_mb of this InputStreamSettings.


        :param block_size_mb: The block_size_mb of this InputStreamSettings.  # noqa: E501
        :type: float
        """
        if (self.local_vars_configuration.client_side_validation and
                block_size_mb is not None and block_size_mb > 1024):  # noqa: E501
            raise ValueError("Invalid value for `block_size_mb`, must be a value less than or equal to `1024`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                block_size_mb is not None and block_size_mb < 0):  # noqa: E501
            raise ValueError("Invalid value for `block_size_mb`, must be a value greater than or equal to `0`")  # noqa: E501

        self._block_size_mb = block_size_mb

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


        :return: The prefetch_blocks of this InputStreamSettings.  # noqa: E501
        :rtype: int
        """
        return self._prefetch_blocks

    @prefetch_blocks.setter
    def prefetch_blocks(self, prefetch_blocks):
        """Sets the prefetch_blocks of this InputStreamSettings.


        :param prefetch_blocks: The prefetch_blocks of this InputStreamSettings.  # noqa: E501
        :type: int
        """
        if (self.local_vars_configuration.client_side_validation and
                prefetch_blocks is not None and prefetch_blocks > 64):  # noqa: E501
            raise ValueError("Invalid value for `prefetch_blocks`, must be a value less than or equal to `64`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                prefetch_blocks is not None and prefetch_blocks < 0):  # noqa: E501
            raise ValueError("Invalid value for `prefetch_blocks`, must be a value greater than or equal to `0`")  # noqa: E501

        self._prefetch_blocks = prefetch_blocks

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

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