# 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 Platform(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 = {
        'architecture': 'str',
        'os': 'str',
        'os_version': 'str',
        'os_features': 'list[str]',
        'variant': 'str'
    }

    attribute_map = {
        'architecture': 'architecture',
        'os': 'os',
        'os_version': '&#39;os.version&#39;',
        'os_features': '&#39;os.features&#39;',
        'variant': 'variant'
    }

    def __init__(self, architecture=None, os=None, os_version=None, os_features=None, variant=None, _configuration=None):  # noqa: E501
        """Platform - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._architecture = None
        self._os = None
        self._os_version = None
        self._os_features = None
        self._variant = None
        self.discriminator = None

        if architecture is not None:
            self.architecture = architecture
        if os is not None:
            self.os = os
        if os_version is not None:
            self.os_version = os_version
        if os_features is not None:
            self.os_features = os_features
        if variant is not None:
            self.variant = variant

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

        The architecture that the artifact applys to  # noqa: E501

        :return: The architecture of this Platform.  # noqa: E501
        :rtype: str
        """
        return self._architecture

    @architecture.setter
    def architecture(self, architecture):
        """Sets the architecture of this Platform.

        The architecture that the artifact applys to  # noqa: E501

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

        self._architecture = architecture

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

        The OS that the artifact applys to  # noqa: E501

        :return: The os of this Platform.  # noqa: E501
        :rtype: str
        """
        return self._os

    @os.setter
    def os(self, os):
        """Sets the os of this Platform.

        The OS that the artifact applys to  # noqa: E501

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

        self._os = os

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

        The version of the OS that the artifact applys to  # noqa: E501

        :return: The os_version of this Platform.  # noqa: E501
        :rtype: str
        """
        return self._os_version

    @os_version.setter
    def os_version(self, os_version):
        """Sets the os_version of this Platform.

        The version of the OS that the artifact applys to  # noqa: E501

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

        self._os_version = os_version

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

        The features of the OS that the artifact applys to  # noqa: E501

        :return: The os_features of this Platform.  # noqa: E501
        :rtype: list[str]
        """
        return self._os_features

    @os_features.setter
    def os_features(self, os_features):
        """Sets the os_features of this Platform.

        The features of the OS that the artifact applys to  # noqa: E501

        :param os_features: The os_features of this Platform.  # noqa: E501
        :type: list[str]
        """

        self._os_features = os_features

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

        The variant of the CPU  # noqa: E501

        :return: The variant of this Platform.  # noqa: E501
        :rtype: str
        """
        return self._variant

    @variant.setter
    def variant(self, variant):
        """Sets the variant of this Platform.

        The variant of the CPU  # noqa: E501

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

        self._variant = variant

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

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