# coding: utf-8

"""
    Workspace Data Service

    This page lists current APIs. As of v0.2, all APIs are subject to change without notice.   # noqa: E501

    The version of the OpenAPI document: v0.2
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from wds_client.configuration import Configuration


class Components(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'db': 'DbComponent',
        'disk_space': 'DiskSpaceComponent',
        'ping': 'Component',
        'main_db': 'DbValidationcomponent'
    }

    attribute_map = {
        'db': 'db',
        'disk_space': 'diskSpace',
        'ping': 'ping',
        'main_db': 'mainDb'
    }

    def __init__(self, db=None, disk_space=None, ping=None, main_db=None, local_vars_configuration=None):  # noqa: E501
        """Components - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._db = None
        self._disk_space = None
        self._ping = None
        self._main_db = None
        self.discriminator = None

        if db is not None:
            self.db = db
        if disk_space is not None:
            self.disk_space = disk_space
        if ping is not None:
            self.ping = ping
        if main_db is not None:
            self.main_db = main_db

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


        :return: The db of this Components.  # noqa: E501
        :rtype: DbComponent
        """
        return self._db

    @db.setter
    def db(self, db):
        """Sets the db of this Components.


        :param db: The db of this Components.  # noqa: E501
        :type: DbComponent
        """

        self._db = db

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


        :return: The disk_space of this Components.  # noqa: E501
        :rtype: DiskSpaceComponent
        """
        return self._disk_space

    @disk_space.setter
    def disk_space(self, disk_space):
        """Sets the disk_space of this Components.


        :param disk_space: The disk_space of this Components.  # noqa: E501
        :type: DiskSpaceComponent
        """

        self._disk_space = disk_space

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


        :return: The ping of this Components.  # noqa: E501
        :rtype: Component
        """
        return self._ping

    @ping.setter
    def ping(self, ping):
        """Sets the ping of this Components.


        :param ping: The ping of this Components.  # noqa: E501
        :type: Component
        """

        self._ping = ping

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


        :return: The main_db of this Components.  # noqa: E501
        :rtype: DbValidationcomponent
        """
        return self._main_db

    @main_db.setter
    def main_db(self, main_db):
        """Sets the main_db of this Components.


        :param main_db: The main_db of this Components.  # noqa: E501
        :type: DbValidationcomponent
        """

        self._main_db = main_db

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

        for attr, _ in six.iteritems(self.openapi_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 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, Components):
            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, Components):
            return True

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