# 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 Reference(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 = {
        'parent_id': 'int',
        'child_id': 'int',
        'child_digest': 'str',
        'platform': 'Platform',
        'annotations': 'Annotations',
        'urls': 'list[str]'
    }

    attribute_map = {
        'parent_id': 'parent_id',
        'child_id': 'child_id',
        'child_digest': 'child_digest',
        'platform': 'platform',
        'annotations': 'annotations',
        'urls': 'urls'
    }

    def __init__(self, parent_id=None, child_id=None, child_digest=None, platform=None, annotations=None, urls=None, _configuration=None):  # noqa: E501
        """Reference - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._parent_id = None
        self._child_id = None
        self._child_digest = None
        self._platform = None
        self._annotations = None
        self._urls = None
        self.discriminator = None

        if parent_id is not None:
            self.parent_id = parent_id
        if child_id is not None:
            self.child_id = child_id
        if child_digest is not None:
            self.child_digest = child_digest
        if platform is not None:
            self.platform = platform
        if annotations is not None:
            self.annotations = annotations
        if urls is not None:
            self.urls = urls

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

        The parent ID of the reference  # noqa: E501

        :return: The parent_id of this Reference.  # noqa: E501
        :rtype: int
        """
        return self._parent_id

    @parent_id.setter
    def parent_id(self, parent_id):
        """Sets the parent_id of this Reference.

        The parent ID of the reference  # noqa: E501

        :param parent_id: The parent_id of this Reference.  # noqa: E501
        :type: int
        """

        self._parent_id = parent_id

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

        The child ID of the reference  # noqa: E501

        :return: The child_id of this Reference.  # noqa: E501
        :rtype: int
        """
        return self._child_id

    @child_id.setter
    def child_id(self, child_id):
        """Sets the child_id of this Reference.

        The child ID of the reference  # noqa: E501

        :param child_id: The child_id of this Reference.  # noqa: E501
        :type: int
        """

        self._child_id = child_id

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

        The digest of the child artifact  # noqa: E501

        :return: The child_digest of this Reference.  # noqa: E501
        :rtype: str
        """
        return self._child_digest

    @child_digest.setter
    def child_digest(self, child_digest):
        """Sets the child_digest of this Reference.

        The digest of the child artifact  # noqa: E501

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

        self._child_digest = child_digest

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


        :return: The platform of this Reference.  # noqa: E501
        :rtype: Platform
        """
        return self._platform

    @platform.setter
    def platform(self, platform):
        """Sets the platform of this Reference.


        :param platform: The platform of this Reference.  # noqa: E501
        :type: Platform
        """

        self._platform = platform

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


        :return: The annotations of this Reference.  # noqa: E501
        :rtype: Annotations
        """
        return self._annotations

    @annotations.setter
    def annotations(self, annotations):
        """Sets the annotations of this Reference.


        :param annotations: The annotations of this Reference.  # noqa: E501
        :type: Annotations
        """

        self._annotations = annotations

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

        The download URLs  # noqa: E501

        :return: The urls of this Reference.  # noqa: E501
        :rtype: list[str]
        """
        return self._urls

    @urls.setter
    def urls(self, urls):
        """Sets the urls of this Reference.

        The download URLs  # noqa: E501

        :param urls: The urls of this Reference.  # noqa: E501
        :type: list[str]
        """

        self._urls = urls

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

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