# coding: utf-8

"""
ThinVolumeCreateRequest.py

 The Clear BSD License

 Copyright (c) – 2016, NetApp, Inc. All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

 * Neither the name of NetApp, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

 NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

from pprint import pformat
from six import iteritems


class ThinVolumeCreateRequest(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        ThinVolumeCreateRequest - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'pool_id': 'str',  # (required parameter)
            'name': 'str',  # (required parameter)
            'size_unit': 'str',  # (required parameter)
            'virtual_size': 'int',  # (required parameter)
            'repository_size': 'int',  # (required parameter)
            'maximum_repository_size': 'int',  # (required parameter)
            'owning_controller_id': 'str',  
            'growth_alert_threshold': 'int',  
            'create_default_mapping': 'bool',  
            'expansion_policy': 'str',  
            'cache_read_ahead': 'bool',  
            'data_assurance_enabled': 'bool',  
            'meta_tags': 'list[VolumeMetadataItem]'
        }

        self.attribute_map = {
            'pool_id': 'poolId',  # (required parameter)
            'name': 'name',  # (required parameter)
            'size_unit': 'sizeUnit',  # (required parameter)
            'virtual_size': 'virtualSize',  # (required parameter)
            'repository_size': 'repositorySize',  # (required parameter)
            'maximum_repository_size': 'maximumRepositorySize',  # (required parameter)
            'owning_controller_id': 'owningControllerId',  
            'growth_alert_threshold': 'growthAlertThreshold',  
            'create_default_mapping': 'createDefaultMapping',  
            'expansion_policy': 'expansionPolicy',  
            'cache_read_ahead': 'cacheReadAhead',  
            'data_assurance_enabled': 'dataAssuranceEnabled',  
            'meta_tags': 'metaTags'
        }

        self._pool_id = None
        self._name = None
        self._size_unit = None
        self._virtual_size = None
        self._repository_size = None
        self._maximum_repository_size = None
        self._owning_controller_id = None
        self._growth_alert_threshold = None
        self._create_default_mapping = None
        self._expansion_policy = None
        self._cache_read_ahead = None
        self._data_assurance_enabled = None
        self._meta_tags = None

    @property
    def pool_id(self):
        """
        Gets the pool_id of this ThinVolumeCreateRequest.
        The identifier of the storage pool from which the volume will be allocated.

        :return: The pool_id of this ThinVolumeCreateRequest.
        :rtype: str
        :required/optional: required
        """
        return self._pool_id

    @pool_id.setter
    def pool_id(self, pool_id):
        """
        Sets the pool_id of this ThinVolumeCreateRequest.
        The identifier of the storage pool from which the volume will be allocated.

        :param pool_id: The pool_id of this ThinVolumeCreateRequest.
        :type: str
        """
        self._pool_id = pool_id

    @property
    def name(self):
        """
        Gets the name of this ThinVolumeCreateRequest.
        The user-label to assign to the new volume.

        :return: The name of this ThinVolumeCreateRequest.
        :rtype: str
        :required/optional: required
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this ThinVolumeCreateRequest.
        The user-label to assign to the new volume.

        :param name: The name of this ThinVolumeCreateRequest.
        :type: str
        """
        self._name = name

    @property
    def size_unit(self):
        """
        Gets the size_unit of this ThinVolumeCreateRequest.
        Unit for \"size\"

        :return: The size_unit of this ThinVolumeCreateRequest.
        :rtype: str
        :required/optional: required
        """
        return self._size_unit

    @size_unit.setter
    def size_unit(self, size_unit):
        """
        Sets the size_unit of this ThinVolumeCreateRequest.
        Unit for \"size\"

        :param size_unit: The size_unit of this ThinVolumeCreateRequest.
        :type: str
        """
        allowed_values = ["bytes", "b", "kb", "mb", "gb", "tb", "pb", "eb", "zb", "yb"]
        if size_unit not in allowed_values:
            raise ValueError(
                "Invalid value for `size_unit`, must be one of {0}"
                .format(allowed_values)
            )
        self._size_unit = size_unit

    @property
    def virtual_size(self):
        """
        Gets the virtual_size of this ThinVolumeCreateRequest.
        Initial virtual capacity of the volume in units (See sizeUnit).

        :return: The virtual_size of this ThinVolumeCreateRequest.
        :rtype: int
        :required/optional: required
        """
        return self._virtual_size

    @virtual_size.setter
    def virtual_size(self, virtual_size):
        """
        Sets the virtual_size of this ThinVolumeCreateRequest.
        Initial virtual capacity of the volume in units (See sizeUnit).

        :param virtual_size: The virtual_size of this ThinVolumeCreateRequest.
        :type: int
        """
        self._virtual_size = virtual_size

    @property
    def repository_size(self):
        """
        Gets the repository_size of this ThinVolumeCreateRequest.
        Number of units (See sizeUnit) to make the repository volume, which is the backing for the thin volume. Must be between 4GB & 256GB. This value must align along a 4GB boundary. If it does not, it will be automatically adjusted to the next 4GB value.

        :return: The repository_size of this ThinVolumeCreateRequest.
        :rtype: int
        :required/optional: required
        """
        return self._repository_size

    @repository_size.setter
    def repository_size(self, repository_size):
        """
        Sets the repository_size of this ThinVolumeCreateRequest.
        Number of units (See sizeUnit) to make the repository volume, which is the backing for the thin volume. Must be between 4GB & 256GB. This value must align along a 4GB boundary. If it does not, it will be automatically adjusted to the next 4GB value.

        :param repository_size: The repository_size of this ThinVolumeCreateRequest.
        :type: int
        """
        self._repository_size = repository_size

    @property
    def maximum_repository_size(self):
        """
        Gets the maximum_repository_size of this ThinVolumeCreateRequest.
        Maximum size (in sizeUnits) to which the thin volume repository can grow.

        :return: The maximum_repository_size of this ThinVolumeCreateRequest.
        :rtype: int
        :required/optional: required
        """
        return self._maximum_repository_size

    @maximum_repository_size.setter
    def maximum_repository_size(self, maximum_repository_size):
        """
        Sets the maximum_repository_size of this ThinVolumeCreateRequest.
        Maximum size (in sizeUnits) to which the thin volume repository can grow.

        :param maximum_repository_size: The maximum_repository_size of this ThinVolumeCreateRequest.
        :type: int
        """
        self._maximum_repository_size = maximum_repository_size

    @property
    def owning_controller_id(self):
        """
        Gets the owning_controller_id of this ThinVolumeCreateRequest.
        Set the preferred owning controller. By default this field will alternate between available controllers

        :return: The owning_controller_id of this ThinVolumeCreateRequest.
        :rtype: str
        :required/optional: optional
        """
        return self._owning_controller_id

    @owning_controller_id.setter
    def owning_controller_id(self, owning_controller_id):
        """
        Sets the owning_controller_id of this ThinVolumeCreateRequest.
        Set the preferred owning controller. By default this field will alternate between available controllers

        :param owning_controller_id: The owning_controller_id of this ThinVolumeCreateRequest.
        :type: str
        """
        self._owning_controller_id = owning_controller_id

    @property
    def growth_alert_threshold(self):
        """
        Gets the growth_alert_threshold of this ThinVolumeCreateRequest.
        The repository utilization warning threshold (in percent). This  parameter is only required for thin-provisioned volumes. Default: 95

        :return: The growth_alert_threshold of this ThinVolumeCreateRequest.
        :rtype: int
        :required/optional: optional
        """
        return self._growth_alert_threshold

    @growth_alert_threshold.setter
    def growth_alert_threshold(self, growth_alert_threshold):
        """
        Sets the growth_alert_threshold of this ThinVolumeCreateRequest.
        The repository utilization warning threshold (in percent). This  parameter is only required for thin-provisioned volumes. Default: 95

        :param growth_alert_threshold: The growth_alert_threshold of this ThinVolumeCreateRequest.
        :type: int
        """
        self._growth_alert_threshold = growth_alert_threshold

    @property
    def create_default_mapping(self):
        """
        Gets the create_default_mapping of this ThinVolumeCreateRequest.
        Create the default volume mapping. Defaults to false.

        :return: The create_default_mapping of this ThinVolumeCreateRequest.
        :rtype: bool
        :required/optional: optional
        """
        return self._create_default_mapping

    @create_default_mapping.setter
    def create_default_mapping(self, create_default_mapping):
        """
        Sets the create_default_mapping of this ThinVolumeCreateRequest.
        Create the default volume mapping. Defaults to false.

        :param create_default_mapping: The create_default_mapping of this ThinVolumeCreateRequest.
        :type: bool
        """
        self._create_default_mapping = create_default_mapping

    @property
    def expansion_policy(self):
        """
        Gets the expansion_policy of this ThinVolumeCreateRequest.
        Thin Volume expansion policy.      If automatic, the thin volume will be expanded automatically when capacity is exceeded,      if manual, the volume must be expanded manually. Defaults to automatic.

        :return: The expansion_policy of this ThinVolumeCreateRequest.
        :rtype: str
        :required/optional: optional
        """
        return self._expansion_policy

    @expansion_policy.setter
    def expansion_policy(self, expansion_policy):
        """
        Sets the expansion_policy of this ThinVolumeCreateRequest.
        Thin Volume expansion policy.      If automatic, the thin volume will be expanded automatically when capacity is exceeded,      if manual, the volume must be expanded manually. Defaults to automatic.

        :param expansion_policy: The expansion_policy of this ThinVolumeCreateRequest.
        :type: str
        """
        allowed_values = ["unknown", "manual", "automatic", "__UNDEFINED"]
        if expansion_policy not in allowed_values:
            raise ValueError(
                "Invalid value for `expansion_policy`, must be one of {0}"
                .format(allowed_values)
            )
        self._expansion_policy = expansion_policy

    @property
    def cache_read_ahead(self):
        """
        Gets the cache_read_ahead of this ThinVolumeCreateRequest.
        Enable/Disable automatic cache read-ahead

        :return: The cache_read_ahead of this ThinVolumeCreateRequest.
        :rtype: bool
        :required/optional: optional
        """
        return self._cache_read_ahead

    @cache_read_ahead.setter
    def cache_read_ahead(self, cache_read_ahead):
        """
        Sets the cache_read_ahead of this ThinVolumeCreateRequest.
        Enable/Disable automatic cache read-ahead

        :param cache_read_ahead: The cache_read_ahead of this ThinVolumeCreateRequest.
        :type: bool
        """
        self._cache_read_ahead = cache_read_ahead

    @property
    def data_assurance_enabled(self):
        """
        Gets the data_assurance_enabled of this ThinVolumeCreateRequest.


        :return: The data_assurance_enabled of this ThinVolumeCreateRequest.
        :rtype: bool
        :required/optional: optional
        """
        return self._data_assurance_enabled

    @data_assurance_enabled.setter
    def data_assurance_enabled(self, data_assurance_enabled):
        """
        Sets the data_assurance_enabled of this ThinVolumeCreateRequest.


        :param data_assurance_enabled: The data_assurance_enabled of this ThinVolumeCreateRequest.
        :type: bool
        """
        self._data_assurance_enabled = data_assurance_enabled

    @property
    def meta_tags(self):
        """
        Gets the meta_tags of this ThinVolumeCreateRequest.
        Optional array of Meta Data tags for the volume.  

        :return: The meta_tags of this ThinVolumeCreateRequest.
        :rtype: list[VolumeMetadataItem]
        :required/optional: optional
        """
        return self._meta_tags

    @meta_tags.setter
    def meta_tags(self, meta_tags):
        """
        Sets the meta_tags of this ThinVolumeCreateRequest.
        Optional array of Meta Data tags for the volume.  

        :param meta_tags: The meta_tags of this ThinVolumeCreateRequest.
        :type: list[VolumeMetadataItem]
        """
        self._meta_tags = meta_tags

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        if self is None:
           return None
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        if self is None or other is None:
            return None
        return self.__dict__ == other.__dict__

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

