# coding: utf-8

"""
    Harbor API

    These APIs provide services for manipulating Harbor project.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from harbor_client.configuration import Configuration


class Accessory(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 = {
        'id': 'int',
        'artifact_id': 'int',
        'subject_artifact_id': 'int',
        'size': 'int',
        'digest': 'str',
        'type': 'str',
        'icon': 'str',
        'creation_time': 'datetime'
    }

    attribute_map = {
        'id': 'id',
        'artifact_id': 'artifact_id',
        'subject_artifact_id': 'subject_artifact_id',
        'size': 'size',
        'digest': 'digest',
        'type': 'type',
        'icon': 'icon',
        'creation_time': 'creation_time'
    }

    def __init__(self, id=None, artifact_id=None, subject_artifact_id=None, size=None, digest=None, type=None, icon=None, creation_time=None, _configuration=None):  # noqa: E501
        """Accessory - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._artifact_id = None
        self._subject_artifact_id = None
        self._size = None
        self._digest = None
        self._type = None
        self._icon = None
        self._creation_time = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if artifact_id is not None:
            self.artifact_id = artifact_id
        if subject_artifact_id is not None:
            self.subject_artifact_id = subject_artifact_id
        if size is not None:
            self.size = size
        if digest is not None:
            self.digest = digest
        if type is not None:
            self.type = type
        if icon is not None:
            self.icon = icon
        if creation_time is not None:
            self.creation_time = creation_time

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

        The ID of the accessory  # noqa: E501

        :return: The id of this Accessory.  # noqa: E501
        :rtype: int
        """
        return self._id

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

        The ID of the accessory  # noqa: E501

        :param id: The id of this Accessory.  # noqa: E501
        :type: int
        """

        self._id = id

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

        The artifact id of the accessory  # noqa: E501

        :return: The artifact_id of this Accessory.  # noqa: E501
        :rtype: int
        """
        return self._artifact_id

    @artifact_id.setter
    def artifact_id(self, artifact_id):
        """Sets the artifact_id of this Accessory.

        The artifact id of the accessory  # noqa: E501

        :param artifact_id: The artifact_id of this Accessory.  # noqa: E501
        :type: int
        """

        self._artifact_id = artifact_id

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

        The subject artifact id of the accessory  # noqa: E501

        :return: The subject_artifact_id of this Accessory.  # noqa: E501
        :rtype: int
        """
        return self._subject_artifact_id

    @subject_artifact_id.setter
    def subject_artifact_id(self, subject_artifact_id):
        """Sets the subject_artifact_id of this Accessory.

        The subject artifact id of the accessory  # noqa: E501

        :param subject_artifact_id: The subject_artifact_id of this Accessory.  # noqa: E501
        :type: int
        """

        self._subject_artifact_id = subject_artifact_id

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

        The artifact size of the accessory  # noqa: E501

        :return: The size of this Accessory.  # noqa: E501
        :rtype: int
        """
        return self._size

    @size.setter
    def size(self, size):
        """Sets the size of this Accessory.

        The artifact size of the accessory  # noqa: E501

        :param size: The size of this Accessory.  # noqa: E501
        :type: int
        """

        self._size = size

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

        The artifact digest of the accessory  # noqa: E501

        :return: The digest of this Accessory.  # noqa: E501
        :rtype: str
        """
        return self._digest

    @digest.setter
    def digest(self, digest):
        """Sets the digest of this Accessory.

        The artifact digest of the accessory  # noqa: E501

        :param digest: The digest of this Accessory.  # noqa: E501
        :type: str
        """

        self._digest = digest

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

        The artifact size of the accessory  # noqa: E501

        :return: The type of this Accessory.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this Accessory.

        The artifact size of the accessory  # noqa: E501

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

        self._type = type

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

        The icon of the accessory  # noqa: E501

        :return: The icon of this Accessory.  # noqa: E501
        :rtype: str
        """
        return self._icon

    @icon.setter
    def icon(self, icon):
        """Sets the icon of this Accessory.

        The icon of the accessory  # noqa: E501

        :param icon: The icon of this Accessory.  # noqa: E501
        :type: str
        """

        self._icon = icon

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

        The creation time of the accessory  # noqa: E501

        :return: The creation_time of this Accessory.  # noqa: E501
        :rtype: datetime
        """
        return self._creation_time

    @creation_time.setter
    def creation_time(self, creation_time):
        """Sets the creation_time of this Accessory.

        The creation time of the accessory  # noqa: E501

        :param creation_time: The creation_time of this Accessory.  # noqa: E501
        :type: datetime
        """

        self._creation_time = creation_time

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

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