# coding: utf-8

"""
    Pure1 Public REST API

    Pure1 Public REST API, developed by [Pure Storage, Inc.](http://www.purestorage.com/)  [Knowledge base reference documentation](https://support.purestorage.com/Pure1/Pure1_Manage/Pure1_Manage_-_REST_API/Pure1_Manage_-_REST_API__Reference)  # 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 pypureclient.pure1.models.arrays_built_in import ArraysBuiltIn  # noqa: F401,E501
from pypureclient.pure1.models.fixed_reference import FixedReference  # noqa: F401,E501


class VolumeSnapshot(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 = {
        'as_of': 'int',
        'id': 'str',
        'name': 'str',
        'arrays': 'list[FixedReference]',
        'created': 'int',
        'destroyed': 'bool',
        'on': 'FixedReference',
        'pod': 'FixedReference',
        'provisioned': 'int',
        'serial': 'str',
        'snapshot_group': 'FixedReference',
        'source': 'FixedReference',
        'suffix': 'str'
    }

    attribute_map = {
        'as_of': '_as_of',
        'id': 'id',
        'name': 'name',
        'arrays': 'arrays',
        'created': 'created',
        'destroyed': 'destroyed',
        'on': 'on',
        'pod': 'pod',
        'provisioned': 'provisioned',
        'serial': 'serial',
        'snapshot_group': 'snapshot_group',
        'source': 'source',
        'suffix': 'suffix'
    }

    def __init__(self, as_of=None, id=None, name=None, arrays=None, created=None, destroyed=None, on=None, pod=None, provisioned=None, serial=None, snapshot_group=None, source=None, suffix=None):  # noqa: E501
        """VolumeSnapshot - a model defined in Swagger"""  # noqa: E501

        self._as_of = None
        self._id = None
        self._name = None
        self._arrays = None
        self._created = None
        self._destroyed = None
        self._on = None
        self._pod = None
        self._provisioned = None
        self._serial = None
        self._snapshot_group = None
        self._source = None
        self._suffix = None
        self.discriminator = None

        self.as_of = as_of
        self.id = id
        self.name = name
        self.arrays = arrays
        self.created = created
        self.destroyed = destroyed
        self.on = on
        self.pod = pod
        self.provisioned = provisioned
        self.serial = serial
        self.snapshot_group = snapshot_group
        self.source = source
        self.suffix = suffix

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

        The freshness of the data (timestamp in millis since epoch)  # noqa: E501

        :return: The as_of of this VolumeSnapshot.  # noqa: E501
        :rtype: int
        """
        return self._as_of

    @as_of.setter
    def as_of(self, as_of):
        """Sets the as_of of this VolumeSnapshot.

        The freshness of the data (timestamp in millis since epoch)  # noqa: E501

        :param as_of: The as_of of this VolumeSnapshot.  # noqa: E501
        :type: int
        """
        if as_of is None:
            raise ValueError("Invalid value for `as_of`, must not be `None`")  # noqa: E501

        self._as_of = as_of

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

        A non-modifiable, globally unique ID chosen by the system.  # noqa: E501

        :return: The id of this VolumeSnapshot.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this VolumeSnapshot.

        A non-modifiable, globally unique ID chosen by the system.  # noqa: E501

        :param id: The id of this VolumeSnapshot.  # noqa: E501
        :type: str
        """

        self._id = id

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

        A non-modifiable, locally unique name chosen by the system.  # noqa: E501

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

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

        A non-modifiable, locally unique name chosen by the system.  # noqa: E501

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

        self._name = name

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

        The list of arrays where this resource exists. Many resources are on a single array, but some resources - for example pods - can be stretched across multiple arrays.  # noqa: E501

        :return: The arrays of this VolumeSnapshot.  # noqa: E501
        :rtype: list[FixedReference]
        """
        return self._arrays

    @arrays.setter
    def arrays(self, arrays):
        """Sets the arrays of this VolumeSnapshot.

        The list of arrays where this resource exists. Many resources are on a single array, but some resources - for example pods - can be stretched across multiple arrays.  # noqa: E501

        :param arrays: The arrays of this VolumeSnapshot.  # noqa: E501
        :type: list[FixedReference]
        """

        self._arrays = arrays

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

        Creation time in milliseconds since UNIX epoch.  # noqa: E501

        :return: The created of this VolumeSnapshot.  # noqa: E501
        :rtype: int
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this VolumeSnapshot.

        Creation time in milliseconds since UNIX epoch.  # noqa: E501

        :param created: The created of this VolumeSnapshot.  # noqa: E501
        :type: int
        """

        self._created = created

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

        Indicates if this snapshot has been destroyed and is pending eradication. Default is false.  # noqa: E501

        :return: The destroyed of this VolumeSnapshot.  # noqa: E501
        :rtype: bool
        """
        return self._destroyed

    @destroyed.setter
    def destroyed(self, destroyed):
        """Sets the destroyed of this VolumeSnapshot.

        Indicates if this snapshot has been destroyed and is pending eradication. Default is false.  # noqa: E501

        :param destroyed: The destroyed of this VolumeSnapshot.  # noqa: E501
        :type: bool
        """

        self._destroyed = destroyed

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

        A reference to the array or the offload where the snapshot is stored.  # noqa: E501

        :return: The on of this VolumeSnapshot.  # noqa: E501
        :rtype: FixedReference
        """
        return self._on

    @on.setter
    def on(self, on):
        """Sets the on of this VolumeSnapshot.

        A reference to the array or the offload where the snapshot is stored.  # noqa: E501

        :param on: The on of this VolumeSnapshot.  # noqa: E501
        :type: FixedReference
        """

        self._on = on

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


        :return: The pod of this VolumeSnapshot.  # noqa: E501
        :rtype: FixedReference
        """
        return self._pod

    @pod.setter
    def pod(self, pod):
        """Sets the pod of this VolumeSnapshot.


        :param pod: The pod of this VolumeSnapshot.  # noqa: E501
        :type: FixedReference
        """

        self._pod = pod

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

        Indicates the size (in bytes) of the volume when the snapshot was taken.  # noqa: E501

        :return: The provisioned of this VolumeSnapshot.  # noqa: E501
        :rtype: int
        """
        return self._provisioned

    @provisioned.setter
    def provisioned(self, provisioned):
        """Sets the provisioned of this VolumeSnapshot.

        Indicates the size (in bytes) of the volume when the snapshot was taken.  # noqa: E501

        :param provisioned: The provisioned of this VolumeSnapshot.  # noqa: E501
        :type: int
        """

        self._provisioned = provisioned

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

        Serial number generated by Purity when the snapshot was created.  # noqa: E501

        :return: The serial of this VolumeSnapshot.  # noqa: E501
        :rtype: str
        """
        return self._serial

    @serial.setter
    def serial(self, serial):
        """Sets the serial of this VolumeSnapshot.

        Serial number generated by Purity when the snapshot was created.  # noqa: E501

        :param serial: The serial of this VolumeSnapshot.  # noqa: E501
        :type: str
        """

        self._serial = serial

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

        A reference to a consistency group snapshot that this snapshot is part of.  # noqa: E501

        :return: The snapshot_group of this VolumeSnapshot.  # noqa: E501
        :rtype: FixedReference
        """
        return self._snapshot_group

    @snapshot_group.setter
    def snapshot_group(self, snapshot_group):
        """Sets the snapshot_group of this VolumeSnapshot.

        A reference to a consistency group snapshot that this snapshot is part of.  # noqa: E501

        :param snapshot_group: The snapshot_group of this VolumeSnapshot.  # noqa: E501
        :type: FixedReference
        """

        self._snapshot_group = snapshot_group

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

        A reference to the volume that the snapshot was taken from.  # noqa: E501

        :return: The source of this VolumeSnapshot.  # noqa: E501
        :rtype: FixedReference
        """
        return self._source

    @source.setter
    def source(self, source):
        """Sets the source of this VolumeSnapshot.

        A reference to the volume that the snapshot was taken from.  # noqa: E501

        :param source: The source of this VolumeSnapshot.  # noqa: E501
        :type: FixedReference
        """

        self._source = source

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

        Suffix added to the source volume name used to generate the volume snapshot name.  # noqa: E501

        :return: The suffix of this VolumeSnapshot.  # noqa: E501
        :rtype: str
        """
        return self._suffix

    @suffix.setter
    def suffix(self, suffix):
        """Sets the suffix of this VolumeSnapshot.

        Suffix added to the source volume name used to generate the volume snapshot name.  # noqa: E501

        :param suffix: The suffix of this VolumeSnapshot.  # noqa: E501
        :type: str
        """

        self._suffix = suffix

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

        return self.__dict__ == other.__dict__

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