# coding: utf-8

"""
    filenas

    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 CreateReservedCapacityRequest(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 = {
        'duration': 'int',
        'file_system_type': 'str',
        'reserved_capacity': 'int',
        'reserved_capacity_name': 'str',
        'storage_type': 'str',
        'zone_id': 'str'
    }

    attribute_map = {
        'duration': 'Duration',
        'file_system_type': 'FileSystemType',
        'reserved_capacity': 'ReservedCapacity',
        'reserved_capacity_name': 'ReservedCapacityName',
        'storage_type': 'StorageType',
        'zone_id': 'ZoneId'
    }

    def __init__(self, duration=None, file_system_type=None, reserved_capacity=None, reserved_capacity_name=None, storage_type=None, zone_id=None, _configuration=None):  # noqa: E501
        """CreateReservedCapacityRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._duration = None
        self._file_system_type = None
        self._reserved_capacity = None
        self._reserved_capacity_name = None
        self._storage_type = None
        self._zone_id = None
        self.discriminator = None

        self.duration = duration
        self.file_system_type = file_system_type
        self.reserved_capacity = reserved_capacity
        self.reserved_capacity_name = reserved_capacity_name
        if storage_type is not None:
            self.storage_type = storage_type
        self.zone_id = zone_id

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


        :return: The duration of this CreateReservedCapacityRequest.  # noqa: E501
        :rtype: int
        """
        return self._duration

    @duration.setter
    def duration(self, duration):
        """Sets the duration of this CreateReservedCapacityRequest.


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

        self._duration = duration

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


        :return: The file_system_type of this CreateReservedCapacityRequest.  # noqa: E501
        :rtype: str
        """
        return self._file_system_type

    @file_system_type.setter
    def file_system_type(self, file_system_type):
        """Sets the file_system_type of this CreateReservedCapacityRequest.


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

        self._file_system_type = file_system_type

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


        :return: The reserved_capacity of this CreateReservedCapacityRequest.  # noqa: E501
        :rtype: int
        """
        return self._reserved_capacity

    @reserved_capacity.setter
    def reserved_capacity(self, reserved_capacity):
        """Sets the reserved_capacity of this CreateReservedCapacityRequest.


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

        self._reserved_capacity = reserved_capacity

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


        :return: The reserved_capacity_name of this CreateReservedCapacityRequest.  # noqa: E501
        :rtype: str
        """
        return self._reserved_capacity_name

    @reserved_capacity_name.setter
    def reserved_capacity_name(self, reserved_capacity_name):
        """Sets the reserved_capacity_name of this CreateReservedCapacityRequest.


        :param reserved_capacity_name: The reserved_capacity_name of this CreateReservedCapacityRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and reserved_capacity_name is None:
            raise ValueError("Invalid value for `reserved_capacity_name`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                reserved_capacity_name is not None and len(reserved_capacity_name) > 128):
            raise ValueError("Invalid value for `reserved_capacity_name`, length must be less than or equal to `128`")  # noqa: E501
        if (self._configuration.client_side_validation and
                reserved_capacity_name is not None and len(reserved_capacity_name) < 1):
            raise ValueError("Invalid value for `reserved_capacity_name`, length must be greater than or equal to `1`")  # noqa: E501

        self._reserved_capacity_name = reserved_capacity_name

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


        :return: The storage_type of this CreateReservedCapacityRequest.  # noqa: E501
        :rtype: str
        """
        return self._storage_type

    @storage_type.setter
    def storage_type(self, storage_type):
        """Sets the storage_type of this CreateReservedCapacityRequest.


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

        self._storage_type = storage_type

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


        :return: The zone_id of this CreateReservedCapacityRequest.  # noqa: E501
        :rtype: str
        """
        return self._zone_id

    @zone_id.setter
    def zone_id(self, zone_id):
        """Sets the zone_id of this CreateReservedCapacityRequest.


        :param zone_id: The zone_id of this CreateReservedCapacityRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and zone_id is None:
            raise ValueError("Invalid value for `zone_id`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                zone_id is not None and len(zone_id) > 128):
            raise ValueError("Invalid value for `zone_id`, length must be less than or equal to `128`")  # noqa: E501

        self._zone_id = zone_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(CreateReservedCapacityRequest, 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, CreateReservedCapacityRequest):
            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, CreateReservedCapacityRequest):
            return True

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