# coding: utf-8

"""
    Cloudera Manager API

    <h1>Cloudera Manager API v50</h1>       <p>Introduced in Cloudera Manager 7.8.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>

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


from pprint import pformat
from six import iteritems
import re


class ApiOsDistribution(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 = {
        'distribution_type': 'ApiOsDistributionType',
        'name': 'str',
        'version': 'str'
    }

    attribute_map = {
        'distribution_type': 'distributionType',
        'name': 'name',
        'version': 'version'
    }

    def __init__(self, distribution_type=None, name=None, version=None):
        """
        ApiOsDistribution - a model defined in Swagger
        """

        self._distribution_type = None
        self._name = None
        self._version = None

        if distribution_type is not None:
          self.distribution_type = distribution_type
        if name is not None:
          self.name = name
        if version is not None:
          self.version = version

    @property
    def distribution_type(self):
        """
        Gets the distribution_type of this ApiOsDistribution.
        High-level OS distribution type

        :return: The distribution_type of this ApiOsDistribution.
        :rtype: ApiOsDistributionType
        """
        return self._distribution_type

    @distribution_type.setter
    def distribution_type(self, distribution_type):
        """
        Sets the distribution_type of this ApiOsDistribution.
        High-level OS distribution type

        :param distribution_type: The distribution_type of this ApiOsDistribution.
        :type: ApiOsDistributionType
        """

        self._distribution_type = distribution_type

    @property
    def name(self):
        """
        Gets the name of this ApiOsDistribution.
        Distribution full name; 'redhat', 'centos', 'ubuntu' etc

        :return: The name of this ApiOsDistribution.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this ApiOsDistribution.
        Distribution full name; 'redhat', 'centos', 'ubuntu' etc

        :param name: The name of this ApiOsDistribution.
        :type: str
        """

        self._name = name

    @property
    def version(self):
        """
        Gets the version of this ApiOsDistribution.
        Full OS version string; eg. 7.3.1611

        :return: The version of this ApiOsDistribution.
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """
        Sets the version of this ApiOsDistribution.
        Full OS version string; eg. 7.3.1611

        :param version: The version of this ApiOsDistribution.
        :type: str
        """

        self._version = version

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, ApiOsDistribution):
            return False

        return self.__dict__ == other.__dict__

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