# coding: utf-8

"""
    Model Management Service

    Model Management System (MMS) is a version control system for structured data. It exposes model information through RESTful web services that can be used for CRUD operations, branching, and tagging of the model repository.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from mms_python_client.models.element import Element  # noqa: F401,E501


class Elements(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 = {
        'elements': 'list[Element]',
        'comment': 'str',
        'source': 'str'
    }

    attribute_map = {
        'elements': 'elements',
        'comment': 'comment',
        'source': 'source'
    }

    def __init__(self, elements=None, comment=None, source=None):  # noqa: E501
        """Elements - a model defined in Swagger"""  # noqa: E501

        self._elements = None
        self._comment = None
        self._source = None
        self.discriminator = None

        self.elements = elements
        if comment is not None:
            self.comment = comment
        if source is not None:
            self.source = source

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


        :return: The elements of this Elements.  # noqa: E501
        :rtype: list[Element]
        """
        return self._elements

    @elements.setter
    def elements(self, elements):
        """Sets the elements of this Elements.


        :param elements: The elements of this Elements.  # noqa: E501
        :type: list[Element]
        """
        if elements is None:
            raise ValueError("Invalid value for `elements`, must not be `None`")  # noqa: E501

        self._elements = elements

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


        :return: The comment of this Elements.  # noqa: E501
        :rtype: str
        """
        return self._comment

    @comment.setter
    def comment(self, comment):
        """Sets the comment of this Elements.


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

        self._comment = comment

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


        :return: The source of this Elements.  # noqa: E501
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """Sets the source of this Elements.


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

        self._source = source

    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

        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, Elements):
            return False

        return self.__dict__ == other.__dict__

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