# coding: utf-8

"""
    DataDomain Rest API Documentation

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from dd_sdk_1_0.configuration import Configuration


class VdiskDeviceCreateDeviceGroupSize(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 = {
        'count': 'int',
        'capacity_in_bytes': 'int',
        'state': 'VdiskDeviceState',
        'sectors': 'int',
        'geometry': 'GeometryConfig',
        '_property': 'list[KeyValuePair]'
    }

    attribute_map = {
        'count': 'count',
        'capacity_in_bytes': 'capacity_in_bytes',
        'state': 'state',
        'sectors': 'sectors',
        'geometry': 'geometry',
        '_property': 'property'
    }

    def __init__(self, count=None, capacity_in_bytes=None, state=None, sectors=None, geometry=None, _property=None, _configuration=None):  # noqa: E501
        """VdiskDeviceCreateDeviceGroupSize - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._count = None
        self._capacity_in_bytes = None
        self._state = None
        self._sectors = None
        self._geometry = None
        self.__property = None
        self.discriminator = None

        self.count = count
        if capacity_in_bytes is not None:
            self.capacity_in_bytes = capacity_in_bytes
        if state is not None:
            self.state = state
        if sectors is not None:
            self.sectors = sectors
        if geometry is not None:
            self.geometry = geometry
        if _property is not None:
            self._property = _property

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


        :return: The count of this VdiskDeviceCreateDeviceGroupSize.  # noqa: E501
        :rtype: int
        """
        return self._count

    @count.setter
    def count(self, count):
        """Sets the count of this VdiskDeviceCreateDeviceGroupSize.


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

        self._count = count

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


        :return: The capacity_in_bytes of this VdiskDeviceCreateDeviceGroupSize.  # noqa: E501
        :rtype: int
        """
        return self._capacity_in_bytes

    @capacity_in_bytes.setter
    def capacity_in_bytes(self, capacity_in_bytes):
        """Sets the capacity_in_bytes of this VdiskDeviceCreateDeviceGroupSize.


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

        self._capacity_in_bytes = capacity_in_bytes

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


        :return: The state of this VdiskDeviceCreateDeviceGroupSize.  # noqa: E501
        :rtype: VdiskDeviceState
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this VdiskDeviceCreateDeviceGroupSize.


        :param state: The state of this VdiskDeviceCreateDeviceGroupSize.  # noqa: E501
        :type: VdiskDeviceState
        """

        self._state = state

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


        :return: The sectors of this VdiskDeviceCreateDeviceGroupSize.  # noqa: E501
        :rtype: int
        """
        return self._sectors

    @sectors.setter
    def sectors(self, sectors):
        """Sets the sectors of this VdiskDeviceCreateDeviceGroupSize.


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

        self._sectors = sectors

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


        :return: The geometry of this VdiskDeviceCreateDeviceGroupSize.  # noqa: E501
        :rtype: GeometryConfig
        """
        return self._geometry

    @geometry.setter
    def geometry(self, geometry):
        """Sets the geometry of this VdiskDeviceCreateDeviceGroupSize.


        :param geometry: The geometry of this VdiskDeviceCreateDeviceGroupSize.  # noqa: E501
        :type: GeometryConfig
        """

        self._geometry = geometry

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


        :return: The _property of this VdiskDeviceCreateDeviceGroupSize.  # noqa: E501
        :rtype: list[KeyValuePair]
        """
        return self.__property

    @_property.setter
    def _property(self, _property):
        """Sets the _property of this VdiskDeviceCreateDeviceGroupSize.


        :param _property: The _property of this VdiskDeviceCreateDeviceGroupSize.  # noqa: E501
        :type: list[KeyValuePair]
        """

        self.__property = _property

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

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